diff --git a/agents/opencode.ts b/agents/opencode.ts index 4e333cb..eb242fc 100644 --- a/agents/opencode.ts +++ b/agents/opencode.ts @@ -1,4 +1,4 @@ -import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs"; +import { mkdirSync, writeFileSync } from "node:fs"; import { join } from "node:path"; import { log } from "../utils/cli.ts"; @@ -11,6 +11,241 @@ import { setupProcessAgentEnv, } from "./shared.ts"; +export const opencode = agent({ + name: "opencode", + install: async () => { + return await installFromNpmTarball({ + packageName: "opencode-ai", + version: "latest", + executablePath: "bin/opencode", + installDependencies: true, + }); + }, + run: async ({ payload, apiKey: _apiKey, apiKeys, mcpServers, cliPath, prepResults, repo }) => { + // 1. configure home/config directory + const tempHome = process.env.PULLFROG_TEMP_DIR!; + const configDir = join(tempHome, ".config", "opencode"); + mkdirSync(configDir, { recursive: true }); + + configureOpenCode({ mcpServers, sandbox: payload.sandbox ?? false }); + + const prompt = addInstructions({ payload, prepResults, repo }); + log.group("Full prompt", () => log.info(prompt)); + + // message positional must come right after "run", before flags + const args = ["run", prompt, "--format", "json"]; + + if (payload.sandbox) { + log.info("🔒 sandbox mode enabled: restricting to read-only operations"); + } + + // 6. set up environment + setupProcessAgentEnv({ HOME: tempHome }); + + // build env vars: start with process.env (includes all API_KEY vars loaded by config()) + // exclude GITHUB_TOKEN - OpenCode should use MCP server for GitHub operations, not direct token + // then override with apiKeys and HOME + const env: Record = { + ...(Object.fromEntries( + Object.entries(process.env).filter( + ([key, value]) => value !== undefined && key !== "GITHUB_TOKEN" + ) + ) as Record), + HOME: tempHome, + }; + + // add/override API keys from apiKeys object (uppercase keys) + for (const [key, value] of Object.entries(apiKeys || {})) { + env[key.toUpperCase()] = value; + } + + // run OpenCode in the repository directory (process.cwd() is set to GITHUB_WORKSPACE or repo dir) + const repoDir = process.cwd(); + + log.info(`🚀 Starting OpenCode CLI: ${cliPath} ${args.join(" ")}`); + log.info(`📁 Working directory: ${repoDir}`); + log.info(`🏠 HOME env var: ${env.HOME}`); + log.info(`📋 Config directory: ${join(env.HOME!, ".config", "opencode")}`); + + // log key env vars (not values for security) + const envKeys = Object.keys(env).filter( + (k) => !k.includes("KEY") && !k.includes("TOKEN") && !k.includes("SECRET") + ); + log.info(`🔑 Environment keys (non-sensitive): ${envKeys.join(", ")}`); + const startTime = Date.now(); + let lastActivityTime = startTime; + let eventCount = 0; + + let output = ""; + const result = await spawn({ + cmd: cliPath, + args, + cwd: repoDir, + env, + timeout: 600000, // 10 minutes timeout to prevent infinite hangs + stdio: ["ignore", "pipe", "pipe"], + onStdout: async (chunk) => { + console.log(JSON.stringify(JSON.parse(chunk), null, 2)); + const text = chunk.toString(); + output += text; + + // parse each line as JSON (opencode outputs one JSON object per line) + const lines = text.split("\n"); + for (const line of lines) { + const trimmed = line.trim(); + if (!trimmed) { + continue; + } + + try { + const event = JSON.parse(trimmed) as OpenCodeEvent; + eventCount++; + const timeSinceLastActivity = Date.now() - lastActivityTime; + if (timeSinceLastActivity > 10000) { + const activeToolCalls = toolCallTimings.size; + const toolCallInfo = + activeToolCalls > 0 + ? ` (waiting for ${activeToolCalls} tool call${activeToolCalls > 1 ? "s" : ""})` + : " (OpenCode may be processing internally - LLM calls, planning, etc.)"; + log.warning( + `⚠️ No activity for ${(timeSinceLastActivity / 1000).toFixed(1)}s${toolCallInfo} (${eventCount} events processed so far)` + ); + } + lastActivityTime = Date.now(); + const handler = messageHandlers[event.type as keyof typeof messageHandlers]; + if (handler) { + await handler(event as never); + } else { + // log unhandled event types for visibility + log.info( + `📋 OpenCode event (unhandled): type=${event.type}, data=${JSON.stringify(event).substring(0, 500)}` + ); + } + } catch { + // non-JSON lines are ignored + } + } + }, + onStderr: (chunk) => { + console.log(JSON.stringify(JSON.parse(chunk), null, 2)); + const trimmed = chunk.trim(); + if (trimmed) { + log.warning(trimmed); + } + }, + }); + + const duration = Date.now() - startTime; + log.info(`✅ OpenCode CLI completed in ${duration}ms with exit code ${result.exitCode}`); + + // 8. log tokens if they weren't logged yet (fallback if result event wasn't emitted) + if (!tokensLogged && (accumulatedTokens.input > 0 || accumulatedTokens.output > 0)) { + const totalTokens = accumulatedTokens.input + accumulatedTokens.output; + await log.summaryTable([ + [ + { data: "Input Tokens", header: true }, + { data: "Output Tokens", header: true }, + { data: "Total Tokens", header: true }, + ], + [String(accumulatedTokens.input), String(accumulatedTokens.output), String(totalTokens)], + ]); + } + + // 9. return result + if (result.exitCode !== 0) { + const errorMessage = + result.stderr || result.stdout || "Unknown error - no output from OpenCode CLI"; + log.error(`OpenCode CLI exited with code ${result.exitCode}: ${errorMessage}`); + log.debug(`OpenCode stdout: ${result.stdout?.substring(0, 500)}`); + log.debug(`OpenCode stderr: ${result.stderr?.substring(0, 500)}`); + return { + success: false, + output: finalOutput || output, + error: errorMessage, + }; + } + + return { + success: true, + output: finalOutput || output, + }; + }, +}); + +interface ConfigureOpenCodeParams { + mcpServers: ConfigureMcpServersParams["mcpServers"]; + sandbox: boolean; +} + +/** + * Configure OpenCode via opencode.json config file. + * Builds complete config with MCP servers and permissions in a single write to avoid race conditions. + */ +function configureOpenCode({ mcpServers, sandbox }: ConfigureOpenCodeParams): void { + const tempHome = process.env.PULLFROG_TEMP_DIR!; + const configDir = join(tempHome, ".config", "opencode"); + mkdirSync(configDir, { recursive: true }); + const configPath = join(configDir, "opencode.json"); + + // build MCP servers config + const opencodeMcpServers: Record = {}; + for (const [serverName, serverConfig] of Object.entries(mcpServers)) { + if (serverConfig.type !== "http") { + log.error( + `unsupported MCP server type for OpenCode: ${(serverConfig as never as { type: string }).type || "unknown"}` + ); + throw new Error( + `Unsupported MCP server type for OpenCode: ${(serverConfig as never as { type: string }).type || "unknown"}` + ); + } + + opencodeMcpServers[serverName] = { + type: "remote", + url: serverConfig.url, + }; + } + + // build permissions config + const permission = sandbox + ? { + edit: "deny", + bash: "deny", + webfetch: "deny", + doom_loop: "allow", + external_directory: "allow", + } + : { + edit: "allow", + bash: "allow", + webfetch: "allow", + doom_loop: "allow", + external_directory: "allow", + }; + + // build complete config in one object + const config = { + mcp: opencodeMcpServers, + permission, + }; + + const configJson = JSON.stringify(config, null, 2); + try { + writeFileSync(configPath, configJson, "utf-8"); + } catch (error) { + log.error( + `failed to write OpenCode config to ${configPath}: ${error instanceof Error ? error.message : String(error)}` + ); + throw error; + } + + log.info(`OpenCode config written to ${configPath} (sandbox: ${sandbox})`); + log.info(`OpenCode config contents:\n${configJson}`); +} + +//////////////////////////////////////////// +//////////// EVENT HANDLERS //////////// +//////////////////////////////////////////// + // opencode cli event types inferred from json output format interface OpenCodeInitEvent { type: "init"; @@ -314,263 +549,3 @@ const messageHandlers = { } }, }; - -export const opencode = agent({ - name: "opencode", - install: async () => { - return await installFromNpmTarball({ - packageName: "opencode-ai", - version: "latest", - executablePath: "bin/opencode", - installDependencies: true, - }); - }, - run: async ({ payload, apiKey: _apiKey, apiKeys, mcpServers, cliPath, prepResults, repo }) => { - // 1. configure home/config directory - const tempHome = process.env.PULLFROG_TEMP_DIR!; - const configDir = join(tempHome, ".config", "opencode"); - mkdirSync(configDir, { recursive: true }); - - configureOpenCodeMcpServers({ mcpServers }); - configureOpenCodeSandbox({ sandbox: payload.sandbox ?? false }); - - const prompt = addInstructions({ payload, prepResults, repo }); - log.group("Full prompt", () => log.info(prompt)); - - // message positional must come right after "run", before flags - const args = ["run", prompt, "--format", "json"]; - - if (payload.sandbox) { - log.info("🔒 sandbox mode enabled: restricting to read-only operations"); - } - - // 6. set up environment - setupProcessAgentEnv({ HOME: tempHome }); - - // build env vars: start with process.env (includes all API_KEY vars loaded by config()) - // exclude GITHUB_TOKEN - OpenCode should use MCP server for GitHub operations, not direct token - // then override with apiKeys and HOME - const env: Record = { - ...(Object.fromEntries( - Object.entries(process.env).filter( - ([key, value]) => value !== undefined && key !== "GITHUB_TOKEN" - ) - ) as Record), - HOME: tempHome, - }; - - // add/override API keys from apiKeys object (uppercase keys) - for (const [key, value] of Object.entries(apiKeys || {})) { - env[key.toUpperCase()] = value; - } - - // run OpenCode in the repository directory (process.cwd() is set to GITHUB_WORKSPACE or repo dir) - const repoDir = process.cwd(); - - log.info(`🚀 Starting OpenCode CLI: ${cliPath} ${args.join(" ")}`); - log.info(`📁 Working directory: ${repoDir}`); - log.info(`🏠 HOME env var: ${env.HOME}`); - log.info(`📋 Config directory: ${join(env.HOME!, ".config", "opencode")}`); - - // log key env vars (not values for security) - const envKeys = Object.keys(env).filter( - (k) => !k.includes("KEY") && !k.includes("TOKEN") && !k.includes("SECRET") - ); - log.info(`🔑 Environment keys (non-sensitive): ${envKeys.join(", ")}`); - const startTime = Date.now(); - let lastActivityTime = startTime; - let eventCount = 0; - - let output = ""; - const result = await spawn({ - cmd: cliPath, - args, - cwd: repoDir, - env, - timeout: 600000, // 10 minutes timeout to prevent infinite hangs - stdio: ["ignore", "pipe", "pipe"], - onStdout: async (chunk) => { - log.debug(JSON.stringify(JSON.parse(chunk), null, 2)); - const text = chunk.toString(); - output += text; - - // parse each line as JSON (opencode outputs one JSON object per line) - const lines = text.split("\n"); - for (const line of lines) { - const trimmed = line.trim(); - if (!trimmed) { - continue; - } - - try { - const event = JSON.parse(trimmed) as OpenCodeEvent; - eventCount++; - const timeSinceLastActivity = Date.now() - lastActivityTime; - if (timeSinceLastActivity > 10000) { - const activeToolCalls = toolCallTimings.size; - const toolCallInfo = - activeToolCalls > 0 - ? ` (waiting for ${activeToolCalls} tool call${activeToolCalls > 1 ? "s" : ""})` - : " (OpenCode may be processing internally - LLM calls, planning, etc.)"; - log.warning( - `⚠️ No activity for ${(timeSinceLastActivity / 1000).toFixed(1)}s${toolCallInfo} (${eventCount} events processed so far)` - ); - } - lastActivityTime = Date.now(); - const handler = messageHandlers[event.type as keyof typeof messageHandlers]; - if (handler) { - await handler(event as never); - } else { - // log unhandled event types for visibility - log.info( - `📋 OpenCode event (unhandled): type=${event.type}, data=${JSON.stringify(event).substring(0, 500)}` - ); - } - } catch { - // non-JSON lines are ignored - } - } - }, - onStderr: (chunk) => { - log.debug(JSON.stringify(JSON.parse(chunk), null, 2)); - const trimmed = chunk.trim(); - if (trimmed) { - log.warning(trimmed); - } - }, - }); - - const duration = Date.now() - startTime; - log.info(`✅ OpenCode CLI completed in ${duration}ms with exit code ${result.exitCode}`); - - // 8. log tokens if they weren't logged yet (fallback if result event wasn't emitted) - if (!tokensLogged && (accumulatedTokens.input > 0 || accumulatedTokens.output > 0)) { - const totalTokens = accumulatedTokens.input + accumulatedTokens.output; - await log.summaryTable([ - [ - { data: "Input Tokens", header: true }, - { data: "Output Tokens", header: true }, - { data: "Total Tokens", header: true }, - ], - [String(accumulatedTokens.input), String(accumulatedTokens.output), String(totalTokens)], - ]); - } - - // 9. return result - if (result.exitCode !== 0) { - const errorMessage = - result.stderr || result.stdout || "Unknown error - no output from OpenCode CLI"; - log.error(`OpenCode CLI exited with code ${result.exitCode}: ${errorMessage}`); - log.debug(`OpenCode stdout: ${result.stdout?.substring(0, 500)}`); - log.debug(`OpenCode stderr: ${result.stderr?.substring(0, 500)}`); - return { - success: false, - output: finalOutput || output, - error: errorMessage, - }; - } - - return { - success: true, - output: finalOutput || output, - }; - }, -}); - -/** - * Configure MCP servers for OpenCode using opencode.json config file. - * OpenCode uses opencode.json with mcp section supporting remote servers with type: "remote" and url. - */ -function configureOpenCodeMcpServers({ - mcpServers, -}: { - mcpServers: ConfigureMcpServersParams["mcpServers"]; -}): void { - const tempHome = process.env.PULLFROG_TEMP_DIR!; - const configDir = join(tempHome, ".config", "opencode"); - mkdirSync(configDir, { recursive: true }); - const configPath = join(configDir, "opencode.json"); - - // convert to opencode's expected format - const opencodeMcpServers: Record = {}; - for (const [serverName, serverConfig] of Object.entries(mcpServers)) { - if (serverConfig.type !== "http") { - throw new Error( - `Unsupported MCP server type for OpenCode: ${(serverConfig as any).type || "unknown"}` - ); - } - - opencodeMcpServers[serverName] = { - type: "remote", - url: serverConfig.url, - enabled: true, - }; - } - - // read existing config if it exists, or create new one - let config: Record = {}; - try { - if (existsSync(configPath)) { - const existingConfig = readFileSync(configPath, "utf-8"); - config = JSON.parse(existingConfig); - } - } catch { - // config doesn't exist yet or is invalid, start fresh - } - - config.mcp = opencodeMcpServers; - - const configJson = JSON.stringify(config, null, 2); - writeFileSync(configPath, configJson, "utf-8"); - log.info(`MCP config written to ${configPath}`); - log.info(`MCP config contents:\n${configJson}`); -} - -/** - * Configure OpenCode sandbox mode via opencode.json. - * When sandbox is enabled, restricts tools to read-only operations. - * See https://opencode.ai/docs/permissions/ for config format. - */ -function configureOpenCodeSandbox({ sandbox }: { sandbox: boolean }): void { - const tempHome = process.env.PULLFROG_TEMP_DIR!; - const configDir = join(tempHome, ".config", "opencode"); - mkdirSync(configDir, { recursive: true }); - const configPath = join(configDir, "opencode.json"); - - // read existing config if it exists, or create new one - let config: Record = {}; - try { - if (existsSync(configPath)) { - const existingConfig = readFileSync(configPath, "utf-8"); - config = JSON.parse(existingConfig); - } - } catch { - // config doesn't exist yet or is invalid, start fresh - } - - if (sandbox) { - // sandbox mode: deny write, bash, and webfetch tools - config.permission = { - edit: "deny", - bash: "deny", - webfetch: "deny", - doom_loop: "allow", - external_directory: "allow", - }; - } else { - // normal mode: allow all tools without prompts - // external_directory: "allow" is critical to avoid permission prompts for temp dirs - config.permission = { - edit: "allow", - bash: "allow", - webfetch: "allow", - doom_loop: "allow", - external_directory: "allow", - }; - } - - // preserve MCP config if it was already set by configureOpenCodeMcpServers - // (this function is called after configureOpenCodeMcpServers, so MCP config should already exist) - writeFileSync(configPath, JSON.stringify(config, null, 2), "utf-8"); - log.info(`OpenCode config written to ${configPath} (sandbox: ${sandbox})`); -} diff --git a/entry b/entry index dca9627..74c8a85 100755 --- a/entry +++ b/entry @@ -110,10 +110,10 @@ var require_command = __commonJS({ process.stdout.write(cmd.toString() + os2.EOL); } exports.issueCommand = issueCommand; - function issue2(name, message = "") { + function issue3(name, message = "") { issueCommand(name, {}, message); } - exports.issue = issue2; + exports.issue = issue3; var CMD_STRING = "::"; var Command = class { constructor(command, properties, message) { @@ -431,18 +431,18 @@ var require_tunnel = __commonJS({ res.statusCode ); socket.destroy(); - var error41 = new Error("tunneling socket could not be established, statusCode=" + res.statusCode); - error41.code = "ECONNRESET"; - options.request.emit("error", error41); + var error42 = new Error("tunneling socket could not be established, statusCode=" + res.statusCode); + error42.code = "ECONNRESET"; + options.request.emit("error", error42); self2.removeSocket(placeholder); return; } if (head.length > 0) { debug2("got illegal response body from proxy"); socket.destroy(); - var error41 = new Error("got illegal response body from proxy"); - error41.code = "ECONNRESET"; - options.request.emit("error", error41); + var error42 = new Error("got illegal response body from proxy"); + error42.code = "ECONNRESET"; + options.request.emit("error", error42); self2.removeSocket(placeholder); return; } @@ -457,9 +457,9 @@ var require_tunnel = __commonJS({ cause.message, cause.stack ); - var error41 = new Error("tunneling socket could not be established, cause=" + cause.message); - error41.code = "ECONNRESET"; - options.request.emit("error", error41); + var error42 = new Error("tunneling socket could not be established, cause=" + cause.message); + error42.code = "ECONNRESET"; + options.request.emit("error", error42); self2.removeSocket(placeholder); } }; @@ -5587,7 +5587,7 @@ Content-Type: ${value2.type || "application/octet-stream"}\r throw new TypeError("Body is unusable"); } const promise = createDeferredPromise(); - const errorSteps = (error41) => promise.reject(error41); + const errorSteps = (error42) => promise.reject(error42); const successSteps = (data) => { try { promise.resolve(convertBytesToJSValue(data)); @@ -5873,16 +5873,16 @@ var require_request = __commonJS({ this.onError(err); } } - onError(error41) { + onError(error42) { this.onFinally(); if (channels.error.hasSubscribers) { - channels.error.publish({ request: this, error: error41 }); + channels.error.publish({ request: this, error: error42 }); } if (this.aborted) { return; } this.aborted = true; - return this[kHandler].onError(error41); + return this[kHandler].onError(error42); } onFinally() { if (this.errorHandler) { @@ -6254,14 +6254,14 @@ var require_connect = __commonJS({ const sessionCache = new SessionCache(maxCachedSessions == null ? 100 : maxCachedSessions); timeout = timeout == null ? 1e4 : timeout; allowH2 = allowH2 != null ? allowH2 : false; - return function connect({ hostname: hostname2, host, protocol, port, servername, localAddress, httpSocket }, callback) { + return function connect({ hostname: hostname3, host, protocol, port, servername, localAddress, httpSocket }, callback) { let socket; if (protocol === "https:") { if (!tls) { tls = __require("tls"); } servername = servername || options.servername || util3.getServerName(host) || null; - const sessionKey = servername || hostname2; + const sessionKey = servername || hostname3; const session = sessionCache.get(sessionKey) || null; assert2(sessionKey); socket = tls.connect({ @@ -6276,7 +6276,7 @@ var require_connect = __commonJS({ socket: httpSocket, // upgrade socket connection port: port || 443, - host: hostname2 + host: hostname3 }); socket.on("session", function(session2) { sessionCache.set(sessionKey, session2); @@ -6289,7 +6289,7 @@ var require_connect = __commonJS({ ...options, localAddress, port: port || 80, - host: hostname2 + host: hostname3 }); } if (options.keepAlive == null || options.keepAlive) { @@ -6745,8 +6745,8 @@ var require_RedirectHandler = __commonJS({ onUpgrade(statusCode, headers, socket) { this.handler.onUpgrade(statusCode, headers, socket); } - onError(error41) { - this.handler.onError(error41); + onError(error42) { + this.handler.onError(error42); } onHeaders(statusCode, headers, resume, statusText) { this.location = this.history.length >= this.maxRedirections || util3.isDisturbed(this.opts.body) ? null : parseLocation(statusCode, headers); @@ -7753,20 +7753,20 @@ var require_client = __commonJS({ async function connect(client) { assert2(!client[kConnecting]); assert2(!client[kSocket]); - let { host, hostname: hostname2, protocol, port } = client[kUrl]; - if (hostname2[0] === "[") { - const idx = hostname2.indexOf("]"); + let { host, hostname: hostname3, protocol, port } = client[kUrl]; + if (hostname3[0] === "[") { + const idx = hostname3.indexOf("]"); assert2(idx !== -1); - const ip2 = hostname2.substring(1, idx); + const ip2 = hostname3.substring(1, idx); assert2(net.isIP(ip2)); - hostname2 = ip2; + hostname3 = ip2; } client[kConnecting] = true; if (channels.beforeConnect.hasSubscribers) { channels.beforeConnect.publish({ connectParams: { host, - hostname: hostname2, + hostname: hostname3, protocol, port, servername: client[kServerName], @@ -7779,7 +7779,7 @@ var require_client = __commonJS({ const socket = await new Promise((resolve2, reject) => { client[kConnector]({ host, - hostname: hostname2, + hostname: hostname3, protocol, port, servername: client[kServerName], @@ -7843,7 +7843,7 @@ var require_client = __commonJS({ channels.connected.publish({ connectParams: { host, - hostname: hostname2, + hostname: hostname3, protocol, port, servername: client[kServerName], @@ -7863,7 +7863,7 @@ var require_client = __commonJS({ channels.connectError.publish({ connectParams: { host, - hostname: hostname2, + hostname: hostname3, protocol, port, servername: client[kServerName], @@ -8887,7 +8887,7 @@ var require_pool = __commonJS({ this[kOptions] = { ...util3.deepClone(options), connect, allowH2 }; this[kOptions].interceptors = options.interceptors ? { ...options.interceptors } : void 0; this[kFactory] = factory; - this.on("connectionError", (origin2, targets, error41) => { + this.on("connectionError", (origin2, targets, error42) => { for (const target of targets) { const idx = this[kClients].indexOf(target); if (idx !== -1) { @@ -10367,10 +10367,10 @@ var require_mock_utils = __commonJS({ } } function buildHeadersFromArray(headers) { - const clone2 = headers.slice(); + const clone3 = headers.slice(); const entries = []; - for (let index = 0; index < clone2.length; index += 2) { - entries.push([clone2[index], clone2[index + 1]]); + for (let index = 0; index < clone3.length; index += 2) { + entries.push([clone3[index], clone3[index + 1]]); } return Object.fromEntries(entries); } @@ -10496,13 +10496,13 @@ var require_mock_utils = __commonJS({ if (mockDispatch2.data.callback) { mockDispatch2.data = { ...mockDispatch2.data, ...mockDispatch2.data.callback(opts) }; } - const { data: { statusCode, data, headers, trailers, error: error41 }, delay: delay2, persist } = mockDispatch2; + const { data: { statusCode, data, headers, trailers, error: error42 }, delay: delay2, persist } = mockDispatch2; const { timesInvoked, times } = mockDispatch2; mockDispatch2.consumed = !persist && timesInvoked >= times; mockDispatch2.pending = timesInvoked < times; - if (error41 !== null) { + if (error42 !== null) { deleteMockDispatch(this[kDispatches], key); - handler2.onError(error41); + handler2.onError(error42); return true; } if (typeof delay2 === "number" && delay2 > 0) { @@ -10540,19 +10540,19 @@ var require_mock_utils = __commonJS({ if (agent2.isMockActive) { try { mockDispatch.call(this, opts, handler2); - } catch (error41) { - if (error41 instanceof MockNotMatchedError) { + } catch (error42) { + if (error42 instanceof MockNotMatchedError) { const netConnect = agent2[kGetNetConnect](); if (netConnect === false) { - throw new MockNotMatchedError(`${error41.message}: subsequent request to origin ${origin} was not allowed (net.connect disabled)`); + throw new MockNotMatchedError(`${error42.message}: subsequent request to origin ${origin} was not allowed (net.connect disabled)`); } if (checkNetConnect(netConnect, origin)) { originalDispatch.call(this, opts, handler2); } else { - throw new MockNotMatchedError(`${error41.message}: subsequent request to origin ${origin} was not allowed (net.connect is not enabled for this origin)`); + throw new MockNotMatchedError(`${error42.message}: subsequent request to origin ${origin} was not allowed (net.connect is not enabled for this origin)`); } } else { - throw error41; + throw error42; } } } else { @@ -10715,11 +10715,11 @@ var require_mock_interceptor = __commonJS({ /** * Mock an undici request with a defined error. */ - replyWithError(error41) { - if (typeof error41 === "undefined") { + replyWithError(error42) { + if (typeof error42 === "undefined") { throw new InvalidArgumentError("error must be defined"); } - const newMockDispatch = addMockDispatch(this[kDispatches], this[kDispatchKey], { error: error41 }); + const newMockDispatch = addMockDispatch(this[kDispatches], this[kDispatchKey], { error: error42 }); return new MockScope(newMockDispatch); } /** @@ -13046,17 +13046,17 @@ var require_fetch = __commonJS({ this.emit("terminated", reason); } // https://fetch.spec.whatwg.org/#fetch-controller-abort - abort(error41) { + abort(error42) { if (this.state !== "ongoing") { return; } this.state = "aborted"; - if (!error41) { - error41 = new DOMException2("The operation was aborted.", "AbortError"); + if (!error42) { + error42 = new DOMException2("The operation was aborted.", "AbortError"); } - this.serializedAbortReason = error41; - this.connection?.destroy(error41); - this.emit("terminated", error41); + this.serializedAbortReason = error42; + this.connection?.destroy(error42); + this.emit("terminated", error42); } }; function fetch3(input, init = {}) { @@ -13160,13 +13160,13 @@ var require_fetch = __commonJS({ performance.markResourceTiming(timingInfo, originalURL.href, initiatorType, globalThis2, cacheState); } } - function abortFetch(p, request2, responseObject, error41) { - if (!error41) { - error41 = new DOMException2("The operation was aborted.", "AbortError"); + function abortFetch(p, request2, responseObject, error42) { + if (!error42) { + error42 = new DOMException2("The operation was aborted.", "AbortError"); } - p.reject(error41); + p.reject(error42); if (request2.body != null && isReadable(request2.body?.stream)) { - request2.body.stream.cancel(error41).catch((err) => { + request2.body.stream.cancel(error42).catch((err) => { if (err.code === "ERR_INVALID_STATE") { return; } @@ -13178,7 +13178,7 @@ var require_fetch = __commonJS({ } const response = responseObject[kState]; if (response.body != null && isReadable(response.body?.stream)) { - response.body.stream.cancel(error41).catch((err) => { + response.body.stream.cancel(error42).catch((err) => { if (err.code === "ERR_INVALID_STATE") { return; } @@ -13958,13 +13958,13 @@ var require_fetch = __commonJS({ fetchParams.controller.ended = true; this.body.push(null); }, - onError(error41) { + onError(error42) { if (this.abort) { fetchParams.controller.off("terminated", this.abort); } - this.body?.destroy(error41); - fetchParams.controller.terminate(error41); - reject(error41); + this.body?.destroy(error42); + fetchParams.controller.terminate(error42); + reject(error42); }, onUpgrade(status, headersList, socket) { if (status !== 101) { @@ -14430,8 +14430,8 @@ var require_util4 = __commonJS({ } fr[kResult] = result; fireAProgressEvent("load", fr); - } catch (error41) { - fr[kError] = error41; + } catch (error42) { + fr[kError] = error42; fireAProgressEvent("error", fr); } if (fr[kState] !== "loading") { @@ -14440,13 +14440,13 @@ var require_util4 = __commonJS({ }); break; } - } catch (error41) { + } catch (error42) { if (fr[kAborted]) { return; } queueMicrotask(() => { fr[kState] = "done"; - fr[kError] = error41; + fr[kError] = error42; fireAProgressEvent("error", fr); if (fr[kState] !== "loading") { fireAProgressEvent("loadend", fr); @@ -14494,7 +14494,7 @@ var require_util4 = __commonJS({ if (encoding === "failure") { encoding = "UTF-8"; } - return decode(bytes, encoding); + return decode2(bytes, encoding); } case "ArrayBuffer": { const sequence = combineByteSequences(bytes); @@ -14511,7 +14511,7 @@ var require_util4 = __commonJS({ } } } - function decode(ioQueue, encoding) { + function decode2(ioQueue, encoding) { const bytes = combineByteSequences(ioQueue); const BOMEncoding = BOMSniffing(bytes); let slice = 0; @@ -15550,9 +15550,9 @@ var require_util6 = __commonJS({ throw new Error("Invalid cookie domain"); } } - function toIMFDate(date2) { - if (typeof date2 === "number") { - date2 = new Date(date2); + function toIMFDate(date4) { + if (typeof date4 === "number") { + date4 = new Date(date4); } const days = [ "Sun", @@ -15577,13 +15577,13 @@ var require_util6 = __commonJS({ "Nov", "Dec" ]; - const dayName = days[date2.getUTCDay()]; - const day = date2.getUTCDate().toString().padStart(2, "0"); - const month = months2[date2.getUTCMonth()]; - const year = date2.getUTCFullYear(); - const hour = date2.getUTCHours().toString().padStart(2, "0"); - const minute = date2.getUTCMinutes().toString().padStart(2, "0"); - const second = date2.getUTCSeconds().toString().padStart(2, "0"); + const dayName = days[date4.getUTCDay()]; + const day = date4.getUTCDate().toString().padStart(2, "0"); + const month = months2[date4.getUTCMonth()]; + const year = date4.getUTCFullYear(); + const hour = date4.getUTCHours().toString().padStart(2, "0"); + const minute = date4.getUTCMinutes().toString().padStart(2, "0"); + const second = date4.getUTCSeconds().toString().padStart(2, "0"); return `${dayName}, ${day} ${month} ${year} ${hour}:${minute}:${second} GMT`; } function validateCookieMaxAge(maxAge) { @@ -16446,11 +16446,11 @@ var require_connection = __commonJS({ }); } } - function onSocketError(error41) { + function onSocketError(error42) { const { ws } = this; ws[kReadyState] = states.CLOSING; if (channels.socketError.hasSubscribers) { - channels.socketError.publish(error41); + channels.socketError.publish(error42); } this.destroy(); } @@ -18082,12 +18082,12 @@ var require_oidc_utils = __commonJS({ var _a; return __awaiter(this, void 0, void 0, function* () { const httpclient = _OidcClient.createHttpClient(); - const res = yield httpclient.getJson(id_token_url).catch((error41) => { + const res = yield httpclient.getJson(id_token_url).catch((error42) => { throw new Error(`Failed to get ID Token. - Error Code : ${error41.statusCode} + Error Code : ${error42.statusCode} - Error Message: ${error41.message}`); + Error Message: ${error42.message}`); }); const id_token = (_a = res.result) === null || _a === void 0 ? void 0 : _a.value; if (!id_token) { @@ -18108,8 +18108,8 @@ var require_oidc_utils = __commonJS({ const id_token = yield _OidcClient.getCall(id_token_url); (0, core_1.setSecret)(id_token); return id_token; - } catch (error41) { - throw new Error(`Error message: ${error41.message}`); + } catch (error42) { + throw new Error(`Error message: ${error42.message}`); } }); } @@ -19231,7 +19231,7 @@ var require_toolrunner = __commonJS({ this._debug(`STDIO streams have closed for tool '${this.toolPath}'`); state.CheckComplete(); }); - state.on("done", (error41, exitCode) => { + state.on("done", (error42, exitCode) => { if (stdbuffer.length > 0) { this.emit("stdline", stdbuffer); } @@ -19239,8 +19239,8 @@ var require_toolrunner = __commonJS({ this.emit("errline", errbuffer); } cp.removeAllListeners(); - if (error41) { - reject(error41); + if (error42) { + reject(error42); } else { resolve2(exitCode); } @@ -19335,14 +19335,14 @@ var require_toolrunner = __commonJS({ this.emit("debug", message); } _setResult() { - let error41; + let error42; if (this.processExited) { if (this.processError) { - error41 = new Error(`There was an error when attempting to execute the process '${this.toolPath}'. This may indicate the process failed to start. Error: ${this.processError}`); + error42 = new Error(`There was an error when attempting to execute the process '${this.toolPath}'. This may indicate the process failed to start. Error: ${this.processError}`); } else if (this.processExitCode !== 0 && !this.options.ignoreReturnCode) { - error41 = new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`); + error42 = new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`); } else if (this.processStderr && this.options.failOnStdErr) { - error41 = new Error(`The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream`); + error42 = new Error(`The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream`); } } if (this.timeout) { @@ -19350,7 +19350,7 @@ var require_toolrunner = __commonJS({ this.timeout = null; } this.done = true; - this.emit("done", error41, this.processExitCode); + this.emit("done", error42, this.processExitCode); } static HandleTimeout(state) { if (state.done) { @@ -19539,7 +19539,7 @@ var require_platform = __commonJS({ var os_1 = __importDefault(__require("os")); var exec = __importStar(require_exec()); var getWindowsInfo = () => __awaiter(void 0, void 0, void 0, function* () { - const { stdout: version2 } = yield exec.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Version"', void 0, { + const { stdout: version3 } = yield exec.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Version"', void 0, { silent: true }); const { stdout: name } = yield exec.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Caption"', void 0, { @@ -19547,7 +19547,7 @@ var require_platform = __commonJS({ }); return { name: name.trim(), - version: version2.trim() + version: version3.trim() }; }); var getMacOsInfo = () => __awaiter(void 0, void 0, void 0, function* () { @@ -19555,21 +19555,21 @@ var require_platform = __commonJS({ const { stdout } = yield exec.getExecOutput("sw_vers", void 0, { silent: true }); - const version2 = (_b = (_a = stdout.match(/ProductVersion:\s*(.+)/)) === null || _a === void 0 ? void 0 : _a[1]) !== null && _b !== void 0 ? _b : ""; + const version3 = (_b = (_a = stdout.match(/ProductVersion:\s*(.+)/)) === null || _a === void 0 ? void 0 : _a[1]) !== null && _b !== void 0 ? _b : ""; const name = (_d = (_c = stdout.match(/ProductName:\s*(.+)/)) === null || _c === void 0 ? void 0 : _c[1]) !== null && _d !== void 0 ? _d : ""; return { name, - version: version2 + version: version3 }; }); var getLinuxInfo = () => __awaiter(void 0, void 0, void 0, function* () { const { stdout } = yield exec.getExecOutput("lsb_release", ["-i", "-r", "-s"], { silent: true }); - const [name, version2] = stdout.trim().split("\n"); + const [name, version3] = stdout.trim().split("\n"); return { name, - version: version2 + version: version3 }; }); exports.platform = os_1.default.platform(); @@ -19733,7 +19733,7 @@ Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); exports.setCommandEcho = setCommandEcho; function setFailed2(message) { process.exitCode = ExitCode.Failure; - error41(message); + error42(message); } exports.setFailed = setFailed2; function isDebug() { @@ -19744,10 +19744,10 @@ Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); (0, command_1.issueCommand)("debug", {}, message); } exports.debug = debug2; - function error41(message, properties = {}) { + function error42(message, properties = {}) { (0, command_1.issueCommand)("error", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); } - exports.error = error41; + exports.error = error42; function warning2(message, properties = {}) { (0, command_1.issueCommand)("warning", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); } @@ -19840,7 +19840,7 @@ var require_strip_ansi = __commonJS({ "../node_modules/.pnpm/strip-ansi@6.0.1/node_modules/strip-ansi/index.js"(exports, module) { "use strict"; var ansiRegex = require_ansi_regex(); - module.exports = (string3) => typeof string3 === "string" ? string3.replace(ansiRegex(), "") : string3; + module.exports = (string4) => typeof string4 === "string" ? string4.replace(ansiRegex(), "") : string4; } }); @@ -19894,18 +19894,18 @@ var require_string_width = __commonJS({ var stripAnsi = require_strip_ansi(); var isFullwidthCodePoint = require_is_fullwidth_code_point(); var emojiRegex5 = require_emoji_regex(); - var stringWidth = (string3) => { - if (typeof string3 !== "string" || string3.length === 0) { + var stringWidth = (string4) => { + if (typeof string4 !== "string" || string4.length === 0) { return 0; } - string3 = stripAnsi(string3); - if (string3.length === 0) { + string4 = stripAnsi(string4); + if (string4.length === 0) { return 0; } - string3 = string3.replace(emojiRegex5(), " "); + string4 = string4.replace(emojiRegex5(), " "); let width = 0; - for (let i = 0; i < string3.length; i++) { - const code = string3.codePointAt(i); + for (let i = 0; i < string4.length; i++) { + const code = string4.codePointAt(i); if (code <= 31 || code >= 127 && code <= 159) { continue; } @@ -20570,9 +20570,9 @@ var require_conversions = __commonJS({ return [r, g, b]; }; convert.rgb.hex = function(args3) { - const integer3 = ((Math.round(args3[0]) & 255) << 16) + ((Math.round(args3[1]) & 255) << 8) + (Math.round(args3[2]) & 255); - const string3 = integer3.toString(16).toUpperCase(); - return "000000".substring(string3.length) + string3; + const integer4 = ((Math.round(args3[0]) & 255) << 16) + ((Math.round(args3[1]) & 255) << 8) + (Math.round(args3[2]) & 255); + const string4 = integer4.toString(16).toUpperCase(); + return "000000".substring(string4.length) + string4; }; convert.hex.rgb = function(args3) { const match2 = args3.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i); @@ -20585,10 +20585,10 @@ var require_conversions = __commonJS({ return char + char; }).join(""); } - const integer3 = parseInt(colorString, 16); - const r = integer3 >> 16 & 255; - const g = integer3 >> 8 & 255; - const b = integer3 & 255; + const integer4 = parseInt(colorString, 16); + const r = integer4 >> 16 & 255; + const g = integer4 >> 8 & 255; + const b = integer4 & 255; return [r, g, b]; }; convert.rgb.hcg = function(rgb) { @@ -20751,9 +20751,9 @@ var require_conversions = __commonJS({ }; convert.gray.hex = function(gray) { const val = Math.round(gray[0] / 100 * 255) & 255; - const integer3 = (val << 16) + (val << 8) + val; - const string3 = integer3.toString(16).toUpperCase(); - return "000000".substring(string3.length) + string3; + const integer4 = (val << 16) + (val << 8) + val; + const string4 = integer4.toString(16).toUpperCase(); + return "000000".substring(string4.length) + string4; }; convert.rgb.gray = function(rgb) { const val = (rgb[0] + rgb[1] + rgb[2]) / 3; @@ -21079,8 +21079,8 @@ var require_slice_ansi = __commonJS({ } return output.join(""); }; - module.exports = (string3, begin, end) => { - const characters = [...string3]; + module.exports = (string4, begin, end) => { + const characters = [...string4]; const ansiCodes = []; let stringEnd = typeof end === "number" ? end : characters.length; let isInsideEscape = false; @@ -21090,7 +21090,7 @@ var require_slice_ansi = __commonJS({ for (const [index, character] of characters.entries()) { let leftEscape = false; if (ESCAPES.includes(character)) { - const code = /\d[^m]*/.exec(string3.slice(index, index + 18)); + const code = /\d[^m]*/.exec(string4.slice(index, index + 18)); ansiCode = code && code.length > 0 ? code[0] : void 0; if (visible < stringEnd) { isInsideEscape = true; @@ -21302,8 +21302,8 @@ var require_utils3 = __commonJS({ }, 0); }; exports.sumArray = sumArray; - var extractTruncates = (config2) => { - return config2.columns.map(({ truncate }) => { + var extractTruncates = (config3) => { + return config3.columns.map(({ truncate }) => { return truncate; }); }; @@ -21405,12 +21405,12 @@ var require_alignTableData = __commonJS({ Object.defineProperty(exports, "__esModule", { value: true }); exports.alignTableData = void 0; var alignString_1 = require_alignString(); - var alignTableData = (rows, config2) => { + var alignTableData = (rows, config3) => { return rows.map((row, rowIndex) => { return row.map((cell, cellIndex) => { var _a; - const { width, alignment } = config2.columns[cellIndex]; - const containingRange = (_a = config2.spanningCellManager) === null || _a === void 0 ? void 0 : _a.getContainingRange({ + const { width, alignment } = config3.columns[cellIndex]; + const containingRange = (_a = config3.spanningCellManager) === null || _a === void 0 ? void 0 : _a.getContainingRange({ col: cellIndex, row: rowIndex }, { mapped: true }); @@ -21543,18 +21543,18 @@ var require_calculateRowHeights = __commonJS({ exports.calculateRowHeights = void 0; var calculateCellHeight_1 = require_calculateCellHeight(); var utils_1 = require_utils3(); - var calculateRowHeights = (rows, config2) => { + var calculateRowHeights = (rows, config3) => { const rowHeights = []; for (const [rowIndex, row] of rows.entries()) { let rowHeight = 1; row.forEach((cell, cellIndex) => { var _a; - const containingRange = (_a = config2.spanningCellManager) === null || _a === void 0 ? void 0 : _a.getContainingRange({ + const containingRange = (_a = config3.spanningCellManager) === null || _a === void 0 ? void 0 : _a.getContainingRange({ col: cellIndex, row: rowIndex }); if (!containingRange) { - const cellHeight = (0, calculateCellHeight_1.calculateCellHeight)(cell, config2.columns[cellIndex].width, config2.columns[cellIndex].wrapWord); + const cellHeight = (0, calculateCellHeight_1.calculateCellHeight)(cell, config3.columns[cellIndex].width, config3.columns[cellIndex].wrapWord); rowHeight = Math.max(rowHeight, cellHeight); return; } @@ -21564,7 +21564,7 @@ var require_calculateRowHeights = __commonJS({ const totalHorizontalBorderHeight = bottomRight.row - topLeft.row; const totalHiddenHorizontalBorderHeight = (0, utils_1.sequence)(topLeft.row + 1, bottomRight.row).filter((horizontalBorderIndex) => { var _a2; - return !((_a2 = config2.drawHorizontalLine) === null || _a2 === void 0 ? void 0 : _a2.call(config2, horizontalBorderIndex, rows.length)); + return !((_a2 = config3.drawHorizontalLine) === null || _a2 === void 0 ? void 0 : _a2.call(config3, horizontalBorderIndex, rows.length)); }).length; const cellHeight = height - totalOccupiedSpanningCellHeight - totalHorizontalBorderHeight + totalHiddenHorizontalBorderHeight; rowHeight = Math.max(rowHeight, cellHeight); @@ -21844,8 +21844,8 @@ var require_drawRow = __commonJS({ Object.defineProperty(exports, "__esModule", { value: true }); exports.drawRow = void 0; var drawContent_1 = require_drawContent(); - var drawRow = (row, config2) => { - const { border, drawVerticalLine, rowIndex, spanningCellManager } = config2; + var drawRow = (row, config3) => { + const { border, drawVerticalLine, rowIndex, spanningCellManager } = config3; return (0, drawContent_1.drawContent)({ contents: row, drawSeparator: drawVerticalLine, @@ -24448,17 +24448,17 @@ var require_validateConfig = __commonJS({ Object.defineProperty(exports, "__esModule", { value: true }); exports.validateConfig = void 0; var validators_1 = __importDefault(require_validators()); - var validateConfig = (schemaId, config2) => { + var validateConfig = (schemaId, config3) => { const validate2 = validators_1.default[schemaId]; - if (!validate2(config2) && validate2.errors) { - const errors = validate2.errors.map((error41) => { + if (!validate2(config3) && validate2.errors) { + const errors = validate2.errors.map((error42) => { return { - message: error41.message, - params: error41.params, - schemaPath: error41.schemaPath + message: error42.message, + params: error42.params, + schemaPath: error42.schemaPath }; }); - console.log("config", config2); + console.log("config", config3); console.log("errors", errors); throw new Error("Invalid config."); } @@ -24489,18 +24489,18 @@ var require_makeStreamConfig = __commonJS({ }; }); }; - var makeStreamConfig = (config2) => { - (0, validateConfig_1.validateConfig)("streamConfig.json", config2); - if (config2.columnDefault.width === void 0) { + var makeStreamConfig = (config3) => { + (0, validateConfig_1.validateConfig)("streamConfig.json", config3); + if (config3.columnDefault.width === void 0) { throw new Error("Must provide config.columnDefault.width when creating a stream."); } return { drawVerticalLine: () => { return true; }, - ...config2, - border: (0, utils_1.makeBorderConfig)(config2.border), - columns: makeColumnsConfig(config2.columnCount, config2.columns, config2.columnDefault) + ...config3, + border: (0, utils_1.makeBorderConfig)(config3.border), + columns: makeColumnsConfig(config3.columnCount, config3.columns, config3.columnDefault) }; }; exports.makeStreamConfig = makeStreamConfig; @@ -24533,7 +24533,7 @@ var require_mapDataUsingRowHeights = __commonJS({ ]; }; exports.padCellVertically = padCellVertically; - var mapDataUsingRowHeights = (unmappedRows, rowHeights, config2) => { + var mapDataUsingRowHeights = (unmappedRows, rowHeights, config3) => { const nColumns = unmappedRows[0].length; const mappedRows = unmappedRows.map((unmappedRow, unmappedRowIndex) => { const outputRowHeight = rowHeights[unmappedRowIndex]; @@ -24542,7 +24542,7 @@ var require_mapDataUsingRowHeights = __commonJS({ }); unmappedRow.forEach((cell, cellIndex) => { var _a; - const containingRange = (_a = config2.spanningCellManager) === null || _a === void 0 ? void 0 : _a.getContainingRange({ + const containingRange = (_a = config3.spanningCellManager) === null || _a === void 0 ? void 0 : _a.getContainingRange({ col: cellIndex, row: unmappedRowIndex }); @@ -24552,8 +24552,8 @@ var require_mapDataUsingRowHeights = __commonJS({ }); return; } - const cellLines = (0, wrapCell_1.wrapCell)(cell, config2.columns[cellIndex].width, config2.columns[cellIndex].wrapWord); - const paddedCellLines = (0, exports.padCellVertically)(cellLines, outputRowHeight, config2.columns[cellIndex].verticalAlignment); + const cellLines = (0, wrapCell_1.wrapCell)(cell, config3.columns[cellIndex].width, config3.columns[cellIndex].wrapWord); + const paddedCellLines = (0, exports.padCellVertically)(cellLines, outputRowHeight, config3.columns[cellIndex].verticalAlignment); paddedCellLines.forEach((cellLine, cellLineIndex) => { outputRow[cellLineIndex][cellIndex] = cellLine; }); @@ -24576,18 +24576,18 @@ var require_padTableData = __commonJS({ return " ".repeat(paddingLeft) + input + " ".repeat(paddingRight); }; exports.padString = padString; - var padTableData = (rows, config2) => { + var padTableData = (rows, config3) => { return rows.map((cells, rowIndex) => { return cells.map((cell, cellIndex) => { var _a; - const containingRange = (_a = config2.spanningCellManager) === null || _a === void 0 ? void 0 : _a.getContainingRange({ + const containingRange = (_a = config3.spanningCellManager) === null || _a === void 0 ? void 0 : _a.getContainingRange({ col: cellIndex, row: rowIndex }, { mapped: true }); if (containingRange) { return cell; } - const { paddingLeft, paddingRight } = config2.columns[cellIndex]; + const { paddingLeft, paddingRight } = config3.columns[cellIndex]; return (0, exports.padString)(cell, paddingLeft, paddingRight); }); }); @@ -24664,8 +24664,8 @@ var require_lodash = __commonJS({ })(); var nodeIsRegExp = nodeUtil && nodeUtil.isRegExp; var asciiSize = baseProperty("length"); - function asciiToArray(string3) { - return string3.split(""); + function asciiToArray(string4) { + return string4.split(""); } function baseProperty(key) { return function(object2) { @@ -24677,24 +24677,24 @@ var require_lodash = __commonJS({ return func(value2); }; } - function hasUnicode(string3) { - return reHasUnicode.test(string3); + function hasUnicode(string4) { + return reHasUnicode.test(string4); } - function stringSize(string3) { - return hasUnicode(string3) ? unicodeSize(string3) : asciiSize(string3); + function stringSize(string4) { + return hasUnicode(string4) ? unicodeSize(string4) : asciiSize(string4); } - function stringToArray(string3) { - return hasUnicode(string3) ? unicodeToArray(string3) : asciiToArray(string3); + function stringToArray(string4) { + return hasUnicode(string4) ? unicodeToArray(string4) : asciiToArray(string4); } - function unicodeSize(string3) { + function unicodeSize(string4) { var result = reUnicode.lastIndex = 0; - while (reUnicode.test(string3)) { + while (reUnicode.test(string4)) { result++; } return result; } - function unicodeToArray(string3) { - return string3.match(reUnicode) || []; + function unicodeToArray(string4) { + return string4.match(reUnicode) || []; } var objectProto6 = Object.prototype; var objectToString2 = objectProto6.toString; @@ -24702,7 +24702,7 @@ var require_lodash = __commonJS({ var symbolProto = Symbol3 ? Symbol3.prototype : void 0; var symbolToString = symbolProto ? symbolProto.toString : void 0; function baseIsRegExp(value2) { - return isObject4(value2) && objectToString2.call(value2) == regexpTag; + return isObject5(value2) && objectToString2.call(value2) == regexpTag; } function baseSlice(array, start, end) { var index = -1, length = array.length; @@ -24736,7 +24736,7 @@ var require_lodash = __commonJS({ end = end === void 0 ? length : end; return !start && end >= length ? array : baseSlice(array, start, end); } - function isObject4(value2) { + function isObject5(value2) { var type2 = typeof value2; return !!value2 && (type2 == "object" || type2 == "function"); } @@ -24769,9 +24769,9 @@ var require_lodash = __commonJS({ if (isSymbol(value2)) { return NAN; } - if (isObject4(value2)) { + if (isObject5(value2)) { var other = typeof value2.valueOf == "function" ? value2.valueOf() : value2; - value2 = isObject4(other) ? other + "" : other; + value2 = isObject5(other) ? other + "" : other; } if (typeof value2 != "string") { return value2 === 0 ? value2 : +value2; @@ -24783,27 +24783,27 @@ var require_lodash = __commonJS({ function toString2(value2) { return value2 == null ? "" : baseToString2(value2); } - function truncate(string3, options) { + function truncate(string4, options) { var length = DEFAULT_TRUNC_LENGTH, omission = DEFAULT_TRUNC_OMISSION; - if (isObject4(options)) { + if (isObject5(options)) { var separator2 = "separator" in options ? options.separator : separator2; length = "length" in options ? toInteger(options.length) : length; omission = "omission" in options ? baseToString2(options.omission) : omission; } - string3 = toString2(string3); - var strLength = string3.length; - if (hasUnicode(string3)) { - var strSymbols = stringToArray(string3); + string4 = toString2(string4); + var strLength = string4.length; + if (hasUnicode(string4)) { + var strSymbols = stringToArray(string4); strLength = strSymbols.length; } if (length >= strLength) { - return string3; + return string4; } var end = length - stringSize(omission); if (end < 1) { return omission; } - var result = strSymbols ? castSlice(strSymbols, 0, end).join("") : string3.slice(0, end); + var result = strSymbols ? castSlice(strSymbols, 0, end).join("") : string4.slice(0, end); if (separator2 === void 0) { return result + omission; } @@ -24811,7 +24811,7 @@ var require_lodash = __commonJS({ end += result.length - end; } if (isRegExp(separator2)) { - if (string3.slice(end).search(separator2)) { + if (string4.slice(end).search(separator2)) { var match2, substring = result; if (!separator2.global) { separator2 = RegExp(separator2.source, toString2(reFlags.exec(separator2)) + "g"); @@ -24822,7 +24822,7 @@ var require_lodash = __commonJS({ } result = result.slice(0, newEnd === void 0 ? end : newEnd); } - } else if (string3.indexOf(baseToString2(separator2), end) != end) { + } else if (string4.indexOf(baseToString2(separator2), end) != end) { var index = result.lastIndexOf(separator2); if (index > -1) { result = result.slice(0, index); @@ -24878,60 +24878,60 @@ var require_createStream = __commonJS({ var stringifyTableData_1 = require_stringifyTableData(); var truncateTableData_1 = require_truncateTableData(); var utils_1 = require_utils3(); - var prepareData = (data, config2) => { + var prepareData = (data, config3) => { let rows = (0, stringifyTableData_1.stringifyTableData)(data); - rows = (0, truncateTableData_1.truncateTableData)(rows, (0, utils_1.extractTruncates)(config2)); - const rowHeights = (0, calculateRowHeights_1.calculateRowHeights)(rows, config2); - rows = (0, mapDataUsingRowHeights_1.mapDataUsingRowHeights)(rows, rowHeights, config2); - rows = (0, alignTableData_1.alignTableData)(rows, config2); - rows = (0, padTableData_1.padTableData)(rows, config2); + rows = (0, truncateTableData_1.truncateTableData)(rows, (0, utils_1.extractTruncates)(config3)); + const rowHeights = (0, calculateRowHeights_1.calculateRowHeights)(rows, config3); + rows = (0, mapDataUsingRowHeights_1.mapDataUsingRowHeights)(rows, rowHeights, config3); + rows = (0, alignTableData_1.alignTableData)(rows, config3); + rows = (0, padTableData_1.padTableData)(rows, config3); return rows; }; - var create = (row, columnWidths, config2) => { - const rows = prepareData([row], config2); + var create = (row, columnWidths, config3) => { + const rows = prepareData([row], config3); const body = rows.map((literalRow) => { - return (0, drawRow_1.drawRow)(literalRow, config2); + return (0, drawRow_1.drawRow)(literalRow, config3); }).join(""); let output; output = ""; - output += (0, drawBorder_1.drawBorderTop)(columnWidths, config2); + output += (0, drawBorder_1.drawBorderTop)(columnWidths, config3); output += body; - output += (0, drawBorder_1.drawBorderBottom)(columnWidths, config2); + output += (0, drawBorder_1.drawBorderBottom)(columnWidths, config3); output = output.trimEnd(); process.stdout.write(output); }; - var append3 = (row, columnWidths, config2) => { - const rows = prepareData([row], config2); + var append3 = (row, columnWidths, config3) => { + const rows = prepareData([row], config3); const body = rows.map((literalRow) => { - return (0, drawRow_1.drawRow)(literalRow, config2); + return (0, drawRow_1.drawRow)(literalRow, config3); }).join(""); let output = ""; - const bottom = (0, drawBorder_1.drawBorderBottom)(columnWidths, config2); + const bottom = (0, drawBorder_1.drawBorderBottom)(columnWidths, config3); if (bottom !== "\n") { output = "\r\x1B[K"; } - output += (0, drawBorder_1.drawBorderJoin)(columnWidths, config2); + output += (0, drawBorder_1.drawBorderJoin)(columnWidths, config3); output += body; output += bottom; output = output.trimEnd(); process.stdout.write(output); }; var createStream = (userConfig) => { - const config2 = (0, makeStreamConfig_1.makeStreamConfig)(userConfig); - const columnWidths = Object.values(config2.columns).map((column) => { + const config3 = (0, makeStreamConfig_1.makeStreamConfig)(userConfig); + const columnWidths = Object.values(config3.columns).map((column) => { return column.width + column.paddingLeft + column.paddingRight; }); let empty = true; return { write: (row) => { - if (row.length !== config2.columnCount) { + if (row.length !== config3.columnCount) { throw new Error("Row cell count does not match the config.columnCount."); } if (empty) { empty = false; - create(row, columnWidths, config2); + create(row, columnWidths, config3); } else { - append3(row, columnWidths, config2); + append3(row, columnWidths, config3); } } }; @@ -24946,8 +24946,8 @@ var require_calculateOutputColumnWidths = __commonJS({ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.calculateOutputColumnWidths = void 0; - var calculateOutputColumnWidths = (config2) => { - return config2.columns.map((col) => { + var calculateOutputColumnWidths = (config3) => { + return config3.columns.map((col) => { return col.paddingLeft + col.width + col.paddingRight; }); }; @@ -24965,12 +24965,12 @@ var require_drawTable = __commonJS({ var drawContent_1 = require_drawContent(); var drawRow_1 = require_drawRow(); var utils_1 = require_utils3(); - var drawTable = (rows, outputColumnWidths, rowHeights, config2) => { - const { drawHorizontalLine, singleLine } = config2; + var drawTable = (rows, outputColumnWidths, rowHeights, config3) => { + const { drawHorizontalLine, singleLine } = config3; const contents = (0, utils_1.groupBySizes)(rows, rowHeights).map((group2, groupIndex) => { return group2.map((row) => { return (0, drawRow_1.drawRow)(row, { - ...config2, + ...config3, rowIndex: groupIndex }); }).join(""); @@ -24986,10 +24986,10 @@ var require_drawTable = __commonJS({ elementType: "row", rowIndex: -1, separatorGetter: (0, drawBorder_1.createTableBorderGetter)(outputColumnWidths, { - ...config2, + ...config3, rowCount: contents.length }), - spanningCellManager: config2.spanningCellManager + spanningCellManager: config3.spanningCellManager }); }; exports.drawTable = drawTable; @@ -25002,10 +25002,10 @@ var require_injectHeaderConfig = __commonJS({ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.injectHeaderConfig = void 0; - var injectHeaderConfig = (rows, config2) => { + var injectHeaderConfig = (rows, config3) => { var _a; - let spanningCellConfig = (_a = config2.spanningCells) !== null && _a !== void 0 ? _a : []; - const headerConfig = config2.header; + let spanningCellConfig = (_a = config3.spanningCells) !== null && _a !== void 0 ? _a : []; + const headerConfig = config3.header; const adjustedRows = [...rows]; if (headerConfig) { spanningCellConfig = spanningCellConfig.map(({ row, ...rest }) => { @@ -25232,8 +25232,8 @@ var require_spanningCellManager = __commonJS({ }; var createSpanningCellManager = (parameters) => { const { spanningCellConfigs, columnsConfig } = parameters; - const ranges = spanningCellConfigs.map((config2) => { - return (0, makeRangeConfig_1.makeRangeConfig)(config2, columnsConfig); + const ranges = spanningCellConfigs.map((config3) => { + return (0, makeRangeConfig_1.makeRangeConfig)(config3, columnsConfig); }); const rangeCache = {}; let rowHeights = []; @@ -25295,8 +25295,8 @@ var require_validateSpanningCellConfig = __commonJS({ }; var validateSpanningCellConfig = (rows, configs) => { const [nRow, nCol] = [rows.length, rows[0].length]; - configs.forEach((config2, configIndex) => { - const { colSpan, rowSpan } = config2; + configs.forEach((config3, configIndex) => { + const { colSpan, rowSpan } = config3; if (colSpan === void 0 && rowSpan === void 0) { throw new Error(`Expect at least colSpan or rowSpan is provided in config.spanningCells[${configIndex}]`); } @@ -25358,25 +25358,25 @@ var require_makeTableConfig = __commonJS({ }; }); }; - var makeTableConfig = (rows, config2 = {}, injectedSpanningCellConfig) => { + var makeTableConfig = (rows, config3 = {}, injectedSpanningCellConfig) => { var _a, _b, _c, _d, _e; - (0, validateConfig_1.validateConfig)("config.json", config2); - (0, validateSpanningCellConfig_1.validateSpanningCellConfig)(rows, (_a = config2.spanningCells) !== null && _a !== void 0 ? _a : []); - const spanningCellConfigs = (_b = injectedSpanningCellConfig !== null && injectedSpanningCellConfig !== void 0 ? injectedSpanningCellConfig : config2.spanningCells) !== null && _b !== void 0 ? _b : []; - const columnsConfig = makeColumnsConfig(rows, config2.columns, config2.columnDefault, spanningCellConfigs); - const drawVerticalLine = (_c = config2.drawVerticalLine) !== null && _c !== void 0 ? _c : (() => { + (0, validateConfig_1.validateConfig)("config.json", config3); + (0, validateSpanningCellConfig_1.validateSpanningCellConfig)(rows, (_a = config3.spanningCells) !== null && _a !== void 0 ? _a : []); + const spanningCellConfigs = (_b = injectedSpanningCellConfig !== null && injectedSpanningCellConfig !== void 0 ? injectedSpanningCellConfig : config3.spanningCells) !== null && _b !== void 0 ? _b : []; + const columnsConfig = makeColumnsConfig(rows, config3.columns, config3.columnDefault, spanningCellConfigs); + const drawVerticalLine = (_c = config3.drawVerticalLine) !== null && _c !== void 0 ? _c : (() => { return true; }); - const drawHorizontalLine = (_d = config2.drawHorizontalLine) !== null && _d !== void 0 ? _d : (() => { + const drawHorizontalLine = (_d = config3.drawHorizontalLine) !== null && _d !== void 0 ? _d : (() => { return true; }); return { - ...config2, - border: (0, utils_1.makeBorderConfig)(config2.border), + ...config3, + border: (0, utils_1.makeBorderConfig)(config3.border), columns: columnsConfig, drawHorizontalLine, drawVerticalLine, - singleLine: (_e = config2.singleLine) !== null && _e !== void 0 ? _e : false, + singleLine: (_e = config3.singleLine) !== null && _e !== void 0 ? _e : false, spanningCellManager: (0, spanningCellManager_1.createSpanningCellManager)({ columnsConfig, drawHorizontalLine, @@ -25448,16 +25448,16 @@ var require_table = __commonJS({ (0, validateTableData_1.validateTableData)(data); let rows = (0, stringifyTableData_1.stringifyTableData)(data); const [injectedRows, injectedSpanningCellConfig] = (0, injectHeaderConfig_1.injectHeaderConfig)(rows, userConfig); - const config2 = (0, makeTableConfig_1.makeTableConfig)(injectedRows, userConfig, injectedSpanningCellConfig); - rows = (0, truncateTableData_1.truncateTableData)(injectedRows, (0, utils_1.extractTruncates)(config2)); - const rowHeights = (0, calculateRowHeights_1.calculateRowHeights)(rows, config2); - config2.spanningCellManager.setRowHeights(rowHeights); - config2.spanningCellManager.setRowIndexMapping(rowHeights); - rows = (0, mapDataUsingRowHeights_1.mapDataUsingRowHeights)(rows, rowHeights, config2); - rows = (0, alignTableData_1.alignTableData)(rows, config2); - rows = (0, padTableData_1.padTableData)(rows, config2); - const outputColumnWidths = (0, calculateOutputColumnWidths_1.calculateOutputColumnWidths)(config2); - return (0, drawTable_1.drawTable)(rows, outputColumnWidths, rowHeights, config2); + const config3 = (0, makeTableConfig_1.makeTableConfig)(injectedRows, userConfig, injectedSpanningCellConfig); + rows = (0, truncateTableData_1.truncateTableData)(injectedRows, (0, utils_1.extractTruncates)(config3)); + const rowHeights = (0, calculateRowHeights_1.calculateRowHeights)(rows, config3); + config3.spanningCellManager.setRowHeights(rowHeights); + config3.spanningCellManager.setRowIndexMapping(rowHeights); + rows = (0, mapDataUsingRowHeights_1.mapDataUsingRowHeights)(rows, rowHeights, config3); + rows = (0, alignTableData_1.alignTableData)(rows, config3); + rows = (0, padTableData_1.padTableData)(rows, config3); + const outputColumnWidths = (0, calculateOutputColumnWidths_1.calculateOutputColumnWidths)(config3); + return (0, drawTable_1.drawTable)(rows, outputColumnWidths, rowHeights, config3); }; exports.table = table2; } @@ -25518,7 +25518,7 @@ var require_fast_content_type_parse = __commonJS({ var defaultContentType = { type: "", parameters: new NullObject() }; Object.freeze(defaultContentType.parameters); Object.freeze(defaultContentType); - function parse4(header) { + function parse6(header) { if (typeof header !== "string") { throw new TypeError("argument header is required and must be a string"); } @@ -25556,7 +25556,7 @@ var require_fast_content_type_parse = __commonJS({ } return result; } - function safeParse3(header) { + function safeParse5(header) { if (typeof header !== "string") { return defaultContentType; } @@ -25594,4119 +25594,13 @@ var require_fast_content_type_parse = __commonJS({ } return result; } - module.exports.default = { parse: parse4, safeParse: safeParse3 }; - module.exports.parse = parse4; - module.exports.safeParse = safeParse3; + module.exports.default = { parse: parse6, safeParse: safeParse5 }; + module.exports.parse = parse6; + module.exports.safeParse = safeParse5; module.exports.defaultContentType = defaultContentType; } }); -// ../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/util.js -var util2, objectUtil2, ZodParsedType2, getParsedType2; -var init_util = __esm({ - "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/util.js"() { - (function(util3) { - util3.assertEqual = (_) => { - }; - function assertIs2(_arg) { - } - util3.assertIs = assertIs2; - function assertNever2(_x) { - throw new Error(); - } - util3.assertNever = assertNever2; - util3.arrayToEnum = (items) => { - const obj = {}; - for (const item of items) { - obj[item] = item; - } - return obj; - }; - util3.getValidEnumValues = (obj) => { - const validKeys = util3.objectKeys(obj).filter((k) => typeof obj[obj[k]] !== "number"); - const filtered = {}; - for (const k of validKeys) { - filtered[k] = obj[k]; - } - return util3.objectValues(filtered); - }; - util3.objectValues = (obj) => { - return util3.objectKeys(obj).map(function(e) { - return obj[e]; - }); - }; - util3.objectKeys = typeof Object.keys === "function" ? (obj) => Object.keys(obj) : (object2) => { - const keys = []; - for (const key in object2) { - if (Object.prototype.hasOwnProperty.call(object2, key)) { - keys.push(key); - } - } - return keys; - }; - util3.find = (arr, checker) => { - for (const item of arr) { - if (checker(item)) - return item; - } - return void 0; - }; - util3.isInteger = typeof Number.isInteger === "function" ? (val) => Number.isInteger(val) : (val) => typeof val === "number" && Number.isFinite(val) && Math.floor(val) === val; - function joinValues2(array, separator2 = " | ") { - return array.map((val) => typeof val === "string" ? `'${val}'` : val).join(separator2); - } - util3.joinValues = joinValues2; - util3.jsonStringifyReplacer = (_, value2) => { - if (typeof value2 === "bigint") { - return value2.toString(); - } - return value2; - }; - })(util2 || (util2 = {})); - (function(objectUtil4) { - objectUtil4.mergeShapes = (first, second) => { - return { - ...first, - ...second - // second overwrites first - }; - }; - })(objectUtil2 || (objectUtil2 = {})); - ZodParsedType2 = util2.arrayToEnum([ - "string", - "nan", - "number", - "integer", - "float", - "boolean", - "date", - "bigint", - "symbol", - "function", - "undefined", - "null", - "array", - "object", - "unknown", - "promise", - "void", - "never", - "map", - "set" - ]); - getParsedType2 = (data) => { - const t = typeof data; - switch (t) { - case "undefined": - return ZodParsedType2.undefined; - case "string": - return ZodParsedType2.string; - case "number": - return Number.isNaN(data) ? ZodParsedType2.nan : ZodParsedType2.number; - case "boolean": - return ZodParsedType2.boolean; - case "function": - return ZodParsedType2.function; - case "bigint": - return ZodParsedType2.bigint; - case "symbol": - return ZodParsedType2.symbol; - case "object": - if (Array.isArray(data)) { - return ZodParsedType2.array; - } - if (data === null) { - return ZodParsedType2.null; - } - if (data.then && typeof data.then === "function" && data.catch && typeof data.catch === "function") { - return ZodParsedType2.promise; - } - if (typeof Map !== "undefined" && data instanceof Map) { - return ZodParsedType2.map; - } - if (typeof Set !== "undefined" && data instanceof Set) { - return ZodParsedType2.set; - } - if (typeof Date !== "undefined" && data instanceof Date) { - return ZodParsedType2.date; - } - return ZodParsedType2.object; - default: - return ZodParsedType2.unknown; - } - }; - } -}); - -// ../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/ZodError.js -var ZodIssueCode2, quotelessJson2, ZodError2; -var init_ZodError = __esm({ - "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/ZodError.js"() { - init_util(); - ZodIssueCode2 = util2.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" - ]); - quotelessJson2 = (obj) => { - const json3 = JSON.stringify(obj, null, 2); - return json3.replace(/"([^"]+)":/g, "$1:"); - }; - ZodError2 = class _ZodError extends Error { - get errors() { - return this.issues; - } - constructor(issues) { - super(); - this.issues = []; - this.addIssue = (sub) => { - this.issues = [...this.issues, sub]; - }; - this.addIssues = (subs = []) => { - this.issues = [...this.issues, ...subs]; - }; - const actualProto = new.target.prototype; - if (Object.setPrototypeOf) { - Object.setPrototypeOf(this, actualProto); - } else { - this.__proto__ = actualProto; - } - this.name = "ZodError"; - this.issues = issues; - } - format(_mapper) { - const mapper = _mapper || function(issue2) { - return issue2.message; - }; - const fieldErrors = { _errors: [] }; - const processError = (error41) => { - for (const issue2 of error41.issues) { - if (issue2.code === "invalid_union") { - issue2.unionErrors.map(processError); - } else if (issue2.code === "invalid_return_type") { - processError(issue2.returnTypeError); - } else if (issue2.code === "invalid_arguments") { - processError(issue2.argumentsError); - } else if (issue2.path.length === 0) { - fieldErrors._errors.push(mapper(issue2)); - } else { - let curr = fieldErrors; - let i = 0; - while (i < issue2.path.length) { - const el = issue2.path[i]; - const terminal = i === issue2.path.length - 1; - if (!terminal) { - curr[el] = curr[el] || { _errors: [] }; - } else { - curr[el] = curr[el] || { _errors: [] }; - curr[el]._errors.push(mapper(issue2)); - } - curr = curr[el]; - i++; - } - } - } - }; - processError(this); - return fieldErrors; - } - static assert(value2) { - if (!(value2 instanceof _ZodError)) { - throw new Error(`Not a ZodError: ${value2}`); - } - } - toString() { - return this.message; - } - get message() { - return JSON.stringify(this.issues, util2.jsonStringifyReplacer, 2); - } - get isEmpty() { - return this.issues.length === 0; - } - flatten(mapper = (issue2) => issue2.message) { - const fieldErrors = {}; - const formErrors = []; - for (const sub of this.issues) { - if (sub.path.length > 0) { - const firstEl = sub.path[0]; - fieldErrors[firstEl] = fieldErrors[firstEl] || []; - fieldErrors[firstEl].push(mapper(sub)); - } else { - formErrors.push(mapper(sub)); - } - } - return { formErrors, fieldErrors }; - } - get formErrors() { - return this.flatten(); - } - }; - ZodError2.create = (issues) => { - const error41 = new ZodError2(issues); - return error41; - }; - } -}); - -// ../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/locales/en.js -var errorMap2, en_default2; -var init_en = __esm({ - "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/locales/en.js"() { - init_ZodError(); - init_util(); - errorMap2 = (issue2, _ctx) => { - let message; - switch (issue2.code) { - case ZodIssueCode2.invalid_type: - if (issue2.received === ZodParsedType2.undefined) { - message = "Required"; - } else { - message = `Expected ${issue2.expected}, received ${issue2.received}`; - } - break; - case ZodIssueCode2.invalid_literal: - message = `Invalid literal value, expected ${JSON.stringify(issue2.expected, util2.jsonStringifyReplacer)}`; - break; - case ZodIssueCode2.unrecognized_keys: - message = `Unrecognized key(s) in object: ${util2.joinValues(issue2.keys, ", ")}`; - break; - case ZodIssueCode2.invalid_union: - message = `Invalid input`; - break; - case ZodIssueCode2.invalid_union_discriminator: - message = `Invalid discriminator value. Expected ${util2.joinValues(issue2.options)}`; - break; - case ZodIssueCode2.invalid_enum_value: - message = `Invalid enum value. Expected ${util2.joinValues(issue2.options)}, received '${issue2.received}'`; - break; - case ZodIssueCode2.invalid_arguments: - message = `Invalid function arguments`; - break; - case ZodIssueCode2.invalid_return_type: - message = `Invalid function return type`; - break; - case ZodIssueCode2.invalid_date: - message = `Invalid date`; - break; - case ZodIssueCode2.invalid_string: - if (typeof issue2.validation === "object") { - if ("includes" in issue2.validation) { - message = `Invalid input: must include "${issue2.validation.includes}"`; - if (typeof issue2.validation.position === "number") { - message = `${message} at one or more positions greater than or equal to ${issue2.validation.position}`; - } - } else if ("startsWith" in issue2.validation) { - message = `Invalid input: must start with "${issue2.validation.startsWith}"`; - } else if ("endsWith" in issue2.validation) { - message = `Invalid input: must end with "${issue2.validation.endsWith}"`; - } else { - util2.assertNever(issue2.validation); - } - } else if (issue2.validation !== "regex") { - message = `Invalid ${issue2.validation}`; - } else { - message = "Invalid"; - } - break; - case ZodIssueCode2.too_small: - if (issue2.type === "array") - message = `Array must contain ${issue2.exact ? "exactly" : issue2.inclusive ? `at least` : `more than`} ${issue2.minimum} element(s)`; - else if (issue2.type === "string") - message = `String must contain ${issue2.exact ? "exactly" : issue2.inclusive ? `at least` : `over`} ${issue2.minimum} character(s)`; - else if (issue2.type === "number") - message = `Number must be ${issue2.exact ? `exactly equal to ` : issue2.inclusive ? `greater than or equal to ` : `greater than `}${issue2.minimum}`; - else if (issue2.type === "bigint") - message = `Number must be ${issue2.exact ? `exactly equal to ` : issue2.inclusive ? `greater than or equal to ` : `greater than `}${issue2.minimum}`; - else if (issue2.type === "date") - message = `Date must be ${issue2.exact ? `exactly equal to ` : issue2.inclusive ? `greater than or equal to ` : `greater than `}${new Date(Number(issue2.minimum))}`; - else - message = "Invalid input"; - break; - case ZodIssueCode2.too_big: - if (issue2.type === "array") - message = `Array must contain ${issue2.exact ? `exactly` : issue2.inclusive ? `at most` : `less than`} ${issue2.maximum} element(s)`; - else if (issue2.type === "string") - message = `String must contain ${issue2.exact ? `exactly` : issue2.inclusive ? `at most` : `under`} ${issue2.maximum} character(s)`; - else if (issue2.type === "number") - message = `Number must be ${issue2.exact ? `exactly` : issue2.inclusive ? `less than or equal to` : `less than`} ${issue2.maximum}`; - else if (issue2.type === "bigint") - message = `BigInt must be ${issue2.exact ? `exactly` : issue2.inclusive ? `less than or equal to` : `less than`} ${issue2.maximum}`; - else if (issue2.type === "date") - message = `Date must be ${issue2.exact ? `exactly` : issue2.inclusive ? `smaller than or equal to` : `smaller than`} ${new Date(Number(issue2.maximum))}`; - else - message = "Invalid input"; - break; - case ZodIssueCode2.custom: - message = `Invalid input`; - break; - case ZodIssueCode2.invalid_intersection_types: - message = `Intersection results could not be merged`; - break; - case ZodIssueCode2.not_multiple_of: - message = `Number must be a multiple of ${issue2.multipleOf}`; - break; - case ZodIssueCode2.not_finite: - message = "Number must be finite"; - break; - default: - message = _ctx.defaultError; - util2.assertNever(issue2); - } - return { message }; - }; - en_default2 = errorMap2; - } -}); - -// ../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/errors.js -function setErrorMap2(map) { - overrideErrorMap2 = map; -} -function getErrorMap2() { - return overrideErrorMap2; -} -var overrideErrorMap2; -var init_errors = __esm({ - "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/errors.js"() { - init_en(); - overrideErrorMap2 = en_default2; - } -}); - -// ../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/parseUtil.js -function addIssueToContext2(ctx, issueData) { - const overrideMap = getErrorMap2(); - const issue2 = makeIssue2({ - issueData, - data: ctx.data, - path: ctx.path, - errorMaps: [ - ctx.common.contextualErrorMap, - // contextual error map is first priority - ctx.schemaErrorMap, - // then schema-bound map if available - overrideMap, - // then global override map - overrideMap === en_default2 ? void 0 : en_default2 - // then global default map - ].filter((x) => !!x) - }); - ctx.common.issues.push(issue2); -} -var makeIssue2, EMPTY_PATH2, ParseStatus2, INVALID2, DIRTY2, OK2, isAborted2, isDirty2, isValid2, isAsync2; -var init_parseUtil = __esm({ - "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/parseUtil.js"() { - init_errors(); - init_en(); - makeIssue2 = (params) => { - const { data, path: path4, errorMaps, issueData } = params; - const fullPath = [...path4, ...issueData.path || []]; - const fullIssue = { - ...issueData, - path: fullPath - }; - if (issueData.message !== void 0) { - return { - ...issueData, - path: fullPath, - message: issueData.message - }; - } - let errorMessage = ""; - const maps = errorMaps.filter((m) => !!m).slice().reverse(); - for (const map of maps) { - errorMessage = map(fullIssue, { data, defaultError: errorMessage }).message; - } - return { - ...issueData, - path: fullPath, - message: errorMessage - }; - }; - EMPTY_PATH2 = []; - ParseStatus2 = class _ParseStatus { - constructor() { - this.value = "valid"; - } - dirty() { - if (this.value === "valid") - this.value = "dirty"; - } - abort() { - if (this.value !== "aborted") - this.value = "aborted"; - } - static mergeArray(status, results) { - const arrayValue = []; - for (const s of results) { - if (s.status === "aborted") - return INVALID2; - if (s.status === "dirty") - status.dirty(); - arrayValue.push(s.value); - } - return { status: status.value, value: arrayValue }; - } - static async mergeObjectAsync(status, pairs) { - const syncPairs = []; - for (const pair of pairs) { - const key = await pair.key; - const value2 = await pair.value; - syncPairs.push({ - key, - value: value2 - }); - } - return _ParseStatus.mergeObjectSync(status, syncPairs); - } - static mergeObjectSync(status, pairs) { - const finalObject = {}; - for (const pair of pairs) { - const { key, value: value2 } = pair; - if (key.status === "aborted") - return INVALID2; - if (value2.status === "aborted") - return INVALID2; - if (key.status === "dirty") - status.dirty(); - if (value2.status === "dirty") - status.dirty(); - if (key.value !== "__proto__" && (typeof value2.value !== "undefined" || pair.alwaysSet)) { - finalObject[key.value] = value2.value; - } - } - return { status: status.value, value: finalObject }; - } - }; - INVALID2 = Object.freeze({ - status: "aborted" - }); - DIRTY2 = (value2) => ({ status: "dirty", value: value2 }); - OK2 = (value2) => ({ status: "valid", value: value2 }); - isAborted2 = (x) => x.status === "aborted"; - isDirty2 = (x) => x.status === "dirty"; - isValid2 = (x) => x.status === "valid"; - isAsync2 = (x) => typeof Promise !== "undefined" && x instanceof Promise; - } -}); - -// ../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/typeAliases.js -var init_typeAliases = __esm({ - "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/typeAliases.js"() { - } -}); - -// ../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/errorUtil.js -var errorUtil2; -var init_errorUtil = __esm({ - "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/errorUtil.js"() { - (function(errorUtil4) { - errorUtil4.errToObj = (message) => typeof message === "string" ? { message } : message || {}; - errorUtil4.toString = (message) => typeof message === "string" ? message : message?.message; - })(errorUtil2 || (errorUtil2 = {})); - } -}); - -// ../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/types.js -function processCreateParams3(params) { - if (!params) - return {}; - const { errorMap: errorMap4, invalid_type_error, required_error, description } = params; - if (errorMap4 && (invalid_type_error || required_error)) { - throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`); - } - if (errorMap4) - return { errorMap: errorMap4, description }; - const customMap = (iss, ctx) => { - const { message } = params; - if (iss.code === "invalid_enum_value") { - return { message: message ?? ctx.defaultError }; - } - if (typeof ctx.data === "undefined") { - return { message: message ?? required_error ?? ctx.defaultError }; - } - if (iss.code !== "invalid_type") - return { message: ctx.defaultError }; - return { message: message ?? invalid_type_error ?? ctx.defaultError }; - }; - return { errorMap: customMap, description }; -} -function timeRegexSource2(args3) { - let secondsRegexSource = `[0-5]\\d`; - if (args3.precision) { - secondsRegexSource = `${secondsRegexSource}\\.\\d{${args3.precision}}`; - } else if (args3.precision == null) { - secondsRegexSource = `${secondsRegexSource}(\\.\\d+)?`; - } - const secondsQuantifier = args3.precision ? "+" : "?"; - return `([01]\\d|2[0-3]):[0-5]\\d(:${secondsRegexSource})${secondsQuantifier}`; -} -function timeRegex2(args3) { - return new RegExp(`^${timeRegexSource2(args3)}$`); -} -function datetimeRegex2(args3) { - let regex3 = `${dateRegexSource2}T${timeRegexSource2(args3)}`; - const opts = []; - opts.push(args3.local ? `Z?` : `Z`); - if (args3.offset) - opts.push(`([+-]\\d{2}:?\\d{2})`); - regex3 = `${regex3}(${opts.join("|")})`; - return new RegExp(`^${regex3}$`); -} -function isValidIP2(ip2, version2) { - if ((version2 === "v4" || !version2) && ipv4Regex2.test(ip2)) { - return true; - } - if ((version2 === "v6" || !version2) && ipv6Regex2.test(ip2)) { - return true; - } - return false; -} -function isValidJWT2(jwt, alg) { - if (!jwtRegex2.test(jwt)) - return false; - try { - const [header] = jwt.split("."); - if (!header) - return false; - const base643 = header.replace(/-/g, "+").replace(/_/g, "/").padEnd(header.length + (4 - header.length % 4) % 4, "="); - const decoded = JSON.parse(atob(base643)); - if (typeof decoded !== "object" || decoded === null) - return false; - if ("typ" in decoded && decoded?.typ !== "JWT") - return false; - if (!decoded.alg) - return false; - if (alg && decoded.alg !== alg) - return false; - return true; - } catch { - return false; - } -} -function isValidCidr2(ip2, version2) { - if ((version2 === "v4" || !version2) && ipv4CidrRegex2.test(ip2)) { - return true; - } - if ((version2 === "v6" || !version2) && ipv6CidrRegex2.test(ip2)) { - return true; - } - return false; -} -function floatSafeRemainder2(val, step) { - const valDecCount = (val.toString().split(".")[1] || "").length; - const stepDecCount = (step.toString().split(".")[1] || "").length; - const decCount = valDecCount > stepDecCount ? valDecCount : stepDecCount; - const valInt = Number.parseInt(val.toFixed(decCount).replace(".", "")); - const stepInt = Number.parseInt(step.toFixed(decCount).replace(".", "")); - return valInt % stepInt / 10 ** decCount; -} -function deepPartialify2(schema2) { - if (schema2 instanceof ZodObject2) { - const newShape = {}; - for (const key in schema2.shape) { - const fieldSchema = schema2.shape[key]; - newShape[key] = ZodOptional2.create(deepPartialify2(fieldSchema)); - } - return new ZodObject2({ - ...schema2._def, - shape: () => newShape - }); - } else if (schema2 instanceof ZodArray2) { - return new ZodArray2({ - ...schema2._def, - type: deepPartialify2(schema2.element) - }); - } else if (schema2 instanceof ZodOptional2) { - return ZodOptional2.create(deepPartialify2(schema2.unwrap())); - } else if (schema2 instanceof ZodNullable2) { - return ZodNullable2.create(deepPartialify2(schema2.unwrap())); - } else if (schema2 instanceof ZodTuple2) { - return ZodTuple2.create(schema2.items.map((item) => deepPartialify2(item))); - } else { - return schema2; - } -} -function mergeValues2(a, b) { - const aType = getParsedType2(a); - const bType = getParsedType2(b); - if (a === b) { - return { valid: true, data: a }; - } else if (aType === ZodParsedType2.object && bType === ZodParsedType2.object) { - const bKeys = util2.objectKeys(b); - const sharedKeys = util2.objectKeys(a).filter((key) => bKeys.indexOf(key) !== -1); - const newObj = { ...a, ...b }; - for (const key of sharedKeys) { - const sharedValue = mergeValues2(a[key], b[key]); - if (!sharedValue.valid) { - return { valid: false }; - } - newObj[key] = sharedValue.data; - } - return { valid: true, data: newObj }; - } else if (aType === ZodParsedType2.array && bType === ZodParsedType2.array) { - if (a.length !== b.length) { - return { valid: false }; - } - const newArray = []; - for (let index = 0; index < a.length; index++) { - const itemA = a[index]; - const itemB = b[index]; - const sharedValue = mergeValues2(itemA, itemB); - if (!sharedValue.valid) { - return { valid: false }; - } - newArray.push(sharedValue.data); - } - return { valid: true, data: newArray }; - } else if (aType === ZodParsedType2.date && bType === ZodParsedType2.date && +a === +b) { - return { valid: true, data: a }; - } else { - return { valid: false }; - } -} -function createZodEnum2(values, params) { - return new ZodEnum2({ - values, - typeName: ZodFirstPartyTypeKind2.ZodEnum, - ...processCreateParams3(params) - }); -} -function cleanParams2(params, data) { - const p = typeof params === "function" ? params(data) : typeof params === "string" ? { message: params } : params; - const p2 = typeof p === "string" ? { message: p } : p; - return p2; -} -function custom2(check, _params = {}, fatal) { - if (check) - return ZodAny2.create().superRefine((data, ctx) => { - const r = check(data); - if (r instanceof Promise) { - return r.then((r2) => { - if (!r2) { - const params = cleanParams2(_params, data); - const _fatal = params.fatal ?? fatal ?? true; - ctx.addIssue({ code: "custom", ...params, fatal: _fatal }); - } - }); - } - if (!r) { - const params = cleanParams2(_params, data); - const _fatal = params.fatal ?? fatal ?? true; - ctx.addIssue({ code: "custom", ...params, fatal: _fatal }); - } - return; - }); - return ZodAny2.create(); -} -var ParseInputLazyPath2, handleResult2, ZodType2, cuidRegex2, cuid2Regex2, ulidRegex2, uuidRegex2, nanoidRegex2, jwtRegex2, durationRegex2, emailRegex2, _emojiRegex2, emojiRegex2, ipv4Regex2, ipv4CidrRegex2, ipv6Regex2, ipv6CidrRegex2, base64Regex2, base64urlRegex2, dateRegexSource2, dateRegex2, ZodString2, ZodNumber2, ZodBigInt2, ZodBoolean2, ZodDate2, ZodSymbol2, ZodUndefined2, ZodNull2, ZodAny2, ZodUnknown2, ZodNever2, ZodVoid2, ZodArray2, ZodObject2, ZodUnion2, getDiscriminator2, ZodDiscriminatedUnion2, ZodIntersection2, ZodTuple2, ZodRecord2, ZodMap2, ZodSet2, ZodFunction2, ZodLazy2, ZodLiteral2, ZodEnum2, ZodNativeEnum2, ZodPromise2, ZodEffects2, ZodOptional2, ZodNullable2, ZodDefault2, ZodCatch2, ZodNaN2, BRAND2, ZodBranded2, ZodPipeline2, ZodReadonly2, late2, ZodFirstPartyTypeKind2, instanceOfType2, stringType2, numberType2, nanType2, bigIntType2, booleanType2, dateType2, symbolType2, undefinedType2, nullType2, anyType2, unknownType2, neverType2, voidType2, arrayType2, objectType2, strictObjectType2, unionType2, discriminatedUnionType2, intersectionType2, tupleType2, recordType2, mapType2, setType2, functionType2, lazyType2, literalType2, enumType2, nativeEnumType2, promiseType2, effectsType2, optionalType2, nullableType2, preprocessType2, pipelineType2, ostring2, onumber2, oboolean2, coerce2, NEVER2; -var init_types = __esm({ - "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/types.js"() { - init_ZodError(); - init_errors(); - init_errorUtil(); - init_parseUtil(); - init_util(); - ParseInputLazyPath2 = class { - constructor(parent, value2, path4, key) { - this._cachedPath = []; - this.parent = parent; - this.data = value2; - this._path = path4; - this._key = key; - } - get path() { - if (!this._cachedPath.length) { - if (Array.isArray(this._key)) { - this._cachedPath.push(...this._path, ...this._key); - } else { - this._cachedPath.push(...this._path, this._key); - } - } - return this._cachedPath; - } - }; - handleResult2 = (ctx, result) => { - if (isValid2(result)) { - return { success: true, data: result.value }; - } else { - if (!ctx.common.issues.length) { - throw new Error("Validation failed but no issues detected."); - } - return { - success: false, - get error() { - if (this._error) - return this._error; - const error41 = new ZodError2(ctx.common.issues); - this._error = error41; - return this._error; - } - }; - } - }; - ZodType2 = class { - get description() { - return this._def.description; - } - _getType(input) { - return getParsedType2(input.data); - } - _getOrReturnCtx(input, ctx) { - return ctx || { - common: input.parent.common, - data: input.data, - parsedType: getParsedType2(input.data), - schemaErrorMap: this._def.errorMap, - path: input.path, - parent: input.parent - }; - } - _processInputParams(input) { - return { - status: new ParseStatus2(), - ctx: { - common: input.parent.common, - data: input.data, - parsedType: getParsedType2(input.data), - schemaErrorMap: this._def.errorMap, - path: input.path, - parent: input.parent - } - }; - } - _parseSync(input) { - const result = this._parse(input); - if (isAsync2(result)) { - throw new Error("Synchronous parse encountered promise."); - } - return result; - } - _parseAsync(input) { - const result = this._parse(input); - return Promise.resolve(result); - } - parse(data, params) { - const result = this.safeParse(data, params); - if (result.success) - return result.data; - throw result.error; - } - safeParse(data, params) { - const ctx = { - common: { - issues: [], - async: params?.async ?? false, - contextualErrorMap: params?.errorMap - }, - path: params?.path || [], - schemaErrorMap: this._def.errorMap, - parent: null, - data, - parsedType: getParsedType2(data) - }; - const result = this._parseSync({ data, path: ctx.path, parent: ctx }); - return handleResult2(ctx, result); - } - "~validate"(data) { - const ctx = { - common: { - issues: [], - async: !!this["~standard"].async - }, - path: [], - schemaErrorMap: this._def.errorMap, - parent: null, - data, - parsedType: getParsedType2(data) - }; - if (!this["~standard"].async) { - try { - const result = this._parseSync({ data, path: [], parent: ctx }); - return isValid2(result) ? { - value: result.value - } : { - issues: ctx.common.issues - }; - } catch (err) { - if (err?.message?.toLowerCase()?.includes("encountered")) { - this["~standard"].async = true; - } - ctx.common = { - issues: [], - async: true - }; - } - } - return this._parseAsync({ data, path: [], parent: ctx }).then((result) => isValid2(result) ? { - value: result.value - } : { - issues: ctx.common.issues - }); - } - async parseAsync(data, params) { - const result = await this.safeParseAsync(data, params); - if (result.success) - return result.data; - throw result.error; - } - async safeParseAsync(data, params) { - const ctx = { - common: { - issues: [], - contextualErrorMap: params?.errorMap, - async: true - }, - path: params?.path || [], - schemaErrorMap: this._def.errorMap, - parent: null, - data, - parsedType: getParsedType2(data) - }; - const maybeAsyncResult = this._parse({ data, path: ctx.path, parent: ctx }); - const result = await (isAsync2(maybeAsyncResult) ? maybeAsyncResult : Promise.resolve(maybeAsyncResult)); - return handleResult2(ctx, result); - } - refine(check, message) { - const getIssueProperties = (val) => { - if (typeof message === "string" || typeof message === "undefined") { - return { message }; - } else if (typeof message === "function") { - return message(val); - } else { - return message; - } - }; - return this._refinement((val, ctx) => { - const result = check(val); - const setError = () => ctx.addIssue({ - code: ZodIssueCode2.custom, - ...getIssueProperties(val) - }); - if (typeof Promise !== "undefined" && result instanceof Promise) { - return result.then((data) => { - if (!data) { - setError(); - return false; - } else { - return true; - } - }); - } - if (!result) { - setError(); - return false; - } else { - return true; - } - }); - } - refinement(check, refinementData) { - return this._refinement((val, ctx) => { - if (!check(val)) { - ctx.addIssue(typeof refinementData === "function" ? refinementData(val, ctx) : refinementData); - return false; - } else { - return true; - } - }); - } - _refinement(refinement) { - return new ZodEffects2({ - schema: this, - typeName: ZodFirstPartyTypeKind2.ZodEffects, - effect: { type: "refinement", refinement } - }); - } - superRefine(refinement) { - return this._refinement(refinement); - } - constructor(def) { - this.spa = this.safeParseAsync; - this._def = def; - 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: (data) => this["~validate"](data) - }; - } - optional() { - return ZodOptional2.create(this, this._def); - } - nullable() { - return ZodNullable2.create(this, this._def); - } - nullish() { - return this.nullable().optional(); - } - array() { - return ZodArray2.create(this); - } - promise() { - return ZodPromise2.create(this, this._def); - } - or(option) { - return ZodUnion2.create([this, option], this._def); - } - and(incoming) { - return ZodIntersection2.create(this, incoming, this._def); - } - transform(transform) { - return new ZodEffects2({ - ...processCreateParams3(this._def), - schema: this, - typeName: ZodFirstPartyTypeKind2.ZodEffects, - effect: { type: "transform", transform } - }); - } - default(def) { - const defaultValueFunc = typeof def === "function" ? def : () => def; - return new ZodDefault2({ - ...processCreateParams3(this._def), - innerType: this, - defaultValue: defaultValueFunc, - typeName: ZodFirstPartyTypeKind2.ZodDefault - }); - } - brand() { - return new ZodBranded2({ - typeName: ZodFirstPartyTypeKind2.ZodBranded, - type: this, - ...processCreateParams3(this._def) - }); - } - catch(def) { - const catchValueFunc = typeof def === "function" ? def : () => def; - return new ZodCatch2({ - ...processCreateParams3(this._def), - innerType: this, - catchValue: catchValueFunc, - typeName: ZodFirstPartyTypeKind2.ZodCatch - }); - } - describe(description) { - const This = this.constructor; - return new This({ - ...this._def, - description - }); - } - pipe(target) { - return ZodPipeline2.create(this, target); - } - readonly() { - return ZodReadonly2.create(this); - } - isOptional() { - return this.safeParse(void 0).success; - } - isNullable() { - return this.safeParse(null).success; - } - }; - cuidRegex2 = /^c[^\s-]{8,}$/i; - cuid2Regex2 = /^[0-9a-z]+$/; - ulidRegex2 = /^[0-9A-HJKMNP-TV-Z]{26}$/i; - uuidRegex2 = /^[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; - nanoidRegex2 = /^[a-z0-9_-]{21}$/i; - jwtRegex2 = /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/; - durationRegex2 = /^[-+]?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)?)??$/; - emailRegex2 = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i; - _emojiRegex2 = `^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`; - ipv4Regex2 = /^(?:(?: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])$/; - ipv4CidrRegex2 = /^(?:(?: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])$/; - ipv6Regex2 = /^(([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]))$/; - ipv6CidrRegex2 = /^(([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])$/; - base64Regex2 = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/; - base64urlRegex2 = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/; - dateRegexSource2 = `((\\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])))`; - dateRegex2 = new RegExp(`^${dateRegexSource2}$`); - ZodString2 = class _ZodString extends ZodType2 { - _parse(input) { - if (this._def.coerce) { - input.data = String(input.data); - } - const parsedType4 = this._getType(input); - if (parsedType4 !== ZodParsedType2.string) { - const ctx2 = this._getOrReturnCtx(input); - addIssueToContext2(ctx2, { - code: ZodIssueCode2.invalid_type, - expected: ZodParsedType2.string, - received: ctx2.parsedType - }); - return INVALID2; - } - const status = new ParseStatus2(); - let ctx = void 0; - for (const check of this._def.checks) { - if (check.kind === "min") { - if (input.data.length < check.value) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext2(ctx, { - code: ZodIssueCode2.too_small, - minimum: check.value, - type: "string", - inclusive: true, - exact: false, - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "max") { - if (input.data.length > check.value) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext2(ctx, { - code: ZodIssueCode2.too_big, - maximum: check.value, - type: "string", - inclusive: true, - exact: false, - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "length") { - const tooBig = input.data.length > check.value; - const tooSmall = input.data.length < check.value; - if (tooBig || tooSmall) { - ctx = this._getOrReturnCtx(input, ctx); - if (tooBig) { - addIssueToContext2(ctx, { - code: ZodIssueCode2.too_big, - maximum: check.value, - type: "string", - inclusive: true, - exact: true, - message: check.message - }); - } else if (tooSmall) { - addIssueToContext2(ctx, { - code: ZodIssueCode2.too_small, - minimum: check.value, - type: "string", - inclusive: true, - exact: true, - message: check.message - }); - } - status.dirty(); - } - } else if (check.kind === "email") { - if (!emailRegex2.test(input.data)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext2(ctx, { - validation: "email", - code: ZodIssueCode2.invalid_string, - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "emoji") { - if (!emojiRegex2) { - emojiRegex2 = new RegExp(_emojiRegex2, "u"); - } - if (!emojiRegex2.test(input.data)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext2(ctx, { - validation: "emoji", - code: ZodIssueCode2.invalid_string, - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "uuid") { - if (!uuidRegex2.test(input.data)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext2(ctx, { - validation: "uuid", - code: ZodIssueCode2.invalid_string, - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "nanoid") { - if (!nanoidRegex2.test(input.data)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext2(ctx, { - validation: "nanoid", - code: ZodIssueCode2.invalid_string, - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "cuid") { - if (!cuidRegex2.test(input.data)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext2(ctx, { - validation: "cuid", - code: ZodIssueCode2.invalid_string, - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "cuid2") { - if (!cuid2Regex2.test(input.data)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext2(ctx, { - validation: "cuid2", - code: ZodIssueCode2.invalid_string, - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "ulid") { - if (!ulidRegex2.test(input.data)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext2(ctx, { - validation: "ulid", - code: ZodIssueCode2.invalid_string, - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "url") { - try { - new URL(input.data); - } catch { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext2(ctx, { - validation: "url", - code: ZodIssueCode2.invalid_string, - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "regex") { - check.regex.lastIndex = 0; - const testResult = check.regex.test(input.data); - if (!testResult) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext2(ctx, { - validation: "regex", - code: ZodIssueCode2.invalid_string, - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "trim") { - input.data = input.data.trim(); - } else if (check.kind === "includes") { - if (!input.data.includes(check.value, check.position)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext2(ctx, { - code: ZodIssueCode2.invalid_string, - validation: { includes: check.value, position: check.position }, - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "toLowerCase") { - input.data = input.data.toLowerCase(); - } else if (check.kind === "toUpperCase") { - input.data = input.data.toUpperCase(); - } else if (check.kind === "startsWith") { - if (!input.data.startsWith(check.value)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext2(ctx, { - code: ZodIssueCode2.invalid_string, - validation: { startsWith: check.value }, - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "endsWith") { - if (!input.data.endsWith(check.value)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext2(ctx, { - code: ZodIssueCode2.invalid_string, - validation: { endsWith: check.value }, - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "datetime") { - const regex3 = datetimeRegex2(check); - if (!regex3.test(input.data)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext2(ctx, { - code: ZodIssueCode2.invalid_string, - validation: "datetime", - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "date") { - const regex3 = dateRegex2; - if (!regex3.test(input.data)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext2(ctx, { - code: ZodIssueCode2.invalid_string, - validation: "date", - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "time") { - const regex3 = timeRegex2(check); - if (!regex3.test(input.data)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext2(ctx, { - code: ZodIssueCode2.invalid_string, - validation: "time", - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "duration") { - if (!durationRegex2.test(input.data)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext2(ctx, { - validation: "duration", - code: ZodIssueCode2.invalid_string, - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "ip") { - if (!isValidIP2(input.data, check.version)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext2(ctx, { - validation: "ip", - code: ZodIssueCode2.invalid_string, - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "jwt") { - if (!isValidJWT2(input.data, check.alg)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext2(ctx, { - validation: "jwt", - code: ZodIssueCode2.invalid_string, - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "cidr") { - if (!isValidCidr2(input.data, check.version)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext2(ctx, { - validation: "cidr", - code: ZodIssueCode2.invalid_string, - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "base64") { - if (!base64Regex2.test(input.data)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext2(ctx, { - validation: "base64", - code: ZodIssueCode2.invalid_string, - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "base64url") { - if (!base64urlRegex2.test(input.data)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext2(ctx, { - validation: "base64url", - code: ZodIssueCode2.invalid_string, - message: check.message - }); - status.dirty(); - } - } else { - util2.assertNever(check); - } - } - return { status: status.value, value: input.data }; - } - _regex(regex3, validation, message) { - return this.refinement((data) => regex3.test(data), { - validation, - code: ZodIssueCode2.invalid_string, - ...errorUtil2.errToObj(message) - }); - } - _addCheck(check) { - return new _ZodString({ - ...this._def, - checks: [...this._def.checks, check] - }); - } - email(message) { - return this._addCheck({ kind: "email", ...errorUtil2.errToObj(message) }); - } - url(message) { - return this._addCheck({ kind: "url", ...errorUtil2.errToObj(message) }); - } - emoji(message) { - return this._addCheck({ kind: "emoji", ...errorUtil2.errToObj(message) }); - } - uuid(message) { - return this._addCheck({ kind: "uuid", ...errorUtil2.errToObj(message) }); - } - nanoid(message) { - return this._addCheck({ kind: "nanoid", ...errorUtil2.errToObj(message) }); - } - cuid(message) { - return this._addCheck({ kind: "cuid", ...errorUtil2.errToObj(message) }); - } - cuid2(message) { - return this._addCheck({ kind: "cuid2", ...errorUtil2.errToObj(message) }); - } - ulid(message) { - return this._addCheck({ kind: "ulid", ...errorUtil2.errToObj(message) }); - } - base64(message) { - return this._addCheck({ kind: "base64", ...errorUtil2.errToObj(message) }); - } - base64url(message) { - return this._addCheck({ - kind: "base64url", - ...errorUtil2.errToObj(message) - }); - } - jwt(options) { - return this._addCheck({ kind: "jwt", ...errorUtil2.errToObj(options) }); - } - ip(options) { - return this._addCheck({ kind: "ip", ...errorUtil2.errToObj(options) }); - } - cidr(options) { - return this._addCheck({ kind: "cidr", ...errorUtil2.errToObj(options) }); - } - datetime(options) { - if (typeof options === "string") { - return this._addCheck({ - kind: "datetime", - precision: null, - offset: false, - local: false, - message: options - }); - } - return this._addCheck({ - kind: "datetime", - precision: typeof options?.precision === "undefined" ? null : options?.precision, - offset: options?.offset ?? false, - local: options?.local ?? false, - ...errorUtil2.errToObj(options?.message) - }); - } - date(message) { - return this._addCheck({ kind: "date", message }); - } - time(options) { - if (typeof options === "string") { - return this._addCheck({ - kind: "time", - precision: null, - message: options - }); - } - return this._addCheck({ - kind: "time", - precision: typeof options?.precision === "undefined" ? null : options?.precision, - ...errorUtil2.errToObj(options?.message) - }); - } - duration(message) { - return this._addCheck({ kind: "duration", ...errorUtil2.errToObj(message) }); - } - regex(regex3, message) { - return this._addCheck({ - kind: "regex", - regex: regex3, - ...errorUtil2.errToObj(message) - }); - } - includes(value2, options) { - return this._addCheck({ - kind: "includes", - value: value2, - position: options?.position, - ...errorUtil2.errToObj(options?.message) - }); - } - startsWith(value2, message) { - return this._addCheck({ - kind: "startsWith", - value: value2, - ...errorUtil2.errToObj(message) - }); - } - endsWith(value2, message) { - return this._addCheck({ - kind: "endsWith", - value: value2, - ...errorUtil2.errToObj(message) - }); - } - min(minLength, message) { - return this._addCheck({ - kind: "min", - value: minLength, - ...errorUtil2.errToObj(message) - }); - } - max(maxLength, message) { - return this._addCheck({ - kind: "max", - value: maxLength, - ...errorUtil2.errToObj(message) - }); - } - length(len, message) { - return this._addCheck({ - kind: "length", - value: len, - ...errorUtil2.errToObj(message) - }); - } - /** - * Equivalent to `.min(1)` - */ - nonempty(message) { - return this.min(1, errorUtil2.errToObj(message)); - } - trim() { - return new _ZodString({ - ...this._def, - checks: [...this._def.checks, { kind: "trim" }] - }); - } - toLowerCase() { - return new _ZodString({ - ...this._def, - checks: [...this._def.checks, { kind: "toLowerCase" }] - }); - } - toUpperCase() { - return new _ZodString({ - ...this._def, - checks: [...this._def.checks, { kind: "toUpperCase" }] - }); - } - get isDatetime() { - return !!this._def.checks.find((ch) => ch.kind === "datetime"); - } - get isDate() { - return !!this._def.checks.find((ch) => ch.kind === "date"); - } - get isTime() { - return !!this._def.checks.find((ch) => ch.kind === "time"); - } - get isDuration() { - return !!this._def.checks.find((ch) => ch.kind === "duration"); - } - get isEmail() { - return !!this._def.checks.find((ch) => ch.kind === "email"); - } - get isURL() { - return !!this._def.checks.find((ch) => ch.kind === "url"); - } - get isEmoji() { - return !!this._def.checks.find((ch) => ch.kind === "emoji"); - } - get isUUID() { - return !!this._def.checks.find((ch) => ch.kind === "uuid"); - } - get isNANOID() { - return !!this._def.checks.find((ch) => ch.kind === "nanoid"); - } - get isCUID() { - return !!this._def.checks.find((ch) => ch.kind === "cuid"); - } - get isCUID2() { - return !!this._def.checks.find((ch) => ch.kind === "cuid2"); - } - get isULID() { - return !!this._def.checks.find((ch) => ch.kind === "ulid"); - } - get isIP() { - return !!this._def.checks.find((ch) => ch.kind === "ip"); - } - get isCIDR() { - return !!this._def.checks.find((ch) => ch.kind === "cidr"); - } - get isBase64() { - return !!this._def.checks.find((ch) => ch.kind === "base64"); - } - get isBase64url() { - return !!this._def.checks.find((ch) => ch.kind === "base64url"); - } - get minLength() { - let min = null; - for (const ch of this._def.checks) { - if (ch.kind === "min") { - if (min === null || ch.value > min) - min = ch.value; - } - } - return min; - } - get maxLength() { - let max = null; - for (const ch of this._def.checks) { - if (ch.kind === "max") { - if (max === null || ch.value < max) - max = ch.value; - } - } - return max; - } - }; - ZodString2.create = (params) => { - return new ZodString2({ - checks: [], - typeName: ZodFirstPartyTypeKind2.ZodString, - coerce: params?.coerce ?? false, - ...processCreateParams3(params) - }); - }; - ZodNumber2 = class _ZodNumber extends ZodType2 { - constructor() { - super(...arguments); - this.min = this.gte; - this.max = this.lte; - this.step = this.multipleOf; - } - _parse(input) { - if (this._def.coerce) { - input.data = Number(input.data); - } - const parsedType4 = this._getType(input); - if (parsedType4 !== ZodParsedType2.number) { - const ctx2 = this._getOrReturnCtx(input); - addIssueToContext2(ctx2, { - code: ZodIssueCode2.invalid_type, - expected: ZodParsedType2.number, - received: ctx2.parsedType - }); - return INVALID2; - } - let ctx = void 0; - const status = new ParseStatus2(); - for (const check of this._def.checks) { - if (check.kind === "int") { - if (!util2.isInteger(input.data)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext2(ctx, { - code: ZodIssueCode2.invalid_type, - expected: "integer", - received: "float", - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "min") { - const tooSmall = check.inclusive ? input.data < check.value : input.data <= check.value; - if (tooSmall) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext2(ctx, { - code: ZodIssueCode2.too_small, - minimum: check.value, - type: "number", - inclusive: check.inclusive, - exact: false, - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "max") { - const tooBig = check.inclusive ? input.data > check.value : input.data >= check.value; - if (tooBig) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext2(ctx, { - code: ZodIssueCode2.too_big, - maximum: check.value, - type: "number", - inclusive: check.inclusive, - exact: false, - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "multipleOf") { - if (floatSafeRemainder2(input.data, check.value) !== 0) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext2(ctx, { - code: ZodIssueCode2.not_multiple_of, - multipleOf: check.value, - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "finite") { - if (!Number.isFinite(input.data)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext2(ctx, { - code: ZodIssueCode2.not_finite, - message: check.message - }); - status.dirty(); - } - } else { - util2.assertNever(check); - } - } - return { status: status.value, value: input.data }; - } - gte(value2, message) { - return this.setLimit("min", value2, true, errorUtil2.toString(message)); - } - gt(value2, message) { - return this.setLimit("min", value2, false, errorUtil2.toString(message)); - } - lte(value2, message) { - return this.setLimit("max", value2, true, errorUtil2.toString(message)); - } - lt(value2, message) { - return this.setLimit("max", value2, false, errorUtil2.toString(message)); - } - setLimit(kind, value2, inclusive, message) { - return new _ZodNumber({ - ...this._def, - checks: [ - ...this._def.checks, - { - kind, - value: value2, - inclusive, - message: errorUtil2.toString(message) - } - ] - }); - } - _addCheck(check) { - return new _ZodNumber({ - ...this._def, - checks: [...this._def.checks, check] - }); - } - int(message) { - return this._addCheck({ - kind: "int", - message: errorUtil2.toString(message) - }); - } - positive(message) { - return this._addCheck({ - kind: "min", - value: 0, - inclusive: false, - message: errorUtil2.toString(message) - }); - } - negative(message) { - return this._addCheck({ - kind: "max", - value: 0, - inclusive: false, - message: errorUtil2.toString(message) - }); - } - nonpositive(message) { - return this._addCheck({ - kind: "max", - value: 0, - inclusive: true, - message: errorUtil2.toString(message) - }); - } - nonnegative(message) { - return this._addCheck({ - kind: "min", - value: 0, - inclusive: true, - message: errorUtil2.toString(message) - }); - } - multipleOf(value2, message) { - return this._addCheck({ - kind: "multipleOf", - value: value2, - message: errorUtil2.toString(message) - }); - } - finite(message) { - return this._addCheck({ - kind: "finite", - message: errorUtil2.toString(message) - }); - } - safe(message) { - return this._addCheck({ - kind: "min", - inclusive: true, - value: Number.MIN_SAFE_INTEGER, - message: errorUtil2.toString(message) - })._addCheck({ - kind: "max", - inclusive: true, - value: Number.MAX_SAFE_INTEGER, - message: errorUtil2.toString(message) - }); - } - get minValue() { - let min = null; - for (const ch of this._def.checks) { - if (ch.kind === "min") { - if (min === null || ch.value > min) - min = ch.value; - } - } - return min; - } - get maxValue() { - let max = null; - for (const ch of this._def.checks) { - if (ch.kind === "max") { - if (max === null || ch.value < max) - max = ch.value; - } - } - return max; - } - get isInt() { - return !!this._def.checks.find((ch) => ch.kind === "int" || ch.kind === "multipleOf" && util2.isInteger(ch.value)); - } - get isFinite() { - let max = null; - let min = null; - for (const ch of this._def.checks) { - if (ch.kind === "finite" || ch.kind === "int" || ch.kind === "multipleOf") { - return true; - } else if (ch.kind === "min") { - if (min === null || ch.value > min) - min = ch.value; - } else if (ch.kind === "max") { - if (max === null || ch.value < max) - max = ch.value; - } - } - return Number.isFinite(min) && Number.isFinite(max); - } - }; - ZodNumber2.create = (params) => { - return new ZodNumber2({ - checks: [], - typeName: ZodFirstPartyTypeKind2.ZodNumber, - coerce: params?.coerce || false, - ...processCreateParams3(params) - }); - }; - ZodBigInt2 = class _ZodBigInt extends ZodType2 { - constructor() { - super(...arguments); - this.min = this.gte; - this.max = this.lte; - } - _parse(input) { - if (this._def.coerce) { - try { - input.data = BigInt(input.data); - } catch { - return this._getInvalidInput(input); - } - } - const parsedType4 = this._getType(input); - if (parsedType4 !== ZodParsedType2.bigint) { - return this._getInvalidInput(input); - } - let ctx = void 0; - const status = new ParseStatus2(); - for (const check of this._def.checks) { - if (check.kind === "min") { - const tooSmall = check.inclusive ? input.data < check.value : input.data <= check.value; - if (tooSmall) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext2(ctx, { - code: ZodIssueCode2.too_small, - type: "bigint", - minimum: check.value, - inclusive: check.inclusive, - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "max") { - const tooBig = check.inclusive ? input.data > check.value : input.data >= check.value; - if (tooBig) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext2(ctx, { - code: ZodIssueCode2.too_big, - type: "bigint", - maximum: check.value, - inclusive: check.inclusive, - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "multipleOf") { - if (input.data % check.value !== BigInt(0)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext2(ctx, { - code: ZodIssueCode2.not_multiple_of, - multipleOf: check.value, - message: check.message - }); - status.dirty(); - } - } else { - util2.assertNever(check); - } - } - return { status: status.value, value: input.data }; - } - _getInvalidInput(input) { - const ctx = this._getOrReturnCtx(input); - addIssueToContext2(ctx, { - code: ZodIssueCode2.invalid_type, - expected: ZodParsedType2.bigint, - received: ctx.parsedType - }); - return INVALID2; - } - gte(value2, message) { - return this.setLimit("min", value2, true, errorUtil2.toString(message)); - } - gt(value2, message) { - return this.setLimit("min", value2, false, errorUtil2.toString(message)); - } - lte(value2, message) { - return this.setLimit("max", value2, true, errorUtil2.toString(message)); - } - lt(value2, message) { - return this.setLimit("max", value2, false, errorUtil2.toString(message)); - } - setLimit(kind, value2, inclusive, message) { - return new _ZodBigInt({ - ...this._def, - checks: [ - ...this._def.checks, - { - kind, - value: value2, - inclusive, - message: errorUtil2.toString(message) - } - ] - }); - } - _addCheck(check) { - return new _ZodBigInt({ - ...this._def, - checks: [...this._def.checks, check] - }); - } - positive(message) { - return this._addCheck({ - kind: "min", - value: BigInt(0), - inclusive: false, - message: errorUtil2.toString(message) - }); - } - negative(message) { - return this._addCheck({ - kind: "max", - value: BigInt(0), - inclusive: false, - message: errorUtil2.toString(message) - }); - } - nonpositive(message) { - return this._addCheck({ - kind: "max", - value: BigInt(0), - inclusive: true, - message: errorUtil2.toString(message) - }); - } - nonnegative(message) { - return this._addCheck({ - kind: "min", - value: BigInt(0), - inclusive: true, - message: errorUtil2.toString(message) - }); - } - multipleOf(value2, message) { - return this._addCheck({ - kind: "multipleOf", - value: value2, - message: errorUtil2.toString(message) - }); - } - get minValue() { - let min = null; - for (const ch of this._def.checks) { - if (ch.kind === "min") { - if (min === null || ch.value > min) - min = ch.value; - } - } - return min; - } - get maxValue() { - let max = null; - for (const ch of this._def.checks) { - if (ch.kind === "max") { - if (max === null || ch.value < max) - max = ch.value; - } - } - return max; - } - }; - ZodBigInt2.create = (params) => { - return new ZodBigInt2({ - checks: [], - typeName: ZodFirstPartyTypeKind2.ZodBigInt, - coerce: params?.coerce ?? false, - ...processCreateParams3(params) - }); - }; - ZodBoolean2 = class extends ZodType2 { - _parse(input) { - if (this._def.coerce) { - input.data = Boolean(input.data); - } - const parsedType4 = this._getType(input); - if (parsedType4 !== ZodParsedType2.boolean) { - const ctx = this._getOrReturnCtx(input); - addIssueToContext2(ctx, { - code: ZodIssueCode2.invalid_type, - expected: ZodParsedType2.boolean, - received: ctx.parsedType - }); - return INVALID2; - } - return OK2(input.data); - } - }; - ZodBoolean2.create = (params) => { - return new ZodBoolean2({ - typeName: ZodFirstPartyTypeKind2.ZodBoolean, - coerce: params?.coerce || false, - ...processCreateParams3(params) - }); - }; - ZodDate2 = class _ZodDate extends ZodType2 { - _parse(input) { - if (this._def.coerce) { - input.data = new Date(input.data); - } - const parsedType4 = this._getType(input); - if (parsedType4 !== ZodParsedType2.date) { - const ctx2 = this._getOrReturnCtx(input); - addIssueToContext2(ctx2, { - code: ZodIssueCode2.invalid_type, - expected: ZodParsedType2.date, - received: ctx2.parsedType - }); - return INVALID2; - } - if (Number.isNaN(input.data.getTime())) { - const ctx2 = this._getOrReturnCtx(input); - addIssueToContext2(ctx2, { - code: ZodIssueCode2.invalid_date - }); - return INVALID2; - } - const status = new ParseStatus2(); - let ctx = void 0; - for (const check of this._def.checks) { - if (check.kind === "min") { - if (input.data.getTime() < check.value) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext2(ctx, { - code: ZodIssueCode2.too_small, - message: check.message, - inclusive: true, - exact: false, - minimum: check.value, - type: "date" - }); - status.dirty(); - } - } else if (check.kind === "max") { - if (input.data.getTime() > check.value) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext2(ctx, { - code: ZodIssueCode2.too_big, - message: check.message, - inclusive: true, - exact: false, - maximum: check.value, - type: "date" - }); - status.dirty(); - } - } else { - util2.assertNever(check); - } - } - return { - status: status.value, - value: new Date(input.data.getTime()) - }; - } - _addCheck(check) { - return new _ZodDate({ - ...this._def, - checks: [...this._def.checks, check] - }); - } - min(minDate, message) { - return this._addCheck({ - kind: "min", - value: minDate.getTime(), - message: errorUtil2.toString(message) - }); - } - max(maxDate, message) { - return this._addCheck({ - kind: "max", - value: maxDate.getTime(), - message: errorUtil2.toString(message) - }); - } - get minDate() { - let min = null; - for (const ch of this._def.checks) { - if (ch.kind === "min") { - if (min === null || ch.value > min) - min = ch.value; - } - } - return min != null ? new Date(min) : null; - } - get maxDate() { - let max = null; - for (const ch of this._def.checks) { - if (ch.kind === "max") { - if (max === null || ch.value < max) - max = ch.value; - } - } - return max != null ? new Date(max) : null; - } - }; - ZodDate2.create = (params) => { - return new ZodDate2({ - checks: [], - coerce: params?.coerce || false, - typeName: ZodFirstPartyTypeKind2.ZodDate, - ...processCreateParams3(params) - }); - }; - ZodSymbol2 = class extends ZodType2 { - _parse(input) { - const parsedType4 = this._getType(input); - if (parsedType4 !== ZodParsedType2.symbol) { - const ctx = this._getOrReturnCtx(input); - addIssueToContext2(ctx, { - code: ZodIssueCode2.invalid_type, - expected: ZodParsedType2.symbol, - received: ctx.parsedType - }); - return INVALID2; - } - return OK2(input.data); - } - }; - ZodSymbol2.create = (params) => { - return new ZodSymbol2({ - typeName: ZodFirstPartyTypeKind2.ZodSymbol, - ...processCreateParams3(params) - }); - }; - ZodUndefined2 = class extends ZodType2 { - _parse(input) { - const parsedType4 = this._getType(input); - if (parsedType4 !== ZodParsedType2.undefined) { - const ctx = this._getOrReturnCtx(input); - addIssueToContext2(ctx, { - code: ZodIssueCode2.invalid_type, - expected: ZodParsedType2.undefined, - received: ctx.parsedType - }); - return INVALID2; - } - return OK2(input.data); - } - }; - ZodUndefined2.create = (params) => { - return new ZodUndefined2({ - typeName: ZodFirstPartyTypeKind2.ZodUndefined, - ...processCreateParams3(params) - }); - }; - ZodNull2 = class extends ZodType2 { - _parse(input) { - const parsedType4 = this._getType(input); - if (parsedType4 !== ZodParsedType2.null) { - const ctx = this._getOrReturnCtx(input); - addIssueToContext2(ctx, { - code: ZodIssueCode2.invalid_type, - expected: ZodParsedType2.null, - received: ctx.parsedType - }); - return INVALID2; - } - return OK2(input.data); - } - }; - ZodNull2.create = (params) => { - return new ZodNull2({ - typeName: ZodFirstPartyTypeKind2.ZodNull, - ...processCreateParams3(params) - }); - }; - ZodAny2 = class extends ZodType2 { - constructor() { - super(...arguments); - this._any = true; - } - _parse(input) { - return OK2(input.data); - } - }; - ZodAny2.create = (params) => { - return new ZodAny2({ - typeName: ZodFirstPartyTypeKind2.ZodAny, - ...processCreateParams3(params) - }); - }; - ZodUnknown2 = class extends ZodType2 { - constructor() { - super(...arguments); - this._unknown = true; - } - _parse(input) { - return OK2(input.data); - } - }; - ZodUnknown2.create = (params) => { - return new ZodUnknown2({ - typeName: ZodFirstPartyTypeKind2.ZodUnknown, - ...processCreateParams3(params) - }); - }; - ZodNever2 = class extends ZodType2 { - _parse(input) { - const ctx = this._getOrReturnCtx(input); - addIssueToContext2(ctx, { - code: ZodIssueCode2.invalid_type, - expected: ZodParsedType2.never, - received: ctx.parsedType - }); - return INVALID2; - } - }; - ZodNever2.create = (params) => { - return new ZodNever2({ - typeName: ZodFirstPartyTypeKind2.ZodNever, - ...processCreateParams3(params) - }); - }; - ZodVoid2 = class extends ZodType2 { - _parse(input) { - const parsedType4 = this._getType(input); - if (parsedType4 !== ZodParsedType2.undefined) { - const ctx = this._getOrReturnCtx(input); - addIssueToContext2(ctx, { - code: ZodIssueCode2.invalid_type, - expected: ZodParsedType2.void, - received: ctx.parsedType - }); - return INVALID2; - } - return OK2(input.data); - } - }; - ZodVoid2.create = (params) => { - return new ZodVoid2({ - typeName: ZodFirstPartyTypeKind2.ZodVoid, - ...processCreateParams3(params) - }); - }; - ZodArray2 = class _ZodArray extends ZodType2 { - _parse(input) { - const { ctx, status } = this._processInputParams(input); - const def = this._def; - if (ctx.parsedType !== ZodParsedType2.array) { - addIssueToContext2(ctx, { - code: ZodIssueCode2.invalid_type, - expected: ZodParsedType2.array, - received: ctx.parsedType - }); - return INVALID2; - } - if (def.exactLength !== null) { - const tooBig = ctx.data.length > def.exactLength.value; - const tooSmall = ctx.data.length < def.exactLength.value; - if (tooBig || tooSmall) { - addIssueToContext2(ctx, { - code: tooBig ? ZodIssueCode2.too_big : ZodIssueCode2.too_small, - minimum: tooSmall ? def.exactLength.value : void 0, - maximum: tooBig ? def.exactLength.value : void 0, - type: "array", - inclusive: true, - exact: true, - message: def.exactLength.message - }); - status.dirty(); - } - } - if (def.minLength !== null) { - if (ctx.data.length < def.minLength.value) { - addIssueToContext2(ctx, { - code: ZodIssueCode2.too_small, - minimum: def.minLength.value, - type: "array", - inclusive: true, - exact: false, - message: def.minLength.message - }); - status.dirty(); - } - } - if (def.maxLength !== null) { - if (ctx.data.length > def.maxLength.value) { - addIssueToContext2(ctx, { - code: ZodIssueCode2.too_big, - maximum: def.maxLength.value, - type: "array", - inclusive: true, - exact: false, - message: def.maxLength.message - }); - status.dirty(); - } - } - if (ctx.common.async) { - return Promise.all([...ctx.data].map((item, i) => { - return def.type._parseAsync(new ParseInputLazyPath2(ctx, item, ctx.path, i)); - })).then((result2) => { - return ParseStatus2.mergeArray(status, result2); - }); - } - const result = [...ctx.data].map((item, i) => { - return def.type._parseSync(new ParseInputLazyPath2(ctx, item, ctx.path, i)); - }); - return ParseStatus2.mergeArray(status, result); - } - get element() { - return this._def.type; - } - min(minLength, message) { - return new _ZodArray({ - ...this._def, - minLength: { value: minLength, message: errorUtil2.toString(message) } - }); - } - max(maxLength, message) { - return new _ZodArray({ - ...this._def, - maxLength: { value: maxLength, message: errorUtil2.toString(message) } - }); - } - length(len, message) { - return new _ZodArray({ - ...this._def, - exactLength: { value: len, message: errorUtil2.toString(message) } - }); - } - nonempty(message) { - return this.min(1, message); - } - }; - ZodArray2.create = (schema2, params) => { - return new ZodArray2({ - type: schema2, - minLength: null, - maxLength: null, - exactLength: null, - typeName: ZodFirstPartyTypeKind2.ZodArray, - ...processCreateParams3(params) - }); - }; - ZodObject2 = class _ZodObject extends ZodType2 { - constructor() { - super(...arguments); - this._cached = null; - this.nonstrict = this.passthrough; - this.augment = this.extend; - } - _getCached() { - if (this._cached !== null) - return this._cached; - const shape = this._def.shape(); - const keys = util2.objectKeys(shape); - this._cached = { shape, keys }; - return this._cached; - } - _parse(input) { - const parsedType4 = this._getType(input); - if (parsedType4 !== ZodParsedType2.object) { - const ctx2 = this._getOrReturnCtx(input); - addIssueToContext2(ctx2, { - code: ZodIssueCode2.invalid_type, - expected: ZodParsedType2.object, - received: ctx2.parsedType - }); - return INVALID2; - } - const { status, ctx } = this._processInputParams(input); - const { shape, keys: shapeKeys } = this._getCached(); - const extraKeys = []; - if (!(this._def.catchall instanceof ZodNever2 && this._def.unknownKeys === "strip")) { - for (const key in ctx.data) { - if (!shapeKeys.includes(key)) { - extraKeys.push(key); - } - } - } - const pairs = []; - for (const key of shapeKeys) { - const keyValidator = shape[key]; - const value2 = ctx.data[key]; - pairs.push({ - key: { status: "valid", value: key }, - value: keyValidator._parse(new ParseInputLazyPath2(ctx, value2, ctx.path, key)), - alwaysSet: key in ctx.data - }); - } - if (this._def.catchall instanceof ZodNever2) { - const unknownKeys = this._def.unknownKeys; - if (unknownKeys === "passthrough") { - for (const key of extraKeys) { - pairs.push({ - key: { status: "valid", value: key }, - value: { status: "valid", value: ctx.data[key] } - }); - } - } else if (unknownKeys === "strict") { - if (extraKeys.length > 0) { - addIssueToContext2(ctx, { - code: ZodIssueCode2.unrecognized_keys, - keys: extraKeys - }); - status.dirty(); - } - } else if (unknownKeys === "strip") { - } else { - throw new Error(`Internal ZodObject error: invalid unknownKeys value.`); - } - } else { - const catchall = this._def.catchall; - for (const key of extraKeys) { - const value2 = ctx.data[key]; - pairs.push({ - key: { status: "valid", value: key }, - value: catchall._parse( - new ParseInputLazyPath2(ctx, value2, ctx.path, key) - //, ctx.child(key), value, getParsedType(value) - ), - alwaysSet: key in ctx.data - }); - } - } - if (ctx.common.async) { - return Promise.resolve().then(async () => { - const syncPairs = []; - for (const pair of pairs) { - const key = await pair.key; - const value2 = await pair.value; - syncPairs.push({ - key, - value: value2, - alwaysSet: pair.alwaysSet - }); - } - return syncPairs; - }).then((syncPairs) => { - return ParseStatus2.mergeObjectSync(status, syncPairs); - }); - } else { - return ParseStatus2.mergeObjectSync(status, pairs); - } - } - get shape() { - return this._def.shape(); - } - strict(message) { - errorUtil2.errToObj; - return new _ZodObject({ - ...this._def, - unknownKeys: "strict", - ...message !== void 0 ? { - errorMap: (issue2, ctx) => { - const defaultError = this._def.errorMap?.(issue2, ctx).message ?? ctx.defaultError; - if (issue2.code === "unrecognized_keys") - return { - message: errorUtil2.errToObj(message).message ?? defaultError - }; - return { - message: defaultError - }; - } - } : {} - }); - } - strip() { - return new _ZodObject({ - ...this._def, - unknownKeys: "strip" - }); - } - passthrough() { - return new _ZodObject({ - ...this._def, - unknownKeys: "passthrough" - }); - } - // const AugmentFactory = - // (def: Def) => - // ( - // augmentation: Augmentation - // ): ZodObject< - // extendShape, Augmentation>, - // Def["unknownKeys"], - // Def["catchall"] - // > => { - // return new ZodObject({ - // ...def, - // shape: () => ({ - // ...def.shape(), - // ...augmentation, - // }), - // }) as any; - // }; - extend(augmentation) { - return new _ZodObject({ - ...this._def, - shape: () => ({ - ...this._def.shape(), - ...augmentation - }) - }); - } - /** - * Prior to zod@1.0.12 there was a bug in the - * inferred type of merged objects. Please - * upgrade if you are experiencing issues. - */ - merge(merging) { - const merged = new _ZodObject({ - unknownKeys: merging._def.unknownKeys, - catchall: merging._def.catchall, - shape: () => ({ - ...this._def.shape(), - ...merging._def.shape() - }), - typeName: ZodFirstPartyTypeKind2.ZodObject - }); - return merged; - } - // merge< - // Incoming extends AnyZodObject, - // Augmentation extends Incoming["shape"], - // NewOutput extends { - // [k in keyof Augmentation | keyof Output]: k extends keyof Augmentation - // ? Augmentation[k]["_output"] - // : k extends keyof Output - // ? Output[k] - // : never; - // }, - // NewInput extends { - // [k in keyof Augmentation | keyof Input]: k extends keyof Augmentation - // ? Augmentation[k]["_input"] - // : k extends keyof Input - // ? Input[k] - // : never; - // } - // >( - // merging: Incoming - // ): ZodObject< - // extendShape>, - // Incoming["_def"]["unknownKeys"], - // Incoming["_def"]["catchall"], - // NewOutput, - // NewInput - // > { - // const merged: any = new ZodObject({ - // unknownKeys: merging._def.unknownKeys, - // catchall: merging._def.catchall, - // shape: () => - // objectUtil.mergeShapes(this._def.shape(), merging._def.shape()), - // typeName: ZodFirstPartyTypeKind.ZodObject, - // }) as any; - // return merged; - // } - setKey(key, schema2) { - return this.augment({ [key]: schema2 }); - } - // merge( - // merging: Incoming - // ): //ZodObject = (merging) => { - // ZodObject< - // extendShape>, - // Incoming["_def"]["unknownKeys"], - // Incoming["_def"]["catchall"] - // > { - // // const mergedShape = objectUtil.mergeShapes( - // // this._def.shape(), - // // merging._def.shape() - // // ); - // const merged: any = new ZodObject({ - // unknownKeys: merging._def.unknownKeys, - // catchall: merging._def.catchall, - // shape: () => - // objectUtil.mergeShapes(this._def.shape(), merging._def.shape()), - // typeName: ZodFirstPartyTypeKind.ZodObject, - // }) as any; - // return merged; - // } - catchall(index) { - return new _ZodObject({ - ...this._def, - catchall: index - }); - } - pick(mask) { - const shape = {}; - for (const key of util2.objectKeys(mask)) { - if (mask[key] && this.shape[key]) { - shape[key] = this.shape[key]; - } - } - return new _ZodObject({ - ...this._def, - shape: () => shape - }); - } - omit(mask) { - const shape = {}; - for (const key of util2.objectKeys(this.shape)) { - if (!mask[key]) { - shape[key] = this.shape[key]; - } - } - return new _ZodObject({ - ...this._def, - shape: () => shape - }); - } - /** - * @deprecated - */ - deepPartial() { - return deepPartialify2(this); - } - partial(mask) { - const newShape = {}; - for (const key of util2.objectKeys(this.shape)) { - const fieldSchema = this.shape[key]; - if (mask && !mask[key]) { - newShape[key] = fieldSchema; - } else { - newShape[key] = fieldSchema.optional(); - } - } - return new _ZodObject({ - ...this._def, - shape: () => newShape - }); - } - required(mask) { - const newShape = {}; - for (const key of util2.objectKeys(this.shape)) { - if (mask && !mask[key]) { - newShape[key] = this.shape[key]; - } else { - const fieldSchema = this.shape[key]; - let newField = fieldSchema; - while (newField instanceof ZodOptional2) { - newField = newField._def.innerType; - } - newShape[key] = newField; - } - } - return new _ZodObject({ - ...this._def, - shape: () => newShape - }); - } - keyof() { - return createZodEnum2(util2.objectKeys(this.shape)); - } - }; - ZodObject2.create = (shape, params) => { - return new ZodObject2({ - shape: () => shape, - unknownKeys: "strip", - catchall: ZodNever2.create(), - typeName: ZodFirstPartyTypeKind2.ZodObject, - ...processCreateParams3(params) - }); - }; - ZodObject2.strictCreate = (shape, params) => { - return new ZodObject2({ - shape: () => shape, - unknownKeys: "strict", - catchall: ZodNever2.create(), - typeName: ZodFirstPartyTypeKind2.ZodObject, - ...processCreateParams3(params) - }); - }; - ZodObject2.lazycreate = (shape, params) => { - return new ZodObject2({ - shape, - unknownKeys: "strip", - catchall: ZodNever2.create(), - typeName: ZodFirstPartyTypeKind2.ZodObject, - ...processCreateParams3(params) - }); - }; - ZodUnion2 = class extends ZodType2 { - _parse(input) { - const { ctx } = this._processInputParams(input); - const options = this._def.options; - function handleResults(results) { - for (const result of results) { - if (result.result.status === "valid") { - return result.result; - } - } - for (const result of results) { - if (result.result.status === "dirty") { - ctx.common.issues.push(...result.ctx.common.issues); - return result.result; - } - } - const unionErrors = results.map((result) => new ZodError2(result.ctx.common.issues)); - addIssueToContext2(ctx, { - code: ZodIssueCode2.invalid_union, - unionErrors - }); - return INVALID2; - } - if (ctx.common.async) { - return Promise.all(options.map(async (option) => { - const childCtx = { - ...ctx, - common: { - ...ctx.common, - issues: [] - }, - parent: null - }; - return { - result: await option._parseAsync({ - data: ctx.data, - path: ctx.path, - parent: childCtx - }), - ctx: childCtx - }; - })).then(handleResults); - } else { - let dirty = void 0; - const issues = []; - for (const option of options) { - const childCtx = { - ...ctx, - common: { - ...ctx.common, - issues: [] - }, - parent: null - }; - const result = option._parseSync({ - data: ctx.data, - path: ctx.path, - parent: childCtx - }); - if (result.status === "valid") { - return result; - } else if (result.status === "dirty" && !dirty) { - dirty = { result, ctx: childCtx }; - } - if (childCtx.common.issues.length) { - issues.push(childCtx.common.issues); - } - } - if (dirty) { - ctx.common.issues.push(...dirty.ctx.common.issues); - return dirty.result; - } - const unionErrors = issues.map((issues2) => new ZodError2(issues2)); - addIssueToContext2(ctx, { - code: ZodIssueCode2.invalid_union, - unionErrors - }); - return INVALID2; - } - } - get options() { - return this._def.options; - } - }; - ZodUnion2.create = (types, params) => { - return new ZodUnion2({ - options: types, - typeName: ZodFirstPartyTypeKind2.ZodUnion, - ...processCreateParams3(params) - }); - }; - getDiscriminator2 = (type2) => { - if (type2 instanceof ZodLazy2) { - return getDiscriminator2(type2.schema); - } else if (type2 instanceof ZodEffects2) { - return getDiscriminator2(type2.innerType()); - } else if (type2 instanceof ZodLiteral2) { - return [type2.value]; - } else if (type2 instanceof ZodEnum2) { - return type2.options; - } else if (type2 instanceof ZodNativeEnum2) { - return util2.objectValues(type2.enum); - } else if (type2 instanceof ZodDefault2) { - return getDiscriminator2(type2._def.innerType); - } else if (type2 instanceof ZodUndefined2) { - return [void 0]; - } else if (type2 instanceof ZodNull2) { - return [null]; - } else if (type2 instanceof ZodOptional2) { - return [void 0, ...getDiscriminator2(type2.unwrap())]; - } else if (type2 instanceof ZodNullable2) { - return [null, ...getDiscriminator2(type2.unwrap())]; - } else if (type2 instanceof ZodBranded2) { - return getDiscriminator2(type2.unwrap()); - } else if (type2 instanceof ZodReadonly2) { - return getDiscriminator2(type2.unwrap()); - } else if (type2 instanceof ZodCatch2) { - return getDiscriminator2(type2._def.innerType); - } else { - return []; - } - }; - ZodDiscriminatedUnion2 = class _ZodDiscriminatedUnion extends ZodType2 { - _parse(input) { - const { ctx } = this._processInputParams(input); - if (ctx.parsedType !== ZodParsedType2.object) { - addIssueToContext2(ctx, { - code: ZodIssueCode2.invalid_type, - expected: ZodParsedType2.object, - received: ctx.parsedType - }); - return INVALID2; - } - const discriminator = this.discriminator; - const discriminatorValue = ctx.data[discriminator]; - const option = this.optionsMap.get(discriminatorValue); - if (!option) { - addIssueToContext2(ctx, { - code: ZodIssueCode2.invalid_union_discriminator, - options: Array.from(this.optionsMap.keys()), - path: [discriminator] - }); - return INVALID2; - } - if (ctx.common.async) { - return option._parseAsync({ - data: ctx.data, - path: ctx.path, - parent: ctx - }); - } else { - return option._parseSync({ - data: ctx.data, - path: ctx.path, - parent: ctx - }); - } - } - get discriminator() { - return this._def.discriminator; - } - get options() { - return this._def.options; - } - get optionsMap() { - return this._def.optionsMap; - } - /** - * The constructor of the discriminated union schema. Its behaviour is very similar to that of the normal z.union() constructor. - * However, it only allows a union of objects, all of which need to share a discriminator property. This property must - * have a different value for each object in the union. - * @param discriminator the name of the discriminator property - * @param types an array of object schemas - * @param params - */ - static create(discriminator, options, params) { - const optionsMap = /* @__PURE__ */ new Map(); - for (const type2 of options) { - const discriminatorValues = getDiscriminator2(type2.shape[discriminator]); - if (!discriminatorValues.length) { - throw new Error(`A discriminator value for key \`${discriminator}\` could not be extracted from all schema options`); - } - for (const value2 of discriminatorValues) { - if (optionsMap.has(value2)) { - throw new Error(`Discriminator property ${String(discriminator)} has duplicate value ${String(value2)}`); - } - optionsMap.set(value2, type2); - } - } - return new _ZodDiscriminatedUnion({ - typeName: ZodFirstPartyTypeKind2.ZodDiscriminatedUnion, - discriminator, - options, - optionsMap, - ...processCreateParams3(params) - }); - } - }; - ZodIntersection2 = class extends ZodType2 { - _parse(input) { - const { status, ctx } = this._processInputParams(input); - const handleParsed = (parsedLeft, parsedRight) => { - if (isAborted2(parsedLeft) || isAborted2(parsedRight)) { - return INVALID2; - } - const merged = mergeValues2(parsedLeft.value, parsedRight.value); - if (!merged.valid) { - addIssueToContext2(ctx, { - code: ZodIssueCode2.invalid_intersection_types - }); - return INVALID2; - } - if (isDirty2(parsedLeft) || isDirty2(parsedRight)) { - status.dirty(); - } - return { status: status.value, value: merged.data }; - }; - if (ctx.common.async) { - return Promise.all([ - this._def.left._parseAsync({ - data: ctx.data, - path: ctx.path, - parent: ctx - }), - this._def.right._parseAsync({ - data: ctx.data, - path: ctx.path, - parent: ctx - }) - ]).then(([left, right]) => handleParsed(left, right)); - } else { - return handleParsed(this._def.left._parseSync({ - data: ctx.data, - path: ctx.path, - parent: ctx - }), this._def.right._parseSync({ - data: ctx.data, - path: ctx.path, - parent: ctx - })); - } - } - }; - ZodIntersection2.create = (left, right, params) => { - return new ZodIntersection2({ - left, - right, - typeName: ZodFirstPartyTypeKind2.ZodIntersection, - ...processCreateParams3(params) - }); - }; - ZodTuple2 = class _ZodTuple extends ZodType2 { - _parse(input) { - const { status, ctx } = this._processInputParams(input); - if (ctx.parsedType !== ZodParsedType2.array) { - addIssueToContext2(ctx, { - code: ZodIssueCode2.invalid_type, - expected: ZodParsedType2.array, - received: ctx.parsedType - }); - return INVALID2; - } - if (ctx.data.length < this._def.items.length) { - addIssueToContext2(ctx, { - code: ZodIssueCode2.too_small, - minimum: this._def.items.length, - inclusive: true, - exact: false, - type: "array" - }); - return INVALID2; - } - const rest = this._def.rest; - if (!rest && ctx.data.length > this._def.items.length) { - addIssueToContext2(ctx, { - code: ZodIssueCode2.too_big, - maximum: this._def.items.length, - inclusive: true, - exact: false, - type: "array" - }); - status.dirty(); - } - const items = [...ctx.data].map((item, itemIndex) => { - const schema2 = this._def.items[itemIndex] || this._def.rest; - if (!schema2) - return null; - return schema2._parse(new ParseInputLazyPath2(ctx, item, ctx.path, itemIndex)); - }).filter((x) => !!x); - if (ctx.common.async) { - return Promise.all(items).then((results) => { - return ParseStatus2.mergeArray(status, results); - }); - } else { - return ParseStatus2.mergeArray(status, items); - } - } - get items() { - return this._def.items; - } - rest(rest) { - return new _ZodTuple({ - ...this._def, - rest - }); - } - }; - ZodTuple2.create = (schemas, params) => { - if (!Array.isArray(schemas)) { - throw new Error("You must pass an array of schemas to z.tuple([ ... ])"); - } - return new ZodTuple2({ - items: schemas, - typeName: ZodFirstPartyTypeKind2.ZodTuple, - rest: null, - ...processCreateParams3(params) - }); - }; - ZodRecord2 = class _ZodRecord extends ZodType2 { - get keySchema() { - return this._def.keyType; - } - get valueSchema() { - return this._def.valueType; - } - _parse(input) { - const { status, ctx } = this._processInputParams(input); - if (ctx.parsedType !== ZodParsedType2.object) { - addIssueToContext2(ctx, { - code: ZodIssueCode2.invalid_type, - expected: ZodParsedType2.object, - received: ctx.parsedType - }); - return INVALID2; - } - const pairs = []; - const keyType = this._def.keyType; - const valueType = this._def.valueType; - for (const key in ctx.data) { - pairs.push({ - key: keyType._parse(new ParseInputLazyPath2(ctx, key, ctx.path, key)), - value: valueType._parse(new ParseInputLazyPath2(ctx, ctx.data[key], ctx.path, key)), - alwaysSet: key in ctx.data - }); - } - if (ctx.common.async) { - return ParseStatus2.mergeObjectAsync(status, pairs); - } else { - return ParseStatus2.mergeObjectSync(status, pairs); - } - } - get element() { - return this._def.valueType; - } - static create(first, second, third) { - if (second instanceof ZodType2) { - return new _ZodRecord({ - keyType: first, - valueType: second, - typeName: ZodFirstPartyTypeKind2.ZodRecord, - ...processCreateParams3(third) - }); - } - return new _ZodRecord({ - keyType: ZodString2.create(), - valueType: first, - typeName: ZodFirstPartyTypeKind2.ZodRecord, - ...processCreateParams3(second) - }); - } - }; - ZodMap2 = class extends ZodType2 { - get keySchema() { - return this._def.keyType; - } - get valueSchema() { - return this._def.valueType; - } - _parse(input) { - const { status, ctx } = this._processInputParams(input); - if (ctx.parsedType !== ZodParsedType2.map) { - addIssueToContext2(ctx, { - code: ZodIssueCode2.invalid_type, - expected: ZodParsedType2.map, - received: ctx.parsedType - }); - return INVALID2; - } - const keyType = this._def.keyType; - const valueType = this._def.valueType; - const pairs = [...ctx.data.entries()].map(([key, value2], index) => { - return { - key: keyType._parse(new ParseInputLazyPath2(ctx, key, ctx.path, [index, "key"])), - value: valueType._parse(new ParseInputLazyPath2(ctx, value2, ctx.path, [index, "value"])) - }; - }); - if (ctx.common.async) { - const finalMap = /* @__PURE__ */ new Map(); - return Promise.resolve().then(async () => { - for (const pair of pairs) { - const key = await pair.key; - const value2 = await pair.value; - if (key.status === "aborted" || value2.status === "aborted") { - return INVALID2; - } - if (key.status === "dirty" || value2.status === "dirty") { - status.dirty(); - } - finalMap.set(key.value, value2.value); - } - return { status: status.value, value: finalMap }; - }); - } else { - const finalMap = /* @__PURE__ */ new Map(); - for (const pair of pairs) { - const key = pair.key; - const value2 = pair.value; - if (key.status === "aborted" || value2.status === "aborted") { - return INVALID2; - } - if (key.status === "dirty" || value2.status === "dirty") { - status.dirty(); - } - finalMap.set(key.value, value2.value); - } - return { status: status.value, value: finalMap }; - } - } - }; - ZodMap2.create = (keyType, valueType, params) => { - return new ZodMap2({ - valueType, - keyType, - typeName: ZodFirstPartyTypeKind2.ZodMap, - ...processCreateParams3(params) - }); - }; - ZodSet2 = class _ZodSet extends ZodType2 { - _parse(input) { - const { status, ctx } = this._processInputParams(input); - if (ctx.parsedType !== ZodParsedType2.set) { - addIssueToContext2(ctx, { - code: ZodIssueCode2.invalid_type, - expected: ZodParsedType2.set, - received: ctx.parsedType - }); - return INVALID2; - } - const def = this._def; - if (def.minSize !== null) { - if (ctx.data.size < def.minSize.value) { - addIssueToContext2(ctx, { - code: ZodIssueCode2.too_small, - minimum: def.minSize.value, - type: "set", - inclusive: true, - exact: false, - message: def.minSize.message - }); - status.dirty(); - } - } - if (def.maxSize !== null) { - if (ctx.data.size > def.maxSize.value) { - addIssueToContext2(ctx, { - code: ZodIssueCode2.too_big, - maximum: def.maxSize.value, - type: "set", - inclusive: true, - exact: false, - message: def.maxSize.message - }); - status.dirty(); - } - } - const valueType = this._def.valueType; - function finalizeSet(elements2) { - const parsedSet = /* @__PURE__ */ new Set(); - for (const element of elements2) { - if (element.status === "aborted") - return INVALID2; - if (element.status === "dirty") - status.dirty(); - parsedSet.add(element.value); - } - return { status: status.value, value: parsedSet }; - } - const elements = [...ctx.data.values()].map((item, i) => valueType._parse(new ParseInputLazyPath2(ctx, item, ctx.path, i))); - if (ctx.common.async) { - return Promise.all(elements).then((elements2) => finalizeSet(elements2)); - } else { - return finalizeSet(elements); - } - } - min(minSize, message) { - return new _ZodSet({ - ...this._def, - minSize: { value: minSize, message: errorUtil2.toString(message) } - }); - } - max(maxSize, message) { - return new _ZodSet({ - ...this._def, - maxSize: { value: maxSize, message: errorUtil2.toString(message) } - }); - } - size(size, message) { - return this.min(size, message).max(size, message); - } - nonempty(message) { - return this.min(1, message); - } - }; - ZodSet2.create = (valueType, params) => { - return new ZodSet2({ - valueType, - minSize: null, - maxSize: null, - typeName: ZodFirstPartyTypeKind2.ZodSet, - ...processCreateParams3(params) - }); - }; - ZodFunction2 = class _ZodFunction extends ZodType2 { - constructor() { - super(...arguments); - this.validate = this.implement; - } - _parse(input) { - const { ctx } = this._processInputParams(input); - if (ctx.parsedType !== ZodParsedType2.function) { - addIssueToContext2(ctx, { - code: ZodIssueCode2.invalid_type, - expected: ZodParsedType2.function, - received: ctx.parsedType - }); - return INVALID2; - } - function makeArgsIssue(args3, error41) { - return makeIssue2({ - data: args3, - path: ctx.path, - errorMaps: [ctx.common.contextualErrorMap, ctx.schemaErrorMap, getErrorMap2(), en_default2].filter((x) => !!x), - issueData: { - code: ZodIssueCode2.invalid_arguments, - argumentsError: error41 - } - }); - } - function makeReturnsIssue(returns, error41) { - return makeIssue2({ - data: returns, - path: ctx.path, - errorMaps: [ctx.common.contextualErrorMap, ctx.schemaErrorMap, getErrorMap2(), en_default2].filter((x) => !!x), - issueData: { - code: ZodIssueCode2.invalid_return_type, - returnTypeError: error41 - } - }); - } - const params = { errorMap: ctx.common.contextualErrorMap }; - const fn2 = ctx.data; - if (this._def.returns instanceof ZodPromise2) { - const me = this; - return OK2(async function(...args3) { - const error41 = new ZodError2([]); - const parsedArgs = await me._def.args.parseAsync(args3, params).catch((e) => { - error41.addIssue(makeArgsIssue(args3, e)); - throw error41; - }); - const result = await Reflect.apply(fn2, this, parsedArgs); - const parsedReturns = await me._def.returns._def.type.parseAsync(result, params).catch((e) => { - error41.addIssue(makeReturnsIssue(result, e)); - throw error41; - }); - return parsedReturns; - }); - } else { - const me = this; - return OK2(function(...args3) { - const parsedArgs = me._def.args.safeParse(args3, params); - if (!parsedArgs.success) { - throw new ZodError2([makeArgsIssue(args3, parsedArgs.error)]); - } - const result = Reflect.apply(fn2, this, parsedArgs.data); - const parsedReturns = me._def.returns.safeParse(result, params); - if (!parsedReturns.success) { - throw new ZodError2([makeReturnsIssue(result, parsedReturns.error)]); - } - return parsedReturns.data; - }); - } - } - parameters() { - return this._def.args; - } - returnType() { - return this._def.returns; - } - args(...items) { - return new _ZodFunction({ - ...this._def, - args: ZodTuple2.create(items).rest(ZodUnknown2.create()) - }); - } - returns(returnType) { - return new _ZodFunction({ - ...this._def, - returns: returnType - }); - } - implement(func) { - const validatedFunc = this.parse(func); - return validatedFunc; - } - strictImplement(func) { - const validatedFunc = this.parse(func); - return validatedFunc; - } - static create(args3, returns, params) { - return new _ZodFunction({ - args: args3 ? args3 : ZodTuple2.create([]).rest(ZodUnknown2.create()), - returns: returns || ZodUnknown2.create(), - typeName: ZodFirstPartyTypeKind2.ZodFunction, - ...processCreateParams3(params) - }); - } - }; - ZodLazy2 = class extends ZodType2 { - get schema() { - return this._def.getter(); - } - _parse(input) { - const { ctx } = this._processInputParams(input); - const lazySchema = this._def.getter(); - return lazySchema._parse({ data: ctx.data, path: ctx.path, parent: ctx }); - } - }; - ZodLazy2.create = (getter, params) => { - return new ZodLazy2({ - getter, - typeName: ZodFirstPartyTypeKind2.ZodLazy, - ...processCreateParams3(params) - }); - }; - ZodLiteral2 = class extends ZodType2 { - _parse(input) { - if (input.data !== this._def.value) { - const ctx = this._getOrReturnCtx(input); - addIssueToContext2(ctx, { - received: ctx.data, - code: ZodIssueCode2.invalid_literal, - expected: this._def.value - }); - return INVALID2; - } - return { status: "valid", value: input.data }; - } - get value() { - return this._def.value; - } - }; - ZodLiteral2.create = (value2, params) => { - return new ZodLiteral2({ - value: value2, - typeName: ZodFirstPartyTypeKind2.ZodLiteral, - ...processCreateParams3(params) - }); - }; - ZodEnum2 = class _ZodEnum extends ZodType2 { - _parse(input) { - if (typeof input.data !== "string") { - const ctx = this._getOrReturnCtx(input); - const expectedValues = this._def.values; - addIssueToContext2(ctx, { - expected: util2.joinValues(expectedValues), - received: ctx.parsedType, - code: ZodIssueCode2.invalid_type - }); - return INVALID2; - } - if (!this._cache) { - this._cache = new Set(this._def.values); - } - if (!this._cache.has(input.data)) { - const ctx = this._getOrReturnCtx(input); - const expectedValues = this._def.values; - addIssueToContext2(ctx, { - received: ctx.data, - code: ZodIssueCode2.invalid_enum_value, - options: expectedValues - }); - return INVALID2; - } - return OK2(input.data); - } - get options() { - return this._def.values; - } - get enum() { - const enumValues2 = {}; - for (const val of this._def.values) { - enumValues2[val] = val; - } - return enumValues2; - } - get Values() { - const enumValues2 = {}; - for (const val of this._def.values) { - enumValues2[val] = val; - } - return enumValues2; - } - get Enum() { - const enumValues2 = {}; - for (const val of this._def.values) { - enumValues2[val] = val; - } - return enumValues2; - } - extract(values, newDef = this._def) { - return _ZodEnum.create(values, { - ...this._def, - ...newDef - }); - } - exclude(values, newDef = this._def) { - return _ZodEnum.create(this.options.filter((opt) => !values.includes(opt)), { - ...this._def, - ...newDef - }); - } - }; - ZodEnum2.create = createZodEnum2; - ZodNativeEnum2 = class extends ZodType2 { - _parse(input) { - const nativeEnumValues = util2.getValidEnumValues(this._def.values); - const ctx = this._getOrReturnCtx(input); - if (ctx.parsedType !== ZodParsedType2.string && ctx.parsedType !== ZodParsedType2.number) { - const expectedValues = util2.objectValues(nativeEnumValues); - addIssueToContext2(ctx, { - expected: util2.joinValues(expectedValues), - received: ctx.parsedType, - code: ZodIssueCode2.invalid_type - }); - return INVALID2; - } - if (!this._cache) { - this._cache = new Set(util2.getValidEnumValues(this._def.values)); - } - if (!this._cache.has(input.data)) { - const expectedValues = util2.objectValues(nativeEnumValues); - addIssueToContext2(ctx, { - received: ctx.data, - code: ZodIssueCode2.invalid_enum_value, - options: expectedValues - }); - return INVALID2; - } - return OK2(input.data); - } - get enum() { - return this._def.values; - } - }; - ZodNativeEnum2.create = (values, params) => { - return new ZodNativeEnum2({ - values, - typeName: ZodFirstPartyTypeKind2.ZodNativeEnum, - ...processCreateParams3(params) - }); - }; - ZodPromise2 = class extends ZodType2 { - unwrap() { - return this._def.type; - } - _parse(input) { - const { ctx } = this._processInputParams(input); - if (ctx.parsedType !== ZodParsedType2.promise && ctx.common.async === false) { - addIssueToContext2(ctx, { - code: ZodIssueCode2.invalid_type, - expected: ZodParsedType2.promise, - received: ctx.parsedType - }); - return INVALID2; - } - const promisified = ctx.parsedType === ZodParsedType2.promise ? ctx.data : Promise.resolve(ctx.data); - return OK2(promisified.then((data) => { - return this._def.type.parseAsync(data, { - path: ctx.path, - errorMap: ctx.common.contextualErrorMap - }); - })); - } - }; - ZodPromise2.create = (schema2, params) => { - return new ZodPromise2({ - type: schema2, - typeName: ZodFirstPartyTypeKind2.ZodPromise, - ...processCreateParams3(params) - }); - }; - ZodEffects2 = class extends ZodType2 { - innerType() { - return this._def.schema; - } - sourceType() { - return this._def.schema._def.typeName === ZodFirstPartyTypeKind2.ZodEffects ? this._def.schema.sourceType() : this._def.schema; - } - _parse(input) { - const { status, ctx } = this._processInputParams(input); - const effect = this._def.effect || null; - const checkCtx = { - addIssue: (arg) => { - addIssueToContext2(ctx, arg); - if (arg.fatal) { - status.abort(); - } else { - status.dirty(); - } - }, - get path() { - return ctx.path; - } - }; - checkCtx.addIssue = checkCtx.addIssue.bind(checkCtx); - if (effect.type === "preprocess") { - const processed = effect.transform(ctx.data, checkCtx); - if (ctx.common.async) { - return Promise.resolve(processed).then(async (processed2) => { - if (status.value === "aborted") - return INVALID2; - const result = await this._def.schema._parseAsync({ - data: processed2, - path: ctx.path, - parent: ctx - }); - if (result.status === "aborted") - return INVALID2; - if (result.status === "dirty") - return DIRTY2(result.value); - if (status.value === "dirty") - return DIRTY2(result.value); - return result; - }); - } else { - if (status.value === "aborted") - return INVALID2; - const result = this._def.schema._parseSync({ - data: processed, - path: ctx.path, - parent: ctx - }); - if (result.status === "aborted") - return INVALID2; - if (result.status === "dirty") - return DIRTY2(result.value); - if (status.value === "dirty") - return DIRTY2(result.value); - return result; - } - } - if (effect.type === "refinement") { - const executeRefinement = (acc) => { - const result = effect.refinement(acc, checkCtx); - if (ctx.common.async) { - return Promise.resolve(result); - } - if (result instanceof Promise) { - throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead."); - } - return acc; - }; - if (ctx.common.async === false) { - const inner = this._def.schema._parseSync({ - data: ctx.data, - path: ctx.path, - parent: ctx - }); - if (inner.status === "aborted") - return INVALID2; - if (inner.status === "dirty") - status.dirty(); - executeRefinement(inner.value); - return { status: status.value, value: inner.value }; - } else { - return this._def.schema._parseAsync({ data: ctx.data, path: ctx.path, parent: ctx }).then((inner) => { - if (inner.status === "aborted") - return INVALID2; - if (inner.status === "dirty") - status.dirty(); - return executeRefinement(inner.value).then(() => { - return { status: status.value, value: inner.value }; - }); - }); - } - } - if (effect.type === "transform") { - if (ctx.common.async === false) { - const base = this._def.schema._parseSync({ - data: ctx.data, - path: ctx.path, - parent: ctx - }); - if (!isValid2(base)) - return INVALID2; - const result = effect.transform(base.value, checkCtx); - if (result instanceof Promise) { - throw new Error(`Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.`); - } - return { status: status.value, value: result }; - } else { - return this._def.schema._parseAsync({ data: ctx.data, path: ctx.path, parent: ctx }).then((base) => { - if (!isValid2(base)) - return INVALID2; - return Promise.resolve(effect.transform(base.value, checkCtx)).then((result) => ({ - status: status.value, - value: result - })); - }); - } - } - util2.assertNever(effect); - } - }; - ZodEffects2.create = (schema2, effect, params) => { - return new ZodEffects2({ - schema: schema2, - typeName: ZodFirstPartyTypeKind2.ZodEffects, - effect, - ...processCreateParams3(params) - }); - }; - ZodEffects2.createWithPreprocess = (preprocess, schema2, params) => { - return new ZodEffects2({ - schema: schema2, - effect: { type: "preprocess", transform: preprocess }, - typeName: ZodFirstPartyTypeKind2.ZodEffects, - ...processCreateParams3(params) - }); - }; - ZodOptional2 = class extends ZodType2 { - _parse(input) { - const parsedType4 = this._getType(input); - if (parsedType4 === ZodParsedType2.undefined) { - return OK2(void 0); - } - return this._def.innerType._parse(input); - } - unwrap() { - return this._def.innerType; - } - }; - ZodOptional2.create = (type2, params) => { - return new ZodOptional2({ - innerType: type2, - typeName: ZodFirstPartyTypeKind2.ZodOptional, - ...processCreateParams3(params) - }); - }; - ZodNullable2 = class extends ZodType2 { - _parse(input) { - const parsedType4 = this._getType(input); - if (parsedType4 === ZodParsedType2.null) { - return OK2(null); - } - return this._def.innerType._parse(input); - } - unwrap() { - return this._def.innerType; - } - }; - ZodNullable2.create = (type2, params) => { - return new ZodNullable2({ - innerType: type2, - typeName: ZodFirstPartyTypeKind2.ZodNullable, - ...processCreateParams3(params) - }); - }; - ZodDefault2 = class extends ZodType2 { - _parse(input) { - const { ctx } = this._processInputParams(input); - let data = ctx.data; - if (ctx.parsedType === ZodParsedType2.undefined) { - data = this._def.defaultValue(); - } - return this._def.innerType._parse({ - data, - path: ctx.path, - parent: ctx - }); - } - removeDefault() { - return this._def.innerType; - } - }; - ZodDefault2.create = (type2, params) => { - return new ZodDefault2({ - innerType: type2, - typeName: ZodFirstPartyTypeKind2.ZodDefault, - defaultValue: typeof params.default === "function" ? params.default : () => params.default, - ...processCreateParams3(params) - }); - }; - ZodCatch2 = class extends ZodType2 { - _parse(input) { - const { ctx } = this._processInputParams(input); - const newCtx = { - ...ctx, - common: { - ...ctx.common, - issues: [] - } - }; - const result = this._def.innerType._parse({ - data: newCtx.data, - path: newCtx.path, - parent: { - ...newCtx - } - }); - if (isAsync2(result)) { - return result.then((result2) => { - return { - status: "valid", - value: result2.status === "valid" ? result2.value : this._def.catchValue({ - get error() { - return new ZodError2(newCtx.common.issues); - }, - input: newCtx.data - }) - }; - }); - } else { - return { - status: "valid", - value: result.status === "valid" ? result.value : this._def.catchValue({ - get error() { - return new ZodError2(newCtx.common.issues); - }, - input: newCtx.data - }) - }; - } - } - removeCatch() { - return this._def.innerType; - } - }; - ZodCatch2.create = (type2, params) => { - return new ZodCatch2({ - innerType: type2, - typeName: ZodFirstPartyTypeKind2.ZodCatch, - catchValue: typeof params.catch === "function" ? params.catch : () => params.catch, - ...processCreateParams3(params) - }); - }; - ZodNaN2 = class extends ZodType2 { - _parse(input) { - const parsedType4 = this._getType(input); - if (parsedType4 !== ZodParsedType2.nan) { - const ctx = this._getOrReturnCtx(input); - addIssueToContext2(ctx, { - code: ZodIssueCode2.invalid_type, - expected: ZodParsedType2.nan, - received: ctx.parsedType - }); - return INVALID2; - } - return { status: "valid", value: input.data }; - } - }; - ZodNaN2.create = (params) => { - return new ZodNaN2({ - typeName: ZodFirstPartyTypeKind2.ZodNaN, - ...processCreateParams3(params) - }); - }; - BRAND2 = Symbol("zod_brand"); - ZodBranded2 = class extends ZodType2 { - _parse(input) { - const { ctx } = this._processInputParams(input); - const data = ctx.data; - return this._def.type._parse({ - data, - path: ctx.path, - parent: ctx - }); - } - unwrap() { - return this._def.type; - } - }; - ZodPipeline2 = class _ZodPipeline extends ZodType2 { - _parse(input) { - const { status, ctx } = this._processInputParams(input); - if (ctx.common.async) { - const handleAsync = async () => { - const inResult = await this._def.in._parseAsync({ - data: ctx.data, - path: ctx.path, - parent: ctx - }); - if (inResult.status === "aborted") - return INVALID2; - if (inResult.status === "dirty") { - status.dirty(); - return DIRTY2(inResult.value); - } else { - return this._def.out._parseAsync({ - data: inResult.value, - path: ctx.path, - parent: ctx - }); - } - }; - return handleAsync(); - } else { - const inResult = this._def.in._parseSync({ - data: ctx.data, - path: ctx.path, - parent: ctx - }); - if (inResult.status === "aborted") - return INVALID2; - if (inResult.status === "dirty") { - status.dirty(); - return { - status: "dirty", - value: inResult.value - }; - } else { - return this._def.out._parseSync({ - data: inResult.value, - path: ctx.path, - parent: ctx - }); - } - } - } - static create(a, b) { - return new _ZodPipeline({ - in: a, - out: b, - typeName: ZodFirstPartyTypeKind2.ZodPipeline - }); - } - }; - ZodReadonly2 = class extends ZodType2 { - _parse(input) { - const result = this._def.innerType._parse(input); - const freeze = (data) => { - if (isValid2(data)) { - data.value = Object.freeze(data.value); - } - return data; - }; - return isAsync2(result) ? result.then((data) => freeze(data)) : freeze(result); - } - unwrap() { - return this._def.innerType; - } - }; - ZodReadonly2.create = (type2, params) => { - return new ZodReadonly2({ - innerType: type2, - typeName: ZodFirstPartyTypeKind2.ZodReadonly, - ...processCreateParams3(params) - }); - }; - late2 = { - object: ZodObject2.lazycreate - }; - (function(ZodFirstPartyTypeKind4) { - ZodFirstPartyTypeKind4["ZodString"] = "ZodString"; - ZodFirstPartyTypeKind4["ZodNumber"] = "ZodNumber"; - ZodFirstPartyTypeKind4["ZodNaN"] = "ZodNaN"; - ZodFirstPartyTypeKind4["ZodBigInt"] = "ZodBigInt"; - ZodFirstPartyTypeKind4["ZodBoolean"] = "ZodBoolean"; - ZodFirstPartyTypeKind4["ZodDate"] = "ZodDate"; - ZodFirstPartyTypeKind4["ZodSymbol"] = "ZodSymbol"; - ZodFirstPartyTypeKind4["ZodUndefined"] = "ZodUndefined"; - ZodFirstPartyTypeKind4["ZodNull"] = "ZodNull"; - ZodFirstPartyTypeKind4["ZodAny"] = "ZodAny"; - ZodFirstPartyTypeKind4["ZodUnknown"] = "ZodUnknown"; - ZodFirstPartyTypeKind4["ZodNever"] = "ZodNever"; - ZodFirstPartyTypeKind4["ZodVoid"] = "ZodVoid"; - ZodFirstPartyTypeKind4["ZodArray"] = "ZodArray"; - ZodFirstPartyTypeKind4["ZodObject"] = "ZodObject"; - ZodFirstPartyTypeKind4["ZodUnion"] = "ZodUnion"; - ZodFirstPartyTypeKind4["ZodDiscriminatedUnion"] = "ZodDiscriminatedUnion"; - ZodFirstPartyTypeKind4["ZodIntersection"] = "ZodIntersection"; - ZodFirstPartyTypeKind4["ZodTuple"] = "ZodTuple"; - ZodFirstPartyTypeKind4["ZodRecord"] = "ZodRecord"; - ZodFirstPartyTypeKind4["ZodMap"] = "ZodMap"; - ZodFirstPartyTypeKind4["ZodSet"] = "ZodSet"; - ZodFirstPartyTypeKind4["ZodFunction"] = "ZodFunction"; - ZodFirstPartyTypeKind4["ZodLazy"] = "ZodLazy"; - ZodFirstPartyTypeKind4["ZodLiteral"] = "ZodLiteral"; - ZodFirstPartyTypeKind4["ZodEnum"] = "ZodEnum"; - ZodFirstPartyTypeKind4["ZodEffects"] = "ZodEffects"; - ZodFirstPartyTypeKind4["ZodNativeEnum"] = "ZodNativeEnum"; - ZodFirstPartyTypeKind4["ZodOptional"] = "ZodOptional"; - ZodFirstPartyTypeKind4["ZodNullable"] = "ZodNullable"; - ZodFirstPartyTypeKind4["ZodDefault"] = "ZodDefault"; - ZodFirstPartyTypeKind4["ZodCatch"] = "ZodCatch"; - ZodFirstPartyTypeKind4["ZodPromise"] = "ZodPromise"; - ZodFirstPartyTypeKind4["ZodBranded"] = "ZodBranded"; - ZodFirstPartyTypeKind4["ZodPipeline"] = "ZodPipeline"; - ZodFirstPartyTypeKind4["ZodReadonly"] = "ZodReadonly"; - })(ZodFirstPartyTypeKind2 || (ZodFirstPartyTypeKind2 = {})); - instanceOfType2 = (cls, params = { - message: `Input not instance of ${cls.name}` - }) => custom2((data) => data instanceof cls, params); - stringType2 = ZodString2.create; - numberType2 = ZodNumber2.create; - nanType2 = ZodNaN2.create; - bigIntType2 = ZodBigInt2.create; - booleanType2 = ZodBoolean2.create; - dateType2 = ZodDate2.create; - symbolType2 = ZodSymbol2.create; - undefinedType2 = ZodUndefined2.create; - nullType2 = ZodNull2.create; - anyType2 = ZodAny2.create; - unknownType2 = ZodUnknown2.create; - neverType2 = ZodNever2.create; - voidType2 = ZodVoid2.create; - arrayType2 = ZodArray2.create; - objectType2 = ZodObject2.create; - strictObjectType2 = ZodObject2.strictCreate; - unionType2 = ZodUnion2.create; - discriminatedUnionType2 = ZodDiscriminatedUnion2.create; - intersectionType2 = ZodIntersection2.create; - tupleType2 = ZodTuple2.create; - recordType2 = ZodRecord2.create; - mapType2 = ZodMap2.create; - setType2 = ZodSet2.create; - functionType2 = ZodFunction2.create; - lazyType2 = ZodLazy2.create; - literalType2 = ZodLiteral2.create; - enumType2 = ZodEnum2.create; - nativeEnumType2 = ZodNativeEnum2.create; - promiseType2 = ZodPromise2.create; - effectsType2 = ZodEffects2.create; - optionalType2 = ZodOptional2.create; - nullableType2 = ZodNullable2.create; - preprocessType2 = ZodEffects2.createWithPreprocess; - pipelineType2 = ZodPipeline2.create; - ostring2 = () => stringType2().optional(); - onumber2 = () => numberType2().optional(); - oboolean2 = () => booleanType2().optional(); - coerce2 = { - string: ((arg) => ZodString2.create({ ...arg, coerce: true })), - number: ((arg) => ZodNumber2.create({ ...arg, coerce: true })), - boolean: ((arg) => ZodBoolean2.create({ - ...arg, - coerce: true - })), - bigint: ((arg) => ZodBigInt2.create({ ...arg, coerce: true })), - date: ((arg) => ZodDate2.create({ ...arg, coerce: true })) - }; - NEVER2 = INVALID2; - } -}); - -// ../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/external.js -var external_exports = {}; -__export(external_exports, { - BRAND: () => BRAND2, - DIRTY: () => DIRTY2, - EMPTY_PATH: () => EMPTY_PATH2, - INVALID: () => INVALID2, - NEVER: () => NEVER2, - OK: () => OK2, - ParseStatus: () => ParseStatus2, - Schema: () => ZodType2, - ZodAny: () => ZodAny2, - ZodArray: () => ZodArray2, - ZodBigInt: () => ZodBigInt2, - ZodBoolean: () => ZodBoolean2, - ZodBranded: () => ZodBranded2, - ZodCatch: () => ZodCatch2, - ZodDate: () => ZodDate2, - ZodDefault: () => ZodDefault2, - ZodDiscriminatedUnion: () => ZodDiscriminatedUnion2, - ZodEffects: () => ZodEffects2, - ZodEnum: () => ZodEnum2, - ZodError: () => ZodError2, - ZodFirstPartyTypeKind: () => ZodFirstPartyTypeKind2, - ZodFunction: () => ZodFunction2, - ZodIntersection: () => ZodIntersection2, - ZodIssueCode: () => ZodIssueCode2, - ZodLazy: () => ZodLazy2, - ZodLiteral: () => ZodLiteral2, - ZodMap: () => ZodMap2, - ZodNaN: () => ZodNaN2, - ZodNativeEnum: () => ZodNativeEnum2, - ZodNever: () => ZodNever2, - ZodNull: () => ZodNull2, - ZodNullable: () => ZodNullable2, - ZodNumber: () => ZodNumber2, - ZodObject: () => ZodObject2, - ZodOptional: () => ZodOptional2, - ZodParsedType: () => ZodParsedType2, - ZodPipeline: () => ZodPipeline2, - ZodPromise: () => ZodPromise2, - ZodReadonly: () => ZodReadonly2, - ZodRecord: () => ZodRecord2, - ZodSchema: () => ZodType2, - ZodSet: () => ZodSet2, - ZodString: () => ZodString2, - ZodSymbol: () => ZodSymbol2, - ZodTransformer: () => ZodEffects2, - ZodTuple: () => ZodTuple2, - ZodType: () => ZodType2, - ZodUndefined: () => ZodUndefined2, - ZodUnion: () => ZodUnion2, - ZodUnknown: () => ZodUnknown2, - ZodVoid: () => ZodVoid2, - addIssueToContext: () => addIssueToContext2, - any: () => anyType2, - array: () => arrayType2, - bigint: () => bigIntType2, - boolean: () => booleanType2, - coerce: () => coerce2, - custom: () => custom2, - date: () => dateType2, - datetimeRegex: () => datetimeRegex2, - defaultErrorMap: () => en_default2, - discriminatedUnion: () => discriminatedUnionType2, - effect: () => effectsType2, - enum: () => enumType2, - function: () => functionType2, - getErrorMap: () => getErrorMap2, - getParsedType: () => getParsedType2, - instanceof: () => instanceOfType2, - intersection: () => intersectionType2, - isAborted: () => isAborted2, - isAsync: () => isAsync2, - isDirty: () => isDirty2, - isValid: () => isValid2, - late: () => late2, - lazy: () => lazyType2, - literal: () => literalType2, - makeIssue: () => makeIssue2, - map: () => mapType2, - nan: () => nanType2, - nativeEnum: () => nativeEnumType2, - never: () => neverType2, - null: () => nullType2, - nullable: () => nullableType2, - number: () => numberType2, - object: () => objectType2, - objectUtil: () => objectUtil2, - oboolean: () => oboolean2, - onumber: () => onumber2, - optional: () => optionalType2, - ostring: () => ostring2, - pipeline: () => pipelineType2, - preprocess: () => preprocessType2, - promise: () => promiseType2, - quotelessJson: () => quotelessJson2, - record: () => recordType2, - set: () => setType2, - setErrorMap: () => setErrorMap2, - strictObject: () => strictObjectType2, - string: () => stringType2, - symbol: () => symbolType2, - transformer: () => effectsType2, - tuple: () => tupleType2, - undefined: () => undefinedType2, - union: () => unionType2, - unknown: () => unknownType2, - util: () => util2, - void: () => voidType2 -}); -var init_external = __esm({ - "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/external.js"() { - init_errors(); - init_parseUtil(); - init_typeAliases(); - init_util(); - init_types(); - init_ZodError(); - } -}); - -// ../node_modules/.pnpm/zod@3.25.76/node_modules/zod/index.js -var init_zod = __esm({ - "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/index.js"() { - init_external(); - init_external(); - } -}); - // ../node_modules/.pnpm/uri-js@4.4.1/node_modules/uri-js/dist/es5/uri.all.js var require_uri_all2 = __commonJS({ "../node_modules/.pnpm/uri-js@4.4.1/node_modules/uri-js/dist/es5/uri.all.js"(exports, module) { @@ -29844,26 +25738,26 @@ var require_uri_all2 = __commonJS({ } return result; } - function mapDomain(string3, fn2) { - var parts = string3.split("@"); + function mapDomain(string4, fn2) { + var parts = string4.split("@"); var result = ""; if (parts.length > 1) { result = parts[0] + "@"; - string3 = parts[1]; + string4 = parts[1]; } - string3 = string3.replace(regexSeparators, "."); - var labels = string3.split("."); + string4 = string4.replace(regexSeparators, "."); + var labels = string4.split("."); var encoded = map(labels, fn2).join("."); return result + encoded; } - function ucs2decode(string3) { + function ucs2decode(string4) { var output = []; var counter = 0; - var length = string3.length; + var length = string4.length; while (counter < length) { - var value2 = string3.charCodeAt(counter++); + var value2 = string4.charCodeAt(counter++); if (value2 >= 55296 && value2 <= 56319 && counter < length) { - var extra = string3.charCodeAt(counter++); + var extra = string4.charCodeAt(counter++); if ((extra & 64512) == 56320) { output.push(((value2 & 1023) << 10) + (extra & 1023) + 65536); } else { @@ -29908,7 +25802,7 @@ var require_uri_all2 = __commonJS({ } return floor(k + (baseMinusTMin + 1) * delta / (delta + skew)); }; - var decode = function decode2(input) { + var decode2 = function decode3(input) { var output = []; var inputLength = input.length; var i = 0; @@ -29961,7 +25855,7 @@ var require_uri_all2 = __commonJS({ } return String.fromCodePoint.apply(String, output); }; - var encode2 = function encode3(input) { + var encode3 = function encode4(input) { var output = []; input = ucs2decode(input); var inputLength = input.length; @@ -30081,13 +25975,13 @@ var require_uri_all2 = __commonJS({ return output.join(""); }; var toUnicode = function toUnicode2(input) { - return mapDomain(input, function(string3) { - return regexPunycode.test(string3) ? decode(string3.slice(4).toLowerCase()) : string3; + return mapDomain(input, function(string4) { + return regexPunycode.test(string4) ? decode2(string4.slice(4).toLowerCase()) : string4; }); }; var toASCII = function toASCII2(input) { - return mapDomain(input, function(string3) { - return regexNonASCII.test(string3) ? "xn--" + encode2(string3) : string3; + return mapDomain(input, function(string4) { + return regexNonASCII.test(string4) ? "xn--" + encode3(string4) : string4; }); }; var punycode = { @@ -30108,8 +26002,8 @@ var require_uri_all2 = __commonJS({ "decode": ucs2decode, "encode": ucs2encode }, - "decode": decode, - "encode": encode2, + "decode": decode2, + "encode": encode3, "toASCII": toASCII, "toUnicode": toUnicode }; @@ -30230,7 +26124,7 @@ var require_uri_all2 = __commonJS({ } var URI_PARSE = /^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i; var NO_MATCH_IS_UNDEFINED = "".match(/(){0}/)[1] === void 0; - function parse4(uriString) { + function parse6(uriString) { var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; var components = {}; var protocol = options.iri !== false ? IRI_PROTOCOL : URI_PROTOCOL; @@ -30399,8 +26293,8 @@ var require_uri_all2 = __commonJS({ var skipNormalization = arguments[3]; var target = {}; if (!skipNormalization) { - base2 = parse4(serialize(base2, options), options); - relative2 = parse4(serialize(relative2, options), options); + base2 = parse6(serialize(base2, options), options); + relative2 = parse6(serialize(relative2, options), options); } options = options || {}; if (!options.tolerant && relative2.scheme) { @@ -30451,24 +26345,24 @@ var require_uri_all2 = __commonJS({ } function resolve2(baseURI, relativeURI, options) { var schemelessOptions = assign({ scheme: "null" }, options); - return serialize(resolveComponents(parse4(baseURI, schemelessOptions), parse4(relativeURI, schemelessOptions), schemelessOptions, true), schemelessOptions); + return serialize(resolveComponents(parse6(baseURI, schemelessOptions), parse6(relativeURI, schemelessOptions), schemelessOptions, true), schemelessOptions); } function normalize2(uri, options) { if (typeof uri === "string") { - uri = serialize(parse4(uri, options), options); + uri = serialize(parse6(uri, options), options); } else if (typeOf(uri) === "object") { - uri = parse4(serialize(uri, options), options); + uri = parse6(serialize(uri, options), options); } return uri; } function equal(uriA, uriB, options) { if (typeof uriA === "string") { - uriA = serialize(parse4(uriA, options), options); + uriA = serialize(parse6(uriA, options), options); } else if (typeOf(uriA) === "object") { uriA = serialize(uriA, options); } if (typeof uriB === "string") { - uriB = serialize(parse4(uriB, options), options); + uriB = serialize(parse6(uriB, options), options); } else if (typeOf(uriB) === "object") { uriB = serialize(uriB, options); } @@ -30483,7 +26377,7 @@ var require_uri_all2 = __commonJS({ var handler2 = { scheme: "http", domainHost: true, - parse: function parse5(components, options) { + parse: function parse7(components, options) { if (!components.host) { components.error = components.error || "HTTP URIs must have a host."; } @@ -30512,7 +26406,7 @@ var require_uri_all2 = __commonJS({ var handler$2 = { scheme: "ws", domainHost: true, - parse: function parse5(components, options) { + parse: function parse7(components, options) { var wsComponents = components; wsComponents.secure = isSecure(wsComponents); wsComponents.resourceName = (wsComponents.path || "/") + (wsComponents.query ? "?" + wsComponents.query : ""); @@ -30685,7 +26579,7 @@ var require_uri_all2 = __commonJS({ var UUID = /^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/; var handler$6 = { scheme: "urn:uuid", - parse: function parse5(urnComponents, options) { + parse: function parse7(urnComponents, options) { var uuidComponents = urnComponents; uuidComponents.uuid = uuidComponents.nss; uuidComponents.nss = void 0; @@ -30710,7 +26604,7 @@ var require_uri_all2 = __commonJS({ exports2.SCHEMES = SCHEMES; exports2.pctEncChar = pctEncChar; exports2.pctDecChars = pctDecChars; - exports2.parse = parse4; + exports2.parse = parse6; exports2.removeDotSegments = removeDotSegments; exports2.serialize = serialize; exports2.resolveComponents = resolveComponents; @@ -32142,8 +28036,8 @@ var require_formats2 = __commonJS({ "relative-json-pointer": RELATIVE_JSON_POINTER }; formats.full = { - date: date2, - time: time2, + date: date4, + time: time4, "date-time": date_time, uri, "uri-reference": URIREF, @@ -32162,7 +28056,7 @@ var require_formats2 = __commonJS({ function isLeapYear(year) { return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0); } - function date2(str) { + function date4(str) { var matches = str.match(DATE); if (!matches) return false; var year = +matches[1]; @@ -32170,7 +28064,7 @@ var require_formats2 = __commonJS({ var day = +matches[3]; return month >= 1 && month <= 12 && day >= 1 && day <= (month == 2 && isLeapYear(year) ? 29 : DAYS[month]); } - function time2(str, full) { + function time4(str, full) { var matches = str.match(TIME); if (!matches) return false; var hour = matches[1]; @@ -32182,7 +28076,7 @@ var require_formats2 = __commonJS({ var DATE_TIME_SEPARATOR = /t|\s/i; function date_time(str) { var dateTime = str.split(DATE_TIME_SEPARATOR); - return dateTime.length == 2 && date2(dateTime[0]) && time2(dateTime[1], true); + return dateTime.length == 2 && date4(dateTime[0]) && time4(dateTime[1], true); } var NOT_URI_FRAGMENT = /\/|:/; function uri(str) { @@ -35731,8 +31625,8 @@ var require_ajv2 = __commonJS({ throw new Error("schema should be object or boolean"); var serialize = this._opts.serialize; var cacheKey = serialize ? serialize(schema2) : schema2; - var cached4 = this._cache.get(cacheKey); - if (cached4) return cached4; + var cached5 = this._cache.get(cacheKey); + if (cached5) return cached5; shouldAddSchema = shouldAddSchema || this._opts.addUsedSchema !== false; var id = resolve2.normalizeId(this._getId(schema2)); if (id && shouldAddSchema) checkUnique(this, id); @@ -37483,14 +33377,14 @@ var require_diagnostics = __commonJS({ "undici:client:beforeConnect", (evt) => { const { - connectParams: { version: version2, protocol, port, host } + connectParams: { version: version3, protocol, port, host } } = evt; debugLog( "connecting to %s%s using %s%s", host, port ? `:${port}` : "", protocol, - version2 + version3 ); } ); @@ -37498,14 +33392,14 @@ var require_diagnostics = __commonJS({ "undici:client:connected", (evt) => { const { - connectParams: { version: version2, protocol, port, host } + connectParams: { version: version3, protocol, port, host } } = evt; debugLog( "connected to %s%s using %s%s", host, port ? `:${port}` : "", protocol, - version2 + version3 ); } ); @@ -37513,16 +33407,16 @@ var require_diagnostics = __commonJS({ "undici:client:connectError", (evt) => { const { - connectParams: { version: version2, protocol, port, host }, - error: error41 + connectParams: { version: version3, protocol, port, host }, + error: error42 } = evt; debugLog( "connection to %s%s using %s%s errored - %s", host, port ? `:${port}` : "", protocol, - version2, - error41.message + version3, + error42.message ); } ); @@ -37572,14 +33466,14 @@ var require_diagnostics = __commonJS({ (evt) => { const { request: { method, path: path4, origin }, - error: error41 + error: error42 } = evt; debugLog( "request to %s %s%s errored - %s", method, origin, path4, - error41.message + error42.message ); } ); @@ -37885,16 +33779,16 @@ var require_request3 = __commonJS({ this.onError(err); } } - onError(error41) { + onError(error42) { this.onFinally(); if (channels.error.hasSubscribers) { - channels.error.publish({ request: this, error: error41 }); + channels.error.publish({ request: this, error: error42 }); } if (this.aborted) { return; } this.aborted = true; - return this[kHandler].onError(error41); + return this[kHandler].onError(error42); } onFinally() { if (this.errorHandler) { @@ -38364,14 +34258,14 @@ var require_connect2 = __commonJS({ const sessionCache = new SessionCache(maxCachedSessions == null ? 100 : maxCachedSessions); timeout = timeout == null ? 1e4 : timeout; allowH2 = allowH2 != null ? allowH2 : false; - return function connect({ hostname: hostname2, host, protocol, port, servername, localAddress, httpSocket }, callback) { + return function connect({ hostname: hostname3, host, protocol, port, servername, localAddress, httpSocket }, callback) { let socket; if (protocol === "https:") { if (!tls) { tls = __require("node:tls"); } servername = servername || options.servername || util3.getServerName(host) || null; - const sessionKey = servername || hostname2; + const sessionKey = servername || hostname3; assert2(sessionKey); const session = customSession || sessionCache.get(sessionKey) || null; port = port || 443; @@ -38386,7 +34280,7 @@ var require_connect2 = __commonJS({ socket: httpSocket, // upgrade socket connection port, - host: hostname2 + host: hostname3 }); socket.on("session", function(session2) { sessionCache.set(sessionKey, session2); @@ -38400,14 +34294,14 @@ var require_connect2 = __commonJS({ ...options, localAddress, port, - host: hostname2 + host: hostname3 }); } if (options.keepAlive == null || options.keepAlive) { const keepAliveInitialDelay = options.keepAliveInitialDelay === void 0 ? 6e4 : options.keepAliveInitialDelay; socket.setKeepAlive(true, keepAliveInitialDelay); } - const clearConnectTimeout = util3.setupConnectTimeout(new WeakRef(socket), { timeout, hostname: hostname2, port }); + const clearConnectTimeout = util3.setupConnectTimeout(new WeakRef(socket), { timeout, hostname: hostname3, port }); socket.setNoDelay(true).once(protocol === "https:" ? "secureConnect" : "connect", function() { queueMicrotask(clearConnectTimeout); if (callback) { @@ -43225,8 +39119,8 @@ var require_client_h2 = __commonJS({ } } let stream = null; - const { hostname: hostname2, port } = client[kUrl]; - headers[HTTP2_HEADER_AUTHORITY] = host || `${hostname2}${port ? `:${port}` : ""}`; + const { hostname: hostname3, port } = client[kUrl]; + headers[HTTP2_HEADER_AUTHORITY] = host || `${hostname3}${port ? `:${port}` : ""}`; headers[HTTP2_HEADER_METHOD] = method; const abort = (err) => { if (request2.aborted || request2.completed) { @@ -43483,8 +39377,8 @@ var require_client_h2 = __commonJS({ } request2.onRequestSent(); client[kResume](); - } catch (error41) { - abort(error41); + } catch (error42) { + abort(error42); } } function writeStream(abort, socket, expectsPayload, h2stream, body, client, request2, contentLength) { @@ -43879,20 +39773,20 @@ var require_client2 = __commonJS({ function connect(client) { assert2(!client[kConnecting]); assert2(!client[kHTTPContext]); - let { host, hostname: hostname2, protocol, port } = client[kUrl]; - if (hostname2[0] === "[") { - const idx = hostname2.indexOf("]"); + let { host, hostname: hostname3, protocol, port } = client[kUrl]; + if (hostname3[0] === "[") { + const idx = hostname3.indexOf("]"); assert2(idx !== -1); - const ip2 = hostname2.substring(1, idx); + const ip2 = hostname3.substring(1, idx); assert2(net.isIPv6(ip2)); - hostname2 = ip2; + hostname3 = ip2; } client[kConnecting] = true; if (channels.beforeConnect.hasSubscribers) { channels.beforeConnect.publish({ connectParams: { host, - hostname: hostname2, + hostname: hostname3, protocol, port, version: client[kHTTPContext]?.version, @@ -43904,14 +39798,14 @@ var require_client2 = __commonJS({ } client[kConnector]({ host, - hostname: hostname2, + hostname: hostname3, protocol, port, servername: client[kServerName], localAddress: client[kLocalAddress] }, (err, socket) => { if (err) { - handleConnectError(client, err, { host, hostname: hostname2, protocol, port }); + handleConnectError(client, err, { host, hostname: hostname3, protocol, port }); client[kResume](); return; } @@ -43925,7 +39819,7 @@ var require_client2 = __commonJS({ client[kHTTPContext] = socket.alpnProtocol === "h2" ? connectH2(client, socket) : connectH1(client, socket); } catch (err2) { socket.destroy().on("error", noop3); - handleConnectError(client, err2, { host, hostname: hostname2, protocol, port }); + handleConnectError(client, err2, { host, hostname: hostname3, protocol, port }); client[kResume](); return; } @@ -43938,7 +39832,7 @@ var require_client2 = __commonJS({ channels.connected.publish({ connectParams: { host, - hostname: hostname2, + hostname: hostname3, protocol, port, version: client[kHTTPContext]?.version, @@ -43953,7 +39847,7 @@ var require_client2 = __commonJS({ client[kResume](); }); } - function handleConnectError(client, err, { host, hostname: hostname2, protocol, port }) { + function handleConnectError(client, err, { host, hostname: hostname3, protocol, port }) { if (client.destroyed) { return; } @@ -43962,7 +39856,7 @@ var require_client2 = __commonJS({ channels.connectError.publish({ connectParams: { host, - hostname: hostname2, + hostname: hostname3, protocol, port, version: client[kHTTPContext]?.version, @@ -44381,7 +40275,7 @@ var require_pool2 = __commonJS({ } } }); - this.on("connectionError", (origin2, targets, error41) => { + this.on("connectionError", (origin2, targets, error42) => { for (const target of targets) { const idx = this[kClients].indexOf(target); if (idx !== -1) { @@ -44965,10 +40859,10 @@ var require_env_http_proxy_agent = __commonJS({ ]); } #getProxyAgentForUrl(url2) { - let { protocol, host: hostname2, port } = url2; - hostname2 = hostname2.replace(/:\d*$/, "").toLowerCase(); + let { protocol, host: hostname3, port } = url2; + hostname3 = hostname3.replace(/:\d*$/, "").toLowerCase(); port = Number.parseInt(port, 10) || DEFAULT_PORTS[protocol] || 0; - if (!this.#shouldProxy(hostname2, port)) { + if (!this.#shouldProxy(hostname3, port)) { return this[kNoProxyAgent]; } if (protocol === "https:") { @@ -44976,7 +40870,7 @@ var require_env_http_proxy_agent = __commonJS({ } return this[kHttpProxyAgent]; } - #shouldProxy(hostname2, port) { + #shouldProxy(hostname3, port) { if (this.#noProxyChanged) { this.#parseNoProxy(); } @@ -44992,11 +40886,11 @@ var require_env_http_proxy_agent = __commonJS({ continue; } if (!/^[.*]/.test(entry.hostname)) { - if (hostname2 === entry.hostname) { + if (hostname3 === entry.hostname) { return false; } } else { - if (hostname2.endsWith(entry.hostname.replace(/^\*/, ""))) { + if (hostname3.endsWith(entry.hostname.replace(/^\*/, ""))) { return false; } } @@ -45427,10 +41321,10 @@ var require_h2c_client = __commonJS({ #buildConnector(connectOpts) { return (opts, callback) => { const timeout = connectOpts?.connectOpts ?? 1e4; - const { hostname: hostname2, port, pathname } = opts; + const { hostname: hostname3, port, pathname } = opts; const socket = connect({ ...opts, - host: hostname2, + host: hostname3, port, pathname }); @@ -45441,7 +41335,7 @@ var require_h2c_client = __commonJS({ socket.alpnProtocol = "h2"; const clearConnectTimeout = util3.setupConnectTimeout( new WeakRef(socket), - { timeout, hostname: hostname2, port } + { timeout, hostname: hostname3, port } ); socket.setNoDelay(true).once("connect", function() { queueMicrotask(clearConnectTimeout); @@ -46780,10 +42674,10 @@ var require_mock_utils2 = __commonJS({ } } function buildHeadersFromArray(headers) { - const clone2 = headers.slice(); + const clone3 = headers.slice(); const entries = []; - for (let index = 0; index < clone2.length; index += 2) { - entries.push([clone2[index], clone2[index + 1]]); + for (let index = 0; index < clone3.length; index += 2) { + entries.push([clone3[index], clone3[index + 1]]); } return Object.fromEntries(entries); } @@ -46962,13 +42856,13 @@ var require_mock_utils2 = __commonJS({ if (mockDispatch2.data.callback) { mockDispatch2.data = { ...mockDispatch2.data, ...mockDispatch2.data.callback(opts) }; } - const { data: { statusCode, data, headers, trailers, error: error41 }, delay: delay2, persist } = mockDispatch2; + const { data: { statusCode, data, headers, trailers, error: error42 }, delay: delay2, persist } = mockDispatch2; const { timesInvoked, times } = mockDispatch2; mockDispatch2.consumed = !persist && timesInvoked >= times; mockDispatch2.pending = timesInvoked < times; - if (error41 !== null) { + if (error42 !== null) { deleteMockDispatch(this[kDispatches], key); - handler2.onError(error41); + handler2.onError(error42); return true; } if (typeof delay2 === "number" && delay2 > 0) { @@ -47006,19 +42900,19 @@ var require_mock_utils2 = __commonJS({ if (agent2.isMockActive) { try { mockDispatch.call(this, opts, handler2); - } catch (error41) { - if (error41.code === "UND_MOCK_ERR_MOCK_NOT_MATCHED") { + } catch (error42) { + if (error42.code === "UND_MOCK_ERR_MOCK_NOT_MATCHED") { const netConnect = agent2[kGetNetConnect](); if (netConnect === false) { - throw new MockNotMatchedError(`${error41.message}: subsequent request to origin ${origin} was not allowed (net.connect disabled)`); + throw new MockNotMatchedError(`${error42.message}: subsequent request to origin ${origin} was not allowed (net.connect disabled)`); } if (checkNetConnect(netConnect, origin)) { originalDispatch.call(this, opts, handler2); } else { - throw new MockNotMatchedError(`${error41.message}: subsequent request to origin ${origin} was not allowed (net.connect is not enabled for this origin)`); + throw new MockNotMatchedError(`${error42.message}: subsequent request to origin ${origin} was not allowed (net.connect is not enabled for this origin)`); } } else { - throw error41; + throw error42; } } } else { @@ -47193,11 +43087,11 @@ var require_mock_interceptor2 = __commonJS({ /** * Mock an undici request with a defined error. */ - replyWithError(error41) { - if (typeof error41 === "undefined") { + replyWithError(error42) { + if (typeof error42 === "undefined") { throw new InvalidArgumentError("error must be defined"); } - const newMockDispatch = addMockDispatch(this[kDispatches], this[kDispatchKey], { error: error41 }, { ignoreTrailingSlash: this[kIgnoreTrailingSlash] }); + const newMockDispatch = addMockDispatch(this[kDispatches], this[kDispatchKey], { error: error42 }, { ignoreTrailingSlash: this[kIgnoreTrailingSlash] }); return new MockScope(newMockDispatch); } /** @@ -47347,8 +43241,8 @@ var require_mock_call_history = __commonJS({ } url2.search = new URLSearchParams(requestInit.query).toString(); return url2; - } catch (error41) { - throw new InvalidArgumentError("An error occurred when computing MockCallHistoryLog.url", { cause: error41 }); + } catch (error42) { + throw new InvalidArgumentError("An error occurred when computing MockCallHistoryLog.url", { cause: error42 }); } } var MockCallHistoryLog = class { @@ -47408,17 +43302,17 @@ var require_mock_call_history = __commonJS({ lastCall() { return this.logs.at(-1); } - nthCall(number3) { - if (typeof number3 !== "number") { + nthCall(number4) { + if (typeof number4 !== "number") { throw new InvalidArgumentError("nthCall must be called with a number"); } - if (!Number.isInteger(number3)) { + if (!Number.isInteger(number4)) { throw new InvalidArgumentError("nthCall must be called with an integer"); } - if (Math.sign(number3) !== 1) { + if (Math.sign(number4) !== 1) { throw new InvalidArgumentError("nthCall must be called with a positive value. use firstCall or lastCall instead"); } - return this.logs.at(number3 - 1); + return this.logs.at(number4 - 1); } filterCalls(criteria, options) { if (this.logs.length === 0) { @@ -48076,11 +43970,11 @@ var require_snapshot_recorder = __commonJS({ } else { this.#snapshots = new Map(Object.entries(parsed2)); } - } catch (error41) { - if (error41.code === "ENOENT") { + } catch (error42) { + if (error42.code === "ENOENT") { this.#snapshots.clear(); } else { - throw new UndiciError(`Failed to load snapshots from ${path4}`, { cause: error41 }); + throw new UndiciError(`Failed to load snapshots from ${path4}`, { cause: error42 }); } } } @@ -48311,12 +44205,12 @@ var require_snapshot_agent = __commonJS({ } else if (mode === "update") { return this.#recordAndReplay(opts, handler2); } else { - const error41 = new UndiciError(`No snapshot found for ${opts.method || "GET"} ${opts.path}`); + const error42 = new UndiciError(`No snapshot found for ${opts.method || "GET"} ${opts.path}`); if (handler2.onError) { - handler2.onError(error41); + handler2.onError(error42); return; } - throw error41; + throw error42; } } else if (mode === "record") { return this.#recordAndReplay(opts, handler2); @@ -48366,8 +44260,8 @@ var require_snapshot_agent = __commonJS({ trailers: responseData.trailers }).then(() => { handler2.onResponseEnd(controller, trailers); - }).catch((error41) => { - handler2.onResponseError(controller, error41); + }).catch((error42) => { + handler2.onResponseError(controller, error42); }); } }; @@ -48401,8 +44295,8 @@ var require_snapshot_agent = __commonJS({ const body = Buffer.from(response.body, "base64"); handler2.onResponseData(controller, body); handler2.onResponseEnd(controller, response.trailers); - } catch (error41) { - handler2.onError?.(error41); + } catch (error42) { + handler2.onError?.(error42); } } /** @@ -48746,8 +44640,8 @@ var require_redirect_handler = __commonJS({ this.handler.onResponseEnd(controller, trailers); } } - onResponseError(controller, error41) { - this.handler.onResponseError?.(controller, error41); + onResponseError(controller, error42) { + this.handler.onResponseError?.(controller, error42); } }; function shouldRemoveHeader(header, removeContent, unknownOrigin) { @@ -49593,76 +45487,76 @@ var require_cache5 = __commonJS({ var require_date = __commonJS({ "../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/util/date.js"(exports, module) { "use strict"; - function parseHttpDate(date2) { - switch (date2[3]) { + function parseHttpDate(date4) { + switch (date4[3]) { case ",": - return parseImfDate(date2); + return parseImfDate(date4); case " ": - return parseAscTimeDate(date2); + return parseAscTimeDate(date4); default: - return parseRfc850Date(date2); + return parseRfc850Date(date4); } } - function parseImfDate(date2) { - if (date2.length !== 29 || date2[4] !== " " || date2[7] !== " " || date2[11] !== " " || date2[16] !== " " || date2[19] !== ":" || date2[22] !== ":" || date2[25] !== " " || date2[26] !== "G" || date2[27] !== "M" || date2[28] !== "T") { + function parseImfDate(date4) { + if (date4.length !== 29 || date4[4] !== " " || date4[7] !== " " || date4[11] !== " " || date4[16] !== " " || date4[19] !== ":" || date4[22] !== ":" || date4[25] !== " " || date4[26] !== "G" || date4[27] !== "M" || date4[28] !== "T") { return void 0; } let weekday = -1; - if (date2[0] === "S" && date2[1] === "u" && date2[2] === "n") { + if (date4[0] === "S" && date4[1] === "u" && date4[2] === "n") { weekday = 0; - } else if (date2[0] === "M" && date2[1] === "o" && date2[2] === "n") { + } else if (date4[0] === "M" && date4[1] === "o" && date4[2] === "n") { weekday = 1; - } else if (date2[0] === "T" && date2[1] === "u" && date2[2] === "e") { + } else if (date4[0] === "T" && date4[1] === "u" && date4[2] === "e") { weekday = 2; - } else if (date2[0] === "W" && date2[1] === "e" && date2[2] === "d") { + } else if (date4[0] === "W" && date4[1] === "e" && date4[2] === "d") { weekday = 3; - } else if (date2[0] === "T" && date2[1] === "h" && date2[2] === "u") { + } else if (date4[0] === "T" && date4[1] === "h" && date4[2] === "u") { weekday = 4; - } else if (date2[0] === "F" && date2[1] === "r" && date2[2] === "i") { + } else if (date4[0] === "F" && date4[1] === "r" && date4[2] === "i") { weekday = 5; - } else if (date2[0] === "S" && date2[1] === "a" && date2[2] === "t") { + } else if (date4[0] === "S" && date4[1] === "a" && date4[2] === "t") { weekday = 6; } else { return void 0; } let day = 0; - if (date2[5] === "0") { - const code = date2.charCodeAt(6); + if (date4[5] === "0") { + const code = date4.charCodeAt(6); if (code < 49 || code > 57) { return void 0; } day = code - 48; } else { - const code1 = date2.charCodeAt(5); + const code1 = date4.charCodeAt(5); if (code1 < 49 || code1 > 51) { return void 0; } - const code2 = date2.charCodeAt(6); + const code2 = date4.charCodeAt(6); if (code2 < 48 || code2 > 57) { return void 0; } day = (code1 - 48) * 10 + (code2 - 48); } let monthIdx = -1; - if (date2[8] === "J" && date2[9] === "a" && date2[10] === "n") { + if (date4[8] === "J" && date4[9] === "a" && date4[10] === "n") { monthIdx = 0; - } else if (date2[8] === "F" && date2[9] === "e" && date2[10] === "b") { + } else if (date4[8] === "F" && date4[9] === "e" && date4[10] === "b") { monthIdx = 1; - } else if (date2[8] === "M" && date2[9] === "a") { - if (date2[10] === "r") { + } else if (date4[8] === "M" && date4[9] === "a") { + if (date4[10] === "r") { monthIdx = 2; - } else if (date2[10] === "y") { + } else if (date4[10] === "y") { monthIdx = 4; } else { return void 0; } - } else if (date2[8] === "J") { - if (date2[9] === "a" && date2[10] === "n") { + } else if (date4[8] === "J") { + if (date4[9] === "a" && date4[10] === "n") { monthIdx = 0; - } else if (date2[9] === "u") { - if (date2[10] === "n") { + } else if (date4[9] === "u") { + if (date4[10] === "n") { monthIdx = 5; - } else if (date2[10] === "l") { + } else if (date4[10] === "l") { monthIdx = 6; } else { return void 0; @@ -49670,55 +45564,55 @@ var require_date = __commonJS({ } else { return void 0; } - } else if (date2[8] === "A") { - if (date2[9] === "p" && date2[10] === "r") { + } else if (date4[8] === "A") { + if (date4[9] === "p" && date4[10] === "r") { monthIdx = 3; - } else if (date2[9] === "u" && date2[10] === "g") { + } else if (date4[9] === "u" && date4[10] === "g") { monthIdx = 7; } else { return void 0; } - } else if (date2[8] === "S" && date2[9] === "e" && date2[10] === "p") { + } else if (date4[8] === "S" && date4[9] === "e" && date4[10] === "p") { monthIdx = 8; - } else if (date2[8] === "O" && date2[9] === "c" && date2[10] === "t") { + } else if (date4[8] === "O" && date4[9] === "c" && date4[10] === "t") { monthIdx = 9; - } else if (date2[8] === "N" && date2[9] === "o" && date2[10] === "v") { + } else if (date4[8] === "N" && date4[9] === "o" && date4[10] === "v") { monthIdx = 10; - } else if (date2[8] === "D" && date2[9] === "e" && date2[10] === "c") { + } else if (date4[8] === "D" && date4[9] === "e" && date4[10] === "c") { monthIdx = 11; } else { return void 0; } - const yearDigit1 = date2.charCodeAt(12); + const yearDigit1 = date4.charCodeAt(12); if (yearDigit1 < 48 || yearDigit1 > 57) { return void 0; } - const yearDigit2 = date2.charCodeAt(13); + const yearDigit2 = date4.charCodeAt(13); if (yearDigit2 < 48 || yearDigit2 > 57) { return void 0; } - const yearDigit3 = date2.charCodeAt(14); + const yearDigit3 = date4.charCodeAt(14); if (yearDigit3 < 48 || yearDigit3 > 57) { return void 0; } - const yearDigit4 = date2.charCodeAt(15); + const yearDigit4 = date4.charCodeAt(15); if (yearDigit4 < 48 || yearDigit4 > 57) { return void 0; } const year = (yearDigit1 - 48) * 1e3 + (yearDigit2 - 48) * 100 + (yearDigit3 - 48) * 10 + (yearDigit4 - 48); let hour = 0; - if (date2[17] === "0") { - const code = date2.charCodeAt(18); + if (date4[17] === "0") { + const code = date4.charCodeAt(18); if (code < 48 || code > 57) { return void 0; } hour = code - 48; } else { - const code1 = date2.charCodeAt(17); + const code1 = date4.charCodeAt(17); if (code1 < 48 || code1 > 50) { return void 0; } - const code2 = date2.charCodeAt(18); + const code2 = date4.charCodeAt(18); if (code2 < 48 || code2 > 57) { return void 0; } @@ -49728,36 +45622,36 @@ var require_date = __commonJS({ hour = (code1 - 48) * 10 + (code2 - 48); } let minute = 0; - if (date2[20] === "0") { - const code = date2.charCodeAt(21); + if (date4[20] === "0") { + const code = date4.charCodeAt(21); if (code < 48 || code > 57) { return void 0; } minute = code - 48; } else { - const code1 = date2.charCodeAt(20); + const code1 = date4.charCodeAt(20); if (code1 < 48 || code1 > 53) { return void 0; } - const code2 = date2.charCodeAt(21); + const code2 = date4.charCodeAt(21); if (code2 < 48 || code2 > 57) { return void 0; } minute = (code1 - 48) * 10 + (code2 - 48); } let second = 0; - if (date2[23] === "0") { - const code = date2.charCodeAt(24); + if (date4[23] === "0") { + const code = date4.charCodeAt(24); if (code < 48 || code > 57) { return void 0; } second = code - 48; } else { - const code1 = date2.charCodeAt(23); + const code1 = date4.charCodeAt(23); if (code1 < 48 || code1 > 53) { return void 0; } - const code2 = date2.charCodeAt(24); + const code2 = date4.charCodeAt(24); if (code2 < 48 || code2 > 57) { return void 0; } @@ -49766,48 +45660,48 @@ var require_date = __commonJS({ const result = new Date(Date.UTC(year, monthIdx, day, hour, minute, second)); return result.getUTCDay() === weekday ? result : void 0; } - function parseAscTimeDate(date2) { - if (date2.length !== 24 || date2[7] !== " " || date2[10] !== " " || date2[19] !== " ") { + function parseAscTimeDate(date4) { + if (date4.length !== 24 || date4[7] !== " " || date4[10] !== " " || date4[19] !== " ") { return void 0; } let weekday = -1; - if (date2[0] === "S" && date2[1] === "u" && date2[2] === "n") { + if (date4[0] === "S" && date4[1] === "u" && date4[2] === "n") { weekday = 0; - } else if (date2[0] === "M" && date2[1] === "o" && date2[2] === "n") { + } else if (date4[0] === "M" && date4[1] === "o" && date4[2] === "n") { weekday = 1; - } else if (date2[0] === "T" && date2[1] === "u" && date2[2] === "e") { + } else if (date4[0] === "T" && date4[1] === "u" && date4[2] === "e") { weekday = 2; - } else if (date2[0] === "W" && date2[1] === "e" && date2[2] === "d") { + } else if (date4[0] === "W" && date4[1] === "e" && date4[2] === "d") { weekday = 3; - } else if (date2[0] === "T" && date2[1] === "h" && date2[2] === "u") { + } else if (date4[0] === "T" && date4[1] === "h" && date4[2] === "u") { weekday = 4; - } else if (date2[0] === "F" && date2[1] === "r" && date2[2] === "i") { + } else if (date4[0] === "F" && date4[1] === "r" && date4[2] === "i") { weekday = 5; - } else if (date2[0] === "S" && date2[1] === "a" && date2[2] === "t") { + } else if (date4[0] === "S" && date4[1] === "a" && date4[2] === "t") { weekday = 6; } else { return void 0; } let monthIdx = -1; - if (date2[4] === "J" && date2[5] === "a" && date2[6] === "n") { + if (date4[4] === "J" && date4[5] === "a" && date4[6] === "n") { monthIdx = 0; - } else if (date2[4] === "F" && date2[5] === "e" && date2[6] === "b") { + } else if (date4[4] === "F" && date4[5] === "e" && date4[6] === "b") { monthIdx = 1; - } else if (date2[4] === "M" && date2[5] === "a") { - if (date2[6] === "r") { + } else if (date4[4] === "M" && date4[5] === "a") { + if (date4[6] === "r") { monthIdx = 2; - } else if (date2[6] === "y") { + } else if (date4[6] === "y") { monthIdx = 4; } else { return void 0; } - } else if (date2[4] === "J") { - if (date2[5] === "a" && date2[6] === "n") { + } else if (date4[4] === "J") { + if (date4[5] === "a" && date4[6] === "n") { monthIdx = 0; - } else if (date2[5] === "u") { - if (date2[6] === "n") { + } else if (date4[5] === "u") { + if (date4[6] === "n") { monthIdx = 5; - } else if (date2[6] === "l") { + } else if (date4[6] === "l") { monthIdx = 6; } else { return void 0; @@ -49815,56 +45709,56 @@ var require_date = __commonJS({ } else { return void 0; } - } else if (date2[4] === "A") { - if (date2[5] === "p" && date2[6] === "r") { + } else if (date4[4] === "A") { + if (date4[5] === "p" && date4[6] === "r") { monthIdx = 3; - } else if (date2[5] === "u" && date2[6] === "g") { + } else if (date4[5] === "u" && date4[6] === "g") { monthIdx = 7; } else { return void 0; } - } else if (date2[4] === "S" && date2[5] === "e" && date2[6] === "p") { + } else if (date4[4] === "S" && date4[5] === "e" && date4[6] === "p") { monthIdx = 8; - } else if (date2[4] === "O" && date2[5] === "c" && date2[6] === "t") { + } else if (date4[4] === "O" && date4[5] === "c" && date4[6] === "t") { monthIdx = 9; - } else if (date2[4] === "N" && date2[5] === "o" && date2[6] === "v") { + } else if (date4[4] === "N" && date4[5] === "o" && date4[6] === "v") { monthIdx = 10; - } else if (date2[4] === "D" && date2[5] === "e" && date2[6] === "c") { + } else if (date4[4] === "D" && date4[5] === "e" && date4[6] === "c") { monthIdx = 11; } else { return void 0; } let day = 0; - if (date2[8] === " ") { - const code = date2.charCodeAt(9); + if (date4[8] === " ") { + const code = date4.charCodeAt(9); if (code < 49 || code > 57) { return void 0; } day = code - 48; } else { - const code1 = date2.charCodeAt(8); + const code1 = date4.charCodeAt(8); if (code1 < 49 || code1 > 51) { return void 0; } - const code2 = date2.charCodeAt(9); + const code2 = date4.charCodeAt(9); if (code2 < 48 || code2 > 57) { return void 0; } day = (code1 - 48) * 10 + (code2 - 48); } let hour = 0; - if (date2[11] === "0") { - const code = date2.charCodeAt(12); + if (date4[11] === "0") { + const code = date4.charCodeAt(12); if (code < 48 || code > 57) { return void 0; } hour = code - 48; } else { - const code1 = date2.charCodeAt(11); + const code1 = date4.charCodeAt(11); if (code1 < 48 || code1 > 50) { return void 0; } - const code2 = date2.charCodeAt(12); + const code2 = date4.charCodeAt(12); if (code2 < 48 || code2 > 57) { return void 0; } @@ -49874,54 +45768,54 @@ var require_date = __commonJS({ hour = (code1 - 48) * 10 + (code2 - 48); } let minute = 0; - if (date2[14] === "0") { - const code = date2.charCodeAt(15); + if (date4[14] === "0") { + const code = date4.charCodeAt(15); if (code < 48 || code > 57) { return void 0; } minute = code - 48; } else { - const code1 = date2.charCodeAt(14); + const code1 = date4.charCodeAt(14); if (code1 < 48 || code1 > 53) { return void 0; } - const code2 = date2.charCodeAt(15); + const code2 = date4.charCodeAt(15); if (code2 < 48 || code2 > 57) { return void 0; } minute = (code1 - 48) * 10 + (code2 - 48); } let second = 0; - if (date2[17] === "0") { - const code = date2.charCodeAt(18); + if (date4[17] === "0") { + const code = date4.charCodeAt(18); if (code < 48 || code > 57) { return void 0; } second = code - 48; } else { - const code1 = date2.charCodeAt(17); + const code1 = date4.charCodeAt(17); if (code1 < 48 || code1 > 53) { return void 0; } - const code2 = date2.charCodeAt(18); + const code2 = date4.charCodeAt(18); if (code2 < 48 || code2 > 57) { return void 0; } second = (code1 - 48) * 10 + (code2 - 48); } - const yearDigit1 = date2.charCodeAt(20); + const yearDigit1 = date4.charCodeAt(20); if (yearDigit1 < 48 || yearDigit1 > 57) { return void 0; } - const yearDigit2 = date2.charCodeAt(21); + const yearDigit2 = date4.charCodeAt(21); if (yearDigit2 < 48 || yearDigit2 > 57) { return void 0; } - const yearDigit3 = date2.charCodeAt(22); + const yearDigit3 = date4.charCodeAt(22); if (yearDigit3 < 48 || yearDigit3 > 57) { return void 0; } - const yearDigit4 = date2.charCodeAt(23); + const yearDigit4 = date4.charCodeAt(23); if (yearDigit4 < 48 || yearDigit4 > 57) { return void 0; } @@ -49929,109 +45823,109 @@ var require_date = __commonJS({ const result = new Date(Date.UTC(year, monthIdx, day, hour, minute, second)); return result.getUTCDay() === weekday ? result : void 0; } - function parseRfc850Date(date2) { + function parseRfc850Date(date4) { let commaIndex = -1; let weekday = -1; - if (date2[0] === "S") { - if (date2[1] === "u" && date2[2] === "n" && date2[3] === "d" && date2[4] === "a" && date2[5] === "y") { + if (date4[0] === "S") { + if (date4[1] === "u" && date4[2] === "n" && date4[3] === "d" && date4[4] === "a" && date4[5] === "y") { weekday = 0; commaIndex = 6; - } else if (date2[1] === "a" && date2[2] === "t" && date2[3] === "u" && date2[4] === "r" && date2[5] === "d" && date2[6] === "a" && date2[7] === "y") { + } else if (date4[1] === "a" && date4[2] === "t" && date4[3] === "u" && date4[4] === "r" && date4[5] === "d" && date4[6] === "a" && date4[7] === "y") { weekday = 6; commaIndex = 8; } - } else if (date2[0] === "M" && date2[1] === "o" && date2[2] === "n" && date2[3] === "d" && date2[4] === "a" && date2[5] === "y") { + } else if (date4[0] === "M" && date4[1] === "o" && date4[2] === "n" && date4[3] === "d" && date4[4] === "a" && date4[5] === "y") { weekday = 1; commaIndex = 6; - } else if (date2[0] === "T") { - if (date2[1] === "u" && date2[2] === "e" && date2[3] === "s" && date2[4] === "d" && date2[5] === "a" && date2[6] === "y") { + } else if (date4[0] === "T") { + if (date4[1] === "u" && date4[2] === "e" && date4[3] === "s" && date4[4] === "d" && date4[5] === "a" && date4[6] === "y") { weekday = 2; commaIndex = 7; - } else if (date2[1] === "h" && date2[2] === "u" && date2[3] === "r" && date2[4] === "s" && date2[5] === "d" && date2[6] === "a" && date2[7] === "y") { + } else if (date4[1] === "h" && date4[2] === "u" && date4[3] === "r" && date4[4] === "s" && date4[5] === "d" && date4[6] === "a" && date4[7] === "y") { weekday = 4; commaIndex = 8; } - } else if (date2[0] === "W" && date2[1] === "e" && date2[2] === "d" && date2[3] === "n" && date2[4] === "e" && date2[5] === "s" && date2[6] === "d" && date2[7] === "a" && date2[8] === "y") { + } else if (date4[0] === "W" && date4[1] === "e" && date4[2] === "d" && date4[3] === "n" && date4[4] === "e" && date4[5] === "s" && date4[6] === "d" && date4[7] === "a" && date4[8] === "y") { weekday = 3; commaIndex = 9; - } else if (date2[0] === "F" && date2[1] === "r" && date2[2] === "i" && date2[3] === "d" && date2[4] === "a" && date2[5] === "y") { + } else if (date4[0] === "F" && date4[1] === "r" && date4[2] === "i" && date4[3] === "d" && date4[4] === "a" && date4[5] === "y") { weekday = 5; commaIndex = 6; } else { return void 0; } - if (date2[commaIndex] !== "," || date2.length - commaIndex - 1 !== 23 || date2[commaIndex + 1] !== " " || date2[commaIndex + 4] !== "-" || date2[commaIndex + 8] !== "-" || date2[commaIndex + 11] !== " " || date2[commaIndex + 14] !== ":" || date2[commaIndex + 17] !== ":" || date2[commaIndex + 20] !== " " || date2[commaIndex + 21] !== "G" || date2[commaIndex + 22] !== "M" || date2[commaIndex + 23] !== "T") { + if (date4[commaIndex] !== "," || date4.length - commaIndex - 1 !== 23 || date4[commaIndex + 1] !== " " || date4[commaIndex + 4] !== "-" || date4[commaIndex + 8] !== "-" || date4[commaIndex + 11] !== " " || date4[commaIndex + 14] !== ":" || date4[commaIndex + 17] !== ":" || date4[commaIndex + 20] !== " " || date4[commaIndex + 21] !== "G" || date4[commaIndex + 22] !== "M" || date4[commaIndex + 23] !== "T") { return void 0; } let day = 0; - if (date2[commaIndex + 2] === "0") { - const code = date2.charCodeAt(commaIndex + 3); + if (date4[commaIndex + 2] === "0") { + const code = date4.charCodeAt(commaIndex + 3); if (code < 49 || code > 57) { return void 0; } day = code - 48; } else { - const code1 = date2.charCodeAt(commaIndex + 2); + const code1 = date4.charCodeAt(commaIndex + 2); if (code1 < 49 || code1 > 51) { return void 0; } - const code2 = date2.charCodeAt(commaIndex + 3); + const code2 = date4.charCodeAt(commaIndex + 3); if (code2 < 48 || code2 > 57) { return void 0; } day = (code1 - 48) * 10 + (code2 - 48); } let monthIdx = -1; - if (date2[commaIndex + 5] === "J" && date2[commaIndex + 6] === "a" && date2[commaIndex + 7] === "n") { + if (date4[commaIndex + 5] === "J" && date4[commaIndex + 6] === "a" && date4[commaIndex + 7] === "n") { monthIdx = 0; - } else if (date2[commaIndex + 5] === "F" && date2[commaIndex + 6] === "e" && date2[commaIndex + 7] === "b") { + } else if (date4[commaIndex + 5] === "F" && date4[commaIndex + 6] === "e" && date4[commaIndex + 7] === "b") { monthIdx = 1; - } else if (date2[commaIndex + 5] === "M" && date2[commaIndex + 6] === "a" && date2[commaIndex + 7] === "r") { + } else if (date4[commaIndex + 5] === "M" && date4[commaIndex + 6] === "a" && date4[commaIndex + 7] === "r") { monthIdx = 2; - } else if (date2[commaIndex + 5] === "A" && date2[commaIndex + 6] === "p" && date2[commaIndex + 7] === "r") { + } else if (date4[commaIndex + 5] === "A" && date4[commaIndex + 6] === "p" && date4[commaIndex + 7] === "r") { monthIdx = 3; - } else if (date2[commaIndex + 5] === "M" && date2[commaIndex + 6] === "a" && date2[commaIndex + 7] === "y") { + } else if (date4[commaIndex + 5] === "M" && date4[commaIndex + 6] === "a" && date4[commaIndex + 7] === "y") { monthIdx = 4; - } else if (date2[commaIndex + 5] === "J" && date2[commaIndex + 6] === "u" && date2[commaIndex + 7] === "n") { + } else if (date4[commaIndex + 5] === "J" && date4[commaIndex + 6] === "u" && date4[commaIndex + 7] === "n") { monthIdx = 5; - } else if (date2[commaIndex + 5] === "J" && date2[commaIndex + 6] === "u" && date2[commaIndex + 7] === "l") { + } else if (date4[commaIndex + 5] === "J" && date4[commaIndex + 6] === "u" && date4[commaIndex + 7] === "l") { monthIdx = 6; - } else if (date2[commaIndex + 5] === "A" && date2[commaIndex + 6] === "u" && date2[commaIndex + 7] === "g") { + } else if (date4[commaIndex + 5] === "A" && date4[commaIndex + 6] === "u" && date4[commaIndex + 7] === "g") { monthIdx = 7; - } else if (date2[commaIndex + 5] === "S" && date2[commaIndex + 6] === "e" && date2[commaIndex + 7] === "p") { + } else if (date4[commaIndex + 5] === "S" && date4[commaIndex + 6] === "e" && date4[commaIndex + 7] === "p") { monthIdx = 8; - } else if (date2[commaIndex + 5] === "O" && date2[commaIndex + 6] === "c" && date2[commaIndex + 7] === "t") { + } else if (date4[commaIndex + 5] === "O" && date4[commaIndex + 6] === "c" && date4[commaIndex + 7] === "t") { monthIdx = 9; - } else if (date2[commaIndex + 5] === "N" && date2[commaIndex + 6] === "o" && date2[commaIndex + 7] === "v") { + } else if (date4[commaIndex + 5] === "N" && date4[commaIndex + 6] === "o" && date4[commaIndex + 7] === "v") { monthIdx = 10; - } else if (date2[commaIndex + 5] === "D" && date2[commaIndex + 6] === "e" && date2[commaIndex + 7] === "c") { + } else if (date4[commaIndex + 5] === "D" && date4[commaIndex + 6] === "e" && date4[commaIndex + 7] === "c") { monthIdx = 11; } else { return void 0; } - const yearDigit1 = date2.charCodeAt(commaIndex + 9); + const yearDigit1 = date4.charCodeAt(commaIndex + 9); if (yearDigit1 < 48 || yearDigit1 > 57) { return void 0; } - const yearDigit2 = date2.charCodeAt(commaIndex + 10); + const yearDigit2 = date4.charCodeAt(commaIndex + 10); if (yearDigit2 < 48 || yearDigit2 > 57) { return void 0; } let year = (yearDigit1 - 48) * 10 + (yearDigit2 - 48); year += year < 70 ? 2e3 : 1900; let hour = 0; - if (date2[commaIndex + 12] === "0") { - const code = date2.charCodeAt(commaIndex + 13); + if (date4[commaIndex + 12] === "0") { + const code = date4.charCodeAt(commaIndex + 13); if (code < 48 || code > 57) { return void 0; } hour = code - 48; } else { - const code1 = date2.charCodeAt(commaIndex + 12); + const code1 = date4.charCodeAt(commaIndex + 12); if (code1 < 48 || code1 > 50) { return void 0; } - const code2 = date2.charCodeAt(commaIndex + 13); + const code2 = date4.charCodeAt(commaIndex + 13); if (code2 < 48 || code2 > 57) { return void 0; } @@ -50041,36 +45935,36 @@ var require_date = __commonJS({ hour = (code1 - 48) * 10 + (code2 - 48); } let minute = 0; - if (date2[commaIndex + 15] === "0") { - const code = date2.charCodeAt(commaIndex + 16); + if (date4[commaIndex + 15] === "0") { + const code = date4.charCodeAt(commaIndex + 16); if (code < 48 || code > 57) { return void 0; } minute = code - 48; } else { - const code1 = date2.charCodeAt(commaIndex + 15); + const code1 = date4.charCodeAt(commaIndex + 15); if (code1 < 48 || code1 > 53) { return void 0; } - const code2 = date2.charCodeAt(commaIndex + 16); + const code2 = date4.charCodeAt(commaIndex + 16); if (code2 < 48 || code2 > 57) { return void 0; } minute = (code1 - 48) * 10 + (code2 - 48); } let second = 0; - if (date2[commaIndex + 18] === "0") { - const code = date2.charCodeAt(commaIndex + 19); + if (date4[commaIndex + 18] === "0") { + const code = date4.charCodeAt(commaIndex + 19); if (code < 48 || code > 57) { return void 0; } second = code - 48; } else { - const code1 = date2.charCodeAt(commaIndex + 18); + const code1 = date4.charCodeAt(commaIndex + 18); if (code1 < 48 || code1 > 53) { return void 0; } - const code2 = date2.charCodeAt(commaIndex + 19); + const code2 = date4.charCodeAt(commaIndex + 19); if (code2 < 48 || code2 > 57) { return void 0; } @@ -50387,8 +46281,8 @@ var require_cache_handler = __commonJS({ } return strippedHeaders ?? resHeaders; } - function isValidDate2(date2) { - return date2 instanceof Date && Number.isFinite(date2.valueOf()); + function isValidDate2(date4) { + return date4 instanceof Date && Number.isFinite(date4.valueOf()); } module.exports = CacheHandler; } @@ -50703,20 +46597,20 @@ var require_cache6 = __commonJS({ } function handleUncachedResponse(dispatch, globalOpts, cacheKey, handler2, opts, reqCacheControl) { if (reqCacheControl?.["only-if-cached"]) { - let aborted2 = false; + let aborted3 = false; try { if (typeof handler2.onConnect === "function") { handler2.onConnect(() => { - aborted2 = true; + aborted3 = true; }); - if (aborted2) { + if (aborted3) { return; } } if (typeof handler2.onHeaders === "function") { handler2.onHeaders(504, [], () => { }, "Gateway Timeout"); - if (aborted2) { + if (aborted3) { return; } } @@ -51041,8 +46935,8 @@ var require_decompress = __commonJS({ } } }); - decompressor.on("error", (error41) => { - super.onResponseError(controller, error41); + decompressor.on("error", (error42) => { + super.onResponseError(controller, error42); }); } /** @@ -53381,17 +49275,17 @@ var require_fetch2 = __commonJS({ this.emit("terminated", reason); } // https://fetch.spec.whatwg.org/#fetch-controller-abort - abort(error41) { + abort(error42) { if (this.state !== "ongoing") { return; } this.state = "aborted"; - if (!error41) { - error41 = new DOMException("The operation was aborted.", "AbortError"); + if (!error42) { + error42 = new DOMException("The operation was aborted.", "AbortError"); } - this.serializedAbortReason = error41; - this.connection?.destroy(error41); - this.emit("terminated", error41); + this.serializedAbortReason = error42; + this.connection?.destroy(error42); + this.emit("terminated", error42); } }; function handleFetchDone(response) { @@ -53490,12 +49384,12 @@ var require_fetch2 = __commonJS({ ); } var markResourceTiming = performance.markResourceTiming; - function abortFetch(p, request2, responseObject, error41) { + function abortFetch(p, request2, responseObject, error42) { if (p) { - p.reject(error41); + p.reject(error42); } if (request2.body?.stream != null && isReadable(request2.body.stream)) { - request2.body.stream.cancel(error41).catch((err) => { + request2.body.stream.cancel(error42).catch((err) => { if (err.code === "ERR_INVALID_STATE") { return; } @@ -53507,7 +49401,7 @@ var require_fetch2 = __commonJS({ } const response = getResponseState(responseObject); if (response.body?.stream != null && isReadable(response.body.stream)) { - response.body.stream.cancel(error41).catch((err) => { + response.body.stream.cancel(error42).catch((err) => { if (err.code === "ERR_INVALID_STATE") { return; } @@ -54320,13 +50214,13 @@ var require_fetch2 = __commonJS({ fetchParams.controller.ended = true; this.body.push(null); }, - onError(error41) { + onError(error42) { if (this.abort) { fetchParams.controller.off("terminated", this.abort); } - this.body?.destroy(error41); - fetchParams.controller.terminate(error41); - reject(error41); + this.body?.destroy(error42); + fetchParams.controller.terminate(error42); + reject(error42); }, onUpgrade(status, rawHeaders, socket) { if (status !== 101) { @@ -55159,11 +51053,11 @@ var require_util14 = __commonJS({ "Dec" ]; var IMFPaddedNumbers = Array(61).fill(0).map((_, i) => i.toString().padStart(2, "0")); - function toIMFDate(date2) { - if (typeof date2 === "number") { - date2 = new Date(date2); + function toIMFDate(date4) { + if (typeof date4 === "number") { + date4 = new Date(date4); } - return `${IMFDays[date2.getUTCDay()]}, ${IMFPaddedNumbers[date2.getUTCDate()]} ${IMFMonths[date2.getUTCMonth()]} ${date2.getUTCFullYear()} ${IMFPaddedNumbers[date2.getUTCHours()]}:${IMFPaddedNumbers[date2.getUTCMinutes()]}:${IMFPaddedNumbers[date2.getUTCSeconds()]} GMT`; + return `${IMFDays[date4.getUTCDay()]}, ${IMFPaddedNumbers[date4.getUTCDate()]} ${IMFMonths[date4.getUTCMonth()]} ${date4.getUTCFullYear()} ${IMFPaddedNumbers[date4.getUTCHours()]}:${IMFPaddedNumbers[date4.getUTCMinutes()]}:${IMFPaddedNumbers[date4.getUTCSeconds()]} GMT`; } function validateCookieMaxAge(maxAge) { if (maxAge < 0) { @@ -56015,7 +51909,7 @@ var require_frame2 = __commonJS({ } catch { crypto2 = { // not full compatibility, but minimum. - randomFillSync: function randomFillSync(buffer2, _offset, _size2) { + randomFillSync: function randomFillSync(buffer2, _offset, _size3) { for (let i = 0; i < buffer2.length; ++i) { buffer2[i] = Math.random() * 255 | 0; } @@ -56475,9 +52369,9 @@ var require_receiver2 = __commonJS({ } this.#state = parserStates.INFO; } else { - this.#extensions.get("permessage-deflate").decompress(body, this.#info.fin, (error41, data) => { - if (error41) { - failWebsocketConnection(this.#handler, 1007, error41.message); + this.#extensions.get("permessage-deflate").decompress(body, this.#info.fin, (error42, data) => { + if (error42) { + failWebsocketConnection(this.#handler, 1007, error42.message); return; } this.writeFragments(data); @@ -57249,10 +53143,10 @@ var require_websocketerror = __commonJS({ * @param {string} reason */ static createUnvalidatedWebSocketError(message, code, reason) { - const error41 = new _WebSocketError(message, kConstruct); - error41.#closeCode = code; - error41.#reason = reason; - return error41; + const error42 = new _WebSocketError(message, kConstruct); + error42.#closeCode = code; + error42.#reason = reason; + return error42; } }; var { createUnvalidatedWebSocketError } = WebSocketError; @@ -57421,14 +53315,14 @@ var require_websocketstream = __commonJS({ data = new Uint8Array(ArrayBuffer.isView(chunk) ? new Uint8Array(chunk.buffer, chunk.byteOffset, chunk.byteLength) : chunk.slice()); opcode = opcodes.BINARY; } else { - let string3; + let string4; try { - string3 = webidl.converters.DOMString(chunk); + string4 = webidl.converters.DOMString(chunk); } catch (e) { promise.reject(e); return promise.promise; } - data = new TextEncoder().encode(string3); + data = new TextEncoder().encode(string4); opcode = opcodes.TEXT; } if (!this.#handler.closeState.has(sentCloseFrameState.SENT) && !this.#handler.closeState.has(sentCloseFrameState.RECEIVED)) { @@ -57519,10 +53413,10 @@ var require_websocketstream = __commonJS({ reason }); } else { - const error41 = createUnvalidatedWebSocketError("unclean close", code, reason); - this.#readableStreamController.error(error41); - this.#writableStream.abort(error41); - this.#closedPromise.reject(error41); + const error42 = createUnvalidatedWebSocketError("unclean close", code, reason); + this.#readableStreamController.error(error42); + this.#writableStream.abort(error42); + this.#closedPromise.reject(error42); } } #closeUsingReason(reason) { @@ -58001,8 +53895,8 @@ var require_eventsource = __commonJS({ pipeline2( response.body.stream, eventSourceStream, - (error41) => { - if (error41?.aborted === false) { + (error42) => { + if (error42?.aborted === false) { this.close(); this.dispatchEvent(new Event("error")); } @@ -58347,14 +54241,14 @@ var require_uri_templates = __commonJS({ "*": true }; var urlEscapedChars = /[:/&?#]/; - function notReallyPercentEncode(string3) { - return encodeURI(string3).replace(/%25[0-9][0-9]/g, function(doubleEncoded) { + function notReallyPercentEncode(string4) { + return encodeURI(string4).replace(/%25[0-9][0-9]/g, function(doubleEncoded) { return "%" + doubleEncoded.substring(3); }); } - function isPercentEncoded(string3) { - string3 = string3.replace(/%../g, ""); - return encodeURIComponent(string3) === string3; + function isPercentEncoded(string4) { + string4 = string4.replace(/%../g, ""); + return encodeURIComponent(string4) === string4; } function uriTemplateSubstitution(spec) { var modifier = ""; @@ -58809,8 +54703,8 @@ var init_sury_s6Akl_oc = __esm({ "../node_modules/.pnpm/xsschema@0.3.5_arktype@2.1.28_effect@3.18.4_zod-to-json-schema@3.24.6_zod@3.25.76__zod@3.25.76/node_modules/xsschema/dist/sury-s6Akl-oc.js"() { init_index_CAcLDIRJ(); getToJsonSchemaFn3 = async () => { - const { toJSONSchema: toJSONSchema2 } = await tryImport(import("sury"), "sury"); - return (schema2) => toJSONSchema2(schema2); + const { toJSONSchema: toJSONSchema3 } = await tryImport(import("sury"), "sury"); + return (schema2) => toJSONSchema3(schema2); }; } }); @@ -58833,7 +54727,7 @@ var init_valibot_DBCeetIe = __esm({ // ../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/core.js // @__NO_SIDE_EFFECTS__ -function $constructor(name, initializer2, params) { +function $constructor(name, initializer4, params) { function init(inst, def) { var _a; Object.defineProperty(inst, "_zod", { @@ -58842,7 +54736,7 @@ function $constructor(name, initializer2, params) { }); (_a = inst._zod).traits ?? (_a.traits = /* @__PURE__ */ new Set()); inst._zod.traits.add(name); - initializer2(inst, def); + initializer4(inst, def); for (const k in _.prototype) { if (!(k in inst)) Object.defineProperty(inst, k, { value: _.prototype[k].bind(inst) }); @@ -59295,10 +55189,10 @@ function prefixIssues(path4, issues) { function unwrapMessage(message) { return typeof message === "string" ? message : message?.message; } -function finalizeIssue(iss, ctx, config2) { +function finalizeIssue(iss, ctx, config3) { const full = { ...iss, path: iss.path ?? [] }; if (!iss.message) { - const message = unwrapMessage(iss.inst?._zod.def?.error?.(iss)) ?? unwrapMessage(ctx?.error?.(iss)) ?? unwrapMessage(config2.customError?.(iss)) ?? unwrapMessage(config2.localeError?.(iss)) ?? "Invalid input"; + const message = unwrapMessage(iss.inst?._zod.def?.error?.(iss)) ?? unwrapMessage(ctx?.error?.(iss)) ?? unwrapMessage(config3.customError?.(iss)) ?? unwrapMessage(config3.localeError?.(iss)) ?? "Invalid input"; full.message = message; } delete full.inst; @@ -59342,7 +55236,7 @@ function cleanEnum(obj) { }).map((el) => el[1]); } var captureStackTrace, allowsEval, getParsedType4, propertyKeyTypes, primitiveTypes, NUMBER_FORMAT_RANGES, BIGINT_FORMAT_RANGES, Class; -var init_util2 = __esm({ +var init_util = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/util.js"() { captureStackTrace = Error.captureStackTrace ? Error.captureStackTrace : (..._args) => { }; @@ -59423,10 +55317,10 @@ var init_util2 = __esm({ }); // ../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/errors.js -function flattenError2(error41, mapper = (issue2) => issue2.message) { +function flattenError2(error42, mapper = (issue3) => issue3.message) { const fieldErrors = {}; const formErrors = []; - for (const sub of error41.issues) { + for (const sub of error42.issues) { if (sub.path.length > 0) { fieldErrors[sub.path[0]] = fieldErrors[sub.path[0]] || []; fieldErrors[sub.path[0]].push(mapper(sub)); @@ -59436,32 +55330,32 @@ function flattenError2(error41, mapper = (issue2) => issue2.message) { } return { formErrors, fieldErrors }; } -function formatError(error41, _mapper) { - const mapper = _mapper || function(issue2) { - return issue2.message; +function formatError(error42, _mapper) { + const mapper = _mapper || function(issue3) { + return issue3.message; }; const fieldErrors = { _errors: [] }; - const processError = (error42) => { - for (const issue2 of error42.issues) { - if (issue2.code === "invalid_union" && issue2.errors.length) { - issue2.errors.map((issues) => processError({ issues })); - } else if (issue2.code === "invalid_key") { - processError({ issues: issue2.issues }); - } else if (issue2.code === "invalid_element") { - processError({ issues: issue2.issues }); - } else if (issue2.path.length === 0) { - fieldErrors._errors.push(mapper(issue2)); + const processError = (error43) => { + for (const issue3 of error43.issues) { + if (issue3.code === "invalid_union" && issue3.errors.length) { + issue3.errors.map((issues) => processError({ issues })); + } else if (issue3.code === "invalid_key") { + processError({ issues: issue3.issues }); + } else if (issue3.code === "invalid_element") { + processError({ issues: issue3.issues }); + } else if (issue3.path.length === 0) { + fieldErrors._errors.push(mapper(issue3)); } else { let curr = fieldErrors; let i = 0; - while (i < issue2.path.length) { - const el = issue2.path[i]; - const terminal = i === issue2.path.length - 1; + while (i < issue3.path.length) { + const el = issue3.path[i]; + const terminal = i === issue3.path.length - 1; if (!terminal) { curr[el] = curr[el] || { _errors: [] }; } else { curr[el] = curr[el] || { _errors: [] }; - curr[el]._errors.push(mapper(issue2)); + curr[el]._errors.push(mapper(issue3)); } curr = curr[el]; i++; @@ -59469,27 +55363,27 @@ function formatError(error41, _mapper) { } } }; - processError(error41); + processError(error42); return fieldErrors; } -function treeifyError(error41, _mapper) { - const mapper = _mapper || function(issue2) { - return issue2.message; +function treeifyError(error42, _mapper) { + const mapper = _mapper || function(issue3) { + return issue3.message; }; const result = { errors: [] }; - const processError = (error42, path4 = []) => { + const processError = (error43, path4 = []) => { var _a, _b; - for (const issue2 of error42.issues) { - if (issue2.code === "invalid_union" && issue2.errors.length) { - issue2.errors.map((issues) => processError({ issues }, issue2.path)); - } else if (issue2.code === "invalid_key") { - processError({ issues: issue2.issues }, issue2.path); - } else if (issue2.code === "invalid_element") { - processError({ issues: issue2.issues }, issue2.path); + for (const issue3 of error43.issues) { + if (issue3.code === "invalid_union" && issue3.errors.length) { + issue3.errors.map((issues) => processError({ issues }, issue3.path)); + } else if (issue3.code === "invalid_key") { + processError({ issues: issue3.issues }, issue3.path); + } else if (issue3.code === "invalid_element") { + processError({ issues: issue3.issues }, issue3.path); } else { - const fullpath = [...path4, ...issue2.path]; + const fullpath = [...path4, ...issue3.path]; if (fullpath.length === 0) { - result.errors.push(mapper(issue2)); + result.errors.push(mapper(issue3)); continue; } let curr = result; @@ -59507,14 +55401,14 @@ function treeifyError(error41, _mapper) { curr = curr.items[el]; } if (terminal) { - curr.errors.push(mapper(issue2)); + curr.errors.push(mapper(issue3)); } i++; } } } }; - processError(error41); + processError(error42); return result; } function toDotPath(path4) { @@ -59534,21 +55428,21 @@ function toDotPath(path4) { } return segs.join(""); } -function prettifyError(error41) { +function prettifyError(error42) { const lines = []; - const issues = [...error41.issues].sort((a, b) => a.path.length - b.path.length); - for (const issue2 of issues) { - lines.push(`\u2716 ${issue2.message}`); - if (issue2.path?.length) - lines.push(` \u2192 at ${toDotPath(issue2.path)}`); + const issues = [...error42.issues].sort((a, b) => a.path.length - b.path.length); + for (const issue3 of issues) { + lines.push(`\u2716 ${issue3.message}`); + if (issue3.path?.length) + lines.push(` \u2192 at ${toDotPath(issue3.path)}`); } return lines.join("\n"); } var initializer, $ZodError, $ZodRealError; -var init_errors2 = __esm({ +var init_errors = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/errors.js"() { init_core(); - init_util2(); + init_util(); initializer = (inst, def) => { inst.name = "$ZodError"; Object.defineProperty(inst, "_zod", { @@ -59581,8 +55475,8 @@ var _parse, parse3, _parseAsync, parseAsync, _safeParse, safeParse2, _safeParseA var init_parse = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/parse.js"() { init_core(); - init_errors2(); - init_util2(); + init_errors(); + init_util(); _parse = (_Err) => (schema2, value2, _ctx, _params) => { const ctx = _ctx ? Object.assign(_ctx, { async: false }) : { async: false }; const result = schema2._zod.run({ value: value2, issues: [] }, ctx); @@ -59693,13 +55587,13 @@ function time(args3) { return new RegExp(`^${timeSource(args3)}$`); } function datetime(args3) { - const time2 = timeSource({ precision: args3.precision }); + const time4 = timeSource({ precision: args3.precision }); const opts = ["Z"]; if (args3.local) opts.push(""); if (args3.offset) opts.push(`([+-]\\d{2}:\\d{2})`); - const timeRegex4 = `${time2}(?:${opts.join("|")})`; + const timeRegex4 = `${time4}(?:${opts.join("|")})`; return new RegExp(`^${dateSource}T(?:${timeRegex4})$`); } var cuid, cuid2, ulid, xid, ksuid, nanoid, duration, extendedDuration, guid, uuid2, uuid4, uuid6, uuid7, email2, html5Email, rfc5322Email, unicodeEmail, browserEmail, _emoji, ipv4, ipv6, cidrv4, cidrv6, base642, base64url, hostname, domain, e164, dateSource, date, string2, bigint, integer2, number2, boolean, _null, _undefined, lowercase, uppercase; @@ -59714,10 +55608,10 @@ var init_regexes = __esm({ duration = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/; extendedDuration = /^[-+]?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)?)??$/; guid = /^([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})$/; - uuid2 = (version2) => { - if (!version2) + uuid2 = (version3) => { + if (!version3) return /^([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)$/; - return new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${version2}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`); + return new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${version3}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`); }; uuid4 = /* @__PURE__ */ uuid2(4); uuid6 = /* @__PURE__ */ uuid2(6); @@ -59765,7 +55659,7 @@ var init_checks = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/checks.js"() { init_core(); init_regexes(); - init_util2(); + init_util(); $ZodCheck = /* @__PURE__ */ $constructor("$ZodCheck", (inst, def) => { var _a; inst._zod ?? (inst._zod = {}); @@ -60369,8 +56263,8 @@ function isValidBase64(data) { function isValidBase64URL(data) { if (!base64url.test(data)) return false; - const base643 = data.replace(/[-_]/g, (c) => c === "-" ? "+" : "/"); - const padded = base643.padEnd(Math.ceil(base643.length / 4) * 4, "="); + const base644 = data.replace(/[-_]/g, (c) => c === "-" ? "+" : "/"); + const padded = base644.padEnd(Math.ceil(base644.length / 4) * 4, "="); return isValidBase64(padded); } function isValidJWT4(token, algorithm = null) { @@ -60592,9 +56486,9 @@ var init_schemas = __esm({ init_doc(); init_parse(); init_regexes(); - init_util2(); + init_util(); init_versions(); - init_util2(); + init_util(); $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => { var _a; inst ?? (inst = {}); @@ -61256,16 +57150,16 @@ var init_schemas = __esm({ return (payload, ctx) => fn2(shape, payload, ctx); }; let fastpass; - const isObject4 = isObject3; + const isObject5 = isObject3; const jit = !globalConfig.jitless; - const allowsEval2 = allowsEval; - const fastEnabled = jit && allowsEval2.value; + const allowsEval3 = allowsEval; + const fastEnabled = jit && allowsEval3.value; const catchall = def.catchall; let value2; inst._zod.parse = (payload, ctx) => { value2 ?? (value2 = _normalized.value); const input = payload.value; - if (!isObject4(input)) { + if (!isObject5(input)) { payload.issues.push({ expected: "object", code: "invalid_type", @@ -62002,7 +57896,7 @@ function ar_default() { var error2; var init_ar = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/ar.js"() { - init_util2(); + init_util(); error2 = () => { const Sizable = { string: { unit: "\u062D\u0631\u0641", verb: "\u0623\u0646 \u064A\u062D\u0648\u064A" }, @@ -62013,7 +57907,7 @@ var init_ar = __esm({ function getSizing(origin) { return Sizable[origin] ?? null; } - const parsedType4 = (data) => { + const parsedType5 = (data) => { const t = typeof data; switch (t) { case "number": { @@ -62063,51 +57957,51 @@ var init_ar = __esm({ jwt: "JWT", template_literal: "\u0645\u062F\u062E\u0644" }; - return (issue2) => { - switch (issue2.code) { + return (issue3) => { + switch (issue3.code) { case "invalid_type": - return `\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${issue2.expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${parsedType4(issue2.input)}`; + return `\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${issue3.expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${parsedType5(issue3.input)}`; case "invalid_value": - if (issue2.values.length === 1) - return `\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${stringifyPrimitive(issue2.values[0])}`; - return `\u0627\u062E\u062A\u064A\u0627\u0631 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062A\u0648\u0642\u0639 \u0627\u0646\u062A\u0642\u0627\u0621 \u0623\u062D\u062F \u0647\u0630\u0647 \u0627\u0644\u062E\u064A\u0627\u0631\u0627\u062A: ${joinValues(issue2.values, "|")}`; + if (issue3.values.length === 1) + return `\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${stringifyPrimitive(issue3.values[0])}`; + return `\u0627\u062E\u062A\u064A\u0627\u0631 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062A\u0648\u0642\u0639 \u0627\u0646\u062A\u0642\u0627\u0621 \u0623\u062D\u062F \u0647\u0630\u0647 \u0627\u0644\u062E\u064A\u0627\u0631\u0627\u062A: ${joinValues(issue3.values, "|")}`; case "too_big": { - const adj = issue2.inclusive ? "<=" : "<"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? "<=" : "<"; + const sizing = getSizing(issue3.origin); if (sizing) - return ` \u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${issue2.origin ?? "\u0627\u0644\u0642\u064A\u0645\u0629"} ${adj} ${issue2.maximum.toString()} ${sizing.unit ?? "\u0639\u0646\u0635\u0631"}`; - return `\u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${issue2.origin ?? "\u0627\u0644\u0642\u064A\u0645\u0629"} ${adj} ${issue2.maximum.toString()}`; + return ` \u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${issue3.origin ?? "\u0627\u0644\u0642\u064A\u0645\u0629"} ${adj} ${issue3.maximum.toString()} ${sizing.unit ?? "\u0639\u0646\u0635\u0631"}`; + return `\u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${issue3.origin ?? "\u0627\u0644\u0642\u064A\u0645\u0629"} ${adj} ${issue3.maximum.toString()}`; } case "too_small": { - const adj = issue2.inclusive ? ">=" : ">"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? ">=" : ">"; + const sizing = getSizing(issue3.origin); if (sizing) { - return `\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${issue2.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${adj} ${issue2.minimum.toString()} ${sizing.unit}`; + return `\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${issue3.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${adj} ${issue3.minimum.toString()} ${sizing.unit}`; } - return `\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${issue2.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${adj} ${issue2.minimum.toString()}`; + return `\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${issue3.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${adj} ${issue3.minimum.toString()}`; } case "invalid_format": { - const _issue = issue2; + const _issue = issue3; if (_issue.format === "starts_with") - return `\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0628\u062F\u0623 \u0628\u0640 "${issue2.prefix}"`; + return `\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0628\u062F\u0623 \u0628\u0640 "${issue3.prefix}"`; if (_issue.format === "ends_with") return `\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0646\u062A\u0647\u064A \u0628\u0640 "${_issue.suffix}"`; if (_issue.format === "includes") return `\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u062A\u0636\u0645\u0651\u064E\u0646 "${_issue.includes}"`; if (_issue.format === "regex") return `\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0637\u0627\u0628\u0642 \u0627\u0644\u0646\u0645\u0637 ${_issue.pattern}`; - return `${Nouns[_issue.format] ?? issue2.format} \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644`; + return `${Nouns[_issue.format] ?? issue3.format} \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644`; } case "not_multiple_of": - return `\u0631\u0642\u0645 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0643\u0648\u0646 \u0645\u0646 \u0645\u0636\u0627\u0639\u0641\u0627\u062A ${issue2.divisor}`; + return `\u0631\u0642\u0645 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0643\u0648\u0646 \u0645\u0646 \u0645\u0636\u0627\u0639\u0641\u0627\u062A ${issue3.divisor}`; case "unrecognized_keys": - return `\u0645\u0639\u0631\u0641${issue2.keys.length > 1 ? "\u0627\u062A" : ""} \u063A\u0631\u064A\u0628${issue2.keys.length > 1 ? "\u0629" : ""}: ${joinValues(issue2.keys, "\u060C ")}`; + return `\u0645\u0639\u0631\u0641${issue3.keys.length > 1 ? "\u0627\u062A" : ""} \u063A\u0631\u064A\u0628${issue3.keys.length > 1 ? "\u0629" : ""}: ${joinValues(issue3.keys, "\u060C ")}`; case "invalid_key": - return `\u0645\u0639\u0631\u0641 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${issue2.origin}`; + return `\u0645\u0639\u0631\u0641 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${issue3.origin}`; case "invalid_union": return "\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644"; case "invalid_element": - return `\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${issue2.origin}`; + return `\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${issue3.origin}`; default: return "\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644"; } @@ -62125,7 +58019,7 @@ function az_default() { var error3; var init_az = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/az.js"() { - init_util2(); + init_util(); error3 = () => { const Sizable = { string: { unit: "simvol", verb: "olmal\u0131d\u0131r" }, @@ -62136,7 +58030,7 @@ var init_az = __esm({ function getSizing(origin) { return Sizable[origin] ?? null; } - const parsedType4 = (data) => { + const parsedType5 = (data) => { const t = typeof data; switch (t) { case "number": { @@ -62186,30 +58080,30 @@ var init_az = __esm({ jwt: "JWT", template_literal: "input" }; - return (issue2) => { - switch (issue2.code) { + return (issue3) => { + switch (issue3.code) { case "invalid_type": - return `Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${issue2.expected}, daxil olan ${parsedType4(issue2.input)}`; + return `Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${issue3.expected}, daxil olan ${parsedType5(issue3.input)}`; case "invalid_value": - if (issue2.values.length === 1) - return `Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${stringifyPrimitive(issue2.values[0])}`; - return `Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${joinValues(issue2.values, "|")}`; + if (issue3.values.length === 1) + return `Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${stringifyPrimitive(issue3.values[0])}`; + return `Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${joinValues(issue3.values, "|")}`; case "too_big": { - const adj = issue2.inclusive ? "<=" : "<"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? "<=" : "<"; + const sizing = getSizing(issue3.origin); if (sizing) - return `\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${issue2.origin ?? "d\u0259y\u0259r"} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "element"}`; - return `\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${issue2.origin ?? "d\u0259y\u0259r"} ${adj}${issue2.maximum.toString()}`; + return `\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${issue3.origin ?? "d\u0259y\u0259r"} ${adj}${issue3.maximum.toString()} ${sizing.unit ?? "element"}`; + return `\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${issue3.origin ?? "d\u0259y\u0259r"} ${adj}${issue3.maximum.toString()}`; } case "too_small": { - const adj = issue2.inclusive ? ">=" : ">"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? ">=" : ">"; + const sizing = getSizing(issue3.origin); if (sizing) - return `\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${issue2.origin} ${adj}${issue2.minimum.toString()} ${sizing.unit}`; - return `\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${issue2.origin} ${adj}${issue2.minimum.toString()}`; + return `\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${issue3.origin} ${adj}${issue3.minimum.toString()} ${sizing.unit}`; + return `\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${issue3.origin} ${adj}${issue3.minimum.toString()}`; } case "invalid_format": { - const _issue = issue2; + const _issue = issue3; if (_issue.format === "starts_with") return `Yanl\u0131\u015F m\u0259tn: "${_issue.prefix}" il\u0259 ba\u015Flamal\u0131d\u0131r`; if (_issue.format === "ends_with") @@ -62218,18 +58112,18 @@ var init_az = __esm({ return `Yanl\u0131\u015F m\u0259tn: "${_issue.includes}" daxil olmal\u0131d\u0131r`; if (_issue.format === "regex") return `Yanl\u0131\u015F m\u0259tn: ${_issue.pattern} \u015Fablonuna uy\u011Fun olmal\u0131d\u0131r`; - return `Yanl\u0131\u015F ${Nouns[_issue.format] ?? issue2.format}`; + return `Yanl\u0131\u015F ${Nouns[_issue.format] ?? issue3.format}`; } case "not_multiple_of": - return `Yanl\u0131\u015F \u0259d\u0259d: ${issue2.divisor} il\u0259 b\xF6l\xFCn\u0259 bil\u0259n olmal\u0131d\u0131r`; + return `Yanl\u0131\u015F \u0259d\u0259d: ${issue3.divisor} il\u0259 b\xF6l\xFCn\u0259 bil\u0259n olmal\u0131d\u0131r`; case "unrecognized_keys": - return `Tan\u0131nmayan a\xE7ar${issue2.keys.length > 1 ? "lar" : ""}: ${joinValues(issue2.keys, ", ")}`; + return `Tan\u0131nmayan a\xE7ar${issue3.keys.length > 1 ? "lar" : ""}: ${joinValues(issue3.keys, ", ")}`; case "invalid_key": - return `${issue2.origin} daxilind\u0259 yanl\u0131\u015F a\xE7ar`; + return `${issue3.origin} daxilind\u0259 yanl\u0131\u015F a\xE7ar`; case "invalid_union": return "Yanl\u0131\u015F d\u0259y\u0259r"; case "invalid_element": - return `${issue2.origin} daxilind\u0259 yanl\u0131\u015F d\u0259y\u0259r`; + return `${issue3.origin} daxilind\u0259 yanl\u0131\u015F d\u0259y\u0259r`; default: return `Yanl\u0131\u015F d\u0259y\u0259r`; } @@ -62262,7 +58156,7 @@ function be_default() { var error4; var init_be = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/be.js"() { - init_util2(); + init_util(); error4 = () => { const Sizable = { string: { @@ -62301,7 +58195,7 @@ var init_be = __esm({ function getSizing(origin) { return Sizable[origin] ?? null; } - const parsedType4 = (data) => { + const parsedType5 = (data) => { const t = typeof data; switch (t) { case "number": { @@ -62351,36 +58245,36 @@ var init_be = __esm({ jwt: "JWT", template_literal: "\u0443\u0432\u043E\u0434" }; - return (issue2) => { - switch (issue2.code) { + return (issue3) => { + switch (issue3.code) { case "invalid_type": - return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F ${issue2.expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${parsedType4(issue2.input)}`; + return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F ${issue3.expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${parsedType5(issue3.input)}`; case "invalid_value": - if (issue2.values.length === 1) - return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F ${stringifyPrimitive(issue2.values[0])}`; - return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0432\u0430\u0440\u044B\u044F\u043D\u0442: \u0447\u0430\u043A\u0430\u045E\u0441\u044F \u0430\u0434\u0437\u0456\u043D \u0437 ${joinValues(issue2.values, "|")}`; + if (issue3.values.length === 1) + return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F ${stringifyPrimitive(issue3.values[0])}`; + return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0432\u0430\u0440\u044B\u044F\u043D\u0442: \u0447\u0430\u043A\u0430\u045E\u0441\u044F \u0430\u0434\u0437\u0456\u043D \u0437 ${joinValues(issue3.values, "|")}`; case "too_big": { - const adj = issue2.inclusive ? "<=" : "<"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? "<=" : "<"; + const sizing = getSizing(issue3.origin); if (sizing) { - const maxValue = Number(issue2.maximum); + const maxValue = Number(issue3.maximum); const unit = getBelarusianPlural(maxValue, sizing.unit.one, sizing.unit.few, sizing.unit.many); - return `\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${issue2.origin ?? "\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${sizing.verb} ${adj}${issue2.maximum.toString()} ${unit}`; + return `\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${issue3.origin ?? "\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${sizing.verb} ${adj}${issue3.maximum.toString()} ${unit}`; } - return `\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${issue2.origin ?? "\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${adj}${issue2.maximum.toString()}`; + return `\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${issue3.origin ?? "\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${adj}${issue3.maximum.toString()}`; } case "too_small": { - const adj = issue2.inclusive ? ">=" : ">"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? ">=" : ">"; + const sizing = getSizing(issue3.origin); if (sizing) { - const minValue = Number(issue2.minimum); + const minValue = Number(issue3.minimum); const unit = getBelarusianPlural(minValue, sizing.unit.one, sizing.unit.few, sizing.unit.many); - return `\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${issue2.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${sizing.verb} ${adj}${issue2.minimum.toString()} ${unit}`; + return `\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${issue3.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${sizing.verb} ${adj}${issue3.minimum.toString()} ${unit}`; } - return `\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${issue2.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${adj}${issue2.minimum.toString()}`; + return `\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${issue3.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${adj}${issue3.minimum.toString()}`; } case "invalid_format": { - const _issue = issue2; + const _issue = issue3; if (_issue.format === "starts_with") return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u043F\u0430\u0447\u044B\u043D\u0430\u0446\u0446\u0430 \u0437 "${_issue.prefix}"`; if (_issue.format === "ends_with") @@ -62389,18 +58283,18 @@ var init_be = __esm({ return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u043C\u044F\u0448\u0447\u0430\u0446\u044C "${_issue.includes}"`; if (_issue.format === "regex") return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0430\u0434\u043F\u0430\u0432\u044F\u0434\u0430\u0446\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${_issue.pattern}`; - return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B ${Nouns[_issue.format] ?? issue2.format}`; + return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B ${Nouns[_issue.format] ?? issue3.format}`; } case "not_multiple_of": - return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043B\u0456\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0431\u044B\u0446\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${issue2.divisor}`; + return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043B\u0456\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0431\u044B\u0446\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${issue3.divisor}`; case "unrecognized_keys": - return `\u041D\u0435\u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u043D\u044B ${issue2.keys.length > 1 ? "\u043A\u043B\u044E\u0447\u044B" : "\u043A\u043B\u044E\u0447"}: ${joinValues(issue2.keys, ", ")}`; + return `\u041D\u0435\u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u043D\u044B ${issue3.keys.length > 1 ? "\u043A\u043B\u044E\u0447\u044B" : "\u043A\u043B\u044E\u0447"}: ${joinValues(issue3.keys, ", ")}`; case "invalid_key": - return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043A\u043B\u044E\u0447 \u0443 ${issue2.origin}`; + return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043A\u043B\u044E\u0447 \u0443 ${issue3.origin}`; case "invalid_union": return "\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434"; case "invalid_element": - return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u0430\u0435 \u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435 \u045E ${issue2.origin}`; + return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u0430\u0435 \u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435 \u045E ${issue3.origin}`; default: return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434`; } @@ -62418,7 +58312,7 @@ function ca_default() { var error5; var init_ca = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/ca.js"() { - init_util2(); + init_util(); error5 = () => { const Sizable = { string: { unit: "car\xE0cters", verb: "contenir" }, @@ -62429,7 +58323,7 @@ var init_ca = __esm({ function getSizing(origin) { return Sizable[origin] ?? null; } - const parsedType4 = (data) => { + const parsedType5 = (data) => { const t = typeof data; switch (t) { case "number": { @@ -62479,32 +58373,32 @@ var init_ca = __esm({ jwt: "JWT", template_literal: "entrada" }; - return (issue2) => { - switch (issue2.code) { + return (issue3) => { + switch (issue3.code) { case "invalid_type": - return `Tipus inv\xE0lid: s'esperava ${issue2.expected}, s'ha rebut ${parsedType4(issue2.input)}`; + return `Tipus inv\xE0lid: s'esperava ${issue3.expected}, s'ha rebut ${parsedType5(issue3.input)}`; // return `Tipus invàlid: s'esperava ${issue.expected}, s'ha rebut ${util.getParsedType(issue.input)}`; case "invalid_value": - if (issue2.values.length === 1) - return `Valor inv\xE0lid: s'esperava ${stringifyPrimitive(issue2.values[0])}`; - return `Opci\xF3 inv\xE0lida: s'esperava una de ${joinValues(issue2.values, " o ")}`; + if (issue3.values.length === 1) + return `Valor inv\xE0lid: s'esperava ${stringifyPrimitive(issue3.values[0])}`; + return `Opci\xF3 inv\xE0lida: s'esperava una de ${joinValues(issue3.values, " o ")}`; case "too_big": { - const adj = issue2.inclusive ? "com a m\xE0xim" : "menys de"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? "com a m\xE0xim" : "menys de"; + const sizing = getSizing(issue3.origin); if (sizing) - return `Massa gran: s'esperava que ${issue2.origin ?? "el valor"} contingu\xE9s ${adj} ${issue2.maximum.toString()} ${sizing.unit ?? "elements"}`; - return `Massa gran: s'esperava que ${issue2.origin ?? "el valor"} fos ${adj} ${issue2.maximum.toString()}`; + return `Massa gran: s'esperava que ${issue3.origin ?? "el valor"} contingu\xE9s ${adj} ${issue3.maximum.toString()} ${sizing.unit ?? "elements"}`; + return `Massa gran: s'esperava que ${issue3.origin ?? "el valor"} fos ${adj} ${issue3.maximum.toString()}`; } case "too_small": { - const adj = issue2.inclusive ? "com a m\xEDnim" : "m\xE9s de"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? "com a m\xEDnim" : "m\xE9s de"; + const sizing = getSizing(issue3.origin); if (sizing) { - return `Massa petit: s'esperava que ${issue2.origin} contingu\xE9s ${adj} ${issue2.minimum.toString()} ${sizing.unit}`; + return `Massa petit: s'esperava que ${issue3.origin} contingu\xE9s ${adj} ${issue3.minimum.toString()} ${sizing.unit}`; } - return `Massa petit: s'esperava que ${issue2.origin} fos ${adj} ${issue2.minimum.toString()}`; + return `Massa petit: s'esperava que ${issue3.origin} fos ${adj} ${issue3.minimum.toString()}`; } case "invalid_format": { - const _issue = issue2; + const _issue = issue3; if (_issue.format === "starts_with") { return `Format inv\xE0lid: ha de comen\xE7ar amb "${_issue.prefix}"`; } @@ -62514,19 +58408,19 @@ var init_ca = __esm({ return `Format inv\xE0lid: ha d'incloure "${_issue.includes}"`; if (_issue.format === "regex") return `Format inv\xE0lid: ha de coincidir amb el patr\xF3 ${_issue.pattern}`; - return `Format inv\xE0lid per a ${Nouns[_issue.format] ?? issue2.format}`; + return `Format inv\xE0lid per a ${Nouns[_issue.format] ?? issue3.format}`; } case "not_multiple_of": - return `N\xFAmero inv\xE0lid: ha de ser m\xFAltiple de ${issue2.divisor}`; + return `N\xFAmero inv\xE0lid: ha de ser m\xFAltiple de ${issue3.divisor}`; case "unrecognized_keys": - return `Clau${issue2.keys.length > 1 ? "s" : ""} no reconeguda${issue2.keys.length > 1 ? "s" : ""}: ${joinValues(issue2.keys, ", ")}`; + return `Clau${issue3.keys.length > 1 ? "s" : ""} no reconeguda${issue3.keys.length > 1 ? "s" : ""}: ${joinValues(issue3.keys, ", ")}`; case "invalid_key": - return `Clau inv\xE0lida a ${issue2.origin}`; + return `Clau inv\xE0lida a ${issue3.origin}`; case "invalid_union": return "Entrada inv\xE0lida"; // Could also be "Tipus d'unió invàlid" but "Entrada invàlida" is more general case "invalid_element": - return `Element inv\xE0lid a ${issue2.origin}`; + return `Element inv\xE0lid a ${issue3.origin}`; default: return `Entrada inv\xE0lida`; } @@ -62544,7 +58438,7 @@ function cs_default() { var error6; var init_cs = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/cs.js"() { - init_util2(); + init_util(); error6 = () => { const Sizable = { string: { unit: "znak\u016F", verb: "m\xEDt" }, @@ -62555,7 +58449,7 @@ var init_cs = __esm({ function getSizing(origin) { return Sizable[origin] ?? null; } - const parsedType4 = (data) => { + const parsedType5 = (data) => { const t = typeof data; switch (t) { case "number": { @@ -62623,32 +58517,32 @@ var init_cs = __esm({ jwt: "JWT", template_literal: "vstup" }; - return (issue2) => { - switch (issue2.code) { + return (issue3) => { + switch (issue3.code) { case "invalid_type": - return `Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${issue2.expected}, obdr\u017Eeno ${parsedType4(issue2.input)}`; + return `Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${issue3.expected}, obdr\u017Eeno ${parsedType5(issue3.input)}`; case "invalid_value": - if (issue2.values.length === 1) - return `Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${stringifyPrimitive(issue2.values[0])}`; - return `Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${joinValues(issue2.values, "|")}`; + if (issue3.values.length === 1) + return `Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${stringifyPrimitive(issue3.values[0])}`; + return `Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${joinValues(issue3.values, "|")}`; case "too_big": { - const adj = issue2.inclusive ? "<=" : "<"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? "<=" : "<"; + const sizing = getSizing(issue3.origin); if (sizing) { - return `Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${issue2.origin ?? "hodnota"} mus\xED m\xEDt ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "prvk\u016F"}`; + return `Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${issue3.origin ?? "hodnota"} mus\xED m\xEDt ${adj}${issue3.maximum.toString()} ${sizing.unit ?? "prvk\u016F"}`; } - return `Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${issue2.origin ?? "hodnota"} mus\xED b\xFDt ${adj}${issue2.maximum.toString()}`; + return `Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${issue3.origin ?? "hodnota"} mus\xED b\xFDt ${adj}${issue3.maximum.toString()}`; } case "too_small": { - const adj = issue2.inclusive ? ">=" : ">"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? ">=" : ">"; + const sizing = getSizing(issue3.origin); if (sizing) { - return `Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${issue2.origin ?? "hodnota"} mus\xED m\xEDt ${adj}${issue2.minimum.toString()} ${sizing.unit ?? "prvk\u016F"}`; + return `Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${issue3.origin ?? "hodnota"} mus\xED m\xEDt ${adj}${issue3.minimum.toString()} ${sizing.unit ?? "prvk\u016F"}`; } - return `Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${issue2.origin ?? "hodnota"} mus\xED b\xFDt ${adj}${issue2.minimum.toString()}`; + return `Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${issue3.origin ?? "hodnota"} mus\xED b\xFDt ${adj}${issue3.minimum.toString()}`; } case "invalid_format": { - const _issue = issue2; + const _issue = issue3; if (_issue.format === "starts_with") return `Neplatn\xFD \u0159et\u011Bzec: mus\xED za\u010D\xEDnat na "${_issue.prefix}"`; if (_issue.format === "ends_with") @@ -62657,18 +58551,18 @@ var init_cs = __esm({ return `Neplatn\xFD \u0159et\u011Bzec: mus\xED obsahovat "${_issue.includes}"`; if (_issue.format === "regex") return `Neplatn\xFD \u0159et\u011Bzec: mus\xED odpov\xEDdat vzoru ${_issue.pattern}`; - return `Neplatn\xFD form\xE1t ${Nouns[_issue.format] ?? issue2.format}`; + return `Neplatn\xFD form\xE1t ${Nouns[_issue.format] ?? issue3.format}`; } case "not_multiple_of": - return `Neplatn\xE9 \u010D\xEDslo: mus\xED b\xFDt n\xE1sobkem ${issue2.divisor}`; + return `Neplatn\xE9 \u010D\xEDslo: mus\xED b\xFDt n\xE1sobkem ${issue3.divisor}`; case "unrecognized_keys": - return `Nezn\xE1m\xE9 kl\xED\u010De: ${joinValues(issue2.keys, ", ")}`; + return `Nezn\xE1m\xE9 kl\xED\u010De: ${joinValues(issue3.keys, ", ")}`; case "invalid_key": - return `Neplatn\xFD kl\xED\u010D v ${issue2.origin}`; + return `Neplatn\xFD kl\xED\u010D v ${issue3.origin}`; case "invalid_union": return "Neplatn\xFD vstup"; case "invalid_element": - return `Neplatn\xE1 hodnota v ${issue2.origin}`; + return `Neplatn\xE1 hodnota v ${issue3.origin}`; default: return `Neplatn\xFD vstup`; } @@ -62686,7 +58580,7 @@ function de_default() { var error7; var init_de = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/de.js"() { - init_util2(); + init_util(); error7 = () => { const Sizable = { string: { unit: "Zeichen", verb: "zu haben" }, @@ -62697,7 +58591,7 @@ var init_de = __esm({ function getSizing(origin) { return Sizable[origin] ?? null; } - const parsedType4 = (data) => { + const parsedType5 = (data) => { const t = typeof data; switch (t) { case "number": { @@ -62747,31 +58641,31 @@ var init_de = __esm({ jwt: "JWT", template_literal: "Eingabe" }; - return (issue2) => { - switch (issue2.code) { + return (issue3) => { + switch (issue3.code) { case "invalid_type": - return `Ung\xFCltige Eingabe: erwartet ${issue2.expected}, erhalten ${parsedType4(issue2.input)}`; + return `Ung\xFCltige Eingabe: erwartet ${issue3.expected}, erhalten ${parsedType5(issue3.input)}`; case "invalid_value": - if (issue2.values.length === 1) - return `Ung\xFCltige Eingabe: erwartet ${stringifyPrimitive(issue2.values[0])}`; - return `Ung\xFCltige Option: erwartet eine von ${joinValues(issue2.values, "|")}`; + if (issue3.values.length === 1) + return `Ung\xFCltige Eingabe: erwartet ${stringifyPrimitive(issue3.values[0])}`; + return `Ung\xFCltige Option: erwartet eine von ${joinValues(issue3.values, "|")}`; case "too_big": { - const adj = issue2.inclusive ? "<=" : "<"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? "<=" : "<"; + const sizing = getSizing(issue3.origin); if (sizing) - return `Zu gro\xDF: erwartet, dass ${issue2.origin ?? "Wert"} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "Elemente"} hat`; - return `Zu gro\xDF: erwartet, dass ${issue2.origin ?? "Wert"} ${adj}${issue2.maximum.toString()} ist`; + return `Zu gro\xDF: erwartet, dass ${issue3.origin ?? "Wert"} ${adj}${issue3.maximum.toString()} ${sizing.unit ?? "Elemente"} hat`; + return `Zu gro\xDF: erwartet, dass ${issue3.origin ?? "Wert"} ${adj}${issue3.maximum.toString()} ist`; } case "too_small": { - const adj = issue2.inclusive ? ">=" : ">"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? ">=" : ">"; + const sizing = getSizing(issue3.origin); if (sizing) { - return `Zu klein: erwartet, dass ${issue2.origin} ${adj}${issue2.minimum.toString()} ${sizing.unit} hat`; + return `Zu klein: erwartet, dass ${issue3.origin} ${adj}${issue3.minimum.toString()} ${sizing.unit} hat`; } - return `Zu klein: erwartet, dass ${issue2.origin} ${adj}${issue2.minimum.toString()} ist`; + return `Zu klein: erwartet, dass ${issue3.origin} ${adj}${issue3.minimum.toString()} ist`; } case "invalid_format": { - const _issue = issue2; + const _issue = issue3; if (_issue.format === "starts_with") return `Ung\xFCltiger String: muss mit "${_issue.prefix}" beginnen`; if (_issue.format === "ends_with") @@ -62780,18 +58674,18 @@ var init_de = __esm({ return `Ung\xFCltiger String: muss "${_issue.includes}" enthalten`; if (_issue.format === "regex") return `Ung\xFCltiger String: muss dem Muster ${_issue.pattern} entsprechen`; - return `Ung\xFCltig: ${Nouns[_issue.format] ?? issue2.format}`; + return `Ung\xFCltig: ${Nouns[_issue.format] ?? issue3.format}`; } case "not_multiple_of": - return `Ung\xFCltige Zahl: muss ein Vielfaches von ${issue2.divisor} sein`; + return `Ung\xFCltige Zahl: muss ein Vielfaches von ${issue3.divisor} sein`; case "unrecognized_keys": - return `${issue2.keys.length > 1 ? "Unbekannte Schl\xFCssel" : "Unbekannter Schl\xFCssel"}: ${joinValues(issue2.keys, ", ")}`; + return `${issue3.keys.length > 1 ? "Unbekannte Schl\xFCssel" : "Unbekannter Schl\xFCssel"}: ${joinValues(issue3.keys, ", ")}`; case "invalid_key": - return `Ung\xFCltiger Schl\xFCssel in ${issue2.origin}`; + return `Ung\xFCltiger Schl\xFCssel in ${issue3.origin}`; case "invalid_union": return "Ung\xFCltige Eingabe"; case "invalid_element": - return `Ung\xFCltiger Wert in ${issue2.origin}`; + return `Ung\xFCltiger Wert in ${issue3.origin}`; default: return `Ung\xFCltige Eingabe`; } @@ -62807,9 +58701,9 @@ function en_default4() { }; } var parsedType, error8; -var init_en2 = __esm({ +var init_en = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/en.js"() { - init_util2(); + init_util(); parsedType = (data) => { const t = typeof data; switch (t) { @@ -62870,31 +58764,31 @@ var init_en2 = __esm({ jwt: "JWT", template_literal: "input" }; - return (issue2) => { - switch (issue2.code) { + return (issue3) => { + switch (issue3.code) { case "invalid_type": - return `Invalid input: expected ${issue2.expected}, received ${parsedType(issue2.input)}`; + return `Invalid input: expected ${issue3.expected}, received ${parsedType(issue3.input)}`; case "invalid_value": - if (issue2.values.length === 1) - return `Invalid input: expected ${stringifyPrimitive(issue2.values[0])}`; - return `Invalid option: expected one of ${joinValues(issue2.values, "|")}`; + if (issue3.values.length === 1) + return `Invalid input: expected ${stringifyPrimitive(issue3.values[0])}`; + return `Invalid option: expected one of ${joinValues(issue3.values, "|")}`; case "too_big": { - const adj = issue2.inclusive ? "<=" : "<"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? "<=" : "<"; + const sizing = getSizing(issue3.origin); if (sizing) - return `Too big: expected ${issue2.origin ?? "value"} to have ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elements"}`; - return `Too big: expected ${issue2.origin ?? "value"} to be ${adj}${issue2.maximum.toString()}`; + return `Too big: expected ${issue3.origin ?? "value"} to have ${adj}${issue3.maximum.toString()} ${sizing.unit ?? "elements"}`; + return `Too big: expected ${issue3.origin ?? "value"} to be ${adj}${issue3.maximum.toString()}`; } case "too_small": { - const adj = issue2.inclusive ? ">=" : ">"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? ">=" : ">"; + const sizing = getSizing(issue3.origin); if (sizing) { - return `Too small: expected ${issue2.origin} to have ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + return `Too small: expected ${issue3.origin} to have ${adj}${issue3.minimum.toString()} ${sizing.unit}`; } - return `Too small: expected ${issue2.origin} to be ${adj}${issue2.minimum.toString()}`; + return `Too small: expected ${issue3.origin} to be ${adj}${issue3.minimum.toString()}`; } case "invalid_format": { - const _issue = issue2; + const _issue = issue3; if (_issue.format === "starts_with") { return `Invalid string: must start with "${_issue.prefix}"`; } @@ -62904,18 +58798,18 @@ var init_en2 = __esm({ return `Invalid string: must include "${_issue.includes}"`; if (_issue.format === "regex") return `Invalid string: must match pattern ${_issue.pattern}`; - return `Invalid ${Nouns[_issue.format] ?? issue2.format}`; + return `Invalid ${Nouns[_issue.format] ?? issue3.format}`; } case "not_multiple_of": - return `Invalid number: must be a multiple of ${issue2.divisor}`; + return `Invalid number: must be a multiple of ${issue3.divisor}`; case "unrecognized_keys": - return `Unrecognized key${issue2.keys.length > 1 ? "s" : ""}: ${joinValues(issue2.keys, ", ")}`; + return `Unrecognized key${issue3.keys.length > 1 ? "s" : ""}: ${joinValues(issue3.keys, ", ")}`; case "invalid_key": - return `Invalid key in ${issue2.origin}`; + return `Invalid key in ${issue3.origin}`; case "invalid_union": return "Invalid input"; case "invalid_element": - return `Invalid value in ${issue2.origin}`; + return `Invalid value in ${issue3.origin}`; default: return `Invalid input`; } @@ -62933,7 +58827,7 @@ function eo_default() { var parsedType2, error9; var init_eo = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/eo.js"() { - init_util2(); + init_util(); parsedType2 = (data) => { const t = typeof data; switch (t) { @@ -62994,31 +58888,31 @@ var init_eo = __esm({ jwt: "JWT", template_literal: "enigo" }; - return (issue2) => { - switch (issue2.code) { + return (issue3) => { + switch (issue3.code) { case "invalid_type": - return `Nevalida enigo: atendi\u011Dis ${issue2.expected}, ricevi\u011Dis ${parsedType2(issue2.input)}`; + return `Nevalida enigo: atendi\u011Dis ${issue3.expected}, ricevi\u011Dis ${parsedType2(issue3.input)}`; case "invalid_value": - if (issue2.values.length === 1) - return `Nevalida enigo: atendi\u011Dis ${stringifyPrimitive(issue2.values[0])}`; - return `Nevalida opcio: atendi\u011Dis unu el ${joinValues(issue2.values, "|")}`; + if (issue3.values.length === 1) + return `Nevalida enigo: atendi\u011Dis ${stringifyPrimitive(issue3.values[0])}`; + return `Nevalida opcio: atendi\u011Dis unu el ${joinValues(issue3.values, "|")}`; case "too_big": { - const adj = issue2.inclusive ? "<=" : "<"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? "<=" : "<"; + const sizing = getSizing(issue3.origin); if (sizing) - return `Tro granda: atendi\u011Dis ke ${issue2.origin ?? "valoro"} havu ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elementojn"}`; - return `Tro granda: atendi\u011Dis ke ${issue2.origin ?? "valoro"} havu ${adj}${issue2.maximum.toString()}`; + return `Tro granda: atendi\u011Dis ke ${issue3.origin ?? "valoro"} havu ${adj}${issue3.maximum.toString()} ${sizing.unit ?? "elementojn"}`; + return `Tro granda: atendi\u011Dis ke ${issue3.origin ?? "valoro"} havu ${adj}${issue3.maximum.toString()}`; } case "too_small": { - const adj = issue2.inclusive ? ">=" : ">"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? ">=" : ">"; + const sizing = getSizing(issue3.origin); if (sizing) { - return `Tro malgranda: atendi\u011Dis ke ${issue2.origin} havu ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + return `Tro malgranda: atendi\u011Dis ke ${issue3.origin} havu ${adj}${issue3.minimum.toString()} ${sizing.unit}`; } - return `Tro malgranda: atendi\u011Dis ke ${issue2.origin} estu ${adj}${issue2.minimum.toString()}`; + return `Tro malgranda: atendi\u011Dis ke ${issue3.origin} estu ${adj}${issue3.minimum.toString()}`; } case "invalid_format": { - const _issue = issue2; + const _issue = issue3; if (_issue.format === "starts_with") return `Nevalida karaktraro: devas komenci\u011Di per "${_issue.prefix}"`; if (_issue.format === "ends_with") @@ -63027,18 +58921,18 @@ var init_eo = __esm({ return `Nevalida karaktraro: devas inkluzivi "${_issue.includes}"`; if (_issue.format === "regex") return `Nevalida karaktraro: devas kongrui kun la modelo ${_issue.pattern}`; - return `Nevalida ${Nouns[_issue.format] ?? issue2.format}`; + return `Nevalida ${Nouns[_issue.format] ?? issue3.format}`; } case "not_multiple_of": - return `Nevalida nombro: devas esti oblo de ${issue2.divisor}`; + return `Nevalida nombro: devas esti oblo de ${issue3.divisor}`; case "unrecognized_keys": - return `Nekonata${issue2.keys.length > 1 ? "j" : ""} \u015Dlosilo${issue2.keys.length > 1 ? "j" : ""}: ${joinValues(issue2.keys, ", ")}`; + return `Nekonata${issue3.keys.length > 1 ? "j" : ""} \u015Dlosilo${issue3.keys.length > 1 ? "j" : ""}: ${joinValues(issue3.keys, ", ")}`; case "invalid_key": - return `Nevalida \u015Dlosilo en ${issue2.origin}`; + return `Nevalida \u015Dlosilo en ${issue3.origin}`; case "invalid_union": return "Nevalida enigo"; case "invalid_element": - return `Nevalida valoro en ${issue2.origin}`; + return `Nevalida valoro en ${issue3.origin}`; default: return `Nevalida enigo`; } @@ -63056,7 +58950,7 @@ function es_default() { var error10; var init_es = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/es.js"() { - init_util2(); + init_util(); error10 = () => { const Sizable = { string: { unit: "caracteres", verb: "tener" }, @@ -63067,7 +58961,7 @@ var init_es = __esm({ function getSizing(origin) { return Sizable[origin] ?? null; } - const parsedType4 = (data) => { + const parsedType5 = (data) => { const t = typeof data; switch (t) { case "number": { @@ -63117,32 +59011,32 @@ var init_es = __esm({ jwt: "JWT", template_literal: "entrada" }; - return (issue2) => { - switch (issue2.code) { + return (issue3) => { + switch (issue3.code) { case "invalid_type": - return `Entrada inv\xE1lida: se esperaba ${issue2.expected}, recibido ${parsedType4(issue2.input)}`; + return `Entrada inv\xE1lida: se esperaba ${issue3.expected}, recibido ${parsedType5(issue3.input)}`; // return `Entrada inválida: se esperaba ${issue.expected}, recibido ${util.getParsedType(issue.input)}`; case "invalid_value": - if (issue2.values.length === 1) - return `Entrada inv\xE1lida: se esperaba ${stringifyPrimitive(issue2.values[0])}`; - return `Opci\xF3n inv\xE1lida: se esperaba una de ${joinValues(issue2.values, "|")}`; + if (issue3.values.length === 1) + return `Entrada inv\xE1lida: se esperaba ${stringifyPrimitive(issue3.values[0])}`; + return `Opci\xF3n inv\xE1lida: se esperaba una de ${joinValues(issue3.values, "|")}`; case "too_big": { - const adj = issue2.inclusive ? "<=" : "<"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? "<=" : "<"; + const sizing = getSizing(issue3.origin); if (sizing) - return `Demasiado grande: se esperaba que ${issue2.origin ?? "valor"} tuviera ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elementos"}`; - return `Demasiado grande: se esperaba que ${issue2.origin ?? "valor"} fuera ${adj}${issue2.maximum.toString()}`; + return `Demasiado grande: se esperaba que ${issue3.origin ?? "valor"} tuviera ${adj}${issue3.maximum.toString()} ${sizing.unit ?? "elementos"}`; + return `Demasiado grande: se esperaba que ${issue3.origin ?? "valor"} fuera ${adj}${issue3.maximum.toString()}`; } case "too_small": { - const adj = issue2.inclusive ? ">=" : ">"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? ">=" : ">"; + const sizing = getSizing(issue3.origin); if (sizing) { - return `Demasiado peque\xF1o: se esperaba que ${issue2.origin} tuviera ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + return `Demasiado peque\xF1o: se esperaba que ${issue3.origin} tuviera ${adj}${issue3.minimum.toString()} ${sizing.unit}`; } - return `Demasiado peque\xF1o: se esperaba que ${issue2.origin} fuera ${adj}${issue2.minimum.toString()}`; + return `Demasiado peque\xF1o: se esperaba que ${issue3.origin} fuera ${adj}${issue3.minimum.toString()}`; } case "invalid_format": { - const _issue = issue2; + const _issue = issue3; if (_issue.format === "starts_with") return `Cadena inv\xE1lida: debe comenzar con "${_issue.prefix}"`; if (_issue.format === "ends_with") @@ -63151,18 +59045,18 @@ var init_es = __esm({ return `Cadena inv\xE1lida: debe incluir "${_issue.includes}"`; if (_issue.format === "regex") return `Cadena inv\xE1lida: debe coincidir con el patr\xF3n ${_issue.pattern}`; - return `Inv\xE1lido ${Nouns[_issue.format] ?? issue2.format}`; + return `Inv\xE1lido ${Nouns[_issue.format] ?? issue3.format}`; } case "not_multiple_of": - return `N\xFAmero inv\xE1lido: debe ser m\xFAltiplo de ${issue2.divisor}`; + return `N\xFAmero inv\xE1lido: debe ser m\xFAltiplo de ${issue3.divisor}`; case "unrecognized_keys": - return `Llave${issue2.keys.length > 1 ? "s" : ""} desconocida${issue2.keys.length > 1 ? "s" : ""}: ${joinValues(issue2.keys, ", ")}`; + return `Llave${issue3.keys.length > 1 ? "s" : ""} desconocida${issue3.keys.length > 1 ? "s" : ""}: ${joinValues(issue3.keys, ", ")}`; case "invalid_key": - return `Llave inv\xE1lida en ${issue2.origin}`; + return `Llave inv\xE1lida en ${issue3.origin}`; case "invalid_union": return "Entrada inv\xE1lida"; case "invalid_element": - return `Valor inv\xE1lido en ${issue2.origin}`; + return `Valor inv\xE1lido en ${issue3.origin}`; default: return `Entrada inv\xE1lida`; } @@ -63180,7 +59074,7 @@ function fa_default() { var error11; var init_fa = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/fa.js"() { - init_util2(); + init_util(); error11 = () => { const Sizable = { string: { unit: "\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631", verb: "\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F" }, @@ -63191,7 +59085,7 @@ var init_fa = __esm({ function getSizing(origin) { return Sizable[origin] ?? null; } - const parsedType4 = (data) => { + const parsedType5 = (data) => { const t = typeof data; switch (t) { case "number": { @@ -63241,33 +59135,33 @@ var init_fa = __esm({ jwt: "JWT", template_literal: "\u0648\u0631\u0648\u062F\u06CC" }; - return (issue2) => { - switch (issue2.code) { + return (issue3) => { + switch (issue3.code) { case "invalid_type": - return `\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${issue2.expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${parsedType4(issue2.input)} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`; + return `\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${issue3.expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${parsedType5(issue3.input)} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`; case "invalid_value": - if (issue2.values.length === 1) { - return `\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${stringifyPrimitive(issue2.values[0])} \u0645\u06CC\u200C\u0628\u0648\u062F`; + if (issue3.values.length === 1) { + return `\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${stringifyPrimitive(issue3.values[0])} \u0645\u06CC\u200C\u0628\u0648\u062F`; } - return `\u06AF\u0632\u06CC\u0646\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A \u06CC\u06A9\u06CC \u0627\u0632 ${joinValues(issue2.values, "|")} \u0645\u06CC\u200C\u0628\u0648\u062F`; + return `\u06AF\u0632\u06CC\u0646\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A \u06CC\u06A9\u06CC \u0627\u0632 ${joinValues(issue3.values, "|")} \u0645\u06CC\u200C\u0628\u0648\u062F`; case "too_big": { - const adj = issue2.inclusive ? "<=" : "<"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? "<=" : "<"; + const sizing = getSizing(issue3.origin); if (sizing) { - return `\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${issue2.origin ?? "\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\u0639\u0646\u0635\u0631"} \u0628\u0627\u0634\u062F`; + return `\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${issue3.origin ?? "\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${adj}${issue3.maximum.toString()} ${sizing.unit ?? "\u0639\u0646\u0635\u0631"} \u0628\u0627\u0634\u062F`; } - return `\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${issue2.origin ?? "\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${adj}${issue2.maximum.toString()} \u0628\u0627\u0634\u062F`; + return `\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${issue3.origin ?? "\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${adj}${issue3.maximum.toString()} \u0628\u0627\u0634\u062F`; } case "too_small": { - const adj = issue2.inclusive ? ">=" : ">"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? ">=" : ">"; + const sizing = getSizing(issue3.origin); if (sizing) { - return `\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${issue2.origin} \u0628\u0627\u06CC\u062F ${adj}${issue2.minimum.toString()} ${sizing.unit} \u0628\u0627\u0634\u062F`; + return `\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${issue3.origin} \u0628\u0627\u06CC\u062F ${adj}${issue3.minimum.toString()} ${sizing.unit} \u0628\u0627\u0634\u062F`; } - return `\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${issue2.origin} \u0628\u0627\u06CC\u062F ${adj}${issue2.minimum.toString()} \u0628\u0627\u0634\u062F`; + return `\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${issue3.origin} \u0628\u0627\u06CC\u062F ${adj}${issue3.minimum.toString()} \u0628\u0627\u0634\u062F`; } case "invalid_format": { - const _issue = issue2; + const _issue = issue3; if (_issue.format === "starts_with") { return `\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${_issue.prefix}" \u0634\u0631\u0648\u0639 \u0634\u0648\u062F`; } @@ -63280,18 +59174,18 @@ var init_fa = __esm({ if (_issue.format === "regex") { return `\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \u0627\u0644\u06AF\u0648\u06CC ${_issue.pattern} \u0645\u0637\u0627\u0628\u0642\u062A \u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F`; } - return `${Nouns[_issue.format] ?? issue2.format} \u0646\u0627\u0645\u0639\u062A\u0628\u0631`; + return `${Nouns[_issue.format] ?? issue3.format} \u0646\u0627\u0645\u0639\u062A\u0628\u0631`; } case "not_multiple_of": - return `\u0639\u062F\u062F \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0645\u0636\u0631\u0628 ${issue2.divisor} \u0628\u0627\u0634\u062F`; + return `\u0639\u062F\u062F \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0645\u0636\u0631\u0628 ${issue3.divisor} \u0628\u0627\u0634\u062F`; case "unrecognized_keys": - return `\u06A9\u0644\u06CC\u062F${issue2.keys.length > 1 ? "\u0647\u0627\u06CC" : ""} \u0646\u0627\u0634\u0646\u0627\u0633: ${joinValues(issue2.keys, ", ")}`; + return `\u06A9\u0644\u06CC\u062F${issue3.keys.length > 1 ? "\u0647\u0627\u06CC" : ""} \u0646\u0627\u0634\u0646\u0627\u0633: ${joinValues(issue3.keys, ", ")}`; case "invalid_key": - return `\u06A9\u0644\u06CC\u062F \u0646\u0627\u0634\u0646\u0627\u0633 \u062F\u0631 ${issue2.origin}`; + return `\u06A9\u0644\u06CC\u062F \u0646\u0627\u0634\u0646\u0627\u0633 \u062F\u0631 ${issue3.origin}`; case "invalid_union": return `\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631`; case "invalid_element": - return `\u0645\u0642\u062F\u0627\u0631 \u0646\u0627\u0645\u0639\u062A\u0628\u0631 \u062F\u0631 ${issue2.origin}`; + return `\u0645\u0642\u062F\u0627\u0631 \u0646\u0627\u0645\u0639\u062A\u0628\u0631 \u062F\u0631 ${issue3.origin}`; default: return `\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631`; } @@ -63309,7 +59203,7 @@ function fi_default() { var error12; var init_fi = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/fi.js"() { - init_util2(); + init_util(); error12 = () => { const Sizable = { string: { unit: "merkki\xE4", subject: "merkkijonon" }, @@ -63324,7 +59218,7 @@ var init_fi = __esm({ function getSizing(origin) { return Sizable[origin] ?? null; } - const parsedType4 = (data) => { + const parsedType5 = (data) => { const t = typeof data; switch (t) { case "number": { @@ -63374,32 +59268,32 @@ var init_fi = __esm({ jwt: "JWT", template_literal: "templaattimerkkijono" }; - return (issue2) => { - switch (issue2.code) { + return (issue3) => { + switch (issue3.code) { case "invalid_type": - return `Virheellinen tyyppi: odotettiin ${issue2.expected}, oli ${parsedType4(issue2.input)}`; + return `Virheellinen tyyppi: odotettiin ${issue3.expected}, oli ${parsedType5(issue3.input)}`; case "invalid_value": - if (issue2.values.length === 1) - return `Virheellinen sy\xF6te: t\xE4ytyy olla ${stringifyPrimitive(issue2.values[0])}`; - return `Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${joinValues(issue2.values, "|")}`; + if (issue3.values.length === 1) + return `Virheellinen sy\xF6te: t\xE4ytyy olla ${stringifyPrimitive(issue3.values[0])}`; + return `Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${joinValues(issue3.values, "|")}`; case "too_big": { - const adj = issue2.inclusive ? "<=" : "<"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? "<=" : "<"; + const sizing = getSizing(issue3.origin); if (sizing) { - return `Liian suuri: ${sizing.subject} t\xE4ytyy olla ${adj}${issue2.maximum.toString()} ${sizing.unit}`.trim(); + return `Liian suuri: ${sizing.subject} t\xE4ytyy olla ${adj}${issue3.maximum.toString()} ${sizing.unit}`.trim(); } - return `Liian suuri: arvon t\xE4ytyy olla ${adj}${issue2.maximum.toString()}`; + return `Liian suuri: arvon t\xE4ytyy olla ${adj}${issue3.maximum.toString()}`; } case "too_small": { - const adj = issue2.inclusive ? ">=" : ">"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? ">=" : ">"; + const sizing = getSizing(issue3.origin); if (sizing) { - return `Liian pieni: ${sizing.subject} t\xE4ytyy olla ${adj}${issue2.minimum.toString()} ${sizing.unit}`.trim(); + return `Liian pieni: ${sizing.subject} t\xE4ytyy olla ${adj}${issue3.minimum.toString()} ${sizing.unit}`.trim(); } - return `Liian pieni: arvon t\xE4ytyy olla ${adj}${issue2.minimum.toString()}`; + return `Liian pieni: arvon t\xE4ytyy olla ${adj}${issue3.minimum.toString()}`; } case "invalid_format": { - const _issue = issue2; + const _issue = issue3; if (_issue.format === "starts_with") return `Virheellinen sy\xF6te: t\xE4ytyy alkaa "${_issue.prefix}"`; if (_issue.format === "ends_with") @@ -63409,12 +59303,12 @@ var init_fi = __esm({ if (_issue.format === "regex") { return `Virheellinen sy\xF6te: t\xE4ytyy vastata s\xE4\xE4nn\xF6llist\xE4 lauseketta ${_issue.pattern}`; } - return `Virheellinen ${Nouns[_issue.format] ?? issue2.format}`; + return `Virheellinen ${Nouns[_issue.format] ?? issue3.format}`; } case "not_multiple_of": - return `Virheellinen luku: t\xE4ytyy olla luvun ${issue2.divisor} monikerta`; + return `Virheellinen luku: t\xE4ytyy olla luvun ${issue3.divisor} monikerta`; case "unrecognized_keys": - return `${issue2.keys.length > 1 ? "Tuntemattomat avaimet" : "Tuntematon avain"}: ${joinValues(issue2.keys, ", ")}`; + return `${issue3.keys.length > 1 ? "Tuntemattomat avaimet" : "Tuntematon avain"}: ${joinValues(issue3.keys, ", ")}`; case "invalid_key": return "Virheellinen avain tietueessa"; case "invalid_union": @@ -63438,7 +59332,7 @@ function fr_default() { var error13; var init_fr = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/fr.js"() { - init_util2(); + init_util(); error13 = () => { const Sizable = { string: { unit: "caract\xE8res", verb: "avoir" }, @@ -63449,7 +59343,7 @@ var init_fr = __esm({ function getSizing(origin) { return Sizable[origin] ?? null; } - const parsedType4 = (data) => { + const parsedType5 = (data) => { const t = typeof data; switch (t) { case "number": { @@ -63499,31 +59393,31 @@ var init_fr = __esm({ jwt: "JWT", template_literal: "entr\xE9e" }; - return (issue2) => { - switch (issue2.code) { + return (issue3) => { + switch (issue3.code) { case "invalid_type": - return `Entr\xE9e invalide : ${issue2.expected} attendu, ${parsedType4(issue2.input)} re\xE7u`; + return `Entr\xE9e invalide : ${issue3.expected} attendu, ${parsedType5(issue3.input)} re\xE7u`; case "invalid_value": - if (issue2.values.length === 1) - return `Entr\xE9e invalide : ${stringifyPrimitive(issue2.values[0])} attendu`; - return `Option invalide : une valeur parmi ${joinValues(issue2.values, "|")} attendue`; + if (issue3.values.length === 1) + return `Entr\xE9e invalide : ${stringifyPrimitive(issue3.values[0])} attendu`; + return `Option invalide : une valeur parmi ${joinValues(issue3.values, "|")} attendue`; case "too_big": { - const adj = issue2.inclusive ? "<=" : "<"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? "<=" : "<"; + const sizing = getSizing(issue3.origin); if (sizing) - return `Trop grand : ${issue2.origin ?? "valeur"} doit ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\xE9l\xE9ment(s)"}`; - return `Trop grand : ${issue2.origin ?? "valeur"} doit \xEAtre ${adj}${issue2.maximum.toString()}`; + return `Trop grand : ${issue3.origin ?? "valeur"} doit ${sizing.verb} ${adj}${issue3.maximum.toString()} ${sizing.unit ?? "\xE9l\xE9ment(s)"}`; + return `Trop grand : ${issue3.origin ?? "valeur"} doit \xEAtre ${adj}${issue3.maximum.toString()}`; } case "too_small": { - const adj = issue2.inclusive ? ">=" : ">"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? ">=" : ">"; + const sizing = getSizing(issue3.origin); if (sizing) { - return `Trop petit : ${issue2.origin} doit ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + return `Trop petit : ${issue3.origin} doit ${sizing.verb} ${adj}${issue3.minimum.toString()} ${sizing.unit}`; } - return `Trop petit : ${issue2.origin} doit \xEAtre ${adj}${issue2.minimum.toString()}`; + return `Trop petit : ${issue3.origin} doit \xEAtre ${adj}${issue3.minimum.toString()}`; } case "invalid_format": { - const _issue = issue2; + const _issue = issue3; if (_issue.format === "starts_with") return `Cha\xEEne invalide : doit commencer par "${_issue.prefix}"`; if (_issue.format === "ends_with") @@ -63532,18 +59426,18 @@ var init_fr = __esm({ return `Cha\xEEne invalide : doit inclure "${_issue.includes}"`; if (_issue.format === "regex") return `Cha\xEEne invalide : doit correspondre au mod\xE8le ${_issue.pattern}`; - return `${Nouns[_issue.format] ?? issue2.format} invalide`; + return `${Nouns[_issue.format] ?? issue3.format} invalide`; } case "not_multiple_of": - return `Nombre invalide : doit \xEAtre un multiple de ${issue2.divisor}`; + return `Nombre invalide : doit \xEAtre un multiple de ${issue3.divisor}`; case "unrecognized_keys": - return `Cl\xE9${issue2.keys.length > 1 ? "s" : ""} non reconnue${issue2.keys.length > 1 ? "s" : ""} : ${joinValues(issue2.keys, ", ")}`; + return `Cl\xE9${issue3.keys.length > 1 ? "s" : ""} non reconnue${issue3.keys.length > 1 ? "s" : ""} : ${joinValues(issue3.keys, ", ")}`; case "invalid_key": - return `Cl\xE9 invalide dans ${issue2.origin}`; + return `Cl\xE9 invalide dans ${issue3.origin}`; case "invalid_union": return "Entr\xE9e invalide"; case "invalid_element": - return `Valeur invalide dans ${issue2.origin}`; + return `Valeur invalide dans ${issue3.origin}`; default: return `Entr\xE9e invalide`; } @@ -63561,7 +59455,7 @@ function fr_CA_default() { var error14; var init_fr_CA = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/fr-CA.js"() { - init_util2(); + init_util(); error14 = () => { const Sizable = { string: { unit: "caract\xE8res", verb: "avoir" }, @@ -63572,7 +59466,7 @@ var init_fr_CA = __esm({ function getSizing(origin) { return Sizable[origin] ?? null; } - const parsedType4 = (data) => { + const parsedType5 = (data) => { const t = typeof data; switch (t) { case "number": { @@ -63622,31 +59516,31 @@ var init_fr_CA = __esm({ jwt: "JWT", template_literal: "entr\xE9e" }; - return (issue2) => { - switch (issue2.code) { + return (issue3) => { + switch (issue3.code) { case "invalid_type": - return `Entr\xE9e invalide : attendu ${issue2.expected}, re\xE7u ${parsedType4(issue2.input)}`; + return `Entr\xE9e invalide : attendu ${issue3.expected}, re\xE7u ${parsedType5(issue3.input)}`; case "invalid_value": - if (issue2.values.length === 1) - return `Entr\xE9e invalide : attendu ${stringifyPrimitive(issue2.values[0])}`; - return `Option invalide : attendu l'une des valeurs suivantes ${joinValues(issue2.values, "|")}`; + if (issue3.values.length === 1) + return `Entr\xE9e invalide : attendu ${stringifyPrimitive(issue3.values[0])}`; + return `Option invalide : attendu l'une des valeurs suivantes ${joinValues(issue3.values, "|")}`; case "too_big": { - const adj = issue2.inclusive ? "\u2264" : "<"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? "\u2264" : "<"; + const sizing = getSizing(issue3.origin); if (sizing) - return `Trop grand : attendu que ${issue2.origin ?? "la valeur"} ait ${adj}${issue2.maximum.toString()} ${sizing.unit}`; - return `Trop grand : attendu que ${issue2.origin ?? "la valeur"} soit ${adj}${issue2.maximum.toString()}`; + return `Trop grand : attendu que ${issue3.origin ?? "la valeur"} ait ${adj}${issue3.maximum.toString()} ${sizing.unit}`; + return `Trop grand : attendu que ${issue3.origin ?? "la valeur"} soit ${adj}${issue3.maximum.toString()}`; } case "too_small": { - const adj = issue2.inclusive ? "\u2265" : ">"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? "\u2265" : ">"; + const sizing = getSizing(issue3.origin); if (sizing) { - return `Trop petit : attendu que ${issue2.origin} ait ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + return `Trop petit : attendu que ${issue3.origin} ait ${adj}${issue3.minimum.toString()} ${sizing.unit}`; } - return `Trop petit : attendu que ${issue2.origin} soit ${adj}${issue2.minimum.toString()}`; + return `Trop petit : attendu que ${issue3.origin} soit ${adj}${issue3.minimum.toString()}`; } case "invalid_format": { - const _issue = issue2; + const _issue = issue3; if (_issue.format === "starts_with") { return `Cha\xEEne invalide : doit commencer par "${_issue.prefix}"`; } @@ -63656,18 +59550,18 @@ var init_fr_CA = __esm({ return `Cha\xEEne invalide : doit inclure "${_issue.includes}"`; if (_issue.format === "regex") return `Cha\xEEne invalide : doit correspondre au motif ${_issue.pattern}`; - return `${Nouns[_issue.format] ?? issue2.format} invalide`; + return `${Nouns[_issue.format] ?? issue3.format} invalide`; } case "not_multiple_of": - return `Nombre invalide : doit \xEAtre un multiple de ${issue2.divisor}`; + return `Nombre invalide : doit \xEAtre un multiple de ${issue3.divisor}`; case "unrecognized_keys": - return `Cl\xE9${issue2.keys.length > 1 ? "s" : ""} non reconnue${issue2.keys.length > 1 ? "s" : ""} : ${joinValues(issue2.keys, ", ")}`; + return `Cl\xE9${issue3.keys.length > 1 ? "s" : ""} non reconnue${issue3.keys.length > 1 ? "s" : ""} : ${joinValues(issue3.keys, ", ")}`; case "invalid_key": - return `Cl\xE9 invalide dans ${issue2.origin}`; + return `Cl\xE9 invalide dans ${issue3.origin}`; case "invalid_union": return "Entr\xE9e invalide"; case "invalid_element": - return `Valeur invalide dans ${issue2.origin}`; + return `Valeur invalide dans ${issue3.origin}`; default: return `Entr\xE9e invalide`; } @@ -63685,7 +59579,7 @@ function he_default() { var error15; var init_he = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/he.js"() { - init_util2(); + init_util(); error15 = () => { const Sizable = { string: { unit: "\u05D0\u05D5\u05EA\u05D9\u05D5\u05EA", verb: "\u05DC\u05DB\u05DC\u05D5\u05DC" }, @@ -63696,7 +59590,7 @@ var init_he = __esm({ function getSizing(origin) { return Sizable[origin] ?? null; } - const parsedType4 = (data) => { + const parsedType5 = (data) => { const t = typeof data; switch (t) { case "number": { @@ -63746,32 +59640,32 @@ var init_he = __esm({ jwt: "JWT", template_literal: "\u05E7\u05DC\u05D8" }; - return (issue2) => { - switch (issue2.code) { + return (issue3) => { + switch (issue3.code) { case "invalid_type": - return `\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA ${issue2.expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${parsedType4(issue2.input)}`; + return `\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA ${issue3.expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${parsedType5(issue3.input)}`; // return `Invalid input: expected ${issue.expected}, received ${util.getParsedType(issue.input)}`; case "invalid_value": - if (issue2.values.length === 1) - return `\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA ${stringifyPrimitive(issue2.values[0])}`; - return `\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05D0\u05D7\u05EA \u05DE\u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA ${joinValues(issue2.values, "|")}`; + if (issue3.values.length === 1) + return `\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA ${stringifyPrimitive(issue3.values[0])}`; + return `\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05D0\u05D7\u05EA \u05DE\u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA ${joinValues(issue3.values, "|")}`; case "too_big": { - const adj = issue2.inclusive ? "<=" : "<"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? "<=" : "<"; + const sizing = getSizing(issue3.origin); if (sizing) - return `\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${issue2.origin ?? "value"} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elements"}`; - return `\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${issue2.origin ?? "value"} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${adj}${issue2.maximum.toString()}`; + return `\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${issue3.origin ?? "value"} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${adj}${issue3.maximum.toString()} ${sizing.unit ?? "elements"}`; + return `\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${issue3.origin ?? "value"} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${adj}${issue3.maximum.toString()}`; } case "too_small": { - const adj = issue2.inclusive ? ">=" : ">"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? ">=" : ">"; + const sizing = getSizing(issue3.origin); if (sizing) { - return `\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${issue2.origin} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + return `\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${issue3.origin} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${adj}${issue3.minimum.toString()} ${sizing.unit}`; } - return `\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${issue2.origin} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${adj}${issue2.minimum.toString()}`; + return `\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${issue3.origin} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${adj}${issue3.minimum.toString()}`; } case "invalid_format": { - const _issue = issue2; + const _issue = issue3; if (_issue.format === "starts_with") return `\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05E0\u05D4: \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1"${_issue.prefix}"`; if (_issue.format === "ends_with") @@ -63780,18 +59674,18 @@ var init_he = __esm({ return `\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05E0\u05D4: \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC "${_issue.includes}"`; if (_issue.format === "regex") return `\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05E0\u05D4: \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D0\u05D9\u05DD \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA ${_issue.pattern}`; - return `${Nouns[_issue.format] ?? issue2.format} \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF`; + return `${Nouns[_issue.format] ?? issue3.format} \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF`; } case "not_multiple_of": - return `\u05DE\u05E1\u05E4\u05E8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA \u05DE\u05DB\u05E4\u05DC\u05D4 \u05E9\u05DC ${issue2.divisor}`; + return `\u05DE\u05E1\u05E4\u05E8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA \u05DE\u05DB\u05E4\u05DC\u05D4 \u05E9\u05DC ${issue3.divisor}`; case "unrecognized_keys": - return `\u05DE\u05E4\u05EA\u05D7${issue2.keys.length > 1 ? "\u05D5\u05EA" : ""} \u05DC\u05D0 \u05DE\u05D6\u05D5\u05D4${issue2.keys.length > 1 ? "\u05D9\u05DD" : "\u05D4"}: ${joinValues(issue2.keys, ", ")}`; + return `\u05DE\u05E4\u05EA\u05D7${issue3.keys.length > 1 ? "\u05D5\u05EA" : ""} \u05DC\u05D0 \u05DE\u05D6\u05D5\u05D4${issue3.keys.length > 1 ? "\u05D9\u05DD" : "\u05D4"}: ${joinValues(issue3.keys, ", ")}`; case "invalid_key": - return `\u05DE\u05E4\u05EA\u05D7 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1${issue2.origin}`; + return `\u05DE\u05E4\u05EA\u05D7 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1${issue3.origin}`; case "invalid_union": return "\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF"; case "invalid_element": - return `\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1${issue2.origin}`; + return `\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1${issue3.origin}`; default: return `\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF`; } @@ -63809,7 +59703,7 @@ function hu_default() { var error16; var init_hu = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/hu.js"() { - init_util2(); + init_util(); error16 = () => { const Sizable = { string: { unit: "karakter", verb: "legyen" }, @@ -63820,7 +59714,7 @@ var init_hu = __esm({ function getSizing(origin) { return Sizable[origin] ?? null; } - const parsedType4 = (data) => { + const parsedType5 = (data) => { const t = typeof data; switch (t) { case "number": { @@ -63870,32 +59764,32 @@ var init_hu = __esm({ jwt: "JWT", template_literal: "bemenet" }; - return (issue2) => { - switch (issue2.code) { + return (issue3) => { + switch (issue3.code) { case "invalid_type": - return `\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${issue2.expected}, a kapott \xE9rt\xE9k ${parsedType4(issue2.input)}`; + return `\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${issue3.expected}, a kapott \xE9rt\xE9k ${parsedType5(issue3.input)}`; // return `Invalid input: expected ${issue.expected}, received ${util.getParsedType(issue.input)}`; case "invalid_value": - if (issue2.values.length === 1) - return `\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${stringifyPrimitive(issue2.values[0])}`; - return `\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${joinValues(issue2.values, "|")}`; + if (issue3.values.length === 1) + return `\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${stringifyPrimitive(issue3.values[0])}`; + return `\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${joinValues(issue3.values, "|")}`; case "too_big": { - const adj = issue2.inclusive ? "<=" : "<"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? "<=" : "<"; + const sizing = getSizing(issue3.origin); if (sizing) - return `T\xFAl nagy: ${issue2.origin ?? "\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elem"}`; - return `T\xFAl nagy: a bemeneti \xE9rt\xE9k ${issue2.origin ?? "\xE9rt\xE9k"} t\xFAl nagy: ${adj}${issue2.maximum.toString()}`; + return `T\xFAl nagy: ${issue3.origin ?? "\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${adj}${issue3.maximum.toString()} ${sizing.unit ?? "elem"}`; + return `T\xFAl nagy: a bemeneti \xE9rt\xE9k ${issue3.origin ?? "\xE9rt\xE9k"} t\xFAl nagy: ${adj}${issue3.maximum.toString()}`; } case "too_small": { - const adj = issue2.inclusive ? ">=" : ">"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? ">=" : ">"; + const sizing = getSizing(issue3.origin); if (sizing) { - return `T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${issue2.origin} m\xE9rete t\xFAl kicsi ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + return `T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${issue3.origin} m\xE9rete t\xFAl kicsi ${adj}${issue3.minimum.toString()} ${sizing.unit}`; } - return `T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${issue2.origin} t\xFAl kicsi ${adj}${issue2.minimum.toString()}`; + return `T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${issue3.origin} t\xFAl kicsi ${adj}${issue3.minimum.toString()}`; } case "invalid_format": { - const _issue = issue2; + const _issue = issue3; if (_issue.format === "starts_with") return `\xC9rv\xE9nytelen string: "${_issue.prefix}" \xE9rt\xE9kkel kell kezd\u0151dnie`; if (_issue.format === "ends_with") @@ -63904,18 +59798,18 @@ var init_hu = __esm({ return `\xC9rv\xE9nytelen string: "${_issue.includes}" \xE9rt\xE9ket kell tartalmaznia`; if (_issue.format === "regex") return `\xC9rv\xE9nytelen string: ${_issue.pattern} mint\xE1nak kell megfelelnie`; - return `\xC9rv\xE9nytelen ${Nouns[_issue.format] ?? issue2.format}`; + return `\xC9rv\xE9nytelen ${Nouns[_issue.format] ?? issue3.format}`; } case "not_multiple_of": - return `\xC9rv\xE9nytelen sz\xE1m: ${issue2.divisor} t\xF6bbsz\xF6r\xF6s\xE9nek kell lennie`; + return `\xC9rv\xE9nytelen sz\xE1m: ${issue3.divisor} t\xF6bbsz\xF6r\xF6s\xE9nek kell lennie`; case "unrecognized_keys": - return `Ismeretlen kulcs${issue2.keys.length > 1 ? "s" : ""}: ${joinValues(issue2.keys, ", ")}`; + return `Ismeretlen kulcs${issue3.keys.length > 1 ? "s" : ""}: ${joinValues(issue3.keys, ", ")}`; case "invalid_key": - return `\xC9rv\xE9nytelen kulcs ${issue2.origin}`; + return `\xC9rv\xE9nytelen kulcs ${issue3.origin}`; case "invalid_union": return "\xC9rv\xE9nytelen bemenet"; case "invalid_element": - return `\xC9rv\xE9nytelen \xE9rt\xE9k: ${issue2.origin}`; + return `\xC9rv\xE9nytelen \xE9rt\xE9k: ${issue3.origin}`; default: return `\xC9rv\xE9nytelen bemenet`; } @@ -63933,7 +59827,7 @@ function id_default() { var error17; var init_id = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/id.js"() { - init_util2(); + init_util(); error17 = () => { const Sizable = { string: { unit: "karakter", verb: "memiliki" }, @@ -63944,7 +59838,7 @@ var init_id = __esm({ function getSizing(origin) { return Sizable[origin] ?? null; } - const parsedType4 = (data) => { + const parsedType5 = (data) => { const t = typeof data; switch (t) { case "number": { @@ -63994,31 +59888,31 @@ var init_id = __esm({ jwt: "JWT", template_literal: "input" }; - return (issue2) => { - switch (issue2.code) { + return (issue3) => { + switch (issue3.code) { case "invalid_type": - return `Input tidak valid: diharapkan ${issue2.expected}, diterima ${parsedType4(issue2.input)}`; + return `Input tidak valid: diharapkan ${issue3.expected}, diterima ${parsedType5(issue3.input)}`; case "invalid_value": - if (issue2.values.length === 1) - return `Input tidak valid: diharapkan ${stringifyPrimitive(issue2.values[0])}`; - return `Pilihan tidak valid: diharapkan salah satu dari ${joinValues(issue2.values, "|")}`; + if (issue3.values.length === 1) + return `Input tidak valid: diharapkan ${stringifyPrimitive(issue3.values[0])}`; + return `Pilihan tidak valid: diharapkan salah satu dari ${joinValues(issue3.values, "|")}`; case "too_big": { - const adj = issue2.inclusive ? "<=" : "<"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? "<=" : "<"; + const sizing = getSizing(issue3.origin); if (sizing) - return `Terlalu besar: diharapkan ${issue2.origin ?? "value"} memiliki ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elemen"}`; - return `Terlalu besar: diharapkan ${issue2.origin ?? "value"} menjadi ${adj}${issue2.maximum.toString()}`; + return `Terlalu besar: diharapkan ${issue3.origin ?? "value"} memiliki ${adj}${issue3.maximum.toString()} ${sizing.unit ?? "elemen"}`; + return `Terlalu besar: diharapkan ${issue3.origin ?? "value"} menjadi ${adj}${issue3.maximum.toString()}`; } case "too_small": { - const adj = issue2.inclusive ? ">=" : ">"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? ">=" : ">"; + const sizing = getSizing(issue3.origin); if (sizing) { - return `Terlalu kecil: diharapkan ${issue2.origin} memiliki ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + return `Terlalu kecil: diharapkan ${issue3.origin} memiliki ${adj}${issue3.minimum.toString()} ${sizing.unit}`; } - return `Terlalu kecil: diharapkan ${issue2.origin} menjadi ${adj}${issue2.minimum.toString()}`; + return `Terlalu kecil: diharapkan ${issue3.origin} menjadi ${adj}${issue3.minimum.toString()}`; } case "invalid_format": { - const _issue = issue2; + const _issue = issue3; if (_issue.format === "starts_with") return `String tidak valid: harus dimulai dengan "${_issue.prefix}"`; if (_issue.format === "ends_with") @@ -64027,18 +59921,18 @@ var init_id = __esm({ return `String tidak valid: harus menyertakan "${_issue.includes}"`; if (_issue.format === "regex") return `String tidak valid: harus sesuai pola ${_issue.pattern}`; - return `${Nouns[_issue.format] ?? issue2.format} tidak valid`; + return `${Nouns[_issue.format] ?? issue3.format} tidak valid`; } case "not_multiple_of": - return `Angka tidak valid: harus kelipatan dari ${issue2.divisor}`; + return `Angka tidak valid: harus kelipatan dari ${issue3.divisor}`; case "unrecognized_keys": - return `Kunci tidak dikenali ${issue2.keys.length > 1 ? "s" : ""}: ${joinValues(issue2.keys, ", ")}`; + return `Kunci tidak dikenali ${issue3.keys.length > 1 ? "s" : ""}: ${joinValues(issue3.keys, ", ")}`; case "invalid_key": - return `Kunci tidak valid di ${issue2.origin}`; + return `Kunci tidak valid di ${issue3.origin}`; case "invalid_union": return "Input tidak valid"; case "invalid_element": - return `Nilai tidak valid di ${issue2.origin}`; + return `Nilai tidak valid di ${issue3.origin}`; default: return `Input tidak valid`; } @@ -64056,7 +59950,7 @@ function it_default() { var error18; var init_it = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/it.js"() { - init_util2(); + init_util(); error18 = () => { const Sizable = { string: { unit: "caratteri", verb: "avere" }, @@ -64067,7 +59961,7 @@ var init_it = __esm({ function getSizing(origin) { return Sizable[origin] ?? null; } - const parsedType4 = (data) => { + const parsedType5 = (data) => { const t = typeof data; switch (t) { case "number": { @@ -64117,32 +60011,32 @@ var init_it = __esm({ jwt: "JWT", template_literal: "input" }; - return (issue2) => { - switch (issue2.code) { + return (issue3) => { + switch (issue3.code) { case "invalid_type": - return `Input non valido: atteso ${issue2.expected}, ricevuto ${parsedType4(issue2.input)}`; + return `Input non valido: atteso ${issue3.expected}, ricevuto ${parsedType5(issue3.input)}`; // return `Input non valido: atteso ${issue.expected}, ricevuto ${util.getParsedType(issue.input)}`; case "invalid_value": - if (issue2.values.length === 1) - return `Input non valido: atteso ${stringifyPrimitive(issue2.values[0])}`; - return `Opzione non valida: atteso uno tra ${joinValues(issue2.values, "|")}`; + if (issue3.values.length === 1) + return `Input non valido: atteso ${stringifyPrimitive(issue3.values[0])}`; + return `Opzione non valida: atteso uno tra ${joinValues(issue3.values, "|")}`; case "too_big": { - const adj = issue2.inclusive ? "<=" : "<"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? "<=" : "<"; + const sizing = getSizing(issue3.origin); if (sizing) - return `Troppo grande: ${issue2.origin ?? "valore"} deve avere ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elementi"}`; - return `Troppo grande: ${issue2.origin ?? "valore"} deve essere ${adj}${issue2.maximum.toString()}`; + return `Troppo grande: ${issue3.origin ?? "valore"} deve avere ${adj}${issue3.maximum.toString()} ${sizing.unit ?? "elementi"}`; + return `Troppo grande: ${issue3.origin ?? "valore"} deve essere ${adj}${issue3.maximum.toString()}`; } case "too_small": { - const adj = issue2.inclusive ? ">=" : ">"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? ">=" : ">"; + const sizing = getSizing(issue3.origin); if (sizing) { - return `Troppo piccolo: ${issue2.origin} deve avere ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + return `Troppo piccolo: ${issue3.origin} deve avere ${adj}${issue3.minimum.toString()} ${sizing.unit}`; } - return `Troppo piccolo: ${issue2.origin} deve essere ${adj}${issue2.minimum.toString()}`; + return `Troppo piccolo: ${issue3.origin} deve essere ${adj}${issue3.minimum.toString()}`; } case "invalid_format": { - const _issue = issue2; + const _issue = issue3; if (_issue.format === "starts_with") return `Stringa non valida: deve iniziare con "${_issue.prefix}"`; if (_issue.format === "ends_with") @@ -64151,18 +60045,18 @@ var init_it = __esm({ return `Stringa non valida: deve includere "${_issue.includes}"`; if (_issue.format === "regex") return `Stringa non valida: deve corrispondere al pattern ${_issue.pattern}`; - return `Invalid ${Nouns[_issue.format] ?? issue2.format}`; + return `Invalid ${Nouns[_issue.format] ?? issue3.format}`; } case "not_multiple_of": - return `Numero non valido: deve essere un multiplo di ${issue2.divisor}`; + return `Numero non valido: deve essere un multiplo di ${issue3.divisor}`; case "unrecognized_keys": - return `Chiav${issue2.keys.length > 1 ? "i" : "e"} non riconosciut${issue2.keys.length > 1 ? "e" : "a"}: ${joinValues(issue2.keys, ", ")}`; + return `Chiav${issue3.keys.length > 1 ? "i" : "e"} non riconosciut${issue3.keys.length > 1 ? "e" : "a"}: ${joinValues(issue3.keys, ", ")}`; case "invalid_key": - return `Chiave non valida in ${issue2.origin}`; + return `Chiave non valida in ${issue3.origin}`; case "invalid_union": return "Input non valido"; case "invalid_element": - return `Valore non valido in ${issue2.origin}`; + return `Valore non valido in ${issue3.origin}`; default: return `Input non valido`; } @@ -64180,7 +60074,7 @@ function ja_default() { var error19; var init_ja = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/ja.js"() { - init_util2(); + init_util(); error19 = () => { const Sizable = { string: { unit: "\u6587\u5B57", verb: "\u3067\u3042\u308B" }, @@ -64191,7 +60085,7 @@ var init_ja = __esm({ function getSizing(origin) { return Sizable[origin] ?? null; } - const parsedType4 = (data) => { + const parsedType5 = (data) => { const t = typeof data; switch (t) { case "number": { @@ -64241,30 +60135,30 @@ var init_ja = __esm({ jwt: "JWT", template_literal: "\u5165\u529B\u5024" }; - return (issue2) => { - switch (issue2.code) { + return (issue3) => { + switch (issue3.code) { case "invalid_type": - return `\u7121\u52B9\u306A\u5165\u529B: ${issue2.expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${parsedType4(issue2.input)}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`; + return `\u7121\u52B9\u306A\u5165\u529B: ${issue3.expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${parsedType5(issue3.input)}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`; case "invalid_value": - if (issue2.values.length === 1) - return `\u7121\u52B9\u306A\u5165\u529B: ${stringifyPrimitive(issue2.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`; - return `\u7121\u52B9\u306A\u9078\u629E: ${joinValues(issue2.values, "\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; + if (issue3.values.length === 1) + return `\u7121\u52B9\u306A\u5165\u529B: ${stringifyPrimitive(issue3.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`; + return `\u7121\u52B9\u306A\u9078\u629E: ${joinValues(issue3.values, "\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; case "too_big": { - const adj = issue2.inclusive ? "\u4EE5\u4E0B\u3067\u3042\u308B" : "\u3088\u308A\u5C0F\u3055\u3044"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? "\u4EE5\u4E0B\u3067\u3042\u308B" : "\u3088\u308A\u5C0F\u3055\u3044"; + const sizing = getSizing(issue3.origin); if (sizing) - return `\u5927\u304D\u3059\u304E\u308B\u5024: ${issue2.origin ?? "\u5024"}\u306F${issue2.maximum.toString()}${sizing.unit ?? "\u8981\u7D20"}${adj}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; - return `\u5927\u304D\u3059\u304E\u308B\u5024: ${issue2.origin ?? "\u5024"}\u306F${issue2.maximum.toString()}${adj}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; + return `\u5927\u304D\u3059\u304E\u308B\u5024: ${issue3.origin ?? "\u5024"}\u306F${issue3.maximum.toString()}${sizing.unit ?? "\u8981\u7D20"}${adj}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; + return `\u5927\u304D\u3059\u304E\u308B\u5024: ${issue3.origin ?? "\u5024"}\u306F${issue3.maximum.toString()}${adj}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; } case "too_small": { - const adj = issue2.inclusive ? "\u4EE5\u4E0A\u3067\u3042\u308B" : "\u3088\u308A\u5927\u304D\u3044"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? "\u4EE5\u4E0A\u3067\u3042\u308B" : "\u3088\u308A\u5927\u304D\u3044"; + const sizing = getSizing(issue3.origin); if (sizing) - return `\u5C0F\u3055\u3059\u304E\u308B\u5024: ${issue2.origin}\u306F${issue2.minimum.toString()}${sizing.unit}${adj}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; - return `\u5C0F\u3055\u3059\u304E\u308B\u5024: ${issue2.origin}\u306F${issue2.minimum.toString()}${adj}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; + return `\u5C0F\u3055\u3059\u304E\u308B\u5024: ${issue3.origin}\u306F${issue3.minimum.toString()}${sizing.unit}${adj}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; + return `\u5C0F\u3055\u3059\u304E\u308B\u5024: ${issue3.origin}\u306F${issue3.minimum.toString()}${adj}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; } case "invalid_format": { - const _issue = issue2; + const _issue = issue3; if (_issue.format === "starts_with") return `\u7121\u52B9\u306A\u6587\u5B57\u5217: "${_issue.prefix}"\u3067\u59CB\u307E\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; if (_issue.format === "ends_with") @@ -64273,18 +60167,18 @@ var init_ja = __esm({ return `\u7121\u52B9\u306A\u6587\u5B57\u5217: "${_issue.includes}"\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; if (_issue.format === "regex") return `\u7121\u52B9\u306A\u6587\u5B57\u5217: \u30D1\u30BF\u30FC\u30F3${_issue.pattern}\u306B\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; - return `\u7121\u52B9\u306A${Nouns[_issue.format] ?? issue2.format}`; + return `\u7121\u52B9\u306A${Nouns[_issue.format] ?? issue3.format}`; } case "not_multiple_of": - return `\u7121\u52B9\u306A\u6570\u5024: ${issue2.divisor}\u306E\u500D\u6570\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; + return `\u7121\u52B9\u306A\u6570\u5024: ${issue3.divisor}\u306E\u500D\u6570\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; case "unrecognized_keys": - return `\u8A8D\u8B58\u3055\u308C\u3066\u3044\u306A\u3044\u30AD\u30FC${issue2.keys.length > 1 ? "\u7FA4" : ""}: ${joinValues(issue2.keys, "\u3001")}`; + return `\u8A8D\u8B58\u3055\u308C\u3066\u3044\u306A\u3044\u30AD\u30FC${issue3.keys.length > 1 ? "\u7FA4" : ""}: ${joinValues(issue3.keys, "\u3001")}`; case "invalid_key": - return `${issue2.origin}\u5185\u306E\u7121\u52B9\u306A\u30AD\u30FC`; + return `${issue3.origin}\u5185\u306E\u7121\u52B9\u306A\u30AD\u30FC`; case "invalid_union": return "\u7121\u52B9\u306A\u5165\u529B"; case "invalid_element": - return `${issue2.origin}\u5185\u306E\u7121\u52B9\u306A\u5024`; + return `${issue3.origin}\u5185\u306E\u7121\u52B9\u306A\u5024`; default: return `\u7121\u52B9\u306A\u5165\u529B`; } @@ -64302,7 +60196,7 @@ function kh_default() { var error20; var init_kh = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/kh.js"() { - init_util2(); + init_util(); error20 = () => { const Sizable = { string: { unit: "\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A", verb: "\u1782\u17BD\u179A\u1798\u17B6\u1793" }, @@ -64313,7 +60207,7 @@ var init_kh = __esm({ function getSizing(origin) { return Sizable[origin] ?? null; } - const parsedType4 = (data) => { + const parsedType5 = (data) => { const t = typeof data; switch (t) { case "number": { @@ -64363,31 +60257,31 @@ var init_kh = __esm({ jwt: "JWT", template_literal: "\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B" }; - return (issue2) => { - switch (issue2.code) { + return (issue3) => { + switch (issue3.code) { case "invalid_type": - return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${issue2.expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${parsedType4(issue2.input)}`; + return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${issue3.expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${parsedType5(issue3.input)}`; case "invalid_value": - if (issue2.values.length === 1) - return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${stringifyPrimitive(issue2.values[0])}`; - return `\u1787\u1798\u17D2\u179A\u17BE\u179F\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1787\u17B6\u1798\u17BD\u1799\u1780\u17D2\u1793\u17BB\u1784\u1785\u17C6\u178E\u17C4\u1798 ${joinValues(issue2.values, "|")}`; + if (issue3.values.length === 1) + return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${stringifyPrimitive(issue3.values[0])}`; + return `\u1787\u1798\u17D2\u179A\u17BE\u179F\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1787\u17B6\u1798\u17BD\u1799\u1780\u17D2\u1793\u17BB\u1784\u1785\u17C6\u178E\u17C4\u1798 ${joinValues(issue3.values, "|")}`; case "too_big": { - const adj = issue2.inclusive ? "<=" : "<"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? "<=" : "<"; + const sizing = getSizing(issue3.origin); if (sizing) - return `\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${issue2.origin ?? "\u178F\u1798\u17D2\u179B\u17C3"} ${adj} ${issue2.maximum.toString()} ${sizing.unit ?? "\u1792\u17B6\u178F\u17BB"}`; - return `\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${issue2.origin ?? "\u178F\u1798\u17D2\u179B\u17C3"} ${adj} ${issue2.maximum.toString()}`; + return `\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${issue3.origin ?? "\u178F\u1798\u17D2\u179B\u17C3"} ${adj} ${issue3.maximum.toString()} ${sizing.unit ?? "\u1792\u17B6\u178F\u17BB"}`; + return `\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${issue3.origin ?? "\u178F\u1798\u17D2\u179B\u17C3"} ${adj} ${issue3.maximum.toString()}`; } case "too_small": { - const adj = issue2.inclusive ? ">=" : ">"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? ">=" : ">"; + const sizing = getSizing(issue3.origin); if (sizing) { - return `\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${issue2.origin} ${adj} ${issue2.minimum.toString()} ${sizing.unit}`; + return `\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${issue3.origin} ${adj} ${issue3.minimum.toString()} ${sizing.unit}`; } - return `\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${issue2.origin} ${adj} ${issue2.minimum.toString()}`; + return `\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${issue3.origin} ${adj} ${issue3.minimum.toString()}`; } case "invalid_format": { - const _issue = issue2; + const _issue = issue3; if (_issue.format === "starts_with") { return `\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1785\u17B6\u1794\u17CB\u1795\u17D2\u178F\u17BE\u1798\u178A\u17C4\u1799 "${_issue.prefix}"`; } @@ -64397,18 +60291,18 @@ var init_kh = __esm({ return `\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1798\u17B6\u1793 "${_issue.includes}"`; if (_issue.format === "regex") return `\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1795\u17D2\u1782\u17BC\u1795\u17D2\u1782\u1784\u1793\u17B9\u1784\u1791\u1798\u17D2\u179A\u1784\u17CB\u178A\u17C2\u179B\u1794\u17B6\u1793\u1780\u17C6\u178E\u178F\u17CB ${_issue.pattern}`; - return `\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 ${Nouns[_issue.format] ?? issue2.format}`; + return `\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 ${Nouns[_issue.format] ?? issue3.format}`; } case "not_multiple_of": - return `\u179B\u17C1\u1781\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1787\u17B6\u1796\u17A0\u17BB\u1782\u17BB\u178E\u1793\u17C3 ${issue2.divisor}`; + return `\u179B\u17C1\u1781\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1787\u17B6\u1796\u17A0\u17BB\u1782\u17BB\u178E\u1793\u17C3 ${issue3.divisor}`; case "unrecognized_keys": - return `\u179A\u1780\u1783\u17BE\u1789\u179F\u17C4\u1798\u17B7\u1793\u179F\u17D2\u1782\u17B6\u179B\u17CB\u17D6 ${joinValues(issue2.keys, ", ")}`; + return `\u179A\u1780\u1783\u17BE\u1789\u179F\u17C4\u1798\u17B7\u1793\u179F\u17D2\u1782\u17B6\u179B\u17CB\u17D6 ${joinValues(issue3.keys, ", ")}`; case "invalid_key": - return `\u179F\u17C4\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${issue2.origin}`; + return `\u179F\u17C4\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${issue3.origin}`; case "invalid_union": return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C`; case "invalid_element": - return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${issue2.origin}`; + return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${issue3.origin}`; default: return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C`; } @@ -64426,7 +60320,7 @@ function ko_default() { var error21; var init_ko = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/ko.js"() { - init_util2(); + init_util(); error21 = () => { const Sizable = { string: { unit: "\uBB38\uC790", verb: "to have" }, @@ -64437,7 +60331,7 @@ var init_ko = __esm({ function getSizing(origin) { return Sizable[origin] ?? null; } - const parsedType4 = (data) => { + const parsedType5 = (data) => { const t = typeof data; switch (t) { case "number": { @@ -64487,35 +60381,35 @@ var init_ko = __esm({ jwt: "JWT", template_literal: "\uC785\uB825" }; - return (issue2) => { - switch (issue2.code) { + return (issue3) => { + switch (issue3.code) { case "invalid_type": - return `\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${issue2.expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${parsedType4(issue2.input)}\uC785\uB2C8\uB2E4`; + return `\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${issue3.expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${parsedType5(issue3.input)}\uC785\uB2C8\uB2E4`; case "invalid_value": - if (issue2.values.length === 1) - return `\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${stringifyPrimitive(issue2.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`; - return `\uC798\uBABB\uB41C \uC635\uC158: ${joinValues(issue2.values, "\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`; + if (issue3.values.length === 1) + return `\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${stringifyPrimitive(issue3.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`; + return `\uC798\uBABB\uB41C \uC635\uC158: ${joinValues(issue3.values, "\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`; case "too_big": { - const adj = issue2.inclusive ? "\uC774\uD558" : "\uBBF8\uB9CC"; + const adj = issue3.inclusive ? "\uC774\uD558" : "\uBBF8\uB9CC"; const suffix2 = adj === "\uBBF8\uB9CC" ? "\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4" : "\uC5EC\uC57C \uD569\uB2C8\uB2E4"; - const sizing = getSizing(issue2.origin); + const sizing = getSizing(issue3.origin); const unit = sizing?.unit ?? "\uC694\uC18C"; if (sizing) - return `${issue2.origin ?? "\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${issue2.maximum.toString()}${unit} ${adj}${suffix2}`; - return `${issue2.origin ?? "\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${issue2.maximum.toString()} ${adj}${suffix2}`; + return `${issue3.origin ?? "\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${issue3.maximum.toString()}${unit} ${adj}${suffix2}`; + return `${issue3.origin ?? "\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${issue3.maximum.toString()} ${adj}${suffix2}`; } case "too_small": { - const adj = issue2.inclusive ? "\uC774\uC0C1" : "\uCD08\uACFC"; + const adj = issue3.inclusive ? "\uC774\uC0C1" : "\uCD08\uACFC"; const suffix2 = adj === "\uC774\uC0C1" ? "\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4" : "\uC5EC\uC57C \uD569\uB2C8\uB2E4"; - const sizing = getSizing(issue2.origin); + const sizing = getSizing(issue3.origin); const unit = sizing?.unit ?? "\uC694\uC18C"; if (sizing) { - return `${issue2.origin ?? "\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${issue2.minimum.toString()}${unit} ${adj}${suffix2}`; + return `${issue3.origin ?? "\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${issue3.minimum.toString()}${unit} ${adj}${suffix2}`; } - return `${issue2.origin ?? "\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${issue2.minimum.toString()} ${adj}${suffix2}`; + return `${issue3.origin ?? "\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${issue3.minimum.toString()} ${adj}${suffix2}`; } case "invalid_format": { - const _issue = issue2; + const _issue = issue3; if (_issue.format === "starts_with") { return `\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${_issue.prefix}"(\uC73C)\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4`; } @@ -64525,18 +60419,18 @@ var init_ko = __esm({ return `\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${_issue.includes}"\uC744(\uB97C) \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4`; if (_issue.format === "regex") return `\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \uC815\uADDC\uC2DD ${_issue.pattern} \uD328\uD134\uACFC \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4`; - return `\uC798\uBABB\uB41C ${Nouns[_issue.format] ?? issue2.format}`; + return `\uC798\uBABB\uB41C ${Nouns[_issue.format] ?? issue3.format}`; } case "not_multiple_of": - return `\uC798\uBABB\uB41C \uC22B\uC790: ${issue2.divisor}\uC758 \uBC30\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4`; + return `\uC798\uBABB\uB41C \uC22B\uC790: ${issue3.divisor}\uC758 \uBC30\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4`; case "unrecognized_keys": - return `\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uD0A4: ${joinValues(issue2.keys, ", ")}`; + return `\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uD0A4: ${joinValues(issue3.keys, ", ")}`; case "invalid_key": - return `\uC798\uBABB\uB41C \uD0A4: ${issue2.origin}`; + return `\uC798\uBABB\uB41C \uD0A4: ${issue3.origin}`; case "invalid_union": return `\uC798\uBABB\uB41C \uC785\uB825`; case "invalid_element": - return `\uC798\uBABB\uB41C \uAC12: ${issue2.origin}`; + return `\uC798\uBABB\uB41C \uAC12: ${issue3.origin}`; default: return `\uC798\uBABB\uB41C \uC785\uB825`; } @@ -64554,7 +60448,7 @@ function mk_default() { var error22; var init_mk = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/mk.js"() { - init_util2(); + init_util(); error22 = () => { const Sizable = { string: { unit: "\u0437\u043D\u0430\u0446\u0438", verb: "\u0434\u0430 \u0438\u043C\u0430\u0430\u0442" }, @@ -64565,7 +60459,7 @@ var init_mk = __esm({ function getSizing(origin) { return Sizable[origin] ?? null; } - const parsedType4 = (data) => { + const parsedType5 = (data) => { const t = typeof data; switch (t) { case "number": { @@ -64615,32 +60509,32 @@ var init_mk = __esm({ jwt: "JWT", template_literal: "\u0432\u043D\u0435\u0441" }; - return (issue2) => { - switch (issue2.code) { + return (issue3) => { + switch (issue3.code) { case "invalid_type": - return `\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${issue2.expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${parsedType4(issue2.input)}`; + return `\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${issue3.expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${parsedType5(issue3.input)}`; // return `Invalid input: expected ${issue.expected}, received ${util.getParsedType(issue.input)}`; case "invalid_value": - if (issue2.values.length === 1) - return `Invalid input: expected ${stringifyPrimitive(issue2.values[0])}`; - return `\u0413\u0440\u0435\u0448\u0430\u043D\u0430 \u043E\u043F\u0446\u0438\u0458\u0430: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 \u0435\u0434\u043D\u0430 ${joinValues(issue2.values, "|")}`; + if (issue3.values.length === 1) + return `Invalid input: expected ${stringifyPrimitive(issue3.values[0])}`; + return `\u0413\u0440\u0435\u0448\u0430\u043D\u0430 \u043E\u043F\u0446\u0438\u0458\u0430: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 \u0435\u0434\u043D\u0430 ${joinValues(issue3.values, "|")}`; case "too_big": { - const adj = issue2.inclusive ? "<=" : "<"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? "<=" : "<"; + const sizing = getSizing(issue3.origin); if (sizing) - return `\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${issue2.origin ?? "\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0438\u043C\u0430 ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0438"}`; - return `\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${issue2.origin ?? "\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0431\u0438\u0434\u0435 ${adj}${issue2.maximum.toString()}`; + return `\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${issue3.origin ?? "\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0438\u043C\u0430 ${adj}${issue3.maximum.toString()} ${sizing.unit ?? "\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0438"}`; + return `\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${issue3.origin ?? "\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0431\u0438\u0434\u0435 ${adj}${issue3.maximum.toString()}`; } case "too_small": { - const adj = issue2.inclusive ? ">=" : ">"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? ">=" : ">"; + const sizing = getSizing(issue3.origin); if (sizing) { - return `\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${issue2.origin} \u0434\u0430 \u0438\u043C\u0430 ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + return `\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${issue3.origin} \u0434\u0430 \u0438\u043C\u0430 ${adj}${issue3.minimum.toString()} ${sizing.unit}`; } - return `\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${issue2.origin} \u0434\u0430 \u0431\u0438\u0434\u0435 ${adj}${issue2.minimum.toString()}`; + return `\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${issue3.origin} \u0434\u0430 \u0431\u0438\u0434\u0435 ${adj}${issue3.minimum.toString()}`; } case "invalid_format": { - const _issue = issue2; + const _issue = issue3; if (_issue.format === "starts_with") { return `\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u043D\u0443\u0432\u0430 \u0441\u043E "${_issue.prefix}"`; } @@ -64650,18 +60544,18 @@ var init_mk = __esm({ return `\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0432\u043A\u043B\u0443\u0447\u0443\u0432\u0430 "${_issue.includes}"`; if (_issue.format === "regex") return `\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u043E\u0434\u0433\u043E\u0430\u0440\u0430 \u043D\u0430 \u043F\u0430\u0442\u0435\u0440\u043D\u043E\u0442 ${_issue.pattern}`; - return `Invalid ${Nouns[_issue.format] ?? issue2.format}`; + return `Invalid ${Nouns[_issue.format] ?? issue3.format}`; } case "not_multiple_of": - return `\u0413\u0440\u0435\u0448\u0435\u043D \u0431\u0440\u043E\u0458: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0431\u0438\u0434\u0435 \u0434\u0435\u043B\u0438\u0432 \u0441\u043E ${issue2.divisor}`; + return `\u0413\u0440\u0435\u0448\u0435\u043D \u0431\u0440\u043E\u0458: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0431\u0438\u0434\u0435 \u0434\u0435\u043B\u0438\u0432 \u0441\u043E ${issue3.divisor}`; case "unrecognized_keys": - return `${issue2.keys.length > 1 ? "\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D\u0438 \u043A\u043B\u0443\u0447\u0435\u0432\u0438" : "\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D \u043A\u043B\u0443\u0447"}: ${joinValues(issue2.keys, ", ")}`; + return `${issue3.keys.length > 1 ? "\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D\u0438 \u043A\u043B\u0443\u0447\u0435\u0432\u0438" : "\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D \u043A\u043B\u0443\u0447"}: ${joinValues(issue3.keys, ", ")}`; case "invalid_key": - return `\u0413\u0440\u0435\u0448\u0435\u043D \u043A\u043B\u0443\u0447 \u0432\u043E ${issue2.origin}`; + return `\u0413\u0440\u0435\u0448\u0435\u043D \u043A\u043B\u0443\u0447 \u0432\u043E ${issue3.origin}`; case "invalid_union": return "\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441"; case "invalid_element": - return `\u0413\u0440\u0435\u0448\u043D\u0430 \u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442 \u0432\u043E ${issue2.origin}`; + return `\u0413\u0440\u0435\u0448\u043D\u0430 \u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442 \u0432\u043E ${issue3.origin}`; default: return `\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441`; } @@ -64679,7 +60573,7 @@ function ms_default() { var error23; var init_ms = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/ms.js"() { - init_util2(); + init_util(); error23 = () => { const Sizable = { string: { unit: "aksara", verb: "mempunyai" }, @@ -64690,7 +60584,7 @@ var init_ms = __esm({ function getSizing(origin) { return Sizable[origin] ?? null; } - const parsedType4 = (data) => { + const parsedType5 = (data) => { const t = typeof data; switch (t) { case "number": { @@ -64740,31 +60634,31 @@ var init_ms = __esm({ jwt: "JWT", template_literal: "input" }; - return (issue2) => { - switch (issue2.code) { + return (issue3) => { + switch (issue3.code) { case "invalid_type": - return `Input tidak sah: dijangka ${issue2.expected}, diterima ${parsedType4(issue2.input)}`; + return `Input tidak sah: dijangka ${issue3.expected}, diterima ${parsedType5(issue3.input)}`; case "invalid_value": - if (issue2.values.length === 1) - return `Input tidak sah: dijangka ${stringifyPrimitive(issue2.values[0])}`; - return `Pilihan tidak sah: dijangka salah satu daripada ${joinValues(issue2.values, "|")}`; + if (issue3.values.length === 1) + return `Input tidak sah: dijangka ${stringifyPrimitive(issue3.values[0])}`; + return `Pilihan tidak sah: dijangka salah satu daripada ${joinValues(issue3.values, "|")}`; case "too_big": { - const adj = issue2.inclusive ? "<=" : "<"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? "<=" : "<"; + const sizing = getSizing(issue3.origin); if (sizing) - return `Terlalu besar: dijangka ${issue2.origin ?? "nilai"} ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elemen"}`; - return `Terlalu besar: dijangka ${issue2.origin ?? "nilai"} adalah ${adj}${issue2.maximum.toString()}`; + return `Terlalu besar: dijangka ${issue3.origin ?? "nilai"} ${sizing.verb} ${adj}${issue3.maximum.toString()} ${sizing.unit ?? "elemen"}`; + return `Terlalu besar: dijangka ${issue3.origin ?? "nilai"} adalah ${adj}${issue3.maximum.toString()}`; } case "too_small": { - const adj = issue2.inclusive ? ">=" : ">"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? ">=" : ">"; + const sizing = getSizing(issue3.origin); if (sizing) { - return `Terlalu kecil: dijangka ${issue2.origin} ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + return `Terlalu kecil: dijangka ${issue3.origin} ${sizing.verb} ${adj}${issue3.minimum.toString()} ${sizing.unit}`; } - return `Terlalu kecil: dijangka ${issue2.origin} adalah ${adj}${issue2.minimum.toString()}`; + return `Terlalu kecil: dijangka ${issue3.origin} adalah ${adj}${issue3.minimum.toString()}`; } case "invalid_format": { - const _issue = issue2; + const _issue = issue3; if (_issue.format === "starts_with") return `String tidak sah: mesti bermula dengan "${_issue.prefix}"`; if (_issue.format === "ends_with") @@ -64773,18 +60667,18 @@ var init_ms = __esm({ return `String tidak sah: mesti mengandungi "${_issue.includes}"`; if (_issue.format === "regex") return `String tidak sah: mesti sepadan dengan corak ${_issue.pattern}`; - return `${Nouns[_issue.format] ?? issue2.format} tidak sah`; + return `${Nouns[_issue.format] ?? issue3.format} tidak sah`; } case "not_multiple_of": - return `Nombor tidak sah: perlu gandaan ${issue2.divisor}`; + return `Nombor tidak sah: perlu gandaan ${issue3.divisor}`; case "unrecognized_keys": - return `Kunci tidak dikenali: ${joinValues(issue2.keys, ", ")}`; + return `Kunci tidak dikenali: ${joinValues(issue3.keys, ", ")}`; case "invalid_key": - return `Kunci tidak sah dalam ${issue2.origin}`; + return `Kunci tidak sah dalam ${issue3.origin}`; case "invalid_union": return "Input tidak sah"; case "invalid_element": - return `Nilai tidak sah dalam ${issue2.origin}`; + return `Nilai tidak sah dalam ${issue3.origin}`; default: return `Input tidak sah`; } @@ -64802,7 +60696,7 @@ function nl_default() { var error24; var init_nl = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/nl.js"() { - init_util2(); + init_util(); error24 = () => { const Sizable = { string: { unit: "tekens" }, @@ -64813,7 +60707,7 @@ var init_nl = __esm({ function getSizing(origin) { return Sizable[origin] ?? null; } - const parsedType4 = (data) => { + const parsedType5 = (data) => { const t = typeof data; switch (t) { case "number": { @@ -64863,31 +60757,31 @@ var init_nl = __esm({ jwt: "JWT", template_literal: "invoer" }; - return (issue2) => { - switch (issue2.code) { + return (issue3) => { + switch (issue3.code) { case "invalid_type": - return `Ongeldige invoer: verwacht ${issue2.expected}, ontving ${parsedType4(issue2.input)}`; + return `Ongeldige invoer: verwacht ${issue3.expected}, ontving ${parsedType5(issue3.input)}`; case "invalid_value": - if (issue2.values.length === 1) - return `Ongeldige invoer: verwacht ${stringifyPrimitive(issue2.values[0])}`; - return `Ongeldige optie: verwacht \xE9\xE9n van ${joinValues(issue2.values, "|")}`; + if (issue3.values.length === 1) + return `Ongeldige invoer: verwacht ${stringifyPrimitive(issue3.values[0])}`; + return `Ongeldige optie: verwacht \xE9\xE9n van ${joinValues(issue3.values, "|")}`; case "too_big": { - const adj = issue2.inclusive ? "<=" : "<"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? "<=" : "<"; + const sizing = getSizing(issue3.origin); if (sizing) - return `Te lang: verwacht dat ${issue2.origin ?? "waarde"} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elementen"} bevat`; - return `Te lang: verwacht dat ${issue2.origin ?? "waarde"} ${adj}${issue2.maximum.toString()} is`; + return `Te lang: verwacht dat ${issue3.origin ?? "waarde"} ${adj}${issue3.maximum.toString()} ${sizing.unit ?? "elementen"} bevat`; + return `Te lang: verwacht dat ${issue3.origin ?? "waarde"} ${adj}${issue3.maximum.toString()} is`; } case "too_small": { - const adj = issue2.inclusive ? ">=" : ">"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? ">=" : ">"; + const sizing = getSizing(issue3.origin); if (sizing) { - return `Te kort: verwacht dat ${issue2.origin} ${adj}${issue2.minimum.toString()} ${sizing.unit} bevat`; + return `Te kort: verwacht dat ${issue3.origin} ${adj}${issue3.minimum.toString()} ${sizing.unit} bevat`; } - return `Te kort: verwacht dat ${issue2.origin} ${adj}${issue2.minimum.toString()} is`; + return `Te kort: verwacht dat ${issue3.origin} ${adj}${issue3.minimum.toString()} is`; } case "invalid_format": { - const _issue = issue2; + const _issue = issue3; if (_issue.format === "starts_with") { return `Ongeldige tekst: moet met "${_issue.prefix}" beginnen`; } @@ -64897,18 +60791,18 @@ var init_nl = __esm({ return `Ongeldige tekst: moet "${_issue.includes}" bevatten`; if (_issue.format === "regex") return `Ongeldige tekst: moet overeenkomen met patroon ${_issue.pattern}`; - return `Ongeldig: ${Nouns[_issue.format] ?? issue2.format}`; + return `Ongeldig: ${Nouns[_issue.format] ?? issue3.format}`; } case "not_multiple_of": - return `Ongeldig getal: moet een veelvoud van ${issue2.divisor} zijn`; + return `Ongeldig getal: moet een veelvoud van ${issue3.divisor} zijn`; case "unrecognized_keys": - return `Onbekende key${issue2.keys.length > 1 ? "s" : ""}: ${joinValues(issue2.keys, ", ")}`; + return `Onbekende key${issue3.keys.length > 1 ? "s" : ""}: ${joinValues(issue3.keys, ", ")}`; case "invalid_key": - return `Ongeldige key in ${issue2.origin}`; + return `Ongeldige key in ${issue3.origin}`; case "invalid_union": return "Ongeldige invoer"; case "invalid_element": - return `Ongeldige waarde in ${issue2.origin}`; + return `Ongeldige waarde in ${issue3.origin}`; default: return `Ongeldige invoer`; } @@ -64926,7 +60820,7 @@ function no_default() { var error25; var init_no = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/no.js"() { - init_util2(); + init_util(); error25 = () => { const Sizable = { string: { unit: "tegn", verb: "\xE5 ha" }, @@ -64937,7 +60831,7 @@ var init_no = __esm({ function getSizing(origin) { return Sizable[origin] ?? null; } - const parsedType4 = (data) => { + const parsedType5 = (data) => { const t = typeof data; switch (t) { case "number": { @@ -64987,31 +60881,31 @@ var init_no = __esm({ jwt: "JWT", template_literal: "input" }; - return (issue2) => { - switch (issue2.code) { + return (issue3) => { + switch (issue3.code) { case "invalid_type": - return `Ugyldig input: forventet ${issue2.expected}, fikk ${parsedType4(issue2.input)}`; + return `Ugyldig input: forventet ${issue3.expected}, fikk ${parsedType5(issue3.input)}`; case "invalid_value": - if (issue2.values.length === 1) - return `Ugyldig verdi: forventet ${stringifyPrimitive(issue2.values[0])}`; - return `Ugyldig valg: forventet en av ${joinValues(issue2.values, "|")}`; + if (issue3.values.length === 1) + return `Ugyldig verdi: forventet ${stringifyPrimitive(issue3.values[0])}`; + return `Ugyldig valg: forventet en av ${joinValues(issue3.values, "|")}`; case "too_big": { - const adj = issue2.inclusive ? "<=" : "<"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? "<=" : "<"; + const sizing = getSizing(issue3.origin); if (sizing) - return `For stor(t): forventet ${issue2.origin ?? "value"} til \xE5 ha ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elementer"}`; - return `For stor(t): forventet ${issue2.origin ?? "value"} til \xE5 ha ${adj}${issue2.maximum.toString()}`; + return `For stor(t): forventet ${issue3.origin ?? "value"} til \xE5 ha ${adj}${issue3.maximum.toString()} ${sizing.unit ?? "elementer"}`; + return `For stor(t): forventet ${issue3.origin ?? "value"} til \xE5 ha ${adj}${issue3.maximum.toString()}`; } case "too_small": { - const adj = issue2.inclusive ? ">=" : ">"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? ">=" : ">"; + const sizing = getSizing(issue3.origin); if (sizing) { - return `For lite(n): forventet ${issue2.origin} til \xE5 ha ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + return `For lite(n): forventet ${issue3.origin} til \xE5 ha ${adj}${issue3.minimum.toString()} ${sizing.unit}`; } - return `For lite(n): forventet ${issue2.origin} til \xE5 ha ${adj}${issue2.minimum.toString()}`; + return `For lite(n): forventet ${issue3.origin} til \xE5 ha ${adj}${issue3.minimum.toString()}`; } case "invalid_format": { - const _issue = issue2; + const _issue = issue3; if (_issue.format === "starts_with") return `Ugyldig streng: m\xE5 starte med "${_issue.prefix}"`; if (_issue.format === "ends_with") @@ -65020,18 +60914,18 @@ var init_no = __esm({ return `Ugyldig streng: m\xE5 inneholde "${_issue.includes}"`; if (_issue.format === "regex") return `Ugyldig streng: m\xE5 matche m\xF8nsteret ${_issue.pattern}`; - return `Ugyldig ${Nouns[_issue.format] ?? issue2.format}`; + return `Ugyldig ${Nouns[_issue.format] ?? issue3.format}`; } case "not_multiple_of": - return `Ugyldig tall: m\xE5 v\xE6re et multiplum av ${issue2.divisor}`; + return `Ugyldig tall: m\xE5 v\xE6re et multiplum av ${issue3.divisor}`; case "unrecognized_keys": - return `${issue2.keys.length > 1 ? "Ukjente n\xF8kler" : "Ukjent n\xF8kkel"}: ${joinValues(issue2.keys, ", ")}`; + return `${issue3.keys.length > 1 ? "Ukjente n\xF8kler" : "Ukjent n\xF8kkel"}: ${joinValues(issue3.keys, ", ")}`; case "invalid_key": - return `Ugyldig n\xF8kkel i ${issue2.origin}`; + return `Ugyldig n\xF8kkel i ${issue3.origin}`; case "invalid_union": return "Ugyldig input"; case "invalid_element": - return `Ugyldig verdi i ${issue2.origin}`; + return `Ugyldig verdi i ${issue3.origin}`; default: return `Ugyldig input`; } @@ -65049,7 +60943,7 @@ function ota_default() { var error26; var init_ota = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/ota.js"() { - init_util2(); + init_util(); error26 = () => { const Sizable = { string: { unit: "harf", verb: "olmal\u0131d\u0131r" }, @@ -65060,7 +60954,7 @@ var init_ota = __esm({ function getSizing(origin) { return Sizable[origin] ?? null; } - const parsedType4 = (data) => { + const parsedType5 = (data) => { const t = typeof data; switch (t) { case "number": { @@ -65110,32 +61004,32 @@ var init_ota = __esm({ jwt: "JWT", template_literal: "giren" }; - return (issue2) => { - switch (issue2.code) { + return (issue3) => { + switch (issue3.code) { case "invalid_type": - return `F\xE2sit giren: umulan ${issue2.expected}, al\u0131nan ${parsedType4(issue2.input)}`; + return `F\xE2sit giren: umulan ${issue3.expected}, al\u0131nan ${parsedType5(issue3.input)}`; // return `Fâsit giren: umulan ${issue.expected}, alınan ${util.getParsedType(issue.input)}`; case "invalid_value": - if (issue2.values.length === 1) - return `F\xE2sit giren: umulan ${stringifyPrimitive(issue2.values[0])}`; - return `F\xE2sit tercih: m\xFBteberler ${joinValues(issue2.values, "|")}`; + if (issue3.values.length === 1) + return `F\xE2sit giren: umulan ${stringifyPrimitive(issue3.values[0])}`; + return `F\xE2sit tercih: m\xFBteberler ${joinValues(issue3.values, "|")}`; case "too_big": { - const adj = issue2.inclusive ? "<=" : "<"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? "<=" : "<"; + const sizing = getSizing(issue3.origin); if (sizing) - return `Fazla b\xFCy\xFCk: ${issue2.origin ?? "value"}, ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elements"} sahip olmal\u0131yd\u0131.`; - return `Fazla b\xFCy\xFCk: ${issue2.origin ?? "value"}, ${adj}${issue2.maximum.toString()} olmal\u0131yd\u0131.`; + return `Fazla b\xFCy\xFCk: ${issue3.origin ?? "value"}, ${adj}${issue3.maximum.toString()} ${sizing.unit ?? "elements"} sahip olmal\u0131yd\u0131.`; + return `Fazla b\xFCy\xFCk: ${issue3.origin ?? "value"}, ${adj}${issue3.maximum.toString()} olmal\u0131yd\u0131.`; } case "too_small": { - const adj = issue2.inclusive ? ">=" : ">"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? ">=" : ">"; + const sizing = getSizing(issue3.origin); if (sizing) { - return `Fazla k\xFC\xE7\xFCk: ${issue2.origin}, ${adj}${issue2.minimum.toString()} ${sizing.unit} sahip olmal\u0131yd\u0131.`; + return `Fazla k\xFC\xE7\xFCk: ${issue3.origin}, ${adj}${issue3.minimum.toString()} ${sizing.unit} sahip olmal\u0131yd\u0131.`; } - return `Fazla k\xFC\xE7\xFCk: ${issue2.origin}, ${adj}${issue2.minimum.toString()} olmal\u0131yd\u0131.`; + return `Fazla k\xFC\xE7\xFCk: ${issue3.origin}, ${adj}${issue3.minimum.toString()} olmal\u0131yd\u0131.`; } case "invalid_format": { - const _issue = issue2; + const _issue = issue3; if (_issue.format === "starts_with") return `F\xE2sit metin: "${_issue.prefix}" ile ba\u015Flamal\u0131.`; if (_issue.format === "ends_with") @@ -65144,18 +61038,18 @@ var init_ota = __esm({ return `F\xE2sit metin: "${_issue.includes}" ihtiv\xE2 etmeli.`; if (_issue.format === "regex") return `F\xE2sit metin: ${_issue.pattern} nak\u015F\u0131na uymal\u0131.`; - return `F\xE2sit ${Nouns[_issue.format] ?? issue2.format}`; + return `F\xE2sit ${Nouns[_issue.format] ?? issue3.format}`; } case "not_multiple_of": - return `F\xE2sit say\u0131: ${issue2.divisor} kat\u0131 olmal\u0131yd\u0131.`; + return `F\xE2sit say\u0131: ${issue3.divisor} kat\u0131 olmal\u0131yd\u0131.`; case "unrecognized_keys": - return `Tan\u0131nmayan anahtar ${issue2.keys.length > 1 ? "s" : ""}: ${joinValues(issue2.keys, ", ")}`; + return `Tan\u0131nmayan anahtar ${issue3.keys.length > 1 ? "s" : ""}: ${joinValues(issue3.keys, ", ")}`; case "invalid_key": - return `${issue2.origin} i\xE7in tan\u0131nmayan anahtar var.`; + return `${issue3.origin} i\xE7in tan\u0131nmayan anahtar var.`; case "invalid_union": return "Giren tan\u0131namad\u0131."; case "invalid_element": - return `${issue2.origin} i\xE7in tan\u0131nmayan k\u0131ymet var.`; + return `${issue3.origin} i\xE7in tan\u0131nmayan k\u0131ymet var.`; default: return `K\u0131ymet tan\u0131namad\u0131.`; } @@ -65173,7 +61067,7 @@ function ps_default() { var error27; var init_ps = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/ps.js"() { - init_util2(); + init_util(); error27 = () => { const Sizable = { string: { unit: "\u062A\u0648\u06A9\u064A", verb: "\u0648\u0644\u0631\u064A" }, @@ -65184,7 +61078,7 @@ var init_ps = __esm({ function getSizing(origin) { return Sizable[origin] ?? null; } - const parsedType4 = (data) => { + const parsedType5 = (data) => { const t = typeof data; switch (t) { case "number": { @@ -65234,33 +61128,33 @@ var init_ps = __esm({ jwt: "JWT", template_literal: "\u0648\u0631\u0648\u062F\u064A" }; - return (issue2) => { - switch (issue2.code) { + return (issue3) => { + switch (issue3.code) { case "invalid_type": - return `\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${issue2.expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${parsedType4(issue2.input)} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`; + return `\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${issue3.expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${parsedType5(issue3.input)} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`; case "invalid_value": - if (issue2.values.length === 1) { - return `\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${stringifyPrimitive(issue2.values[0])} \u0648\u0627\u06CC`; + if (issue3.values.length === 1) { + return `\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${stringifyPrimitive(issue3.values[0])} \u0648\u0627\u06CC`; } - return `\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${joinValues(issue2.values, "|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`; + return `\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${joinValues(issue3.values, "|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`; case "too_big": { - const adj = issue2.inclusive ? "<=" : "<"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? "<=" : "<"; + const sizing = getSizing(issue3.origin); if (sizing) { - return `\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${issue2.origin ?? "\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\u0639\u0646\u0635\u0631\u0648\u0646\u0647"} \u0648\u0644\u0631\u064A`; + return `\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${issue3.origin ?? "\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${adj}${issue3.maximum.toString()} ${sizing.unit ?? "\u0639\u0646\u0635\u0631\u0648\u0646\u0647"} \u0648\u0644\u0631\u064A`; } - return `\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${issue2.origin ?? "\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${adj}${issue2.maximum.toString()} \u0648\u064A`; + return `\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${issue3.origin ?? "\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${adj}${issue3.maximum.toString()} \u0648\u064A`; } case "too_small": { - const adj = issue2.inclusive ? ">=" : ">"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? ">=" : ">"; + const sizing = getSizing(issue3.origin); if (sizing) { - return `\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${issue2.origin} \u0628\u0627\u06CC\u062F ${adj}${issue2.minimum.toString()} ${sizing.unit} \u0648\u0644\u0631\u064A`; + return `\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${issue3.origin} \u0628\u0627\u06CC\u062F ${adj}${issue3.minimum.toString()} ${sizing.unit} \u0648\u0644\u0631\u064A`; } - return `\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${issue2.origin} \u0628\u0627\u06CC\u062F ${adj}${issue2.minimum.toString()} \u0648\u064A`; + return `\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${issue3.origin} \u0628\u0627\u06CC\u062F ${adj}${issue3.minimum.toString()} \u0648\u064A`; } case "invalid_format": { - const _issue = issue2; + const _issue = issue3; if (_issue.format === "starts_with") { return `\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${_issue.prefix}" \u0633\u0631\u0647 \u067E\u06CC\u0644 \u0634\u064A`; } @@ -65273,18 +61167,18 @@ var init_ps = __esm({ if (_issue.format === "regex") { return `\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F ${_issue.pattern} \u0633\u0631\u0647 \u0645\u0637\u0627\u0628\u0642\u062A \u0648\u0644\u0631\u064A`; } - return `${Nouns[_issue.format] ?? issue2.format} \u0646\u0627\u0633\u0645 \u062F\u06CC`; + return `${Nouns[_issue.format] ?? issue3.format} \u0646\u0627\u0633\u0645 \u062F\u06CC`; } case "not_multiple_of": - return `\u0646\u0627\u0633\u0645 \u0639\u062F\u062F: \u0628\u0627\u06CC\u062F \u062F ${issue2.divisor} \u0645\u0636\u0631\u0628 \u0648\u064A`; + return `\u0646\u0627\u0633\u0645 \u0639\u062F\u062F: \u0628\u0627\u06CC\u062F \u062F ${issue3.divisor} \u0645\u0636\u0631\u0628 \u0648\u064A`; case "unrecognized_keys": - return `\u0646\u0627\u0633\u0645 ${issue2.keys.length > 1 ? "\u06A9\u0644\u06CC\u0689\u0648\u0646\u0647" : "\u06A9\u0644\u06CC\u0689"}: ${joinValues(issue2.keys, ", ")}`; + return `\u0646\u0627\u0633\u0645 ${issue3.keys.length > 1 ? "\u06A9\u0644\u06CC\u0689\u0648\u0646\u0647" : "\u06A9\u0644\u06CC\u0689"}: ${joinValues(issue3.keys, ", ")}`; case "invalid_key": - return `\u0646\u0627\u0633\u0645 \u06A9\u0644\u06CC\u0689 \u067E\u0647 ${issue2.origin} \u06A9\u06D0`; + return `\u0646\u0627\u0633\u0645 \u06A9\u0644\u06CC\u0689 \u067E\u0647 ${issue3.origin} \u06A9\u06D0`; case "invalid_union": return `\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A`; case "invalid_element": - return `\u0646\u0627\u0633\u0645 \u0639\u0646\u0635\u0631 \u067E\u0647 ${issue2.origin} \u06A9\u06D0`; + return `\u0646\u0627\u0633\u0645 \u0639\u0646\u0635\u0631 \u067E\u0647 ${issue3.origin} \u06A9\u06D0`; default: return `\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A`; } @@ -65302,7 +61196,7 @@ function pl_default() { var error28; var init_pl = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/pl.js"() { - init_util2(); + init_util(); error28 = () => { const Sizable = { string: { unit: "znak\xF3w", verb: "mie\u0107" }, @@ -65313,7 +61207,7 @@ var init_pl = __esm({ function getSizing(origin) { return Sizable[origin] ?? null; } - const parsedType4 = (data) => { + const parsedType5 = (data) => { const t = typeof data; switch (t) { case "number": { @@ -65363,32 +61257,32 @@ var init_pl = __esm({ jwt: "JWT", template_literal: "wej\u015Bcie" }; - return (issue2) => { - switch (issue2.code) { + return (issue3) => { + switch (issue3.code) { case "invalid_type": - return `Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${issue2.expected}, otrzymano ${parsedType4(issue2.input)}`; + return `Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${issue3.expected}, otrzymano ${parsedType5(issue3.input)}`; case "invalid_value": - if (issue2.values.length === 1) - return `Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${stringifyPrimitive(issue2.values[0])}`; - return `Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${joinValues(issue2.values, "|")}`; + if (issue3.values.length === 1) + return `Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${stringifyPrimitive(issue3.values[0])}`; + return `Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${joinValues(issue3.values, "|")}`; case "too_big": { - const adj = issue2.inclusive ? "<=" : "<"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? "<=" : "<"; + const sizing = getSizing(issue3.origin); if (sizing) { - return `Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${issue2.origin ?? "warto\u015B\u0107"} b\u0119dzie mie\u0107 ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "element\xF3w"}`; + return `Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${issue3.origin ?? "warto\u015B\u0107"} b\u0119dzie mie\u0107 ${adj}${issue3.maximum.toString()} ${sizing.unit ?? "element\xF3w"}`; } - return `Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${issue2.origin ?? "warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${adj}${issue2.maximum.toString()}`; + return `Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${issue3.origin ?? "warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${adj}${issue3.maximum.toString()}`; } case "too_small": { - const adj = issue2.inclusive ? ">=" : ">"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? ">=" : ">"; + const sizing = getSizing(issue3.origin); if (sizing) { - return `Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${issue2.origin ?? "warto\u015B\u0107"} b\u0119dzie mie\u0107 ${adj}${issue2.minimum.toString()} ${sizing.unit ?? "element\xF3w"}`; + return `Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${issue3.origin ?? "warto\u015B\u0107"} b\u0119dzie mie\u0107 ${adj}${issue3.minimum.toString()} ${sizing.unit ?? "element\xF3w"}`; } - return `Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${issue2.origin ?? "warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${adj}${issue2.minimum.toString()}`; + return `Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${issue3.origin ?? "warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${adj}${issue3.minimum.toString()}`; } case "invalid_format": { - const _issue = issue2; + const _issue = issue3; if (_issue.format === "starts_with") return `Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zaczyna\u0107 si\u0119 od "${_issue.prefix}"`; if (_issue.format === "ends_with") @@ -65397,18 +61291,18 @@ var init_pl = __esm({ return `Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zawiera\u0107 "${_issue.includes}"`; if (_issue.format === "regex") return `Nieprawid\u0142owy ci\u0105g znak\xF3w: musi odpowiada\u0107 wzorcowi ${_issue.pattern}`; - return `Nieprawid\u0142ow(y/a/e) ${Nouns[_issue.format] ?? issue2.format}`; + return `Nieprawid\u0142ow(y/a/e) ${Nouns[_issue.format] ?? issue3.format}`; } case "not_multiple_of": - return `Nieprawid\u0142owa liczba: musi by\u0107 wielokrotno\u015Bci\u0105 ${issue2.divisor}`; + return `Nieprawid\u0142owa liczba: musi by\u0107 wielokrotno\u015Bci\u0105 ${issue3.divisor}`; case "unrecognized_keys": - return `Nierozpoznane klucze${issue2.keys.length > 1 ? "s" : ""}: ${joinValues(issue2.keys, ", ")}`; + return `Nierozpoznane klucze${issue3.keys.length > 1 ? "s" : ""}: ${joinValues(issue3.keys, ", ")}`; case "invalid_key": - return `Nieprawid\u0142owy klucz w ${issue2.origin}`; + return `Nieprawid\u0142owy klucz w ${issue3.origin}`; case "invalid_union": return "Nieprawid\u0142owe dane wej\u015Bciowe"; case "invalid_element": - return `Nieprawid\u0142owa warto\u015B\u0107 w ${issue2.origin}`; + return `Nieprawid\u0142owa warto\u015B\u0107 w ${issue3.origin}`; default: return `Nieprawid\u0142owe dane wej\u015Bciowe`; } @@ -65426,7 +61320,7 @@ function pt_default() { var error29; var init_pt = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/pt.js"() { - init_util2(); + init_util(); error29 = () => { const Sizable = { string: { unit: "caracteres", verb: "ter" }, @@ -65437,7 +61331,7 @@ var init_pt = __esm({ function getSizing(origin) { return Sizable[origin] ?? null; } - const parsedType4 = (data) => { + const parsedType5 = (data) => { const t = typeof data; switch (t) { case "number": { @@ -65487,31 +61381,31 @@ var init_pt = __esm({ jwt: "JWT", template_literal: "entrada" }; - return (issue2) => { - switch (issue2.code) { + return (issue3) => { + switch (issue3.code) { case "invalid_type": - return `Tipo inv\xE1lido: esperado ${issue2.expected}, recebido ${parsedType4(issue2.input)}`; + return `Tipo inv\xE1lido: esperado ${issue3.expected}, recebido ${parsedType5(issue3.input)}`; case "invalid_value": - if (issue2.values.length === 1) - return `Entrada inv\xE1lida: esperado ${stringifyPrimitive(issue2.values[0])}`; - return `Op\xE7\xE3o inv\xE1lida: esperada uma das ${joinValues(issue2.values, "|")}`; + if (issue3.values.length === 1) + return `Entrada inv\xE1lida: esperado ${stringifyPrimitive(issue3.values[0])}`; + return `Op\xE7\xE3o inv\xE1lida: esperada uma das ${joinValues(issue3.values, "|")}`; case "too_big": { - const adj = issue2.inclusive ? "<=" : "<"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? "<=" : "<"; + const sizing = getSizing(issue3.origin); if (sizing) - return `Muito grande: esperado que ${issue2.origin ?? "valor"} tivesse ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elementos"}`; - return `Muito grande: esperado que ${issue2.origin ?? "valor"} fosse ${adj}${issue2.maximum.toString()}`; + return `Muito grande: esperado que ${issue3.origin ?? "valor"} tivesse ${adj}${issue3.maximum.toString()} ${sizing.unit ?? "elementos"}`; + return `Muito grande: esperado que ${issue3.origin ?? "valor"} fosse ${adj}${issue3.maximum.toString()}`; } case "too_small": { - const adj = issue2.inclusive ? ">=" : ">"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? ">=" : ">"; + const sizing = getSizing(issue3.origin); if (sizing) { - return `Muito pequeno: esperado que ${issue2.origin} tivesse ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + return `Muito pequeno: esperado que ${issue3.origin} tivesse ${adj}${issue3.minimum.toString()} ${sizing.unit}`; } - return `Muito pequeno: esperado que ${issue2.origin} fosse ${adj}${issue2.minimum.toString()}`; + return `Muito pequeno: esperado que ${issue3.origin} fosse ${adj}${issue3.minimum.toString()}`; } case "invalid_format": { - const _issue = issue2; + const _issue = issue3; if (_issue.format === "starts_with") return `Texto inv\xE1lido: deve come\xE7ar com "${_issue.prefix}"`; if (_issue.format === "ends_with") @@ -65520,18 +61414,18 @@ var init_pt = __esm({ return `Texto inv\xE1lido: deve incluir "${_issue.includes}"`; if (_issue.format === "regex") return `Texto inv\xE1lido: deve corresponder ao padr\xE3o ${_issue.pattern}`; - return `${Nouns[_issue.format] ?? issue2.format} inv\xE1lido`; + return `${Nouns[_issue.format] ?? issue3.format} inv\xE1lido`; } case "not_multiple_of": - return `N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${issue2.divisor}`; + return `N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${issue3.divisor}`; case "unrecognized_keys": - return `Chave${issue2.keys.length > 1 ? "s" : ""} desconhecida${issue2.keys.length > 1 ? "s" : ""}: ${joinValues(issue2.keys, ", ")}`; + return `Chave${issue3.keys.length > 1 ? "s" : ""} desconhecida${issue3.keys.length > 1 ? "s" : ""}: ${joinValues(issue3.keys, ", ")}`; case "invalid_key": - return `Chave inv\xE1lida em ${issue2.origin}`; + return `Chave inv\xE1lida em ${issue3.origin}`; case "invalid_union": return "Entrada inv\xE1lida"; case "invalid_element": - return `Valor inv\xE1lido em ${issue2.origin}`; + return `Valor inv\xE1lido em ${issue3.origin}`; default: return `Campo inv\xE1lido`; } @@ -65564,7 +61458,7 @@ function ru_default() { var error30; var init_ru = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/ru.js"() { - init_util2(); + init_util(); error30 = () => { const Sizable = { string: { @@ -65603,7 +61497,7 @@ var init_ru = __esm({ function getSizing(origin) { return Sizable[origin] ?? null; } - const parsedType4 = (data) => { + const parsedType5 = (data) => { const t = typeof data; switch (t) { case "number": { @@ -65653,36 +61547,36 @@ var init_ru = __esm({ jwt: "JWT", template_literal: "\u0432\u0432\u043E\u0434" }; - return (issue2) => { - switch (issue2.code) { + return (issue3) => { + switch (issue3.code) { case "invalid_type": - return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${issue2.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${parsedType4(issue2.input)}`; + return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${issue3.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${parsedType5(issue3.input)}`; case "invalid_value": - if (issue2.values.length === 1) - return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${stringifyPrimitive(issue2.values[0])}`; - return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0430\u0440\u0438\u0430\u043D\u0442: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0434\u043D\u043E \u0438\u0437 ${joinValues(issue2.values, "|")}`; + if (issue3.values.length === 1) + return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${stringifyPrimitive(issue3.values[0])}`; + return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0430\u0440\u0438\u0430\u043D\u0442: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0434\u043D\u043E \u0438\u0437 ${joinValues(issue3.values, "|")}`; case "too_big": { - const adj = issue2.inclusive ? "<=" : "<"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? "<=" : "<"; + const sizing = getSizing(issue3.origin); if (sizing) { - const maxValue = Number(issue2.maximum); + const maxValue = Number(issue3.maximum); const unit = getRussianPlural(maxValue, sizing.unit.one, sizing.unit.few, sizing.unit.many); - return `\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${issue2.origin ?? "\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${adj}${issue2.maximum.toString()} ${unit}`; + return `\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${issue3.origin ?? "\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${adj}${issue3.maximum.toString()} ${unit}`; } - return `\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${issue2.origin ?? "\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 ${adj}${issue2.maximum.toString()}`; + return `\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${issue3.origin ?? "\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 ${adj}${issue3.maximum.toString()}`; } case "too_small": { - const adj = issue2.inclusive ? ">=" : ">"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? ">=" : ">"; + const sizing = getSizing(issue3.origin); if (sizing) { - const minValue = Number(issue2.minimum); + const minValue = Number(issue3.minimum); const unit = getRussianPlural(minValue, sizing.unit.one, sizing.unit.few, sizing.unit.many); - return `\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${issue2.origin} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${adj}${issue2.minimum.toString()} ${unit}`; + return `\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${issue3.origin} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${adj}${issue3.minimum.toString()} ${unit}`; } - return `\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${issue2.origin} \u0431\u0443\u0434\u0435\u0442 ${adj}${issue2.minimum.toString()}`; + return `\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${issue3.origin} \u0431\u0443\u0434\u0435\u0442 ${adj}${issue3.minimum.toString()}`; } case "invalid_format": { - const _issue = issue2; + const _issue = issue3; if (_issue.format === "starts_with") return `\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u043D\u0430\u0447\u0438\u043D\u0430\u0442\u044C\u0441\u044F \u0441 "${_issue.prefix}"`; if (_issue.format === "ends_with") @@ -65691,18 +61585,18 @@ var init_ru = __esm({ return `\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u0434\u0435\u0440\u0436\u0430\u0442\u044C "${_issue.includes}"`; if (_issue.format === "regex") return `\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043E\u0432\u0430\u0442\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${_issue.pattern}`; - return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 ${Nouns[_issue.format] ?? issue2.format}`; + return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 ${Nouns[_issue.format] ?? issue3.format}`; } case "not_multiple_of": - return `\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0447\u0438\u0441\u043B\u043E: \u0434\u043E\u043B\u0436\u043D\u043E \u0431\u044B\u0442\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${issue2.divisor}`; + return `\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0447\u0438\u0441\u043B\u043E: \u0434\u043E\u043B\u0436\u043D\u043E \u0431\u044B\u0442\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${issue3.divisor}`; case "unrecognized_keys": - return `\u041D\u0435\u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D${issue2.keys.length > 1 ? "\u044B\u0435" : "\u044B\u0439"} \u043A\u043B\u044E\u0447${issue2.keys.length > 1 ? "\u0438" : ""}: ${joinValues(issue2.keys, ", ")}`; + return `\u041D\u0435\u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D${issue3.keys.length > 1 ? "\u044B\u0435" : "\u044B\u0439"} \u043A\u043B\u044E\u0447${issue3.keys.length > 1 ? "\u0438" : ""}: ${joinValues(issue3.keys, ", ")}`; case "invalid_key": - return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u0432 ${issue2.origin}`; + return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u0432 ${issue3.origin}`; case "invalid_union": return "\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435"; case "invalid_element": - return `\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0432 ${issue2.origin}`; + return `\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0432 ${issue3.origin}`; default: return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435`; } @@ -65720,7 +61614,7 @@ function sl_default() { var error31; var init_sl = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/sl.js"() { - init_util2(); + init_util(); error31 = () => { const Sizable = { string: { unit: "znakov", verb: "imeti" }, @@ -65731,7 +61625,7 @@ var init_sl = __esm({ function getSizing(origin) { return Sizable[origin] ?? null; } - const parsedType4 = (data) => { + const parsedType5 = (data) => { const t = typeof data; switch (t) { case "number": { @@ -65781,31 +61675,31 @@ var init_sl = __esm({ jwt: "JWT", template_literal: "vnos" }; - return (issue2) => { - switch (issue2.code) { + return (issue3) => { + switch (issue3.code) { case "invalid_type": - return `Neveljaven vnos: pri\u010Dakovano ${issue2.expected}, prejeto ${parsedType4(issue2.input)}`; + return `Neveljaven vnos: pri\u010Dakovano ${issue3.expected}, prejeto ${parsedType5(issue3.input)}`; case "invalid_value": - if (issue2.values.length === 1) - return `Neveljaven vnos: pri\u010Dakovano ${stringifyPrimitive(issue2.values[0])}`; - return `Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${joinValues(issue2.values, "|")}`; + if (issue3.values.length === 1) + return `Neveljaven vnos: pri\u010Dakovano ${stringifyPrimitive(issue3.values[0])}`; + return `Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${joinValues(issue3.values, "|")}`; case "too_big": { - const adj = issue2.inclusive ? "<=" : "<"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? "<=" : "<"; + const sizing = getSizing(issue3.origin); if (sizing) - return `Preveliko: pri\u010Dakovano, da bo ${issue2.origin ?? "vrednost"} imelo ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elementov"}`; - return `Preveliko: pri\u010Dakovano, da bo ${issue2.origin ?? "vrednost"} ${adj}${issue2.maximum.toString()}`; + return `Preveliko: pri\u010Dakovano, da bo ${issue3.origin ?? "vrednost"} imelo ${adj}${issue3.maximum.toString()} ${sizing.unit ?? "elementov"}`; + return `Preveliko: pri\u010Dakovano, da bo ${issue3.origin ?? "vrednost"} ${adj}${issue3.maximum.toString()}`; } case "too_small": { - const adj = issue2.inclusive ? ">=" : ">"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? ">=" : ">"; + const sizing = getSizing(issue3.origin); if (sizing) { - return `Premajhno: pri\u010Dakovano, da bo ${issue2.origin} imelo ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + return `Premajhno: pri\u010Dakovano, da bo ${issue3.origin} imelo ${adj}${issue3.minimum.toString()} ${sizing.unit}`; } - return `Premajhno: pri\u010Dakovano, da bo ${issue2.origin} ${adj}${issue2.minimum.toString()}`; + return `Premajhno: pri\u010Dakovano, da bo ${issue3.origin} ${adj}${issue3.minimum.toString()}`; } case "invalid_format": { - const _issue = issue2; + const _issue = issue3; if (_issue.format === "starts_with") { return `Neveljaven niz: mora se za\u010Deti z "${_issue.prefix}"`; } @@ -65815,18 +61709,18 @@ var init_sl = __esm({ return `Neveljaven niz: mora vsebovati "${_issue.includes}"`; if (_issue.format === "regex") return `Neveljaven niz: mora ustrezati vzorcu ${_issue.pattern}`; - return `Neveljaven ${Nouns[_issue.format] ?? issue2.format}`; + return `Neveljaven ${Nouns[_issue.format] ?? issue3.format}`; } case "not_multiple_of": - return `Neveljavno \u0161tevilo: mora biti ve\u010Dkratnik ${issue2.divisor}`; + return `Neveljavno \u0161tevilo: mora biti ve\u010Dkratnik ${issue3.divisor}`; case "unrecognized_keys": - return `Neprepoznan${issue2.keys.length > 1 ? "i klju\u010Di" : " klju\u010D"}: ${joinValues(issue2.keys, ", ")}`; + return `Neprepoznan${issue3.keys.length > 1 ? "i klju\u010Di" : " klju\u010D"}: ${joinValues(issue3.keys, ", ")}`; case "invalid_key": - return `Neveljaven klju\u010D v ${issue2.origin}`; + return `Neveljaven klju\u010D v ${issue3.origin}`; case "invalid_union": return "Neveljaven vnos"; case "invalid_element": - return `Neveljavna vrednost v ${issue2.origin}`; + return `Neveljavna vrednost v ${issue3.origin}`; default: return "Neveljaven vnos"; } @@ -65844,7 +61738,7 @@ function sv_default() { var error32; var init_sv = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/sv.js"() { - init_util2(); + init_util(); error32 = () => { const Sizable = { string: { unit: "tecken", verb: "att ha" }, @@ -65855,7 +61749,7 @@ var init_sv = __esm({ function getSizing(origin) { return Sizable[origin] ?? null; } - const parsedType4 = (data) => { + const parsedType5 = (data) => { const t = typeof data; switch (t) { case "number": { @@ -65905,32 +61799,32 @@ var init_sv = __esm({ jwt: "JWT", template_literal: "mall-literal" }; - return (issue2) => { - switch (issue2.code) { + return (issue3) => { + switch (issue3.code) { case "invalid_type": - return `Ogiltig inmatning: f\xF6rv\xE4ntat ${issue2.expected}, fick ${parsedType4(issue2.input)}`; + return `Ogiltig inmatning: f\xF6rv\xE4ntat ${issue3.expected}, fick ${parsedType5(issue3.input)}`; case "invalid_value": - if (issue2.values.length === 1) - return `Ogiltig inmatning: f\xF6rv\xE4ntat ${stringifyPrimitive(issue2.values[0])}`; - return `Ogiltigt val: f\xF6rv\xE4ntade en av ${joinValues(issue2.values, "|")}`; + if (issue3.values.length === 1) + return `Ogiltig inmatning: f\xF6rv\xE4ntat ${stringifyPrimitive(issue3.values[0])}`; + return `Ogiltigt val: f\xF6rv\xE4ntade en av ${joinValues(issue3.values, "|")}`; case "too_big": { - const adj = issue2.inclusive ? "<=" : "<"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? "<=" : "<"; + const sizing = getSizing(issue3.origin); if (sizing) { - return `F\xF6r stor(t): f\xF6rv\xE4ntade ${issue2.origin ?? "v\xE4rdet"} att ha ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "element"}`; + return `F\xF6r stor(t): f\xF6rv\xE4ntade ${issue3.origin ?? "v\xE4rdet"} att ha ${adj}${issue3.maximum.toString()} ${sizing.unit ?? "element"}`; } - return `F\xF6r stor(t): f\xF6rv\xE4ntat ${issue2.origin ?? "v\xE4rdet"} att ha ${adj}${issue2.maximum.toString()}`; + return `F\xF6r stor(t): f\xF6rv\xE4ntat ${issue3.origin ?? "v\xE4rdet"} att ha ${adj}${issue3.maximum.toString()}`; } case "too_small": { - const adj = issue2.inclusive ? ">=" : ">"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? ">=" : ">"; + const sizing = getSizing(issue3.origin); if (sizing) { - return `F\xF6r lite(t): f\xF6rv\xE4ntade ${issue2.origin ?? "v\xE4rdet"} att ha ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + return `F\xF6r lite(t): f\xF6rv\xE4ntade ${issue3.origin ?? "v\xE4rdet"} att ha ${adj}${issue3.minimum.toString()} ${sizing.unit}`; } - return `F\xF6r lite(t): f\xF6rv\xE4ntade ${issue2.origin ?? "v\xE4rdet"} att ha ${adj}${issue2.minimum.toString()}`; + return `F\xF6r lite(t): f\xF6rv\xE4ntade ${issue3.origin ?? "v\xE4rdet"} att ha ${adj}${issue3.minimum.toString()}`; } case "invalid_format": { - const _issue = issue2; + const _issue = issue3; if (_issue.format === "starts_with") { return `Ogiltig str\xE4ng: m\xE5ste b\xF6rja med "${_issue.prefix}"`; } @@ -65940,18 +61834,18 @@ var init_sv = __esm({ return `Ogiltig str\xE4ng: m\xE5ste inneh\xE5lla "${_issue.includes}"`; if (_issue.format === "regex") return `Ogiltig str\xE4ng: m\xE5ste matcha m\xF6nstret "${_issue.pattern}"`; - return `Ogiltig(t) ${Nouns[_issue.format] ?? issue2.format}`; + return `Ogiltig(t) ${Nouns[_issue.format] ?? issue3.format}`; } case "not_multiple_of": - return `Ogiltigt tal: m\xE5ste vara en multipel av ${issue2.divisor}`; + return `Ogiltigt tal: m\xE5ste vara en multipel av ${issue3.divisor}`; case "unrecognized_keys": - return `${issue2.keys.length > 1 ? "Ok\xE4nda nycklar" : "Ok\xE4nd nyckel"}: ${joinValues(issue2.keys, ", ")}`; + return `${issue3.keys.length > 1 ? "Ok\xE4nda nycklar" : "Ok\xE4nd nyckel"}: ${joinValues(issue3.keys, ", ")}`; case "invalid_key": - return `Ogiltig nyckel i ${issue2.origin ?? "v\xE4rdet"}`; + return `Ogiltig nyckel i ${issue3.origin ?? "v\xE4rdet"}`; case "invalid_union": return "Ogiltig input"; case "invalid_element": - return `Ogiltigt v\xE4rde i ${issue2.origin ?? "v\xE4rdet"}`; + return `Ogiltigt v\xE4rde i ${issue3.origin ?? "v\xE4rdet"}`; default: return `Ogiltig input`; } @@ -65969,7 +61863,7 @@ function ta_default() { var error33; var init_ta = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/ta.js"() { - init_util2(); + init_util(); error33 = () => { const Sizable = { string: { unit: "\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BCD\u0B95\u0BB3\u0BCD", verb: "\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD" }, @@ -65980,7 +61874,7 @@ var init_ta = __esm({ function getSizing(origin) { return Sizable[origin] ?? null; } - const parsedType4 = (data) => { + const parsedType5 = (data) => { const t = typeof data; switch (t) { case "number": { @@ -66030,32 +61924,32 @@ var init_ta = __esm({ jwt: "JWT", template_literal: "input" }; - return (issue2) => { - switch (issue2.code) { + return (issue3) => { + switch (issue3.code) { case "invalid_type": - return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${issue2.expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${parsedType4(issue2.input)}`; + return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${issue3.expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${parsedType5(issue3.input)}`; case "invalid_value": - if (issue2.values.length === 1) - return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${stringifyPrimitive(issue2.values[0])}`; - return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0BB0\u0BC1\u0BAA\u0BCD\u0BAA\u0BAE\u0BCD: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${joinValues(issue2.values, "|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`; + if (issue3.values.length === 1) + return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${stringifyPrimitive(issue3.values[0])}`; + return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0BB0\u0BC1\u0BAA\u0BCD\u0BAA\u0BAE\u0BCD: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${joinValues(issue3.values, "|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`; case "too_big": { - const adj = issue2.inclusive ? "<=" : "<"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? "<=" : "<"; + const sizing = getSizing(issue3.origin); if (sizing) { - return `\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${issue2.origin ?? "\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD"} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; + return `\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${issue3.origin ?? "\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${adj}${issue3.maximum.toString()} ${sizing.unit ?? "\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD"} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; } - return `\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${issue2.origin ?? "\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${adj}${issue2.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; + return `\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${issue3.origin ?? "\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${adj}${issue3.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; } case "too_small": { - const adj = issue2.inclusive ? ">=" : ">"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? ">=" : ">"; + const sizing = getSizing(issue3.origin); if (sizing) { - return `\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${issue2.origin} ${adj}${issue2.minimum.toString()} ${sizing.unit} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; + return `\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${issue3.origin} ${adj}${issue3.minimum.toString()} ${sizing.unit} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; } - return `\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${issue2.origin} ${adj}${issue2.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; + return `\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${issue3.origin} ${adj}${issue3.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; } case "invalid_format": { - const _issue = issue2; + const _issue = issue3; if (_issue.format === "starts_with") return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${_issue.prefix}" \u0B87\u0BB2\u0BCD \u0BA4\u0BCA\u0B9F\u0B99\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; if (_issue.format === "ends_with") @@ -66064,18 +61958,18 @@ var init_ta = __esm({ return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${_issue.includes}" \u0B90 \u0B89\u0BB3\u0BCD\u0BB3\u0B9F\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; if (_issue.format === "regex") return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: ${_issue.pattern} \u0BAE\u0BC1\u0BB1\u0BC8\u0BAA\u0BBE\u0B9F\u0BCD\u0B9F\u0BC1\u0B9F\u0BA9\u0BCD \u0BAA\u0BCA\u0BB0\u0BC1\u0BA8\u0BCD\u0BA4 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; - return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 ${Nouns[_issue.format] ?? issue2.format}`; + return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 ${Nouns[_issue.format] ?? issue3.format}`; } case "not_multiple_of": - return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B8E\u0BA3\u0BCD: ${issue2.divisor} \u0B87\u0BA9\u0BCD \u0BAA\u0BB2\u0BAE\u0BBE\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; + return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B8E\u0BA3\u0BCD: ${issue3.divisor} \u0B87\u0BA9\u0BCD \u0BAA\u0BB2\u0BAE\u0BBE\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; case "unrecognized_keys": - return `\u0B85\u0B9F\u0BC8\u0BAF\u0BBE\u0BB3\u0BAE\u0BCD \u0BA4\u0BC6\u0BB0\u0BBF\u0BAF\u0BBE\u0BA4 \u0BB5\u0BBF\u0B9A\u0BC8${issue2.keys.length > 1 ? "\u0B95\u0BB3\u0BCD" : ""}: ${joinValues(issue2.keys, ", ")}`; + return `\u0B85\u0B9F\u0BC8\u0BAF\u0BBE\u0BB3\u0BAE\u0BCD \u0BA4\u0BC6\u0BB0\u0BBF\u0BAF\u0BBE\u0BA4 \u0BB5\u0BBF\u0B9A\u0BC8${issue3.keys.length > 1 ? "\u0B95\u0BB3\u0BCD" : ""}: ${joinValues(issue3.keys, ", ")}`; case "invalid_key": - return `${issue2.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0B9A\u0BC8`; + return `${issue3.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0B9A\u0BC8`; case "invalid_union": return "\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1"; case "invalid_element": - return `${issue2.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1`; + return `${issue3.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1`; default: return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1`; } @@ -66093,7 +61987,7 @@ function th_default() { var error34; var init_th = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/th.js"() { - init_util2(); + init_util(); error34 = () => { const Sizable = { string: { unit: "\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" }, @@ -66104,7 +61998,7 @@ var init_th = __esm({ function getSizing(origin) { return Sizable[origin] ?? null; } - const parsedType4 = (data) => { + const parsedType5 = (data) => { const t = typeof data; switch (t) { case "number": { @@ -66154,31 +62048,31 @@ var init_th = __esm({ jwt: "\u0E42\u0E17\u0E40\u0E04\u0E19 JWT", template_literal: "\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19" }; - return (issue2) => { - switch (issue2.code) { + return (issue3) => { + switch (issue3.code) { case "invalid_type": - return `\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${issue2.expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${parsedType4(issue2.input)}`; + return `\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${issue3.expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${parsedType5(issue3.input)}`; case "invalid_value": - if (issue2.values.length === 1) - return `\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${stringifyPrimitive(issue2.values[0])}`; - return `\u0E15\u0E31\u0E27\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E43\u0E19 ${joinValues(issue2.values, "|")}`; + if (issue3.values.length === 1) + return `\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${stringifyPrimitive(issue3.values[0])}`; + return `\u0E15\u0E31\u0E27\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E43\u0E19 ${joinValues(issue3.values, "|")}`; case "too_big": { - const adj = issue2.inclusive ? "\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19" : "\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? "\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19" : "\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32"; + const sizing = getSizing(issue3.origin); if (sizing) - return `\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${issue2.origin ?? "\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${adj} ${issue2.maximum.toString()} ${sizing.unit ?? "\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"}`; - return `\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${issue2.origin ?? "\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${adj} ${issue2.maximum.toString()}`; + return `\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${issue3.origin ?? "\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${adj} ${issue3.maximum.toString()} ${sizing.unit ?? "\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"}`; + return `\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${issue3.origin ?? "\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${adj} ${issue3.maximum.toString()}`; } case "too_small": { - const adj = issue2.inclusive ? "\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22" : "\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? "\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22" : "\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32"; + const sizing = getSizing(issue3.origin); if (sizing) { - return `\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${issue2.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${adj} ${issue2.minimum.toString()} ${sizing.unit}`; + return `\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${issue3.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${adj} ${issue3.minimum.toString()} ${sizing.unit}`; } - return `\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${issue2.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${adj} ${issue2.minimum.toString()}`; + return `\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${issue3.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${adj} ${issue3.minimum.toString()}`; } case "invalid_format": { - const _issue = issue2; + const _issue = issue3; if (_issue.format === "starts_with") { return `\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E02\u0E36\u0E49\u0E19\u0E15\u0E49\u0E19\u0E14\u0E49\u0E27\u0E22 "${_issue.prefix}"`; } @@ -66188,18 +62082,18 @@ var init_th = __esm({ return `\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35 "${_issue.includes}" \u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21`; if (_issue.format === "regex") return `\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14 ${_issue.pattern}`; - return `\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${Nouns[_issue.format] ?? issue2.format}`; + return `\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${Nouns[_issue.format] ?? issue3.format}`; } case "not_multiple_of": - return `\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E08\u0E33\u0E19\u0E27\u0E19\u0E17\u0E35\u0E48\u0E2B\u0E32\u0E23\u0E14\u0E49\u0E27\u0E22 ${issue2.divisor} \u0E44\u0E14\u0E49\u0E25\u0E07\u0E15\u0E31\u0E27`; + return `\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E08\u0E33\u0E19\u0E27\u0E19\u0E17\u0E35\u0E48\u0E2B\u0E32\u0E23\u0E14\u0E49\u0E27\u0E22 ${issue3.divisor} \u0E44\u0E14\u0E49\u0E25\u0E07\u0E15\u0E31\u0E27`; case "unrecognized_keys": - return `\u0E1E\u0E1A\u0E04\u0E35\u0E22\u0E4C\u0E17\u0E35\u0E48\u0E44\u0E21\u0E48\u0E23\u0E39\u0E49\u0E08\u0E31\u0E01: ${joinValues(issue2.keys, ", ")}`; + return `\u0E1E\u0E1A\u0E04\u0E35\u0E22\u0E4C\u0E17\u0E35\u0E48\u0E44\u0E21\u0E48\u0E23\u0E39\u0E49\u0E08\u0E31\u0E01: ${joinValues(issue3.keys, ", ")}`; case "invalid_key": - return `\u0E04\u0E35\u0E22\u0E4C\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${issue2.origin}`; + return `\u0E04\u0E35\u0E22\u0E4C\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${issue3.origin}`; case "invalid_union": return "\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E44\u0E21\u0E48\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E22\u0E39\u0E40\u0E19\u0E35\u0E22\u0E19\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E44\u0E27\u0E49"; case "invalid_element": - return `\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${issue2.origin}`; + return `\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${issue3.origin}`; default: return `\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07`; } @@ -66217,7 +62111,7 @@ function tr_default() { var parsedType3, error35; var init_tr = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/tr.js"() { - init_util2(); + init_util(); parsedType3 = (data) => { const t = typeof data; switch (t) { @@ -66278,30 +62172,30 @@ var init_tr = __esm({ jwt: "JWT", template_literal: "\u015Eablon dizesi" }; - return (issue2) => { - switch (issue2.code) { + return (issue3) => { + switch (issue3.code) { case "invalid_type": - return `Ge\xE7ersiz de\u011Fer: beklenen ${issue2.expected}, al\u0131nan ${parsedType3(issue2.input)}`; + return `Ge\xE7ersiz de\u011Fer: beklenen ${issue3.expected}, al\u0131nan ${parsedType3(issue3.input)}`; case "invalid_value": - if (issue2.values.length === 1) - return `Ge\xE7ersiz de\u011Fer: beklenen ${stringifyPrimitive(issue2.values[0])}`; - return `Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${joinValues(issue2.values, "|")}`; + if (issue3.values.length === 1) + return `Ge\xE7ersiz de\u011Fer: beklenen ${stringifyPrimitive(issue3.values[0])}`; + return `Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${joinValues(issue3.values, "|")}`; case "too_big": { - const adj = issue2.inclusive ? "<=" : "<"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? "<=" : "<"; + const sizing = getSizing(issue3.origin); if (sizing) - return `\xC7ok b\xFCy\xFCk: beklenen ${issue2.origin ?? "de\u011Fer"} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\xF6\u011Fe"}`; - return `\xC7ok b\xFCy\xFCk: beklenen ${issue2.origin ?? "de\u011Fer"} ${adj}${issue2.maximum.toString()}`; + return `\xC7ok b\xFCy\xFCk: beklenen ${issue3.origin ?? "de\u011Fer"} ${adj}${issue3.maximum.toString()} ${sizing.unit ?? "\xF6\u011Fe"}`; + return `\xC7ok b\xFCy\xFCk: beklenen ${issue3.origin ?? "de\u011Fer"} ${adj}${issue3.maximum.toString()}`; } case "too_small": { - const adj = issue2.inclusive ? ">=" : ">"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? ">=" : ">"; + const sizing = getSizing(issue3.origin); if (sizing) - return `\xC7ok k\xFC\xE7\xFCk: beklenen ${issue2.origin} ${adj}${issue2.minimum.toString()} ${sizing.unit}`; - return `\xC7ok k\xFC\xE7\xFCk: beklenen ${issue2.origin} ${adj}${issue2.minimum.toString()}`; + return `\xC7ok k\xFC\xE7\xFCk: beklenen ${issue3.origin} ${adj}${issue3.minimum.toString()} ${sizing.unit}`; + return `\xC7ok k\xFC\xE7\xFCk: beklenen ${issue3.origin} ${adj}${issue3.minimum.toString()}`; } case "invalid_format": { - const _issue = issue2; + const _issue = issue3; if (_issue.format === "starts_with") return `Ge\xE7ersiz metin: "${_issue.prefix}" ile ba\u015Flamal\u0131`; if (_issue.format === "ends_with") @@ -66310,18 +62204,18 @@ var init_tr = __esm({ return `Ge\xE7ersiz metin: "${_issue.includes}" i\xE7ermeli`; if (_issue.format === "regex") return `Ge\xE7ersiz metin: ${_issue.pattern} desenine uymal\u0131`; - return `Ge\xE7ersiz ${Nouns[_issue.format] ?? issue2.format}`; + return `Ge\xE7ersiz ${Nouns[_issue.format] ?? issue3.format}`; } case "not_multiple_of": - return `Ge\xE7ersiz say\u0131: ${issue2.divisor} ile tam b\xF6l\xFCnebilmeli`; + return `Ge\xE7ersiz say\u0131: ${issue3.divisor} ile tam b\xF6l\xFCnebilmeli`; case "unrecognized_keys": - return `Tan\u0131nmayan anahtar${issue2.keys.length > 1 ? "lar" : ""}: ${joinValues(issue2.keys, ", ")}`; + return `Tan\u0131nmayan anahtar${issue3.keys.length > 1 ? "lar" : ""}: ${joinValues(issue3.keys, ", ")}`; case "invalid_key": - return `${issue2.origin} i\xE7inde ge\xE7ersiz anahtar`; + return `${issue3.origin} i\xE7inde ge\xE7ersiz anahtar`; case "invalid_union": return "Ge\xE7ersiz de\u011Fer"; case "invalid_element": - return `${issue2.origin} i\xE7inde ge\xE7ersiz de\u011Fer`; + return `${issue3.origin} i\xE7inde ge\xE7ersiz de\u011Fer`; default: return `Ge\xE7ersiz de\u011Fer`; } @@ -66339,7 +62233,7 @@ function ua_default() { var error36; var init_ua = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/ua.js"() { - init_util2(); + init_util(); error36 = () => { const Sizable = { string: { unit: "\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432", verb: "\u043C\u0430\u0442\u0438\u043C\u0435" }, @@ -66350,7 +62244,7 @@ var init_ua = __esm({ function getSizing(origin) { return Sizable[origin] ?? null; } - const parsedType4 = (data) => { + const parsedType5 = (data) => { const t = typeof data; switch (t) { case "number": { @@ -66400,32 +62294,32 @@ var init_ua = __esm({ jwt: "JWT", template_literal: "\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456" }; - return (issue2) => { - switch (issue2.code) { + return (issue3) => { + switch (issue3.code) { case "invalid_type": - return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${issue2.expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${parsedType4(issue2.input)}`; + return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${issue3.expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${parsedType5(issue3.input)}`; // return `Неправильні вхідні дані: очікується ${issue.expected}, отримано ${util.getParsedType(issue.input)}`; case "invalid_value": - if (issue2.values.length === 1) - return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${stringifyPrimitive(issue2.values[0])}`; - return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0430 \u043E\u043F\u0446\u0456\u044F: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F \u043E\u0434\u043D\u0435 \u0437 ${joinValues(issue2.values, "|")}`; + if (issue3.values.length === 1) + return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${stringifyPrimitive(issue3.values[0])}`; + return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0430 \u043E\u043F\u0446\u0456\u044F: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F \u043E\u0434\u043D\u0435 \u0437 ${joinValues(issue3.values, "|")}`; case "too_big": { - const adj = issue2.inclusive ? "<=" : "<"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? "<=" : "<"; + const sizing = getSizing(issue3.origin); if (sizing) - return `\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${issue2.origin ?? "\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432"}`; - return `\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${issue2.origin ?? "\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} \u0431\u0443\u0434\u0435 ${adj}${issue2.maximum.toString()}`; + return `\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${issue3.origin ?? "\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} ${sizing.verb} ${adj}${issue3.maximum.toString()} ${sizing.unit ?? "\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432"}`; + return `\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${issue3.origin ?? "\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} \u0431\u0443\u0434\u0435 ${adj}${issue3.maximum.toString()}`; } case "too_small": { - const adj = issue2.inclusive ? ">=" : ">"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? ">=" : ">"; + const sizing = getSizing(issue3.origin); if (sizing) { - return `\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${issue2.origin} ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + return `\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${issue3.origin} ${sizing.verb} ${adj}${issue3.minimum.toString()} ${sizing.unit}`; } - return `\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${issue2.origin} \u0431\u0443\u0434\u0435 ${adj}${issue2.minimum.toString()}`; + return `\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${issue3.origin} \u0431\u0443\u0434\u0435 ${adj}${issue3.minimum.toString()}`; } case "invalid_format": { - const _issue = issue2; + const _issue = issue3; if (_issue.format === "starts_with") return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043F\u043E\u0447\u0438\u043D\u0430\u0442\u0438\u0441\u044F \u0437 "${_issue.prefix}"`; if (_issue.format === "ends_with") @@ -66434,18 +62328,18 @@ var init_ua = __esm({ return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043C\u0456\u0441\u0442\u0438\u0442\u0438 "${_issue.includes}"`; if (_issue.format === "regex") return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u0430\u0442\u0438 \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${_issue.pattern}`; - return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 ${Nouns[_issue.format] ?? issue2.format}`; + return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 ${Nouns[_issue.format] ?? issue3.format}`; } case "not_multiple_of": - return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0447\u0438\u0441\u043B\u043E: \u043F\u043E\u0432\u0438\u043D\u043D\u043E \u0431\u0443\u0442\u0438 \u043A\u0440\u0430\u0442\u043D\u0438\u043C ${issue2.divisor}`; + return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0447\u0438\u0441\u043B\u043E: \u043F\u043E\u0432\u0438\u043D\u043D\u043E \u0431\u0443\u0442\u0438 \u043A\u0440\u0430\u0442\u043D\u0438\u043C ${issue3.divisor}`; case "unrecognized_keys": - return `\u041D\u0435\u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u043D\u0438\u0439 \u043A\u043B\u044E\u0447${issue2.keys.length > 1 ? "\u0456" : ""}: ${joinValues(issue2.keys, ", ")}`; + return `\u041D\u0435\u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u043D\u0438\u0439 \u043A\u043B\u044E\u0447${issue3.keys.length > 1 ? "\u0456" : ""}: ${joinValues(issue3.keys, ", ")}`; case "invalid_key": - return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u043A\u043B\u044E\u0447 \u0443 ${issue2.origin}`; + return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u043A\u043B\u044E\u0447 \u0443 ${issue3.origin}`; case "invalid_union": return "\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"; case "invalid_element": - return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F \u0443 ${issue2.origin}`; + return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F \u0443 ${issue3.origin}`; default: return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456`; } @@ -66463,7 +62357,7 @@ function ur_default() { var error37; var init_ur = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/ur.js"() { - init_util2(); + init_util(); error37 = () => { const Sizable = { string: { unit: "\u062D\u0631\u0648\u0641", verb: "\u06C1\u0648\u0646\u0627" }, @@ -66474,7 +62368,7 @@ var init_ur = __esm({ function getSizing(origin) { return Sizable[origin] ?? null; } - const parsedType4 = (data) => { + const parsedType5 = (data) => { const t = typeof data; switch (t) { case "number": { @@ -66524,31 +62418,31 @@ var init_ur = __esm({ jwt: "\u062C\u06D2 \u0688\u0628\u0644\u06CC\u0648 \u0679\u06CC", template_literal: "\u0627\u0646 \u067E\u0679" }; - return (issue2) => { - switch (issue2.code) { + return (issue3) => { + switch (issue3.code) { case "invalid_type": - return `\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${issue2.expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${parsedType4(issue2.input)} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`; + return `\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${issue3.expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${parsedType5(issue3.input)} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`; case "invalid_value": - if (issue2.values.length === 1) - return `\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${stringifyPrimitive(issue2.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`; - return `\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${joinValues(issue2.values, "|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`; + if (issue3.values.length === 1) + return `\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${stringifyPrimitive(issue3.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`; + return `\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${joinValues(issue3.values, "|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`; case "too_big": { - const adj = issue2.inclusive ? "<=" : "<"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? "<=" : "<"; + const sizing = getSizing(issue3.origin); if (sizing) - return `\u0628\u06C1\u062A \u0628\u0691\u0627: ${issue2.origin ?? "\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\u0639\u0646\u0627\u0635\u0631"} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`; - return `\u0628\u06C1\u062A \u0628\u0691\u0627: ${issue2.origin ?? "\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u0627 ${adj}${issue2.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`; + return `\u0628\u06C1\u062A \u0628\u0691\u0627: ${issue3.origin ?? "\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${adj}${issue3.maximum.toString()} ${sizing.unit ?? "\u0639\u0646\u0627\u0635\u0631"} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`; + return `\u0628\u06C1\u062A \u0628\u0691\u0627: ${issue3.origin ?? "\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u0627 ${adj}${issue3.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`; } case "too_small": { - const adj = issue2.inclusive ? ">=" : ">"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? ">=" : ">"; + const sizing = getSizing(issue3.origin); if (sizing) { - return `\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${issue2.origin} \u06A9\u06D2 ${adj}${issue2.minimum.toString()} ${sizing.unit} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`; + return `\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${issue3.origin} \u06A9\u06D2 ${adj}${issue3.minimum.toString()} ${sizing.unit} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`; } - return `\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${issue2.origin} \u06A9\u0627 ${adj}${issue2.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`; + return `\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${issue3.origin} \u06A9\u0627 ${adj}${issue3.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`; } case "invalid_format": { - const _issue = issue2; + const _issue = issue3; if (_issue.format === "starts_with") { return `\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${_issue.prefix}" \u0633\u06D2 \u0634\u0631\u0648\u0639 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`; } @@ -66558,18 +62452,18 @@ var init_ur = __esm({ return `\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${_issue.includes}" \u0634\u0627\u0645\u0644 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`; if (_issue.format === "regex") return `\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \u067E\u06CC\u0679\u0631\u0646 ${_issue.pattern} \u0633\u06D2 \u0645\u06CC\u0686 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`; - return `\u063A\u0644\u0637 ${Nouns[_issue.format] ?? issue2.format}`; + return `\u063A\u0644\u0637 ${Nouns[_issue.format] ?? issue3.format}`; } case "not_multiple_of": - return `\u063A\u0644\u0637 \u0646\u0645\u0628\u0631: ${issue2.divisor} \u06A9\u0627 \u0645\u0636\u0627\u0639\u0641 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`; + return `\u063A\u0644\u0637 \u0646\u0645\u0628\u0631: ${issue3.divisor} \u06A9\u0627 \u0645\u0636\u0627\u0639\u0641 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`; case "unrecognized_keys": - return `\u063A\u06CC\u0631 \u062A\u0633\u0644\u06CC\u0645 \u0634\u062F\u06C1 \u06A9\u06CC${issue2.keys.length > 1 ? "\u0632" : ""}: ${joinValues(issue2.keys, "\u060C ")}`; + return `\u063A\u06CC\u0631 \u062A\u0633\u0644\u06CC\u0645 \u0634\u062F\u06C1 \u06A9\u06CC${issue3.keys.length > 1 ? "\u0632" : ""}: ${joinValues(issue3.keys, "\u060C ")}`; case "invalid_key": - return `${issue2.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u06A9\u06CC`; + return `${issue3.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u06A9\u06CC`; case "invalid_union": return "\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679"; case "invalid_element": - return `${issue2.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u0648\u06CC\u0644\u06CC\u0648`; + return `${issue3.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u0648\u06CC\u0644\u06CC\u0648`; default: return `\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679`; } @@ -66587,7 +62481,7 @@ function vi_default() { var error38; var init_vi = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/vi.js"() { - init_util2(); + init_util(); error38 = () => { const Sizable = { string: { unit: "k\xFD t\u1EF1", verb: "c\xF3" }, @@ -66598,7 +62492,7 @@ var init_vi = __esm({ function getSizing(origin) { return Sizable[origin] ?? null; } - const parsedType4 = (data) => { + const parsedType5 = (data) => { const t = typeof data; switch (t) { case "number": { @@ -66648,31 +62542,31 @@ var init_vi = __esm({ jwt: "JWT", template_literal: "\u0111\u1EA7u v\xE0o" }; - return (issue2) => { - switch (issue2.code) { + return (issue3) => { + switch (issue3.code) { case "invalid_type": - return `\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${issue2.expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${parsedType4(issue2.input)}`; + return `\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${issue3.expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${parsedType5(issue3.input)}`; case "invalid_value": - if (issue2.values.length === 1) - return `\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${stringifyPrimitive(issue2.values[0])}`; - return `T\xF9y ch\u1ECDn kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i m\u1ED9t trong c\xE1c gi\xE1 tr\u1ECB ${joinValues(issue2.values, "|")}`; + if (issue3.values.length === 1) + return `\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${stringifyPrimitive(issue3.values[0])}`; + return `T\xF9y ch\u1ECDn kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i m\u1ED9t trong c\xE1c gi\xE1 tr\u1ECB ${joinValues(issue3.values, "|")}`; case "too_big": { - const adj = issue2.inclusive ? "<=" : "<"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? "<=" : "<"; + const sizing = getSizing(issue3.origin); if (sizing) - return `Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${issue2.origin ?? "gi\xE1 tr\u1ECB"} ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "ph\u1EA7n t\u1EED"}`; - return `Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${issue2.origin ?? "gi\xE1 tr\u1ECB"} ${adj}${issue2.maximum.toString()}`; + return `Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${issue3.origin ?? "gi\xE1 tr\u1ECB"} ${sizing.verb} ${adj}${issue3.maximum.toString()} ${sizing.unit ?? "ph\u1EA7n t\u1EED"}`; + return `Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${issue3.origin ?? "gi\xE1 tr\u1ECB"} ${adj}${issue3.maximum.toString()}`; } case "too_small": { - const adj = issue2.inclusive ? ">=" : ">"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? ">=" : ">"; + const sizing = getSizing(issue3.origin); if (sizing) { - return `Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${issue2.origin} ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + return `Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${issue3.origin} ${sizing.verb} ${adj}${issue3.minimum.toString()} ${sizing.unit}`; } - return `Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${issue2.origin} ${adj}${issue2.minimum.toString()}`; + return `Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${issue3.origin} ${adj}${issue3.minimum.toString()}`; } case "invalid_format": { - const _issue = issue2; + const _issue = issue3; if (_issue.format === "starts_with") return `Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i b\u1EAFt \u0111\u1EA7u b\u1EB1ng "${_issue.prefix}"`; if (_issue.format === "ends_with") @@ -66681,18 +62575,18 @@ var init_vi = __esm({ return `Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i bao g\u1ED3m "${_issue.includes}"`; if (_issue.format === "regex") return `Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i kh\u1EDBp v\u1EDBi m\u1EABu ${_issue.pattern}`; - return `${Nouns[_issue.format] ?? issue2.format} kh\xF4ng h\u1EE3p l\u1EC7`; + return `${Nouns[_issue.format] ?? issue3.format} kh\xF4ng h\u1EE3p l\u1EC7`; } case "not_multiple_of": - return `S\u1ED1 kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i l\xE0 b\u1ED9i s\u1ED1 c\u1EE7a ${issue2.divisor}`; + return `S\u1ED1 kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i l\xE0 b\u1ED9i s\u1ED1 c\u1EE7a ${issue3.divisor}`; case "unrecognized_keys": - return `Kh\xF3a kh\xF4ng \u0111\u01B0\u1EE3c nh\u1EADn d\u1EA1ng: ${joinValues(issue2.keys, ", ")}`; + return `Kh\xF3a kh\xF4ng \u0111\u01B0\u1EE3c nh\u1EADn d\u1EA1ng: ${joinValues(issue3.keys, ", ")}`; case "invalid_key": - return `Kh\xF3a kh\xF4ng h\u1EE3p l\u1EC7 trong ${issue2.origin}`; + return `Kh\xF3a kh\xF4ng h\u1EE3p l\u1EC7 trong ${issue3.origin}`; case "invalid_union": return "\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7"; case "invalid_element": - return `Gi\xE1 tr\u1ECB kh\xF4ng h\u1EE3p l\u1EC7 trong ${issue2.origin}`; + return `Gi\xE1 tr\u1ECB kh\xF4ng h\u1EE3p l\u1EC7 trong ${issue3.origin}`; default: return `\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7`; } @@ -66710,7 +62604,7 @@ function zh_CN_default() { var error39; var init_zh_CN = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/zh-CN.js"() { - init_util2(); + init_util(); error39 = () => { const Sizable = { string: { unit: "\u5B57\u7B26", verb: "\u5305\u542B" }, @@ -66721,7 +62615,7 @@ var init_zh_CN = __esm({ function getSizing(origin) { return Sizable[origin] ?? null; } - const parsedType4 = (data) => { + const parsedType5 = (data) => { const t = typeof data; switch (t) { case "number": { @@ -66771,31 +62665,31 @@ var init_zh_CN = __esm({ jwt: "JWT", template_literal: "\u8F93\u5165" }; - return (issue2) => { - switch (issue2.code) { + return (issue3) => { + switch (issue3.code) { case "invalid_type": - return `\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${issue2.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${parsedType4(issue2.input)}`; + return `\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${issue3.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${parsedType5(issue3.input)}`; case "invalid_value": - if (issue2.values.length === 1) - return `\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${stringifyPrimitive(issue2.values[0])}`; - return `\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${joinValues(issue2.values, "|")}`; + if (issue3.values.length === 1) + return `\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${stringifyPrimitive(issue3.values[0])}`; + return `\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${joinValues(issue3.values, "|")}`; case "too_big": { - const adj = issue2.inclusive ? "<=" : "<"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? "<=" : "<"; + const sizing = getSizing(issue3.origin); if (sizing) - return `\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${issue2.origin ?? "\u503C"} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\u4E2A\u5143\u7D20"}`; - return `\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${issue2.origin ?? "\u503C"} ${adj}${issue2.maximum.toString()}`; + return `\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${issue3.origin ?? "\u503C"} ${adj}${issue3.maximum.toString()} ${sizing.unit ?? "\u4E2A\u5143\u7D20"}`; + return `\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${issue3.origin ?? "\u503C"} ${adj}${issue3.maximum.toString()}`; } case "too_small": { - const adj = issue2.inclusive ? ">=" : ">"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? ">=" : ">"; + const sizing = getSizing(issue3.origin); if (sizing) { - return `\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${issue2.origin} ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + return `\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${issue3.origin} ${adj}${issue3.minimum.toString()} ${sizing.unit}`; } - return `\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${issue2.origin} ${adj}${issue2.minimum.toString()}`; + return `\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${issue3.origin} ${adj}${issue3.minimum.toString()}`; } case "invalid_format": { - const _issue = issue2; + const _issue = issue3; if (_issue.format === "starts_with") return `\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${_issue.prefix}" \u5F00\u5934`; if (_issue.format === "ends_with") @@ -66804,18 +62698,18 @@ var init_zh_CN = __esm({ return `\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u5305\u542B "${_issue.includes}"`; if (_issue.format === "regex") return `\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u6EE1\u8DB3\u6B63\u5219\u8868\u8FBE\u5F0F ${_issue.pattern}`; - return `\u65E0\u6548${Nouns[_issue.format] ?? issue2.format}`; + return `\u65E0\u6548${Nouns[_issue.format] ?? issue3.format}`; } case "not_multiple_of": - return `\u65E0\u6548\u6570\u5B57\uFF1A\u5FC5\u987B\u662F ${issue2.divisor} \u7684\u500D\u6570`; + return `\u65E0\u6548\u6570\u5B57\uFF1A\u5FC5\u987B\u662F ${issue3.divisor} \u7684\u500D\u6570`; case "unrecognized_keys": - return `\u51FA\u73B0\u672A\u77E5\u7684\u952E(key): ${joinValues(issue2.keys, ", ")}`; + return `\u51FA\u73B0\u672A\u77E5\u7684\u952E(key): ${joinValues(issue3.keys, ", ")}`; case "invalid_key": - return `${issue2.origin} \u4E2D\u7684\u952E(key)\u65E0\u6548`; + return `${issue3.origin} \u4E2D\u7684\u952E(key)\u65E0\u6548`; case "invalid_union": return "\u65E0\u6548\u8F93\u5165"; case "invalid_element": - return `${issue2.origin} \u4E2D\u5305\u542B\u65E0\u6548\u503C(value)`; + return `${issue3.origin} \u4E2D\u5305\u542B\u65E0\u6548\u503C(value)`; default: return `\u65E0\u6548\u8F93\u5165`; } @@ -66833,7 +62727,7 @@ function zh_TW_default() { var error40; var init_zh_TW = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/zh-TW.js"() { - init_util2(); + init_util(); error40 = () => { const Sizable = { string: { unit: "\u5B57\u5143", verb: "\u64C1\u6709" }, @@ -66844,7 +62738,7 @@ var init_zh_TW = __esm({ function getSizing(origin) { return Sizable[origin] ?? null; } - const parsedType4 = (data) => { + const parsedType5 = (data) => { const t = typeof data; switch (t) { case "number": { @@ -66894,31 +62788,31 @@ var init_zh_TW = __esm({ jwt: "JWT", template_literal: "\u8F38\u5165" }; - return (issue2) => { - switch (issue2.code) { + return (issue3) => { + switch (issue3.code) { case "invalid_type": - return `\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${issue2.expected}\uFF0C\u4F46\u6536\u5230 ${parsedType4(issue2.input)}`; + return `\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${issue3.expected}\uFF0C\u4F46\u6536\u5230 ${parsedType5(issue3.input)}`; case "invalid_value": - if (issue2.values.length === 1) - return `\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${stringifyPrimitive(issue2.values[0])}`; - return `\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${joinValues(issue2.values, "|")}`; + if (issue3.values.length === 1) + return `\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${stringifyPrimitive(issue3.values[0])}`; + return `\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${joinValues(issue3.values, "|")}`; case "too_big": { - const adj = issue2.inclusive ? "<=" : "<"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? "<=" : "<"; + const sizing = getSizing(issue3.origin); if (sizing) - return `\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${issue2.origin ?? "\u503C"} \u61C9\u70BA ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\u500B\u5143\u7D20"}`; - return `\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${issue2.origin ?? "\u503C"} \u61C9\u70BA ${adj}${issue2.maximum.toString()}`; + return `\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${issue3.origin ?? "\u503C"} \u61C9\u70BA ${adj}${issue3.maximum.toString()} ${sizing.unit ?? "\u500B\u5143\u7D20"}`; + return `\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${issue3.origin ?? "\u503C"} \u61C9\u70BA ${adj}${issue3.maximum.toString()}`; } case "too_small": { - const adj = issue2.inclusive ? ">=" : ">"; - const sizing = getSizing(issue2.origin); + const adj = issue3.inclusive ? ">=" : ">"; + const sizing = getSizing(issue3.origin); if (sizing) { - return `\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${issue2.origin} \u61C9\u70BA ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + return `\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${issue3.origin} \u61C9\u70BA ${adj}${issue3.minimum.toString()} ${sizing.unit}`; } - return `\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${issue2.origin} \u61C9\u70BA ${adj}${issue2.minimum.toString()}`; + return `\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${issue3.origin} \u61C9\u70BA ${adj}${issue3.minimum.toString()}`; } case "invalid_format": { - const _issue = issue2; + const _issue = issue3; if (_issue.format === "starts_with") { return `\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${_issue.prefix}" \u958B\u982D`; } @@ -66928,18 +62822,18 @@ var init_zh_TW = __esm({ return `\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u5305\u542B "${_issue.includes}"`; if (_issue.format === "regex") return `\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u7B26\u5408\u683C\u5F0F ${_issue.pattern}`; - return `\u7121\u6548\u7684 ${Nouns[_issue.format] ?? issue2.format}`; + return `\u7121\u6548\u7684 ${Nouns[_issue.format] ?? issue3.format}`; } case "not_multiple_of": - return `\u7121\u6548\u7684\u6578\u5B57\uFF1A\u5FC5\u9808\u70BA ${issue2.divisor} \u7684\u500D\u6578`; + return `\u7121\u6548\u7684\u6578\u5B57\uFF1A\u5FC5\u9808\u70BA ${issue3.divisor} \u7684\u500D\u6578`; case "unrecognized_keys": - return `\u7121\u6CD5\u8B58\u5225\u7684\u9375\u503C${issue2.keys.length > 1 ? "\u5011" : ""}\uFF1A${joinValues(issue2.keys, "\u3001")}`; + return `\u7121\u6CD5\u8B58\u5225\u7684\u9375\u503C${issue3.keys.length > 1 ? "\u5011" : ""}\uFF1A${joinValues(issue3.keys, "\u3001")}`; case "invalid_key": - return `${issue2.origin} \u4E2D\u6709\u7121\u6548\u7684\u9375\u503C`; + return `${issue3.origin} \u4E2D\u6709\u7121\u6548\u7684\u9375\u503C`; case "invalid_union": return "\u7121\u6548\u7684\u8F38\u5165\u503C"; case "invalid_element": - return `${issue2.origin} \u4E2D\u6709\u7121\u6548\u7684\u503C`; + return `${issue3.origin} \u4E2D\u6709\u7121\u6548\u7684\u503C`; default: return `\u7121\u6548\u7684\u8F38\u5165\u503C`; } @@ -66999,7 +62893,7 @@ var init_locales = __esm({ init_ca(); init_cs(); init_de(); - init_en2(); + init_en(); init_eo(); init_es(); init_fa(); @@ -67945,7 +63839,7 @@ var init_api = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/api.js"() { init_checks(); init_schemas(); - init_util2(); + init_util(); TimePrecision = { Any: null, Minute: -1, @@ -68172,7 +64066,7 @@ var JSONSchemaGenerator; var init_to_json_schema = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/to-json-schema.js"() { init_registries(); - init_util2(); + init_util(); JSONSchemaGenerator = class { constructor(params) { this.counter = 0; @@ -69063,11 +64957,11 @@ var init_core2 = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/index.js"() { init_core(); init_parse(); - init_errors2(); + init_errors(); init_schemas(); init_checks(); init_versions(); - init_util2(); + init_util(); init_regexes(); init_locales(); init_registries(); @@ -69079,10 +64973,10 @@ var init_core2 = __esm({ } }); -// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/Options.js +// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/Options.js var ignoreOverride2, jsonDescription, defaultOptions, getDefaultOptions; var init_Options = __esm({ - "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/Options.js"() { + "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/Options.js"() { ignoreOverride2 = Symbol("Let zodToJsonSchema decide on which parser to use"); jsonDescription = (jsonSchema2, def) => { if (def.description) { @@ -69130,10 +65024,10 @@ var init_Options = __esm({ } }); -// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/Refs.js +// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/Refs.js var getRefs; var init_Refs = __esm({ - "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/Refs.js"() { + "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/Refs.js"() { init_Options(); getRefs = (options) => { const _options = getDefaultOptions(options); @@ -69157,7 +65051,7 @@ var init_Refs = __esm({ } }); -// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/errorMessages.js +// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/errorMessages.js function addErrorMessage(res, key, errorMessage, refs) { if (!refs?.errorMessages) return; @@ -69173,14 +65067,14 @@ function setResponseValueAndErrors(res, key, value2, errorMessage, refs) { addErrorMessage(res, key, errorMessage, refs); } var init_errorMessages = __esm({ - "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/errorMessages.js"() { + "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/errorMessages.js"() { } }); -// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/getRelativePath.js +// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/getRelativePath.js var getRelativePath; var init_getRelativePath = __esm({ - "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/getRelativePath.js"() { + "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/getRelativePath.js"() { getRelativePath = (pathA, pathB) => { let i = 0; for (; i < pathA.length && i < pathB.length; i++) { @@ -69192,7 +65086,930 @@ var init_getRelativePath = __esm({ } }); -// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/any.js +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/core.js +// @__NO_SIDE_EFFECTS__ +function $constructor2(name, initializer4, params) { + function init(inst, def) { + var _a; + Object.defineProperty(inst, "_zod", { + value: inst._zod ?? {}, + enumerable: false + }); + (_a = inst._zod).traits ?? (_a.traits = /* @__PURE__ */ new Set()); + inst._zod.traits.add(name); + initializer4(inst, def); + for (const k in _.prototype) { + if (!(k in inst)) + Object.defineProperty(inst, k, { value: _.prototype[k].bind(inst) }); + } + inst._zod.constr = _; + inst._zod.def = def; + } + const Parent = params?.Parent ?? Object; + class Definition extends Parent { + } + Object.defineProperty(Definition, "name", { value: name }); + function _(def) { + var _a; + const inst = params?.Parent ? new Definition() : this; + init(inst, def); + (_a = inst._zod).deferred ?? (_a.deferred = []); + for (const fn2 of inst._zod.deferred) { + fn2(); + } + return inst; + } + Object.defineProperty(_, "init", { value: init }); + Object.defineProperty(_, Symbol.hasInstance, { + value: (inst) => { + if (params?.Parent && inst instanceof params.Parent) + return true; + return inst?._zod?.traits?.has(name); + } + }); + Object.defineProperty(_, "name", { value: name }); + return _; +} +function config2(newConfig) { + if (newConfig) + Object.assign(globalConfig2, newConfig); + return globalConfig2; +} +var NEVER5, $brand2, globalConfig2; +var init_core3 = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/core.js"() { + NEVER5 = Object.freeze({ + status: "aborted" + }); + $brand2 = Symbol("zod_brand"); + globalConfig2 = {}; + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/util.js +function joinValues2(array, separator2 = "|") { + return array.map((val) => stringifyPrimitive2(val)).join(separator2); +} +function jsonStringifyReplacer2(_, value2) { + if (typeof value2 === "bigint") + return value2.toString(); + return value2; +} +function cached4(getter) { + const set = false; + return { + get value() { + if (!set) { + const value2 = getter(); + Object.defineProperty(this, "value", { value: value2 }); + return value2; + } + throw new Error("cached value already set"); + } + }; +} +function stringifyPrimitive2(value2) { + if (typeof value2 === "bigint") + return value2.toString() + "n"; + if (typeof value2 === "string") + return `"${value2}"`; + return `${value2}`; +} +var EVALUATING, captureStackTrace2, allowsEval2, NUMBER_FORMAT_RANGES2; +var init_util2 = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/util.js"() { + EVALUATING = Symbol("evaluating"); + captureStackTrace2 = "captureStackTrace" in Error ? Error.captureStackTrace : (..._args) => { + }; + allowsEval2 = cached4(() => { + if (typeof navigator !== "undefined" && navigator?.userAgent?.includes("Cloudflare")) { + return false; + } + try { + const F = Function; + new F(""); + return true; + } catch (_) { + return false; + } + }); + NUMBER_FORMAT_RANGES2 = { + safeint: [Number.MIN_SAFE_INTEGER, Number.MAX_SAFE_INTEGER], + int32: [-2147483648, 2147483647], + uint32: [0, 4294967295], + float32: [-34028234663852886e22, 34028234663852886e22], + float64: [-Number.MAX_VALUE, Number.MAX_VALUE] + }; + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/errors.js +function flattenError3(error42, mapper = (issue3) => issue3.message) { + const fieldErrors = {}; + const formErrors = []; + for (const sub of error42.issues) { + if (sub.path.length > 0) { + fieldErrors[sub.path[0]] = fieldErrors[sub.path[0]] || []; + fieldErrors[sub.path[0]].push(mapper(sub)); + } else { + formErrors.push(mapper(sub)); + } + } + return { formErrors, fieldErrors }; +} +function formatError2(error42, mapper = (issue3) => issue3.message) { + const fieldErrors = { _errors: [] }; + const processError = (error43) => { + for (const issue3 of error43.issues) { + if (issue3.code === "invalid_union" && issue3.errors.length) { + issue3.errors.map((issues) => processError({ issues })); + } else if (issue3.code === "invalid_key") { + processError({ issues: issue3.issues }); + } else if (issue3.code === "invalid_element") { + processError({ issues: issue3.issues }); + } else if (issue3.path.length === 0) { + fieldErrors._errors.push(mapper(issue3)); + } else { + let curr = fieldErrors; + let i = 0; + while (i < issue3.path.length) { + const el = issue3.path[i]; + const terminal = i === issue3.path.length - 1; + if (!terminal) { + curr[el] = curr[el] || { _errors: [] }; + } else { + curr[el] = curr[el] || { _errors: [] }; + curr[el]._errors.push(mapper(issue3)); + } + curr = curr[el]; + i++; + } + } + } + }; + processError(error42); + return fieldErrors; +} +var initializer2, $ZodError2, $ZodRealError2; +var init_errors2 = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/errors.js"() { + init_core3(); + init_util2(); + initializer2 = (inst, def) => { + inst.name = "$ZodError"; + Object.defineProperty(inst, "_zod", { + value: inst._zod, + enumerable: false + }); + Object.defineProperty(inst, "issues", { + value: def, + enumerable: false + }); + inst.message = JSON.stringify(def, jsonStringifyReplacer2, 2); + Object.defineProperty(inst, "toString", { + value: () => inst.message, + enumerable: false + }); + }; + $ZodError2 = $constructor2("$ZodError", initializer2); + $ZodRealError2 = $constructor2("$ZodError", initializer2, { Parent: Error }); + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/parse.js +var init_parse2 = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/parse.js"() { + init_core3(); + init_errors2(); + init_util2(); + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/regexes.js +var dateSource2, date2; +var init_regexes2 = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/regexes.js"() { + dateSource2 = `(?:(?:\\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])))`; + date2 = /* @__PURE__ */ new RegExp(`^${dateSource2}$`); + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/checks.js +var init_checks2 = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/checks.js"() { + init_core3(); + init_regexes2(); + init_util2(); + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/doc.js +var init_doc2 = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/doc.js"() { + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/versions.js +var init_versions2 = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/versions.js"() { + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/schemas.js +var init_schemas2 = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/schemas.js"() { + init_checks2(); + init_core3(); + init_doc2(); + init_parse2(); + init_regexes2(); + init_util2(); + init_versions2(); + init_util2(); + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/ar.js +var init_ar2 = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/ar.js"() { + init_util2(); + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/az.js +var init_az2 = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/az.js"() { + init_util2(); + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/be.js +var init_be2 = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/be.js"() { + init_util2(); + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/bg.js +var init_bg = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/bg.js"() { + init_util2(); + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/ca.js +var init_ca2 = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/ca.js"() { + init_util2(); + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/cs.js +var init_cs2 = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/cs.js"() { + init_util2(); + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/da.js +var init_da = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/da.js"() { + init_util2(); + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/de.js +var init_de2 = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/de.js"() { + init_util2(); + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/en.js +function en_default5() { + return { + localeError: error41() + }; +} +var parsedType4, error41; +var init_en2 = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/en.js"() { + init_util2(); + parsedType4 = (data) => { + const t = typeof data; + switch (t) { + case "number": { + return Number.isNaN(data) ? "NaN" : "number"; + } + case "object": { + if (Array.isArray(data)) { + return "array"; + } + if (data === null) { + return "null"; + } + if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) { + return data.constructor.name; + } + } + } + return t; + }; + error41 = () => { + const Sizable = { + string: { unit: "characters", verb: "to have" }, + file: { unit: "bytes", verb: "to have" }, + array: { unit: "items", verb: "to have" }, + set: { unit: "items", verb: "to have" } + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + const Nouns = { + 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" + }; + return (issue3) => { + switch (issue3.code) { + case "invalid_type": + return `Invalid input: expected ${issue3.expected}, received ${parsedType4(issue3.input)}`; + case "invalid_value": + if (issue3.values.length === 1) + return `Invalid input: expected ${stringifyPrimitive2(issue3.values[0])}`; + return `Invalid option: expected one of ${joinValues2(issue3.values, "|")}`; + case "too_big": { + const adj = issue3.inclusive ? "<=" : "<"; + const sizing = getSizing(issue3.origin); + if (sizing) + return `Too big: expected ${issue3.origin ?? "value"} to have ${adj}${issue3.maximum.toString()} ${sizing.unit ?? "elements"}`; + return `Too big: expected ${issue3.origin ?? "value"} to be ${adj}${issue3.maximum.toString()}`; + } + case "too_small": { + const adj = issue3.inclusive ? ">=" : ">"; + const sizing = getSizing(issue3.origin); + if (sizing) { + return `Too small: expected ${issue3.origin} to have ${adj}${issue3.minimum.toString()} ${sizing.unit}`; + } + return `Too small: expected ${issue3.origin} to be ${adj}${issue3.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue3; + if (_issue.format === "starts_with") { + return `Invalid string: must start with "${_issue.prefix}"`; + } + if (_issue.format === "ends_with") + return `Invalid string: must end with "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Invalid string: must include "${_issue.includes}"`; + if (_issue.format === "regex") + return `Invalid string: must match pattern ${_issue.pattern}`; + return `Invalid ${Nouns[_issue.format] ?? issue3.format}`; + } + case "not_multiple_of": + return `Invalid number: must be a multiple of ${issue3.divisor}`; + case "unrecognized_keys": + return `Unrecognized key${issue3.keys.length > 1 ? "s" : ""}: ${joinValues2(issue3.keys, ", ")}`; + case "invalid_key": + return `Invalid key in ${issue3.origin}`; + case "invalid_union": + return "Invalid input"; + case "invalid_element": + return `Invalid value in ${issue3.origin}`; + default: + return `Invalid input`; + } + }; + }; + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/eo.js +var init_eo2 = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/eo.js"() { + init_util2(); + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/es.js +var init_es2 = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/es.js"() { + init_util2(); + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/fa.js +var init_fa2 = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/fa.js"() { + init_util2(); + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/fi.js +var init_fi2 = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/fi.js"() { + init_util2(); + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/fr.js +var init_fr2 = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/fr.js"() { + init_util2(); + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/fr-CA.js +var init_fr_CA2 = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/fr-CA.js"() { + init_util2(); + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/he.js +var init_he2 = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/he.js"() { + init_util2(); + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/hu.js +var init_hu2 = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/hu.js"() { + init_util2(); + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/id.js +var init_id2 = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/id.js"() { + init_util2(); + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/is.js +var init_is = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/is.js"() { + init_util2(); + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/it.js +var init_it2 = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/it.js"() { + init_util2(); + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/ja.js +var init_ja2 = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/ja.js"() { + init_util2(); + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/ka.js +var init_ka = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/ka.js"() { + init_util2(); + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/km.js +var init_km = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/km.js"() { + init_util2(); + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/kh.js +var init_kh2 = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/kh.js"() { + init_km(); + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/ko.js +var init_ko2 = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/ko.js"() { + init_util2(); + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/lt.js +var init_lt = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/lt.js"() { + init_util2(); + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/mk.js +var init_mk2 = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/mk.js"() { + init_util2(); + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/ms.js +var init_ms2 = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/ms.js"() { + init_util2(); + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/nl.js +var init_nl2 = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/nl.js"() { + init_util2(); + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/no.js +var init_no2 = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/no.js"() { + init_util2(); + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/ota.js +var init_ota2 = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/ota.js"() { + init_util2(); + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/ps.js +var init_ps2 = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/ps.js"() { + init_util2(); + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/pl.js +var init_pl2 = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/pl.js"() { + init_util2(); + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/pt.js +var init_pt2 = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/pt.js"() { + init_util2(); + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/ru.js +var init_ru2 = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/ru.js"() { + init_util2(); + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/sl.js +var init_sl2 = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/sl.js"() { + init_util2(); + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/sv.js +var init_sv2 = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/sv.js"() { + init_util2(); + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/ta.js +var init_ta2 = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/ta.js"() { + init_util2(); + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/th.js +var init_th2 = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/th.js"() { + init_util2(); + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/tr.js +var init_tr2 = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/tr.js"() { + init_util2(); + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/uk.js +var init_uk = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/uk.js"() { + init_util2(); + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/ua.js +var init_ua2 = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/ua.js"() { + init_uk(); + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/ur.js +var init_ur2 = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/ur.js"() { + init_util2(); + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/vi.js +var init_vi2 = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/vi.js"() { + init_util2(); + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/zh-CN.js +var init_zh_CN2 = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/zh-CN.js"() { + init_util2(); + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/zh-TW.js +var init_zh_TW2 = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/zh-TW.js"() { + init_util2(); + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/yo.js +var init_yo = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/yo.js"() { + init_util2(); + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/index.js +var init_locales2 = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/index.js"() { + init_ar2(); + init_az2(); + init_be2(); + init_bg(); + init_ca2(); + init_cs2(); + init_da(); + init_de2(); + init_en2(); + init_eo2(); + init_es2(); + init_fa2(); + init_fi2(); + init_fr2(); + init_fr_CA2(); + init_he2(); + init_hu2(); + init_id2(); + init_is(); + init_it2(); + init_ja2(); + init_ka(); + init_kh2(); + init_km(); + init_ko2(); + init_lt(); + init_mk2(); + init_ms2(); + init_nl2(); + init_no2(); + init_ota2(); + init_ps2(); + init_pl2(); + init_pt2(); + init_ru2(); + init_sl2(); + init_sv2(); + init_ta2(); + init_th2(); + init_tr2(); + init_ua2(); + init_uk(); + init_ur2(); + init_vi2(); + init_zh_CN2(); + init_zh_TW2(); + init_yo(); + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/registries.js +var $output2, $input2; +var init_registries2 = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/registries.js"() { + $output2 = Symbol("ZodOutput"); + $input2 = Symbol("ZodInput"); + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/api.js +var init_api2 = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/api.js"() { + init_checks2(); + init_schemas2(); + init_util2(); + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/to-json-schema.js +var init_to_json_schema2 = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/to-json-schema.js"() { + init_registries2(); + init_util2(); + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/json-schema.js +var init_json_schema2 = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/json-schema.js"() { + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/index.js +var init_core4 = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/index.js"() { + init_core3(); + init_parse2(); + init_errors2(); + init_schemas2(); + init_checks2(); + init_versions2(); + init_util2(); + init_regexes2(); + init_locales2(); + init_registries2(); + init_doc2(); + init_api2(); + init_to_json_schema2(); + init_json_schema2(); + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/classic/checks.js +var init_checks3 = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/classic/checks.js"() { + init_core4(); + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/classic/iso.js +var init_iso = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/classic/iso.js"() { + init_core4(); + init_schemas3(); + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/classic/errors.js +var initializer3, ZodError5, ZodRealError; +var init_errors3 = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/classic/errors.js"() { + init_core4(); + init_core4(); + init_util2(); + initializer3 = (inst, issues) => { + $ZodError2.init(inst, issues); + inst.name = "ZodError"; + Object.defineProperties(inst, { + format: { + value: (mapper) => formatError2(inst, mapper) + // enumerable: false, + }, + flatten: { + value: (mapper) => flattenError3(inst, mapper) + // enumerable: false, + }, + addIssue: { + value: (issue3) => { + inst.issues.push(issue3); + inst.message = JSON.stringify(inst.issues, jsonStringifyReplacer2, 2); + } + // enumerable: false, + }, + addIssues: { + value: (issues2) => { + inst.issues.push(...issues2); + inst.message = JSON.stringify(inst.issues, jsonStringifyReplacer2, 2); + } + // enumerable: false, + }, + isEmpty: { + get() { + return inst.issues.length === 0; + } + // enumerable: false, + } + }); + }; + ZodError5 = $constructor2("ZodError", initializer3); + ZodRealError = $constructor2("ZodError", initializer3, { + Parent: Error + }); + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/classic/parse.js +var init_parse3 = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/classic/parse.js"() { + init_core4(); + init_errors3(); + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/classic/schemas.js +var init_schemas3 = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/classic/schemas.js"() { + init_core4(); + init_core4(); + init_checks3(); + init_iso(); + init_parse3(); + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/classic/compat.js +var ZodFirstPartyTypeKind4; +var init_compat = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/classic/compat.js"() { + init_core4(); + init_core4(); + /* @__PURE__ */ (function(ZodFirstPartyTypeKind5) { + })(ZodFirstPartyTypeKind4 || (ZodFirstPartyTypeKind4 = {})); + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/classic/coerce.js +var init_coerce = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/classic/coerce.js"() { + init_core4(); + init_schemas3(); + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/classic/external.js +var init_external = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/classic/external.js"() { + init_core4(); + init_schemas3(); + init_checks3(); + init_errors3(); + init_parse3(); + init_compat(); + init_core4(); + init_en2(); + init_core4(); + init_locales2(); + init_iso(); + init_iso(); + init_coerce(); + config2(en_default5()); + } +}); + +// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/index.js +var init_zod = __esm({ + "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/index.js"() { + init_external(); + init_external(); + } +}); + +// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/any.js function parseAnyDef(refs) { if (refs.target !== "openAi") { return {}; @@ -69208,17 +66025,17 @@ function parseAnyDef(refs) { }; } var init_any = __esm({ - "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/any.js"() { + "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/any.js"() { init_getRelativePath(); } }); -// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/array.js +// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/array.js function parseArrayDef(def, refs) { const res = { type: "array" }; - if (def.type?._def && def.type?._def?.typeName !== ZodFirstPartyTypeKind2.ZodAny) { + if (def.type?._def && def.type?._def?.typeName !== ZodFirstPartyTypeKind4.ZodAny) { res.items = parseDef(def.type._def, { ...refs, currentPath: [...refs.currentPath, "items"] @@ -69237,14 +66054,14 @@ function parseArrayDef(def, refs) { return res; } var init_array = __esm({ - "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/array.js"() { + "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/array.js"() { init_zod(); init_errorMessages(); init_parseDef(); } }); -// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/bigint.js +// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/bigint.js function parseBigintDef(def, refs) { const res = { type: "integer", @@ -69290,36 +66107,36 @@ function parseBigintDef(def, refs) { return res; } var init_bigint = __esm({ - "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/bigint.js"() { + "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/bigint.js"() { init_errorMessages(); } }); -// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/boolean.js +// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/boolean.js function parseBooleanDef() { return { type: "boolean" }; } var init_boolean = __esm({ - "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/boolean.js"() { + "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/boolean.js"() { } }); -// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/branded.js +// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/branded.js function parseBrandedDef(_def, refs) { return parseDef(_def.type._def, refs); } var init_branded = __esm({ - "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/branded.js"() { + "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/branded.js"() { init_parseDef(); } }); -// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/catch.js +// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/catch.js var parseCatchDef; var init_catch = __esm({ - "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/catch.js"() { + "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/catch.js"() { init_parseDef(); parseCatchDef = (def, refs) => { return parseDef(def.innerType._def, refs); @@ -69327,7 +66144,7 @@ var init_catch = __esm({ } }); -// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/date.js +// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/date.js function parseDateDef(def, refs, overrideDateStrategy) { const strategy = overrideDateStrategy ?? refs.dateStrategy; if (Array.isArray(strategy)) { @@ -69353,7 +66170,7 @@ function parseDateDef(def, refs, overrideDateStrategy) { } var integerDateParser; var init_date = __esm({ - "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/date.js"() { + "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/date.js"() { init_errorMessages(); integerDateParser = (def, refs) => { const res = { @@ -69392,7 +66209,7 @@ var init_date = __esm({ } }); -// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/default.js +// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/default.js function parseDefaultDef(_def, refs) { return { ...parseDef(_def.innerType._def, refs), @@ -69400,23 +66217,23 @@ function parseDefaultDef(_def, refs) { }; } var init_default = __esm({ - "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/default.js"() { + "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/default.js"() { init_parseDef(); } }); -// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/effects.js +// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/effects.js function parseEffectsDef(_def, refs) { return refs.effectStrategy === "input" ? parseDef(_def.schema._def, refs) : parseAnyDef(refs); } var init_effects = __esm({ - "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/effects.js"() { + "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/effects.js"() { init_parseDef(); init_any(); } }); -// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/enum.js +// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/enum.js function parseEnumDef(def) { return { type: "string", @@ -69424,11 +66241,11 @@ function parseEnumDef(def) { }; } var init_enum = __esm({ - "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/enum.js"() { + "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/enum.js"() { } }); -// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/intersection.js +// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/intersection.js function parseIntersectionDef(def, refs) { const allOf = [ parseDef(def.left._def, { @@ -69466,7 +66283,7 @@ function parseIntersectionDef(def, refs) { } var isJsonSchema7AllOfType; var init_intersection = __esm({ - "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/intersection.js"() { + "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/intersection.js"() { init_parseDef(); isJsonSchema7AllOfType = (type2) => { if ("type" in type2 && type2.type === "string") @@ -69476,31 +66293,31 @@ var init_intersection = __esm({ } }); -// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/literal.js +// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/literal.js function parseLiteralDef(def, refs) { - const parsedType4 = typeof def.value; - if (parsedType4 !== "bigint" && parsedType4 !== "number" && parsedType4 !== "boolean" && parsedType4 !== "string") { + const parsedType5 = typeof def.value; + if (parsedType5 !== "bigint" && parsedType5 !== "number" && parsedType5 !== "boolean" && parsedType5 !== "string") { return { type: Array.isArray(def.value) ? "array" : "object" }; } if (refs.target === "openApi3") { return { - type: parsedType4 === "bigint" ? "integer" : parsedType4, + type: parsedType5 === "bigint" ? "integer" : parsedType5, enum: [def.value] }; } return { - type: parsedType4 === "bigint" ? "integer" : parsedType4, + type: parsedType5 === "bigint" ? "integer" : parsedType5, const: def.value }; } var init_literal = __esm({ - "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/literal.js"() { + "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/literal.js"() { } }); -// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/string.js +// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/string.js function parseStringDef(def, refs) { const res = { type: "string" @@ -69777,7 +66594,7 @@ function stringifyRegExpWithFlags(regex3, refs) { } var emojiRegex4, zodPatterns, ALPHA_NUMERIC2; var init_string = __esm({ - "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/string.js"() { + "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/string.js"() { init_errorMessages(); emojiRegex4 = void 0; zodPatterns = { @@ -69831,12 +66648,12 @@ var init_string = __esm({ } }); -// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/record.js +// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/record.js function parseRecordDef(def, refs) { if (refs.target === "openAi") { console.warn("Warning: OpenAI may not support records in schemas! Try an array of key-value pairs instead."); } - if (refs.target === "openApi3" && def.keyType?._def.typeName === ZodFirstPartyTypeKind2.ZodEnum) { + if (refs.target === "openApi3" && def.keyType?._def.typeName === ZodFirstPartyTypeKind4.ZodEnum) { return { type: "object", required: def.keyType._def.values, @@ -69860,20 +66677,20 @@ function parseRecordDef(def, refs) { if (refs.target === "openApi3") { return schema2; } - if (def.keyType?._def.typeName === ZodFirstPartyTypeKind2.ZodString && def.keyType._def.checks?.length) { + if (def.keyType?._def.typeName === ZodFirstPartyTypeKind4.ZodString && def.keyType._def.checks?.length) { const { type: type2, ...keyType } = parseStringDef(def.keyType._def, refs); return { ...schema2, propertyNames: keyType }; - } else if (def.keyType?._def.typeName === ZodFirstPartyTypeKind2.ZodEnum) { + } else if (def.keyType?._def.typeName === ZodFirstPartyTypeKind4.ZodEnum) { return { ...schema2, propertyNames: { enum: def.keyType._def.values } }; - } else if (def.keyType?._def.typeName === ZodFirstPartyTypeKind2.ZodBranded && def.keyType._def.type._def.typeName === ZodFirstPartyTypeKind2.ZodString && def.keyType._def.type._def.checks?.length) { + } else if (def.keyType?._def.typeName === ZodFirstPartyTypeKind4.ZodBranded && def.keyType._def.type._def.typeName === ZodFirstPartyTypeKind4.ZodString && def.keyType._def.type._def.checks?.length) { const { type: type2, ...keyType } = parseBrandedDef(def.keyType._def, refs); return { ...schema2, @@ -69883,7 +66700,7 @@ function parseRecordDef(def, refs) { return schema2; } var init_record = __esm({ - "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/record.js"() { + "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/record.js"() { init_zod(); init_parseDef(); init_string(); @@ -69892,7 +66709,7 @@ var init_record = __esm({ } }); -// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/map.js +// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/map.js function parseMapDef(def, refs) { if (refs.mapStrategy === "record") { return parseRecordDef(def, refs); @@ -69917,14 +66734,14 @@ function parseMapDef(def, refs) { }; } var init_map = __esm({ - "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/map.js"() { + "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/map.js"() { init_parseDef(); init_record(); init_any(); } }); -// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/nativeEnum.js +// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/nativeEnum.js function parseNativeEnumDef(def) { const object2 = def.values; const actualKeys = Object.keys(def.values).filter((key) => { @@ -69938,11 +66755,11 @@ function parseNativeEnumDef(def) { }; } var init_nativeEnum = __esm({ - "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/nativeEnum.js"() { + "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/nativeEnum.js"() { } }); -// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/never.js +// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/never.js function parseNeverDef(refs) { return refs.target === "openAi" ? void 0 : { not: parseAnyDef({ @@ -69952,12 +66769,12 @@ function parseNeverDef(refs) { }; } var init_never = __esm({ - "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/never.js"() { + "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/never.js"() { init_any(); } }); -// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/null.js +// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/null.js function parseNullDef(refs) { return refs.target === "openApi3" ? { enum: ["null"], @@ -69967,11 +66784,11 @@ function parseNullDef(refs) { }; } var init_null = __esm({ - "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/null.js"() { + "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/null.js"() { } }); -// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/union.js +// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/union.js function parseUnionDef(def, refs) { if (refs.target === "openApi3") return asAnyOf(def, refs); @@ -70026,7 +66843,7 @@ function parseUnionDef(def, refs) { } var primitiveMappings, asAnyOf; var init_union = __esm({ - "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/union.js"() { + "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/union.js"() { init_parseDef(); primitiveMappings = { ZodString: "string", @@ -70045,7 +66862,7 @@ var init_union = __esm({ } }); -// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/nullable.js +// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/nullable.js function parseNullableDef(def, refs) { if (["ZodString", "ZodNumber", "ZodBigInt", "ZodBoolean", "ZodNull"].includes(def.innerType._def.typeName) && (!def.innerType._def.checks || !def.innerType._def.checks.length)) { if (refs.target === "openApi3") { @@ -70077,13 +66894,13 @@ function parseNullableDef(def, refs) { return base && { anyOf: [base, { type: "null" }] }; } var init_nullable = __esm({ - "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/nullable.js"() { + "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/nullable.js"() { init_parseDef(); init_union(); } }); -// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/number.js +// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/number.js function parseNumberDef(def, refs) { const res = { type: "number" @@ -70132,12 +66949,12 @@ function parseNumberDef(def, refs) { return res; } var init_number = __esm({ - "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/number.js"() { + "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/number.js"() { init_errorMessages(); } }); -// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/object.js +// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/object.js function parseObjectDef(def, refs) { const forceOptionalIntoNullable = refs.target === "openAi"; const result = { @@ -70207,15 +67024,15 @@ function safeIsOptional(schema2) { } } var init_object = __esm({ - "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/object.js"() { + "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/object.js"() { init_parseDef(); } }); -// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/optional.js +// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/optional.js var parseOptionalDef; var init_optional = __esm({ - "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/optional.js"() { + "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/optional.js"() { init_parseDef(); init_any(); parseOptionalDef = (def, refs) => { @@ -70238,10 +67055,10 @@ var init_optional = __esm({ } }); -// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/pipeline.js +// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/pipeline.js var parsePipelineDef; var init_pipeline = __esm({ - "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/pipeline.js"() { + "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/pipeline.js"() { init_parseDef(); parsePipelineDef = (def, refs) => { if (refs.pipeStrategy === "input") { @@ -70264,17 +67081,17 @@ var init_pipeline = __esm({ } }); -// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/promise.js +// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/promise.js function parsePromiseDef(def, refs) { return parseDef(def.type._def, refs); } var init_promise = __esm({ - "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/promise.js"() { + "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/promise.js"() { init_parseDef(); } }); -// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/set.js +// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/set.js function parseSetDef(def, refs) { const items = parseDef(def.valueType._def, { ...refs, @@ -70294,13 +67111,13 @@ function parseSetDef(def, refs) { return schema2; } var init_set = __esm({ - "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/set.js"() { + "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/set.js"() { init_errorMessages(); init_parseDef(); } }); -// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/tuple.js +// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/tuple.js function parseTupleDef(def, refs) { if (def.rest) { return { @@ -70328,37 +67145,37 @@ function parseTupleDef(def, refs) { } } var init_tuple = __esm({ - "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/tuple.js"() { + "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/tuple.js"() { init_parseDef(); } }); -// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/undefined.js +// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/undefined.js function parseUndefinedDef(refs) { return { not: parseAnyDef(refs) }; } var init_undefined = __esm({ - "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/undefined.js"() { + "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/undefined.js"() { init_any(); } }); -// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/unknown.js +// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/unknown.js function parseUnknownDef(refs) { return parseAnyDef(refs); } var init_unknown = __esm({ - "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/unknown.js"() { + "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/unknown.js"() { init_any(); } }); -// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/readonly.js +// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/readonly.js var parseReadonlyDef; var init_readonly = __esm({ - "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/readonly.js"() { + "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/readonly.js"() { init_parseDef(); parseReadonlyDef = (def, refs) => { return parseDef(def.innerType._def, refs); @@ -70366,10 +67183,10 @@ var init_readonly = __esm({ } }); -// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/selectParser.js +// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/selectParser.js var selectParser; var init_selectParser = __esm({ - "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/selectParser.js"() { + "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/selectParser.js"() { init_zod(); init_any(); init_array(); @@ -70403,73 +67220,73 @@ var init_selectParser = __esm({ init_readonly(); selectParser = (def, typeName, refs) => { switch (typeName) { - case ZodFirstPartyTypeKind2.ZodString: + case ZodFirstPartyTypeKind4.ZodString: return parseStringDef(def, refs); - case ZodFirstPartyTypeKind2.ZodNumber: + case ZodFirstPartyTypeKind4.ZodNumber: return parseNumberDef(def, refs); - case ZodFirstPartyTypeKind2.ZodObject: + case ZodFirstPartyTypeKind4.ZodObject: return parseObjectDef(def, refs); - case ZodFirstPartyTypeKind2.ZodBigInt: + case ZodFirstPartyTypeKind4.ZodBigInt: return parseBigintDef(def, refs); - case ZodFirstPartyTypeKind2.ZodBoolean: + case ZodFirstPartyTypeKind4.ZodBoolean: return parseBooleanDef(); - case ZodFirstPartyTypeKind2.ZodDate: + case ZodFirstPartyTypeKind4.ZodDate: return parseDateDef(def, refs); - case ZodFirstPartyTypeKind2.ZodUndefined: + case ZodFirstPartyTypeKind4.ZodUndefined: return parseUndefinedDef(refs); - case ZodFirstPartyTypeKind2.ZodNull: + case ZodFirstPartyTypeKind4.ZodNull: return parseNullDef(refs); - case ZodFirstPartyTypeKind2.ZodArray: + case ZodFirstPartyTypeKind4.ZodArray: return parseArrayDef(def, refs); - case ZodFirstPartyTypeKind2.ZodUnion: - case ZodFirstPartyTypeKind2.ZodDiscriminatedUnion: + case ZodFirstPartyTypeKind4.ZodUnion: + case ZodFirstPartyTypeKind4.ZodDiscriminatedUnion: return parseUnionDef(def, refs); - case ZodFirstPartyTypeKind2.ZodIntersection: + case ZodFirstPartyTypeKind4.ZodIntersection: return parseIntersectionDef(def, refs); - case ZodFirstPartyTypeKind2.ZodTuple: + case ZodFirstPartyTypeKind4.ZodTuple: return parseTupleDef(def, refs); - case ZodFirstPartyTypeKind2.ZodRecord: + case ZodFirstPartyTypeKind4.ZodRecord: return parseRecordDef(def, refs); - case ZodFirstPartyTypeKind2.ZodLiteral: + case ZodFirstPartyTypeKind4.ZodLiteral: return parseLiteralDef(def, refs); - case ZodFirstPartyTypeKind2.ZodEnum: + case ZodFirstPartyTypeKind4.ZodEnum: return parseEnumDef(def); - case ZodFirstPartyTypeKind2.ZodNativeEnum: + case ZodFirstPartyTypeKind4.ZodNativeEnum: return parseNativeEnumDef(def); - case ZodFirstPartyTypeKind2.ZodNullable: + case ZodFirstPartyTypeKind4.ZodNullable: return parseNullableDef(def, refs); - case ZodFirstPartyTypeKind2.ZodOptional: + case ZodFirstPartyTypeKind4.ZodOptional: return parseOptionalDef(def, refs); - case ZodFirstPartyTypeKind2.ZodMap: + case ZodFirstPartyTypeKind4.ZodMap: return parseMapDef(def, refs); - case ZodFirstPartyTypeKind2.ZodSet: + case ZodFirstPartyTypeKind4.ZodSet: return parseSetDef(def, refs); - case ZodFirstPartyTypeKind2.ZodLazy: + case ZodFirstPartyTypeKind4.ZodLazy: return () => def.getter()._def; - case ZodFirstPartyTypeKind2.ZodPromise: + case ZodFirstPartyTypeKind4.ZodPromise: return parsePromiseDef(def, refs); - case ZodFirstPartyTypeKind2.ZodNaN: - case ZodFirstPartyTypeKind2.ZodNever: + case ZodFirstPartyTypeKind4.ZodNaN: + case ZodFirstPartyTypeKind4.ZodNever: return parseNeverDef(refs); - case ZodFirstPartyTypeKind2.ZodEffects: + case ZodFirstPartyTypeKind4.ZodEffects: return parseEffectsDef(def, refs); - case ZodFirstPartyTypeKind2.ZodAny: + case ZodFirstPartyTypeKind4.ZodAny: return parseAnyDef(refs); - case ZodFirstPartyTypeKind2.ZodUnknown: + case ZodFirstPartyTypeKind4.ZodUnknown: return parseUnknownDef(refs); - case ZodFirstPartyTypeKind2.ZodDefault: + case ZodFirstPartyTypeKind4.ZodDefault: return parseDefaultDef(def, refs); - case ZodFirstPartyTypeKind2.ZodBranded: + case ZodFirstPartyTypeKind4.ZodBranded: return parseBrandedDef(def, refs); - case ZodFirstPartyTypeKind2.ZodReadonly: + case ZodFirstPartyTypeKind4.ZodReadonly: return parseReadonlyDef(def, refs); - case ZodFirstPartyTypeKind2.ZodCatch: + case ZodFirstPartyTypeKind4.ZodCatch: return parseCatchDef(def, refs); - case ZodFirstPartyTypeKind2.ZodPipeline: + case ZodFirstPartyTypeKind4.ZodPipeline: return parsePipelineDef(def, refs); - case ZodFirstPartyTypeKind2.ZodFunction: - case ZodFirstPartyTypeKind2.ZodVoid: - case ZodFirstPartyTypeKind2.ZodSymbol: + case ZodFirstPartyTypeKind4.ZodFunction: + case ZodFirstPartyTypeKind4.ZodVoid: + case ZodFirstPartyTypeKind4.ZodSymbol: return void 0; default: return /* @__PURE__ */ ((_) => void 0)(typeName); @@ -70478,7 +67295,7 @@ var init_selectParser = __esm({ } }); -// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parseDef.js +// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parseDef.js function parseDef(def, refs, forceResolution = false) { const seenItem = refs.seen.get(def); if (refs.override) { @@ -70510,7 +67327,7 @@ function parseDef(def, refs, forceResolution = false) { } var get$ref, addMeta; var init_parseDef = __esm({ - "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parseDef.js"() { + "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parseDef.js"() { init_Options(); init_selectParser(); init_getRelativePath(); @@ -70543,16 +67360,16 @@ var init_parseDef = __esm({ } }); -// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parseTypes.js +// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parseTypes.js var init_parseTypes = __esm({ - "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parseTypes.js"() { + "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parseTypes.js"() { } }); -// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/zodToJsonSchema.js +// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/zodToJsonSchema.js var zodToJsonSchema; var init_zodToJsonSchema = __esm({ - "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/zodToJsonSchema.js"() { + "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/zodToJsonSchema.js"() { init_parseDef(); init_Refs(); init_any(); @@ -70619,7 +67436,7 @@ var init_zodToJsonSchema = __esm({ } }); -// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/index.js +// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/index.js var esm_exports = {}; __export(esm_exports, { addErrorMessage: () => addErrorMessage, @@ -70669,7 +67486,7 @@ __export(esm_exports, { }); var esm_default; var init_esm = __esm({ - "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/index.js"() { + "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/index.js"() { init_Options(); init_Refs(); init_errorMessages(); @@ -70730,8 +67547,8 @@ var init_zod_Bw_60DVU = __esm({ throw new Error(`xsschema: Missing zod v3 dependencies "zod-to-json-schema". see ${missingDependenciesUrl}`); }; try { - const { toJSONSchema: toJSONSchema2 } = await Promise.resolve().then(() => (init_core2(), core_exports2)); - zodV4toJSONSchema = toJSONSchema2; + const { toJSONSchema: toJSONSchema3 } = await Promise.resolve().then(() => (init_core2(), core_exports2)); + zodV4toJSONSchema = toJSONSchema3; } catch (err) { if (err instanceof Error) console.error(err.message); @@ -70969,8 +67786,8 @@ var args = noSuggest("args"); // ../node_modules/.pnpm/@ark+util@0.53.0/node_modules/@ark/util/out/isomorphic.js var fileName = () => { try { - const error41 = new Error(); - const stackLine = error41.stack?.split("\n")[2]?.trim() || ""; + const error42 = new Error(); + const stackLine = error42.stack?.split("\n")[2]?.trim() || ""; const filePath = stackLine.match(/\(?(.+?)(?::\d+:\d+)?\)?$/)?.[1] || "unknown"; return filePath.replace(/^file:\/\//, ""); } catch { @@ -71026,7 +67843,7 @@ var initialRegistryContents = { // ../node_modules/.pnpm/@ark+util@0.53.0/node_modules/@ark/util/out/traits.js var implementedTraits = noSuggest("implementedTraits"); -// ../node_modules/.pnpm/@anthropic-ai+claude-agent-sdk@0.1.37_zod@3.25.76/node_modules/@anthropic-ai/claude-agent-sdk/sdk.mjs +// ../node_modules/.pnpm/@anthropic-ai+claude-agent-sdk@0.1.37_zod@4.1.12/node_modules/@anthropic-ai/claude-agent-sdk/sdk.mjs import { join as join3 } from "path"; import { fileURLToPath } from "url"; import { setMaxListeners } from "events"; @@ -71203,26 +68020,26 @@ var require_uri_all = __commonJS2((exports, module) => { } return result; } - function mapDomain(string3, fn2) { - var parts = string3.split("@"); + function mapDomain(string4, fn2) { + var parts = string4.split("@"); var result = ""; if (parts.length > 1) { result = parts[0] + "@"; - string3 = parts[1]; + string4 = parts[1]; } - string3 = string3.replace(regexSeparators, "."); - var labels = string3.split("."); + string4 = string4.replace(regexSeparators, "."); + var labels = string4.split("."); var encoded = map(labels, fn2).join("."); return result + encoded; } - function ucs2decode(string3) { + function ucs2decode(string4) { var output = []; var counter = 0; - var length = string3.length; + var length = string4.length; while (counter < length) { - var value2 = string3.charCodeAt(counter++); + var value2 = string4.charCodeAt(counter++); if (value2 >= 55296 && value2 <= 56319 && counter < length) { - var extra = string3.charCodeAt(counter++); + var extra = string4.charCodeAt(counter++); if ((extra & 64512) == 56320) { output.push(((value2 & 1023) << 10) + (extra & 1023) + 65536); } else { @@ -71262,7 +68079,7 @@ var require_uri_all = __commonJS2((exports, module) => { } return floor(k + (baseMinusTMin + 1) * delta / (delta + skew)); }; - var decode = function decode2(input) { + var decode2 = function decode3(input) { var output = []; var inputLength = input.length; var i = 0; @@ -71310,7 +68127,7 @@ var require_uri_all = __commonJS2((exports, module) => { } return String.fromCodePoint.apply(String, output); }; - var encode2 = function encode3(input) { + var encode3 = function encode4(input) { var output = []; input = ucs2decode(input); var inputLength = input.length; @@ -71425,13 +68242,13 @@ var require_uri_all = __commonJS2((exports, module) => { return output.join(""); }; var toUnicode = function toUnicode2(input) { - return mapDomain(input, function(string3) { - return regexPunycode.test(string3) ? decode(string3.slice(4).toLowerCase()) : string3; + return mapDomain(input, function(string4) { + return regexPunycode.test(string4) ? decode2(string4.slice(4).toLowerCase()) : string4; }); }; var toASCII = function toASCII2(input) { - return mapDomain(input, function(string3) { - return regexNonASCII.test(string3) ? "xn--" + encode2(string3) : string3; + return mapDomain(input, function(string4) { + return regexNonASCII.test(string4) ? "xn--" + encode3(string4) : string4; }); }; var punycode = { @@ -71440,8 +68257,8 @@ var require_uri_all = __commonJS2((exports, module) => { decode: ucs2decode, encode: ucs2encode }, - decode, - encode: encode2, + decode: decode2, + encode: encode3, toASCII, toUnicode }; @@ -71572,7 +68389,7 @@ var require_uri_all = __commonJS2((exports, module) => { } var URI_PARSE = /^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i; var NO_MATCH_IS_UNDEFINED = "".match(/(){0}/)[1] === void 0; - function parse4(uriString) { + function parse6(uriString) { var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; var components = {}; var protocol = options.iri !== false ? IRI_PROTOCOL : URI_PROTOCOL; @@ -71743,8 +68560,8 @@ var require_uri_all = __commonJS2((exports, module) => { var skipNormalization = arguments[3]; var target = {}; if (!skipNormalization) { - base2 = parse4(serialize(base2, options), options); - relative2 = parse4(serialize(relative2, options), options); + base2 = parse6(serialize(base2, options), options); + relative2 = parse6(serialize(relative2, options), options); } options = options || {}; if (!options.tolerant && relative2.scheme) { @@ -71795,24 +68612,24 @@ var require_uri_all = __commonJS2((exports, module) => { } function resolve2(baseURI, relativeURI, options) { var schemelessOptions = assign({ scheme: "null" }, options); - return serialize(resolveComponents(parse4(baseURI, schemelessOptions), parse4(relativeURI, schemelessOptions), schemelessOptions, true), schemelessOptions); + return serialize(resolveComponents(parse6(baseURI, schemelessOptions), parse6(relativeURI, schemelessOptions), schemelessOptions, true), schemelessOptions); } function normalize2(uri, options) { if (typeof uri === "string") { - uri = serialize(parse4(uri, options), options); + uri = serialize(parse6(uri, options), options); } else if (typeOf(uri) === "object") { - uri = parse4(serialize(uri, options), options); + uri = parse6(serialize(uri, options), options); } return uri; } function equal(uriA, uriB, options) { if (typeof uriA === "string") { - uriA = serialize(parse4(uriA, options), options); + uriA = serialize(parse6(uriA, options), options); } else if (typeOf(uriA) === "object") { uriA = serialize(uriA, options); } if (typeof uriB === "string") { - uriB = serialize(parse4(uriB, options), options); + uriB = serialize(parse6(uriB, options), options); } else if (typeOf(uriB) === "object") { uriB = serialize(uriB, options); } @@ -71827,7 +68644,7 @@ var require_uri_all = __commonJS2((exports, module) => { var handler2 = { scheme: "http", domainHost: true, - parse: function parse5(components, options) { + parse: function parse7(components, options) { if (!components.host) { components.error = components.error || "HTTP URIs must have a host."; } @@ -71856,7 +68673,7 @@ var require_uri_all = __commonJS2((exports, module) => { var handler$2 = { scheme: "ws", domainHost: true, - parse: function parse5(components, options) { + parse: function parse7(components, options) { var wsComponents = components; wsComponents.secure = isSecure(wsComponents); wsComponents.resourceName = (wsComponents.path || "/") + (wsComponents.query ? "?" + wsComponents.query : ""); @@ -72032,7 +68849,7 @@ var require_uri_all = __commonJS2((exports, module) => { var UUID = /^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/; var handler$6 = { scheme: "urn:uuid", - parse: function parse5(urnComponents, options) { + parse: function parse7(urnComponents, options) { var uuidComponents = urnComponents; uuidComponents.uuid = uuidComponents.nss; uuidComponents.nss = void 0; @@ -72057,7 +68874,7 @@ var require_uri_all = __commonJS2((exports, module) => { exports2.SCHEMES = SCHEMES; exports2.pctEncChar = pctEncChar; exports2.pctDecChars = pctDecChars; - exports2.parse = parse4; + exports2.parse = parse6; exports2.removeDotSegments = removeDotSegments; exports2.serialize = serialize; exports2.resolveComponents = resolveComponents; @@ -73521,8 +70338,8 @@ var require_formats = __commonJS2((exports, module) => { "relative-json-pointer": RELATIVE_JSON_POINTER }; formats.full = { - date: date2, - time: time2, + date: date4, + time: time4, "date-time": date_time, uri, "uri-reference": URIREF, @@ -73541,7 +70358,7 @@ var require_formats = __commonJS2((exports, module) => { function isLeapYear(year) { return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0); } - function date2(str) { + function date4(str) { var matches = str.match(DATE); if (!matches) return false; @@ -73550,7 +70367,7 @@ var require_formats = __commonJS2((exports, module) => { var day = +matches[3]; return month >= 1 && month <= 12 && day >= 1 && day <= (month == 2 && isLeapYear(year) ? 29 : DAYS[month]); } - function time2(str, full) { + function time4(str, full) { var matches = str.match(TIME); if (!matches) return false; @@ -73563,7 +70380,7 @@ var require_formats = __commonJS2((exports, module) => { var DATE_TIME_SEPARATOR = /t|\s/i; function date_time(str) { var dateTime = str.split(DATE_TIME_SEPARATOR); - return dateTime.length == 2 && date2(dateTime[0]) && time2(dateTime[1], true); + return dateTime.length == 2 && date4(dateTime[0]) && time4(dateTime[1], true); } var NOT_URI_FRAGMENT = /\/|:/; function uri(str) { @@ -76973,9 +73790,9 @@ var require_ajv = __commonJS2((exports, module) => { throw new Error("schema should be object or boolean"); var serialize = this._opts.serialize; var cacheKey = serialize ? serialize(schema2) : schema2; - var cached4 = this._cache.get(cacheKey); - if (cached4) - return cached4; + var cached5 = this._cache.get(cacheKey); + if (cached5) + return cached5; shouldAddSchema = shouldAddSchema || this._opts.addUsedSchema !== false; var id = resolve2.normalizeId(this._getId(schema2)); if (id && shouldAddSchema) @@ -77440,12 +74257,12 @@ var ProcessTransport = class { this.abortHandler = cleanup; process.on("exit", this.processExitHandler); this.abortController.signal.addEventListener("abort", this.abortHandler); - this.child.on("error", (error41) => { + this.child.on("error", (error42) => { this.ready = false; if (this.abortController.signal.aborted) { this.exitError = new AbortError("Claude Code process aborted by user"); } else { - this.exitError = new Error(`Failed to spawn Claude Code process: ${error41.message}`); + this.exitError = new Error(`Failed to spawn Claude Code process: ${error42.message}`); this.logForDebugging(this.exitError.message); } }); @@ -77454,17 +74271,17 @@ var ProcessTransport = class { if (this.abortController.signal.aborted) { this.exitError = new AbortError("Claude Code process aborted by user"); } else { - const error41 = this.getProcessExitError(code, signal); - if (error41) { - this.exitError = error41; - this.logForDebugging(error41.message); + const error42 = this.getProcessExitError(code, signal); + if (error42) { + this.exitError = error42; + this.logForDebugging(error42.message); } } }); this.ready = true; - } catch (error41) { + } catch (error42) { this.ready = false; - throw error41; + throw error42; } } getProcessExitError(code, signal) { @@ -77506,9 +74323,9 @@ var ProcessTransport = class { if (!written && process.env.DEBUG_SDK) { console.warn("[ProcessTransport] Write buffer full, data queued"); } - } catch (error41) { + } catch (error42) { this.ready = false; - throw new Error(`Failed to write to process stdin: ${error41.message}`); + throw new Error(`Failed to write to process stdin: ${error42.message}`); } } close() { @@ -77554,8 +74371,8 @@ var ProcessTransport = class { } } await this.waitForExit(); - } catch (error41) { - throw error41; + } catch (error42) { + throw error42; } finally { rl.close(); } @@ -77573,8 +74390,8 @@ var ProcessTransport = class { return () => { }; const handler2 = (code, signal) => { - const error41 = this.getProcessExitError(code, signal); - callback(error41); + const error42 = this.getProcessExitError(code, signal); + callback(error42); }; this.child.on("exit", handler2); this.exitListeners.push({ callback, handler: handler2 }); @@ -77607,17 +74424,17 @@ var ProcessTransport = class { reject(new AbortError("Operation aborted")); return; } - const error41 = this.getProcessExitError(code, signal); - if (error41) { - reject(error41); + const error42 = this.getProcessExitError(code, signal); + if (error42) { + reject(error42); } else { resolve2(); } }; this.child.once("exit", exitHandler); - const errorHandler = (error41) => { + const errorHandler = (error42) => { this.child.off("exit", exitHandler); - reject(error41); + reject(error42); }; this.child.once("error", errorHandler); this.child.once("exit", () => { @@ -77685,13 +74502,13 @@ var Stream = class { resolve2({ done: true, value: void 0 }); } } - error(error41) { - this.hasError = error41; + error(error42) { + this.hasError = error42; if (this.readReject) { const reject = this.readReject; this.readResolve = void 0; this.readReject = void 0; - reject(error41); + reject(error42); } } return() { @@ -78352,10 +75169,10 @@ var Query = class { this.initialization.catch(() => { }); } - setError(error41) { - this.inputStream.error(error41); + setError(error42) { + this.inputStream.error(error42); } - cleanup(error41) { + cleanup(error42) { if (this.cleanupPerformed) return; this.cleanupPerformed = true; @@ -78363,8 +75180,8 @@ var Query = class { this.transport.close(); this.pendingControlResponses.clear(); this.pendingMcpResponses.clear(); - if (error41) { - this.inputStream.error(error41); + if (error42) { + this.inputStream.error(error42); } else { this.inputStream.done(); } @@ -78416,9 +75233,9 @@ var Query = class { } this.inputStream.done(); this.cleanup(); - } catch (error41) { - this.inputStream.error(error41); - this.cleanup(error41); + } catch (error42) { + this.inputStream.error(error42); + this.cleanup(error42); } } async handleControlRequest(request2) { @@ -78436,13 +75253,13 @@ var Query = class { }; await Promise.resolve(this.transport.write(JSON.stringify(controlResponse) + ` `)); - } catch (error41) { + } catch (error42) { const controlErrorResponse = { type: "control_response", response: { subtype: "error", request_id: request2.request_id, - error: error41.message || String(error41) + error: error42.message || String(error42) } }; await Promise.resolve(this.transport.write(JSON.stringify(controlErrorResponse) + ` @@ -78632,9 +75449,9 @@ var Query = class { } logForDebugging(`[Query] Calling transport.endInput() to close stdin to CLI process`); this.transport.endInput(); - } catch (error41) { - if (!(error41 instanceof AbortError)) { - throw error41; + } catch (error42) { + if (!(error42 instanceof AbortError)) { + throw error42; } } } @@ -78670,9 +75487,9 @@ var Query = class { cleanup(); resolve2(response); }; - const rejectAndCleanup = (error41) => { + const rejectAndCleanup = (error42) => { cleanup(); - reject(error41); + reject(error42); }; this.pendingMcpResponses.set(key, { resolve: resolveAndCleanup, @@ -78846,10 +75663,10 @@ var util; return; }; util22.isInteger = typeof Number.isInteger === "function" ? (val) => Number.isInteger(val) : (val) => typeof val === "number" && Number.isFinite(val) && Math.floor(val) === val; - function joinValues2(array, separator2 = " | ") { + function joinValues3(array, separator2 = " | ") { return array.map((val) => typeof val === "string" ? `'${val}'` : val).join(separator2); } - util22.joinValues = joinValues2; + util22.joinValues = joinValues3; util22.jsonStringifyReplacer = (_, value2) => { if (typeof value2 === "bigint") { return value2.toString(); @@ -78974,31 +75791,31 @@ var ZodError = class _ZodError extends Error { this.issues = issues; } format(_mapper) { - const mapper = _mapper || function(issue2) { - return issue2.message; + const mapper = _mapper || function(issue3) { + return issue3.message; }; const fieldErrors = { _errors: [] }; - const processError = (error41) => { - for (const issue2 of error41.issues) { - if (issue2.code === "invalid_union") { - issue2.unionErrors.map(processError); - } else if (issue2.code === "invalid_return_type") { - processError(issue2.returnTypeError); - } else if (issue2.code === "invalid_arguments") { - processError(issue2.argumentsError); - } else if (issue2.path.length === 0) { - fieldErrors._errors.push(mapper(issue2)); + const processError = (error42) => { + for (const issue3 of error42.issues) { + if (issue3.code === "invalid_union") { + issue3.unionErrors.map(processError); + } else if (issue3.code === "invalid_return_type") { + processError(issue3.returnTypeError); + } else if (issue3.code === "invalid_arguments") { + processError(issue3.argumentsError); + } else if (issue3.path.length === 0) { + fieldErrors._errors.push(mapper(issue3)); } else { let curr = fieldErrors; let i = 0; - while (i < issue2.path.length) { - const el = issue2.path[i]; - const terminal = i === issue2.path.length - 1; + while (i < issue3.path.length) { + const el = issue3.path[i]; + const terminal = i === issue3.path.length - 1; if (!terminal) { curr[el] = curr[el] || { _errors: [] }; } else { curr[el] = curr[el] || { _errors: [] }; - curr[el]._errors.push(mapper(issue2)); + curr[el]._errors.push(mapper(issue3)); } curr = curr[el]; i++; @@ -79023,7 +75840,7 @@ var ZodError = class _ZodError extends Error { get isEmpty() { return this.issues.length === 0; } - flatten(mapper = (issue2) => issue2.message) { + flatten(mapper = (issue3) => issue3.message) { const fieldErrors = {}; const formErrors = []; for (const sub of this.issues) { @@ -79042,33 +75859,33 @@ var ZodError = class _ZodError extends Error { } }; ZodError.create = (issues) => { - const error41 = new ZodError(issues); - return error41; + const error42 = new ZodError(issues); + return error42; }; -var errorMap = (issue2, _ctx) => { +var errorMap = (issue3, _ctx) => { let message; - switch (issue2.code) { + switch (issue3.code) { case ZodIssueCode.invalid_type: - if (issue2.received === ZodParsedType.undefined) { + if (issue3.received === ZodParsedType.undefined) { message = "Required"; } else { - message = `Expected ${issue2.expected}, received ${issue2.received}`; + message = `Expected ${issue3.expected}, received ${issue3.received}`; } break; case ZodIssueCode.invalid_literal: - message = `Invalid literal value, expected ${JSON.stringify(issue2.expected, util.jsonStringifyReplacer)}`; + message = `Invalid literal value, expected ${JSON.stringify(issue3.expected, util.jsonStringifyReplacer)}`; break; case ZodIssueCode.unrecognized_keys: - message = `Unrecognized key(s) in object: ${util.joinValues(issue2.keys, ", ")}`; + message = `Unrecognized key(s) in object: ${util.joinValues(issue3.keys, ", ")}`; break; case ZodIssueCode.invalid_union: message = `Invalid input`; break; case ZodIssueCode.invalid_union_discriminator: - message = `Invalid discriminator value. Expected ${util.joinValues(issue2.options)}`; + message = `Invalid discriminator value. Expected ${util.joinValues(issue3.options)}`; break; case ZodIssueCode.invalid_enum_value: - message = `Invalid enum value. Expected ${util.joinValues(issue2.options)}, received '${issue2.received}'`; + message = `Invalid enum value. Expected ${util.joinValues(issue3.options)}, received '${issue3.received}'`; break; case ZodIssueCode.invalid_arguments: message = `Invalid function arguments`; @@ -79080,50 +75897,50 @@ var errorMap = (issue2, _ctx) => { message = `Invalid date`; break; case ZodIssueCode.invalid_string: - if (typeof issue2.validation === "object") { - if ("includes" in issue2.validation) { - message = `Invalid input: must include "${issue2.validation.includes}"`; - if (typeof issue2.validation.position === "number") { - message = `${message} at one or more positions greater than or equal to ${issue2.validation.position}`; + if (typeof issue3.validation === "object") { + if ("includes" in issue3.validation) { + message = `Invalid input: must include "${issue3.validation.includes}"`; + if (typeof issue3.validation.position === "number") { + message = `${message} at one or more positions greater than or equal to ${issue3.validation.position}`; } - } else if ("startsWith" in issue2.validation) { - message = `Invalid input: must start with "${issue2.validation.startsWith}"`; - } else if ("endsWith" in issue2.validation) { - message = `Invalid input: must end with "${issue2.validation.endsWith}"`; + } else if ("startsWith" in issue3.validation) { + message = `Invalid input: must start with "${issue3.validation.startsWith}"`; + } else if ("endsWith" in issue3.validation) { + message = `Invalid input: must end with "${issue3.validation.endsWith}"`; } else { - util.assertNever(issue2.validation); + util.assertNever(issue3.validation); } - } else if (issue2.validation !== "regex") { - message = `Invalid ${issue2.validation}`; + } else if (issue3.validation !== "regex") { + message = `Invalid ${issue3.validation}`; } else { message = "Invalid"; } break; case ZodIssueCode.too_small: - if (issue2.type === "array") - message = `Array must contain ${issue2.exact ? "exactly" : issue2.inclusive ? `at least` : `more than`} ${issue2.minimum} element(s)`; - else if (issue2.type === "string") - message = `String must contain ${issue2.exact ? "exactly" : issue2.inclusive ? `at least` : `over`} ${issue2.minimum} character(s)`; - else if (issue2.type === "number") - message = `Number must be ${issue2.exact ? `exactly equal to ` : issue2.inclusive ? `greater than or equal to ` : `greater than `}${issue2.minimum}`; - else if (issue2.type === "bigint") - message = `Number must be ${issue2.exact ? `exactly equal to ` : issue2.inclusive ? `greater than or equal to ` : `greater than `}${issue2.minimum}`; - else if (issue2.type === "date") - message = `Date must be ${issue2.exact ? `exactly equal to ` : issue2.inclusive ? `greater than or equal to ` : `greater than `}${new Date(Number(issue2.minimum))}`; + if (issue3.type === "array") + message = `Array must contain ${issue3.exact ? "exactly" : issue3.inclusive ? `at least` : `more than`} ${issue3.minimum} element(s)`; + else if (issue3.type === "string") + message = `String must contain ${issue3.exact ? "exactly" : issue3.inclusive ? `at least` : `over`} ${issue3.minimum} character(s)`; + else if (issue3.type === "number") + message = `Number must be ${issue3.exact ? `exactly equal to ` : issue3.inclusive ? `greater than or equal to ` : `greater than `}${issue3.minimum}`; + else if (issue3.type === "bigint") + message = `Number must be ${issue3.exact ? `exactly equal to ` : issue3.inclusive ? `greater than or equal to ` : `greater than `}${issue3.minimum}`; + else if (issue3.type === "date") + message = `Date must be ${issue3.exact ? `exactly equal to ` : issue3.inclusive ? `greater than or equal to ` : `greater than `}${new Date(Number(issue3.minimum))}`; else message = "Invalid input"; break; case ZodIssueCode.too_big: - if (issue2.type === "array") - message = `Array must contain ${issue2.exact ? `exactly` : issue2.inclusive ? `at most` : `less than`} ${issue2.maximum} element(s)`; - else if (issue2.type === "string") - message = `String must contain ${issue2.exact ? `exactly` : issue2.inclusive ? `at most` : `under`} ${issue2.maximum} character(s)`; - else if (issue2.type === "number") - message = `Number must be ${issue2.exact ? `exactly` : issue2.inclusive ? `less than or equal to` : `less than`} ${issue2.maximum}`; - else if (issue2.type === "bigint") - message = `BigInt must be ${issue2.exact ? `exactly` : issue2.inclusive ? `less than or equal to` : `less than`} ${issue2.maximum}`; - else if (issue2.type === "date") - message = `Date must be ${issue2.exact ? `exactly` : issue2.inclusive ? `smaller than or equal to` : `smaller than`} ${new Date(Number(issue2.maximum))}`; + if (issue3.type === "array") + message = `Array must contain ${issue3.exact ? `exactly` : issue3.inclusive ? `at most` : `less than`} ${issue3.maximum} element(s)`; + else if (issue3.type === "string") + message = `String must contain ${issue3.exact ? `exactly` : issue3.inclusive ? `at most` : `under`} ${issue3.maximum} character(s)`; + else if (issue3.type === "number") + message = `Number must be ${issue3.exact ? `exactly` : issue3.inclusive ? `less than or equal to` : `less than`} ${issue3.maximum}`; + else if (issue3.type === "bigint") + message = `BigInt must be ${issue3.exact ? `exactly` : issue3.inclusive ? `less than or equal to` : `less than`} ${issue3.maximum}`; + else if (issue3.type === "date") + message = `Date must be ${issue3.exact ? `exactly` : issue3.inclusive ? `smaller than or equal to` : `smaller than`} ${new Date(Number(issue3.maximum))}`; else message = "Invalid input"; break; @@ -79134,14 +75951,14 @@ var errorMap = (issue2, _ctx) => { message = `Intersection results could not be merged`; break; case ZodIssueCode.not_multiple_of: - message = `Number must be a multiple of ${issue2.multipleOf}`; + message = `Number must be a multiple of ${issue3.multipleOf}`; break; case ZodIssueCode.not_finite: message = "Number must be finite"; break; default: message = _ctx.defaultError; - util.assertNever(issue2); + util.assertNever(issue3); } return { message }; }; @@ -79181,7 +75998,7 @@ var makeIssue = (params) => { var EMPTY_PATH = []; function addIssueToContext(ctx, issueData) { const overrideMap = getErrorMap(); - const issue2 = makeIssue({ + const issue3 = makeIssue({ issueData, data: ctx.data, path: ctx.path, @@ -79192,7 +76009,7 @@ function addIssueToContext(ctx, issueData) { overrideMap === en_default ? void 0 : en_default ].filter((x) => !!x) }); - ctx.common.issues.push(issue2); + ctx.common.issues.push(issue3); } var ParseStatus = class _ParseStatus { constructor() { @@ -79293,8 +76110,8 @@ var handleResult = (ctx, result) => { get error() { if (this._error) return this._error; - const error41 = new ZodError(ctx.common.issues); - this._error = error41; + const error42 = new ZodError(ctx.common.issues); + this._error = error42; return this._error; } }; @@ -79646,11 +76463,11 @@ function datetimeRegex(args3) { regex3 = `${regex3}(${opts.join("|")})`; return new RegExp(`^${regex3}$`); } -function isValidIP(ip2, version2) { - if ((version2 === "v4" || !version2) && ipv4Regex.test(ip2)) { +function isValidIP(ip2, version3) { + if ((version3 === "v4" || !version3) && ipv4Regex.test(ip2)) { return true; } - if ((version2 === "v6" || !version2) && ipv6Regex.test(ip2)) { + if ((version3 === "v6" || !version3) && ipv6Regex.test(ip2)) { return true; } return false; @@ -79662,8 +76479,8 @@ function isValidJWT(jwt, alg) { const [header] = jwt.split("."); if (!header) return false; - const base643 = header.replace(/-/g, "+").replace(/_/g, "/").padEnd(header.length + (4 - header.length % 4) % 4, "="); - const decoded = JSON.parse(atob(base643)); + const base644 = header.replace(/-/g, "+").replace(/_/g, "/").padEnd(header.length + (4 - header.length % 4) % 4, "="); + const decoded = JSON.parse(atob(base644)); if (typeof decoded !== "object" || decoded === null) return false; if ("typ" in decoded && decoded?.typ !== "JWT") @@ -79677,11 +76494,11 @@ function isValidJWT(jwt, alg) { return false; } } -function isValidCidr(ip2, version2) { - if ((version2 === "v4" || !version2) && ipv4CidrRegex.test(ip2)) { +function isValidCidr(ip2, version3) { + if ((version3 === "v4" || !version3) && ipv4CidrRegex.test(ip2)) { return true; } - if ((version2 === "v6" || !version2) && ipv6CidrRegex.test(ip2)) { + if ((version3 === "v6" || !version3) && ipv6CidrRegex.test(ip2)) { return true; } return false; @@ -79691,8 +76508,8 @@ var ZodString = class _ZodString extends ZodType { if (this._def.coerce) { input.data = String(input.data); } - const parsedType4 = this._getType(input); - if (parsedType4 !== ZodParsedType.string) { + const parsedType5 = this._getType(input); + if (parsedType5 !== ZodParsedType.string) { const ctx2 = this._getOrReturnCtx(input); addIssueToContext(ctx2, { code: ZodIssueCode.invalid_type, @@ -80248,8 +77065,8 @@ var ZodNumber = class _ZodNumber extends ZodType { if (this._def.coerce) { input.data = Number(input.data); } - const parsedType4 = this._getType(input); - if (parsedType4 !== ZodParsedType.number) { + const parsedType5 = this._getType(input); + if (parsedType5 !== ZodParsedType.number) { const ctx2 = this._getOrReturnCtx(input); addIssueToContext(ctx2, { code: ZodIssueCode.invalid_type, @@ -80483,8 +77300,8 @@ var ZodBigInt = class _ZodBigInt extends ZodType { return this._getInvalidInput(input); } } - const parsedType4 = this._getType(input); - if (parsedType4 !== ZodParsedType.bigint) { + const parsedType5 = this._getType(input); + if (parsedType5 !== ZodParsedType.bigint) { return this._getInvalidInput(input); } let ctx = void 0; @@ -80646,8 +77463,8 @@ var ZodBoolean = class extends ZodType { if (this._def.coerce) { input.data = Boolean(input.data); } - const parsedType4 = this._getType(input); - if (parsedType4 !== ZodParsedType.boolean) { + const parsedType5 = this._getType(input); + if (parsedType5 !== ZodParsedType.boolean) { const ctx = this._getOrReturnCtx(input); addIssueToContext(ctx, { code: ZodIssueCode.invalid_type, @@ -80671,8 +77488,8 @@ var ZodDate = class _ZodDate extends ZodType { if (this._def.coerce) { input.data = new Date(input.data); } - const parsedType4 = this._getType(input); - if (parsedType4 !== ZodParsedType.date) { + const parsedType5 = this._getType(input); + if (parsedType5 !== ZodParsedType.date) { const ctx2 = this._getOrReturnCtx(input); addIssueToContext(ctx2, { code: ZodIssueCode.invalid_type, @@ -80777,8 +77594,8 @@ ZodDate.create = (params) => { }; var ZodSymbol = class extends ZodType { _parse(input) { - const parsedType4 = this._getType(input); - if (parsedType4 !== ZodParsedType.symbol) { + const parsedType5 = this._getType(input); + if (parsedType5 !== ZodParsedType.symbol) { const ctx = this._getOrReturnCtx(input); addIssueToContext(ctx, { code: ZodIssueCode.invalid_type, @@ -80798,8 +77615,8 @@ ZodSymbol.create = (params) => { }; var ZodUndefined = class extends ZodType { _parse(input) { - const parsedType4 = this._getType(input); - if (parsedType4 !== ZodParsedType.undefined) { + const parsedType5 = this._getType(input); + if (parsedType5 !== ZodParsedType.undefined) { const ctx = this._getOrReturnCtx(input); addIssueToContext(ctx, { code: ZodIssueCode.invalid_type, @@ -80819,8 +77636,8 @@ ZodUndefined.create = (params) => { }; var ZodNull = class extends ZodType { _parse(input) { - const parsedType4 = this._getType(input); - if (parsedType4 !== ZodParsedType.null) { + const parsedType5 = this._getType(input); + if (parsedType5 !== ZodParsedType.null) { const ctx = this._getOrReturnCtx(input); addIssueToContext(ctx, { code: ZodIssueCode.invalid_type, @@ -80887,8 +77704,8 @@ ZodNever.create = (params) => { }; var ZodVoid = class extends ZodType { _parse(input) { - const parsedType4 = this._getType(input); - if (parsedType4 !== ZodParsedType.undefined) { + const parsedType5 = this._getType(input); + if (parsedType5 !== ZodParsedType.undefined) { const ctx = this._getOrReturnCtx(input); addIssueToContext(ctx, { code: ZodIssueCode.invalid_type, @@ -81049,8 +77866,8 @@ var ZodObject = class _ZodObject extends ZodType { return this._cached; } _parse(input) { - const parsedType4 = this._getType(input); - if (parsedType4 !== ZodParsedType.object) { + const parsedType5 = this._getType(input); + if (parsedType5 !== ZodParsedType.object) { const ctx2 = this._getOrReturnCtx(input); addIssueToContext(ctx2, { code: ZodIssueCode.invalid_type, @@ -81140,9 +77957,9 @@ var ZodObject = class _ZodObject extends ZodType { ...this._def, unknownKeys: "strict", ...message !== void 0 ? { - errorMap: (issue2, ctx) => { - const defaultError = this._def.errorMap?.(issue2, ctx).message ?? ctx.defaultError; - if (issue2.code === "unrecognized_keys") + errorMap: (issue3, ctx) => { + const defaultError = this._def.errorMap?.(issue3, ctx).message ?? ctx.defaultError; + if (issue3.code === "unrecognized_keys") return { message: errorUtil.errToObj(message).message ?? defaultError }; @@ -81854,25 +78671,25 @@ var ZodFunction = class _ZodFunction extends ZodType { }); return INVALID; } - function makeArgsIssue(args3, error41) { + function makeArgsIssue(args3, error42) { return makeIssue({ data: args3, path: ctx.path, errorMaps: [ctx.common.contextualErrorMap, ctx.schemaErrorMap, getErrorMap(), en_default].filter((x) => !!x), issueData: { code: ZodIssueCode.invalid_arguments, - argumentsError: error41 + argumentsError: error42 } }); } - function makeReturnsIssue(returns, error41) { + function makeReturnsIssue(returns, error42) { return makeIssue({ data: returns, path: ctx.path, errorMaps: [ctx.common.contextualErrorMap, ctx.schemaErrorMap, getErrorMap(), en_default].filter((x) => !!x), issueData: { code: ZodIssueCode.invalid_return_type, - returnTypeError: error41 + returnTypeError: error42 } }); } @@ -81881,15 +78698,15 @@ var ZodFunction = class _ZodFunction extends ZodType { if (this._def.returns instanceof ZodPromise) { const me = this; return OK(async function(...args3) { - const error41 = new ZodError([]); + const error42 = new ZodError([]); const parsedArgs = await me._def.args.parseAsync(args3, params).catch((e) => { - error41.addIssue(makeArgsIssue(args3, e)); - throw error41; + error42.addIssue(makeArgsIssue(args3, e)); + throw error42; }); const result = await Reflect.apply(fn2, this, parsedArgs); const parsedReturns = await me._def.returns._def.type.parseAsync(result, params).catch((e) => { - error41.addIssue(makeReturnsIssue(result, e)); - throw error41; + error42.addIssue(makeReturnsIssue(result, e)); + throw error42; }); return parsedReturns; }); @@ -82266,8 +79083,8 @@ ZodEffects.createWithPreprocess = (preprocess, schema2, params) => { }; var ZodOptional = class extends ZodType { _parse(input) { - const parsedType4 = this._getType(input); - if (parsedType4 === ZodParsedType.undefined) { + const parsedType5 = this._getType(input); + if (parsedType5 === ZodParsedType.undefined) { return OK(void 0); } return this._def.innerType._parse(input); @@ -82285,8 +79102,8 @@ ZodOptional.create = (type2, params) => { }; var ZodNullable = class extends ZodType { _parse(input) { - const parsedType4 = this._getType(input); - if (parsedType4 === ZodParsedType.null) { + const parsedType5 = this._getType(input); + if (parsedType5 === ZodParsedType.null) { return OK(null); } return this._def.innerType._parse(input); @@ -82382,8 +79199,8 @@ ZodCatch.create = (type2, params) => { }; var ZodNaN = class extends ZodType { _parse(input) { - const parsedType4 = this._getType(input); - if (parsedType4 !== ZodParsedType.nan) { + const parsedType5 = this._getType(input); + if (parsedType5 !== ZodParsedType.nan) { const ctx = this._getOrReturnCtx(input); addIssueToContext(ctx, { code: ZodIssueCode.invalid_type, @@ -83259,15 +80076,15 @@ function query({ const allMcpServers = {}; const sdkMcpServers = /* @__PURE__ */ new Map(); if (mcpServers) { - for (const [name, config2] of Object.entries(mcpServers)) { - if (config2.type === "sdk" && "instance" in config2) { - sdkMcpServers.set(name, config2.instance); + for (const [name, config3] of Object.entries(mcpServers)) { + if (config3.type === "sdk" && "instance" in config3) { + sdkMcpServers.set(name, config3.instance); allMcpServers[name] = { type: "sdk", name }; } else { - allMcpServers[name] = config2; + allMcpServers[name] = config3; } } } @@ -84420,8 +81237,8 @@ var Hkt = class { // ../node_modules/.pnpm/@ark+util@0.56.0/node_modules/@ark/util/out/isomorphic.js var fileName2 = () => { try { - const error41 = new Error(); - const stackLine = error41.stack?.split("\n")[2]?.trim() || ""; + const error42 = new Error(); + const stackLine = error42.stack?.split("\n")[2]?.trim() || ""; const filePath = stackLine.match(/\(?(.+?)(?::\d+:\d+)?\)?$/)?.[1] || "unknown"; return filePath.replace(/^file:\/\//, ""); } catch { @@ -84650,20 +81467,20 @@ var _serialize = (data, opts, seen) => { return data; } }; -var describeCollapsibleDate = (date2) => { - const year = date2.getFullYear(); - const month = date2.getMonth(); - const dayOfMonth = date2.getDate(); - const hours = date2.getHours(); - const minutes = date2.getMinutes(); - const seconds = date2.getSeconds(); - const milliseconds = date2.getMilliseconds(); +var describeCollapsibleDate = (date4) => { + const year = date4.getFullYear(); + const month = date4.getMonth(); + const dayOfMonth = date4.getDate(); + const hours = date4.getHours(); + const minutes = date4.getMinutes(); + const seconds = date4.getSeconds(); + const milliseconds = date4.getMilliseconds(); if (month === 0 && dayOfMonth === 1 && hours === 0 && minutes === 0 && seconds === 0 && milliseconds === 0) return `${year}`; const datePortion = `${months[month]} ${dayOfMonth}, ${year}`; if (hours === 0 && minutes === 0 && seconds === 0 && milliseconds === 0) return datePortion; - let timePortion = date2.toLocaleTimeString(); + let timePortion = date4.toLocaleTimeString(); const suffix2 = timePortion.endsWith(" AM") || timePortion.endsWith(" PM") ? timePortion.slice(-3) : ""; if (suffix2) timePortion = timePortion.slice(0, -suffix2.length); @@ -85125,8 +81942,8 @@ var ToJsonSchema = { // ../node_modules/.pnpm/@ark+schema@0.56.0/node_modules/@ark/schema/out/config.js $ark.config ??= {}; -var configureSchema = (config2) => { - const result = Object.assign($ark.config, mergeConfigs($ark.config, config2)); +var configureSchema = (config3) => { + const result = Object.assign($ark.config, mergeConfigs($ark.config, config3)); if ($ark.resolvedConfig) $ark.resolvedConfig = mergeConfigs($ark.resolvedConfig, result); return result; @@ -85253,26 +82070,26 @@ var ArkError = class _ArkError extends CastableBase { get expected() { if (this.input.expected) return this.input.expected; - const config2 = this.meta?.expected ?? this.nodeConfig.expected; - return typeof config2 === "function" ? config2(this.input) : config2; + const config3 = this.meta?.expected ?? this.nodeConfig.expected; + return typeof config3 === "function" ? config3(this.input) : config3; } get actual() { if (this.input.actual) return this.input.actual; - const config2 = this.meta?.actual ?? this.nodeConfig.actual; - return typeof config2 === "function" ? config2(this.data) : config2; + const config3 = this.meta?.actual ?? this.nodeConfig.actual; + return typeof config3 === "function" ? config3(this.data) : config3; } get problem() { if (this.input.problem) return this.input.problem; - const config2 = this.meta?.problem ?? this.nodeConfig.problem; - return typeof config2 === "function" ? config2(this) : config2; + const config3 = this.meta?.problem ?? this.nodeConfig.problem; + return typeof config3 === "function" ? config3(this) : config3; } get message() { if (this.input.message) return this.input.message; - const config2 = this.meta?.message ?? this.nodeConfig.message; - return typeof config2 === "function" ? config2(this) : config2; + const config3 = this.meta?.message ?? this.nodeConfig.message; + return typeof config3 === "function" ? config3(this) : config3; } get flat() { return this.hasCode("intersection") ? [...this.errors] : [this]; @@ -85344,25 +82161,25 @@ var ArkErrors = class _ArkErrors extends ReadonlyArray2 { /** * Append an ArkError to this array, ignoring duplicates. */ - add(error41) { - const existing = this.byPath[error41.propString]; + add(error42) { + const existing = this.byPath[error42.propString]; if (existing) { - if (error41 === existing) + if (error42 === existing) return; if (existing.hasCode("union") && existing.errors.length === 0) return; - const errorIntersection = error41.hasCode("union") && error41.errors.length === 0 ? error41 : new ArkError({ + const errorIntersection = error42.hasCode("union") && error42.errors.length === 0 ? error42 : new ArkError({ code: "intersection", - errors: existing.hasCode("intersection") ? [...existing.errors, error41] : [existing, error41] + errors: existing.hasCode("intersection") ? [...existing.errors, error42] : [existing, error42] }, this.ctx); const existingIndex = this.indexOf(existing); this.mutable[existingIndex === -1 ? this.length : existingIndex] = errorIntersection; - this.byPath[error41.propString] = errorIntersection; - this.addAncestorPaths(error41); + this.byPath[error42.propString] = errorIntersection; + this.addAncestorPaths(error42); } else { - this.byPath[error41.propString] = error41; - this.addAncestorPaths(error41); - this.mutable.push(error41); + this.byPath[error42.propString] = error42; + this.addAncestorPaths(error42); + this.mutable.push(error42); } this.count++; } @@ -85413,9 +82230,9 @@ var ArkErrors = class _ArkErrors extends ReadonlyArray2 { toString() { return this.join("\n"); } - addAncestorPaths(error41) { - for (const propString of error41.path.stringifyAncestors()) { - this.byAncestorPath[propString] = append2(this.byAncestorPath[propString], error41); + addAncestorPaths(error42) { + for (const propString of error42.path.stringifyAncestors()) { + this.byAncestorPath[propString] = append2(this.byAncestorPath[propString], error42); } } }; @@ -85425,14 +82242,14 @@ var TraversalError = class extends Error { if (errors.length === 1) super(errors.summary); else - super("\n" + errors.map((error41) => ` \u2022 ${indent(error41)}`).join("\n")); + super("\n" + errors.map((error42) => ` \u2022 ${indent(error42)}`).join("\n")); Object.defineProperty(this, "arkErrors", { value: errors, enumerable: false }); } }; -var indent = (error41) => error41.toString().split("\n").join("\n "); +var indent = (error42) => error42.toString().split("\n").join("\n "); // ../node_modules/.pnpm/@ark+schema@0.56.0/node_modules/@ark/schema/out/shared/traversal.js var Traversal = class { @@ -85465,9 +82282,9 @@ var Traversal = class { queuedMorphs = []; branches = []; seen = {}; - constructor(root2, config2) { + constructor(root2, config3) { this.root = root2; - this.config = config2; + this.config = config3; } /** * #### the data being validated or morphed @@ -85568,12 +82385,12 @@ var Traversal = class { return this.errorFromContext(input); } errorFromContext(errCtx) { - const error41 = new ArkError(errCtx, this); + const error42 = new ArkError(errCtx, this); if (this.currentBranch) - this.currentBranch.error = error41; + this.currentBranch.error = error42; else - this.errors.add(error41); - return error41; + this.errors.add(error42); + return error42; } applyQueuedMorphs() { while (this.queuedMorphs.length) { @@ -85717,10 +82534,10 @@ var BaseNode = class extends Callable { }; case "optimistic": this.contextFreeMorph = this.shallowMorphs[0]; - const clone2 = this.$.resolvedConfig.clone; + const clone3 = this.$.resolvedConfig.clone; return (data, onFail) => { if (this.allows(data)) { - return this.contextFreeMorph(clone2 && (typeof data === "object" && data !== null || typeof data === "function") ? clone2(data) : data); + return this.contextFreeMorph(clone3 && (typeof data === "object" && data !== null || typeof data === "function") ? clone3(data) : data); } const ctx = new Traversal(data, this.$.resolvedConfig); this.traverseApply(data, ctx); @@ -87794,7 +84611,7 @@ var implementation13 = implementNode({ numberAllowsNaN: {} }, normalize: (schema2) => typeof schema2 === "string" ? { domain: schema2 } : hasKey(schema2, "numberAllowsNaN") && schema2.domain !== "number" ? throwParseError2(Domain.writeBadAllowNanMessage(schema2.domain)) : schema2, - applyConfig: (schema2, config2) => schema2.numberAllowsNaN === void 0 && schema2.domain === "number" && config2.numberAllowsNaN ? { ...schema2, numberAllowsNaN: true } : schema2, + applyConfig: (schema2, config3) => schema2.numberAllowsNaN === void 0 && schema2.domain === "number" && config3.numberAllowsNaN ? { ...schema2, numberAllowsNaN: true } : schema2, defaults: { description: (node2) => domainDescriptions2[node2.domain], actual: (data) => Number.isNaN(data) ? "NaN" : domainDescriptions2[domainOf2(data)] @@ -88254,8 +85071,8 @@ var implementation16 = implementNode({ throwParseError2(Proto.writeBadInvalidDateMessage(normalized.proto)); return normalized; }, - applyConfig: (schema2, config2) => { - if (schema2.dateAllowsInvalid === void 0 && schema2.proto === Date && config2.dateAllowsInvalid) + applyConfig: (schema2, config3) => { + if (schema2.dateAllowsInvalid === void 0 && schema2.proto === Date && config3.dateAllowsInvalid) return { ...schema2, dateAllowsInvalid: true }; return schema2; }, @@ -89525,11 +86342,11 @@ var implementation22 = implementNode({ kind: "structure", hasAssociatedError: false, normalize: (schema2) => schema2, - applyConfig: (schema2, config2) => { - if (!schema2.undeclared && config2.onUndeclaredKey !== "ignore") { + applyConfig: (schema2, config3) => { + if (!schema2.undeclared && config3.onUndeclaredKey !== "ignore") { return { ...schema2, - undeclared: config2.onUndeclaredKey + undeclared: config3.onUndeclaredKey }; } return schema2; @@ -90304,9 +87121,9 @@ var BaseScope = class { resolved = false; nodesByHash = {}; intrinsic; - constructor(def, config2) { - this.config = mergeConfigs($ark.config, config2); - this.resolvedConfig = mergeConfigs($ark.resolvedConfig, config2); + constructor(def, config3) { + this.config = mergeConfigs($ark.config, config3); + this.resolvedConfig = mergeConfigs($ark.resolvedConfig, config3); this.name = this.resolvedConfig.name ?? `anonymousScope${Object.keys(scopesByName).length}`; if (this.name in scopesByName) throwParseError2(`A Scope already named ${this.name} already exists`); @@ -90456,11 +87273,11 @@ var BaseScope = class { return $ark.ambient; } maybeResolve(name) { - const cached4 = this.resolutions[name]; - if (cached4) { - if (typeof cached4 !== "string") - return this.bindReference(cached4); - const v = nodesByRegisteredId[cached4]; + const cached5 = this.resolutions[name]; + if (cached5) { + if (typeof cached5 !== "string") + return this.bindReference(cached5); + const v = nodesByRegisteredId[cached5]; if (hasArkKind(v, "root")) return this.resolutions[name] = v; if (hasArkKind(v, "context")) { @@ -90477,7 +87294,7 @@ var BaseScope = class { nodesByRegisteredId[v.id] = node2; return this.resolutions[name] = node2; } - return throwInternalError2(`Unexpected nodesById entry for ${cached4}: ${printable2(v)}`); + return throwInternalError2(`Unexpected nodesById entry for ${cached5}: ${printable2(v)}`); } let def = this.aliases[name] ?? this.ambient?.[name]; if (!def) @@ -90625,7 +87442,7 @@ var maybeResolveSubalias = (base, name) => { } throwInternalError2(`Unexpected resolution for alias '${name}': ${printable2(resolution)}`); }; -var schemaScope = (aliases, config2) => new SchemaScope(aliases, config2); +var schemaScope = (aliases, config3) => new SchemaScope(aliases, config3); var rootSchemaScope = new SchemaScope({}); var resolutionsOfModule = ($2, typeSet) => { const result = {}; @@ -90771,8 +87588,8 @@ var parseEnclosed = (s, enclosing) => { } else if (isKeyOf2(enclosing, enclosingQuote)) s.root = s.ctx.$.node("unit", { unit: enclosed }); else { - const date2 = tryParseDate(enclosed, writeInvalidDateMessage(enclosed)); - s.root = s.ctx.$.node("unit", { meta: enclosed, unit: date2 }); + const date4 = tryParseDate(enclosed, writeInvalidDateMessage(enclosed)); + s.root = s.ctx.$.node("unit", { meta: enclosed, unit: date4 }); } }; var enclosingQuote = { @@ -91782,9 +88599,9 @@ var InternalScope = class _InternalScope extends BaseScope { if (hasArkKind(def, "module") || hasArkKind(def, "generic")) return [alias, def]; const qualifiedName = this.name === "ark" ? alias : alias === "root" ? this.name : `${this.name}.${alias}`; - const config2 = this.resolvedConfig.keywords?.[qualifiedName]; - if (config2) - def = [def, "@", config2]; + const config3 = this.resolvedConfig.keywords?.[qualifiedName]; + if (config3) + def = [def, "@", config3]; return [alias, def]; } if (alias[alias.length - 1] !== ">") { @@ -91852,8 +88669,8 @@ var InternalScope = class _InternalScope extends BaseScope { return def; } type = new InternalTypeParser(this); - static scope = ((def, config2 = {}) => new _InternalScope(def, config2)); - static module = ((def, config2 = {}) => this.scope(def, config2).export()); + static scope = ((def, config3 = {}) => new _InternalScope(def, config3)); + static module = ((def, config3 = {}) => this.scope(def, config3).export()); }; var scope = Object.assign(InternalScope.scope, { define: (def) => def @@ -92120,10 +88937,10 @@ var stringDate = Scope.module({ declaredIn: parsableDate, in: "string", morphs: (s, ctx) => { - const date2 = new Date(s); - if (Number.isNaN(date2.valueOf())) + const date4 = new Date(s); + if (Number.isNaN(date4.valueOf())) return ctx.error("a parsable date"); - return date2; + return date4; }, declaredOut: intrinsic.Date }), @@ -92154,10 +88971,10 @@ var ip = Scope.module({ name: "string.ip" }); var jsonStringDescription = "a JSON string"; -var writeJsonSyntaxErrorProblem = (error41) => { - if (!(error41 instanceof SyntaxError)) - throw error41; - return `must be ${jsonStringDescription} (${error41})`; +var writeJsonSyntaxErrorProblem = (error42) => { + if (!(error42 instanceof SyntaxError)) + throw error42; + return `must be ${jsonStringDescription} (${error42})`; }; var jsonRoot = rootSchema({ meta: jsonStringDescription, @@ -92727,8 +89544,8 @@ function formatPrepResults(results) { lines.push( `\u26A0\uFE0F ${langDisplay} dependency installation FAILED (using \`${result.packageManager}\`).` ); - for (const issue2 of result.issues) { - lines.push(` - ${issue2}`); + for (const issue3 of result.issues) { + lines.push(` - ${issue3}`); } lines.push( ` You may need to run \`${result.packageManager} install\` or address this issue before proceeding.` @@ -92744,8 +89561,8 @@ function formatPrepResults(results) { lines.push( `\u26A0\uFE0F ${langDisplay} dependency installation FAILED (using \`${result.packageManager}\` from ${result.configFile}).` ); - for (const issue2 of result.issues) { - lines.push(` - ${issue2}`); + for (const issue3 of result.issues) { + lines.push(` - ${issue3}`); } lines.push( ` You may need to run the appropriate install command or address this issue before proceeding.` @@ -92871,6 +89688,8 @@ Tool names may be formatted as \`(server name)/(tool name)\`, for example: \`${g **Git operations**: All git operations must use ${ghPullfrogMcpName} MCP tools to ensure proper authentication and commit attribution. Do NOT use git commands directly (e.g., \`git commit\`, \`git push\`, \`git checkout\`, \`git branch\`) - these will use incorrect credentials and attribute commits to the wrong author. +**File discovery**: Use \`${ghPullfrogMcpName}/list_files\` to discover files in the repository. This tool finds both git-tracked and untracked files, including newly created files that haven't been committed yet. Prefer this over native agent tools like \`glob\` or \`grep\` for file discovery, as it provides consistent results and handles untracked files correctly. + **Do not attempt to configure git credentials manually** - the ${ghPullfrogMcpName} server handles all authentication internally. **Efficiency**: Trust the tools - do not repeatedly verify file contents or git status after operations. If a tool reports success, proceed to the next step. Only verify if you encounter an actual error. @@ -92954,12 +89773,12 @@ async function acquireTokenViaOIDC() { const tokenData = await tokenResponse.json(); log.info(`Installation token obtained for ${tokenData.repository || "all repositories"}`); return tokenData.token; - } catch (error41) { + } catch (error42) { clearTimeout(timeoutId); - if (error41 instanceof Error && error41.name === "AbortError") { + if (error42 instanceof Error && error42.name === "AbortError") { throw new Error(`Token exchange timed out after ${timeoutMs}ms`); } - throw error41; + throw error42; } } var base64UrlEncode = (str) => { @@ -93046,14 +89865,14 @@ var findInstallationId = async (jwt, repoOwner, repoName) => { }; async function acquireTokenViaGitHubApp() { const repoContext = parseRepoContext(); - const config2 = { + const config3 = { appId: process.env.GITHUB_APP_ID, privateKey: process.env.GITHUB_PRIVATE_KEY?.replace(/\\n/g, "\n"), repoOwner: repoContext.owner, repoName: repoContext.name }; - const jwt = generateJWT(config2.appId, config2.privateKey); - const installationId = await findInstallationId(jwt, config2.repoOwner, config2.repoName); + const jwt = generateJWT(config3.appId, config3.privateKey); + const installationId = await findInstallationId(jwt, config3.repoOwner, config3.repoName); const token = await createInstallationToken(jwt, installationId); return token; } @@ -93094,9 +89913,9 @@ async function revokeGitHubInstallationToken() { } }); log.info("Installation token revoked"); - } catch (error41) { + } catch (error42) { log.warning( - `Failed to revoke installation token: ${error41 instanceof Error ? error41.message : String(error41)}` + `Failed to revoke installation token: ${error42 instanceof Error ? error42.message : String(error42)}` ); } } @@ -93129,14 +89948,14 @@ function setupProcessAgentEnv(agentSpecificVars) { } async function installFromNpmTarball({ packageName, - version: version2, + version: version3, executablePath, installDependencies }) { - let resolvedVersion = version2; - if (version2.startsWith("^") || version2.startsWith("~") || version2 === "latest") { + let resolvedVersion = version3; + if (version3.startsWith("^") || version3.startsWith("~") || version3 === "latest") { const npmRegistry2 = process.env.NPM_REGISTRY || "https://registry.npmjs.org"; - log.info(`Resolving version for ${version2}...`); + log.info(`Resolving version for ${version3}...`); try { const registryResponse = await fetch(`${npmRegistry2}/${packageName}`); if (!registryResponse.ok) { @@ -93145,11 +89964,11 @@ async function installFromNpmTarball({ const registryData = await registryResponse.json(); resolvedVersion = registryData["dist-tags"].latest; log.info(`Resolved to version ${resolvedVersion}`); - } catch (error41) { + } catch (error42) { log.warning( - `Failed to resolve version from registry: ${error41 instanceof Error ? error41.message : String(error41)}` + `Failed to resolve version from registry: ${error42 instanceof Error ? error42.message : String(error42)}` ); - throw error41; + throw error42; } } log.info(`\u{1F4E6} Installing ${packageName}@${resolvedVersion}...`); @@ -93485,9 +90304,9 @@ async function createOutputSchemaFile(schema2) { try { await fs2.writeFile(schemaPath, JSON.stringify(schema2), "utf8"); return { schemaPath, cleanup }; - } catch (error41) { + } catch (error42) { await cleanup(); - throw error41; + throw error42; } } function isJsonObject2(value2) { @@ -93538,8 +90357,8 @@ var Thread = class { let parsed2; try { parsed2 = JSON.parse(item); - } catch (error41) { - throw new Error(`Failed to parse item: ${item}`, { cause: error41 }); + } catch (error42) { + throw new Error(`Failed to parse item: ${item}`, { cause: error42 }); } if (parsed2.type === "thread.started") { this._id = parsed2.thread_id; @@ -93837,8 +90656,8 @@ var codex = agent({ success: true, output: finalOutput2 }; - } catch (error41) { - const errorMessage = error41 instanceof Error ? error41.message : String(error41); + } catch (error42) { + const errorMessage = error42 instanceof Error ? error42.message : String(error42); log.error(`Codex execution failed: ${errorMessage}`); return { success: false, @@ -94070,16 +90889,16 @@ var cursor = agent({ if (signal) { log.warning(`Cursor CLI terminated by signal: ${signal}`); } - const duration2 = ((Date.now() - startTime) / 1e3).toFixed(1); + const duration4 = ((Date.now() - startTime) / 1e3).toFixed(1); if (code === 0) { - log.success(`Cursor CLI completed successfully in ${duration2}s`); + log.success(`Cursor CLI completed successfully in ${duration4}s`); resolve2({ success: true, output: stdout.trim() }); } else { const errorMessage = stderr || `Cursor CLI exited with code ${code}`; - log.error(`Cursor CLI failed after ${duration2}s: ${errorMessage}`); + log.error(`Cursor CLI failed after ${duration4}s: ${errorMessage}`); resolve2({ success: false, error: errorMessage, @@ -94087,10 +90906,10 @@ var cursor = agent({ }); } }); - child.on("error", (error41) => { - const duration2 = ((Date.now() - startTime) / 1e3).toFixed(1); - const errorMessage = error41.message || String(error41); - log.error(`Cursor CLI execution failed after ${duration2}s: ${errorMessage}`); + child.on("error", (error42) => { + const duration4 = ((Date.now() - startTime) / 1e3).toFixed(1); + const errorMessage = error42.message || String(error42); + log.error(`Cursor CLI execution failed after ${duration4}s: ${errorMessage}`); resolve2({ success: false, error: errorMessage, @@ -94098,8 +90917,8 @@ var cursor = agent({ }); }); }); - } catch (error41) { - const errorMessage = error41 instanceof Error ? error41.message : String(error41); + } catch (error42) { + const errorMessage = error42 instanceof Error ? error42.message : String(error42); log.error(`Cursor execution failed: ${errorMessage}`); return { success: false, @@ -94134,7 +90953,7 @@ function configureCursorSandbox({ sandbox }) { const cursorConfigDir = join6(realHome, ".cursor"); const cliConfigPath = join6(cursorConfigDir, "cli-config.json"); mkdirSync3(cursorConfigDir, { recursive: true }); - const config2 = sandbox ? { + const config3 = sandbox ? { // sandbox mode: deny all writes and shell commands permissions: { allow: [ @@ -94155,7 +90974,7 @@ function configureCursorSandbox({ sandbox }) { deny: [] } }; - writeFileSync2(cliConfigPath, JSON.stringify(config2, null, 2), "utf-8"); + writeFileSync2(cliConfigPath, JSON.stringify(config3, null, 2), "utf-8"); log.info(`CLI config written to ${cliConfigPath} (sandbox: ${sandbox})`); } @@ -94221,12 +91040,12 @@ async function spawn4(options) { durationMs }); }); - child.on("error", (error41) => { + child.on("error", (error42) => { const durationMs = Date.now() - startTime; if (timeoutId) { clearTimeout(timeoutId); } - console.error(`[spawn] Process spawn error: ${error41.message}`); + console.error(`[spawn] Process spawn error: ${error42.message}`); resolve2({ stdout: stdoutBuffer, stderr: stderrBuffer, @@ -94391,8 +91210,8 @@ var gemini = agent({ success: true, output: finalOutput2 }; - } catch (error41) { - const errorMessage = error41 instanceof Error ? error41.message : String(error41); + } catch (error42) { + const errorMessage = error42 instanceof Error ? error42.message : String(error42); log.error(`Failed to run Gemini CLI: ${errorMessage}`); return { success: false, @@ -94429,8 +91248,184 @@ function configureGeminiMcpServers({ mcpServers, cliPath }) { } // agents/opencode.ts -import { existsSync as existsSync3, mkdirSync as mkdirSync4, readFileSync as readFileSync2, writeFileSync as writeFileSync3 } from "node:fs"; +import { mkdirSync as mkdirSync4, writeFileSync as writeFileSync3 } from "node:fs"; import { join as join7 } from "node:path"; +var opencode = agent({ + name: "opencode", + install: async () => { + return await installFromNpmTarball({ + packageName: "opencode-ai", + version: "latest", + executablePath: "bin/opencode", + installDependencies: true + }); + }, + run: async ({ payload, apiKey: _apiKey, apiKeys, mcpServers, cliPath, prepResults, repo }) => { + const tempHome = process.env.PULLFROG_TEMP_DIR; + const configDir = join7(tempHome, ".config", "opencode"); + mkdirSync4(configDir, { recursive: true }); + configureOpenCode({ mcpServers, sandbox: payload.sandbox ?? false }); + const prompt = addInstructions({ payload, prepResults, repo }); + log.group("Full prompt", () => log.info(prompt)); + const args3 = ["run", prompt, "--format", "json"]; + if (payload.sandbox) { + log.info("\u{1F512} sandbox mode enabled: restricting to read-only operations"); + } + setupProcessAgentEnv({ HOME: tempHome }); + const env3 = { + ...Object.fromEntries( + Object.entries(process.env).filter( + ([key, value2]) => value2 !== void 0 && key !== "GITHUB_TOKEN" + ) + ), + HOME: tempHome + }; + for (const [key, value2] of Object.entries(apiKeys || {})) { + env3[key.toUpperCase()] = value2; + } + const repoDir = process.cwd(); + log.info(`\u{1F680} Starting OpenCode CLI: ${cliPath} ${args3.join(" ")}`); + log.info(`\u{1F4C1} Working directory: ${repoDir}`); + log.info(`\u{1F3E0} HOME env var: ${env3.HOME}`); + log.info(`\u{1F4CB} Config directory: ${join7(env3.HOME, ".config", "opencode")}`); + const envKeys = Object.keys(env3).filter( + (k) => !k.includes("KEY") && !k.includes("TOKEN") && !k.includes("SECRET") + ); + log.info(`\u{1F511} Environment keys (non-sensitive): ${envKeys.join(", ")}`); + const startTime = Date.now(); + let lastActivityTime = startTime; + let eventCount = 0; + let output = ""; + const result = await spawn4({ + cmd: cliPath, + args: args3, + cwd: repoDir, + env: env3, + timeout: 6e5, + // 10 minutes timeout to prevent infinite hangs + stdio: ["ignore", "pipe", "pipe"], + onStdout: async (chunk) => { + console.log(JSON.stringify(JSON.parse(chunk), null, 2)); + const text = chunk.toString(); + output += text; + const lines = text.split("\n"); + for (const line of lines) { + const trimmed = line.trim(); + if (!trimmed) { + continue; + } + try { + const event = JSON.parse(trimmed); + eventCount++; + const timeSinceLastActivity = Date.now() - lastActivityTime; + if (timeSinceLastActivity > 1e4) { + const activeToolCalls = toolCallTimings.size; + const toolCallInfo = activeToolCalls > 0 ? ` (waiting for ${activeToolCalls} tool call${activeToolCalls > 1 ? "s" : ""})` : " (OpenCode may be processing internally - LLM calls, planning, etc.)"; + log.warning( + `\u26A0\uFE0F No activity for ${(timeSinceLastActivity / 1e3).toFixed(1)}s${toolCallInfo} (${eventCount} events processed so far)` + ); + } + lastActivityTime = Date.now(); + const handler2 = messageHandlers4[event.type]; + if (handler2) { + await handler2(event); + } else { + log.info( + `\u{1F4CB} OpenCode event (unhandled): type=${event.type}, data=${JSON.stringify(event).substring(0, 500)}` + ); + } + } catch { + } + } + }, + onStderr: (chunk) => { + console.log(JSON.stringify(JSON.parse(chunk), null, 2)); + const trimmed = chunk.trim(); + if (trimmed) { + log.warning(trimmed); + } + } + }); + const duration4 = Date.now() - startTime; + log.info(`\u2705 OpenCode CLI completed in ${duration4}ms with exit code ${result.exitCode}`); + if (!tokensLogged && (accumulatedTokens.input > 0 || accumulatedTokens.output > 0)) { + const totalTokens = accumulatedTokens.input + accumulatedTokens.output; + await log.summaryTable([ + [ + { data: "Input Tokens", header: true }, + { data: "Output Tokens", header: true }, + { data: "Total Tokens", header: true } + ], + [String(accumulatedTokens.input), String(accumulatedTokens.output), String(totalTokens)] + ]); + } + if (result.exitCode !== 0) { + const errorMessage = result.stderr || result.stdout || "Unknown error - no output from OpenCode CLI"; + log.error(`OpenCode CLI exited with code ${result.exitCode}: ${errorMessage}`); + log.debug(`OpenCode stdout: ${result.stdout?.substring(0, 500)}`); + log.debug(`OpenCode stderr: ${result.stderr?.substring(0, 500)}`); + return { + success: false, + output: finalOutput || output, + error: errorMessage + }; + } + return { + success: true, + output: finalOutput || output + }; + } +}); +function configureOpenCode({ mcpServers, sandbox }) { + const tempHome = process.env.PULLFROG_TEMP_DIR; + const configDir = join7(tempHome, ".config", "opencode"); + mkdirSync4(configDir, { recursive: true }); + const configPath = join7(configDir, "opencode.json"); + const opencodeMcpServers = {}; + for (const [serverName, serverConfig] of Object.entries(mcpServers)) { + if (serverConfig.type !== "http") { + log.error( + `unsupported MCP server type for OpenCode: ${serverConfig.type || "unknown"}` + ); + throw new Error( + `Unsupported MCP server type for OpenCode: ${serverConfig.type || "unknown"}` + ); + } + opencodeMcpServers[serverName] = { + type: "remote", + url: serverConfig.url + }; + } + const permission = sandbox ? { + edit: "deny", + bash: "deny", + webfetch: "deny", + doom_loop: "allow", + external_directory: "allow" + } : { + edit: "allow", + bash: "allow", + webfetch: "allow", + doom_loop: "allow", + external_directory: "allow" + }; + const config3 = { + mcp: opencodeMcpServers, + permission + }; + const configJson = JSON.stringify(config3, null, 2); + try { + writeFileSync3(configPath, configJson, "utf-8"); + } catch (error42) { + log.error( + `failed to write OpenCode config to ${configPath}: ${error42 instanceof Error ? error42.message : String(error42)}` + ); + throw error42; + } + log.info(`OpenCode config written to ${configPath} (sandbox: ${sandbox})`); + log.info(`OpenCode config contents: +${configJson}`); +} var finalOutput = ""; var accumulatedTokens = { input: 0, output: 0 }; var tokensLogged = false; @@ -94546,10 +91541,10 @@ var messageHandlers4 = { }, result: async (event) => { const status = event.status || "unknown"; - const duration2 = event.stats?.duration_ms || 0; + const duration4 = event.stats?.duration_ms || 0; const toolCalls = event.stats?.tool_calls || 0; log.info( - `\u{1F3C1} OpenCode result: status=${status}, duration=${duration2}ms, tool_calls=${toolCalls}` + `\u{1F3C1} OpenCode result: status=${status}, duration=${duration4}ms, tool_calls=${toolCalls}` ); if (event.status === "error") { log.error(`\u274C OpenCode CLI failed: ${JSON.stringify(event)}`); @@ -94558,7 +91553,7 @@ var messageHandlers4 = { const outputTokens = event.stats?.output_tokens || accumulatedTokens.output || 0; const totalTokens = event.stats?.total_tokens || inputTokens + outputTokens; log.info( - `\u{1F4CA} OpenCode final stats: input=${inputTokens}, output=${outputTokens}, total=${totalTokens}, tool_calls=${toolCalls}, duration=${duration2}ms` + `\u{1F4CA} OpenCode final stats: input=${inputTokens}, output=${outputTokens}, total=${totalTokens}, tool_calls=${toolCalls}, duration=${duration4}ms` ); if ((inputTokens > 0 || outputTokens > 0) && !tokensLogged) { await log.summaryTable([ @@ -94574,201 +91569,6 @@ var messageHandlers4 = { } } }; -var opencode = agent({ - name: "opencode", - install: async () => { - return await installFromNpmTarball({ - packageName: "opencode-ai", - version: "latest", - executablePath: "bin/opencode", - installDependencies: true - }); - }, - run: async ({ payload, apiKey: _apiKey, apiKeys, mcpServers, cliPath, prepResults, repo }) => { - const tempHome = process.env.PULLFROG_TEMP_DIR; - const configDir = join7(tempHome, ".config", "opencode"); - mkdirSync4(configDir, { recursive: true }); - configureOpenCodeMcpServers({ mcpServers }); - configureOpenCodeSandbox({ sandbox: payload.sandbox ?? false }); - const prompt = addInstructions({ payload, prepResults, repo }); - log.group("Full prompt", () => log.info(prompt)); - const args3 = ["run", prompt, "--format", "json"]; - if (payload.sandbox) { - log.info("\u{1F512} sandbox mode enabled: restricting to read-only operations"); - } - setupProcessAgentEnv({ HOME: tempHome }); - const env3 = { - ...Object.fromEntries( - Object.entries(process.env).filter( - ([key, value2]) => value2 !== void 0 && key !== "GITHUB_TOKEN" - ) - ), - HOME: tempHome - }; - for (const [key, value2] of Object.entries(apiKeys || {})) { - env3[key.toUpperCase()] = value2; - } - const repoDir = process.cwd(); - log.info(`\u{1F680} Starting OpenCode CLI: ${cliPath} ${args3.join(" ")}`); - log.info(`\u{1F4C1} Working directory: ${repoDir}`); - log.info(`\u{1F3E0} HOME env var: ${env3.HOME}`); - log.info(`\u{1F4CB} Config directory: ${join7(env3.HOME, ".config", "opencode")}`); - const envKeys = Object.keys(env3).filter( - (k) => !k.includes("KEY") && !k.includes("TOKEN") && !k.includes("SECRET") - ); - log.info(`\u{1F511} Environment keys (non-sensitive): ${envKeys.join(", ")}`); - const startTime = Date.now(); - let lastActivityTime = startTime; - let eventCount = 0; - let output = ""; - const result = await spawn4({ - cmd: cliPath, - args: args3, - cwd: repoDir, - env: env3, - timeout: 6e5, - // 10 minutes timeout to prevent infinite hangs - stdio: ["ignore", "pipe", "pipe"], - onStdout: async (chunk) => { - log.debug(JSON.stringify(JSON.parse(chunk), null, 2)); - const text = chunk.toString(); - output += text; - const lines = text.split("\n"); - for (const line of lines) { - const trimmed = line.trim(); - if (!trimmed) { - continue; - } - try { - const event = JSON.parse(trimmed); - eventCount++; - const timeSinceLastActivity = Date.now() - lastActivityTime; - if (timeSinceLastActivity > 1e4) { - const activeToolCalls = toolCallTimings.size; - const toolCallInfo = activeToolCalls > 0 ? ` (waiting for ${activeToolCalls} tool call${activeToolCalls > 1 ? "s" : ""})` : " (OpenCode may be processing internally - LLM calls, planning, etc.)"; - log.warning( - `\u26A0\uFE0F No activity for ${(timeSinceLastActivity / 1e3).toFixed(1)}s${toolCallInfo} (${eventCount} events processed so far)` - ); - } - lastActivityTime = Date.now(); - const handler2 = messageHandlers4[event.type]; - if (handler2) { - await handler2(event); - } else { - log.info( - `\u{1F4CB} OpenCode event (unhandled): type=${event.type}, data=${JSON.stringify(event).substring(0, 500)}` - ); - } - } catch { - } - } - }, - onStderr: (chunk) => { - log.debug(JSON.stringify(JSON.parse(chunk), null, 2)); - const trimmed = chunk.trim(); - if (trimmed) { - log.warning(trimmed); - } - } - }); - const duration2 = Date.now() - startTime; - log.info(`\u2705 OpenCode CLI completed in ${duration2}ms with exit code ${result.exitCode}`); - if (!tokensLogged && (accumulatedTokens.input > 0 || accumulatedTokens.output > 0)) { - const totalTokens = accumulatedTokens.input + accumulatedTokens.output; - await log.summaryTable([ - [ - { data: "Input Tokens", header: true }, - { data: "Output Tokens", header: true }, - { data: "Total Tokens", header: true } - ], - [String(accumulatedTokens.input), String(accumulatedTokens.output), String(totalTokens)] - ]); - } - if (result.exitCode !== 0) { - const errorMessage = result.stderr || result.stdout || "Unknown error - no output from OpenCode CLI"; - log.error(`OpenCode CLI exited with code ${result.exitCode}: ${errorMessage}`); - log.debug(`OpenCode stdout: ${result.stdout?.substring(0, 500)}`); - log.debug(`OpenCode stderr: ${result.stderr?.substring(0, 500)}`); - return { - success: false, - output: finalOutput || output, - error: errorMessage - }; - } - return { - success: true, - output: finalOutput || output - }; - } -}); -function configureOpenCodeMcpServers({ - mcpServers -}) { - const tempHome = process.env.PULLFROG_TEMP_DIR; - const configDir = join7(tempHome, ".config", "opencode"); - mkdirSync4(configDir, { recursive: true }); - const configPath = join7(configDir, "opencode.json"); - const opencodeMcpServers = {}; - for (const [serverName, serverConfig] of Object.entries(mcpServers)) { - if (serverConfig.type !== "http") { - throw new Error( - `Unsupported MCP server type for OpenCode: ${serverConfig.type || "unknown"}` - ); - } - opencodeMcpServers[serverName] = { - type: "remote", - url: serverConfig.url, - enabled: true - }; - } - let config2 = {}; - try { - if (existsSync3(configPath)) { - const existingConfig = readFileSync2(configPath, "utf-8"); - config2 = JSON.parse(existingConfig); - } - } catch { - } - config2.mcp = opencodeMcpServers; - const configJson = JSON.stringify(config2, null, 2); - writeFileSync3(configPath, configJson, "utf-8"); - log.info(`MCP config written to ${configPath}`); - log.info(`MCP config contents: -${configJson}`); -} -function configureOpenCodeSandbox({ sandbox }) { - const tempHome = process.env.PULLFROG_TEMP_DIR; - const configDir = join7(tempHome, ".config", "opencode"); - mkdirSync4(configDir, { recursive: true }); - const configPath = join7(configDir, "opencode.json"); - let config2 = {}; - try { - if (existsSync3(configPath)) { - const existingConfig = readFileSync2(configPath, "utf-8"); - config2 = JSON.parse(existingConfig); - } - } catch { - } - if (sandbox) { - config2.permission = { - edit: "deny", - bash: "deny", - webfetch: "deny", - doom_loop: "allow", - external_directory: "allow" - }; - } else { - config2.permission = { - edit: "allow", - bash: "allow", - webfetch: "allow", - doom_loop: "allow", - external_directory: "allow" - }; - } - writeFileSync3(configPath, JSON.stringify(config2, null, 2), "utf-8"); - log.info(`OpenCode config written to ${configPath} (sandbox: ${sandbox})`); -} // agents/index.ts var agents = { @@ -94842,8 +91642,8 @@ function addHook(state, kind, name, hook2) { } if (kind === "error") { hook2 = (method, options) => { - return Promise.resolve().then(method.bind(null, options)).catch((error41) => { - return orig(error41, options); + return Promise.resolve().then(method.bind(null, options)).catch((error42) => { + return orig(error42, options); }); }; } @@ -95299,26 +92099,26 @@ async function fetchWrapper(requestOptions) { // See https://fetch.spec.whatwg.org/#dom-requestinit-duplex. ...requestOptions.body && { duplex: "half" } }); - } catch (error41) { + } catch (error42) { let message = "Unknown Error"; - if (error41 instanceof Error) { - if (error41.name === "AbortError") { - error41.status = 500; - throw error41; + if (error42 instanceof Error) { + if (error42.name === "AbortError") { + error42.status = 500; + throw error42; } - message = error41.message; - if (error41.name === "TypeError" && "cause" in error41) { - if (error41.cause instanceof Error) { - message = error41.cause.message; - } else if (typeof error41.cause === "string") { - message = error41.cause; + message = error42.message; + if (error42.name === "TypeError" && "cause" in error42) { + if (error42.cause instanceof Error) { + message = error42.cause.message; + } else if (typeof error42.cause === "string") { + message = error42.cause; } } } const requestError = new RequestError(message, 500, { request: requestOptions }); - requestError.cause = error41; + requestError.cause = error42; throw requestError; } const status = fetchResponse.status; @@ -95735,12 +92535,12 @@ function requestLog(octokit) { `${requestOptions.method} ${path4} - ${response.status} with id ${requestId} in ${Date.now() - start}ms` ); return response; - }).catch((error41) => { - const requestId = error41.response?.headers["x-github-request-id"] || "UNKNOWN"; + }).catch((error42) => { + const requestId = error42.response?.headers["x-github-request-id"] || "UNKNOWN"; octokit.log.error( - `${requestOptions.method} ${path4} - ${error41.status} with id ${requestId} in ${Date.now() - start}ms` + `${requestOptions.method} ${path4} - ${error42.status} with id ${requestId} in ${Date.now() - start}ms` ); - throw error41; + throw error42; }); }); } @@ -95805,8 +92605,8 @@ function iterator(octokit, route, parameters) { } } return { value: normalizedResponse }; - } catch (error41) { - if (error41.status !== 409) throw error41; + } catch (error42) { + if (error42.status !== 409) throw error42; url2 = ""; return { value: { @@ -98326,8 +95126,8 @@ var handleToolSuccess = (data) => { ] }; }; -var handleToolError = (error41) => { - const errorMessage = error41 instanceof Error ? error41.message : String(error41); +var handleToolError = (error42) => { + const errorMessage = error42 instanceof Error ? error42.message : String(error42); return { content: [ { @@ -98343,8 +95143,8 @@ var execute = (ctx, fn2) => { try { const result = await fn2(params); return handleToolSuccess(result); - } catch (error41) { - return handleToolError(error41); + } catch (error42) { + return handleToolError(error42); } }; }; @@ -98733,8 +95533,4048 @@ configure({ // mcp/server.ts import { createServer } from "node:net"; +// ../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/external.js +var external_exports = {}; +__export(external_exports, { + BRAND: () => BRAND2, + DIRTY: () => DIRTY2, + EMPTY_PATH: () => EMPTY_PATH2, + INVALID: () => INVALID2, + NEVER: () => NEVER2, + OK: () => OK2, + ParseStatus: () => ParseStatus2, + Schema: () => ZodType2, + ZodAny: () => ZodAny2, + ZodArray: () => ZodArray2, + ZodBigInt: () => ZodBigInt2, + ZodBoolean: () => ZodBoolean2, + ZodBranded: () => ZodBranded2, + ZodCatch: () => ZodCatch2, + ZodDate: () => ZodDate2, + ZodDefault: () => ZodDefault2, + ZodDiscriminatedUnion: () => ZodDiscriminatedUnion2, + ZodEffects: () => ZodEffects2, + ZodEnum: () => ZodEnum2, + ZodError: () => ZodError2, + ZodFirstPartyTypeKind: () => ZodFirstPartyTypeKind2, + ZodFunction: () => ZodFunction2, + ZodIntersection: () => ZodIntersection2, + ZodIssueCode: () => ZodIssueCode2, + ZodLazy: () => ZodLazy2, + ZodLiteral: () => ZodLiteral2, + ZodMap: () => ZodMap2, + ZodNaN: () => ZodNaN2, + ZodNativeEnum: () => ZodNativeEnum2, + ZodNever: () => ZodNever2, + ZodNull: () => ZodNull2, + ZodNullable: () => ZodNullable2, + ZodNumber: () => ZodNumber2, + ZodObject: () => ZodObject2, + ZodOptional: () => ZodOptional2, + ZodParsedType: () => ZodParsedType2, + ZodPipeline: () => ZodPipeline2, + ZodPromise: () => ZodPromise2, + ZodReadonly: () => ZodReadonly2, + ZodRecord: () => ZodRecord2, + ZodSchema: () => ZodType2, + ZodSet: () => ZodSet2, + ZodString: () => ZodString2, + ZodSymbol: () => ZodSymbol2, + ZodTransformer: () => ZodEffects2, + ZodTuple: () => ZodTuple2, + ZodType: () => ZodType2, + ZodUndefined: () => ZodUndefined2, + ZodUnion: () => ZodUnion2, + ZodUnknown: () => ZodUnknown2, + ZodVoid: () => ZodVoid2, + addIssueToContext: () => addIssueToContext2, + any: () => anyType2, + array: () => arrayType2, + bigint: () => bigIntType2, + boolean: () => booleanType2, + coerce: () => coerce2, + custom: () => custom2, + date: () => dateType2, + datetimeRegex: () => datetimeRegex2, + defaultErrorMap: () => en_default2, + discriminatedUnion: () => discriminatedUnionType2, + effect: () => effectsType2, + enum: () => enumType2, + function: () => functionType2, + getErrorMap: () => getErrorMap2, + getParsedType: () => getParsedType2, + instanceof: () => instanceOfType2, + intersection: () => intersectionType2, + isAborted: () => isAborted2, + isAsync: () => isAsync2, + isDirty: () => isDirty2, + isValid: () => isValid2, + late: () => late2, + lazy: () => lazyType2, + literal: () => literalType2, + makeIssue: () => makeIssue2, + map: () => mapType2, + nan: () => nanType2, + nativeEnum: () => nativeEnumType2, + never: () => neverType2, + null: () => nullType2, + nullable: () => nullableType2, + number: () => numberType2, + object: () => objectType2, + objectUtil: () => objectUtil2, + oboolean: () => oboolean2, + onumber: () => onumber2, + optional: () => optionalType2, + ostring: () => ostring2, + pipeline: () => pipelineType2, + preprocess: () => preprocessType2, + promise: () => promiseType2, + quotelessJson: () => quotelessJson2, + record: () => recordType2, + set: () => setType2, + setErrorMap: () => setErrorMap2, + strictObject: () => strictObjectType2, + string: () => stringType2, + symbol: () => symbolType2, + transformer: () => effectsType2, + tuple: () => tupleType2, + undefined: () => undefinedType2, + union: () => unionType2, + unknown: () => unknownType2, + util: () => util2, + void: () => voidType2 +}); + +// ../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/util.js +var util2; +(function(util3) { + util3.assertEqual = (_) => { + }; + function assertIs2(_arg) { + } + util3.assertIs = assertIs2; + function assertNever2(_x) { + throw new Error(); + } + util3.assertNever = assertNever2; + util3.arrayToEnum = (items) => { + const obj = {}; + for (const item of items) { + obj[item] = item; + } + return obj; + }; + util3.getValidEnumValues = (obj) => { + const validKeys = util3.objectKeys(obj).filter((k) => typeof obj[obj[k]] !== "number"); + const filtered = {}; + for (const k of validKeys) { + filtered[k] = obj[k]; + } + return util3.objectValues(filtered); + }; + util3.objectValues = (obj) => { + return util3.objectKeys(obj).map(function(e) { + return obj[e]; + }); + }; + util3.objectKeys = typeof Object.keys === "function" ? (obj) => Object.keys(obj) : (object2) => { + const keys = []; + for (const key in object2) { + if (Object.prototype.hasOwnProperty.call(object2, key)) { + keys.push(key); + } + } + return keys; + }; + util3.find = (arr, checker) => { + for (const item of arr) { + if (checker(item)) + return item; + } + return void 0; + }; + util3.isInteger = typeof Number.isInteger === "function" ? (val) => Number.isInteger(val) : (val) => typeof val === "number" && Number.isFinite(val) && Math.floor(val) === val; + function joinValues3(array, separator2 = " | ") { + return array.map((val) => typeof val === "string" ? `'${val}'` : val).join(separator2); + } + util3.joinValues = joinValues3; + util3.jsonStringifyReplacer = (_, value2) => { + if (typeof value2 === "bigint") { + return value2.toString(); + } + return value2; + }; +})(util2 || (util2 = {})); +var objectUtil2; +(function(objectUtil4) { + objectUtil4.mergeShapes = (first, second) => { + return { + ...first, + ...second + // second overwrites first + }; + }; +})(objectUtil2 || (objectUtil2 = {})); +var ZodParsedType2 = util2.arrayToEnum([ + "string", + "nan", + "number", + "integer", + "float", + "boolean", + "date", + "bigint", + "symbol", + "function", + "undefined", + "null", + "array", + "object", + "unknown", + "promise", + "void", + "never", + "map", + "set" +]); +var getParsedType2 = (data) => { + const t = typeof data; + switch (t) { + case "undefined": + return ZodParsedType2.undefined; + case "string": + return ZodParsedType2.string; + case "number": + return Number.isNaN(data) ? ZodParsedType2.nan : ZodParsedType2.number; + case "boolean": + return ZodParsedType2.boolean; + case "function": + return ZodParsedType2.function; + case "bigint": + return ZodParsedType2.bigint; + case "symbol": + return ZodParsedType2.symbol; + case "object": + if (Array.isArray(data)) { + return ZodParsedType2.array; + } + if (data === null) { + return ZodParsedType2.null; + } + if (data.then && typeof data.then === "function" && data.catch && typeof data.catch === "function") { + return ZodParsedType2.promise; + } + if (typeof Map !== "undefined" && data instanceof Map) { + return ZodParsedType2.map; + } + if (typeof Set !== "undefined" && data instanceof Set) { + return ZodParsedType2.set; + } + if (typeof Date !== "undefined" && data instanceof Date) { + return ZodParsedType2.date; + } + return ZodParsedType2.object; + default: + return ZodParsedType2.unknown; + } +}; + +// ../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/ZodError.js +var ZodIssueCode2 = util2.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 quotelessJson2 = (obj) => { + const json3 = JSON.stringify(obj, null, 2); + return json3.replace(/"([^"]+)":/g, "$1:"); +}; +var ZodError2 = class _ZodError extends Error { + get errors() { + return this.issues; + } + constructor(issues) { + super(); + this.issues = []; + this.addIssue = (sub) => { + this.issues = [...this.issues, sub]; + }; + this.addIssues = (subs = []) => { + this.issues = [...this.issues, ...subs]; + }; + const actualProto = new.target.prototype; + if (Object.setPrototypeOf) { + Object.setPrototypeOf(this, actualProto); + } else { + this.__proto__ = actualProto; + } + this.name = "ZodError"; + this.issues = issues; + } + format(_mapper) { + const mapper = _mapper || function(issue3) { + return issue3.message; + }; + const fieldErrors = { _errors: [] }; + const processError = (error42) => { + for (const issue3 of error42.issues) { + if (issue3.code === "invalid_union") { + issue3.unionErrors.map(processError); + } else if (issue3.code === "invalid_return_type") { + processError(issue3.returnTypeError); + } else if (issue3.code === "invalid_arguments") { + processError(issue3.argumentsError); + } else if (issue3.path.length === 0) { + fieldErrors._errors.push(mapper(issue3)); + } else { + let curr = fieldErrors; + let i = 0; + while (i < issue3.path.length) { + const el = issue3.path[i]; + const terminal = i === issue3.path.length - 1; + if (!terminal) { + curr[el] = curr[el] || { _errors: [] }; + } else { + curr[el] = curr[el] || { _errors: [] }; + curr[el]._errors.push(mapper(issue3)); + } + curr = curr[el]; + i++; + } + } + } + }; + processError(this); + return fieldErrors; + } + static assert(value2) { + if (!(value2 instanceof _ZodError)) { + throw new Error(`Not a ZodError: ${value2}`); + } + } + toString() { + return this.message; + } + get message() { + return JSON.stringify(this.issues, util2.jsonStringifyReplacer, 2); + } + get isEmpty() { + return this.issues.length === 0; + } + flatten(mapper = (issue3) => issue3.message) { + const fieldErrors = {}; + const formErrors = []; + for (const sub of this.issues) { + if (sub.path.length > 0) { + const firstEl = sub.path[0]; + fieldErrors[firstEl] = fieldErrors[firstEl] || []; + fieldErrors[firstEl].push(mapper(sub)); + } else { + formErrors.push(mapper(sub)); + } + } + return { formErrors, fieldErrors }; + } + get formErrors() { + return this.flatten(); + } +}; +ZodError2.create = (issues) => { + const error42 = new ZodError2(issues); + return error42; +}; + +// ../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/locales/en.js +var errorMap2 = (issue3, _ctx) => { + let message; + switch (issue3.code) { + case ZodIssueCode2.invalid_type: + if (issue3.received === ZodParsedType2.undefined) { + message = "Required"; + } else { + message = `Expected ${issue3.expected}, received ${issue3.received}`; + } + break; + case ZodIssueCode2.invalid_literal: + message = `Invalid literal value, expected ${JSON.stringify(issue3.expected, util2.jsonStringifyReplacer)}`; + break; + case ZodIssueCode2.unrecognized_keys: + message = `Unrecognized key(s) in object: ${util2.joinValues(issue3.keys, ", ")}`; + break; + case ZodIssueCode2.invalid_union: + message = `Invalid input`; + break; + case ZodIssueCode2.invalid_union_discriminator: + message = `Invalid discriminator value. Expected ${util2.joinValues(issue3.options)}`; + break; + case ZodIssueCode2.invalid_enum_value: + message = `Invalid enum value. Expected ${util2.joinValues(issue3.options)}, received '${issue3.received}'`; + break; + case ZodIssueCode2.invalid_arguments: + message = `Invalid function arguments`; + break; + case ZodIssueCode2.invalid_return_type: + message = `Invalid function return type`; + break; + case ZodIssueCode2.invalid_date: + message = `Invalid date`; + break; + case ZodIssueCode2.invalid_string: + if (typeof issue3.validation === "object") { + if ("includes" in issue3.validation) { + message = `Invalid input: must include "${issue3.validation.includes}"`; + if (typeof issue3.validation.position === "number") { + message = `${message} at one or more positions greater than or equal to ${issue3.validation.position}`; + } + } else if ("startsWith" in issue3.validation) { + message = `Invalid input: must start with "${issue3.validation.startsWith}"`; + } else if ("endsWith" in issue3.validation) { + message = `Invalid input: must end with "${issue3.validation.endsWith}"`; + } else { + util2.assertNever(issue3.validation); + } + } else if (issue3.validation !== "regex") { + message = `Invalid ${issue3.validation}`; + } else { + message = "Invalid"; + } + break; + case ZodIssueCode2.too_small: + if (issue3.type === "array") + message = `Array must contain ${issue3.exact ? "exactly" : issue3.inclusive ? `at least` : `more than`} ${issue3.minimum} element(s)`; + else if (issue3.type === "string") + message = `String must contain ${issue3.exact ? "exactly" : issue3.inclusive ? `at least` : `over`} ${issue3.minimum} character(s)`; + else if (issue3.type === "number") + message = `Number must be ${issue3.exact ? `exactly equal to ` : issue3.inclusive ? `greater than or equal to ` : `greater than `}${issue3.minimum}`; + else if (issue3.type === "bigint") + message = `Number must be ${issue3.exact ? `exactly equal to ` : issue3.inclusive ? `greater than or equal to ` : `greater than `}${issue3.minimum}`; + else if (issue3.type === "date") + message = `Date must be ${issue3.exact ? `exactly equal to ` : issue3.inclusive ? `greater than or equal to ` : `greater than `}${new Date(Number(issue3.minimum))}`; + else + message = "Invalid input"; + break; + case ZodIssueCode2.too_big: + if (issue3.type === "array") + message = `Array must contain ${issue3.exact ? `exactly` : issue3.inclusive ? `at most` : `less than`} ${issue3.maximum} element(s)`; + else if (issue3.type === "string") + message = `String must contain ${issue3.exact ? `exactly` : issue3.inclusive ? `at most` : `under`} ${issue3.maximum} character(s)`; + else if (issue3.type === "number") + message = `Number must be ${issue3.exact ? `exactly` : issue3.inclusive ? `less than or equal to` : `less than`} ${issue3.maximum}`; + else if (issue3.type === "bigint") + message = `BigInt must be ${issue3.exact ? `exactly` : issue3.inclusive ? `less than or equal to` : `less than`} ${issue3.maximum}`; + else if (issue3.type === "date") + message = `Date must be ${issue3.exact ? `exactly` : issue3.inclusive ? `smaller than or equal to` : `smaller than`} ${new Date(Number(issue3.maximum))}`; + else + message = "Invalid input"; + break; + case ZodIssueCode2.custom: + message = `Invalid input`; + break; + case ZodIssueCode2.invalid_intersection_types: + message = `Intersection results could not be merged`; + break; + case ZodIssueCode2.not_multiple_of: + message = `Number must be a multiple of ${issue3.multipleOf}`; + break; + case ZodIssueCode2.not_finite: + message = "Number must be finite"; + break; + default: + message = _ctx.defaultError; + util2.assertNever(issue3); + } + return { message }; +}; +var en_default2 = errorMap2; + +// ../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/errors.js +var overrideErrorMap2 = en_default2; +function setErrorMap2(map) { + overrideErrorMap2 = map; +} +function getErrorMap2() { + return overrideErrorMap2; +} + +// ../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/parseUtil.js +var makeIssue2 = (params) => { + const { data, path: path4, errorMaps, issueData } = params; + const fullPath = [...path4, ...issueData.path || []]; + const fullIssue = { + ...issueData, + path: fullPath + }; + if (issueData.message !== void 0) { + return { + ...issueData, + path: fullPath, + message: issueData.message + }; + } + let errorMessage = ""; + const maps = errorMaps.filter((m) => !!m).slice().reverse(); + for (const map of maps) { + errorMessage = map(fullIssue, { data, defaultError: errorMessage }).message; + } + return { + ...issueData, + path: fullPath, + message: errorMessage + }; +}; +var EMPTY_PATH2 = []; +function addIssueToContext2(ctx, issueData) { + const overrideMap = getErrorMap2(); + const issue3 = makeIssue2({ + issueData, + data: ctx.data, + path: ctx.path, + errorMaps: [ + ctx.common.contextualErrorMap, + // contextual error map is first priority + ctx.schemaErrorMap, + // then schema-bound map if available + overrideMap, + // then global override map + overrideMap === en_default2 ? void 0 : en_default2 + // then global default map + ].filter((x) => !!x) + }); + ctx.common.issues.push(issue3); +} +var ParseStatus2 = class _ParseStatus { + constructor() { + this.value = "valid"; + } + dirty() { + if (this.value === "valid") + this.value = "dirty"; + } + abort() { + if (this.value !== "aborted") + this.value = "aborted"; + } + static mergeArray(status, results) { + const arrayValue = []; + for (const s of results) { + if (s.status === "aborted") + return INVALID2; + if (s.status === "dirty") + status.dirty(); + arrayValue.push(s.value); + } + return { status: status.value, value: arrayValue }; + } + static async mergeObjectAsync(status, pairs) { + const syncPairs = []; + for (const pair of pairs) { + const key = await pair.key; + const value2 = await pair.value; + syncPairs.push({ + key, + value: value2 + }); + } + return _ParseStatus.mergeObjectSync(status, syncPairs); + } + static mergeObjectSync(status, pairs) { + const finalObject = {}; + for (const pair of pairs) { + const { key, value: value2 } = pair; + if (key.status === "aborted") + return INVALID2; + if (value2.status === "aborted") + return INVALID2; + if (key.status === "dirty") + status.dirty(); + if (value2.status === "dirty") + status.dirty(); + if (key.value !== "__proto__" && (typeof value2.value !== "undefined" || pair.alwaysSet)) { + finalObject[key.value] = value2.value; + } + } + return { status: status.value, value: finalObject }; + } +}; +var INVALID2 = Object.freeze({ + status: "aborted" +}); +var DIRTY2 = (value2) => ({ status: "dirty", value: value2 }); +var OK2 = (value2) => ({ status: "valid", value: value2 }); +var isAborted2 = (x) => x.status === "aborted"; +var isDirty2 = (x) => x.status === "dirty"; +var isValid2 = (x) => x.status === "valid"; +var isAsync2 = (x) => typeof Promise !== "undefined" && x instanceof Promise; + +// ../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/errorUtil.js +var errorUtil2; +(function(errorUtil4) { + errorUtil4.errToObj = (message) => typeof message === "string" ? { message } : message || {}; + errorUtil4.toString = (message) => typeof message === "string" ? message : message?.message; +})(errorUtil2 || (errorUtil2 = {})); + +// ../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/types.js +var ParseInputLazyPath2 = class { + constructor(parent, value2, path4, key) { + this._cachedPath = []; + this.parent = parent; + this.data = value2; + this._path = path4; + this._key = key; + } + get path() { + if (!this._cachedPath.length) { + if (Array.isArray(this._key)) { + this._cachedPath.push(...this._path, ...this._key); + } else { + this._cachedPath.push(...this._path, this._key); + } + } + return this._cachedPath; + } +}; +var handleResult2 = (ctx, result) => { + if (isValid2(result)) { + return { success: true, data: result.value }; + } else { + if (!ctx.common.issues.length) { + throw new Error("Validation failed but no issues detected."); + } + return { + success: false, + get error() { + if (this._error) + return this._error; + const error42 = new ZodError2(ctx.common.issues); + this._error = error42; + return this._error; + } + }; + } +}; +function processCreateParams3(params) { + if (!params) + return {}; + const { errorMap: errorMap4, invalid_type_error, required_error, description } = params; + if (errorMap4 && (invalid_type_error || required_error)) { + throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`); + } + if (errorMap4) + return { errorMap: errorMap4, description }; + const customMap = (iss, ctx) => { + const { message } = params; + if (iss.code === "invalid_enum_value") { + return { message: message ?? ctx.defaultError }; + } + if (typeof ctx.data === "undefined") { + return { message: message ?? required_error ?? ctx.defaultError }; + } + if (iss.code !== "invalid_type") + return { message: ctx.defaultError }; + return { message: message ?? invalid_type_error ?? ctx.defaultError }; + }; + return { errorMap: customMap, description }; +} +var ZodType2 = class { + get description() { + return this._def.description; + } + _getType(input) { + return getParsedType2(input.data); + } + _getOrReturnCtx(input, ctx) { + return ctx || { + common: input.parent.common, + data: input.data, + parsedType: getParsedType2(input.data), + schemaErrorMap: this._def.errorMap, + path: input.path, + parent: input.parent + }; + } + _processInputParams(input) { + return { + status: new ParseStatus2(), + ctx: { + common: input.parent.common, + data: input.data, + parsedType: getParsedType2(input.data), + schemaErrorMap: this._def.errorMap, + path: input.path, + parent: input.parent + } + }; + } + _parseSync(input) { + const result = this._parse(input); + if (isAsync2(result)) { + throw new Error("Synchronous parse encountered promise."); + } + return result; + } + _parseAsync(input) { + const result = this._parse(input); + return Promise.resolve(result); + } + parse(data, params) { + const result = this.safeParse(data, params); + if (result.success) + return result.data; + throw result.error; + } + safeParse(data, params) { + const ctx = { + common: { + issues: [], + async: params?.async ?? false, + contextualErrorMap: params?.errorMap + }, + path: params?.path || [], + schemaErrorMap: this._def.errorMap, + parent: null, + data, + parsedType: getParsedType2(data) + }; + const result = this._parseSync({ data, path: ctx.path, parent: ctx }); + return handleResult2(ctx, result); + } + "~validate"(data) { + const ctx = { + common: { + issues: [], + async: !!this["~standard"].async + }, + path: [], + schemaErrorMap: this._def.errorMap, + parent: null, + data, + parsedType: getParsedType2(data) + }; + if (!this["~standard"].async) { + try { + const result = this._parseSync({ data, path: [], parent: ctx }); + return isValid2(result) ? { + value: result.value + } : { + issues: ctx.common.issues + }; + } catch (err) { + if (err?.message?.toLowerCase()?.includes("encountered")) { + this["~standard"].async = true; + } + ctx.common = { + issues: [], + async: true + }; + } + } + return this._parseAsync({ data, path: [], parent: ctx }).then((result) => isValid2(result) ? { + value: result.value + } : { + issues: ctx.common.issues + }); + } + async parseAsync(data, params) { + const result = await this.safeParseAsync(data, params); + if (result.success) + return result.data; + throw result.error; + } + async safeParseAsync(data, params) { + const ctx = { + common: { + issues: [], + contextualErrorMap: params?.errorMap, + async: true + }, + path: params?.path || [], + schemaErrorMap: this._def.errorMap, + parent: null, + data, + parsedType: getParsedType2(data) + }; + const maybeAsyncResult = this._parse({ data, path: ctx.path, parent: ctx }); + const result = await (isAsync2(maybeAsyncResult) ? maybeAsyncResult : Promise.resolve(maybeAsyncResult)); + return handleResult2(ctx, result); + } + refine(check, message) { + const getIssueProperties = (val) => { + if (typeof message === "string" || typeof message === "undefined") { + return { message }; + } else if (typeof message === "function") { + return message(val); + } else { + return message; + } + }; + return this._refinement((val, ctx) => { + const result = check(val); + const setError = () => ctx.addIssue({ + code: ZodIssueCode2.custom, + ...getIssueProperties(val) + }); + if (typeof Promise !== "undefined" && result instanceof Promise) { + return result.then((data) => { + if (!data) { + setError(); + return false; + } else { + return true; + } + }); + } + if (!result) { + setError(); + return false; + } else { + return true; + } + }); + } + refinement(check, refinementData) { + return this._refinement((val, ctx) => { + if (!check(val)) { + ctx.addIssue(typeof refinementData === "function" ? refinementData(val, ctx) : refinementData); + return false; + } else { + return true; + } + }); + } + _refinement(refinement) { + return new ZodEffects2({ + schema: this, + typeName: ZodFirstPartyTypeKind2.ZodEffects, + effect: { type: "refinement", refinement } + }); + } + superRefine(refinement) { + return this._refinement(refinement); + } + constructor(def) { + this.spa = this.safeParseAsync; + this._def = def; + 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: (data) => this["~validate"](data) + }; + } + optional() { + return ZodOptional2.create(this, this._def); + } + nullable() { + return ZodNullable2.create(this, this._def); + } + nullish() { + return this.nullable().optional(); + } + array() { + return ZodArray2.create(this); + } + promise() { + return ZodPromise2.create(this, this._def); + } + or(option) { + return ZodUnion2.create([this, option], this._def); + } + and(incoming) { + return ZodIntersection2.create(this, incoming, this._def); + } + transform(transform) { + return new ZodEffects2({ + ...processCreateParams3(this._def), + schema: this, + typeName: ZodFirstPartyTypeKind2.ZodEffects, + effect: { type: "transform", transform } + }); + } + default(def) { + const defaultValueFunc = typeof def === "function" ? def : () => def; + return new ZodDefault2({ + ...processCreateParams3(this._def), + innerType: this, + defaultValue: defaultValueFunc, + typeName: ZodFirstPartyTypeKind2.ZodDefault + }); + } + brand() { + return new ZodBranded2({ + typeName: ZodFirstPartyTypeKind2.ZodBranded, + type: this, + ...processCreateParams3(this._def) + }); + } + catch(def) { + const catchValueFunc = typeof def === "function" ? def : () => def; + return new ZodCatch2({ + ...processCreateParams3(this._def), + innerType: this, + catchValue: catchValueFunc, + typeName: ZodFirstPartyTypeKind2.ZodCatch + }); + } + describe(description) { + const This = this.constructor; + return new This({ + ...this._def, + description + }); + } + pipe(target) { + return ZodPipeline2.create(this, target); + } + readonly() { + return ZodReadonly2.create(this); + } + isOptional() { + return this.safeParse(void 0).success; + } + isNullable() { + return this.safeParse(null).success; + } +}; +var cuidRegex2 = /^c[^\s-]{8,}$/i; +var cuid2Regex2 = /^[0-9a-z]+$/; +var ulidRegex2 = /^[0-9A-HJKMNP-TV-Z]{26}$/i; +var uuidRegex2 = /^[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; +var nanoidRegex2 = /^[a-z0-9_-]{21}$/i; +var jwtRegex2 = /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/; +var durationRegex2 = /^[-+]?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)?)??$/; +var emailRegex2 = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i; +var _emojiRegex2 = `^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`; +var emojiRegex2; +var ipv4Regex2 = /^(?:(?: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])$/; +var ipv4CidrRegex2 = /^(?:(?: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])$/; +var ipv6Regex2 = /^(([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]))$/; +var ipv6CidrRegex2 = /^(([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])$/; +var base64Regex2 = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/; +var base64urlRegex2 = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/; +var dateRegexSource2 = `((\\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])))`; +var dateRegex2 = new RegExp(`^${dateRegexSource2}$`); +function timeRegexSource2(args3) { + let secondsRegexSource = `[0-5]\\d`; + if (args3.precision) { + secondsRegexSource = `${secondsRegexSource}\\.\\d{${args3.precision}}`; + } else if (args3.precision == null) { + secondsRegexSource = `${secondsRegexSource}(\\.\\d+)?`; + } + const secondsQuantifier = args3.precision ? "+" : "?"; + return `([01]\\d|2[0-3]):[0-5]\\d(:${secondsRegexSource})${secondsQuantifier}`; +} +function timeRegex2(args3) { + return new RegExp(`^${timeRegexSource2(args3)}$`); +} +function datetimeRegex2(args3) { + let regex3 = `${dateRegexSource2}T${timeRegexSource2(args3)}`; + const opts = []; + opts.push(args3.local ? `Z?` : `Z`); + if (args3.offset) + opts.push(`([+-]\\d{2}:?\\d{2})`); + regex3 = `${regex3}(${opts.join("|")})`; + return new RegExp(`^${regex3}$`); +} +function isValidIP2(ip2, version3) { + if ((version3 === "v4" || !version3) && ipv4Regex2.test(ip2)) { + return true; + } + if ((version3 === "v6" || !version3) && ipv6Regex2.test(ip2)) { + return true; + } + return false; +} +function isValidJWT2(jwt, alg) { + if (!jwtRegex2.test(jwt)) + return false; + try { + const [header] = jwt.split("."); + if (!header) + return false; + const base644 = header.replace(/-/g, "+").replace(/_/g, "/").padEnd(header.length + (4 - header.length % 4) % 4, "="); + const decoded = JSON.parse(atob(base644)); + if (typeof decoded !== "object" || decoded === null) + return false; + if ("typ" in decoded && decoded?.typ !== "JWT") + return false; + if (!decoded.alg) + return false; + if (alg && decoded.alg !== alg) + return false; + return true; + } catch { + return false; + } +} +function isValidCidr2(ip2, version3) { + if ((version3 === "v4" || !version3) && ipv4CidrRegex2.test(ip2)) { + return true; + } + if ((version3 === "v6" || !version3) && ipv6CidrRegex2.test(ip2)) { + return true; + } + return false; +} +var ZodString2 = class _ZodString extends ZodType2 { + _parse(input) { + if (this._def.coerce) { + input.data = String(input.data); + } + const parsedType5 = this._getType(input); + if (parsedType5 !== ZodParsedType2.string) { + const ctx2 = this._getOrReturnCtx(input); + addIssueToContext2(ctx2, { + code: ZodIssueCode2.invalid_type, + expected: ZodParsedType2.string, + received: ctx2.parsedType + }); + return INVALID2; + } + const status = new ParseStatus2(); + let ctx = void 0; + for (const check of this._def.checks) { + if (check.kind === "min") { + if (input.data.length < check.value) { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext2(ctx, { + code: ZodIssueCode2.too_small, + minimum: check.value, + type: "string", + inclusive: true, + exact: false, + message: check.message + }); + status.dirty(); + } + } else if (check.kind === "max") { + if (input.data.length > check.value) { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext2(ctx, { + code: ZodIssueCode2.too_big, + maximum: check.value, + type: "string", + inclusive: true, + exact: false, + message: check.message + }); + status.dirty(); + } + } else if (check.kind === "length") { + const tooBig = input.data.length > check.value; + const tooSmall = input.data.length < check.value; + if (tooBig || tooSmall) { + ctx = this._getOrReturnCtx(input, ctx); + if (tooBig) { + addIssueToContext2(ctx, { + code: ZodIssueCode2.too_big, + maximum: check.value, + type: "string", + inclusive: true, + exact: true, + message: check.message + }); + } else if (tooSmall) { + addIssueToContext2(ctx, { + code: ZodIssueCode2.too_small, + minimum: check.value, + type: "string", + inclusive: true, + exact: true, + message: check.message + }); + } + status.dirty(); + } + } else if (check.kind === "email") { + if (!emailRegex2.test(input.data)) { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext2(ctx, { + validation: "email", + code: ZodIssueCode2.invalid_string, + message: check.message + }); + status.dirty(); + } + } else if (check.kind === "emoji") { + if (!emojiRegex2) { + emojiRegex2 = new RegExp(_emojiRegex2, "u"); + } + if (!emojiRegex2.test(input.data)) { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext2(ctx, { + validation: "emoji", + code: ZodIssueCode2.invalid_string, + message: check.message + }); + status.dirty(); + } + } else if (check.kind === "uuid") { + if (!uuidRegex2.test(input.data)) { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext2(ctx, { + validation: "uuid", + code: ZodIssueCode2.invalid_string, + message: check.message + }); + status.dirty(); + } + } else if (check.kind === "nanoid") { + if (!nanoidRegex2.test(input.data)) { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext2(ctx, { + validation: "nanoid", + code: ZodIssueCode2.invalid_string, + message: check.message + }); + status.dirty(); + } + } else if (check.kind === "cuid") { + if (!cuidRegex2.test(input.data)) { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext2(ctx, { + validation: "cuid", + code: ZodIssueCode2.invalid_string, + message: check.message + }); + status.dirty(); + } + } else if (check.kind === "cuid2") { + if (!cuid2Regex2.test(input.data)) { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext2(ctx, { + validation: "cuid2", + code: ZodIssueCode2.invalid_string, + message: check.message + }); + status.dirty(); + } + } else if (check.kind === "ulid") { + if (!ulidRegex2.test(input.data)) { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext2(ctx, { + validation: "ulid", + code: ZodIssueCode2.invalid_string, + message: check.message + }); + status.dirty(); + } + } else if (check.kind === "url") { + try { + new URL(input.data); + } catch { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext2(ctx, { + validation: "url", + code: ZodIssueCode2.invalid_string, + message: check.message + }); + status.dirty(); + } + } else if (check.kind === "regex") { + check.regex.lastIndex = 0; + const testResult = check.regex.test(input.data); + if (!testResult) { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext2(ctx, { + validation: "regex", + code: ZodIssueCode2.invalid_string, + message: check.message + }); + status.dirty(); + } + } else if (check.kind === "trim") { + input.data = input.data.trim(); + } else if (check.kind === "includes") { + if (!input.data.includes(check.value, check.position)) { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext2(ctx, { + code: ZodIssueCode2.invalid_string, + validation: { includes: check.value, position: check.position }, + message: check.message + }); + status.dirty(); + } + } else if (check.kind === "toLowerCase") { + input.data = input.data.toLowerCase(); + } else if (check.kind === "toUpperCase") { + input.data = input.data.toUpperCase(); + } else if (check.kind === "startsWith") { + if (!input.data.startsWith(check.value)) { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext2(ctx, { + code: ZodIssueCode2.invalid_string, + validation: { startsWith: check.value }, + message: check.message + }); + status.dirty(); + } + } else if (check.kind === "endsWith") { + if (!input.data.endsWith(check.value)) { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext2(ctx, { + code: ZodIssueCode2.invalid_string, + validation: { endsWith: check.value }, + message: check.message + }); + status.dirty(); + } + } else if (check.kind === "datetime") { + const regex3 = datetimeRegex2(check); + if (!regex3.test(input.data)) { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext2(ctx, { + code: ZodIssueCode2.invalid_string, + validation: "datetime", + message: check.message + }); + status.dirty(); + } + } else if (check.kind === "date") { + const regex3 = dateRegex2; + if (!regex3.test(input.data)) { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext2(ctx, { + code: ZodIssueCode2.invalid_string, + validation: "date", + message: check.message + }); + status.dirty(); + } + } else if (check.kind === "time") { + const regex3 = timeRegex2(check); + if (!regex3.test(input.data)) { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext2(ctx, { + code: ZodIssueCode2.invalid_string, + validation: "time", + message: check.message + }); + status.dirty(); + } + } else if (check.kind === "duration") { + if (!durationRegex2.test(input.data)) { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext2(ctx, { + validation: "duration", + code: ZodIssueCode2.invalid_string, + message: check.message + }); + status.dirty(); + } + } else if (check.kind === "ip") { + if (!isValidIP2(input.data, check.version)) { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext2(ctx, { + validation: "ip", + code: ZodIssueCode2.invalid_string, + message: check.message + }); + status.dirty(); + } + } else if (check.kind === "jwt") { + if (!isValidJWT2(input.data, check.alg)) { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext2(ctx, { + validation: "jwt", + code: ZodIssueCode2.invalid_string, + message: check.message + }); + status.dirty(); + } + } else if (check.kind === "cidr") { + if (!isValidCidr2(input.data, check.version)) { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext2(ctx, { + validation: "cidr", + code: ZodIssueCode2.invalid_string, + message: check.message + }); + status.dirty(); + } + } else if (check.kind === "base64") { + if (!base64Regex2.test(input.data)) { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext2(ctx, { + validation: "base64", + code: ZodIssueCode2.invalid_string, + message: check.message + }); + status.dirty(); + } + } else if (check.kind === "base64url") { + if (!base64urlRegex2.test(input.data)) { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext2(ctx, { + validation: "base64url", + code: ZodIssueCode2.invalid_string, + message: check.message + }); + status.dirty(); + } + } else { + util2.assertNever(check); + } + } + return { status: status.value, value: input.data }; + } + _regex(regex3, validation, message) { + return this.refinement((data) => regex3.test(data), { + validation, + code: ZodIssueCode2.invalid_string, + ...errorUtil2.errToObj(message) + }); + } + _addCheck(check) { + return new _ZodString({ + ...this._def, + checks: [...this._def.checks, check] + }); + } + email(message) { + return this._addCheck({ kind: "email", ...errorUtil2.errToObj(message) }); + } + url(message) { + return this._addCheck({ kind: "url", ...errorUtil2.errToObj(message) }); + } + emoji(message) { + return this._addCheck({ kind: "emoji", ...errorUtil2.errToObj(message) }); + } + uuid(message) { + return this._addCheck({ kind: "uuid", ...errorUtil2.errToObj(message) }); + } + nanoid(message) { + return this._addCheck({ kind: "nanoid", ...errorUtil2.errToObj(message) }); + } + cuid(message) { + return this._addCheck({ kind: "cuid", ...errorUtil2.errToObj(message) }); + } + cuid2(message) { + return this._addCheck({ kind: "cuid2", ...errorUtil2.errToObj(message) }); + } + ulid(message) { + return this._addCheck({ kind: "ulid", ...errorUtil2.errToObj(message) }); + } + base64(message) { + return this._addCheck({ kind: "base64", ...errorUtil2.errToObj(message) }); + } + base64url(message) { + return this._addCheck({ + kind: "base64url", + ...errorUtil2.errToObj(message) + }); + } + jwt(options) { + return this._addCheck({ kind: "jwt", ...errorUtil2.errToObj(options) }); + } + ip(options) { + return this._addCheck({ kind: "ip", ...errorUtil2.errToObj(options) }); + } + cidr(options) { + return this._addCheck({ kind: "cidr", ...errorUtil2.errToObj(options) }); + } + datetime(options) { + if (typeof options === "string") { + return this._addCheck({ + kind: "datetime", + precision: null, + offset: false, + local: false, + message: options + }); + } + return this._addCheck({ + kind: "datetime", + precision: typeof options?.precision === "undefined" ? null : options?.precision, + offset: options?.offset ?? false, + local: options?.local ?? false, + ...errorUtil2.errToObj(options?.message) + }); + } + date(message) { + return this._addCheck({ kind: "date", message }); + } + time(options) { + if (typeof options === "string") { + return this._addCheck({ + kind: "time", + precision: null, + message: options + }); + } + return this._addCheck({ + kind: "time", + precision: typeof options?.precision === "undefined" ? null : options?.precision, + ...errorUtil2.errToObj(options?.message) + }); + } + duration(message) { + return this._addCheck({ kind: "duration", ...errorUtil2.errToObj(message) }); + } + regex(regex3, message) { + return this._addCheck({ + kind: "regex", + regex: regex3, + ...errorUtil2.errToObj(message) + }); + } + includes(value2, options) { + return this._addCheck({ + kind: "includes", + value: value2, + position: options?.position, + ...errorUtil2.errToObj(options?.message) + }); + } + startsWith(value2, message) { + return this._addCheck({ + kind: "startsWith", + value: value2, + ...errorUtil2.errToObj(message) + }); + } + endsWith(value2, message) { + return this._addCheck({ + kind: "endsWith", + value: value2, + ...errorUtil2.errToObj(message) + }); + } + min(minLength, message) { + return this._addCheck({ + kind: "min", + value: minLength, + ...errorUtil2.errToObj(message) + }); + } + max(maxLength, message) { + return this._addCheck({ + kind: "max", + value: maxLength, + ...errorUtil2.errToObj(message) + }); + } + length(len, message) { + return this._addCheck({ + kind: "length", + value: len, + ...errorUtil2.errToObj(message) + }); + } + /** + * Equivalent to `.min(1)` + */ + nonempty(message) { + return this.min(1, errorUtil2.errToObj(message)); + } + trim() { + return new _ZodString({ + ...this._def, + checks: [...this._def.checks, { kind: "trim" }] + }); + } + toLowerCase() { + return new _ZodString({ + ...this._def, + checks: [...this._def.checks, { kind: "toLowerCase" }] + }); + } + toUpperCase() { + return new _ZodString({ + ...this._def, + checks: [...this._def.checks, { kind: "toUpperCase" }] + }); + } + get isDatetime() { + return !!this._def.checks.find((ch) => ch.kind === "datetime"); + } + get isDate() { + return !!this._def.checks.find((ch) => ch.kind === "date"); + } + get isTime() { + return !!this._def.checks.find((ch) => ch.kind === "time"); + } + get isDuration() { + return !!this._def.checks.find((ch) => ch.kind === "duration"); + } + get isEmail() { + return !!this._def.checks.find((ch) => ch.kind === "email"); + } + get isURL() { + return !!this._def.checks.find((ch) => ch.kind === "url"); + } + get isEmoji() { + return !!this._def.checks.find((ch) => ch.kind === "emoji"); + } + get isUUID() { + return !!this._def.checks.find((ch) => ch.kind === "uuid"); + } + get isNANOID() { + return !!this._def.checks.find((ch) => ch.kind === "nanoid"); + } + get isCUID() { + return !!this._def.checks.find((ch) => ch.kind === "cuid"); + } + get isCUID2() { + return !!this._def.checks.find((ch) => ch.kind === "cuid2"); + } + get isULID() { + return !!this._def.checks.find((ch) => ch.kind === "ulid"); + } + get isIP() { + return !!this._def.checks.find((ch) => ch.kind === "ip"); + } + get isCIDR() { + return !!this._def.checks.find((ch) => ch.kind === "cidr"); + } + get isBase64() { + return !!this._def.checks.find((ch) => ch.kind === "base64"); + } + get isBase64url() { + return !!this._def.checks.find((ch) => ch.kind === "base64url"); + } + get minLength() { + let min = null; + for (const ch of this._def.checks) { + if (ch.kind === "min") { + if (min === null || ch.value > min) + min = ch.value; + } + } + return min; + } + get maxLength() { + let max = null; + for (const ch of this._def.checks) { + if (ch.kind === "max") { + if (max === null || ch.value < max) + max = ch.value; + } + } + return max; + } +}; +ZodString2.create = (params) => { + return new ZodString2({ + checks: [], + typeName: ZodFirstPartyTypeKind2.ZodString, + coerce: params?.coerce ?? false, + ...processCreateParams3(params) + }); +}; +function floatSafeRemainder2(val, step) { + const valDecCount = (val.toString().split(".")[1] || "").length; + const stepDecCount = (step.toString().split(".")[1] || "").length; + const decCount = valDecCount > stepDecCount ? valDecCount : stepDecCount; + const valInt = Number.parseInt(val.toFixed(decCount).replace(".", "")); + const stepInt = Number.parseInt(step.toFixed(decCount).replace(".", "")); + return valInt % stepInt / 10 ** decCount; +} +var ZodNumber2 = class _ZodNumber extends ZodType2 { + constructor() { + super(...arguments); + this.min = this.gte; + this.max = this.lte; + this.step = this.multipleOf; + } + _parse(input) { + if (this._def.coerce) { + input.data = Number(input.data); + } + const parsedType5 = this._getType(input); + if (parsedType5 !== ZodParsedType2.number) { + const ctx2 = this._getOrReturnCtx(input); + addIssueToContext2(ctx2, { + code: ZodIssueCode2.invalid_type, + expected: ZodParsedType2.number, + received: ctx2.parsedType + }); + return INVALID2; + } + let ctx = void 0; + const status = new ParseStatus2(); + for (const check of this._def.checks) { + if (check.kind === "int") { + if (!util2.isInteger(input.data)) { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext2(ctx, { + code: ZodIssueCode2.invalid_type, + expected: "integer", + received: "float", + message: check.message + }); + status.dirty(); + } + } else if (check.kind === "min") { + const tooSmall = check.inclusive ? input.data < check.value : input.data <= check.value; + if (tooSmall) { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext2(ctx, { + code: ZodIssueCode2.too_small, + minimum: check.value, + type: "number", + inclusive: check.inclusive, + exact: false, + message: check.message + }); + status.dirty(); + } + } else if (check.kind === "max") { + const tooBig = check.inclusive ? input.data > check.value : input.data >= check.value; + if (tooBig) { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext2(ctx, { + code: ZodIssueCode2.too_big, + maximum: check.value, + type: "number", + inclusive: check.inclusive, + exact: false, + message: check.message + }); + status.dirty(); + } + } else if (check.kind === "multipleOf") { + if (floatSafeRemainder2(input.data, check.value) !== 0) { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext2(ctx, { + code: ZodIssueCode2.not_multiple_of, + multipleOf: check.value, + message: check.message + }); + status.dirty(); + } + } else if (check.kind === "finite") { + if (!Number.isFinite(input.data)) { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext2(ctx, { + code: ZodIssueCode2.not_finite, + message: check.message + }); + status.dirty(); + } + } else { + util2.assertNever(check); + } + } + return { status: status.value, value: input.data }; + } + gte(value2, message) { + return this.setLimit("min", value2, true, errorUtil2.toString(message)); + } + gt(value2, message) { + return this.setLimit("min", value2, false, errorUtil2.toString(message)); + } + lte(value2, message) { + return this.setLimit("max", value2, true, errorUtil2.toString(message)); + } + lt(value2, message) { + return this.setLimit("max", value2, false, errorUtil2.toString(message)); + } + setLimit(kind, value2, inclusive, message) { + return new _ZodNumber({ + ...this._def, + checks: [ + ...this._def.checks, + { + kind, + value: value2, + inclusive, + message: errorUtil2.toString(message) + } + ] + }); + } + _addCheck(check) { + return new _ZodNumber({ + ...this._def, + checks: [...this._def.checks, check] + }); + } + int(message) { + return this._addCheck({ + kind: "int", + message: errorUtil2.toString(message) + }); + } + positive(message) { + return this._addCheck({ + kind: "min", + value: 0, + inclusive: false, + message: errorUtil2.toString(message) + }); + } + negative(message) { + return this._addCheck({ + kind: "max", + value: 0, + inclusive: false, + message: errorUtil2.toString(message) + }); + } + nonpositive(message) { + return this._addCheck({ + kind: "max", + value: 0, + inclusive: true, + message: errorUtil2.toString(message) + }); + } + nonnegative(message) { + return this._addCheck({ + kind: "min", + value: 0, + inclusive: true, + message: errorUtil2.toString(message) + }); + } + multipleOf(value2, message) { + return this._addCheck({ + kind: "multipleOf", + value: value2, + message: errorUtil2.toString(message) + }); + } + finite(message) { + return this._addCheck({ + kind: "finite", + message: errorUtil2.toString(message) + }); + } + safe(message) { + return this._addCheck({ + kind: "min", + inclusive: true, + value: Number.MIN_SAFE_INTEGER, + message: errorUtil2.toString(message) + })._addCheck({ + kind: "max", + inclusive: true, + value: Number.MAX_SAFE_INTEGER, + message: errorUtil2.toString(message) + }); + } + get minValue() { + let min = null; + for (const ch of this._def.checks) { + if (ch.kind === "min") { + if (min === null || ch.value > min) + min = ch.value; + } + } + return min; + } + get maxValue() { + let max = null; + for (const ch of this._def.checks) { + if (ch.kind === "max") { + if (max === null || ch.value < max) + max = ch.value; + } + } + return max; + } + get isInt() { + return !!this._def.checks.find((ch) => ch.kind === "int" || ch.kind === "multipleOf" && util2.isInteger(ch.value)); + } + get isFinite() { + let max = null; + let min = null; + for (const ch of this._def.checks) { + if (ch.kind === "finite" || ch.kind === "int" || ch.kind === "multipleOf") { + return true; + } else if (ch.kind === "min") { + if (min === null || ch.value > min) + min = ch.value; + } else if (ch.kind === "max") { + if (max === null || ch.value < max) + max = ch.value; + } + } + return Number.isFinite(min) && Number.isFinite(max); + } +}; +ZodNumber2.create = (params) => { + return new ZodNumber2({ + checks: [], + typeName: ZodFirstPartyTypeKind2.ZodNumber, + coerce: params?.coerce || false, + ...processCreateParams3(params) + }); +}; +var ZodBigInt2 = class _ZodBigInt extends ZodType2 { + constructor() { + super(...arguments); + this.min = this.gte; + this.max = this.lte; + } + _parse(input) { + if (this._def.coerce) { + try { + input.data = BigInt(input.data); + } catch { + return this._getInvalidInput(input); + } + } + const parsedType5 = this._getType(input); + if (parsedType5 !== ZodParsedType2.bigint) { + return this._getInvalidInput(input); + } + let ctx = void 0; + const status = new ParseStatus2(); + for (const check of this._def.checks) { + if (check.kind === "min") { + const tooSmall = check.inclusive ? input.data < check.value : input.data <= check.value; + if (tooSmall) { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext2(ctx, { + code: ZodIssueCode2.too_small, + type: "bigint", + minimum: check.value, + inclusive: check.inclusive, + message: check.message + }); + status.dirty(); + } + } else if (check.kind === "max") { + const tooBig = check.inclusive ? input.data > check.value : input.data >= check.value; + if (tooBig) { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext2(ctx, { + code: ZodIssueCode2.too_big, + type: "bigint", + maximum: check.value, + inclusive: check.inclusive, + message: check.message + }); + status.dirty(); + } + } else if (check.kind === "multipleOf") { + if (input.data % check.value !== BigInt(0)) { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext2(ctx, { + code: ZodIssueCode2.not_multiple_of, + multipleOf: check.value, + message: check.message + }); + status.dirty(); + } + } else { + util2.assertNever(check); + } + } + return { status: status.value, value: input.data }; + } + _getInvalidInput(input) { + const ctx = this._getOrReturnCtx(input); + addIssueToContext2(ctx, { + code: ZodIssueCode2.invalid_type, + expected: ZodParsedType2.bigint, + received: ctx.parsedType + }); + return INVALID2; + } + gte(value2, message) { + return this.setLimit("min", value2, true, errorUtil2.toString(message)); + } + gt(value2, message) { + return this.setLimit("min", value2, false, errorUtil2.toString(message)); + } + lte(value2, message) { + return this.setLimit("max", value2, true, errorUtil2.toString(message)); + } + lt(value2, message) { + return this.setLimit("max", value2, false, errorUtil2.toString(message)); + } + setLimit(kind, value2, inclusive, message) { + return new _ZodBigInt({ + ...this._def, + checks: [ + ...this._def.checks, + { + kind, + value: value2, + inclusive, + message: errorUtil2.toString(message) + } + ] + }); + } + _addCheck(check) { + return new _ZodBigInt({ + ...this._def, + checks: [...this._def.checks, check] + }); + } + positive(message) { + return this._addCheck({ + kind: "min", + value: BigInt(0), + inclusive: false, + message: errorUtil2.toString(message) + }); + } + negative(message) { + return this._addCheck({ + kind: "max", + value: BigInt(0), + inclusive: false, + message: errorUtil2.toString(message) + }); + } + nonpositive(message) { + return this._addCheck({ + kind: "max", + value: BigInt(0), + inclusive: true, + message: errorUtil2.toString(message) + }); + } + nonnegative(message) { + return this._addCheck({ + kind: "min", + value: BigInt(0), + inclusive: true, + message: errorUtil2.toString(message) + }); + } + multipleOf(value2, message) { + return this._addCheck({ + kind: "multipleOf", + value: value2, + message: errorUtil2.toString(message) + }); + } + get minValue() { + let min = null; + for (const ch of this._def.checks) { + if (ch.kind === "min") { + if (min === null || ch.value > min) + min = ch.value; + } + } + return min; + } + get maxValue() { + let max = null; + for (const ch of this._def.checks) { + if (ch.kind === "max") { + if (max === null || ch.value < max) + max = ch.value; + } + } + return max; + } +}; +ZodBigInt2.create = (params) => { + return new ZodBigInt2({ + checks: [], + typeName: ZodFirstPartyTypeKind2.ZodBigInt, + coerce: params?.coerce ?? false, + ...processCreateParams3(params) + }); +}; +var ZodBoolean2 = class extends ZodType2 { + _parse(input) { + if (this._def.coerce) { + input.data = Boolean(input.data); + } + const parsedType5 = this._getType(input); + if (parsedType5 !== ZodParsedType2.boolean) { + const ctx = this._getOrReturnCtx(input); + addIssueToContext2(ctx, { + code: ZodIssueCode2.invalid_type, + expected: ZodParsedType2.boolean, + received: ctx.parsedType + }); + return INVALID2; + } + return OK2(input.data); + } +}; +ZodBoolean2.create = (params) => { + return new ZodBoolean2({ + typeName: ZodFirstPartyTypeKind2.ZodBoolean, + coerce: params?.coerce || false, + ...processCreateParams3(params) + }); +}; +var ZodDate2 = class _ZodDate extends ZodType2 { + _parse(input) { + if (this._def.coerce) { + input.data = new Date(input.data); + } + const parsedType5 = this._getType(input); + if (parsedType5 !== ZodParsedType2.date) { + const ctx2 = this._getOrReturnCtx(input); + addIssueToContext2(ctx2, { + code: ZodIssueCode2.invalid_type, + expected: ZodParsedType2.date, + received: ctx2.parsedType + }); + return INVALID2; + } + if (Number.isNaN(input.data.getTime())) { + const ctx2 = this._getOrReturnCtx(input); + addIssueToContext2(ctx2, { + code: ZodIssueCode2.invalid_date + }); + return INVALID2; + } + const status = new ParseStatus2(); + let ctx = void 0; + for (const check of this._def.checks) { + if (check.kind === "min") { + if (input.data.getTime() < check.value) { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext2(ctx, { + code: ZodIssueCode2.too_small, + message: check.message, + inclusive: true, + exact: false, + minimum: check.value, + type: "date" + }); + status.dirty(); + } + } else if (check.kind === "max") { + if (input.data.getTime() > check.value) { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext2(ctx, { + code: ZodIssueCode2.too_big, + message: check.message, + inclusive: true, + exact: false, + maximum: check.value, + type: "date" + }); + status.dirty(); + } + } else { + util2.assertNever(check); + } + } + return { + status: status.value, + value: new Date(input.data.getTime()) + }; + } + _addCheck(check) { + return new _ZodDate({ + ...this._def, + checks: [...this._def.checks, check] + }); + } + min(minDate, message) { + return this._addCheck({ + kind: "min", + value: minDate.getTime(), + message: errorUtil2.toString(message) + }); + } + max(maxDate, message) { + return this._addCheck({ + kind: "max", + value: maxDate.getTime(), + message: errorUtil2.toString(message) + }); + } + get minDate() { + let min = null; + for (const ch of this._def.checks) { + if (ch.kind === "min") { + if (min === null || ch.value > min) + min = ch.value; + } + } + return min != null ? new Date(min) : null; + } + get maxDate() { + let max = null; + for (const ch of this._def.checks) { + if (ch.kind === "max") { + if (max === null || ch.value < max) + max = ch.value; + } + } + return max != null ? new Date(max) : null; + } +}; +ZodDate2.create = (params) => { + return new ZodDate2({ + checks: [], + coerce: params?.coerce || false, + typeName: ZodFirstPartyTypeKind2.ZodDate, + ...processCreateParams3(params) + }); +}; +var ZodSymbol2 = class extends ZodType2 { + _parse(input) { + const parsedType5 = this._getType(input); + if (parsedType5 !== ZodParsedType2.symbol) { + const ctx = this._getOrReturnCtx(input); + addIssueToContext2(ctx, { + code: ZodIssueCode2.invalid_type, + expected: ZodParsedType2.symbol, + received: ctx.parsedType + }); + return INVALID2; + } + return OK2(input.data); + } +}; +ZodSymbol2.create = (params) => { + return new ZodSymbol2({ + typeName: ZodFirstPartyTypeKind2.ZodSymbol, + ...processCreateParams3(params) + }); +}; +var ZodUndefined2 = class extends ZodType2 { + _parse(input) { + const parsedType5 = this._getType(input); + if (parsedType5 !== ZodParsedType2.undefined) { + const ctx = this._getOrReturnCtx(input); + addIssueToContext2(ctx, { + code: ZodIssueCode2.invalid_type, + expected: ZodParsedType2.undefined, + received: ctx.parsedType + }); + return INVALID2; + } + return OK2(input.data); + } +}; +ZodUndefined2.create = (params) => { + return new ZodUndefined2({ + typeName: ZodFirstPartyTypeKind2.ZodUndefined, + ...processCreateParams3(params) + }); +}; +var ZodNull2 = class extends ZodType2 { + _parse(input) { + const parsedType5 = this._getType(input); + if (parsedType5 !== ZodParsedType2.null) { + const ctx = this._getOrReturnCtx(input); + addIssueToContext2(ctx, { + code: ZodIssueCode2.invalid_type, + expected: ZodParsedType2.null, + received: ctx.parsedType + }); + return INVALID2; + } + return OK2(input.data); + } +}; +ZodNull2.create = (params) => { + return new ZodNull2({ + typeName: ZodFirstPartyTypeKind2.ZodNull, + ...processCreateParams3(params) + }); +}; +var ZodAny2 = class extends ZodType2 { + constructor() { + super(...arguments); + this._any = true; + } + _parse(input) { + return OK2(input.data); + } +}; +ZodAny2.create = (params) => { + return new ZodAny2({ + typeName: ZodFirstPartyTypeKind2.ZodAny, + ...processCreateParams3(params) + }); +}; +var ZodUnknown2 = class extends ZodType2 { + constructor() { + super(...arguments); + this._unknown = true; + } + _parse(input) { + return OK2(input.data); + } +}; +ZodUnknown2.create = (params) => { + return new ZodUnknown2({ + typeName: ZodFirstPartyTypeKind2.ZodUnknown, + ...processCreateParams3(params) + }); +}; +var ZodNever2 = class extends ZodType2 { + _parse(input) { + const ctx = this._getOrReturnCtx(input); + addIssueToContext2(ctx, { + code: ZodIssueCode2.invalid_type, + expected: ZodParsedType2.never, + received: ctx.parsedType + }); + return INVALID2; + } +}; +ZodNever2.create = (params) => { + return new ZodNever2({ + typeName: ZodFirstPartyTypeKind2.ZodNever, + ...processCreateParams3(params) + }); +}; +var ZodVoid2 = class extends ZodType2 { + _parse(input) { + const parsedType5 = this._getType(input); + if (parsedType5 !== ZodParsedType2.undefined) { + const ctx = this._getOrReturnCtx(input); + addIssueToContext2(ctx, { + code: ZodIssueCode2.invalid_type, + expected: ZodParsedType2.void, + received: ctx.parsedType + }); + return INVALID2; + } + return OK2(input.data); + } +}; +ZodVoid2.create = (params) => { + return new ZodVoid2({ + typeName: ZodFirstPartyTypeKind2.ZodVoid, + ...processCreateParams3(params) + }); +}; +var ZodArray2 = class _ZodArray extends ZodType2 { + _parse(input) { + const { ctx, status } = this._processInputParams(input); + const def = this._def; + if (ctx.parsedType !== ZodParsedType2.array) { + addIssueToContext2(ctx, { + code: ZodIssueCode2.invalid_type, + expected: ZodParsedType2.array, + received: ctx.parsedType + }); + return INVALID2; + } + if (def.exactLength !== null) { + const tooBig = ctx.data.length > def.exactLength.value; + const tooSmall = ctx.data.length < def.exactLength.value; + if (tooBig || tooSmall) { + addIssueToContext2(ctx, { + code: tooBig ? ZodIssueCode2.too_big : ZodIssueCode2.too_small, + minimum: tooSmall ? def.exactLength.value : void 0, + maximum: tooBig ? def.exactLength.value : void 0, + type: "array", + inclusive: true, + exact: true, + message: def.exactLength.message + }); + status.dirty(); + } + } + if (def.minLength !== null) { + if (ctx.data.length < def.minLength.value) { + addIssueToContext2(ctx, { + code: ZodIssueCode2.too_small, + minimum: def.minLength.value, + type: "array", + inclusive: true, + exact: false, + message: def.minLength.message + }); + status.dirty(); + } + } + if (def.maxLength !== null) { + if (ctx.data.length > def.maxLength.value) { + addIssueToContext2(ctx, { + code: ZodIssueCode2.too_big, + maximum: def.maxLength.value, + type: "array", + inclusive: true, + exact: false, + message: def.maxLength.message + }); + status.dirty(); + } + } + if (ctx.common.async) { + return Promise.all([...ctx.data].map((item, i) => { + return def.type._parseAsync(new ParseInputLazyPath2(ctx, item, ctx.path, i)); + })).then((result2) => { + return ParseStatus2.mergeArray(status, result2); + }); + } + const result = [...ctx.data].map((item, i) => { + return def.type._parseSync(new ParseInputLazyPath2(ctx, item, ctx.path, i)); + }); + return ParseStatus2.mergeArray(status, result); + } + get element() { + return this._def.type; + } + min(minLength, message) { + return new _ZodArray({ + ...this._def, + minLength: { value: minLength, message: errorUtil2.toString(message) } + }); + } + max(maxLength, message) { + return new _ZodArray({ + ...this._def, + maxLength: { value: maxLength, message: errorUtil2.toString(message) } + }); + } + length(len, message) { + return new _ZodArray({ + ...this._def, + exactLength: { value: len, message: errorUtil2.toString(message) } + }); + } + nonempty(message) { + return this.min(1, message); + } +}; +ZodArray2.create = (schema2, params) => { + return new ZodArray2({ + type: schema2, + minLength: null, + maxLength: null, + exactLength: null, + typeName: ZodFirstPartyTypeKind2.ZodArray, + ...processCreateParams3(params) + }); +}; +function deepPartialify2(schema2) { + if (schema2 instanceof ZodObject2) { + const newShape = {}; + for (const key in schema2.shape) { + const fieldSchema = schema2.shape[key]; + newShape[key] = ZodOptional2.create(deepPartialify2(fieldSchema)); + } + return new ZodObject2({ + ...schema2._def, + shape: () => newShape + }); + } else if (schema2 instanceof ZodArray2) { + return new ZodArray2({ + ...schema2._def, + type: deepPartialify2(schema2.element) + }); + } else if (schema2 instanceof ZodOptional2) { + return ZodOptional2.create(deepPartialify2(schema2.unwrap())); + } else if (schema2 instanceof ZodNullable2) { + return ZodNullable2.create(deepPartialify2(schema2.unwrap())); + } else if (schema2 instanceof ZodTuple2) { + return ZodTuple2.create(schema2.items.map((item) => deepPartialify2(item))); + } else { + return schema2; + } +} +var ZodObject2 = class _ZodObject extends ZodType2 { + constructor() { + super(...arguments); + this._cached = null; + this.nonstrict = this.passthrough; + this.augment = this.extend; + } + _getCached() { + if (this._cached !== null) + return this._cached; + const shape = this._def.shape(); + const keys = util2.objectKeys(shape); + this._cached = { shape, keys }; + return this._cached; + } + _parse(input) { + const parsedType5 = this._getType(input); + if (parsedType5 !== ZodParsedType2.object) { + const ctx2 = this._getOrReturnCtx(input); + addIssueToContext2(ctx2, { + code: ZodIssueCode2.invalid_type, + expected: ZodParsedType2.object, + received: ctx2.parsedType + }); + return INVALID2; + } + const { status, ctx } = this._processInputParams(input); + const { shape, keys: shapeKeys } = this._getCached(); + const extraKeys = []; + if (!(this._def.catchall instanceof ZodNever2 && this._def.unknownKeys === "strip")) { + for (const key in ctx.data) { + if (!shapeKeys.includes(key)) { + extraKeys.push(key); + } + } + } + const pairs = []; + for (const key of shapeKeys) { + const keyValidator = shape[key]; + const value2 = ctx.data[key]; + pairs.push({ + key: { status: "valid", value: key }, + value: keyValidator._parse(new ParseInputLazyPath2(ctx, value2, ctx.path, key)), + alwaysSet: key in ctx.data + }); + } + if (this._def.catchall instanceof ZodNever2) { + const unknownKeys = this._def.unknownKeys; + if (unknownKeys === "passthrough") { + for (const key of extraKeys) { + pairs.push({ + key: { status: "valid", value: key }, + value: { status: "valid", value: ctx.data[key] } + }); + } + } else if (unknownKeys === "strict") { + if (extraKeys.length > 0) { + addIssueToContext2(ctx, { + code: ZodIssueCode2.unrecognized_keys, + keys: extraKeys + }); + status.dirty(); + } + } else if (unknownKeys === "strip") { + } else { + throw new Error(`Internal ZodObject error: invalid unknownKeys value.`); + } + } else { + const catchall = this._def.catchall; + for (const key of extraKeys) { + const value2 = ctx.data[key]; + pairs.push({ + key: { status: "valid", value: key }, + value: catchall._parse( + new ParseInputLazyPath2(ctx, value2, ctx.path, key) + //, ctx.child(key), value, getParsedType(value) + ), + alwaysSet: key in ctx.data + }); + } + } + if (ctx.common.async) { + return Promise.resolve().then(async () => { + const syncPairs = []; + for (const pair of pairs) { + const key = await pair.key; + const value2 = await pair.value; + syncPairs.push({ + key, + value: value2, + alwaysSet: pair.alwaysSet + }); + } + return syncPairs; + }).then((syncPairs) => { + return ParseStatus2.mergeObjectSync(status, syncPairs); + }); + } else { + return ParseStatus2.mergeObjectSync(status, pairs); + } + } + get shape() { + return this._def.shape(); + } + strict(message) { + errorUtil2.errToObj; + return new _ZodObject({ + ...this._def, + unknownKeys: "strict", + ...message !== void 0 ? { + errorMap: (issue3, ctx) => { + const defaultError = this._def.errorMap?.(issue3, ctx).message ?? ctx.defaultError; + if (issue3.code === "unrecognized_keys") + return { + message: errorUtil2.errToObj(message).message ?? defaultError + }; + return { + message: defaultError + }; + } + } : {} + }); + } + strip() { + return new _ZodObject({ + ...this._def, + unknownKeys: "strip" + }); + } + passthrough() { + return new _ZodObject({ + ...this._def, + unknownKeys: "passthrough" + }); + } + // const AugmentFactory = + // (def: Def) => + // ( + // augmentation: Augmentation + // ): ZodObject< + // extendShape, Augmentation>, + // Def["unknownKeys"], + // Def["catchall"] + // > => { + // return new ZodObject({ + // ...def, + // shape: () => ({ + // ...def.shape(), + // ...augmentation, + // }), + // }) as any; + // }; + extend(augmentation) { + return new _ZodObject({ + ...this._def, + shape: () => ({ + ...this._def.shape(), + ...augmentation + }) + }); + } + /** + * Prior to zod@1.0.12 there was a bug in the + * inferred type of merged objects. Please + * upgrade if you are experiencing issues. + */ + merge(merging) { + const merged = new _ZodObject({ + unknownKeys: merging._def.unknownKeys, + catchall: merging._def.catchall, + shape: () => ({ + ...this._def.shape(), + ...merging._def.shape() + }), + typeName: ZodFirstPartyTypeKind2.ZodObject + }); + return merged; + } + // merge< + // Incoming extends AnyZodObject, + // Augmentation extends Incoming["shape"], + // NewOutput extends { + // [k in keyof Augmentation | keyof Output]: k extends keyof Augmentation + // ? Augmentation[k]["_output"] + // : k extends keyof Output + // ? Output[k] + // : never; + // }, + // NewInput extends { + // [k in keyof Augmentation | keyof Input]: k extends keyof Augmentation + // ? Augmentation[k]["_input"] + // : k extends keyof Input + // ? Input[k] + // : never; + // } + // >( + // merging: Incoming + // ): ZodObject< + // extendShape>, + // Incoming["_def"]["unknownKeys"], + // Incoming["_def"]["catchall"], + // NewOutput, + // NewInput + // > { + // const merged: any = new ZodObject({ + // unknownKeys: merging._def.unknownKeys, + // catchall: merging._def.catchall, + // shape: () => + // objectUtil.mergeShapes(this._def.shape(), merging._def.shape()), + // typeName: ZodFirstPartyTypeKind.ZodObject, + // }) as any; + // return merged; + // } + setKey(key, schema2) { + return this.augment({ [key]: schema2 }); + } + // merge( + // merging: Incoming + // ): //ZodObject = (merging) => { + // ZodObject< + // extendShape>, + // Incoming["_def"]["unknownKeys"], + // Incoming["_def"]["catchall"] + // > { + // // const mergedShape = objectUtil.mergeShapes( + // // this._def.shape(), + // // merging._def.shape() + // // ); + // const merged: any = new ZodObject({ + // unknownKeys: merging._def.unknownKeys, + // catchall: merging._def.catchall, + // shape: () => + // objectUtil.mergeShapes(this._def.shape(), merging._def.shape()), + // typeName: ZodFirstPartyTypeKind.ZodObject, + // }) as any; + // return merged; + // } + catchall(index) { + return new _ZodObject({ + ...this._def, + catchall: index + }); + } + pick(mask) { + const shape = {}; + for (const key of util2.objectKeys(mask)) { + if (mask[key] && this.shape[key]) { + shape[key] = this.shape[key]; + } + } + return new _ZodObject({ + ...this._def, + shape: () => shape + }); + } + omit(mask) { + const shape = {}; + for (const key of util2.objectKeys(this.shape)) { + if (!mask[key]) { + shape[key] = this.shape[key]; + } + } + return new _ZodObject({ + ...this._def, + shape: () => shape + }); + } + /** + * @deprecated + */ + deepPartial() { + return deepPartialify2(this); + } + partial(mask) { + const newShape = {}; + for (const key of util2.objectKeys(this.shape)) { + const fieldSchema = this.shape[key]; + if (mask && !mask[key]) { + newShape[key] = fieldSchema; + } else { + newShape[key] = fieldSchema.optional(); + } + } + return new _ZodObject({ + ...this._def, + shape: () => newShape + }); + } + required(mask) { + const newShape = {}; + for (const key of util2.objectKeys(this.shape)) { + if (mask && !mask[key]) { + newShape[key] = this.shape[key]; + } else { + const fieldSchema = this.shape[key]; + let newField = fieldSchema; + while (newField instanceof ZodOptional2) { + newField = newField._def.innerType; + } + newShape[key] = newField; + } + } + return new _ZodObject({ + ...this._def, + shape: () => newShape + }); + } + keyof() { + return createZodEnum2(util2.objectKeys(this.shape)); + } +}; +ZodObject2.create = (shape, params) => { + return new ZodObject2({ + shape: () => shape, + unknownKeys: "strip", + catchall: ZodNever2.create(), + typeName: ZodFirstPartyTypeKind2.ZodObject, + ...processCreateParams3(params) + }); +}; +ZodObject2.strictCreate = (shape, params) => { + return new ZodObject2({ + shape: () => shape, + unknownKeys: "strict", + catchall: ZodNever2.create(), + typeName: ZodFirstPartyTypeKind2.ZodObject, + ...processCreateParams3(params) + }); +}; +ZodObject2.lazycreate = (shape, params) => { + return new ZodObject2({ + shape, + unknownKeys: "strip", + catchall: ZodNever2.create(), + typeName: ZodFirstPartyTypeKind2.ZodObject, + ...processCreateParams3(params) + }); +}; +var ZodUnion2 = class extends ZodType2 { + _parse(input) { + const { ctx } = this._processInputParams(input); + const options = this._def.options; + function handleResults(results) { + for (const result of results) { + if (result.result.status === "valid") { + return result.result; + } + } + for (const result of results) { + if (result.result.status === "dirty") { + ctx.common.issues.push(...result.ctx.common.issues); + return result.result; + } + } + const unionErrors = results.map((result) => new ZodError2(result.ctx.common.issues)); + addIssueToContext2(ctx, { + code: ZodIssueCode2.invalid_union, + unionErrors + }); + return INVALID2; + } + if (ctx.common.async) { + return Promise.all(options.map(async (option) => { + const childCtx = { + ...ctx, + common: { + ...ctx.common, + issues: [] + }, + parent: null + }; + return { + result: await option._parseAsync({ + data: ctx.data, + path: ctx.path, + parent: childCtx + }), + ctx: childCtx + }; + })).then(handleResults); + } else { + let dirty = void 0; + const issues = []; + for (const option of options) { + const childCtx = { + ...ctx, + common: { + ...ctx.common, + issues: [] + }, + parent: null + }; + const result = option._parseSync({ + data: ctx.data, + path: ctx.path, + parent: childCtx + }); + if (result.status === "valid") { + return result; + } else if (result.status === "dirty" && !dirty) { + dirty = { result, ctx: childCtx }; + } + if (childCtx.common.issues.length) { + issues.push(childCtx.common.issues); + } + } + if (dirty) { + ctx.common.issues.push(...dirty.ctx.common.issues); + return dirty.result; + } + const unionErrors = issues.map((issues2) => new ZodError2(issues2)); + addIssueToContext2(ctx, { + code: ZodIssueCode2.invalid_union, + unionErrors + }); + return INVALID2; + } + } + get options() { + return this._def.options; + } +}; +ZodUnion2.create = (types, params) => { + return new ZodUnion2({ + options: types, + typeName: ZodFirstPartyTypeKind2.ZodUnion, + ...processCreateParams3(params) + }); +}; +var getDiscriminator2 = (type2) => { + if (type2 instanceof ZodLazy2) { + return getDiscriminator2(type2.schema); + } else if (type2 instanceof ZodEffects2) { + return getDiscriminator2(type2.innerType()); + } else if (type2 instanceof ZodLiteral2) { + return [type2.value]; + } else if (type2 instanceof ZodEnum2) { + return type2.options; + } else if (type2 instanceof ZodNativeEnum2) { + return util2.objectValues(type2.enum); + } else if (type2 instanceof ZodDefault2) { + return getDiscriminator2(type2._def.innerType); + } else if (type2 instanceof ZodUndefined2) { + return [void 0]; + } else if (type2 instanceof ZodNull2) { + return [null]; + } else if (type2 instanceof ZodOptional2) { + return [void 0, ...getDiscriminator2(type2.unwrap())]; + } else if (type2 instanceof ZodNullable2) { + return [null, ...getDiscriminator2(type2.unwrap())]; + } else if (type2 instanceof ZodBranded2) { + return getDiscriminator2(type2.unwrap()); + } else if (type2 instanceof ZodReadonly2) { + return getDiscriminator2(type2.unwrap()); + } else if (type2 instanceof ZodCatch2) { + return getDiscriminator2(type2._def.innerType); + } else { + return []; + } +}; +var ZodDiscriminatedUnion2 = class _ZodDiscriminatedUnion extends ZodType2 { + _parse(input) { + const { ctx } = this._processInputParams(input); + if (ctx.parsedType !== ZodParsedType2.object) { + addIssueToContext2(ctx, { + code: ZodIssueCode2.invalid_type, + expected: ZodParsedType2.object, + received: ctx.parsedType + }); + return INVALID2; + } + const discriminator = this.discriminator; + const discriminatorValue = ctx.data[discriminator]; + const option = this.optionsMap.get(discriminatorValue); + if (!option) { + addIssueToContext2(ctx, { + code: ZodIssueCode2.invalid_union_discriminator, + options: Array.from(this.optionsMap.keys()), + path: [discriminator] + }); + return INVALID2; + } + if (ctx.common.async) { + return option._parseAsync({ + data: ctx.data, + path: ctx.path, + parent: ctx + }); + } else { + return option._parseSync({ + data: ctx.data, + path: ctx.path, + parent: ctx + }); + } + } + get discriminator() { + return this._def.discriminator; + } + get options() { + return this._def.options; + } + get optionsMap() { + return this._def.optionsMap; + } + /** + * The constructor of the discriminated union schema. Its behaviour is very similar to that of the normal z.union() constructor. + * However, it only allows a union of objects, all of which need to share a discriminator property. This property must + * have a different value for each object in the union. + * @param discriminator the name of the discriminator property + * @param types an array of object schemas + * @param params + */ + static create(discriminator, options, params) { + const optionsMap = /* @__PURE__ */ new Map(); + for (const type2 of options) { + const discriminatorValues = getDiscriminator2(type2.shape[discriminator]); + if (!discriminatorValues.length) { + throw new Error(`A discriminator value for key \`${discriminator}\` could not be extracted from all schema options`); + } + for (const value2 of discriminatorValues) { + if (optionsMap.has(value2)) { + throw new Error(`Discriminator property ${String(discriminator)} has duplicate value ${String(value2)}`); + } + optionsMap.set(value2, type2); + } + } + return new _ZodDiscriminatedUnion({ + typeName: ZodFirstPartyTypeKind2.ZodDiscriminatedUnion, + discriminator, + options, + optionsMap, + ...processCreateParams3(params) + }); + } +}; +function mergeValues2(a, b) { + const aType = getParsedType2(a); + const bType = getParsedType2(b); + if (a === b) { + return { valid: true, data: a }; + } else if (aType === ZodParsedType2.object && bType === ZodParsedType2.object) { + const bKeys = util2.objectKeys(b); + const sharedKeys = util2.objectKeys(a).filter((key) => bKeys.indexOf(key) !== -1); + const newObj = { ...a, ...b }; + for (const key of sharedKeys) { + const sharedValue = mergeValues2(a[key], b[key]); + if (!sharedValue.valid) { + return { valid: false }; + } + newObj[key] = sharedValue.data; + } + return { valid: true, data: newObj }; + } else if (aType === ZodParsedType2.array && bType === ZodParsedType2.array) { + if (a.length !== b.length) { + return { valid: false }; + } + const newArray = []; + for (let index = 0; index < a.length; index++) { + const itemA = a[index]; + const itemB = b[index]; + const sharedValue = mergeValues2(itemA, itemB); + if (!sharedValue.valid) { + return { valid: false }; + } + newArray.push(sharedValue.data); + } + return { valid: true, data: newArray }; + } else if (aType === ZodParsedType2.date && bType === ZodParsedType2.date && +a === +b) { + return { valid: true, data: a }; + } else { + return { valid: false }; + } +} +var ZodIntersection2 = class extends ZodType2 { + _parse(input) { + const { status, ctx } = this._processInputParams(input); + const handleParsed = (parsedLeft, parsedRight) => { + if (isAborted2(parsedLeft) || isAborted2(parsedRight)) { + return INVALID2; + } + const merged = mergeValues2(parsedLeft.value, parsedRight.value); + if (!merged.valid) { + addIssueToContext2(ctx, { + code: ZodIssueCode2.invalid_intersection_types + }); + return INVALID2; + } + if (isDirty2(parsedLeft) || isDirty2(parsedRight)) { + status.dirty(); + } + return { status: status.value, value: merged.data }; + }; + if (ctx.common.async) { + return Promise.all([ + this._def.left._parseAsync({ + data: ctx.data, + path: ctx.path, + parent: ctx + }), + this._def.right._parseAsync({ + data: ctx.data, + path: ctx.path, + parent: ctx + }) + ]).then(([left, right]) => handleParsed(left, right)); + } else { + return handleParsed(this._def.left._parseSync({ + data: ctx.data, + path: ctx.path, + parent: ctx + }), this._def.right._parseSync({ + data: ctx.data, + path: ctx.path, + parent: ctx + })); + } + } +}; +ZodIntersection2.create = (left, right, params) => { + return new ZodIntersection2({ + left, + right, + typeName: ZodFirstPartyTypeKind2.ZodIntersection, + ...processCreateParams3(params) + }); +}; +var ZodTuple2 = class _ZodTuple extends ZodType2 { + _parse(input) { + const { status, ctx } = this._processInputParams(input); + if (ctx.parsedType !== ZodParsedType2.array) { + addIssueToContext2(ctx, { + code: ZodIssueCode2.invalid_type, + expected: ZodParsedType2.array, + received: ctx.parsedType + }); + return INVALID2; + } + if (ctx.data.length < this._def.items.length) { + addIssueToContext2(ctx, { + code: ZodIssueCode2.too_small, + minimum: this._def.items.length, + inclusive: true, + exact: false, + type: "array" + }); + return INVALID2; + } + const rest = this._def.rest; + if (!rest && ctx.data.length > this._def.items.length) { + addIssueToContext2(ctx, { + code: ZodIssueCode2.too_big, + maximum: this._def.items.length, + inclusive: true, + exact: false, + type: "array" + }); + status.dirty(); + } + const items = [...ctx.data].map((item, itemIndex) => { + const schema2 = this._def.items[itemIndex] || this._def.rest; + if (!schema2) + return null; + return schema2._parse(new ParseInputLazyPath2(ctx, item, ctx.path, itemIndex)); + }).filter((x) => !!x); + if (ctx.common.async) { + return Promise.all(items).then((results) => { + return ParseStatus2.mergeArray(status, results); + }); + } else { + return ParseStatus2.mergeArray(status, items); + } + } + get items() { + return this._def.items; + } + rest(rest) { + return new _ZodTuple({ + ...this._def, + rest + }); + } +}; +ZodTuple2.create = (schemas, params) => { + if (!Array.isArray(schemas)) { + throw new Error("You must pass an array of schemas to z.tuple([ ... ])"); + } + return new ZodTuple2({ + items: schemas, + typeName: ZodFirstPartyTypeKind2.ZodTuple, + rest: null, + ...processCreateParams3(params) + }); +}; +var ZodRecord2 = class _ZodRecord extends ZodType2 { + get keySchema() { + return this._def.keyType; + } + get valueSchema() { + return this._def.valueType; + } + _parse(input) { + const { status, ctx } = this._processInputParams(input); + if (ctx.parsedType !== ZodParsedType2.object) { + addIssueToContext2(ctx, { + code: ZodIssueCode2.invalid_type, + expected: ZodParsedType2.object, + received: ctx.parsedType + }); + return INVALID2; + } + const pairs = []; + const keyType = this._def.keyType; + const valueType = this._def.valueType; + for (const key in ctx.data) { + pairs.push({ + key: keyType._parse(new ParseInputLazyPath2(ctx, key, ctx.path, key)), + value: valueType._parse(new ParseInputLazyPath2(ctx, ctx.data[key], ctx.path, key)), + alwaysSet: key in ctx.data + }); + } + if (ctx.common.async) { + return ParseStatus2.mergeObjectAsync(status, pairs); + } else { + return ParseStatus2.mergeObjectSync(status, pairs); + } + } + get element() { + return this._def.valueType; + } + static create(first, second, third) { + if (second instanceof ZodType2) { + return new _ZodRecord({ + keyType: first, + valueType: second, + typeName: ZodFirstPartyTypeKind2.ZodRecord, + ...processCreateParams3(third) + }); + } + return new _ZodRecord({ + keyType: ZodString2.create(), + valueType: first, + typeName: ZodFirstPartyTypeKind2.ZodRecord, + ...processCreateParams3(second) + }); + } +}; +var ZodMap2 = class extends ZodType2 { + get keySchema() { + return this._def.keyType; + } + get valueSchema() { + return this._def.valueType; + } + _parse(input) { + const { status, ctx } = this._processInputParams(input); + if (ctx.parsedType !== ZodParsedType2.map) { + addIssueToContext2(ctx, { + code: ZodIssueCode2.invalid_type, + expected: ZodParsedType2.map, + received: ctx.parsedType + }); + return INVALID2; + } + const keyType = this._def.keyType; + const valueType = this._def.valueType; + const pairs = [...ctx.data.entries()].map(([key, value2], index) => { + return { + key: keyType._parse(new ParseInputLazyPath2(ctx, key, ctx.path, [index, "key"])), + value: valueType._parse(new ParseInputLazyPath2(ctx, value2, ctx.path, [index, "value"])) + }; + }); + if (ctx.common.async) { + const finalMap = /* @__PURE__ */ new Map(); + return Promise.resolve().then(async () => { + for (const pair of pairs) { + const key = await pair.key; + const value2 = await pair.value; + if (key.status === "aborted" || value2.status === "aborted") { + return INVALID2; + } + if (key.status === "dirty" || value2.status === "dirty") { + status.dirty(); + } + finalMap.set(key.value, value2.value); + } + return { status: status.value, value: finalMap }; + }); + } else { + const finalMap = /* @__PURE__ */ new Map(); + for (const pair of pairs) { + const key = pair.key; + const value2 = pair.value; + if (key.status === "aborted" || value2.status === "aborted") { + return INVALID2; + } + if (key.status === "dirty" || value2.status === "dirty") { + status.dirty(); + } + finalMap.set(key.value, value2.value); + } + return { status: status.value, value: finalMap }; + } + } +}; +ZodMap2.create = (keyType, valueType, params) => { + return new ZodMap2({ + valueType, + keyType, + typeName: ZodFirstPartyTypeKind2.ZodMap, + ...processCreateParams3(params) + }); +}; +var ZodSet2 = class _ZodSet extends ZodType2 { + _parse(input) { + const { status, ctx } = this._processInputParams(input); + if (ctx.parsedType !== ZodParsedType2.set) { + addIssueToContext2(ctx, { + code: ZodIssueCode2.invalid_type, + expected: ZodParsedType2.set, + received: ctx.parsedType + }); + return INVALID2; + } + const def = this._def; + if (def.minSize !== null) { + if (ctx.data.size < def.minSize.value) { + addIssueToContext2(ctx, { + code: ZodIssueCode2.too_small, + minimum: def.minSize.value, + type: "set", + inclusive: true, + exact: false, + message: def.minSize.message + }); + status.dirty(); + } + } + if (def.maxSize !== null) { + if (ctx.data.size > def.maxSize.value) { + addIssueToContext2(ctx, { + code: ZodIssueCode2.too_big, + maximum: def.maxSize.value, + type: "set", + inclusive: true, + exact: false, + message: def.maxSize.message + }); + status.dirty(); + } + } + const valueType = this._def.valueType; + function finalizeSet(elements2) { + const parsedSet = /* @__PURE__ */ new Set(); + for (const element of elements2) { + if (element.status === "aborted") + return INVALID2; + if (element.status === "dirty") + status.dirty(); + parsedSet.add(element.value); + } + return { status: status.value, value: parsedSet }; + } + const elements = [...ctx.data.values()].map((item, i) => valueType._parse(new ParseInputLazyPath2(ctx, item, ctx.path, i))); + if (ctx.common.async) { + return Promise.all(elements).then((elements2) => finalizeSet(elements2)); + } else { + return finalizeSet(elements); + } + } + min(minSize, message) { + return new _ZodSet({ + ...this._def, + minSize: { value: minSize, message: errorUtil2.toString(message) } + }); + } + max(maxSize, message) { + return new _ZodSet({ + ...this._def, + maxSize: { value: maxSize, message: errorUtil2.toString(message) } + }); + } + size(size, message) { + return this.min(size, message).max(size, message); + } + nonempty(message) { + return this.min(1, message); + } +}; +ZodSet2.create = (valueType, params) => { + return new ZodSet2({ + valueType, + minSize: null, + maxSize: null, + typeName: ZodFirstPartyTypeKind2.ZodSet, + ...processCreateParams3(params) + }); +}; +var ZodFunction2 = class _ZodFunction extends ZodType2 { + constructor() { + super(...arguments); + this.validate = this.implement; + } + _parse(input) { + const { ctx } = this._processInputParams(input); + if (ctx.parsedType !== ZodParsedType2.function) { + addIssueToContext2(ctx, { + code: ZodIssueCode2.invalid_type, + expected: ZodParsedType2.function, + received: ctx.parsedType + }); + return INVALID2; + } + function makeArgsIssue(args3, error42) { + return makeIssue2({ + data: args3, + path: ctx.path, + errorMaps: [ctx.common.contextualErrorMap, ctx.schemaErrorMap, getErrorMap2(), en_default2].filter((x) => !!x), + issueData: { + code: ZodIssueCode2.invalid_arguments, + argumentsError: error42 + } + }); + } + function makeReturnsIssue(returns, error42) { + return makeIssue2({ + data: returns, + path: ctx.path, + errorMaps: [ctx.common.contextualErrorMap, ctx.schemaErrorMap, getErrorMap2(), en_default2].filter((x) => !!x), + issueData: { + code: ZodIssueCode2.invalid_return_type, + returnTypeError: error42 + } + }); + } + const params = { errorMap: ctx.common.contextualErrorMap }; + const fn2 = ctx.data; + if (this._def.returns instanceof ZodPromise2) { + const me = this; + return OK2(async function(...args3) { + const error42 = new ZodError2([]); + const parsedArgs = await me._def.args.parseAsync(args3, params).catch((e) => { + error42.addIssue(makeArgsIssue(args3, e)); + throw error42; + }); + const result = await Reflect.apply(fn2, this, parsedArgs); + const parsedReturns = await me._def.returns._def.type.parseAsync(result, params).catch((e) => { + error42.addIssue(makeReturnsIssue(result, e)); + throw error42; + }); + return parsedReturns; + }); + } else { + const me = this; + return OK2(function(...args3) { + const parsedArgs = me._def.args.safeParse(args3, params); + if (!parsedArgs.success) { + throw new ZodError2([makeArgsIssue(args3, parsedArgs.error)]); + } + const result = Reflect.apply(fn2, this, parsedArgs.data); + const parsedReturns = me._def.returns.safeParse(result, params); + if (!parsedReturns.success) { + throw new ZodError2([makeReturnsIssue(result, parsedReturns.error)]); + } + return parsedReturns.data; + }); + } + } + parameters() { + return this._def.args; + } + returnType() { + return this._def.returns; + } + args(...items) { + return new _ZodFunction({ + ...this._def, + args: ZodTuple2.create(items).rest(ZodUnknown2.create()) + }); + } + returns(returnType) { + return new _ZodFunction({ + ...this._def, + returns: returnType + }); + } + implement(func) { + const validatedFunc = this.parse(func); + return validatedFunc; + } + strictImplement(func) { + const validatedFunc = this.parse(func); + return validatedFunc; + } + static create(args3, returns, params) { + return new _ZodFunction({ + args: args3 ? args3 : ZodTuple2.create([]).rest(ZodUnknown2.create()), + returns: returns || ZodUnknown2.create(), + typeName: ZodFirstPartyTypeKind2.ZodFunction, + ...processCreateParams3(params) + }); + } +}; +var ZodLazy2 = class extends ZodType2 { + get schema() { + return this._def.getter(); + } + _parse(input) { + const { ctx } = this._processInputParams(input); + const lazySchema = this._def.getter(); + return lazySchema._parse({ data: ctx.data, path: ctx.path, parent: ctx }); + } +}; +ZodLazy2.create = (getter, params) => { + return new ZodLazy2({ + getter, + typeName: ZodFirstPartyTypeKind2.ZodLazy, + ...processCreateParams3(params) + }); +}; +var ZodLiteral2 = class extends ZodType2 { + _parse(input) { + if (input.data !== this._def.value) { + const ctx = this._getOrReturnCtx(input); + addIssueToContext2(ctx, { + received: ctx.data, + code: ZodIssueCode2.invalid_literal, + expected: this._def.value + }); + return INVALID2; + } + return { status: "valid", value: input.data }; + } + get value() { + return this._def.value; + } +}; +ZodLiteral2.create = (value2, params) => { + return new ZodLiteral2({ + value: value2, + typeName: ZodFirstPartyTypeKind2.ZodLiteral, + ...processCreateParams3(params) + }); +}; +function createZodEnum2(values, params) { + return new ZodEnum2({ + values, + typeName: ZodFirstPartyTypeKind2.ZodEnum, + ...processCreateParams3(params) + }); +} +var ZodEnum2 = class _ZodEnum extends ZodType2 { + _parse(input) { + if (typeof input.data !== "string") { + const ctx = this._getOrReturnCtx(input); + const expectedValues = this._def.values; + addIssueToContext2(ctx, { + expected: util2.joinValues(expectedValues), + received: ctx.parsedType, + code: ZodIssueCode2.invalid_type + }); + return INVALID2; + } + if (!this._cache) { + this._cache = new Set(this._def.values); + } + if (!this._cache.has(input.data)) { + const ctx = this._getOrReturnCtx(input); + const expectedValues = this._def.values; + addIssueToContext2(ctx, { + received: ctx.data, + code: ZodIssueCode2.invalid_enum_value, + options: expectedValues + }); + return INVALID2; + } + return OK2(input.data); + } + get options() { + return this._def.values; + } + get enum() { + const enumValues2 = {}; + for (const val of this._def.values) { + enumValues2[val] = val; + } + return enumValues2; + } + get Values() { + const enumValues2 = {}; + for (const val of this._def.values) { + enumValues2[val] = val; + } + return enumValues2; + } + get Enum() { + const enumValues2 = {}; + for (const val of this._def.values) { + enumValues2[val] = val; + } + return enumValues2; + } + extract(values, newDef = this._def) { + return _ZodEnum.create(values, { + ...this._def, + ...newDef + }); + } + exclude(values, newDef = this._def) { + return _ZodEnum.create(this.options.filter((opt) => !values.includes(opt)), { + ...this._def, + ...newDef + }); + } +}; +ZodEnum2.create = createZodEnum2; +var ZodNativeEnum2 = class extends ZodType2 { + _parse(input) { + const nativeEnumValues = util2.getValidEnumValues(this._def.values); + const ctx = this._getOrReturnCtx(input); + if (ctx.parsedType !== ZodParsedType2.string && ctx.parsedType !== ZodParsedType2.number) { + const expectedValues = util2.objectValues(nativeEnumValues); + addIssueToContext2(ctx, { + expected: util2.joinValues(expectedValues), + received: ctx.parsedType, + code: ZodIssueCode2.invalid_type + }); + return INVALID2; + } + if (!this._cache) { + this._cache = new Set(util2.getValidEnumValues(this._def.values)); + } + if (!this._cache.has(input.data)) { + const expectedValues = util2.objectValues(nativeEnumValues); + addIssueToContext2(ctx, { + received: ctx.data, + code: ZodIssueCode2.invalid_enum_value, + options: expectedValues + }); + return INVALID2; + } + return OK2(input.data); + } + get enum() { + return this._def.values; + } +}; +ZodNativeEnum2.create = (values, params) => { + return new ZodNativeEnum2({ + values, + typeName: ZodFirstPartyTypeKind2.ZodNativeEnum, + ...processCreateParams3(params) + }); +}; +var ZodPromise2 = class extends ZodType2 { + unwrap() { + return this._def.type; + } + _parse(input) { + const { ctx } = this._processInputParams(input); + if (ctx.parsedType !== ZodParsedType2.promise && ctx.common.async === false) { + addIssueToContext2(ctx, { + code: ZodIssueCode2.invalid_type, + expected: ZodParsedType2.promise, + received: ctx.parsedType + }); + return INVALID2; + } + const promisified = ctx.parsedType === ZodParsedType2.promise ? ctx.data : Promise.resolve(ctx.data); + return OK2(promisified.then((data) => { + return this._def.type.parseAsync(data, { + path: ctx.path, + errorMap: ctx.common.contextualErrorMap + }); + })); + } +}; +ZodPromise2.create = (schema2, params) => { + return new ZodPromise2({ + type: schema2, + typeName: ZodFirstPartyTypeKind2.ZodPromise, + ...processCreateParams3(params) + }); +}; +var ZodEffects2 = class extends ZodType2 { + innerType() { + return this._def.schema; + } + sourceType() { + return this._def.schema._def.typeName === ZodFirstPartyTypeKind2.ZodEffects ? this._def.schema.sourceType() : this._def.schema; + } + _parse(input) { + const { status, ctx } = this._processInputParams(input); + const effect = this._def.effect || null; + const checkCtx = { + addIssue: (arg) => { + addIssueToContext2(ctx, arg); + if (arg.fatal) { + status.abort(); + } else { + status.dirty(); + } + }, + get path() { + return ctx.path; + } + }; + checkCtx.addIssue = checkCtx.addIssue.bind(checkCtx); + if (effect.type === "preprocess") { + const processed = effect.transform(ctx.data, checkCtx); + if (ctx.common.async) { + return Promise.resolve(processed).then(async (processed2) => { + if (status.value === "aborted") + return INVALID2; + const result = await this._def.schema._parseAsync({ + data: processed2, + path: ctx.path, + parent: ctx + }); + if (result.status === "aborted") + return INVALID2; + if (result.status === "dirty") + return DIRTY2(result.value); + if (status.value === "dirty") + return DIRTY2(result.value); + return result; + }); + } else { + if (status.value === "aborted") + return INVALID2; + const result = this._def.schema._parseSync({ + data: processed, + path: ctx.path, + parent: ctx + }); + if (result.status === "aborted") + return INVALID2; + if (result.status === "dirty") + return DIRTY2(result.value); + if (status.value === "dirty") + return DIRTY2(result.value); + return result; + } + } + if (effect.type === "refinement") { + const executeRefinement = (acc) => { + const result = effect.refinement(acc, checkCtx); + if (ctx.common.async) { + return Promise.resolve(result); + } + if (result instanceof Promise) { + throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead."); + } + return acc; + }; + if (ctx.common.async === false) { + const inner = this._def.schema._parseSync({ + data: ctx.data, + path: ctx.path, + parent: ctx + }); + if (inner.status === "aborted") + return INVALID2; + if (inner.status === "dirty") + status.dirty(); + executeRefinement(inner.value); + return { status: status.value, value: inner.value }; + } else { + return this._def.schema._parseAsync({ data: ctx.data, path: ctx.path, parent: ctx }).then((inner) => { + if (inner.status === "aborted") + return INVALID2; + if (inner.status === "dirty") + status.dirty(); + return executeRefinement(inner.value).then(() => { + return { status: status.value, value: inner.value }; + }); + }); + } + } + if (effect.type === "transform") { + if (ctx.common.async === false) { + const base = this._def.schema._parseSync({ + data: ctx.data, + path: ctx.path, + parent: ctx + }); + if (!isValid2(base)) + return INVALID2; + const result = effect.transform(base.value, checkCtx); + if (result instanceof Promise) { + throw new Error(`Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.`); + } + return { status: status.value, value: result }; + } else { + return this._def.schema._parseAsync({ data: ctx.data, path: ctx.path, parent: ctx }).then((base) => { + if (!isValid2(base)) + return INVALID2; + return Promise.resolve(effect.transform(base.value, checkCtx)).then((result) => ({ + status: status.value, + value: result + })); + }); + } + } + util2.assertNever(effect); + } +}; +ZodEffects2.create = (schema2, effect, params) => { + return new ZodEffects2({ + schema: schema2, + typeName: ZodFirstPartyTypeKind2.ZodEffects, + effect, + ...processCreateParams3(params) + }); +}; +ZodEffects2.createWithPreprocess = (preprocess, schema2, params) => { + return new ZodEffects2({ + schema: schema2, + effect: { type: "preprocess", transform: preprocess }, + typeName: ZodFirstPartyTypeKind2.ZodEffects, + ...processCreateParams3(params) + }); +}; +var ZodOptional2 = class extends ZodType2 { + _parse(input) { + const parsedType5 = this._getType(input); + if (parsedType5 === ZodParsedType2.undefined) { + return OK2(void 0); + } + return this._def.innerType._parse(input); + } + unwrap() { + return this._def.innerType; + } +}; +ZodOptional2.create = (type2, params) => { + return new ZodOptional2({ + innerType: type2, + typeName: ZodFirstPartyTypeKind2.ZodOptional, + ...processCreateParams3(params) + }); +}; +var ZodNullable2 = class extends ZodType2 { + _parse(input) { + const parsedType5 = this._getType(input); + if (parsedType5 === ZodParsedType2.null) { + return OK2(null); + } + return this._def.innerType._parse(input); + } + unwrap() { + return this._def.innerType; + } +}; +ZodNullable2.create = (type2, params) => { + return new ZodNullable2({ + innerType: type2, + typeName: ZodFirstPartyTypeKind2.ZodNullable, + ...processCreateParams3(params) + }); +}; +var ZodDefault2 = class extends ZodType2 { + _parse(input) { + const { ctx } = this._processInputParams(input); + let data = ctx.data; + if (ctx.parsedType === ZodParsedType2.undefined) { + data = this._def.defaultValue(); + } + return this._def.innerType._parse({ + data, + path: ctx.path, + parent: ctx + }); + } + removeDefault() { + return this._def.innerType; + } +}; +ZodDefault2.create = (type2, params) => { + return new ZodDefault2({ + innerType: type2, + typeName: ZodFirstPartyTypeKind2.ZodDefault, + defaultValue: typeof params.default === "function" ? params.default : () => params.default, + ...processCreateParams3(params) + }); +}; +var ZodCatch2 = class extends ZodType2 { + _parse(input) { + const { ctx } = this._processInputParams(input); + const newCtx = { + ...ctx, + common: { + ...ctx.common, + issues: [] + } + }; + const result = this._def.innerType._parse({ + data: newCtx.data, + path: newCtx.path, + parent: { + ...newCtx + } + }); + if (isAsync2(result)) { + return result.then((result2) => { + return { + status: "valid", + value: result2.status === "valid" ? result2.value : this._def.catchValue({ + get error() { + return new ZodError2(newCtx.common.issues); + }, + input: newCtx.data + }) + }; + }); + } else { + return { + status: "valid", + value: result.status === "valid" ? result.value : this._def.catchValue({ + get error() { + return new ZodError2(newCtx.common.issues); + }, + input: newCtx.data + }) + }; + } + } + removeCatch() { + return this._def.innerType; + } +}; +ZodCatch2.create = (type2, params) => { + return new ZodCatch2({ + innerType: type2, + typeName: ZodFirstPartyTypeKind2.ZodCatch, + catchValue: typeof params.catch === "function" ? params.catch : () => params.catch, + ...processCreateParams3(params) + }); +}; +var ZodNaN2 = class extends ZodType2 { + _parse(input) { + const parsedType5 = this._getType(input); + if (parsedType5 !== ZodParsedType2.nan) { + const ctx = this._getOrReturnCtx(input); + addIssueToContext2(ctx, { + code: ZodIssueCode2.invalid_type, + expected: ZodParsedType2.nan, + received: ctx.parsedType + }); + return INVALID2; + } + return { status: "valid", value: input.data }; + } +}; +ZodNaN2.create = (params) => { + return new ZodNaN2({ + typeName: ZodFirstPartyTypeKind2.ZodNaN, + ...processCreateParams3(params) + }); +}; +var BRAND2 = Symbol("zod_brand"); +var ZodBranded2 = class extends ZodType2 { + _parse(input) { + const { ctx } = this._processInputParams(input); + const data = ctx.data; + return this._def.type._parse({ + data, + path: ctx.path, + parent: ctx + }); + } + unwrap() { + return this._def.type; + } +}; +var ZodPipeline2 = class _ZodPipeline extends ZodType2 { + _parse(input) { + const { status, ctx } = this._processInputParams(input); + if (ctx.common.async) { + const handleAsync = async () => { + const inResult = await this._def.in._parseAsync({ + data: ctx.data, + path: ctx.path, + parent: ctx + }); + if (inResult.status === "aborted") + return INVALID2; + if (inResult.status === "dirty") { + status.dirty(); + return DIRTY2(inResult.value); + } else { + return this._def.out._parseAsync({ + data: inResult.value, + path: ctx.path, + parent: ctx + }); + } + }; + return handleAsync(); + } else { + const inResult = this._def.in._parseSync({ + data: ctx.data, + path: ctx.path, + parent: ctx + }); + if (inResult.status === "aborted") + return INVALID2; + if (inResult.status === "dirty") { + status.dirty(); + return { + status: "dirty", + value: inResult.value + }; + } else { + return this._def.out._parseSync({ + data: inResult.value, + path: ctx.path, + parent: ctx + }); + } + } + } + static create(a, b) { + return new _ZodPipeline({ + in: a, + out: b, + typeName: ZodFirstPartyTypeKind2.ZodPipeline + }); + } +}; +var ZodReadonly2 = class extends ZodType2 { + _parse(input) { + const result = this._def.innerType._parse(input); + const freeze = (data) => { + if (isValid2(data)) { + data.value = Object.freeze(data.value); + } + return data; + }; + return isAsync2(result) ? result.then((data) => freeze(data)) : freeze(result); + } + unwrap() { + return this._def.innerType; + } +}; +ZodReadonly2.create = (type2, params) => { + return new ZodReadonly2({ + innerType: type2, + typeName: ZodFirstPartyTypeKind2.ZodReadonly, + ...processCreateParams3(params) + }); +}; +function cleanParams2(params, data) { + const p = typeof params === "function" ? params(data) : typeof params === "string" ? { message: params } : params; + const p2 = typeof p === "string" ? { message: p } : p; + return p2; +} +function custom2(check, _params = {}, fatal) { + if (check) + return ZodAny2.create().superRefine((data, ctx) => { + const r = check(data); + if (r instanceof Promise) { + return r.then((r2) => { + if (!r2) { + const params = cleanParams2(_params, data); + const _fatal = params.fatal ?? fatal ?? true; + ctx.addIssue({ code: "custom", ...params, fatal: _fatal }); + } + }); + } + if (!r) { + const params = cleanParams2(_params, data); + const _fatal = params.fatal ?? fatal ?? true; + ctx.addIssue({ code: "custom", ...params, fatal: _fatal }); + } + return; + }); + return ZodAny2.create(); +} +var late2 = { + object: ZodObject2.lazycreate +}; +var ZodFirstPartyTypeKind2; +(function(ZodFirstPartyTypeKind5) { + ZodFirstPartyTypeKind5["ZodString"] = "ZodString"; + ZodFirstPartyTypeKind5["ZodNumber"] = "ZodNumber"; + ZodFirstPartyTypeKind5["ZodNaN"] = "ZodNaN"; + ZodFirstPartyTypeKind5["ZodBigInt"] = "ZodBigInt"; + ZodFirstPartyTypeKind5["ZodBoolean"] = "ZodBoolean"; + ZodFirstPartyTypeKind5["ZodDate"] = "ZodDate"; + ZodFirstPartyTypeKind5["ZodSymbol"] = "ZodSymbol"; + ZodFirstPartyTypeKind5["ZodUndefined"] = "ZodUndefined"; + ZodFirstPartyTypeKind5["ZodNull"] = "ZodNull"; + ZodFirstPartyTypeKind5["ZodAny"] = "ZodAny"; + ZodFirstPartyTypeKind5["ZodUnknown"] = "ZodUnknown"; + ZodFirstPartyTypeKind5["ZodNever"] = "ZodNever"; + ZodFirstPartyTypeKind5["ZodVoid"] = "ZodVoid"; + ZodFirstPartyTypeKind5["ZodArray"] = "ZodArray"; + ZodFirstPartyTypeKind5["ZodObject"] = "ZodObject"; + ZodFirstPartyTypeKind5["ZodUnion"] = "ZodUnion"; + ZodFirstPartyTypeKind5["ZodDiscriminatedUnion"] = "ZodDiscriminatedUnion"; + ZodFirstPartyTypeKind5["ZodIntersection"] = "ZodIntersection"; + ZodFirstPartyTypeKind5["ZodTuple"] = "ZodTuple"; + ZodFirstPartyTypeKind5["ZodRecord"] = "ZodRecord"; + ZodFirstPartyTypeKind5["ZodMap"] = "ZodMap"; + ZodFirstPartyTypeKind5["ZodSet"] = "ZodSet"; + ZodFirstPartyTypeKind5["ZodFunction"] = "ZodFunction"; + ZodFirstPartyTypeKind5["ZodLazy"] = "ZodLazy"; + ZodFirstPartyTypeKind5["ZodLiteral"] = "ZodLiteral"; + ZodFirstPartyTypeKind5["ZodEnum"] = "ZodEnum"; + ZodFirstPartyTypeKind5["ZodEffects"] = "ZodEffects"; + ZodFirstPartyTypeKind5["ZodNativeEnum"] = "ZodNativeEnum"; + ZodFirstPartyTypeKind5["ZodOptional"] = "ZodOptional"; + ZodFirstPartyTypeKind5["ZodNullable"] = "ZodNullable"; + ZodFirstPartyTypeKind5["ZodDefault"] = "ZodDefault"; + ZodFirstPartyTypeKind5["ZodCatch"] = "ZodCatch"; + ZodFirstPartyTypeKind5["ZodPromise"] = "ZodPromise"; + ZodFirstPartyTypeKind5["ZodBranded"] = "ZodBranded"; + ZodFirstPartyTypeKind5["ZodPipeline"] = "ZodPipeline"; + ZodFirstPartyTypeKind5["ZodReadonly"] = "ZodReadonly"; +})(ZodFirstPartyTypeKind2 || (ZodFirstPartyTypeKind2 = {})); +var instanceOfType2 = (cls, params = { + message: `Input not instance of ${cls.name}` +}) => custom2((data) => data instanceof cls, params); +var stringType2 = ZodString2.create; +var numberType2 = ZodNumber2.create; +var nanType2 = ZodNaN2.create; +var bigIntType2 = ZodBigInt2.create; +var booleanType2 = ZodBoolean2.create; +var dateType2 = ZodDate2.create; +var symbolType2 = ZodSymbol2.create; +var undefinedType2 = ZodUndefined2.create; +var nullType2 = ZodNull2.create; +var anyType2 = ZodAny2.create; +var unknownType2 = ZodUnknown2.create; +var neverType2 = ZodNever2.create; +var voidType2 = ZodVoid2.create; +var arrayType2 = ZodArray2.create; +var objectType2 = ZodObject2.create; +var strictObjectType2 = ZodObject2.strictCreate; +var unionType2 = ZodUnion2.create; +var discriminatedUnionType2 = ZodDiscriminatedUnion2.create; +var intersectionType2 = ZodIntersection2.create; +var tupleType2 = ZodTuple2.create; +var recordType2 = ZodRecord2.create; +var mapType2 = ZodMap2.create; +var setType2 = ZodSet2.create; +var functionType2 = ZodFunction2.create; +var lazyType2 = ZodLazy2.create; +var literalType2 = ZodLiteral2.create; +var enumType2 = ZodEnum2.create; +var nativeEnumType2 = ZodNativeEnum2.create; +var promiseType2 = ZodPromise2.create; +var effectsType2 = ZodEffects2.create; +var optionalType2 = ZodOptional2.create; +var nullableType2 = ZodNullable2.create; +var preprocessType2 = ZodEffects2.createWithPreprocess; +var pipelineType2 = ZodPipeline2.create; +var ostring2 = () => stringType2().optional(); +var onumber2 = () => numberType2().optional(); +var oboolean2 = () => booleanType2().optional(); +var coerce2 = { + string: ((arg) => ZodString2.create({ ...arg, coerce: true })), + number: ((arg) => ZodNumber2.create({ ...arg, coerce: true })), + boolean: ((arg) => ZodBoolean2.create({ + ...arg, + coerce: true + })), + bigint: ((arg) => ZodBigInt2.create({ ...arg, coerce: true })), + date: ((arg) => ZodDate2.create({ ...arg, coerce: true })) +}; +var NEVER2 = INVALID2; + // ../node_modules/.pnpm/@modelcontextprotocol+sdk@1.20.0/node_modules/@modelcontextprotocol/sdk/dist/esm/types.js -init_zod(); var LATEST_PROTOCOL_VERSION = "2025-06-18"; var SUPPORTED_PROTOCOL_VERSIONS = [LATEST_PROTOCOL_VERSION, "2025-03-26", "2024-11-05", "2024-10-07"]; var JSONRPC_VERSION2 = "2.0"; @@ -99754,9 +100594,9 @@ var Protocol = class { this._onclose(); }; const _onerror = (_b = this.transport) === null || _b === void 0 ? void 0 : _b.onerror; - this._transport.onerror = (error41) => { - _onerror === null || _onerror === void 0 ? void 0 : _onerror(error41); - this._onerror(error41); + this._transport.onerror = (error42) => { + _onerror === null || _onerror === void 0 ? void 0 : _onerror(error42); + this._onerror(error42); }; const _onmessage = (_c = this._transport) === null || _c === void 0 ? void 0 : _c.onmessage; this._transport.onmessage = (message, extra) => { @@ -99781,14 +100621,14 @@ var Protocol = class { this._pendingDebouncedNotifications.clear(); this._transport = void 0; (_a = this.onclose) === null || _a === void 0 ? void 0 : _a.call(this); - const error41 = new McpError(ErrorCode2.ConnectionClosed, "Connection closed"); + const error42 = new McpError(ErrorCode2.ConnectionClosed, "Connection closed"); for (const handler2 of responseHandlers.values()) { - handler2(error41); + handler2(error42); } } - _onerror(error41) { + _onerror(error42) { var _a; - (_a = this.onerror) === null || _a === void 0 ? void 0 : _a.call(this, error41); + (_a = this.onerror) === null || _a === void 0 ? void 0 : _a.call(this, error42); } _onnotification(notification) { var _a; @@ -99796,7 +100636,7 @@ var Protocol = class { if (handler2 === void 0) { return; } - Promise.resolve().then(() => handler2(notification)).catch((error41) => this._onerror(new Error(`Uncaught error in notification handler: ${error41}`))); + Promise.resolve().then(() => handler2(notification)).catch((error42) => this._onerror(new Error(`Uncaught error in notification handler: ${error42}`))); } _onrequest(request2, extra) { var _a, _b; @@ -99810,7 +100650,7 @@ var Protocol = class { code: ErrorCode2.MethodNotFound, message: "Method not found" } - }).catch((error41) => this._onerror(new Error(`Failed to send an error response: ${error41}`))); + }).catch((error42) => this._onerror(new Error(`Failed to send an error response: ${error42}`))); return; } const abortController = new AbortController(); @@ -99834,7 +100674,7 @@ var Protocol = class { jsonrpc: "2.0", id: request2.id }); - }, (error41) => { + }, (error42) => { var _a2; if (abortController.signal.aborted) { return; @@ -99843,11 +100683,11 @@ var Protocol = class { jsonrpc: "2.0", id: request2.id, error: { - code: Number.isSafeInteger(error41["code"]) ? error41["code"] : ErrorCode2.InternalError, - message: (_a2 = error41.message) !== null && _a2 !== void 0 ? _a2 : "Internal error" + code: Number.isSafeInteger(error42["code"]) ? error42["code"] : ErrorCode2.InternalError, + message: (_a2 = error42.message) !== null && _a2 !== void 0 ? _a2 : "Internal error" } }); - }).catch((error41) => this._onerror(new Error(`Failed to send response: ${error41}`))).finally(() => { + }).catch((error42) => this._onerror(new Error(`Failed to send response: ${error42}`))).finally(() => { this._requestHandlerAbortControllers.delete(request2.id); }); } @@ -99864,8 +100704,8 @@ var Protocol = class { if (timeoutInfo && responseHandler && timeoutInfo.resetTimeoutOnProgress) { try { this._resetTimeout(messageId); - } catch (error41) { - responseHandler(error41); + } catch (error42) { + responseHandler(error42); return; } } @@ -99884,8 +100724,8 @@ var Protocol = class { if (isJSONRPCResponse(response)) { handler2(response); } else { - const error41 = new McpError(response.error.code, response.error.message, response.error.data); - handler2(error41); + const error42 = new McpError(response.error.code, response.error.message, response.error.data); + handler2(error42); } } get transport() { @@ -99943,7 +100783,7 @@ var Protocol = class { requestId: messageId, reason: String(reason) } - }, { relatedRequestId, resumptionToken, onresumptiontoken }).catch((error41) => this._onerror(new Error(`Failed to send cancellation: ${error41}`))); + }, { relatedRequestId, resumptionToken, onresumptiontoken }).catch((error42) => this._onerror(new Error(`Failed to send cancellation: ${error42}`))); reject(reason); }; this._responseHandlers.set(messageId, (response) => { @@ -99957,8 +100797,8 @@ var Protocol = class { try { const result = resultSchema.parse(response.result); resolve2(result); - } catch (error41) { - reject(error41); + } catch (error42) { + reject(error42); } }); (_d = options === null || options === void 0 ? void 0 : options.signal) === null || _d === void 0 ? void 0 : _d.addEventListener("abort", () => { @@ -99968,9 +100808,9 @@ var Protocol = class { const timeout = (_e = options === null || options === void 0 ? void 0 : options.timeout) !== null && _e !== void 0 ? _e : DEFAULT_REQUEST_TIMEOUT_MSEC; const timeoutHandler = () => cancel(new McpError(ErrorCode2.RequestTimeout, "Request timed out", { timeout })); this._setupTimeout(messageId, timeout, options === null || options === void 0 ? void 0 : options.maxTotalTimeout, timeoutHandler, (_f = options === null || options === void 0 ? void 0 : options.resetTimeoutOnProgress) !== null && _f !== void 0 ? _f : false); - this._transport.send(jsonrpcRequest, { relatedRequestId, resumptionToken, onresumptiontoken }).catch((error41) => { + this._transport.send(jsonrpcRequest, { relatedRequestId, resumptionToken, onresumptiontoken }).catch((error42) => { this._cleanupTimeout(messageId); - reject(error41); + reject(error42); }); }); } @@ -100000,7 +100840,7 @@ var Protocol = class { ...notification, jsonrpc: "2.0" }; - (_a2 = this._transport) === null || _a2 === void 0 ? void 0 : _a2.send(jsonrpcNotification2, options).catch((error41) => this._onerror(error41)); + (_a2 = this._transport) === null || _a2 === void 0 ? void 0 : _a2.send(jsonrpcNotification2, options).catch((error42) => this._onerror(error42)); }); return; } @@ -100239,11 +101079,11 @@ var Server = class extends Protocol { if (!isValid4) { throw new McpError(ErrorCode2.InvalidParams, `Elicitation response content does not match requested schema: ${ajv.errorsText(validate2.errors)}`); } - } catch (error41) { - if (error41 instanceof McpError) { - throw error41; + } catch (error42) { + if (error42 instanceof McpError) { + throw error42; } - throw new McpError(ErrorCode2.InternalError, `Error validating elicitation response: ${error41}`); + throw new McpError(ErrorCode2.InternalError, `Error validating elicitation response: ${error42}`); } } return result; @@ -100326,9 +101166,9 @@ var StdioServerTransport = class { this._readBuffer.append(chunk); this.processReadBuffer(); }; - this._onerror = (error41) => { + this._onerror = (error42) => { var _a; - (_a = this.onerror) === null || _a === void 0 ? void 0 : _a.call(this, error41); + (_a = this.onerror) === null || _a === void 0 ? void 0 : _a.call(this, error42); }; } /** @@ -100351,8 +101191,8 @@ var StdioServerTransport = class { break; } (_a = this.onmessage) === null || _a === void 0 ? void 0 : _a.call(this, message); - } catch (error41) { - (_b = this.onerror) === null || _b === void 0 ? void 0 : _b.call(this, error41); + } catch (error42) { + (_b = this.onerror) === null || _b === void 0 ? void 0 : _b.call(this, error42); } } } @@ -101731,8 +102571,8 @@ var __toESM3 = (mod, isNodeMode, target) => (target = mod != null ? __create3(__ }) : target, mod)); var __require2 = /* @__PURE__ */ createRequire(import.meta.url); var AuthenticationMiddleware = class { - constructor(config2 = {}) { - this.config = config2; + constructor(config3 = {}) { + this.config = config3; } getUnauthorizedResponse() { const headers = { "Content-Type": "application/json" }; @@ -101840,10 +102680,10 @@ var util$6; for (const item of arr) if (checker(item)) return item; }; util$7.isInteger = typeof Number.isInteger === "function" ? (val) => Number.isInteger(val) : (val) => typeof val === "number" && Number.isFinite(val) && Math.floor(val) === val; - function joinValues2(array, separator2 = " | ") { + function joinValues3(array, separator2 = " | ") { return array.map((val) => typeof val === "string" ? `'${val}'` : val).join(separator2); } - util$7.joinValues = joinValues2; + util$7.joinValues = joinValues3; util$7.jsonStringifyReplacer = (_, value2) => { if (typeof value2 === "bigint") return value2.toString(); return value2; @@ -101946,24 +102786,24 @@ var ZodError3 = class ZodError4 extends Error { this.issues = issues; } format(_mapper) { - const mapper = _mapper || function(issue2) { - return issue2.message; + const mapper = _mapper || function(issue3) { + return issue3.message; }; const fieldErrors = { _errors: [] }; - const processError = (error41) => { - for (const issue2 of error41.issues) if (issue2.code === "invalid_union") issue2.unionErrors.map(processError); - else if (issue2.code === "invalid_return_type") processError(issue2.returnTypeError); - else if (issue2.code === "invalid_arguments") processError(issue2.argumentsError); - else if (issue2.path.length === 0) fieldErrors._errors.push(mapper(issue2)); + const processError = (error42) => { + for (const issue3 of error42.issues) if (issue3.code === "invalid_union") issue3.unionErrors.map(processError); + else if (issue3.code === "invalid_return_type") processError(issue3.returnTypeError); + else if (issue3.code === "invalid_arguments") processError(issue3.argumentsError); + else if (issue3.path.length === 0) fieldErrors._errors.push(mapper(issue3)); else { let curr = fieldErrors; let i$3 = 0; - while (i$3 < issue2.path.length) { - const el = issue2.path[i$3]; - if (!(i$3 === issue2.path.length - 1)) curr[el] = curr[el] || { _errors: [] }; + while (i$3 < issue3.path.length) { + const el = issue3.path[i$3]; + if (!(i$3 === issue3.path.length - 1)) curr[el] = curr[el] || { _errors: [] }; else { curr[el] = curr[el] || { _errors: [] }; - curr[el]._errors.push(mapper(issue2)); + curr[el]._errors.push(mapper(issue3)); } curr = curr[el]; i$3++; @@ -101985,7 +102825,7 @@ var ZodError3 = class ZodError4 extends Error { get isEmpty() { return this.issues.length === 0; } - flatten(mapper = (issue2) => issue2.message) { + flatten(mapper = (issue3) => issue3.message) { const fieldErrors = {}; const formErrors = []; for (const sub of this.issues) if (sub.path.length > 0) { @@ -102005,27 +102845,27 @@ var ZodError3 = class ZodError4 extends Error { ZodError3.create = (issues) => { return new ZodError3(issues); }; -var errorMap3 = (issue2, _ctx) => { +var errorMap3 = (issue3, _ctx) => { let message; - switch (issue2.code) { + switch (issue3.code) { case ZodIssueCode3.invalid_type: - if (issue2.received === ZodParsedType3.undefined) message = "Required"; - else message = `Expected ${issue2.expected}, received ${issue2.received}`; + if (issue3.received === ZodParsedType3.undefined) message = "Required"; + else message = `Expected ${issue3.expected}, received ${issue3.received}`; break; case ZodIssueCode3.invalid_literal: - message = `Invalid literal value, expected ${JSON.stringify(issue2.expected, util$6.jsonStringifyReplacer)}`; + message = `Invalid literal value, expected ${JSON.stringify(issue3.expected, util$6.jsonStringifyReplacer)}`; break; case ZodIssueCode3.unrecognized_keys: - message = `Unrecognized key(s) in object: ${util$6.joinValues(issue2.keys, ", ")}`; + message = `Unrecognized key(s) in object: ${util$6.joinValues(issue3.keys, ", ")}`; break; case ZodIssueCode3.invalid_union: message = `Invalid input`; break; case ZodIssueCode3.invalid_union_discriminator: - message = `Invalid discriminator value. Expected ${util$6.joinValues(issue2.options)}`; + message = `Invalid discriminator value. Expected ${util$6.joinValues(issue3.options)}`; break; case ZodIssueCode3.invalid_enum_value: - message = `Invalid enum value. Expected ${util$6.joinValues(issue2.options)}, received '${issue2.received}'`; + message = `Invalid enum value. Expected ${util$6.joinValues(issue3.options)}, received '${issue3.received}'`; break; case ZodIssueCode3.invalid_arguments: message = `Invalid function arguments`; @@ -102037,29 +102877,29 @@ var errorMap3 = (issue2, _ctx) => { message = `Invalid date`; break; case ZodIssueCode3.invalid_string: - if (typeof issue2.validation === "object") if ("includes" in issue2.validation) { - message = `Invalid input: must include "${issue2.validation.includes}"`; - if (typeof issue2.validation.position === "number") message = `${message} at one or more positions greater than or equal to ${issue2.validation.position}`; - } else if ("startsWith" in issue2.validation) message = `Invalid input: must start with "${issue2.validation.startsWith}"`; - else if ("endsWith" in issue2.validation) message = `Invalid input: must end with "${issue2.validation.endsWith}"`; - else util$6.assertNever(issue2.validation); - else if (issue2.validation !== "regex") message = `Invalid ${issue2.validation}`; + if (typeof issue3.validation === "object") if ("includes" in issue3.validation) { + message = `Invalid input: must include "${issue3.validation.includes}"`; + if (typeof issue3.validation.position === "number") message = `${message} at one or more positions greater than or equal to ${issue3.validation.position}`; + } else if ("startsWith" in issue3.validation) message = `Invalid input: must start with "${issue3.validation.startsWith}"`; + else if ("endsWith" in issue3.validation) message = `Invalid input: must end with "${issue3.validation.endsWith}"`; + else util$6.assertNever(issue3.validation); + else if (issue3.validation !== "regex") message = `Invalid ${issue3.validation}`; else message = "Invalid"; break; case ZodIssueCode3.too_small: - if (issue2.type === "array") message = `Array must contain ${issue2.exact ? "exactly" : issue2.inclusive ? `at least` : `more than`} ${issue2.minimum} element(s)`; - else if (issue2.type === "string") message = `String must contain ${issue2.exact ? "exactly" : issue2.inclusive ? `at least` : `over`} ${issue2.minimum} character(s)`; - else if (issue2.type === "number") message = `Number must be ${issue2.exact ? `exactly equal to ` : issue2.inclusive ? `greater than or equal to ` : `greater than `}${issue2.minimum}`; - else if (issue2.type === "bigint") message = `Number must be ${issue2.exact ? `exactly equal to ` : issue2.inclusive ? `greater than or equal to ` : `greater than `}${issue2.minimum}`; - else if (issue2.type === "date") message = `Date must be ${issue2.exact ? `exactly equal to ` : issue2.inclusive ? `greater than or equal to ` : `greater than `}${new Date(Number(issue2.minimum))}`; + if (issue3.type === "array") message = `Array must contain ${issue3.exact ? "exactly" : issue3.inclusive ? `at least` : `more than`} ${issue3.minimum} element(s)`; + else if (issue3.type === "string") message = `String must contain ${issue3.exact ? "exactly" : issue3.inclusive ? `at least` : `over`} ${issue3.minimum} character(s)`; + else if (issue3.type === "number") message = `Number must be ${issue3.exact ? `exactly equal to ` : issue3.inclusive ? `greater than or equal to ` : `greater than `}${issue3.minimum}`; + else if (issue3.type === "bigint") message = `Number must be ${issue3.exact ? `exactly equal to ` : issue3.inclusive ? `greater than or equal to ` : `greater than `}${issue3.minimum}`; + else if (issue3.type === "date") message = `Date must be ${issue3.exact ? `exactly equal to ` : issue3.inclusive ? `greater than or equal to ` : `greater than `}${new Date(Number(issue3.minimum))}`; else message = "Invalid input"; break; case ZodIssueCode3.too_big: - if (issue2.type === "array") message = `Array must contain ${issue2.exact ? `exactly` : issue2.inclusive ? `at most` : `less than`} ${issue2.maximum} element(s)`; - else if (issue2.type === "string") message = `String must contain ${issue2.exact ? `exactly` : issue2.inclusive ? `at most` : `under`} ${issue2.maximum} character(s)`; - else if (issue2.type === "number") message = `Number must be ${issue2.exact ? `exactly` : issue2.inclusive ? `less than or equal to` : `less than`} ${issue2.maximum}`; - else if (issue2.type === "bigint") message = `BigInt must be ${issue2.exact ? `exactly` : issue2.inclusive ? `less than or equal to` : `less than`} ${issue2.maximum}`; - else if (issue2.type === "date") message = `Date must be ${issue2.exact ? `exactly` : issue2.inclusive ? `smaller than or equal to` : `smaller than`} ${new Date(Number(issue2.maximum))}`; + if (issue3.type === "array") message = `Array must contain ${issue3.exact ? `exactly` : issue3.inclusive ? `at most` : `less than`} ${issue3.maximum} element(s)`; + else if (issue3.type === "string") message = `String must contain ${issue3.exact ? `exactly` : issue3.inclusive ? `at most` : `under`} ${issue3.maximum} character(s)`; + else if (issue3.type === "number") message = `Number must be ${issue3.exact ? `exactly` : issue3.inclusive ? `less than or equal to` : `less than`} ${issue3.maximum}`; + else if (issue3.type === "bigint") message = `BigInt must be ${issue3.exact ? `exactly` : issue3.inclusive ? `less than or equal to` : `less than`} ${issue3.maximum}`; + else if (issue3.type === "date") message = `Date must be ${issue3.exact ? `exactly` : issue3.inclusive ? `smaller than or equal to` : `smaller than`} ${new Date(Number(issue3.maximum))}`; else message = "Invalid input"; break; case ZodIssueCode3.custom: @@ -102069,14 +102909,14 @@ var errorMap3 = (issue2, _ctx) => { message = `Intersection results could not be merged`; break; case ZodIssueCode3.not_multiple_of: - message = `Number must be a multiple of ${issue2.multipleOf}`; + message = `Number must be a multiple of ${issue3.multipleOf}`; break; case ZodIssueCode3.not_finite: message = "Number must be finite"; break; default: message = _ctx.defaultError; - util$6.assertNever(issue2); + util$6.assertNever(issue3); } return { message }; }; @@ -102111,7 +102951,7 @@ var makeIssue3 = (params) => { }; function addIssueToContext3(ctx, issueData) { const overrideMap = getErrorMap3(); - const issue2 = makeIssue3({ + const issue3 = makeIssue3({ issueData, data: ctx.data, path: ctx.path, @@ -102122,7 +102962,7 @@ function addIssueToContext3(ctx, issueData) { overrideMap === en_default3 ? void 0 : en_default3 ].filter((x) => !!x) }); - ctx.common.issues.push(issue2); + ctx.common.issues.push(issue3); } var ParseStatus3 = class ParseStatus4 { constructor() { @@ -102556,9 +103396,9 @@ function datetimeRegex3(args3) { regex$1 = `${regex$1}(${opts.join("|")})`; return /* @__PURE__ */ new RegExp(`^${regex$1}$`); } -function isValidIP3(ip2, version2) { - if ((version2 === "v4" || !version2) && ipv4Regex3.test(ip2)) return true; - if ((version2 === "v6" || !version2) && ipv6Regex3.test(ip2)) return true; +function isValidIP3(ip2, version3) { + if ((version3 === "v4" || !version3) && ipv4Regex3.test(ip2)) return true; + if ((version3 === "v6" || !version3) && ipv6Regex3.test(ip2)) return true; return false; } function isValidJWT3(jwt, alg) { @@ -102566,8 +103406,8 @@ function isValidJWT3(jwt, alg) { try { const [header] = jwt.split("."); if (!header) return false; - const base643 = header.replace(/-/g, "+").replace(/_/g, "/").padEnd(header.length + (4 - header.length % 4) % 4, "="); - const decoded = JSON.parse(atob(base643)); + const base644 = header.replace(/-/g, "+").replace(/_/g, "/").padEnd(header.length + (4 - header.length % 4) % 4, "="); + const decoded = JSON.parse(atob(base644)); if (typeof decoded !== "object" || decoded === null) return false; if ("typ" in decoded && decoded?.typ !== "JWT") return false; if (!decoded.alg) return false; @@ -102577,9 +103417,9 @@ function isValidJWT3(jwt, alg) { return false; } } -function isValidCidr3(ip2, version2) { - if ((version2 === "v4" || !version2) && ipv4CidrRegex3.test(ip2)) return true; - if ((version2 === "v6" || !version2) && ipv6CidrRegex3.test(ip2)) return true; +function isValidCidr3(ip2, version3) { + if ((version3 === "v4" || !version3) && ipv4CidrRegex3.test(ip2)) return true; + if ((version3 === "v6" || !version3) && ipv6CidrRegex3.test(ip2)) return true; return false; } var ZodString3 = class ZodString4 extends ZodType3 { @@ -103999,9 +104839,9 @@ var ZodObject3 = class ZodObject4 extends ZodType3 { return new ZodObject4({ ...this._def, unknownKeys: "strict", - ...message !== void 0 ? { errorMap: (issue2, ctx) => { - const defaultError = this._def.errorMap?.(issue2, ctx).message ?? ctx.defaultError; - if (issue2.code === "unrecognized_keys") return { message: errorUtil3.errToObj(message).message ?? defaultError }; + ...message !== void 0 ? { errorMap: (issue3, ctx) => { + const defaultError = this._def.errorMap?.(issue3, ctx).message ?? ctx.defaultError; + if (issue3.code === "unrecognized_keys") return { message: errorUtil3.errToObj(message).message ?? defaultError }; return { message: defaultError }; } } : {} }); @@ -104658,7 +105498,7 @@ var ZodFunction3 = class ZodFunction4 extends ZodType3 { }); return INVALID3; } - function makeArgsIssue(args3, error41) { + function makeArgsIssue(args3, error42) { return makeIssue3({ data: args3, path: ctx.path, @@ -104670,11 +105510,11 @@ var ZodFunction3 = class ZodFunction4 extends ZodType3 { ].filter((x) => !!x), issueData: { code: ZodIssueCode3.invalid_arguments, - argumentsError: error41 + argumentsError: error42 } }); } - function makeReturnsIssue(returns, error41) { + function makeReturnsIssue(returns, error42) { return makeIssue3({ data: returns, path: ctx.path, @@ -104686,7 +105526,7 @@ var ZodFunction3 = class ZodFunction4 extends ZodType3 { ].filter((x) => !!x), issueData: { code: ZodIssueCode3.invalid_return_type, - returnTypeError: error41 + returnTypeError: error42 } }); } @@ -104695,15 +105535,15 @@ var ZodFunction3 = class ZodFunction4 extends ZodType3 { if (this._def.returns instanceof ZodPromise3) { const me = this; return OK3(async function(...args3) { - const error41 = new ZodError3([]); + const error42 = new ZodError3([]); const parsedArgs = await me._def.args.parseAsync(args3, params).catch((e) => { - error41.addIssue(makeArgsIssue(args3, e)); - throw error41; + error42.addIssue(makeArgsIssue(args3, e)); + throw error42; }); const result = await Reflect.apply(fn2, this, parsedArgs); return await me._def.returns._def.type.parseAsync(result, params).catch((e) => { - error41.addIssue(makeReturnsIssue(result, e)); - throw error41; + error42.addIssue(makeReturnsIssue(result, e)); + throw error42; }); }); } else { @@ -106088,28 +106928,28 @@ var require_depd = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/depd@2.0.0/ Object.defineProperty(obj, prop, descriptor); } function DeprecationError(namespace, message, stack) { - var error41 = /* @__PURE__ */ new Error(); + var error42 = /* @__PURE__ */ new Error(); var stackString; - Object.defineProperty(error41, "constructor", { value: DeprecationError }); - Object.defineProperty(error41, "message", { + Object.defineProperty(error42, "constructor", { value: DeprecationError }); + Object.defineProperty(error42, "message", { configurable: true, enumerable: false, value: message, writable: true }); - Object.defineProperty(error41, "name", { + Object.defineProperty(error42, "name", { enumerable: false, configurable: true, value: "DeprecationError", writable: true }); - Object.defineProperty(error41, "namespace", { + Object.defineProperty(error42, "namespace", { configurable: true, enumerable: false, value: namespace, writable: true }); - Object.defineProperty(error41, "stack", { + Object.defineProperty(error42, "stack", { configurable: true, enumerable: false, get: function() { @@ -106120,7 +106960,7 @@ var require_depd = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/depd@2.0.0/ stackString = val; } }); - return error41; + return error42; } }) }); var require_setprototypeof = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/setprototypeof@1.2.0/node_modules/setprototypeof/index.js": ((exports, module) => { @@ -115012,14 +115852,14 @@ var require_lib2 = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/iconv-lite@ iconv$1.encodings = null; iconv$1.defaultCharUnicode = "\uFFFD"; iconv$1.defaultCharSingleByte = "?"; - iconv$1.encode = function encode2(str, encoding, options) { + iconv$1.encode = function encode3(str, encoding, options) { str = "" + (str || ""); var encoder = iconv$1.getEncoder(encoding, options); var res = encoder.write(str); var trail = encoder.end(); return trail && trail.length > 0 ? Buffer$1.concat([res, trail]) : res; }; - iconv$1.decode = function decode(buf, encoding, options) { + iconv$1.decode = function decode2(buf, encoding, options) { if (typeof buf === "string") { if (!iconv$1.skipDecodeWarning) { console.error("Iconv-lite warning: decode()-ing strings is deprecated. Refer to https://github.com/ashtuchkin/iconv-lite/wiki/Use-Buffers-when-decoding"); @@ -115251,8 +116091,8 @@ var require_raw_body = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/raw-bod type: "request.size.invalid" })); else { - var string3 = decoder ? buffer$1 + (decoder.end() || "") : Buffer.concat(buffer$1); - done(null, string3); + var string4 = decoder ? buffer$1 + (decoder.end() || "") : Buffer.concat(buffer$1); + done(null, string4); } } function cleanup() { @@ -115282,10 +116122,10 @@ var require_content_type = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/con var PARAM_REGEXP = /; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g; var QESC_REGEXP = /\\([\u000b\u0020-\u00ff])/g; var TYPE_REGEXP = /^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/; - exports.parse = parse4; - function parse4(string3) { - if (!string3) throw new TypeError("argument string is required"); - var header = typeof string3 === "object" ? getcontenttype(string3) : string3; + exports.parse = parse6; + function parse6(string4) { + if (!string4) throw new TypeError("argument string is required"); + var header = typeof string4 === "object" ? getcontenttype(string4) : string4; if (typeof header !== "string") throw new TypeError("argument string is required to be a string"); var index = header.indexOf(";"); var type2 = index !== -1 ? header.slice(0, index).trim() : header.trim(); @@ -115405,9 +116245,9 @@ data: ${relativeUrlWithSession} limit: MAXIMUM_MESSAGE_SIZE$1, encoding: (_c = ct.parameters.charset) !== null && _c !== void 0 ? _c : "utf-8" }); - } catch (error41) { - res.writeHead(400).end(String(error41)); - (_d = this.onerror) === null || _d === void 0 || _d.call(this, error41); + } catch (error42) { + res.writeHead(400).end(String(error42)); + (_d = this.onerror) === null || _d === void 0 || _d.call(this, error42); return; } try { @@ -115429,9 +116269,9 @@ data: ${relativeUrlWithSession} let parsedMessage; try { parsedMessage = JSONRPCMessageSchema3.parse(message); - } catch (error41) { - (_a = this.onerror) === null || _a === void 0 || _a.call(this, error41); - throw error41; + } catch (error42) { + (_a = this.onerror) === null || _a === void 0 || _a.call(this, error42); + throw error42; } (_b = this.onmessage) === null || _b === void 0 || _b.call(this, parsedMessage, extra); } @@ -115572,9 +116412,9 @@ var StreamableHTTPServerTransport = class { res.on("close", () => { this._streamMapping.delete(this._standaloneSseStreamId); }); - res.on("error", (error41) => { + res.on("error", (error42) => { var _a; - (_a = this.onerror) === null || _a === void 0 || _a.call(this, error41); + (_a = this.onerror) === null || _a === void 0 || _a.call(this, error42); }); } /** @@ -115600,12 +116440,12 @@ var StreamableHTTPServerTransport = class { } } })); this._streamMapping.set(streamId, res); - res.on("error", (error41) => { + res.on("error", (error42) => { var _a$1; - (_a$1 = this.onerror) === null || _a$1 === void 0 || _a$1.call(this, error41); + (_a$1 = this.onerror) === null || _a$1 === void 0 || _a$1.call(this, error42); }); - } catch (error41) { - (_b = this.onerror) === null || _b === void 0 || _b.call(this, error41); + } catch (error42) { + (_b = this.onerror) === null || _b === void 0 || _b.call(this, error42); } } /** @@ -115736,26 +116576,26 @@ var StreamableHTTPServerTransport = class { res.on("close", () => { this._streamMapping.delete(streamId); }); - res.on("error", (error41) => { + res.on("error", (error42) => { var _a$1; - (_a$1 = this.onerror) === null || _a$1 === void 0 || _a$1.call(this, error41); + (_a$1 = this.onerror) === null || _a$1 === void 0 || _a$1.call(this, error42); }); for (const message of messages) (_d = this.onmessage) === null || _d === void 0 || _d.call(this, message, { authInfo, requestInfo }); } - } catch (error41) { + } catch (error42) { res.writeHead(400).end(JSON.stringify({ jsonrpc: "2.0", error: { code: -32700, message: "Parse error", - data: String(error41) + data: String(error42) }, id: null })); - (_e = this.onerror) === null || _e === void 0 || _e.call(this, error41); + (_e = this.onerror) === null || _e === void 0 || _e.call(this, error42); } } /** @@ -115897,8 +116737,8 @@ var getBody = (request2) => { body = Buffer.concat(bodyParts).toString(); try { resolve$4(JSON.parse(body)); - } catch (error41) { - console.error("[mcp-proxy] error parsing body", error41); + } catch (error42) { + console.error("[mcp-proxy] error parsing body", error42); resolve$4(null); } }); @@ -115918,15 +116758,15 @@ var getWWWAuthenticateHeader = (oauth) => { if (!oauth?.protectedResource?.resource) return; return `Bearer resource_metadata="${oauth.protectedResource.resource}/.well-known/oauth-protected-resource"`; }; -var handleResponseError = (error41, res) => { - if (error41 instanceof Response) { +var handleResponseError = (error42, res) => { + if (error42 instanceof Response) { const fixedHeaders = {}; - error41.headers.forEach((value2, key$1) => { + error42.headers.forEach((value2, key$1) => { if (fixedHeaders[key$1]) if (Array.isArray(fixedHeaders[key$1])) fixedHeaders[key$1].push(value2); else fixedHeaders[key$1] = [fixedHeaders[key$1], value2]; else fixedHeaders[key$1] = value2; }); - res.writeHead(error41.status, error41.statusText, fixedHeaders).end(error41.statusText); + res.writeHead(error42.status, error42.statusText, fixedHeaders).end(error42.statusText); return true; } return false; @@ -115935,8 +116775,8 @@ var cleanupServer = async (server, onClose) => { if (onClose) await onClose(server); try { await server.close(); - } catch (error41) { - console.error("[mcp-proxy] error closing server", error41); + } catch (error42) { + console.error("[mcp-proxy] error closing server", error42); } }; var handleStreamRequest = async ({ activeTransports, authenticate, createServer: createServer2, enableJsonResponse, endpoint: endpoint2, eventStore, oauth, onClose, onConnect, req, res, stateless }) => { @@ -115963,9 +116803,9 @@ var handleStreamRequest = async ({ activeTransports, authenticate, createServer: })); return true; } - } catch (error41) { - const errorMessage = error41 instanceof Error ? error41.message : "Unauthorized: Authentication error"; - console.error("Authentication error:", error41); + } catch (error42) { + const errorMessage = error42 instanceof Error ? error42.message : "Unauthorized: Authentication error"; + console.error("Authentication error:", error42); res.setHeader("Content-Type", "application/json"); const wwwAuthHeader = getWWWAuthenticateHeader(oauth); if (wwwAuthHeader) res.setHeader("WWW-Authenticate", wwwAuthHeader); @@ -116012,8 +116852,8 @@ var handleStreamRequest = async ({ activeTransports, authenticate, createServer: }; try { server = await createServer2(req); - } catch (error41) { - const errorMessage = error41 instanceof Error ? error41.message : String(error41); + } catch (error42) { + const errorMessage = error42 instanceof Error ? error42.message : String(error42); if (errorMessage.includes("Authentication") || errorMessage.includes("Invalid JWT") || errorMessage.includes("Token") || errorMessage.includes("Unauthorized")) { res.setHeader("Content-Type", "application/json"); const wwwAuthHeader = getWWWAuthenticateHeader(oauth); @@ -116028,7 +116868,7 @@ var handleStreamRequest = async ({ activeTransports, authenticate, createServer: })); return true; } - if (handleResponseError(error41, res)) return true; + if (handleResponseError(error42, res)) return true; res.writeHead(500).end("Error creating server"); return true; } @@ -116046,8 +116886,8 @@ var handleStreamRequest = async ({ activeTransports, authenticate, createServer: }); try { server = await createServer2(req); - } catch (error41) { - const errorMessage = error41 instanceof Error ? error41.message : String(error41); + } catch (error42) { + const errorMessage = error42 instanceof Error ? error42.message : String(error42); if (errorMessage.includes("Authentication") || errorMessage.includes("Invalid JWT") || errorMessage.includes("Token") || errorMessage.includes("Unauthorized")) { res.setHeader("Content-Type", "application/json"); const wwwAuthHeader = getWWWAuthenticateHeader(oauth); @@ -116062,7 +116902,7 @@ var handleStreamRequest = async ({ activeTransports, authenticate, createServer: })); return true; } - if (handleResponseError(error41, res)) return true; + if (handleResponseError(error42, res)) return true; res.writeHead(500).end("Error creating server"); return true; } @@ -116077,8 +116917,8 @@ var handleStreamRequest = async ({ activeTransports, authenticate, createServer: } await transport.handleRequest(req, res, body); return true; - } catch (error41) { - console.error("[mcp-proxy] error handling request", error41); + } catch (error42) { + console.error("[mcp-proxy] error handling request", error42); res.setHeader("Content-Type", "application/json"); res.writeHead(500).end(createJsonRpcErrorResponse(-32603, "Internal Server Error")); } @@ -116117,8 +116957,8 @@ var handleStreamRequest = async ({ activeTransports, authenticate, createServer: try { await activeTransport.transport.handleRequest(req, res); await cleanupServer(activeTransport.server, onClose); - } catch (error41) { - console.error("[mcp-proxy] error handling delete request", error41); + } catch (error42) { + console.error("[mcp-proxy] error handling delete request", error42); res.writeHead(500).end("Error handling delete request"); } return true; @@ -116131,8 +116971,8 @@ var handleSSERequest = async ({ activeTransports, createServer: createServer2, e let server; try { server = await createServer2(req); - } catch (error41) { - if (handleResponseError(error41, res)) return true; + } catch (error42) { + if (handleResponseError(error42, res)) return true; res.writeHead(500).end("Error creating server"); return true; } @@ -116154,9 +116994,9 @@ var handleSSERequest = async ({ activeTransports, createServer: createServer2, e params: { message: "SSE Connection established" } }); if (onConnect) await onConnect(server); - } catch (error41) { + } catch (error42) { if (!closed) { - console.error("[mcp-proxy] error connecting to server", error41); + console.error("[mcp-proxy] error connecting to server", error42); res.writeHead(500).end("Error connecting to server"); } } @@ -116193,8 +117033,8 @@ var startHTTPServer = async ({ apiKey, authenticate, createServer: createServer2 res.setHeader("Access-Control-Allow-Methods", "GET, POST, OPTIONS"); res.setHeader("Access-Control-Allow-Headers", "Content-Type, Authorization, Accept, Mcp-Session-Id, Last-Event-Id"); res.setHeader("Access-Control-Expose-Headers", "Mcp-Session-Id"); - } catch (error41) { - console.error("[mcp-proxy] error parsing origin", error41); + } catch (error42) { + console.error("[mcp-proxy] error parsing origin", error42); } if (req.method === "OPTIONS") { res.writeHead(204); @@ -116246,9 +117086,9 @@ var startHTTPServer = async ({ apiKey, authenticate, createServer: createServer2 for (const transport of Object.values(activeSSETransports)) await transport.close(); for (const transport of Object.values(activeStreamTransports)) await transport.transport.close(); return new Promise((resolve$4, reject) => { - httpServer.close((error41) => { - if (error41) { - reject(error41); + httpServer.close((error42) => { + if (error42) { + reject(error42); return; } resolve$4(); @@ -116394,26 +117234,26 @@ var require_uri_all3 = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/uri-js@ while (length--) result[length] = fn2(array[length]); return result; } - function mapDomain(string3, fn2) { - var parts = string3.split("@"); + function mapDomain(string4, fn2) { + var parts = string4.split("@"); var result = ""; if (parts.length > 1) { result = parts[0] + "@"; - string3 = parts[1]; + string4 = parts[1]; } - string3 = string3.replace(regexSeparators, "."); - var labels = string3.split("."); + string4 = string4.replace(regexSeparators, "."); + var labels = string4.split("."); var encoded = map$1(labels, fn2).join("."); return result + encoded; } - function ucs2decode(string3) { + function ucs2decode(string4) { var output = []; var counter = 0; - var length = string3.length; + var length = string4.length; while (counter < length) { - var value2 = string3.charCodeAt(counter++); + var value2 = string4.charCodeAt(counter++); if (value2 >= 55296 && value2 <= 56319 && counter < length) { - var extra = string3.charCodeAt(counter++); + var extra = string4.charCodeAt(counter++); if ((extra & 64512) == 56320) output.push(((value2 & 1023) << 10) + (extra & 1023) + 65536); else { output.push(value2); @@ -116442,7 +117282,7 @@ var require_uri_all3 = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/uri-js@ for (; delta > baseMinusTMin * tMax >> 1; k += base) delta = floor(delta / baseMinusTMin); return floor(k + (baseMinusTMin + 1) * delta / (delta + skew)); }; - var decode = function decode$1(input) { + var decode2 = function decode$1(input) { var output = []; var inputLength = input.length; var i$3 = 0; @@ -116476,7 +117316,7 @@ var require_uri_all3 = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/uri-js@ } return String.fromCodePoint.apply(String, output); }; - var encode2 = function encode$1(input) { + var encode3 = function encode$1(input) { var output = []; input = ucs2decode(input); var inputLength = input.length; @@ -116567,13 +117407,13 @@ var require_uri_all3 = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/uri-js@ return output.join(""); }; var toUnicode = function toUnicode$1(input) { - return mapDomain(input, function(string3) { - return regexPunycode.test(string3) ? decode(string3.slice(4).toLowerCase()) : string3; + return mapDomain(input, function(string4) { + return regexPunycode.test(string4) ? decode2(string4.slice(4).toLowerCase()) : string4; }); }; var toASCII = function toASCII$1(input) { - return mapDomain(input, function(string3) { - return regexNonASCII.test(string3) ? "xn--" + encode2(string3) : string3; + return mapDomain(input, function(string4) { + return regexNonASCII.test(string4) ? "xn--" + encode3(string4) : string4; }); }; var punycode = { @@ -116582,8 +117422,8 @@ var require_uri_all3 = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/uri-js@ "decode": ucs2decode, "encode": ucs2encode }, - "decode": decode, - "encode": encode2, + "decode": decode2, + "encode": encode3, "toASCII": toASCII, "toUnicode": toUnicode }; @@ -118334,8 +119174,8 @@ var require_formats3 = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/ajv@6.1 "relative-json-pointer": RELATIVE_JSON_POINTER }; formats$1.full = { - date: date2, - time: time2, + date: date4, + time: time4, "date-time": date_time, uri, "uri-reference": URIREF, @@ -118354,7 +119194,7 @@ var require_formats3 = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/ajv@6.1 function isLeapYear(year) { return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0); } - function date2(str) { + function date4(str) { var matches = str.match(DATE); if (!matches) return false; var year = +matches[1]; @@ -118362,7 +119202,7 @@ var require_formats3 = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/ajv@6.1 var day = +matches[3]; return month >= 1 && month <= 12 && day >= 1 && day <= (month == 2 && isLeapYear(year) ? 29 : DAYS[month]); } - function time2(str, full) { + function time4(str, full) { var matches = str.match(TIME); if (!matches) return false; var hour = matches[1]; @@ -118374,7 +119214,7 @@ var require_formats3 = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/ajv@6.1 var DATE_TIME_SEPARATOR = /t|\s/i; function date_time(str) { var dateTime = str.split(DATE_TIME_SEPARATOR); - return dateTime.length == 2 && date2(dateTime[0]) && time2(dateTime[1], true); + return dateTime.length == 2 && date4(dateTime[0]) && time4(dateTime[1], true); } var NOT_URI_FRAGMENT = /\/|:/; function uri(str) { @@ -120981,8 +121821,8 @@ var require_ajv3 = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/ajv@6.12.6/ if (typeof schema2 != "object" && typeof schema2 != "boolean") throw new Error("schema should be object or boolean"); var serialize = this._opts.serialize; var cacheKey = serialize ? serialize(schema2) : schema2; - var cached4 = this._cache.get(cacheKey); - if (cached4) return cached4; + var cached5 = this._cache.get(cacheKey); + if (cached5) return cached5; shouldAddSchema = shouldAddSchema || this._opts.addUsedSchema !== false; var id = resolve2.normalizeId(this._getId(schema2)); if (id && shouldAddSchema) checkUnique(this, id); @@ -121721,8 +122561,8 @@ var EventSourceParserStream = class extends TransformStream { onEvent: (event) => { controller.enqueue(event); }, - onError(error41) { - onError === "terminate" ? controller.error(error41) : typeof onError == "function" && onError(error41); + onError(error42) { + onError === "terminate" ? controller.error(error42) : typeof onError == "function" && onError(error42); }, onRetry, onComment @@ -121744,7 +122584,6 @@ import { setTimeout as delay } from "timers/promises"; init_index_CAcLDIRJ(); // ../node_modules/.pnpm/fastmcp@3.20.0_arktype@2.1.28_effect@3.18.4/node_modules/fastmcp/dist/FastMCP.js -init_zod(); var FastMCPError = class extends Error { constructor(message) { super(message); @@ -121889,7 +122728,7 @@ var FastMCPSession = class extends FastMCPSessionEventEmitter { tools, transportType, utils, - version: version2 + version: version3 }) { super(); this.#auth = auth2; @@ -121912,7 +122751,7 @@ var FastMCPSession = class extends FastMCPSessionEventEmitter { } this.#capabilities.logging = {}; this.#server = new Server( - { name, version: version2 }, + { name, version: version3 }, { capabilities: this.#capabilities, instructions } ); this.#utils = utils; @@ -121946,8 +122785,8 @@ var FastMCPSession = class extends FastMCPSessionEventEmitter { } try { await this.#server.close(); - } catch (error41) { - this.#logger.error("[FastMCP error]", "could not close server", error41); + } catch (error42) { + this.#logger.error("[FastMCP error]", "could not close server", error42); } } async connect(transport) { @@ -122024,13 +122863,13 @@ ${e instanceof Error ? e.stack : JSON.stringify(e)}` } this.#connectionState = "ready"; this.emit("ready"); - } catch (error41) { + } catch (error42) { this.#connectionState = "error"; const errorEvent = { - error: error41 instanceof Error ? error41 : new Error(String(error41)) + error: error42 instanceof Error ? error42 : new Error(String(error42)) }; this.emit("error", errorEvent); - throw error41; + throw error42; } } async requestSampling(message, options) { @@ -122201,8 +123040,8 @@ ${e instanceof Error ? e.stack : JSON.stringify(e)}` }); } setupErrorHandling() { - this.#server.onerror = (error41) => { - this.#logger.error("[FastMCP error]", error41); + this.#server.onerror = (error42) => { + this.#logger.error("[FastMCP error]", error42); }; } setupLoggingHandlers() { @@ -122249,8 +123088,8 @@ ${e instanceof Error ? e.stack : JSON.stringify(e)}` args3, this.#auth ); - } catch (error41) { - const errorMessage = error41 instanceof Error ? error41.message : String(error41); + } catch (error42) { + const errorMessage = error42 instanceof Error ? error42.message : String(error42); throw new McpError( ErrorCode2.InternalError, `Failed to load prompt '${request2.params.name}': ${errorMessage}` @@ -122325,8 +123164,8 @@ ${e instanceof Error ? e.stack : JSON.stringify(e)}` let maybeArrayResult; try { maybeArrayResult = await resource.load(this.#auth); - } catch (error41) { - const errorMessage = error41 instanceof Error ? error41.message : String(error41); + } catch (error42) { + const errorMessage = error42 instanceof Error ? error42.message : String(error42); throw new McpError( ErrorCode2.InternalError, `Failed to load resource '${resource.name}' (${resource.uri}): ${errorMessage}`, @@ -122382,8 +123221,8 @@ ${e instanceof Error ? e.stack : JSON.stringify(e)}` this.emit("rootsChanged", { roots: roots.roots }); - }).catch((error41) => { - if (error41 instanceof McpError && error41.code === ErrorCode2.MethodNotFound) { + }).catch((error42) => { + if (error42 instanceof McpError && error42.code === ErrorCode2.MethodNotFound) { this.#logger.debug( "[FastMCP debug] listRoots method not supported by client" ); @@ -122391,7 +123230,7 @@ ${e instanceof Error ? e.stack : JSON.stringify(e)}` this.#logger.error( `[FastMCP error] received error listing roots. -${error41 instanceof Error ? error41.stack : JSON.stringify(error41)}` +${error42 instanceof Error ? error42.stack : JSON.stringify(error42)}` ); } }); @@ -122437,9 +123276,9 @@ ${error41 instanceof Error ? error41.stack : JSON.stringify(error41)}` request2.params.arguments ); if (parsed2.issues) { - const friendlyErrors = this.#utils?.formatInvalidParamsErrorMessage ? this.#utils.formatInvalidParamsErrorMessage(parsed2.issues) : parsed2.issues.map((issue2) => { - const path4 = issue2.path?.join(".") || "root"; - return `${path4}: ${issue2.message}`; + const friendlyErrors = this.#utils?.formatInvalidParamsErrorMessage ? this.#utils.formatInvalidParamsErrorMessage(parsed2.issues) : parsed2.issues.map((issue3) => { + const path4 = issue3.path?.join(".") || "root"; + return `${path4}: ${issue3.message}`; }).join(", "); throw new McpError( ErrorCode2.InvalidParams, @@ -122568,15 +123407,15 @@ ${error41 instanceof Error ? error41.stack : JSON.stringify(error41)}` } else { result = ContentResultZodSchema.parse(maybeStringResult); } - } catch (error41) { - if (error41 instanceof UserError) { + } catch (error42) { + if (error42 instanceof UserError) { return { - content: [{ text: error41.message, type: "text" }], + content: [{ text: error42.message, type: "text" }], isError: true, - ...error41.extras ? { structuredContent: error41.extras } : {} + ...error42.extras ? { structuredContent: error42.extras } : {} }; } - const errorMessage = error41 instanceof Error ? error41.message : String(error41); + const errorMessage = error42 instanceof Error ? error42.message : String(error42); return { content: [ { @@ -122702,8 +123541,8 @@ var FastMCP = class extends FastMCPEventEmitter { * Starts the server. */ async start(options) { - const config2 = this.#parseRuntimeConfig(options); - if (config2.transportType === "stdio") { + const config3 = this.#parseRuntimeConfig(options); + if (config3.transportType === "stdio") { const transport = new StdioServerTransport(); let auth2; if (this.#authenticate) { @@ -122711,10 +123550,10 @@ var FastMCP = class extends FastMCPEventEmitter { auth2 = await this.#authenticate( void 0 ); - } catch (error41) { + } catch (error42) { this.#logger.error( "[FastMCP error] Authentication failed for stdio transport:", - error41 instanceof Error ? error41.message : String(error41) + error42 instanceof Error ? error42.message : String(error42) ); } } @@ -122754,8 +123593,8 @@ var FastMCP = class extends FastMCPEventEmitter { this.emit("connect", { session }); - } else if (config2.transportType === "httpStream") { - const httpConfig = config2.httpStream; + } else if (config3.transportType === "httpStream") { + const httpConfig = config3.httpStream; if (httpConfig.stateless) { this.#logger.info( `[FastMCP info] Starting server in stateless mode on HTTP Stream at http://${httpConfig.host}:${httpConfig.port}${httpConfig.endpoint}` @@ -122920,8 +123759,8 @@ var FastMCP = class extends FastMCPEventEmitter { } return; } - } catch (error41) { - this.#logger.error("[FastMCP error] health endpoint error", error41); + } catch (error42) { + this.#logger.error("[FastMCP error] health endpoint error", error42); } } const oauthConfig = this.#options.oauth; @@ -123180,7 +124019,7 @@ function GetCheckSuiteLogsTool(ctx) { completed_at: job.completed_at, logs: logsText }; - } catch (error41) { + } catch (error42) { return { job_id: job.id, job_name: job.name, @@ -123188,7 +124027,7 @@ function GetCheckSuiteLogsTool(ctx) { conclusion: job.conclusion, started_at: job.started_at, completed_at: job.completed_at, - error: `failed to fetch logs: ${error41}` + error: `failed to fetch logs: ${error42}` }; } }) @@ -123224,8 +124063,8 @@ var DebugShellCommandTool = tool({ command: "git status", output: result.trim() }); - } catch (error41) { - return handleToolError(error41); + } catch (error42) { + return handleToolError(error42); } } }); @@ -123288,8 +124127,8 @@ var ListFilesTool = tool({ trackedCount: gitFiles.length, untrackedCount }); - } catch (error41) { - return handleToolError(error41); + } catch (error42) { + return handleToolError(error42); } } }); @@ -123389,9 +124228,9 @@ function CommitFilesTool(ctx) { `Commit blocked: secrets detected in file ${file}. Please remove any sensitive information (API keys, tokens, passwords) before committing.` ); } - } catch (error41) { - if (error41 instanceof Error && error41.message.includes("Commit blocked")) { - throw error41; + } catch (error42) { + if (error42 instanceof Error && error42.message.includes("Commit blocked")) { + throw error42; } } } @@ -123599,12 +124438,12 @@ function IssueInfoTool(ctx) { description: "Retrieve GitHub issue information by issue number", parameters: IssueInfo, execute: execute(ctx, async ({ issue_number }) => { - const issue2 = await ctx.octokit.rest.issues.get({ + const issue3 = await ctx.octokit.rest.issues.get({ owner: ctx.owner, repo: ctx.name, issue_number }); - const data = issue2.data; + const data = issue3.data; ctx.toolState.issueNumber = issue_number; const hints = []; if (data.comments > 0) { @@ -123820,8 +124659,8 @@ function StartReviewTool(ctx) { reviewId = result.data.id; reviewNodeId = result.data.node_id; log.debug(`created new pending review: id=${reviewId}`); - } catch (error41) { - const errorMessage = error41 instanceof Error ? error41.message : String(error41); + } catch (error42) { + const errorMessage = error42 instanceof Error ? error42.message : String(error42); log.debug(`createReview failed: ${errorMessage}`); if (errorMessage.includes("pending review")) { log.debug(`pending review already exists, fetching existing review...`); @@ -123835,7 +124674,7 @@ function StartReviewTool(ctx) { reviewNodeId = existing.node_id; log.debug(`reusing existing pending review: id=${reviewId}`); } else { - throw error41; + throw error42; } } const scratchpadId = randomBytes(4).toString("hex"); @@ -124210,7 +125049,7 @@ async function startMcpHttpServer(ctx) { } // prep/installNodeDependencies.ts -import { existsSync as existsSync4 } from "node:fs"; +import { existsSync as existsSync3 } from "node:fs"; import { join as join9 } from "node:path"; // ../node_modules/.pnpm/package-manager-detector@1.6.0/node_modules/package-manager-detector/dist/commands.mjs @@ -124461,7 +125300,7 @@ async function detect(options = {}) { return null; } function getNameAndVer(pkg) { - const handelVer = (version2) => version2?.match(/\d+(\.\d+){0,2}/)?.[0] ?? version2; + const handelVer = (version3) => version3?.match(/\d+(\.\d+){0,2}/)?.[0] ?? version3; if (typeof pkg.packageManager === "string") { const [name, ver] = pkg.packageManager.replace(/^\^/, "").split("@"); return { name, ver: handelVer(ver) }; @@ -124483,17 +125322,17 @@ async function handlePackageManager(filepath, options) { if (nameAndVer) { const name = nameAndVer.name; const ver = nameAndVer.ver; - let version2 = ver; + let version3 = ver; if (name === "yarn" && ver && Number.parseInt(ver) > 1) { agent2 = "yarn@berry"; - version2 = "berry"; - return { name, agent: agent2, version: version2 }; + version3 = "berry"; + return { name, agent: agent2, version: version3 }; } else if (name === "pnpm" && ver && Number.parseInt(ver) < 7) { agent2 = "pnpm@6"; - return { name, agent: agent2, version: version2 }; + return { name, agent: agent2, version: version3 }; } else if (AGENTS.includes(name)) { agent2 = name; - return { name, agent: agent2, version: version2 }; + return { name, agent: agent2, version: version3 }; } else { return options.onUnknown?.(pkg.packageManager) ?? null; } @@ -124544,7 +125383,7 @@ var installNodeDependencies = { name: "installNodeDependencies", shouldRun: () => { const packageJsonPath = join9(process.cwd(), "package.json"); - return existsSync4(packageJsonPath); + return existsSync3(packageJsonPath); }, run: async () => { const detected = await detect({ cwd: process.cwd() }); @@ -124604,7 +125443,7 @@ var installNodeDependencies = { }; // prep/installPythonDependencies.ts -import { existsSync as existsSync5 } from "node:fs"; +import { existsSync as existsSync4 } from "node:fs"; import { join as join10 } from "node:path"; var PYTHON_CONFIGS = [ { @@ -124677,12 +125516,12 @@ var installPythonDependencies = { return false; } const cwd2 = process.cwd(); - return PYTHON_CONFIGS.some((config2) => existsSync5(join10(cwd2, config2.file))); + return PYTHON_CONFIGS.some((config3) => existsSync4(join10(cwd2, config3.file))); }, run: async () => { const cwd2 = process.cwd(); - const config2 = PYTHON_CONFIGS.find((c) => existsSync5(join10(cwd2, c.file))); - if (!config2) { + const config3 = PYTHON_CONFIGS.find((c) => existsSync4(join10(cwd2, c.file))); + if (!config3) { return { language: "python", packageManager: "pip", @@ -124691,22 +125530,22 @@ var installPythonDependencies = { issues: ["no python config file found"] }; } - log.info(`\u{1F40D} detected python config: ${config2.file} (using ${config2.tool})`); - const isAvailable = await isCommandAvailable2(config2.tool); + log.info(`\u{1F40D} detected python config: ${config3.file} (using ${config3.tool})`); + const isAvailable = await isCommandAvailable2(config3.tool); if (!isAvailable) { - log.info(`${config2.tool} not found, attempting to install...`); - const installError = await installTool(config2.tool); + log.info(`${config3.tool} not found, attempting to install...`); + const installError = await installTool(config3.tool); if (installError) { return { language: "python", - packageManager: config2.tool, - configFile: config2.file, + packageManager: config3.tool, + configFile: config3.file, dependenciesInstalled: false, issues: [installError] }; } } - const [cmd, ...args3] = config2.installCmd; + const [cmd, ...args3] = config3.installCmd; log.info(`running: ${cmd} ${args3.join(" ")}`); const result = await spawn4({ cmd, @@ -124717,16 +125556,16 @@ var installPythonDependencies = { if (result.exitCode !== 0) { return { language: "python", - packageManager: config2.tool, - configFile: config2.file, + packageManager: config3.tool, + configFile: config3.file, dependenciesInstalled: false, issues: [result.stderr || `${cmd} exited with code ${result.exitCode}`] }; } return { language: "python", - packageManager: config2.tool, - configFile: config2.file, + packageManager: config3.tool, + configFile: config3.file, dependenciesInstalled: true, issues: [] }; @@ -124771,12 +125610,12 @@ function getProgressCommentIdFromEnv2() { return null; } async function reportErrorToComment({ - error: error41, + error: error42, title }) { const formattedError = title ? `${title} -${error41}` : `\u274C ${error41}`; +${error42}` : `\u274C ${error42}`; let commentId = getProgressCommentIdFromEnv2(); if (!commentId) { const runId = process.env.GITHUB_RUN_ID; @@ -124829,9 +125668,9 @@ function setupGitConfig() { }); } log.debug("setupGitConfig: \u2713 Git configuration set successfully (scoped to repo)"); - } catch (error41) { + } catch (error42) { log.warning( - `Failed to set git config: ${error41 instanceof Error ? error41.message : String(error41)}` + `Failed to set git config: ${error42 instanceof Error ? error42.message : String(error42)}` ); } } @@ -124868,8 +125707,8 @@ var Timer = class { } checkpoint(name) { const now = Date.now(); - const duration2 = this.lastCheckpointTimestamp ? now - this.lastCheckpointTimestamp : now - this.initialTimestamp; - log.info(`${name}: ${duration2}ms`); + const duration4 = this.lastCheckpointTimestamp ? now - this.lastCheckpointTimestamp : now - this.initialTimestamp; + log.info(`${name}: ${duration4}ms`); this.lastCheckpointTimestamp = now; } }; @@ -124927,8 +125766,8 @@ To use "Fix \u{1F44D}s", add a \u{1F44D} reaction to one or more inline review c const result = await runAgent(ctx); const mainResult = await handleAgentResult(result); return mainResult; - } catch (error41) { - const errorMessage = error41 instanceof Error ? error41.message : "Unknown error occurred"; + } catch (error42) { + const errorMessage = error42 instanceof Error ? error42.message : "Unknown error occurred"; log.error(errorMessage); try { await reportErrorToComment({ error: errorMessage }); @@ -125221,8 +126060,8 @@ async function run() { if (!result.success) { throw new Error(result.error || "Agent execution failed"); } - } catch (error41) { - const errorMessage = error41 instanceof Error ? error41.message : "Unknown error occurred"; + } catch (error42) { + const errorMessage = error42 instanceof Error ? error42.message : "Unknown error occurred"; core3.setFailed(`Action failed: ${errorMessage}`); } }