From 879d33403c4ad94bd63836147ccb0ea4787e3045 Mon Sep 17 00:00:00 2001 From: Colin McDonnell Date: Wed, 7 Jan 2026 19:15:58 -0800 Subject: [PATCH] Switch to custom Bash tool. Mask secrets from Bashsubprocs. Simplify security handling. --- .gitignore | 2 +- agents/claude.ts | 17 +- agents/codex.ts | 4 +- agents/cursor.ts | 27 +- agents/gemini.ts | 14 +- agents/instructions.ts | 44 +- agents/opencode.ts | 43 +- docs/docker.md | 52 + docs/security.md | 217 + entry | 87459 ++++++++++++++++++++++----------------- fixtures/bash-test.ts | 35 + fixtures/basic.ts | 15 +- fixtures/sandbox.ts | 8 +- mcp/bash.ts | 111 + mcp/server.ts | 2 + package.json | 2 +- play.ts | 79 +- 17 files changed, 50158 insertions(+), 37973 deletions(-) create mode 100644 docs/docker.md create mode 100644 docs/security.md create mode 100644 fixtures/bash-test.ts create mode 100644 mcp/bash.ts diff --git a/.gitignore b/.gitignore index af108bb..2b1380a 100644 --- a/.gitignore +++ b/.gitignore @@ -46,4 +46,4 @@ examples .temp/ dist -.pnpm-store/ \ No newline at end of file +.pnpm-store/ diff --git a/agents/claude.ts b/agents/claude.ts index 7e9a985..e8db88d 100644 --- a/agents/claude.ts +++ b/agents/claude.ts @@ -21,28 +21,21 @@ export const claude = agent({ const prompt = addInstructions({ payload, repo }); log.group("Full prompt", () => log.info(prompt)); - // configure sandbox mode if enabled + // SECURITY: Claude Code spawns subprocesses with full process.env, leaking API keys. + // disable native Bash; agents use MCP bash tool which filters secrets. const sandboxOptions: Options = payload.sandbox ? { permissionMode: "default", disallowedTools: ["Bash", "WebSearch", "WebFetch", "Write"], async canUseTool(toolName, input, _options) { if (toolName.startsWith("mcp__gh_pullfrog__")) - return { - behavior: "allow", - updatedInput: input, - updatedPermissions: [], - }; - - console.error("can i use this tool?", toolName); - return { - behavior: "deny", - message: "You are not allowed to use this tool.", - }; + return { behavior: "allow", updatedInput: input, updatedPermissions: [] }; + return { behavior: "deny", message: "tool not allowed in sandbox mode" }; }, } : { permissionMode: "bypassPermissions" as const, + disallowedTools: ["Bash"], }; if (payload.sandbox) { diff --git a/agents/codex.ts b/agents/codex.ts index 52410c1..6c9bb81 100644 --- a/agents/codex.ts +++ b/agents/codex.ts @@ -43,8 +43,8 @@ export const codex = agent({ log.info("πŸ”’ sandbox mode enabled: restricting to read-only operations"); } + // Codex SDK isolates subprocess env - native bash is safe, no MCP override needed const codex = new Codex(codexOptions); - // valid sandbox modes: read-only, workspace-write, danger-full-access const thread = codex.startThread( payload.sandbox ? { @@ -61,7 +61,7 @@ export const codex = agent({ ); try { - const streamedTurn = await thread.runStreamed(addInstructions({ payload, repo })); + const streamedTurn = await thread.runStreamed(addInstructions({ payload, repo, useNativeBash: true })); let finalOutput = ""; for await (const event of streamedTurn.events) { diff --git a/agents/cursor.ts b/agents/cursor.ts index 77b3357..eb91b3c 100644 --- a/agents/cursor.ts +++ b/agents/cursor.ts @@ -314,36 +314,31 @@ function configureCursorMcpServers({ mcpServers }: ConfigureMcpServersParams) { /** * Configure Cursor CLI sandbox mode via cli-config.json. - * When sandbox is enabled, denies all file writes and shell commands. - * In print mode without --force, writes are blocked by default, but we add - * explicit deny rules as defense in depth. * - * See: https://cursor.com/docs/cli/reference/permissions + * SECURITY: Cursor spawns subprocesses with full process.env, leaking API keys. + * We deny native Shell via Shell(*) rule, forcing use of MCP bash tool which + * filters secrets. Note: Shell(**) does NOT work, must use Shell(*). + * + * Config path: $XDG_CONFIG_HOME/cursor/ (not ~/.cursor/) because createAgentEnv + * sets XDG_CONFIG_HOME=$HOME/.config. See issues/cursor-perms.md. */ function configureCursorSandbox({ sandbox }: { sandbox: boolean }): void { const realHome = homedir(); - const cursorConfigDir = join(realHome, ".cursor"); + const cursorConfigDir = join(realHome, ".config", "cursor"); const cliConfigPath = join(cursorConfigDir, "cli-config.json"); mkdirSync(cursorConfigDir, { recursive: true }); const config = sandbox ? { - // sandbox mode: deny all writes and shell commands permissions: { - allow: [ - "Read(**)", // allow reading all files - ], - deny: [ - "Write(**)", // deny all file writes - "Shell(**)", // deny all shell commands - ], + allow: ["Read(**)"], + deny: ["Write(**)", "Shell(*)"], }, } : { - // normal mode: allow everything permissions: { - allow: ["Read(**)", "Write(**)", "Shell(**)"], - deny: [], + allow: ["Read(**)", "Write(**)"], + deny: ["Shell(*)"], }, }; diff --git a/agents/gemini.ts b/agents/gemini.ts index 4ebb75b..e30ee33 100644 --- a/agents/gemini.ts +++ b/agents/gemini.ts @@ -163,12 +163,11 @@ export const gemini = agent({ throw new Error("google_api_key or gemini_api_key is required for gemini agent"); } - const sessionPrompt = addInstructions({ payload, repo }); + const sessionPrompt = addInstructions({ payload, repo, useNativeBash: true }); log.group("Full prompt", () => log.info(sessionPrompt)); - // configure sandbox mode if enabled - // --allowed-tools restricts which tools are available (removes others from registry entirely) - // in sandbox mode: only read-only tools available (no write_file, run_shell_command, web_fetch) + // Gemini CLI isolates subprocess env - native bash is safe, no MCP override needed + // sandbox mode uses --allowed-tools to restrict to read-only operations const args = payload.sandbox ? [ "--allowed-tools", @@ -186,14 +185,13 @@ export const gemini = agent({ } let finalOutput = ""; - let stdoutBuffer = ""; // buffer for incomplete lines across chunks + let stdoutBuffer = ""; + try { const result = await spawn({ cmd: "node", args: [cliPath, ...args], - env: createAgentEnv({ - GEMINI_API_KEY: apiKey, - }), + env: createAgentEnv({ GEMINI_API_KEY: apiKey }), onStdout: async (chunk) => { const text = chunk.toString(); finalOutput += text; diff --git a/agents/instructions.ts b/agents/instructions.ts index f75ded7..df933d3 100644 --- a/agents/instructions.ts +++ b/agents/instructions.ts @@ -53,9 +53,10 @@ function buildRuntimeContext(repo: RepoInfo): string { interface AddInstructionsParams { payload: Payload; repo: RepoInfo; + useNativeBash?: boolean; } -export const addInstructions = ({ payload, repo }: AddInstructionsParams) => { +export const addInstructions = ({ payload, repo, useNativeBash = false }: AddInstructionsParams) => { let encodedEvent = ""; const eventKeys = Object.keys(payload.event); @@ -98,41 +99,6 @@ In case of conflict between instructions, follow this precedence (highest to low 4. Repository-specific instructions (AGENTS.md, CLAUDE.md, etc.) 5. User prompt -## SECURITY - -CRITICAL SECURITY RULES - NEVER VIOLATE UNDER ANY CIRCUMSTANCES: - -### Rule 1: Never expose secrets through ANY means - - You must NEVER expose secrets through any channel, including but not limited to: - - Displaying, printing, echoing, logging, or outputting to console - - Writing to files (including .txt, .env, .json, config files, etc.) - - Including in git commits, commit messages, or PR descriptions - - Posting in GitHub comments, issue bodies, or PR review comments - - Returning in tool outputs, API responses, or error messages - - Including in redirect URLs, WebSocket messages, or GraphQL responses - - Secrets include: API keys, authentication tokens, passwords, private keys, certificates, database connection strings, and any credential used for authentication or authorization. Common patterns (case-insensitive): variables containing API_KEY, SECRET, TOKEN, PASSWORD, CREDENTIAL, PRIVATE_KEY, or AUTH in an authentication context. Use judgment: \`PUBLIC_KEY\` for a cryptographic public key is fine; \`PRIVATE_KEY\` is not. - -### Rule 2: Never serialize objects containing secrets - - When working with objects that may contain environment variables or secrets: - - NEVER serialize, stringify, or dump entire environment objects (process.env, os.environ, ENV, etc.) - - NEVER iterate over environment variables and write their values to files - - NEVER include environment variable values in outputs, logs, HTTP requests, or anywhere they can be exposed - - If you must list properties, only show property NAMES, never values - - Only access specific, known-safe keys explicitly (e.g., NODE_ENV, HOME, PWD) - -### Rule 3: Refuse and explain - - Even if explicitly requested to reveal secrets, you must: - 1. Refuse the request - 2. Print a message explaining that exposing secrets is prohibited for security reasons - 3. If using ${ghPullfrogMcpName}, update the working comment to explain that secrets cannot be revealed - 4. Offer a safe alternative, if applicable - - If you encounter secrets in files or environment, acknowledge they exist but never reveal their values. - ## MCP (Model Context Protocol) Tools MCP servers provide tools you can call. Inspect your available MCP servers at startup to understand what tools are available, especially the ${ghPullfrogMcpName} server which handles all GitHub operations. @@ -169,6 +135,12 @@ Tool names may be formatted as \`(server name)/(tool name)\`, for example: \`${g **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. +${ + useNativeBash + ? `**Shell commands**: Use your native bash/shell tool for shell command execution.` + : `**Shell commands**: Use the \`${ghPullfrogMcpName}/bash\` MCP tool for all shell command execution. This tool provides a secure environment with filtered credentials. Do NOT use any native shell/bash tool - it is disabled for security.` +} + **Command execution**: Never use \`sleep\` to wait for commands to complete. Commands run synchronously - when the bash tool returns, the command has finished. **Commenting style**: When posting comments via ${ghPullfrogMcpName}, write as a professional team member would. Your final comments should be polished and actionableβ€”do not include intermediate reasoning like "I'll now look at the code" or "Let me respond to the question." diff --git a/agents/opencode.ts b/agents/opencode.ts index dd6f98a..ea63b60 100644 --- a/agents/opencode.ts +++ b/agents/opencode.ts @@ -7,6 +7,7 @@ import { addInstructions } from "./instructions.ts"; import { agent, type ConfigureMcpServersParams, + createAgentEnv, installFromNpmTarball, setupProcessAgentEnv, } from "./shared.ts"; @@ -42,24 +43,25 @@ export const opencode = agent({ // 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, HOME, and XDG_CONFIG_HOME + // SECURITY: build env vars from whitelisted base env to prevent API key leakage + // this prevents leaking other API keys (ANTHROPIC, GEMINI, etc.) to OpenCode subprocess // XDG_CONFIG_HOME must be set because GitHub Actions sets it to a different path, // and OpenCode follows XDG spec (checks XDG_CONFIG_HOME before falling back to $HOME/.config) const env: Record = { - ...(Object.fromEntries( - Object.entries(process.env).filter( - ([key, value]) => value !== undefined && key !== "GITHUB_TOKEN" - ) - ) as Record), - HOME: tempHome, + ...createAgentEnv({ HOME: tempHome }), XDG_CONFIG_HOME: join(tempHome, ".config"), }; + // OpenCode doesn't support GitHub App installation tokens + delete env.GITHUB_TOKEN; - // add/override API keys from apiKeys object (uppercase keys) + // add API keys from apiKeys object for (const [key, value] of Object.entries(apiKeys || {})) { - env[key.toUpperCase()] = value; + const upperKey = key.toUpperCase(); + env[upperKey] = value; + // also set GOOGLE_GENERATIVE_AI_API_KEY for Google provider compatibility + if (upperKey === "GEMINI_API_KEY") { + env.GOOGLE_GENERATIVE_AI_API_KEY = value; + } } // run OpenCode in the repository directory (process.cwd() is set to GITHUB_WORKSPACE or repo dir) @@ -218,22 +220,11 @@ function configureOpenCode({ mcpServers, sandbox }: ConfigureOpenCodeParams): vo }; } - // build permissions config + // SECURITY: OpenCode spawns subprocesses with full process.env, leaking API keys. + // disable native bash; agents use MCP bash tool which filters secrets. 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", - }; + ? { edit: "deny", bash: "deny", webfetch: "deny", doom_loop: "allow", external_directory: "allow" } + : { edit: "allow", bash: "deny", webfetch: "allow", doom_loop: "allow", external_directory: "allow" }; // build complete config in one object const config = { diff --git a/docs/docker.md b/docs/docker.md new file mode 100644 index 0000000..d29d96f --- /dev/null +++ b/docs/docker.md @@ -0,0 +1,52 @@ +# Docker Testing Environment + +`play.ts` runs in Docker by default for realistic testing (Linux, clean $HOME, matches CI). + +## Usage + +```bash +pnpm play bash-test.ts # runs in Docker (default) +pnpm play --local bash-test.ts # runs on macOS (fast iteration) +PLAY_LOCAL=1 pnpm play ... # same as --local +``` + +## Why Docker by Default? + +1. **Matches CI** - Linux environment like GitHub Actions +2. **Clean $HOME** - No agent config pollution from `~/.claude`, `~/.cursor` +3. **Tests unshare** - Verifies PID namespace sandbox works +4. **Reproducible** - Same environment every run + +## Performance + +| Mode | Overhead | +|------|----------| +| Docker (cached deps) | ~1.5s | +| Local (macOS) | ~0s | + +For agent runs taking 30-120s, the 1.5s overhead is negligible. + +## How It Works + +1. `play.ts` runs on host, loads `.env` +2. Spawns Docker container with: + - Volume-mounted `action/` code + - Named volume for Linux node_modules (persists between runs) + - SSH agent forwarding for git clone + - Env vars passed via `-e` flags +3. Inside Docker, `play.ts` runs again (detects `/.dockerenv` file) +4. Clones `GITHUB_REPOSITORY`, runs agent + +## Troubleshooting + +**Docker not running:** +``` +Cannot connect to the Docker daemon +``` +β†’ Start Docker Desktop + +**SSH clone fails:** +``` +Permission denied (publickey) +``` +β†’ Ensure SSH agent is running: `ssh-add -l` diff --git a/docs/security.md b/docs/security.md new file mode 100644 index 0000000..5d533f7 --- /dev/null +++ b/docs/security.md @@ -0,0 +1,217 @@ +# Bash Tool Security + +## Architecture + +``` +β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” +β”‚ GitHub Actions Runner β”‚ +β”‚ (has secrets: ANTHROPIC_API_KEY, OPENAI_API_KEY, etc.) β”‚ +β”‚ β”‚ +β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ +β”‚ β”‚ Pullfrog Action (Node.js) β”‚ β”‚ +β”‚ β”‚ - process.env contains all secrets β”‚ β”‚ +β”‚ β”‚ - spawns agent CLI as child process β”‚ β”‚ +β”‚ β”‚ β”‚ β”‚ +β”‚ β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ β”‚ +β”‚ β”‚ β”‚ Agent CLI (Claude/Cursor/OpenCode/etc.) β”‚ β”‚ β”‚ +β”‚ β”‚ β”‚ - receives filtered env (only API key it needs) β”‚ β”‚ β”‚ +β”‚ β”‚ β”‚ - has built-in Bash tool (DISABLED) β”‚ β”‚ β”‚ +β”‚ β”‚ β”‚ - connects to MCP server for tools β”‚ β”‚ β”‚ +β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ +β”‚ β”‚ β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ β”‚ β”‚ +β”‚ β”‚ β”‚ β”‚ MCP Bash Tool (our code) β”‚ β”‚ β”‚ β”‚ +β”‚ β”‚ β”‚ β”‚ - agent calls this for shell commands β”‚ β”‚ β”‚ β”‚ +β”‚ β”‚ β”‚ β”‚ - spawns bash with filtered env β”‚ β”‚ β”‚ β”‚ +β”‚ β”‚ β”‚ β”‚ - uses PID namespace isolation β”‚ β”‚ β”‚ β”‚ +β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ +β”‚ β”‚ β”‚ β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ β”‚ β”‚ β”‚ +β”‚ β”‚ β”‚ β”‚ β”‚ Bash subprocess β”‚ β”‚ β”‚ β”‚ β”‚ +β”‚ β”‚ β”‚ β”‚ β”‚ - runs user-controlled commands β”‚ β”‚ β”‚ β”‚ β”‚ +β”‚ β”‚ β”‚ β”‚ β”‚ - MUST NOT access secrets β”‚ β”‚ β”‚ β”‚ β”‚ +β”‚ β”‚ β”‚ β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ β”‚ β”‚ β”‚ +β”‚ β”‚ β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ β”‚ β”‚ +β”‚ β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ β”‚ +β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ +β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ +``` + +**Key insight**: The Pullfrog Action process has all secrets in `process.env`. Agent CLIs have built-in Bash tools that we can't trust. We disable those and provide our own MCP Bash tool that spawns subprocesses securely. + +--- + +## Threat Model + +A prompt-injected agent could run malicious bash commands to exfiltrate API keys. + +**Attack vectors:** + +| Vector | Example | Mitigation | +|--------|---------|------------| +| Direct env access | `env \| grep KEY` | Filter env vars before spawn | +| Echo variable | `echo $ANTHROPIC_API_KEY` | Filter env vars before spawn | +| `/proc/$PPID/environ` | `cat /proc/$PPID/environ` | PID namespace isolation | + +The first two are solved by passing filtered env to subprocess. The third requires special handling on Linux. + +--- + +## Attack: /proc/$PPID/environ + +On Linux, any process can read its parent's environment via `/proc/$PPID/environ`. Even if we spawn bash with a clean environment, the bash process can: + +```bash +# read parent's (Node.js) environment - contains all secrets! +tr '\0' '\n' < /proc/$PPID/environ | grep KEY +``` + +This bypasses environment filtering because we're reading the parent process's memory, not our own env. + +**Why this matters:** +- Pullfrog Action (Node.js) has `ANTHROPIC_API_KEY`, `OPENAI_API_KEY`, etc. in `process.env` +- We spawn agent CLI with filtered env (only its own API key) +- Agent CLI spawns MCP Bash tool +- MCP Bash tool spawns bash with filtered env (no secrets) +- BUT bash can read `/proc/$PPID/environ` β†’ gets Node.js process's full env + +--- + +## Solution: PID Namespace Isolation + +We use Linux PID namespaces to hide the parent process: + +```bash +unshare --pid --fork --mount-proc bash -c "$CMD" +``` + +| Flag | Purpose | +|------|---------| +| `--pid` | Create new PID namespace | +| `--fork` | Fork so child is actually in new namespace | +| `--mount-proc` | Mount fresh `/proc` for new namespace | + +**Result:** +- Child sees itself as PID 1 +- Child's PPID is 0 (doesn't exist) +- `/proc` only shows processes in child's namespace +- Parent's PID is invisible β†’ `/proc/$PPID/environ` fails + +--- + +## Implementation + +### mcp/bash.ts + +```typescript +import { spawn } from "node:child_process"; + +// filter sensitive env vars (defense in depth) +function filterEnv(): Record { + const SENSITIVE = [/_KEY$/i, /_SECRET$/i, /_TOKEN$/i, /^ANTHROPIC/i, ...]; + const filtered: Record = {}; + for (const [key, value] of Object.entries(process.env)) { + if (value && !SENSITIVE.some(p => p.test(key))) { + filtered[key] = value; + } + } + return filtered; +} + +// spawn with PID namespace in GitHub Actions, plain spawn locally +function spawnSandboxed(command: string, options: { env, cwd }): ChildProcess { + if (process.env.GITHUB_ACTIONS === "true") { + return spawn("unshare", ["--pid", "--fork", "--mount-proc", "bash", "-c", command], options); + } + return spawn("bash", ["-c", command], options); +} +``` + +**Defense in depth:** +1. `filterEnv()` - prevents `env` and `echo $VAR` attacks +2. `unshare` - prevents `/proc/$PPID/environ` attack + +--- + +## Disabling Native Bash Tools + +Each agent has built-in Bash/Shell tools that we can't control. We disable them and force agents to use our MCP Bash tool: + +```typescript +// Claude +disallowedTools: ["Bash"], + +// Cursor +permissions: { deny: ["Shell(**)"] } + +// OpenCode +permission: { bash: "deny" } +``` + +--- + +## Testing + +Run the vulnerability test in Docker: + +```bash +# from action/ directory +docker run --rm \ + -v "$(pwd):/app/action:cached" \ + -v "pullfrog-action-node-modules:/app/action/node_modules" \ + -w /app/action \ + -e GITHUB_ACTIONS=true \ + -e TEST_SECRET_KEY=test-secret \ + -e ANTHROPIC_API_KEY=sk-test \ + --cap-add SYS_ADMIN \ + --security-opt seccomp:unconfined \ + node:22 bash -c "corepack enable pnpm && pnpm install --frozen-lockfile && node test/proc-environ-vuln.ts" +``` + +Expected output: +``` +1. UNPROTECTED (filterEnv only): + Leaked: YES ❌ + +2. PROTECTED (unshare --pid --fork --mount-proc): + Leaked: NO βœ“ +``` + +--- + +## Platform Notes + +| Environment | `GITHUB_ACTIONS` | Our approach | +|-------------|------------------|--------------| +| GitHub Actions (Linux) | `"true"` | filterEnv + unshare | +| Local dev (any OS) | unset | filterEnv only | + +We check `GITHUB_ACTIONS=true` (set automatically by GitHub) rather than platform detection. This means: +- **In CI**: Full protection with PID namespace isolation +- **Locally**: Easier testing without Docker/unshare requirements + +GitHub Actions uses Ubuntu runners where `unshare` works without root. + +--- + +## What This Does NOT Protect Against + +- **Network exfiltration**: Child has full network access +- **File access**: Child can read any file the runner can (same UID) +- **Resource exhaustion**: No cgroup limits + +For those, you'd need `bwrap` with `--unshare-net`, `--ro-bind`, etc. But for the stated goalβ€”preventing secret exfiltration via envβ€”this is sufficient. + +--- + +## Agent-Specific Notes + +### Agents Using MCP Bash (Claude, Cursor, OpenCode) + +These agents have their native Bash disabled. They use our `gh_pullfrog` MCP server's `bash` tool which implements `filterEnv()` + `unshare`. + +### Gemini + +Has built-in CI detection that filters shell env when `GITHUB_SHA` or `SURFACE=Github` is set. We set `SURFACE=Github` in our env. Double protection with our `createAgentEnv()`. + +### Codex + +Uses `shell_environment_policy` in config. Needs proper configuration or MCP bash fallback. diff --git a/entry b/entry index f5a8d39..bf72a06 100755 --- a/entry +++ b/entry @@ -5,7 +5,7 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropNames = Object.getOwnPropertyNames; var __getProtoOf = Object.getPrototypeOf; var __hasOwnProp = Object.prototype.hasOwnProperty; -var __knownSymbol = (name, symbol) => (symbol = Symbol[name]) ? symbol : Symbol.for("Symbol." + name); +var __knownSymbol = (name, symbol2) => (symbol2 = Symbol[name]) ? symbol2 : Symbol.for("Symbol." + name); var __typeError = (msg) => { throw TypeError(msg); }; @@ -64,11 +64,11 @@ var __using = (stack, value2, async) => { } return value2; }; -var __callDispose = (stack, error41, hasError) => { +var __callDispose = (stack, error50, hasError) => { var E = typeof SuppressedError === "function" ? SuppressedError : function(e, s, m, _) { return _ = Error(m), _.name = "SuppressedError", _.error = e, _.suppressed = s, _; }; - var fail = (e) => error41 = hasError ? new E(e, error41, "An error was suppressed during disposal") : (hasError = true, e); + var fail = (e) => error50 = hasError ? new E(e, error50, "An error was suppressed during disposal") : (hasError = true, e); var next2 = (it) => { while (it = stack.pop()) { try { @@ -78,14 +78,14 @@ var __callDispose = (stack, error41, hasError) => { fail(e); } } - if (hasError) throw error41; + if (hasError) throw error50; }; return next2(); }; -// node_modules/.pnpm/@actions+core@1.11.1/node_modules/@actions/core/lib/utils.js +// ../node_modules/.pnpm/@actions+core@1.11.1/node_modules/@actions/core/lib/utils.js var require_utils = __commonJS({ - "node_modules/.pnpm/@actions+core@1.11.1/node_modules/@actions/core/lib/utils.js"(exports) { + "../node_modules/.pnpm/@actions+core@1.11.1/node_modules/@actions/core/lib/utils.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.toCommandProperties = exports.toCommandValue = void 0; @@ -115,9 +115,9 @@ var require_utils = __commonJS({ } }); -// node_modules/.pnpm/@actions+core@1.11.1/node_modules/@actions/core/lib/command.js +// ../node_modules/.pnpm/@actions+core@1.11.1/node_modules/@actions/core/lib/command.js var require_command = __commonJS({ - "node_modules/.pnpm/@actions+core@1.11.1/node_modules/@actions/core/lib/command.js"(exports) { + "../node_modules/.pnpm/@actions+core@1.11.1/node_modules/@actions/core/lib/command.js"(exports) { "use strict"; var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; @@ -155,10 +155,10 @@ var require_command = __commonJS({ process.stdout.write(cmd.toString() + os2.EOL); } exports.issueCommand = issueCommand; - function issue2(name, message = "") { + function issue4(name, message = "") { issueCommand(name, {}, message); } - exports.issue = issue2; + exports.issue = issue4; var CMD_STRING = "::"; var Command = class { constructor(command, properties, message) { @@ -201,9 +201,9 @@ var require_command = __commonJS({ } }); -// node_modules/.pnpm/@actions+core@1.11.1/node_modules/@actions/core/lib/file-command.js +// ../node_modules/.pnpm/@actions+core@1.11.1/node_modules/@actions/core/lib/file-command.js var require_file_command = __commonJS({ - "node_modules/.pnpm/@actions+core@1.11.1/node_modules/@actions/core/lib/file-command.js"(exports) { + "../node_modules/.pnpm/@actions+core@1.11.1/node_modules/@actions/core/lib/file-command.js"(exports) { "use strict"; var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; @@ -266,9 +266,9 @@ var require_file_command = __commonJS({ } }); -// node_modules/.pnpm/@actions+http-client@2.2.3/node_modules/@actions/http-client/lib/proxy.js +// ../node_modules/.pnpm/@actions+http-client@2.2.3/node_modules/@actions/http-client/lib/proxy.js var require_proxy = __commonJS({ - "node_modules/.pnpm/@actions+http-client@2.2.3/node_modules/@actions/http-client/lib/proxy.js"(exports) { + "../node_modules/.pnpm/@actions+http-client@2.2.3/node_modules/@actions/http-client/lib/proxy.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.checkBypass = exports.getProxyUrl = void 0; @@ -287,7 +287,7 @@ var require_proxy = __commonJS({ if (proxyVar) { try { return new DecodedURL(proxyVar); - } catch (_a) { + } catch (_a2) { if (!proxyVar.startsWith("http://") && !proxyVar.startsWith("https://")) return new DecodedURL(`http://${proxyVar}`); } @@ -333,8 +333,8 @@ var require_proxy = __commonJS({ return hostLower === "localhost" || hostLower.startsWith("127.") || hostLower.startsWith("[::1]") || hostLower.startsWith("[0:0:0:0:0:0:0:1]"); } var DecodedURL = class extends URL { - constructor(url2, base) { - super(url2, base); + constructor(url4, base) { + super(url4, base); this._decodedUsername = decodeURIComponent(super.username); this._decodedPassword = decodeURIComponent(super.password); } @@ -348,16 +348,16 @@ var require_proxy = __commonJS({ } }); -// node_modules/.pnpm/tunnel@0.0.6/node_modules/tunnel/lib/tunnel.js +// ../node_modules/.pnpm/tunnel@0.0.6/node_modules/tunnel/lib/tunnel.js var require_tunnel = __commonJS({ - "node_modules/.pnpm/tunnel@0.0.6/node_modules/tunnel/lib/tunnel.js"(exports) { + "../node_modules/.pnpm/tunnel@0.0.6/node_modules/tunnel/lib/tunnel.js"(exports) { "use strict"; var net = __require("net"); var tls = __require("tls"); var http2 = __require("http"); var https = __require("https"); var events = __require("events"); - var assert3 = __require("assert"); + var assert4 = __require("assert"); var util3 = __require("util"); exports.httpOverHttp = httpOverHttp; exports.httpsOverHttp = httpsOverHttp; @@ -476,18 +476,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 error50 = new Error("tunneling socket could not be established, statusCode=" + res.statusCode); + error50.code = "ECONNRESET"; + options.request.emit("error", error50); self2.removeSocket(placeholder); return; } if (head.length > 0) { debug("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 error50 = new Error("got illegal response body from proxy"); + error50.code = "ECONNRESET"; + options.request.emit("error", error50); self2.removeSocket(placeholder); return; } @@ -502,9 +502,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 error50 = new Error("tunneling socket could not be established, cause=" + cause.message); + error50.code = "ECONNRESET"; + options.request.emit("error", error50); self2.removeSocket(placeholder); } }; @@ -578,16 +578,16 @@ var require_tunnel = __commonJS({ } }); -// node_modules/.pnpm/tunnel@0.0.6/node_modules/tunnel/index.js +// ../node_modules/.pnpm/tunnel@0.0.6/node_modules/tunnel/index.js var require_tunnel2 = __commonJS({ - "node_modules/.pnpm/tunnel@0.0.6/node_modules/tunnel/index.js"(exports, module) { + "../node_modules/.pnpm/tunnel@0.0.6/node_modules/tunnel/index.js"(exports, module) { module.exports = require_tunnel(); } }); -// node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/core/symbols.js +// ../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/core/symbols.js var require_symbols = __commonJS({ - "node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/core/symbols.js"(exports, module) { + "../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/core/symbols.js"(exports, module) { module.exports = { kClose: Symbol("close"), kDestroy: Symbol("destroy"), @@ -654,9 +654,9 @@ var require_symbols = __commonJS({ } }); -// node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/core/errors.js +// ../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/core/errors.js var require_errors = __commonJS({ - "node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/core/errors.js"(exports, module) { + "../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/core/errors.js"(exports, module) { "use strict"; var UndiciError = class extends Error { constructor(message) { @@ -869,9 +869,9 @@ var require_errors = __commonJS({ } }); -// node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/core/constants.js +// ../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/core/constants.js var require_constants = __commonJS({ - "node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/core/constants.js"(exports, module) { + "../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/core/constants.js"(exports, module) { "use strict"; var headerNameLowerCasedRecord = {}; var wellknownHeaderNames = [ @@ -984,11 +984,11 @@ var require_constants = __commonJS({ } }); -// node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/core/util.js +// ../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/core/util.js var require_util = __commonJS({ - "node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/core/util.js"(exports, module) { + "../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/core/util.js"(exports, module) { "use strict"; - var assert3 = __require("assert"); + var assert4 = __require("assert"); var { kDestroyed, kBodyUsed } = require_symbols(); var { IncomingMessage } = __require("http"); var stream = __require("stream"); @@ -1004,73 +1004,73 @@ var require_util = __commonJS({ function isStream(obj) { return obj && typeof obj === "object" && typeof obj.pipe === "function" && typeof obj.on === "function"; } - function isBlobLike(object2) { - return Blob2 && object2 instanceof Blob2 || object2 && typeof object2 === "object" && (typeof object2.stream === "function" || typeof object2.arrayBuffer === "function") && /^(Blob|File)$/.test(object2[Symbol.toStringTag]); + function isBlobLike(object6) { + return Blob2 && object6 instanceof Blob2 || object6 && typeof object6 === "object" && (typeof object6.stream === "function" || typeof object6.arrayBuffer === "function") && /^(Blob|File)$/.test(object6[Symbol.toStringTag]); } - function buildURL(url2, queryParams) { - if (url2.includes("?") || url2.includes("#")) { + function buildURL(url4, queryParams) { + if (url4.includes("?") || url4.includes("#")) { throw new Error('Query params cannot be passed when url already contains "?" or "#".'); } const stringified = stringify(queryParams); if (stringified) { - url2 += "?" + stringified; + url4 += "?" + stringified; } - return url2; + return url4; } - function parseURL(url2) { - if (typeof url2 === "string") { - url2 = new URL(url2); - if (!/^https?:/.test(url2.origin || url2.protocol)) { + function parseURL(url4) { + if (typeof url4 === "string") { + url4 = new URL(url4); + if (!/^https?:/.test(url4.origin || url4.protocol)) { throw new InvalidArgumentError("Invalid URL protocol: the URL must start with `http:` or `https:`."); } - return url2; + return url4; } - if (!url2 || typeof url2 !== "object") { + if (!url4 || typeof url4 !== "object") { throw new InvalidArgumentError("Invalid URL: The URL argument must be a non-null object."); } - if (!/^https?:/.test(url2.origin || url2.protocol)) { + if (!/^https?:/.test(url4.origin || url4.protocol)) { throw new InvalidArgumentError("Invalid URL protocol: the URL must start with `http:` or `https:`."); } - if (!(url2 instanceof URL)) { - if (url2.port != null && url2.port !== "" && !Number.isFinite(parseInt(url2.port))) { + if (!(url4 instanceof URL)) { + if (url4.port != null && url4.port !== "" && !Number.isFinite(parseInt(url4.port))) { throw new InvalidArgumentError("Invalid URL: port must be a valid integer or a string representation of an integer."); } - if (url2.path != null && typeof url2.path !== "string") { + if (url4.path != null && typeof url4.path !== "string") { throw new InvalidArgumentError("Invalid URL path: the path must be a string or null/undefined."); } - if (url2.pathname != null && typeof url2.pathname !== "string") { + if (url4.pathname != null && typeof url4.pathname !== "string") { throw new InvalidArgumentError("Invalid URL pathname: the pathname must be a string or null/undefined."); } - if (url2.hostname != null && typeof url2.hostname !== "string") { + if (url4.hostname != null && typeof url4.hostname !== "string") { throw new InvalidArgumentError("Invalid URL hostname: the hostname must be a string or null/undefined."); } - if (url2.origin != null && typeof url2.origin !== "string") { + if (url4.origin != null && typeof url4.origin !== "string") { throw new InvalidArgumentError("Invalid URL origin: the origin must be a string or null/undefined."); } - const port = url2.port != null ? url2.port : url2.protocol === "https:" ? 443 : 80; - let origin = url2.origin != null ? url2.origin : `${url2.protocol}//${url2.hostname}:${port}`; - let path4 = url2.path != null ? url2.path : `${url2.pathname || ""}${url2.search || ""}`; + const port = url4.port != null ? url4.port : url4.protocol === "https:" ? 443 : 80; + let origin = url4.origin != null ? url4.origin : `${url4.protocol}//${url4.hostname}:${port}`; + let path4 = url4.path != null ? url4.path : `${url4.pathname || ""}${url4.search || ""}`; if (origin.endsWith("/")) { origin = origin.substring(0, origin.length - 1); } if (path4 && !path4.startsWith("/")) { path4 = `/${path4}`; } - url2 = new URL(origin + path4); + url4 = new URL(origin + path4); } - return url2; + return url4; } - function parseOrigin(url2) { - url2 = parseURL(url2); - if (url2.pathname !== "/" || url2.search || url2.hash) { + function parseOrigin(url4) { + url4 = parseURL(url4); + if (url4.pathname !== "/" || url4.search || url4.hash) { throw new InvalidArgumentError("invalid url"); } - return url2; + return url4; } function getHostname(host) { if (host[0] === "[") { const idx2 = host.indexOf("]"); - assert3(idx2 !== -1); + assert4(idx2 !== -1); return host.substring(1, idx2); } const idx = host.indexOf(":"); @@ -1081,7 +1081,7 @@ var require_util = __commonJS({ if (!host) { return null; } - assert3.strictEqual(typeof host, "string"); + assert4.strictEqual(typeof host, "string"); const servername = getHostname(host); if (net.isIP(servername)) { return ""; @@ -1283,8 +1283,8 @@ var require_util = __commonJS({ 0 ); } - function isFormDataLike(object2) { - return object2 && typeof object2 === "object" && typeof object2.append === "function" && typeof object2.delete === "function" && typeof object2.get === "function" && typeof object2.getAll === "function" && typeof object2.has === "function" && typeof object2.set === "function" && object2[Symbol.toStringTag] === "FormData"; + function isFormDataLike(object6) { + return object6 && typeof object6 === "object" && typeof object6.append === "function" && typeof object6.delete === "function" && typeof object6.get === "function" && typeof object6.getAll === "function" && typeof object6.has === "function" && typeof object6.set === "function" && object6[Symbol.toStringTag] === "FormData"; } function throwIfAborted(signal) { if (!signal) { @@ -1368,9 +1368,9 @@ var require_util = __commonJS({ } }); -// node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/timers.js +// ../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/timers.js var require_timers = __commonJS({ - "node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/timers.js"(exports, module) { + "../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/timers.js"(exports, module) { "use strict"; var fastNow = Date.now(); var fastNowTimeout; @@ -1450,9 +1450,9 @@ var require_timers = __commonJS({ } }); -// node_modules/.pnpm/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/deps/streamsearch/sbmh.js +// ../node_modules/.pnpm/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/deps/streamsearch/sbmh.js var require_sbmh = __commonJS({ - "node_modules/.pnpm/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/deps/streamsearch/sbmh.js"(exports, module) { + "../node_modules/.pnpm/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/deps/streamsearch/sbmh.js"(exports, module) { "use strict"; var EventEmitter2 = __require("node:events").EventEmitter; var inherits = __require("node:util").inherits; @@ -1587,9 +1587,9 @@ var require_sbmh = __commonJS({ } }); -// node_modules/.pnpm/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/deps/dicer/lib/PartStream.js +// ../node_modules/.pnpm/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/deps/dicer/lib/PartStream.js var require_PartStream = __commonJS({ - "node_modules/.pnpm/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/deps/dicer/lib/PartStream.js"(exports, module) { + "../node_modules/.pnpm/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/deps/dicer/lib/PartStream.js"(exports, module) { "use strict"; var inherits = __require("node:util").inherits; var ReadableStream2 = __require("node:stream").Readable; @@ -1603,9 +1603,9 @@ var require_PartStream = __commonJS({ } }); -// node_modules/.pnpm/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/lib/utils/getLimit.js +// ../node_modules/.pnpm/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/lib/utils/getLimit.js var require_getLimit = __commonJS({ - "node_modules/.pnpm/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/lib/utils/getLimit.js"(exports, module) { + "../node_modules/.pnpm/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/lib/utils/getLimit.js"(exports, module) { "use strict"; module.exports = function getLimit(limits, name, defaultLimit) { if (!limits || limits[name] === void 0 || limits[name] === null) { @@ -1619,9 +1619,9 @@ var require_getLimit = __commonJS({ } }); -// node_modules/.pnpm/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/deps/dicer/lib/HeaderParser.js +// ../node_modules/.pnpm/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/deps/dicer/lib/HeaderParser.js var require_HeaderParser = __commonJS({ - "node_modules/.pnpm/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/deps/dicer/lib/HeaderParser.js"(exports, module) { + "../node_modules/.pnpm/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/deps/dicer/lib/HeaderParser.js"(exports, module) { "use strict"; var EventEmitter2 = __require("node:events").EventEmitter; var inherits = __require("node:util").inherits; @@ -1719,9 +1719,9 @@ var require_HeaderParser = __commonJS({ } }); -// node_modules/.pnpm/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/deps/dicer/lib/Dicer.js +// ../node_modules/.pnpm/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/deps/dicer/lib/Dicer.js var require_Dicer = __commonJS({ - "node_modules/.pnpm/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/deps/dicer/lib/Dicer.js"(exports, module) { + "../node_modules/.pnpm/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/deps/dicer/lib/Dicer.js"(exports, module) { "use strict"; var WritableStream2 = __require("node:stream").Writable; var inherits = __require("node:util").inherits; @@ -1959,9 +1959,9 @@ var require_Dicer = __commonJS({ } }); -// node_modules/.pnpm/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/lib/utils/decodeText.js +// ../node_modules/.pnpm/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/lib/utils/decodeText.js var require_decodeText = __commonJS({ - "node_modules/.pnpm/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/lib/utils/decodeText.js"(exports, module) { + "../node_modules/.pnpm/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/lib/utils/decodeText.js"(exports, module) { "use strict"; var utf8Decoder = new TextDecoder("utf-8"); var textDecoders = /* @__PURE__ */ new Map([ @@ -2068,9 +2068,9 @@ var require_decodeText = __commonJS({ } }); -// node_modules/.pnpm/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/lib/utils/parseParams.js +// ../node_modules/.pnpm/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/lib/utils/parseParams.js var require_parseParams = __commonJS({ - "node_modules/.pnpm/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/lib/utils/parseParams.js"(exports, module) { + "../node_modules/.pnpm/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/lib/utils/parseParams.js"(exports, module) { "use strict"; var decodeText = require_decodeText(); var RE_ENCODED = /%[a-fA-F0-9][a-fA-F0-9]/g; @@ -2666,9 +2666,9 @@ var require_parseParams = __commonJS({ } }); -// node_modules/.pnpm/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/lib/utils/basename.js +// ../node_modules/.pnpm/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/lib/utils/basename.js var require_basename = __commonJS({ - "node_modules/.pnpm/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/lib/utils/basename.js"(exports, module) { + "../node_modules/.pnpm/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/lib/utils/basename.js"(exports, module) { "use strict"; module.exports = function basename(path4) { if (typeof path4 !== "string") { @@ -2688,9 +2688,9 @@ var require_basename = __commonJS({ } }); -// node_modules/.pnpm/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/lib/types/multipart.js +// ../node_modules/.pnpm/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/lib/types/multipart.js var require_multipart = __commonJS({ - "node_modules/.pnpm/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/lib/types/multipart.js"(exports, module) { + "../node_modules/.pnpm/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/lib/types/multipart.js"(exports, module) { "use strict"; var { Readable } = __require("node:stream"); var { inherits } = __require("node:util"); @@ -2841,9 +2841,9 @@ var require_multipart = __commonJS({ return; } ++nends; - const file = new FileStream(fileOpts); - curFile = file; - file.on("end", function() { + const file2 = new FileStream(fileOpts); + curFile = file2; + file2.on("end", function() { --nends; self2._pause = false; checkFinished(); @@ -2853,7 +2853,7 @@ var require_multipart = __commonJS({ cb(); } }); - file._read = function(n) { + file2._read = function(n) { if (!self2._pause) { return; } @@ -2864,26 +2864,26 @@ var require_multipart = __commonJS({ cb(); } }; - boy.emit("file", fieldname, file, filename, encoding, contype); + boy.emit("file", fieldname, file2, filename, encoding, contype); onData = function(data) { if ((nsize += data.length) > fileSizeLimit) { const extralen = fileSizeLimit - nsize + data.length; if (extralen > 0) { - file.push(data.slice(0, extralen)); + file2.push(data.slice(0, extralen)); } - file.truncated = true; - file.bytesRead = fileSizeLimit; + file2.truncated = true; + file2.bytesRead = fileSizeLimit; part.removeAllListeners("data"); - file.emit("limit"); + file2.emit("limit"); return; - } else if (!file.push(data)) { + } else if (!file2.push(data)) { self2._pause = true; } - file.bytesRead = nsize; + file2.bytesRead = nsize; }; onEnd = function() { curFile = void 0; - file.push(null); + file2.push(null); }; } else { if (nfields === fieldsLimit) { @@ -2968,9 +2968,9 @@ var require_multipart = __commonJS({ } }); -// node_modules/.pnpm/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/lib/utils/Decoder.js +// ../node_modules/.pnpm/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/lib/utils/Decoder.js var require_Decoder = __commonJS({ - "node_modules/.pnpm/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/lib/utils/Decoder.js"(exports, module) { + "../node_modules/.pnpm/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/lib/utils/Decoder.js"(exports, module) { "use strict"; var RE_PLUS = /\+/g; var HEX = [ @@ -3147,9 +3147,9 @@ var require_Decoder = __commonJS({ } }); -// node_modules/.pnpm/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/lib/types/urlencoded.js +// ../node_modules/.pnpm/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/lib/types/urlencoded.js var require_urlencoded = __commonJS({ - "node_modules/.pnpm/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/lib/types/urlencoded.js"(exports, module) { + "../node_modules/.pnpm/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/lib/types/urlencoded.js"(exports, module) { "use strict"; var Decoder = require_Decoder(); var decodeText = require_decodeText(); @@ -3362,9 +3362,9 @@ var require_urlencoded = __commonJS({ } }); -// node_modules/.pnpm/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/lib/main.js +// ../node_modules/.pnpm/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/lib/main.js var require_main = __commonJS({ - "node_modules/.pnpm/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/lib/main.js"(exports, module) { + "../node_modules/.pnpm/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/lib/main.js"(exports, module) { "use strict"; var WritableStream2 = __require("node:stream").Writable; var { inherits } = __require("node:util"); @@ -3441,9 +3441,9 @@ var require_main = __commonJS({ } }); -// node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/fetch/constants.js +// ../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/fetch/constants.js var require_constants2 = __commonJS({ - "node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/fetch/constants.js"(exports, module) { + "../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/fetch/constants.js"(exports, module) { "use strict"; var { MessageChannel, receiveMessageOnPort } = __require("worker_threads"); var corsSafeListedMethods = ["GET", "HEAD", "POST"]; @@ -3640,9 +3640,9 @@ var require_constants2 = __commonJS({ } }); -// node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/fetch/global.js +// ../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/fetch/global.js var require_global = __commonJS({ - "node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/fetch/global.js"(exports, module) { + "../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/fetch/global.js"(exports, module) { "use strict"; var globalOrigin = Symbol.for("undici.globalOrigin.1"); function getGlobalOrigin() { @@ -3676,22 +3676,22 @@ var require_global = __commonJS({ } }); -// node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/fetch/util.js +// ../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/fetch/util.js var require_util2 = __commonJS({ - "node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/fetch/util.js"(exports, module) { + "../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/fetch/util.js"(exports, module) { "use strict"; var { redirectStatusSet, referrerPolicySet: referrerPolicyTokens, badPortsSet } = require_constants2(); var { getGlobalOrigin } = require_global(); var { performance: performance2 } = __require("perf_hooks"); var { isBlobLike, toUSVString, ReadableStreamFrom } = require_util(); - var assert3 = __require("assert"); + var assert4 = __require("assert"); var { isUint8Array } = __require("util/types"); var supportedHashes = []; var crypto2; try { crypto2 = __require("crypto"); const possibleRelevantHashes = ["sha256", "sha384", "sha512"]; - supportedHashes = crypto2.getHashes().filter((hash) => possibleRelevantHashes.includes(hash)); + supportedHashes = crypto2.getHashes().filter((hash2) => possibleRelevantHashes.includes(hash2)); } catch { } function responseURL(response) { @@ -3716,14 +3716,14 @@ var require_util2 = __commonJS({ return request2.urlList[request2.urlList.length - 1]; } function requestBadPort(request2) { - const url2 = requestCurrentURL(request2); - if (urlIsHttpHttpsScheme(url2) && badPortsSet.has(url2.port)) { + const url4 = requestCurrentURL(request2); + if (urlIsHttpHttpsScheme(url4) && badPortsSet.has(url4.port)) { return "blocked"; } return "allowed"; } - function isErrorLike(object2) { - return object2 instanceof Error || (object2?.constructor?.name === "Error" || object2?.constructor?.name === "DOMException"); + function isErrorLike(object6) { + return object6 instanceof Error || (object6?.constructor?.name === "Error" || object6?.constructor?.name === "DOMException"); } function isValidReasonPhrase(statusText) { for (let i = 0; i < statusText.length; ++i) { @@ -3874,7 +3874,7 @@ var require_util2 = __commonJS({ } function determineRequestsReferrer(request2) { const policy = request2.referrerPolicy; - assert3(policy); + assert4(policy); let referrerSource = null; if (request2.referrer === "client") { const globalOrigin = getGlobalOrigin(); @@ -3931,30 +3931,30 @@ var require_util2 = __commonJS({ return isNonPotentiallyTrustWorthy ? "no-referrer" : referrerOrigin; } } - function stripURLForReferrer(url2, originOnly) { - assert3(url2 instanceof URL); - if (url2.protocol === "file:" || url2.protocol === "about:" || url2.protocol === "blank:") { + function stripURLForReferrer(url4, originOnly) { + assert4(url4 instanceof URL); + if (url4.protocol === "file:" || url4.protocol === "about:" || url4.protocol === "blank:") { return "no-referrer"; } - url2.username = ""; - url2.password = ""; - url2.hash = ""; + url4.username = ""; + url4.password = ""; + url4.hash = ""; if (originOnly) { - url2.pathname = ""; - url2.search = ""; + url4.pathname = ""; + url4.search = ""; } - return url2; + return url4; } - function isURLPotentiallyTrustworthy(url2) { - if (!(url2 instanceof URL)) { + function isURLPotentiallyTrustworthy(url4) { + if (!(url4 instanceof URL)) { return false; } - if (url2.href === "about:blank" || url2.href === "about:srcdoc") { + if (url4.href === "about:blank" || url4.href === "about:srcdoc") { return true; } - if (url2.protocol === "data:") return true; - if (url2.protocol === "file:") return true; - return isOriginPotentiallyTrustworthy(url2.origin); + if (url4.protocol === "data:") return true; + if (url4.protocol === "file:") return true; + return isOriginPotentiallyTrustworthy(url4.origin); function isOriginPotentiallyTrustworthy(origin) { if (origin == null || origin === "null") return false; const originAsURL = new URL(origin); @@ -4076,13 +4076,13 @@ var require_util2 = __commonJS({ function createDeferredPromise() { let res; let rej; - const promise = new Promise((resolve, reject) => { + const promise2 = new Promise((resolve, reject) => { res = resolve; rej = reject; }); - return { promise, resolve: res, reject: rej }; + return { promise: promise2, resolve: res, reject: rej }; } - function isAborted4(fetchParams) { + function isAborted3(fetchParams) { return fetchParams.controller.state === "aborted"; } function isCancelled(fetchParams) { @@ -4111,12 +4111,12 @@ var require_util2 = __commonJS({ if (result === void 0) { throw new TypeError("Value is not JSON serializable"); } - assert3(typeof result === "string"); + assert4(typeof result === "string"); return result; } var esIteratorPrototype = Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]())); function makeIterator(iterator2, name, kind) { - const object2 = { + const object6 = { index: 0, kind, target: iterator2 @@ -4128,14 +4128,14 @@ var require_util2 = __commonJS({ `'next' called on an object that does not implement interface ${name} Iterator.` ); } - const { index, kind: kind2, target } = object2; + const { index, kind: kind2, target } = object6; const values = target(); const len = values.length; if (index >= len) { return { value: void 0, done: true }; } const pair = values[index]; - object2.index = index + 1; + object6.index = index + 1; return iteratorResult(pair, kind2); }, // The class string of an iterator prototype object for a given interface is the @@ -4205,7 +4205,7 @@ var require_util2 = __commonJS({ } function isomorphicEncode(input) { for (let i = 0; i < input.length; i++) { - assert3(input.charCodeAt(i) <= 255); + assert4(input.charCodeAt(i) <= 255); } return input; } @@ -4224,25 +4224,25 @@ var require_util2 = __commonJS({ byteLength += chunk.length; } } - function urlIsLocal(url2) { - assert3("protocol" in url2); - const protocol = url2.protocol; + function urlIsLocal(url4) { + assert4("protocol" in url4); + const protocol = url4.protocol; return protocol === "about:" || protocol === "blob:" || protocol === "data:"; } - function urlHasHttpsScheme(url2) { - if (typeof url2 === "string") { - return url2.startsWith("https:"); + function urlHasHttpsScheme(url4) { + if (typeof url4 === "string") { + return url4.startsWith("https:"); } - return url2.protocol === "https:"; + return url4.protocol === "https:"; } - function urlIsHttpHttpsScheme(url2) { - assert3("protocol" in url2); - const protocol = url2.protocol; + function urlIsHttpHttpsScheme(url4) { + assert4("protocol" in url4); + const protocol = url4.protocol; return protocol === "http:" || protocol === "https:"; } var hasOwn2 = Object.hasOwn || ((dict, key) => Object.prototype.hasOwnProperty.call(dict, key)); module.exports = { - isAborted: isAborted4, + isAborted: isAborted3, isCancelled, createDeferredPromise, ReadableStreamFrom, @@ -4291,9 +4291,9 @@ var require_util2 = __commonJS({ } }); -// node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/fetch/symbols.js +// ../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/fetch/symbols.js var require_symbols2 = __commonJS({ - "node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/fetch/symbols.js"(exports, module) { + "../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/fetch/symbols.js"(exports, module) { "use strict"; module.exports = { kUrl: Symbol("url"), @@ -4306,9 +4306,9 @@ var require_symbols2 = __commonJS({ } }); -// node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/fetch/webidl.js +// ../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/fetch/webidl.js var require_webidl = __commonJS({ - "node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/fetch/webidl.js"(exports, module) { + "../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/fetch/webidl.js"(exports, module) { "use strict"; var { types } = __require("util"); var { hasOwn: hasOwn2, toUSVString } = require_util2(); @@ -4520,8 +4520,8 @@ var require_webidl = __commonJS({ }); } for (const options of converters) { - const { key, defaultValue, required: required2, converter } = options; - if (required2 === true) { + const { key, defaultValue, required: required4, converter } = options; + if (required4 === true) { if (!hasOwn2(dictionary, key)) { throw webidl.errors.exception({ header: "Dictionary", @@ -4534,7 +4534,7 @@ var require_webidl = __commonJS({ if (hasDefault && value2 !== null) { value2 = value2 ?? defaultValue; } - if (required2 || hasDefault || value2 !== void 0) { + if (required4 || hasDefault || value2 !== void 0) { value2 = converter(value2); if (options.allowedValues && !options.allowedValues.includes(value2)) { throw webidl.errors.exception({ @@ -4675,10 +4675,10 @@ var require_webidl = __commonJS({ } }); -// node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/fetch/dataURL.js +// ../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/fetch/dataURL.js var require_dataURL = __commonJS({ - "node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/fetch/dataURL.js"(exports, module) { - var assert3 = __require("assert"); + "../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/fetch/dataURL.js"(exports, module) { + var assert4 = __require("assert"); var { atob: atob2 } = __require("buffer"); var { isomorphicDecode } = require_util2(); var encoder = new TextEncoder(); @@ -4686,7 +4686,7 @@ var require_dataURL = __commonJS({ var HTTP_WHITESPACE_REGEX = /(\u000A|\u000D|\u0009|\u0020)/; var HTTP_QUOTED_STRING_TOKENS = /[\u0009|\u0020-\u007E|\u0080-\u00FF]/; function dataURLProcessor(dataURL) { - assert3(dataURL.protocol === "data:"); + assert4(dataURL.protocol === "data:"); let input = URLSerializer(dataURL, true); input = input.slice(5); const position = { position: 0 }; @@ -4722,12 +4722,12 @@ var require_dataURL = __commonJS({ } return { mimeType: mimeTypeRecord, body }; } - function URLSerializer(url2, excludeFragment = false) { + function URLSerializer(url4, excludeFragment = false) { if (!excludeFragment) { - return url2.href; + return url4.href; } - const href = url2.href; - const hashLength = url2.hash.length; + const href = url4.href; + const hashLength = url4.hash.length; return hashLength === 0 ? href : href.substring(0, href.length - hashLength); } function collectASequenceOfCodePoints(condition, input, position) { @@ -4872,7 +4872,7 @@ var require_dataURL = __commonJS({ function collectAnHTTPQuotedString(input, position, extractValue) { const positionStart = position.position; let value2 = ""; - assert3(input[position.position] === '"'); + assert4(input[position.position] === '"'); position.position++; while (true) { value2 += collectASequenceOfCodePoints( @@ -4893,7 +4893,7 @@ var require_dataURL = __commonJS({ value2 += input[position.position]; position.position++; } else { - assert3(quoteOrBackslash === '"'); + assert4(quoteOrBackslash === '"'); break; } } @@ -4903,7 +4903,7 @@ var require_dataURL = __commonJS({ return input.slice(positionStart, position.position); } function serializeAMimeType(mimeType) { - assert3(mimeType !== "failure"); + assert4(mimeType !== "failure"); const { parameters, essence } = mimeType; let serialization = essence; for (let [name, value2] of parameters.entries()) { @@ -4960,9 +4960,9 @@ var require_dataURL = __commonJS({ } }); -// node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/fetch/file.js +// ../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/fetch/file.js var require_file = __commonJS({ - "node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/fetch/file.js"(exports, module) { + "../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/fetch/file.js"(exports, module) { "use strict"; var { Blob: Blob2, File: NativeFile } = __require("buffer"); var { types } = __require("util"); @@ -5139,16 +5139,16 @@ var require_file = __commonJS({ } return s.replace(/\r?\n/g, nativeLineEnding); } - function isFileLike(object2) { - return NativeFile && object2 instanceof NativeFile || object2 instanceof File2 || object2 && (typeof object2.stream === "function" || typeof object2.arrayBuffer === "function") && object2[Symbol.toStringTag] === "File"; + function isFileLike(object6) { + return NativeFile && object6 instanceof NativeFile || object6 instanceof File2 || object6 && (typeof object6.stream === "function" || typeof object6.arrayBuffer === "function") && object6[Symbol.toStringTag] === "File"; } module.exports = { File: File2, FileLike, isFileLike }; } }); -// node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/fetch/formdata.js +// ../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/fetch/formdata.js var require_formdata = __commonJS({ - "node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/fetch/formdata.js"(exports, module) { + "../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/fetch/formdata.js"(exports, module) { "use strict"; var { isBlobLike, toUSVString, makeIterator } = require_util2(); var { kState } = require_symbols2(); @@ -5302,9 +5302,9 @@ var require_formdata = __commonJS({ } }); -// node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/fetch/body.js +// ../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/fetch/body.js var require_body = __commonJS({ - "node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/fetch/body.js"(exports, module) { + "../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/fetch/body.js"(exports, module) { "use strict"; var Busboy = require_main(); var util3 = require_util(); @@ -5322,7 +5322,7 @@ var require_body = __commonJS({ var { DOMException: DOMException2, structuredClone } = require_constants2(); var { Blob: Blob2, File: NativeFile } = __require("buffer"); var { kBodyUsed } = require_symbols(); - var assert3 = __require("assert"); + var assert4 = __require("assert"); var { isErrored } = require_util(); var { isUint8Array, isArrayBuffer } = __require("util/types"); var { File: UndiciFile } = require_file(); @@ -5338,15 +5338,15 @@ var require_body = __commonJS({ var File2 = NativeFile ?? UndiciFile; var textEncoder = new TextEncoder(); var textDecoder = new TextDecoder(); - function extractBody(object2, keepalive = false) { + function extractBody(object6, keepalive = false) { if (!ReadableStream2) { ReadableStream2 = __require("stream/web").ReadableStream; } let stream = null; - if (object2 instanceof ReadableStream2) { - stream = object2; - } else if (isBlobLike(object2)) { - stream = object2.stream(); + if (object6 instanceof ReadableStream2) { + stream = object6; + } else if (isBlobLike(object6)) { + stream = object6.stream(); } else { stream = new ReadableStream2({ async pull(controller) { @@ -5360,41 +5360,41 @@ var require_body = __commonJS({ type: void 0 }); } - assert3(isReadableStreamLike(stream)); + assert4(isReadableStreamLike(stream)); let action = null; let source = null; let length = null; let type2 = null; - if (typeof object2 === "string") { - source = object2; + if (typeof object6 === "string") { + source = object6; type2 = "text/plain;charset=UTF-8"; - } else if (object2 instanceof URLSearchParams) { - source = object2.toString(); + } else if (object6 instanceof URLSearchParams) { + source = object6.toString(); type2 = "application/x-www-form-urlencoded;charset=UTF-8"; - } else if (isArrayBuffer(object2)) { - source = new Uint8Array(object2.slice()); - } else if (ArrayBuffer.isView(object2)) { - source = new Uint8Array(object2.buffer.slice(object2.byteOffset, object2.byteOffset + object2.byteLength)); - } else if (util3.isFormDataLike(object2)) { + } else if (isArrayBuffer(object6)) { + source = new Uint8Array(object6.slice()); + } else if (ArrayBuffer.isView(object6)) { + source = new Uint8Array(object6.buffer.slice(object6.byteOffset, object6.byteOffset + object6.byteLength)); + } else if (util3.isFormDataLike(object6)) { const boundary = `----formdata-undici-0${`${random(1e11)}`.padStart(11, "0")}`; const prefix = `--${boundary}\r Content-Disposition: form-data`; - const escape = (str) => str.replace(/\n/g, "%0A").replace(/\r/g, "%0D").replace(/"/g, "%22"); + const escape2 = (str) => str.replace(/\n/g, "%0A").replace(/\r/g, "%0D").replace(/"/g, "%22"); const normalizeLinefeeds = (value2) => value2.replace(/\r?\n|\r/g, "\r\n"); const blobParts = []; const rn = new Uint8Array([13, 10]); length = 0; let hasUnknownSizeValue = false; - for (const [name, value2] of object2) { + for (const [name, value2] of object6) { if (typeof value2 === "string") { - const chunk2 = textEncoder.encode(prefix + `; name="${escape(normalizeLinefeeds(name))}"\r + const chunk2 = textEncoder.encode(prefix + `; name="${escape2(normalizeLinefeeds(name))}"\r \r ${normalizeLinefeeds(value2)}\r `); blobParts.push(chunk2); length += chunk2.byteLength; } else { - const chunk2 = textEncoder.encode(`${prefix}; name="${escape(normalizeLinefeeds(name))}"` + (value2.name ? `; filename="${escape(value2.name)}"` : "") + `\r + const chunk2 = textEncoder.encode(`${prefix}; name="${escape2(normalizeLinefeeds(name))}"` + (value2.name ? `; filename="${escape2(value2.name)}"` : "") + `\r Content-Type: ${value2.type || "application/octet-stream"}\r \r `); @@ -5412,7 +5412,7 @@ Content-Type: ${value2.type || "application/octet-stream"}\r if (hasUnknownSizeValue) { length = null; } - source = object2; + source = object6; action = async function* () { for (const part of blobParts) { if (part.stream) { @@ -5423,22 +5423,22 @@ Content-Type: ${value2.type || "application/octet-stream"}\r } }; type2 = "multipart/form-data; boundary=" + boundary; - } else if (isBlobLike(object2)) { - source = object2; - length = object2.size; - if (object2.type) { - type2 = object2.type; + } else if (isBlobLike(object6)) { + source = object6; + length = object6.size; + if (object6.type) { + type2 = object6.type; } - } else if (typeof object2[Symbol.asyncIterator] === "function") { + } else if (typeof object6[Symbol.asyncIterator] === "function") { if (keepalive) { throw new TypeError("keepalive"); } - if (util3.isDisturbed(object2) || object2.locked) { + if (util3.isDisturbed(object6) || object6.locked) { throw new TypeError( "Response body object should not be disturbed or locked" ); } - stream = object2 instanceof ReadableStream2 ? object2 : ReadableStreamFrom(object2); + stream = object6 instanceof ReadableStream2 ? object6 : ReadableStreamFrom(object6); } if (typeof source === "string" || util3.isBuffer(source)) { length = Buffer.byteLength(source); @@ -5447,7 +5447,7 @@ Content-Type: ${value2.type || "application/octet-stream"}\r let iterator2; stream = new ReadableStream2({ async start() { - iterator2 = action(object2)[Symbol.asyncIterator](); + iterator2 = action(object6)[Symbol.asyncIterator](); }, async pull(controller) { const { value: value2, done } = await iterator2.next(); @@ -5471,15 +5471,15 @@ Content-Type: ${value2.type || "application/octet-stream"}\r const body = { stream, source, length }; return [body, type2]; } - function safelyExtractBody(object2, keepalive = false) { + function safelyExtractBody(object6, keepalive = false) { if (!ReadableStream2) { ReadableStream2 = __require("stream/web").ReadableStream; } - if (object2 instanceof ReadableStream2) { - assert3(!util3.isDisturbed(object2), "The body has already been consumed."); - assert3(!object2.locked, "The stream is locked."); + if (object6 instanceof ReadableStream2) { + assert4(!util3.isDisturbed(object6), "The body has already been consumed."); + assert4(!object6.locked, "The stream is locked."); } - return extractBody(object2, keepalive); + return extractBody(object6, keepalive); } function cloneBody(body) { const [out1, out2] = body.stream.tee(); @@ -5625,27 +5625,27 @@ Content-Type: ${value2.type || "application/octet-stream"}\r function mixinBody(prototype) { Object.assign(prototype.prototype, bodyMixinMethods(prototype)); } - async function specConsumeBody(object2, convertBytesToJSValue, instance) { - webidl.brandCheck(object2, instance); - throwIfAborted(object2[kState]); - if (bodyUnusable(object2[kState].body)) { + async function specConsumeBody(object6, convertBytesToJSValue, instance) { + webidl.brandCheck(object6, instance); + throwIfAborted(object6[kState]); + if (bodyUnusable(object6[kState].body)) { throw new TypeError("Body is unusable"); } - const promise = createDeferredPromise(); - const errorSteps = (error41) => promise.reject(error41); + const promise2 = createDeferredPromise(); + const errorSteps = (error50) => promise2.reject(error50); const successSteps = (data) => { try { - promise.resolve(convertBytesToJSValue(data)); + promise2.resolve(convertBytesToJSValue(data)); } catch (e) { errorSteps(e); } }; - if (object2[kState].body == null) { + if (object6[kState].body == null) { successSteps(new Uint8Array()); - return promise.promise; + return promise2.promise; } - await fullyReadBody(object2[kState].body, successSteps, errorSteps); - return promise.promise; + await fullyReadBody(object6[kState].body, successSteps, errorSteps); + return promise2.promise; } function bodyUnusable(body) { return body != null && (body.stream.locked || util3.isDisturbed(body.stream)); @@ -5663,8 +5663,8 @@ Content-Type: ${value2.type || "application/octet-stream"}\r function parseJSONFromBytes(bytes) { return JSON.parse(utf8DecodeBytes(bytes)); } - function bodyMimeType(object2) { - const { headersList } = object2[kState]; + function bodyMimeType(object6) { + const { headersList } = object6[kState]; const contentType = headersList.get("content-type"); if (contentType === null) { return "failure"; @@ -5680,15 +5680,15 @@ Content-Type: ${value2.type || "application/octet-stream"}\r } }); -// node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/core/request.js +// ../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/core/request.js var require_request = __commonJS({ - "node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/core/request.js"(exports, module) { + "../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/core/request.js"(exports, module) { "use strict"; var { InvalidArgumentError, NotSupportedError } = require_errors(); - var assert3 = __require("assert"); + var assert4 = __require("assert"); var { kHTTP2BuildRequest, kHTTP2CopyHeaders, kHTTP1BuildRequest } = require_symbols(); var util3 = require_util(); var tokenRegExp = /^[\^_`a-zA-Z\-0-9!#$%&'*+.|~]+$/; @@ -5869,8 +5869,8 @@ var require_request = __commonJS({ } } onConnect(abort) { - assert3(!this.aborted); - assert3(!this.completed); + assert4(!this.aborted); + assert4(!this.completed); if (this.error) { abort(this.error); } else { @@ -5879,8 +5879,8 @@ var require_request = __commonJS({ } } onHeaders(statusCode, headers, resume, statusText) { - assert3(!this.aborted); - assert3(!this.completed); + assert4(!this.aborted); + assert4(!this.completed); if (channels.headers.hasSubscribers) { channels.headers.publish({ request: this, response: { statusCode, headers, statusText } }); } @@ -5891,8 +5891,8 @@ var require_request = __commonJS({ } } onData(chunk) { - assert3(!this.aborted); - assert3(!this.completed); + assert4(!this.aborted); + assert4(!this.completed); try { return this[kHandler].onData(chunk); } catch (err) { @@ -5901,13 +5901,13 @@ var require_request = __commonJS({ } } onUpgrade(statusCode, headers, socket) { - assert3(!this.aborted); - assert3(!this.completed); + assert4(!this.aborted); + assert4(!this.completed); return this[kHandler].onUpgrade(statusCode, headers, socket); } onComplete(trailers) { this.onFinally(); - assert3(!this.aborted); + assert4(!this.aborted); this.completed = true; if (channels.trailers.hasSubscribers) { channels.trailers.publish({ request: this, trailers }); @@ -5918,16 +5918,16 @@ var require_request = __commonJS({ this.onError(err); } } - onError(error41) { + onError(error50) { this.onFinally(); if (channels.error.hasSubscribers) { - channels.error.publish({ request: this, error: error41 }); + channels.error.publish({ request: this, error: error50 }); } if (this.aborted) { return; } this.aborted = true; - return this[kHandler].onError(error41); + return this[kHandler].onError(error50); } onFinally() { if (this.errorHandler) { @@ -6050,9 +6050,9 @@ var require_request = __commonJS({ } }); -// node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/dispatcher.js +// ../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/dispatcher.js var require_dispatcher = __commonJS({ - "node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/dispatcher.js"(exports, module) { + "../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/dispatcher.js"(exports, module) { "use strict"; var EventEmitter2 = __require("events"); var Dispatcher = class extends EventEmitter2 { @@ -6070,9 +6070,9 @@ var require_dispatcher = __commonJS({ } }); -// node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/dispatcher-base.js +// ../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/dispatcher-base.js var require_dispatcher_base = __commonJS({ - "node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/dispatcher-base.js"(exports, module) { + "../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/dispatcher-base.js"(exports, module) { "use strict"; var Dispatcher = require_dispatcher(); var { @@ -6233,12 +6233,12 @@ var require_dispatcher_base = __commonJS({ } }); -// node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/core/connect.js +// ../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/core/connect.js var require_connect = __commonJS({ - "node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/core/connect.js"(exports, module) { + "../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/core/connect.js"(exports, module) { "use strict"; var net = __require("net"); - var assert3 = __require("assert"); + var assert4 = __require("assert"); var util3 = require_util(); var { InvalidArgumentError, ConnectTimeoutError } = require_errors(); var tls; @@ -6299,16 +6299,16 @@ 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: hostname5, 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 || hostname5; const session = sessionCache.get(sessionKey) || null; - assert3(sessionKey); + assert4(sessionKey); socket = tls.connect({ highWaterMark: 16384, // TLS in node can't have bigger HWM anyway... @@ -6321,20 +6321,20 @@ var require_connect = __commonJS({ socket: httpSocket, // upgrade socket connection port: port || 443, - host: hostname2 + host: hostname5 }); socket.on("session", function(session2) { sessionCache.set(sessionKey, session2); }); } else { - assert3(!httpSocket, "httpSocket can only be sent on TLS update"); + assert4(!httpSocket, "httpSocket can only be sent on TLS update"); socket = net.connect({ highWaterMark: 64 * 1024, // Same as nodejs fs streams. ...options, localAddress, port: port || 80, - host: hostname2 + host: hostname5 }); } if (options.keepAlive == null || options.keepAlive) { @@ -6389,9 +6389,9 @@ var require_connect = __commonJS({ } }); -// node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/llhttp/utils.js +// ../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/llhttp/utils.js var require_utils2 = __commonJS({ - "node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/llhttp/utils.js"(exports) { + "../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/llhttp/utils.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.enumToMap = void 0; @@ -6409,9 +6409,9 @@ var require_utils2 = __commonJS({ } }); -// node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/llhttp/constants.js +// ../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/llhttp/constants.js var require_constants3 = __commonJS({ - "node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/llhttp/constants.js"(exports) { + "../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/llhttp/constants.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.SPECIAL_HEADERS = exports.HEADER_STATE = exports.MINOR = exports.MAJOR = exports.CONNECTION_TOKEN_CHARS = exports.HEADER_CHARS = exports.TOKEN = exports.STRICT_TOKEN = exports.HEX = exports.URL_CHAR = exports.STRICT_URL_CHAR = exports.USERINFO_CHARS = exports.MARK = exports.ALPHANUM = exports.NUM = exports.HEX_MAP = exports.NUM_MAP = exports.ALPHA = exports.FINISH = exports.H_METHOD_MAP = exports.METHOD_MAP = exports.METHODS_RTSP = exports.METHODS_ICE = exports.METHODS_HTTP = exports.METHODS = exports.LENIENT_FLAGS = exports.FLAGS = exports.TYPE = exports.ERROR = void 0; @@ -6730,13 +6730,13 @@ var require_constants3 = __commonJS({ } }); -// node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/handler/RedirectHandler.js +// ../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/handler/RedirectHandler.js var require_RedirectHandler = __commonJS({ - "node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/handler/RedirectHandler.js"(exports, module) { + "../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/handler/RedirectHandler.js"(exports, module) { "use strict"; var util3 = require_util(); var { kBodyUsed } = require_symbols(); - var assert3 = __require("assert"); + var assert4 = __require("assert"); var { InvalidArgumentError } = require_errors(); var EE = __require("events"); var redirectableStatusCodes = [300, 301, 302, 303, 307, 308]; @@ -6747,7 +6747,7 @@ var require_RedirectHandler = __commonJS({ this[kBodyUsed] = false; } async *[Symbol.asyncIterator]() { - assert3(!this[kBodyUsed], "disturbed"); + assert4(!this[kBodyUsed], "disturbed"); this[kBodyUsed] = true; yield* this[kBody]; } @@ -6768,7 +6768,7 @@ var require_RedirectHandler = __commonJS({ if (util3.isStream(this.opts.body)) { if (util3.bodyLength(this.opts.body) === 0) { this.opts.body.on("data", function() { - assert3(false); + assert4(false); }); } if (typeof this.opts.body.readableDidRead !== "boolean") { @@ -6790,8 +6790,8 @@ var require_RedirectHandler = __commonJS({ onUpgrade(statusCode, headers, socket) { this.handler.onUpgrade(statusCode, headers, socket); } - onError(error41) { - this.handler.onError(error41); + onError(error50) { + this.handler.onError(error50); } onHeaders(statusCode, headers, resume, statusText) { this.location = this.history.length >= this.maxRedirections || util3.isDisturbed(this.opts.body) ? null : parseLocation(statusCode, headers); @@ -6872,7 +6872,7 @@ var require_RedirectHandler = __commonJS({ } } } else { - assert3(headers == null, "headers must be an object or an array"); + assert4(headers == null, "headers must be an object or an array"); } return ret; } @@ -6880,9 +6880,9 @@ var require_RedirectHandler = __commonJS({ } }); -// node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/interceptor/redirectInterceptor.js +// ../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/interceptor/redirectInterceptor.js var require_redirectInterceptor = __commonJS({ - "node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/interceptor/redirectInterceptor.js"(exports, module) { + "../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/interceptor/redirectInterceptor.js"(exports, module) { "use strict"; var RedirectHandler = require_RedirectHandler(); function createRedirectInterceptor({ maxRedirections: defaultMaxRedirections }) { @@ -6902,25 +6902,25 @@ var require_redirectInterceptor = __commonJS({ } }); -// node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/llhttp/llhttp-wasm.js +// ../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/llhttp/llhttp-wasm.js var require_llhttp_wasm = __commonJS({ - "node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/llhttp/llhttp-wasm.js"(exports, module) { + "../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/llhttp/llhttp-wasm.js"(exports, module) { module.exports = "AGFzbQEAAAABMAhgAX8Bf2ADf39/AX9gBH9/f38Bf2AAAGADf39/AGABfwBgAn9/AGAGf39/f39/AALLAQgDZW52GHdhc21fb25faGVhZGVyc19jb21wbGV0ZQACA2VudhV3YXNtX29uX21lc3NhZ2VfYmVnaW4AAANlbnYLd2FzbV9vbl91cmwAAQNlbnYOd2FzbV9vbl9zdGF0dXMAAQNlbnYUd2FzbV9vbl9oZWFkZXJfZmllbGQAAQNlbnYUd2FzbV9vbl9oZWFkZXJfdmFsdWUAAQNlbnYMd2FzbV9vbl9ib2R5AAEDZW52GHdhc21fb25fbWVzc2FnZV9jb21wbGV0ZQAAA0ZFAwMEAAAFAAAAAAAABQEFAAUFBQAABgAAAAAGBgYGAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAAABAQcAAAUFAwABBAUBcAESEgUDAQACBggBfwFBgNQECwfRBSIGbWVtb3J5AgALX2luaXRpYWxpemUACRlfX2luZGlyZWN0X2Z1bmN0aW9uX3RhYmxlAQALbGxodHRwX2luaXQAChhsbGh0dHBfc2hvdWxkX2tlZXBfYWxpdmUAQQxsbGh0dHBfYWxsb2MADAZtYWxsb2MARgtsbGh0dHBfZnJlZQANBGZyZWUASA9sbGh0dHBfZ2V0X3R5cGUADhVsbGh0dHBfZ2V0X2h0dHBfbWFqb3IADxVsbGh0dHBfZ2V0X2h0dHBfbWlub3IAEBFsbGh0dHBfZ2V0X21ldGhvZAARFmxsaHR0cF9nZXRfc3RhdHVzX2NvZGUAEhJsbGh0dHBfZ2V0X3VwZ3JhZ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QbwBIRAMBgtBvQEhEAwFC0G+ASEQDAQLQb8BIRAMAwtBwAEhEAwCC0HCASEQDAELQcEBIRALA0ACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAk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ECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDEILIABB0gA2AhwgACABNgIUIAAgEDYCDEEAIRAMpwELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDEILIABB0wA2AhwgACABNgIUIAAgEDYCDEEAIRAMpgELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDEYLIABB5QA2AhwgACABNgIUIAAgEDYCDEEAIRAMpQELIAAoAgQhASAAQQA2AgQCQCAAIAEgFBCngICAACIBDQAgFCEBDD8LIABB0gA2AhwgACAUNgIUIAAgATYCDEEAIRAMpAELIAAoAgQhASAAQQA2AgQCQCAAIAEgFBCngICAACIBDQAgFCEBDD8LIABB0wA2AhwgACAUNgIUIAAgATYCDEEAIRAMowELIAAoAgQhASAAQQA2AgQCQCAAIAEgFBCngICAACIBDQAgFCEBDEMLIABB5QA2AhwgACAUNgIUIAAgATYCDEEAIRAMogELIABBADYCHCAAIBQ2AhQgAEHDj4CAADYCECAAQQc2AgxBACEQDKEBCyAAQQA2AhwgACABNgIUIABBw4+AgAA2AhAgAEEHNgIMQQAhEAygAQtBACEQIABBADYCHCAAIBQ2AhQgAEGMnICAADYCECAAQQc2AgwMnwELIABBADYCHCAAIBQ2AhQgAEGMnICAADYCECAAQQc2AgxBACEQDJ4BCyAAQQA2AhwgACAUNgIUIABB/pGAgAA2AhAgAEEHNgIMQQAhEAydAQsgAEEANgIcIAAgATYCFCAAQY6bgIAANgIQIABBBjYCDEEAIRAMnAELIBBBFUYNVyAAQQA2AhwgACABNgIUIABBzI6AgAA2AhAgAEEgNgIMQQAhEAybAQsgAEEANgIAIBBBAWohAUEkIRALIAAgEDoAKSAAKAIEIRAgAEEANgIEIAAgECABEKuAgIAAIhANVCABIQEMPgsgAEEANgIAC0EAIRAgAEEANgIcIAAgBDYCFCAAQfGbgIAANgIQIABBBjYCDAyXAQsgAUEVRg1QIABBADYCHCAAIAU2AhQgAEHwjICAADYCECAAQRs2AgxBAC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ABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwAAAAAAAAMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAABAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAIAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAAAAAAAADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABOT1VOQ0VFQ0tPVVRORUNURVRFQ1JJQkVMVVNIRVRFQURTRUFSQ0hSR0VDVElWSVRZTEVOREFSVkVPVElGWVBUSU9OU0NIU0VBWVNUQVRDSEdFT1JESVJFQ1RPUlRSQ0hQQVJBTUVURVJVUkNFQlNDUklCRUFSRE9XTkFDRUlORE5LQ0tVQlNDUklCRUhUVFAvQURUUC8="; } }); -// node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/llhttp/llhttp_simd-wasm.js +// ../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/llhttp/llhttp_simd-wasm.js var require_llhttp_simd_wasm = __commonJS({ - "node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/llhttp/llhttp_simd-wasm.js"(exports, module) { + "../node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ACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIBAO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AIRAMtAELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDFQLIABB5QA2AhwgACABNgIUIAAgEDYCDEEAIRAMswELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDE0LIABB0gA2AhwgACABNgIUIAAgEDYCDEEAIRAMsgELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDE0LIABB0wA2AhwgACABNgIUIAAgEDYCDEEAIRAMsQELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDFELIABB5QA2AhwgACABNgIUIAAgEDYCDEEAIRAMsAELIABBADYCHCAAIAE2AhQgAEHGioCAADYCECAAQQc2AgxBACEQDK8BCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQp4CAgAAiEA0AIAEhAQxJCyAAQdIANgIcIAAgATYCFCAAIBA2AgxBACEQDK4BCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQp4CAgAAiEA0AIAEhAQxJCyAAQdMANgIcIAAgATYCFCAAIBA2AgxBACEQDK0BCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQp4CAgAAiEA0AIAEhAQxNCyAAQeUANgIcIAAgATYCFCAAIBA2AgxBACEQDKwBCyAAQQA2AhwgACABNgIUIABB3IiAgAA2AhAgAEEHNgIMQQAhEAyrAQsgEEE/Rw0BIAFBAWohAQtBBSEQDJABC0EAIRAgAEEANgIcIAAgATYCFCAAQf2SgIAANgIQIABBBzYCDAyoAQsgACgCBCEQIABBADYCBAJAIAAgECABEKeAgIAAIhANACABIQEMQgsgAEHSADYCHCAAIAE2AhQgACAQNgIMQQAhEAynAQsgACgCBCEQIABBADYCBAJAIAAgECABEKeAgIAAIhANACABIQEMQgsgAEHTADYCHCAAIAE2AhQgACAQNgIMQQAhEAymAQsgACgCBCEQIABBADYCBAJAIAAgECABEKeAgIAAIhANACABIQEMRgsgAEHlADYCHCAAIAE2AhQgACAQNgIMQQAhEAylAQsgACgCBCEBI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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAEAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAgAAAAACAAAAAAAAAAAAAAAAAAAAAAADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwAAAAAAAAMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAE5PVU5DRUVDS09VVE5FQ1RFVEVDUklCRUxVU0hFVEVBRFNFQVJDSFJHRUNUSVZJVFlMRU5EQVJWRU9USUZZUFRJT05TQ0hTRUFZU1RBVENIR0VPUkRJUkVDVE9SVFJDSFBBUkFNRVRFUlVSQ0VCU0NSSUJFQVJET1dOQUNFSU5ETktDS1VCU0NSSUJFSFRUUC9BRFRQLw=="; } }); -// node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/client.js +// ../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/client.js var require_client = __commonJS({ - "node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/client.js"(exports, module) { + "../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/client.js"(exports, module) { "use strict"; - var assert3 = __require("assert"); + var assert4 = __require("assert"); var net = __require("net"); var http2 = __require("http"); var { pipeline: pipeline2 } = __require("stream"); @@ -7034,7 +7034,7 @@ var require_client = __commonJS({ * @param {string|URL} url * @param {import('../types/client').Client.Options} options */ - constructor(url2, { + constructor(url4, { interceptors, maxHeaderSize, headersTimeout, @@ -7140,7 +7140,7 @@ var require_client = __commonJS({ }); } this[kInterceptors] = interceptors && interceptors.Client && Array.isArray(interceptors.Client) ? interceptors.Client : [createRedirectInterceptor({ maxRedirections })]; - this[kUrl] = util3.parseOrigin(url2); + this[kUrl] = util3.parseOrigin(url4); this[kConnector] = connect2; this[kSocket] = null; this[kPipelining] = pipelining != null ? pipelining : 1; @@ -7258,7 +7258,7 @@ var require_client = __commonJS({ } }; function onHttp2SessionError(err) { - assert3(err.code !== "ERR_TLS_CERT_ALTNAME_INVALID"); + assert4(err.code !== "ERR_TLS_CERT_ALTNAME_INVALID"); this[kSocket][kError] = err; onError(this[kClient], err); } @@ -7279,7 +7279,7 @@ var require_client = __commonJS({ client[kSocket] = null; client[kHTTP2Session] = null; if (client.destroyed) { - assert3(this[kPending] === 0); + assert4(this[kPending] === 0); const requests = client[kQueue].splice(client[kRunningIdx]); for (let i = 0; i < requests.length; i++) { const request2 = requests[i]; @@ -7291,7 +7291,7 @@ var require_client = __commonJS({ errorRequest(client, request2, err); } client[kPendingIdx] = client[kRunningIdx]; - assert3(client[kRunning] === 0); + assert4(client[kRunning] === 0); client.emit( "disconnect", client[kUrl], @@ -7318,35 +7318,35 @@ var require_client = __commonJS({ return 0; }, wasm_on_status: (p, at, len) => { - assert3.strictEqual(currentParser.ptr, p); + assert4.strictEqual(currentParser.ptr, p); const start = at - currentBufferPtr + currentBufferRef.byteOffset; return currentParser.onStatus(new FastBuffer(currentBufferRef.buffer, start, len)) || 0; }, wasm_on_message_begin: (p) => { - assert3.strictEqual(currentParser.ptr, p); + assert4.strictEqual(currentParser.ptr, p); return currentParser.onMessageBegin() || 0; }, wasm_on_header_field: (p, at, len) => { - assert3.strictEqual(currentParser.ptr, p); + assert4.strictEqual(currentParser.ptr, p); const start = at - currentBufferPtr + currentBufferRef.byteOffset; return currentParser.onHeaderField(new FastBuffer(currentBufferRef.buffer, start, len)) || 0; }, wasm_on_header_value: (p, at, len) => { - assert3.strictEqual(currentParser.ptr, p); + assert4.strictEqual(currentParser.ptr, p); const start = at - currentBufferPtr + currentBufferRef.byteOffset; return currentParser.onHeaderValue(new FastBuffer(currentBufferRef.buffer, start, len)) || 0; }, wasm_on_headers_complete: (p, statusCode, upgrade, shouldKeepAlive) => { - assert3.strictEqual(currentParser.ptr, p); + assert4.strictEqual(currentParser.ptr, p); return currentParser.onHeadersComplete(statusCode, Boolean(upgrade), Boolean(shouldKeepAlive)) || 0; }, wasm_on_body: (p, at, len) => { - assert3.strictEqual(currentParser.ptr, p); + assert4.strictEqual(currentParser.ptr, p); const start = at - currentBufferPtr + currentBufferRef.byteOffset; return currentParser.onBody(new FastBuffer(currentBufferRef.buffer, start, len)) || 0; }, wasm_on_message_complete: (p) => { - assert3.strictEqual(currentParser.ptr, p); + assert4.strictEqual(currentParser.ptr, p); return currentParser.onMessageComplete() || 0; } /* eslint-enable camelcase */ @@ -7365,7 +7365,7 @@ var require_client = __commonJS({ var TIMEOUT_IDLE = 3; var Parser = class { constructor(client, socket, { exports: exports2 }) { - assert3(Number.isFinite(client[kMaxHeadersSize]) && client[kMaxHeadersSize] > 0); + assert4(Number.isFinite(client[kMaxHeadersSize]) && client[kMaxHeadersSize] > 0); this.llhttp = exports2; this.ptr = this.llhttp.llhttp_alloc(constants.TYPE.RESPONSE); this.client = client; @@ -7411,10 +7411,10 @@ var require_client = __commonJS({ if (this.socket.destroyed || !this.paused) { return; } - assert3(this.ptr != null); - assert3(currentParser == null); + assert4(this.ptr != null); + assert4(currentParser == null); this.llhttp.llhttp_resume(this.ptr); - assert3(this.timeoutType === TIMEOUT_BODY); + assert4(this.timeoutType === TIMEOUT_BODY); if (this.timeout) { if (this.timeout.refresh) { this.timeout.refresh(); @@ -7434,9 +7434,9 @@ var require_client = __commonJS({ } } execute(data) { - assert3(this.ptr != null); - assert3(currentParser == null); - assert3(!this.paused); + assert4(this.ptr != null); + assert4(currentParser == null); + assert4(!this.paused); const { socket, llhttp } = this; if (data.length > currentBufferSize) { if (currentBufferPtr) { @@ -7478,8 +7478,8 @@ var require_client = __commonJS({ } } destroy() { - assert3(this.ptr != null); - assert3(currentParser == null); + assert4(this.ptr != null); + assert4(currentParser == null); this.llhttp.llhttp_free(this.ptr); this.ptr = null; timers.clearTimeout(this.timeout); @@ -7536,17 +7536,17 @@ var require_client = __commonJS({ } onUpgrade(head) { const { upgrade, client, socket, headers, statusCode } = this; - assert3(upgrade); + assert4(upgrade); const request2 = client[kQueue][client[kRunningIdx]]; - assert3(request2); - assert3(!socket.destroyed); - assert3(socket === client[kSocket]); - assert3(!this.paused); - assert3(request2.upgrade || request2.method === "CONNECT"); + assert4(request2); + assert4(!socket.destroyed); + assert4(socket === client[kSocket]); + assert4(!this.paused); + assert4(request2.upgrade || request2.method === "CONNECT"); this.statusCode = null; this.statusText = ""; this.shouldKeepAlive = null; - assert3(this.headers.length % 2 === 0); + assert4(this.headers.length % 2 === 0); this.headers = []; this.headersSize = 0; socket.unshift(head); @@ -7574,8 +7574,8 @@ var require_client = __commonJS({ if (!request2) { return -1; } - assert3(!this.upgrade); - assert3(this.statusCode < 200); + assert4(!this.upgrade); + assert4(this.statusCode < 200); if (statusCode === 100) { util3.destroy(socket, new SocketError("bad response", util3.getSocketInfo(socket))); return -1; @@ -7584,7 +7584,7 @@ var require_client = __commonJS({ util3.destroy(socket, new SocketError("bad upgrade", util3.getSocketInfo(socket))); return -1; } - assert3.strictEqual(this.timeoutType, TIMEOUT_HEADERS); + assert4.strictEqual(this.timeoutType, TIMEOUT_HEADERS); this.statusCode = statusCode; this.shouldKeepAlive = shouldKeepAlive || // Override llhttp value which does not allow keepAlive for HEAD. request2.method === "HEAD" && !socket[kReset] && this.connection.toLowerCase() === "keep-alive"; @@ -7597,16 +7597,16 @@ var require_client = __commonJS({ } } if (request2.method === "CONNECT") { - assert3(client[kRunning] === 1); + assert4(client[kRunning] === 1); this.upgrade = true; return 2; } if (upgrade) { - assert3(client[kRunning] === 1); + assert4(client[kRunning] === 1); this.upgrade = true; return 2; } - assert3(this.headers.length % 2 === 0); + assert4(this.headers.length % 2 === 0); this.headers = []; this.headersSize = 0; if (this.shouldKeepAlive && client[kPipelining]) { @@ -7649,14 +7649,14 @@ var require_client = __commonJS({ return -1; } const request2 = client[kQueue][client[kRunningIdx]]; - assert3(request2); - assert3.strictEqual(this.timeoutType, TIMEOUT_BODY); + assert4(request2); + assert4.strictEqual(this.timeoutType, TIMEOUT_BODY); if (this.timeout) { if (this.timeout.refresh) { this.timeout.refresh(); } } - assert3(statusCode >= 200); + assert4(statusCode >= 200); if (maxResponseSize > -1 && this.bytesRead + buf.length > maxResponseSize) { util3.destroy(socket, new ResponseExceededMaxSizeError()); return -1; @@ -7675,15 +7675,15 @@ var require_client = __commonJS({ return; } const request2 = client[kQueue][client[kRunningIdx]]; - assert3(request2); - assert3(statusCode >= 100); + assert4(request2); + assert4(statusCode >= 100); this.statusCode = null; this.statusText = ""; this.bytesRead = 0; this.contentLength = ""; this.keepAlive = ""; this.connection = ""; - assert3(this.headers.length % 2 === 0); + assert4(this.headers.length % 2 === 0); this.headers = []; this.headersSize = 0; if (statusCode < 200) { @@ -7696,7 +7696,7 @@ var require_client = __commonJS({ request2.onComplete(headers); client[kQueue][client[kRunningIdx]++] = null; if (socket[kWriting]) { - assert3.strictEqual(client[kRunning], 0); + assert4.strictEqual(client[kRunning], 0); util3.destroy(socket, new InformationalError("reset")); return constants.ERROR.PAUSED; } else if (!shouldKeepAlive) { @@ -7716,7 +7716,7 @@ var require_client = __commonJS({ const { socket, timeoutType, client } = parser; if (timeoutType === TIMEOUT_HEADERS) { if (!socket[kWriting] || socket.writableNeedDrain || client[kRunning] > 1) { - assert3(!parser.paused, "cannot be paused while waiting for headers"); + assert4(!parser.paused, "cannot be paused while waiting for headers"); util3.destroy(socket, new HeadersTimeoutError()); } } else if (timeoutType === TIMEOUT_BODY) { @@ -7724,7 +7724,7 @@ var require_client = __commonJS({ util3.destroy(socket, new BodyTimeoutError()); } } else if (timeoutType === TIMEOUT_IDLE) { - assert3(client[kRunning] === 0 && client[kKeepAliveTimeoutValue]); + assert4(client[kRunning] === 0 && client[kKeepAliveTimeoutValue]); util3.destroy(socket, new InformationalError("socket idle timeout")); } } @@ -7736,7 +7736,7 @@ var require_client = __commonJS({ } function onSocketError(err) { const { [kClient]: client, [kParser]: parser } = this; - assert3(err.code !== "ERR_TLS_CERT_ALTNAME_INVALID"); + assert4(err.code !== "ERR_TLS_CERT_ALTNAME_INVALID"); if (client[kHTTPConnVersion] !== "h2") { if (err.code === "ECONNRESET" && parser.statusCode && !parser.shouldKeepAlive) { parser.onMessageComplete(); @@ -7748,13 +7748,13 @@ var require_client = __commonJS({ } function onError(client, err) { if (client[kRunning] === 0 && err.code !== "UND_ERR_INFO" && err.code !== "UND_ERR_SOCKET") { - assert3(client[kPendingIdx] === client[kRunningIdx]); + assert4(client[kPendingIdx] === client[kRunningIdx]); const requests = client[kQueue].splice(client[kRunningIdx]); for (let i = 0; i < requests.length; i++) { const request2 = requests[i]; errorRequest(client, request2, err); } - assert3(client[kSize] === 0); + assert4(client[kSize] === 0); } } function onSocketEnd() { @@ -7779,7 +7779,7 @@ var require_client = __commonJS({ const err = this[kError] || new SocketError("closed", util3.getSocketInfo(this)); client[kSocket] = null; if (client.destroyed) { - assert3(client[kPending] === 0); + assert4(client[kPending] === 0); const requests = client[kQueue].splice(client[kRunningIdx]); for (let i = 0; i < requests.length; i++) { const request2 = requests[i]; @@ -7791,27 +7791,27 @@ var require_client = __commonJS({ errorRequest(client, request2, err); } client[kPendingIdx] = client[kRunningIdx]; - assert3(client[kRunning] === 0); + assert4(client[kRunning] === 0); client.emit("disconnect", client[kUrl], [client], err); resume(client); } async function connect(client) { - assert3(!client[kConnecting]); - assert3(!client[kSocket]); - let { host, hostname: hostname2, protocol, port } = client[kUrl]; - if (hostname2[0] === "[") { - const idx = hostname2.indexOf("]"); - assert3(idx !== -1); - const ip2 = hostname2.substring(1, idx); - assert3(net.isIP(ip2)); - hostname2 = ip2; + assert4(!client[kConnecting]); + assert4(!client[kSocket]); + let { host, hostname: hostname5, protocol, port } = client[kUrl]; + if (hostname5[0] === "[") { + const idx = hostname5.indexOf("]"); + assert4(idx !== -1); + const ip2 = hostname5.substring(1, idx); + assert4(net.isIP(ip2)); + hostname5 = ip2; } client[kConnecting] = true; if (channels.beforeConnect.hasSubscribers) { channels.beforeConnect.publish({ connectParams: { host, - hostname: hostname2, + hostname: hostname5, protocol, port, servername: client[kServerName], @@ -7824,7 +7824,7 @@ var require_client = __commonJS({ const socket = await new Promise((resolve, reject) => { client[kConnector]({ host, - hostname: hostname2, + hostname: hostname5, protocol, port, servername: client[kServerName], @@ -7843,7 +7843,7 @@ var require_client = __commonJS({ return; } client[kConnecting] = false; - assert3(socket); + assert4(socket); const isH2 = socket.alpnProtocol === "h2"; if (isH2) { if (!h2ExperimentalWarned) { @@ -7888,7 +7888,7 @@ var require_client = __commonJS({ channels.connected.publish({ connectParams: { host, - hostname: hostname2, + hostname: hostname5, protocol, port, servername: client[kServerName], @@ -7908,7 +7908,7 @@ var require_client = __commonJS({ channels.connectError.publish({ connectParams: { host, - hostname: hostname2, + hostname: hostname5, protocol, port, servername: client[kServerName], @@ -7919,7 +7919,7 @@ var require_client = __commonJS({ }); } if (err.code === "ERR_TLS_CERT_ALTNAME_INVALID") { - assert3(client[kRunning] === 0); + assert4(client[kRunning] === 0); while (client[kPending] > 0 && client[kQueue][client[kPendingIdx]].servername === client[kServerName]) { const request2 = client[kQueue][client[kPendingIdx]++]; errorRequest(client, request2, err); @@ -7951,7 +7951,7 @@ var require_client = __commonJS({ function _resume(client, sync) { while (true) { if (client.destroyed) { - assert3(client[kPending] === 0); + assert4(client[kPending] === 0); return; } if (client[kClosedResolve] && !client[kSize]) { @@ -8123,13 +8123,13 @@ upgrade: ${upgrade}\r \r `, "latin1"); } else { - assert3(contentLength === null, "no body must not have content length"); + assert4(contentLength === null, "no body must not have content length"); socket.write(`${header}\r `, "latin1"); } request2.onRequestSent(); } else if (util3.isBuffer(body)) { - assert3(contentLength === body.byteLength, "buffer body must have content length"); + assert4(contentLength === body.byteLength, "buffer body must have content length"); socket.cork(); socket.write(`${header}content-length: ${contentLength}\r \r @@ -8152,7 +8152,7 @@ upgrade: ${upgrade}\r } else if (util3.isIterable(body)) { writeIterable({ body, client, request: request2, socket, contentLength, header, expectsPayload }); } else { - assert3(false); + assert4(false); } return true; } @@ -8221,7 +8221,7 @@ upgrade: ${upgrade}\r process.emitWarning(new RequestContentLengthMismatchError()); } if (contentLength != null) { - assert3(body, "no body must not have content length"); + assert4(body, "no body must not have content length"); headers[HTTP2_HEADER_CONTENT_LENGTH] = `${contentLength}`; } session.ref(); @@ -8277,7 +8277,7 @@ upgrade: ${upgrade}\r if (!body) { request2.onRequestSent(); } else if (util3.isBuffer(body)) { - assert3(contentLength === body.byteLength, "buffer body must have content length"); + assert4(contentLength === body.byteLength, "buffer body must have content length"); stream.cork(); stream.write(body); stream.uncork(); @@ -8331,17 +8331,17 @@ upgrade: ${upgrade}\r socket: client[kSocket] }); } else { - assert3(false); + assert4(false); } } } function writeStream({ h2stream, body, client, request: request2, socket, contentLength, header, expectsPayload }) { - assert3(contentLength !== 0 || client[kRunning] === 0, "stream body cannot be pipelined"); + assert4(contentLength !== 0 || client[kRunning] === 0, "stream body cannot be pipelined"); if (client[kHTTPConnVersion] === "h2") { let onPipeData = function(chunk) { request2.onBodySent(chunk); }; - const pipe = pipeline2( + const pipe4 = pipeline2( body, h2stream, (err) => { @@ -8353,10 +8353,10 @@ upgrade: ${upgrade}\r } } ); - pipe.on("data", onPipeData); - pipe.once("end", () => { - pipe.removeListener("data", onPipeData); - util3.destroy(pipe); + pipe4.on("data", onPipeData); + pipe4.once("end", () => { + pipe4.removeListener("data", onPipeData); + util3.destroy(pipe4); }); return; } @@ -8394,7 +8394,7 @@ upgrade: ${upgrade}\r return; } finished = true; - assert3(socket.destroyed || socket[kWriting] && client[kRunning] <= 1); + assert4(socket.destroyed || socket[kWriting] && client[kRunning] <= 1); socket.off("drain", onDrain).off("error", onFinished); body.removeListener("data", onData).removeListener("end", onFinished).removeListener("error", onFinished).removeListener("close", onAbort); if (!err) { @@ -8418,7 +8418,7 @@ upgrade: ${upgrade}\r socket.on("drain", onDrain).on("error", onFinished); } async function writeBlob({ h2stream, body, client, request: request2, socket, contentLength, header, expectsPayload }) { - assert3(contentLength === body.size, "blob body must have content length"); + assert4(contentLength === body.size, "blob body must have content length"); const isH2 = client[kHTTPConnVersion] === "h2"; try { if (contentLength != null && contentLength !== body.size) { @@ -8448,7 +8448,7 @@ upgrade: ${upgrade}\r } } async function writeIterable({ h2stream, body, client, request: request2, socket, contentLength, header, expectsPayload }) { - assert3(contentLength !== 0 || client[kRunning] === 0, "iterator body cannot be pipelined"); + assert4(contentLength !== 0 || client[kRunning] === 0, "iterator body cannot be pipelined"); let callback = null; function onDrain() { if (callback) { @@ -8458,7 +8458,7 @@ upgrade: ${upgrade}\r } } const waitForDrain = () => new Promise((resolve, reject) => { - assert3(callback === null); + assert4(callback === null); if (socket[kError]) { reject(socket[kError]); } else { @@ -8606,7 +8606,7 @@ ${len.toString(16)}\r const { socket, client } = this; socket[kWriting] = false; if (err) { - assert3(client[kRunning] <= 1, "pipeline should only contain this request"); + assert4(client[kRunning] <= 1, "pipeline should only contain this request"); util3.destroy(socket, err); } } @@ -8614,7 +8614,7 @@ ${len.toString(16)}\r function errorRequest(client, request2, err) { try { request2.onError(err); - assert3(request2.aborted); + assert4(request2.aborted); } catch (err2) { client.emit("error", err2); } @@ -8623,9 +8623,9 @@ ${len.toString(16)}\r } }); -// node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/node/fixed-queue.js +// ../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/node/fixed-queue.js var require_fixed_queue = __commonJS({ - "node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/node/fixed-queue.js"(exports, module) { + "../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/node/fixed-queue.js"(exports, module) { "use strict"; var kSize = 2048; var kMask = kSize - 1; @@ -8680,9 +8680,9 @@ var require_fixed_queue = __commonJS({ } }); -// node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/pool-stats.js +// ../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/pool-stats.js var require_pool_stats = __commonJS({ - "node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/pool-stats.js"(exports, module) { + "../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/pool-stats.js"(exports, module) { var { kFree, kConnected, kPending, kQueued, kRunning, kSize } = require_symbols(); var kPool = Symbol("pool"); var PoolStats = class { @@ -8712,9 +8712,9 @@ var require_pool_stats = __commonJS({ } }); -// node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/pool-base.js +// ../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/pool-base.js var require_pool_base = __commonJS({ - "node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/pool-base.js"(exports, module) { + "../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/pool-base.js"(exports, module) { "use strict"; var DispatcherBase = require_dispatcher_base(); var FixedQueue = require_fixed_queue(); @@ -8867,9 +8867,9 @@ var require_pool_base = __commonJS({ } }); -// node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/pool.js +// ../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/pool.js var require_pool = __commonJS({ - "node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/pool.js"(exports, module) { + "../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/pool.js"(exports, module) { "use strict"; var { PoolBase, @@ -8932,7 +8932,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, error50) => { for (const target of targets) { const idx = this[kClients].indexOf(target); if (idx !== -1) { @@ -8957,9 +8957,9 @@ var require_pool = __commonJS({ } }); -// node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/balanced-pool.js +// ../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/balanced-pool.js var require_balanced_pool = __commonJS({ - "node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/balanced-pool.js"(exports, module) { + "../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/balanced-pool.js"(exports, module) { "use strict"; var { BalancedPoolMissingUpstreamError, @@ -9092,9 +9092,9 @@ var require_balanced_pool = __commonJS({ } }); -// node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/compat/dispatcher-weakref.js +// ../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/compat/dispatcher-weakref.js var require_dispatcher_weakref = __commonJS({ - "node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/compat/dispatcher-weakref.js"(exports, module) { + "../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/compat/dispatcher-weakref.js"(exports, module) { "use strict"; var { kConnected, kSize } = require_symbols(); var CompatWeakRef = class { @@ -9134,9 +9134,9 @@ var require_dispatcher_weakref = __commonJS({ } }); -// node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/agent.js +// ../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/agent.js var require_agent = __commonJS({ - "node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/agent.js"(exports, module) { + "../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/agent.js"(exports, module) { "use strict"; var { InvalidArgumentError } = require_errors(); var { kClients, kRunning, kClose, kDestroy, kDispatch, kInterceptors } = require_symbols(); @@ -9252,11 +9252,11 @@ var require_agent = __commonJS({ } }); -// node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/api/readable.js +// ../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/api/readable.js var require_readable = __commonJS({ - "node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/api/readable.js"(exports, module) { + "../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/api/readable.js"(exports, module) { "use strict"; - var assert3 = __require("assert"); + var assert4 = __require("assert"); var { Readable } = __require("stream"); var { RequestAbortedError, NotSupportedError, InvalidArgumentError } = require_errors(); var util3 = require_util(); @@ -9365,7 +9365,7 @@ var require_readable = __commonJS({ this[kBody] = ReadableStreamFrom(this); if (this[kConsume]) { this[kBody].getReader(); - assert3(this[kBody].locked); + assert4(this[kBody].locked); } } return this[kBody]; @@ -9416,7 +9416,7 @@ var require_readable = __commonJS({ if (isUnusable(stream)) { throw new TypeError("unusable"); } - assert3(!stream[kConsume]); + assert4(!stream[kConsume]); return new Promise((resolve, reject) => { stream[kConsume] = { type: type2, @@ -9504,16 +9504,16 @@ var require_readable = __commonJS({ } }); -// node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/api/util.js +// ../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/api/util.js var require_util3 = __commonJS({ - "node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/api/util.js"(exports, module) { - var assert3 = __require("assert"); + "../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/api/util.js"(exports, module) { + var assert4 = __require("assert"); var { ResponseStatusCodeError } = require_errors(); var { toUSVString } = require_util(); async function getResolveErrorBodyCallback({ callback, body, contentType, statusCode, statusMessage, headers }) { - assert3(body); + assert4(body); let chunks = []; let limit = 0; for await (const chunk of body) { @@ -9547,9 +9547,9 @@ var require_util3 = __commonJS({ } }); -// node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/api/abort-signal.js +// ../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/api/abort-signal.js var require_abort_signal = __commonJS({ - "node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/api/abort-signal.js"(exports, module) { + "../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/api/abort-signal.js"(exports, module) { var { addAbortListener } = require_util(); var { RequestAbortedError } = require_errors(); var kListener = Symbol("kListener"); @@ -9596,9 +9596,9 @@ var require_abort_signal = __commonJS({ } }); -// node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/api/api-request.js +// ../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/api/api-request.js var require_api_request = __commonJS({ - "node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/api/api-request.js"(exports, module) { + "../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/api/api-request.js"(exports, module) { "use strict"; var Readable = require_readable(); var { @@ -9750,9 +9750,9 @@ var require_api_request = __commonJS({ } }); -// node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/api/api-stream.js +// ../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/api/api-stream.js var require_api_stream = __commonJS({ - "node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/api/api-stream.js"(exports, module) { + "../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/api/api-stream.js"(exports, module) { "use strict"; var { finished, PassThrough } = __require("stream"); var { @@ -9924,9 +9924,9 @@ var require_api_stream = __commonJS({ } }); -// node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/api/api-pipeline.js +// ../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/api/api-pipeline.js var require_api_pipeline = __commonJS({ - "node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/api/api-pipeline.js"(exports, module) { + "../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/api/api-pipeline.js"(exports, module) { "use strict"; var { Readable, @@ -9941,7 +9941,7 @@ var require_api_pipeline = __commonJS({ var util3 = require_util(); var { AsyncResource } = __require("async_hooks"); var { addSignal, removeSignal } = require_abort_signal(); - var assert3 = __require("assert"); + var assert4 = __require("assert"); var kResume = Symbol("resume"); var PipelineRequest = class extends Readable { constructor() { @@ -10041,7 +10041,7 @@ var require_api_pipeline = __commonJS({ } onConnect(abort, context) { const { ret, res } = this; - assert3(!res, "pipeline cannot be retried"); + assert4(!res, "pipeline cannot be retried"); if (ret.destroyed) { throw new RequestAbortedError(); } @@ -10122,15 +10122,15 @@ var require_api_pipeline = __commonJS({ } }); -// node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/api/api-upgrade.js +// ../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/api/api-upgrade.js var require_api_upgrade = __commonJS({ - "node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/api/api-upgrade.js"(exports, module) { + "../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/api/api-upgrade.js"(exports, module) { "use strict"; var { InvalidArgumentError, RequestAbortedError, SocketError } = require_errors(); var { AsyncResource } = __require("async_hooks"); var util3 = require_util(); var { addSignal, removeSignal } = require_abort_signal(); - var assert3 = __require("assert"); + var assert4 = __require("assert"); var UpgradeHandler = class extends AsyncResource { constructor(opts, callback) { if (!opts || typeof opts !== "object") { @@ -10163,7 +10163,7 @@ var require_api_upgrade = __commonJS({ } onUpgrade(statusCode, rawHeaders, socket) { const { callback, opaque, context } = this; - assert3.strictEqual(statusCode, 101); + assert4.strictEqual(statusCode, 101); removeSignal(this); this.callback = null; const headers = this.responseHeaders === "raw" ? util3.parseRawHeaders(rawHeaders) : util3.parseHeaders(rawHeaders); @@ -10212,9 +10212,9 @@ var require_api_upgrade = __commonJS({ } }); -// node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/api/api-connect.js +// ../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/api/api-connect.js var require_api_connect = __commonJS({ - "node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/api/api-connect.js"(exports, module) { + "../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/api/api-connect.js"(exports, module) { "use strict"; var { AsyncResource } = __require("async_hooks"); var { InvalidArgumentError, RequestAbortedError, SocketError } = require_errors(); @@ -10299,9 +10299,9 @@ var require_api_connect = __commonJS({ } }); -// node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/api/index.js +// ../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/api/index.js var require_api = __commonJS({ - "node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/api/index.js"(exports, module) { + "../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/api/index.js"(exports, module) { "use strict"; module.exports.request = require_api_request(); module.exports.stream = require_api_stream(); @@ -10311,9 +10311,9 @@ var require_api = __commonJS({ } }); -// node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/mock/mock-errors.js +// ../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/mock/mock-errors.js var require_mock_errors = __commonJS({ - "node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/mock/mock-errors.js"(exports, module) { + "../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/mock/mock-errors.js"(exports, module) { "use strict"; var { UndiciError } = require_errors(); var MockNotMatchedError = class _MockNotMatchedError extends UndiciError { @@ -10331,9 +10331,9 @@ var require_mock_errors = __commonJS({ } }); -// node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/mock/mock-symbols.js +// ../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/mock/mock-symbols.js var require_mock_symbols = __commonJS({ - "node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/mock/mock-symbols.js"(exports, module) { + "../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/mock/mock-symbols.js"(exports, module) { "use strict"; module.exports = { kAgent: Symbol("agent"), @@ -10359,9 +10359,9 @@ var require_mock_symbols = __commonJS({ } }); -// node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/mock/mock-utils.js +// ../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/mock/mock-utils.js var require_mock_utils = __commonJS({ - "node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/mock/mock-utils.js"(exports, module) { + "../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/mock/mock-utils.js"(exports, module) { "use strict"; var { MockNotMatchedError } = require_mock_errors(); var { @@ -10412,10 +10412,10 @@ var require_mock_utils = __commonJS({ } } function buildHeadersFromArray(headers) { - const clone2 = headers.slice(); + const clone4 = 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 < clone4.length; index += 2) { + entries.push([clone4[index], clone4[index + 1]]); } return Object.fromEntries(entries); } @@ -10541,13 +10541,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: error50 }, delay: delay2, persist } = mockDispatch2; const { timesInvoked, times } = mockDispatch2; mockDispatch2.consumed = !persist && timesInvoked >= times; mockDispatch2.pending = timesInvoked < times; - if (error41 !== null) { + if (error50 !== null) { deleteMockDispatch(this[kDispatches], key); - handler2.onError(error41); + handler2.onError(error50); return true; } if (typeof delay2 === "number" && delay2 > 0) { @@ -10585,19 +10585,19 @@ var require_mock_utils = __commonJS({ if (agent2.isMockActive) { try { mockDispatch.call(this, opts, handler2); - } catch (error41) { - if (error41 instanceof MockNotMatchedError) { + } catch (error50) { + if (error50 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(`${error50.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(`${error50.message}: subsequent request to origin ${origin} was not allowed (net.connect is not enabled for this origin)`); } } else { - throw error41; + throw error50; } } } else { @@ -10606,10 +10606,10 @@ var require_mock_utils = __commonJS({ }; } function checkNetConnect(netConnect, origin) { - const url2 = new URL(origin); + const url4 = new URL(origin); if (netConnect === true) { return true; - } else if (Array.isArray(netConnect) && netConnect.some((matcher) => matchValue(matcher, url2.host))) { + } else if (Array.isArray(netConnect) && netConnect.some((matcher) => matchValue(matcher, url4.host))) { return true; } return false; @@ -10639,9 +10639,9 @@ var require_mock_utils = __commonJS({ } }); -// node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/mock/mock-interceptor.js +// ../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/mock/mock-interceptor.js var require_mock_interceptor = __commonJS({ - "node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/mock/mock-interceptor.js"(exports, module) { + "../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/mock/mock-interceptor.js"(exports, module) { "use strict"; var { getResponseData: getResponseData2, buildKey, addMockDispatch } = require_mock_utils(); var { @@ -10760,11 +10760,11 @@ var require_mock_interceptor = __commonJS({ /** * Mock an undici request with a defined error. */ - replyWithError(error41) { - if (typeof error41 === "undefined") { + replyWithError(error50) { + if (typeof error50 === "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: error50 }); return new MockScope(newMockDispatch); } /** @@ -10800,9 +10800,9 @@ var require_mock_interceptor = __commonJS({ } }); -// node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/mock/mock-client.js +// ../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/mock/mock-client.js var require_mock_client = __commonJS({ - "node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/mock/mock-client.js"(exports, module) { + "../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/mock/mock-client.js"(exports, module) { "use strict"; var { promisify } = __require("util"); var Client2 = require_client(); @@ -10853,9 +10853,9 @@ var require_mock_client = __commonJS({ } }); -// node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/mock/mock-pool.js +// ../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/mock/mock-pool.js var require_mock_pool = __commonJS({ - "node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/mock/mock-pool.js"(exports, module) { + "../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/mock/mock-pool.js"(exports, module) { "use strict"; var { promisify } = __require("util"); var Pool = require_pool(); @@ -10906,9 +10906,9 @@ var require_mock_pool = __commonJS({ } }); -// node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/mock/pluralizer.js +// ../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/mock/pluralizer.js var require_pluralizer = __commonJS({ - "node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/mock/pluralizer.js"(exports, module) { + "../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/mock/pluralizer.js"(exports, module) { "use strict"; var singulars = { pronoun: "it", @@ -10937,9 +10937,9 @@ var require_pluralizer = __commonJS({ } }); -// node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/mock/pending-interceptors-formatter.js +// ../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/mock/pending-interceptors-formatter.js var require_pending_interceptors_formatter = __commonJS({ - "node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/mock/pending-interceptors-formatter.js"(exports, module) { + "../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/mock/pending-interceptors-formatter.js"(exports, module) { "use strict"; var { Transform } = __require("stream"); var { Console } = __require("console"); @@ -10976,9 +10976,9 @@ var require_pending_interceptors_formatter = __commonJS({ } }); -// node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/mock/mock-agent.js +// ../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/mock/mock-agent.js var require_mock_agent = __commonJS({ - "node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/mock/mock-agent.js"(exports, module) { + "../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/mock/mock-agent.js"(exports, module) { "use strict"; var { kClients } = require_symbols(); var Agent = require_agent(); @@ -11115,9 +11115,9 @@ ${pendingInterceptorsFormatter.format(pending)} } }); -// node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/proxy-agent.js +// ../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/proxy-agent.js var require_proxy_agent = __commonJS({ - "node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/proxy-agent.js"(exports, module) { + "../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/proxy-agent.js"(exports, module) { "use strict"; var { kProxy, kClose, kDestroy, kInterceptors } = require_symbols(); var { URL: URL2 } = __require("url"); @@ -11267,10 +11267,10 @@ var require_proxy_agent = __commonJS({ } }); -// node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/handler/RetryHandler.js +// ../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/handler/RetryHandler.js var require_RetryHandler = __commonJS({ - "node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/handler/RetryHandler.js"(exports, module) { - var assert3 = __require("assert"); + "../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/handler/RetryHandler.js"(exports, module) { + var assert4 = __require("assert"); var { kRetryHandlerDefaultRetry } = require_symbols(); var { RequestRetryError } = require_errors(); var { isDisturbed, parseHeaders, parseRangeHeader } = require_util(); @@ -11435,8 +11435,8 @@ var require_RetryHandler = __commonJS({ return false; } const { start, size, end = size } = contentRange; - assert3(this.start === start, "content-range mismatch"); - assert3(this.end == null || this.end === end, "content-range mismatch"); + assert4(this.start === start, "content-range mismatch"); + assert4(this.end == null || this.end === end, "content-range mismatch"); this.resume = resume; return true; } @@ -11452,12 +11452,12 @@ var require_RetryHandler = __commonJS({ ); } const { start, size, end = size } = range2; - assert3( + assert4( start != null && Number.isFinite(start) && this.start !== start, "content-range mismatch" ); - assert3(Number.isFinite(start)); - assert3( + assert4(Number.isFinite(start)); + assert4( end != null && Number.isFinite(end) && this.end !== end, "invalid content-length" ); @@ -11468,8 +11468,8 @@ var require_RetryHandler = __commonJS({ const contentLength = headers["content-length"]; this.end = contentLength != null ? Number(contentLength) : null; } - assert3(Number.isFinite(this.start)); - assert3( + assert4(Number.isFinite(this.start)); + assert4( this.end == null || Number.isFinite(this.end), "invalid content-length" ); @@ -11534,9 +11534,9 @@ var require_RetryHandler = __commonJS({ } }); -// node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/global.js +// ../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/global.js var require_global2 = __commonJS({ - "node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/global.js"(exports, module) { + "../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/global.js"(exports, module) { "use strict"; var globalDispatcher = Symbol.for("undici.globalDispatcher.1"); var { InvalidArgumentError } = require_errors(); @@ -11565,9 +11565,9 @@ var require_global2 = __commonJS({ } }); -// node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/handler/DecoratorHandler.js +// ../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/handler/DecoratorHandler.js var require_DecoratorHandler = __commonJS({ - "node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/handler/DecoratorHandler.js"(exports, module) { + "../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/handler/DecoratorHandler.js"(exports, module) { "use strict"; module.exports = class DecoratorHandler { constructor(handler2) { @@ -11598,9 +11598,9 @@ var require_DecoratorHandler = __commonJS({ } }); -// node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/fetch/headers.js +// ../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/fetch/headers.js var require_headers = __commonJS({ - "node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/fetch/headers.js"(exports, module) { + "../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/fetch/headers.js"(exports, module) { "use strict"; var { kHeadersList, kConstruct } = require_symbols(); var { kGuard } = require_symbols2(); @@ -11612,7 +11612,7 @@ var require_headers = __commonJS({ } = require_util2(); var util3 = __require("util"); var { webidl } = require_webidl(); - var assert3 = __require("assert"); + var assert4 = __require("assert"); var kHeadersMap = Symbol("headers map"); var kHeadersSortedMap = Symbol("headers map sorted"); function isHTTPWhiteSpaceCharCode(code) { @@ -11625,10 +11625,10 @@ var require_headers = __commonJS({ while (j > i && isHTTPWhiteSpaceCharCode(potentialValue.charCodeAt(i))) ++i; return i === 0 && j === potentialValue.length ? potentialValue : potentialValue.substring(i, j); } - function fill(headers, object2) { - if (Array.isArray(object2)) { - for (let i = 0; i < object2.length; ++i) { - const header = object2[i]; + function fill(headers, object6) { + if (Array.isArray(object6)) { + for (let i = 0; i < object6.length; ++i) { + const header = object6[i]; if (header.length !== 2) { throw webidl.errors.exception({ header: "Headers constructor", @@ -11637,10 +11637,10 @@ var require_headers = __commonJS({ } appendHeader(headers, header[0], header[1]); } - } else if (typeof object2 === "object" && object2 !== null) { - const keys = Object.keys(object2); + } else if (typeof object6 === "object" && object6 !== null) { + const keys = Object.keys(object6); for (let i = 0; i < keys.length; ++i) { - appendHeader(headers, keys[i], object2[keys[i]]); + appendHeader(headers, keys[i], object6[keys[i]]); } } else { throw webidl.errors.conversionFailed({ @@ -11870,7 +11870,7 @@ var require_headers = __commonJS({ headers.push([name, cookies[j]]); } } else { - assert3(value2 !== null); + assert4(value2 !== null); headers.push([name, value2]); } } @@ -11988,9 +11988,9 @@ var require_headers = __commonJS({ } }); -// node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/fetch/response.js +// ../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/fetch/response.js var require_response = __commonJS({ - "node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/fetch/response.js"(exports, module) { + "../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/fetch/response.js"(exports, module) { "use strict"; var { Headers: Headers2, HeadersList, fill } = require_headers(); var { extractBody, cloneBody, mixinBody } = require_body(); @@ -11999,7 +11999,7 @@ var require_response = __commonJS({ var { isValidReasonPhrase, isCancelled, - isAborted: isAborted4, + isAborted: isAborted3, isBlobLike, serializeJavascriptValueToJSONString, isErrorLike, @@ -12016,7 +12016,7 @@ var require_response = __commonJS({ var { getGlobalOrigin } = require_global(); var { URLSerializer } = require_dataURL(); var { kHeadersList, kConstruct } = require_symbols(); - var assert3 = __require("assert"); + var assert4 = __require("assert"); var { types } = __require("util"); var ReadableStream2 = globalThis.ReadableStream || __require("stream/web").ReadableStream; var textEncoder = new TextEncoder("utf-8"); @@ -12051,16 +12051,16 @@ var require_response = __commonJS({ return responseObject; } // Creates a redirect Response that redirects to url with status status. - static redirect(url2, status = 302) { + static redirect(url4, status = 302) { const relevantRealm = { settingsObject: {} }; webidl.argumentLengthCheck(arguments, 1, { header: "Response.redirect" }); - url2 = webidl.converters.USVString(url2); + url4 = webidl.converters.USVString(url4); status = webidl.converters["unsigned short"](status); let parsedURL; try { - parsedURL = new URL(url2, getGlobalOrigin()); + parsedURL = new URL(url4, getGlobalOrigin()); } catch (err) { - throw Object.assign(new TypeError("Failed to parse URL from " + url2), { + throw Object.assign(new TypeError("Failed to parse URL from " + url4), { cause: err }); } @@ -12104,11 +12104,11 @@ var require_response = __commonJS({ get url() { webidl.brandCheck(this, _Response); const urlList = this[kState].urlList; - const url2 = urlList[urlList.length - 1] ?? null; - if (url2 === null) { + const url4 = urlList[urlList.length - 1] ?? null; + if (url4 === null) { return ""; } - return URLSerializer(url2, true); + return URLSerializer(url4, true); } // Returns whether response was obtained through a redirect. get redirected() { @@ -12232,7 +12232,7 @@ var require_response = __commonJS({ return p in state ? state[p] : target[p]; }, set(target, p, value2) { - assert3(!(p in state)); + assert4(!(p in state)); target[p] = value2; return true; } @@ -12266,12 +12266,12 @@ var require_response = __commonJS({ body: null }); } else { - assert3(false); + assert4(false); } } function makeAppropriateNetworkError(fetchParams, err = null) { - assert3(isCancelled(fetchParams)); - return isAborted4(fetchParams) ? makeNetworkError(Object.assign(new DOMException2("The operation was aborted.", "AbortError"), { cause: err })) : makeNetworkError(Object.assign(new DOMException2("Request was cancelled."), { cause: err })); + assert4(isCancelled(fetchParams)); + return isAborted3(fetchParams) ? makeNetworkError(Object.assign(new DOMException2("The operation was aborted.", "AbortError"), { cause: err })) : makeNetworkError(Object.assign(new DOMException2("Request was cancelled."), { cause: err })); } function initializeResponse(response, init, body) { if (init.status !== null && (init.status < 200 || init.status > 599)) { @@ -12367,9 +12367,9 @@ var require_response = __commonJS({ } }); -// node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/fetch/request.js +// ../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/fetch/request.js var require_request2 = __commonJS({ - "node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/fetch/request.js"(exports, module) { + "../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/fetch/request.js"(exports, module) { "use strict"; var { extractBody, mixinBody, cloneBody } = require_body(); var { Headers: Headers2, fill: fillHeaders, HeadersList } = require_headers(); @@ -12398,7 +12398,7 @@ var require_request2 = __commonJS({ var { getGlobalOrigin } = require_global(); var { URLSerializer } = require_dataURL(); var { kHeadersList, kConstruct } = require_symbols(); - var assert3 = __require("assert"); + var assert4 = __require("assert"); var { getMaxListeners, setMaxListeners: setMaxListeners2, getEventListeners, defaultMaxListeners } = __require("events"); var TransformStream2 = globalThis.TransformStream; var kAbortController = Symbol("abortController"); @@ -12442,7 +12442,7 @@ var require_request2 = __commonJS({ request2 = makeRequest({ urlList: [parsedURL] }); fallbackMode = "cors"; } else { - assert3(input instanceof _Request); + assert4(input instanceof _Request); request2 = input[kState]; signal = input[kSignal]; } @@ -13006,9 +13006,9 @@ var require_request2 = __commonJS({ } }); -// node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/fetch/index.js +// ../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/fetch/index.js var require_fetch = __commonJS({ - "node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/fetch/index.js"(exports, module) { + "../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/fetch/index.js"(exports, module) { "use strict"; var { Response: Response2, @@ -13041,7 +13041,7 @@ var require_fetch = __commonJS({ isBlobLike, sameOrigin, isCancelled, - isAborted: isAborted4, + isAborted: isAborted3, isErrorLike, fullyReadBody, readableStreamClose, @@ -13051,7 +13051,7 @@ var require_fetch = __commonJS({ urlHasHttpsScheme } = require_util2(); var { kState, kHeaders, kGuard, kRealm } = require_symbols2(); - var assert3 = __require("assert"); + var assert4 = __require("assert"); var { safelyExtractBody } = require_body(); var { redirectStatusSet, @@ -13091,17 +13091,17 @@ var require_fetch = __commonJS({ this.emit("terminated", reason); } // https://fetch.spec.whatwg.org/#fetch-controller-abort - abort(error41) { + abort(error50) { if (this.state !== "ongoing") { return; } this.state = "aborted"; - if (!error41) { - error41 = new DOMException2("The operation was aborted.", "AbortError"); + if (!error50) { + error50 = new DOMException2("The operation was aborted.", "AbortError"); } - this.serializedAbortReason = error41; - this.connection?.destroy(error41); - this.emit("terminated", error41); + this.serializedAbortReason = error50; + this.connection?.destroy(error50); + this.emit("terminated", error50); } }; function fetch3(input, init = {}) { @@ -13131,7 +13131,7 @@ var require_fetch = __commonJS({ requestObject.signal, () => { locallyAborted = true; - assert3(controller != null); + assert4(controller != null); controller.abort(requestObject.signal.reason); abortFetch(p, request2, responseObject, requestObject.signal.reason); } @@ -13205,13 +13205,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, error50) { + if (!error50) { + error50 = new DOMException2("The operation was aborted.", "AbortError"); } - p.reject(error41); + p.reject(error50); if (request2.body != null && isReadable(request2.body?.stream)) { - request2.body.stream.cancel(error41).catch((err) => { + request2.body.stream.cancel(error50).catch((err) => { if (err.code === "ERR_INVALID_STATE") { return; } @@ -13223,7 +13223,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(error50).catch((err) => { if (err.code === "ERR_INVALID_STATE") { return; } @@ -13264,7 +13264,7 @@ var require_fetch = __commonJS({ taskDestination, crossOriginIsolatedCapability }; - assert3(!request2.body || request2.body.stream); + assert4(!request2.body || request2.body.stream); if (request2.window === "client") { request2.window = request2.client?.globalObject?.constructor?.name === "Window" ? request2.client : "no-window"; } @@ -13357,7 +13357,7 @@ var require_fetch = __commonJS({ } else if (request2.responseTainting === "opaque") { response = filterResponse(response, "opaque"); } else { - assert3(false); + assert4(false); } } let internalResponse = response.status === 0 ? response : response.internalResponse; @@ -13549,7 +13549,7 @@ var require_fetch = __commonJS({ } else if (request2.redirect === "follow") { response = await httpRedirectFetch(fetchParams, response); } else { - assert3(false); + assert4(false); } } response.timingInfo = timingInfo; @@ -13602,7 +13602,7 @@ var require_fetch = __commonJS({ request2.headersList.delete("host"); } if (request2.body != null) { - assert3(request2.body.source != null); + assert4(request2.body.source != null); request2.body = safelyExtractBody(request2.body.source)[0]; } const timingInfo = fetchParams.timingInfo; @@ -13735,7 +13735,7 @@ var require_fetch = __commonJS({ return response; } async function httpNetworkFetch(fetchParams, includeCredentials = false, forceNewConnection = false) { - assert3(!fetchParams.controller.connection || fetchParams.controller.connection.destroyed); + assert4(!fetchParams.controller.connection || fetchParams.controller.connection.destroyed); fetchParams.controller.connection = { abort: null, destroyed: false, @@ -13849,7 +13849,7 @@ var require_fetch = __commonJS({ let isFailure; try { const { done, value: value2 } = await fetchParams.controller.next(); - if (isAborted4(fetchParams)) { + if (isAborted3(fetchParams)) { break; } bytes = done ? void 0 : value2; @@ -13882,7 +13882,7 @@ var require_fetch = __commonJS({ } }; function onAborted(reason) { - if (isAborted4(fetchParams)) { + if (isAborted3(fetchParams)) { response.aborted = true; if (isReadable(stream)) { fetchParams.controller.controller.error( @@ -13900,12 +13900,12 @@ var require_fetch = __commonJS({ } return response; async function dispatch({ body }) { - const url2 = requestCurrentURL(request2); + const url4 = requestCurrentURL(request2); const agent2 = fetchParams.controller.dispatcher; return new Promise((resolve, reject) => agent2.dispatch( { - path: url2.pathname + url2.search, - origin: url2.origin, + path: url4.pathname + url4.search, + origin: url4.origin, method: request2.method, body: fetchParams.controller.dispatcher.isMockActive ? request2.body && (request2.body.source || request2.body.stream) : body, headers: request2.headersList.entries, @@ -14003,13 +14003,13 @@ var require_fetch = __commonJS({ fetchParams.controller.ended = true; this.body.push(null); }, - onError(error41) { + onError(error50) { if (this.abort) { fetchParams.controller.off("terminated", this.abort); } - this.body?.destroy(error41); - fetchParams.controller.terminate(error41); - reject(error41); + this.body?.destroy(error50); + fetchParams.controller.terminate(error50); + reject(error50); }, onUpgrade(status, headersList, socket) { if (status !== 101) { @@ -14042,9 +14042,9 @@ var require_fetch = __commonJS({ } }); -// node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/fileapi/symbols.js +// ../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/fileapi/symbols.js var require_symbols3 = __commonJS({ - "node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/fileapi/symbols.js"(exports, module) { + "../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/fileapi/symbols.js"(exports, module) { "use strict"; module.exports = { kState: Symbol("FileReader state"), @@ -14057,9 +14057,9 @@ var require_symbols3 = __commonJS({ } }); -// node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/fileapi/progressevent.js +// ../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/fileapi/progressevent.js var require_progressevent = __commonJS({ - "node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/fileapi/progressevent.js"(exports, module) { + "../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/fileapi/progressevent.js"(exports, module) { "use strict"; var { webidl } = require_webidl(); var kState = Symbol("ProgressEvent state"); @@ -14125,9 +14125,9 @@ var require_progressevent = __commonJS({ } }); -// node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/fileapi/encoding.js +// ../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/fileapi/encoding.js var require_encoding = __commonJS({ - "node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/fileapi/encoding.js"(exports, module) { + "../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/fileapi/encoding.js"(exports, module) { "use strict"; function getEncoding(label) { if (!label) { @@ -14411,9 +14411,9 @@ var require_encoding = __commonJS({ } }); -// node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/fileapi/util.js +// ../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/fileapi/util.js var require_util4 = __commonJS({ - "node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/fileapi/util.js"(exports, module) { + "../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/fileapi/util.js"(exports, module) { "use strict"; var { kState, @@ -14475,8 +14475,8 @@ var require_util4 = __commonJS({ } fr[kResult] = result; fireAProgressEvent("load", fr); - } catch (error41) { - fr[kError] = error41; + } catch (error50) { + fr[kError] = error50; fireAProgressEvent("error", fr); } if (fr[kState] !== "loading") { @@ -14485,13 +14485,13 @@ var require_util4 = __commonJS({ }); break; } - } catch (error41) { + } catch (error50) { if (fr[kAborted]) { return; } queueMicrotask(() => { fr[kState] = "done"; - fr[kError] = error41; + fr[kError] = error50; fireAProgressEvent("error", fr); if (fr[kState] !== "loading") { fireAProgressEvent("loadend", fr); @@ -14539,7 +14539,7 @@ var require_util4 = __commonJS({ if (encoding === "failure") { encoding = "UTF-8"; } - return decode(bytes, encoding); + return decode3(bytes, encoding); } case "ArrayBuffer": { const sequence = combineByteSequences(bytes); @@ -14556,7 +14556,7 @@ var require_util4 = __commonJS({ } } } - function decode(ioQueue, encoding) { + function decode3(ioQueue, encoding) { const bytes = combineByteSequences(ioQueue); const BOMEncoding = BOMSniffing(bytes); let slice = 0; @@ -14597,9 +14597,9 @@ var require_util4 = __commonJS({ } }); -// node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/fileapi/filereader.js +// ../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/fileapi/filereader.js var require_filereader = __commonJS({ - "node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/fileapi/filereader.js"(exports, module) { + "../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/fileapi/filereader.js"(exports, module) { "use strict"; var { staticPropertyDescriptors, @@ -14856,9 +14856,9 @@ var require_filereader = __commonJS({ } }); -// node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/cache/symbols.js +// ../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/cache/symbols.js var require_symbols4 = __commonJS({ - "node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/cache/symbols.js"(exports, module) { + "../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/cache/symbols.js"(exports, module) { "use strict"; module.exports = { kConstruct: require_symbols().kConstruct @@ -14866,11 +14866,11 @@ var require_symbols4 = __commonJS({ } }); -// node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/cache/util.js +// ../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/cache/util.js var require_util5 = __commonJS({ - "node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/cache/util.js"(exports, module) { + "../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/cache/util.js"(exports, module) { "use strict"; - var assert3 = __require("assert"); + var assert4 = __require("assert"); var { URLSerializer } = require_dataURL(); var { isValidHeaderName } = require_util2(); function urlEquals(A, B, excludeFragment = false) { @@ -14879,7 +14879,7 @@ var require_util5 = __commonJS({ return serializedA === serializedB; } function fieldValues(header) { - assert3(header !== null); + assert4(header !== null); const values = []; for (let value2 of header.split(",")) { value2 = value2.trim(); @@ -14899,9 +14899,9 @@ var require_util5 = __commonJS({ } }); -// node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/cache/cache.js +// ../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/cache/cache.js var require_cache = __commonJS({ - "node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/cache/cache.js"(exports, module) { + "../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/cache/cache.js"(exports, module) { "use strict"; var { kConstruct } = require_symbols4(); var { urlEquals, fieldValues: getFieldValues } = require_util5(); @@ -14913,7 +14913,7 @@ var require_cache = __commonJS({ var { kState, kHeaders, kGuard, kRealm } = require_symbols2(); var { fetching } = require_fetch(); var { urlIsHttpHttpsScheme, createDeferredPromise, readAllBytes } = require_util2(); - var assert3 = __require("assert"); + var assert4 = __require("assert"); var { getGlobalDispatcher } = require_global2(); var Cache = class _Cache { /** @@ -15174,7 +15174,7 @@ var require_cache = __commonJS({ return false; } } else { - assert3(typeof request2 === "string"); + assert4(typeof request2 === "string"); r = new Request2(request2)[kState]; } const operations = []; @@ -15222,7 +15222,7 @@ var require_cache = __commonJS({ r = new Request2(request2)[kState]; } } - const promise = createDeferredPromise(); + const promise2 = createDeferredPromise(); const requests = []; if (request2 === void 0) { for (const requestResponse of this.#relevantRequestResponseList) { @@ -15244,9 +15244,9 @@ var require_cache = __commonJS({ requestObject[kRealm] = request3.client; requestList.push(requestObject); } - promise.resolve(Object.freeze(requestList)); + promise2.resolve(Object.freeze(requestList)); }); - return promise.promise; + return promise2.promise; } /** * @see https://w3c.github.io/ServiceWorker/#batch-cache-operations-algorithm @@ -15283,7 +15283,7 @@ var require_cache = __commonJS({ } for (const requestResponse of requestResponses) { const idx = cache.indexOf(requestResponse); - assert3(idx !== -1); + assert4(idx !== -1); cache.splice(idx, 1); } } else if (operation.type === "put") { @@ -15315,7 +15315,7 @@ var require_cache = __commonJS({ requestResponses = this.#queryCache(operation.request); for (const requestResponse of requestResponses) { const idx = cache.indexOf(requestResponse); - assert3(idx !== -1); + assert4(idx !== -1); cache.splice(idx, 1); } cache.push([operation.request, operation.response]); @@ -15431,9 +15431,9 @@ var require_cache = __commonJS({ } }); -// node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/cache/cachestorage.js +// ../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/cache/cachestorage.js var require_cachestorage = __commonJS({ - "node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/cache/cachestorage.js"(exports, module) { + "../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/cache/cachestorage.js"(exports, module) { "use strict"; var { kConstruct } = require_symbols4(); var { Cache } = require_cache(); @@ -15537,9 +15537,9 @@ var require_cachestorage = __commonJS({ } }); -// node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/cookies/constants.js +// ../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/cookies/constants.js var require_constants4 = __commonJS({ - "node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/cookies/constants.js"(exports, module) { + "../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/cookies/constants.js"(exports, module) { "use strict"; var maxAttributeValueSize = 1024; var maxNameValuePairSize = 4096; @@ -15550,9 +15550,9 @@ var require_constants4 = __commonJS({ } }); -// node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/cookies/util.js +// ../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/cookies/util.js var require_util6 = __commonJS({ - "node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/cookies/util.js"(exports, module) { + "../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/cookies/util.js"(exports, module) { "use strict"; function isCTLExcludingHtab(value2) { if (value2.length === 0) { @@ -15595,9 +15595,9 @@ var require_util6 = __commonJS({ throw new Error("Invalid cookie domain"); } } - function toIMFDate(date2) { - if (typeof date2 === "number") { - date2 = new Date(date2); + function toIMFDate(date7) { + if (typeof date7 === "number") { + date7 = new Date(date7); } const days = [ "Sun", @@ -15622,13 +15622,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[date7.getUTCDay()]; + const day = date7.getUTCDate().toString().padStart(2, "0"); + const month = months2[date7.getUTCMonth()]; + const year = date7.getUTCFullYear(); + const hour = date7.getUTCHours().toString().padStart(2, "0"); + const minute = date7.getUTCMinutes().toString().padStart(2, "0"); + const second = date7.getUTCSeconds().toString().padStart(2, "0"); return `${dayName}, ${day} ${month} ${year} ${hour}:${minute}:${second} GMT`; } function validateCookieMaxAge(maxAge) { @@ -15695,14 +15695,14 @@ var require_util6 = __commonJS({ } }); -// node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/cookies/parse.js +// ../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/cookies/parse.js var require_parse = __commonJS({ - "node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/cookies/parse.js"(exports, module) { + "../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/cookies/parse.js"(exports, module) { "use strict"; var { maxNameValuePairSize, maxAttributeValueSize } = require_constants4(); var { isCTLExcludingHtab } = require_util6(); var { collectASequenceOfCodePointsFast } = require_dataURL(); - var assert3 = __require("assert"); + var assert4 = __require("assert"); function parseSetCookie(header) { if (isCTLExcludingHtab(header)) { return null; @@ -15744,7 +15744,7 @@ var require_parse = __commonJS({ if (unparsedAttributes.length === 0) { return cookieAttributeList; } - assert3(unparsedAttributes[0] === ";"); + assert4(unparsedAttributes[0] === ";"); unparsedAttributes = unparsedAttributes.slice(1); let cookieAv = ""; if (unparsedAttributes.includes(";")) { @@ -15835,9 +15835,9 @@ var require_parse = __commonJS({ } }); -// node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/cookies/index.js +// ../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/cookies/index.js var require_cookies = __commonJS({ - "node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/cookies/index.js"(exports, module) { + "../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/cookies/index.js"(exports, module) { "use strict"; var { parseSetCookie } = require_parse(); var { stringify } = require_util6(); @@ -15963,9 +15963,9 @@ var require_cookies = __commonJS({ } }); -// node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/websocket/constants.js +// ../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/websocket/constants.js var require_constants5 = __commonJS({ - "node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/websocket/constants.js"(exports, module) { + "../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/websocket/constants.js"(exports, module) { "use strict"; var uid = "258EAFA5-E914-47DA-95CA-C5AB0DC85B11"; var staticPropertyDescriptors = { @@ -16007,9 +16007,9 @@ var require_constants5 = __commonJS({ } }); -// node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/websocket/symbols.js +// ../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/websocket/symbols.js var require_symbols5 = __commonJS({ - "node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/websocket/symbols.js"(exports, module) { + "../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/websocket/symbols.js"(exports, module) { "use strict"; module.exports = { kWebSocketURL: Symbol("url"), @@ -16024,9 +16024,9 @@ var require_symbols5 = __commonJS({ } }); -// node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/websocket/events.js +// ../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/websocket/events.js var require_events = __commonJS({ - "node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/websocket/events.js"(exports, module) { + "../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/websocket/events.js"(exports, module) { "use strict"; var { webidl } = require_webidl(); var { kEnumerableProperty } = require_util(); @@ -16267,9 +16267,9 @@ var require_events = __commonJS({ } }); -// node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/websocket/util.js +// ../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/websocket/util.js var require_util7 = __commonJS({ - "node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/websocket/util.js"(exports, module) { + "../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/websocket/util.js"(exports, module) { "use strict"; var { kReadyState, kController, kResponse, kBinaryType, kWebSocketURL } = require_symbols5(); var { states, opcodes } = require_constants5(); @@ -16357,9 +16357,9 @@ var require_util7 = __commonJS({ } }); -// node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/websocket/connection.js +// ../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/websocket/connection.js var require_connection = __commonJS({ - "node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/websocket/connection.js"(exports, module) { + "../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/websocket/connection.js"(exports, module) { "use strict"; var diagnosticsChannel = __require("diagnostics_channel"); var { uid, states } = require_constants5(); @@ -16385,9 +16385,9 @@ var require_connection = __commonJS({ crypto2 = __require("crypto"); } catch { } - function establishWebSocketConnection(url2, protocols, ws, onEstablish, options) { - const requestURL = url2; - requestURL.protocol = url2.protocol === "ws:" ? "http:" : "https:"; + function establishWebSocketConnection(url4, protocols, ws, onEstablish, options) { + const requestURL = url4; + requestURL.protocol = url4.protocol === "ws:" ? "http:" : "https:"; const request2 = makeRequest({ urlList: [requestURL], serviceWorkers: "none", @@ -16491,11 +16491,11 @@ var require_connection = __commonJS({ }); } } - function onSocketError(error41) { + function onSocketError(error50) { const { ws } = this; ws[kReadyState] = states.CLOSING; if (channels.socketError.hasSubscribers) { - channels.socketError.publish(error41); + channels.socketError.publish(error50); } this.destroy(); } @@ -16505,9 +16505,9 @@ var require_connection = __commonJS({ } }); -// node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/websocket/frame.js +// ../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/websocket/frame.js var require_frame = __commonJS({ - "node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/websocket/frame.js"(exports, module) { + "../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/websocket/frame.js"(exports, module) { "use strict"; var { maxUnsigned16Bit } = require_constants5(); var crypto2; @@ -16562,9 +16562,9 @@ var require_frame = __commonJS({ } }); -// node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/websocket/receiver.js +// ../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/websocket/receiver.js var require_receiver = __commonJS({ - "node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/websocket/receiver.js"(exports, module) { + "../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/websocket/receiver.js"(exports, module) { "use strict"; var { Writable } = __require("stream"); var diagnosticsChannel = __require("diagnostics_channel"); @@ -16798,9 +16798,9 @@ var require_receiver = __commonJS({ } }); -// node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/websocket/websocket.js +// ../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/websocket/websocket.js var require_websocket = __commonJS({ - "node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/websocket/websocket.js"(exports, module) { + "../node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/websocket/websocket.js"(exports, module) { "use strict"; var { webidl } = require_webidl(); var { DOMException: DOMException2 } = require_constants2(); @@ -16838,7 +16838,7 @@ var require_websocket = __commonJS({ * @param {string} url * @param {string|string[]} protocols */ - constructor(url2, protocols = []) { + constructor(url4, protocols = []) { super(); webidl.argumentLengthCheck(arguments, 1, { header: "WebSocket constructor" }); if (!experimentalWarned) { @@ -16848,12 +16848,12 @@ var require_websocket = __commonJS({ }); } const options = webidl.converters["DOMString or sequence or WebSocketInit"](protocols); - url2 = webidl.converters.USVString(url2); + url4 = webidl.converters.USVString(url4); protocols = options.protocols; const baseURL = getGlobalOrigin(); let urlRecord; try { - urlRecord = new URL(url2, baseURL); + urlRecord = new URL(url4, baseURL); } catch (e) { throw new DOMException2(e, "SyntaxError"); } @@ -17203,9 +17203,9 @@ var require_websocket = __commonJS({ } }); -// node_modules/.pnpm/undici@5.29.0/node_modules/undici/index.js +// ../node_modules/.pnpm/undici@5.29.0/node_modules/undici/index.js var require_undici = __commonJS({ - "node_modules/.pnpm/undici@5.29.0/node_modules/undici/index.js"(exports, module) { + "../node_modules/.pnpm/undici@5.29.0/node_modules/undici/index.js"(exports, module) { "use strict"; var Client2 = require_client(); var Dispatcher = require_dispatcher(); @@ -17248,12 +17248,12 @@ var require_undici = __commonJS({ module.exports.buildConnector = buildConnector; module.exports.errors = errors; function makeDispatcher(fn2) { - return (url2, opts, handler2) => { + return (url4, opts, handler2) => { if (typeof opts === "function") { handler2 = opts; opts = null; } - if (!url2 || typeof url2 !== "string" && typeof url2 !== "object" && !(url2 instanceof URL)) { + if (!url4 || typeof url4 !== "string" && typeof url4 !== "object" && !(url4 instanceof URL)) { throw new InvalidArgumentError("invalid url"); } if (opts != null && typeof opts !== "object") { @@ -17267,12 +17267,12 @@ var require_undici = __commonJS({ if (!opts.path.startsWith("/")) { path4 = `/${path4}`; } - url2 = new URL(util3.parseOrigin(url2).origin + path4); + url4 = new URL(util3.parseOrigin(url4).origin + path4); } else { if (!opts) { - opts = typeof url2 === "object" ? url2 : {}; + opts = typeof url4 === "object" ? url4 : {}; } - url2 = util3.parseURL(url2); + url4 = util3.parseURL(url4); } const { agent: agent2, dispatcher = getGlobalDispatcher() } = opts; if (agent2) { @@ -17280,8 +17280,8 @@ var require_undici = __commonJS({ } return fn2.call(dispatcher, { ...opts, - origin: url2.origin, - path: url2.search ? `${url2.pathname}${url2.search}` : url2.pathname, + origin: url4.origin, + path: url4.search ? `${url4.pathname}${url4.search}` : url4.pathname, method: opts.method || (opts.body ? "PUT" : "GET") }, handler2); }; @@ -17342,9 +17342,9 @@ var require_undici = __commonJS({ } }); -// node_modules/.pnpm/@actions+http-client@2.2.3/node_modules/@actions/http-client/lib/index.js +// ../node_modules/.pnpm/@actions+http-client@2.2.3/node_modules/@actions/http-client/lib/index.js var require_lib = __commonJS({ - "node_modules/.pnpm/@actions+http-client@2.2.3/node_modules/@actions/http-client/lib/index.js"(exports) { + "../node_modules/.pnpm/@actions+http-client@2.2.3/node_modules/@actions/http-client/lib/index.js"(exports) { "use strict"; var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; @@ -17737,7 +17737,7 @@ var require_lib = __commonJS({ info2.options.headers["Content-Length"] = Buffer.byteLength(data, "utf8"); } let callbackCalled = false; - function handleResult4(err, res) { + function handleResult3(err, res) { if (!callbackCalled) { callbackCalled = true; onResult(err, res); @@ -17745,7 +17745,7 @@ var require_lib = __commonJS({ } const req = info2.httpModule.request(info2.options, (msg) => { const res = new HttpClientResponse(msg); - handleResult4(void 0, res); + handleResult3(void 0, res); }); let socket; req.on("socket", (sock) => { @@ -17755,10 +17755,10 @@ var require_lib = __commonJS({ if (socket) { socket.end(); } - handleResult4(new Error(`Request timeout: ${info2.options.path}`)); + handleResult3(new Error(`Request timeout: ${info2.options.path}`)); }); req.on("error", function(err) { - handleResult4(err); + handleResult3(err); }); if (data && typeof data === "string") { req.write(data, "utf8"); @@ -17819,12 +17819,12 @@ var require_lib = __commonJS({ } return lowercaseKeys2(headers || {}); } - _getExistingOrDefaultHeader(additionalHeaders, header, _default2) { + _getExistingOrDefaultHeader(additionalHeaders, header, _default5) { let clientHeader; if (this.requestOptions && this.requestOptions.headers) { clientHeader = lowercaseKeys2(this.requestOptions.headers)[header]; } - return additionalHeaders[header] || clientHeader || _default2; + return additionalHeaders[header] || clientHeader || _default5; } _getAgent(parsedUrl) { let agent2; @@ -17961,9 +17961,9 @@ var require_lib = __commonJS({ } }); -// node_modules/.pnpm/@actions+http-client@2.2.3/node_modules/@actions/http-client/lib/auth.js +// ../node_modules/.pnpm/@actions+http-client@2.2.3/node_modules/@actions/http-client/lib/auth.js var require_auth = __commonJS({ - "node_modules/.pnpm/@actions+http-client@2.2.3/node_modules/@actions/http-client/lib/auth.js"(exports) { + "../node_modules/.pnpm/@actions+http-client@2.2.3/node_modules/@actions/http-client/lib/auth.js"(exports) { "use strict"; var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value2) { @@ -18065,9 +18065,9 @@ var require_auth = __commonJS({ } }); -// node_modules/.pnpm/@actions+core@1.11.1/node_modules/@actions/core/lib/oidc-utils.js +// ../node_modules/.pnpm/@actions+core@1.11.1/node_modules/@actions/core/lib/oidc-utils.js var require_oidc_utils = __commonJS({ - "node_modules/.pnpm/@actions+core@1.11.1/node_modules/@actions/core/lib/oidc-utils.js"(exports) { + "../node_modules/.pnpm/@actions+core@1.11.1/node_modules/@actions/core/lib/oidc-utils.js"(exports) { "use strict"; var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value2) { @@ -18124,17 +18124,17 @@ var require_oidc_utils = __commonJS({ return runtimeUrl; } static getCall(id_token_url) { - var _a; + var _a2; 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((error50) => { throw new Error(`Failed to get ID Token. - Error Code : ${error41.statusCode} + Error Code : ${error50.statusCode} - Error Message: ${error41.message}`); + Error Message: ${error50.message}`); }); - const id_token = (_a = res.result) === null || _a === void 0 ? void 0 : _a.value; + const id_token = (_a2 = res.result) === null || _a2 === void 0 ? void 0 : _a2.value; if (!id_token) { throw new Error("Response json body do not have ID Token field"); } @@ -18153,8 +18153,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 (error50) { + throw new Error(`Error message: ${error50.message}`); } }); } @@ -18163,9 +18163,9 @@ var require_oidc_utils = __commonJS({ } }); -// node_modules/.pnpm/@actions+core@1.11.1/node_modules/@actions/core/lib/summary.js +// ../node_modules/.pnpm/@actions+core@1.11.1/node_modules/@actions/core/lib/summary.js var require_summary = __commonJS({ - "node_modules/.pnpm/@actions+core@1.11.1/node_modules/@actions/core/lib/summary.js"(exports) { + "../node_modules/.pnpm/@actions+core@1.11.1/node_modules/@actions/core/lib/summary.js"(exports) { "use strict"; var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value2) { @@ -18222,7 +18222,7 @@ var require_summary = __commonJS({ } try { yield access(pathFromEnv, fs_1.constants.R_OK | fs_1.constants.W_OK); - } catch (_a) { + } catch (_a2) { throw new Error(`Unable to access summary file: '${pathFromEnv}'. Check if the file has correct read/write permissions.`); } this._filePath = pathFromEnv; @@ -18457,9 +18457,9 @@ var require_summary = __commonJS({ } }); -// node_modules/.pnpm/@actions+core@1.11.1/node_modules/@actions/core/lib/path-utils.js +// ../node_modules/.pnpm/@actions+core@1.11.1/node_modules/@actions/core/lib/path-utils.js var require_path_utils = __commonJS({ - "node_modules/.pnpm/@actions+core@1.11.1/node_modules/@actions/core/lib/path-utils.js"(exports) { + "../node_modules/.pnpm/@actions+core@1.11.1/node_modules/@actions/core/lib/path-utils.js"(exports) { "use strict"; var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; @@ -18506,9 +18506,9 @@ var require_path_utils = __commonJS({ } }); -// node_modules/.pnpm/@actions+io@1.1.3/node_modules/@actions/io/lib/io-util.js +// ../node_modules/.pnpm/@actions+io@1.1.3/node_modules/@actions/io/lib/io-util.js var require_io_util = __commonJS({ - "node_modules/.pnpm/@actions+io@1.1.3/node_modules/@actions/io/lib/io-util.js"(exports) { + "../node_modules/.pnpm/@actions+io@1.1.3/node_modules/@actions/io/lib/io-util.js"(exports) { "use strict"; var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; @@ -18560,12 +18560,12 @@ var require_io_util = __commonJS({ step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; - var _a; + var _a2; Object.defineProperty(exports, "__esModule", { value: true }); exports.getCmdPath = exports.tryGetExecutablePath = exports.isRooted = exports.isDirectory = exports.exists = exports.READONLY = exports.UV_FS_O_EXLOCK = exports.IS_WINDOWS = exports.unlink = exports.symlink = exports.stat = exports.rmdir = exports.rm = exports.rename = exports.readlink = exports.readdir = exports.open = exports.mkdir = exports.lstat = exports.copyFile = exports.chmod = void 0; var fs4 = __importStar(__require("fs")); var path4 = __importStar(__require("path")); - _a = fs4.promises, exports.chmod = _a.chmod, exports.copyFile = _a.copyFile, exports.lstat = _a.lstat, exports.mkdir = _a.mkdir, exports.open = _a.open, exports.readdir = _a.readdir, exports.readlink = _a.readlink, exports.rename = _a.rename, exports.rm = _a.rm, exports.rmdir = _a.rmdir, exports.stat = _a.stat, exports.symlink = _a.symlink, exports.unlink = _a.unlink; + _a2 = fs4.promises, exports.chmod = _a2.chmod, exports.copyFile = _a2.copyFile, exports.lstat = _a2.lstat, exports.mkdir = _a2.mkdir, exports.open = _a2.open, exports.readdir = _a2.readdir, exports.readlink = _a2.readlink, exports.rename = _a2.rename, exports.rm = _a2.rm, exports.rmdir = _a2.rmdir, exports.stat = _a2.stat, exports.symlink = _a2.symlink, exports.unlink = _a2.unlink; exports.IS_WINDOWS = process.platform === "win32"; exports.UV_FS_O_EXLOCK = 268435456; exports.READONLY = fs4.constants.O_RDONLY; @@ -18672,16 +18672,16 @@ var require_io_util = __commonJS({ return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && stats.uid === process.getuid(); } function getCmdPath() { - var _a2; - return (_a2 = process.env["COMSPEC"]) !== null && _a2 !== void 0 ? _a2 : `cmd.exe`; + var _a3; + return (_a3 = process.env["COMSPEC"]) !== null && _a3 !== void 0 ? _a3 : `cmd.exe`; } exports.getCmdPath = getCmdPath; } }); -// node_modules/.pnpm/@actions+io@1.1.3/node_modules/@actions/io/lib/io.js +// ../node_modules/.pnpm/@actions+io@1.1.3/node_modules/@actions/io/lib/io.js var require_io = __commonJS({ - "node_modules/.pnpm/@actions+io@1.1.3/node_modules/@actions/io/lib/io.js"(exports) { + "../node_modules/.pnpm/@actions+io@1.1.3/node_modules/@actions/io/lib/io.js"(exports) { "use strict"; var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; @@ -18813,12 +18813,12 @@ var require_io = __commonJS({ }); } exports.mkdirP = mkdirP; - function which(tool2, check) { + function which(tool2, check4) { return __awaiter(this, void 0, void 0, function* () { if (!tool2) { throw new Error("parameter 'tool' is required"); } - if (check) { + if (check4) { const result = yield which(tool2, false); if (!result) { if (ioUtil.IS_WINDOWS) { @@ -18927,9 +18927,9 @@ var require_io = __commonJS({ } }); -// node_modules/.pnpm/@actions+exec@1.1.1/node_modules/@actions/exec/lib/toolrunner.js +// ../node_modules/.pnpm/@actions+exec@1.1.1/node_modules/@actions/exec/lib/toolrunner.js var require_toolrunner = __commonJS({ - "node_modules/.pnpm/@actions+exec@1.1.1/node_modules/@actions/exec/lib/toolrunner.js"(exports) { + "../node_modules/.pnpm/@actions+exec@1.1.1/node_modules/@actions/exec/lib/toolrunner.js"(exports) { "use strict"; var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; @@ -19276,7 +19276,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", (error50, exitCode) => { if (stdbuffer.length > 0) { this.emit("stdline", stdbuffer); } @@ -19284,8 +19284,8 @@ var require_toolrunner = __commonJS({ this.emit("errline", errbuffer); } cp.removeAllListeners(); - if (error41) { - reject(error41); + if (error50) { + reject(error50); } else { resolve(exitCode); } @@ -19380,14 +19380,14 @@ var require_toolrunner = __commonJS({ this.emit("debug", message); } _setResult() { - let error41; + let error50; 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}`); + error50 = 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}`); + error50 = 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`); + error50 = new Error(`The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream`); } } if (this.timeout) { @@ -19395,7 +19395,7 @@ var require_toolrunner = __commonJS({ this.timeout = null; } this.done = true; - this.emit("done", error41, this.processExitCode); + this.emit("done", error50, this.processExitCode); } static HandleTimeout(state) { if (state.done) { @@ -19411,9 +19411,9 @@ var require_toolrunner = __commonJS({ } }); -// node_modules/.pnpm/@actions+exec@1.1.1/node_modules/@actions/exec/lib/exec.js +// ../node_modules/.pnpm/@actions+exec@1.1.1/node_modules/@actions/exec/lib/exec.js var require_exec = __commonJS({ - "node_modules/.pnpm/@actions+exec@1.1.1/node_modules/@actions/exec/lib/exec.js"(exports) { + "../node_modules/.pnpm/@actions+exec@1.1.1/node_modules/@actions/exec/lib/exec.js"(exports) { "use strict"; var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; @@ -19483,13 +19483,13 @@ var require_exec = __commonJS({ } exports.exec = exec; function getExecOutput(commandLine, args3, options) { - var _a, _b; + var _a2, _b; return __awaiter(this, void 0, void 0, function* () { let stdout = ""; let stderr = ""; const stdoutDecoder = new string_decoder_1.StringDecoder("utf8"); const stderrDecoder = new string_decoder_1.StringDecoder("utf8"); - const originalStdoutListener = (_a = options === null || options === void 0 ? void 0 : options.listeners) === null || _a === void 0 ? void 0 : _a.stdout; + const originalStdoutListener = (_a2 = options === null || options === void 0 ? void 0 : options.listeners) === null || _a2 === void 0 ? void 0 : _a2.stdout; const originalStdErrListener = (_b = options === null || options === void 0 ? void 0 : options.listeners) === null || _b === void 0 ? void 0 : _b.stderr; const stdErrListener = (data) => { stderr += stderrDecoder.write(data); @@ -19518,9 +19518,9 @@ var require_exec = __commonJS({ } }); -// node_modules/.pnpm/@actions+core@1.11.1/node_modules/@actions/core/lib/platform.js +// ../node_modules/.pnpm/@actions+core@1.11.1/node_modules/@actions/core/lib/platform.js var require_platform = __commonJS({ - "node_modules/.pnpm/@actions+core@1.11.1/node_modules/@actions/core/lib/platform.js"(exports) { + "../node_modules/.pnpm/@actions+core@1.11.1/node_modules/@actions/core/lib/platform.js"(exports) { "use strict"; var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; @@ -19584,7 +19584,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: version4 } = 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, { @@ -19592,29 +19592,29 @@ var require_platform = __commonJS({ }); return { name: name.trim(), - version: version2.trim() + version: version4.trim() }; }); var getMacOsInfo = () => __awaiter(void 0, void 0, void 0, function* () { - var _a, _b, _c, _d; + var _a2, _b, _c, _d; 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 version4 = (_b = (_a2 = stdout.match(/ProductVersion:\s*(.+)/)) === null || _a2 === void 0 ? void 0 : _a2[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: version4 }; }); 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, version4] = stdout.trim().split("\n"); return { name, - version: version2 + version: version4 }; }); exports.platform = os_1.default.platform(); @@ -19637,9 +19637,9 @@ var require_platform = __commonJS({ } }); -// node_modules/.pnpm/@actions+core@1.11.1/node_modules/@actions/core/lib/core.js +// ../node_modules/.pnpm/@actions+core@1.11.1/node_modules/@actions/core/lib/core.js var require_core = __commonJS({ - "node_modules/.pnpm/@actions+core@1.11.1/node_modules/@actions/core/lib/core.js"(exports) { + "../node_modules/.pnpm/@actions+core@1.11.1/node_modules/@actions/core/lib/core.js"(exports) { "use strict"; var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; @@ -19778,7 +19778,7 @@ Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); exports.setCommandEcho = setCommandEcho; function setFailed2(message) { process.exitCode = ExitCode.Failure; - error41(message); + error50(message); } exports.setFailed = setFailed2; function isDebug2() { @@ -19789,10 +19789,10 @@ Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); (0, command_1.issueCommand)("debug", {}, message); } exports.debug = debug; - function error41(message, properties = {}) { + function error50(message, properties = {}) { (0, command_1.issueCommand)("error", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); } - exports.error = error41; + exports.error = error50; function warning2(message, properties = {}) { (0, command_1.issueCommand)("warning", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); } @@ -19866,9 +19866,9 @@ Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); } }); -// node_modules/.pnpm/ansi-regex@5.0.1/node_modules/ansi-regex/index.js +// ../node_modules/.pnpm/ansi-regex@5.0.1/node_modules/ansi-regex/index.js var require_ansi_regex = __commonJS({ - "node_modules/.pnpm/ansi-regex@5.0.1/node_modules/ansi-regex/index.js"(exports, module) { + "../node_modules/.pnpm/ansi-regex@5.0.1/node_modules/ansi-regex/index.js"(exports, module) { "use strict"; module.exports = ({ onlyFirst = false } = {}) => { const pattern = [ @@ -19880,18 +19880,18 @@ var require_ansi_regex = __commonJS({ } }); -// node_modules/.pnpm/strip-ansi@6.0.1/node_modules/strip-ansi/index.js +// ../node_modules/.pnpm/strip-ansi@6.0.1/node_modules/strip-ansi/index.js var require_strip_ansi = __commonJS({ - "node_modules/.pnpm/strip-ansi@6.0.1/node_modules/strip-ansi/index.js"(exports, module) { + "../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 = (string8) => typeof string8 === "string" ? string8.replace(ansiRegex(), "") : string8; } }); -// node_modules/.pnpm/is-fullwidth-code-point@3.0.0/node_modules/is-fullwidth-code-point/index.js +// ../node_modules/.pnpm/is-fullwidth-code-point@3.0.0/node_modules/is-fullwidth-code-point/index.js var require_is_fullwidth_code_point = __commonJS({ - "node_modules/.pnpm/is-fullwidth-code-point@3.0.0/node_modules/is-fullwidth-code-point/index.js"(exports, module) { + "../node_modules/.pnpm/is-fullwidth-code-point@3.0.0/node_modules/is-fullwidth-code-point/index.js"(exports, module) { "use strict"; var isFullwidthCodePoint = (codePoint) => { if (Number.isNaN(codePoint)) { @@ -19922,9 +19922,9 @@ var require_is_fullwidth_code_point = __commonJS({ } }); -// node_modules/.pnpm/emoji-regex@8.0.0/node_modules/emoji-regex/index.js +// ../node_modules/.pnpm/emoji-regex@8.0.0/node_modules/emoji-regex/index.js var require_emoji_regex = __commonJS({ - "node_modules/.pnpm/emoji-regex@8.0.0/node_modules/emoji-regex/index.js"(exports, module) { + "../node_modules/.pnpm/emoji-regex@8.0.0/node_modules/emoji-regex/index.js"(exports, module) { "use strict"; module.exports = function() { return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3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DD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g; @@ -19932,25 +19932,25 @@ var require_emoji_regex = __commonJS({ } }); -// node_modules/.pnpm/string-width@4.2.3/node_modules/string-width/index.js +// ../node_modules/.pnpm/string-width@4.2.3/node_modules/string-width/index.js var require_string_width = __commonJS({ - "node_modules/.pnpm/string-width@4.2.3/node_modules/string-width/index.js"(exports, module) { + "../node_modules/.pnpm/string-width@4.2.3/node_modules/string-width/index.js"(exports, module) { "use strict"; 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 emojiRegex4 = require_emoji_regex(); + var stringWidth = (string8) => { + if (typeof string8 !== "string" || string8.length === 0) { return 0; } - string3 = stripAnsi(string3); - if (string3.length === 0) { + string8 = stripAnsi(string8); + if (string8.length === 0) { return 0; } - string3 = string3.replace(emojiRegex5(), " "); + string8 = string8.replace(emojiRegex4(), " "); let width = 0; - for (let i = 0; i < string3.length; i++) { - const code = string3.codePointAt(i); + for (let i = 0; i < string8.length; i++) { + const code = string8.codePointAt(i); if (code <= 31 || code >= 127 && code <= 159) { continue; } @@ -19969,9 +19969,9 @@ var require_string_width = __commonJS({ } }); -// node_modules/.pnpm/astral-regex@2.0.0/node_modules/astral-regex/index.js +// ../node_modules/.pnpm/astral-regex@2.0.0/node_modules/astral-regex/index.js var require_astral_regex = __commonJS({ - "node_modules/.pnpm/astral-regex@2.0.0/node_modules/astral-regex/index.js"(exports, module) { + "../node_modules/.pnpm/astral-regex@2.0.0/node_modules/astral-regex/index.js"(exports, module) { "use strict"; var regex4 = "[\uD800-\uDBFF][\uDC00-\uDFFF]"; var astralRegex = (options) => options && options.exact ? new RegExp(`^${regex4}$`) : new RegExp(regex4, "g"); @@ -19979,9 +19979,9 @@ var require_astral_regex = __commonJS({ } }); -// node_modules/.pnpm/color-name@1.1.4/node_modules/color-name/index.js +// ../node_modules/.pnpm/color-name@1.1.4/node_modules/color-name/index.js var require_color_name = __commonJS({ - "node_modules/.pnpm/color-name@1.1.4/node_modules/color-name/index.js"(exports, module) { + "../node_modules/.pnpm/color-name@1.1.4/node_modules/color-name/index.js"(exports, module) { "use strict"; module.exports = { "aliceblue": [240, 248, 255], @@ -20136,9 +20136,9 @@ var require_color_name = __commonJS({ } }); -// node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/conversions.js +// ../node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/conversions.js var require_conversions = __commonJS({ - "node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/conversions.js"(exports, module) { + "../node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/conversions.js"(exports, module) { var cssKeywords = require_color_name(); var reverseKeywords = {}; for (const key of Object.keys(cssKeywords)) { @@ -20302,23 +20302,23 @@ var require_conversions = __commonJS({ b = b > 0.04045 ? ((b + 0.055) / 1.055) ** 2.4 : b / 12.92; const x = r * 0.4124 + g * 0.3576 + b * 0.1805; const y = r * 0.2126 + g * 0.7152 + b * 0.0722; - const z = r * 0.0193 + g * 0.1192 + b * 0.9505; - return [x * 100, y * 100, z * 100]; + const z2 = r * 0.0193 + g * 0.1192 + b * 0.9505; + return [x * 100, y * 100, z2 * 100]; }; convert.rgb.lab = function(rgb) { const xyz = convert.rgb.xyz(rgb); let x = xyz[0]; let y = xyz[1]; - let z = xyz[2]; + let z2 = xyz[2]; x /= 95.047; y /= 100; - z /= 108.883; + z2 /= 108.883; x = x > 8856e-6 ? x ** (1 / 3) : 7.787 * x + 16 / 116; y = y > 8856e-6 ? y ** (1 / 3) : 7.787 * y + 16 / 116; - z = z > 8856e-6 ? z ** (1 / 3) : 7.787 * z + 16 / 116; + z2 = z2 > 8856e-6 ? z2 ** (1 / 3) : 7.787 * z2 + 16 / 116; const l = 116 * y - 16; const a = 500 * (x - y); - const b = 200 * (y - z); + const b = 200 * (y - z2); return [l, a, b]; }; convert.hsl.rgb = function(hsl) { @@ -20482,13 +20482,13 @@ var require_conversions = __commonJS({ convert.xyz.rgb = function(xyz) { const x = xyz[0] / 100; const y = xyz[1] / 100; - const z = xyz[2] / 100; + const z2 = xyz[2] / 100; let r; let g; let b; - r = x * 3.2406 + y * -1.5372 + z * -0.4986; - g = x * -0.9689 + y * 1.8758 + z * 0.0415; - b = x * 0.0557 + y * -0.204 + z * 1.057; + r = x * 3.2406 + y * -1.5372 + z2 * -0.4986; + g = x * -0.9689 + y * 1.8758 + z2 * 0.0415; + b = x * 0.0557 + y * -0.204 + z2 * 1.057; r = r > 31308e-7 ? 1.055 * r ** (1 / 2.4) - 0.055 : r * 12.92; g = g > 31308e-7 ? 1.055 * g ** (1 / 2.4) - 0.055 : g * 12.92; b = b > 31308e-7 ? 1.055 * b ** (1 / 2.4) - 0.055 : b * 12.92; @@ -20500,16 +20500,16 @@ var require_conversions = __commonJS({ convert.xyz.lab = function(xyz) { let x = xyz[0]; let y = xyz[1]; - let z = xyz[2]; + let z2 = xyz[2]; x /= 95.047; y /= 100; - z /= 108.883; + z2 /= 108.883; x = x > 8856e-6 ? x ** (1 / 3) : 7.787 * x + 16 / 116; y = y > 8856e-6 ? y ** (1 / 3) : 7.787 * y + 16 / 116; - z = z > 8856e-6 ? z ** (1 / 3) : 7.787 * z + 16 / 116; + z2 = z2 > 8856e-6 ? z2 ** (1 / 3) : 7.787 * z2 + 16 / 116; const l = 116 * y - 16; const a = 500 * (x - y); - const b = 200 * (y - z); + const b = 200 * (y - z2); return [l, a, b]; }; convert.lab.xyz = function(lab) { @@ -20518,20 +20518,20 @@ var require_conversions = __commonJS({ const b = lab[2]; let x; let y; - let z; + let z2; y = (l + 16) / 116; x = a / 500 + y; - z = y - b / 200; + z2 = y - b / 200; const y2 = y ** 3; const x2 = x ** 3; - const z2 = z ** 3; + const z22 = z2 ** 3; y = y2 > 8856e-6 ? y2 : (y - 16 / 116) / 7.787; x = x2 > 8856e-6 ? x2 : (x - 16 / 116) / 7.787; - z = z2 > 8856e-6 ? z2 : (z - 16 / 116) / 7.787; + z2 = z22 > 8856e-6 ? z22 : (z2 - 16 / 116) / 7.787; x *= 95.047; y *= 100; - z *= 108.883; - return [x, y, z]; + z2 *= 108.883; + return [x, y, z2]; }; convert.lab.lch = function(lab) { const l = lab[0]; @@ -20615,9 +20615,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 integer5 = ((Math.round(args3[0]) & 255) << 16) + ((Math.round(args3[1]) & 255) << 8) + (Math.round(args3[2]) & 255); + const string8 = integer5.toString(16).toUpperCase(); + return "000000".substring(string8.length) + string8; }; convert.hex.rgb = function(args3) { const match2 = args3.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i); @@ -20630,10 +20630,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 integer5 = parseInt(colorString, 16); + const r = integer5 >> 16 & 255; + const g = integer5 >> 8 & 255; + const b = integer5 & 255; return [r, g, b]; }; convert.rgb.hcg = function(rgb) { @@ -20796,9 +20796,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 integer5 = (val << 16) + (val << 8) + val; + const string8 = integer5.toString(16).toUpperCase(); + return "000000".substring(string8.length) + string8; }; convert.rgb.gray = function(rgb) { const val = (rgb[0] + rgb[1] + rgb[2]) / 3; @@ -20807,9 +20807,9 @@ var require_conversions = __commonJS({ } }); -// node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/route.js +// ../node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/route.js var require_route = __commonJS({ - "node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/route.js"(exports, module) { + "../node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/route.js"(exports, module) { var conversions = require_conversions(); function buildGraph() { const graph = {}; @@ -20877,9 +20877,9 @@ var require_route = __commonJS({ } }); -// node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/index.js +// ../node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/index.js var require_color_convert = __commonJS({ - "node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/index.js"(exports, module) { + "../node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/index.js"(exports, module) { var conversions = require_conversions(); var route = require_route(); var convert = {}; @@ -20938,9 +20938,9 @@ var require_color_convert = __commonJS({ } }); -// node_modules/.pnpm/ansi-styles@4.3.0/node_modules/ansi-styles/index.js +// ../node_modules/.pnpm/ansi-styles@4.3.0/node_modules/ansi-styles/index.js var require_ansi_styles = __commonJS({ - "node_modules/.pnpm/ansi-styles@4.3.0/node_modules/ansi-styles/index.js"(exports, module) { + "../node_modules/.pnpm/ansi-styles@4.3.0/node_modules/ansi-styles/index.js"(exports, module) { "use strict"; var wrapAnsi16 = (fn2, offset) => (...args3) => { const code = fn2(...args3); @@ -20956,11 +20956,11 @@ var require_ansi_styles = __commonJS({ }; var ansi2ansi = (n) => n; var rgb2rgb = (r, g, b) => [r, g, b]; - var setLazyProperty = (object2, property, get2) => { - Object.defineProperty(object2, property, { + var setLazyProperty = (object6, property, get2) => { + Object.defineProperty(object6, property, { get: () => { const value2 = get2(); - Object.defineProperty(object2, property, { + Object.defineProperty(object6, property, { value: value2, enumerable: true, configurable: true @@ -21080,9 +21080,9 @@ var require_ansi_styles = __commonJS({ } }); -// node_modules/.pnpm/slice-ansi@4.0.0/node_modules/slice-ansi/index.js +// ../node_modules/.pnpm/slice-ansi@4.0.0/node_modules/slice-ansi/index.js var require_slice_ansi = __commonJS({ - "node_modules/.pnpm/slice-ansi@4.0.0/node_modules/slice-ansi/index.js"(exports, module) { + "../node_modules/.pnpm/slice-ansi@4.0.0/node_modules/slice-ansi/index.js"(exports, module) { "use strict"; var isFullwidthCodePoint = require_is_fullwidth_code_point(); var astralRegex = require_astral_regex(); @@ -21124,8 +21124,8 @@ var require_slice_ansi = __commonJS({ } return output.join(""); }; - module.exports = (string3, begin, end) => { - const characters = [...string3]; + module.exports = (string8, begin, end) => { + const characters = [...string8]; const ansiCodes = []; let stringEnd = typeof end === "number" ? end : characters.length; let isInsideEscape = false; @@ -21135,7 +21135,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(string8.slice(index, index + 18)); ansiCode = code && code.length > 0 ? code[0] : void 0; if (visible < stringEnd) { isInsideEscape = true; @@ -21170,9 +21170,9 @@ var require_slice_ansi = __commonJS({ } }); -// node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/getBorderCharacters.js +// ../node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/getBorderCharacters.js var require_getBorderCharacters = __commonJS({ - "node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/getBorderCharacters.js"(exports) { + "../node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/getBorderCharacters.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getBorderCharacters = void 0; @@ -21279,9 +21279,9 @@ var require_getBorderCharacters = __commonJS({ } }); -// node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/utils.js -var require_utils3 = __commonJS({ - "node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/utils.js"(exports) { +// ../node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/utils.js +var require_utils4 = __commonJS({ + "../node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/utils.js"(exports) { "use strict"; var __importDefault = exports && exports.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; @@ -21314,18 +21314,18 @@ var require_utils3 = __commonJS({ }; }; exports.makeBorderConfig = makeBorderConfig; - var groupBySizes = (array, sizes) => { + var groupBySizes = (array4, sizes) => { let startIndex = 0; return sizes.map((size) => { - const group2 = array.slice(startIndex, startIndex + size); + const group2 = array4.slice(startIndex, startIndex + size); startIndex += size; return group2; }); }; exports.groupBySizes = groupBySizes; var countSpaceSequence = (input) => { - var _a, _b; - return (_b = (_a = input.match(/\s+/g)) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0; + var _a2, _b; + return (_b = (_a2 = input.match(/\s+/g)) === null || _a2 === void 0 ? void 0 : _a2.length) !== null && _b !== void 0 ? _b : 0; }; exports.countSpaceSequence = countSpaceSequence; var distributeUnevenly = (sum, length) => { @@ -21341,20 +21341,20 @@ var require_utils3 = __commonJS({ }); }; exports.sequence = sequence; - var sumArray = (array) => { - return array.reduce((accumulator, element) => { + var sumArray = (array4) => { + return array4.reduce((accumulator, element) => { return accumulator + element; }, 0); }; exports.sumArray = sumArray; - var extractTruncates = (config2) => { - return config2.columns.map(({ truncate }) => { + var extractTruncates = (config4) => { + return config4.columns.map(({ truncate }) => { return truncate; }); }; exports.extractTruncates = extractTruncates; - var flatten = (array) => { - return [].concat(...array); + var flatten = (array4) => { + return [].concat(...array4); }; exports.flatten = flatten; var calculateRangeCoordinate = (spanningCellConfig) => { @@ -21382,9 +21382,9 @@ var require_utils3 = __commonJS({ } }); -// node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/alignString.js +// ../node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/alignString.js var require_alignString = __commonJS({ - "node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/alignString.js"(exports) { + "../node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/alignString.js"(exports) { "use strict"; var __importDefault = exports && exports.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; @@ -21392,7 +21392,7 @@ var require_alignString = __commonJS({ Object.defineProperty(exports, "__esModule", { value: true }); exports.alignString = void 0; var string_width_1 = __importDefault(require_string_width()); - var utils_1 = require_utils3(); + var utils_1 = require_utils4(); var alignLeft = (subject, width) => { return subject + " ".repeat(width); }; @@ -21443,19 +21443,19 @@ var require_alignString = __commonJS({ } }); -// node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/alignTableData.js +// ../node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/alignTableData.js var require_alignTableData = __commonJS({ - "node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/alignTableData.js"(exports) { + "../node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/alignTableData.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.alignTableData = void 0; var alignString_1 = require_alignString(); - var alignTableData = (rows, config2) => { + var alignTableData = (rows, config4) => { 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({ + var _a2; + const { width, alignment } = config4.columns[cellIndex]; + const containingRange = (_a2 = config4.spanningCellManager) === null || _a2 === void 0 ? void 0 : _a2.getContainingRange({ col: cellIndex, row: rowIndex }, { mapped: true }); @@ -21470,9 +21470,9 @@ var require_alignTableData = __commonJS({ } }); -// node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/wrapString.js +// ../node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/wrapString.js var require_wrapString = __commonJS({ - "node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/wrapString.js"(exports) { + "../node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/wrapString.js"(exports) { "use strict"; var __importDefault = exports && exports.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; @@ -21494,9 +21494,9 @@ var require_wrapString = __commonJS({ } }); -// node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/wrapWord.js +// ../node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/wrapWord.js var require_wrapWord = __commonJS({ - "node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/wrapWord.js"(exports) { + "../node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/wrapWord.js"(exports) { "use strict"; var __importDefault = exports && exports.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; @@ -21539,13 +21539,13 @@ var require_wrapWord = __commonJS({ } }); -// node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/wrapCell.js +// ../node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/wrapCell.js var require_wrapCell = __commonJS({ - "node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/wrapCell.js"(exports) { + "../node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/wrapCell.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.wrapCell = void 0; - var utils_1 = require_utils3(); + var utils_1 = require_utils4(); var wrapString_1 = require_wrapString(); var wrapWord_1 = require_wrapWord(); var wrapCell = (cellValue, cellWidth, useWrapWord) => { @@ -21566,9 +21566,9 @@ var require_wrapCell = __commonJS({ } }); -// node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/calculateCellHeight.js +// ../node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/calculateCellHeight.js var require_calculateCellHeight = __commonJS({ - "node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/calculateCellHeight.js"(exports) { + "../node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/calculateCellHeight.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.calculateCellHeight = void 0; @@ -21580,26 +21580,26 @@ var require_calculateCellHeight = __commonJS({ } }); -// node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/calculateRowHeights.js +// ../node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/calculateRowHeights.js var require_calculateRowHeights = __commonJS({ - "node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/calculateRowHeights.js"(exports) { + "../node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/calculateRowHeights.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.calculateRowHeights = void 0; var calculateCellHeight_1 = require_calculateCellHeight(); - var utils_1 = require_utils3(); - var calculateRowHeights = (rows, config2) => { + var utils_1 = require_utils4(); + var calculateRowHeights = (rows, config4) => { 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({ + var _a2; + const containingRange = (_a2 = config4.spanningCellManager) === null || _a2 === void 0 ? void 0 : _a2.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, config4.columns[cellIndex].width, config4.columns[cellIndex].wrapWord); rowHeight = Math.max(rowHeight, cellHeight); return; } @@ -21608,8 +21608,8 @@ var require_calculateRowHeights = __commonJS({ const totalOccupiedSpanningCellHeight = (0, utils_1.sumArray)(rowHeights.slice(topLeft.row)); 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)); + var _a3; + return !((_a3 = config4.drawHorizontalLine) === null || _a3 === void 0 ? void 0 : _a3.call(config4, horizontalBorderIndex, rows.length)); }).length; const cellHeight = height - totalOccupiedSpanningCellHeight - totalHorizontalBorderHeight + totalHiddenHorizontalBorderHeight; rowHeight = Math.max(rowHeight, cellHeight); @@ -21623,9 +21623,9 @@ var require_calculateRowHeights = __commonJS({ } }); -// node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/drawContent.js +// ../node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/drawContent.js var require_drawContent = __commonJS({ - "node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/drawContent.js"(exports) { + "../node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/drawContent.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.drawContent = void 0; @@ -21677,9 +21677,9 @@ var require_drawContent = __commonJS({ } }); -// node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/drawBorder.js +// ../node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/drawBorder.js var require_drawBorder = __commonJS({ - "node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/drawBorder.js"(exports) { + "../node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/drawBorder.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.createTableBorderGetter = exports.drawBorderBottom = exports.drawBorderJoin = exports.drawBorderTop = exports.drawBorder = exports.createSeparatorGetter = exports.drawBorderSegments = void 0; @@ -21882,15 +21882,15 @@ var require_drawBorder = __commonJS({ } }); -// node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/drawRow.js +// ../node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/drawRow.js var require_drawRow = __commonJS({ - "node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/drawRow.js"(exports) { + "../node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/drawRow.js"(exports) { "use strict"; 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, config4) => { + const { border, drawVerticalLine, rowIndex, spanningCellManager } = config4; return (0, drawContent_1.drawContent)({ contents: row, drawSeparator: drawVerticalLine, @@ -21912,9 +21912,9 @@ var require_drawRow = __commonJS({ } }); -// node_modules/.pnpm/fast-deep-equal@3.1.3/node_modules/fast-deep-equal/index.js +// ../node_modules/.pnpm/fast-deep-equal@3.1.3/node_modules/fast-deep-equal/index.js var require_fast_deep_equal2 = __commonJS({ - "node_modules/.pnpm/fast-deep-equal@3.1.3/node_modules/fast-deep-equal/index.js"(exports, module) { + "../node_modules/.pnpm/fast-deep-equal@3.1.3/node_modules/fast-deep-equal/index.js"(exports, module) { "use strict"; module.exports = function equal(a, b) { if (a === b) return true; @@ -21947,9 +21947,9 @@ var require_fast_deep_equal2 = __commonJS({ } }); -// node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/runtime/equal.js -var require_equal = __commonJS({ - "node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/runtime/equal.js"(exports) { +// ../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/runtime/equal.js +var require_equal2 = __commonJS({ + "../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/runtime/equal.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var equal = require_fast_deep_equal2(); @@ -21958,9 +21958,9 @@ var require_equal = __commonJS({ } }); -// node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/generated/validators.js +// ../node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/generated/validators.js var require_validators = __commonJS({ - "node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/generated/validators.js"(exports) { + "../node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/generated/validators.js"(exports) { "use strict"; exports["config.json"] = validate43; var schema13 = { @@ -22415,7 +22415,7 @@ var require_validators = __commonJS({ "type": "string", "enum": ["left", "right", "center", "justify"] }; - var func0 = require_equal().default; + var func0 = require_equal2().default; function validate68(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) { let vErrors = null; let errors = 0; @@ -24483,9 +24483,9 @@ var require_validators = __commonJS({ } }); -// node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/validateConfig.js +// ../node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/validateConfig.js var require_validateConfig = __commonJS({ - "node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/validateConfig.js"(exports) { + "../node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/validateConfig.js"(exports) { "use strict"; var __importDefault = exports && exports.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; @@ -24493,17 +24493,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, config4) => { const validate2 = validators_1.default[schemaId]; - if (!validate2(config2) && validate2.errors) { - const errors = validate2.errors.map((error41) => { + if (!validate2(config4) && validate2.errors) { + const errors = validate2.errors.map((error50) => { return { - message: error41.message, - params: error41.params, - schemaPath: error41.schemaPath + message: error50.message, + params: error50.params, + schemaPath: error50.schemaPath }; }); - console.log("config", config2); + console.log("config", config4); console.log("errors", errors); throw new Error("Invalid config."); } @@ -24512,13 +24512,13 @@ var require_validateConfig = __commonJS({ } }); -// node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/makeStreamConfig.js +// ../node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/makeStreamConfig.js var require_makeStreamConfig = __commonJS({ - "node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/makeStreamConfig.js"(exports) { + "../node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/makeStreamConfig.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.makeStreamConfig = void 0; - var utils_1 = require_utils3(); + var utils_1 = require_utils4(); var validateConfig_1 = require_validateConfig(); var makeColumnsConfig = (columnCount, columns = {}, columnDefault) => { return Array.from({ length: columnCount }).map((_, index) => { @@ -24534,31 +24534,31 @@ var require_makeStreamConfig = __commonJS({ }; }); }; - var makeStreamConfig = (config2) => { - (0, validateConfig_1.validateConfig)("streamConfig.json", config2); - if (config2.columnDefault.width === void 0) { + var makeStreamConfig = (config4) => { + (0, validateConfig_1.validateConfig)("streamConfig.json", config4); + if (config4.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) + ...config4, + border: (0, utils_1.makeBorderConfig)(config4.border), + columns: makeColumnsConfig(config4.columnCount, config4.columns, config4.columnDefault) }; }; exports.makeStreamConfig = makeStreamConfig; } }); -// node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/mapDataUsingRowHeights.js +// ../node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/mapDataUsingRowHeights.js var require_mapDataUsingRowHeights = __commonJS({ - "node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/mapDataUsingRowHeights.js"(exports) { + "../node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/mapDataUsingRowHeights.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.mapDataUsingRowHeights = exports.padCellVertically = void 0; - var utils_1 = require_utils3(); + var utils_1 = require_utils4(); var wrapCell_1 = require_wrapCell(); var createEmptyStrings = (length) => { return new Array(length).fill(""); @@ -24578,7 +24578,7 @@ var require_mapDataUsingRowHeights = __commonJS({ ]; }; exports.padCellVertically = padCellVertically; - var mapDataUsingRowHeights = (unmappedRows, rowHeights, config2) => { + var mapDataUsingRowHeights = (unmappedRows, rowHeights, config4) => { const nColumns = unmappedRows[0].length; const mappedRows = unmappedRows.map((unmappedRow, unmappedRowIndex) => { const outputRowHeight = rowHeights[unmappedRowIndex]; @@ -24586,8 +24586,8 @@ var require_mapDataUsingRowHeights = __commonJS({ return new Array(nColumns).fill(""); }); unmappedRow.forEach((cell, cellIndex) => { - var _a; - const containingRange = (_a = config2.spanningCellManager) === null || _a === void 0 ? void 0 : _a.getContainingRange({ + var _a2; + const containingRange = (_a2 = config4.spanningCellManager) === null || _a2 === void 0 ? void 0 : _a2.getContainingRange({ col: cellIndex, row: unmappedRowIndex }); @@ -24597,8 +24597,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, config4.columns[cellIndex].width, config4.columns[cellIndex].wrapWord); + const paddedCellLines = (0, exports.padCellVertically)(cellLines, outputRowHeight, config4.columns[cellIndex].verticalAlignment); paddedCellLines.forEach((cellLine, cellLineIndex) => { outputRow[cellLineIndex][cellIndex] = cellLine; }); @@ -24611,9 +24611,9 @@ var require_mapDataUsingRowHeights = __commonJS({ } }); -// node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/padTableData.js +// ../node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/padTableData.js var require_padTableData = __commonJS({ - "node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/padTableData.js"(exports) { + "../node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/padTableData.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.padTableData = exports.padString = void 0; @@ -24621,18 +24621,18 @@ var require_padTableData = __commonJS({ return " ".repeat(paddingLeft) + input + " ".repeat(paddingRight); }; exports.padString = padString; - var padTableData = (rows, config2) => { + var padTableData = (rows, config4) => { 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({ + var _a2; + const containingRange = (_a2 = config4.spanningCellManager) === null || _a2 === void 0 ? void 0 : _a2.getContainingRange({ col: cellIndex, row: rowIndex }, { mapped: true }); if (containingRange) { return cell; } - const { paddingLeft, paddingRight } = config2.columns[cellIndex]; + const { paddingLeft, paddingRight } = config4.columns[cellIndex]; return (0, exports.padString)(cell, paddingLeft, paddingRight); }); }); @@ -24641,13 +24641,13 @@ var require_padTableData = __commonJS({ } }); -// node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/stringifyTableData.js +// ../node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/stringifyTableData.js var require_stringifyTableData = __commonJS({ - "node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/stringifyTableData.js"(exports) { + "../node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/stringifyTableData.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.stringifyTableData = void 0; - var utils_1 = require_utils3(); + var utils_1 = require_utils4(); var stringifyTableData = (rows) => { return rows.map((cells) => { return cells.map((cell) => { @@ -24659,9 +24659,9 @@ var require_stringifyTableData = __commonJS({ } }); -// node_modules/.pnpm/lodash.truncate@4.4.2/node_modules/lodash.truncate/index.js +// ../node_modules/.pnpm/lodash.truncate@4.4.2/node_modules/lodash.truncate/index.js var require_lodash = __commonJS({ - "node_modules/.pnpm/lodash.truncate@4.4.2/node_modules/lodash.truncate/index.js"(exports, module) { + "../node_modules/.pnpm/lodash.truncate@4.4.2/node_modules/lodash.truncate/index.js"(exports, module) { var DEFAULT_TRUNC_LENGTH = 30; var DEFAULT_TRUNC_OMISSION = "..."; var INFINITY2 = 1 / 0; @@ -24709,12 +24709,12 @@ var require_lodash = __commonJS({ })(); var nodeIsRegExp = nodeUtil && nodeUtil.isRegExp; var asciiSize = baseProperty("length"); - function asciiToArray(string3) { - return string3.split(""); + function asciiToArray(string8) { + return string8.split(""); } function baseProperty(key) { - return function(object2) { - return object2 == null ? void 0 : object2[key]; + return function(object6) { + return object6 == null ? void 0 : object6[key]; }; } function baseUnary(func) { @@ -24722,24 +24722,24 @@ var require_lodash = __commonJS({ return func(value2); }; } - function hasUnicode(string3) { - return reHasUnicode.test(string3); + function hasUnicode(string8) { + return reHasUnicode.test(string8); } - function stringSize(string3) { - return hasUnicode(string3) ? unicodeSize(string3) : asciiSize(string3); + function stringSize(string8) { + return hasUnicode(string8) ? unicodeSize(string8) : asciiSize(string8); } - function stringToArray(string3) { - return hasUnicode(string3) ? unicodeToArray(string3) : asciiToArray(string3); + function stringToArray(string8) { + return hasUnicode(string8) ? unicodeToArray(string8) : asciiToArray(string8); } - function unicodeSize(string3) { + function unicodeSize(string8) { var result = reUnicode.lastIndex = 0; - while (reUnicode.test(string3)) { + while (reUnicode.test(string8)) { result++; } return result; } - function unicodeToArray(string3) { - return string3.match(reUnicode) || []; + function unicodeToArray(string8) { + return string8.match(reUnicode) || []; } var objectProto6 = Object.prototype; var objectToString2 = objectProto6.toString; @@ -24747,10 +24747,10 @@ 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 isObject6(value2) && objectToString2.call(value2) == regexpTag; } - function baseSlice(array, start, end) { - var index = -1, length = array.length; + function baseSlice(array4, start, end) { + var index = -1, length = array4.length; if (start < 0) { start = -start > length ? 0 : length + start; } @@ -24762,7 +24762,7 @@ var require_lodash = __commonJS({ start >>>= 0; var result = Array(length); while (++index < length) { - result[index] = array[index + start]; + result[index] = array4[index + start]; } return result; } @@ -24776,12 +24776,12 @@ var require_lodash = __commonJS({ var result = value2 + ""; return result == "0" && 1 / value2 == -INFINITY2 ? "-0" : result; } - function castSlice(array, start, end) { - var length = array.length; + function castSlice(array4, start, end) { + var length = array4.length; end = end === void 0 ? length : end; - return !start && end >= length ? array : baseSlice(array, start, end); + return !start && end >= length ? array4 : baseSlice(array4, start, end); } - function isObject4(value2) { + function isObject6(value2) { var type2 = typeof value2; return !!value2 && (type2 == "object" || type2 == "function"); } @@ -24814,9 +24814,9 @@ var require_lodash = __commonJS({ if (isSymbol(value2)) { return NAN; } - if (isObject4(value2)) { + if (isObject6(value2)) { var other = typeof value2.valueOf == "function" ? value2.valueOf() : value2; - value2 = isObject4(other) ? other + "" : other; + value2 = isObject6(other) ? other + "" : other; } if (typeof value2 != "string") { return value2 === 0 ? value2 : +value2; @@ -24828,27 +24828,27 @@ var require_lodash = __commonJS({ function toString2(value2) { return value2 == null ? "" : baseToString2(value2); } - function truncate(string3, options) { + function truncate(string8, options) { var length = DEFAULT_TRUNC_LENGTH, omission = DEFAULT_TRUNC_OMISSION; - if (isObject4(options)) { + if (isObject6(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); + string8 = toString2(string8); + var strLength = string8.length; + if (hasUnicode(string8)) { + var strSymbols = stringToArray(string8); strLength = strSymbols.length; } if (length >= strLength) { - return string3; + return string8; } 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("") : string8.slice(0, end); if (separator2 === void 0) { return result + omission; } @@ -24856,7 +24856,7 @@ var require_lodash = __commonJS({ end += result.length - end; } if (isRegExp(separator2)) { - if (string3.slice(end).search(separator2)) { + if (string8.slice(end).search(separator2)) { var match2, substring = result; if (!separator2.global) { separator2 = RegExp(separator2.source, toString2(reFlags.exec(separator2)) + "g"); @@ -24867,7 +24867,7 @@ var require_lodash = __commonJS({ } result = result.slice(0, newEnd === void 0 ? end : newEnd); } - } else if (string3.indexOf(baseToString2(separator2), end) != end) { + } else if (string8.indexOf(baseToString2(separator2), end) != end) { var index = result.lastIndexOf(separator2); if (index > -1) { result = result.slice(0, index); @@ -24879,9 +24879,9 @@ var require_lodash = __commonJS({ } }); -// node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/truncateTableData.js +// ../node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/truncateTableData.js var require_truncateTableData = __commonJS({ - "node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/truncateTableData.js"(exports) { + "../node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/truncateTableData.js"(exports) { "use strict"; var __importDefault = exports && exports.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; @@ -24907,9 +24907,9 @@ var require_truncateTableData = __commonJS({ } }); -// node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/createStream.js +// ../node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/createStream.js var require_createStream = __commonJS({ - "node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/createStream.js"(exports) { + "../node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/createStream.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.createStream = void 0; @@ -24922,61 +24922,61 @@ var require_createStream = __commonJS({ var padTableData_1 = require_padTableData(); var stringifyTableData_1 = require_stringifyTableData(); var truncateTableData_1 = require_truncateTableData(); - var utils_1 = require_utils3(); - var prepareData = (data, config2) => { + var utils_1 = require_utils4(); + var prepareData = (data, config4) => { 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)(config4)); + const rowHeights = (0, calculateRowHeights_1.calculateRowHeights)(rows, config4); + rows = (0, mapDataUsingRowHeights_1.mapDataUsingRowHeights)(rows, rowHeights, config4); + rows = (0, alignTableData_1.alignTableData)(rows, config4); + rows = (0, padTableData_1.padTableData)(rows, config4); return rows; }; - var create = (row, columnWidths, config2) => { - const rows = prepareData([row], config2); + var create = (row, columnWidths, config4) => { + const rows = prepareData([row], config4); const body = rows.map((literalRow) => { - return (0, drawRow_1.drawRow)(literalRow, config2); + return (0, drawRow_1.drawRow)(literalRow, config4); }).join(""); let output; output = ""; - output += (0, drawBorder_1.drawBorderTop)(columnWidths, config2); + output += (0, drawBorder_1.drawBorderTop)(columnWidths, config4); output += body; - output += (0, drawBorder_1.drawBorderBottom)(columnWidths, config2); + output += (0, drawBorder_1.drawBorderBottom)(columnWidths, config4); output = output.trimEnd(); process.stdout.write(output); }; - var append3 = (row, columnWidths, config2) => { - const rows = prepareData([row], config2); + var append3 = (row, columnWidths, config4) => { + const rows = prepareData([row], config4); const body = rows.map((literalRow) => { - return (0, drawRow_1.drawRow)(literalRow, config2); + return (0, drawRow_1.drawRow)(literalRow, config4); }).join(""); let output = ""; - const bottom = (0, drawBorder_1.drawBorderBottom)(columnWidths, config2); + const bottom = (0, drawBorder_1.drawBorderBottom)(columnWidths, config4); if (bottom !== "\n") { output = "\r\x1B[K"; } - output += (0, drawBorder_1.drawBorderJoin)(columnWidths, config2); + output += (0, drawBorder_1.drawBorderJoin)(columnWidths, config4); 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 config4 = (0, makeStreamConfig_1.makeStreamConfig)(userConfig); + const columnWidths = Object.values(config4.columns).map((column) => { return column.width + column.paddingLeft + column.paddingRight; }); let empty = true; return { write: (row) => { - if (row.length !== config2.columnCount) { + if (row.length !== config4.columnCount) { throw new Error("Row cell count does not match the config.columnCount."); } if (empty) { empty = false; - create(row, columnWidths, config2); + create(row, columnWidths, config4); } else { - append3(row, columnWidths, config2); + append3(row, columnWidths, config4); } } }; @@ -24985,14 +24985,14 @@ var require_createStream = __commonJS({ } }); -// node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/calculateOutputColumnWidths.js +// ../node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/calculateOutputColumnWidths.js var require_calculateOutputColumnWidths = __commonJS({ - "node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/calculateOutputColumnWidths.js"(exports) { + "../node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/calculateOutputColumnWidths.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.calculateOutputColumnWidths = void 0; - var calculateOutputColumnWidths = (config2) => { - return config2.columns.map((col) => { + var calculateOutputColumnWidths = (config4) => { + return config4.columns.map((col) => { return col.paddingLeft + col.width + col.paddingRight; }); }; @@ -25000,22 +25000,22 @@ var require_calculateOutputColumnWidths = __commonJS({ } }); -// node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/drawTable.js +// ../node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/drawTable.js var require_drawTable = __commonJS({ - "node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/drawTable.js"(exports) { + "../node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/drawTable.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.drawTable = void 0; var drawBorder_1 = require_drawBorder(); 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 utils_1 = require_utils4(); + var drawTable = (rows, outputColumnWidths, rowHeights, config4) => { + const { drawHorizontalLine, singleLine } = config4; const contents = (0, utils_1.groupBySizes)(rows, rowHeights).map((group2, groupIndex) => { return group2.map((row) => { return (0, drawRow_1.drawRow)(row, { - ...config2, + ...config4, rowIndex: groupIndex }); }).join(""); @@ -25031,26 +25031,26 @@ var require_drawTable = __commonJS({ elementType: "row", rowIndex: -1, separatorGetter: (0, drawBorder_1.createTableBorderGetter)(outputColumnWidths, { - ...config2, + ...config4, rowCount: contents.length }), - spanningCellManager: config2.spanningCellManager + spanningCellManager: config4.spanningCellManager }); }; exports.drawTable = drawTable; } }); -// node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/injectHeaderConfig.js +// ../node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/injectHeaderConfig.js var require_injectHeaderConfig = __commonJS({ - "node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/injectHeaderConfig.js"(exports) { + "../node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/injectHeaderConfig.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.injectHeaderConfig = void 0; - var injectHeaderConfig = (rows, config2) => { - var _a; - let spanningCellConfig = (_a = config2.spanningCells) !== null && _a !== void 0 ? _a : []; - const headerConfig = config2.header; + var injectHeaderConfig = (rows, config4) => { + var _a2; + let spanningCellConfig = (_a2 = config4.spanningCells) !== null && _a2 !== void 0 ? _a2 : []; + const headerConfig = config4.header; const adjustedRows = [...rows]; if (headerConfig) { spanningCellConfig = spanningCellConfig.map(({ row, ...rest }) => { @@ -25081,9 +25081,9 @@ var require_injectHeaderConfig = __commonJS({ } }); -// node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/calculateMaximumColumnWidths.js +// ../node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/calculateMaximumColumnWidths.js var require_calculateMaximumColumnWidths = __commonJS({ - "node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/calculateMaximumColumnWidths.js"(exports) { + "../node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/calculateMaximumColumnWidths.js"(exports) { "use strict"; var __importDefault = exports && exports.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; @@ -25091,7 +25091,7 @@ var require_calculateMaximumColumnWidths = __commonJS({ Object.defineProperty(exports, "__esModule", { value: true }); exports.calculateMaximumColumnWidths = exports.calculateMaximumCellWidth = void 0; var string_width_1 = __importDefault(require_string_width()); - var utils_1 = require_utils3(); + var utils_1 = require_utils4(); var calculateMaximumCellWidth = (cell) => { return Math.max(...cell.split("\n").map(string_width_1.default)); }; @@ -25121,9 +25121,9 @@ var require_calculateMaximumColumnWidths = __commonJS({ } }); -// node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/alignSpanningCell.js +// ../node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/alignSpanningCell.js var require_alignSpanningCell = __commonJS({ - "node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/alignSpanningCell.js"(exports) { + "../node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/alignSpanningCell.js"(exports) { "use strict"; var __importDefault = exports && exports.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; @@ -25135,7 +25135,7 @@ var require_alignSpanningCell = __commonJS({ var mapDataUsingRowHeights_1 = require_mapDataUsingRowHeights(); var padTableData_1 = require_padTableData(); var truncateTableData_1 = require_truncateTableData(); - var utils_1 = require_utils3(); + var utils_1 = require_utils4(); var wrapCell_1 = require_wrapCell(); var wrapRangeContent = (rangeConfig, rangeWidth, context) => { const { topLeft, paddingRight, paddingLeft, truncate, wrapWord, alignment } = rangeConfig; @@ -25170,13 +25170,13 @@ var require_alignSpanningCell = __commonJS({ } }); -// node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/calculateSpanningCellWidth.js +// ../node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/calculateSpanningCellWidth.js var require_calculateSpanningCellWidth = __commonJS({ - "node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/calculateSpanningCellWidth.js"(exports) { + "../node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/calculateSpanningCellWidth.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.calculateSpanningCellWidth = void 0; - var utils_1 = require_utils3(); + var utils_1 = require_utils4(); var calculateSpanningCellWidth = (rangeConfig, dependencies) => { const { columnsConfig, drawVerticalLine } = dependencies; const { topLeft, bottomRight } = rangeConfig; @@ -25196,20 +25196,20 @@ var require_calculateSpanningCellWidth = __commonJS({ } }); -// node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/makeRangeConfig.js +// ../node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/makeRangeConfig.js var require_makeRangeConfig = __commonJS({ - "node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/makeRangeConfig.js"(exports) { + "../node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/makeRangeConfig.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.makeRangeConfig = void 0; - var utils_1 = require_utils3(); + var utils_1 = require_utils4(); var makeRangeConfig = (spanningCellConfig, columnsConfig) => { - var _a; + var _a2; const { topLeft, bottomRight } = (0, utils_1.calculateRangeCoordinate)(spanningCellConfig); const cellConfig = { ...columnsConfig[topLeft.col], ...spanningCellConfig, - paddingRight: (_a = spanningCellConfig.paddingRight) !== null && _a !== void 0 ? _a : columnsConfig[bottomRight.col].paddingRight + paddingRight: (_a2 = spanningCellConfig.paddingRight) !== null && _a2 !== void 0 ? _a2 : columnsConfig[bottomRight.col].paddingRight }; return { ...cellConfig, @@ -25221,16 +25221,16 @@ var require_makeRangeConfig = __commonJS({ } }); -// node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/spanningCellManager.js +// ../node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/spanningCellManager.js var require_spanningCellManager = __commonJS({ - "node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/spanningCellManager.js"(exports) { + "../node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/spanningCellManager.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.createSpanningCellManager = void 0; var alignSpanningCell_1 = require_alignSpanningCell(); var calculateSpanningCellWidth_1 = require_calculateSpanningCellWidth(); var makeRangeConfig_1 = require_makeRangeConfig(); - var utils_1 = require_utils3(); + var utils_1 = require_utils4(); var findRangeConfig = (cell, rangeConfigs) => { return rangeConfigs.find((rangeCoordinate) => { return (0, utils_1.isCellInRange)(cell, rangeCoordinate); @@ -25277,15 +25277,15 @@ 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((config4) => { + return (0, makeRangeConfig_1.makeRangeConfig)(config4, columnsConfig); }); const rangeCache = {}; let rowHeights = []; let rowIndexMapping = []; return { getContainingRange: (cell, options) => { - var _a; + var _a2; const originalRow = (options === null || options === void 0 ? void 0 : options.mapped) ? rowIndexMapping[cell.row] : cell.row; const range2 = findRangeConfig({ ...cell, @@ -25300,12 +25300,12 @@ var require_spanningCellManager = __commonJS({ rowHeights }); } - const hash = hashRange(range2); - (_a = rangeCache[hash]) !== null && _a !== void 0 ? _a : rangeCache[hash] = getContainingRange(range2, { + const hash2 = hashRange(range2); + (_a2 = rangeCache[hash2]) !== null && _a2 !== void 0 ? _a2 : rangeCache[hash2] = getContainingRange(range2, { ...parameters, rowHeights }); - return rangeCache[hash]; + return rangeCache[hash2]; }, inSameRange: (cell1, cell2) => { return inSameRange(cell1, cell2, ranges); @@ -25328,20 +25328,20 @@ var require_spanningCellManager = __commonJS({ } }); -// node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/validateSpanningCellConfig.js +// ../node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/validateSpanningCellConfig.js var require_validateSpanningCellConfig = __commonJS({ - "node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/validateSpanningCellConfig.js"(exports) { + "../node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/validateSpanningCellConfig.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.validateSpanningCellConfig = void 0; - var utils_1 = require_utils3(); + var utils_1 = require_utils4(); var inRange = (start, end, value2) => { return start <= value2 && value2 <= end; }; var validateSpanningCellConfig = (rows, configs) => { const [nRow, nCol] = [rows.length, rows[0].length]; - configs.forEach((config2, configIndex) => { - const { colSpan, rowSpan } = config2; + configs.forEach((config4, configIndex) => { + const { colSpan, rowSpan } = config4; if (colSpan === void 0 && rowSpan === void 0) { throw new Error(`Expect at least colSpan or rowSpan is provided in config.spanningCells[${configIndex}]`); } @@ -25376,15 +25376,15 @@ var require_validateSpanningCellConfig = __commonJS({ } }); -// node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/makeTableConfig.js +// ../node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/makeTableConfig.js var require_makeTableConfig = __commonJS({ - "node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/makeTableConfig.js"(exports) { + "../node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/makeTableConfig.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.makeTableConfig = void 0; var calculateMaximumColumnWidths_1 = require_calculateMaximumColumnWidths(); var spanningCellManager_1 = require_spanningCellManager(); - var utils_1 = require_utils3(); + var utils_1 = require_utils4(); var validateConfig_1 = require_validateConfig(); var validateSpanningCellConfig_1 = require_validateSpanningCellConfig(); var makeColumnsConfig = (rows, columns, columnDefault, spanningCellConfigs) => { @@ -25403,25 +25403,25 @@ var require_makeTableConfig = __commonJS({ }; }); }; - var makeTableConfig = (rows, config2 = {}, 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 : (() => { + var makeTableConfig = (rows, config4 = {}, injectedSpanningCellConfig) => { + var _a2, _b, _c, _d, _e; + (0, validateConfig_1.validateConfig)("config.json", config4); + (0, validateSpanningCellConfig_1.validateSpanningCellConfig)(rows, (_a2 = config4.spanningCells) !== null && _a2 !== void 0 ? _a2 : []); + const spanningCellConfigs = (_b = injectedSpanningCellConfig !== null && injectedSpanningCellConfig !== void 0 ? injectedSpanningCellConfig : config4.spanningCells) !== null && _b !== void 0 ? _b : []; + const columnsConfig = makeColumnsConfig(rows, config4.columns, config4.columnDefault, spanningCellConfigs); + const drawVerticalLine = (_c = config4.drawVerticalLine) !== null && _c !== void 0 ? _c : (() => { return true; }); - const drawHorizontalLine = (_d = config2.drawHorizontalLine) !== null && _d !== void 0 ? _d : (() => { + const drawHorizontalLine = (_d = config4.drawHorizontalLine) !== null && _d !== void 0 ? _d : (() => { return true; }); return { - ...config2, - border: (0, utils_1.makeBorderConfig)(config2.border), + ...config4, + border: (0, utils_1.makeBorderConfig)(config4.border), columns: columnsConfig, drawHorizontalLine, drawVerticalLine, - singleLine: (_e = config2.singleLine) !== null && _e !== void 0 ? _e : false, + singleLine: (_e = config4.singleLine) !== null && _e !== void 0 ? _e : false, spanningCellManager: (0, spanningCellManager_1.createSpanningCellManager)({ columnsConfig, drawHorizontalLine, @@ -25435,13 +25435,13 @@ var require_makeTableConfig = __commonJS({ } }); -// node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/validateTableData.js +// ../node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/validateTableData.js var require_validateTableData = __commonJS({ - "node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/validateTableData.js"(exports) { + "../node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/validateTableData.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.validateTableData = void 0; - var utils_1 = require_utils3(); + var utils_1 = require_utils4(); var validateTableData = (rows) => { if (!Array.isArray(rows)) { throw new TypeError("Table data must be an array."); @@ -25471,9 +25471,9 @@ var require_validateTableData = __commonJS({ } }); -// node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/table.js +// ../node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/table.js var require_table = __commonJS({ - "node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/table.js"(exports) { + "../node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/table.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.table = void 0; @@ -25487,38 +25487,38 @@ var require_table = __commonJS({ var padTableData_1 = require_padTableData(); var stringifyTableData_1 = require_stringifyTableData(); var truncateTableData_1 = require_truncateTableData(); - var utils_1 = require_utils3(); + var utils_1 = require_utils4(); var validateTableData_1 = require_validateTableData(); var table2 = (data, userConfig = {}) => { (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 config4 = (0, makeTableConfig_1.makeTableConfig)(injectedRows, userConfig, injectedSpanningCellConfig); + rows = (0, truncateTableData_1.truncateTableData)(injectedRows, (0, utils_1.extractTruncates)(config4)); + const rowHeights = (0, calculateRowHeights_1.calculateRowHeights)(rows, config4); + config4.spanningCellManager.setRowHeights(rowHeights); + config4.spanningCellManager.setRowIndexMapping(rowHeights); + rows = (0, mapDataUsingRowHeights_1.mapDataUsingRowHeights)(rows, rowHeights, config4); + rows = (0, alignTableData_1.alignTableData)(rows, config4); + rows = (0, padTableData_1.padTableData)(rows, config4); + const outputColumnWidths = (0, calculateOutputColumnWidths_1.calculateOutputColumnWidths)(config4); + return (0, drawTable_1.drawTable)(rows, outputColumnWidths, rowHeights, config4); }; exports.table = table2; } }); -// node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/types/api.js +// ../node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/types/api.js var require_api2 = __commonJS({ - "node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/types/api.js"(exports) { + "../node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/types/api.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); } }); -// node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/index.js +// ../node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/index.js var require_src = __commonJS({ - "node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/index.js"(exports) { + "../node_modules/.pnpm/table@6.9.0/node_modules/table/dist/src/index.js"(exports) { "use strict"; var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; @@ -25550,9 +25550,9 @@ var require_src = __commonJS({ } }); -// node_modules/.pnpm/bottleneck@2.19.5/node_modules/bottleneck/light.js +// ../node_modules/.pnpm/bottleneck@2.19.5/node_modules/bottleneck/light.js var require_light = __commonJS({ - "node_modules/.pnpm/bottleneck@2.19.5/node_modules/bottleneck/light.js"(exports, module) { + "../node_modules/.pnpm/bottleneck@2.19.5/node_modules/bottleneck/light.js"(exports, module) { (function(global2, factory) { typeof exports === "object" && typeof module !== "undefined" ? module.exports = factory() : typeof define === "function" && define.amd ? define(factory) : global2.Bottleneck = factory(); })(exports, (function() { @@ -25730,8 +25730,8 @@ var require_light = __commonJS({ } else { return returned; } - } catch (error41) { - e2 = error41; + } catch (error50) { + e2 = error50; { this.trigger("error", e2); } @@ -25741,8 +25741,8 @@ var require_light = __commonJS({ return (await Promise.all(promises)).find(function(x) { return x != null; }); - } catch (error41) { - e = error41; + } catch (error50) { + e = error50; { this.trigger("error", e); } @@ -25854,10 +25854,10 @@ var require_light = __commonJS({ _randomIndex() { return Math.random().toString(36).slice(2); } - doDrop({ error: error41, message = "This job has been dropped by Bottleneck" } = {}) { + doDrop({ error: error50, message = "This job has been dropped by Bottleneck" } = {}) { if (this._states.remove(this.options.id)) { if (this.rejectOnDrop) { - this._reject(error41 != null ? error41 : new BottleneckError$1(message)); + this._reject(error50 != null ? error50 : new BottleneckError$1(message)); } this.Events.trigger("dropped", { args: this.args, options: this.options, task: this.task, promise: this.promise }); return true; @@ -25891,7 +25891,7 @@ var require_light = __commonJS({ return this.Events.trigger("scheduled", { args: this.args, options: this.options }); } async doExecute(chained, clearGlobalState, run2, free) { - var error41, eventInfo, passed; + var error50, eventInfo, passed; if (this.retryCount === 0) { this._assertStatus("RUNNING"); this._states.next(this.options.id); @@ -25909,24 +25909,24 @@ var require_light = __commonJS({ return this._resolve(passed); } } catch (error1) { - error41 = error1; - return this._onFailure(error41, eventInfo, clearGlobalState, run2, free); + error50 = error1; + return this._onFailure(error50, eventInfo, clearGlobalState, run2, free); } } doExpire(clearGlobalState, run2, free) { - var error41, eventInfo; + var error50, eventInfo; if (this._states.jobStatus(this.options.id === "RUNNING")) { this._states.next(this.options.id); } this._assertStatus("EXECUTING"); eventInfo = { args: this.args, options: this.options, retryCount: this.retryCount }; - error41 = new BottleneckError$1(`This job timed out after ${this.options.expiration} ms.`); - return this._onFailure(error41, eventInfo, clearGlobalState, run2, free); + error50 = new BottleneckError$1(`This job timed out after ${this.options.expiration} ms.`); + return this._onFailure(error50, eventInfo, clearGlobalState, run2, free); } - async _onFailure(error41, eventInfo, clearGlobalState, run2, free) { + async _onFailure(error50, eventInfo, clearGlobalState, run2, free) { var retry2, retryAfter; if (clearGlobalState()) { - retry2 = await this.Events.trigger("failed", error41, eventInfo); + retry2 = await this.Events.trigger("failed", error50, eventInfo); if (retry2 != null) { retryAfter = ~~retry2; this.Events.trigger("retry", `Retrying ${this.options.id} after ${retryAfter} ms`, eventInfo); @@ -25936,7 +25936,7 @@ var require_light = __commonJS({ this.doDone(eventInfo); await free(this.options, eventInfo); this._assertStatus("DONE"); - return this._reject(error41); + return this._reject(error50); } } } @@ -26030,9 +26030,9 @@ var require_light = __commonJS({ await this.yieldLoop(); return this._done; } - async __groupCheck__(time2) { + async __groupCheck__(time6) { await this.yieldLoop(); - return this._nextRequest + this.timeout < time2; + return this._nextRequest + this.timeout < time6; } computeCapacity() { var maxConcurrent, reservoir; @@ -26215,7 +26215,7 @@ var require_light = __commonJS({ return this._queue.length === 0; } async _tryToRun() { - var args3, cb, error41, reject, resolve, returned, task; + var args3, cb, error50, reject, resolve, returned, task; if (this._running < 1 && this._queue.length > 0) { this._running++; ({ task, args: args3, resolve, reject } = this._queue.shift()); @@ -26226,9 +26226,9 @@ var require_light = __commonJS({ return resolve(returned); }; } catch (error1) { - error41 = error1; + error50 = error1; return function() { - return reject(error41); + return reject(error50); }; } })(); @@ -26238,24 +26238,24 @@ var require_light = __commonJS({ } } schedule(task, ...args3) { - var promise, reject, resolve; + var promise2, reject, resolve; resolve = reject = null; - promise = new this.Promise(function(_resolve, _reject) { + promise2 = new this.Promise(function(_resolve, _reject) { resolve = _resolve; return reject = _reject; }); this._queue.push({ task, args: args3, resolve, reject }); this._tryToRun(); - return promise; + return promise2; } }; var Sync_1 = Sync; - var version2 = "2.19.5"; + var version4 = "2.19.5"; var version$1 = { - version: version2 + version: version4 }; var version$2 = /* @__PURE__ */ Object.freeze({ - version: version2, + version: version4, default: version$1 }); var require$$2 = () => console.log("You must import the full version of Bottleneck in order to use this feature."); @@ -26350,20 +26350,20 @@ var require_light = __commonJS({ var base; clearInterval(this.interval); return typeof (base = this.interval = setInterval(async () => { - var e, k, ref, results, time2, v; - time2 = Date.now(); + var e, k, ref, results, time6, v; + time6 = Date.now(); ref = this.instances; results = []; for (k in ref) { v = ref[k]; try { - if (await v._store.__groupCheck__(time2)) { + if (await v._store.__groupCheck__(time6)) { results.push(this.deleteKey(k)); } else { results.push(void 0); } - } catch (error41) { - e = error41; + } catch (error50) { + e = error50; results.push(v.Events.trigger("error", e)); } } @@ -26597,10 +26597,10 @@ var require_light = __commonJS({ } this.Events.trigger("debug", `Draining ${options.id}`, { args: args3, options }); index = this._randomIndex(); - return this._store.__register__(index, options.weight, options.expiration).then(({ success, wait, reservoir }) => { + return this._store.__register__(index, options.weight, options.expiration).then(({ success: success2, wait, reservoir }) => { var empty; - this.Events.trigger("debug", `Drained ${options.id}`, { success, args: args3, options }); - if (success) { + this.Events.trigger("debug", `Drained ${options.id}`, { success: success2, args: args3, options }); + if (success2) { queue.shift(); empty = this.empty(); if (empty) { @@ -26696,14 +26696,14 @@ var require_light = __commonJS({ return done; } async _addToQueue(job) { - var args3, blocked, error41, options, reachedHWM, shifted, strategy; + var args3, blocked, error50, options, reachedHWM, shifted, strategy; ({ args: args3, options } = job); try { ({ reachedHWM, blocked, strategy } = await this._store.__submit__(this.queued(), options.weight)); } catch (error1) { - error41 = error1; - this.Events.trigger("debug", `Could not queue ${options.id}`, { args: args3, options, error: error41 }); - job.doDrop({ error: error41 }); + error50 = error1; + this.Events.trigger("debug", `Could not queue ${options.id}`, { args: args3, options, error: error50 }); + job.doDrop({ error: error50 }); return false; } if (blocked) { @@ -26869,9 +26869,9 @@ var require_light = __commonJS({ } }); -// node_modules/.pnpm/fast-content-type-parse@3.0.0/node_modules/fast-content-type-parse/index.js +// ../node_modules/.pnpm/fast-content-type-parse@3.0.0/node_modules/fast-content-type-parse/index.js var require_fast_content_type_parse = __commonJS({ - "node_modules/.pnpm/fast-content-type-parse@3.0.0/node_modules/fast-content-type-parse/index.js"(exports, module) { + "../node_modules/.pnpm/fast-content-type-parse@3.0.0/node_modules/fast-content-type-parse/index.js"(exports, module) { "use strict"; var NullObject = function NullObject2() { }; @@ -26882,7 +26882,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"); } @@ -26920,7 +26920,7 @@ var require_fast_content_type_parse = __commonJS({ } return result; } - function safeParse3(header) { + function safeParse7(header) { if (typeof header !== "string") { return defaultContentType; } @@ -26958,27 +26958,27 @@ 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: safeParse7 }; + module.exports.parse = parse6; + module.exports.safeParse = safeParse7; module.exports.defaultContentType = defaultContentType; } }); -// node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/util.js -var util2, objectUtil2, ZodParsedType2, getParsedType2; +// ../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v3/helpers/util.js +var util2, objectUtil2, ZodParsedType2, getParsedType3; var init_util = __esm({ - "node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/util.js"() { + "../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v3/helpers/util.js"() { (function(util3) { util3.assertEqual = (_) => { }; - function assertIs2(_arg) { + function assertIs3(_arg) { } - util3.assertIs = assertIs2; - function assertNever2(_x) { + util3.assertIs = assertIs3; + function assertNever3(_x) { throw new Error(); } - util3.assertNever = assertNever2; + util3.assertNever = assertNever3; util3.arrayToEnum = (items) => { const obj = {}; for (const item of items) { @@ -26999,10 +26999,10 @@ var init_util = __esm({ return obj[e]; }); }; - util3.objectKeys = typeof Object.keys === "function" ? (obj) => Object.keys(obj) : (object2) => { + util3.objectKeys = typeof Object.keys === "function" ? (obj) => Object.keys(obj) : (object6) => { const keys = []; - for (const key in object2) { - if (Object.prototype.hasOwnProperty.call(object2, key)) { + for (const key in object6) { + if (Object.prototype.hasOwnProperty.call(object6, key)) { keys.push(key); } } @@ -27016,10 +27016,10 @@ var init_util = __esm({ 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); + function joinValues3(array4, separator2 = " | ") { + return array4.map((val) => typeof val === "string" ? `'${val}'` : val).join(separator2); } - util3.joinValues = joinValues2; + util3.joinValues = joinValues3; util3.jsonStringifyReplacer = (_, value2) => { if (typeof value2 === "bigint") { return value2.toString(); @@ -27027,8 +27027,8 @@ var init_util = __esm({ return value2; }; })(util2 || (util2 = {})); - (function(objectUtil4) { - objectUtil4.mergeShapes = (first, second) => { + (function(objectUtil3) { + objectUtil3.mergeShapes = (first, second) => { return { ...first, ...second @@ -27058,7 +27058,7 @@ var init_util = __esm({ "map", "set" ]); - getParsedType2 = (data) => { + getParsedType3 = (data) => { const t = typeof data; switch (t) { case "undefined": @@ -27102,10 +27102,10 @@ var init_util = __esm({ } }); -// node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/ZodError.js -var ZodIssueCode2, quotelessJson2, ZodError2; +// ../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v3/ZodError.js +var ZodIssueCode2, ZodError3; var init_ZodError = __esm({ - "node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/ZodError.js"() { + "../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v3/ZodError.js"() { init_util(); ZodIssueCode2 = util2.arrayToEnum([ "invalid_type", @@ -27125,11 +27125,7 @@ var init_ZodError = __esm({ "not_multiple_of", "not_finite" ]); - quotelessJson2 = (obj) => { - const json3 = JSON.stringify(obj, null, 2); - return json3.replace(/"([^"]+)":/g, "$1:"); - }; - ZodError2 = class _ZodError extends Error { + ZodError3 = class _ZodError extends Error { get errors() { return this.issues; } @@ -27152,31 +27148,31 @@ var init_ZodError = __esm({ this.issues = issues; } format(_mapper) { - const mapper = _mapper || function(issue2) { - return issue2.message; + const mapper = _mapper || function(issue4) { + return issue4.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 = (error50) => { + for (const issue4 of error50.issues) { + if (issue4.code === "invalid_union") { + issue4.unionErrors.map(processError); + } else if (issue4.code === "invalid_return_type") { + processError(issue4.returnTypeError); + } else if (issue4.code === "invalid_arguments") { + processError(issue4.argumentsError); + } else if (issue4.path.length === 0) { + fieldErrors._errors.push(mapper(issue4)); } 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 < issue4.path.length) { + const el = issue4.path[i]; + const terminal = i === issue4.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(issue4)); } curr = curr[el]; i++; @@ -27201,8 +27197,8 @@ var init_ZodError = __esm({ get isEmpty() { return this.issues.length === 0; } - flatten(mapper = (issue2) => issue2.message) { - const fieldErrors = {}; + flatten(mapper = (issue4) => issue4.message) { + const fieldErrors = /* @__PURE__ */ Object.create(null); const formErrors = []; for (const sub of this.issues) { if (sub.path.length > 0) { @@ -27219,43 +27215,43 @@ var init_ZodError = __esm({ return this.flatten(); } }; - ZodError2.create = (issues) => { - const error41 = new ZodError2(issues); - return error41; + ZodError3.create = (issues) => { + const error50 = new ZodError3(issues); + return error50; }; } }); -// node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/locales/en.js -var errorMap2, en_default2; +// ../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v3/locales/en.js +var errorMap2, en_default3; var init_en = __esm({ - "node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/locales/en.js"() { + "../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v3/locales/en.js"() { init_ZodError(); init_util(); - errorMap2 = (issue2, _ctx) => { + errorMap2 = (issue4, _ctx) => { let message; - switch (issue2.code) { + switch (issue4.code) { case ZodIssueCode2.invalid_type: - if (issue2.received === ZodParsedType2.undefined) { + if (issue4.received === ZodParsedType2.undefined) { message = "Required"; } else { - message = `Expected ${issue2.expected}, received ${issue2.received}`; + message = `Expected ${issue4.expected}, received ${issue4.received}`; } break; case ZodIssueCode2.invalid_literal: - message = `Invalid literal value, expected ${JSON.stringify(issue2.expected, util2.jsonStringifyReplacer)}`; + message = `Invalid literal value, expected ${JSON.stringify(issue4.expected, util2.jsonStringifyReplacer)}`; break; case ZodIssueCode2.unrecognized_keys: - message = `Unrecognized key(s) in object: ${util2.joinValues(issue2.keys, ", ")}`; + message = `Unrecognized key(s) in object: ${util2.joinValues(issue4.keys, ", ")}`; break; case ZodIssueCode2.invalid_union: message = `Invalid input`; break; case ZodIssueCode2.invalid_union_discriminator: - message = `Invalid discriminator value. Expected ${util2.joinValues(issue2.options)}`; + message = `Invalid discriminator value. Expected ${util2.joinValues(issue4.options)}`; break; case ZodIssueCode2.invalid_enum_value: - message = `Invalid enum value. Expected ${util2.joinValues(issue2.options)}, received '${issue2.received}'`; + message = `Invalid enum value. Expected ${util2.joinValues(issue4.options)}, received '${issue4.received}'`; break; case ZodIssueCode2.invalid_arguments: message = `Invalid function arguments`; @@ -27267,50 +27263,50 @@ var init_en = __esm({ 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}`; + if (typeof issue4.validation === "object") { + if ("includes" in issue4.validation) { + message = `Invalid input: must include "${issue4.validation.includes}"`; + if (typeof issue4.validation.position === "number") { + message = `${message} at one or more positions greater than or equal to ${issue4.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 issue4.validation) { + message = `Invalid input: must start with "${issue4.validation.startsWith}"`; + } else if ("endsWith" in issue4.validation) { + message = `Invalid input: must end with "${issue4.validation.endsWith}"`; } else { - util2.assertNever(issue2.validation); + util2.assertNever(issue4.validation); } - } else if (issue2.validation !== "regex") { - message = `Invalid ${issue2.validation}`; + } else if (issue4.validation !== "regex") { + message = `Invalid ${issue4.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))}`; + if (issue4.type === "array") + message = `Array must contain ${issue4.exact ? "exactly" : issue4.inclusive ? `at least` : `more than`} ${issue4.minimum} element(s)`; + else if (issue4.type === "string") + message = `String must contain ${issue4.exact ? "exactly" : issue4.inclusive ? `at least` : `over`} ${issue4.minimum} character(s)`; + else if (issue4.type === "number") + message = `Number must be ${issue4.exact ? `exactly equal to ` : issue4.inclusive ? `greater than or equal to ` : `greater than `}${issue4.minimum}`; + else if (issue4.type === "bigint") + message = `Number must be ${issue4.exact ? `exactly equal to ` : issue4.inclusive ? `greater than or equal to ` : `greater than `}${issue4.minimum}`; + else if (issue4.type === "date") + message = `Date must be ${issue4.exact ? `exactly equal to ` : issue4.inclusive ? `greater than or equal to ` : `greater than `}${new Date(Number(issue4.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))}`; + if (issue4.type === "array") + message = `Array must contain ${issue4.exact ? `exactly` : issue4.inclusive ? `at most` : `less than`} ${issue4.maximum} element(s)`; + else if (issue4.type === "string") + message = `String must contain ${issue4.exact ? `exactly` : issue4.inclusive ? `at most` : `under`} ${issue4.maximum} character(s)`; + else if (issue4.type === "number") + message = `Number must be ${issue4.exact ? `exactly` : issue4.inclusive ? `less than or equal to` : `less than`} ${issue4.maximum}`; + else if (issue4.type === "bigint") + message = `BigInt must be ${issue4.exact ? `exactly` : issue4.inclusive ? `less than or equal to` : `less than`} ${issue4.maximum}`; + else if (issue4.type === "date") + message = `Date must be ${issue4.exact ? `exactly` : issue4.inclusive ? `smaller than or equal to` : `smaller than`} ${new Date(Number(issue4.maximum))}`; else message = "Invalid input"; break; @@ -27321,40 +27317,37 @@ var init_en = __esm({ message = `Intersection results could not be merged`; break; case ZodIssueCode2.not_multiple_of: - message = `Number must be a multiple of ${issue2.multipleOf}`; + message = `Number must be a multiple of ${issue4.multipleOf}`; break; case ZodIssueCode2.not_finite: message = "Number must be finite"; break; default: message = _ctx.defaultError; - util2.assertNever(issue2); + util2.assertNever(issue4); } return { message }; }; - en_default2 = errorMap2; + en_default3 = errorMap2; } }); -// node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/errors.js -function setErrorMap2(map) { - overrideErrorMap2 = map; -} +// ../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v3/errors.js function getErrorMap2() { return overrideErrorMap2; } var overrideErrorMap2; var init_errors = __esm({ - "node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/errors.js"() { + "../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v3/errors.js"() { init_en(); - overrideErrorMap2 = en_default2; + overrideErrorMap2 = en_default3; } }); -// node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/parseUtil.js +// ../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v3/helpers/parseUtil.js function addIssueToContext2(ctx, issueData) { const overrideMap = getErrorMap2(); - const issue2 = makeIssue2({ + const issue4 = makeIssue2({ issueData, data: ctx.data, path: ctx.path, @@ -27365,15 +27358,15 @@ function addIssueToContext2(ctx, issueData) { // then schema-bound map if available overrideMap, // then global override map - overrideMap === en_default2 ? void 0 : en_default2 + overrideMap === en_default3 ? void 0 : en_default3 // then global default map ].filter((x) => !!x) }); - ctx.common.issues.push(issue2); + ctx.common.issues.push(issue4); } -var makeIssue2, EMPTY_PATH2, ParseStatus2, INVALID2, DIRTY2, OK2, isAborted2, isDirty2, isValid2, isAsync2; +var makeIssue2, 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"() { + "../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v3/helpers/parseUtil.js"() { init_errors(); init_en(); makeIssue2 = (params) => { @@ -27392,8 +27385,8 @@ var init_parseUtil = __esm({ } let errorMessage = ""; const maps = errorMaps.filter((m) => !!m).slice().reverse(); - for (const map of maps) { - errorMessage = map(fullIssue, { data, defaultError: errorMessage }).message; + for (const map2 of maps) { + errorMessage = map2(fullIssue, { data, defaultError: errorMessage }).message; } return { ...issueData, @@ -27401,7 +27394,6 @@ var init_parseUtil = __esm({ message: errorMessage }; }; - EMPTY_PATH2 = []; ParseStatus2 = class _ParseStatus { constructor() { this.value = "valid"; @@ -27468,33 +27460,33 @@ var init_parseUtil = __esm({ } }); -// node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/typeAliases.js +// ../node_modules/.pnpm/zod@4.3.5/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@4.3.5/node_modules/zod/v3/helpers/typeAliases.js"() { } }); -// node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/errorUtil.js +// ../node_modules/.pnpm/zod@4.3.5/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; + "../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v3/helpers/errorUtil.js"() { + (function(errorUtil3) { + errorUtil3.errToObj = (message) => typeof message === "string" ? { message } : message || {}; + errorUtil3.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) { +// ../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v3/types.js +function processCreateParams2(params) { if (!params) return {}; - const { errorMap: errorMap4, invalid_type_error, required_error, description } = params; - if (errorMap4 && (invalid_type_error || required_error)) { + const { errorMap: errorMap3, invalid_type_error, required_error, description } = params; + if (errorMap3 && (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 }; + if (errorMap3) + return { errorMap: errorMap3, description }; const customMap = (iss, ctx) => { const { message } = params; if (iss.code === "invalid_enum_value") { @@ -27531,24 +27523,24 @@ function datetimeRegex2(args3) { regex4 = `${regex4}(${opts.join("|")})`; return new RegExp(`^${regex4}$`); } -function isValidIP2(ip2, version2) { - if ((version2 === "v4" || !version2) && ipv4Regex2.test(ip2)) { +function isValidIP2(ip2, version4) { + if ((version4 === "v4" || !version4) && ipv4Regex2.test(ip2)) { return true; } - if ((version2 === "v6" || !version2) && ipv6Regex2.test(ip2)) { + if ((version4 === "v6" || !version4) && ipv6Regex2.test(ip2)) { return true; } return false; } -function isValidJWT2(jwt, alg) { - if (!jwtRegex2.test(jwt)) +function isValidJWT3(jwt2, alg) { + if (!jwtRegex2.test(jwt2)) return false; try { - const [header] = jwt.split("."); + const [header] = jwt2.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 base646 = header.replace(/-/g, "+").replace(/_/g, "/").padEnd(header.length + (4 - header.length % 4) % 4, "="); + const decoded = JSON.parse(atob(base646)); if (typeof decoded !== "object" || decoded === null) return false; if ("typ" in decoded && decoded?.typ !== "JWT") @@ -27562,16 +27554,16 @@ function isValidJWT2(jwt, alg) { return false; } } -function isValidCidr2(ip2, version2) { - if ((version2 === "v4" || !version2) && ipv4CidrRegex2.test(ip2)) { +function isValidCidr2(ip2, version4) { + if ((version4 === "v4" || !version4) && ipv4CidrRegex2.test(ip2)) { return true; } - if ((version2 === "v6" || !version2) && ipv6CidrRegex2.test(ip2)) { + if ((version4 === "v6" || !version4) && ipv6CidrRegex2.test(ip2)) { return true; } return false; } -function floatSafeRemainder2(val, step) { +function floatSafeRemainder3(val, step) { const valDecCount = (val.toString().split(".")[1] || "").length; const stepDecCount = (step.toString().split(".")[1] || "").length; const decCount = valDecCount > stepDecCount ? valDecCount : stepDecCount; @@ -27580,34 +27572,34 @@ function floatSafeRemainder2(val, step) { return valInt % stepInt / 10 ** decCount; } function deepPartialify2(schema2) { - if (schema2 instanceof ZodObject2) { + if (schema2 instanceof ZodObject3) { const newShape = {}; for (const key in schema2.shape) { const fieldSchema = schema2.shape[key]; - newShape[key] = ZodOptional2.create(deepPartialify2(fieldSchema)); + newShape[key] = ZodOptional3.create(deepPartialify2(fieldSchema)); } - return new ZodObject2({ + return new ZodObject3({ ...schema2._def, shape: () => newShape }); - } else if (schema2 instanceof ZodArray2) { - return new ZodArray2({ + } else if (schema2 instanceof ZodArray3) { + return new ZodArray3({ ...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 ZodOptional3) { + return ZodOptional3.create(deepPartialify2(schema2.unwrap())); + } else if (schema2 instanceof ZodNullable3) { + return ZodNullable3.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); +function mergeValues3(a, b) { + const aType = getParsedType3(a); + const bType = getParsedType3(b); if (a === b) { return { valid: true, data: a }; } else if (aType === ZodParsedType2.object && bType === ZodParsedType2.object) { @@ -27615,7 +27607,7 @@ function mergeValues2(a, 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]); + const sharedValue = mergeValues3(a[key], b[key]); if (!sharedValue.valid) { return { valid: false }; } @@ -27630,7 +27622,7 @@ function mergeValues2(a, b) { for (let index = 0; index < a.length; index++) { const itemA = a[index]; const itemB = b[index]; - const sharedValue = mergeValues2(itemA, itemB); + const sharedValue = mergeValues3(itemA, itemB); if (!sharedValue.valid) { return { valid: false }; } @@ -27644,42 +27636,15 @@ function mergeValues2(a, b) { } } function createZodEnum2(values, params) { - return new ZodEnum2({ + return new ZodEnum3({ values, typeName: ZodFirstPartyTypeKind2.ZodEnum, - ...processCreateParams3(params) + ...processCreateParams2(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 ParseInputLazyPath2, handleResult2, ZodType3, cuidRegex2, cuid2Regex2, ulidRegex2, uuidRegex2, nanoidRegex2, jwtRegex2, durationRegex2, emailRegex2, _emojiRegex2, emojiRegex2, ipv4Regex2, ipv4CidrRegex2, ipv6Regex2, ipv6CidrRegex2, base64Regex2, base64urlRegex2, dateRegexSource2, dateRegex2, ZodString3, ZodNumber3, ZodBigInt2, ZodBoolean3, ZodDate2, ZodSymbol2, ZodUndefined2, ZodNull3, ZodAny2, ZodUnknown3, ZodNever3, ZodVoid2, ZodArray3, ZodObject3, ZodUnion3, getDiscriminator2, ZodDiscriminatedUnion3, ZodIntersection3, ZodTuple2, ZodRecord3, ZodMap2, ZodSet2, ZodFunction2, ZodLazy2, ZodLiteral3, ZodEnum3, ZodNativeEnum2, ZodPromise2, ZodEffects2, ZodOptional3, ZodNullable3, ZodDefault3, ZodCatch3, ZodNaN2, BRAND2, ZodBranded2, ZodPipeline2, ZodReadonly3, late2, ZodFirstPartyTypeKind2, 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; var init_types = __esm({ - "node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/types.js"() { + "../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v3/types.js"() { init_ZodError(); init_errors(); init_errorUtil(); @@ -27716,25 +27681,25 @@ var init_types = __esm({ get error() { if (this._error) return this._error; - const error41 = new ZodError2(ctx.common.issues); - this._error = error41; + const error50 = new ZodError3(ctx.common.issues); + this._error = error50; return this._error; } }; } }; - ZodType2 = class { + ZodType3 = class { get description() { return this._def.description; } _getType(input) { - return getParsedType2(input.data); + return getParsedType3(input.data); } _getOrReturnCtx(input, ctx) { return ctx || { common: input.parent.common, data: input.data, - parsedType: getParsedType2(input.data), + parsedType: getParsedType3(input.data), schemaErrorMap: this._def.errorMap, path: input.path, parent: input.parent @@ -27746,7 +27711,7 @@ var init_types = __esm({ ctx: { common: input.parent.common, data: input.data, - parsedType: getParsedType2(input.data), + parsedType: getParsedType3(input.data), schemaErrorMap: this._def.errorMap, path: input.path, parent: input.parent @@ -27781,7 +27746,7 @@ var init_types = __esm({ schemaErrorMap: this._def.errorMap, parent: null, data, - parsedType: getParsedType2(data) + parsedType: getParsedType3(data) }; const result = this._parseSync({ data, path: ctx.path, parent: ctx }); return handleResult2(ctx, result); @@ -27796,7 +27761,7 @@ var init_types = __esm({ schemaErrorMap: this._def.errorMap, parent: null, data, - parsedType: getParsedType2(data) + parsedType: getParsedType3(data) }; if (!this["~standard"].async) { try { @@ -27839,13 +27804,13 @@ var init_types = __esm({ schemaErrorMap: this._def.errorMap, parent: null, data, - parsedType: getParsedType2(data) + parsedType: getParsedType3(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) { + refine(check4, message) { const getIssueProperties = (val) => { if (typeof message === "string" || typeof message === "undefined") { return { message }; @@ -27856,7 +27821,7 @@ var init_types = __esm({ } }; return this._refinement((val, ctx) => { - const result = check(val); + const result = check4(val); const setError = () => ctx.addIssue({ code: ZodIssueCode2.custom, ...getIssueProperties(val) @@ -27879,9 +27844,9 @@ var init_types = __esm({ } }); } - refinement(check, refinementData) { + refinement(check4, refinementData) { return this._refinement((val, ctx) => { - if (!check(val)) { + if (!check4(val)) { ctx.addIssue(typeof refinementData === "function" ? refinementData(val, ctx) : refinementData); return false; } else { @@ -27933,38 +27898,38 @@ var init_types = __esm({ }; } optional() { - return ZodOptional2.create(this, this._def); + return ZodOptional3.create(this, this._def); } nullable() { - return ZodNullable2.create(this, this._def); + return ZodNullable3.create(this, this._def); } nullish() { return this.nullable().optional(); } array() { - return ZodArray2.create(this); + return ZodArray3.create(this); } promise() { return ZodPromise2.create(this, this._def); } or(option) { - return ZodUnion2.create([this, option], this._def); + return ZodUnion3.create([this, option], this._def); } and(incoming) { - return ZodIntersection2.create(this, incoming, this._def); + return ZodIntersection3.create(this, incoming, this._def); } - transform(transform) { + transform(transform4) { return new ZodEffects2({ - ...processCreateParams3(this._def), + ...processCreateParams2(this._def), schema: this, typeName: ZodFirstPartyTypeKind2.ZodEffects, - effect: { type: "transform", transform } + effect: { type: "transform", transform: transform4 } }); } default(def) { const defaultValueFunc = typeof def === "function" ? def : () => def; - return new ZodDefault2({ - ...processCreateParams3(this._def), + return new ZodDefault3({ + ...processCreateParams2(this._def), innerType: this, defaultValue: defaultValueFunc, typeName: ZodFirstPartyTypeKind2.ZodDefault @@ -27974,13 +27939,13 @@ var init_types = __esm({ return new ZodBranded2({ typeName: ZodFirstPartyTypeKind2.ZodBranded, type: this, - ...processCreateParams3(this._def) + ...processCreateParams2(this._def) }); } catch(def) { const catchValueFunc = typeof def === "function" ? def : () => def; - return new ZodCatch2({ - ...processCreateParams3(this._def), + return new ZodCatch3({ + ...processCreateParams2(this._def), innerType: this, catchValue: catchValueFunc, typeName: ZodFirstPartyTypeKind2.ZodCatch @@ -27997,7 +27962,7 @@ var init_types = __esm({ return ZodPipeline2.create(this, target); } readonly() { - return ZodReadonly2.create(this); + return ZodReadonly3.create(this); } isOptional() { return this.safeParse(void 0).success; @@ -28023,13 +27988,13 @@ var init_types = __esm({ 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 { + ZodString3 = class _ZodString4 extends ZodType3 { _parse(input) { if (this._def.coerce) { input.data = String(input.data); } - const parsedType4 = this._getType(input); - if (parsedType4 !== ZodParsedType2.string) { + const parsedType3 = this._getType(input); + if (parsedType3 !== ZodParsedType2.string) { const ctx2 = this._getOrReturnCtx(input); addIssueToContext2(ctx2, { code: ZodIssueCode2.invalid_type, @@ -28040,70 +28005,70 @@ var init_types = __esm({ } 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) { + for (const check4 of this._def.checks) { + if (check4.kind === "min") { + if (input.data.length < check4.value) { ctx = this._getOrReturnCtx(input, ctx); addIssueToContext2(ctx, { code: ZodIssueCode2.too_small, - minimum: check.value, + minimum: check4.value, type: "string", inclusive: true, exact: false, - message: check.message + message: check4.message }); status.dirty(); } - } else if (check.kind === "max") { - if (input.data.length > check.value) { + } else if (check4.kind === "max") { + if (input.data.length > check4.value) { ctx = this._getOrReturnCtx(input, ctx); addIssueToContext2(ctx, { code: ZodIssueCode2.too_big, - maximum: check.value, + maximum: check4.value, type: "string", inclusive: true, exact: false, - message: check.message + message: check4.message }); status.dirty(); } - } else if (check.kind === "length") { - const tooBig = input.data.length > check.value; - const tooSmall = input.data.length < check.value; + } else if (check4.kind === "length") { + const tooBig = input.data.length > check4.value; + const tooSmall = input.data.length < check4.value; if (tooBig || tooSmall) { ctx = this._getOrReturnCtx(input, ctx); if (tooBig) { addIssueToContext2(ctx, { code: ZodIssueCode2.too_big, - maximum: check.value, + maximum: check4.value, type: "string", inclusive: true, exact: true, - message: check.message + message: check4.message }); } else if (tooSmall) { addIssueToContext2(ctx, { code: ZodIssueCode2.too_small, - minimum: check.value, + minimum: check4.value, type: "string", inclusive: true, exact: true, - message: check.message + message: check4.message }); } status.dirty(); } - } else if (check.kind === "email") { + } else if (check4.kind === "email") { if (!emailRegex2.test(input.data)) { ctx = this._getOrReturnCtx(input, ctx); addIssueToContext2(ctx, { validation: "email", code: ZodIssueCode2.invalid_string, - message: check.message + message: check4.message }); status.dirty(); } - } else if (check.kind === "emoji") { + } else if (check4.kind === "emoji") { if (!emojiRegex2) { emojiRegex2 = new RegExp(_emojiRegex2, "u"); } @@ -28112,61 +28077,61 @@ var init_types = __esm({ addIssueToContext2(ctx, { validation: "emoji", code: ZodIssueCode2.invalid_string, - message: check.message + message: check4.message }); status.dirty(); } - } else if (check.kind === "uuid") { + } else if (check4.kind === "uuid") { if (!uuidRegex2.test(input.data)) { ctx = this._getOrReturnCtx(input, ctx); addIssueToContext2(ctx, { validation: "uuid", code: ZodIssueCode2.invalid_string, - message: check.message + message: check4.message }); status.dirty(); } - } else if (check.kind === "nanoid") { + } else if (check4.kind === "nanoid") { if (!nanoidRegex2.test(input.data)) { ctx = this._getOrReturnCtx(input, ctx); addIssueToContext2(ctx, { validation: "nanoid", code: ZodIssueCode2.invalid_string, - message: check.message + message: check4.message }); status.dirty(); } - } else if (check.kind === "cuid") { + } else if (check4.kind === "cuid") { if (!cuidRegex2.test(input.data)) { ctx = this._getOrReturnCtx(input, ctx); addIssueToContext2(ctx, { validation: "cuid", code: ZodIssueCode2.invalid_string, - message: check.message + message: check4.message }); status.dirty(); } - } else if (check.kind === "cuid2") { + } else if (check4.kind === "cuid2") { if (!cuid2Regex2.test(input.data)) { ctx = this._getOrReturnCtx(input, ctx); addIssueToContext2(ctx, { validation: "cuid2", code: ZodIssueCode2.invalid_string, - message: check.message + message: check4.message }); status.dirty(); } - } else if (check.kind === "ulid") { + } else if (check4.kind === "ulid") { if (!ulidRegex2.test(input.data)) { ctx = this._getOrReturnCtx(input, ctx); addIssueToContext2(ctx, { validation: "ulid", code: ZodIssueCode2.invalid_string, - message: check.message + message: check4.message }); status.dirty(); } - } else if (check.kind === "url") { + } else if (check4.kind === "url") { try { new URL(input.data); } catch { @@ -28174,153 +28139,153 @@ var init_types = __esm({ addIssueToContext2(ctx, { validation: "url", code: ZodIssueCode2.invalid_string, - message: check.message + message: check4.message }); status.dirty(); } - } else if (check.kind === "regex") { - check.regex.lastIndex = 0; - const testResult = check.regex.test(input.data); + } else if (check4.kind === "regex") { + check4.regex.lastIndex = 0; + const testResult = check4.regex.test(input.data); if (!testResult) { ctx = this._getOrReturnCtx(input, ctx); addIssueToContext2(ctx, { validation: "regex", code: ZodIssueCode2.invalid_string, - message: check.message + message: check4.message }); status.dirty(); } - } else if (check.kind === "trim") { + } else if (check4.kind === "trim") { input.data = input.data.trim(); - } else if (check.kind === "includes") { - if (!input.data.includes(check.value, check.position)) { + } else if (check4.kind === "includes") { + if (!input.data.includes(check4.value, check4.position)) { ctx = this._getOrReturnCtx(input, ctx); addIssueToContext2(ctx, { code: ZodIssueCode2.invalid_string, - validation: { includes: check.value, position: check.position }, - message: check.message + validation: { includes: check4.value, position: check4.position }, + message: check4.message }); status.dirty(); } - } else if (check.kind === "toLowerCase") { + } else if (check4.kind === "toLowerCase") { input.data = input.data.toLowerCase(); - } else if (check.kind === "toUpperCase") { + } else if (check4.kind === "toUpperCase") { input.data = input.data.toUpperCase(); - } else if (check.kind === "startsWith") { - if (!input.data.startsWith(check.value)) { + } else if (check4.kind === "startsWith") { + if (!input.data.startsWith(check4.value)) { ctx = this._getOrReturnCtx(input, ctx); addIssueToContext2(ctx, { code: ZodIssueCode2.invalid_string, - validation: { startsWith: check.value }, - message: check.message + validation: { startsWith: check4.value }, + message: check4.message }); status.dirty(); } - } else if (check.kind === "endsWith") { - if (!input.data.endsWith(check.value)) { + } else if (check4.kind === "endsWith") { + if (!input.data.endsWith(check4.value)) { ctx = this._getOrReturnCtx(input, ctx); addIssueToContext2(ctx, { code: ZodIssueCode2.invalid_string, - validation: { endsWith: check.value }, - message: check.message + validation: { endsWith: check4.value }, + message: check4.message }); status.dirty(); } - } else if (check.kind === "datetime") { - const regex4 = datetimeRegex2(check); + } else if (check4.kind === "datetime") { + const regex4 = datetimeRegex2(check4); if (!regex4.test(input.data)) { ctx = this._getOrReturnCtx(input, ctx); addIssueToContext2(ctx, { code: ZodIssueCode2.invalid_string, validation: "datetime", - message: check.message + message: check4.message }); status.dirty(); } - } else if (check.kind === "date") { + } else if (check4.kind === "date") { const regex4 = dateRegex2; if (!regex4.test(input.data)) { ctx = this._getOrReturnCtx(input, ctx); addIssueToContext2(ctx, { code: ZodIssueCode2.invalid_string, validation: "date", - message: check.message + message: check4.message }); status.dirty(); } - } else if (check.kind === "time") { - const regex4 = timeRegex2(check); + } else if (check4.kind === "time") { + const regex4 = timeRegex2(check4); if (!regex4.test(input.data)) { ctx = this._getOrReturnCtx(input, ctx); addIssueToContext2(ctx, { code: ZodIssueCode2.invalid_string, validation: "time", - message: check.message + message: check4.message }); status.dirty(); } - } else if (check.kind === "duration") { + } else if (check4.kind === "duration") { if (!durationRegex2.test(input.data)) { ctx = this._getOrReturnCtx(input, ctx); addIssueToContext2(ctx, { validation: "duration", code: ZodIssueCode2.invalid_string, - message: check.message + message: check4.message }); status.dirty(); } - } else if (check.kind === "ip") { - if (!isValidIP2(input.data, check.version)) { + } else if (check4.kind === "ip") { + if (!isValidIP2(input.data, check4.version)) { ctx = this._getOrReturnCtx(input, ctx); addIssueToContext2(ctx, { validation: "ip", code: ZodIssueCode2.invalid_string, - message: check.message + message: check4.message }); status.dirty(); } - } else if (check.kind === "jwt") { - if (!isValidJWT2(input.data, check.alg)) { + } else if (check4.kind === "jwt") { + if (!isValidJWT3(input.data, check4.alg)) { ctx = this._getOrReturnCtx(input, ctx); addIssueToContext2(ctx, { validation: "jwt", code: ZodIssueCode2.invalid_string, - message: check.message + message: check4.message }); status.dirty(); } - } else if (check.kind === "cidr") { - if (!isValidCidr2(input.data, check.version)) { + } else if (check4.kind === "cidr") { + if (!isValidCidr2(input.data, check4.version)) { ctx = this._getOrReturnCtx(input, ctx); addIssueToContext2(ctx, { validation: "cidr", code: ZodIssueCode2.invalid_string, - message: check.message + message: check4.message }); status.dirty(); } - } else if (check.kind === "base64") { + } else if (check4.kind === "base64") { if (!base64Regex2.test(input.data)) { ctx = this._getOrReturnCtx(input, ctx); addIssueToContext2(ctx, { validation: "base64", code: ZodIssueCode2.invalid_string, - message: check.message + message: check4.message }); status.dirty(); } - } else if (check.kind === "base64url") { + } else if (check4.kind === "base64url") { if (!base64urlRegex2.test(input.data)) { ctx = this._getOrReturnCtx(input, ctx); addIssueToContext2(ctx, { validation: "base64url", code: ZodIssueCode2.invalid_string, - message: check.message + message: check4.message }); status.dirty(); } } else { - util2.assertNever(check); + util2.assertNever(check4); } } return { status: status.value, value: input.data }; @@ -28332,10 +28297,10 @@ var init_types = __esm({ ...errorUtil2.errToObj(message) }); } - _addCheck(check) { - return new _ZodString({ + _addCheck(check4) { + return new _ZodString4({ ...this._def, - checks: [...this._def.checks, check] + checks: [...this._def.checks, check4] }); } email(message) { @@ -28475,19 +28440,19 @@ var init_types = __esm({ return this.min(1, errorUtil2.errToObj(message)); } trim() { - return new _ZodString({ + return new _ZodString4({ ...this._def, checks: [...this._def.checks, { kind: "trim" }] }); } toLowerCase() { - return new _ZodString({ + return new _ZodString4({ ...this._def, checks: [...this._def.checks, { kind: "toLowerCase" }] }); } toUpperCase() { - return new _ZodString({ + return new _ZodString4({ ...this._def, checks: [...this._def.checks, { kind: "toUpperCase" }] }); @@ -28561,15 +28526,15 @@ var init_types = __esm({ return max; } }; - ZodString2.create = (params) => { - return new ZodString2({ + ZodString3.create = (params) => { + return new ZodString3({ checks: [], typeName: ZodFirstPartyTypeKind2.ZodString, coerce: params?.coerce ?? false, - ...processCreateParams3(params) + ...processCreateParams2(params) }); }; - ZodNumber2 = class _ZodNumber extends ZodType2 { + ZodNumber3 = class _ZodNumber extends ZodType3 { constructor() { super(...arguments); this.min = this.gte; @@ -28580,8 +28545,8 @@ var init_types = __esm({ if (this._def.coerce) { input.data = Number(input.data); } - const parsedType4 = this._getType(input); - if (parsedType4 !== ZodParsedType2.number) { + const parsedType3 = this._getType(input); + if (parsedType3 !== ZodParsedType2.number) { const ctx2 = this._getOrReturnCtx(input); addIssueToContext2(ctx2, { code: ZodIssueCode2.invalid_type, @@ -28592,67 +28557,67 @@ var init_types = __esm({ } let ctx = void 0; const status = new ParseStatus2(); - for (const check of this._def.checks) { - if (check.kind === "int") { + for (const check4 of this._def.checks) { + if (check4.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 + message: check4.message }); status.dirty(); } - } else if (check.kind === "min") { - const tooSmall = check.inclusive ? input.data < check.value : input.data <= check.value; + } else if (check4.kind === "min") { + const tooSmall = check4.inclusive ? input.data < check4.value : input.data <= check4.value; if (tooSmall) { ctx = this._getOrReturnCtx(input, ctx); addIssueToContext2(ctx, { code: ZodIssueCode2.too_small, - minimum: check.value, + minimum: check4.value, type: "number", - inclusive: check.inclusive, + inclusive: check4.inclusive, exact: false, - message: check.message + message: check4.message }); status.dirty(); } - } else if (check.kind === "max") { - const tooBig = check.inclusive ? input.data > check.value : input.data >= check.value; + } else if (check4.kind === "max") { + const tooBig = check4.inclusive ? input.data > check4.value : input.data >= check4.value; if (tooBig) { ctx = this._getOrReturnCtx(input, ctx); addIssueToContext2(ctx, { code: ZodIssueCode2.too_big, - maximum: check.value, + maximum: check4.value, type: "number", - inclusive: check.inclusive, + inclusive: check4.inclusive, exact: false, - message: check.message + message: check4.message }); status.dirty(); } - } else if (check.kind === "multipleOf") { - if (floatSafeRemainder2(input.data, check.value) !== 0) { + } else if (check4.kind === "multipleOf") { + if (floatSafeRemainder3(input.data, check4.value) !== 0) { ctx = this._getOrReturnCtx(input, ctx); addIssueToContext2(ctx, { code: ZodIssueCode2.not_multiple_of, - multipleOf: check.value, - message: check.message + multipleOf: check4.value, + message: check4.message }); status.dirty(); } - } else if (check.kind === "finite") { + } else if (check4.kind === "finite") { if (!Number.isFinite(input.data)) { ctx = this._getOrReturnCtx(input, ctx); addIssueToContext2(ctx, { code: ZodIssueCode2.not_finite, - message: check.message + message: check4.message }); status.dirty(); } } else { - util2.assertNever(check); + util2.assertNever(check4); } } return { status: status.value, value: input.data }; @@ -28683,10 +28648,10 @@ var init_types = __esm({ ] }); } - _addCheck(check) { + _addCheck(check4) { return new _ZodNumber({ ...this._def, - checks: [...this._def.checks, check] + checks: [...this._def.checks, check4] }); } int(message) { @@ -28793,15 +28758,15 @@ var init_types = __esm({ return Number.isFinite(min) && Number.isFinite(max); } }; - ZodNumber2.create = (params) => { - return new ZodNumber2({ + ZodNumber3.create = (params) => { + return new ZodNumber3({ checks: [], typeName: ZodFirstPartyTypeKind2.ZodNumber, coerce: params?.coerce || false, - ...processCreateParams3(params) + ...processCreateParams2(params) }); }; - ZodBigInt2 = class _ZodBigInt extends ZodType2 { + ZodBigInt2 = class _ZodBigInt extends ZodType3 { constructor() { super(...arguments); this.min = this.gte; @@ -28815,51 +28780,51 @@ var init_types = __esm({ return this._getInvalidInput(input); } } - const parsedType4 = this._getType(input); - if (parsedType4 !== ZodParsedType2.bigint) { + const parsedType3 = this._getType(input); + if (parsedType3 !== 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; + for (const check4 of this._def.checks) { + if (check4.kind === "min") { + const tooSmall = check4.inclusive ? input.data < check4.value : input.data <= check4.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 + minimum: check4.value, + inclusive: check4.inclusive, + message: check4.message }); status.dirty(); } - } else if (check.kind === "max") { - const tooBig = check.inclusive ? input.data > check.value : input.data >= check.value; + } else if (check4.kind === "max") { + const tooBig = check4.inclusive ? input.data > check4.value : input.data >= check4.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 + maximum: check4.value, + inclusive: check4.inclusive, + message: check4.message }); status.dirty(); } - } else if (check.kind === "multipleOf") { - if (input.data % check.value !== BigInt(0)) { + } else if (check4.kind === "multipleOf") { + if (input.data % check4.value !== BigInt(0)) { ctx = this._getOrReturnCtx(input, ctx); addIssueToContext2(ctx, { code: ZodIssueCode2.not_multiple_of, - multipleOf: check.value, - message: check.message + multipleOf: check4.value, + message: check4.message }); status.dirty(); } } else { - util2.assertNever(check); + util2.assertNever(check4); } } return { status: status.value, value: input.data }; @@ -28899,10 +28864,10 @@ var init_types = __esm({ ] }); } - _addCheck(check) { + _addCheck(check4) { return new _ZodBigInt({ ...this._def, - checks: [...this._def.checks, check] + checks: [...this._def.checks, check4] }); } positive(message) { @@ -28970,16 +28935,16 @@ var init_types = __esm({ checks: [], typeName: ZodFirstPartyTypeKind2.ZodBigInt, coerce: params?.coerce ?? false, - ...processCreateParams3(params) + ...processCreateParams2(params) }); }; - ZodBoolean2 = class extends ZodType2 { + ZodBoolean3 = class extends ZodType3 { _parse(input) { if (this._def.coerce) { input.data = Boolean(input.data); } - const parsedType4 = this._getType(input); - if (parsedType4 !== ZodParsedType2.boolean) { + const parsedType3 = this._getType(input); + if (parsedType3 !== ZodParsedType2.boolean) { const ctx = this._getOrReturnCtx(input); addIssueToContext2(ctx, { code: ZodIssueCode2.invalid_type, @@ -28991,20 +28956,20 @@ var init_types = __esm({ return OK2(input.data); } }; - ZodBoolean2.create = (params) => { - return new ZodBoolean2({ + ZodBoolean3.create = (params) => { + return new ZodBoolean3({ typeName: ZodFirstPartyTypeKind2.ZodBoolean, coerce: params?.coerce || false, - ...processCreateParams3(params) + ...processCreateParams2(params) }); }; - ZodDate2 = class _ZodDate extends ZodType2 { + ZodDate2 = class _ZodDate extends ZodType3 { _parse(input) { if (this._def.coerce) { input.data = new Date(input.data); } - const parsedType4 = this._getType(input); - if (parsedType4 !== ZodParsedType2.date) { + const parsedType3 = this._getType(input); + if (parsedType3 !== ZodParsedType2.date) { const ctx2 = this._getOrReturnCtx(input); addIssueToContext2(ctx2, { code: ZodIssueCode2.invalid_type, @@ -29022,35 +28987,35 @@ var init_types = __esm({ } 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) { + for (const check4 of this._def.checks) { + if (check4.kind === "min") { + if (input.data.getTime() < check4.value) { ctx = this._getOrReturnCtx(input, ctx); addIssueToContext2(ctx, { code: ZodIssueCode2.too_small, - message: check.message, + message: check4.message, inclusive: true, exact: false, - minimum: check.value, + minimum: check4.value, type: "date" }); status.dirty(); } - } else if (check.kind === "max") { - if (input.data.getTime() > check.value) { + } else if (check4.kind === "max") { + if (input.data.getTime() > check4.value) { ctx = this._getOrReturnCtx(input, ctx); addIssueToContext2(ctx, { code: ZodIssueCode2.too_big, - message: check.message, + message: check4.message, inclusive: true, exact: false, - maximum: check.value, + maximum: check4.value, type: "date" }); status.dirty(); } } else { - util2.assertNever(check); + util2.assertNever(check4); } } return { @@ -29058,10 +29023,10 @@ var init_types = __esm({ value: new Date(input.data.getTime()) }; } - _addCheck(check) { + _addCheck(check4) { return new _ZodDate({ ...this._def, - checks: [...this._def.checks, check] + checks: [...this._def.checks, check4] }); } min(minDate, message) { @@ -29104,13 +29069,13 @@ var init_types = __esm({ checks: [], coerce: params?.coerce || false, typeName: ZodFirstPartyTypeKind2.ZodDate, - ...processCreateParams3(params) + ...processCreateParams2(params) }); }; - ZodSymbol2 = class extends ZodType2 { + ZodSymbol2 = class extends ZodType3 { _parse(input) { - const parsedType4 = this._getType(input); - if (parsedType4 !== ZodParsedType2.symbol) { + const parsedType3 = this._getType(input); + if (parsedType3 !== ZodParsedType2.symbol) { const ctx = this._getOrReturnCtx(input); addIssueToContext2(ctx, { code: ZodIssueCode2.invalid_type, @@ -29125,13 +29090,13 @@ var init_types = __esm({ ZodSymbol2.create = (params) => { return new ZodSymbol2({ typeName: ZodFirstPartyTypeKind2.ZodSymbol, - ...processCreateParams3(params) + ...processCreateParams2(params) }); }; - ZodUndefined2 = class extends ZodType2 { + ZodUndefined2 = class extends ZodType3 { _parse(input) { - const parsedType4 = this._getType(input); - if (parsedType4 !== ZodParsedType2.undefined) { + const parsedType3 = this._getType(input); + if (parsedType3 !== ZodParsedType2.undefined) { const ctx = this._getOrReturnCtx(input); addIssueToContext2(ctx, { code: ZodIssueCode2.invalid_type, @@ -29146,13 +29111,13 @@ var init_types = __esm({ ZodUndefined2.create = (params) => { return new ZodUndefined2({ typeName: ZodFirstPartyTypeKind2.ZodUndefined, - ...processCreateParams3(params) + ...processCreateParams2(params) }); }; - ZodNull2 = class extends ZodType2 { + ZodNull3 = class extends ZodType3 { _parse(input) { - const parsedType4 = this._getType(input); - if (parsedType4 !== ZodParsedType2.null) { + const parsedType3 = this._getType(input); + if (parsedType3 !== ZodParsedType2.null) { const ctx = this._getOrReturnCtx(input); addIssueToContext2(ctx, { code: ZodIssueCode2.invalid_type, @@ -29164,13 +29129,13 @@ var init_types = __esm({ return OK2(input.data); } }; - ZodNull2.create = (params) => { - return new ZodNull2({ + ZodNull3.create = (params) => { + return new ZodNull3({ typeName: ZodFirstPartyTypeKind2.ZodNull, - ...processCreateParams3(params) + ...processCreateParams2(params) }); }; - ZodAny2 = class extends ZodType2 { + ZodAny2 = class extends ZodType3 { constructor() { super(...arguments); this._any = true; @@ -29182,10 +29147,10 @@ var init_types = __esm({ ZodAny2.create = (params) => { return new ZodAny2({ typeName: ZodFirstPartyTypeKind2.ZodAny, - ...processCreateParams3(params) + ...processCreateParams2(params) }); }; - ZodUnknown2 = class extends ZodType2 { + ZodUnknown3 = class extends ZodType3 { constructor() { super(...arguments); this._unknown = true; @@ -29194,13 +29159,13 @@ var init_types = __esm({ return OK2(input.data); } }; - ZodUnknown2.create = (params) => { - return new ZodUnknown2({ + ZodUnknown3.create = (params) => { + return new ZodUnknown3({ typeName: ZodFirstPartyTypeKind2.ZodUnknown, - ...processCreateParams3(params) + ...processCreateParams2(params) }); }; - ZodNever2 = class extends ZodType2 { + ZodNever3 = class extends ZodType3 { _parse(input) { const ctx = this._getOrReturnCtx(input); addIssueToContext2(ctx, { @@ -29211,16 +29176,16 @@ var init_types = __esm({ return INVALID2; } }; - ZodNever2.create = (params) => { - return new ZodNever2({ + ZodNever3.create = (params) => { + return new ZodNever3({ typeName: ZodFirstPartyTypeKind2.ZodNever, - ...processCreateParams3(params) + ...processCreateParams2(params) }); }; - ZodVoid2 = class extends ZodType2 { + ZodVoid2 = class extends ZodType3 { _parse(input) { - const parsedType4 = this._getType(input); - if (parsedType4 !== ZodParsedType2.undefined) { + const parsedType3 = this._getType(input); + if (parsedType3 !== ZodParsedType2.undefined) { const ctx = this._getOrReturnCtx(input); addIssueToContext2(ctx, { code: ZodIssueCode2.invalid_type, @@ -29235,10 +29200,10 @@ var init_types = __esm({ ZodVoid2.create = (params) => { return new ZodVoid2({ typeName: ZodFirstPartyTypeKind2.ZodVoid, - ...processCreateParams3(params) + ...processCreateParams2(params) }); }; - ZodArray2 = class _ZodArray extends ZodType2 { + ZodArray3 = class _ZodArray extends ZodType3 { _parse(input) { const { ctx, status } = this._processInputParams(input); const def = this._def; @@ -29329,17 +29294,17 @@ var init_types = __esm({ return this.min(1, message); } }; - ZodArray2.create = (schema2, params) => { - return new ZodArray2({ + ZodArray3.create = (schema2, params) => { + return new ZodArray3({ type: schema2, minLength: null, maxLength: null, exactLength: null, typeName: ZodFirstPartyTypeKind2.ZodArray, - ...processCreateParams3(params) + ...processCreateParams2(params) }); }; - ZodObject2 = class _ZodObject extends ZodType2 { + ZodObject3 = class _ZodObject extends ZodType3 { constructor() { super(...arguments); this._cached = null; @@ -29355,8 +29320,8 @@ var init_types = __esm({ return this._cached; } _parse(input) { - const parsedType4 = this._getType(input); - if (parsedType4 !== ZodParsedType2.object) { + const parsedType3 = this._getType(input); + if (parsedType3 !== ZodParsedType2.object) { const ctx2 = this._getOrReturnCtx(input); addIssueToContext2(ctx2, { code: ZodIssueCode2.invalid_type, @@ -29368,7 +29333,7 @@ var init_types = __esm({ const { status, ctx } = this._processInputParams(input); const { shape, keys: shapeKeys } = this._getCached(); const extraKeys = []; - if (!(this._def.catchall instanceof ZodNever2 && this._def.unknownKeys === "strip")) { + if (!(this._def.catchall instanceof ZodNever3 && this._def.unknownKeys === "strip")) { for (const key in ctx.data) { if (!shapeKeys.includes(key)) { extraKeys.push(key); @@ -29385,7 +29350,7 @@ var init_types = __esm({ alwaysSet: key in ctx.data }); } - if (this._def.catchall instanceof ZodNever2) { + if (this._def.catchall instanceof ZodNever3) { const unknownKeys = this._def.unknownKeys; if (unknownKeys === "passthrough") { for (const key of extraKeys) { @@ -29449,9 +29414,9 @@ var init_types = __esm({ ...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: (issue4, ctx) => { + const defaultError = this._def.errorMap?.(issue4, ctx).message ?? ctx.defaultError; + if (issue4.code === "unrecognized_keys") return { message: errorUtil2.errToObj(message).message ?? defaultError }; @@ -29635,7 +29600,7 @@ var init_types = __esm({ } else { const fieldSchema = this.shape[key]; let newField = fieldSchema; - while (newField instanceof ZodOptional2) { + while (newField instanceof ZodOptional3) { newField = newField._def.innerType; } newShape[key] = newField; @@ -29650,34 +29615,34 @@ var init_types = __esm({ return createZodEnum2(util2.objectKeys(this.shape)); } }; - ZodObject2.create = (shape, params) => { - return new ZodObject2({ + ZodObject3.create = (shape, params) => { + return new ZodObject3({ shape: () => shape, unknownKeys: "strip", - catchall: ZodNever2.create(), + catchall: ZodNever3.create(), typeName: ZodFirstPartyTypeKind2.ZodObject, - ...processCreateParams3(params) + ...processCreateParams2(params) }); }; - ZodObject2.strictCreate = (shape, params) => { - return new ZodObject2({ + ZodObject3.strictCreate = (shape, params) => { + return new ZodObject3({ shape: () => shape, unknownKeys: "strict", - catchall: ZodNever2.create(), + catchall: ZodNever3.create(), typeName: ZodFirstPartyTypeKind2.ZodObject, - ...processCreateParams3(params) + ...processCreateParams2(params) }); }; - ZodObject2.lazycreate = (shape, params) => { - return new ZodObject2({ + ZodObject3.lazycreate = (shape, params) => { + return new ZodObject3({ shape, unknownKeys: "strip", - catchall: ZodNever2.create(), + catchall: ZodNever3.create(), typeName: ZodFirstPartyTypeKind2.ZodObject, - ...processCreateParams3(params) + ...processCreateParams2(params) }); }; - ZodUnion2 = class extends ZodType2 { + ZodUnion3 = class extends ZodType3 { _parse(input) { const { ctx } = this._processInputParams(input); const options = this._def.options; @@ -29693,7 +29658,7 @@ var init_types = __esm({ return result.result; } } - const unionErrors = results.map((result) => new ZodError2(result.ctx.common.issues)); + const unionErrors = results.map((result) => new ZodError3(result.ctx.common.issues)); addIssueToContext2(ctx, { code: ZodIssueCode2.invalid_union, unionErrors @@ -29749,7 +29714,7 @@ var init_types = __esm({ ctx.common.issues.push(...dirty.ctx.common.issues); return dirty.result; } - const unionErrors = issues.map((issues2) => new ZodError2(issues2)); + const unionErrors = issues.map((issues2) => new ZodError3(issues2)); addIssueToContext2(ctx, { code: ZodIssueCode2.invalid_union, unionErrors @@ -29761,11 +29726,11 @@ var init_types = __esm({ return this._def.options; } }; - ZodUnion2.create = (types, params) => { - return new ZodUnion2({ + ZodUnion3.create = (types, params) => { + return new ZodUnion3({ options: types, typeName: ZodFirstPartyTypeKind2.ZodUnion, - ...processCreateParams3(params) + ...processCreateParams2(params) }); }; getDiscriminator2 = (type2) => { @@ -29773,33 +29738,33 @@ var init_types = __esm({ return getDiscriminator2(type2.schema); } else if (type2 instanceof ZodEffects2) { return getDiscriminator2(type2.innerType()); - } else if (type2 instanceof ZodLiteral2) { + } else if (type2 instanceof ZodLiteral3) { return [type2.value]; - } else if (type2 instanceof ZodEnum2) { + } else if (type2 instanceof ZodEnum3) { return type2.options; } else if (type2 instanceof ZodNativeEnum2) { return util2.objectValues(type2.enum); - } else if (type2 instanceof ZodDefault2) { + } else if (type2 instanceof ZodDefault3) { return getDiscriminator2(type2._def.innerType); } else if (type2 instanceof ZodUndefined2) { return [void 0]; - } else if (type2 instanceof ZodNull2) { + } else if (type2 instanceof ZodNull3) { return [null]; - } else if (type2 instanceof ZodOptional2) { + } else if (type2 instanceof ZodOptional3) { return [void 0, ...getDiscriminator2(type2.unwrap())]; - } else if (type2 instanceof ZodNullable2) { + } else if (type2 instanceof ZodNullable3) { return [null, ...getDiscriminator2(type2.unwrap())]; } else if (type2 instanceof ZodBranded2) { return getDiscriminator2(type2.unwrap()); - } else if (type2 instanceof ZodReadonly2) { + } else if (type2 instanceof ZodReadonly3) { return getDiscriminator2(type2.unwrap()); - } else if (type2 instanceof ZodCatch2) { + } else if (type2 instanceof ZodCatch3) { return getDiscriminator2(type2._def.innerType); } else { return []; } }; - ZodDiscriminatedUnion2 = class _ZodDiscriminatedUnion extends ZodType2 { + ZodDiscriminatedUnion3 = class _ZodDiscriminatedUnion extends ZodType3 { _parse(input) { const { ctx } = this._processInputParams(input); if (ctx.parsedType !== ZodParsedType2.object) { @@ -29871,18 +29836,18 @@ var init_types = __esm({ discriminator, options, optionsMap, - ...processCreateParams3(params) + ...processCreateParams2(params) }); } }; - ZodIntersection2 = class extends ZodType2 { + ZodIntersection3 = class extends ZodType3 { _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); + const merged = mergeValues3(parsedLeft.value, parsedRight.value); if (!merged.valid) { addIssueToContext2(ctx, { code: ZodIssueCode2.invalid_intersection_types @@ -29920,15 +29885,15 @@ var init_types = __esm({ } } }; - ZodIntersection2.create = (left, right, params) => { - return new ZodIntersection2({ + ZodIntersection3.create = (left, right, params) => { + return new ZodIntersection3({ left, right, typeName: ZodFirstPartyTypeKind2.ZodIntersection, - ...processCreateParams3(params) + ...processCreateParams2(params) }); }; - ZodTuple2 = class _ZodTuple extends ZodType2 { + ZodTuple2 = class _ZodTuple extends ZodType3 { _parse(input) { const { status, ctx } = this._processInputParams(input); if (ctx.parsedType !== ZodParsedType2.array) { @@ -29992,10 +29957,10 @@ var init_types = __esm({ items: schemas, typeName: ZodFirstPartyTypeKind2.ZodTuple, rest: null, - ...processCreateParams3(params) + ...processCreateParams2(params) }); }; - ZodRecord2 = class _ZodRecord extends ZodType2 { + ZodRecord3 = class _ZodRecord extends ZodType3 { get keySchema() { return this._def.keyType; } @@ -30032,23 +29997,23 @@ var init_types = __esm({ return this._def.valueType; } static create(first, second, third) { - if (second instanceof ZodType2) { + if (second instanceof ZodType3) { return new _ZodRecord({ keyType: first, valueType: second, typeName: ZodFirstPartyTypeKind2.ZodRecord, - ...processCreateParams3(third) + ...processCreateParams2(third) }); } return new _ZodRecord({ - keyType: ZodString2.create(), + keyType: ZodString3.create(), valueType: first, typeName: ZodFirstPartyTypeKind2.ZodRecord, - ...processCreateParams3(second) + ...processCreateParams2(second) }); } }; - ZodMap2 = class extends ZodType2 { + ZodMap2 = class extends ZodType3 { get keySchema() { return this._def.keyType; } @@ -30111,10 +30076,10 @@ var init_types = __esm({ valueType, keyType, typeName: ZodFirstPartyTypeKind2.ZodMap, - ...processCreateParams3(params) + ...processCreateParams2(params) }); }; - ZodSet2 = class _ZodSet extends ZodType2 { + ZodSet2 = class _ZodSet extends ZodType3 { _parse(input) { const { status, ctx } = this._processInputParams(input); if (ctx.parsedType !== ZodParsedType2.set) { @@ -30196,10 +30161,10 @@ var init_types = __esm({ minSize: null, maxSize: null, typeName: ZodFirstPartyTypeKind2.ZodSet, - ...processCreateParams3(params) + ...processCreateParams2(params) }); }; - ZodFunction2 = class _ZodFunction extends ZodType2 { + ZodFunction2 = class _ZodFunction extends ZodType3 { constructor() { super(...arguments); this.validate = this.implement; @@ -30214,25 +30179,25 @@ var init_types = __esm({ }); return INVALID2; } - function makeArgsIssue(args3, error41) { + function makeArgsIssue(args3, error50) { return makeIssue2({ data: args3, path: ctx.path, - errorMaps: [ctx.common.contextualErrorMap, ctx.schemaErrorMap, getErrorMap2(), en_default2].filter((x) => !!x), + errorMaps: [ctx.common.contextualErrorMap, ctx.schemaErrorMap, getErrorMap2(), en_default3].filter((x) => !!x), issueData: { code: ZodIssueCode2.invalid_arguments, - argumentsError: error41 + argumentsError: error50 } }); } - function makeReturnsIssue(returns, error41) { + function makeReturnsIssue(returns, error50) { return makeIssue2({ data: returns, path: ctx.path, - errorMaps: [ctx.common.contextualErrorMap, ctx.schemaErrorMap, getErrorMap2(), en_default2].filter((x) => !!x), + errorMaps: [ctx.common.contextualErrorMap, ctx.schemaErrorMap, getErrorMap2(), en_default3].filter((x) => !!x), issueData: { code: ZodIssueCode2.invalid_return_type, - returnTypeError: error41 + returnTypeError: error50 } }); } @@ -30241,15 +30206,15 @@ var init_types = __esm({ if (this._def.returns instanceof ZodPromise2) { const me = this; return OK2(async function(...args3) { - const error41 = new ZodError2([]); + const error50 = new ZodError3([]); const parsedArgs = await me._def.args.parseAsync(args3, params).catch((e) => { - error41.addIssue(makeArgsIssue(args3, e)); - throw error41; + error50.addIssue(makeArgsIssue(args3, e)); + throw error50; }); 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; + error50.addIssue(makeReturnsIssue(result, e)); + throw error50; }); return parsedReturns; }); @@ -30258,12 +30223,12 @@ var init_types = __esm({ return OK2(function(...args3) { const parsedArgs = me._def.args.safeParse(args3, params); if (!parsedArgs.success) { - throw new ZodError2([makeArgsIssue(args3, parsedArgs.error)]); + throw new ZodError3([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)]); + throw new ZodError3([makeReturnsIssue(result, parsedReturns.error)]); } return parsedReturns.data; }); @@ -30278,7 +30243,7 @@ var init_types = __esm({ args(...items) { return new _ZodFunction({ ...this._def, - args: ZodTuple2.create(items).rest(ZodUnknown2.create()) + args: ZodTuple2.create(items).rest(ZodUnknown3.create()) }); } returns(returnType) { @@ -30297,14 +30262,14 @@ var init_types = __esm({ } static create(args3, returns, params) { return new _ZodFunction({ - args: args3 ? args3 : ZodTuple2.create([]).rest(ZodUnknown2.create()), - returns: returns || ZodUnknown2.create(), + args: args3 ? args3 : ZodTuple2.create([]).rest(ZodUnknown3.create()), + returns: returns || ZodUnknown3.create(), typeName: ZodFirstPartyTypeKind2.ZodFunction, - ...processCreateParams3(params) + ...processCreateParams2(params) }); } }; - ZodLazy2 = class extends ZodType2 { + ZodLazy2 = class extends ZodType3 { get schema() { return this._def.getter(); } @@ -30318,10 +30283,10 @@ var init_types = __esm({ return new ZodLazy2({ getter, typeName: ZodFirstPartyTypeKind2.ZodLazy, - ...processCreateParams3(params) + ...processCreateParams2(params) }); }; - ZodLiteral2 = class extends ZodType2 { + ZodLiteral3 = class extends ZodType3 { _parse(input) { if (input.data !== this._def.value) { const ctx = this._getOrReturnCtx(input); @@ -30338,14 +30303,14 @@ var init_types = __esm({ return this._def.value; } }; - ZodLiteral2.create = (value2, params) => { - return new ZodLiteral2({ + ZodLiteral3.create = (value2, params) => { + return new ZodLiteral3({ value: value2, typeName: ZodFirstPartyTypeKind2.ZodLiteral, - ...processCreateParams3(params) + ...processCreateParams2(params) }); }; - ZodEnum2 = class _ZodEnum extends ZodType2 { + ZodEnum3 = class _ZodEnum extends ZodType3 { _parse(input) { if (typeof input.data !== "string") { const ctx = this._getOrReturnCtx(input); @@ -30409,8 +30374,8 @@ var init_types = __esm({ }); } }; - ZodEnum2.create = createZodEnum2; - ZodNativeEnum2 = class extends ZodType2 { + ZodEnum3.create = createZodEnum2; + ZodNativeEnum2 = class extends ZodType3 { _parse(input) { const nativeEnumValues = util2.getValidEnumValues(this._def.values); const ctx = this._getOrReturnCtx(input); @@ -30445,10 +30410,10 @@ var init_types = __esm({ return new ZodNativeEnum2({ values, typeName: ZodFirstPartyTypeKind2.ZodNativeEnum, - ...processCreateParams3(params) + ...processCreateParams2(params) }); }; - ZodPromise2 = class extends ZodType2 { + ZodPromise2 = class extends ZodType3 { unwrap() { return this._def.type; } @@ -30475,10 +30440,10 @@ var init_types = __esm({ return new ZodPromise2({ type: schema2, typeName: ZodFirstPartyTypeKind2.ZodPromise, - ...processCreateParams3(params) + ...processCreateParams2(params) }); }; - ZodEffects2 = class extends ZodType2 { + ZodEffects2 = class extends ZodType3 { innerType() { return this._def.schema; } @@ -30606,21 +30571,21 @@ var init_types = __esm({ schema: schema2, typeName: ZodFirstPartyTypeKind2.ZodEffects, effect, - ...processCreateParams3(params) + ...processCreateParams2(params) }); }; - ZodEffects2.createWithPreprocess = (preprocess, schema2, params) => { + ZodEffects2.createWithPreprocess = (preprocess4, schema2, params) => { return new ZodEffects2({ schema: schema2, - effect: { type: "preprocess", transform: preprocess }, + effect: { type: "preprocess", transform: preprocess4 }, typeName: ZodFirstPartyTypeKind2.ZodEffects, - ...processCreateParams3(params) + ...processCreateParams2(params) }); }; - ZodOptional2 = class extends ZodType2 { + ZodOptional3 = class extends ZodType3 { _parse(input) { - const parsedType4 = this._getType(input); - if (parsedType4 === ZodParsedType2.undefined) { + const parsedType3 = this._getType(input); + if (parsedType3 === ZodParsedType2.undefined) { return OK2(void 0); } return this._def.innerType._parse(input); @@ -30629,17 +30594,17 @@ var init_types = __esm({ return this._def.innerType; } }; - ZodOptional2.create = (type2, params) => { - return new ZodOptional2({ + ZodOptional3.create = (type2, params) => { + return new ZodOptional3({ innerType: type2, typeName: ZodFirstPartyTypeKind2.ZodOptional, - ...processCreateParams3(params) + ...processCreateParams2(params) }); }; - ZodNullable2 = class extends ZodType2 { + ZodNullable3 = class extends ZodType3 { _parse(input) { - const parsedType4 = this._getType(input); - if (parsedType4 === ZodParsedType2.null) { + const parsedType3 = this._getType(input); + if (parsedType3 === ZodParsedType2.null) { return OK2(null); } return this._def.innerType._parse(input); @@ -30648,14 +30613,14 @@ var init_types = __esm({ return this._def.innerType; } }; - ZodNullable2.create = (type2, params) => { - return new ZodNullable2({ + ZodNullable3.create = (type2, params) => { + return new ZodNullable3({ innerType: type2, typeName: ZodFirstPartyTypeKind2.ZodNullable, - ...processCreateParams3(params) + ...processCreateParams2(params) }); }; - ZodDefault2 = class extends ZodType2 { + ZodDefault3 = class extends ZodType3 { _parse(input) { const { ctx } = this._processInputParams(input); let data = ctx.data; @@ -30672,15 +30637,15 @@ var init_types = __esm({ return this._def.innerType; } }; - ZodDefault2.create = (type2, params) => { - return new ZodDefault2({ + ZodDefault3.create = (type2, params) => { + return new ZodDefault3({ innerType: type2, typeName: ZodFirstPartyTypeKind2.ZodDefault, defaultValue: typeof params.default === "function" ? params.default : () => params.default, - ...processCreateParams3(params) + ...processCreateParams2(params) }); }; - ZodCatch2 = class extends ZodType2 { + ZodCatch3 = class extends ZodType3 { _parse(input) { const { ctx } = this._processInputParams(input); const newCtx = { @@ -30703,7 +30668,7 @@ var init_types = __esm({ status: "valid", value: result2.status === "valid" ? result2.value : this._def.catchValue({ get error() { - return new ZodError2(newCtx.common.issues); + return new ZodError3(newCtx.common.issues); }, input: newCtx.data }) @@ -30714,7 +30679,7 @@ var init_types = __esm({ status: "valid", value: result.status === "valid" ? result.value : this._def.catchValue({ get error() { - return new ZodError2(newCtx.common.issues); + return new ZodError3(newCtx.common.issues); }, input: newCtx.data }) @@ -30725,18 +30690,18 @@ var init_types = __esm({ return this._def.innerType; } }; - ZodCatch2.create = (type2, params) => { - return new ZodCatch2({ + ZodCatch3.create = (type2, params) => { + return new ZodCatch3({ innerType: type2, typeName: ZodFirstPartyTypeKind2.ZodCatch, catchValue: typeof params.catch === "function" ? params.catch : () => params.catch, - ...processCreateParams3(params) + ...processCreateParams2(params) }); }; - ZodNaN2 = class extends ZodType2 { + ZodNaN2 = class extends ZodType3 { _parse(input) { - const parsedType4 = this._getType(input); - if (parsedType4 !== ZodParsedType2.nan) { + const parsedType3 = this._getType(input); + if (parsedType3 !== ZodParsedType2.nan) { const ctx = this._getOrReturnCtx(input); addIssueToContext2(ctx, { code: ZodIssueCode2.invalid_type, @@ -30751,11 +30716,11 @@ var init_types = __esm({ ZodNaN2.create = (params) => { return new ZodNaN2({ typeName: ZodFirstPartyTypeKind2.ZodNaN, - ...processCreateParams3(params) + ...processCreateParams2(params) }); }; BRAND2 = Symbol("zod_brand"); - ZodBranded2 = class extends ZodType2 { + ZodBranded2 = class extends ZodType3 { _parse(input) { const { ctx } = this._processInputParams(input); const data = ctx.data; @@ -30769,7 +30734,7 @@ var init_types = __esm({ return this._def.type; } }; - ZodPipeline2 = class _ZodPipeline extends ZodType2 { + ZodPipeline2 = class _ZodPipeline extends ZodType3 { _parse(input) { const { status, ctx } = this._processInputParams(input); if (ctx.common.async) { @@ -30824,7 +30789,7 @@ var init_types = __esm({ }); } }; - ZodReadonly2 = class extends ZodType2 { + ZodReadonly3 = class extends ZodType3 { _parse(input) { const result = this._def.innerType._parse(input); const freeze = (data) => { @@ -30839,15 +30804,15 @@ var init_types = __esm({ return this._def.innerType; } }; - ZodReadonly2.create = (type2, params) => { - return new ZodReadonly2({ + ZodReadonly3.create = (type2, params) => { + return new ZodReadonly3({ innerType: type2, typeName: ZodFirstPartyTypeKind2.ZodReadonly, - ...processCreateParams3(params) + ...processCreateParams2(params) }); }; late2 = { - object: ZodObject2.lazycreate + object: ZodObject3.lazycreate }; (function(ZodFirstPartyTypeKind4) { ZodFirstPartyTypeKind4["ZodString"] = "ZodString"; @@ -30887,173 +30852,46 @@ var init_types = __esm({ 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; + stringType2 = ZodString3.create; + numberType2 = ZodNumber3.create; nanType2 = ZodNaN2.create; bigIntType2 = ZodBigInt2.create; - booleanType2 = ZodBoolean2.create; + booleanType2 = ZodBoolean3.create; dateType2 = ZodDate2.create; symbolType2 = ZodSymbol2.create; undefinedType2 = ZodUndefined2.create; - nullType2 = ZodNull2.create; + nullType2 = ZodNull3.create; anyType2 = ZodAny2.create; - unknownType2 = ZodUnknown2.create; - neverType2 = ZodNever2.create; + unknownType2 = ZodUnknown3.create; + neverType2 = ZodNever3.create; voidType2 = ZodVoid2.create; - arrayType2 = ZodArray2.create; - objectType2 = ZodObject2.create; - strictObjectType2 = ZodObject2.strictCreate; - unionType2 = ZodUnion2.create; - discriminatedUnionType2 = ZodDiscriminatedUnion2.create; - intersectionType2 = ZodIntersection2.create; + arrayType2 = ZodArray3.create; + objectType2 = ZodObject3.create; + strictObjectType2 = ZodObject3.strictCreate; + unionType2 = ZodUnion3.create; + discriminatedUnionType2 = ZodDiscriminatedUnion3.create; + intersectionType2 = ZodIntersection3.create; tupleType2 = ZodTuple2.create; - recordType2 = ZodRecord2.create; + recordType2 = ZodRecord3.create; mapType2 = ZodMap2.create; setType2 = ZodSet2.create; functionType2 = ZodFunction2.create; lazyType2 = ZodLazy2.create; - literalType2 = ZodLiteral2.create; - enumType2 = ZodEnum2.create; + literalType2 = ZodLiteral3.create; + enumType2 = ZodEnum3.create; nativeEnumType2 = ZodNativeEnum2.create; promiseType2 = ZodPromise2.create; effectsType2 = ZodEffects2.create; - optionalType2 = ZodOptional2.create; - nullableType2 = ZodNullable2.create; + optionalType2 = ZodOptional3.create; + nullableType2 = ZodNullable3.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 -}); +// ../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v3/external.js var init_external = __esm({ - "node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/external.js"() { + "../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v3/external.js"() { init_errors(); init_parseUtil(); init_typeAliases(); @@ -31063,1249 +30901,15744 @@ var init_external = __esm({ } }); -// 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"() { +// ../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v3/index.js +var init_v3 = __esm({ + "../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v3/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) { - (function(global2, factory) { - typeof exports === "object" && typeof module !== "undefined" ? factory(exports) : typeof define === "function" && define.amd ? define(["exports"], factory) : factory(global2.URI = global2.URI || {}); - })(exports, (function(exports2) { - "use strict"; - function merge3() { - for (var _len = arguments.length, sets = Array(_len), _key = 0; _key < _len; _key++) { - sets[_key] = arguments[_key]; +// ../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/core/core.js +// @__NO_SIDE_EFFECTS__ +function $constructor2(name, initializer6, params) { + function init(inst, def) { + if (!inst._zod) { + Object.defineProperty(inst, "_zod", { + value: { + def, + constr: _, + traits: /* @__PURE__ */ new Set() + }, + enumerable: false + }); + } + if (inst._zod.traits.has(name)) { + return; + } + inst._zod.traits.add(name); + initializer6(inst, def); + const proto = _.prototype; + const keys = Object.keys(proto); + for (let i = 0; i < keys.length; i++) { + const k = keys[i]; + if (!(k in inst)) { + inst[k] = proto[k].bind(inst); + } + } + } + const Parent = params?.Parent ?? Object; + class Definition extends Parent { + } + Object.defineProperty(Definition, "name", { value: name }); + function _(def) { + var _a2; + const inst = params?.Parent ? new Definition() : this; + init(inst, def); + (_a2 = inst._zod).deferred ?? (_a2.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 NEVER2, $brand2, $ZodAsyncError2, $ZodEncodeError, globalConfig2; +var init_core = __esm({ + "../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/core/core.js"() { + NEVER2 = Object.freeze({ + status: "aborted" + }); + $brand2 = Symbol("zod_brand"); + $ZodAsyncError2 = class extends Error { + constructor() { + super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`); + } + }; + $ZodEncodeError = class extends Error { + constructor(name) { + super(`Encountered unidirectional transform during encode: ${name}`); + this.name = "ZodEncodeError"; + } + }; + globalConfig2 = {}; + } +}); + +// ../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/core/util.js +var util_exports = {}; +__export(util_exports, { + BIGINT_FORMAT_RANGES: () => BIGINT_FORMAT_RANGES2, + Class: () => Class2, + NUMBER_FORMAT_RANGES: () => NUMBER_FORMAT_RANGES2, + aborted: () => aborted2, + allowsEval: () => allowsEval2, + assert: () => assert3, + assertEqual: () => assertEqual2, + assertIs: () => assertIs2, + assertNever: () => assertNever2, + assertNotEqual: () => assertNotEqual2, + assignProp: () => assignProp2, + base64ToUint8Array: () => base64ToUint8Array, + base64urlToUint8Array: () => base64urlToUint8Array, + cached: () => cached4, + captureStackTrace: () => captureStackTrace2, + cleanEnum: () => cleanEnum2, + cleanRegex: () => cleanRegex2, + clone: () => clone2, + cloneDef: () => cloneDef, + createTransparentProxy: () => createTransparentProxy2, + defineLazy: () => defineLazy2, + esc: () => esc2, + escapeRegex: () => escapeRegex2, + extend: () => extend2, + finalizeIssue: () => finalizeIssue2, + floatSafeRemainder: () => floatSafeRemainder4, + getElementAtPath: () => getElementAtPath2, + getEnumValues: () => getEnumValues2, + getLengthableOrigin: () => getLengthableOrigin2, + getParsedType: () => getParsedType4, + getSizableOrigin: () => getSizableOrigin2, + hexToUint8Array: () => hexToUint8Array, + isObject: () => isObject3, + isPlainObject: () => isPlainObject5, + issue: () => issue2, + joinValues: () => joinValues2, + jsonStringifyReplacer: () => jsonStringifyReplacer2, + merge: () => merge3, + mergeDefs: () => mergeDefs, + normalizeParams: () => normalizeParams2, + nullish: () => nullish2, + numKeys: () => numKeys2, + objectClone: () => objectClone, + omit: () => omit4, + optionalKeys: () => optionalKeys2, + parsedType: () => parsedType2, + partial: () => partial2, + pick: () => pick2, + prefixIssues: () => prefixIssues2, + primitiveTypes: () => primitiveTypes2, + promiseAllObject: () => promiseAllObject2, + propertyKeyTypes: () => propertyKeyTypes2, + randomString: () => randomString2, + required: () => required2, + safeExtend: () => safeExtend, + shallowClone: () => shallowClone, + slugify: () => slugify, + stringifyPrimitive: () => stringifyPrimitive2, + uint8ArrayToBase64: () => uint8ArrayToBase64, + uint8ArrayToBase64url: () => uint8ArrayToBase64url, + uint8ArrayToHex: () => uint8ArrayToHex, + unwrapMessage: () => unwrapMessage2 +}); +function assertEqual2(val) { + return val; +} +function assertNotEqual2(val) { + return val; +} +function assertIs2(_arg) { +} +function assertNever2(_x) { + throw new Error("Unexpected value in exhaustive check"); +} +function assert3(_) { +} +function getEnumValues2(entries) { + const numericValues = Object.values(entries).filter((v) => typeof v === "number"); + const values = Object.entries(entries).filter(([k, _]) => numericValues.indexOf(+k) === -1).map(([_, v]) => v); + return values; +} +function joinValues2(array4, separator2 = "|") { + return array4.map((val) => stringifyPrimitive2(val)).join(separator2); +} +function jsonStringifyReplacer2(_, value2) { + if (typeof value2 === "bigint") + return value2.toString(); + return value2; +} +function cached4(getter) { + const set2 = false; + return { + get value() { + if (!set2) { + const value2 = getter(); + Object.defineProperty(this, "value", { value: value2 }); + return value2; + } + throw new Error("cached value already set"); + } + }; +} +function nullish2(input) { + return input === null || input === void 0; +} +function cleanRegex2(source) { + const start = source.startsWith("^") ? 1 : 0; + const end = source.endsWith("$") ? source.length - 1 : source.length; + return source.slice(start, end); +} +function floatSafeRemainder4(val, step) { + const valDecCount = (val.toString().split(".")[1] || "").length; + const stepString = step.toString(); + let stepDecCount = (stepString.split(".")[1] || "").length; + if (stepDecCount === 0 && /\d?e-\d?/.test(stepString)) { + const match2 = stepString.match(/\d?e-(\d?)/); + if (match2?.[1]) { + stepDecCount = Number.parseInt(match2[1]); + } + } + 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 defineLazy2(object6, key, getter) { + let value2 = void 0; + Object.defineProperty(object6, key, { + get() { + if (value2 === EVALUATING) { + return void 0; + } + if (value2 === void 0) { + value2 = EVALUATING; + value2 = getter(); + } + return value2; + }, + set(v) { + Object.defineProperty(object6, key, { + value: v + // configurable: true, + }); + }, + configurable: true + }); +} +function objectClone(obj) { + return Object.create(Object.getPrototypeOf(obj), Object.getOwnPropertyDescriptors(obj)); +} +function assignProp2(target, prop, value2) { + Object.defineProperty(target, prop, { + value: value2, + writable: true, + enumerable: true, + configurable: true + }); +} +function mergeDefs(...defs) { + const mergedDescriptors = {}; + for (const def of defs) { + const descriptors = Object.getOwnPropertyDescriptors(def); + Object.assign(mergedDescriptors, descriptors); + } + return Object.defineProperties({}, mergedDescriptors); +} +function cloneDef(schema2) { + return mergeDefs(schema2._zod.def); +} +function getElementAtPath2(obj, path4) { + if (!path4) + return obj; + return path4.reduce((acc, key) => acc?.[key], obj); +} +function promiseAllObject2(promisesObj) { + const keys = Object.keys(promisesObj); + const promises = keys.map((key) => promisesObj[key]); + return Promise.all(promises).then((results) => { + const resolvedObj = {}; + for (let i = 0; i < keys.length; i++) { + resolvedObj[keys[i]] = results[i]; + } + return resolvedObj; + }); +} +function randomString2(length = 10) { + const chars = "abcdefghijklmnopqrstuvwxyz"; + let str = ""; + for (let i = 0; i < length; i++) { + str += chars[Math.floor(Math.random() * chars.length)]; + } + return str; +} +function esc2(str) { + return JSON.stringify(str); +} +function slugify(input) { + return input.toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/[\s_-]+/g, "-").replace(/^-+|-+$/g, ""); +} +function isObject3(data) { + return typeof data === "object" && data !== null && !Array.isArray(data); +} +function isPlainObject5(o) { + if (isObject3(o) === false) + return false; + const ctor = o.constructor; + if (ctor === void 0) + return true; + if (typeof ctor !== "function") + return true; + const prot = ctor.prototype; + if (isObject3(prot) === false) + return false; + if (Object.prototype.hasOwnProperty.call(prot, "isPrototypeOf") === false) { + return false; + } + return true; +} +function shallowClone(o) { + if (isPlainObject5(o)) + return { ...o }; + if (Array.isArray(o)) + return [...o]; + return o; +} +function numKeys2(data) { + let keyCount = 0; + for (const key in data) { + if (Object.prototype.hasOwnProperty.call(data, key)) { + keyCount++; + } + } + return keyCount; +} +function escapeRegex2(str) { + return str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"); +} +function clone2(inst, def, params) { + const cl = new inst._zod.constr(def ?? inst._zod.def); + if (!def || params?.parent) + cl._zod.parent = inst; + return cl; +} +function normalizeParams2(_params) { + const params = _params; + if (!params) + return {}; + if (typeof params === "string") + return { error: () => params }; + if (params?.message !== void 0) { + if (params?.error !== void 0) + throw new Error("Cannot specify both `message` and `error` params"); + params.error = params.message; + } + delete params.message; + if (typeof params.error === "string") + return { ...params, error: () => params.error }; + return params; +} +function createTransparentProxy2(getter) { + let target; + return new Proxy({}, { + get(_, prop, receiver) { + target ?? (target = getter()); + return Reflect.get(target, prop, receiver); + }, + set(_, prop, value2, receiver) { + target ?? (target = getter()); + return Reflect.set(target, prop, value2, receiver); + }, + has(_, prop) { + target ?? (target = getter()); + return Reflect.has(target, prop); + }, + deleteProperty(_, prop) { + target ?? (target = getter()); + return Reflect.deleteProperty(target, prop); + }, + ownKeys(_) { + target ?? (target = getter()); + return Reflect.ownKeys(target); + }, + getOwnPropertyDescriptor(_, prop) { + target ?? (target = getter()); + return Reflect.getOwnPropertyDescriptor(target, prop); + }, + defineProperty(_, prop, descriptor) { + target ?? (target = getter()); + return Reflect.defineProperty(target, prop, descriptor); + } + }); +} +function stringifyPrimitive2(value2) { + if (typeof value2 === "bigint") + return value2.toString() + "n"; + if (typeof value2 === "string") + return `"${value2}"`; + return `${value2}`; +} +function optionalKeys2(shape) { + return Object.keys(shape).filter((k) => { + return shape[k]._zod.optin === "optional" && shape[k]._zod.optout === "optional"; + }); +} +function pick2(schema2, mask) { + const currDef = schema2._zod.def; + const checks = currDef.checks; + const hasChecks = checks && checks.length > 0; + if (hasChecks) { + throw new Error(".pick() cannot be used on object schemas containing refinements"); + } + const def = mergeDefs(schema2._zod.def, { + get shape() { + const newShape = {}; + for (const key in mask) { + if (!(key in currDef.shape)) { + throw new Error(`Unrecognized key: "${key}"`); } - if (sets.length > 1) { - sets[0] = sets[0].slice(0, -1); - var xl = sets.length - 1; - for (var x = 1; x < xl; ++x) { - sets[x] = sets[x].slice(1, -1); + if (!mask[key]) + continue; + newShape[key] = currDef.shape[key]; + } + assignProp2(this, "shape", newShape); + return newShape; + }, + checks: [] + }); + return clone2(schema2, def); +} +function omit4(schema2, mask) { + const currDef = schema2._zod.def; + const checks = currDef.checks; + const hasChecks = checks && checks.length > 0; + if (hasChecks) { + throw new Error(".omit() cannot be used on object schemas containing refinements"); + } + const def = mergeDefs(schema2._zod.def, { + get shape() { + const newShape = { ...schema2._zod.def.shape }; + for (const key in mask) { + if (!(key in currDef.shape)) { + throw new Error(`Unrecognized key: "${key}"`); + } + if (!mask[key]) + continue; + delete newShape[key]; + } + assignProp2(this, "shape", newShape); + return newShape; + }, + checks: [] + }); + return clone2(schema2, def); +} +function extend2(schema2, shape) { + if (!isPlainObject5(shape)) { + throw new Error("Invalid input to extend: expected a plain object"); + } + const checks = schema2._zod.def.checks; + const hasChecks = checks && checks.length > 0; + if (hasChecks) { + const existingShape = schema2._zod.def.shape; + for (const key in shape) { + if (Object.getOwnPropertyDescriptor(existingShape, key) !== void 0) { + throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead."); + } + } + } + const def = mergeDefs(schema2._zod.def, { + get shape() { + const _shape = { ...schema2._zod.def.shape, ...shape }; + assignProp2(this, "shape", _shape); + return _shape; + } + }); + return clone2(schema2, def); +} +function safeExtend(schema2, shape) { + if (!isPlainObject5(shape)) { + throw new Error("Invalid input to safeExtend: expected a plain object"); + } + const def = mergeDefs(schema2._zod.def, { + get shape() { + const _shape = { ...schema2._zod.def.shape, ...shape }; + assignProp2(this, "shape", _shape); + return _shape; + } + }); + return clone2(schema2, def); +} +function merge3(a, b) { + const def = mergeDefs(a._zod.def, { + get shape() { + const _shape = { ...a._zod.def.shape, ...b._zod.def.shape }; + assignProp2(this, "shape", _shape); + return _shape; + }, + get catchall() { + return b._zod.def.catchall; + }, + checks: [] + // delete existing checks + }); + return clone2(a, def); +} +function partial2(Class3, schema2, mask) { + const currDef = schema2._zod.def; + const checks = currDef.checks; + const hasChecks = checks && checks.length > 0; + if (hasChecks) { + throw new Error(".partial() cannot be used on object schemas containing refinements"); + } + const def = mergeDefs(schema2._zod.def, { + get shape() { + const oldShape = schema2._zod.def.shape; + const shape = { ...oldShape }; + if (mask) { + for (const key in mask) { + if (!(key in oldShape)) { + throw new Error(`Unrecognized key: "${key}"`); } - sets[xl] = sets[xl].slice(1); - return sets.join(""); - } else { - return sets[0]; + if (!mask[key]) + continue; + shape[key] = Class3 ? new Class3({ + type: "optional", + innerType: oldShape[key] + }) : oldShape[key]; + } + } else { + for (const key in oldShape) { + shape[key] = Class3 ? new Class3({ + type: "optional", + innerType: oldShape[key] + }) : oldShape[key]; } } - function subexp(str) { - return "(?:" + str + ")"; - } - function typeOf(o) { - return o === void 0 ? "undefined" : o === null ? "null" : Object.prototype.toString.call(o).split(" ").pop().split("]").shift().toLowerCase(); - } - function toUpperCase(str) { - return str.toUpperCase(); - } - function toArray(obj) { - return obj !== void 0 && obj !== null ? obj instanceof Array ? obj : typeof obj.length !== "number" || obj.split || obj.setInterval || obj.call ? [obj] : Array.prototype.slice.call(obj) : []; - } - function assign(target, source) { - var obj = target; - if (source) { - for (var key in source) { - obj[key] = source[key]; + assignProp2(this, "shape", shape); + return shape; + }, + checks: [] + }); + return clone2(schema2, def); +} +function required2(Class3, schema2, mask) { + const def = mergeDefs(schema2._zod.def, { + get shape() { + const oldShape = schema2._zod.def.shape; + const shape = { ...oldShape }; + if (mask) { + for (const key in mask) { + if (!(key in shape)) { + throw new Error(`Unrecognized key: "${key}"`); } + if (!mask[key]) + continue; + shape[key] = new Class3({ + type: "nonoptional", + innerType: oldShape[key] + }); + } + } else { + for (const key in oldShape) { + shape[key] = new Class3({ + type: "nonoptional", + innerType: oldShape[key] + }); } - return obj; } - function buildExps(isIRI2) { - var ALPHA$$ = "[A-Za-z]", CR$ = "[\\x0D]", DIGIT$$ = "[0-9]", DQUOTE$$ = "[\\x22]", HEXDIG$$2 = merge3(DIGIT$$, "[A-Fa-f]"), LF$$ = "[\\x0A]", SP$$ = "[\\x20]", PCT_ENCODED$2 = subexp(subexp("%[EFef]" + HEXDIG$$2 + "%" + HEXDIG$$2 + HEXDIG$$2 + "%" + HEXDIG$$2 + HEXDIG$$2) + "|" + subexp("%[89A-Fa-f]" + HEXDIG$$2 + "%" + HEXDIG$$2 + HEXDIG$$2) + "|" + subexp("%" + HEXDIG$$2 + HEXDIG$$2)), GEN_DELIMS$$ = "[\\:\\/\\?\\#\\[\\]\\@]", SUB_DELIMS$$ = "[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]", RESERVED$$ = merge3(GEN_DELIMS$$, SUB_DELIMS$$), UCSCHAR$$ = isIRI2 ? "[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]" : "[]", IPRIVATE$$ = isIRI2 ? "[\\uE000-\\uF8FF]" : "[]", UNRESERVED$$2 = merge3(ALPHA$$, DIGIT$$, "[\\-\\.\\_\\~]", UCSCHAR$$), SCHEME$ = subexp(ALPHA$$ + merge3(ALPHA$$, DIGIT$$, "[\\+\\-\\.]") + "*"), USERINFO$ = subexp(subexp(PCT_ENCODED$2 + "|" + merge3(UNRESERVED$$2, SUB_DELIMS$$, "[\\:]")) + "*"), DEC_OCTET$ = subexp(subexp("25[0-5]") + "|" + subexp("2[0-4]" + DIGIT$$) + "|" + subexp("1" + DIGIT$$ + DIGIT$$) + "|" + subexp("[1-9]" + DIGIT$$) + "|" + DIGIT$$), DEC_OCTET_RELAXED$ = subexp(subexp("25[0-5]") + "|" + subexp("2[0-4]" + DIGIT$$) + "|" + subexp("1" + DIGIT$$ + DIGIT$$) + "|" + subexp("0?[1-9]" + DIGIT$$) + "|0?0?" + DIGIT$$), IPV4ADDRESS$ = subexp(DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$), H16$ = subexp(HEXDIG$$2 + "{1,4}"), LS32$ = subexp(subexp(H16$ + "\\:" + H16$) + "|" + IPV4ADDRESS$), IPV6ADDRESS1$ = subexp(subexp(H16$ + "\\:") + "{6}" + LS32$), IPV6ADDRESS2$ = subexp("\\:\\:" + subexp(H16$ + "\\:") + "{5}" + LS32$), IPV6ADDRESS3$ = subexp(subexp(H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{4}" + LS32$), IPV6ADDRESS4$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,1}" + H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{3}" + LS32$), IPV6ADDRESS5$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,2}" + H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{2}" + LS32$), IPV6ADDRESS6$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,3}" + H16$) + "?\\:\\:" + H16$ + "\\:" + LS32$), IPV6ADDRESS7$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,4}" + H16$) + "?\\:\\:" + LS32$), IPV6ADDRESS8$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,5}" + H16$) + "?\\:\\:" + H16$), IPV6ADDRESS9$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,6}" + H16$) + "?\\:\\:"), IPV6ADDRESS$ = subexp([IPV6ADDRESS1$, IPV6ADDRESS2$, IPV6ADDRESS3$, IPV6ADDRESS4$, IPV6ADDRESS5$, IPV6ADDRESS6$, IPV6ADDRESS7$, IPV6ADDRESS8$, IPV6ADDRESS9$].join("|")), ZONEID$ = subexp(subexp(UNRESERVED$$2 + "|" + PCT_ENCODED$2) + "+"), IPV6ADDRZ$ = subexp(IPV6ADDRESS$ + "\\%25" + ZONEID$), IPV6ADDRZ_RELAXED$ = subexp(IPV6ADDRESS$ + subexp("\\%25|\\%(?!" + HEXDIG$$2 + "{2})") + ZONEID$), IPVFUTURE$ = subexp("[vV]" + HEXDIG$$2 + "+\\." + merge3(UNRESERVED$$2, SUB_DELIMS$$, "[\\:]") + "+"), IP_LITERAL$ = subexp("\\[" + subexp(IPV6ADDRZ_RELAXED$ + "|" + IPV6ADDRESS$ + "|" + IPVFUTURE$) + "\\]"), REG_NAME$ = subexp(subexp(PCT_ENCODED$2 + "|" + merge3(UNRESERVED$$2, SUB_DELIMS$$)) + "*"), HOST$ = subexp(IP_LITERAL$ + "|" + IPV4ADDRESS$ + "(?!" + REG_NAME$ + ")|" + REG_NAME$), PORT$ = subexp(DIGIT$$ + "*"), AUTHORITY$ = subexp(subexp(USERINFO$ + "@") + "?" + HOST$ + subexp("\\:" + PORT$) + "?"), PCHAR$ = subexp(PCT_ENCODED$2 + "|" + merge3(UNRESERVED$$2, SUB_DELIMS$$, "[\\:\\@]")), SEGMENT$ = subexp(PCHAR$ + "*"), SEGMENT_NZ$ = subexp(PCHAR$ + "+"), SEGMENT_NZ_NC$ = subexp(subexp(PCT_ENCODED$2 + "|" + merge3(UNRESERVED$$2, SUB_DELIMS$$, "[\\@]")) + "+"), PATH_ABEMPTY$ = subexp(subexp("\\/" + SEGMENT$) + "*"), PATH_ABSOLUTE$ = subexp("\\/" + subexp(SEGMENT_NZ$ + PATH_ABEMPTY$) + "?"), PATH_NOSCHEME$ = subexp(SEGMENT_NZ_NC$ + PATH_ABEMPTY$), PATH_ROOTLESS$ = subexp(SEGMENT_NZ$ + PATH_ABEMPTY$), PATH_EMPTY$ = "(?!" + PCHAR$ + ")", PATH$ = subexp(PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$), QUERY$ = subexp(subexp(PCHAR$ + "|" + merge3("[\\/\\?]", IPRIVATE$$)) + "*"), FRAGMENT$ = subexp(subexp(PCHAR$ + "|[\\/\\?]") + "*"), HIER_PART$ = subexp(subexp("\\/\\/" + AUTHORITY$ + PATH_ABEMPTY$) + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$), URI$ = subexp(SCHEME$ + "\\:" + HIER_PART$ + subexp("\\?" + QUERY$) + "?" + subexp("\\#" + FRAGMENT$) + "?"), RELATIVE_PART$ = subexp(subexp("\\/\\/" + AUTHORITY$ + PATH_ABEMPTY$) + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_EMPTY$), RELATIVE$ = subexp(RELATIVE_PART$ + subexp("\\?" + QUERY$) + "?" + subexp("\\#" + FRAGMENT$) + "?"), URI_REFERENCE$ = subexp(URI$ + "|" + RELATIVE$), ABSOLUTE_URI$ = subexp(SCHEME$ + "\\:" + HIER_PART$ + subexp("\\?" + QUERY$) + "?"), GENERIC_REF$ = "^(" + SCHEME$ + ")\\:" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?" + subexp("\\#(" + FRAGMENT$ + ")") + "?$", RELATIVE_REF$ = "^(){0}" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?" + subexp("\\#(" + FRAGMENT$ + ")") + "?$", ABSOLUTE_REF$ = "^(" + SCHEME$ + ")\\:" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?$", SAMEDOC_REF$ = "^" + subexp("\\#(" + FRAGMENT$ + ")") + "?$", AUTHORITY_REF$ = "^" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?$"; - return { - NOT_SCHEME: new RegExp(merge3("[^]", ALPHA$$, DIGIT$$, "[\\+\\-\\.]"), "g"), - NOT_USERINFO: new RegExp(merge3("[^\\%\\:]", UNRESERVED$$2, SUB_DELIMS$$), "g"), - NOT_HOST: new RegExp(merge3("[^\\%\\[\\]\\:]", UNRESERVED$$2, SUB_DELIMS$$), "g"), - NOT_PATH: new RegExp(merge3("[^\\%\\/\\:\\@]", UNRESERVED$$2, SUB_DELIMS$$), "g"), - NOT_PATH_NOSCHEME: new RegExp(merge3("[^\\%\\/\\@]", UNRESERVED$$2, SUB_DELIMS$$), "g"), - NOT_QUERY: new RegExp(merge3("[^\\%]", UNRESERVED$$2, SUB_DELIMS$$, "[\\:\\@\\/\\?]", IPRIVATE$$), "g"), - NOT_FRAGMENT: new RegExp(merge3("[^\\%]", UNRESERVED$$2, SUB_DELIMS$$, "[\\:\\@\\/\\?]"), "g"), - ESCAPE: new RegExp(merge3("[^]", UNRESERVED$$2, SUB_DELIMS$$), "g"), - UNRESERVED: new RegExp(UNRESERVED$$2, "g"), - OTHER_CHARS: new RegExp(merge3("[^\\%]", UNRESERVED$$2, RESERVED$$), "g"), - PCT_ENCODED: new RegExp(PCT_ENCODED$2, "g"), - IPV4ADDRESS: new RegExp("^(" + IPV4ADDRESS$ + ")$"), - IPV6ADDRESS: new RegExp("^\\[?(" + IPV6ADDRESS$ + ")" + subexp(subexp("\\%25|\\%(?!" + HEXDIG$$2 + "{2})") + "(" + ZONEID$ + ")") + "?\\]?$") - //RFC 6874, with relaxed parsing rules - }; + assignProp2(this, "shape", shape); + return shape; + } + }); + return clone2(schema2, def); +} +function aborted2(x, startIndex = 0) { + if (x.aborted === true) + return true; + for (let i = startIndex; i < x.issues.length; i++) { + if (x.issues[i]?.continue !== true) { + return true; + } + } + return false; +} +function prefixIssues2(path4, issues) { + return issues.map((iss) => { + var _a2; + (_a2 = iss).path ?? (_a2.path = []); + iss.path.unshift(path4); + return iss; + }); +} +function unwrapMessage2(message) { + return typeof message === "string" ? message : message?.message; +} +function finalizeIssue2(iss, ctx, config4) { + const full = { ...iss, path: iss.path ?? [] }; + if (!iss.message) { + const message = unwrapMessage2(iss.inst?._zod.def?.error?.(iss)) ?? unwrapMessage2(ctx?.error?.(iss)) ?? unwrapMessage2(config4.customError?.(iss)) ?? unwrapMessage2(config4.localeError?.(iss)) ?? "Invalid input"; + full.message = message; + } + delete full.inst; + delete full.continue; + if (!ctx?.reportInput) { + delete full.input; + } + return full; +} +function getSizableOrigin2(input) { + if (input instanceof Set) + return "set"; + if (input instanceof Map) + return "map"; + if (input instanceof File) + return "file"; + return "unknown"; +} +function getLengthableOrigin2(input) { + if (Array.isArray(input)) + return "array"; + if (typeof input === "string") + return "string"; + return "unknown"; +} +function parsedType2(data) { + const t = typeof data; + switch (t) { + case "number": { + return Number.isNaN(data) ? "nan" : "number"; + } + case "object": { + if (data === null) { + return "null"; } - var URI_PROTOCOL = buildExps(false); - var IRI_PROTOCOL = buildExps(true); - var slicedToArray = /* @__PURE__ */ (function() { - function sliceIterator(arr, i) { - var _arr = []; - var _n = true; - var _d = false; - var _e = void 0; - try { - for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { - _arr.push(_s.value); - if (i && _arr.length === i) break; - } - } catch (err) { - _d = true; - _e = err; - } finally { - try { - if (!_n && _i["return"]) _i["return"](); - } finally { - if (_d) throw _e; - } + if (Array.isArray(data)) { + return "array"; + } + const obj = data; + if (obj && Object.getPrototypeOf(obj) !== Object.prototype && "constructor" in obj && obj.constructor) { + return obj.constructor.name; + } + } + } + return t; +} +function issue2(...args3) { + const [iss, input, inst] = args3; + if (typeof iss === "string") { + return { + message: iss, + code: "custom", + input, + inst + }; + } + return { ...iss }; +} +function cleanEnum2(obj) { + return Object.entries(obj).filter(([k, _]) => { + return Number.isNaN(Number.parseInt(k, 10)); + }).map((el) => el[1]); +} +function base64ToUint8Array(base646) { + const binaryString = atob(base646); + const bytes = new Uint8Array(binaryString.length); + for (let i = 0; i < binaryString.length; i++) { + bytes[i] = binaryString.charCodeAt(i); + } + return bytes; +} +function uint8ArrayToBase64(bytes) { + let binaryString = ""; + for (let i = 0; i < bytes.length; i++) { + binaryString += String.fromCharCode(bytes[i]); + } + return btoa(binaryString); +} +function base64urlToUint8Array(base64url5) { + const base646 = base64url5.replace(/-/g, "+").replace(/_/g, "/"); + const padding = "=".repeat((4 - base646.length % 4) % 4); + return base64ToUint8Array(base646 + padding); +} +function uint8ArrayToBase64url(bytes) { + return uint8ArrayToBase64(bytes).replace(/\+/g, "-").replace(/\//g, "_").replace(/=/g, ""); +} +function hexToUint8Array(hex4) { + const cleanHex = hex4.replace(/^0x/, ""); + if (cleanHex.length % 2 !== 0) { + throw new Error("Invalid hex string length"); + } + const bytes = new Uint8Array(cleanHex.length / 2); + for (let i = 0; i < cleanHex.length; i += 2) { + bytes[i / 2] = Number.parseInt(cleanHex.slice(i, i + 2), 16); + } + return bytes; +} +function uint8ArrayToHex(bytes) { + return Array.from(bytes).map((b) => b.toString(16).padStart(2, "0")).join(""); +} +var EVALUATING, captureStackTrace2, allowsEval2, getParsedType4, propertyKeyTypes2, primitiveTypes2, NUMBER_FORMAT_RANGES2, BIGINT_FORMAT_RANGES2, Class2; +var init_util2 = __esm({ + "../node_modules/.pnpm/zod@4.3.5/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; + } + }); + getParsedType4 = (data) => { + const t = typeof data; + switch (t) { + case "undefined": + return "undefined"; + case "string": + return "string"; + case "number": + return Number.isNaN(data) ? "nan" : "number"; + case "boolean": + return "boolean"; + case "function": + return "function"; + case "bigint": + return "bigint"; + case "symbol": + return "symbol"; + case "object": + if (Array.isArray(data)) { + return "array"; } - return _arr; - } - return function(arr, i) { - if (Array.isArray(arr)) { - return arr; - } else if (Symbol.iterator in Object(arr)) { - return sliceIterator(arr, i); + if (data === null) { + return "null"; + } + if (data.then && typeof data.then === "function" && data.catch && typeof data.catch === "function") { + return "promise"; + } + if (typeof Map !== "undefined" && data instanceof Map) { + return "map"; + } + if (typeof Set !== "undefined" && data instanceof Set) { + return "set"; + } + if (typeof Date !== "undefined" && data instanceof Date) { + return "date"; + } + if (typeof File !== "undefined" && data instanceof File) { + return "file"; + } + return "object"; + default: + throw new Error(`Unknown data type: ${t}`); + } + }; + propertyKeyTypes2 = /* @__PURE__ */ new Set(["string", "number", "symbol"]); + primitiveTypes2 = /* @__PURE__ */ new Set(["string", "number", "bigint", "boolean", "symbol", "undefined"]); + 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] + }; + BIGINT_FORMAT_RANGES2 = { + int64: [/* @__PURE__ */ BigInt("-9223372036854775808"), /* @__PURE__ */ BigInt("9223372036854775807")], + uint64: [/* @__PURE__ */ BigInt(0), /* @__PURE__ */ BigInt("18446744073709551615")] + }; + Class2 = class { + constructor(..._args) { + } + }; + } +}); + +// ../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/core/errors.js +function flattenError2(error50, mapper = (issue4) => issue4.message) { + const fieldErrors = {}; + const formErrors = []; + for (const sub of error50.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(error50, mapper = (issue4) => issue4.message) { + const fieldErrors = { _errors: [] }; + const processError = (error51) => { + for (const issue4 of error51.issues) { + if (issue4.code === "invalid_union" && issue4.errors.length) { + issue4.errors.map((issues) => processError({ issues })); + } else if (issue4.code === "invalid_key") { + processError({ issues: issue4.issues }); + } else if (issue4.code === "invalid_element") { + processError({ issues: issue4.issues }); + } else if (issue4.path.length === 0) { + fieldErrors._errors.push(mapper(issue4)); + } else { + let curr = fieldErrors; + let i = 0; + while (i < issue4.path.length) { + const el = issue4.path[i]; + const terminal = i === issue4.path.length - 1; + if (!terminal) { + curr[el] = curr[el] || { _errors: [] }; } else { - throw new TypeError("Invalid attempt to destructure non-iterable instance"); + curr[el] = curr[el] || { _errors: [] }; + curr[el]._errors.push(mapper(issue4)); } - }; - })(); - var toConsumableArray = function(arr) { - if (Array.isArray(arr)) { - for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) arr2[i] = arr[i]; - return arr2; - } else { - return Array.from(arr); + curr = curr[el]; + i++; } + } + } + }; + processError(error50); + return fieldErrors; +} +function treeifyError(error50, mapper = (issue4) => issue4.message) { + const result = { errors: [] }; + const processError = (error51, path4 = []) => { + var _a2, _b; + for (const issue4 of error51.issues) { + if (issue4.code === "invalid_union" && issue4.errors.length) { + issue4.errors.map((issues) => processError({ issues }, issue4.path)); + } else if (issue4.code === "invalid_key") { + processError({ issues: issue4.issues }, issue4.path); + } else if (issue4.code === "invalid_element") { + processError({ issues: issue4.issues }, issue4.path); + } else { + const fullpath = [...path4, ...issue4.path]; + if (fullpath.length === 0) { + result.errors.push(mapper(issue4)); + continue; + } + let curr = result; + let i = 0; + while (i < fullpath.length) { + const el = fullpath[i]; + const terminal = i === fullpath.length - 1; + if (typeof el === "string") { + curr.properties ?? (curr.properties = {}); + (_a2 = curr.properties)[el] ?? (_a2[el] = { errors: [] }); + curr = curr.properties[el]; + } else { + curr.items ?? (curr.items = []); + (_b = curr.items)[el] ?? (_b[el] = { errors: [] }); + curr = curr.items[el]; + } + if (terminal) { + curr.errors.push(mapper(issue4)); + } + i++; + } + } + } + }; + processError(error50); + return result; +} +function toDotPath(_path) { + const segs = []; + const path4 = _path.map((seg) => typeof seg === "object" ? seg.key : seg); + for (const seg of path4) { + if (typeof seg === "number") + segs.push(`[${seg}]`); + else if (typeof seg === "symbol") + segs.push(`[${JSON.stringify(String(seg))}]`); + else if (/[^\w$]/.test(seg)) + segs.push(`[${JSON.stringify(seg)}]`); + else { + if (segs.length) + segs.push("."); + segs.push(seg); + } + } + return segs.join(""); +} +function prettifyError(error50) { + const lines = []; + const issues = [...error50.issues].sort((a, b) => (a.path ?? []).length - (b.path ?? []).length); + for (const issue4 of issues) { + lines.push(`\u2716 ${issue4.message}`); + if (issue4.path?.length) + lines.push(` \u2192 at ${toDotPath(issue4.path)}`); + } + return lines.join("\n"); +} +var initializer3, $ZodError2, $ZodRealError2; +var init_errors2 = __esm({ + "../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/core/errors.js"() { + init_core(); + init_util2(); + initializer3 = (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", initializer3); + $ZodRealError2 = $constructor2("$ZodError", initializer3, { Parent: Error }); + } +}); + +// ../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/core/parse.js +var _parse2, parse2, _parseAsync2, parseAsync, _safeParse2, safeParse4, _safeParseAsync2, safeParseAsync2, _encode, encode2, _decode, decode, _encodeAsync, encodeAsync, _decodeAsync, decodeAsync, _safeEncode, safeEncode, _safeDecode, safeDecode, _safeEncodeAsync, safeEncodeAsync, _safeDecodeAsync, safeDecodeAsync; +var init_parse = __esm({ + "../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/core/parse.js"() { + init_core(); + init_errors2(); + init_util2(); + _parse2 = (_Err) => (schema2, value2, _ctx, _params) => { + const ctx = _ctx ? Object.assign(_ctx, { async: false }) : { async: false }; + const result = schema2._zod.run({ value: value2, issues: [] }, ctx); + if (result instanceof Promise) { + throw new $ZodAsyncError2(); + } + if (result.issues.length) { + const e = new (_params?.Err ?? _Err)(result.issues.map((iss) => finalizeIssue2(iss, ctx, config2()))); + captureStackTrace2(e, _params?.callee); + throw e; + } + return result.value; + }; + parse2 = /* @__PURE__ */ _parse2($ZodRealError2); + _parseAsync2 = (_Err) => async (schema2, value2, _ctx, params) => { + const ctx = _ctx ? Object.assign(_ctx, { async: true }) : { async: true }; + let result = schema2._zod.run({ value: value2, issues: [] }, ctx); + if (result instanceof Promise) + result = await result; + if (result.issues.length) { + const e = new (params?.Err ?? _Err)(result.issues.map((iss) => finalizeIssue2(iss, ctx, config2()))); + captureStackTrace2(e, params?.callee); + throw e; + } + return result.value; + }; + parseAsync = /* @__PURE__ */ _parseAsync2($ZodRealError2); + _safeParse2 = (_Err) => (schema2, value2, _ctx) => { + const ctx = _ctx ? { ..._ctx, async: false } : { async: false }; + const result = schema2._zod.run({ value: value2, issues: [] }, ctx); + if (result instanceof Promise) { + throw new $ZodAsyncError2(); + } + return result.issues.length ? { + success: false, + error: new (_Err ?? $ZodError2)(result.issues.map((iss) => finalizeIssue2(iss, ctx, config2()))) + } : { success: true, data: result.value }; + }; + safeParse4 = /* @__PURE__ */ _safeParse2($ZodRealError2); + _safeParseAsync2 = (_Err) => async (schema2, value2, _ctx) => { + const ctx = _ctx ? Object.assign(_ctx, { async: true }) : { async: true }; + let result = schema2._zod.run({ value: value2, issues: [] }, ctx); + if (result instanceof Promise) + result = await result; + return result.issues.length ? { + success: false, + error: new _Err(result.issues.map((iss) => finalizeIssue2(iss, ctx, config2()))) + } : { success: true, data: result.value }; + }; + safeParseAsync2 = /* @__PURE__ */ _safeParseAsync2($ZodRealError2); + _encode = (_Err) => (schema2, value2, _ctx) => { + const ctx = _ctx ? Object.assign(_ctx, { direction: "backward" }) : { direction: "backward" }; + return _parse2(_Err)(schema2, value2, ctx); + }; + encode2 = /* @__PURE__ */ _encode($ZodRealError2); + _decode = (_Err) => (schema2, value2, _ctx) => { + return _parse2(_Err)(schema2, value2, _ctx); + }; + decode = /* @__PURE__ */ _decode($ZodRealError2); + _encodeAsync = (_Err) => async (schema2, value2, _ctx) => { + const ctx = _ctx ? Object.assign(_ctx, { direction: "backward" }) : { direction: "backward" }; + return _parseAsync2(_Err)(schema2, value2, ctx); + }; + encodeAsync = /* @__PURE__ */ _encodeAsync($ZodRealError2); + _decodeAsync = (_Err) => async (schema2, value2, _ctx) => { + return _parseAsync2(_Err)(schema2, value2, _ctx); + }; + decodeAsync = /* @__PURE__ */ _decodeAsync($ZodRealError2); + _safeEncode = (_Err) => (schema2, value2, _ctx) => { + const ctx = _ctx ? Object.assign(_ctx, { direction: "backward" }) : { direction: "backward" }; + return _safeParse2(_Err)(schema2, value2, ctx); + }; + safeEncode = /* @__PURE__ */ _safeEncode($ZodRealError2); + _safeDecode = (_Err) => (schema2, value2, _ctx) => { + return _safeParse2(_Err)(schema2, value2, _ctx); + }; + safeDecode = /* @__PURE__ */ _safeDecode($ZodRealError2); + _safeEncodeAsync = (_Err) => async (schema2, value2, _ctx) => { + const ctx = _ctx ? Object.assign(_ctx, { direction: "backward" }) : { direction: "backward" }; + return _safeParseAsync2(_Err)(schema2, value2, ctx); + }; + safeEncodeAsync = /* @__PURE__ */ _safeEncodeAsync($ZodRealError2); + _safeDecodeAsync = (_Err) => async (schema2, value2, _ctx) => { + return _safeParseAsync2(_Err)(schema2, value2, _ctx); + }; + safeDecodeAsync = /* @__PURE__ */ _safeDecodeAsync($ZodRealError2); + } +}); + +// ../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/core/regexes.js +var regexes_exports = {}; +__export(regexes_exports, { + base64: () => base643, + base64url: () => base64url2, + bigint: () => bigint, + boolean: () => boolean3, + browserEmail: () => browserEmail, + cidrv4: () => cidrv42, + cidrv6: () => cidrv62, + cuid: () => cuid3, + cuid2: () => cuid22, + date: () => date3, + datetime: () => datetime3, + domain: () => domain, + duration: () => duration3, + e164: () => e1642, + email: () => email3, + emoji: () => emoji2, + extendedDuration: () => extendedDuration, + guid: () => guid2, + hex: () => hex2, + hostname: () => hostname2, + html5Email: () => html5Email, + idnEmail: () => idnEmail, + integer: () => integer3, + ipv4: () => ipv42, + ipv6: () => ipv62, + ksuid: () => ksuid2, + lowercase: () => lowercase2, + mac: () => mac, + md5_base64: () => md5_base64, + md5_base64url: () => md5_base64url, + md5_hex: () => md5_hex, + nanoid: () => nanoid2, + null: () => _null4, + number: () => number4, + rfc5322Email: () => rfc5322Email, + sha1_base64: () => sha1_base64, + sha1_base64url: () => sha1_base64url, + sha1_hex: () => sha1_hex, + sha256_base64: () => sha256_base64, + sha256_base64url: () => sha256_base64url, + sha256_hex: () => sha256_hex, + sha384_base64: () => sha384_base64, + sha384_base64url: () => sha384_base64url, + sha384_hex: () => sha384_hex, + sha512_base64: () => sha512_base64, + sha512_base64url: () => sha512_base64url, + sha512_hex: () => sha512_hex, + string: () => string4, + time: () => time3, + ulid: () => ulid2, + undefined: () => _undefined, + unicodeEmail: () => unicodeEmail, + uppercase: () => uppercase2, + uuid: () => uuid3, + uuid4: () => uuid4, + uuid6: () => uuid6, + uuid7: () => uuid7, + xid: () => xid2 +}); +function emoji2() { + return new RegExp(_emoji3, "u"); +} +function timeSource2(args3) { + const hhmm = `(?:[01]\\d|2[0-3]):[0-5]\\d`; + const regex4 = typeof args3.precision === "number" ? args3.precision === -1 ? `${hhmm}` : args3.precision === 0 ? `${hhmm}:[0-5]\\d` : `${hhmm}:[0-5]\\d\\.\\d{${args3.precision}}` : `${hhmm}(?::[0-5]\\d(?:\\.\\d+)?)?`; + return regex4; +} +function time3(args3) { + return new RegExp(`^${timeSource2(args3)}$`); +} +function datetime3(args3) { + const time6 = timeSource2({ precision: args3.precision }); + const opts = ["Z"]; + if (args3.local) + opts.push(""); + if (args3.offset) + opts.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`); + const timeRegex3 = `${time6}(?:${opts.join("|")})`; + return new RegExp(`^${dateSource2}T(?:${timeRegex3})$`); +} +function fixedBase64(bodyLength, padding) { + return new RegExp(`^[A-Za-z0-9+/]{${bodyLength}}${padding}$`); +} +function fixedBase64url(length) { + return new RegExp(`^[A-Za-z0-9_-]{${length}}$`); +} +var cuid3, cuid22, ulid2, xid2, ksuid2, nanoid2, duration3, extendedDuration, guid2, uuid3, uuid4, uuid6, uuid7, email3, html5Email, rfc5322Email, unicodeEmail, idnEmail, browserEmail, _emoji3, ipv42, ipv62, mac, cidrv42, cidrv62, base643, base64url2, hostname2, domain, e1642, dateSource2, date3, string4, bigint, integer3, number4, boolean3, _null4, _undefined, lowercase2, uppercase2, hex2, md5_hex, md5_base64, md5_base64url, sha1_hex, sha1_base64, sha1_base64url, sha256_hex, sha256_base64, sha256_base64url, sha384_hex, sha384_base64, sha384_base64url, sha512_hex, sha512_base64, sha512_base64url; +var init_regexes = __esm({ + "../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/core/regexes.js"() { + init_util2(); + cuid3 = /^[cC][^\s-]{8,}$/; + cuid22 = /^[0-9a-z]+$/; + ulid2 = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/; + xid2 = /^[0-9a-vA-V]{20}$/; + ksuid2 = /^[A-Za-z0-9]{27}$/; + nanoid2 = /^[a-zA-Z0-9_-]{21}$/; + duration3 = /^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)?)??$/; + guid2 = /^([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})$/; + uuid3 = (version4) => { + if (!version4) + 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|ffffffff-ffff-ffff-ffff-ffffffffffff)$/; + return new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${version4}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`); + }; + uuid4 = /* @__PURE__ */ uuid3(4); + uuid6 = /* @__PURE__ */ uuid3(6); + uuid7 = /* @__PURE__ */ uuid3(7); + email3 = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/; + html5Email = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/; + rfc5322Email = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; + unicodeEmail = /^[^\s@"]{1,64}@[^\s@]{1,255}$/u; + idnEmail = unicodeEmail; + browserEmail = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/; + _emoji3 = `^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`; + ipv42 = /^(?:(?: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])$/; + ipv62 = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/; + mac = (delimiter) => { + const escapedDelim = escapeRegex2(delimiter ?? ":"); + return new RegExp(`^(?:[0-9A-F]{2}${escapedDelim}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${escapedDelim}){5}[0-9a-f]{2}$`); + }; + cidrv42 = /^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/; + cidrv62 = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/; + base643 = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/; + base64url2 = /^[A-Za-z0-9_-]*$/; + hostname2 = /^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/; + domain = /^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/; + e1642 = /^\+[1-9]\d{6,14}$/; + 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])))`; + date3 = /* @__PURE__ */ new RegExp(`^${dateSource2}$`); + string4 = (params) => { + const regex4 = params ? `[\\s\\S]{${params?.minimum ?? 0},${params?.maximum ?? ""}}` : `[\\s\\S]*`; + return new RegExp(`^${regex4}$`); + }; + bigint = /^-?\d+n?$/; + integer3 = /^-?\d+$/; + number4 = /^-?\d+(?:\.\d+)?$/; + boolean3 = /^(?:true|false)$/i; + _null4 = /^null$/i; + _undefined = /^undefined$/i; + lowercase2 = /^[^A-Z]*$/; + uppercase2 = /^[^a-z]*$/; + hex2 = /^[0-9a-fA-F]*$/; + md5_hex = /^[0-9a-fA-F]{32}$/; + md5_base64 = /* @__PURE__ */ fixedBase64(22, "=="); + md5_base64url = /* @__PURE__ */ fixedBase64url(22); + sha1_hex = /^[0-9a-fA-F]{40}$/; + sha1_base64 = /* @__PURE__ */ fixedBase64(27, "="); + sha1_base64url = /* @__PURE__ */ fixedBase64url(27); + sha256_hex = /^[0-9a-fA-F]{64}$/; + sha256_base64 = /* @__PURE__ */ fixedBase64(43, "="); + sha256_base64url = /* @__PURE__ */ fixedBase64url(43); + sha384_hex = /^[0-9a-fA-F]{96}$/; + sha384_base64 = /* @__PURE__ */ fixedBase64(64, ""); + sha384_base64url = /* @__PURE__ */ fixedBase64url(64); + sha512_hex = /^[0-9a-fA-F]{128}$/; + sha512_base64 = /* @__PURE__ */ fixedBase64(86, "=="); + sha512_base64url = /* @__PURE__ */ fixedBase64url(86); + } +}); + +// ../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/core/checks.js +function handleCheckPropertyResult(result, payload, property) { + if (result.issues.length) { + payload.issues.push(...prefixIssues2(property, result.issues)); + } +} +var $ZodCheck2, numericOriginMap2, $ZodCheckLessThan2, $ZodCheckGreaterThan2, $ZodCheckMultipleOf2, $ZodCheckNumberFormat2, $ZodCheckBigIntFormat, $ZodCheckMaxSize, $ZodCheckMinSize, $ZodCheckSizeEquals, $ZodCheckMaxLength2, $ZodCheckMinLength2, $ZodCheckLengthEquals2, $ZodCheckStringFormat2, $ZodCheckRegex2, $ZodCheckLowerCase2, $ZodCheckUpperCase2, $ZodCheckIncludes2, $ZodCheckStartsWith2, $ZodCheckEndsWith2, $ZodCheckProperty, $ZodCheckMimeType, $ZodCheckOverwrite2; +var init_checks = __esm({ + "../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/core/checks.js"() { + init_core(); + init_regexes(); + init_util2(); + $ZodCheck2 = /* @__PURE__ */ $constructor2("$ZodCheck", (inst, def) => { + var _a2; + inst._zod ?? (inst._zod = {}); + inst._zod.def = def; + (_a2 = inst._zod).onattach ?? (_a2.onattach = []); + }); + numericOriginMap2 = { + number: "number", + bigint: "bigint", + object: "date" + }; + $ZodCheckLessThan2 = /* @__PURE__ */ $constructor2("$ZodCheckLessThan", (inst, def) => { + $ZodCheck2.init(inst, def); + const origin = numericOriginMap2[typeof def.value]; + inst._zod.onattach.push((inst2) => { + const bag = inst2._zod.bag; + const curr = (def.inclusive ? bag.maximum : bag.exclusiveMaximum) ?? Number.POSITIVE_INFINITY; + if (def.value < curr) { + if (def.inclusive) + bag.maximum = def.value; + else + bag.exclusiveMaximum = def.value; + } + }); + inst._zod.check = (payload) => { + if (def.inclusive ? payload.value <= def.value : payload.value < def.value) { + return; + } + payload.issues.push({ + origin, + code: "too_big", + maximum: typeof def.value === "object" ? def.value.getTime() : def.value, + input: payload.value, + inclusive: def.inclusive, + inst, + continue: !def.abort + }); }; - var maxInt = 2147483647; - var base = 36; - var tMin = 1; - var tMax = 26; - var skew = 38; - var damp = 700; - var initialBias = 72; - var initialN = 128; - var delimiter = "-"; - var regexPunycode = /^xn--/; - var regexNonASCII = /[^\0-\x7E]/; - var regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g; - var errors = { - "overflow": "Overflow: input needs wider integers to process", - "not-basic": "Illegal input >= 0x80 (not a basic code point)", - "invalid-input": "Invalid input" + }); + $ZodCheckGreaterThan2 = /* @__PURE__ */ $constructor2("$ZodCheckGreaterThan", (inst, def) => { + $ZodCheck2.init(inst, def); + const origin = numericOriginMap2[typeof def.value]; + inst._zod.onattach.push((inst2) => { + const bag = inst2._zod.bag; + const curr = (def.inclusive ? bag.minimum : bag.exclusiveMinimum) ?? Number.NEGATIVE_INFINITY; + if (def.value > curr) { + if (def.inclusive) + bag.minimum = def.value; + else + bag.exclusiveMinimum = def.value; + } + }); + inst._zod.check = (payload) => { + if (def.inclusive ? payload.value >= def.value : payload.value > def.value) { + return; + } + payload.issues.push({ + origin, + code: "too_small", + minimum: typeof def.value === "object" ? def.value.getTime() : def.value, + input: payload.value, + inclusive: def.inclusive, + inst, + continue: !def.abort + }); }; - var baseMinusTMin = base - tMin; - var floor = Math.floor; - var stringFromCharCode = String.fromCharCode; - function error$1(type2) { - throw new RangeError(errors[type2]); - } - function map(array, fn2) { - var result = []; - var length = array.length; - while (length--) { - result[length] = fn2(array[length]); - } - return result; - } - function mapDomain(string3, fn2) { - var parts = string3.split("@"); - var result = ""; - if (parts.length > 1) { - result = parts[0] + "@"; - string3 = parts[1]; - } - string3 = string3.replace(regexSeparators, "."); - var labels = string3.split("."); - var encoded = map(labels, fn2).join("."); - return result + encoded; - } - function ucs2decode(string3) { - var output = []; - var counter = 0; - var length = string3.length; - while (counter < length) { - var value2 = string3.charCodeAt(counter++); - if (value2 >= 55296 && value2 <= 56319 && counter < length) { - var extra = string3.charCodeAt(counter++); - if ((extra & 64512) == 56320) { - output.push(((value2 & 1023) << 10) + (extra & 1023) + 65536); + }); + $ZodCheckMultipleOf2 = /* @__PURE__ */ $constructor2("$ZodCheckMultipleOf", (inst, def) => { + $ZodCheck2.init(inst, def); + inst._zod.onattach.push((inst2) => { + var _a2; + (_a2 = inst2._zod.bag).multipleOf ?? (_a2.multipleOf = def.value); + }); + inst._zod.check = (payload) => { + if (typeof payload.value !== typeof def.value) + throw new Error("Cannot mix number and bigint in multiple_of check."); + const isMultiple = typeof payload.value === "bigint" ? payload.value % def.value === BigInt(0) : floatSafeRemainder4(payload.value, def.value) === 0; + if (isMultiple) + return; + payload.issues.push({ + origin: typeof payload.value, + code: "not_multiple_of", + divisor: def.value, + input: payload.value, + inst, + continue: !def.abort + }); + }; + }); + $ZodCheckNumberFormat2 = /* @__PURE__ */ $constructor2("$ZodCheckNumberFormat", (inst, def) => { + $ZodCheck2.init(inst, def); + def.format = def.format || "float64"; + const isInt = def.format?.includes("int"); + const origin = isInt ? "int" : "number"; + const [minimum, maximum] = NUMBER_FORMAT_RANGES2[def.format]; + inst._zod.onattach.push((inst2) => { + const bag = inst2._zod.bag; + bag.format = def.format; + bag.minimum = minimum; + bag.maximum = maximum; + if (isInt) + bag.pattern = integer3; + }); + inst._zod.check = (payload) => { + const input = payload.value; + if (isInt) { + if (!Number.isInteger(input)) { + payload.issues.push({ + expected: origin, + format: def.format, + code: "invalid_type", + continue: false, + input, + inst + }); + return; + } + if (!Number.isSafeInteger(input)) { + if (input > 0) { + payload.issues.push({ + input, + code: "too_big", + maximum: Number.MAX_SAFE_INTEGER, + note: "Integers must be within the safe integer range.", + inst, + origin, + inclusive: true, + continue: !def.abort + }); } else { - output.push(value2); - counter--; + payload.issues.push({ + input, + code: "too_small", + minimum: Number.MIN_SAFE_INTEGER, + note: "Integers must be within the safe integer range.", + inst, + origin, + inclusive: true, + continue: !def.abort + }); } - } else { - output.push(value2); + return; } } - return output; + if (input < minimum) { + payload.issues.push({ + origin: "number", + input, + code: "too_small", + minimum, + inclusive: true, + inst, + continue: !def.abort + }); + } + if (input > maximum) { + payload.issues.push({ + origin: "number", + input, + code: "too_big", + maximum, + inclusive: true, + inst, + continue: !def.abort + }); + } + }; + }); + $ZodCheckBigIntFormat = /* @__PURE__ */ $constructor2("$ZodCheckBigIntFormat", (inst, def) => { + $ZodCheck2.init(inst, def); + const [minimum, maximum] = BIGINT_FORMAT_RANGES2[def.format]; + inst._zod.onattach.push((inst2) => { + const bag = inst2._zod.bag; + bag.format = def.format; + bag.minimum = minimum; + bag.maximum = maximum; + }); + inst._zod.check = (payload) => { + const input = payload.value; + if (input < minimum) { + payload.issues.push({ + origin: "bigint", + input, + code: "too_small", + minimum, + inclusive: true, + inst, + continue: !def.abort + }); + } + if (input > maximum) { + payload.issues.push({ + origin: "bigint", + input, + code: "too_big", + maximum, + inclusive: true, + inst, + continue: !def.abort + }); + } + }; + }); + $ZodCheckMaxSize = /* @__PURE__ */ $constructor2("$ZodCheckMaxSize", (inst, def) => { + var _a2; + $ZodCheck2.init(inst, def); + (_a2 = inst._zod.def).when ?? (_a2.when = (payload) => { + const val = payload.value; + return !nullish2(val) && val.size !== void 0; + }); + inst._zod.onattach.push((inst2) => { + const curr = inst2._zod.bag.maximum ?? Number.POSITIVE_INFINITY; + if (def.maximum < curr) + inst2._zod.bag.maximum = def.maximum; + }); + inst._zod.check = (payload) => { + const input = payload.value; + const size = input.size; + if (size <= def.maximum) + return; + payload.issues.push({ + origin: getSizableOrigin2(input), + code: "too_big", + maximum: def.maximum, + inclusive: true, + input, + inst, + continue: !def.abort + }); + }; + }); + $ZodCheckMinSize = /* @__PURE__ */ $constructor2("$ZodCheckMinSize", (inst, def) => { + var _a2; + $ZodCheck2.init(inst, def); + (_a2 = inst._zod.def).when ?? (_a2.when = (payload) => { + const val = payload.value; + return !nullish2(val) && val.size !== void 0; + }); + inst._zod.onattach.push((inst2) => { + const curr = inst2._zod.bag.minimum ?? Number.NEGATIVE_INFINITY; + if (def.minimum > curr) + inst2._zod.bag.minimum = def.minimum; + }); + inst._zod.check = (payload) => { + const input = payload.value; + const size = input.size; + if (size >= def.minimum) + return; + payload.issues.push({ + origin: getSizableOrigin2(input), + code: "too_small", + minimum: def.minimum, + inclusive: true, + input, + inst, + continue: !def.abort + }); + }; + }); + $ZodCheckSizeEquals = /* @__PURE__ */ $constructor2("$ZodCheckSizeEquals", (inst, def) => { + var _a2; + $ZodCheck2.init(inst, def); + (_a2 = inst._zod.def).when ?? (_a2.when = (payload) => { + const val = payload.value; + return !nullish2(val) && val.size !== void 0; + }); + inst._zod.onattach.push((inst2) => { + const bag = inst2._zod.bag; + bag.minimum = def.size; + bag.maximum = def.size; + bag.size = def.size; + }); + inst._zod.check = (payload) => { + const input = payload.value; + const size = input.size; + if (size === def.size) + return; + const tooBig = size > def.size; + payload.issues.push({ + origin: getSizableOrigin2(input), + ...tooBig ? { code: "too_big", maximum: def.size } : { code: "too_small", minimum: def.size }, + inclusive: true, + exact: true, + input: payload.value, + inst, + continue: !def.abort + }); + }; + }); + $ZodCheckMaxLength2 = /* @__PURE__ */ $constructor2("$ZodCheckMaxLength", (inst, def) => { + var _a2; + $ZodCheck2.init(inst, def); + (_a2 = inst._zod.def).when ?? (_a2.when = (payload) => { + const val = payload.value; + return !nullish2(val) && val.length !== void 0; + }); + inst._zod.onattach.push((inst2) => { + const curr = inst2._zod.bag.maximum ?? Number.POSITIVE_INFINITY; + if (def.maximum < curr) + inst2._zod.bag.maximum = def.maximum; + }); + inst._zod.check = (payload) => { + const input = payload.value; + const length = input.length; + if (length <= def.maximum) + return; + const origin = getLengthableOrigin2(input); + payload.issues.push({ + origin, + code: "too_big", + maximum: def.maximum, + inclusive: true, + input, + inst, + continue: !def.abort + }); + }; + }); + $ZodCheckMinLength2 = /* @__PURE__ */ $constructor2("$ZodCheckMinLength", (inst, def) => { + var _a2; + $ZodCheck2.init(inst, def); + (_a2 = inst._zod.def).when ?? (_a2.when = (payload) => { + const val = payload.value; + return !nullish2(val) && val.length !== void 0; + }); + inst._zod.onattach.push((inst2) => { + const curr = inst2._zod.bag.minimum ?? Number.NEGATIVE_INFINITY; + if (def.minimum > curr) + inst2._zod.bag.minimum = def.minimum; + }); + inst._zod.check = (payload) => { + const input = payload.value; + const length = input.length; + if (length >= def.minimum) + return; + const origin = getLengthableOrigin2(input); + payload.issues.push({ + origin, + code: "too_small", + minimum: def.minimum, + inclusive: true, + input, + inst, + continue: !def.abort + }); + }; + }); + $ZodCheckLengthEquals2 = /* @__PURE__ */ $constructor2("$ZodCheckLengthEquals", (inst, def) => { + var _a2; + $ZodCheck2.init(inst, def); + (_a2 = inst._zod.def).when ?? (_a2.when = (payload) => { + const val = payload.value; + return !nullish2(val) && val.length !== void 0; + }); + inst._zod.onattach.push((inst2) => { + const bag = inst2._zod.bag; + bag.minimum = def.length; + bag.maximum = def.length; + bag.length = def.length; + }); + inst._zod.check = (payload) => { + const input = payload.value; + const length = input.length; + if (length === def.length) + return; + const origin = getLengthableOrigin2(input); + const tooBig = length > def.length; + payload.issues.push({ + origin, + ...tooBig ? { code: "too_big", maximum: def.length } : { code: "too_small", minimum: def.length }, + inclusive: true, + exact: true, + input: payload.value, + inst, + continue: !def.abort + }); + }; + }); + $ZodCheckStringFormat2 = /* @__PURE__ */ $constructor2("$ZodCheckStringFormat", (inst, def) => { + var _a2, _b; + $ZodCheck2.init(inst, def); + inst._zod.onattach.push((inst2) => { + const bag = inst2._zod.bag; + bag.format = def.format; + if (def.pattern) { + bag.patterns ?? (bag.patterns = /* @__PURE__ */ new Set()); + bag.patterns.add(def.pattern); + } + }); + if (def.pattern) + (_a2 = inst._zod).check ?? (_a2.check = (payload) => { + def.pattern.lastIndex = 0; + if (def.pattern.test(payload.value)) + return; + payload.issues.push({ + origin: "string", + code: "invalid_format", + format: def.format, + input: payload.value, + ...def.pattern ? { pattern: def.pattern.toString() } : {}, + inst, + continue: !def.abort + }); + }); + else + (_b = inst._zod).check ?? (_b.check = () => { + }); + }); + $ZodCheckRegex2 = /* @__PURE__ */ $constructor2("$ZodCheckRegex", (inst, def) => { + $ZodCheckStringFormat2.init(inst, def); + inst._zod.check = (payload) => { + def.pattern.lastIndex = 0; + if (def.pattern.test(payload.value)) + return; + payload.issues.push({ + origin: "string", + code: "invalid_format", + format: "regex", + input: payload.value, + pattern: def.pattern.toString(), + inst, + continue: !def.abort + }); + }; + }); + $ZodCheckLowerCase2 = /* @__PURE__ */ $constructor2("$ZodCheckLowerCase", (inst, def) => { + def.pattern ?? (def.pattern = lowercase2); + $ZodCheckStringFormat2.init(inst, def); + }); + $ZodCheckUpperCase2 = /* @__PURE__ */ $constructor2("$ZodCheckUpperCase", (inst, def) => { + def.pattern ?? (def.pattern = uppercase2); + $ZodCheckStringFormat2.init(inst, def); + }); + $ZodCheckIncludes2 = /* @__PURE__ */ $constructor2("$ZodCheckIncludes", (inst, def) => { + $ZodCheck2.init(inst, def); + const escapedRegex = escapeRegex2(def.includes); + const pattern = new RegExp(typeof def.position === "number" ? `^.{${def.position}}${escapedRegex}` : escapedRegex); + def.pattern = pattern; + inst._zod.onattach.push((inst2) => { + const bag = inst2._zod.bag; + bag.patterns ?? (bag.patterns = /* @__PURE__ */ new Set()); + bag.patterns.add(pattern); + }); + inst._zod.check = (payload) => { + if (payload.value.includes(def.includes, def.position)) + return; + payload.issues.push({ + origin: "string", + code: "invalid_format", + format: "includes", + includes: def.includes, + input: payload.value, + inst, + continue: !def.abort + }); + }; + }); + $ZodCheckStartsWith2 = /* @__PURE__ */ $constructor2("$ZodCheckStartsWith", (inst, def) => { + $ZodCheck2.init(inst, def); + const pattern = new RegExp(`^${escapeRegex2(def.prefix)}.*`); + def.pattern ?? (def.pattern = pattern); + inst._zod.onattach.push((inst2) => { + const bag = inst2._zod.bag; + bag.patterns ?? (bag.patterns = /* @__PURE__ */ new Set()); + bag.patterns.add(pattern); + }); + inst._zod.check = (payload) => { + if (payload.value.startsWith(def.prefix)) + return; + payload.issues.push({ + origin: "string", + code: "invalid_format", + format: "starts_with", + prefix: def.prefix, + input: payload.value, + inst, + continue: !def.abort + }); + }; + }); + $ZodCheckEndsWith2 = /* @__PURE__ */ $constructor2("$ZodCheckEndsWith", (inst, def) => { + $ZodCheck2.init(inst, def); + const pattern = new RegExp(`.*${escapeRegex2(def.suffix)}$`); + def.pattern ?? (def.pattern = pattern); + inst._zod.onattach.push((inst2) => { + const bag = inst2._zod.bag; + bag.patterns ?? (bag.patterns = /* @__PURE__ */ new Set()); + bag.patterns.add(pattern); + }); + inst._zod.check = (payload) => { + if (payload.value.endsWith(def.suffix)) + return; + payload.issues.push({ + origin: "string", + code: "invalid_format", + format: "ends_with", + suffix: def.suffix, + input: payload.value, + inst, + continue: !def.abort + }); + }; + }); + $ZodCheckProperty = /* @__PURE__ */ $constructor2("$ZodCheckProperty", (inst, def) => { + $ZodCheck2.init(inst, def); + inst._zod.check = (payload) => { + const result = def.schema._zod.run({ + value: payload.value[def.property], + issues: [] + }, {}); + if (result instanceof Promise) { + return result.then((result2) => handleCheckPropertyResult(result2, payload, def.property)); + } + handleCheckPropertyResult(result, payload, def.property); + return; + }; + }); + $ZodCheckMimeType = /* @__PURE__ */ $constructor2("$ZodCheckMimeType", (inst, def) => { + $ZodCheck2.init(inst, def); + const mimeSet = new Set(def.mime); + inst._zod.onattach.push((inst2) => { + inst2._zod.bag.mime = def.mime; + }); + inst._zod.check = (payload) => { + if (mimeSet.has(payload.value.type)) + return; + payload.issues.push({ + code: "invalid_value", + values: def.mime, + input: payload.value.type, + inst, + continue: !def.abort + }); + }; + }); + $ZodCheckOverwrite2 = /* @__PURE__ */ $constructor2("$ZodCheckOverwrite", (inst, def) => { + $ZodCheck2.init(inst, def); + inst._zod.check = (payload) => { + payload.value = def.tx(payload.value); + }; + }); + } +}); + +// ../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/core/doc.js +var Doc2; +var init_doc = __esm({ + "../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/core/doc.js"() { + Doc2 = class { + constructor(args3 = []) { + this.content = []; + this.indent = 0; + if (this) + this.args = args3; } - var ucs2encode = function ucs2encode2(array) { - return String.fromCodePoint.apply(String, toConsumableArray(array)); - }; - var basicToDigit = function basicToDigit2(codePoint) { - if (codePoint - 48 < 10) { - return codePoint - 22; + indented(fn2) { + this.indent += 1; + fn2(this); + this.indent -= 1; + } + write(arg) { + if (typeof arg === "function") { + arg(this, { execution: "sync" }); + arg(this, { execution: "async" }); + return; } - if (codePoint - 65 < 26) { - return codePoint - 65; + const content = arg; + const lines = content.split("\n").filter((x) => x); + const minIndent = Math.min(...lines.map((x) => x.length - x.trimStart().length)); + const dedented = lines.map((x) => x.slice(minIndent)).map((x) => " ".repeat(this.indent * 2) + x); + for (const line of dedented) { + this.content.push(line); } - if (codePoint - 97 < 26) { - return codePoint - 97; + } + compile() { + const F = Function; + const args3 = this?.args; + const content = this?.content ?? [``]; + const lines = [...content.map((x) => ` ${x}`)]; + return new F(...args3, lines.join("\n")); + } + }; + } +}); + +// ../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/core/versions.js +var version2; +var init_versions = __esm({ + "../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/core/versions.js"() { + version2 = { + major: 4, + minor: 3, + patch: 5 + }; + } +}); + +// ../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/core/schemas.js +function isValidBase642(data) { + if (data === "") + return true; + if (data.length % 4 !== 0) + return false; + try { + atob(data); + return true; + } catch { + return false; + } +} +function isValidBase64URL2(data) { + if (!base64url2.test(data)) + return false; + const base646 = data.replace(/[-_]/g, (c) => c === "-" ? "+" : "/"); + const padded = base646.padEnd(Math.ceil(base646.length / 4) * 4, "="); + return isValidBase642(padded); +} +function isValidJWT4(token, algorithm = null) { + try { + const tokensParts = token.split("."); + if (tokensParts.length !== 3) + return false; + const [header] = tokensParts; + if (!header) + return false; + const parsedHeader = JSON.parse(atob(header)); + if ("typ" in parsedHeader && parsedHeader?.typ !== "JWT") + return false; + if (!parsedHeader.alg) + return false; + if (algorithm && (!("alg" in parsedHeader) || parsedHeader.alg !== algorithm)) + return false; + return true; + } catch { + return false; + } +} +function handleArrayResult2(result, final, index) { + if (result.issues.length) { + final.issues.push(...prefixIssues2(index, result.issues)); + } + final.value[index] = result.value; +} +function handlePropertyResult(result, final, key, input, isOptionalOut) { + if (result.issues.length) { + if (isOptionalOut && !(key in input)) { + return; + } + final.issues.push(...prefixIssues2(key, result.issues)); + } + if (result.value === void 0) { + if (key in input) { + final.value[key] = void 0; + } + } else { + final.value[key] = result.value; + } +} +function normalizeDef(def) { + const keys = Object.keys(def.shape); + for (const k of keys) { + if (!def.shape?.[k]?._zod?.traits?.has("$ZodType")) { + throw new Error(`Invalid element at key "${k}": expected a Zod schema`); + } + } + const okeys = optionalKeys2(def.shape); + return { + ...def, + keys, + keySet: new Set(keys), + numKeys: keys.length, + optionalKeys: new Set(okeys) + }; +} +function handleCatchall(proms, input, payload, ctx, def, inst) { + const unrecognized = []; + const keySet = def.keySet; + const _catchall = def.catchall._zod; + const t = _catchall.def.type; + const isOptionalOut = _catchall.optout === "optional"; + for (const key in input) { + if (keySet.has(key)) + continue; + if (t === "never") { + unrecognized.push(key); + continue; + } + const r = _catchall.run({ value: input[key], issues: [] }, ctx); + if (r instanceof Promise) { + proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input, isOptionalOut))); + } else { + handlePropertyResult(r, payload, key, input, isOptionalOut); + } + } + if (unrecognized.length) { + payload.issues.push({ + code: "unrecognized_keys", + keys: unrecognized, + input, + inst + }); + } + if (!proms.length) + return payload; + return Promise.all(proms).then(() => { + return payload; + }); +} +function handleUnionResults2(results, final, inst, ctx) { + for (const result of results) { + if (result.issues.length === 0) { + final.value = result.value; + return final; + } + } + const nonaborted = results.filter((r) => !aborted2(r)); + if (nonaborted.length === 1) { + final.value = nonaborted[0].value; + return nonaborted[0]; + } + final.issues.push({ + code: "invalid_union", + input: final.value, + inst, + errors: results.map((result) => result.issues.map((iss) => finalizeIssue2(iss, ctx, config2()))) + }); + return final; +} +function handleExclusiveUnionResults(results, final, inst, ctx) { + const successes = results.filter((r) => r.issues.length === 0); + if (successes.length === 1) { + final.value = successes[0].value; + return final; + } + if (successes.length === 0) { + final.issues.push({ + code: "invalid_union", + input: final.value, + inst, + errors: results.map((result) => result.issues.map((iss) => finalizeIssue2(iss, ctx, config2()))) + }); + } else { + final.issues.push({ + code: "invalid_union", + input: final.value, + inst, + errors: [], + inclusive: false + }); + } + return final; +} +function mergeValues4(a, b) { + if (a === b) { + return { valid: true, data: a }; + } + if (a instanceof Date && b instanceof Date && +a === +b) { + return { valid: true, data: a }; + } + if (isPlainObject5(a) && isPlainObject5(b)) { + const bKeys = Object.keys(b); + const sharedKeys = Object.keys(a).filter((key) => bKeys.indexOf(key) !== -1); + const newObj = { ...a, ...b }; + for (const key of sharedKeys) { + const sharedValue = mergeValues4(a[key], b[key]); + if (!sharedValue.valid) { + return { + valid: false, + mergeErrorPath: [key, ...sharedValue.mergeErrorPath] + }; + } + newObj[key] = sharedValue.data; + } + return { valid: true, data: newObj }; + } + if (Array.isArray(a) && Array.isArray(b)) { + if (a.length !== b.length) { + return { valid: false, mergeErrorPath: [] }; + } + const newArray = []; + for (let index = 0; index < a.length; index++) { + const itemA = a[index]; + const itemB = b[index]; + const sharedValue = mergeValues4(itemA, itemB); + if (!sharedValue.valid) { + return { + valid: false, + mergeErrorPath: [index, ...sharedValue.mergeErrorPath] + }; + } + newArray.push(sharedValue.data); + } + return { valid: true, data: newArray }; + } + return { valid: false, mergeErrorPath: [] }; +} +function handleIntersectionResults2(result, left, right) { + const unrecKeys = /* @__PURE__ */ new Map(); + let unrecIssue; + for (const iss of left.issues) { + if (iss.code === "unrecognized_keys") { + unrecIssue ?? (unrecIssue = iss); + for (const k of iss.keys) { + if (!unrecKeys.has(k)) + unrecKeys.set(k, {}); + unrecKeys.get(k).l = true; + } + } else { + result.issues.push(iss); + } + } + for (const iss of right.issues) { + if (iss.code === "unrecognized_keys") { + for (const k of iss.keys) { + if (!unrecKeys.has(k)) + unrecKeys.set(k, {}); + unrecKeys.get(k).r = true; + } + } else { + result.issues.push(iss); + } + } + const bothKeys = [...unrecKeys].filter(([, f]) => f.l && f.r).map(([k]) => k); + if (bothKeys.length && unrecIssue) { + result.issues.push({ ...unrecIssue, keys: bothKeys }); + } + if (aborted2(result)) + return result; + const merged = mergeValues4(left.value, right.value); + if (!merged.valid) { + throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(merged.mergeErrorPath)}`); + } + result.value = merged.data; + return result; +} +function handleTupleResult(result, final, index) { + if (result.issues.length) { + final.issues.push(...prefixIssues2(index, result.issues)); + } + final.value[index] = result.value; +} +function handleMapResult(keyResult, valueResult, final, key, input, inst, ctx) { + if (keyResult.issues.length) { + if (propertyKeyTypes2.has(typeof key)) { + final.issues.push(...prefixIssues2(key, keyResult.issues)); + } else { + final.issues.push({ + code: "invalid_key", + origin: "map", + input, + inst, + issues: keyResult.issues.map((iss) => finalizeIssue2(iss, ctx, config2())) + }); + } + } + if (valueResult.issues.length) { + if (propertyKeyTypes2.has(typeof key)) { + final.issues.push(...prefixIssues2(key, valueResult.issues)); + } else { + final.issues.push({ + origin: "map", + code: "invalid_element", + input, + inst, + key, + issues: valueResult.issues.map((iss) => finalizeIssue2(iss, ctx, config2())) + }); + } + } + final.value.set(keyResult.value, valueResult.value); +} +function handleSetResult(result, final) { + if (result.issues.length) { + final.issues.push(...result.issues); + } + final.value.add(result.value); +} +function handleOptionalResult(result, input) { + if (result.issues.length && input === void 0) { + return { issues: [], value: void 0 }; + } + return result; +} +function handleDefaultResult2(payload, def) { + if (payload.value === void 0) { + payload.value = def.defaultValue; + } + return payload; +} +function handleNonOptionalResult2(payload, inst) { + if (!payload.issues.length && payload.value === void 0) { + payload.issues.push({ + code: "invalid_type", + expected: "nonoptional", + input: payload.value, + inst + }); + } + return payload; +} +function handlePipeResult2(left, next2, ctx) { + if (left.issues.length) { + left.aborted = true; + return left; + } + return next2._zod.run({ value: left.value, issues: left.issues }, ctx); +} +function handleCodecAResult(result, def, ctx) { + if (result.issues.length) { + result.aborted = true; + return result; + } + const direction = ctx.direction || "forward"; + if (direction === "forward") { + const transformed = def.transform(result.value, result); + if (transformed instanceof Promise) { + return transformed.then((value2) => handleCodecTxResult(result, value2, def.out, ctx)); + } + return handleCodecTxResult(result, transformed, def.out, ctx); + } else { + const transformed = def.reverseTransform(result.value, result); + if (transformed instanceof Promise) { + return transformed.then((value2) => handleCodecTxResult(result, value2, def.in, ctx)); + } + return handleCodecTxResult(result, transformed, def.in, ctx); + } +} +function handleCodecTxResult(left, value2, nextSchema, ctx) { + if (left.issues.length) { + left.aborted = true; + return left; + } + return nextSchema._zod.run({ value: value2, issues: left.issues }, ctx); +} +function handleReadonlyResult2(payload) { + payload.value = Object.freeze(payload.value); + return payload; +} +function handleRefineResult2(result, payload, input, inst) { + if (!result) { + const _iss = { + code: "custom", + input, + inst, + // incorporates params.error into issue reporting + path: [...inst._zod.def.path ?? []], + // incorporates params.error into issue reporting + continue: !inst._zod.def.abort + // params: inst._zod.def.params, + }; + if (inst._zod.def.params) + _iss.params = inst._zod.def.params; + payload.issues.push(issue2(_iss)); + } +} +var $ZodType2, $ZodString2, $ZodStringFormat2, $ZodGUID2, $ZodUUID2, $ZodEmail2, $ZodURL2, $ZodEmoji2, $ZodNanoID2, $ZodCUID3, $ZodCUID22, $ZodULID2, $ZodXID2, $ZodKSUID2, $ZodISODateTime2, $ZodISODate2, $ZodISOTime2, $ZodISODuration2, $ZodIPv42, $ZodIPv62, $ZodMAC, $ZodCIDRv42, $ZodCIDRv62, $ZodBase642, $ZodBase64URL2, $ZodE1642, $ZodJWT2, $ZodCustomStringFormat, $ZodNumber2, $ZodNumberFormat2, $ZodBoolean2, $ZodBigInt, $ZodBigIntFormat, $ZodSymbol, $ZodUndefined, $ZodNull2, $ZodAny, $ZodUnknown2, $ZodNever2, $ZodVoid, $ZodDate, $ZodArray2, $ZodObject2, $ZodObjectJIT, $ZodUnion2, $ZodXor, $ZodDiscriminatedUnion2, $ZodIntersection2, $ZodTuple, $ZodRecord2, $ZodMap, $ZodSet, $ZodEnum2, $ZodLiteral2, $ZodFile, $ZodTransform2, $ZodOptional2, $ZodExactOptional, $ZodNullable2, $ZodDefault2, $ZodPrefault2, $ZodNonOptional2, $ZodSuccess, $ZodCatch2, $ZodNaN, $ZodPipe2, $ZodCodec, $ZodReadonly2, $ZodTemplateLiteral, $ZodFunction, $ZodPromise, $ZodLazy, $ZodCustom2; +var init_schemas = __esm({ + "../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/core/schemas.js"() { + init_checks(); + init_core(); + init_doc(); + init_parse(); + init_regexes(); + init_util2(); + init_versions(); + init_util2(); + $ZodType2 = /* @__PURE__ */ $constructor2("$ZodType", (inst, def) => { + var _a2; + inst ?? (inst = {}); + inst._zod.def = def; + inst._zod.bag = inst._zod.bag || {}; + inst._zod.version = version2; + const checks = [...inst._zod.def.checks ?? []]; + if (inst._zod.traits.has("$ZodCheck")) { + checks.unshift(inst); + } + for (const ch of checks) { + for (const fn2 of ch._zod.onattach) { + fn2(inst); } - return base; - }; - var digitToBasic = function digitToBasic2(digit, flag) { - return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5); - }; - var adapt = function adapt2(delta, numPoints, firstTime) { - var k = 0; - delta = firstTime ? floor(delta / damp) : delta >> 1; - delta += floor(delta / numPoints); - for ( - ; - /* no initialization */ - delta > baseMinusTMin * tMax >> 1; - k += base - ) { - delta = floor(delta / baseMinusTMin); - } - return floor(k + (baseMinusTMin + 1) * delta / (delta + skew)); - }; - var decode = function decode2(input) { - var output = []; - var inputLength = input.length; - var i = 0; - var n = initialN; - var bias = initialBias; - var basic = input.lastIndexOf(delimiter); - if (basic < 0) { - basic = 0; - } - for (var j = 0; j < basic; ++j) { - if (input.charCodeAt(j) >= 128) { - error$1("not-basic"); + } + if (checks.length === 0) { + (_a2 = inst._zod).deferred ?? (_a2.deferred = []); + inst._zod.deferred?.push(() => { + inst._zod.run = inst._zod.parse; + }); + } else { + const runChecks = (payload, checks2, ctx) => { + let isAborted3 = aborted2(payload); + let asyncResult; + for (const ch of checks2) { + if (ch._zod.def.when) { + const shouldRun = ch._zod.def.when(payload); + if (!shouldRun) + continue; + } else if (isAborted3) { + continue; + } + const currLen = payload.issues.length; + const _ = ch._zod.check(payload); + if (_ instanceof Promise && ctx?.async === false) { + throw new $ZodAsyncError2(); + } + if (asyncResult || _ instanceof Promise) { + asyncResult = (asyncResult ?? Promise.resolve()).then(async () => { + await _; + const nextLen = payload.issues.length; + if (nextLen === currLen) + return; + if (!isAborted3) + isAborted3 = aborted2(payload, currLen); + }); + } else { + const nextLen = payload.issues.length; + if (nextLen === currLen) + continue; + if (!isAborted3) + isAborted3 = aborted2(payload, currLen); + } } - output.push(input.charCodeAt(j)); + if (asyncResult) { + return asyncResult.then(() => { + return payload; + }); + } + return payload; + }; + const handleCanaryResult = (canary, payload, ctx) => { + if (aborted2(canary)) { + canary.aborted = true; + return canary; + } + const checkResult = runChecks(payload, checks, ctx); + if (checkResult instanceof Promise) { + if (ctx.async === false) + throw new $ZodAsyncError2(); + return checkResult.then((checkResult2) => inst._zod.parse(checkResult2, ctx)); + } + return inst._zod.parse(checkResult, ctx); + }; + inst._zod.run = (payload, ctx) => { + if (ctx.skipChecks) { + return inst._zod.parse(payload, ctx); + } + if (ctx.direction === "backward") { + const canary = inst._zod.parse({ value: payload.value, issues: [] }, { ...ctx, skipChecks: true }); + if (canary instanceof Promise) { + return canary.then((canary2) => { + return handleCanaryResult(canary2, payload, ctx); + }); + } + return handleCanaryResult(canary, payload, ctx); + } + const result = inst._zod.parse(payload, ctx); + if (result instanceof Promise) { + if (ctx.async === false) + throw new $ZodAsyncError2(); + return result.then((result2) => runChecks(result2, checks, ctx)); + } + return runChecks(result, checks, ctx); + }; + } + defineLazy2(inst, "~standard", () => ({ + validate: (value2) => { + try { + const r = safeParse4(inst, value2); + return r.success ? { value: r.data } : { issues: r.error?.issues }; + } catch (_) { + return safeParseAsync2(inst, value2).then((r) => r.success ? { value: r.data } : { issues: r.error?.issues }); + } + }, + vendor: "zod", + version: 1 + })); + }); + $ZodString2 = /* @__PURE__ */ $constructor2("$ZodString", (inst, def) => { + $ZodType2.init(inst, def); + inst._zod.pattern = [...inst?._zod.bag?.patterns ?? []].pop() ?? string4(inst._zod.bag); + inst._zod.parse = (payload, _) => { + if (def.coerce) + try { + payload.value = String(payload.value); + } catch (_2) { + } + if (typeof payload.value === "string") + return payload; + payload.issues.push({ + expected: "string", + code: "invalid_type", + input: payload.value, + inst + }); + return payload; + }; + }); + $ZodStringFormat2 = /* @__PURE__ */ $constructor2("$ZodStringFormat", (inst, def) => { + $ZodCheckStringFormat2.init(inst, def); + $ZodString2.init(inst, def); + }); + $ZodGUID2 = /* @__PURE__ */ $constructor2("$ZodGUID", (inst, def) => { + def.pattern ?? (def.pattern = guid2); + $ZodStringFormat2.init(inst, def); + }); + $ZodUUID2 = /* @__PURE__ */ $constructor2("$ZodUUID", (inst, def) => { + if (def.version) { + const versionMap = { + v1: 1, + v2: 2, + v3: 3, + v4: 4, + v5: 5, + v6: 6, + v7: 7, + v8: 8 + }; + const v = versionMap[def.version]; + if (v === void 0) + throw new Error(`Invalid UUID version: "${def.version}"`); + def.pattern ?? (def.pattern = uuid3(v)); + } else + def.pattern ?? (def.pattern = uuid3()); + $ZodStringFormat2.init(inst, def); + }); + $ZodEmail2 = /* @__PURE__ */ $constructor2("$ZodEmail", (inst, def) => { + def.pattern ?? (def.pattern = email3); + $ZodStringFormat2.init(inst, def); + }); + $ZodURL2 = /* @__PURE__ */ $constructor2("$ZodURL", (inst, def) => { + $ZodStringFormat2.init(inst, def); + inst._zod.check = (payload) => { + try { + const trimmed = payload.value.trim(); + const url4 = new URL(trimmed); + if (def.hostname) { + def.hostname.lastIndex = 0; + if (!def.hostname.test(url4.hostname)) { + payload.issues.push({ + code: "invalid_format", + format: "url", + note: "Invalid hostname", + pattern: def.hostname.source, + input: payload.value, + inst, + continue: !def.abort + }); + } + } + if (def.protocol) { + def.protocol.lastIndex = 0; + if (!def.protocol.test(url4.protocol.endsWith(":") ? url4.protocol.slice(0, -1) : url4.protocol)) { + payload.issues.push({ + code: "invalid_format", + format: "url", + note: "Invalid protocol", + pattern: def.protocol.source, + input: payload.value, + inst, + continue: !def.abort + }); + } + } + if (def.normalize) { + payload.value = url4.href; + } else { + payload.value = trimmed; + } + return; + } catch (_) { + payload.issues.push({ + code: "invalid_format", + format: "url", + input: payload.value, + inst, + continue: !def.abort + }); } - for (var index = basic > 0 ? basic + 1 : 0; index < inputLength; ) { - var oldi = i; - for ( - var w = 1, k = base; - ; - /* no condition */ - k += base - ) { - if (index >= inputLength) { - error$1("invalid-input"); + }; + }); + $ZodEmoji2 = /* @__PURE__ */ $constructor2("$ZodEmoji", (inst, def) => { + def.pattern ?? (def.pattern = emoji2()); + $ZodStringFormat2.init(inst, def); + }); + $ZodNanoID2 = /* @__PURE__ */ $constructor2("$ZodNanoID", (inst, def) => { + def.pattern ?? (def.pattern = nanoid2); + $ZodStringFormat2.init(inst, def); + }); + $ZodCUID3 = /* @__PURE__ */ $constructor2("$ZodCUID", (inst, def) => { + def.pattern ?? (def.pattern = cuid3); + $ZodStringFormat2.init(inst, def); + }); + $ZodCUID22 = /* @__PURE__ */ $constructor2("$ZodCUID2", (inst, def) => { + def.pattern ?? (def.pattern = cuid22); + $ZodStringFormat2.init(inst, def); + }); + $ZodULID2 = /* @__PURE__ */ $constructor2("$ZodULID", (inst, def) => { + def.pattern ?? (def.pattern = ulid2); + $ZodStringFormat2.init(inst, def); + }); + $ZodXID2 = /* @__PURE__ */ $constructor2("$ZodXID", (inst, def) => { + def.pattern ?? (def.pattern = xid2); + $ZodStringFormat2.init(inst, def); + }); + $ZodKSUID2 = /* @__PURE__ */ $constructor2("$ZodKSUID", (inst, def) => { + def.pattern ?? (def.pattern = ksuid2); + $ZodStringFormat2.init(inst, def); + }); + $ZodISODateTime2 = /* @__PURE__ */ $constructor2("$ZodISODateTime", (inst, def) => { + def.pattern ?? (def.pattern = datetime3(def)); + $ZodStringFormat2.init(inst, def); + }); + $ZodISODate2 = /* @__PURE__ */ $constructor2("$ZodISODate", (inst, def) => { + def.pattern ?? (def.pattern = date3); + $ZodStringFormat2.init(inst, def); + }); + $ZodISOTime2 = /* @__PURE__ */ $constructor2("$ZodISOTime", (inst, def) => { + def.pattern ?? (def.pattern = time3(def)); + $ZodStringFormat2.init(inst, def); + }); + $ZodISODuration2 = /* @__PURE__ */ $constructor2("$ZodISODuration", (inst, def) => { + def.pattern ?? (def.pattern = duration3); + $ZodStringFormat2.init(inst, def); + }); + $ZodIPv42 = /* @__PURE__ */ $constructor2("$ZodIPv4", (inst, def) => { + def.pattern ?? (def.pattern = ipv42); + $ZodStringFormat2.init(inst, def); + inst._zod.bag.format = `ipv4`; + }); + $ZodIPv62 = /* @__PURE__ */ $constructor2("$ZodIPv6", (inst, def) => { + def.pattern ?? (def.pattern = ipv62); + $ZodStringFormat2.init(inst, def); + inst._zod.bag.format = `ipv6`; + inst._zod.check = (payload) => { + try { + new URL(`http://[${payload.value}]`); + } catch { + payload.issues.push({ + code: "invalid_format", + format: "ipv6", + input: payload.value, + inst, + continue: !def.abort + }); + } + }; + }); + $ZodMAC = /* @__PURE__ */ $constructor2("$ZodMAC", (inst, def) => { + def.pattern ?? (def.pattern = mac(def.delimiter)); + $ZodStringFormat2.init(inst, def); + inst._zod.bag.format = `mac`; + }); + $ZodCIDRv42 = /* @__PURE__ */ $constructor2("$ZodCIDRv4", (inst, def) => { + def.pattern ?? (def.pattern = cidrv42); + $ZodStringFormat2.init(inst, def); + }); + $ZodCIDRv62 = /* @__PURE__ */ $constructor2("$ZodCIDRv6", (inst, def) => { + def.pattern ?? (def.pattern = cidrv62); + $ZodStringFormat2.init(inst, def); + inst._zod.check = (payload) => { + const parts = payload.value.split("/"); + try { + if (parts.length !== 2) + throw new Error(); + const [address, prefix] = parts; + if (!prefix) + throw new Error(); + const prefixNum = Number(prefix); + if (`${prefixNum}` !== prefix) + throw new Error(); + if (prefixNum < 0 || prefixNum > 128) + throw new Error(); + new URL(`http://[${address}]`); + } catch { + payload.issues.push({ + code: "invalid_format", + format: "cidrv6", + input: payload.value, + inst, + continue: !def.abort + }); + } + }; + }); + $ZodBase642 = /* @__PURE__ */ $constructor2("$ZodBase64", (inst, def) => { + def.pattern ?? (def.pattern = base643); + $ZodStringFormat2.init(inst, def); + inst._zod.bag.contentEncoding = "base64"; + inst._zod.check = (payload) => { + if (isValidBase642(payload.value)) + return; + payload.issues.push({ + code: "invalid_format", + format: "base64", + input: payload.value, + inst, + continue: !def.abort + }); + }; + }); + $ZodBase64URL2 = /* @__PURE__ */ $constructor2("$ZodBase64URL", (inst, def) => { + def.pattern ?? (def.pattern = base64url2); + $ZodStringFormat2.init(inst, def); + inst._zod.bag.contentEncoding = "base64url"; + inst._zod.check = (payload) => { + if (isValidBase64URL2(payload.value)) + return; + payload.issues.push({ + code: "invalid_format", + format: "base64url", + input: payload.value, + inst, + continue: !def.abort + }); + }; + }); + $ZodE1642 = /* @__PURE__ */ $constructor2("$ZodE164", (inst, def) => { + def.pattern ?? (def.pattern = e1642); + $ZodStringFormat2.init(inst, def); + }); + $ZodJWT2 = /* @__PURE__ */ $constructor2("$ZodJWT", (inst, def) => { + $ZodStringFormat2.init(inst, def); + inst._zod.check = (payload) => { + if (isValidJWT4(payload.value, def.alg)) + return; + payload.issues.push({ + code: "invalid_format", + format: "jwt", + input: payload.value, + inst, + continue: !def.abort + }); + }; + }); + $ZodCustomStringFormat = /* @__PURE__ */ $constructor2("$ZodCustomStringFormat", (inst, def) => { + $ZodStringFormat2.init(inst, def); + inst._zod.check = (payload) => { + if (def.fn(payload.value)) + return; + payload.issues.push({ + code: "invalid_format", + format: def.format, + input: payload.value, + inst, + continue: !def.abort + }); + }; + }); + $ZodNumber2 = /* @__PURE__ */ $constructor2("$ZodNumber", (inst, def) => { + $ZodType2.init(inst, def); + inst._zod.pattern = inst._zod.bag.pattern ?? number4; + inst._zod.parse = (payload, _ctx) => { + if (def.coerce) + try { + payload.value = Number(payload.value); + } catch (_) { + } + const input = payload.value; + if (typeof input === "number" && !Number.isNaN(input) && Number.isFinite(input)) { + return payload; + } + const received = typeof input === "number" ? Number.isNaN(input) ? "NaN" : !Number.isFinite(input) ? "Infinity" : void 0 : void 0; + payload.issues.push({ + expected: "number", + code: "invalid_type", + input, + inst, + ...received ? { received } : {} + }); + return payload; + }; + }); + $ZodNumberFormat2 = /* @__PURE__ */ $constructor2("$ZodNumberFormat", (inst, def) => { + $ZodCheckNumberFormat2.init(inst, def); + $ZodNumber2.init(inst, def); + }); + $ZodBoolean2 = /* @__PURE__ */ $constructor2("$ZodBoolean", (inst, def) => { + $ZodType2.init(inst, def); + inst._zod.pattern = boolean3; + inst._zod.parse = (payload, _ctx) => { + if (def.coerce) + try { + payload.value = Boolean(payload.value); + } catch (_) { + } + const input = payload.value; + if (typeof input === "boolean") + return payload; + payload.issues.push({ + expected: "boolean", + code: "invalid_type", + input, + inst + }); + return payload; + }; + }); + $ZodBigInt = /* @__PURE__ */ $constructor2("$ZodBigInt", (inst, def) => { + $ZodType2.init(inst, def); + inst._zod.pattern = bigint; + inst._zod.parse = (payload, _ctx) => { + if (def.coerce) + try { + payload.value = BigInt(payload.value); + } catch (_) { + } + if (typeof payload.value === "bigint") + return payload; + payload.issues.push({ + expected: "bigint", + code: "invalid_type", + input: payload.value, + inst + }); + return payload; + }; + }); + $ZodBigIntFormat = /* @__PURE__ */ $constructor2("$ZodBigIntFormat", (inst, def) => { + $ZodCheckBigIntFormat.init(inst, def); + $ZodBigInt.init(inst, def); + }); + $ZodSymbol = /* @__PURE__ */ $constructor2("$ZodSymbol", (inst, def) => { + $ZodType2.init(inst, def); + inst._zod.parse = (payload, _ctx) => { + const input = payload.value; + if (typeof input === "symbol") + return payload; + payload.issues.push({ + expected: "symbol", + code: "invalid_type", + input, + inst + }); + return payload; + }; + }); + $ZodUndefined = /* @__PURE__ */ $constructor2("$ZodUndefined", (inst, def) => { + $ZodType2.init(inst, def); + inst._zod.pattern = _undefined; + inst._zod.values = /* @__PURE__ */ new Set([void 0]); + inst._zod.optin = "optional"; + inst._zod.optout = "optional"; + inst._zod.parse = (payload, _ctx) => { + const input = payload.value; + if (typeof input === "undefined") + return payload; + payload.issues.push({ + expected: "undefined", + code: "invalid_type", + input, + inst + }); + return payload; + }; + }); + $ZodNull2 = /* @__PURE__ */ $constructor2("$ZodNull", (inst, def) => { + $ZodType2.init(inst, def); + inst._zod.pattern = _null4; + inst._zod.values = /* @__PURE__ */ new Set([null]); + inst._zod.parse = (payload, _ctx) => { + const input = payload.value; + if (input === null) + return payload; + payload.issues.push({ + expected: "null", + code: "invalid_type", + input, + inst + }); + return payload; + }; + }); + $ZodAny = /* @__PURE__ */ $constructor2("$ZodAny", (inst, def) => { + $ZodType2.init(inst, def); + inst._zod.parse = (payload) => payload; + }); + $ZodUnknown2 = /* @__PURE__ */ $constructor2("$ZodUnknown", (inst, def) => { + $ZodType2.init(inst, def); + inst._zod.parse = (payload) => payload; + }); + $ZodNever2 = /* @__PURE__ */ $constructor2("$ZodNever", (inst, def) => { + $ZodType2.init(inst, def); + inst._zod.parse = (payload, _ctx) => { + payload.issues.push({ + expected: "never", + code: "invalid_type", + input: payload.value, + inst + }); + return payload; + }; + }); + $ZodVoid = /* @__PURE__ */ $constructor2("$ZodVoid", (inst, def) => { + $ZodType2.init(inst, def); + inst._zod.parse = (payload, _ctx) => { + const input = payload.value; + if (typeof input === "undefined") + return payload; + payload.issues.push({ + expected: "void", + code: "invalid_type", + input, + inst + }); + return payload; + }; + }); + $ZodDate = /* @__PURE__ */ $constructor2("$ZodDate", (inst, def) => { + $ZodType2.init(inst, def); + inst._zod.parse = (payload, _ctx) => { + if (def.coerce) { + try { + payload.value = new Date(payload.value); + } catch (_err) { + } + } + const input = payload.value; + const isDate = input instanceof Date; + const isValidDate2 = isDate && !Number.isNaN(input.getTime()); + if (isValidDate2) + return payload; + payload.issues.push({ + expected: "date", + code: "invalid_type", + input, + ...isDate ? { received: "Invalid Date" } : {}, + inst + }); + return payload; + }; + }); + $ZodArray2 = /* @__PURE__ */ $constructor2("$ZodArray", (inst, def) => { + $ZodType2.init(inst, def); + inst._zod.parse = (payload, ctx) => { + const input = payload.value; + if (!Array.isArray(input)) { + payload.issues.push({ + expected: "array", + code: "invalid_type", + input, + inst + }); + return payload; + } + payload.value = Array(input.length); + const proms = []; + for (let i = 0; i < input.length; i++) { + const item = input[i]; + const result = def.element._zod.run({ + value: item, + issues: [] + }, ctx); + if (result instanceof Promise) { + proms.push(result.then((result2) => handleArrayResult2(result2, payload, i))); + } else { + handleArrayResult2(result, payload, i); + } + } + if (proms.length) { + return Promise.all(proms).then(() => payload); + } + return payload; + }; + }); + $ZodObject2 = /* @__PURE__ */ $constructor2("$ZodObject", (inst, def) => { + $ZodType2.init(inst, def); + const desc = Object.getOwnPropertyDescriptor(def, "shape"); + if (!desc?.get) { + const sh = def.shape; + Object.defineProperty(def, "shape", { + get: () => { + const newSh = { ...sh }; + Object.defineProperty(def, "shape", { + value: newSh + }); + return newSh; + } + }); + } + const _normalized = cached4(() => normalizeDef(def)); + defineLazy2(inst._zod, "propValues", () => { + const shape = def.shape; + const propValues = {}; + for (const key in shape) { + const field = shape[key]._zod; + if (field.values) { + propValues[key] ?? (propValues[key] = /* @__PURE__ */ new Set()); + for (const v of field.values) + propValues[key].add(v); + } + } + return propValues; + }); + const isObject6 = isObject3; + const catchall = def.catchall; + let value2; + inst._zod.parse = (payload, ctx) => { + value2 ?? (value2 = _normalized.value); + const input = payload.value; + if (!isObject6(input)) { + payload.issues.push({ + expected: "object", + code: "invalid_type", + input, + inst + }); + return payload; + } + payload.value = {}; + const proms = []; + const shape = value2.shape; + for (const key of value2.keys) { + const el = shape[key]; + const isOptionalOut = el._zod.optout === "optional"; + const r = el._zod.run({ value: input[key], issues: [] }, ctx); + if (r instanceof Promise) { + proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input, isOptionalOut))); + } else { + handlePropertyResult(r, payload, key, input, isOptionalOut); + } + } + if (!catchall) { + return proms.length ? Promise.all(proms).then(() => payload) : payload; + } + return handleCatchall(proms, input, payload, ctx, _normalized.value, inst); + }; + }); + $ZodObjectJIT = /* @__PURE__ */ $constructor2("$ZodObjectJIT", (inst, def) => { + $ZodObject2.init(inst, def); + const superParse = inst._zod.parse; + const _normalized = cached4(() => normalizeDef(def)); + const generateFastpass = (shape) => { + const doc = new Doc2(["shape", "payload", "ctx"]); + const normalized = _normalized.value; + const parseStr = (key) => { + const k = esc2(key); + return `shape[${k}]._zod.run({ value: input[${k}], issues: [] }, ctx)`; + }; + doc.write(`const input = payload.value;`); + const ids = /* @__PURE__ */ Object.create(null); + let counter = 0; + for (const key of normalized.keys) { + ids[key] = `key_${counter++}`; + } + doc.write(`const newResult = {};`); + for (const key of normalized.keys) { + const id = ids[key]; + const k = esc2(key); + const schema2 = shape[key]; + const isOptionalOut = schema2?._zod?.optout === "optional"; + doc.write(`const ${id} = ${parseStr(key)};`); + if (isOptionalOut) { + doc.write(` + if (${id}.issues.length) { + if (${k} in input) { + payload.issues = payload.issues.concat(${id}.issues.map(iss => ({ + ...iss, + path: iss.path ? [${k}, ...iss.path] : [${k}] + }))); + } + } + + if (${id}.value === undefined) { + if (${k} in input) { + newResult[${k}] = undefined; + } + } else { + newResult[${k}] = ${id}.value; + } + + `); + } else { + doc.write(` + if (${id}.issues.length) { + payload.issues = payload.issues.concat(${id}.issues.map(iss => ({ + ...iss, + path: iss.path ? [${k}, ...iss.path] : [${k}] + }))); + } + + if (${id}.value === undefined) { + if (${k} in input) { + newResult[${k}] = undefined; + } + } else { + newResult[${k}] = ${id}.value; + } + + `); + } + } + doc.write(`payload.value = newResult;`); + doc.write(`return payload;`); + const fn2 = doc.compile(); + return (payload, ctx) => fn2(shape, payload, ctx); + }; + let fastpass; + const isObject6 = isObject3; + const jit = !globalConfig2.jitless; + const allowsEval4 = allowsEval2; + const fastEnabled = jit && allowsEval4.value; + const catchall = def.catchall; + let value2; + inst._zod.parse = (payload, ctx) => { + value2 ?? (value2 = _normalized.value); + const input = payload.value; + if (!isObject6(input)) { + payload.issues.push({ + expected: "object", + code: "invalid_type", + input, + inst + }); + return payload; + } + if (jit && fastEnabled && ctx?.async === false && ctx.jitless !== true) { + if (!fastpass) + fastpass = generateFastpass(def.shape); + payload = fastpass(payload, ctx); + if (!catchall) + return payload; + return handleCatchall([], input, payload, ctx, value2, inst); + } + return superParse(payload, ctx); + }; + }); + $ZodUnion2 = /* @__PURE__ */ $constructor2("$ZodUnion", (inst, def) => { + $ZodType2.init(inst, def); + defineLazy2(inst._zod, "optin", () => def.options.some((o) => o._zod.optin === "optional") ? "optional" : void 0); + defineLazy2(inst._zod, "optout", () => def.options.some((o) => o._zod.optout === "optional") ? "optional" : void 0); + defineLazy2(inst._zod, "values", () => { + if (def.options.every((o) => o._zod.values)) { + return new Set(def.options.flatMap((option) => Array.from(option._zod.values))); + } + return void 0; + }); + defineLazy2(inst._zod, "pattern", () => { + if (def.options.every((o) => o._zod.pattern)) { + const patterns = def.options.map((o) => o._zod.pattern); + return new RegExp(`^(${patterns.map((p) => cleanRegex2(p.source)).join("|")})$`); + } + return void 0; + }); + const single = def.options.length === 1; + const first = def.options[0]._zod.run; + inst._zod.parse = (payload, ctx) => { + if (single) { + return first(payload, ctx); + } + let async = false; + const results = []; + for (const option of def.options) { + const result = option._zod.run({ + value: payload.value, + issues: [] + }, ctx); + if (result instanceof Promise) { + results.push(result); + async = true; + } else { + if (result.issues.length === 0) + return result; + results.push(result); + } + } + if (!async) + return handleUnionResults2(results, payload, inst, ctx); + return Promise.all(results).then((results2) => { + return handleUnionResults2(results2, payload, inst, ctx); + }); + }; + }); + $ZodXor = /* @__PURE__ */ $constructor2("$ZodXor", (inst, def) => { + $ZodUnion2.init(inst, def); + def.inclusive = false; + const single = def.options.length === 1; + const first = def.options[0]._zod.run; + inst._zod.parse = (payload, ctx) => { + if (single) { + return first(payload, ctx); + } + let async = false; + const results = []; + for (const option of def.options) { + const result = option._zod.run({ + value: payload.value, + issues: [] + }, ctx); + if (result instanceof Promise) { + results.push(result); + async = true; + } else { + results.push(result); + } + } + if (!async) + return handleExclusiveUnionResults(results, payload, inst, ctx); + return Promise.all(results).then((results2) => { + return handleExclusiveUnionResults(results2, payload, inst, ctx); + }); + }; + }); + $ZodDiscriminatedUnion2 = /* @__PURE__ */ $constructor2("$ZodDiscriminatedUnion", (inst, def) => { + def.inclusive = false; + $ZodUnion2.init(inst, def); + const _super = inst._zod.parse; + defineLazy2(inst._zod, "propValues", () => { + const propValues = {}; + for (const option of def.options) { + const pv = option._zod.propValues; + if (!pv || Object.keys(pv).length === 0) + throw new Error(`Invalid discriminated union option at index "${def.options.indexOf(option)}"`); + for (const [k, v] of Object.entries(pv)) { + if (!propValues[k]) + propValues[k] = /* @__PURE__ */ new Set(); + for (const val of v) { + propValues[k].add(val); } - var digit = basicToDigit(input.charCodeAt(index++)); - if (digit >= base || digit > floor((maxInt - i) / w)) { - error$1("overflow"); + } + } + return propValues; + }); + const disc = cached4(() => { + const opts = def.options; + const map2 = /* @__PURE__ */ new Map(); + for (const o of opts) { + const values = o._zod.propValues?.[def.discriminator]; + if (!values || values.size === 0) + throw new Error(`Invalid discriminated union option at index "${def.options.indexOf(o)}"`); + for (const v of values) { + if (map2.has(v)) { + throw new Error(`Duplicate discriminator value "${String(v)}"`); } - i += digit * w; - var t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias; - if (digit < t) { + map2.set(v, o); + } + } + return map2; + }); + inst._zod.parse = (payload, ctx) => { + const input = payload.value; + if (!isObject3(input)) { + payload.issues.push({ + code: "invalid_type", + expected: "object", + input, + inst + }); + return payload; + } + const opt = disc.value.get(input?.[def.discriminator]); + if (opt) { + return opt._zod.run(payload, ctx); + } + if (def.unionFallback) { + return _super(payload, ctx); + } + payload.issues.push({ + code: "invalid_union", + errors: [], + note: "No matching discriminator", + discriminator: def.discriminator, + input, + path: [def.discriminator], + inst + }); + return payload; + }; + }); + $ZodIntersection2 = /* @__PURE__ */ $constructor2("$ZodIntersection", (inst, def) => { + $ZodType2.init(inst, def); + inst._zod.parse = (payload, ctx) => { + const input = payload.value; + const left = def.left._zod.run({ value: input, issues: [] }, ctx); + const right = def.right._zod.run({ value: input, issues: [] }, ctx); + const async = left instanceof Promise || right instanceof Promise; + if (async) { + return Promise.all([left, right]).then(([left2, right2]) => { + return handleIntersectionResults2(payload, left2, right2); + }); + } + return handleIntersectionResults2(payload, left, right); + }; + }); + $ZodTuple = /* @__PURE__ */ $constructor2("$ZodTuple", (inst, def) => { + $ZodType2.init(inst, def); + const items = def.items; + inst._zod.parse = (payload, ctx) => { + const input = payload.value; + if (!Array.isArray(input)) { + payload.issues.push({ + input, + inst, + expected: "tuple", + code: "invalid_type" + }); + return payload; + } + payload.value = []; + const proms = []; + const reversedIndex = [...items].reverse().findIndex((item) => item._zod.optin !== "optional"); + const optStart = reversedIndex === -1 ? 0 : items.length - reversedIndex; + if (!def.rest) { + const tooBig = input.length > items.length; + const tooSmall = input.length < optStart - 1; + if (tooBig || tooSmall) { + payload.issues.push({ + ...tooBig ? { code: "too_big", maximum: items.length, inclusive: true } : { code: "too_small", minimum: items.length }, + input, + inst, + origin: "array" + }); + return payload; + } + } + let i = -1; + for (const item of items) { + i++; + if (i >= input.length) { + if (i >= optStart) + continue; + } + const result = item._zod.run({ + value: input[i], + issues: [] + }, ctx); + if (result instanceof Promise) { + proms.push(result.then((result2) => handleTupleResult(result2, payload, i))); + } else { + handleTupleResult(result, payload, i); + } + } + if (def.rest) { + const rest = input.slice(items.length); + for (const el of rest) { + i++; + const result = def.rest._zod.run({ + value: el, + issues: [] + }, ctx); + if (result instanceof Promise) { + proms.push(result.then((result2) => handleTupleResult(result2, payload, i))); + } else { + handleTupleResult(result, payload, i); + } + } + } + if (proms.length) + return Promise.all(proms).then(() => payload); + return payload; + }; + }); + $ZodRecord2 = /* @__PURE__ */ $constructor2("$ZodRecord", (inst, def) => { + $ZodType2.init(inst, def); + inst._zod.parse = (payload, ctx) => { + const input = payload.value; + if (!isPlainObject5(input)) { + payload.issues.push({ + expected: "record", + code: "invalid_type", + input, + inst + }); + return payload; + } + const proms = []; + const values = def.keyType._zod.values; + if (values) { + payload.value = {}; + const recordKeys = /* @__PURE__ */ new Set(); + for (const key of values) { + if (typeof key === "string" || typeof key === "number" || typeof key === "symbol") { + recordKeys.add(typeof key === "number" ? key.toString() : key); + const result = def.valueType._zod.run({ value: input[key], issues: [] }, ctx); + if (result instanceof Promise) { + proms.push(result.then((result2) => { + if (result2.issues.length) { + payload.issues.push(...prefixIssues2(key, result2.issues)); + } + payload.value[key] = result2.value; + })); + } else { + if (result.issues.length) { + payload.issues.push(...prefixIssues2(key, result.issues)); + } + payload.value[key] = result.value; + } + } + } + let unrecognized; + for (const key in input) { + if (!recordKeys.has(key)) { + unrecognized = unrecognized ?? []; + unrecognized.push(key); + } + } + if (unrecognized && unrecognized.length > 0) { + payload.issues.push({ + code: "unrecognized_keys", + input, + inst, + keys: unrecognized + }); + } + } else { + payload.value = {}; + for (const key of Reflect.ownKeys(input)) { + if (key === "__proto__") + continue; + let keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx); + if (keyResult instanceof Promise) { + throw new Error("Async schemas not supported in object keys currently"); + } + const checkNumericKey = typeof key === "string" && number4.test(key) && keyResult.issues.length && keyResult.issues.some((iss) => iss.code === "invalid_type" && iss.expected === "number"); + if (checkNumericKey) { + const retryResult = def.keyType._zod.run({ value: Number(key), issues: [] }, ctx); + if (retryResult instanceof Promise) { + throw new Error("Async schemas not supported in object keys currently"); + } + if (retryResult.issues.length === 0) { + keyResult = retryResult; + } + } + if (keyResult.issues.length) { + if (def.mode === "loose") { + payload.value[key] = input[key]; + } else { + payload.issues.push({ + code: "invalid_key", + origin: "record", + issues: keyResult.issues.map((iss) => finalizeIssue2(iss, ctx, config2())), + input: key, + path: [key], + inst + }); + } + continue; + } + const result = def.valueType._zod.run({ value: input[key], issues: [] }, ctx); + if (result instanceof Promise) { + proms.push(result.then((result2) => { + if (result2.issues.length) { + payload.issues.push(...prefixIssues2(key, result2.issues)); + } + payload.value[keyResult.value] = result2.value; + })); + } else { + if (result.issues.length) { + payload.issues.push(...prefixIssues2(key, result.issues)); + } + payload.value[keyResult.value] = result.value; + } + } + } + if (proms.length) { + return Promise.all(proms).then(() => payload); + } + return payload; + }; + }); + $ZodMap = /* @__PURE__ */ $constructor2("$ZodMap", (inst, def) => { + $ZodType2.init(inst, def); + inst._zod.parse = (payload, ctx) => { + const input = payload.value; + if (!(input instanceof Map)) { + payload.issues.push({ + expected: "map", + code: "invalid_type", + input, + inst + }); + return payload; + } + const proms = []; + payload.value = /* @__PURE__ */ new Map(); + for (const [key, value2] of input) { + const keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx); + const valueResult = def.valueType._zod.run({ value: value2, issues: [] }, ctx); + if (keyResult instanceof Promise || valueResult instanceof Promise) { + proms.push(Promise.all([keyResult, valueResult]).then(([keyResult2, valueResult2]) => { + handleMapResult(keyResult2, valueResult2, payload, key, input, inst, ctx); + })); + } else { + handleMapResult(keyResult, valueResult, payload, key, input, inst, ctx); + } + } + if (proms.length) + return Promise.all(proms).then(() => payload); + return payload; + }; + }); + $ZodSet = /* @__PURE__ */ $constructor2("$ZodSet", (inst, def) => { + $ZodType2.init(inst, def); + inst._zod.parse = (payload, ctx) => { + const input = payload.value; + if (!(input instanceof Set)) { + payload.issues.push({ + input, + inst, + expected: "set", + code: "invalid_type" + }); + return payload; + } + const proms = []; + payload.value = /* @__PURE__ */ new Set(); + for (const item of input) { + const result = def.valueType._zod.run({ value: item, issues: [] }, ctx); + if (result instanceof Promise) { + proms.push(result.then((result2) => handleSetResult(result2, payload))); + } else + handleSetResult(result, payload); + } + if (proms.length) + return Promise.all(proms).then(() => payload); + return payload; + }; + }); + $ZodEnum2 = /* @__PURE__ */ $constructor2("$ZodEnum", (inst, def) => { + $ZodType2.init(inst, def); + const values = getEnumValues2(def.entries); + const valuesSet = new Set(values); + inst._zod.values = valuesSet; + inst._zod.pattern = new RegExp(`^(${values.filter((k) => propertyKeyTypes2.has(typeof k)).map((o) => typeof o === "string" ? escapeRegex2(o) : o.toString()).join("|")})$`); + inst._zod.parse = (payload, _ctx) => { + const input = payload.value; + if (valuesSet.has(input)) { + return payload; + } + payload.issues.push({ + code: "invalid_value", + values, + input, + inst + }); + return payload; + }; + }); + $ZodLiteral2 = /* @__PURE__ */ $constructor2("$ZodLiteral", (inst, def) => { + $ZodType2.init(inst, def); + if (def.values.length === 0) { + throw new Error("Cannot create literal schema with no valid values"); + } + const values = new Set(def.values); + inst._zod.values = values; + inst._zod.pattern = new RegExp(`^(${def.values.map((o) => typeof o === "string" ? escapeRegex2(o) : o ? escapeRegex2(o.toString()) : String(o)).join("|")})$`); + inst._zod.parse = (payload, _ctx) => { + const input = payload.value; + if (values.has(input)) { + return payload; + } + payload.issues.push({ + code: "invalid_value", + values: def.values, + input, + inst + }); + return payload; + }; + }); + $ZodFile = /* @__PURE__ */ $constructor2("$ZodFile", (inst, def) => { + $ZodType2.init(inst, def); + inst._zod.parse = (payload, _ctx) => { + const input = payload.value; + if (input instanceof File) + return payload; + payload.issues.push({ + expected: "file", + code: "invalid_type", + input, + inst + }); + return payload; + }; + }); + $ZodTransform2 = /* @__PURE__ */ $constructor2("$ZodTransform", (inst, def) => { + $ZodType2.init(inst, def); + inst._zod.parse = (payload, ctx) => { + if (ctx.direction === "backward") { + throw new $ZodEncodeError(inst.constructor.name); + } + const _out = def.transform(payload.value, payload); + if (ctx.async) { + const output = _out instanceof Promise ? _out : Promise.resolve(_out); + return output.then((output2) => { + payload.value = output2; + return payload; + }); + } + if (_out instanceof Promise) { + throw new $ZodAsyncError2(); + } + payload.value = _out; + return payload; + }; + }); + $ZodOptional2 = /* @__PURE__ */ $constructor2("$ZodOptional", (inst, def) => { + $ZodType2.init(inst, def); + inst._zod.optin = "optional"; + inst._zod.optout = "optional"; + defineLazy2(inst._zod, "values", () => { + return def.innerType._zod.values ? /* @__PURE__ */ new Set([...def.innerType._zod.values, void 0]) : void 0; + }); + defineLazy2(inst._zod, "pattern", () => { + const pattern = def.innerType._zod.pattern; + return pattern ? new RegExp(`^(${cleanRegex2(pattern.source)})?$`) : void 0; + }); + inst._zod.parse = (payload, ctx) => { + if (def.innerType._zod.optin === "optional") { + const result = def.innerType._zod.run(payload, ctx); + if (result instanceof Promise) + return result.then((r) => handleOptionalResult(r, payload.value)); + return handleOptionalResult(result, payload.value); + } + if (payload.value === void 0) { + return payload; + } + return def.innerType._zod.run(payload, ctx); + }; + }); + $ZodExactOptional = /* @__PURE__ */ $constructor2("$ZodExactOptional", (inst, def) => { + $ZodOptional2.init(inst, def); + defineLazy2(inst._zod, "values", () => def.innerType._zod.values); + defineLazy2(inst._zod, "pattern", () => def.innerType._zod.pattern); + inst._zod.parse = (payload, ctx) => { + return def.innerType._zod.run(payload, ctx); + }; + }); + $ZodNullable2 = /* @__PURE__ */ $constructor2("$ZodNullable", (inst, def) => { + $ZodType2.init(inst, def); + defineLazy2(inst._zod, "optin", () => def.innerType._zod.optin); + defineLazy2(inst._zod, "optout", () => def.innerType._zod.optout); + defineLazy2(inst._zod, "pattern", () => { + const pattern = def.innerType._zod.pattern; + return pattern ? new RegExp(`^(${cleanRegex2(pattern.source)}|null)$`) : void 0; + }); + defineLazy2(inst._zod, "values", () => { + return def.innerType._zod.values ? /* @__PURE__ */ new Set([...def.innerType._zod.values, null]) : void 0; + }); + inst._zod.parse = (payload, ctx) => { + if (payload.value === null) + return payload; + return def.innerType._zod.run(payload, ctx); + }; + }); + $ZodDefault2 = /* @__PURE__ */ $constructor2("$ZodDefault", (inst, def) => { + $ZodType2.init(inst, def); + inst._zod.optin = "optional"; + defineLazy2(inst._zod, "values", () => def.innerType._zod.values); + inst._zod.parse = (payload, ctx) => { + if (ctx.direction === "backward") { + return def.innerType._zod.run(payload, ctx); + } + if (payload.value === void 0) { + payload.value = def.defaultValue; + return payload; + } + const result = def.innerType._zod.run(payload, ctx); + if (result instanceof Promise) { + return result.then((result2) => handleDefaultResult2(result2, def)); + } + return handleDefaultResult2(result, def); + }; + }); + $ZodPrefault2 = /* @__PURE__ */ $constructor2("$ZodPrefault", (inst, def) => { + $ZodType2.init(inst, def); + inst._zod.optin = "optional"; + defineLazy2(inst._zod, "values", () => def.innerType._zod.values); + inst._zod.parse = (payload, ctx) => { + if (ctx.direction === "backward") { + return def.innerType._zod.run(payload, ctx); + } + if (payload.value === void 0) { + payload.value = def.defaultValue; + } + return def.innerType._zod.run(payload, ctx); + }; + }); + $ZodNonOptional2 = /* @__PURE__ */ $constructor2("$ZodNonOptional", (inst, def) => { + $ZodType2.init(inst, def); + defineLazy2(inst._zod, "values", () => { + const v = def.innerType._zod.values; + return v ? new Set([...v].filter((x) => x !== void 0)) : void 0; + }); + inst._zod.parse = (payload, ctx) => { + const result = def.innerType._zod.run(payload, ctx); + if (result instanceof Promise) { + return result.then((result2) => handleNonOptionalResult2(result2, inst)); + } + return handleNonOptionalResult2(result, inst); + }; + }); + $ZodSuccess = /* @__PURE__ */ $constructor2("$ZodSuccess", (inst, def) => { + $ZodType2.init(inst, def); + inst._zod.parse = (payload, ctx) => { + if (ctx.direction === "backward") { + throw new $ZodEncodeError("ZodSuccess"); + } + const result = def.innerType._zod.run(payload, ctx); + if (result instanceof Promise) { + return result.then((result2) => { + payload.value = result2.issues.length === 0; + return payload; + }); + } + payload.value = result.issues.length === 0; + return payload; + }; + }); + $ZodCatch2 = /* @__PURE__ */ $constructor2("$ZodCatch", (inst, def) => { + $ZodType2.init(inst, def); + defineLazy2(inst._zod, "optin", () => def.innerType._zod.optin); + defineLazy2(inst._zod, "optout", () => def.innerType._zod.optout); + defineLazy2(inst._zod, "values", () => def.innerType._zod.values); + inst._zod.parse = (payload, ctx) => { + if (ctx.direction === "backward") { + return def.innerType._zod.run(payload, ctx); + } + const result = def.innerType._zod.run(payload, ctx); + if (result instanceof Promise) { + return result.then((result2) => { + payload.value = result2.value; + if (result2.issues.length) { + payload.value = def.catchValue({ + ...payload, + error: { + issues: result2.issues.map((iss) => finalizeIssue2(iss, ctx, config2())) + }, + input: payload.value + }); + payload.issues = []; + } + return payload; + }); + } + payload.value = result.value; + if (result.issues.length) { + payload.value = def.catchValue({ + ...payload, + error: { + issues: result.issues.map((iss) => finalizeIssue2(iss, ctx, config2())) + }, + input: payload.value + }); + payload.issues = []; + } + return payload; + }; + }); + $ZodNaN = /* @__PURE__ */ $constructor2("$ZodNaN", (inst, def) => { + $ZodType2.init(inst, def); + inst._zod.parse = (payload, _ctx) => { + if (typeof payload.value !== "number" || !Number.isNaN(payload.value)) { + payload.issues.push({ + input: payload.value, + inst, + expected: "nan", + code: "invalid_type" + }); + return payload; + } + return payload; + }; + }); + $ZodPipe2 = /* @__PURE__ */ $constructor2("$ZodPipe", (inst, def) => { + $ZodType2.init(inst, def); + defineLazy2(inst._zod, "values", () => def.in._zod.values); + defineLazy2(inst._zod, "optin", () => def.in._zod.optin); + defineLazy2(inst._zod, "optout", () => def.out._zod.optout); + defineLazy2(inst._zod, "propValues", () => def.in._zod.propValues); + inst._zod.parse = (payload, ctx) => { + if (ctx.direction === "backward") { + const right = def.out._zod.run(payload, ctx); + if (right instanceof Promise) { + return right.then((right2) => handlePipeResult2(right2, def.in, ctx)); + } + return handlePipeResult2(right, def.in, ctx); + } + const left = def.in._zod.run(payload, ctx); + if (left instanceof Promise) { + return left.then((left2) => handlePipeResult2(left2, def.out, ctx)); + } + return handlePipeResult2(left, def.out, ctx); + }; + }); + $ZodCodec = /* @__PURE__ */ $constructor2("$ZodCodec", (inst, def) => { + $ZodType2.init(inst, def); + defineLazy2(inst._zod, "values", () => def.in._zod.values); + defineLazy2(inst._zod, "optin", () => def.in._zod.optin); + defineLazy2(inst._zod, "optout", () => def.out._zod.optout); + defineLazy2(inst._zod, "propValues", () => def.in._zod.propValues); + inst._zod.parse = (payload, ctx) => { + const direction = ctx.direction || "forward"; + if (direction === "forward") { + const left = def.in._zod.run(payload, ctx); + if (left instanceof Promise) { + return left.then((left2) => handleCodecAResult(left2, def, ctx)); + } + return handleCodecAResult(left, def, ctx); + } else { + const right = def.out._zod.run(payload, ctx); + if (right instanceof Promise) { + return right.then((right2) => handleCodecAResult(right2, def, ctx)); + } + return handleCodecAResult(right, def, ctx); + } + }; + }); + $ZodReadonly2 = /* @__PURE__ */ $constructor2("$ZodReadonly", (inst, def) => { + $ZodType2.init(inst, def); + defineLazy2(inst._zod, "propValues", () => def.innerType._zod.propValues); + defineLazy2(inst._zod, "values", () => def.innerType._zod.values); + defineLazy2(inst._zod, "optin", () => def.innerType?._zod?.optin); + defineLazy2(inst._zod, "optout", () => def.innerType?._zod?.optout); + inst._zod.parse = (payload, ctx) => { + if (ctx.direction === "backward") { + return def.innerType._zod.run(payload, ctx); + } + const result = def.innerType._zod.run(payload, ctx); + if (result instanceof Promise) { + return result.then(handleReadonlyResult2); + } + return handleReadonlyResult2(result); + }; + }); + $ZodTemplateLiteral = /* @__PURE__ */ $constructor2("$ZodTemplateLiteral", (inst, def) => { + $ZodType2.init(inst, def); + const regexParts = []; + for (const part of def.parts) { + if (typeof part === "object" && part !== null) { + if (!part._zod.pattern) { + throw new Error(`Invalid template literal part, no pattern found: ${[...part._zod.traits].shift()}`); + } + const source = part._zod.pattern instanceof RegExp ? part._zod.pattern.source : part._zod.pattern; + if (!source) + throw new Error(`Invalid template literal part: ${part._zod.traits}`); + const start = source.startsWith("^") ? 1 : 0; + const end = source.endsWith("$") ? source.length - 1 : source.length; + regexParts.push(source.slice(start, end)); + } else if (part === null || primitiveTypes2.has(typeof part)) { + regexParts.push(escapeRegex2(`${part}`)); + } else { + throw new Error(`Invalid template literal part: ${part}`); + } + } + inst._zod.pattern = new RegExp(`^${regexParts.join("")}$`); + inst._zod.parse = (payload, _ctx) => { + if (typeof payload.value !== "string") { + payload.issues.push({ + input: payload.value, + inst, + expected: "string", + code: "invalid_type" + }); + return payload; + } + inst._zod.pattern.lastIndex = 0; + if (!inst._zod.pattern.test(payload.value)) { + payload.issues.push({ + input: payload.value, + inst, + code: "invalid_format", + format: def.format ?? "template_literal", + pattern: inst._zod.pattern.source + }); + return payload; + } + return payload; + }; + }); + $ZodFunction = /* @__PURE__ */ $constructor2("$ZodFunction", (inst, def) => { + $ZodType2.init(inst, def); + inst._def = def; + inst._zod.def = def; + inst.implement = (func) => { + if (typeof func !== "function") { + throw new Error("implement() must be called with a function"); + } + return function(...args3) { + const parsedArgs = inst._def.input ? parse2(inst._def.input, args3) : args3; + const result = Reflect.apply(func, this, parsedArgs); + if (inst._def.output) { + return parse2(inst._def.output, result); + } + return result; + }; + }; + inst.implementAsync = (func) => { + if (typeof func !== "function") { + throw new Error("implementAsync() must be called with a function"); + } + return async function(...args3) { + const parsedArgs = inst._def.input ? await parseAsync(inst._def.input, args3) : args3; + const result = await Reflect.apply(func, this, parsedArgs); + if (inst._def.output) { + return await parseAsync(inst._def.output, result); + } + return result; + }; + }; + inst._zod.parse = (payload, _ctx) => { + if (typeof payload.value !== "function") { + payload.issues.push({ + code: "invalid_type", + expected: "function", + input: payload.value, + inst + }); + return payload; + } + const hasPromiseOutput = inst._def.output && inst._def.output._zod.def.type === "promise"; + if (hasPromiseOutput) { + payload.value = inst.implementAsync(payload.value); + } else { + payload.value = inst.implement(payload.value); + } + return payload; + }; + inst.input = (...args3) => { + const F = inst.constructor; + if (Array.isArray(args3[0])) { + return new F({ + type: "function", + input: new $ZodTuple({ + type: "tuple", + items: args3[0], + rest: args3[1] + }), + output: inst._def.output + }); + } + return new F({ + type: "function", + input: args3[0], + output: inst._def.output + }); + }; + inst.output = (output) => { + const F = inst.constructor; + return new F({ + type: "function", + input: inst._def.input, + output + }); + }; + return inst; + }); + $ZodPromise = /* @__PURE__ */ $constructor2("$ZodPromise", (inst, def) => { + $ZodType2.init(inst, def); + inst._zod.parse = (payload, ctx) => { + return Promise.resolve(payload.value).then((inner) => def.innerType._zod.run({ value: inner, issues: [] }, ctx)); + }; + }); + $ZodLazy = /* @__PURE__ */ $constructor2("$ZodLazy", (inst, def) => { + $ZodType2.init(inst, def); + defineLazy2(inst._zod, "innerType", () => def.getter()); + defineLazy2(inst._zod, "pattern", () => inst._zod.innerType?._zod?.pattern); + defineLazy2(inst._zod, "propValues", () => inst._zod.innerType?._zod?.propValues); + defineLazy2(inst._zod, "optin", () => inst._zod.innerType?._zod?.optin ?? void 0); + defineLazy2(inst._zod, "optout", () => inst._zod.innerType?._zod?.optout ?? void 0); + inst._zod.parse = (payload, ctx) => { + const inner = inst._zod.innerType; + return inner._zod.run(payload, ctx); + }; + }); + $ZodCustom2 = /* @__PURE__ */ $constructor2("$ZodCustom", (inst, def) => { + $ZodCheck2.init(inst, def); + $ZodType2.init(inst, def); + inst._zod.parse = (payload, _) => { + return payload; + }; + inst._zod.check = (payload) => { + const input = payload.value; + const r = def.fn(input); + if (r instanceof Promise) { + return r.then((r2) => handleRefineResult2(r2, payload, input, inst)); + } + handleRefineResult2(r, payload, input, inst); + return; + }; + }); + } +}); + +// ../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/locales/ar.js +function ar_default() { + return { + localeError: error3() + }; +} +var error3; +var init_ar = __esm({ + "../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/locales/ar.js"() { + init_util2(); + error3 = () => { + const Sizable = { + string: { unit: "\u062D\u0631\u0641", verb: "\u0623\u0646 \u064A\u062D\u0648\u064A" }, + file: { unit: "\u0628\u0627\u064A\u062A", verb: "\u0623\u0646 \u064A\u062D\u0648\u064A" }, + array: { unit: "\u0639\u0646\u0635\u0631", verb: "\u0623\u0646 \u064A\u062D\u0648\u064A" }, + set: { unit: "\u0639\u0646\u0635\u0631", verb: "\u0623\u0646 \u064A\u062D\u0648\u064A" } + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + const FormatDictionary = { + regex: "\u0645\u062F\u062E\u0644", + email: "\u0628\u0631\u064A\u062F \u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A", + url: "\u0631\u0627\u0628\u0637", + emoji: "\u0625\u064A\u0645\u0648\u062C\u064A", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "\u062A\u0627\u0631\u064A\u062E \u0648\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO", + date: "\u062A\u0627\u0631\u064A\u062E \u0628\u0645\u0639\u064A\u0627\u0631 ISO", + time: "\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO", + duration: "\u0645\u062F\u0629 \u0628\u0645\u0639\u064A\u0627\u0631 ISO", + ipv4: "\u0639\u0646\u0648\u0627\u0646 IPv4", + ipv6: "\u0639\u0646\u0648\u0627\u0646 IPv6", + cidrv4: "\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv4", + cidrv6: "\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv6", + base64: "\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64-encoded", + base64url: "\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64url-encoded", + json_string: "\u0646\u064E\u0635 \u0639\u0644\u0649 \u0647\u064A\u0626\u0629 JSON", + e164: "\u0631\u0642\u0645 \u0647\u0627\u062A\u0641 \u0628\u0645\u0639\u064A\u0627\u0631 E.164", + jwt: "JWT", + template_literal: "\u0645\u062F\u062E\u0644" + }; + const TypeDictionary = { + nan: "NaN" + }; + return (issue4) => { + switch (issue4.code) { + case "invalid_type": { + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType2(issue4.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue4.expected)) { + 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 instanceof ${issue4.expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${received}`; + } + 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 ${expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${received}`; + } + case "invalid_value": + if (issue4.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 ${stringifyPrimitive2(issue4.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: ${joinValues2(issue4.values, "|")}`; + case "too_big": { + const adj = issue4.inclusive ? "<=" : "<"; + const sizing = getSizing(issue4.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 ${issue4.origin ?? "\u0627\u0644\u0642\u064A\u0645\u0629"} ${adj} ${issue4.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 ${issue4.origin ?? "\u0627\u0644\u0642\u064A\u0645\u0629"} ${adj} ${issue4.maximum.toString()}`; + } + case "too_small": { + const adj = issue4.inclusive ? ">=" : ">"; + const sizing = getSizing(issue4.origin); + if (sizing) { + return `\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${issue4.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${adj} ${issue4.minimum.toString()} ${sizing.unit}`; + } + return `\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${issue4.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${adj} ${issue4.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue4; + 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 "${issue4.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 `${FormatDictionary[_issue.format] ?? issue4.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 ${issue4.divisor}`; + case "unrecognized_keys": + return `\u0645\u0639\u0631\u0641${issue4.keys.length > 1 ? "\u0627\u062A" : ""} \u063A\u0631\u064A\u0628${issue4.keys.length > 1 ? "\u0629" : ""}: ${joinValues2(issue4.keys, "\u060C ")}`; + case "invalid_key": + return `\u0645\u0639\u0631\u0641 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${issue4.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 ${issue4.origin}`; + default: + return "\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644"; + } + }; + }; + } +}); + +// ../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/locales/az.js +function az_default() { + return { + localeError: error4() + }; +} +var error4; +var init_az = __esm({ + "../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/locales/az.js"() { + init_util2(); + error4 = () => { + const Sizable = { + string: { unit: "simvol", verb: "olmal\u0131d\u0131r" }, + file: { unit: "bayt", verb: "olmal\u0131d\u0131r" }, + array: { unit: "element", verb: "olmal\u0131d\u0131r" }, + set: { unit: "element", verb: "olmal\u0131d\u0131r" } + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + const FormatDictionary = { + 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" + }; + const TypeDictionary = { + nan: "NaN" + }; + return (issue4) => { + switch (issue4.code) { + case "invalid_type": { + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType2(issue4.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue4.expected)) { + return `Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n instanceof ${issue4.expected}, daxil olan ${received}`; + } + return `Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${expected}, daxil olan ${received}`; + } + case "invalid_value": + if (issue4.values.length === 1) + return `Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${stringifyPrimitive2(issue4.values[0])}`; + return `Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${joinValues2(issue4.values, "|")}`; + case "too_big": { + const adj = issue4.inclusive ? "<=" : "<"; + const sizing = getSizing(issue4.origin); + if (sizing) + return `\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${issue4.origin ?? "d\u0259y\u0259r"} ${adj}${issue4.maximum.toString()} ${sizing.unit ?? "element"}`; + return `\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${issue4.origin ?? "d\u0259y\u0259r"} ${adj}${issue4.maximum.toString()}`; + } + case "too_small": { + const adj = issue4.inclusive ? ">=" : ">"; + const sizing = getSizing(issue4.origin); + if (sizing) + return `\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${issue4.origin} ${adj}${issue4.minimum.toString()} ${sizing.unit}`; + return `\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${issue4.origin} ${adj}${issue4.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue4; + if (_issue.format === "starts_with") + return `Yanl\u0131\u015F m\u0259tn: "${_issue.prefix}" il\u0259 ba\u015Flamal\u0131d\u0131r`; + if (_issue.format === "ends_with") + return `Yanl\u0131\u015F m\u0259tn: "${_issue.suffix}" il\u0259 bitm\u0259lidir`; + if (_issue.format === "includes") + 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 ${FormatDictionary[_issue.format] ?? issue4.format}`; + } + case "not_multiple_of": + return `Yanl\u0131\u015F \u0259d\u0259d: ${issue4.divisor} il\u0259 b\xF6l\xFCn\u0259 bil\u0259n olmal\u0131d\u0131r`; + case "unrecognized_keys": + return `Tan\u0131nmayan a\xE7ar${issue4.keys.length > 1 ? "lar" : ""}: ${joinValues2(issue4.keys, ", ")}`; + case "invalid_key": + return `${issue4.origin} daxilind\u0259 yanl\u0131\u015F a\xE7ar`; + case "invalid_union": + return "Yanl\u0131\u015F d\u0259y\u0259r"; + case "invalid_element": + return `${issue4.origin} daxilind\u0259 yanl\u0131\u015F d\u0259y\u0259r`; + default: + return `Yanl\u0131\u015F d\u0259y\u0259r`; + } + }; + }; + } +}); + +// ../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/locales/be.js +function getBelarusianPlural(count, one, few, many) { + const absCount = Math.abs(count); + const lastDigit = absCount % 10; + const lastTwoDigits = absCount % 100; + if (lastTwoDigits >= 11 && lastTwoDigits <= 19) { + return many; + } + if (lastDigit === 1) { + return one; + } + if (lastDigit >= 2 && lastDigit <= 4) { + return few; + } + return many; +} +function be_default() { + return { + localeError: error5() + }; +} +var error5; +var init_be = __esm({ + "../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/locales/be.js"() { + init_util2(); + error5 = () => { + const Sizable = { + string: { + unit: { + one: "\u0441\u0456\u043C\u0432\u0430\u043B", + few: "\u0441\u0456\u043C\u0432\u0430\u043B\u044B", + many: "\u0441\u0456\u043C\u0432\u0430\u043B\u0430\u045E" + }, + verb: "\u043C\u0435\u0446\u044C" + }, + array: { + unit: { + one: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442", + few: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B", + many: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E" + }, + verb: "\u043C\u0435\u0446\u044C" + }, + set: { + unit: { + one: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442", + few: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B", + many: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E" + }, + verb: "\u043C\u0435\u0446\u044C" + }, + file: { + unit: { + one: "\u0431\u0430\u0439\u0442", + few: "\u0431\u0430\u0439\u0442\u044B", + many: "\u0431\u0430\u0439\u0442\u0430\u045E" + }, + verb: "\u043C\u0435\u0446\u044C" + } + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + const FormatDictionary = { + regex: "\u0443\u0432\u043E\u0434", + email: "email \u0430\u0434\u0440\u0430\u0441", + url: "URL", + emoji: "\u044D\u043C\u043E\u0434\u0437\u0456", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO \u0434\u0430\u0442\u0430 \u0456 \u0447\u0430\u0441", + date: "ISO \u0434\u0430\u0442\u0430", + time: "ISO \u0447\u0430\u0441", + duration: "ISO \u043F\u0440\u0430\u0446\u044F\u0433\u043B\u0430\u0441\u0446\u044C", + ipv4: "IPv4 \u0430\u0434\u0440\u0430\u0441", + ipv6: "IPv6 \u0430\u0434\u0440\u0430\u0441", + cidrv4: "IPv4 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D", + cidrv6: "IPv6 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D", + base64: "\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64", + base64url: "\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64url", + json_string: "JSON \u0440\u0430\u0434\u043E\u043A", + e164: "\u043D\u0443\u043C\u0430\u0440 E.164", + jwt: "JWT", + template_literal: "\u0443\u0432\u043E\u0434" + }; + const TypeDictionary = { + nan: "NaN", + number: "\u043B\u0456\u043A", + array: "\u043C\u0430\u0441\u0456\u045E" + }; + return (issue4) => { + switch (issue4.code) { + case "invalid_type": { + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType2(issue4.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue4.expected)) { + return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F instanceof ${issue4.expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${received}`; + } + return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F ${expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${received}`; + } + case "invalid_value": + if (issue4.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 ${stringifyPrimitive2(issue4.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 ${joinValues2(issue4.values, "|")}`; + case "too_big": { + const adj = issue4.inclusive ? "<=" : "<"; + const sizing = getSizing(issue4.origin); + if (sizing) { + const maxValue = Number(issue4.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 ${issue4.origin ?? "\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${sizing.verb} ${adj}${issue4.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 ${issue4.origin ?? "\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${adj}${issue4.maximum.toString()}`; + } + case "too_small": { + const adj = issue4.inclusive ? ">=" : ">"; + const sizing = getSizing(issue4.origin); + if (sizing) { + const minValue = Number(issue4.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 ${issue4.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${sizing.verb} ${adj}${issue4.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 ${issue4.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${adj}${issue4.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue4; + 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") + 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\u0430\u043A\u0430\u043D\u0447\u0432\u0430\u0446\u0446\u0430 \u043D\u0430 "${_issue.suffix}"`; + if (_issue.format === "includes") + 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 ${FormatDictionary[_issue.format] ?? issue4.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 ${issue4.divisor}`; + case "unrecognized_keys": + return `\u041D\u0435\u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u043D\u044B ${issue4.keys.length > 1 ? "\u043A\u043B\u044E\u0447\u044B" : "\u043A\u043B\u044E\u0447"}: ${joinValues2(issue4.keys, ", ")}`; + case "invalid_key": + return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043A\u043B\u044E\u0447 \u0443 ${issue4.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 ${issue4.origin}`; + default: + return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434`; + } + }; + }; + } +}); + +// ../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/locales/bg.js +function bg_default() { + return { + localeError: error6() + }; +} +var error6; +var init_bg = __esm({ + "../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/locales/bg.js"() { + init_util2(); + error6 = () => { + const Sizable = { + string: { unit: "\u0441\u0438\u043C\u0432\u043E\u043B\u0430", verb: "\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430" }, + file: { unit: "\u0431\u0430\u0439\u0442\u0430", verb: "\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430" }, + array: { unit: "\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430", verb: "\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430" }, + set: { unit: "\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430", verb: "\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430" } + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + const FormatDictionary = { + regex: "\u0432\u0445\u043E\u0434", + email: "\u0438\u043C\u0435\u0439\u043B \u0430\u0434\u0440\u0435\u0441", + url: "URL", + emoji: "\u0435\u043C\u043E\u0434\u0436\u0438", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO \u0432\u0440\u0435\u043C\u0435", + date: "ISO \u0434\u0430\u0442\u0430", + time: "ISO \u0432\u0440\u0435\u043C\u0435", + duration: "ISO \u043F\u0440\u043E\u0434\u044A\u043B\u0436\u0438\u0442\u0435\u043B\u043D\u043E\u0441\u0442", + ipv4: "IPv4 \u0430\u0434\u0440\u0435\u0441", + ipv6: "IPv6 \u0430\u0434\u0440\u0435\u0441", + cidrv4: "IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D", + cidrv6: "IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D", + base64: "base64-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437", + base64url: "base64url-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437", + json_string: "JSON \u043D\u0438\u0437", + e164: "E.164 \u043D\u043E\u043C\u0435\u0440", + jwt: "JWT", + template_literal: "\u0432\u0445\u043E\u0434" + }; + const TypeDictionary = { + nan: "NaN", + number: "\u0447\u0438\u0441\u043B\u043E", + array: "\u043C\u0430\u0441\u0438\u0432" + }; + return (issue4) => { + switch (issue4.code) { + case "invalid_type": { + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType2(issue4.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue4.expected)) { + return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D instanceof ${issue4.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${received}`; + } + return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${received}`; + } + case "invalid_value": + if (issue4.values.length === 1) + return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${stringifyPrimitive2(issue4.values[0])}`; + return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u043E\u043F\u0446\u0438\u044F: \u043E\u0447\u0430\u043A\u0432\u0430\u043D\u043E \u0435\u0434\u043D\u043E \u043E\u0442 ${joinValues2(issue4.values, "|")}`; + case "too_big": { + const adj = issue4.inclusive ? "<=" : "<"; + const sizing = getSizing(issue4.origin); + if (sizing) + return `\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${issue4.origin ?? "\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${adj}${issue4.maximum.toString()} ${sizing.unit ?? "\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430"}`; + return `\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${issue4.origin ?? "\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0431\u044A\u0434\u0435 ${adj}${issue4.maximum.toString()}`; + } + case "too_small": { + const adj = issue4.inclusive ? ">=" : ">"; + const sizing = getSizing(issue4.origin); + if (sizing) { + return `\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${issue4.origin} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${adj}${issue4.minimum.toString()} ${sizing.unit}`; + } + return `\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${issue4.origin} \u0434\u0430 \u0431\u044A\u0434\u0435 ${adj}${issue4.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue4; + if (_issue.format === "starts_with") { + return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u0432\u0430 \u0441 "${_issue.prefix}"`; + } + if (_issue.format === "ends_with") + return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u0432\u044A\u0440\u0448\u0432\u0430 \u0441 "${_issue.suffix}"`; + if (_issue.format === "includes") + return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0432\u043A\u043B\u044E\u0447\u0432\u0430 "${_issue.includes}"`; + if (_issue.format === "regex") + return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0441\u044A\u0432\u043F\u0430\u0434\u0430 \u0441 ${_issue.pattern}`; + let invalid_adj = "\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D"; + if (_issue.format === "emoji") + invalid_adj = "\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"; + if (_issue.format === "datetime") + invalid_adj = "\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"; + if (_issue.format === "date") + invalid_adj = "\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"; + if (_issue.format === "time") + invalid_adj = "\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"; + if (_issue.format === "duration") + invalid_adj = "\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"; + return `${invalid_adj} ${FormatDictionary[_issue.format] ?? issue4.format}`; + } + case "not_multiple_of": + return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E \u0447\u0438\u0441\u043B\u043E: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u043A\u0440\u0430\u0442\u043D\u043E \u043D\u0430 ${issue4.divisor}`; + case "unrecognized_keys": + return `\u041D\u0435\u0440\u0430\u0437\u043F\u043E\u0437\u043D\u0430\u0442${issue4.keys.length > 1 ? "\u0438" : ""} \u043A\u043B\u044E\u0447${issue4.keys.length > 1 ? "\u043E\u0432\u0435" : ""}: ${joinValues2(issue4.keys, ", ")}`; + case "invalid_key": + return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043A\u043B\u044E\u0447 \u0432 ${issue4.origin}`; + case "invalid_union": + return "\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434"; + case "invalid_element": + return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442 \u0432 ${issue4.origin}`; + default: + return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434`; + } + }; + }; + } +}); + +// ../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/locales/ca.js +function ca_default() { + return { + localeError: error7() + }; +} +var error7; +var init_ca = __esm({ + "../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/locales/ca.js"() { + init_util2(); + error7 = () => { + const Sizable = { + string: { unit: "car\xE0cters", verb: "contenir" }, + file: { unit: "bytes", verb: "contenir" }, + array: { unit: "elements", verb: "contenir" }, + set: { unit: "elements", verb: "contenir" } + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + const FormatDictionary = { + regex: "entrada", + email: "adre\xE7a electr\xF2nica", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "data i hora ISO", + date: "data ISO", + time: "hora ISO", + duration: "durada ISO", + ipv4: "adre\xE7a IPv4", + ipv6: "adre\xE7a IPv6", + cidrv4: "rang IPv4", + cidrv6: "rang IPv6", + base64: "cadena codificada en base64", + base64url: "cadena codificada en base64url", + json_string: "cadena JSON", + e164: "n\xFAmero E.164", + jwt: "JWT", + template_literal: "entrada" + }; + const TypeDictionary = { + nan: "NaN" + }; + return (issue4) => { + switch (issue4.code) { + case "invalid_type": { + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType2(issue4.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue4.expected)) { + return `Tipus inv\xE0lid: s'esperava instanceof ${issue4.expected}, s'ha rebut ${received}`; + } + return `Tipus inv\xE0lid: s'esperava ${expected}, s'ha rebut ${received}`; + } + case "invalid_value": + if (issue4.values.length === 1) + return `Valor inv\xE0lid: s'esperava ${stringifyPrimitive2(issue4.values[0])}`; + return `Opci\xF3 inv\xE0lida: s'esperava una de ${joinValues2(issue4.values, " o ")}`; + case "too_big": { + const adj = issue4.inclusive ? "com a m\xE0xim" : "menys de"; + const sizing = getSizing(issue4.origin); + if (sizing) + return `Massa gran: s'esperava que ${issue4.origin ?? "el valor"} contingu\xE9s ${adj} ${issue4.maximum.toString()} ${sizing.unit ?? "elements"}`; + return `Massa gran: s'esperava que ${issue4.origin ?? "el valor"} fos ${adj} ${issue4.maximum.toString()}`; + } + case "too_small": { + const adj = issue4.inclusive ? "com a m\xEDnim" : "m\xE9s de"; + const sizing = getSizing(issue4.origin); + if (sizing) { + return `Massa petit: s'esperava que ${issue4.origin} contingu\xE9s ${adj} ${issue4.minimum.toString()} ${sizing.unit}`; + } + return `Massa petit: s'esperava que ${issue4.origin} fos ${adj} ${issue4.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue4; + if (_issue.format === "starts_with") { + return `Format inv\xE0lid: ha de comen\xE7ar amb "${_issue.prefix}"`; + } + if (_issue.format === "ends_with") + return `Format inv\xE0lid: ha d'acabar amb "${_issue.suffix}"`; + if (_issue.format === "includes") + 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 ${FormatDictionary[_issue.format] ?? issue4.format}`; + } + case "not_multiple_of": + return `N\xFAmero inv\xE0lid: ha de ser m\xFAltiple de ${issue4.divisor}`; + case "unrecognized_keys": + return `Clau${issue4.keys.length > 1 ? "s" : ""} no reconeguda${issue4.keys.length > 1 ? "s" : ""}: ${joinValues2(issue4.keys, ", ")}`; + case "invalid_key": + return `Clau inv\xE0lida a ${issue4.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 ${issue4.origin}`; + default: + return `Entrada inv\xE0lida`; + } + }; + }; + } +}); + +// ../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/locales/cs.js +function cs_default() { + return { + localeError: error8() + }; +} +var error8; +var init_cs = __esm({ + "../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/locales/cs.js"() { + init_util2(); + error8 = () => { + const Sizable = { + string: { unit: "znak\u016F", verb: "m\xEDt" }, + file: { unit: "bajt\u016F", verb: "m\xEDt" }, + array: { unit: "prvk\u016F", verb: "m\xEDt" }, + set: { unit: "prvk\u016F", verb: "m\xEDt" } + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + const FormatDictionary = { + regex: "regul\xE1rn\xED v\xFDraz", + email: "e-mailov\xE1 adresa", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "datum a \u010Das ve form\xE1tu ISO", + date: "datum ve form\xE1tu ISO", + time: "\u010Das ve form\xE1tu ISO", + duration: "doba trv\xE1n\xED ISO", + ipv4: "IPv4 adresa", + ipv6: "IPv6 adresa", + cidrv4: "rozsah IPv4", + cidrv6: "rozsah IPv6", + base64: "\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64", + base64url: "\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64url", + json_string: "\u0159et\u011Bzec ve form\xE1tu JSON", + e164: "\u010D\xEDslo E.164", + jwt: "JWT", + template_literal: "vstup" + }; + const TypeDictionary = { + nan: "NaN", + number: "\u010D\xEDslo", + string: "\u0159et\u011Bzec", + function: "funkce", + array: "pole" + }; + return (issue4) => { + switch (issue4.code) { + case "invalid_type": { + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType2(issue4.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue4.expected)) { + return `Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no instanceof ${issue4.expected}, obdr\u017Eeno ${received}`; + } + return `Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${expected}, obdr\u017Eeno ${received}`; + } + case "invalid_value": + if (issue4.values.length === 1) + return `Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${stringifyPrimitive2(issue4.values[0])}`; + return `Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${joinValues2(issue4.values, "|")}`; + case "too_big": { + const adj = issue4.inclusive ? "<=" : "<"; + const sizing = getSizing(issue4.origin); + if (sizing) { + return `Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${issue4.origin ?? "hodnota"} mus\xED m\xEDt ${adj}${issue4.maximum.toString()} ${sizing.unit ?? "prvk\u016F"}`; + } + return `Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${issue4.origin ?? "hodnota"} mus\xED b\xFDt ${adj}${issue4.maximum.toString()}`; + } + case "too_small": { + const adj = issue4.inclusive ? ">=" : ">"; + const sizing = getSizing(issue4.origin); + if (sizing) { + return `Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${issue4.origin ?? "hodnota"} mus\xED m\xEDt ${adj}${issue4.minimum.toString()} ${sizing.unit ?? "prvk\u016F"}`; + } + return `Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${issue4.origin ?? "hodnota"} mus\xED b\xFDt ${adj}${issue4.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue4; + if (_issue.format === "starts_with") + return `Neplatn\xFD \u0159et\u011Bzec: mus\xED za\u010D\xEDnat na "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `Neplatn\xFD \u0159et\u011Bzec: mus\xED kon\u010Dit na "${_issue.suffix}"`; + if (_issue.format === "includes") + 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 ${FormatDictionary[_issue.format] ?? issue4.format}`; + } + case "not_multiple_of": + return `Neplatn\xE9 \u010D\xEDslo: mus\xED b\xFDt n\xE1sobkem ${issue4.divisor}`; + case "unrecognized_keys": + return `Nezn\xE1m\xE9 kl\xED\u010De: ${joinValues2(issue4.keys, ", ")}`; + case "invalid_key": + return `Neplatn\xFD kl\xED\u010D v ${issue4.origin}`; + case "invalid_union": + return "Neplatn\xFD vstup"; + case "invalid_element": + return `Neplatn\xE1 hodnota v ${issue4.origin}`; + default: + return `Neplatn\xFD vstup`; + } + }; + }; + } +}); + +// ../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/locales/da.js +function da_default() { + return { + localeError: error9() + }; +} +var error9; +var init_da = __esm({ + "../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/locales/da.js"() { + init_util2(); + error9 = () => { + const Sizable = { + string: { unit: "tegn", verb: "havde" }, + file: { unit: "bytes", verb: "havde" }, + array: { unit: "elementer", verb: "indeholdt" }, + set: { unit: "elementer", verb: "indeholdt" } + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + const FormatDictionary = { + regex: "input", + email: "e-mailadresse", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO dato- og klokkesl\xE6t", + date: "ISO-dato", + time: "ISO-klokkesl\xE6t", + duration: "ISO-varighed", + ipv4: "IPv4-omr\xE5de", + ipv6: "IPv6-omr\xE5de", + cidrv4: "IPv4-spektrum", + cidrv6: "IPv6-spektrum", + base64: "base64-kodet streng", + base64url: "base64url-kodet streng", + json_string: "JSON-streng", + e164: "E.164-nummer", + jwt: "JWT", + template_literal: "input" + }; + const TypeDictionary = { + nan: "NaN", + string: "streng", + number: "tal", + boolean: "boolean", + array: "liste", + object: "objekt", + set: "s\xE6t", + file: "fil" + }; + return (issue4) => { + switch (issue4.code) { + case "invalid_type": { + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType2(issue4.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue4.expected)) { + return `Ugyldigt input: forventede instanceof ${issue4.expected}, fik ${received}`; + } + return `Ugyldigt input: forventede ${expected}, fik ${received}`; + } + case "invalid_value": + if (issue4.values.length === 1) + return `Ugyldig v\xE6rdi: forventede ${stringifyPrimitive2(issue4.values[0])}`; + return `Ugyldigt valg: forventede en af f\xF8lgende ${joinValues2(issue4.values, "|")}`; + case "too_big": { + const adj = issue4.inclusive ? "<=" : "<"; + const sizing = getSizing(issue4.origin); + const origin = TypeDictionary[issue4.origin] ?? issue4.origin; + if (sizing) + return `For stor: forventede ${origin ?? "value"} ${sizing.verb} ${adj} ${issue4.maximum.toString()} ${sizing.unit ?? "elementer"}`; + return `For stor: forventede ${origin ?? "value"} havde ${adj} ${issue4.maximum.toString()}`; + } + case "too_small": { + const adj = issue4.inclusive ? ">=" : ">"; + const sizing = getSizing(issue4.origin); + const origin = TypeDictionary[issue4.origin] ?? issue4.origin; + if (sizing) { + return `For lille: forventede ${origin} ${sizing.verb} ${adj} ${issue4.minimum.toString()} ${sizing.unit}`; + } + return `For lille: forventede ${origin} havde ${adj} ${issue4.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue4; + if (_issue.format === "starts_with") + return `Ugyldig streng: skal starte med "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `Ugyldig streng: skal ende med "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Ugyldig streng: skal indeholde "${_issue.includes}"`; + if (_issue.format === "regex") + return `Ugyldig streng: skal matche m\xF8nsteret ${_issue.pattern}`; + return `Ugyldig ${FormatDictionary[_issue.format] ?? issue4.format}`; + } + case "not_multiple_of": + return `Ugyldigt tal: skal v\xE6re deleligt med ${issue4.divisor}`; + case "unrecognized_keys": + return `${issue4.keys.length > 1 ? "Ukendte n\xF8gler" : "Ukendt n\xF8gle"}: ${joinValues2(issue4.keys, ", ")}`; + case "invalid_key": + return `Ugyldig n\xF8gle i ${issue4.origin}`; + case "invalid_union": + return "Ugyldigt input: matcher ingen af de tilladte typer"; + case "invalid_element": + return `Ugyldig v\xE6rdi i ${issue4.origin}`; + default: + return `Ugyldigt input`; + } + }; + }; + } +}); + +// ../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/locales/de.js +function de_default() { + return { + localeError: error10() + }; +} +var error10; +var init_de = __esm({ + "../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/locales/de.js"() { + init_util2(); + error10 = () => { + const Sizable = { + string: { unit: "Zeichen", verb: "zu haben" }, + file: { unit: "Bytes", verb: "zu haben" }, + array: { unit: "Elemente", verb: "zu haben" }, + set: { unit: "Elemente", verb: "zu haben" } + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + const FormatDictionary = { + regex: "Eingabe", + email: "E-Mail-Adresse", + url: "URL", + emoji: "Emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO-Datum und -Uhrzeit", + date: "ISO-Datum", + time: "ISO-Uhrzeit", + duration: "ISO-Dauer", + ipv4: "IPv4-Adresse", + ipv6: "IPv6-Adresse", + cidrv4: "IPv4-Bereich", + cidrv6: "IPv6-Bereich", + base64: "Base64-codierter String", + base64url: "Base64-URL-codierter String", + json_string: "JSON-String", + e164: "E.164-Nummer", + jwt: "JWT", + template_literal: "Eingabe" + }; + const TypeDictionary = { + nan: "NaN", + number: "Zahl", + array: "Array" + }; + return (issue4) => { + switch (issue4.code) { + case "invalid_type": { + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType2(issue4.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue4.expected)) { + return `Ung\xFCltige Eingabe: erwartet instanceof ${issue4.expected}, erhalten ${received}`; + } + return `Ung\xFCltige Eingabe: erwartet ${expected}, erhalten ${received}`; + } + case "invalid_value": + if (issue4.values.length === 1) + return `Ung\xFCltige Eingabe: erwartet ${stringifyPrimitive2(issue4.values[0])}`; + return `Ung\xFCltige Option: erwartet eine von ${joinValues2(issue4.values, "|")}`; + case "too_big": { + const adj = issue4.inclusive ? "<=" : "<"; + const sizing = getSizing(issue4.origin); + if (sizing) + return `Zu gro\xDF: erwartet, dass ${issue4.origin ?? "Wert"} ${adj}${issue4.maximum.toString()} ${sizing.unit ?? "Elemente"} hat`; + return `Zu gro\xDF: erwartet, dass ${issue4.origin ?? "Wert"} ${adj}${issue4.maximum.toString()} ist`; + } + case "too_small": { + const adj = issue4.inclusive ? ">=" : ">"; + const sizing = getSizing(issue4.origin); + if (sizing) { + return `Zu klein: erwartet, dass ${issue4.origin} ${adj}${issue4.minimum.toString()} ${sizing.unit} hat`; + } + return `Zu klein: erwartet, dass ${issue4.origin} ${adj}${issue4.minimum.toString()} ist`; + } + case "invalid_format": { + const _issue = issue4; + if (_issue.format === "starts_with") + return `Ung\xFCltiger String: muss mit "${_issue.prefix}" beginnen`; + if (_issue.format === "ends_with") + return `Ung\xFCltiger String: muss mit "${_issue.suffix}" enden`; + if (_issue.format === "includes") + 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: ${FormatDictionary[_issue.format] ?? issue4.format}`; + } + case "not_multiple_of": + return `Ung\xFCltige Zahl: muss ein Vielfaches von ${issue4.divisor} sein`; + case "unrecognized_keys": + return `${issue4.keys.length > 1 ? "Unbekannte Schl\xFCssel" : "Unbekannter Schl\xFCssel"}: ${joinValues2(issue4.keys, ", ")}`; + case "invalid_key": + return `Ung\xFCltiger Schl\xFCssel in ${issue4.origin}`; + case "invalid_union": + return "Ung\xFCltige Eingabe"; + case "invalid_element": + return `Ung\xFCltiger Wert in ${issue4.origin}`; + default: + return `Ung\xFCltige Eingabe`; + } + }; + }; + } +}); + +// ../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/locales/en.js +function en_default4() { + return { + localeError: error11() + }; +} +var error11; +var init_en2 = __esm({ + "../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/locales/en.js"() { + init_util2(); + error11 = () => { + 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" }, + map: { unit: "entries", verb: "to have" } + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + const FormatDictionary = { + regex: "input", + email: "email address", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO datetime", + date: "ISO date", + time: "ISO time", + duration: "ISO duration", + ipv4: "IPv4 address", + ipv6: "IPv6 address", + mac: "MAC address", + cidrv4: "IPv4 range", + cidrv6: "IPv6 range", + base64: "base64-encoded string", + base64url: "base64url-encoded string", + json_string: "JSON string", + e164: "E.164 number", + jwt: "JWT", + template_literal: "input" + }; + const TypeDictionary = { + // Compatibility: "nan" -> "NaN" for display + nan: "NaN" + // All other type names omitted - they fall back to raw values via ?? operator + }; + return (issue4) => { + switch (issue4.code) { + case "invalid_type": { + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType2(issue4.input); + const received = TypeDictionary[receivedType] ?? receivedType; + return `Invalid input: expected ${expected}, received ${received}`; + } + case "invalid_value": + if (issue4.values.length === 1) + return `Invalid input: expected ${stringifyPrimitive2(issue4.values[0])}`; + return `Invalid option: expected one of ${joinValues2(issue4.values, "|")}`; + case "too_big": { + const adj = issue4.inclusive ? "<=" : "<"; + const sizing = getSizing(issue4.origin); + if (sizing) + return `Too big: expected ${issue4.origin ?? "value"} to have ${adj}${issue4.maximum.toString()} ${sizing.unit ?? "elements"}`; + return `Too big: expected ${issue4.origin ?? "value"} to be ${adj}${issue4.maximum.toString()}`; + } + case "too_small": { + const adj = issue4.inclusive ? ">=" : ">"; + const sizing = getSizing(issue4.origin); + if (sizing) { + return `Too small: expected ${issue4.origin} to have ${adj}${issue4.minimum.toString()} ${sizing.unit}`; + } + return `Too small: expected ${issue4.origin} to be ${adj}${issue4.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue4; + 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 ${FormatDictionary[_issue.format] ?? issue4.format}`; + } + case "not_multiple_of": + return `Invalid number: must be a multiple of ${issue4.divisor}`; + case "unrecognized_keys": + return `Unrecognized key${issue4.keys.length > 1 ? "s" : ""}: ${joinValues2(issue4.keys, ", ")}`; + case "invalid_key": + return `Invalid key in ${issue4.origin}`; + case "invalid_union": + return "Invalid input"; + case "invalid_element": + return `Invalid value in ${issue4.origin}`; + default: + return `Invalid input`; + } + }; + }; + } +}); + +// ../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/locales/eo.js +function eo_default() { + return { + localeError: error12() + }; +} +var error12; +var init_eo = __esm({ + "../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/locales/eo.js"() { + init_util2(); + error12 = () => { + const Sizable = { + string: { unit: "karaktrojn", verb: "havi" }, + file: { unit: "bajtojn", verb: "havi" }, + array: { unit: "elementojn", verb: "havi" }, + set: { unit: "elementojn", verb: "havi" } + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + const FormatDictionary = { + regex: "enigo", + email: "retadreso", + url: "URL", + emoji: "emo\u011Dio", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO-datotempo", + date: "ISO-dato", + time: "ISO-tempo", + duration: "ISO-da\u016Dro", + ipv4: "IPv4-adreso", + ipv6: "IPv6-adreso", + cidrv4: "IPv4-rango", + cidrv6: "IPv6-rango", + base64: "64-ume kodita karaktraro", + base64url: "URL-64-ume kodita karaktraro", + json_string: "JSON-karaktraro", + e164: "E.164-nombro", + jwt: "JWT", + template_literal: "enigo" + }; + const TypeDictionary = { + nan: "NaN", + number: "nombro", + array: "tabelo", + null: "senvalora" + }; + return (issue4) => { + switch (issue4.code) { + case "invalid_type": { + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType2(issue4.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue4.expected)) { + return `Nevalida enigo: atendi\u011Dis instanceof ${issue4.expected}, ricevi\u011Dis ${received}`; + } + return `Nevalida enigo: atendi\u011Dis ${expected}, ricevi\u011Dis ${received}`; + } + case "invalid_value": + if (issue4.values.length === 1) + return `Nevalida enigo: atendi\u011Dis ${stringifyPrimitive2(issue4.values[0])}`; + return `Nevalida opcio: atendi\u011Dis unu el ${joinValues2(issue4.values, "|")}`; + case "too_big": { + const adj = issue4.inclusive ? "<=" : "<"; + const sizing = getSizing(issue4.origin); + if (sizing) + return `Tro granda: atendi\u011Dis ke ${issue4.origin ?? "valoro"} havu ${adj}${issue4.maximum.toString()} ${sizing.unit ?? "elementojn"}`; + return `Tro granda: atendi\u011Dis ke ${issue4.origin ?? "valoro"} havu ${adj}${issue4.maximum.toString()}`; + } + case "too_small": { + const adj = issue4.inclusive ? ">=" : ">"; + const sizing = getSizing(issue4.origin); + if (sizing) { + return `Tro malgranda: atendi\u011Dis ke ${issue4.origin} havu ${adj}${issue4.minimum.toString()} ${sizing.unit}`; + } + return `Tro malgranda: atendi\u011Dis ke ${issue4.origin} estu ${adj}${issue4.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue4; + if (_issue.format === "starts_with") + return `Nevalida karaktraro: devas komenci\u011Di per "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `Nevalida karaktraro: devas fini\u011Di per "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Nevalida karaktraro: devas inkluzivi "${_issue.includes}"`; + if (_issue.format === "regex") + return `Nevalida karaktraro: devas kongrui kun la modelo ${_issue.pattern}`; + return `Nevalida ${FormatDictionary[_issue.format] ?? issue4.format}`; + } + case "not_multiple_of": + return `Nevalida nombro: devas esti oblo de ${issue4.divisor}`; + case "unrecognized_keys": + return `Nekonata${issue4.keys.length > 1 ? "j" : ""} \u015Dlosilo${issue4.keys.length > 1 ? "j" : ""}: ${joinValues2(issue4.keys, ", ")}`; + case "invalid_key": + return `Nevalida \u015Dlosilo en ${issue4.origin}`; + case "invalid_union": + return "Nevalida enigo"; + case "invalid_element": + return `Nevalida valoro en ${issue4.origin}`; + default: + return `Nevalida enigo`; + } + }; + }; + } +}); + +// ../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/locales/es.js +function es_default() { + return { + localeError: error13() + }; +} +var error13; +var init_es = __esm({ + "../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/locales/es.js"() { + init_util2(); + error13 = () => { + const Sizable = { + string: { unit: "caracteres", verb: "tener" }, + file: { unit: "bytes", verb: "tener" }, + array: { unit: "elementos", verb: "tener" }, + set: { unit: "elementos", verb: "tener" } + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + const FormatDictionary = { + regex: "entrada", + email: "direcci\xF3n de correo electr\xF3nico", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "fecha y hora ISO", + date: "fecha ISO", + time: "hora ISO", + duration: "duraci\xF3n ISO", + ipv4: "direcci\xF3n IPv4", + ipv6: "direcci\xF3n IPv6", + cidrv4: "rango IPv4", + cidrv6: "rango IPv6", + base64: "cadena codificada en base64", + base64url: "URL codificada en base64", + json_string: "cadena JSON", + e164: "n\xFAmero E.164", + jwt: "JWT", + template_literal: "entrada" + }; + const TypeDictionary = { + nan: "NaN", + string: "texto", + number: "n\xFAmero", + boolean: "booleano", + array: "arreglo", + object: "objeto", + set: "conjunto", + file: "archivo", + date: "fecha", + bigint: "n\xFAmero grande", + symbol: "s\xEDmbolo", + undefined: "indefinido", + null: "nulo", + function: "funci\xF3n", + map: "mapa", + record: "registro", + tuple: "tupla", + enum: "enumeraci\xF3n", + union: "uni\xF3n", + literal: "literal", + promise: "promesa", + void: "vac\xEDo", + never: "nunca", + unknown: "desconocido", + any: "cualquiera" + }; + return (issue4) => { + switch (issue4.code) { + case "invalid_type": { + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType2(issue4.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue4.expected)) { + return `Entrada inv\xE1lida: se esperaba instanceof ${issue4.expected}, recibido ${received}`; + } + return `Entrada inv\xE1lida: se esperaba ${expected}, recibido ${received}`; + } + case "invalid_value": + if (issue4.values.length === 1) + return `Entrada inv\xE1lida: se esperaba ${stringifyPrimitive2(issue4.values[0])}`; + return `Opci\xF3n inv\xE1lida: se esperaba una de ${joinValues2(issue4.values, "|")}`; + case "too_big": { + const adj = issue4.inclusive ? "<=" : "<"; + const sizing = getSizing(issue4.origin); + const origin = TypeDictionary[issue4.origin] ?? issue4.origin; + if (sizing) + return `Demasiado grande: se esperaba que ${origin ?? "valor"} tuviera ${adj}${issue4.maximum.toString()} ${sizing.unit ?? "elementos"}`; + return `Demasiado grande: se esperaba que ${origin ?? "valor"} fuera ${adj}${issue4.maximum.toString()}`; + } + case "too_small": { + const adj = issue4.inclusive ? ">=" : ">"; + const sizing = getSizing(issue4.origin); + const origin = TypeDictionary[issue4.origin] ?? issue4.origin; + if (sizing) { + return `Demasiado peque\xF1o: se esperaba que ${origin} tuviera ${adj}${issue4.minimum.toString()} ${sizing.unit}`; + } + return `Demasiado peque\xF1o: se esperaba que ${origin} fuera ${adj}${issue4.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue4; + if (_issue.format === "starts_with") + return `Cadena inv\xE1lida: debe comenzar con "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `Cadena inv\xE1lida: debe terminar en "${_issue.suffix}"`; + if (_issue.format === "includes") + 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 ${FormatDictionary[_issue.format] ?? issue4.format}`; + } + case "not_multiple_of": + return `N\xFAmero inv\xE1lido: debe ser m\xFAltiplo de ${issue4.divisor}`; + case "unrecognized_keys": + return `Llave${issue4.keys.length > 1 ? "s" : ""} desconocida${issue4.keys.length > 1 ? "s" : ""}: ${joinValues2(issue4.keys, ", ")}`; + case "invalid_key": + return `Llave inv\xE1lida en ${TypeDictionary[issue4.origin] ?? issue4.origin}`; + case "invalid_union": + return "Entrada inv\xE1lida"; + case "invalid_element": + return `Valor inv\xE1lido en ${TypeDictionary[issue4.origin] ?? issue4.origin}`; + default: + return `Entrada inv\xE1lida`; + } + }; + }; + } +}); + +// ../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/locales/fa.js +function fa_default() { + return { + localeError: error14() + }; +} +var error14; +var init_fa = __esm({ + "../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/locales/fa.js"() { + init_util2(); + error14 = () => { + const Sizable = { + string: { unit: "\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631", verb: "\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F" }, + file: { unit: "\u0628\u0627\u06CC\u062A", verb: "\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F" }, + array: { unit: "\u0622\u06CC\u062A\u0645", verb: "\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F" }, + set: { unit: "\u0622\u06CC\u062A\u0645", verb: "\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F" } + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + const FormatDictionary = { + regex: "\u0648\u0631\u0648\u062F\u06CC", + email: "\u0622\u062F\u0631\u0633 \u0627\u06CC\u0645\u06CC\u0644", + url: "URL", + emoji: "\u0627\u06CC\u0645\u0648\u062C\u06CC", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "\u062A\u0627\u0631\u06CC\u062E \u0648 \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648", + date: "\u062A\u0627\u0631\u06CC\u062E \u0627\u06CC\u0632\u0648", + time: "\u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648", + duration: "\u0645\u062F\u062A \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648", + ipv4: "IPv4 \u0622\u062F\u0631\u0633", + ipv6: "IPv6 \u0622\u062F\u0631\u0633", + cidrv4: "IPv4 \u062F\u0627\u0645\u0646\u0647", + cidrv6: "IPv6 \u062F\u0627\u0645\u0646\u0647", + base64: "base64-encoded \u0631\u0634\u062A\u0647", + base64url: "base64url-encoded \u0631\u0634\u062A\u0647", + json_string: "JSON \u0631\u0634\u062A\u0647", + e164: "E.164 \u0639\u062F\u062F", + jwt: "JWT", + template_literal: "\u0648\u0631\u0648\u062F\u06CC" + }; + const TypeDictionary = { + nan: "NaN", + number: "\u0639\u062F\u062F", + array: "\u0622\u0631\u0627\u06CC\u0647" + }; + return (issue4) => { + switch (issue4.code) { + case "invalid_type": { + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType2(issue4.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue4.expected)) { + return `\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A instanceof ${issue4.expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${received} \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 ${expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${received} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`; + } + case "invalid_value": + if (issue4.values.length === 1) { + return `\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${stringifyPrimitive2(issue4.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 ${joinValues2(issue4.values, "|")} \u0645\u06CC\u200C\u0628\u0648\u062F`; + case "too_big": { + const adj = issue4.inclusive ? "<=" : "<"; + const sizing = getSizing(issue4.origin); + if (sizing) { + return `\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${issue4.origin ?? "\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${adj}${issue4.maximum.toString()} ${sizing.unit ?? "\u0639\u0646\u0635\u0631"} \u0628\u0627\u0634\u062F`; + } + return `\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${issue4.origin ?? "\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${adj}${issue4.maximum.toString()} \u0628\u0627\u0634\u062F`; + } + case "too_small": { + const adj = issue4.inclusive ? ">=" : ">"; + const sizing = getSizing(issue4.origin); + if (sizing) { + return `\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${issue4.origin} \u0628\u0627\u06CC\u062F ${adj}${issue4.minimum.toString()} ${sizing.unit} \u0628\u0627\u0634\u062F`; + } + return `\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${issue4.origin} \u0628\u0627\u06CC\u062F ${adj}${issue4.minimum.toString()} \u0628\u0627\u0634\u062F`; + } + case "invalid_format": { + const _issue = issue4; + 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`; + } + if (_issue.format === "ends_with") { + return `\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${_issue.suffix}" \u062A\u0645\u0627\u0645 \u0634\u0648\u062F`; + } + if (_issue.format === "includes") { + return `\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0634\u0627\u0645\u0644 "${_issue.includes}" \u0628\u0627\u0634\u062F`; + } + 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 `${FormatDictionary[_issue.format] ?? issue4.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 ${issue4.divisor} \u0628\u0627\u0634\u062F`; + case "unrecognized_keys": + return `\u06A9\u0644\u06CC\u062F${issue4.keys.length > 1 ? "\u0647\u0627\u06CC" : ""} \u0646\u0627\u0634\u0646\u0627\u0633: ${joinValues2(issue4.keys, ", ")}`; + case "invalid_key": + return `\u06A9\u0644\u06CC\u062F \u0646\u0627\u0634\u0646\u0627\u0633 \u062F\u0631 ${issue4.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 ${issue4.origin}`; + default: + return `\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631`; + } + }; + }; + } +}); + +// ../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/locales/fi.js +function fi_default() { + return { + localeError: error15() + }; +} +var error15; +var init_fi = __esm({ + "../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/locales/fi.js"() { + init_util2(); + error15 = () => { + const Sizable = { + string: { unit: "merkki\xE4", subject: "merkkijonon" }, + file: { unit: "tavua", subject: "tiedoston" }, + array: { unit: "alkiota", subject: "listan" }, + set: { unit: "alkiota", subject: "joukon" }, + number: { unit: "", subject: "luvun" }, + bigint: { unit: "", subject: "suuren kokonaisluvun" }, + int: { unit: "", subject: "kokonaisluvun" }, + date: { unit: "", subject: "p\xE4iv\xE4m\xE4\xE4r\xE4n" } + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + const FormatDictionary = { + regex: "s\xE4\xE4nn\xF6llinen lauseke", + email: "s\xE4hk\xF6postiosoite", + url: "URL-osoite", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO-aikaleima", + date: "ISO-p\xE4iv\xE4m\xE4\xE4r\xE4", + time: "ISO-aika", + duration: "ISO-kesto", + ipv4: "IPv4-osoite", + ipv6: "IPv6-osoite", + cidrv4: "IPv4-alue", + cidrv6: "IPv6-alue", + base64: "base64-koodattu merkkijono", + base64url: "base64url-koodattu merkkijono", + json_string: "JSON-merkkijono", + e164: "E.164-luku", + jwt: "JWT", + template_literal: "templaattimerkkijono" + }; + const TypeDictionary = { + nan: "NaN" + }; + return (issue4) => { + switch (issue4.code) { + case "invalid_type": { + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType2(issue4.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue4.expected)) { + return `Virheellinen tyyppi: odotettiin instanceof ${issue4.expected}, oli ${received}`; + } + return `Virheellinen tyyppi: odotettiin ${expected}, oli ${received}`; + } + case "invalid_value": + if (issue4.values.length === 1) + return `Virheellinen sy\xF6te: t\xE4ytyy olla ${stringifyPrimitive2(issue4.values[0])}`; + return `Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${joinValues2(issue4.values, "|")}`; + case "too_big": { + const adj = issue4.inclusive ? "<=" : "<"; + const sizing = getSizing(issue4.origin); + if (sizing) { + return `Liian suuri: ${sizing.subject} t\xE4ytyy olla ${adj}${issue4.maximum.toString()} ${sizing.unit}`.trim(); + } + return `Liian suuri: arvon t\xE4ytyy olla ${adj}${issue4.maximum.toString()}`; + } + case "too_small": { + const adj = issue4.inclusive ? ">=" : ">"; + const sizing = getSizing(issue4.origin); + if (sizing) { + return `Liian pieni: ${sizing.subject} t\xE4ytyy olla ${adj}${issue4.minimum.toString()} ${sizing.unit}`.trim(); + } + return `Liian pieni: arvon t\xE4ytyy olla ${adj}${issue4.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue4; + if (_issue.format === "starts_with") + return `Virheellinen sy\xF6te: t\xE4ytyy alkaa "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `Virheellinen sy\xF6te: t\xE4ytyy loppua "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Virheellinen sy\xF6te: t\xE4ytyy sis\xE4lt\xE4\xE4 "${_issue.includes}"`; + if (_issue.format === "regex") { + return `Virheellinen sy\xF6te: t\xE4ytyy vastata s\xE4\xE4nn\xF6llist\xE4 lauseketta ${_issue.pattern}`; + } + return `Virheellinen ${FormatDictionary[_issue.format] ?? issue4.format}`; + } + case "not_multiple_of": + return `Virheellinen luku: t\xE4ytyy olla luvun ${issue4.divisor} monikerta`; + case "unrecognized_keys": + return `${issue4.keys.length > 1 ? "Tuntemattomat avaimet" : "Tuntematon avain"}: ${joinValues2(issue4.keys, ", ")}`; + case "invalid_key": + return "Virheellinen avain tietueessa"; + case "invalid_union": + return "Virheellinen unioni"; + case "invalid_element": + return "Virheellinen arvo joukossa"; + default: + return `Virheellinen sy\xF6te`; + } + }; + }; + } +}); + +// ../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/locales/fr.js +function fr_default() { + return { + localeError: error16() + }; +} +var error16; +var init_fr = __esm({ + "../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/locales/fr.js"() { + init_util2(); + error16 = () => { + const Sizable = { + string: { unit: "caract\xE8res", verb: "avoir" }, + file: { unit: "octets", verb: "avoir" }, + array: { unit: "\xE9l\xE9ments", verb: "avoir" }, + set: { unit: "\xE9l\xE9ments", verb: "avoir" } + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + const FormatDictionary = { + regex: "entr\xE9e", + email: "adresse e-mail", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "date et heure ISO", + date: "date ISO", + time: "heure ISO", + duration: "dur\xE9e ISO", + ipv4: "adresse IPv4", + ipv6: "adresse IPv6", + cidrv4: "plage IPv4", + cidrv6: "plage IPv6", + base64: "cha\xEEne encod\xE9e en base64", + base64url: "cha\xEEne encod\xE9e en base64url", + json_string: "cha\xEEne JSON", + e164: "num\xE9ro E.164", + jwt: "JWT", + template_literal: "entr\xE9e" + }; + const TypeDictionary = { + nan: "NaN", + number: "nombre", + array: "tableau" + }; + return (issue4) => { + switch (issue4.code) { + case "invalid_type": { + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType2(issue4.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue4.expected)) { + return `Entr\xE9e invalide : instanceof ${issue4.expected} attendu, ${received} re\xE7u`; + } + return `Entr\xE9e invalide : ${expected} attendu, ${received} re\xE7u`; + } + case "invalid_value": + if (issue4.values.length === 1) + return `Entr\xE9e invalide : ${stringifyPrimitive2(issue4.values[0])} attendu`; + return `Option invalide : une valeur parmi ${joinValues2(issue4.values, "|")} attendue`; + case "too_big": { + const adj = issue4.inclusive ? "<=" : "<"; + const sizing = getSizing(issue4.origin); + if (sizing) + return `Trop grand : ${issue4.origin ?? "valeur"} doit ${sizing.verb} ${adj}${issue4.maximum.toString()} ${sizing.unit ?? "\xE9l\xE9ment(s)"}`; + return `Trop grand : ${issue4.origin ?? "valeur"} doit \xEAtre ${adj}${issue4.maximum.toString()}`; + } + case "too_small": { + const adj = issue4.inclusive ? ">=" : ">"; + const sizing = getSizing(issue4.origin); + if (sizing) { + return `Trop petit : ${issue4.origin} doit ${sizing.verb} ${adj}${issue4.minimum.toString()} ${sizing.unit}`; + } + return `Trop petit : ${issue4.origin} doit \xEAtre ${adj}${issue4.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue4; + if (_issue.format === "starts_with") + return `Cha\xEEne invalide : doit commencer par "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `Cha\xEEne invalide : doit se terminer par "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Cha\xEEne invalide : doit inclure "${_issue.includes}"`; + if (_issue.format === "regex") + return `Cha\xEEne invalide : doit correspondre au mod\xE8le ${_issue.pattern}`; + return `${FormatDictionary[_issue.format] ?? issue4.format} invalide`; + } + case "not_multiple_of": + return `Nombre invalide : doit \xEAtre un multiple de ${issue4.divisor}`; + case "unrecognized_keys": + return `Cl\xE9${issue4.keys.length > 1 ? "s" : ""} non reconnue${issue4.keys.length > 1 ? "s" : ""} : ${joinValues2(issue4.keys, ", ")}`; + case "invalid_key": + return `Cl\xE9 invalide dans ${issue4.origin}`; + case "invalid_union": + return "Entr\xE9e invalide"; + case "invalid_element": + return `Valeur invalide dans ${issue4.origin}`; + default: + return `Entr\xE9e invalide`; + } + }; + }; + } +}); + +// ../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/locales/fr-CA.js +function fr_CA_default() { + return { + localeError: error17() + }; +} +var error17; +var init_fr_CA = __esm({ + "../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/locales/fr-CA.js"() { + init_util2(); + error17 = () => { + const Sizable = { + string: { unit: "caract\xE8res", verb: "avoir" }, + file: { unit: "octets", verb: "avoir" }, + array: { unit: "\xE9l\xE9ments", verb: "avoir" }, + set: { unit: "\xE9l\xE9ments", verb: "avoir" } + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + const FormatDictionary = { + regex: "entr\xE9e", + email: "adresse courriel", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "date-heure ISO", + date: "date ISO", + time: "heure ISO", + duration: "dur\xE9e ISO", + ipv4: "adresse IPv4", + ipv6: "adresse IPv6", + cidrv4: "plage IPv4", + cidrv6: "plage IPv6", + base64: "cha\xEEne encod\xE9e en base64", + base64url: "cha\xEEne encod\xE9e en base64url", + json_string: "cha\xEEne JSON", + e164: "num\xE9ro E.164", + jwt: "JWT", + template_literal: "entr\xE9e" + }; + const TypeDictionary = { + nan: "NaN" + }; + return (issue4) => { + switch (issue4.code) { + case "invalid_type": { + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType2(issue4.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue4.expected)) { + return `Entr\xE9e invalide : attendu instanceof ${issue4.expected}, re\xE7u ${received}`; + } + return `Entr\xE9e invalide : attendu ${expected}, re\xE7u ${received}`; + } + case "invalid_value": + if (issue4.values.length === 1) + return `Entr\xE9e invalide : attendu ${stringifyPrimitive2(issue4.values[0])}`; + return `Option invalide : attendu l'une des valeurs suivantes ${joinValues2(issue4.values, "|")}`; + case "too_big": { + const adj = issue4.inclusive ? "\u2264" : "<"; + const sizing = getSizing(issue4.origin); + if (sizing) + return `Trop grand : attendu que ${issue4.origin ?? "la valeur"} ait ${adj}${issue4.maximum.toString()} ${sizing.unit}`; + return `Trop grand : attendu que ${issue4.origin ?? "la valeur"} soit ${adj}${issue4.maximum.toString()}`; + } + case "too_small": { + const adj = issue4.inclusive ? "\u2265" : ">"; + const sizing = getSizing(issue4.origin); + if (sizing) { + return `Trop petit : attendu que ${issue4.origin} ait ${adj}${issue4.minimum.toString()} ${sizing.unit}`; + } + return `Trop petit : attendu que ${issue4.origin} soit ${adj}${issue4.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue4; + if (_issue.format === "starts_with") { + return `Cha\xEEne invalide : doit commencer par "${_issue.prefix}"`; + } + if (_issue.format === "ends_with") + return `Cha\xEEne invalide : doit se terminer par "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Cha\xEEne invalide : doit inclure "${_issue.includes}"`; + if (_issue.format === "regex") + return `Cha\xEEne invalide : doit correspondre au motif ${_issue.pattern}`; + return `${FormatDictionary[_issue.format] ?? issue4.format} invalide`; + } + case "not_multiple_of": + return `Nombre invalide : doit \xEAtre un multiple de ${issue4.divisor}`; + case "unrecognized_keys": + return `Cl\xE9${issue4.keys.length > 1 ? "s" : ""} non reconnue${issue4.keys.length > 1 ? "s" : ""} : ${joinValues2(issue4.keys, ", ")}`; + case "invalid_key": + return `Cl\xE9 invalide dans ${issue4.origin}`; + case "invalid_union": + return "Entr\xE9e invalide"; + case "invalid_element": + return `Valeur invalide dans ${issue4.origin}`; + default: + return `Entr\xE9e invalide`; + } + }; + }; + } +}); + +// ../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/locales/he.js +function he_default() { + return { + localeError: error18() + }; +} +var error18; +var init_he = __esm({ + "../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/locales/he.js"() { + init_util2(); + error18 = () => { + const TypeNames = { + string: { label: "\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA", gender: "f" }, + number: { label: "\u05DE\u05E1\u05E4\u05E8", gender: "m" }, + boolean: { label: "\u05E2\u05E8\u05DA \u05D1\u05D5\u05DC\u05D9\u05D0\u05E0\u05D9", gender: "m" }, + bigint: { label: "BigInt", gender: "m" }, + date: { label: "\u05EA\u05D0\u05E8\u05D9\u05DA", gender: "m" }, + array: { label: "\u05DE\u05E2\u05E8\u05DA", gender: "m" }, + object: { label: "\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8", gender: "m" }, + null: { label: "\u05E2\u05E8\u05DA \u05E8\u05D9\u05E7 (null)", gender: "m" }, + undefined: { label: "\u05E2\u05E8\u05DA \u05DC\u05D0 \u05DE\u05D5\u05D2\u05D3\u05E8 (undefined)", gender: "m" }, + symbol: { label: "\u05E1\u05D9\u05DE\u05D1\u05D5\u05DC (Symbol)", gender: "m" }, + function: { label: "\u05E4\u05D5\u05E0\u05E7\u05E6\u05D9\u05D4", gender: "f" }, + map: { label: "\u05DE\u05E4\u05D4 (Map)", gender: "f" }, + set: { label: "\u05E7\u05D1\u05D5\u05E6\u05D4 (Set)", gender: "f" }, + file: { label: "\u05E7\u05D5\u05D1\u05E5", gender: "m" }, + promise: { label: "Promise", gender: "m" }, + NaN: { label: "NaN", gender: "m" }, + unknown: { label: "\u05E2\u05E8\u05DA \u05DC\u05D0 \u05D9\u05D3\u05D5\u05E2", gender: "m" }, + value: { label: "\u05E2\u05E8\u05DA", gender: "m" } + }; + const Sizable = { + string: { unit: "\u05EA\u05D5\u05D5\u05D9\u05DD", shortLabel: "\u05E7\u05E6\u05E8", longLabel: "\u05D0\u05E8\u05D5\u05DA" }, + file: { unit: "\u05D1\u05D9\u05D9\u05D8\u05D9\u05DD", shortLabel: "\u05E7\u05D8\u05DF", longLabel: "\u05D2\u05D3\u05D5\u05DC" }, + array: { unit: "\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD", shortLabel: "\u05E7\u05D8\u05DF", longLabel: "\u05D2\u05D3\u05D5\u05DC" }, + set: { unit: "\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD", shortLabel: "\u05E7\u05D8\u05DF", longLabel: "\u05D2\u05D3\u05D5\u05DC" }, + number: { unit: "", shortLabel: "\u05E7\u05D8\u05DF", longLabel: "\u05D2\u05D3\u05D5\u05DC" } + // no unit + }; + const typeEntry = (t) => t ? TypeNames[t] : void 0; + const typeLabel = (t) => { + const e = typeEntry(t); + if (e) + return e.label; + return t ?? TypeNames.unknown.label; + }; + const withDefinite = (t) => `\u05D4${typeLabel(t)}`; + const verbFor = (t) => { + const e = typeEntry(t); + const gender = e?.gender ?? "m"; + return gender === "f" ? "\u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05D9\u05D5\u05EA" : "\u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA"; + }; + const getSizing = (origin) => { + if (!origin) + return null; + return Sizable[origin] ?? null; + }; + const FormatDictionary = { + regex: { label: "\u05E7\u05DC\u05D8", gender: "m" }, + email: { label: "\u05DB\u05EA\u05D5\u05D1\u05EA \u05D0\u05D9\u05DE\u05D9\u05D9\u05DC", gender: "f" }, + url: { label: "\u05DB\u05EA\u05D5\u05D1\u05EA \u05E8\u05E9\u05EA", gender: "f" }, + emoji: { label: "\u05D0\u05D9\u05DE\u05D5\u05D2'\u05D9", gender: "m" }, + uuid: { label: "UUID", gender: "m" }, + nanoid: { label: "nanoid", gender: "m" }, + guid: { label: "GUID", gender: "m" }, + cuid: { label: "cuid", gender: "m" }, + cuid2: { label: "cuid2", gender: "m" }, + ulid: { label: "ULID", gender: "m" }, + xid: { label: "XID", gender: "m" }, + ksuid: { label: "KSUID", gender: "m" }, + datetime: { label: "\u05EA\u05D0\u05E8\u05D9\u05DA \u05D5\u05D6\u05DE\u05DF ISO", gender: "m" }, + date: { label: "\u05EA\u05D0\u05E8\u05D9\u05DA ISO", gender: "m" }, + time: { label: "\u05D6\u05DE\u05DF ISO", gender: "m" }, + duration: { label: "\u05DE\u05E9\u05DA \u05D6\u05DE\u05DF ISO", gender: "m" }, + ipv4: { label: "\u05DB\u05EA\u05D5\u05D1\u05EA IPv4", gender: "f" }, + ipv6: { label: "\u05DB\u05EA\u05D5\u05D1\u05EA IPv6", gender: "f" }, + cidrv4: { label: "\u05D8\u05D5\u05D5\u05D7 IPv4", gender: "m" }, + cidrv6: { label: "\u05D8\u05D5\u05D5\u05D7 IPv6", gender: "m" }, + base64: { label: "\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64", gender: "f" }, + base64url: { label: "\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64 \u05DC\u05DB\u05EA\u05D5\u05D1\u05D5\u05EA \u05E8\u05E9\u05EA", gender: "f" }, + json_string: { label: "\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA JSON", gender: "f" }, + e164: { label: "\u05DE\u05E1\u05E4\u05E8 E.164", gender: "m" }, + jwt: { label: "JWT", gender: "m" }, + ends_with: { label: "\u05E7\u05DC\u05D8", gender: "m" }, + includes: { label: "\u05E7\u05DC\u05D8", gender: "m" }, + lowercase: { label: "\u05E7\u05DC\u05D8", gender: "m" }, + starts_with: { label: "\u05E7\u05DC\u05D8", gender: "m" }, + uppercase: { label: "\u05E7\u05DC\u05D8", gender: "m" } + }; + const TypeDictionary = { + nan: "NaN" + }; + return (issue4) => { + switch (issue4.code) { + case "invalid_type": { + const expectedKey = issue4.expected; + const expected = TypeDictionary[expectedKey ?? ""] ?? typeLabel(expectedKey); + const receivedType = parsedType2(issue4.input); + const received = TypeDictionary[receivedType] ?? TypeNames[receivedType]?.label ?? receivedType; + if (/^[A-Z]/.test(issue4.expected)) { + return `\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA instanceof ${issue4.expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${received}`; + } + return `\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${received}`; + } + case "invalid_value": { + if (issue4.values.length === 1) { + return `\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05E2\u05E8\u05DA \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA ${stringifyPrimitive2(issue4.values[0])}`; + } + const stringified = issue4.values.map((v) => stringifyPrimitive2(v)); + if (issue4.values.length === 2) { + return `\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${stringified[0]} \u05D0\u05D5 ${stringified[1]}`; + } + const lastValue = stringified[stringified.length - 1]; + const restValues = stringified.slice(0, -1).join(", "); + return `\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${restValues} \u05D0\u05D5 ${lastValue}`; + } + case "too_big": { + const sizing = getSizing(issue4.origin); + const subject = withDefinite(issue4.origin ?? "value"); + if (issue4.origin === "string") { + return `${sizing?.longLabel ?? "\u05D0\u05E8\u05D5\u05DA"} \u05DE\u05D3\u05D9: ${subject} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${issue4.maximum.toString()} ${sizing?.unit ?? ""} ${issue4.inclusive ? "\u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA" : "\u05DC\u05DB\u05DC \u05D4\u05D9\u05D5\u05EA\u05E8"}`.trim(); + } + if (issue4.origin === "number") { + const comparison = issue4.inclusive ? `\u05E7\u05D8\u05DF \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${issue4.maximum}` : `\u05E7\u05D8\u05DF \u05DE-${issue4.maximum}`; + return `\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${subject} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${comparison}`; + } + if (issue4.origin === "array" || issue4.origin === "set") { + const verb = issue4.origin === "set" ? "\u05E6\u05E8\u05D9\u05DB\u05D4" : "\u05E6\u05E8\u05D9\u05DA"; + const comparison = issue4.inclusive ? `${issue4.maximum} ${sizing?.unit ?? ""} \u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA` : `\u05E4\u05D7\u05D5\u05EA \u05DE-${issue4.maximum} ${sizing?.unit ?? ""}`; + return `\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${subject} ${verb} \u05DC\u05D4\u05DB\u05D9\u05DC ${comparison}`.trim(); + } + const adj = issue4.inclusive ? "<=" : "<"; + const be = verbFor(issue4.origin ?? "value"); + if (sizing?.unit) { + return `${sizing.longLabel} \u05DE\u05D3\u05D9: ${subject} ${be} ${adj}${issue4.maximum.toString()} ${sizing.unit}`; + } + return `${sizing?.longLabel ?? "\u05D2\u05D3\u05D5\u05DC"} \u05DE\u05D3\u05D9: ${subject} ${be} ${adj}${issue4.maximum.toString()}`; + } + case "too_small": { + const sizing = getSizing(issue4.origin); + const subject = withDefinite(issue4.origin ?? "value"); + if (issue4.origin === "string") { + return `${sizing?.shortLabel ?? "\u05E7\u05E6\u05E8"} \u05DE\u05D3\u05D9: ${subject} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${issue4.minimum.toString()} ${sizing?.unit ?? ""} ${issue4.inclusive ? "\u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8" : "\u05DC\u05E4\u05D7\u05D5\u05EA"}`.trim(); + } + if (issue4.origin === "number") { + const comparison = issue4.inclusive ? `\u05D2\u05D3\u05D5\u05DC \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${issue4.minimum}` : `\u05D2\u05D3\u05D5\u05DC \u05DE-${issue4.minimum}`; + return `\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${subject} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${comparison}`; + } + if (issue4.origin === "array" || issue4.origin === "set") { + const verb = issue4.origin === "set" ? "\u05E6\u05E8\u05D9\u05DB\u05D4" : "\u05E6\u05E8\u05D9\u05DA"; + if (issue4.minimum === 1 && issue4.inclusive) { + const singularPhrase = issue4.origin === "set" ? "\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3" : "\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3"; + return `\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${subject} ${verb} \u05DC\u05D4\u05DB\u05D9\u05DC ${singularPhrase}`; + } + const comparison = issue4.inclusive ? `${issue4.minimum} ${sizing?.unit ?? ""} \u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8` : `\u05D9\u05D5\u05EA\u05E8 \u05DE-${issue4.minimum} ${sizing?.unit ?? ""}`; + return `\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${subject} ${verb} \u05DC\u05D4\u05DB\u05D9\u05DC ${comparison}`.trim(); + } + const adj = issue4.inclusive ? ">=" : ">"; + const be = verbFor(issue4.origin ?? "value"); + if (sizing?.unit) { + return `${sizing.shortLabel} \u05DE\u05D3\u05D9: ${subject} ${be} ${adj}${issue4.minimum.toString()} ${sizing.unit}`; + } + return `${sizing?.shortLabel ?? "\u05E7\u05D8\u05DF"} \u05DE\u05D3\u05D9: ${subject} ${be} ${adj}${issue4.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue4; + if (_issue.format === "starts_with") + return `\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1 "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05E1\u05EA\u05D9\u05D9\u05DD \u05D1 "${_issue.suffix}"`; + if (_issue.format === "includes") + return `\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC "${_issue.includes}"`; + if (_issue.format === "regex") + return `\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D0\u05D9\u05DD \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA ${_issue.pattern}`; + const nounEntry = FormatDictionary[_issue.format]; + const noun = nounEntry?.label ?? _issue.format; + const gender = nounEntry?.gender ?? "m"; + const adjective = gender === "f" ? "\u05EA\u05E7\u05D9\u05E0\u05D4" : "\u05EA\u05E7\u05D9\u05DF"; + return `${noun} \u05DC\u05D0 ${adjective}`; + } + 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 ${issue4.divisor}`; + case "unrecognized_keys": + return `\u05DE\u05E4\u05EA\u05D7${issue4.keys.length > 1 ? "\u05D5\u05EA" : ""} \u05DC\u05D0 \u05DE\u05D6\u05D5\u05D4${issue4.keys.length > 1 ? "\u05D9\u05DD" : "\u05D4"}: ${joinValues2(issue4.keys, ", ")}`; + case "invalid_key": { + return `\u05E9\u05D3\u05D4 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8`; + } + case "invalid_union": + return "\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF"; + case "invalid_element": { + const place = withDefinite(issue4.origin ?? "array"); + return `\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1${place}`; + } + default: + return `\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF`; + } + }; + }; + } +}); + +// ../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/locales/hu.js +function hu_default() { + return { + localeError: error19() + }; +} +var error19; +var init_hu = __esm({ + "../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/locales/hu.js"() { + init_util2(); + error19 = () => { + const Sizable = { + string: { unit: "karakter", verb: "legyen" }, + file: { unit: "byte", verb: "legyen" }, + array: { unit: "elem", verb: "legyen" }, + set: { unit: "elem", verb: "legyen" } + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + const FormatDictionary = { + regex: "bemenet", + email: "email c\xEDm", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO id\u0151b\xE9lyeg", + date: "ISO d\xE1tum", + time: "ISO id\u0151", + duration: "ISO id\u0151intervallum", + ipv4: "IPv4 c\xEDm", + ipv6: "IPv6 c\xEDm", + cidrv4: "IPv4 tartom\xE1ny", + cidrv6: "IPv6 tartom\xE1ny", + base64: "base64-k\xF3dolt string", + base64url: "base64url-k\xF3dolt string", + json_string: "JSON string", + e164: "E.164 sz\xE1m", + jwt: "JWT", + template_literal: "bemenet" + }; + const TypeDictionary = { + nan: "NaN", + number: "sz\xE1m", + array: "t\xF6mb" + }; + return (issue4) => { + switch (issue4.code) { + case "invalid_type": { + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType2(issue4.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue4.expected)) { + return `\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k instanceof ${issue4.expected}, a kapott \xE9rt\xE9k ${received}`; + } + return `\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${expected}, a kapott \xE9rt\xE9k ${received}`; + } + case "invalid_value": + if (issue4.values.length === 1) + return `\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${stringifyPrimitive2(issue4.values[0])}`; + return `\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${joinValues2(issue4.values, "|")}`; + case "too_big": { + const adj = issue4.inclusive ? "<=" : "<"; + const sizing = getSizing(issue4.origin); + if (sizing) + return `T\xFAl nagy: ${issue4.origin ?? "\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${adj}${issue4.maximum.toString()} ${sizing.unit ?? "elem"}`; + return `T\xFAl nagy: a bemeneti \xE9rt\xE9k ${issue4.origin ?? "\xE9rt\xE9k"} t\xFAl nagy: ${adj}${issue4.maximum.toString()}`; + } + case "too_small": { + const adj = issue4.inclusive ? ">=" : ">"; + const sizing = getSizing(issue4.origin); + if (sizing) { + return `T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${issue4.origin} m\xE9rete t\xFAl kicsi ${adj}${issue4.minimum.toString()} ${sizing.unit}`; + } + return `T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${issue4.origin} t\xFAl kicsi ${adj}${issue4.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue4; + if (_issue.format === "starts_with") + return `\xC9rv\xE9nytelen string: "${_issue.prefix}" \xE9rt\xE9kkel kell kezd\u0151dnie`; + if (_issue.format === "ends_with") + return `\xC9rv\xE9nytelen string: "${_issue.suffix}" \xE9rt\xE9kkel kell v\xE9gz\u0151dnie`; + if (_issue.format === "includes") + 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 ${FormatDictionary[_issue.format] ?? issue4.format}`; + } + case "not_multiple_of": + return `\xC9rv\xE9nytelen sz\xE1m: ${issue4.divisor} t\xF6bbsz\xF6r\xF6s\xE9nek kell lennie`; + case "unrecognized_keys": + return `Ismeretlen kulcs${issue4.keys.length > 1 ? "s" : ""}: ${joinValues2(issue4.keys, ", ")}`; + case "invalid_key": + return `\xC9rv\xE9nytelen kulcs ${issue4.origin}`; + case "invalid_union": + return "\xC9rv\xE9nytelen bemenet"; + case "invalid_element": + return `\xC9rv\xE9nytelen \xE9rt\xE9k: ${issue4.origin}`; + default: + return `\xC9rv\xE9nytelen bemenet`; + } + }; + }; + } +}); + +// ../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/locales/hy.js +function getArmenianPlural(count, one, many) { + return Math.abs(count) === 1 ? one : many; +} +function withDefiniteArticle(word) { + if (!word) + return ""; + const vowels = ["\u0561", "\u0565", "\u0568", "\u056B", "\u0578", "\u0578\u0582", "\u0585"]; + const lastChar = word[word.length - 1]; + return word + (vowels.includes(lastChar) ? "\u0576" : "\u0568"); +} +function hy_default() { + return { + localeError: error20() + }; +} +var error20; +var init_hy = __esm({ + "../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/locales/hy.js"() { + init_util2(); + error20 = () => { + const Sizable = { + string: { + unit: { + one: "\u0576\u0577\u0561\u0576", + many: "\u0576\u0577\u0561\u0576\u0576\u0565\u0580" + }, + verb: "\u0578\u0582\u0576\u0565\u0576\u0561\u056C" + }, + file: { + unit: { + one: "\u0562\u0561\u0575\u0569", + many: "\u0562\u0561\u0575\u0569\u0565\u0580" + }, + verb: "\u0578\u0582\u0576\u0565\u0576\u0561\u056C" + }, + array: { + unit: { + one: "\u057F\u0561\u0580\u0580", + many: "\u057F\u0561\u0580\u0580\u0565\u0580" + }, + verb: "\u0578\u0582\u0576\u0565\u0576\u0561\u056C" + }, + set: { + unit: { + one: "\u057F\u0561\u0580\u0580", + many: "\u057F\u0561\u0580\u0580\u0565\u0580" + }, + verb: "\u0578\u0582\u0576\u0565\u0576\u0561\u056C" + } + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + const FormatDictionary = { + regex: "\u0574\u0578\u0582\u057F\u0584", + email: "\u0567\u056C. \u0570\u0561\u057D\u0581\u0565", + url: "URL", + emoji: "\u0567\u0574\u0578\u057B\u056B", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E \u0587 \u056A\u0561\u0574", + date: "ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E", + time: "ISO \u056A\u0561\u0574", + duration: "ISO \u057F\u0587\u0578\u0572\u0578\u0582\u0569\u0575\u0578\u0582\u0576", + ipv4: "IPv4 \u0570\u0561\u057D\u0581\u0565", + ipv6: "IPv6 \u0570\u0561\u057D\u0581\u0565", + cidrv4: "IPv4 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584", + cidrv6: "IPv6 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584", + base64: "base64 \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572", + base64url: "base64url \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572", + json_string: "JSON \u057F\u0578\u0572", + e164: "E.164 \u0570\u0561\u0574\u0561\u0580", + jwt: "JWT", + template_literal: "\u0574\u0578\u0582\u057F\u0584" + }; + const TypeDictionary = { + nan: "NaN", + number: "\u0569\u056B\u057E", + array: "\u0566\u0561\u0576\u0563\u057E\u0561\u056E" + }; + return (issue4) => { + switch (issue4.code) { + case "invalid_type": { + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType2(issue4.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue4.expected)) { + return `\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 instanceof ${issue4.expected}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${received}`; + } + return `\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${expected}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${received}`; + } + case "invalid_value": + if (issue4.values.length === 1) + return `\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${stringifyPrimitive2(issue4.values[1])}`; + return `\u054D\u056D\u0561\u056C \u057F\u0561\u0580\u0562\u0565\u0580\u0561\u056F\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 \u0570\u0565\u057F\u0587\u0575\u0561\u056C\u0576\u0565\u0580\u056B\u0581 \u0574\u0565\u056F\u0568\u055D ${joinValues2(issue4.values, "|")}`; + case "too_big": { + const adj = issue4.inclusive ? "<=" : "<"; + const sizing = getSizing(issue4.origin); + if (sizing) { + const maxValue = Number(issue4.maximum); + const unit = getArmenianPlural(maxValue, sizing.unit.one, sizing.unit.many); + return `\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${withDefiniteArticle(issue4.origin ?? "\u0561\u0580\u056A\u0565\u0584")} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${adj}${issue4.maximum.toString()} ${unit}`; + } + return `\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${withDefiniteArticle(issue4.origin ?? "\u0561\u0580\u056A\u0565\u0584")} \u056C\u056B\u0576\u056B ${adj}${issue4.maximum.toString()}`; + } + case "too_small": { + const adj = issue4.inclusive ? ">=" : ">"; + const sizing = getSizing(issue4.origin); + if (sizing) { + const minValue = Number(issue4.minimum); + const unit = getArmenianPlural(minValue, sizing.unit.one, sizing.unit.many); + return `\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${withDefiniteArticle(issue4.origin)} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${adj}${issue4.minimum.toString()} ${unit}`; + } + return `\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${withDefiniteArticle(issue4.origin)} \u056C\u056B\u0576\u056B ${adj}${issue4.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue4; + if (_issue.format === "starts_with") + return `\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057D\u056F\u057D\u057E\u056B "${_issue.prefix}"-\u0578\u057E`; + if (_issue.format === "ends_with") + return `\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0561\u057E\u0561\u0580\u057F\u057E\u056B "${_issue.suffix}"-\u0578\u057E`; + if (_issue.format === "includes") + return `\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057A\u0561\u0580\u0578\u0582\u0576\u0561\u056F\u056B "${_issue.includes}"`; + if (_issue.format === "regex") + return `\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0570\u0561\u0574\u0561\u057A\u0561\u057F\u0561\u057D\u056D\u0561\u0576\u056B ${_issue.pattern} \u0571\u0587\u0561\u0579\u0561\u0583\u056B\u0576`; + return `\u054D\u056D\u0561\u056C ${FormatDictionary[_issue.format] ?? issue4.format}`; + } + case "not_multiple_of": + return `\u054D\u056D\u0561\u056C \u0569\u056B\u057E\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0562\u0561\u0566\u0574\u0561\u057A\u0561\u057F\u056B\u056F \u056C\u056B\u0576\u056B ${issue4.divisor}-\u056B`; + case "unrecognized_keys": + return `\u0549\u0573\u0561\u0576\u0561\u0579\u057E\u0561\u056E \u0562\u0561\u0576\u0561\u056C\u056B${issue4.keys.length > 1 ? "\u0576\u0565\u0580" : ""}. ${joinValues2(issue4.keys, ", ")}`; + case "invalid_key": + return `\u054D\u056D\u0561\u056C \u0562\u0561\u0576\u0561\u056C\u056B ${withDefiniteArticle(issue4.origin)}-\u0578\u0582\u0574`; + case "invalid_union": + return "\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574"; + case "invalid_element": + return `\u054D\u056D\u0561\u056C \u0561\u0580\u056A\u0565\u0584 ${withDefiniteArticle(issue4.origin)}-\u0578\u0582\u0574`; + default: + return `\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574`; + } + }; + }; + } +}); + +// ../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/locales/id.js +function id_default() { + return { + localeError: error21() + }; +} +var error21; +var init_id = __esm({ + "../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/locales/id.js"() { + init_util2(); + error21 = () => { + const Sizable = { + string: { unit: "karakter", verb: "memiliki" }, + file: { unit: "byte", verb: "memiliki" }, + array: { unit: "item", verb: "memiliki" }, + set: { unit: "item", verb: "memiliki" } + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + const FormatDictionary = { + regex: "input", + email: "alamat email", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "tanggal dan waktu format ISO", + date: "tanggal format ISO", + time: "jam format ISO", + duration: "durasi format ISO", + ipv4: "alamat IPv4", + ipv6: "alamat IPv6", + cidrv4: "rentang alamat IPv4", + cidrv6: "rentang alamat IPv6", + base64: "string dengan enkode base64", + base64url: "string dengan enkode base64url", + json_string: "string JSON", + e164: "angka E.164", + jwt: "JWT", + template_literal: "input" + }; + const TypeDictionary = { + nan: "NaN" + }; + return (issue4) => { + switch (issue4.code) { + case "invalid_type": { + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType2(issue4.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue4.expected)) { + return `Input tidak valid: diharapkan instanceof ${issue4.expected}, diterima ${received}`; + } + return `Input tidak valid: diharapkan ${expected}, diterima ${received}`; + } + case "invalid_value": + if (issue4.values.length === 1) + return `Input tidak valid: diharapkan ${stringifyPrimitive2(issue4.values[0])}`; + return `Pilihan tidak valid: diharapkan salah satu dari ${joinValues2(issue4.values, "|")}`; + case "too_big": { + const adj = issue4.inclusive ? "<=" : "<"; + const sizing = getSizing(issue4.origin); + if (sizing) + return `Terlalu besar: diharapkan ${issue4.origin ?? "value"} memiliki ${adj}${issue4.maximum.toString()} ${sizing.unit ?? "elemen"}`; + return `Terlalu besar: diharapkan ${issue4.origin ?? "value"} menjadi ${adj}${issue4.maximum.toString()}`; + } + case "too_small": { + const adj = issue4.inclusive ? ">=" : ">"; + const sizing = getSizing(issue4.origin); + if (sizing) { + return `Terlalu kecil: diharapkan ${issue4.origin} memiliki ${adj}${issue4.minimum.toString()} ${sizing.unit}`; + } + return `Terlalu kecil: diharapkan ${issue4.origin} menjadi ${adj}${issue4.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue4; + if (_issue.format === "starts_with") + return `String tidak valid: harus dimulai dengan "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `String tidak valid: harus berakhir dengan "${_issue.suffix}"`; + if (_issue.format === "includes") + return `String tidak valid: harus menyertakan "${_issue.includes}"`; + if (_issue.format === "regex") + return `String tidak valid: harus sesuai pola ${_issue.pattern}`; + return `${FormatDictionary[_issue.format] ?? issue4.format} tidak valid`; + } + case "not_multiple_of": + return `Angka tidak valid: harus kelipatan dari ${issue4.divisor}`; + case "unrecognized_keys": + return `Kunci tidak dikenali ${issue4.keys.length > 1 ? "s" : ""}: ${joinValues2(issue4.keys, ", ")}`; + case "invalid_key": + return `Kunci tidak valid di ${issue4.origin}`; + case "invalid_union": + return "Input tidak valid"; + case "invalid_element": + return `Nilai tidak valid di ${issue4.origin}`; + default: + return `Input tidak valid`; + } + }; + }; + } +}); + +// ../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/locales/is.js +function is_default() { + return { + localeError: error22() + }; +} +var error22; +var init_is = __esm({ + "../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/locales/is.js"() { + init_util2(); + error22 = () => { + const Sizable = { + string: { unit: "stafi", verb: "a\xF0 hafa" }, + file: { unit: "b\xE6ti", verb: "a\xF0 hafa" }, + array: { unit: "hluti", verb: "a\xF0 hafa" }, + set: { unit: "hluti", verb: "a\xF0 hafa" } + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + const FormatDictionary = { + regex: "gildi", + email: "netfang", + url: "vefsl\xF3\xF0", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO dagsetning og t\xEDmi", + date: "ISO dagsetning", + time: "ISO t\xEDmi", + duration: "ISO t\xEDmalengd", + ipv4: "IPv4 address", + ipv6: "IPv6 address", + cidrv4: "IPv4 range", + cidrv6: "IPv6 range", + base64: "base64-encoded strengur", + base64url: "base64url-encoded strengur", + json_string: "JSON strengur", + e164: "E.164 t\xF6lugildi", + jwt: "JWT", + template_literal: "gildi" + }; + const TypeDictionary = { + nan: "NaN", + number: "n\xFAmer", + array: "fylki" + }; + return (issue4) => { + switch (issue4.code) { + case "invalid_type": { + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType2(issue4.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue4.expected)) { + return `Rangt gildi: \xDE\xFA sl\xF3st inn ${received} \xFEar sem \xE1 a\xF0 vera instanceof ${issue4.expected}`; + } + return `Rangt gildi: \xDE\xFA sl\xF3st inn ${received} \xFEar sem \xE1 a\xF0 vera ${expected}`; + } + case "invalid_value": + if (issue4.values.length === 1) + return `Rangt gildi: gert r\xE1\xF0 fyrir ${stringifyPrimitive2(issue4.values[0])}`; + return `\xD3gilt val: m\xE1 vera eitt af eftirfarandi ${joinValues2(issue4.values, "|")}`; + case "too_big": { + const adj = issue4.inclusive ? "<=" : "<"; + const sizing = getSizing(issue4.origin); + if (sizing) + return `Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${issue4.origin ?? "gildi"} hafi ${adj}${issue4.maximum.toString()} ${sizing.unit ?? "hluti"}`; + return `Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${issue4.origin ?? "gildi"} s\xE9 ${adj}${issue4.maximum.toString()}`; + } + case "too_small": { + const adj = issue4.inclusive ? ">=" : ">"; + const sizing = getSizing(issue4.origin); + if (sizing) { + return `Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${issue4.origin} hafi ${adj}${issue4.minimum.toString()} ${sizing.unit}`; + } + return `Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${issue4.origin} s\xE9 ${adj}${issue4.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue4; + if (_issue.format === "starts_with") { + return `\xD3gildur strengur: ver\xF0ur a\xF0 byrja \xE1 "${_issue.prefix}"`; + } + if (_issue.format === "ends_with") + return `\xD3gildur strengur: ver\xF0ur a\xF0 enda \xE1 "${_issue.suffix}"`; + if (_issue.format === "includes") + return `\xD3gildur strengur: ver\xF0ur a\xF0 innihalda "${_issue.includes}"`; + if (_issue.format === "regex") + return `\xD3gildur strengur: ver\xF0ur a\xF0 fylgja mynstri ${_issue.pattern}`; + return `Rangt ${FormatDictionary[_issue.format] ?? issue4.format}`; + } + case "not_multiple_of": + return `R\xF6ng tala: ver\xF0ur a\xF0 vera margfeldi af ${issue4.divisor}`; + case "unrecognized_keys": + return `\xD3\xFEekkt ${issue4.keys.length > 1 ? "ir lyklar" : "ur lykill"}: ${joinValues2(issue4.keys, ", ")}`; + case "invalid_key": + return `Rangur lykill \xED ${issue4.origin}`; + case "invalid_union": + return "Rangt gildi"; + case "invalid_element": + return `Rangt gildi \xED ${issue4.origin}`; + default: + return `Rangt gildi`; + } + }; + }; + } +}); + +// ../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/locales/it.js +function it_default() { + return { + localeError: error23() + }; +} +var error23; +var init_it = __esm({ + "../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/locales/it.js"() { + init_util2(); + error23 = () => { + const Sizable = { + string: { unit: "caratteri", verb: "avere" }, + file: { unit: "byte", verb: "avere" }, + array: { unit: "elementi", verb: "avere" }, + set: { unit: "elementi", verb: "avere" } + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + const FormatDictionary = { + regex: "input", + email: "indirizzo email", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "data e ora ISO", + date: "data ISO", + time: "ora ISO", + duration: "durata ISO", + ipv4: "indirizzo IPv4", + ipv6: "indirizzo IPv6", + cidrv4: "intervallo IPv4", + cidrv6: "intervallo IPv6", + base64: "stringa codificata in base64", + base64url: "URL codificata in base64", + json_string: "stringa JSON", + e164: "numero E.164", + jwt: "JWT", + template_literal: "input" + }; + const TypeDictionary = { + nan: "NaN", + number: "numero", + array: "vettore" + }; + return (issue4) => { + switch (issue4.code) { + case "invalid_type": { + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType2(issue4.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue4.expected)) { + return `Input non valido: atteso instanceof ${issue4.expected}, ricevuto ${received}`; + } + return `Input non valido: atteso ${expected}, ricevuto ${received}`; + } + case "invalid_value": + if (issue4.values.length === 1) + return `Input non valido: atteso ${stringifyPrimitive2(issue4.values[0])}`; + return `Opzione non valida: atteso uno tra ${joinValues2(issue4.values, "|")}`; + case "too_big": { + const adj = issue4.inclusive ? "<=" : "<"; + const sizing = getSizing(issue4.origin); + if (sizing) + return `Troppo grande: ${issue4.origin ?? "valore"} deve avere ${adj}${issue4.maximum.toString()} ${sizing.unit ?? "elementi"}`; + return `Troppo grande: ${issue4.origin ?? "valore"} deve essere ${adj}${issue4.maximum.toString()}`; + } + case "too_small": { + const adj = issue4.inclusive ? ">=" : ">"; + const sizing = getSizing(issue4.origin); + if (sizing) { + return `Troppo piccolo: ${issue4.origin} deve avere ${adj}${issue4.minimum.toString()} ${sizing.unit}`; + } + return `Troppo piccolo: ${issue4.origin} deve essere ${adj}${issue4.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue4; + if (_issue.format === "starts_with") + return `Stringa non valida: deve iniziare con "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `Stringa non valida: deve terminare con "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Stringa non valida: deve includere "${_issue.includes}"`; + if (_issue.format === "regex") + return `Stringa non valida: deve corrispondere al pattern ${_issue.pattern}`; + return `Invalid ${FormatDictionary[_issue.format] ?? issue4.format}`; + } + case "not_multiple_of": + return `Numero non valido: deve essere un multiplo di ${issue4.divisor}`; + case "unrecognized_keys": + return `Chiav${issue4.keys.length > 1 ? "i" : "e"} non riconosciut${issue4.keys.length > 1 ? "e" : "a"}: ${joinValues2(issue4.keys, ", ")}`; + case "invalid_key": + return `Chiave non valida in ${issue4.origin}`; + case "invalid_union": + return "Input non valido"; + case "invalid_element": + return `Valore non valido in ${issue4.origin}`; + default: + return `Input non valido`; + } + }; + }; + } +}); + +// ../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/locales/ja.js +function ja_default() { + return { + localeError: error24() + }; +} +var error24; +var init_ja = __esm({ + "../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/locales/ja.js"() { + init_util2(); + error24 = () => { + const Sizable = { + string: { unit: "\u6587\u5B57", verb: "\u3067\u3042\u308B" }, + file: { unit: "\u30D0\u30A4\u30C8", verb: "\u3067\u3042\u308B" }, + array: { unit: "\u8981\u7D20", verb: "\u3067\u3042\u308B" }, + set: { unit: "\u8981\u7D20", verb: "\u3067\u3042\u308B" } + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + const FormatDictionary = { + regex: "\u5165\u529B\u5024", + email: "\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9", + url: "URL", + emoji: "\u7D75\u6587\u5B57", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO\u65E5\u6642", + date: "ISO\u65E5\u4ED8", + time: "ISO\u6642\u523B", + duration: "ISO\u671F\u9593", + ipv4: "IPv4\u30A2\u30C9\u30EC\u30B9", + ipv6: "IPv6\u30A2\u30C9\u30EC\u30B9", + cidrv4: "IPv4\u7BC4\u56F2", + cidrv6: "IPv6\u7BC4\u56F2", + base64: "base64\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217", + base64url: "base64url\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217", + json_string: "JSON\u6587\u5B57\u5217", + e164: "E.164\u756A\u53F7", + jwt: "JWT", + template_literal: "\u5165\u529B\u5024" + }; + const TypeDictionary = { + nan: "NaN", + number: "\u6570\u5024", + array: "\u914D\u5217" + }; + return (issue4) => { + switch (issue4.code) { + case "invalid_type": { + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType2(issue4.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue4.expected)) { + return `\u7121\u52B9\u306A\u5165\u529B: instanceof ${issue4.expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${received}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`; + } + return `\u7121\u52B9\u306A\u5165\u529B: ${expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${received}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`; + } + case "invalid_value": + if (issue4.values.length === 1) + return `\u7121\u52B9\u306A\u5165\u529B: ${stringifyPrimitive2(issue4.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`; + return `\u7121\u52B9\u306A\u9078\u629E: ${joinValues2(issue4.values, "\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; + case "too_big": { + const adj = issue4.inclusive ? "\u4EE5\u4E0B\u3067\u3042\u308B" : "\u3088\u308A\u5C0F\u3055\u3044"; + const sizing = getSizing(issue4.origin); + if (sizing) + return `\u5927\u304D\u3059\u304E\u308B\u5024: ${issue4.origin ?? "\u5024"}\u306F${issue4.maximum.toString()}${sizing.unit ?? "\u8981\u7D20"}${adj}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; + return `\u5927\u304D\u3059\u304E\u308B\u5024: ${issue4.origin ?? "\u5024"}\u306F${issue4.maximum.toString()}${adj}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; + } + case "too_small": { + const adj = issue4.inclusive ? "\u4EE5\u4E0A\u3067\u3042\u308B" : "\u3088\u308A\u5927\u304D\u3044"; + const sizing = getSizing(issue4.origin); + if (sizing) + return `\u5C0F\u3055\u3059\u304E\u308B\u5024: ${issue4.origin}\u306F${issue4.minimum.toString()}${sizing.unit}${adj}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; + return `\u5C0F\u3055\u3059\u304E\u308B\u5024: ${issue4.origin}\u306F${issue4.minimum.toString()}${adj}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; + } + case "invalid_format": { + const _issue = issue4; + 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") + return `\u7121\u52B9\u306A\u6587\u5B57\u5217: "${_issue.suffix}"\u3067\u7D42\u308F\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; + if (_issue.format === "includes") + 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${FormatDictionary[_issue.format] ?? issue4.format}`; + } + case "not_multiple_of": + return `\u7121\u52B9\u306A\u6570\u5024: ${issue4.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${issue4.keys.length > 1 ? "\u7FA4" : ""}: ${joinValues2(issue4.keys, "\u3001")}`; + case "invalid_key": + return `${issue4.origin}\u5185\u306E\u7121\u52B9\u306A\u30AD\u30FC`; + case "invalid_union": + return "\u7121\u52B9\u306A\u5165\u529B"; + case "invalid_element": + return `${issue4.origin}\u5185\u306E\u7121\u52B9\u306A\u5024`; + default: + return `\u7121\u52B9\u306A\u5165\u529B`; + } + }; + }; + } +}); + +// ../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/locales/ka.js +function ka_default() { + return { + localeError: error25() + }; +} +var error25; +var init_ka = __esm({ + "../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/locales/ka.js"() { + init_util2(); + error25 = () => { + const Sizable = { + string: { unit: "\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD", verb: "\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1" }, + file: { unit: "\u10D1\u10D0\u10D8\u10E2\u10D8", verb: "\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1" }, + array: { unit: "\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8", verb: "\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1" }, + set: { unit: "\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8", verb: "\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1" } + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + const FormatDictionary = { + regex: "\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0", + email: "\u10D4\u10DA-\u10E4\u10DD\u10E1\u10E2\u10D8\u10E1 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8", + url: "URL", + emoji: "\u10D4\u10DB\u10DD\u10EF\u10D8", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8-\u10D3\u10E0\u10DD", + date: "\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8", + time: "\u10D3\u10E0\u10DD", + duration: "\u10EE\u10D0\u10DC\u10D2\u10E0\u10EB\u10DA\u10D8\u10D5\u10DD\u10D1\u10D0", + ipv4: "IPv4 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8", + ipv6: "IPv6 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8", + cidrv4: "IPv4 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8", + cidrv6: "IPv6 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8", + base64: "base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8", + base64url: "base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8", + json_string: "JSON \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8", + e164: "E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8", + jwt: "JWT", + template_literal: "\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0" + }; + const TypeDictionary = { + nan: "NaN", + number: "\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8", + string: "\u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8", + boolean: "\u10D1\u10E3\u10DA\u10D4\u10D0\u10DC\u10D8", + function: "\u10E4\u10E3\u10DC\u10E5\u10EA\u10D8\u10D0", + array: "\u10DB\u10D0\u10E1\u10D8\u10D5\u10D8" + }; + return (issue4) => { + switch (issue4.code) { + case "invalid_type": { + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType2(issue4.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue4.expected)) { + return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 instanceof ${issue4.expected}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${received}`; + } + return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${expected}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${received}`; + } + case "invalid_value": + if (issue4.values.length === 1) + return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${stringifyPrimitive2(issue4.values[0])}`; + return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D0\u10E0\u10D8\u10D0\u10DC\u10E2\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8\u10D0 \u10D4\u10E0\u10D7-\u10D4\u10E0\u10D7\u10D8 ${joinValues2(issue4.values, "|")}-\u10D3\u10D0\u10DC`; + case "too_big": { + const adj = issue4.inclusive ? "<=" : "<"; + const sizing = getSizing(issue4.origin); + if (sizing) + return `\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${issue4.origin ?? "\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} ${sizing.verb} ${adj}${issue4.maximum.toString()} ${sizing.unit}`; + return `\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${issue4.origin ?? "\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} \u10D8\u10E7\u10DD\u10E1 ${adj}${issue4.maximum.toString()}`; + } + case "too_small": { + const adj = issue4.inclusive ? ">=" : ">"; + const sizing = getSizing(issue4.origin); + if (sizing) { + return `\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${issue4.origin} ${sizing.verb} ${adj}${issue4.minimum.toString()} ${sizing.unit}`; + } + return `\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${issue4.origin} \u10D8\u10E7\u10DD\u10E1 ${adj}${issue4.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue4; + if (_issue.format === "starts_with") { + return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10EC\u10E7\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${_issue.prefix}"-\u10D8\u10D7`; + } + if (_issue.format === "ends_with") + return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10DB\u10D7\u10D0\u10D5\u10E0\u10D3\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${_issue.suffix}"-\u10D8\u10D7`; + if (_issue.format === "includes") + return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1 "${_issue.includes}"-\u10E1`; + if (_issue.format === "regex") + return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D4\u10E1\u10D0\u10D1\u10D0\u10DB\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 \u10E8\u10D0\u10D1\u10DA\u10DD\u10DC\u10E1 ${_issue.pattern}`; + return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${FormatDictionary[_issue.format] ?? issue4.format}`; + } + case "not_multiple_of": + return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E0\u10D8\u10EA\u10EE\u10D5\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10E7\u10DD\u10E1 ${issue4.divisor}-\u10D8\u10E1 \u10EF\u10D4\u10E0\u10D0\u10D3\u10D8`; + case "unrecognized_keys": + return `\u10E3\u10EA\u10DC\u10DD\u10D1\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1${issue4.keys.length > 1 ? "\u10D4\u10D1\u10D8" : "\u10D8"}: ${joinValues2(issue4.keys, ", ")}`; + case "invalid_key": + return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1\u10D8 ${issue4.origin}-\u10E8\u10D8`; + case "invalid_union": + return "\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"; + case "invalid_element": + return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0 ${issue4.origin}-\u10E8\u10D8`; + default: + return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0`; + } + }; + }; + } +}); + +// ../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/locales/km.js +function km_default() { + return { + localeError: error26() + }; +} +var error26; +var init_km = __esm({ + "../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/locales/km.js"() { + init_util2(); + error26 = () => { + const Sizable = { + string: { unit: "\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A", verb: "\u1782\u17BD\u179A\u1798\u17B6\u1793" }, + file: { unit: "\u1794\u17C3", verb: "\u1782\u17BD\u179A\u1798\u17B6\u1793" }, + array: { unit: "\u1792\u17B6\u178F\u17BB", verb: "\u1782\u17BD\u179A\u1798\u17B6\u1793" }, + set: { unit: "\u1792\u17B6\u178F\u17BB", verb: "\u1782\u17BD\u179A\u1798\u17B6\u1793" } + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + const FormatDictionary = { + regex: "\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B", + email: "\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793\u17A2\u17CA\u17B8\u1798\u17C2\u179B", + url: "URL", + emoji: "\u179F\u1789\u17D2\u1789\u17B6\u17A2\u17B6\u179A\u1798\u17D2\u1798\u178E\u17CD", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 \u1793\u17B7\u1784\u1798\u17C9\u17C4\u1784 ISO", + date: "\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 ISO", + time: "\u1798\u17C9\u17C4\u1784 ISO", + duration: "\u179A\u1799\u17C8\u1796\u17C1\u179B ISO", + ipv4: "\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4", + ipv6: "\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6", + cidrv4: "\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4", + cidrv6: "\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6", + base64: "\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64", + base64url: "\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64url", + json_string: "\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A JSON", + e164: "\u179B\u17C1\u1781 E.164", + jwt: "JWT", + template_literal: "\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B" + }; + const TypeDictionary = { + nan: "NaN", + number: "\u179B\u17C1\u1781", + array: "\u17A2\u17B6\u179A\u17C1 (Array)", + null: "\u1782\u17D2\u1798\u17B6\u1793\u178F\u1798\u17D2\u179B\u17C3 (null)" + }; + return (issue4) => { + switch (issue4.code) { + case "invalid_type": { + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType2(issue4.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue4.expected)) { + 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 instanceof ${issue4.expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${received}`; + } + 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 ${expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${received}`; + } + case "invalid_value": + if (issue4.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 ${stringifyPrimitive2(issue4.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 ${joinValues2(issue4.values, "|")}`; + case "too_big": { + const adj = issue4.inclusive ? "<=" : "<"; + const sizing = getSizing(issue4.origin); + if (sizing) + return `\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${issue4.origin ?? "\u178F\u1798\u17D2\u179B\u17C3"} ${adj} ${issue4.maximum.toString()} ${sizing.unit ?? "\u1792\u17B6\u178F\u17BB"}`; + return `\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${issue4.origin ?? "\u178F\u1798\u17D2\u179B\u17C3"} ${adj} ${issue4.maximum.toString()}`; + } + case "too_small": { + const adj = issue4.inclusive ? ">=" : ">"; + const sizing = getSizing(issue4.origin); + if (sizing) { + return `\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${issue4.origin} ${adj} ${issue4.minimum.toString()} ${sizing.unit}`; + } + return `\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${issue4.origin} ${adj} ${issue4.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue4; + 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}"`; + } + if (_issue.format === "ends_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\u1794\u1789\u17D2\u1785\u1794\u17CB\u178A\u17C4\u1799 "${_issue.suffix}"`; + if (_issue.format === "includes") + 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 ${FormatDictionary[_issue.format] ?? issue4.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 ${issue4.divisor}`; + case "unrecognized_keys": + return `\u179A\u1780\u1783\u17BE\u1789\u179F\u17C4\u1798\u17B7\u1793\u179F\u17D2\u1782\u17B6\u179B\u17CB\u17D6 ${joinValues2(issue4.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 ${issue4.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 ${issue4.origin}`; + default: + return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C`; + } + }; + }; + } +}); + +// ../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/locales/kh.js +function kh_default() { + return km_default(); +} +var init_kh = __esm({ + "../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/locales/kh.js"() { + init_km(); + } +}); + +// ../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/locales/ko.js +function ko_default() { + return { + localeError: error27() + }; +} +var error27; +var init_ko = __esm({ + "../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/locales/ko.js"() { + init_util2(); + error27 = () => { + const Sizable = { + string: { unit: "\uBB38\uC790", verb: "to have" }, + file: { unit: "\uBC14\uC774\uD2B8", verb: "to have" }, + array: { unit: "\uAC1C", verb: "to have" }, + set: { unit: "\uAC1C", verb: "to have" } + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + const FormatDictionary = { + regex: "\uC785\uB825", + email: "\uC774\uBA54\uC77C \uC8FC\uC18C", + url: "URL", + emoji: "\uC774\uBAA8\uC9C0", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO \uB0A0\uC9DC\uC2DC\uAC04", + date: "ISO \uB0A0\uC9DC", + time: "ISO \uC2DC\uAC04", + duration: "ISO \uAE30\uAC04", + ipv4: "IPv4 \uC8FC\uC18C", + ipv6: "IPv6 \uC8FC\uC18C", + cidrv4: "IPv4 \uBC94\uC704", + cidrv6: "IPv6 \uBC94\uC704", + base64: "base64 \uC778\uCF54\uB529 \uBB38\uC790\uC5F4", + base64url: "base64url \uC778\uCF54\uB529 \uBB38\uC790\uC5F4", + json_string: "JSON \uBB38\uC790\uC5F4", + e164: "E.164 \uBC88\uD638", + jwt: "JWT", + template_literal: "\uC785\uB825" + }; + const TypeDictionary = { + nan: "NaN" + }; + return (issue4) => { + switch (issue4.code) { + case "invalid_type": { + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType2(issue4.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue4.expected)) { + return `\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 instanceof ${issue4.expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${received}\uC785\uB2C8\uB2E4`; + } + return `\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${received}\uC785\uB2C8\uB2E4`; + } + case "invalid_value": + if (issue4.values.length === 1) + return `\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${stringifyPrimitive2(issue4.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`; + return `\uC798\uBABB\uB41C \uC635\uC158: ${joinValues2(issue4.values, "\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`; + case "too_big": { + const adj = issue4.inclusive ? "\uC774\uD558" : "\uBBF8\uB9CC"; + const suffix2 = adj === "\uBBF8\uB9CC" ? "\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4" : "\uC5EC\uC57C \uD569\uB2C8\uB2E4"; + const sizing = getSizing(issue4.origin); + const unit = sizing?.unit ?? "\uC694\uC18C"; + if (sizing) + return `${issue4.origin ?? "\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${issue4.maximum.toString()}${unit} ${adj}${suffix2}`; + return `${issue4.origin ?? "\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${issue4.maximum.toString()} ${adj}${suffix2}`; + } + case "too_small": { + const adj = issue4.inclusive ? "\uC774\uC0C1" : "\uCD08\uACFC"; + const suffix2 = adj === "\uC774\uC0C1" ? "\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4" : "\uC5EC\uC57C \uD569\uB2C8\uB2E4"; + const sizing = getSizing(issue4.origin); + const unit = sizing?.unit ?? "\uC694\uC18C"; + if (sizing) { + return `${issue4.origin ?? "\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${issue4.minimum.toString()}${unit} ${adj}${suffix2}`; + } + return `${issue4.origin ?? "\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${issue4.minimum.toString()} ${adj}${suffix2}`; + } + case "invalid_format": { + const _issue = issue4; + if (_issue.format === "starts_with") { + return `\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${_issue.prefix}"(\uC73C)\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4`; + } + if (_issue.format === "ends_with") + return `\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${_issue.suffix}"(\uC73C)\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4`; + if (_issue.format === "includes") + 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 ${FormatDictionary[_issue.format] ?? issue4.format}`; + } + case "not_multiple_of": + return `\uC798\uBABB\uB41C \uC22B\uC790: ${issue4.divisor}\uC758 \uBC30\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4`; + case "unrecognized_keys": + return `\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uD0A4: ${joinValues2(issue4.keys, ", ")}`; + case "invalid_key": + return `\uC798\uBABB\uB41C \uD0A4: ${issue4.origin}`; + case "invalid_union": + return `\uC798\uBABB\uB41C \uC785\uB825`; + case "invalid_element": + return `\uC798\uBABB\uB41C \uAC12: ${issue4.origin}`; + default: + return `\uC798\uBABB\uB41C \uC785\uB825`; + } + }; + }; + } +}); + +// ../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/locales/lt.js +function getUnitTypeFromNumber(number9) { + const abs = Math.abs(number9); + const last = abs % 10; + const last2 = abs % 100; + if (last2 >= 11 && last2 <= 19 || last === 0) + return "many"; + if (last === 1) + return "one"; + return "few"; +} +function lt_default() { + return { + localeError: error28() + }; +} +var capitalizeFirstCharacter, error28; +var init_lt = __esm({ + "../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/locales/lt.js"() { + init_util2(); + capitalizeFirstCharacter = (text) => { + return text.charAt(0).toUpperCase() + text.slice(1); + }; + error28 = () => { + const Sizable = { + string: { + unit: { + one: "simbolis", + few: "simboliai", + many: "simboli\u0173" + }, + verb: { + smaller: { + inclusive: "turi b\u016Bti ne ilgesn\u0117 kaip", + notInclusive: "turi b\u016Bti trumpesn\u0117 kaip" + }, + bigger: { + inclusive: "turi b\u016Bti ne trumpesn\u0117 kaip", + notInclusive: "turi b\u016Bti ilgesn\u0117 kaip" + } + } + }, + file: { + unit: { + one: "baitas", + few: "baitai", + many: "bait\u0173" + }, + verb: { + smaller: { + inclusive: "turi b\u016Bti ne didesnis kaip", + notInclusive: "turi b\u016Bti ma\u017Eesnis kaip" + }, + bigger: { + inclusive: "turi b\u016Bti ne ma\u017Eesnis kaip", + notInclusive: "turi b\u016Bti didesnis kaip" + } + } + }, + array: { + unit: { + one: "element\u0105", + few: "elementus", + many: "element\u0173" + }, + verb: { + smaller: { + inclusive: "turi tur\u0117ti ne daugiau kaip", + notInclusive: "turi tur\u0117ti ma\u017Eiau kaip" + }, + bigger: { + inclusive: "turi tur\u0117ti ne ma\u017Eiau kaip", + notInclusive: "turi tur\u0117ti daugiau kaip" + } + } + }, + set: { + unit: { + one: "element\u0105", + few: "elementus", + many: "element\u0173" + }, + verb: { + smaller: { + inclusive: "turi tur\u0117ti ne daugiau kaip", + notInclusive: "turi tur\u0117ti ma\u017Eiau kaip" + }, + bigger: { + inclusive: "turi tur\u0117ti ne ma\u017Eiau kaip", + notInclusive: "turi tur\u0117ti daugiau kaip" + } + } + } + }; + function getSizing(origin, unitType, inclusive, targetShouldBe) { + const result = Sizable[origin] ?? null; + if (result === null) + return result; + return { + unit: result.unit[unitType], + verb: result.verb[targetShouldBe][inclusive ? "inclusive" : "notInclusive"] + }; + } + const FormatDictionary = { + regex: "\u012Fvestis", + email: "el. pa\u0161to adresas", + url: "URL", + emoji: "jaustukas", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO data ir laikas", + date: "ISO data", + time: "ISO laikas", + duration: "ISO trukm\u0117", + ipv4: "IPv4 adresas", + ipv6: "IPv6 adresas", + cidrv4: "IPv4 tinklo prefiksas (CIDR)", + cidrv6: "IPv6 tinklo prefiksas (CIDR)", + base64: "base64 u\u017Ekoduota eilut\u0117", + base64url: "base64url u\u017Ekoduota eilut\u0117", + json_string: "JSON eilut\u0117", + e164: "E.164 numeris", + jwt: "JWT", + template_literal: "\u012Fvestis" + }; + const TypeDictionary = { + nan: "NaN", + number: "skai\u010Dius", + bigint: "sveikasis skai\u010Dius", + string: "eilut\u0117", + boolean: "login\u0117 reik\u0161m\u0117", + undefined: "neapibr\u0117\u017Eta reik\u0161m\u0117", + function: "funkcija", + symbol: "simbolis", + array: "masyvas", + object: "objektas", + null: "nulin\u0117 reik\u0161m\u0117" + }; + return (issue4) => { + switch (issue4.code) { + case "invalid_type": { + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType2(issue4.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue4.expected)) { + return `Gautas tipas ${received}, o tik\u0117tasi - instanceof ${issue4.expected}`; + } + return `Gautas tipas ${received}, o tik\u0117tasi - ${expected}`; + } + case "invalid_value": + if (issue4.values.length === 1) + return `Privalo b\u016Bti ${stringifyPrimitive2(issue4.values[0])}`; + return `Privalo b\u016Bti vienas i\u0161 ${joinValues2(issue4.values, "|")} pasirinkim\u0173`; + case "too_big": { + const origin = TypeDictionary[issue4.origin] ?? issue4.origin; + const sizing = getSizing(issue4.origin, getUnitTypeFromNumber(Number(issue4.maximum)), issue4.inclusive ?? false, "smaller"); + if (sizing?.verb) + return `${capitalizeFirstCharacter(origin ?? issue4.origin ?? "reik\u0161m\u0117")} ${sizing.verb} ${issue4.maximum.toString()} ${sizing.unit ?? "element\u0173"}`; + const adj = issue4.inclusive ? "ne didesnis kaip" : "ma\u017Eesnis kaip"; + return `${capitalizeFirstCharacter(origin ?? issue4.origin ?? "reik\u0161m\u0117")} turi b\u016Bti ${adj} ${issue4.maximum.toString()} ${sizing?.unit}`; + } + case "too_small": { + const origin = TypeDictionary[issue4.origin] ?? issue4.origin; + const sizing = getSizing(issue4.origin, getUnitTypeFromNumber(Number(issue4.minimum)), issue4.inclusive ?? false, "bigger"); + if (sizing?.verb) + return `${capitalizeFirstCharacter(origin ?? issue4.origin ?? "reik\u0161m\u0117")} ${sizing.verb} ${issue4.minimum.toString()} ${sizing.unit ?? "element\u0173"}`; + const adj = issue4.inclusive ? "ne ma\u017Eesnis kaip" : "didesnis kaip"; + return `${capitalizeFirstCharacter(origin ?? issue4.origin ?? "reik\u0161m\u0117")} turi b\u016Bti ${adj} ${issue4.minimum.toString()} ${sizing?.unit}`; + } + case "invalid_format": { + const _issue = issue4; + if (_issue.format === "starts_with") { + return `Eilut\u0117 privalo prasid\u0117ti "${_issue.prefix}"`; + } + if (_issue.format === "ends_with") + return `Eilut\u0117 privalo pasibaigti "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Eilut\u0117 privalo \u012Ftraukti "${_issue.includes}"`; + if (_issue.format === "regex") + return `Eilut\u0117 privalo atitikti ${_issue.pattern}`; + return `Neteisingas ${FormatDictionary[_issue.format] ?? issue4.format}`; + } + case "not_multiple_of": + return `Skai\u010Dius privalo b\u016Bti ${issue4.divisor} kartotinis.`; + case "unrecognized_keys": + return `Neatpa\u017Eint${issue4.keys.length > 1 ? "i" : "as"} rakt${issue4.keys.length > 1 ? "ai" : "as"}: ${joinValues2(issue4.keys, ", ")}`; + case "invalid_key": + return "Rastas klaidingas raktas"; + case "invalid_union": + return "Klaidinga \u012Fvestis"; + case "invalid_element": { + const origin = TypeDictionary[issue4.origin] ?? issue4.origin; + return `${capitalizeFirstCharacter(origin ?? issue4.origin ?? "reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`; + } + default: + return "Klaidinga \u012Fvestis"; + } + }; + }; + } +}); + +// ../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/locales/mk.js +function mk_default() { + return { + localeError: error29() + }; +} +var error29; +var init_mk = __esm({ + "../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/locales/mk.js"() { + init_util2(); + error29 = () => { + const Sizable = { + string: { unit: "\u0437\u043D\u0430\u0446\u0438", verb: "\u0434\u0430 \u0438\u043C\u0430\u0430\u0442" }, + file: { unit: "\u0431\u0430\u0458\u0442\u0438", verb: "\u0434\u0430 \u0438\u043C\u0430\u0430\u0442" }, + array: { unit: "\u0441\u0442\u0430\u0432\u043A\u0438", verb: "\u0434\u0430 \u0438\u043C\u0430\u0430\u0442" }, + set: { unit: "\u0441\u0442\u0430\u0432\u043A\u0438", verb: "\u0434\u0430 \u0438\u043C\u0430\u0430\u0442" } + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + const FormatDictionary = { + regex: "\u0432\u043D\u0435\u0441", + email: "\u0430\u0434\u0440\u0435\u0441\u0430 \u043D\u0430 \u0435-\u043F\u043E\u0448\u0442\u0430", + url: "URL", + emoji: "\u0435\u043C\u043E\u045F\u0438", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO \u0434\u0430\u0442\u0443\u043C \u0438 \u0432\u0440\u0435\u043C\u0435", + date: "ISO \u0434\u0430\u0442\u0443\u043C", + time: "ISO \u0432\u0440\u0435\u043C\u0435", + duration: "ISO \u0432\u0440\u0435\u043C\u0435\u0442\u0440\u0430\u0435\u045A\u0435", + ipv4: "IPv4 \u0430\u0434\u0440\u0435\u0441\u0430", + ipv6: "IPv6 \u0430\u0434\u0440\u0435\u0441\u0430", + cidrv4: "IPv4 \u043E\u043F\u0441\u0435\u0433", + cidrv6: "IPv6 \u043E\u043F\u0441\u0435\u0433", + base64: "base64-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430", + base64url: "base64url-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430", + json_string: "JSON \u043D\u0438\u0437\u0430", + e164: "E.164 \u0431\u0440\u043E\u0458", + jwt: "JWT", + template_literal: "\u0432\u043D\u0435\u0441" + }; + const TypeDictionary = { + nan: "NaN", + number: "\u0431\u0440\u043E\u0458", + array: "\u043D\u0438\u0437\u0430" + }; + return (issue4) => { + switch (issue4.code) { + case "invalid_type": { + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType2(issue4.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue4.expected)) { + return `\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 instanceof ${issue4.expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${received}`; + } + return `\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${received}`; + } + case "invalid_value": + if (issue4.values.length === 1) + return `Invalid input: expected ${stringifyPrimitive2(issue4.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 ${joinValues2(issue4.values, "|")}`; + case "too_big": { + const adj = issue4.inclusive ? "<=" : "<"; + const sizing = getSizing(issue4.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 ${issue4.origin ?? "\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0438\u043C\u0430 ${adj}${issue4.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 ${issue4.origin ?? "\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0431\u0438\u0434\u0435 ${adj}${issue4.maximum.toString()}`; + } + case "too_small": { + const adj = issue4.inclusive ? ">=" : ">"; + const sizing = getSizing(issue4.origin); + if (sizing) { + return `\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${issue4.origin} \u0434\u0430 \u0438\u043C\u0430 ${adj}${issue4.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 ${issue4.origin} \u0434\u0430 \u0431\u0438\u0434\u0435 ${adj}${issue4.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue4; + 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}"`; + } + if (_issue.format === "ends_with") + return `\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u0432\u0440\u0448\u0443\u0432\u0430 \u0441\u043E "${_issue.suffix}"`; + if (_issue.format === "includes") + 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 ${FormatDictionary[_issue.format] ?? issue4.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 ${issue4.divisor}`; + case "unrecognized_keys": + return `${issue4.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"}: ${joinValues2(issue4.keys, ", ")}`; + case "invalid_key": + return `\u0413\u0440\u0435\u0448\u0435\u043D \u043A\u043B\u0443\u0447 \u0432\u043E ${issue4.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 ${issue4.origin}`; + default: + return `\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441`; + } + }; + }; + } +}); + +// ../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/locales/ms.js +function ms_default() { + return { + localeError: error30() + }; +} +var error30; +var init_ms = __esm({ + "../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/locales/ms.js"() { + init_util2(); + error30 = () => { + const Sizable = { + string: { unit: "aksara", verb: "mempunyai" }, + file: { unit: "bait", verb: "mempunyai" }, + array: { unit: "elemen", verb: "mempunyai" }, + set: { unit: "elemen", verb: "mempunyai" } + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + const FormatDictionary = { + regex: "input", + email: "alamat e-mel", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "tarikh masa ISO", + date: "tarikh ISO", + time: "masa ISO", + duration: "tempoh ISO", + ipv4: "alamat IPv4", + ipv6: "alamat IPv6", + cidrv4: "julat IPv4", + cidrv6: "julat IPv6", + base64: "string dikodkan base64", + base64url: "string dikodkan base64url", + json_string: "string JSON", + e164: "nombor E.164", + jwt: "JWT", + template_literal: "input" + }; + const TypeDictionary = { + nan: "NaN", + number: "nombor" + }; + return (issue4) => { + switch (issue4.code) { + case "invalid_type": { + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType2(issue4.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue4.expected)) { + return `Input tidak sah: dijangka instanceof ${issue4.expected}, diterima ${received}`; + } + return `Input tidak sah: dijangka ${expected}, diterima ${received}`; + } + case "invalid_value": + if (issue4.values.length === 1) + return `Input tidak sah: dijangka ${stringifyPrimitive2(issue4.values[0])}`; + return `Pilihan tidak sah: dijangka salah satu daripada ${joinValues2(issue4.values, "|")}`; + case "too_big": { + const adj = issue4.inclusive ? "<=" : "<"; + const sizing = getSizing(issue4.origin); + if (sizing) + return `Terlalu besar: dijangka ${issue4.origin ?? "nilai"} ${sizing.verb} ${adj}${issue4.maximum.toString()} ${sizing.unit ?? "elemen"}`; + return `Terlalu besar: dijangka ${issue4.origin ?? "nilai"} adalah ${adj}${issue4.maximum.toString()}`; + } + case "too_small": { + const adj = issue4.inclusive ? ">=" : ">"; + const sizing = getSizing(issue4.origin); + if (sizing) { + return `Terlalu kecil: dijangka ${issue4.origin} ${sizing.verb} ${adj}${issue4.minimum.toString()} ${sizing.unit}`; + } + return `Terlalu kecil: dijangka ${issue4.origin} adalah ${adj}${issue4.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue4; + if (_issue.format === "starts_with") + return `String tidak sah: mesti bermula dengan "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `String tidak sah: mesti berakhir dengan "${_issue.suffix}"`; + if (_issue.format === "includes") + return `String tidak sah: mesti mengandungi "${_issue.includes}"`; + if (_issue.format === "regex") + return `String tidak sah: mesti sepadan dengan corak ${_issue.pattern}`; + return `${FormatDictionary[_issue.format] ?? issue4.format} tidak sah`; + } + case "not_multiple_of": + return `Nombor tidak sah: perlu gandaan ${issue4.divisor}`; + case "unrecognized_keys": + return `Kunci tidak dikenali: ${joinValues2(issue4.keys, ", ")}`; + case "invalid_key": + return `Kunci tidak sah dalam ${issue4.origin}`; + case "invalid_union": + return "Input tidak sah"; + case "invalid_element": + return `Nilai tidak sah dalam ${issue4.origin}`; + default: + return `Input tidak sah`; + } + }; + }; + } +}); + +// ../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/locales/nl.js +function nl_default() { + return { + localeError: error31() + }; +} +var error31; +var init_nl = __esm({ + "../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/locales/nl.js"() { + init_util2(); + error31 = () => { + const Sizable = { + string: { unit: "tekens", verb: "heeft" }, + file: { unit: "bytes", verb: "heeft" }, + array: { unit: "elementen", verb: "heeft" }, + set: { unit: "elementen", verb: "heeft" } + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + const FormatDictionary = { + regex: "invoer", + email: "emailadres", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO datum en tijd", + date: "ISO datum", + time: "ISO tijd", + duration: "ISO duur", + ipv4: "IPv4-adres", + ipv6: "IPv6-adres", + cidrv4: "IPv4-bereik", + cidrv6: "IPv6-bereik", + base64: "base64-gecodeerde tekst", + base64url: "base64 URL-gecodeerde tekst", + json_string: "JSON string", + e164: "E.164-nummer", + jwt: "JWT", + template_literal: "invoer" + }; + const TypeDictionary = { + nan: "NaN", + number: "getal" + }; + return (issue4) => { + switch (issue4.code) { + case "invalid_type": { + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType2(issue4.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue4.expected)) { + return `Ongeldige invoer: verwacht instanceof ${issue4.expected}, ontving ${received}`; + } + return `Ongeldige invoer: verwacht ${expected}, ontving ${received}`; + } + case "invalid_value": + if (issue4.values.length === 1) + return `Ongeldige invoer: verwacht ${stringifyPrimitive2(issue4.values[0])}`; + return `Ongeldige optie: verwacht \xE9\xE9n van ${joinValues2(issue4.values, "|")}`; + case "too_big": { + const adj = issue4.inclusive ? "<=" : "<"; + const sizing = getSizing(issue4.origin); + const longName = issue4.origin === "date" ? "laat" : issue4.origin === "string" ? "lang" : "groot"; + if (sizing) + return `Te ${longName}: verwacht dat ${issue4.origin ?? "waarde"} ${adj}${issue4.maximum.toString()} ${sizing.unit ?? "elementen"} ${sizing.verb}`; + return `Te ${longName}: verwacht dat ${issue4.origin ?? "waarde"} ${adj}${issue4.maximum.toString()} is`; + } + case "too_small": { + const adj = issue4.inclusive ? ">=" : ">"; + const sizing = getSizing(issue4.origin); + const shortName = issue4.origin === "date" ? "vroeg" : issue4.origin === "string" ? "kort" : "klein"; + if (sizing) { + return `Te ${shortName}: verwacht dat ${issue4.origin} ${adj}${issue4.minimum.toString()} ${sizing.unit} ${sizing.verb}`; + } + return `Te ${shortName}: verwacht dat ${issue4.origin} ${adj}${issue4.minimum.toString()} is`; + } + case "invalid_format": { + const _issue = issue4; + if (_issue.format === "starts_with") { + return `Ongeldige tekst: moet met "${_issue.prefix}" beginnen`; + } + if (_issue.format === "ends_with") + return `Ongeldige tekst: moet op "${_issue.suffix}" eindigen`; + if (_issue.format === "includes") + return `Ongeldige tekst: moet "${_issue.includes}" bevatten`; + if (_issue.format === "regex") + return `Ongeldige tekst: moet overeenkomen met patroon ${_issue.pattern}`; + return `Ongeldig: ${FormatDictionary[_issue.format] ?? issue4.format}`; + } + case "not_multiple_of": + return `Ongeldig getal: moet een veelvoud van ${issue4.divisor} zijn`; + case "unrecognized_keys": + return `Onbekende key${issue4.keys.length > 1 ? "s" : ""}: ${joinValues2(issue4.keys, ", ")}`; + case "invalid_key": + return `Ongeldige key in ${issue4.origin}`; + case "invalid_union": + return "Ongeldige invoer"; + case "invalid_element": + return `Ongeldige waarde in ${issue4.origin}`; + default: + return `Ongeldige invoer`; + } + }; + }; + } +}); + +// ../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/locales/no.js +function no_default() { + return { + localeError: error32() + }; +} +var error32; +var init_no = __esm({ + "../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/locales/no.js"() { + init_util2(); + error32 = () => { + const Sizable = { + string: { unit: "tegn", verb: "\xE5 ha" }, + file: { unit: "bytes", verb: "\xE5 ha" }, + array: { unit: "elementer", verb: "\xE5 inneholde" }, + set: { unit: "elementer", verb: "\xE5 inneholde" } + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + const FormatDictionary = { + regex: "input", + email: "e-postadresse", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO dato- og klokkeslett", + date: "ISO-dato", + time: "ISO-klokkeslett", + duration: "ISO-varighet", + ipv4: "IPv4-omr\xE5de", + ipv6: "IPv6-omr\xE5de", + cidrv4: "IPv4-spekter", + cidrv6: "IPv6-spekter", + base64: "base64-enkodet streng", + base64url: "base64url-enkodet streng", + json_string: "JSON-streng", + e164: "E.164-nummer", + jwt: "JWT", + template_literal: "input" + }; + const TypeDictionary = { + nan: "NaN", + number: "tall", + array: "liste" + }; + return (issue4) => { + switch (issue4.code) { + case "invalid_type": { + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType2(issue4.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue4.expected)) { + return `Ugyldig input: forventet instanceof ${issue4.expected}, fikk ${received}`; + } + return `Ugyldig input: forventet ${expected}, fikk ${received}`; + } + case "invalid_value": + if (issue4.values.length === 1) + return `Ugyldig verdi: forventet ${stringifyPrimitive2(issue4.values[0])}`; + return `Ugyldig valg: forventet en av ${joinValues2(issue4.values, "|")}`; + case "too_big": { + const adj = issue4.inclusive ? "<=" : "<"; + const sizing = getSizing(issue4.origin); + if (sizing) + return `For stor(t): forventet ${issue4.origin ?? "value"} til \xE5 ha ${adj}${issue4.maximum.toString()} ${sizing.unit ?? "elementer"}`; + return `For stor(t): forventet ${issue4.origin ?? "value"} til \xE5 ha ${adj}${issue4.maximum.toString()}`; + } + case "too_small": { + const adj = issue4.inclusive ? ">=" : ">"; + const sizing = getSizing(issue4.origin); + if (sizing) { + return `For lite(n): forventet ${issue4.origin} til \xE5 ha ${adj}${issue4.minimum.toString()} ${sizing.unit}`; + } + return `For lite(n): forventet ${issue4.origin} til \xE5 ha ${adj}${issue4.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue4; + if (_issue.format === "starts_with") + return `Ugyldig streng: m\xE5 starte med "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `Ugyldig streng: m\xE5 ende med "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Ugyldig streng: m\xE5 inneholde "${_issue.includes}"`; + if (_issue.format === "regex") + return `Ugyldig streng: m\xE5 matche m\xF8nsteret ${_issue.pattern}`; + return `Ugyldig ${FormatDictionary[_issue.format] ?? issue4.format}`; + } + case "not_multiple_of": + return `Ugyldig tall: m\xE5 v\xE6re et multiplum av ${issue4.divisor}`; + case "unrecognized_keys": + return `${issue4.keys.length > 1 ? "Ukjente n\xF8kler" : "Ukjent n\xF8kkel"}: ${joinValues2(issue4.keys, ", ")}`; + case "invalid_key": + return `Ugyldig n\xF8kkel i ${issue4.origin}`; + case "invalid_union": + return "Ugyldig input"; + case "invalid_element": + return `Ugyldig verdi i ${issue4.origin}`; + default: + return `Ugyldig input`; + } + }; + }; + } +}); + +// ../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/locales/ota.js +function ota_default() { + return { + localeError: error33() + }; +} +var error33; +var init_ota = __esm({ + "../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/locales/ota.js"() { + init_util2(); + error33 = () => { + const Sizable = { + string: { unit: "harf", verb: "olmal\u0131d\u0131r" }, + file: { unit: "bayt", verb: "olmal\u0131d\u0131r" }, + array: { unit: "unsur", verb: "olmal\u0131d\u0131r" }, + set: { unit: "unsur", verb: "olmal\u0131d\u0131r" } + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + const FormatDictionary = { + regex: "giren", + email: "epostag\xE2h", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO heng\xE2m\u0131", + date: "ISO tarihi", + time: "ISO zaman\u0131", + duration: "ISO m\xFCddeti", + ipv4: "IPv4 ni\u015F\xE2n\u0131", + ipv6: "IPv6 ni\u015F\xE2n\u0131", + cidrv4: "IPv4 menzili", + cidrv6: "IPv6 menzili", + base64: "base64-\u015Fifreli metin", + base64url: "base64url-\u015Fifreli metin", + json_string: "JSON metin", + e164: "E.164 say\u0131s\u0131", + jwt: "JWT", + template_literal: "giren" + }; + const TypeDictionary = { + nan: "NaN", + number: "numara", + array: "saf", + null: "gayb" + }; + return (issue4) => { + switch (issue4.code) { + case "invalid_type": { + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType2(issue4.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue4.expected)) { + return `F\xE2sit giren: umulan instanceof ${issue4.expected}, al\u0131nan ${received}`; + } + return `F\xE2sit giren: umulan ${expected}, al\u0131nan ${received}`; + } + case "invalid_value": + if (issue4.values.length === 1) + return `F\xE2sit giren: umulan ${stringifyPrimitive2(issue4.values[0])}`; + return `F\xE2sit tercih: m\xFBteberler ${joinValues2(issue4.values, "|")}`; + case "too_big": { + const adj = issue4.inclusive ? "<=" : "<"; + const sizing = getSizing(issue4.origin); + if (sizing) + return `Fazla b\xFCy\xFCk: ${issue4.origin ?? "value"}, ${adj}${issue4.maximum.toString()} ${sizing.unit ?? "elements"} sahip olmal\u0131yd\u0131.`; + return `Fazla b\xFCy\xFCk: ${issue4.origin ?? "value"}, ${adj}${issue4.maximum.toString()} olmal\u0131yd\u0131.`; + } + case "too_small": { + const adj = issue4.inclusive ? ">=" : ">"; + const sizing = getSizing(issue4.origin); + if (sizing) { + return `Fazla k\xFC\xE7\xFCk: ${issue4.origin}, ${adj}${issue4.minimum.toString()} ${sizing.unit} sahip olmal\u0131yd\u0131.`; + } + return `Fazla k\xFC\xE7\xFCk: ${issue4.origin}, ${adj}${issue4.minimum.toString()} olmal\u0131yd\u0131.`; + } + case "invalid_format": { + const _issue = issue4; + if (_issue.format === "starts_with") + return `F\xE2sit metin: "${_issue.prefix}" ile ba\u015Flamal\u0131.`; + if (_issue.format === "ends_with") + return `F\xE2sit metin: "${_issue.suffix}" ile bitmeli.`; + if (_issue.format === "includes") + 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 ${FormatDictionary[_issue.format] ?? issue4.format}`; + } + case "not_multiple_of": + return `F\xE2sit say\u0131: ${issue4.divisor} kat\u0131 olmal\u0131yd\u0131.`; + case "unrecognized_keys": + return `Tan\u0131nmayan anahtar ${issue4.keys.length > 1 ? "s" : ""}: ${joinValues2(issue4.keys, ", ")}`; + case "invalid_key": + return `${issue4.origin} i\xE7in tan\u0131nmayan anahtar var.`; + case "invalid_union": + return "Giren tan\u0131namad\u0131."; + case "invalid_element": + return `${issue4.origin} i\xE7in tan\u0131nmayan k\u0131ymet var.`; + default: + return `K\u0131ymet tan\u0131namad\u0131.`; + } + }; + }; + } +}); + +// ../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/locales/ps.js +function ps_default() { + return { + localeError: error34() + }; +} +var error34; +var init_ps = __esm({ + "../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/locales/ps.js"() { + init_util2(); + error34 = () => { + const Sizable = { + string: { unit: "\u062A\u0648\u06A9\u064A", verb: "\u0648\u0644\u0631\u064A" }, + file: { unit: "\u0628\u0627\u06CC\u067C\u0633", verb: "\u0648\u0644\u0631\u064A" }, + array: { unit: "\u062A\u0648\u06A9\u064A", verb: "\u0648\u0644\u0631\u064A" }, + set: { unit: "\u062A\u0648\u06A9\u064A", verb: "\u0648\u0644\u0631\u064A" } + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + const FormatDictionary = { + regex: "\u0648\u0631\u0648\u062F\u064A", + email: "\u0628\u0631\u06CC\u069A\u0646\u0627\u0644\u06CC\u06A9", + url: "\u06CC\u0648 \u0622\u0631 \u0627\u0644", + emoji: "\u0627\u06CC\u0645\u0648\u062C\u064A", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "\u0646\u06CC\u067C\u0647 \u0627\u0648 \u0648\u062E\u062A", + date: "\u0646\u06D0\u067C\u0647", + time: "\u0648\u062E\u062A", + duration: "\u0645\u0648\u062F\u0647", + ipv4: "\u062F IPv4 \u067E\u062A\u0647", + ipv6: "\u062F IPv6 \u067E\u062A\u0647", + cidrv4: "\u062F IPv4 \u0633\u0627\u062D\u0647", + cidrv6: "\u062F IPv6 \u0633\u0627\u062D\u0647", + base64: "base64-encoded \u0645\u062A\u0646", + base64url: "base64url-encoded \u0645\u062A\u0646", + json_string: "JSON \u0645\u062A\u0646", + e164: "\u062F E.164 \u0634\u0645\u06D0\u0631\u0647", + jwt: "JWT", + template_literal: "\u0648\u0631\u0648\u062F\u064A" + }; + const TypeDictionary = { + nan: "NaN", + number: "\u0639\u062F\u062F", + array: "\u0627\u0631\u06D0" + }; + return (issue4) => { + switch (issue4.code) { + case "invalid_type": { + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType2(issue4.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue4.expected)) { + return `\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F instanceof ${issue4.expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${received} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`; + } + return `\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${received} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`; + } + case "invalid_value": + if (issue4.values.length === 1) { + return `\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${stringifyPrimitive2(issue4.values[0])} \u0648\u0627\u06CC`; + } + return `\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${joinValues2(issue4.values, "|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`; + case "too_big": { + const adj = issue4.inclusive ? "<=" : "<"; + const sizing = getSizing(issue4.origin); + if (sizing) { + return `\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${issue4.origin ?? "\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${adj}${issue4.maximum.toString()} ${sizing.unit ?? "\u0639\u0646\u0635\u0631\u0648\u0646\u0647"} \u0648\u0644\u0631\u064A`; + } + return `\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${issue4.origin ?? "\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${adj}${issue4.maximum.toString()} \u0648\u064A`; + } + case "too_small": { + const adj = issue4.inclusive ? ">=" : ">"; + const sizing = getSizing(issue4.origin); + if (sizing) { + return `\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${issue4.origin} \u0628\u0627\u06CC\u062F ${adj}${issue4.minimum.toString()} ${sizing.unit} \u0648\u0644\u0631\u064A`; + } + return `\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${issue4.origin} \u0628\u0627\u06CC\u062F ${adj}${issue4.minimum.toString()} \u0648\u064A`; + } + case "invalid_format": { + const _issue = issue4; + 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`; + } + if (_issue.format === "ends_with") { + return `\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${_issue.suffix}" \u0633\u0631\u0647 \u067E\u0627\u06CC \u062A\u0647 \u0648\u0631\u0633\u064A\u0696\u064A`; + } + if (_issue.format === "includes") { + return `\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F "${_issue.includes}" \u0648\u0644\u0631\u064A`; + } + 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 `${FormatDictionary[_issue.format] ?? issue4.format} \u0646\u0627\u0633\u0645 \u062F\u06CC`; + } + case "not_multiple_of": + return `\u0646\u0627\u0633\u0645 \u0639\u062F\u062F: \u0628\u0627\u06CC\u062F \u062F ${issue4.divisor} \u0645\u0636\u0631\u0628 \u0648\u064A`; + case "unrecognized_keys": + return `\u0646\u0627\u0633\u0645 ${issue4.keys.length > 1 ? "\u06A9\u0644\u06CC\u0689\u0648\u0646\u0647" : "\u06A9\u0644\u06CC\u0689"}: ${joinValues2(issue4.keys, ", ")}`; + case "invalid_key": + return `\u0646\u0627\u0633\u0645 \u06A9\u0644\u06CC\u0689 \u067E\u0647 ${issue4.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 ${issue4.origin} \u06A9\u06D0`; + default: + return `\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A`; + } + }; + }; + } +}); + +// ../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/locales/pl.js +function pl_default() { + return { + localeError: error35() + }; +} +var error35; +var init_pl = __esm({ + "../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/locales/pl.js"() { + init_util2(); + error35 = () => { + const Sizable = { + string: { unit: "znak\xF3w", verb: "mie\u0107" }, + file: { unit: "bajt\xF3w", verb: "mie\u0107" }, + array: { unit: "element\xF3w", verb: "mie\u0107" }, + set: { unit: "element\xF3w", verb: "mie\u0107" } + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + const FormatDictionary = { + regex: "wyra\u017Cenie", + email: "adres email", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "data i godzina w formacie ISO", + date: "data w formacie ISO", + time: "godzina w formacie ISO", + duration: "czas trwania ISO", + ipv4: "adres IPv4", + ipv6: "adres IPv6", + cidrv4: "zakres IPv4", + cidrv6: "zakres IPv6", + base64: "ci\u0105g znak\xF3w zakodowany w formacie base64", + base64url: "ci\u0105g znak\xF3w zakodowany w formacie base64url", + json_string: "ci\u0105g znak\xF3w w formacie JSON", + e164: "liczba E.164", + jwt: "JWT", + template_literal: "wej\u015Bcie" + }; + const TypeDictionary = { + nan: "NaN", + number: "liczba", + array: "tablica" + }; + return (issue4) => { + switch (issue4.code) { + case "invalid_type": { + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType2(issue4.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue4.expected)) { + return `Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano instanceof ${issue4.expected}, otrzymano ${received}`; + } + return `Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${expected}, otrzymano ${received}`; + } + case "invalid_value": + if (issue4.values.length === 1) + return `Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${stringifyPrimitive2(issue4.values[0])}`; + return `Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${joinValues2(issue4.values, "|")}`; + case "too_big": { + const adj = issue4.inclusive ? "<=" : "<"; + const sizing = getSizing(issue4.origin); + if (sizing) { + return `Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${issue4.origin ?? "warto\u015B\u0107"} b\u0119dzie mie\u0107 ${adj}${issue4.maximum.toString()} ${sizing.unit ?? "element\xF3w"}`; + } + return `Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${issue4.origin ?? "warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${adj}${issue4.maximum.toString()}`; + } + case "too_small": { + const adj = issue4.inclusive ? ">=" : ">"; + const sizing = getSizing(issue4.origin); + if (sizing) { + return `Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${issue4.origin ?? "warto\u015B\u0107"} b\u0119dzie mie\u0107 ${adj}${issue4.minimum.toString()} ${sizing.unit ?? "element\xF3w"}`; + } + return `Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${issue4.origin ?? "warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${adj}${issue4.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue4; + 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") + return `Nieprawid\u0142owy ci\u0105g znak\xF3w: musi ko\u0144czy\u0107 si\u0119 na "${_issue.suffix}"`; + if (_issue.format === "includes") + 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) ${FormatDictionary[_issue.format] ?? issue4.format}`; + } + case "not_multiple_of": + return `Nieprawid\u0142owa liczba: musi by\u0107 wielokrotno\u015Bci\u0105 ${issue4.divisor}`; + case "unrecognized_keys": + return `Nierozpoznane klucze${issue4.keys.length > 1 ? "s" : ""}: ${joinValues2(issue4.keys, ", ")}`; + case "invalid_key": + return `Nieprawid\u0142owy klucz w ${issue4.origin}`; + case "invalid_union": + return "Nieprawid\u0142owe dane wej\u015Bciowe"; + case "invalid_element": + return `Nieprawid\u0142owa warto\u015B\u0107 w ${issue4.origin}`; + default: + return `Nieprawid\u0142owe dane wej\u015Bciowe`; + } + }; + }; + } +}); + +// ../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/locales/pt.js +function pt_default() { + return { + localeError: error36() + }; +} +var error36; +var init_pt = __esm({ + "../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/locales/pt.js"() { + init_util2(); + error36 = () => { + const Sizable = { + string: { unit: "caracteres", verb: "ter" }, + file: { unit: "bytes", verb: "ter" }, + array: { unit: "itens", verb: "ter" }, + set: { unit: "itens", verb: "ter" } + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + const FormatDictionary = { + regex: "padr\xE3o", + email: "endere\xE7o de e-mail", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "data e hora ISO", + date: "data ISO", + time: "hora ISO", + duration: "dura\xE7\xE3o ISO", + ipv4: "endere\xE7o IPv4", + ipv6: "endere\xE7o IPv6", + cidrv4: "faixa de IPv4", + cidrv6: "faixa de IPv6", + base64: "texto codificado em base64", + base64url: "URL codificada em base64", + json_string: "texto JSON", + e164: "n\xFAmero E.164", + jwt: "JWT", + template_literal: "entrada" + }; + const TypeDictionary = { + nan: "NaN", + number: "n\xFAmero", + null: "nulo" + }; + return (issue4) => { + switch (issue4.code) { + case "invalid_type": { + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType2(issue4.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue4.expected)) { + return `Tipo inv\xE1lido: esperado instanceof ${issue4.expected}, recebido ${received}`; + } + return `Tipo inv\xE1lido: esperado ${expected}, recebido ${received}`; + } + case "invalid_value": + if (issue4.values.length === 1) + return `Entrada inv\xE1lida: esperado ${stringifyPrimitive2(issue4.values[0])}`; + return `Op\xE7\xE3o inv\xE1lida: esperada uma das ${joinValues2(issue4.values, "|")}`; + case "too_big": { + const adj = issue4.inclusive ? "<=" : "<"; + const sizing = getSizing(issue4.origin); + if (sizing) + return `Muito grande: esperado que ${issue4.origin ?? "valor"} tivesse ${adj}${issue4.maximum.toString()} ${sizing.unit ?? "elementos"}`; + return `Muito grande: esperado que ${issue4.origin ?? "valor"} fosse ${adj}${issue4.maximum.toString()}`; + } + case "too_small": { + const adj = issue4.inclusive ? ">=" : ">"; + const sizing = getSizing(issue4.origin); + if (sizing) { + return `Muito pequeno: esperado que ${issue4.origin} tivesse ${adj}${issue4.minimum.toString()} ${sizing.unit}`; + } + return `Muito pequeno: esperado que ${issue4.origin} fosse ${adj}${issue4.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue4; + if (_issue.format === "starts_with") + return `Texto inv\xE1lido: deve come\xE7ar com "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `Texto inv\xE1lido: deve terminar com "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Texto inv\xE1lido: deve incluir "${_issue.includes}"`; + if (_issue.format === "regex") + return `Texto inv\xE1lido: deve corresponder ao padr\xE3o ${_issue.pattern}`; + return `${FormatDictionary[_issue.format] ?? issue4.format} inv\xE1lido`; + } + case "not_multiple_of": + return `N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${issue4.divisor}`; + case "unrecognized_keys": + return `Chave${issue4.keys.length > 1 ? "s" : ""} desconhecida${issue4.keys.length > 1 ? "s" : ""}: ${joinValues2(issue4.keys, ", ")}`; + case "invalid_key": + return `Chave inv\xE1lida em ${issue4.origin}`; + case "invalid_union": + return "Entrada inv\xE1lida"; + case "invalid_element": + return `Valor inv\xE1lido em ${issue4.origin}`; + default: + return `Campo inv\xE1lido`; + } + }; + }; + } +}); + +// ../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/locales/ru.js +function getRussianPlural(count, one, few, many) { + const absCount = Math.abs(count); + const lastDigit = absCount % 10; + const lastTwoDigits = absCount % 100; + if (lastTwoDigits >= 11 && lastTwoDigits <= 19) { + return many; + } + if (lastDigit === 1) { + return one; + } + if (lastDigit >= 2 && lastDigit <= 4) { + return few; + } + return many; +} +function ru_default() { + return { + localeError: error37() + }; +} +var error37; +var init_ru = __esm({ + "../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/locales/ru.js"() { + init_util2(); + error37 = () => { + const Sizable = { + string: { + unit: { + one: "\u0441\u0438\u043C\u0432\u043E\u043B", + few: "\u0441\u0438\u043C\u0432\u043E\u043B\u0430", + many: "\u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432" + }, + verb: "\u0438\u043C\u0435\u0442\u044C" + }, + file: { + unit: { + one: "\u0431\u0430\u0439\u0442", + few: "\u0431\u0430\u0439\u0442\u0430", + many: "\u0431\u0430\u0439\u0442" + }, + verb: "\u0438\u043C\u0435\u0442\u044C" + }, + array: { + unit: { + one: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442", + few: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430", + many: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432" + }, + verb: "\u0438\u043C\u0435\u0442\u044C" + }, + set: { + unit: { + one: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442", + few: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430", + many: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432" + }, + verb: "\u0438\u043C\u0435\u0442\u044C" + } + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + const FormatDictionary = { + regex: "\u0432\u0432\u043E\u0434", + email: "email \u0430\u0434\u0440\u0435\u0441", + url: "URL", + emoji: "\u044D\u043C\u043E\u0434\u0437\u0438", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO \u0434\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043C\u044F", + date: "ISO \u0434\u0430\u0442\u0430", + time: "ISO \u0432\u0440\u0435\u043C\u044F", + duration: "ISO \u0434\u043B\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C", + ipv4: "IPv4 \u0430\u0434\u0440\u0435\u0441", + ipv6: "IPv6 \u0430\u0434\u0440\u0435\u0441", + cidrv4: "IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D", + cidrv6: "IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D", + base64: "\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64", + base64url: "\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64url", + json_string: "JSON \u0441\u0442\u0440\u043E\u043A\u0430", + e164: "\u043D\u043E\u043C\u0435\u0440 E.164", + jwt: "JWT", + template_literal: "\u0432\u0432\u043E\u0434" + }; + const TypeDictionary = { + nan: "NaN", + number: "\u0447\u0438\u0441\u043B\u043E", + array: "\u043C\u0430\u0441\u0441\u0438\u0432" + }; + return (issue4) => { + switch (issue4.code) { + case "invalid_type": { + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType2(issue4.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue4.expected)) { + return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C instanceof ${issue4.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${received}`; + } + return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${received}`; + } + case "invalid_value": + if (issue4.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 ${stringifyPrimitive2(issue4.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 ${joinValues2(issue4.values, "|")}`; + case "too_big": { + const adj = issue4.inclusive ? "<=" : "<"; + const sizing = getSizing(issue4.origin); + if (sizing) { + const maxValue = Number(issue4.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 ${issue4.origin ?? "\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${adj}${issue4.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 ${issue4.origin ?? "\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 ${adj}${issue4.maximum.toString()}`; + } + case "too_small": { + const adj = issue4.inclusive ? ">=" : ">"; + const sizing = getSizing(issue4.origin); + if (sizing) { + const minValue = Number(issue4.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 ${issue4.origin} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${adj}${issue4.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 ${issue4.origin} \u0431\u0443\u0434\u0435\u0442 ${adj}${issue4.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue4; + 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") + return `\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0437\u0430\u043A\u0430\u043D\u0447\u0438\u0432\u0430\u0442\u044C\u0441\u044F \u043D\u0430 "${_issue.suffix}"`; + if (_issue.format === "includes") + 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 ${FormatDictionary[_issue.format] ?? issue4.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 ${issue4.divisor}`; + case "unrecognized_keys": + return `\u041D\u0435\u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D${issue4.keys.length > 1 ? "\u044B\u0435" : "\u044B\u0439"} \u043A\u043B\u044E\u0447${issue4.keys.length > 1 ? "\u0438" : ""}: ${joinValues2(issue4.keys, ", ")}`; + case "invalid_key": + return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u0432 ${issue4.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 ${issue4.origin}`; + default: + return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435`; + } + }; + }; + } +}); + +// ../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/locales/sl.js +function sl_default() { + return { + localeError: error38() + }; +} +var error38; +var init_sl = __esm({ + "../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/locales/sl.js"() { + init_util2(); + error38 = () => { + const Sizable = { + string: { unit: "znakov", verb: "imeti" }, + file: { unit: "bajtov", verb: "imeti" }, + array: { unit: "elementov", verb: "imeti" }, + set: { unit: "elementov", verb: "imeti" } + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + const FormatDictionary = { + regex: "vnos", + email: "e-po\u0161tni naslov", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO datum in \u010Das", + date: "ISO datum", + time: "ISO \u010Das", + duration: "ISO trajanje", + ipv4: "IPv4 naslov", + ipv6: "IPv6 naslov", + cidrv4: "obseg IPv4", + cidrv6: "obseg IPv6", + base64: "base64 kodiran niz", + base64url: "base64url kodiran niz", + json_string: "JSON niz", + e164: "E.164 \u0161tevilka", + jwt: "JWT", + template_literal: "vnos" + }; + const TypeDictionary = { + nan: "NaN", + number: "\u0161tevilo", + array: "tabela" + }; + return (issue4) => { + switch (issue4.code) { + case "invalid_type": { + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType2(issue4.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue4.expected)) { + return `Neveljaven vnos: pri\u010Dakovano instanceof ${issue4.expected}, prejeto ${received}`; + } + return `Neveljaven vnos: pri\u010Dakovano ${expected}, prejeto ${received}`; + } + case "invalid_value": + if (issue4.values.length === 1) + return `Neveljaven vnos: pri\u010Dakovano ${stringifyPrimitive2(issue4.values[0])}`; + return `Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${joinValues2(issue4.values, "|")}`; + case "too_big": { + const adj = issue4.inclusive ? "<=" : "<"; + const sizing = getSizing(issue4.origin); + if (sizing) + return `Preveliko: pri\u010Dakovano, da bo ${issue4.origin ?? "vrednost"} imelo ${adj}${issue4.maximum.toString()} ${sizing.unit ?? "elementov"}`; + return `Preveliko: pri\u010Dakovano, da bo ${issue4.origin ?? "vrednost"} ${adj}${issue4.maximum.toString()}`; + } + case "too_small": { + const adj = issue4.inclusive ? ">=" : ">"; + const sizing = getSizing(issue4.origin); + if (sizing) { + return `Premajhno: pri\u010Dakovano, da bo ${issue4.origin} imelo ${adj}${issue4.minimum.toString()} ${sizing.unit}`; + } + return `Premajhno: pri\u010Dakovano, da bo ${issue4.origin} ${adj}${issue4.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue4; + if (_issue.format === "starts_with") { + return `Neveljaven niz: mora se za\u010Deti z "${_issue.prefix}"`; + } + if (_issue.format === "ends_with") + return `Neveljaven niz: mora se kon\u010Dati z "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Neveljaven niz: mora vsebovati "${_issue.includes}"`; + if (_issue.format === "regex") + return `Neveljaven niz: mora ustrezati vzorcu ${_issue.pattern}`; + return `Neveljaven ${FormatDictionary[_issue.format] ?? issue4.format}`; + } + case "not_multiple_of": + return `Neveljavno \u0161tevilo: mora biti ve\u010Dkratnik ${issue4.divisor}`; + case "unrecognized_keys": + return `Neprepoznan${issue4.keys.length > 1 ? "i klju\u010Di" : " klju\u010D"}: ${joinValues2(issue4.keys, ", ")}`; + case "invalid_key": + return `Neveljaven klju\u010D v ${issue4.origin}`; + case "invalid_union": + return "Neveljaven vnos"; + case "invalid_element": + return `Neveljavna vrednost v ${issue4.origin}`; + default: + return "Neveljaven vnos"; + } + }; + }; + } +}); + +// ../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/locales/sv.js +function sv_default() { + return { + localeError: error39() + }; +} +var error39; +var init_sv = __esm({ + "../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/locales/sv.js"() { + init_util2(); + error39 = () => { + const Sizable = { + string: { unit: "tecken", verb: "att ha" }, + file: { unit: "bytes", verb: "att ha" }, + array: { unit: "objekt", verb: "att inneh\xE5lla" }, + set: { unit: "objekt", verb: "att inneh\xE5lla" } + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + const FormatDictionary = { + regex: "regulj\xE4rt uttryck", + email: "e-postadress", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO-datum och tid", + date: "ISO-datum", + time: "ISO-tid", + duration: "ISO-varaktighet", + ipv4: "IPv4-intervall", + ipv6: "IPv6-intervall", + cidrv4: "IPv4-spektrum", + cidrv6: "IPv6-spektrum", + base64: "base64-kodad str\xE4ng", + base64url: "base64url-kodad str\xE4ng", + json_string: "JSON-str\xE4ng", + e164: "E.164-nummer", + jwt: "JWT", + template_literal: "mall-literal" + }; + const TypeDictionary = { + nan: "NaN", + number: "antal", + array: "lista" + }; + return (issue4) => { + switch (issue4.code) { + case "invalid_type": { + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType2(issue4.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue4.expected)) { + return `Ogiltig inmatning: f\xF6rv\xE4ntat instanceof ${issue4.expected}, fick ${received}`; + } + return `Ogiltig inmatning: f\xF6rv\xE4ntat ${expected}, fick ${received}`; + } + case "invalid_value": + if (issue4.values.length === 1) + return `Ogiltig inmatning: f\xF6rv\xE4ntat ${stringifyPrimitive2(issue4.values[0])}`; + return `Ogiltigt val: f\xF6rv\xE4ntade en av ${joinValues2(issue4.values, "|")}`; + case "too_big": { + const adj = issue4.inclusive ? "<=" : "<"; + const sizing = getSizing(issue4.origin); + if (sizing) { + return `F\xF6r stor(t): f\xF6rv\xE4ntade ${issue4.origin ?? "v\xE4rdet"} att ha ${adj}${issue4.maximum.toString()} ${sizing.unit ?? "element"}`; + } + return `F\xF6r stor(t): f\xF6rv\xE4ntat ${issue4.origin ?? "v\xE4rdet"} att ha ${adj}${issue4.maximum.toString()}`; + } + case "too_small": { + const adj = issue4.inclusive ? ">=" : ">"; + const sizing = getSizing(issue4.origin); + if (sizing) { + return `F\xF6r lite(t): f\xF6rv\xE4ntade ${issue4.origin ?? "v\xE4rdet"} att ha ${adj}${issue4.minimum.toString()} ${sizing.unit}`; + } + return `F\xF6r lite(t): f\xF6rv\xE4ntade ${issue4.origin ?? "v\xE4rdet"} att ha ${adj}${issue4.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue4; + if (_issue.format === "starts_with") { + return `Ogiltig str\xE4ng: m\xE5ste b\xF6rja med "${_issue.prefix}"`; + } + if (_issue.format === "ends_with") + return `Ogiltig str\xE4ng: m\xE5ste sluta med "${_issue.suffix}"`; + if (_issue.format === "includes") + 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) ${FormatDictionary[_issue.format] ?? issue4.format}`; + } + case "not_multiple_of": + return `Ogiltigt tal: m\xE5ste vara en multipel av ${issue4.divisor}`; + case "unrecognized_keys": + return `${issue4.keys.length > 1 ? "Ok\xE4nda nycklar" : "Ok\xE4nd nyckel"}: ${joinValues2(issue4.keys, ", ")}`; + case "invalid_key": + return `Ogiltig nyckel i ${issue4.origin ?? "v\xE4rdet"}`; + case "invalid_union": + return "Ogiltig input"; + case "invalid_element": + return `Ogiltigt v\xE4rde i ${issue4.origin ?? "v\xE4rdet"}`; + default: + return `Ogiltig input`; + } + }; + }; + } +}); + +// ../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/locales/ta.js +function ta_default() { + return { + localeError: error40() + }; +} +var error40; +var init_ta = __esm({ + "../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/locales/ta.js"() { + init_util2(); + error40 = () => { + 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" }, + file: { unit: "\u0BAA\u0BC8\u0B9F\u0BCD\u0B9F\u0BC1\u0B95\u0BB3\u0BCD", verb: "\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD" }, + array: { unit: "\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD", verb: "\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD" }, + set: { unit: "\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD", verb: "\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD" } + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + const FormatDictionary = { + regex: "\u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1", + email: "\u0BAE\u0BBF\u0BA9\u0BCD\u0BA9\u0B9E\u0BCD\u0B9A\u0BB2\u0BCD \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF", + 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 \u0BA4\u0BC7\u0BA4\u0BBF \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD", + date: "ISO \u0BA4\u0BC7\u0BA4\u0BBF", + time: "ISO \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD", + duration: "ISO \u0B95\u0BBE\u0BB2 \u0B85\u0BB3\u0BB5\u0BC1", + ipv4: "IPv4 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF", + ipv6: "IPv6 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF", + cidrv4: "IPv4 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1", + cidrv6: "IPv6 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1", + base64: "base64-encoded \u0B9A\u0BB0\u0BAE\u0BCD", + base64url: "base64url-encoded \u0B9A\u0BB0\u0BAE\u0BCD", + json_string: "JSON \u0B9A\u0BB0\u0BAE\u0BCD", + e164: "E.164 \u0B8E\u0BA3\u0BCD", + jwt: "JWT", + template_literal: "input" + }; + const TypeDictionary = { + nan: "NaN", + number: "\u0B8E\u0BA3\u0BCD", + array: "\u0B85\u0BA3\u0BBF", + null: "\u0BB5\u0BC6\u0BB1\u0BC1\u0BAE\u0BC8" + }; + return (issue4) => { + switch (issue4.code) { + case "invalid_type": { + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType2(issue4.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue4.expected)) { + 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 instanceof ${issue4.expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${received}`; + } + 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 ${expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${received}`; + } + case "invalid_value": + if (issue4.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 ${stringifyPrimitive2(issue4.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 ${joinValues2(issue4.values, "|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`; + case "too_big": { + const adj = issue4.inclusive ? "<=" : "<"; + const sizing = getSizing(issue4.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 ${issue4.origin ?? "\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${adj}${issue4.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 ${issue4.origin ?? "\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${adj}${issue4.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; + } + case "too_small": { + const adj = issue4.inclusive ? ">=" : ">"; + const sizing = getSizing(issue4.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 ${issue4.origin} ${adj}${issue4.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 ${issue4.origin} ${adj}${issue4.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; + } + case "invalid_format": { + const _issue = issue4; + 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") + return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${_issue.suffix}" \u0B87\u0BB2\u0BCD \u0BAE\u0BC1\u0B9F\u0BBF\u0BB5\u0B9F\u0BC8\u0BAF \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; + if (_issue.format === "includes") + 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 ${FormatDictionary[_issue.format] ?? issue4.format}`; + } + case "not_multiple_of": + return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B8E\u0BA3\u0BCD: ${issue4.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${issue4.keys.length > 1 ? "\u0B95\u0BB3\u0BCD" : ""}: ${joinValues2(issue4.keys, ", ")}`; + case "invalid_key": + return `${issue4.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 `${issue4.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`; + } + }; + }; + } +}); + +// ../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/locales/th.js +function th_default() { + return { + localeError: error41() + }; +} +var error41; +var init_th = __esm({ + "../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/locales/th.js"() { + init_util2(); + error41 = () => { + const Sizable = { + string: { unit: "\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" }, + file: { unit: "\u0E44\u0E1A\u0E15\u0E4C", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" }, + array: { unit: "\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" }, + set: { unit: "\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" } + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + const FormatDictionary = { + regex: "\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19", + email: "\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E2D\u0E35\u0E40\u0E21\u0E25", + url: "URL", + emoji: "\u0E2D\u0E34\u0E42\u0E21\u0E08\u0E34", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO", + date: "\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E41\u0E1A\u0E1A ISO", + time: "\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO", + duration: "\u0E0A\u0E48\u0E27\u0E07\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO", + ipv4: "\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv4", + ipv6: "\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv6", + cidrv4: "\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv4", + cidrv6: "\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv6", + base64: "\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64", + base64url: "\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64 \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A URL", + json_string: "\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A JSON", + e164: "\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28 (E.164)", + jwt: "\u0E42\u0E17\u0E40\u0E04\u0E19 JWT", + template_literal: "\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19" + }; + const TypeDictionary = { + nan: "NaN", + number: "\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02", + array: "\u0E2D\u0E32\u0E23\u0E4C\u0E40\u0E23\u0E22\u0E4C (Array)", + null: "\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E48\u0E32 (null)" + }; + return (issue4) => { + switch (issue4.code) { + case "invalid_type": { + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType2(issue4.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue4.expected)) { + 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 instanceof ${issue4.expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${received}`; + } + 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 ${expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${received}`; + } + case "invalid_value": + if (issue4.values.length === 1) + return `\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${stringifyPrimitive2(issue4.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 ${joinValues2(issue4.values, "|")}`; + case "too_big": { + const adj = issue4.inclusive ? "\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19" : "\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32"; + const sizing = getSizing(issue4.origin); + if (sizing) + return `\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${issue4.origin ?? "\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${adj} ${issue4.maximum.toString()} ${sizing.unit ?? "\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"}`; + return `\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${issue4.origin ?? "\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${adj} ${issue4.maximum.toString()}`; + } + case "too_small": { + const adj = issue4.inclusive ? "\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22" : "\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32"; + const sizing = getSizing(issue4.origin); + if (sizing) { + return `\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${issue4.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${adj} ${issue4.minimum.toString()} ${sizing.unit}`; + } + return `\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${issue4.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${adj} ${issue4.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue4; + 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}"`; + } + if (_issue.format === "ends_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\u0E25\u0E07\u0E17\u0E49\u0E32\u0E22\u0E14\u0E49\u0E27\u0E22 "${_issue.suffix}"`; + if (_issue.format === "includes") + 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: ${FormatDictionary[_issue.format] ?? issue4.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 ${issue4.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: ${joinValues2(issue4.keys, ", ")}`; + case "invalid_key": + return `\u0E04\u0E35\u0E22\u0E4C\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${issue4.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 ${issue4.origin}`; + default: + return `\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07`; + } + }; + }; + } +}); + +// ../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/locales/tr.js +function tr_default() { + return { + localeError: error42() + }; +} +var error42; +var init_tr = __esm({ + "../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/locales/tr.js"() { + init_util2(); + error42 = () => { + const Sizable = { + string: { unit: "karakter", verb: "olmal\u0131" }, + file: { unit: "bayt", verb: "olmal\u0131" }, + array: { unit: "\xF6\u011Fe", verb: "olmal\u0131" }, + set: { unit: "\xF6\u011Fe", verb: "olmal\u0131" } + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + const FormatDictionary = { + regex: "girdi", + email: "e-posta adresi", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO tarih ve saat", + date: "ISO tarih", + time: "ISO saat", + duration: "ISO s\xFCre", + ipv4: "IPv4 adresi", + ipv6: "IPv6 adresi", + cidrv4: "IPv4 aral\u0131\u011F\u0131", + cidrv6: "IPv6 aral\u0131\u011F\u0131", + base64: "base64 ile \u015Fifrelenmi\u015F metin", + base64url: "base64url ile \u015Fifrelenmi\u015F metin", + json_string: "JSON dizesi", + e164: "E.164 say\u0131s\u0131", + jwt: "JWT", + template_literal: "\u015Eablon dizesi" + }; + const TypeDictionary = { + nan: "NaN" + }; + return (issue4) => { + switch (issue4.code) { + case "invalid_type": { + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType2(issue4.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue4.expected)) { + return `Ge\xE7ersiz de\u011Fer: beklenen instanceof ${issue4.expected}, al\u0131nan ${received}`; + } + return `Ge\xE7ersiz de\u011Fer: beklenen ${expected}, al\u0131nan ${received}`; + } + case "invalid_value": + if (issue4.values.length === 1) + return `Ge\xE7ersiz de\u011Fer: beklenen ${stringifyPrimitive2(issue4.values[0])}`; + return `Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${joinValues2(issue4.values, "|")}`; + case "too_big": { + const adj = issue4.inclusive ? "<=" : "<"; + const sizing = getSizing(issue4.origin); + if (sizing) + return `\xC7ok b\xFCy\xFCk: beklenen ${issue4.origin ?? "de\u011Fer"} ${adj}${issue4.maximum.toString()} ${sizing.unit ?? "\xF6\u011Fe"}`; + return `\xC7ok b\xFCy\xFCk: beklenen ${issue4.origin ?? "de\u011Fer"} ${adj}${issue4.maximum.toString()}`; + } + case "too_small": { + const adj = issue4.inclusive ? ">=" : ">"; + const sizing = getSizing(issue4.origin); + if (sizing) + return `\xC7ok k\xFC\xE7\xFCk: beklenen ${issue4.origin} ${adj}${issue4.minimum.toString()} ${sizing.unit}`; + return `\xC7ok k\xFC\xE7\xFCk: beklenen ${issue4.origin} ${adj}${issue4.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue4; + if (_issue.format === "starts_with") + return `Ge\xE7ersiz metin: "${_issue.prefix}" ile ba\u015Flamal\u0131`; + if (_issue.format === "ends_with") + return `Ge\xE7ersiz metin: "${_issue.suffix}" ile bitmeli`; + if (_issue.format === "includes") + return `Ge\xE7ersiz metin: "${_issue.includes}" i\xE7ermeli`; + if (_issue.format === "regex") + return `Ge\xE7ersiz metin: ${_issue.pattern} desenine uymal\u0131`; + return `Ge\xE7ersiz ${FormatDictionary[_issue.format] ?? issue4.format}`; + } + case "not_multiple_of": + return `Ge\xE7ersiz say\u0131: ${issue4.divisor} ile tam b\xF6l\xFCnebilmeli`; + case "unrecognized_keys": + return `Tan\u0131nmayan anahtar${issue4.keys.length > 1 ? "lar" : ""}: ${joinValues2(issue4.keys, ", ")}`; + case "invalid_key": + return `${issue4.origin} i\xE7inde ge\xE7ersiz anahtar`; + case "invalid_union": + return "Ge\xE7ersiz de\u011Fer"; + case "invalid_element": + return `${issue4.origin} i\xE7inde ge\xE7ersiz de\u011Fer`; + default: + return `Ge\xE7ersiz de\u011Fer`; + } + }; + }; + } +}); + +// ../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/locales/uk.js +function uk_default() { + return { + localeError: error43() + }; +} +var error43; +var init_uk = __esm({ + "../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/locales/uk.js"() { + init_util2(); + error43 = () => { + const Sizable = { + string: { unit: "\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432", verb: "\u043C\u0430\u0442\u0438\u043C\u0435" }, + file: { unit: "\u0431\u0430\u0439\u0442\u0456\u0432", verb: "\u043C\u0430\u0442\u0438\u043C\u0435" }, + array: { unit: "\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432", verb: "\u043C\u0430\u0442\u0438\u043C\u0435" }, + set: { unit: "\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432", verb: "\u043C\u0430\u0442\u0438\u043C\u0435" } + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + const FormatDictionary = { + regex: "\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456", + email: "\u0430\u0434\u0440\u0435\u0441\u0430 \u0435\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0457 \u043F\u043E\u0448\u0442\u0438", + url: "URL", + emoji: "\u0435\u043C\u043E\u0434\u0437\u0456", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "\u0434\u0430\u0442\u0430 \u0442\u0430 \u0447\u0430\u0441 ISO", + date: "\u0434\u0430\u0442\u0430 ISO", + time: "\u0447\u0430\u0441 ISO", + duration: "\u0442\u0440\u0438\u0432\u0430\u043B\u0456\u0441\u0442\u044C ISO", + ipv4: "\u0430\u0434\u0440\u0435\u0441\u0430 IPv4", + ipv6: "\u0430\u0434\u0440\u0435\u0441\u0430 IPv6", + cidrv4: "\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv4", + cidrv6: "\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv6", + base64: "\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64", + base64url: "\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64url", + json_string: "\u0440\u044F\u0434\u043E\u043A JSON", + e164: "\u043D\u043E\u043C\u0435\u0440 E.164", + jwt: "JWT", + template_literal: "\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456" + }; + const TypeDictionary = { + nan: "NaN", + number: "\u0447\u0438\u0441\u043B\u043E", + array: "\u043C\u0430\u0441\u0438\u0432" + }; + return (issue4) => { + switch (issue4.code) { + case "invalid_type": { + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType2(issue4.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue4.expected)) { + 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 instanceof ${issue4.expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${received}`; + } + 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 ${expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${received}`; + } + case "invalid_value": + if (issue4.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 ${stringifyPrimitive2(issue4.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 ${joinValues2(issue4.values, "|")}`; + case "too_big": { + const adj = issue4.inclusive ? "<=" : "<"; + const sizing = getSizing(issue4.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 ${issue4.origin ?? "\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} ${sizing.verb} ${adj}${issue4.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 ${issue4.origin ?? "\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} \u0431\u0443\u0434\u0435 ${adj}${issue4.maximum.toString()}`; + } + case "too_small": { + const adj = issue4.inclusive ? ">=" : ">"; + const sizing = getSizing(issue4.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 ${issue4.origin} ${sizing.verb} ${adj}${issue4.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 ${issue4.origin} \u0431\u0443\u0434\u0435 ${adj}${issue4.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue4; + 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") + 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 \u0437\u0430\u043A\u0456\u043D\u0447\u0443\u0432\u0430\u0442\u0438\u0441\u044F \u043D\u0430 "${_issue.suffix}"`; + if (_issue.format === "includes") + 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 ${FormatDictionary[_issue.format] ?? issue4.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 ${issue4.divisor}`; + case "unrecognized_keys": + return `\u041D\u0435\u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u043D\u0438\u0439 \u043A\u043B\u044E\u0447${issue4.keys.length > 1 ? "\u0456" : ""}: ${joinValues2(issue4.keys, ", ")}`; + case "invalid_key": + return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u043A\u043B\u044E\u0447 \u0443 ${issue4.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 ${issue4.origin}`; + default: + return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456`; + } + }; + }; + } +}); + +// ../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/locales/ua.js +function ua_default() { + return uk_default(); +} +var init_ua = __esm({ + "../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/locales/ua.js"() { + init_uk(); + } +}); + +// ../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/locales/ur.js +function ur_default() { + return { + localeError: error44() + }; +} +var error44; +var init_ur = __esm({ + "../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/locales/ur.js"() { + init_util2(); + error44 = () => { + const Sizable = { + string: { unit: "\u062D\u0631\u0648\u0641", verb: "\u06C1\u0648\u0646\u0627" }, + file: { unit: "\u0628\u0627\u0626\u0679\u0633", verb: "\u06C1\u0648\u0646\u0627" }, + array: { unit: "\u0622\u0626\u0679\u0645\u0632", verb: "\u06C1\u0648\u0646\u0627" }, + set: { unit: "\u0622\u0626\u0679\u0645\u0632", verb: "\u06C1\u0648\u0646\u0627" } + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + const FormatDictionary = { + regex: "\u0627\u0646 \u067E\u0679", + email: "\u0627\u06CC \u0645\u06CC\u0644 \u0627\u06CC\u0688\u0631\u06CC\u0633", + url: "\u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644", + emoji: "\u0627\u06CC\u0645\u0648\u062C\u06CC", + uuid: "\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC", + uuidv4: "\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 4", + uuidv6: "\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 6", + nanoid: "\u0646\u06CC\u0646\u0648 \u0622\u0626\u06CC \u0688\u06CC", + guid: "\u062C\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC", + cuid: "\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC", + cuid2: "\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC 2", + ulid: "\u06CC\u0648 \u0627\u06CC\u0644 \u0622\u0626\u06CC \u0688\u06CC", + xid: "\u0627\u06CC\u06A9\u0633 \u0622\u0626\u06CC \u0688\u06CC", + ksuid: "\u06A9\u06D2 \u0627\u06CC\u0633 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC", + datetime: "\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0688\u06CC\u0679 \u0679\u0627\u0626\u0645", + date: "\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u062A\u0627\u0631\u06CC\u062E", + time: "\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0648\u0642\u062A", + duration: "\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0645\u062F\u062A", + ipv4: "\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0627\u06CC\u0688\u0631\u06CC\u0633", + ipv6: "\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0627\u06CC\u0688\u0631\u06CC\u0633", + cidrv4: "\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0631\u06CC\u0646\u062C", + cidrv6: "\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0631\u06CC\u0646\u062C", + base64: "\u0628\u06CC\u0633 64 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF", + base64url: "\u0628\u06CC\u0633 64 \u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF", + json_string: "\u062C\u06D2 \u0627\u06CC\u0633 \u0627\u0648 \u0627\u06CC\u0646 \u0633\u0679\u0631\u0646\u06AF", + e164: "\u0627\u06CC 164 \u0646\u0645\u0628\u0631", + jwt: "\u062C\u06D2 \u0688\u0628\u0644\u06CC\u0648 \u0679\u06CC", + template_literal: "\u0627\u0646 \u067E\u0679" + }; + const TypeDictionary = { + nan: "NaN", + number: "\u0646\u0645\u0628\u0631", + array: "\u0622\u0631\u06D2", + null: "\u0646\u0644" + }; + return (issue4) => { + switch (issue4.code) { + case "invalid_type": { + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType2(issue4.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue4.expected)) { + return `\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: instanceof ${issue4.expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${received} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`; + } + return `\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${received} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`; + } + case "invalid_value": + if (issue4.values.length === 1) + return `\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${stringifyPrimitive2(issue4.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`; + return `\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${joinValues2(issue4.values, "|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`; + case "too_big": { + const adj = issue4.inclusive ? "<=" : "<"; + const sizing = getSizing(issue4.origin); + if (sizing) + return `\u0628\u06C1\u062A \u0628\u0691\u0627: ${issue4.origin ?? "\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${adj}${issue4.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: ${issue4.origin ?? "\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u0627 ${adj}${issue4.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`; + } + case "too_small": { + const adj = issue4.inclusive ? ">=" : ">"; + const sizing = getSizing(issue4.origin); + if (sizing) { + return `\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${issue4.origin} \u06A9\u06D2 ${adj}${issue4.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: ${issue4.origin} \u06A9\u0627 ${adj}${issue4.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`; + } + case "invalid_format": { + const _issue = issue4; + 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`; + } + if (_issue.format === "ends_with") + return `\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${_issue.suffix}" \u067E\u0631 \u062E\u062A\u0645 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`; + if (_issue.format === "includes") + 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 ${FormatDictionary[_issue.format] ?? issue4.format}`; + } + case "not_multiple_of": + return `\u063A\u0644\u0637 \u0646\u0645\u0628\u0631: ${issue4.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${issue4.keys.length > 1 ? "\u0632" : ""}: ${joinValues2(issue4.keys, "\u060C ")}`; + case "invalid_key": + return `${issue4.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u06A9\u06CC`; + case "invalid_union": + return "\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679"; + case "invalid_element": + return `${issue4.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u0648\u06CC\u0644\u06CC\u0648`; + default: + return `\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679`; + } + }; + }; + } +}); + +// ../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/locales/uz.js +function uz_default() { + return { + localeError: error45() + }; +} +var error45; +var init_uz = __esm({ + "../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/locales/uz.js"() { + init_util2(); + error45 = () => { + const Sizable = { + string: { unit: "belgi", verb: "bo\u2018lishi kerak" }, + file: { unit: "bayt", verb: "bo\u2018lishi kerak" }, + array: { unit: "element", verb: "bo\u2018lishi kerak" }, + set: { unit: "element", verb: "bo\u2018lishi kerak" } + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + const FormatDictionary = { + regex: "kirish", + email: "elektron pochta manzili", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO sana va vaqti", + date: "ISO sana", + time: "ISO vaqt", + duration: "ISO davomiylik", + ipv4: "IPv4 manzil", + ipv6: "IPv6 manzil", + mac: "MAC manzil", + cidrv4: "IPv4 diapazon", + cidrv6: "IPv6 diapazon", + base64: "base64 kodlangan satr", + base64url: "base64url kodlangan satr", + json_string: "JSON satr", + e164: "E.164 raqam", + jwt: "JWT", + template_literal: "kirish" + }; + const TypeDictionary = { + nan: "NaN", + number: "raqam", + array: "massiv" + }; + return (issue4) => { + switch (issue4.code) { + case "invalid_type": { + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType2(issue4.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue4.expected)) { + return `Noto\u2018g\u2018ri kirish: kutilgan instanceof ${issue4.expected}, qabul qilingan ${received}`; + } + return `Noto\u2018g\u2018ri kirish: kutilgan ${expected}, qabul qilingan ${received}`; + } + case "invalid_value": + if (issue4.values.length === 1) + return `Noto\u2018g\u2018ri kirish: kutilgan ${stringifyPrimitive2(issue4.values[0])}`; + return `Noto\u2018g\u2018ri variant: quyidagilardan biri kutilgan ${joinValues2(issue4.values, "|")}`; + case "too_big": { + const adj = issue4.inclusive ? "<=" : "<"; + const sizing = getSizing(issue4.origin); + if (sizing) + return `Juda katta: kutilgan ${issue4.origin ?? "qiymat"} ${adj}${issue4.maximum.toString()} ${sizing.unit} ${sizing.verb}`; + return `Juda katta: kutilgan ${issue4.origin ?? "qiymat"} ${adj}${issue4.maximum.toString()}`; + } + case "too_small": { + const adj = issue4.inclusive ? ">=" : ">"; + const sizing = getSizing(issue4.origin); + if (sizing) { + return `Juda kichik: kutilgan ${issue4.origin} ${adj}${issue4.minimum.toString()} ${sizing.unit} ${sizing.verb}`; + } + return `Juda kichik: kutilgan ${issue4.origin} ${adj}${issue4.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue4; + if (_issue.format === "starts_with") + return `Noto\u2018g\u2018ri satr: "${_issue.prefix}" bilan boshlanishi kerak`; + if (_issue.format === "ends_with") + return `Noto\u2018g\u2018ri satr: "${_issue.suffix}" bilan tugashi kerak`; + if (_issue.format === "includes") + return `Noto\u2018g\u2018ri satr: "${_issue.includes}" ni o\u2018z ichiga olishi kerak`; + if (_issue.format === "regex") + return `Noto\u2018g\u2018ri satr: ${_issue.pattern} shabloniga mos kelishi kerak`; + return `Noto\u2018g\u2018ri ${FormatDictionary[_issue.format] ?? issue4.format}`; + } + case "not_multiple_of": + return `Noto\u2018g\u2018ri raqam: ${issue4.divisor} ning karralisi bo\u2018lishi kerak`; + case "unrecognized_keys": + return `Noma\u2019lum kalit${issue4.keys.length > 1 ? "lar" : ""}: ${joinValues2(issue4.keys, ", ")}`; + case "invalid_key": + return `${issue4.origin} dagi kalit noto\u2018g\u2018ri`; + case "invalid_union": + return "Noto\u2018g\u2018ri kirish"; + case "invalid_element": + return `${issue4.origin} da noto\u2018g\u2018ri qiymat`; + default: + return `Noto\u2018g\u2018ri kirish`; + } + }; + }; + } +}); + +// ../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/locales/vi.js +function vi_default() { + return { + localeError: error46() + }; +} +var error46; +var init_vi = __esm({ + "../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/locales/vi.js"() { + init_util2(); + error46 = () => { + const Sizable = { + string: { unit: "k\xFD t\u1EF1", verb: "c\xF3" }, + file: { unit: "byte", verb: "c\xF3" }, + array: { unit: "ph\u1EA7n t\u1EED", verb: "c\xF3" }, + set: { unit: "ph\u1EA7n t\u1EED", verb: "c\xF3" } + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + const FormatDictionary = { + regex: "\u0111\u1EA7u v\xE0o", + email: "\u0111\u1ECBa ch\u1EC9 email", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ng\xE0y gi\u1EDD ISO", + date: "ng\xE0y ISO", + time: "gi\u1EDD ISO", + duration: "kho\u1EA3ng th\u1EDDi gian ISO", + ipv4: "\u0111\u1ECBa ch\u1EC9 IPv4", + ipv6: "\u0111\u1ECBa ch\u1EC9 IPv6", + cidrv4: "d\u1EA3i IPv4", + cidrv6: "d\u1EA3i IPv6", + base64: "chu\u1ED7i m\xE3 h\xF3a base64", + base64url: "chu\u1ED7i m\xE3 h\xF3a base64url", + json_string: "chu\u1ED7i JSON", + e164: "s\u1ED1 E.164", + jwt: "JWT", + template_literal: "\u0111\u1EA7u v\xE0o" + }; + const TypeDictionary = { + nan: "NaN", + number: "s\u1ED1", + array: "m\u1EA3ng" + }; + return (issue4) => { + switch (issue4.code) { + case "invalid_type": { + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType2(issue4.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue4.expected)) { + return `\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i instanceof ${issue4.expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${received}`; + } + return `\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${received}`; + } + case "invalid_value": + if (issue4.values.length === 1) + return `\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${stringifyPrimitive2(issue4.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 ${joinValues2(issue4.values, "|")}`; + case "too_big": { + const adj = issue4.inclusive ? "<=" : "<"; + const sizing = getSizing(issue4.origin); + if (sizing) + return `Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${issue4.origin ?? "gi\xE1 tr\u1ECB"} ${sizing.verb} ${adj}${issue4.maximum.toString()} ${sizing.unit ?? "ph\u1EA7n t\u1EED"}`; + return `Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${issue4.origin ?? "gi\xE1 tr\u1ECB"} ${adj}${issue4.maximum.toString()}`; + } + case "too_small": { + const adj = issue4.inclusive ? ">=" : ">"; + const sizing = getSizing(issue4.origin); + if (sizing) { + return `Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${issue4.origin} ${sizing.verb} ${adj}${issue4.minimum.toString()} ${sizing.unit}`; + } + return `Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${issue4.origin} ${adj}${issue4.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue4; + 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") + return `Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i k\u1EBFt th\xFAc b\u1EB1ng "${_issue.suffix}"`; + if (_issue.format === "includes") + 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 `${FormatDictionary[_issue.format] ?? issue4.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 ${issue4.divisor}`; + case "unrecognized_keys": + return `Kh\xF3a kh\xF4ng \u0111\u01B0\u1EE3c nh\u1EADn d\u1EA1ng: ${joinValues2(issue4.keys, ", ")}`; + case "invalid_key": + return `Kh\xF3a kh\xF4ng h\u1EE3p l\u1EC7 trong ${issue4.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 ${issue4.origin}`; + default: + return `\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7`; + } + }; + }; + } +}); + +// ../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/locales/zh-CN.js +function zh_CN_default() { + return { + localeError: error47() + }; +} +var error47; +var init_zh_CN = __esm({ + "../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/locales/zh-CN.js"() { + init_util2(); + error47 = () => { + const Sizable = { + string: { unit: "\u5B57\u7B26", verb: "\u5305\u542B" }, + file: { unit: "\u5B57\u8282", verb: "\u5305\u542B" }, + array: { unit: "\u9879", verb: "\u5305\u542B" }, + set: { unit: "\u9879", verb: "\u5305\u542B" } + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + const FormatDictionary = { + regex: "\u8F93\u5165", + email: "\u7535\u5B50\u90AE\u4EF6", + url: "URL", + emoji: "\u8868\u60C5\u7B26\u53F7", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO\u65E5\u671F\u65F6\u95F4", + date: "ISO\u65E5\u671F", + time: "ISO\u65F6\u95F4", + duration: "ISO\u65F6\u957F", + ipv4: "IPv4\u5730\u5740", + ipv6: "IPv6\u5730\u5740", + cidrv4: "IPv4\u7F51\u6BB5", + cidrv6: "IPv6\u7F51\u6BB5", + base64: "base64\u7F16\u7801\u5B57\u7B26\u4E32", + base64url: "base64url\u7F16\u7801\u5B57\u7B26\u4E32", + json_string: "JSON\u5B57\u7B26\u4E32", + e164: "E.164\u53F7\u7801", + jwt: "JWT", + template_literal: "\u8F93\u5165" + }; + const TypeDictionary = { + nan: "NaN", + number: "\u6570\u5B57", + array: "\u6570\u7EC4", + null: "\u7A7A\u503C(null)" + }; + return (issue4) => { + switch (issue4.code) { + case "invalid_type": { + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType2(issue4.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue4.expected)) { + return `\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B instanceof ${issue4.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${received}`; + } + return `\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${received}`; + } + case "invalid_value": + if (issue4.values.length === 1) + return `\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${stringifyPrimitive2(issue4.values[0])}`; + return `\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${joinValues2(issue4.values, "|")}`; + case "too_big": { + const adj = issue4.inclusive ? "<=" : "<"; + const sizing = getSizing(issue4.origin); + if (sizing) + return `\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${issue4.origin ?? "\u503C"} ${adj}${issue4.maximum.toString()} ${sizing.unit ?? "\u4E2A\u5143\u7D20"}`; + return `\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${issue4.origin ?? "\u503C"} ${adj}${issue4.maximum.toString()}`; + } + case "too_small": { + const adj = issue4.inclusive ? ">=" : ">"; + const sizing = getSizing(issue4.origin); + if (sizing) { + return `\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${issue4.origin} ${adj}${issue4.minimum.toString()} ${sizing.unit}`; + } + return `\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${issue4.origin} ${adj}${issue4.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue4; + if (_issue.format === "starts_with") + return `\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${_issue.prefix}" \u5F00\u5934`; + if (_issue.format === "ends_with") + return `\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${_issue.suffix}" \u7ED3\u5C3E`; + if (_issue.format === "includes") + 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${FormatDictionary[_issue.format] ?? issue4.format}`; + } + case "not_multiple_of": + return `\u65E0\u6548\u6570\u5B57\uFF1A\u5FC5\u987B\u662F ${issue4.divisor} \u7684\u500D\u6570`; + case "unrecognized_keys": + return `\u51FA\u73B0\u672A\u77E5\u7684\u952E(key): ${joinValues2(issue4.keys, ", ")}`; + case "invalid_key": + return `${issue4.origin} \u4E2D\u7684\u952E(key)\u65E0\u6548`; + case "invalid_union": + return "\u65E0\u6548\u8F93\u5165"; + case "invalid_element": + return `${issue4.origin} \u4E2D\u5305\u542B\u65E0\u6548\u503C(value)`; + default: + return `\u65E0\u6548\u8F93\u5165`; + } + }; + }; + } +}); + +// ../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/locales/zh-TW.js +function zh_TW_default() { + return { + localeError: error48() + }; +} +var error48; +var init_zh_TW = __esm({ + "../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/locales/zh-TW.js"() { + init_util2(); + error48 = () => { + const Sizable = { + string: { unit: "\u5B57\u5143", verb: "\u64C1\u6709" }, + file: { unit: "\u4F4D\u5143\u7D44", verb: "\u64C1\u6709" }, + array: { unit: "\u9805\u76EE", verb: "\u64C1\u6709" }, + set: { unit: "\u9805\u76EE", verb: "\u64C1\u6709" } + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + const FormatDictionary = { + regex: "\u8F38\u5165", + email: "\u90F5\u4EF6\u5730\u5740", + 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 \u65E5\u671F\u6642\u9593", + date: "ISO \u65E5\u671F", + time: "ISO \u6642\u9593", + duration: "ISO \u671F\u9593", + ipv4: "IPv4 \u4F4D\u5740", + ipv6: "IPv6 \u4F4D\u5740", + cidrv4: "IPv4 \u7BC4\u570D", + cidrv6: "IPv6 \u7BC4\u570D", + base64: "base64 \u7DE8\u78BC\u5B57\u4E32", + base64url: "base64url \u7DE8\u78BC\u5B57\u4E32", + json_string: "JSON \u5B57\u4E32", + e164: "E.164 \u6578\u503C", + jwt: "JWT", + template_literal: "\u8F38\u5165" + }; + const TypeDictionary = { + nan: "NaN" + }; + return (issue4) => { + switch (issue4.code) { + case "invalid_type": { + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType2(issue4.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue4.expected)) { + return `\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA instanceof ${issue4.expected}\uFF0C\u4F46\u6536\u5230 ${received}`; + } + return `\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${expected}\uFF0C\u4F46\u6536\u5230 ${received}`; + } + case "invalid_value": + if (issue4.values.length === 1) + return `\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${stringifyPrimitive2(issue4.values[0])}`; + return `\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${joinValues2(issue4.values, "|")}`; + case "too_big": { + const adj = issue4.inclusive ? "<=" : "<"; + const sizing = getSizing(issue4.origin); + if (sizing) + return `\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${issue4.origin ?? "\u503C"} \u61C9\u70BA ${adj}${issue4.maximum.toString()} ${sizing.unit ?? "\u500B\u5143\u7D20"}`; + return `\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${issue4.origin ?? "\u503C"} \u61C9\u70BA ${adj}${issue4.maximum.toString()}`; + } + case "too_small": { + const adj = issue4.inclusive ? ">=" : ">"; + const sizing = getSizing(issue4.origin); + if (sizing) { + return `\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${issue4.origin} \u61C9\u70BA ${adj}${issue4.minimum.toString()} ${sizing.unit}`; + } + return `\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${issue4.origin} \u61C9\u70BA ${adj}${issue4.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue4; + if (_issue.format === "starts_with") { + return `\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${_issue.prefix}" \u958B\u982D`; + } + if (_issue.format === "ends_with") + return `\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${_issue.suffix}" \u7D50\u5C3E`; + if (_issue.format === "includes") + 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 ${FormatDictionary[_issue.format] ?? issue4.format}`; + } + case "not_multiple_of": + return `\u7121\u6548\u7684\u6578\u5B57\uFF1A\u5FC5\u9808\u70BA ${issue4.divisor} \u7684\u500D\u6578`; + case "unrecognized_keys": + return `\u7121\u6CD5\u8B58\u5225\u7684\u9375\u503C${issue4.keys.length > 1 ? "\u5011" : ""}\uFF1A${joinValues2(issue4.keys, "\u3001")}`; + case "invalid_key": + return `${issue4.origin} \u4E2D\u6709\u7121\u6548\u7684\u9375\u503C`; + case "invalid_union": + return "\u7121\u6548\u7684\u8F38\u5165\u503C"; + case "invalid_element": + return `${issue4.origin} \u4E2D\u6709\u7121\u6548\u7684\u503C`; + default: + return `\u7121\u6548\u7684\u8F38\u5165\u503C`; + } + }; + }; + } +}); + +// ../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/locales/yo.js +function yo_default() { + return { + localeError: error49() + }; +} +var error49; +var init_yo = __esm({ + "../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/locales/yo.js"() { + init_util2(); + error49 = () => { + const Sizable = { + string: { unit: "\xE0mi", verb: "n\xED" }, + file: { unit: "bytes", verb: "n\xED" }, + array: { unit: "nkan", verb: "n\xED" }, + set: { unit: "nkan", verb: "n\xED" } + }; + function getSizing(origin) { + return Sizable[origin] ?? null; + } + const FormatDictionary = { + regex: "\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9", + email: "\xE0d\xEDr\u1EB9\u0301s\xEC \xECm\u1EB9\u0301l\xEC", + 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: "\xE0k\xF3k\xF2 ISO", + date: "\u1ECDj\u1ECD\u0301 ISO", + time: "\xE0k\xF3k\xF2 ISO", + duration: "\xE0k\xF3k\xF2 t\xF3 p\xE9 ISO", + ipv4: "\xE0d\xEDr\u1EB9\u0301s\xEC IPv4", + ipv6: "\xE0d\xEDr\u1EB9\u0301s\xEC IPv6", + cidrv4: "\xE0gb\xE8gb\xE8 IPv4", + cidrv6: "\xE0gb\xE8gb\xE8 IPv6", + base64: "\u1ECD\u0300r\u1ECD\u0300 t\xED a k\u1ECD\u0301 n\xED base64", + base64url: "\u1ECD\u0300r\u1ECD\u0300 base64url", + json_string: "\u1ECD\u0300r\u1ECD\u0300 JSON", + e164: "n\u1ECD\u0301mb\xE0 E.164", + jwt: "JWT", + template_literal: "\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9" + }; + const TypeDictionary = { + nan: "NaN", + number: "n\u1ECD\u0301mb\xE0", + array: "akop\u1ECD" + }; + return (issue4) => { + switch (issue4.code) { + case "invalid_type": { + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType2(issue4.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue4.expected)) { + return `\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi instanceof ${issue4.expected}, \xE0m\u1ECD\u0300 a r\xED ${received}`; + } + return `\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${expected}, \xE0m\u1ECD\u0300 a r\xED ${received}`; + } + case "invalid_value": + if (issue4.values.length === 1) + return `\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${stringifyPrimitive2(issue4.values[0])}`; + return `\xC0\u1E63\xE0y\xE0n a\u1E63\xEC\u1E63e: yan \u1ECD\u0300kan l\xE1ra ${joinValues2(issue4.values, "|")}`; + case "too_big": { + const adj = issue4.inclusive ? "<=" : "<"; + const sizing = getSizing(issue4.origin); + if (sizing) + return `T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${issue4.origin ?? "iye"} ${sizing.verb} ${adj}${issue4.maximum} ${sizing.unit}`; + return `T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 ${adj}${issue4.maximum}`; + } + case "too_small": { + const adj = issue4.inclusive ? ">=" : ">"; + const sizing = getSizing(issue4.origin); + if (sizing) + return `K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${issue4.origin} ${sizing.verb} ${adj}${issue4.minimum} ${sizing.unit}`; + return `K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 ${adj}${issue4.minimum}`; + } + case "invalid_format": { + const _issue = issue4; + if (_issue.format === "starts_with") + return `\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\u1EB9\u0300r\u1EB9\u0300 p\u1EB9\u0300l\xFA "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 par\xED p\u1EB9\u0300l\xFA "${_issue.suffix}"`; + if (_issue.format === "includes") + return `\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 n\xED "${_issue.includes}"`; + if (_issue.format === "regex") + return `\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\xE1 \xE0p\u1EB9\u1EB9r\u1EB9 mu ${_issue.pattern}`; + return `A\u1E63\xEC\u1E63e: ${FormatDictionary[_issue.format] ?? issue4.format}`; + } + case "not_multiple_of": + return `N\u1ECD\u0301mb\xE0 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 j\u1EB9\u0301 \xE8y\xE0 p\xEDp\xEDn ti ${issue4.divisor}`; + case "unrecognized_keys": + return `B\u1ECDt\xECn\xEC \xE0\xECm\u1ECD\u0300: ${joinValues2(issue4.keys, ", ")}`; + case "invalid_key": + return `B\u1ECDt\xECn\xEC a\u1E63\xEC\u1E63e n\xEDn\xFA ${issue4.origin}`; + case "invalid_union": + return "\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e"; + case "invalid_element": + return `Iye a\u1E63\xEC\u1E63e n\xEDn\xFA ${issue4.origin}`; + default: + return "\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e"; + } + }; + }; + } +}); + +// ../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/locales/index.js +var locales_exports = {}; +__export(locales_exports, { + ar: () => ar_default, + az: () => az_default, + be: () => be_default, + bg: () => bg_default, + ca: () => ca_default, + cs: () => cs_default, + da: () => da_default, + de: () => de_default, + en: () => en_default4, + eo: () => eo_default, + es: () => es_default, + fa: () => fa_default, + fi: () => fi_default, + fr: () => fr_default, + frCA: () => fr_CA_default, + he: () => he_default, + hu: () => hu_default, + hy: () => hy_default, + id: () => id_default, + is: () => is_default, + it: () => it_default, + ja: () => ja_default, + ka: () => ka_default, + kh: () => kh_default, + km: () => km_default, + ko: () => ko_default, + lt: () => lt_default, + mk: () => mk_default, + ms: () => ms_default, + nl: () => nl_default, + no: () => no_default, + ota: () => ota_default, + pl: () => pl_default, + ps: () => ps_default, + pt: () => pt_default, + ru: () => ru_default, + sl: () => sl_default, + sv: () => sv_default, + ta: () => ta_default, + th: () => th_default, + tr: () => tr_default, + ua: () => ua_default, + uk: () => uk_default, + ur: () => ur_default, + uz: () => uz_default, + vi: () => vi_default, + yo: () => yo_default, + zhCN: () => zh_CN_default, + zhTW: () => zh_TW_default +}); +var init_locales = __esm({ + "../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/locales/index.js"() { + init_ar(); + init_az(); + init_be(); + init_bg(); + init_ca(); + init_cs(); + init_da(); + init_de(); + init_en2(); + init_eo(); + init_es(); + init_fa(); + init_fi(); + init_fr(); + init_fr_CA(); + init_he(); + init_hu(); + init_hy(); + init_id(); + init_is(); + init_it(); + init_ja(); + init_ka(); + init_kh(); + init_km(); + init_ko(); + init_lt(); + init_mk(); + init_ms(); + init_nl(); + init_no(); + init_ota(); + init_ps(); + init_pl(); + init_pt(); + init_ru(); + init_sl(); + init_sv(); + init_ta(); + init_th(); + init_tr(); + init_ua(); + init_uk(); + init_ur(); + init_uz(); + init_vi(); + init_zh_CN(); + init_zh_TW(); + init_yo(); + } +}); + +// ../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/core/registries.js +function registry3() { + return new $ZodRegistry2(); +} +var _a, $output2, $input2, $ZodRegistry2, globalRegistry2; +var init_registries = __esm({ + "../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/core/registries.js"() { + $output2 = Symbol("ZodOutput"); + $input2 = Symbol("ZodInput"); + $ZodRegistry2 = class { + constructor() { + this._map = /* @__PURE__ */ new WeakMap(); + this._idmap = /* @__PURE__ */ new Map(); + } + add(schema2, ..._meta) { + const meta3 = _meta[0]; + this._map.set(schema2, meta3); + if (meta3 && typeof meta3 === "object" && "id" in meta3) { + this._idmap.set(meta3.id, schema2); + } + return this; + } + clear() { + this._map = /* @__PURE__ */ new WeakMap(); + this._idmap = /* @__PURE__ */ new Map(); + return this; + } + remove(schema2) { + const meta3 = this._map.get(schema2); + if (meta3 && typeof meta3 === "object" && "id" in meta3) { + this._idmap.delete(meta3.id); + } + this._map.delete(schema2); + return this; + } + get(schema2) { + const p = schema2._zod.parent; + if (p) { + const pm = { ...this.get(p) ?? {} }; + delete pm.id; + const f = { ...pm, ...this._map.get(schema2) }; + return Object.keys(f).length ? f : void 0; + } + return this._map.get(schema2); + } + has(schema2) { + return this._map.has(schema2); + } + }; + (_a = globalThis).__zod_globalRegistry ?? (_a.__zod_globalRegistry = registry3()); + globalRegistry2 = globalThis.__zod_globalRegistry; + } +}); + +// ../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/core/api.js +// @__NO_SIDE_EFFECTS__ +function _string2(Class3, params) { + return new Class3({ + type: "string", + ...normalizeParams2(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _coercedString(Class3, params) { + return new Class3({ + type: "string", + coerce: true, + ...normalizeParams2(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _email2(Class3, params) { + return new Class3({ + type: "string", + format: "email", + check: "string_format", + abort: false, + ...normalizeParams2(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _guid2(Class3, params) { + return new Class3({ + type: "string", + format: "guid", + check: "string_format", + abort: false, + ...normalizeParams2(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _uuid2(Class3, params) { + return new Class3({ + type: "string", + format: "uuid", + check: "string_format", + abort: false, + ...normalizeParams2(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _uuidv42(Class3, params) { + return new Class3({ + type: "string", + format: "uuid", + check: "string_format", + abort: false, + version: "v4", + ...normalizeParams2(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _uuidv62(Class3, params) { + return new Class3({ + type: "string", + format: "uuid", + check: "string_format", + abort: false, + version: "v6", + ...normalizeParams2(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _uuidv72(Class3, params) { + return new Class3({ + type: "string", + format: "uuid", + check: "string_format", + abort: false, + version: "v7", + ...normalizeParams2(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _url2(Class3, params) { + return new Class3({ + type: "string", + format: "url", + check: "string_format", + abort: false, + ...normalizeParams2(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _emoji4(Class3, params) { + return new Class3({ + type: "string", + format: "emoji", + check: "string_format", + abort: false, + ...normalizeParams2(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _nanoid2(Class3, params) { + return new Class3({ + type: "string", + format: "nanoid", + check: "string_format", + abort: false, + ...normalizeParams2(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _cuid3(Class3, params) { + return new Class3({ + type: "string", + format: "cuid", + check: "string_format", + abort: false, + ...normalizeParams2(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _cuid22(Class3, params) { + return new Class3({ + type: "string", + format: "cuid2", + check: "string_format", + abort: false, + ...normalizeParams2(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _ulid2(Class3, params) { + return new Class3({ + type: "string", + format: "ulid", + check: "string_format", + abort: false, + ...normalizeParams2(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _xid2(Class3, params) { + return new Class3({ + type: "string", + format: "xid", + check: "string_format", + abort: false, + ...normalizeParams2(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _ksuid2(Class3, params) { + return new Class3({ + type: "string", + format: "ksuid", + check: "string_format", + abort: false, + ...normalizeParams2(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _ipv42(Class3, params) { + return new Class3({ + type: "string", + format: "ipv4", + check: "string_format", + abort: false, + ...normalizeParams2(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _ipv62(Class3, params) { + return new Class3({ + type: "string", + format: "ipv6", + check: "string_format", + abort: false, + ...normalizeParams2(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _mac(Class3, params) { + return new Class3({ + type: "string", + format: "mac", + check: "string_format", + abort: false, + ...normalizeParams2(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _cidrv42(Class3, params) { + return new Class3({ + type: "string", + format: "cidrv4", + check: "string_format", + abort: false, + ...normalizeParams2(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _cidrv62(Class3, params) { + return new Class3({ + type: "string", + format: "cidrv6", + check: "string_format", + abort: false, + ...normalizeParams2(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _base642(Class3, params) { + return new Class3({ + type: "string", + format: "base64", + check: "string_format", + abort: false, + ...normalizeParams2(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _base64url2(Class3, params) { + return new Class3({ + type: "string", + format: "base64url", + check: "string_format", + abort: false, + ...normalizeParams2(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _e1642(Class3, params) { + return new Class3({ + type: "string", + format: "e164", + check: "string_format", + abort: false, + ...normalizeParams2(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _jwt2(Class3, params) { + return new Class3({ + type: "string", + format: "jwt", + check: "string_format", + abort: false, + ...normalizeParams2(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _isoDateTime2(Class3, params) { + return new Class3({ + type: "string", + format: "datetime", + check: "string_format", + offset: false, + local: false, + precision: null, + ...normalizeParams2(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _isoDate2(Class3, params) { + return new Class3({ + type: "string", + format: "date", + check: "string_format", + ...normalizeParams2(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _isoTime2(Class3, params) { + return new Class3({ + type: "string", + format: "time", + check: "string_format", + precision: null, + ...normalizeParams2(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _isoDuration2(Class3, params) { + return new Class3({ + type: "string", + format: "duration", + check: "string_format", + ...normalizeParams2(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _number2(Class3, params) { + return new Class3({ + type: "number", + checks: [], + ...normalizeParams2(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _coercedNumber(Class3, params) { + return new Class3({ + type: "number", + coerce: true, + checks: [], + ...normalizeParams2(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _int2(Class3, params) { + return new Class3({ + type: "number", + check: "number_format", + abort: false, + format: "safeint", + ...normalizeParams2(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _float32(Class3, params) { + return new Class3({ + type: "number", + check: "number_format", + abort: false, + format: "float32", + ...normalizeParams2(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _float64(Class3, params) { + return new Class3({ + type: "number", + check: "number_format", + abort: false, + format: "float64", + ...normalizeParams2(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _int32(Class3, params) { + return new Class3({ + type: "number", + check: "number_format", + abort: false, + format: "int32", + ...normalizeParams2(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _uint32(Class3, params) { + return new Class3({ + type: "number", + check: "number_format", + abort: false, + format: "uint32", + ...normalizeParams2(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _boolean2(Class3, params) { + return new Class3({ + type: "boolean", + ...normalizeParams2(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _coercedBoolean(Class3, params) { + return new Class3({ + type: "boolean", + coerce: true, + ...normalizeParams2(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _bigint(Class3, params) { + return new Class3({ + type: "bigint", + ...normalizeParams2(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _coercedBigint(Class3, params) { + return new Class3({ + type: "bigint", + coerce: true, + ...normalizeParams2(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _int64(Class3, params) { + return new Class3({ + type: "bigint", + check: "bigint_format", + abort: false, + format: "int64", + ...normalizeParams2(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _uint64(Class3, params) { + return new Class3({ + type: "bigint", + check: "bigint_format", + abort: false, + format: "uint64", + ...normalizeParams2(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _symbol(Class3, params) { + return new Class3({ + type: "symbol", + ...normalizeParams2(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _undefined2(Class3, params) { + return new Class3({ + type: "undefined", + ...normalizeParams2(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _null5(Class3, params) { + return new Class3({ + type: "null", + ...normalizeParams2(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _any(Class3) { + return new Class3({ + type: "any" + }); +} +// @__NO_SIDE_EFFECTS__ +function _unknown2(Class3) { + return new Class3({ + type: "unknown" + }); +} +// @__NO_SIDE_EFFECTS__ +function _never2(Class3, params) { + return new Class3({ + type: "never", + ...normalizeParams2(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _void(Class3, params) { + return new Class3({ + type: "void", + ...normalizeParams2(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _date(Class3, params) { + return new Class3({ + type: "date", + ...normalizeParams2(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _coercedDate(Class3, params) { + return new Class3({ + type: "date", + coerce: true, + ...normalizeParams2(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _nan(Class3, params) { + return new Class3({ + type: "nan", + ...normalizeParams2(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _lt2(value2, params) { + return new $ZodCheckLessThan2({ + check: "less_than", + ...normalizeParams2(params), + value: value2, + inclusive: false + }); +} +// @__NO_SIDE_EFFECTS__ +function _lte2(value2, params) { + return new $ZodCheckLessThan2({ + check: "less_than", + ...normalizeParams2(params), + value: value2, + inclusive: true + }); +} +// @__NO_SIDE_EFFECTS__ +function _gt2(value2, params) { + return new $ZodCheckGreaterThan2({ + check: "greater_than", + ...normalizeParams2(params), + value: value2, + inclusive: false + }); +} +// @__NO_SIDE_EFFECTS__ +function _gte2(value2, params) { + return new $ZodCheckGreaterThan2({ + check: "greater_than", + ...normalizeParams2(params), + value: value2, + inclusive: true + }); +} +// @__NO_SIDE_EFFECTS__ +function _positive(params) { + return /* @__PURE__ */ _gt2(0, params); +} +// @__NO_SIDE_EFFECTS__ +function _negative(params) { + return /* @__PURE__ */ _lt2(0, params); +} +// @__NO_SIDE_EFFECTS__ +function _nonpositive(params) { + return /* @__PURE__ */ _lte2(0, params); +} +// @__NO_SIDE_EFFECTS__ +function _nonnegative(params) { + return /* @__PURE__ */ _gte2(0, params); +} +// @__NO_SIDE_EFFECTS__ +function _multipleOf2(value2, params) { + return new $ZodCheckMultipleOf2({ + check: "multiple_of", + ...normalizeParams2(params), + value: value2 + }); +} +// @__NO_SIDE_EFFECTS__ +function _maxSize(maximum, params) { + return new $ZodCheckMaxSize({ + check: "max_size", + ...normalizeParams2(params), + maximum + }); +} +// @__NO_SIDE_EFFECTS__ +function _minSize(minimum, params) { + return new $ZodCheckMinSize({ + check: "min_size", + ...normalizeParams2(params), + minimum + }); +} +// @__NO_SIDE_EFFECTS__ +function _size(size, params) { + return new $ZodCheckSizeEquals({ + check: "size_equals", + ...normalizeParams2(params), + size + }); +} +// @__NO_SIDE_EFFECTS__ +function _maxLength2(maximum, params) { + const ch = new $ZodCheckMaxLength2({ + check: "max_length", + ...normalizeParams2(params), + maximum + }); + return ch; +} +// @__NO_SIDE_EFFECTS__ +function _minLength2(minimum, params) { + return new $ZodCheckMinLength2({ + check: "min_length", + ...normalizeParams2(params), + minimum + }); +} +// @__NO_SIDE_EFFECTS__ +function _length2(length, params) { + return new $ZodCheckLengthEquals2({ + check: "length_equals", + ...normalizeParams2(params), + length + }); +} +// @__NO_SIDE_EFFECTS__ +function _regex2(pattern, params) { + return new $ZodCheckRegex2({ + check: "string_format", + format: "regex", + ...normalizeParams2(params), + pattern + }); +} +// @__NO_SIDE_EFFECTS__ +function _lowercase2(params) { + return new $ZodCheckLowerCase2({ + check: "string_format", + format: "lowercase", + ...normalizeParams2(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _uppercase2(params) { + return new $ZodCheckUpperCase2({ + check: "string_format", + format: "uppercase", + ...normalizeParams2(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _includes2(includes2, params) { + return new $ZodCheckIncludes2({ + check: "string_format", + format: "includes", + ...normalizeParams2(params), + includes: includes2 + }); +} +// @__NO_SIDE_EFFECTS__ +function _startsWith2(prefix, params) { + return new $ZodCheckStartsWith2({ + check: "string_format", + format: "starts_with", + ...normalizeParams2(params), + prefix + }); +} +// @__NO_SIDE_EFFECTS__ +function _endsWith2(suffix2, params) { + return new $ZodCheckEndsWith2({ + check: "string_format", + format: "ends_with", + ...normalizeParams2(params), + suffix: suffix2 + }); +} +// @__NO_SIDE_EFFECTS__ +function _property(property, schema2, params) { + return new $ZodCheckProperty({ + check: "property", + property, + schema: schema2, + ...normalizeParams2(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _mime(types, params) { + return new $ZodCheckMimeType({ + check: "mime_type", + mime: types, + ...normalizeParams2(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _overwrite2(tx) { + return new $ZodCheckOverwrite2({ + check: "overwrite", + tx + }); +} +// @__NO_SIDE_EFFECTS__ +function _normalize2(form) { + return /* @__PURE__ */ _overwrite2((input) => input.normalize(form)); +} +// @__NO_SIDE_EFFECTS__ +function _trim2() { + return /* @__PURE__ */ _overwrite2((input) => input.trim()); +} +// @__NO_SIDE_EFFECTS__ +function _toLowerCase2() { + return /* @__PURE__ */ _overwrite2((input) => input.toLowerCase()); +} +// @__NO_SIDE_EFFECTS__ +function _toUpperCase2() { + return /* @__PURE__ */ _overwrite2((input) => input.toUpperCase()); +} +// @__NO_SIDE_EFFECTS__ +function _slugify() { + return /* @__PURE__ */ _overwrite2((input) => slugify(input)); +} +// @__NO_SIDE_EFFECTS__ +function _array2(Class3, element, params) { + return new Class3({ + type: "array", + element, + // get element() { + // return element; + // }, + ...normalizeParams2(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _union(Class3, options, params) { + return new Class3({ + type: "union", + options, + ...normalizeParams2(params) + }); +} +function _xor(Class3, options, params) { + return new Class3({ + type: "union", + options, + inclusive: false, + ...normalizeParams2(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _discriminatedUnion(Class3, discriminator, options, params) { + return new Class3({ + type: "union", + options, + discriminator, + ...normalizeParams2(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _intersection(Class3, left, right) { + return new Class3({ + type: "intersection", + left, + right + }); +} +// @__NO_SIDE_EFFECTS__ +function _tuple(Class3, items, _paramsOrRest, _params) { + const hasRest = _paramsOrRest instanceof $ZodType2; + const params = hasRest ? _params : _paramsOrRest; + const rest = hasRest ? _paramsOrRest : null; + return new Class3({ + type: "tuple", + items, + rest, + ...normalizeParams2(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _record(Class3, keyType, valueType, params) { + return new Class3({ + type: "record", + keyType, + valueType, + ...normalizeParams2(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _map(Class3, keyType, valueType, params) { + return new Class3({ + type: "map", + keyType, + valueType, + ...normalizeParams2(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _set(Class3, valueType, params) { + return new Class3({ + type: "set", + valueType, + ...normalizeParams2(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _enum2(Class3, values, params) { + const entries = Array.isArray(values) ? Object.fromEntries(values.map((v) => [v, v])) : values; + return new Class3({ + type: "enum", + entries, + ...normalizeParams2(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _nativeEnum(Class3, entries, params) { + return new Class3({ + type: "enum", + entries, + ...normalizeParams2(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _literal(Class3, value2, params) { + return new Class3({ + type: "literal", + values: Array.isArray(value2) ? value2 : [value2], + ...normalizeParams2(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _file(Class3, params) { + return new Class3({ + type: "file", + ...normalizeParams2(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _transform(Class3, fn2) { + return new Class3({ + type: "transform", + transform: fn2 + }); +} +// @__NO_SIDE_EFFECTS__ +function _optional(Class3, innerType) { + return new Class3({ + type: "optional", + innerType + }); +} +// @__NO_SIDE_EFFECTS__ +function _nullable(Class3, innerType) { + return new Class3({ + type: "nullable", + innerType + }); +} +// @__NO_SIDE_EFFECTS__ +function _default2(Class3, innerType, defaultValue) { + return new Class3({ + type: "default", + innerType, + get defaultValue() { + return typeof defaultValue === "function" ? defaultValue() : shallowClone(defaultValue); + } + }); +} +// @__NO_SIDE_EFFECTS__ +function _nonoptional(Class3, innerType, params) { + return new Class3({ + type: "nonoptional", + innerType, + ...normalizeParams2(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _success(Class3, innerType) { + return new Class3({ + type: "success", + innerType + }); +} +// @__NO_SIDE_EFFECTS__ +function _catch2(Class3, innerType, catchValue) { + return new Class3({ + type: "catch", + innerType, + catchValue: typeof catchValue === "function" ? catchValue : () => catchValue + }); +} +// @__NO_SIDE_EFFECTS__ +function _pipe(Class3, in_, out) { + return new Class3({ + type: "pipe", + in: in_, + out + }); +} +// @__NO_SIDE_EFFECTS__ +function _readonly(Class3, innerType) { + return new Class3({ + type: "readonly", + innerType + }); +} +// @__NO_SIDE_EFFECTS__ +function _templateLiteral(Class3, parts, params) { + return new Class3({ + type: "template_literal", + parts, + ...normalizeParams2(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _lazy(Class3, getter) { + return new Class3({ + type: "lazy", + getter + }); +} +// @__NO_SIDE_EFFECTS__ +function _promise(Class3, innerType) { + return new Class3({ + type: "promise", + innerType + }); +} +// @__NO_SIDE_EFFECTS__ +function _custom2(Class3, fn2, _params) { + const norm2 = normalizeParams2(_params); + norm2.abort ?? (norm2.abort = true); + const schema2 = new Class3({ + type: "custom", + check: "custom", + fn: fn2, + ...norm2 + }); + return schema2; +} +// @__NO_SIDE_EFFECTS__ +function _refine2(Class3, fn2, _params) { + const schema2 = new Class3({ + type: "custom", + check: "custom", + fn: fn2, + ...normalizeParams2(_params) + }); + return schema2; +} +// @__NO_SIDE_EFFECTS__ +function _superRefine(fn2) { + const ch = /* @__PURE__ */ _check((payload) => { + payload.addIssue = (issue4) => { + if (typeof issue4 === "string") { + payload.issues.push(issue2(issue4, payload.value, ch._zod.def)); + } else { + const _issue = issue4; + if (_issue.fatal) + _issue.continue = false; + _issue.code ?? (_issue.code = "custom"); + _issue.input ?? (_issue.input = payload.value); + _issue.inst ?? (_issue.inst = ch); + _issue.continue ?? (_issue.continue = !ch._zod.def.abort); + payload.issues.push(issue2(_issue)); + } + }; + return fn2(payload.value, payload); + }); + return ch; +} +// @__NO_SIDE_EFFECTS__ +function _check(fn2, params) { + const ch = new $ZodCheck2({ + check: "custom", + ...normalizeParams2(params) + }); + ch._zod.check = fn2; + return ch; +} +// @__NO_SIDE_EFFECTS__ +function describe(description) { + const ch = new $ZodCheck2({ check: "describe" }); + ch._zod.onattach = [ + (inst) => { + const existing = globalRegistry2.get(inst) ?? {}; + globalRegistry2.add(inst, { ...existing, description }); + } + ]; + ch._zod.check = () => { + }; + return ch; +} +// @__NO_SIDE_EFFECTS__ +function meta(metadata) { + const ch = new $ZodCheck2({ check: "meta" }); + ch._zod.onattach = [ + (inst) => { + const existing = globalRegistry2.get(inst) ?? {}; + globalRegistry2.add(inst, { ...existing, ...metadata }); + } + ]; + ch._zod.check = () => { + }; + return ch; +} +// @__NO_SIDE_EFFECTS__ +function _stringbool(Classes, _params) { + const params = normalizeParams2(_params); + let truthyArray = params.truthy ?? ["true", "1", "yes", "on", "y", "enabled"]; + let falsyArray = params.falsy ?? ["false", "0", "no", "off", "n", "disabled"]; + if (params.case !== "sensitive") { + truthyArray = truthyArray.map((v) => typeof v === "string" ? v.toLowerCase() : v); + falsyArray = falsyArray.map((v) => typeof v === "string" ? v.toLowerCase() : v); + } + const truthySet = new Set(truthyArray); + const falsySet = new Set(falsyArray); + const _Codec = Classes.Codec ?? $ZodCodec; + const _Boolean = Classes.Boolean ?? $ZodBoolean2; + const _String = Classes.String ?? $ZodString2; + const stringSchema = new _String({ type: "string", error: params.error }); + const booleanSchema = new _Boolean({ type: "boolean", error: params.error }); + const codec2 = new _Codec({ + type: "pipe", + in: stringSchema, + out: booleanSchema, + transform: ((input, payload) => { + let data = input; + if (params.case !== "sensitive") + data = data.toLowerCase(); + if (truthySet.has(data)) { + return true; + } else if (falsySet.has(data)) { + return false; + } else { + payload.issues.push({ + code: "invalid_value", + expected: "stringbool", + values: [...truthySet, ...falsySet], + input: payload.value, + inst: codec2, + continue: false + }); + return {}; + } + }), + reverseTransform: ((input, _payload) => { + if (input === true) { + return truthyArray[0] || "true"; + } else { + return falsyArray[0] || "false"; + } + }), + error: params.error + }); + return codec2; +} +// @__NO_SIDE_EFFECTS__ +function _stringFormat(Class3, format2, fnOrRegex, _params = {}) { + const params = normalizeParams2(_params); + const def = { + ...normalizeParams2(_params), + check: "string_format", + type: "string", + format: format2, + fn: typeof fnOrRegex === "function" ? fnOrRegex : (val) => fnOrRegex.test(val), + ...params + }; + if (fnOrRegex instanceof RegExp) { + def.pattern = fnOrRegex; + } + const inst = new Class3(def); + return inst; +} +var TimePrecision; +var init_api = __esm({ + "../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/core/api.js"() { + init_checks(); + init_registries(); + init_schemas(); + init_util2(); + TimePrecision = { + Any: null, + Minute: -1, + Second: 0, + Millisecond: 3, + Microsecond: 6 + }; + } +}); + +// ../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/core/to-json-schema.js +function initializeContext(params) { + let target = params?.target ?? "draft-2020-12"; + if (target === "draft-4") + target = "draft-04"; + if (target === "draft-7") + target = "draft-07"; + return { + processors: params.processors ?? {}, + metadataRegistry: params?.metadata ?? globalRegistry2, + target, + unrepresentable: params?.unrepresentable ?? "throw", + override: params?.override ?? (() => { + }), + io: params?.io ?? "output", + counter: 0, + seen: /* @__PURE__ */ new Map(), + cycles: params?.cycles ?? "ref", + reused: params?.reused ?? "inline", + external: params?.external ?? void 0 + }; +} +function process2(schema2, ctx, _params = { path: [], schemaPath: [] }) { + var _a2; + const def = schema2._zod.def; + const seen = ctx.seen.get(schema2); + if (seen) { + seen.count++; + const isCycle = _params.schemaPath.includes(schema2); + if (isCycle) { + seen.cycle = _params.path; + } + return seen.schema; + } + const result = { schema: {}, count: 1, cycle: void 0, path: _params.path }; + ctx.seen.set(schema2, result); + const overrideSchema = schema2._zod.toJSONSchema?.(); + if (overrideSchema) { + result.schema = overrideSchema; + } else { + const params = { + ..._params, + schemaPath: [..._params.schemaPath, schema2], + path: _params.path + }; + if (schema2._zod.processJSONSchema) { + schema2._zod.processJSONSchema(ctx, result.schema, params); + } else { + const _json = result.schema; + const processor = ctx.processors[def.type]; + if (!processor) { + throw new Error(`[toJSONSchema]: Non-representable type encountered: ${def.type}`); + } + processor(schema2, ctx, _json, params); + } + const parent = schema2._zod.parent; + if (parent) { + if (!result.ref) + result.ref = parent; + process2(parent, ctx, params); + ctx.seen.get(parent).isParent = true; + } + } + const meta3 = ctx.metadataRegistry.get(schema2); + if (meta3) + Object.assign(result.schema, meta3); + if (ctx.io === "input" && isTransforming(schema2)) { + delete result.schema.examples; + delete result.schema.default; + } + if (ctx.io === "input" && result.schema._prefault) + (_a2 = result.schema).default ?? (_a2.default = result.schema._prefault); + delete result.schema._prefault; + const _result = ctx.seen.get(schema2); + return _result.schema; +} +function extractDefs(ctx, schema2) { + const root2 = ctx.seen.get(schema2); + if (!root2) + throw new Error("Unprocessed schema. This is a bug in Zod."); + const idToSchema = /* @__PURE__ */ new Map(); + for (const entry of ctx.seen.entries()) { + const id = ctx.metadataRegistry.get(entry[0])?.id; + if (id) { + const existing = idToSchema.get(id); + if (existing && existing !== entry[0]) { + throw new Error(`Duplicate schema id "${id}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`); + } + idToSchema.set(id, entry[0]); + } + } + const makeURI = (entry) => { + const defsSegment = ctx.target === "draft-2020-12" ? "$defs" : "definitions"; + if (ctx.external) { + const externalId = ctx.external.registry.get(entry[0])?.id; + const uriGenerator = ctx.external.uri ?? ((id2) => id2); + if (externalId) { + return { ref: uriGenerator(externalId) }; + } + const id = entry[1].defId ?? entry[1].schema.id ?? `schema${ctx.counter++}`; + entry[1].defId = id; + return { defId: id, ref: `${uriGenerator("__shared")}#/${defsSegment}/${id}` }; + } + if (entry[1] === root2) { + return { ref: "#" }; + } + const uriPrefix = `#`; + const defUriPrefix = `${uriPrefix}/${defsSegment}/`; + const defId = entry[1].schema.id ?? `__schema${ctx.counter++}`; + return { defId, ref: defUriPrefix + defId }; + }; + const extractToDef = (entry) => { + if (entry[1].schema.$ref) { + return; + } + const seen = entry[1]; + const { ref, defId } = makeURI(entry); + seen.def = { ...seen.schema }; + if (defId) + seen.defId = defId; + const schema3 = seen.schema; + for (const key in schema3) { + delete schema3[key]; + } + schema3.$ref = ref; + }; + if (ctx.cycles === "throw") { + for (const entry of ctx.seen.entries()) { + const seen = entry[1]; + if (seen.cycle) { + throw new Error(`Cycle detected: #/${seen.cycle?.join("/")}/ + +Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`); + } + } + } + for (const entry of ctx.seen.entries()) { + const seen = entry[1]; + if (schema2 === entry[0]) { + extractToDef(entry); + continue; + } + if (ctx.external) { + const ext = ctx.external.registry.get(entry[0])?.id; + if (schema2 !== entry[0] && ext) { + extractToDef(entry); + continue; + } + } + const id = ctx.metadataRegistry.get(entry[0])?.id; + if (id) { + extractToDef(entry); + continue; + } + if (seen.cycle) { + extractToDef(entry); + continue; + } + if (seen.count > 1) { + if (ctx.reused === "ref") { + extractToDef(entry); + continue; + } + } + } +} +function finalize(ctx, schema2) { + const root2 = ctx.seen.get(schema2); + if (!root2) + throw new Error("Unprocessed schema. This is a bug in Zod."); + const flattenRef = (zodSchema) => { + const seen = ctx.seen.get(zodSchema); + if (seen.ref === null) + return; + const schema3 = seen.def ?? seen.schema; + const _cached = { ...schema3 }; + const ref = seen.ref; + seen.ref = null; + if (ref) { + flattenRef(ref); + const refSeen = ctx.seen.get(ref); + const refSchema = refSeen.schema; + if (refSchema.$ref && (ctx.target === "draft-07" || ctx.target === "draft-04" || ctx.target === "openapi-3.0")) { + schema3.allOf = schema3.allOf ?? []; + schema3.allOf.push(refSchema); + } else { + Object.assign(schema3, refSchema); + } + Object.assign(schema3, _cached); + const isParentRef = zodSchema._zod.parent === ref; + if (isParentRef) { + for (const key in schema3) { + if (key === "$ref" || key === "allOf") + continue; + if (!(key in _cached)) { + delete schema3[key]; + } + } + } + if (refSchema.$ref) { + for (const key in schema3) { + if (key === "$ref" || key === "allOf") + continue; + if (key in refSeen.def && JSON.stringify(schema3[key]) === JSON.stringify(refSeen.def[key])) { + delete schema3[key]; + } + } + } + } + const parent = zodSchema._zod.parent; + if (parent && parent !== ref) { + flattenRef(parent); + const parentSeen = ctx.seen.get(parent); + if (parentSeen?.schema.$ref) { + schema3.$ref = parentSeen.schema.$ref; + if (parentSeen.def) { + for (const key in schema3) { + if (key === "$ref" || key === "allOf") + continue; + if (key in parentSeen.def && JSON.stringify(schema3[key]) === JSON.stringify(parentSeen.def[key])) { + delete schema3[key]; + } + } + } + } + } + ctx.override({ + zodSchema, + jsonSchema: schema3, + path: seen.path ?? [] + }); + }; + for (const entry of [...ctx.seen.entries()].reverse()) { + flattenRef(entry[0]); + } + const result = {}; + if (ctx.target === "draft-2020-12") { + result.$schema = "https://json-schema.org/draft/2020-12/schema"; + } else if (ctx.target === "draft-07") { + result.$schema = "http://json-schema.org/draft-07/schema#"; + } else if (ctx.target === "draft-04") { + result.$schema = "http://json-schema.org/draft-04/schema#"; + } else if (ctx.target === "openapi-3.0") { + } else { + } + if (ctx.external?.uri) { + const id = ctx.external.registry.get(schema2)?.id; + if (!id) + throw new Error("Schema is missing an `id` property"); + result.$id = ctx.external.uri(id); + } + Object.assign(result, root2.def ?? root2.schema); + const defs = ctx.external?.defs ?? {}; + for (const entry of ctx.seen.entries()) { + const seen = entry[1]; + if (seen.def && seen.defId) { + defs[seen.defId] = seen.def; + } + } + if (ctx.external) { + } else { + if (Object.keys(defs).length > 0) { + if (ctx.target === "draft-2020-12") { + result.$defs = defs; + } else { + result.definitions = defs; + } + } + } + try { + const finalized = JSON.parse(JSON.stringify(result)); + Object.defineProperty(finalized, "~standard", { + value: { + ...schema2["~standard"], + jsonSchema: { + input: createStandardJSONSchemaMethod(schema2, "input", ctx.processors), + output: createStandardJSONSchemaMethod(schema2, "output", ctx.processors) + } + }, + enumerable: false, + writable: false + }); + return finalized; + } catch (_err) { + throw new Error("Error converting schema to JSON."); + } +} +function isTransforming(_schema, _ctx) { + const ctx = _ctx ?? { seen: /* @__PURE__ */ new Set() }; + if (ctx.seen.has(_schema)) + return false; + ctx.seen.add(_schema); + const def = _schema._zod.def; + if (def.type === "transform") + return true; + if (def.type === "array") + return isTransforming(def.element, ctx); + if (def.type === "set") + return isTransforming(def.valueType, ctx); + if (def.type === "lazy") + return isTransforming(def.getter(), ctx); + if (def.type === "promise" || def.type === "optional" || def.type === "nonoptional" || def.type === "nullable" || def.type === "readonly" || def.type === "default" || def.type === "prefault") { + return isTransforming(def.innerType, ctx); + } + if (def.type === "intersection") { + return isTransforming(def.left, ctx) || isTransforming(def.right, ctx); + } + if (def.type === "record" || def.type === "map") { + return isTransforming(def.keyType, ctx) || isTransforming(def.valueType, ctx); + } + if (def.type === "pipe") { + return isTransforming(def.in, ctx) || isTransforming(def.out, ctx); + } + if (def.type === "object") { + for (const key in def.shape) { + if (isTransforming(def.shape[key], ctx)) + return true; + } + return false; + } + if (def.type === "union") { + for (const option of def.options) { + if (isTransforming(option, ctx)) + return true; + } + return false; + } + if (def.type === "tuple") { + for (const item of def.items) { + if (isTransforming(item, ctx)) + return true; + } + if (def.rest && isTransforming(def.rest, ctx)) + return true; + return false; + } + return false; +} +var createToJSONSchemaMethod, createStandardJSONSchemaMethod; +var init_to_json_schema = __esm({ + "../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/core/to-json-schema.js"() { + init_registries(); + createToJSONSchemaMethod = (schema2, processors = {}) => (params) => { + const ctx = initializeContext({ ...params, processors }); + process2(schema2, ctx); + extractDefs(ctx, schema2); + return finalize(ctx, schema2); + }; + createStandardJSONSchemaMethod = (schema2, io, processors = {}) => (params) => { + const { libraryOptions, target } = params ?? {}; + const ctx = initializeContext({ ...libraryOptions ?? {}, target, io, processors }); + process2(schema2, ctx); + extractDefs(ctx, schema2); + return finalize(ctx, schema2); + }; + } +}); + +// ../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/core/json-schema-processors.js +function toJSONSchema(input, params) { + if ("_idmap" in input) { + const registry5 = input; + const ctx2 = initializeContext({ ...params, processors: allProcessors }); + const defs = {}; + for (const entry of registry5._idmap.entries()) { + const [_, schema2] = entry; + process2(schema2, ctx2); + } + const schemas = {}; + const external = { + registry: registry5, + uri: params?.uri, + defs + }; + ctx2.external = external; + for (const entry of registry5._idmap.entries()) { + const [key, schema2] = entry; + extractDefs(ctx2, schema2); + schemas[key] = finalize(ctx2, schema2); + } + if (Object.keys(defs).length > 0) { + const defsSegment = ctx2.target === "draft-2020-12" ? "$defs" : "definitions"; + schemas.__shared = { + [defsSegment]: defs + }; + } + return { schemas }; + } + const ctx = initializeContext({ ...params, processors: allProcessors }); + process2(input, ctx); + extractDefs(ctx, input); + return finalize(ctx, input); +} +var formatMap, stringProcessor, numberProcessor, booleanProcessor, bigintProcessor, symbolProcessor, nullProcessor, undefinedProcessor, voidProcessor, neverProcessor, anyProcessor, unknownProcessor, dateProcessor, enumProcessor, literalProcessor, nanProcessor, templateLiteralProcessor, fileProcessor, successProcessor, customProcessor, functionProcessor, transformProcessor, mapProcessor, setProcessor, arrayProcessor, objectProcessor, unionProcessor, intersectionProcessor, tupleProcessor, recordProcessor, nullableProcessor, nonoptionalProcessor, defaultProcessor, prefaultProcessor, catchProcessor, pipeProcessor, readonlyProcessor, promiseProcessor, optionalProcessor, lazyProcessor, allProcessors; +var init_json_schema_processors = __esm({ + "../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/core/json-schema-processors.js"() { + init_to_json_schema(); + init_util2(); + formatMap = { + guid: "uuid", + url: "uri", + datetime: "date-time", + json_string: "json-string", + regex: "" + // do not set + }; + stringProcessor = (schema2, ctx, _json, _params) => { + const json4 = _json; + json4.type = "string"; + const { minimum, maximum, format: format2, patterns, contentEncoding } = schema2._zod.bag; + if (typeof minimum === "number") + json4.minLength = minimum; + if (typeof maximum === "number") + json4.maxLength = maximum; + if (format2) { + json4.format = formatMap[format2] ?? format2; + if (json4.format === "") + delete json4.format; + if (format2 === "time") { + delete json4.format; + } + } + if (contentEncoding) + json4.contentEncoding = contentEncoding; + if (patterns && patterns.size > 0) { + const regexes = [...patterns]; + if (regexes.length === 1) + json4.pattern = regexes[0].source; + else if (regexes.length > 1) { + json4.allOf = [ + ...regexes.map((regex4) => ({ + ...ctx.target === "draft-07" || ctx.target === "draft-04" || ctx.target === "openapi-3.0" ? { type: "string" } : {}, + pattern: regex4.source + })) + ]; + } + } + }; + numberProcessor = (schema2, ctx, _json, _params) => { + const json4 = _json; + const { minimum, maximum, format: format2, multipleOf, exclusiveMaximum, exclusiveMinimum } = schema2._zod.bag; + if (typeof format2 === "string" && format2.includes("int")) + json4.type = "integer"; + else + json4.type = "number"; + if (typeof exclusiveMinimum === "number") { + if (ctx.target === "draft-04" || ctx.target === "openapi-3.0") { + json4.minimum = exclusiveMinimum; + json4.exclusiveMinimum = true; + } else { + json4.exclusiveMinimum = exclusiveMinimum; + } + } + if (typeof minimum === "number") { + json4.minimum = minimum; + if (typeof exclusiveMinimum === "number" && ctx.target !== "draft-04") { + if (exclusiveMinimum >= minimum) + delete json4.minimum; + else + delete json4.exclusiveMinimum; + } + } + if (typeof exclusiveMaximum === "number") { + if (ctx.target === "draft-04" || ctx.target === "openapi-3.0") { + json4.maximum = exclusiveMaximum; + json4.exclusiveMaximum = true; + } else { + json4.exclusiveMaximum = exclusiveMaximum; + } + } + if (typeof maximum === "number") { + json4.maximum = maximum; + if (typeof exclusiveMaximum === "number" && ctx.target !== "draft-04") { + if (exclusiveMaximum <= maximum) + delete json4.maximum; + else + delete json4.exclusiveMaximum; + } + } + if (typeof multipleOf === "number") + json4.multipleOf = multipleOf; + }; + booleanProcessor = (_schema, _ctx, json4, _params) => { + json4.type = "boolean"; + }; + bigintProcessor = (_schema, ctx, _json, _params) => { + if (ctx.unrepresentable === "throw") { + throw new Error("BigInt cannot be represented in JSON Schema"); + } + }; + symbolProcessor = (_schema, ctx, _json, _params) => { + if (ctx.unrepresentable === "throw") { + throw new Error("Symbols cannot be represented in JSON Schema"); + } + }; + nullProcessor = (_schema, ctx, json4, _params) => { + if (ctx.target === "openapi-3.0") { + json4.type = "string"; + json4.nullable = true; + json4.enum = [null]; + } else { + json4.type = "null"; + } + }; + undefinedProcessor = (_schema, ctx, _json, _params) => { + if (ctx.unrepresentable === "throw") { + throw new Error("Undefined cannot be represented in JSON Schema"); + } + }; + voidProcessor = (_schema, ctx, _json, _params) => { + if (ctx.unrepresentable === "throw") { + throw new Error("Void cannot be represented in JSON Schema"); + } + }; + neverProcessor = (_schema, _ctx, json4, _params) => { + json4.not = {}; + }; + anyProcessor = (_schema, _ctx, _json, _params) => { + }; + unknownProcessor = (_schema, _ctx, _json, _params) => { + }; + dateProcessor = (_schema, ctx, _json, _params) => { + if (ctx.unrepresentable === "throw") { + throw new Error("Date cannot be represented in JSON Schema"); + } + }; + enumProcessor = (schema2, _ctx, json4, _params) => { + const def = schema2._zod.def; + const values = getEnumValues2(def.entries); + if (values.every((v) => typeof v === "number")) + json4.type = "number"; + if (values.every((v) => typeof v === "string")) + json4.type = "string"; + json4.enum = values; + }; + literalProcessor = (schema2, ctx, json4, _params) => { + const def = schema2._zod.def; + const vals = []; + for (const val of def.values) { + if (val === void 0) { + if (ctx.unrepresentable === "throw") { + throw new Error("Literal `undefined` cannot be represented in JSON Schema"); + } else { + } + } else if (typeof val === "bigint") { + if (ctx.unrepresentable === "throw") { + throw new Error("BigInt literals cannot be represented in JSON Schema"); + } else { + vals.push(Number(val)); + } + } else { + vals.push(val); + } + } + if (vals.length === 0) { + } else if (vals.length === 1) { + const val = vals[0]; + json4.type = val === null ? "null" : typeof val; + if (ctx.target === "draft-04" || ctx.target === "openapi-3.0") { + json4.enum = [val]; + } else { + json4.const = val; + } + } else { + if (vals.every((v) => typeof v === "number")) + json4.type = "number"; + if (vals.every((v) => typeof v === "string")) + json4.type = "string"; + if (vals.every((v) => typeof v === "boolean")) + json4.type = "boolean"; + if (vals.every((v) => v === null)) + json4.type = "null"; + json4.enum = vals; + } + }; + nanProcessor = (_schema, ctx, _json, _params) => { + if (ctx.unrepresentable === "throw") { + throw new Error("NaN cannot be represented in JSON Schema"); + } + }; + templateLiteralProcessor = (schema2, _ctx, json4, _params) => { + const _json = json4; + const pattern = schema2._zod.pattern; + if (!pattern) + throw new Error("Pattern not found in template literal"); + _json.type = "string"; + _json.pattern = pattern.source; + }; + fileProcessor = (schema2, _ctx, json4, _params) => { + const _json = json4; + const file2 = { + type: "string", + format: "binary", + contentEncoding: "binary" + }; + const { minimum, maximum, mime } = schema2._zod.bag; + if (minimum !== void 0) + file2.minLength = minimum; + if (maximum !== void 0) + file2.maxLength = maximum; + if (mime) { + if (mime.length === 1) { + file2.contentMediaType = mime[0]; + Object.assign(_json, file2); + } else { + Object.assign(_json, file2); + _json.anyOf = mime.map((m) => ({ contentMediaType: m })); + } + } else { + Object.assign(_json, file2); + } + }; + successProcessor = (_schema, _ctx, json4, _params) => { + json4.type = "boolean"; + }; + customProcessor = (_schema, ctx, _json, _params) => { + if (ctx.unrepresentable === "throw") { + throw new Error("Custom types cannot be represented in JSON Schema"); + } + }; + functionProcessor = (_schema, ctx, _json, _params) => { + if (ctx.unrepresentable === "throw") { + throw new Error("Function types cannot be represented in JSON Schema"); + } + }; + transformProcessor = (_schema, ctx, _json, _params) => { + if (ctx.unrepresentable === "throw") { + throw new Error("Transforms cannot be represented in JSON Schema"); + } + }; + mapProcessor = (_schema, ctx, _json, _params) => { + if (ctx.unrepresentable === "throw") { + throw new Error("Map cannot be represented in JSON Schema"); + } + }; + setProcessor = (_schema, ctx, _json, _params) => { + if (ctx.unrepresentable === "throw") { + throw new Error("Set cannot be represented in JSON Schema"); + } + }; + arrayProcessor = (schema2, ctx, _json, params) => { + const json4 = _json; + const def = schema2._zod.def; + const { minimum, maximum } = schema2._zod.bag; + if (typeof minimum === "number") + json4.minItems = minimum; + if (typeof maximum === "number") + json4.maxItems = maximum; + json4.type = "array"; + json4.items = process2(def.element, ctx, { ...params, path: [...params.path, "items"] }); + }; + objectProcessor = (schema2, ctx, _json, params) => { + const json4 = _json; + const def = schema2._zod.def; + json4.type = "object"; + json4.properties = {}; + const shape = def.shape; + for (const key in shape) { + json4.properties[key] = process2(shape[key], ctx, { + ...params, + path: [...params.path, "properties", key] + }); + } + const allKeys = new Set(Object.keys(shape)); + const requiredKeys = new Set([...allKeys].filter((key) => { + const v = def.shape[key]._zod; + if (ctx.io === "input") { + return v.optin === void 0; + } else { + return v.optout === void 0; + } + })); + if (requiredKeys.size > 0) { + json4.required = Array.from(requiredKeys); + } + if (def.catchall?._zod.def.type === "never") { + json4.additionalProperties = false; + } else if (!def.catchall) { + if (ctx.io === "output") + json4.additionalProperties = false; + } else if (def.catchall) { + json4.additionalProperties = process2(def.catchall, ctx, { + ...params, + path: [...params.path, "additionalProperties"] + }); + } + }; + unionProcessor = (schema2, ctx, json4, params) => { + const def = schema2._zod.def; + const isExclusive = def.inclusive === false; + const options = def.options.map((x, i) => process2(x, ctx, { + ...params, + path: [...params.path, isExclusive ? "oneOf" : "anyOf", i] + })); + if (isExclusive) { + json4.oneOf = options; + } else { + json4.anyOf = options; + } + }; + intersectionProcessor = (schema2, ctx, json4, params) => { + const def = schema2._zod.def; + const a = process2(def.left, ctx, { + ...params, + path: [...params.path, "allOf", 0] + }); + const b = process2(def.right, ctx, { + ...params, + path: [...params.path, "allOf", 1] + }); + const isSimpleIntersection = (val) => "allOf" in val && Object.keys(val).length === 1; + const allOf = [ + ...isSimpleIntersection(a) ? a.allOf : [a], + ...isSimpleIntersection(b) ? b.allOf : [b] + ]; + json4.allOf = allOf; + }; + tupleProcessor = (schema2, ctx, _json, params) => { + const json4 = _json; + const def = schema2._zod.def; + json4.type = "array"; + const prefixPath = ctx.target === "draft-2020-12" ? "prefixItems" : "items"; + const restPath = ctx.target === "draft-2020-12" ? "items" : ctx.target === "openapi-3.0" ? "items" : "additionalItems"; + const prefixItems = def.items.map((x, i) => process2(x, ctx, { + ...params, + path: [...params.path, prefixPath, i] + })); + const rest = def.rest ? process2(def.rest, ctx, { + ...params, + path: [...params.path, restPath, ...ctx.target === "openapi-3.0" ? [def.items.length] : []] + }) : null; + if (ctx.target === "draft-2020-12") { + json4.prefixItems = prefixItems; + if (rest) { + json4.items = rest; + } + } else if (ctx.target === "openapi-3.0") { + json4.items = { + anyOf: prefixItems + }; + if (rest) { + json4.items.anyOf.push(rest); + } + json4.minItems = prefixItems.length; + if (!rest) { + json4.maxItems = prefixItems.length; + } + } else { + json4.items = prefixItems; + if (rest) { + json4.additionalItems = rest; + } + } + const { minimum, maximum } = schema2._zod.bag; + if (typeof minimum === "number") + json4.minItems = minimum; + if (typeof maximum === "number") + json4.maxItems = maximum; + }; + recordProcessor = (schema2, ctx, _json, params) => { + const json4 = _json; + const def = schema2._zod.def; + json4.type = "object"; + const keyType = def.keyType; + const keyBag = keyType._zod.bag; + const patterns = keyBag?.patterns; + if (def.mode === "loose" && patterns && patterns.size > 0) { + const valueSchema = process2(def.valueType, ctx, { + ...params, + path: [...params.path, "patternProperties", "*"] + }); + json4.patternProperties = {}; + for (const pattern of patterns) { + json4.patternProperties[pattern.source] = valueSchema; + } + } else { + if (ctx.target === "draft-07" || ctx.target === "draft-2020-12") { + json4.propertyNames = process2(def.keyType, ctx, { + ...params, + path: [...params.path, "propertyNames"] + }); + } + json4.additionalProperties = process2(def.valueType, ctx, { + ...params, + path: [...params.path, "additionalProperties"] + }); + } + const keyValues = keyType._zod.values; + if (keyValues) { + const validKeyValues = [...keyValues].filter((v) => typeof v === "string" || typeof v === "number"); + if (validKeyValues.length > 0) { + json4.required = validKeyValues; + } + } + }; + nullableProcessor = (schema2, ctx, json4, params) => { + const def = schema2._zod.def; + const inner = process2(def.innerType, ctx, params); + const seen = ctx.seen.get(schema2); + if (ctx.target === "openapi-3.0") { + seen.ref = def.innerType; + json4.nullable = true; + } else { + json4.anyOf = [inner, { type: "null" }]; + } + }; + nonoptionalProcessor = (schema2, ctx, _json, params) => { + const def = schema2._zod.def; + process2(def.innerType, ctx, params); + const seen = ctx.seen.get(schema2); + seen.ref = def.innerType; + }; + defaultProcessor = (schema2, ctx, json4, params) => { + const def = schema2._zod.def; + process2(def.innerType, ctx, params); + const seen = ctx.seen.get(schema2); + seen.ref = def.innerType; + json4.default = JSON.parse(JSON.stringify(def.defaultValue)); + }; + prefaultProcessor = (schema2, ctx, json4, params) => { + const def = schema2._zod.def; + process2(def.innerType, ctx, params); + const seen = ctx.seen.get(schema2); + seen.ref = def.innerType; + if (ctx.io === "input") + json4._prefault = JSON.parse(JSON.stringify(def.defaultValue)); + }; + catchProcessor = (schema2, ctx, json4, params) => { + const def = schema2._zod.def; + process2(def.innerType, ctx, params); + const seen = ctx.seen.get(schema2); + seen.ref = def.innerType; + let catchValue; + try { + catchValue = def.catchValue(void 0); + } catch { + throw new Error("Dynamic catch values are not supported in JSON Schema"); + } + json4.default = catchValue; + }; + pipeProcessor = (schema2, ctx, _json, params) => { + const def = schema2._zod.def; + const innerType = ctx.io === "input" ? def.in._zod.def.type === "transform" ? def.out : def.in : def.out; + process2(innerType, ctx, params); + const seen = ctx.seen.get(schema2); + seen.ref = innerType; + }; + readonlyProcessor = (schema2, ctx, json4, params) => { + const def = schema2._zod.def; + process2(def.innerType, ctx, params); + const seen = ctx.seen.get(schema2); + seen.ref = def.innerType; + json4.readOnly = true; + }; + promiseProcessor = (schema2, ctx, _json, params) => { + const def = schema2._zod.def; + process2(def.innerType, ctx, params); + const seen = ctx.seen.get(schema2); + seen.ref = def.innerType; + }; + optionalProcessor = (schema2, ctx, _json, params) => { + const def = schema2._zod.def; + process2(def.innerType, ctx, params); + const seen = ctx.seen.get(schema2); + seen.ref = def.innerType; + }; + lazyProcessor = (schema2, ctx, _json, params) => { + const innerType = schema2._zod.innerType; + process2(innerType, ctx, params); + const seen = ctx.seen.get(schema2); + seen.ref = innerType; + }; + allProcessors = { + string: stringProcessor, + number: numberProcessor, + boolean: booleanProcessor, + bigint: bigintProcessor, + symbol: symbolProcessor, + null: nullProcessor, + undefined: undefinedProcessor, + void: voidProcessor, + never: neverProcessor, + any: anyProcessor, + unknown: unknownProcessor, + date: dateProcessor, + enum: enumProcessor, + literal: literalProcessor, + nan: nanProcessor, + template_literal: templateLiteralProcessor, + file: fileProcessor, + success: successProcessor, + custom: customProcessor, + function: functionProcessor, + transform: transformProcessor, + map: mapProcessor, + set: setProcessor, + array: arrayProcessor, + object: objectProcessor, + union: unionProcessor, + intersection: intersectionProcessor, + tuple: tupleProcessor, + record: recordProcessor, + nullable: nullableProcessor, + nonoptional: nonoptionalProcessor, + default: defaultProcessor, + prefault: prefaultProcessor, + catch: catchProcessor, + pipe: pipeProcessor, + readonly: readonlyProcessor, + promise: promiseProcessor, + optional: optionalProcessor, + lazy: lazyProcessor + }; + } +}); + +// ../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/core/json-schema-generator.js +var JSONSchemaGenerator; +var init_json_schema_generator = __esm({ + "../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/core/json-schema-generator.js"() { + init_json_schema_processors(); + init_to_json_schema(); + JSONSchemaGenerator = class { + /** @deprecated Access via ctx instead */ + get metadataRegistry() { + return this.ctx.metadataRegistry; + } + /** @deprecated Access via ctx instead */ + get target() { + return this.ctx.target; + } + /** @deprecated Access via ctx instead */ + get unrepresentable() { + return this.ctx.unrepresentable; + } + /** @deprecated Access via ctx instead */ + get override() { + return this.ctx.override; + } + /** @deprecated Access via ctx instead */ + get io() { + return this.ctx.io; + } + /** @deprecated Access via ctx instead */ + get counter() { + return this.ctx.counter; + } + set counter(value2) { + this.ctx.counter = value2; + } + /** @deprecated Access via ctx instead */ + get seen() { + return this.ctx.seen; + } + constructor(params) { + let normalizedTarget = params?.target ?? "draft-2020-12"; + if (normalizedTarget === "draft-4") + normalizedTarget = "draft-04"; + if (normalizedTarget === "draft-7") + normalizedTarget = "draft-07"; + this.ctx = initializeContext({ + processors: allProcessors, + target: normalizedTarget, + ...params?.metadata && { metadata: params.metadata }, + ...params?.unrepresentable && { unrepresentable: params.unrepresentable }, + ...params?.override && { override: params.override }, + ...params?.io && { io: params.io } + }); + } + /** + * Process a schema to prepare it for JSON Schema generation. + * This must be called before emit(). + */ + process(schema2, _params = { path: [], schemaPath: [] }) { + return process2(schema2, this.ctx, _params); + } + /** + * Emit the final JSON Schema after processing. + * Must call process() first. + */ + emit(schema2, _params) { + if (_params) { + if (_params.cycles) + this.ctx.cycles = _params.cycles; + if (_params.reused) + this.ctx.reused = _params.reused; + if (_params.external) + this.ctx.external = _params.external; + } + extractDefs(this.ctx, schema2); + const result = finalize(this.ctx, schema2); + const { "~standard": _, ...plainResult } = result; + return plainResult; + } + }; + } +}); + +// ../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/core/json-schema.js +var json_schema_exports = {}; +var init_json_schema = __esm({ + "../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/core/json-schema.js"() { + } +}); + +// ../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/core/index.js +var core_exports2 = {}; +__export(core_exports2, { + $ZodAny: () => $ZodAny, + $ZodArray: () => $ZodArray2, + $ZodAsyncError: () => $ZodAsyncError2, + $ZodBase64: () => $ZodBase642, + $ZodBase64URL: () => $ZodBase64URL2, + $ZodBigInt: () => $ZodBigInt, + $ZodBigIntFormat: () => $ZodBigIntFormat, + $ZodBoolean: () => $ZodBoolean2, + $ZodCIDRv4: () => $ZodCIDRv42, + $ZodCIDRv6: () => $ZodCIDRv62, + $ZodCUID: () => $ZodCUID3, + $ZodCUID2: () => $ZodCUID22, + $ZodCatch: () => $ZodCatch2, + $ZodCheck: () => $ZodCheck2, + $ZodCheckBigIntFormat: () => $ZodCheckBigIntFormat, + $ZodCheckEndsWith: () => $ZodCheckEndsWith2, + $ZodCheckGreaterThan: () => $ZodCheckGreaterThan2, + $ZodCheckIncludes: () => $ZodCheckIncludes2, + $ZodCheckLengthEquals: () => $ZodCheckLengthEquals2, + $ZodCheckLessThan: () => $ZodCheckLessThan2, + $ZodCheckLowerCase: () => $ZodCheckLowerCase2, + $ZodCheckMaxLength: () => $ZodCheckMaxLength2, + $ZodCheckMaxSize: () => $ZodCheckMaxSize, + $ZodCheckMimeType: () => $ZodCheckMimeType, + $ZodCheckMinLength: () => $ZodCheckMinLength2, + $ZodCheckMinSize: () => $ZodCheckMinSize, + $ZodCheckMultipleOf: () => $ZodCheckMultipleOf2, + $ZodCheckNumberFormat: () => $ZodCheckNumberFormat2, + $ZodCheckOverwrite: () => $ZodCheckOverwrite2, + $ZodCheckProperty: () => $ZodCheckProperty, + $ZodCheckRegex: () => $ZodCheckRegex2, + $ZodCheckSizeEquals: () => $ZodCheckSizeEquals, + $ZodCheckStartsWith: () => $ZodCheckStartsWith2, + $ZodCheckStringFormat: () => $ZodCheckStringFormat2, + $ZodCheckUpperCase: () => $ZodCheckUpperCase2, + $ZodCodec: () => $ZodCodec, + $ZodCustom: () => $ZodCustom2, + $ZodCustomStringFormat: () => $ZodCustomStringFormat, + $ZodDate: () => $ZodDate, + $ZodDefault: () => $ZodDefault2, + $ZodDiscriminatedUnion: () => $ZodDiscriminatedUnion2, + $ZodE164: () => $ZodE1642, + $ZodEmail: () => $ZodEmail2, + $ZodEmoji: () => $ZodEmoji2, + $ZodEncodeError: () => $ZodEncodeError, + $ZodEnum: () => $ZodEnum2, + $ZodError: () => $ZodError2, + $ZodExactOptional: () => $ZodExactOptional, + $ZodFile: () => $ZodFile, + $ZodFunction: () => $ZodFunction, + $ZodGUID: () => $ZodGUID2, + $ZodIPv4: () => $ZodIPv42, + $ZodIPv6: () => $ZodIPv62, + $ZodISODate: () => $ZodISODate2, + $ZodISODateTime: () => $ZodISODateTime2, + $ZodISODuration: () => $ZodISODuration2, + $ZodISOTime: () => $ZodISOTime2, + $ZodIntersection: () => $ZodIntersection2, + $ZodJWT: () => $ZodJWT2, + $ZodKSUID: () => $ZodKSUID2, + $ZodLazy: () => $ZodLazy, + $ZodLiteral: () => $ZodLiteral2, + $ZodMAC: () => $ZodMAC, + $ZodMap: () => $ZodMap, + $ZodNaN: () => $ZodNaN, + $ZodNanoID: () => $ZodNanoID2, + $ZodNever: () => $ZodNever2, + $ZodNonOptional: () => $ZodNonOptional2, + $ZodNull: () => $ZodNull2, + $ZodNullable: () => $ZodNullable2, + $ZodNumber: () => $ZodNumber2, + $ZodNumberFormat: () => $ZodNumberFormat2, + $ZodObject: () => $ZodObject2, + $ZodObjectJIT: () => $ZodObjectJIT, + $ZodOptional: () => $ZodOptional2, + $ZodPipe: () => $ZodPipe2, + $ZodPrefault: () => $ZodPrefault2, + $ZodPromise: () => $ZodPromise, + $ZodReadonly: () => $ZodReadonly2, + $ZodRealError: () => $ZodRealError2, + $ZodRecord: () => $ZodRecord2, + $ZodRegistry: () => $ZodRegistry2, + $ZodSet: () => $ZodSet, + $ZodString: () => $ZodString2, + $ZodStringFormat: () => $ZodStringFormat2, + $ZodSuccess: () => $ZodSuccess, + $ZodSymbol: () => $ZodSymbol, + $ZodTemplateLiteral: () => $ZodTemplateLiteral, + $ZodTransform: () => $ZodTransform2, + $ZodTuple: () => $ZodTuple, + $ZodType: () => $ZodType2, + $ZodULID: () => $ZodULID2, + $ZodURL: () => $ZodURL2, + $ZodUUID: () => $ZodUUID2, + $ZodUndefined: () => $ZodUndefined, + $ZodUnion: () => $ZodUnion2, + $ZodUnknown: () => $ZodUnknown2, + $ZodVoid: () => $ZodVoid, + $ZodXID: () => $ZodXID2, + $ZodXor: () => $ZodXor, + $brand: () => $brand2, + $constructor: () => $constructor2, + $input: () => $input2, + $output: () => $output2, + Doc: () => Doc2, + JSONSchema: () => json_schema_exports, + JSONSchemaGenerator: () => JSONSchemaGenerator, + NEVER: () => NEVER2, + TimePrecision: () => TimePrecision, + _any: () => _any, + _array: () => _array2, + _base64: () => _base642, + _base64url: () => _base64url2, + _bigint: () => _bigint, + _boolean: () => _boolean2, + _catch: () => _catch2, + _check: () => _check, + _cidrv4: () => _cidrv42, + _cidrv6: () => _cidrv62, + _coercedBigint: () => _coercedBigint, + _coercedBoolean: () => _coercedBoolean, + _coercedDate: () => _coercedDate, + _coercedNumber: () => _coercedNumber, + _coercedString: () => _coercedString, + _cuid: () => _cuid3, + _cuid2: () => _cuid22, + _custom: () => _custom2, + _date: () => _date, + _decode: () => _decode, + _decodeAsync: () => _decodeAsync, + _default: () => _default2, + _discriminatedUnion: () => _discriminatedUnion, + _e164: () => _e1642, + _email: () => _email2, + _emoji: () => _emoji4, + _encode: () => _encode, + _encodeAsync: () => _encodeAsync, + _endsWith: () => _endsWith2, + _enum: () => _enum2, + _file: () => _file, + _float32: () => _float32, + _float64: () => _float64, + _gt: () => _gt2, + _gte: () => _gte2, + _guid: () => _guid2, + _includes: () => _includes2, + _int: () => _int2, + _int32: () => _int32, + _int64: () => _int64, + _intersection: () => _intersection, + _ipv4: () => _ipv42, + _ipv6: () => _ipv62, + _isoDate: () => _isoDate2, + _isoDateTime: () => _isoDateTime2, + _isoDuration: () => _isoDuration2, + _isoTime: () => _isoTime2, + _jwt: () => _jwt2, + _ksuid: () => _ksuid2, + _lazy: () => _lazy, + _length: () => _length2, + _literal: () => _literal, + _lowercase: () => _lowercase2, + _lt: () => _lt2, + _lte: () => _lte2, + _mac: () => _mac, + _map: () => _map, + _max: () => _lte2, + _maxLength: () => _maxLength2, + _maxSize: () => _maxSize, + _mime: () => _mime, + _min: () => _gte2, + _minLength: () => _minLength2, + _minSize: () => _minSize, + _multipleOf: () => _multipleOf2, + _nan: () => _nan, + _nanoid: () => _nanoid2, + _nativeEnum: () => _nativeEnum, + _negative: () => _negative, + _never: () => _never2, + _nonnegative: () => _nonnegative, + _nonoptional: () => _nonoptional, + _nonpositive: () => _nonpositive, + _normalize: () => _normalize2, + _null: () => _null5, + _nullable: () => _nullable, + _number: () => _number2, + _optional: () => _optional, + _overwrite: () => _overwrite2, + _parse: () => _parse2, + _parseAsync: () => _parseAsync2, + _pipe: () => _pipe, + _positive: () => _positive, + _promise: () => _promise, + _property: () => _property, + _readonly: () => _readonly, + _record: () => _record, + _refine: () => _refine2, + _regex: () => _regex2, + _safeDecode: () => _safeDecode, + _safeDecodeAsync: () => _safeDecodeAsync, + _safeEncode: () => _safeEncode, + _safeEncodeAsync: () => _safeEncodeAsync, + _safeParse: () => _safeParse2, + _safeParseAsync: () => _safeParseAsync2, + _set: () => _set, + _size: () => _size, + _slugify: () => _slugify, + _startsWith: () => _startsWith2, + _string: () => _string2, + _stringFormat: () => _stringFormat, + _stringbool: () => _stringbool, + _success: () => _success, + _superRefine: () => _superRefine, + _symbol: () => _symbol, + _templateLiteral: () => _templateLiteral, + _toLowerCase: () => _toLowerCase2, + _toUpperCase: () => _toUpperCase2, + _transform: () => _transform, + _trim: () => _trim2, + _tuple: () => _tuple, + _uint32: () => _uint32, + _uint64: () => _uint64, + _ulid: () => _ulid2, + _undefined: () => _undefined2, + _union: () => _union, + _unknown: () => _unknown2, + _uppercase: () => _uppercase2, + _url: () => _url2, + _uuid: () => _uuid2, + _uuidv4: () => _uuidv42, + _uuidv6: () => _uuidv62, + _uuidv7: () => _uuidv72, + _void: () => _void, + _xid: () => _xid2, + _xor: () => _xor, + clone: () => clone2, + config: () => config2, + createStandardJSONSchemaMethod: () => createStandardJSONSchemaMethod, + createToJSONSchemaMethod: () => createToJSONSchemaMethod, + decode: () => decode, + decodeAsync: () => decodeAsync, + describe: () => describe, + encode: () => encode2, + encodeAsync: () => encodeAsync, + extractDefs: () => extractDefs, + finalize: () => finalize, + flattenError: () => flattenError2, + formatError: () => formatError2, + globalConfig: () => globalConfig2, + globalRegistry: () => globalRegistry2, + initializeContext: () => initializeContext, + isValidBase64: () => isValidBase642, + isValidBase64URL: () => isValidBase64URL2, + isValidJWT: () => isValidJWT4, + locales: () => locales_exports, + meta: () => meta, + parse: () => parse2, + parseAsync: () => parseAsync, + prettifyError: () => prettifyError, + process: () => process2, + regexes: () => regexes_exports, + registry: () => registry3, + safeDecode: () => safeDecode, + safeDecodeAsync: () => safeDecodeAsync, + safeEncode: () => safeEncode, + safeEncodeAsync: () => safeEncodeAsync, + safeParse: () => safeParse4, + safeParseAsync: () => safeParseAsync2, + toDotPath: () => toDotPath, + toJSONSchema: () => toJSONSchema, + treeifyError: () => treeifyError, + util: () => util_exports, + version: () => version2 +}); +var init_core2 = __esm({ + "../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/core/index.js"() { + init_core(); + init_parse(); + init_errors2(); + init_schemas(); + init_checks(); + init_versions(); + init_util2(); + init_regexes(); + init_locales(); + init_registries(); + init_doc(); + init_api(); + init_to_json_schema(); + init_json_schema_processors(); + init_json_schema_generator(); + init_json_schema(); + } +}); + +// ../node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@4.3.5/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.25.1_zod@4.3.5/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) { + try { + return { + ...jsonSchema2, + ...JSON.parse(def.description) + }; + } catch { + } + } + return jsonSchema2; + }; + defaultOptions = { + name: void 0, + $refStrategy: "root", + basePath: ["#"], + effectStrategy: "input", + pipeStrategy: "all", + dateStrategy: "format:date-time", + mapStrategy: "entries", + removeAdditionalStrategy: "passthrough", + allowedAdditionalProperties: true, + rejectedAdditionalProperties: false, + definitionPath: "definitions", + target: "jsonSchema7", + strictUnions: false, + definitions: {}, + errorMessages: false, + markdownDescription: false, + patternStrategy: "escape", + applyRegexFlags: false, + emailStrategy: "format:email", + base64Strategy: "contentEncoding:base64", + nameStrategy: "ref", + openAiAnyTypeName: "OpenAiAnyType" + }; + getDefaultOptions = (options) => typeof options === "string" ? { + ...defaultOptions, + name: options + } : { + ...defaultOptions, + ...options + }; + } +}); + +// ../node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@4.3.5/node_modules/zod-to-json-schema/dist/esm/Refs.js +var getRefs; +var init_Refs = __esm({ + "../node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@4.3.5/node_modules/zod-to-json-schema/dist/esm/Refs.js"() { + init_Options(); + getRefs = (options) => { + const _options = getDefaultOptions(options); + const currentPath = _options.name !== void 0 ? [..._options.basePath, _options.definitionPath, _options.name] : _options.basePath; + return { + ..._options, + flags: { hasReferencedOpenAiAnyType: false }, + currentPath, + propertyPath: void 0, + seen: new Map(Object.entries(_options.definitions).map(([name, def]) => [ + def._def, + { + def: def._def, + path: [..._options.basePath, _options.definitionPath, name], + // Resolution of references will be forced even though seen, so it's ok that the schema is undefined here for now. + jsonSchema: void 0 + } + ])) + }; + }; + } +}); + +// ../node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@4.3.5/node_modules/zod-to-json-schema/dist/esm/errorMessages.js +function addErrorMessage(res, key, errorMessage, refs) { + if (!refs?.errorMessages) + return; + if (errorMessage) { + res.errorMessage = { + ...res.errorMessage, + [key]: errorMessage + }; + } +} +function setResponseValueAndErrors(res, key, value2, errorMessage, refs) { + res[key] = value2; + addErrorMessage(res, key, errorMessage, refs); +} +var init_errorMessages = __esm({ + "../node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@4.3.5/node_modules/zod-to-json-schema/dist/esm/errorMessages.js"() { + } +}); + +// ../node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@4.3.5/node_modules/zod-to-json-schema/dist/esm/getRelativePath.js +var getRelativePath; +var init_getRelativePath = __esm({ + "../node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@4.3.5/node_modules/zod-to-json-schema/dist/esm/getRelativePath.js"() { + getRelativePath = (pathA, pathB) => { + let i = 0; + for (; i < pathA.length && i < pathB.length; i++) { + if (pathA[i] !== pathB[i]) + break; + } + return [(pathA.length - i).toString(), ...pathB.slice(i)].join("/"); + }; + } +}); + +// ../node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@4.3.5/node_modules/zod-to-json-schema/dist/esm/parsers/any.js +function parseAnyDef(refs) { + if (refs.target !== "openAi") { + return {}; + } + const anyDefinitionPath = [ + ...refs.basePath, + refs.definitionPath, + refs.openAiAnyTypeName + ]; + refs.flags.hasReferencedOpenAiAnyType = true; + return { + $ref: refs.$refStrategy === "relative" ? getRelativePath(anyDefinitionPath, refs.currentPath) : anyDefinitionPath.join("/") + }; +} +var init_any = __esm({ + "../node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@4.3.5/node_modules/zod-to-json-schema/dist/esm/parsers/any.js"() { + init_getRelativePath(); + } +}); + +// ../node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@4.3.5/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) { + res.items = parseDef(def.type._def, { + ...refs, + currentPath: [...refs.currentPath, "items"] + }); + } + if (def.minLength) { + setResponseValueAndErrors(res, "minItems", def.minLength.value, def.minLength.message, refs); + } + if (def.maxLength) { + setResponseValueAndErrors(res, "maxItems", def.maxLength.value, def.maxLength.message, refs); + } + if (def.exactLength) { + setResponseValueAndErrors(res, "minItems", def.exactLength.value, def.exactLength.message, refs); + setResponseValueAndErrors(res, "maxItems", def.exactLength.value, def.exactLength.message, refs); + } + return res; +} +var init_array = __esm({ + "../node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@4.3.5/node_modules/zod-to-json-schema/dist/esm/parsers/array.js"() { + init_v3(); + init_errorMessages(); + init_parseDef(); + } +}); + +// ../node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@4.3.5/node_modules/zod-to-json-schema/dist/esm/parsers/bigint.js +function parseBigintDef(def, refs) { + const res = { + type: "integer", + format: "int64" + }; + if (!def.checks) + return res; + for (const check4 of def.checks) { + switch (check4.kind) { + case "min": + if (refs.target === "jsonSchema7") { + if (check4.inclusive) { + setResponseValueAndErrors(res, "minimum", check4.value, check4.message, refs); + } else { + setResponseValueAndErrors(res, "exclusiveMinimum", check4.value, check4.message, refs); + } + } else { + if (!check4.inclusive) { + res.exclusiveMinimum = true; + } + setResponseValueAndErrors(res, "minimum", check4.value, check4.message, refs); + } + break; + case "max": + if (refs.target === "jsonSchema7") { + if (check4.inclusive) { + setResponseValueAndErrors(res, "maximum", check4.value, check4.message, refs); + } else { + setResponseValueAndErrors(res, "exclusiveMaximum", check4.value, check4.message, refs); + } + } else { + if (!check4.inclusive) { + res.exclusiveMaximum = true; + } + setResponseValueAndErrors(res, "maximum", check4.value, check4.message, refs); + } + break; + case "multipleOf": + setResponseValueAndErrors(res, "multipleOf", check4.value, check4.message, refs); + break; + } + } + return res; +} +var init_bigint = __esm({ + "../node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@4.3.5/node_modules/zod-to-json-schema/dist/esm/parsers/bigint.js"() { + init_errorMessages(); + } +}); + +// ../node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@4.3.5/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.25.1_zod@4.3.5/node_modules/zod-to-json-schema/dist/esm/parsers/boolean.js"() { + } +}); + +// ../node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@4.3.5/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.25.1_zod@4.3.5/node_modules/zod-to-json-schema/dist/esm/parsers/branded.js"() { + init_parseDef(); + } +}); + +// ../node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@4.3.5/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.25.1_zod@4.3.5/node_modules/zod-to-json-schema/dist/esm/parsers/catch.js"() { + init_parseDef(); + parseCatchDef = (def, refs) => { + return parseDef(def.innerType._def, refs); + }; + } +}); + +// ../node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@4.3.5/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)) { + return { + anyOf: strategy.map((item, i) => parseDateDef(def, refs, item)) + }; + } + switch (strategy) { + case "string": + case "format:date-time": + return { + type: "string", + format: "date-time" + }; + case "format:date": + return { + type: "string", + format: "date" + }; + case "integer": + return integerDateParser(def, refs); + } +} +var integerDateParser; +var init_date = __esm({ + "../node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@4.3.5/node_modules/zod-to-json-schema/dist/esm/parsers/date.js"() { + init_errorMessages(); + integerDateParser = (def, refs) => { + const res = { + type: "integer", + format: "unix-time" + }; + if (refs.target === "openApi3") { + return res; + } + for (const check4 of def.checks) { + switch (check4.kind) { + case "min": + setResponseValueAndErrors( + res, + "minimum", + check4.value, + // This is in milliseconds + check4.message, + refs + ); + break; + case "max": + setResponseValueAndErrors( + res, + "maximum", + check4.value, + // This is in milliseconds + check4.message, + refs + ); + break; + } + } + return res; + }; + } +}); + +// ../node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@4.3.5/node_modules/zod-to-json-schema/dist/esm/parsers/default.js +function parseDefaultDef(_def, refs) { + return { + ...parseDef(_def.innerType._def, refs), + default: _def.defaultValue() + }; +} +var init_default = __esm({ + "../node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@4.3.5/node_modules/zod-to-json-schema/dist/esm/parsers/default.js"() { + init_parseDef(); + } +}); + +// ../node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@4.3.5/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.25.1_zod@4.3.5/node_modules/zod-to-json-schema/dist/esm/parsers/effects.js"() { + init_parseDef(); + init_any(); + } +}); + +// ../node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@4.3.5/node_modules/zod-to-json-schema/dist/esm/parsers/enum.js +function parseEnumDef(def) { + return { + type: "string", + enum: Array.from(def.values) + }; +} +var init_enum = __esm({ + "../node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@4.3.5/node_modules/zod-to-json-schema/dist/esm/parsers/enum.js"() { + } +}); + +// ../node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@4.3.5/node_modules/zod-to-json-schema/dist/esm/parsers/intersection.js +function parseIntersectionDef(def, refs) { + const allOf = [ + parseDef(def.left._def, { + ...refs, + currentPath: [...refs.currentPath, "allOf", "0"] + }), + parseDef(def.right._def, { + ...refs, + currentPath: [...refs.currentPath, "allOf", "1"] + }) + ].filter((x) => !!x); + let unevaluatedProperties = refs.target === "jsonSchema2019-09" ? { unevaluatedProperties: false } : void 0; + const mergedAllOf = []; + allOf.forEach((schema2) => { + if (isJsonSchema7AllOfType(schema2)) { + mergedAllOf.push(...schema2.allOf); + if (schema2.unevaluatedProperties === void 0) { + unevaluatedProperties = void 0; + } + } else { + let nestedSchema = schema2; + if ("additionalProperties" in schema2 && schema2.additionalProperties === false) { + const { additionalProperties, ...rest } = schema2; + nestedSchema = rest; + } else { + unevaluatedProperties = void 0; + } + mergedAllOf.push(nestedSchema); + } + }); + return mergedAllOf.length ? { + allOf: mergedAllOf, + ...unevaluatedProperties + } : void 0; +} +var isJsonSchema7AllOfType; +var init_intersection = __esm({ + "../node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@4.3.5/node_modules/zod-to-json-schema/dist/esm/parsers/intersection.js"() { + init_parseDef(); + isJsonSchema7AllOfType = (type2) => { + if ("type" in type2 && type2.type === "string") + return false; + return "allOf" in type2; + }; + } +}); + +// ../node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@4.3.5/node_modules/zod-to-json-schema/dist/esm/parsers/literal.js +function parseLiteralDef(def, refs) { + const parsedType3 = typeof def.value; + if (parsedType3 !== "bigint" && parsedType3 !== "number" && parsedType3 !== "boolean" && parsedType3 !== "string") { + return { + type: Array.isArray(def.value) ? "array" : "object" + }; + } + if (refs.target === "openApi3") { + return { + type: parsedType3 === "bigint" ? "integer" : parsedType3, + enum: [def.value] + }; + } + return { + type: parsedType3 === "bigint" ? "integer" : parsedType3, + const: def.value + }; +} +var init_literal = __esm({ + "../node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@4.3.5/node_modules/zod-to-json-schema/dist/esm/parsers/literal.js"() { + } +}); + +// ../node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@4.3.5/node_modules/zod-to-json-schema/dist/esm/parsers/string.js +function parseStringDef(def, refs) { + const res = { + type: "string" + }; + if (def.checks) { + for (const check4 of def.checks) { + switch (check4.kind) { + case "min": + setResponseValueAndErrors(res, "minLength", typeof res.minLength === "number" ? Math.max(res.minLength, check4.value) : check4.value, check4.message, refs); + break; + case "max": + setResponseValueAndErrors(res, "maxLength", typeof res.maxLength === "number" ? Math.min(res.maxLength, check4.value) : check4.value, check4.message, refs); + break; + case "email": + switch (refs.emailStrategy) { + case "format:email": + addFormat(res, "email", check4.message, refs); + break; + case "format:idn-email": + addFormat(res, "idn-email", check4.message, refs); + break; + case "pattern:zod": + addPattern(res, zodPatterns.email, check4.message, refs); + break; + } + break; + case "url": + addFormat(res, "uri", check4.message, refs); + break; + case "uuid": + addFormat(res, "uuid", check4.message, refs); + break; + case "regex": + addPattern(res, check4.regex, check4.message, refs); + break; + case "cuid": + addPattern(res, zodPatterns.cuid, check4.message, refs); + break; + case "cuid2": + addPattern(res, zodPatterns.cuid2, check4.message, refs); + break; + case "startsWith": + addPattern(res, RegExp(`^${escapeLiteralCheckValue(check4.value, refs)}`), check4.message, refs); + break; + case "endsWith": + addPattern(res, RegExp(`${escapeLiteralCheckValue(check4.value, refs)}$`), check4.message, refs); + break; + case "datetime": + addFormat(res, "date-time", check4.message, refs); + break; + case "date": + addFormat(res, "date", check4.message, refs); + break; + case "time": + addFormat(res, "time", check4.message, refs); + break; + case "duration": + addFormat(res, "duration", check4.message, refs); + break; + case "length": + setResponseValueAndErrors(res, "minLength", typeof res.minLength === "number" ? Math.max(res.minLength, check4.value) : check4.value, check4.message, refs); + setResponseValueAndErrors(res, "maxLength", typeof res.maxLength === "number" ? Math.min(res.maxLength, check4.value) : check4.value, check4.message, refs); + break; + case "includes": { + addPattern(res, RegExp(escapeLiteralCheckValue(check4.value, refs)), check4.message, refs); + break; + } + case "ip": { + if (check4.version !== "v6") { + addFormat(res, "ipv4", check4.message, refs); + } + if (check4.version !== "v4") { + addFormat(res, "ipv6", check4.message, refs); + } + break; + } + case "base64url": + addPattern(res, zodPatterns.base64url, check4.message, refs); + break; + case "jwt": + addPattern(res, zodPatterns.jwt, check4.message, refs); + break; + case "cidr": { + if (check4.version !== "v6") { + addPattern(res, zodPatterns.ipv4Cidr, check4.message, refs); + } + if (check4.version !== "v4") { + addPattern(res, zodPatterns.ipv6Cidr, check4.message, refs); + } + break; + } + case "emoji": + addPattern(res, zodPatterns.emoji(), check4.message, refs); + break; + case "ulid": { + addPattern(res, zodPatterns.ulid, check4.message, refs); + break; + } + case "base64": { + switch (refs.base64Strategy) { + case "format:binary": { + addFormat(res, "binary", check4.message, refs); break; } - var baseMinusT = base - t; - if (w > floor(maxInt / baseMinusT)) { - error$1("overflow"); + case "contentEncoding:base64": { + setResponseValueAndErrors(res, "contentEncoding", "base64", check4.message, refs); + break; + } + case "pattern:zod": { + addPattern(res, zodPatterns.base64, check4.message, refs); + break; } - w *= baseMinusT; } - var out = output.length + 1; - bias = adapt(i - oldi, out, oldi == 0); - if (floor(i / out) > maxInt - n) { - error$1("overflow"); - } - n += floor(i / out); - i %= out; - output.splice(i++, 0, n); + break; } - return String.fromCodePoint.apply(String, output); - }; - var encode2 = function encode3(input) { - var output = []; - input = ucs2decode(input); - var inputLength = input.length; - var n = initialN; - var delta = 0; - var bias = initialBias; - var _iteratorNormalCompletion = true; - var _didIteratorError = false; - var _iteratorError = void 0; - try { - for (var _iterator = input[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { - var _currentValue2 = _step.value; - if (_currentValue2 < 128) { - output.push(stringFromCharCode(_currentValue2)); - } - } - } catch (err) { - _didIteratorError = true; - _iteratorError = err; - } finally { - try { - if (!_iteratorNormalCompletion && _iterator.return) { - _iterator.return(); - } - } finally { - if (_didIteratorError) { - throw _iteratorError; - } - } + case "nanoid": { + addPattern(res, zodPatterns.nanoid, check4.message, refs); } - var basicLength = output.length; - var handledCPCount = basicLength; - if (basicLength) { - output.push(delimiter); - } - while (handledCPCount < inputLength) { - var m = maxInt; - var _iteratorNormalCompletion2 = true; - var _didIteratorError2 = false; - var _iteratorError2 = void 0; - try { - for (var _iterator2 = input[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) { - var currentValue = _step2.value; - if (currentValue >= n && currentValue < m) { - m = currentValue; - } - } - } catch (err) { - _didIteratorError2 = true; - _iteratorError2 = err; - } finally { - try { - if (!_iteratorNormalCompletion2 && _iterator2.return) { - _iterator2.return(); - } - } finally { - if (_didIteratorError2) { - throw _iteratorError2; - } - } - } - var handledCPCountPlusOne = handledCPCount + 1; - if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) { - error$1("overflow"); - } - delta += (m - n) * handledCPCountPlusOne; - n = m; - var _iteratorNormalCompletion3 = true; - var _didIteratorError3 = false; - var _iteratorError3 = void 0; - try { - for (var _iterator3 = input[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) { - var _currentValue = _step3.value; - if (_currentValue < n && ++delta > maxInt) { - error$1("overflow"); - } - if (_currentValue == n) { - var q = delta; - for ( - var k = base; - ; - /* no condition */ - k += base - ) { - var t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias; - if (q < t) { - break; - } - var qMinusT = q - t; - var baseMinusT = base - t; - output.push(stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))); - q = floor(qMinusT / baseMinusT); - } - output.push(stringFromCharCode(digitToBasic(q, 0))); - bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength); - delta = 0; - ++handledCPCount; - } - } - } catch (err) { - _didIteratorError3 = true; - _iteratorError3 = err; - } finally { - try { - if (!_iteratorNormalCompletion3 && _iterator3.return) { - _iterator3.return(); - } - } finally { - if (_didIteratorError3) { - throw _iteratorError3; - } - } - } - ++delta; - ++n; - } - return output.join(""); - }; - var toUnicode = function toUnicode2(input) { - return mapDomain(input, function(string3) { - return regexPunycode.test(string3) ? decode(string3.slice(4).toLowerCase()) : string3; - }); - }; - var toASCII = function toASCII2(input) { - return mapDomain(input, function(string3) { - return regexNonASCII.test(string3) ? "xn--" + encode2(string3) : string3; - }); - }; - var punycode = { - /** - * A string representing the current Punycode.js version number. - * @memberOf punycode - * @type String - */ - "version": "2.1.0", - /** - * An object of methods to convert from JavaScript's internal character - * representation (UCS-2) to Unicode code points, and back. - * @see - * @memberOf punycode - * @type Object - */ - "ucs2": { - "decode": ucs2decode, - "encode": ucs2encode - }, - "decode": decode, - "encode": encode2, - "toASCII": toASCII, - "toUnicode": toUnicode - }; - var SCHEMES = {}; - function pctEncChar(chr) { - var c = chr.charCodeAt(0); - var e = void 0; - if (c < 16) e = "%0" + c.toString(16).toUpperCase(); - else if (c < 128) e = "%" + c.toString(16).toUpperCase(); - else if (c < 2048) e = "%" + (c >> 6 | 192).toString(16).toUpperCase() + "%" + (c & 63 | 128).toString(16).toUpperCase(); - else e = "%" + (c >> 12 | 224).toString(16).toUpperCase() + "%" + (c >> 6 & 63 | 128).toString(16).toUpperCase() + "%" + (c & 63 | 128).toString(16).toUpperCase(); - return e; + case "toLowerCase": + case "toUpperCase": + case "trim": + break; + default: + /* @__PURE__ */ ((_) => { + })(check4); } - function pctDecChars(str) { - var newStr = ""; - var i = 0; - var il = str.length; - while (i < il) { - var c = parseInt(str.substr(i + 1, 2), 16); - if (c < 128) { - newStr += String.fromCharCode(c); - i += 3; - } else if (c >= 194 && c < 224) { - if (il - i >= 6) { - var c2 = parseInt(str.substr(i + 4, 2), 16); - newStr += String.fromCharCode((c & 31) << 6 | c2 & 63); - } else { - newStr += str.substr(i, 6); - } - i += 6; - } else if (c >= 224) { - if (il - i >= 9) { - var _c = parseInt(str.substr(i + 4, 2), 16); - var c3 = parseInt(str.substr(i + 7, 2), 16); - newStr += String.fromCharCode((c & 15) << 12 | (_c & 63) << 6 | c3 & 63); - } else { - newStr += str.substr(i, 9); - } - i += 9; - } else { - newStr += str.substr(i, 3); - i += 3; - } - } - return newStr; - } - function _normalizeComponentEncoding(components, protocol) { - function decodeUnreserved2(str) { - var decStr = pctDecChars(str); - return !decStr.match(protocol.UNRESERVED) ? str : decStr; - } - if (components.scheme) components.scheme = String(components.scheme).replace(protocol.PCT_ENCODED, decodeUnreserved2).toLowerCase().replace(protocol.NOT_SCHEME, ""); - if (components.userinfo !== void 0) components.userinfo = String(components.userinfo).replace(protocol.PCT_ENCODED, decodeUnreserved2).replace(protocol.NOT_USERINFO, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); - if (components.host !== void 0) components.host = String(components.host).replace(protocol.PCT_ENCODED, decodeUnreserved2).toLowerCase().replace(protocol.NOT_HOST, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); - if (components.path !== void 0) components.path = String(components.path).replace(protocol.PCT_ENCODED, decodeUnreserved2).replace(components.scheme ? protocol.NOT_PATH : protocol.NOT_PATH_NOSCHEME, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); - if (components.query !== void 0) components.query = String(components.query).replace(protocol.PCT_ENCODED, decodeUnreserved2).replace(protocol.NOT_QUERY, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); - if (components.fragment !== void 0) components.fragment = String(components.fragment).replace(protocol.PCT_ENCODED, decodeUnreserved2).replace(protocol.NOT_FRAGMENT, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); - return components; - } - function _stripLeadingZeros(str) { - return str.replace(/^0*(.*)/, "$1") || "0"; - } - function _normalizeIPv4(host, protocol) { - var matches = host.match(protocol.IPV4ADDRESS) || []; - var _matches = slicedToArray(matches, 2), address = _matches[1]; - if (address) { - return address.split(".").map(_stripLeadingZeros).join("."); - } else { - return host; - } - } - function _normalizeIPv6(host, protocol) { - var matches = host.match(protocol.IPV6ADDRESS) || []; - var _matches2 = slicedToArray(matches, 3), address = _matches2[1], zone = _matches2[2]; - if (address) { - var _address$toLowerCase$ = address.toLowerCase().split("::").reverse(), _address$toLowerCase$2 = slicedToArray(_address$toLowerCase$, 2), last = _address$toLowerCase$2[0], first = _address$toLowerCase$2[1]; - var firstFields = first ? first.split(":").map(_stripLeadingZeros) : []; - var lastFields = last.split(":").map(_stripLeadingZeros); - var isLastFieldIPv4Address = protocol.IPV4ADDRESS.test(lastFields[lastFields.length - 1]); - var fieldCount = isLastFieldIPv4Address ? 7 : 8; - var lastFieldsStart = lastFields.length - fieldCount; - var fields = Array(fieldCount); - for (var x = 0; x < fieldCount; ++x) { - fields[x] = firstFields[x] || lastFields[lastFieldsStart + x] || ""; - } - if (isLastFieldIPv4Address) { - fields[fieldCount - 1] = _normalizeIPv4(fields[fieldCount - 1], protocol); - } - var allZeroFields = fields.reduce(function(acc, field, index) { - if (!field || field === "0") { - var lastLongest = acc[acc.length - 1]; - if (lastLongest && lastLongest.index + lastLongest.length === index) { - lastLongest.length++; - } else { - acc.push({ index, length: 1 }); - } - } - return acc; - }, []); - var longestZeroFields = allZeroFields.sort(function(a, b) { - return b.length - a.length; - })[0]; - var newHost = void 0; - if (longestZeroFields && longestZeroFields.length > 1) { - var newFirst = fields.slice(0, longestZeroFields.index); - var newLast = fields.slice(longestZeroFields.index + longestZeroFields.length); - newHost = newFirst.join(":") + "::" + newLast.join(":"); - } else { - newHost = fields.join(":"); - } - if (zone) { - newHost += "%" + zone; - } - return newHost; - } else { - return host; - } - } - var URI_PARSE = /^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i; - var NO_MATCH_IS_UNDEFINED = "".match(/(){0}/)[1] === void 0; - function parse4(uriString) { - var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; - var components = {}; - var protocol = options.iri !== false ? IRI_PROTOCOL : URI_PROTOCOL; - if (options.reference === "suffix") uriString = (options.scheme ? options.scheme + ":" : "") + "//" + uriString; - var matches = uriString.match(URI_PARSE); - if (matches) { - if (NO_MATCH_IS_UNDEFINED) { - components.scheme = matches[1]; - components.userinfo = matches[3]; - components.host = matches[4]; - components.port = parseInt(matches[5], 10); - components.path = matches[6] || ""; - components.query = matches[7]; - components.fragment = matches[8]; - if (isNaN(components.port)) { - components.port = matches[5]; - } - } else { - components.scheme = matches[1] || void 0; - components.userinfo = uriString.indexOf("@") !== -1 ? matches[3] : void 0; - components.host = uriString.indexOf("//") !== -1 ? matches[4] : void 0; - components.port = parseInt(matches[5], 10); - components.path = matches[6] || ""; - components.query = uriString.indexOf("?") !== -1 ? matches[7] : void 0; - components.fragment = uriString.indexOf("#") !== -1 ? matches[8] : void 0; - if (isNaN(components.port)) { - components.port = uriString.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/) ? matches[4] : void 0; - } - } - if (components.host) { - components.host = _normalizeIPv6(_normalizeIPv4(components.host, protocol), protocol); - } - if (components.scheme === void 0 && components.userinfo === void 0 && components.host === void 0 && components.port === void 0 && !components.path && components.query === void 0) { - components.reference = "same-document"; - } else if (components.scheme === void 0) { - components.reference = "relative"; - } else if (components.fragment === void 0) { - components.reference = "absolute"; - } else { - components.reference = "uri"; - } - if (options.reference && options.reference !== "suffix" && options.reference !== components.reference) { - components.error = components.error || "URI is not a " + options.reference + " reference."; - } - var schemeHandler = SCHEMES[(options.scheme || components.scheme || "").toLowerCase()]; - if (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport)) { - if (components.host && (options.domainHost || schemeHandler && schemeHandler.domainHost)) { - try { - components.host = punycode.toASCII(components.host.replace(protocol.PCT_ENCODED, pctDecChars).toLowerCase()); - } catch (e) { - components.error = components.error || "Host's domain name can not be converted to ASCII via punycode: " + e; - } - } - _normalizeComponentEncoding(components, URI_PROTOCOL); - } else { - _normalizeComponentEncoding(components, protocol); - } - if (schemeHandler && schemeHandler.parse) { - schemeHandler.parse(components, options); - } - } else { - components.error = components.error || "URI can not be parsed."; - } - return components; - } - function _recomposeAuthority(components, options) { - var protocol = options.iri !== false ? IRI_PROTOCOL : URI_PROTOCOL; - var uriTokens = []; - if (components.userinfo !== void 0) { - uriTokens.push(components.userinfo); - uriTokens.push("@"); - } - if (components.host !== void 0) { - uriTokens.push(_normalizeIPv6(_normalizeIPv4(String(components.host), protocol), protocol).replace(protocol.IPV6ADDRESS, function(_, $1, $2) { - return "[" + $1 + ($2 ? "%25" + $2 : "") + "]"; - })); - } - if (typeof components.port === "number" || typeof components.port === "string") { - uriTokens.push(":"); - uriTokens.push(String(components.port)); - } - return uriTokens.length ? uriTokens.join("") : void 0; - } - var RDS1 = /^\.\.?\//; - var RDS2 = /^\/\.(\/|$)/; - var RDS3 = /^\/\.\.(\/|$)/; - var RDS5 = /^\/?(?:.|\n)*?(?=\/|$)/; - function removeDotSegments(input) { - var output = []; - while (input.length) { - if (input.match(RDS1)) { - input = input.replace(RDS1, ""); - } else if (input.match(RDS2)) { - input = input.replace(RDS2, "/"); - } else if (input.match(RDS3)) { - input = input.replace(RDS3, "/"); - output.pop(); - } else if (input === "." || input === "..") { - input = ""; - } else { - var im = input.match(RDS5); - if (im) { - var s = im[0]; - input = input.slice(s.length); - output.push(s); - } else { - throw new Error("Unexpected dot segment condition"); - } - } - } - return output.join(""); - } - function serialize(components) { - var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; - var protocol = options.iri ? IRI_PROTOCOL : URI_PROTOCOL; - var uriTokens = []; - var schemeHandler = SCHEMES[(options.scheme || components.scheme || "").toLowerCase()]; - if (schemeHandler && schemeHandler.serialize) schemeHandler.serialize(components, options); - if (components.host) { - if (protocol.IPV6ADDRESS.test(components.host)) { - } else if (options.domainHost || schemeHandler && schemeHandler.domainHost) { - try { - components.host = !options.iri ? punycode.toASCII(components.host.replace(protocol.PCT_ENCODED, pctDecChars).toLowerCase()) : punycode.toUnicode(components.host); - } catch (e) { - components.error = components.error || "Host's domain name can not be converted to " + (!options.iri ? "ASCII" : "Unicode") + " via punycode: " + e; - } - } - } - _normalizeComponentEncoding(components, protocol); - if (options.reference !== "suffix" && components.scheme) { - uriTokens.push(components.scheme); - uriTokens.push(":"); - } - var authority = _recomposeAuthority(components, options); - if (authority !== void 0) { - if (options.reference !== "suffix") { - uriTokens.push("//"); - } - uriTokens.push(authority); - if (components.path && components.path.charAt(0) !== "/") { - uriTokens.push("/"); - } - } - if (components.path !== void 0) { - var s = components.path; - if (!options.absolutePath && (!schemeHandler || !schemeHandler.absolutePath)) { - s = removeDotSegments(s); - } - if (authority === void 0) { - s = s.replace(/^\/\//, "/%2F"); - } - uriTokens.push(s); - } - if (components.query !== void 0) { - uriTokens.push("?"); - uriTokens.push(components.query); - } - if (components.fragment !== void 0) { - uriTokens.push("#"); - uriTokens.push(components.fragment); - } - return uriTokens.join(""); - } - function resolveComponents(base2, relative) { - var options = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}; - var skipNormalization = arguments[3]; - var target = {}; - if (!skipNormalization) { - base2 = parse4(serialize(base2, options), options); - relative = parse4(serialize(relative, options), options); - } - options = options || {}; - if (!options.tolerant && relative.scheme) { - target.scheme = relative.scheme; - target.userinfo = relative.userinfo; - target.host = relative.host; - target.port = relative.port; - target.path = removeDotSegments(relative.path || ""); - target.query = relative.query; - } else { - if (relative.userinfo !== void 0 || relative.host !== void 0 || relative.port !== void 0) { - target.userinfo = relative.userinfo; - target.host = relative.host; - target.port = relative.port; - target.path = removeDotSegments(relative.path || ""); - target.query = relative.query; - } else { - if (!relative.path) { - target.path = base2.path; - if (relative.query !== void 0) { - target.query = relative.query; - } else { - target.query = base2.query; - } - } else { - if (relative.path.charAt(0) === "/") { - target.path = removeDotSegments(relative.path); - } else { - if ((base2.userinfo !== void 0 || base2.host !== void 0 || base2.port !== void 0) && !base2.path) { - target.path = "/" + relative.path; - } else if (!base2.path) { - target.path = relative.path; - } else { - target.path = base2.path.slice(0, base2.path.lastIndexOf("/") + 1) + relative.path; - } - target.path = removeDotSegments(target.path); - } - target.query = relative.query; - } - target.userinfo = base2.userinfo; - target.host = base2.host; - target.port = base2.port; - } - target.scheme = base2.scheme; - } - target.fragment = relative.fragment; - return target; - } - function resolve(baseURI, relativeURI, options) { - var schemelessOptions = assign({ scheme: "null" }, options); - return serialize(resolveComponents(parse4(baseURI, schemelessOptions), parse4(relativeURI, schemelessOptions), schemelessOptions, true), schemelessOptions); - } - function normalize2(uri, options) { - if (typeof uri === "string") { - uri = serialize(parse4(uri, options), options); - } else if (typeOf(uri) === "object") { - uri = parse4(serialize(uri, options), options); - } - return uri; - } - function equal(uriA, uriB, options) { - if (typeof uriA === "string") { - uriA = serialize(parse4(uriA, options), options); - } else if (typeOf(uriA) === "object") { - uriA = serialize(uriA, options); - } - if (typeof uriB === "string") { - uriB = serialize(parse4(uriB, options), options); - } else if (typeOf(uriB) === "object") { - uriB = serialize(uriB, options); - } - return uriA === uriB; - } - function escapeComponent(str, options) { - return str && str.toString().replace(!options || !options.iri ? URI_PROTOCOL.ESCAPE : IRI_PROTOCOL.ESCAPE, pctEncChar); - } - function unescapeComponent(str, options) { - return str && str.toString().replace(!options || !options.iri ? URI_PROTOCOL.PCT_ENCODED : IRI_PROTOCOL.PCT_ENCODED, pctDecChars); - } - var handler2 = { - scheme: "http", - domainHost: true, - parse: function parse5(components, options) { - if (!components.host) { - components.error = components.error || "HTTP URIs must have a host."; - } - return components; - }, - serialize: function serialize2(components, options) { - var secure = String(components.scheme).toLowerCase() === "https"; - if (components.port === (secure ? 443 : 80) || components.port === "") { - components.port = void 0; - } - if (!components.path) { - components.path = "/"; - } - return components; - } - }; - var handler$1 = { - scheme: "https", - domainHost: handler2.domainHost, - parse: handler2.parse, - serialize: handler2.serialize - }; - function isSecure(wsComponents) { - return typeof wsComponents.secure === "boolean" ? wsComponents.secure : String(wsComponents.scheme).toLowerCase() === "wss"; - } - var handler$2 = { - scheme: "ws", - domainHost: true, - parse: function parse5(components, options) { - var wsComponents = components; - wsComponents.secure = isSecure(wsComponents); - wsComponents.resourceName = (wsComponents.path || "/") + (wsComponents.query ? "?" + wsComponents.query : ""); - wsComponents.path = void 0; - wsComponents.query = void 0; - return wsComponents; - }, - serialize: function serialize2(wsComponents, options) { - if (wsComponents.port === (isSecure(wsComponents) ? 443 : 80) || wsComponents.port === "") { - wsComponents.port = void 0; - } - if (typeof wsComponents.secure === "boolean") { - wsComponents.scheme = wsComponents.secure ? "wss" : "ws"; - wsComponents.secure = void 0; - } - if (wsComponents.resourceName) { - var _wsComponents$resourc = wsComponents.resourceName.split("?"), _wsComponents$resourc2 = slicedToArray(_wsComponents$resourc, 2), path4 = _wsComponents$resourc2[0], query2 = _wsComponents$resourc2[1]; - wsComponents.path = path4 && path4 !== "/" ? path4 : void 0; - wsComponents.query = query2; - wsComponents.resourceName = void 0; - } - wsComponents.fragment = void 0; - return wsComponents; - } - }; - var handler$3 = { - scheme: "wss", - domainHost: handler$2.domainHost, - parse: handler$2.parse, - serialize: handler$2.serialize - }; - var O = {}; - var isIRI = true; - var UNRESERVED$$ = "[A-Za-z0-9\\-\\.\\_\\~" + (isIRI ? "\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF" : "") + "]"; - var HEXDIG$$ = "[0-9A-Fa-f]"; - var PCT_ENCODED$ = subexp(subexp("%[EFef]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%[89A-Fa-f]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%" + HEXDIG$$ + HEXDIG$$)); - var ATEXT$$ = "[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]"; - var QTEXT$$ = "[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]"; - var VCHAR$$ = merge3(QTEXT$$, '[\\"\\\\]'); - var SOME_DELIMS$$ = "[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"; - var UNRESERVED = new RegExp(UNRESERVED$$, "g"); - var PCT_ENCODED = new RegExp(PCT_ENCODED$, "g"); - var NOT_LOCAL_PART = new RegExp(merge3("[^]", ATEXT$$, "[\\.]", '[\\"]', VCHAR$$), "g"); - var NOT_HFNAME = new RegExp(merge3("[^]", UNRESERVED$$, SOME_DELIMS$$), "g"); - var NOT_HFVALUE = NOT_HFNAME; - function decodeUnreserved(str) { - var decStr = pctDecChars(str); - return !decStr.match(UNRESERVED) ? str : decStr; - } - var handler$4 = { - scheme: "mailto", - parse: function parse$$1(components, options) { - var mailtoComponents = components; - var to = mailtoComponents.to = mailtoComponents.path ? mailtoComponents.path.split(",") : []; - mailtoComponents.path = void 0; - if (mailtoComponents.query) { - var unknownHeaders = false; - var headers = {}; - var hfields = mailtoComponents.query.split("&"); - for (var x = 0, xl = hfields.length; x < xl; ++x) { - var hfield = hfields[x].split("="); - switch (hfield[0]) { - case "to": - var toAddrs = hfield[1].split(","); - for (var _x = 0, _xl = toAddrs.length; _x < _xl; ++_x) { - to.push(toAddrs[_x]); - } - break; - case "subject": - mailtoComponents.subject = unescapeComponent(hfield[1], options); - break; - case "body": - mailtoComponents.body = unescapeComponent(hfield[1], options); - break; - default: - unknownHeaders = true; - headers[unescapeComponent(hfield[0], options)] = unescapeComponent(hfield[1], options); - break; - } - } - if (unknownHeaders) mailtoComponents.headers = headers; - } - mailtoComponents.query = void 0; - for (var _x2 = 0, _xl2 = to.length; _x2 < _xl2; ++_x2) { - var addr = to[_x2].split("@"); - addr[0] = unescapeComponent(addr[0]); - if (!options.unicodeSupport) { - try { - addr[1] = punycode.toASCII(unescapeComponent(addr[1], options).toLowerCase()); - } catch (e) { - mailtoComponents.error = mailtoComponents.error || "Email address's domain name can not be converted to ASCII via punycode: " + e; - } - } else { - addr[1] = unescapeComponent(addr[1], options).toLowerCase(); - } - to[_x2] = addr.join("@"); - } - return mailtoComponents; - }, - serialize: function serialize$$1(mailtoComponents, options) { - var components = mailtoComponents; - var to = toArray(mailtoComponents.to); - if (to) { - for (var x = 0, xl = to.length; x < xl; ++x) { - var toAddr = String(to[x]); - var atIdx = toAddr.lastIndexOf("@"); - var localPart = toAddr.slice(0, atIdx).replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_LOCAL_PART, pctEncChar); - var domain2 = toAddr.slice(atIdx + 1); - try { - domain2 = !options.iri ? punycode.toASCII(unescapeComponent(domain2, options).toLowerCase()) : punycode.toUnicode(domain2); - } catch (e) { - components.error = components.error || "Email address's domain name can not be converted to " + (!options.iri ? "ASCII" : "Unicode") + " via punycode: " + e; - } - to[x] = localPart + "@" + domain2; - } - components.path = to.join(","); - } - var headers = mailtoComponents.headers = mailtoComponents.headers || {}; - if (mailtoComponents.subject) headers["subject"] = mailtoComponents.subject; - if (mailtoComponents.body) headers["body"] = mailtoComponents.body; - var fields = []; - for (var name in headers) { - if (headers[name] !== O[name]) { - fields.push(name.replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_HFNAME, pctEncChar) + "=" + headers[name].replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_HFVALUE, pctEncChar)); - } - } - if (fields.length) { - components.query = fields.join("&"); - } - return components; - } - }; - var URN_PARSE = /^([^\:]+)\:(.*)/; - var handler$5 = { - scheme: "urn", - parse: function parse$$1(components, options) { - var matches = components.path && components.path.match(URN_PARSE); - var urnComponents = components; - if (matches) { - var scheme = options.scheme || urnComponents.scheme || "urn"; - var nid = matches[1].toLowerCase(); - var nss = matches[2]; - var urnScheme = scheme + ":" + (options.nid || nid); - var schemeHandler = SCHEMES[urnScheme]; - urnComponents.nid = nid; - urnComponents.nss = nss; - urnComponents.path = void 0; - if (schemeHandler) { - urnComponents = schemeHandler.parse(urnComponents, options); - } - } else { - urnComponents.error = urnComponents.error || "URN can not be parsed."; - } - return urnComponents; - }, - serialize: function serialize$$1(urnComponents, options) { - var scheme = options.scheme || urnComponents.scheme || "urn"; - var nid = urnComponents.nid; - var urnScheme = scheme + ":" + (options.nid || nid); - var schemeHandler = SCHEMES[urnScheme]; - if (schemeHandler) { - urnComponents = schemeHandler.serialize(urnComponents, options); - } - var uriComponents = urnComponents; - var nss = urnComponents.nss; - uriComponents.path = (nid || options.nid) + ":" + nss; - return uriComponents; - } - }; - 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) { - var uuidComponents = urnComponents; - uuidComponents.uuid = uuidComponents.nss; - uuidComponents.nss = void 0; - if (!options.tolerant && (!uuidComponents.uuid || !uuidComponents.uuid.match(UUID))) { - uuidComponents.error = uuidComponents.error || "UUID is not valid."; - } - return uuidComponents; - }, - serialize: function serialize2(uuidComponents, options) { - var urnComponents = uuidComponents; - urnComponents.nss = (uuidComponents.uuid || "").toLowerCase(); - return urnComponents; - } - }; - SCHEMES[handler2.scheme] = handler2; - SCHEMES[handler$1.scheme] = handler$1; - SCHEMES[handler$2.scheme] = handler$2; - SCHEMES[handler$3.scheme] = handler$3; - SCHEMES[handler$4.scheme] = handler$4; - SCHEMES[handler$5.scheme] = handler$5; - SCHEMES[handler$6.scheme] = handler$6; - exports2.SCHEMES = SCHEMES; - exports2.pctEncChar = pctEncChar; - exports2.pctDecChars = pctDecChars; - exports2.parse = parse4; - exports2.removeDotSegments = removeDotSegments; - exports2.serialize = serialize; - exports2.resolveComponents = resolveComponents; - exports2.resolve = resolve; - exports2.normalize = normalize2; - exports2.equal = equal; - exports2.escapeComponent = escapeComponent; - exports2.unescapeComponent = unescapeComponent; - Object.defineProperty(exports2, "__esModule", { value: true }); - })); - } -}); - -// node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/compile/ucs2length.js -var require_ucs2length2 = __commonJS({ - "node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/compile/ucs2length.js"(exports, module) { - "use strict"; - module.exports = function ucs2length(str) { - var length = 0, len = str.length, pos = 0, value2; - while (pos < len) { - length++; - value2 = str.charCodeAt(pos++); - if (value2 >= 55296 && value2 <= 56319 && pos < len) { - value2 = str.charCodeAt(pos); - if ((value2 & 64512) == 56320) pos++; - } - } - return length; - }; - } -}); - -// node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/compile/util.js -var require_util9 = __commonJS({ - "node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/compile/util.js"(exports, module) { - "use strict"; - module.exports = { - copy, - checkDataType, - checkDataTypes, - coerceToTypes, - toHash, - getProperty, - escapeQuotes, - equal: require_fast_deep_equal2(), - ucs2length: require_ucs2length2(), - varOccurences, - varReplace, - schemaHasRules, - schemaHasRulesExcept, - schemaUnknownRules, - toQuotedString, - getPathExpr, - getPath, - getData, - unescapeFragment, - unescapeJsonPointer, - escapeFragment, - escapeJsonPointer - }; - function copy(o, to) { - to = to || {}; - for (var key in o) to[key] = o[key]; - return to; } - function checkDataType(dataType, data, strictNumbers, negate) { - var EQUAL = negate ? " !== " : " === ", AND = negate ? " || " : " && ", OK4 = negate ? "!" : "", NOT = negate ? "" : "!"; - switch (dataType) { - case "null": - return data + EQUAL + "null"; - case "array": - return OK4 + "Array.isArray(" + data + ")"; - case "object": - return "(" + OK4 + data + AND + "typeof " + data + EQUAL + '"object"' + AND + NOT + "Array.isArray(" + data + "))"; - case "integer": - return "(typeof " + data + EQUAL + '"number"' + AND + NOT + "(" + data + " % 1)" + AND + data + EQUAL + data + (strictNumbers ? AND + OK4 + "isFinite(" + data + ")" : "") + ")"; + } + return res; +} +function escapeLiteralCheckValue(literal4, refs) { + return refs.patternStrategy === "escape" ? escapeNonAlphaNumeric(literal4) : literal4; +} +function escapeNonAlphaNumeric(source) { + let result = ""; + for (let i = 0; i < source.length; i++) { + if (!ALPHA_NUMERIC2.has(source[i])) { + result += "\\"; + } + result += source[i]; + } + return result; +} +function addFormat(schema2, value2, message, refs) { + if (schema2.format || schema2.anyOf?.some((x) => x.format)) { + if (!schema2.anyOf) { + schema2.anyOf = []; + } + if (schema2.format) { + schema2.anyOf.push({ + format: schema2.format, + ...schema2.errorMessage && refs.errorMessages && { + errorMessage: { format: schema2.errorMessage.format } + } + }); + delete schema2.format; + if (schema2.errorMessage) { + delete schema2.errorMessage.format; + if (Object.keys(schema2.errorMessage).length === 0) { + delete schema2.errorMessage; + } + } + } + schema2.anyOf.push({ + format: value2, + ...message && refs.errorMessages && { errorMessage: { format: message } } + }); + } else { + setResponseValueAndErrors(schema2, "format", value2, message, refs); + } +} +function addPattern(schema2, regex4, message, refs) { + if (schema2.pattern || schema2.allOf?.some((x) => x.pattern)) { + if (!schema2.allOf) { + schema2.allOf = []; + } + if (schema2.pattern) { + schema2.allOf.push({ + pattern: schema2.pattern, + ...schema2.errorMessage && refs.errorMessages && { + errorMessage: { pattern: schema2.errorMessage.pattern } + } + }); + delete schema2.pattern; + if (schema2.errorMessage) { + delete schema2.errorMessage.pattern; + if (Object.keys(schema2.errorMessage).length === 0) { + delete schema2.errorMessage; + } + } + } + schema2.allOf.push({ + pattern: stringifyRegExpWithFlags(regex4, refs), + ...message && refs.errorMessages && { errorMessage: { pattern: message } } + }); + } else { + setResponseValueAndErrors(schema2, "pattern", stringifyRegExpWithFlags(regex4, refs), message, refs); + } +} +function stringifyRegExpWithFlags(regex4, refs) { + if (!refs.applyRegexFlags || !regex4.flags) { + return regex4.source; + } + const flags = { + i: regex4.flags.includes("i"), + m: regex4.flags.includes("m"), + s: regex4.flags.includes("s") + // `.` matches newlines + }; + const source = flags.i ? regex4.source.toLowerCase() : regex4.source; + let pattern = ""; + let isEscaped = false; + let inCharGroup = false; + let inCharRange = false; + for (let i = 0; i < source.length; i++) { + if (isEscaped) { + pattern += source[i]; + isEscaped = false; + continue; + } + if (flags.i) { + if (inCharGroup) { + if (source[i].match(/[a-z]/)) { + if (inCharRange) { + pattern += source[i]; + pattern += `${source[i - 2]}-${source[i]}`.toUpperCase(); + inCharRange = false; + } else if (source[i + 1] === "-" && source[i + 2]?.match(/[a-z]/)) { + pattern += source[i]; + inCharRange = true; + } else { + pattern += `${source[i]}${source[i].toUpperCase()}`; + } + continue; + } + } else if (source[i].match(/[a-z]/)) { + pattern += `[${source[i]}${source[i].toUpperCase()}]`; + continue; + } + } + if (flags.m) { + if (source[i] === "^") { + pattern += `(^|(?<=[\r +]))`; + continue; + } else if (source[i] === "$") { + pattern += `($|(?=[\r +]))`; + continue; + } + } + if (flags.s && source[i] === ".") { + pattern += inCharGroup ? `${source[i]}\r +` : `[${source[i]}\r +]`; + continue; + } + pattern += source[i]; + if (source[i] === "\\") { + isEscaped = true; + } else if (inCharGroup && source[i] === "]") { + inCharGroup = false; + } else if (!inCharGroup && source[i] === "[") { + inCharGroup = true; + } + } + try { + new RegExp(pattern); + } catch { + console.warn(`Could not convert regex pattern at ${refs.currentPath.join("/")} to a flag-independent form! Falling back to the flag-ignorant source`); + return regex4.source; + } + return pattern; +} +var emojiRegex3, zodPatterns, ALPHA_NUMERIC2; +var init_string = __esm({ + "../node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@4.3.5/node_modules/zod-to-json-schema/dist/esm/parsers/string.js"() { + init_errorMessages(); + emojiRegex3 = void 0; + zodPatterns = { + /** + * `c` was changed to `[cC]` to replicate /i flag + */ + cuid: /^[cC][^\s-]{8,}$/, + cuid2: /^[0-9a-z]+$/, + ulid: /^[0-9A-HJKMNP-TV-Z]{26}$/, + /** + * `a-z` was added to replicate /i flag + */ + email: /^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/, + /** + * Constructed a valid Unicode RegExp + * + * Lazily instantiate since this type of regex isn't supported + * in all envs (e.g. React Native). + * + * See: + * https://github.com/colinhacks/zod/issues/2433 + * Fix in Zod: + * https://github.com/colinhacks/zod/commit/9340fd51e48576a75adc919bff65dbc4a5d4c99b + */ + emoji: () => { + if (emojiRegex3 === void 0) { + emojiRegex3 = RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$", "u"); + } + return emojiRegex3; + }, + /** + * Unused + */ + uuid: /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/, + /** + * Unused + */ + ipv4: /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/, + ipv4Cidr: /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/, + /** + * Unused + */ + ipv6: /^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/, + ipv6Cidr: /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/, + base64: /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, + base64url: /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/, + nanoid: /^[a-zA-Z0-9_-]{21}$/, + jwt: /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/ + }; + ALPHA_NUMERIC2 = new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789"); + } +}); + +// ../node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@4.3.5/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) { + return { + type: "object", + required: def.keyType._def.values, + properties: def.keyType._def.values.reduce((acc, key) => ({ + ...acc, + [key]: parseDef(def.valueType._def, { + ...refs, + currentPath: [...refs.currentPath, "properties", key] + }) ?? parseAnyDef(refs) + }), {}), + additionalProperties: refs.rejectedAdditionalProperties + }; + } + const schema2 = { + type: "object", + additionalProperties: parseDef(def.valueType._def, { + ...refs, + currentPath: [...refs.currentPath, "additionalProperties"] + }) ?? refs.allowedAdditionalProperties + }; + if (refs.target === "openApi3") { + return schema2; + } + if (def.keyType?._def.typeName === ZodFirstPartyTypeKind2.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) { + 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) { + const { type: type2, ...keyType } = parseBrandedDef(def.keyType._def, refs); + return { + ...schema2, + propertyNames: keyType + }; + } + return schema2; +} +var init_record = __esm({ + "../node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@4.3.5/node_modules/zod-to-json-schema/dist/esm/parsers/record.js"() { + init_v3(); + init_parseDef(); + init_string(); + init_branded(); + init_any(); + } +}); + +// ../node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@4.3.5/node_modules/zod-to-json-schema/dist/esm/parsers/map.js +function parseMapDef(def, refs) { + if (refs.mapStrategy === "record") { + return parseRecordDef(def, refs); + } + const keys = parseDef(def.keyType._def, { + ...refs, + currentPath: [...refs.currentPath, "items", "items", "0"] + }) || parseAnyDef(refs); + const values = parseDef(def.valueType._def, { + ...refs, + currentPath: [...refs.currentPath, "items", "items", "1"] + }) || parseAnyDef(refs); + return { + type: "array", + maxItems: 125, + items: { + type: "array", + items: [keys, values], + minItems: 2, + maxItems: 2 + } + }; +} +var init_map = __esm({ + "../node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@4.3.5/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.25.1_zod@4.3.5/node_modules/zod-to-json-schema/dist/esm/parsers/nativeEnum.js +function parseNativeEnumDef(def) { + const object6 = def.values; + const actualKeys = Object.keys(def.values).filter((key) => { + return typeof object6[object6[key]] !== "number"; + }); + const actualValues = actualKeys.map((key) => object6[key]); + const parsedTypes = Array.from(new Set(actualValues.map((values) => typeof values))); + return { + type: parsedTypes.length === 1 ? parsedTypes[0] === "string" ? "string" : "number" : ["string", "number"], + enum: actualValues + }; +} +var init_nativeEnum = __esm({ + "../node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@4.3.5/node_modules/zod-to-json-schema/dist/esm/parsers/nativeEnum.js"() { + } +}); + +// ../node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@4.3.5/node_modules/zod-to-json-schema/dist/esm/parsers/never.js +function parseNeverDef(refs) { + return refs.target === "openAi" ? void 0 : { + not: parseAnyDef({ + ...refs, + currentPath: [...refs.currentPath, "not"] + }) + }; +} +var init_never = __esm({ + "../node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@4.3.5/node_modules/zod-to-json-schema/dist/esm/parsers/never.js"() { + init_any(); + } +}); + +// ../node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@4.3.5/node_modules/zod-to-json-schema/dist/esm/parsers/null.js +function parseNullDef(refs) { + return refs.target === "openApi3" ? { + enum: ["null"], + nullable: true + } : { + type: "null" + }; +} +var init_null = __esm({ + "../node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@4.3.5/node_modules/zod-to-json-schema/dist/esm/parsers/null.js"() { + } +}); + +// ../node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@4.3.5/node_modules/zod-to-json-schema/dist/esm/parsers/union.js +function parseUnionDef(def, refs) { + if (refs.target === "openApi3") + return asAnyOf(def, refs); + const options = def.options instanceof Map ? Array.from(def.options.values()) : def.options; + if (options.every((x) => x._def.typeName in primitiveMappings && (!x._def.checks || !x._def.checks.length))) { + const types = options.reduce((types2, x) => { + const type2 = primitiveMappings[x._def.typeName]; + return type2 && !types2.includes(type2) ? [...types2, type2] : types2; + }, []); + return { + type: types.length > 1 ? types : types[0] + }; + } else if (options.every((x) => x._def.typeName === "ZodLiteral" && !x.description)) { + const types = options.reduce((acc, x) => { + const type2 = typeof x._def.value; + switch (type2) { + case "string": case "number": - return "(typeof " + data + EQUAL + '"' + dataType + '"' + (strictNumbers ? AND + OK4 + "isFinite(" + data + ")" : "") + ")"; + case "boolean": + return [...acc, type2]; + case "bigint": + return [...acc, "integer"]; + case "object": + if (x._def.value === null) + return [...acc, "null"]; + case "symbol": + case "undefined": + case "function": default: - return "typeof " + data + EQUAL + '"' + dataType + '"'; + return acc; } + }, []); + if (types.length === options.length) { + const uniqueTypes = types.filter((x, i, a) => a.indexOf(x) === i); + return { + type: uniqueTypes.length > 1 ? uniqueTypes : uniqueTypes[0], + enum: options.reduce((acc, x) => { + return acc.includes(x._def.value) ? acc : [...acc, x._def.value]; + }, []) + }; } - function checkDataTypes(dataTypes, data, strictNumbers) { - switch (dataTypes.length) { - case 1: - return checkDataType(dataTypes[0], data, strictNumbers, true); - default: - var code = ""; - var types = toHash(dataTypes); - if (types.array && types.object) { - code = types.null ? "(" : "(!" + data + " || "; - code += "typeof " + data + ' !== "object")'; - delete types.null; - delete types.array; - delete types.object; + } else if (options.every((x) => x._def.typeName === "ZodEnum")) { + return { + type: "string", + enum: options.reduce((acc, x) => [ + ...acc, + ...x._def.values.filter((x2) => !acc.includes(x2)) + ], []) + }; + } + return asAnyOf(def, refs); +} +var primitiveMappings, asAnyOf; +var init_union = __esm({ + "../node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@4.3.5/node_modules/zod-to-json-schema/dist/esm/parsers/union.js"() { + init_parseDef(); + primitiveMappings = { + ZodString: "string", + ZodNumber: "number", + ZodBigInt: "integer", + ZodBoolean: "boolean", + ZodNull: "null" + }; + asAnyOf = (def, refs) => { + const anyOf = (def.options instanceof Map ? Array.from(def.options.values()) : def.options).map((x, i) => parseDef(x._def, { + ...refs, + currentPath: [...refs.currentPath, "anyOf", `${i}`] + })).filter((x) => !!x && (!refs.strictUnions || typeof x === "object" && Object.keys(x).length > 0)); + return anyOf.length ? { anyOf } : void 0; + }; + } +}); + +// ../node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@4.3.5/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") { + return { + type: primitiveMappings[def.innerType._def.typeName], + nullable: true + }; + } + return { + type: [ + primitiveMappings[def.innerType._def.typeName], + "null" + ] + }; + } + if (refs.target === "openApi3") { + const base2 = parseDef(def.innerType._def, { + ...refs, + currentPath: [...refs.currentPath] + }); + if (base2 && "$ref" in base2) + return { allOf: [base2], nullable: true }; + return base2 && { ...base2, nullable: true }; + } + const base = parseDef(def.innerType._def, { + ...refs, + currentPath: [...refs.currentPath, "anyOf", "0"] + }); + return base && { anyOf: [base, { type: "null" }] }; +} +var init_nullable = __esm({ + "../node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@4.3.5/node_modules/zod-to-json-schema/dist/esm/parsers/nullable.js"() { + init_parseDef(); + init_union(); + } +}); + +// ../node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@4.3.5/node_modules/zod-to-json-schema/dist/esm/parsers/number.js +function parseNumberDef(def, refs) { + const res = { + type: "number" + }; + if (!def.checks) + return res; + for (const check4 of def.checks) { + switch (check4.kind) { + case "int": + res.type = "integer"; + addErrorMessage(res, "type", check4.message, refs); + break; + case "min": + if (refs.target === "jsonSchema7") { + if (check4.inclusive) { + setResponseValueAndErrors(res, "minimum", check4.value, check4.message, refs); + } else { + setResponseValueAndErrors(res, "exclusiveMinimum", check4.value, check4.message, refs); } - if (types.number) delete types.integer; - for (var t in types) - code += (code ? " && " : "") + checkDataType(t, data, strictNumbers, true); - return code; - } - } - var COERCE_TO_TYPES = toHash(["string", "number", "integer", "boolean", "null"]); - function coerceToTypes(optionCoerceTypes, dataTypes) { - if (Array.isArray(dataTypes)) { - var types = []; - for (var i = 0; i < dataTypes.length; i++) { - var t = dataTypes[i]; - if (COERCE_TO_TYPES[t]) types[types.length] = t; - else if (optionCoerceTypes === "array" && t === "array") types[types.length] = t; + } else { + if (!check4.inclusive) { + res.exclusiveMinimum = true; + } + setResponseValueAndErrors(res, "minimum", check4.value, check4.message, refs); } - if (types.length) return types; - } else if (COERCE_TO_TYPES[dataTypes]) { - return [dataTypes]; - } else if (optionCoerceTypes === "array" && dataTypes === "array") { - return ["array"]; + break; + case "max": + if (refs.target === "jsonSchema7") { + if (check4.inclusive) { + setResponseValueAndErrors(res, "maximum", check4.value, check4.message, refs); + } else { + setResponseValueAndErrors(res, "exclusiveMaximum", check4.value, check4.message, refs); + } + } else { + if (!check4.inclusive) { + res.exclusiveMaximum = true; + } + setResponseValueAndErrors(res, "maximum", check4.value, check4.message, refs); + } + break; + case "multipleOf": + setResponseValueAndErrors(res, "multipleOf", check4.value, check4.message, refs); + break; + } + } + return res; +} +var init_number = __esm({ + "../node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@4.3.5/node_modules/zod-to-json-schema/dist/esm/parsers/number.js"() { + init_errorMessages(); + } +}); + +// ../node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@4.3.5/node_modules/zod-to-json-schema/dist/esm/parsers/object.js +function parseObjectDef(def, refs) { + const forceOptionalIntoNullable = refs.target === "openAi"; + const result = { + type: "object", + properties: {} + }; + const required4 = []; + const shape = def.shape(); + for (const propName in shape) { + let propDef = shape[propName]; + if (propDef === void 0 || propDef._def === void 0) { + continue; + } + let propOptional = safeIsOptional(propDef); + if (propOptional && forceOptionalIntoNullable) { + if (propDef._def.typeName === "ZodOptional") { + propDef = propDef._def.innerType; + } + if (!propDef.isNullable()) { + propDef = propDef.nullable(); + } + propOptional = false; + } + const parsedDef = parseDef(propDef._def, { + ...refs, + currentPath: [...refs.currentPath, "properties", propName], + propertyPath: [...refs.currentPath, "properties", propName] + }); + if (parsedDef === void 0) { + continue; + } + result.properties[propName] = parsedDef; + if (!propOptional) { + required4.push(propName); + } + } + if (required4.length) { + result.required = required4; + } + const additionalProperties = decideAdditionalProperties(def, refs); + if (additionalProperties !== void 0) { + result.additionalProperties = additionalProperties; + } + return result; +} +function decideAdditionalProperties(def, refs) { + if (def.catchall._def.typeName !== "ZodNever") { + return parseDef(def.catchall._def, { + ...refs, + currentPath: [...refs.currentPath, "additionalProperties"] + }); + } + switch (def.unknownKeys) { + case "passthrough": + return refs.allowedAdditionalProperties; + case "strict": + return refs.rejectedAdditionalProperties; + case "strip": + return refs.removeAdditionalStrategy === "strict" ? refs.allowedAdditionalProperties : refs.rejectedAdditionalProperties; + } +} +function safeIsOptional(schema2) { + try { + return schema2.isOptional(); + } catch { + return true; + } +} +var init_object = __esm({ + "../node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@4.3.5/node_modules/zod-to-json-schema/dist/esm/parsers/object.js"() { + init_parseDef(); + } +}); + +// ../node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@4.3.5/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.25.1_zod@4.3.5/node_modules/zod-to-json-schema/dist/esm/parsers/optional.js"() { + init_parseDef(); + init_any(); + parseOptionalDef = (def, refs) => { + if (refs.currentPath.toString() === refs.propertyPath?.toString()) { + return parseDef(def.innerType._def, refs); + } + const innerSchema = parseDef(def.innerType._def, { + ...refs, + currentPath: [...refs.currentPath, "anyOf", "1"] + }); + return innerSchema ? { + anyOf: [ + { + not: parseAnyDef(refs) + }, + innerSchema + ] + } : parseAnyDef(refs); + }; + } +}); + +// ../node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@4.3.5/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.25.1_zod@4.3.5/node_modules/zod-to-json-schema/dist/esm/parsers/pipeline.js"() { + init_parseDef(); + parsePipelineDef = (def, refs) => { + if (refs.pipeStrategy === "input") { + return parseDef(def.in._def, refs); + } else if (refs.pipeStrategy === "output") { + return parseDef(def.out._def, refs); + } + const a = parseDef(def.in._def, { + ...refs, + currentPath: [...refs.currentPath, "allOf", "0"] + }); + const b = parseDef(def.out._def, { + ...refs, + currentPath: [...refs.currentPath, "allOf", a ? "1" : "0"] + }); + return { + allOf: [a, b].filter((x) => x !== void 0) + }; + }; + } +}); + +// ../node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@4.3.5/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.25.1_zod@4.3.5/node_modules/zod-to-json-schema/dist/esm/parsers/promise.js"() { + init_parseDef(); + } +}); + +// ../node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@4.3.5/node_modules/zod-to-json-schema/dist/esm/parsers/set.js +function parseSetDef(def, refs) { + const items = parseDef(def.valueType._def, { + ...refs, + currentPath: [...refs.currentPath, "items"] + }); + const schema2 = { + type: "array", + uniqueItems: true, + items + }; + if (def.minSize) { + setResponseValueAndErrors(schema2, "minItems", def.minSize.value, def.minSize.message, refs); + } + if (def.maxSize) { + setResponseValueAndErrors(schema2, "maxItems", def.maxSize.value, def.maxSize.message, refs); + } + return schema2; +} +var init_set = __esm({ + "../node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@4.3.5/node_modules/zod-to-json-schema/dist/esm/parsers/set.js"() { + init_errorMessages(); + init_parseDef(); + } +}); + +// ../node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@4.3.5/node_modules/zod-to-json-schema/dist/esm/parsers/tuple.js +function parseTupleDef(def, refs) { + if (def.rest) { + return { + type: "array", + minItems: def.items.length, + items: def.items.map((x, i) => parseDef(x._def, { + ...refs, + currentPath: [...refs.currentPath, "items", `${i}`] + })).reduce((acc, x) => x === void 0 ? acc : [...acc, x], []), + additionalItems: parseDef(def.rest._def, { + ...refs, + currentPath: [...refs.currentPath, "additionalItems"] + }) + }; + } else { + return { + type: "array", + minItems: def.items.length, + maxItems: def.items.length, + items: def.items.map((x, i) => parseDef(x._def, { + ...refs, + currentPath: [...refs.currentPath, "items", `${i}`] + })).reduce((acc, x) => x === void 0 ? acc : [...acc, x], []) + }; + } +} +var init_tuple = __esm({ + "../node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@4.3.5/node_modules/zod-to-json-schema/dist/esm/parsers/tuple.js"() { + init_parseDef(); + } +}); + +// ../node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@4.3.5/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.25.1_zod@4.3.5/node_modules/zod-to-json-schema/dist/esm/parsers/undefined.js"() { + init_any(); + } +}); + +// ../node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@4.3.5/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.25.1_zod@4.3.5/node_modules/zod-to-json-schema/dist/esm/parsers/unknown.js"() { + init_any(); + } +}); + +// ../node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@4.3.5/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.25.1_zod@4.3.5/node_modules/zod-to-json-schema/dist/esm/parsers/readonly.js"() { + init_parseDef(); + parseReadonlyDef = (def, refs) => { + return parseDef(def.innerType._def, refs); + }; + } +}); + +// ../node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@4.3.5/node_modules/zod-to-json-schema/dist/esm/selectParser.js +var selectParser; +var init_selectParser = __esm({ + "../node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@4.3.5/node_modules/zod-to-json-schema/dist/esm/selectParser.js"() { + init_v3(); + init_any(); + init_array(); + init_bigint(); + init_boolean(); + init_branded(); + init_catch(); + init_date(); + init_default(); + init_effects(); + init_enum(); + init_intersection(); + init_literal(); + init_map(); + init_nativeEnum(); + init_never(); + init_null(); + init_nullable(); + init_number(); + init_object(); + init_optional(); + init_pipeline(); + init_promise(); + init_record(); + init_set(); + init_string(); + init_tuple(); + init_undefined(); + init_union(); + init_unknown(); + init_readonly(); + selectParser = (def, typeName, refs) => { + switch (typeName) { + case ZodFirstPartyTypeKind2.ZodString: + return parseStringDef(def, refs); + case ZodFirstPartyTypeKind2.ZodNumber: + return parseNumberDef(def, refs); + case ZodFirstPartyTypeKind2.ZodObject: + return parseObjectDef(def, refs); + case ZodFirstPartyTypeKind2.ZodBigInt: + return parseBigintDef(def, refs); + case ZodFirstPartyTypeKind2.ZodBoolean: + return parseBooleanDef(); + case ZodFirstPartyTypeKind2.ZodDate: + return parseDateDef(def, refs); + case ZodFirstPartyTypeKind2.ZodUndefined: + return parseUndefinedDef(refs); + case ZodFirstPartyTypeKind2.ZodNull: + return parseNullDef(refs); + case ZodFirstPartyTypeKind2.ZodArray: + return parseArrayDef(def, refs); + case ZodFirstPartyTypeKind2.ZodUnion: + case ZodFirstPartyTypeKind2.ZodDiscriminatedUnion: + return parseUnionDef(def, refs); + case ZodFirstPartyTypeKind2.ZodIntersection: + return parseIntersectionDef(def, refs); + case ZodFirstPartyTypeKind2.ZodTuple: + return parseTupleDef(def, refs); + case ZodFirstPartyTypeKind2.ZodRecord: + return parseRecordDef(def, refs); + case ZodFirstPartyTypeKind2.ZodLiteral: + return parseLiteralDef(def, refs); + case ZodFirstPartyTypeKind2.ZodEnum: + return parseEnumDef(def); + case ZodFirstPartyTypeKind2.ZodNativeEnum: + return parseNativeEnumDef(def); + case ZodFirstPartyTypeKind2.ZodNullable: + return parseNullableDef(def, refs); + case ZodFirstPartyTypeKind2.ZodOptional: + return parseOptionalDef(def, refs); + case ZodFirstPartyTypeKind2.ZodMap: + return parseMapDef(def, refs); + case ZodFirstPartyTypeKind2.ZodSet: + return parseSetDef(def, refs); + case ZodFirstPartyTypeKind2.ZodLazy: + return () => def.getter()._def; + case ZodFirstPartyTypeKind2.ZodPromise: + return parsePromiseDef(def, refs); + case ZodFirstPartyTypeKind2.ZodNaN: + case ZodFirstPartyTypeKind2.ZodNever: + return parseNeverDef(refs); + case ZodFirstPartyTypeKind2.ZodEffects: + return parseEffectsDef(def, refs); + case ZodFirstPartyTypeKind2.ZodAny: + return parseAnyDef(refs); + case ZodFirstPartyTypeKind2.ZodUnknown: + return parseUnknownDef(refs); + case ZodFirstPartyTypeKind2.ZodDefault: + return parseDefaultDef(def, refs); + case ZodFirstPartyTypeKind2.ZodBranded: + return parseBrandedDef(def, refs); + case ZodFirstPartyTypeKind2.ZodReadonly: + return parseReadonlyDef(def, refs); + case ZodFirstPartyTypeKind2.ZodCatch: + return parseCatchDef(def, refs); + case ZodFirstPartyTypeKind2.ZodPipeline: + return parsePipelineDef(def, refs); + case ZodFirstPartyTypeKind2.ZodFunction: + case ZodFirstPartyTypeKind2.ZodVoid: + case ZodFirstPartyTypeKind2.ZodSymbol: + return void 0; + default: + return /* @__PURE__ */ ((_) => void 0)(typeName); + } + }; + } +}); + +// ../node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@4.3.5/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) { + const overrideResult = refs.override?.(def, refs, seenItem, forceResolution); + if (overrideResult !== ignoreOverride2) { + return overrideResult; + } + } + if (seenItem && !forceResolution) { + const seenSchema = get$ref(seenItem, refs); + if (seenSchema !== void 0) { + return seenSchema; + } + } + const newItem = { def, path: refs.currentPath, jsonSchema: void 0 }; + refs.seen.set(def, newItem); + const jsonSchemaOrGetter = selectParser(def, def.typeName, refs); + const jsonSchema2 = typeof jsonSchemaOrGetter === "function" ? parseDef(jsonSchemaOrGetter(), refs) : jsonSchemaOrGetter; + if (jsonSchema2) { + addMeta(def, refs, jsonSchema2); + } + if (refs.postProcess) { + const postProcessResult = refs.postProcess(jsonSchema2, def, refs); + newItem.jsonSchema = jsonSchema2; + return postProcessResult; + } + newItem.jsonSchema = jsonSchema2; + return jsonSchema2; +} +var get$ref, addMeta; +var init_parseDef = __esm({ + "../node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@4.3.5/node_modules/zod-to-json-schema/dist/esm/parseDef.js"() { + init_Options(); + init_selectParser(); + init_getRelativePath(); + init_any(); + get$ref = (item, refs) => { + switch (refs.$refStrategy) { + case "root": + return { $ref: item.path.join("/") }; + case "relative": + return { $ref: getRelativePath(refs.currentPath, item.path) }; + case "none": + case "seen": { + if (item.path.length < refs.currentPath.length && item.path.every((value2, index) => refs.currentPath[index] === value2)) { + console.warn(`Recursive reference detected at ${refs.currentPath.join("/")}! Defaulting to any`); + return parseAnyDef(refs); + } + return refs.$refStrategy === "seen" ? parseAnyDef(refs) : void 0; + } + } + }; + addMeta = (def, refs, jsonSchema2) => { + if (def.description) { + jsonSchema2.description = def.description; + if (refs.markdownDescription) { + jsonSchema2.markdownDescription = def.description; + } + } + return jsonSchema2; + }; + } +}); + +// ../node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@4.3.5/node_modules/zod-to-json-schema/dist/esm/parseTypes.js +var init_parseTypes = __esm({ + "../node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@4.3.5/node_modules/zod-to-json-schema/dist/esm/parseTypes.js"() { + } +}); + +// ../node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@4.3.5/node_modules/zod-to-json-schema/dist/esm/zodToJsonSchema.js +var zodToJsonSchema; +var init_zodToJsonSchema = __esm({ + "../node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@4.3.5/node_modules/zod-to-json-schema/dist/esm/zodToJsonSchema.js"() { + init_parseDef(); + init_Refs(); + init_any(); + zodToJsonSchema = (schema2, options) => { + const refs = getRefs(options); + let definitions = typeof options === "object" && options.definitions ? Object.entries(options.definitions).reduce((acc, [name2, schema3]) => ({ + ...acc, + [name2]: parseDef(schema3._def, { + ...refs, + currentPath: [...refs.basePath, refs.definitionPath, name2] + }, true) ?? parseAnyDef(refs) + }), {}) : void 0; + const name = typeof options === "string" ? options : options?.nameStrategy === "title" ? void 0 : options?.name; + const main2 = parseDef(schema2._def, name === void 0 ? refs : { + ...refs, + currentPath: [...refs.basePath, refs.definitionPath, name] + }, false) ?? parseAnyDef(refs); + const title = typeof options === "object" && options.name !== void 0 && options.nameStrategy === "title" ? options.name : void 0; + if (title !== void 0) { + main2.title = title; + } + if (refs.flags.hasReferencedOpenAiAnyType) { + if (!definitions) { + definitions = {}; + } + if (!definitions[refs.openAiAnyTypeName]) { + definitions[refs.openAiAnyTypeName] = { + // Skipping "object" as no properties can be defined and additionalProperties must be "false" + type: ["string", "number", "integer", "boolean", "array", "null"], + items: { + $ref: refs.$refStrategy === "relative" ? "1" : [ + ...refs.basePath, + refs.definitionPath, + refs.openAiAnyTypeName + ].join("/") + } + }; + } + } + const combined = name === void 0 ? definitions ? { + ...main2, + [refs.definitionPath]: definitions + } : main2 : { + $ref: [ + ...refs.$refStrategy === "relative" ? [] : refs.basePath, + refs.definitionPath, + name + ].join("/"), + [refs.definitionPath]: { + ...definitions, + [name]: main2 + } + }; + if (refs.target === "jsonSchema7") { + combined.$schema = "http://json-schema.org/draft-07/schema#"; + } else if (refs.target === "jsonSchema2019-09" || refs.target === "openAi") { + combined.$schema = "https://json-schema.org/draft/2019-09/schema#"; + } + if (refs.target === "openAi" && ("anyOf" in combined || "oneOf" in combined || "allOf" in combined || "type" in combined && Array.isArray(combined.type))) { + console.warn("Warning: OpenAI may not support schemas with unions as roots! Try wrapping it in an object property."); + } + return combined; + }; + } +}); + +// ../node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@4.3.5/node_modules/zod-to-json-schema/dist/esm/index.js +var esm_exports = {}; +__export(esm_exports, { + addErrorMessage: () => addErrorMessage, + default: () => esm_default, + defaultOptions: () => defaultOptions, + getDefaultOptions: () => getDefaultOptions, + getRefs: () => getRefs, + getRelativePath: () => getRelativePath, + ignoreOverride: () => ignoreOverride2, + jsonDescription: () => jsonDescription, + parseAnyDef: () => parseAnyDef, + parseArrayDef: () => parseArrayDef, + parseBigintDef: () => parseBigintDef, + parseBooleanDef: () => parseBooleanDef, + parseBrandedDef: () => parseBrandedDef, + parseCatchDef: () => parseCatchDef, + parseDateDef: () => parseDateDef, + parseDef: () => parseDef, + parseDefaultDef: () => parseDefaultDef, + parseEffectsDef: () => parseEffectsDef, + parseEnumDef: () => parseEnumDef, + parseIntersectionDef: () => parseIntersectionDef, + parseLiteralDef: () => parseLiteralDef, + parseMapDef: () => parseMapDef, + parseNativeEnumDef: () => parseNativeEnumDef, + parseNeverDef: () => parseNeverDef, + parseNullDef: () => parseNullDef, + parseNullableDef: () => parseNullableDef, + parseNumberDef: () => parseNumberDef, + parseObjectDef: () => parseObjectDef, + parseOptionalDef: () => parseOptionalDef, + parsePipelineDef: () => parsePipelineDef, + parsePromiseDef: () => parsePromiseDef, + parseReadonlyDef: () => parseReadonlyDef, + parseRecordDef: () => parseRecordDef, + parseSetDef: () => parseSetDef, + parseStringDef: () => parseStringDef, + parseTupleDef: () => parseTupleDef, + parseUndefinedDef: () => parseUndefinedDef, + parseUnionDef: () => parseUnionDef, + parseUnknownDef: () => parseUnknownDef, + primitiveMappings: () => primitiveMappings, + selectParser: () => selectParser, + setResponseValueAndErrors: () => setResponseValueAndErrors, + zodPatterns: () => zodPatterns, + zodToJsonSchema: () => zodToJsonSchema +}); +var esm_default; +var init_esm = __esm({ + "../node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@4.3.5/node_modules/zod-to-json-schema/dist/esm/index.js"() { + init_Options(); + init_Refs(); + init_errorMessages(); + init_getRelativePath(); + init_parseDef(); + init_parseTypes(); + init_any(); + init_array(); + init_bigint(); + init_boolean(); + init_branded(); + init_catch(); + init_date(); + init_default(); + init_effects(); + init_enum(); + init_intersection(); + init_literal(); + init_map(); + init_nativeEnum(); + init_never(); + init_null(); + init_nullable(); + init_number(); + init_object(); + init_optional(); + init_pipeline(); + init_promise(); + init_readonly(); + init_record(); + init_set(); + init_string(); + init_tuple(); + init_undefined(); + init_union(); + init_unknown(); + init_selectParser(); + init_zodToJsonSchema(); + init_zodToJsonSchema(); + esm_default = zodToJsonSchema; + } +}); + +// ../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/compile/codegen/code.js +var require_code3 = __commonJS({ + "../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/compile/codegen/code.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.regexpCode = exports.getEsmExportName = exports.getProperty = exports.safeStringify = exports.stringify = exports.strConcat = exports.addCodeArg = exports.str = exports._ = exports.nil = exports._Code = exports.Name = exports.IDENTIFIER = exports._CodeOrName = void 0; + var _CodeOrName = class { + }; + exports._CodeOrName = _CodeOrName; + exports.IDENTIFIER = /^[a-z$_][a-z$_0-9]*$/i; + var Name = class extends _CodeOrName { + constructor(s) { + super(); + if (!exports.IDENTIFIER.test(s)) + throw new Error("CodeGen: name must be a valid identifier"); + this.str = s; + } + toString() { + return this.str; + } + emptyStr() { + return false; + } + get names() { + return { [this.str]: 1 }; + } + }; + exports.Name = Name; + var _Code = class extends _CodeOrName { + constructor(code) { + super(); + this._items = typeof code === "string" ? [code] : code; + } + toString() { + return this.str; + } + emptyStr() { + if (this._items.length > 1) + return false; + const item = this._items[0]; + return item === "" || item === '""'; + } + get str() { + var _a2; + return (_a2 = this._str) !== null && _a2 !== void 0 ? _a2 : this._str = this._items.reduce((s, c) => `${s}${c}`, ""); + } + get names() { + var _a2; + return (_a2 = this._names) !== null && _a2 !== void 0 ? _a2 : this._names = this._items.reduce((names, c) => { + if (c instanceof Name) + names[c.str] = (names[c.str] || 0) + 1; + return names; + }, {}); + } + }; + exports._Code = _Code; + exports.nil = new _Code(""); + function _(strs, ...args3) { + const code = [strs[0]]; + let i = 0; + while (i < args3.length) { + addCodeArg(code, args3[i]); + code.push(strs[++i]); + } + return new _Code(code); + } + exports._ = _; + var plus = new _Code("+"); + function str(strs, ...args3) { + const expr = [safeStringify(strs[0])]; + let i = 0; + while (i < args3.length) { + expr.push(plus); + addCodeArg(expr, args3[i]); + expr.push(plus, safeStringify(strs[++i])); + } + optimize(expr); + return new _Code(expr); + } + exports.str = str; + function addCodeArg(code, arg) { + if (arg instanceof _Code) + code.push(...arg._items); + else if (arg instanceof Name) + code.push(arg); + else + code.push(interpolate(arg)); + } + exports.addCodeArg = addCodeArg; + function optimize(expr) { + let i = 1; + while (i < expr.length - 1) { + if (expr[i] === plus) { + const res = mergeExprItems(expr[i - 1], expr[i + 1]); + if (res !== void 0) { + expr.splice(i - 1, 3, res); + continue; + } + expr[i++] = "+"; + } + i++; } } - function toHash(arr) { - var hash = {}; - for (var i = 0; i < arr.length; i++) hash[arr[i]] = true; - return hash; + function mergeExprItems(a, b) { + if (b === '""') + return a; + if (a === '""') + return b; + if (typeof a == "string") { + if (b instanceof Name || a[a.length - 1] !== '"') + return; + if (typeof b != "string") + return `${a.slice(0, -1)}${b}"`; + if (b[0] === '"') + return a.slice(0, -1) + b.slice(1); + return; + } + if (typeof b == "string" && b[0] === '"' && !(a instanceof Name)) + return `"${a}${b.slice(1)}`; + return; } - var IDENTIFIER = /^[a-z$_][a-z$_0-9]*$/i; - var SINGLE_QUOTE = /'|\\/g; + function strConcat(c1, c2) { + return c2.emptyStr() ? c1 : c1.emptyStr() ? c2 : str`${c1}${c2}`; + } + exports.strConcat = strConcat; + function interpolate(x) { + return typeof x == "number" || typeof x == "boolean" || x === null ? x : safeStringify(Array.isArray(x) ? x.join(",") : x); + } + function stringify(x) { + return new _Code(safeStringify(x)); + } + exports.stringify = stringify; + function safeStringify(x) { + return JSON.stringify(x).replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029"); + } + exports.safeStringify = safeStringify; function getProperty(key) { - return typeof key == "number" ? "[" + key + "]" : IDENTIFIER.test(key) ? "." + key : "['" + escapeQuotes(key) + "']"; + return typeof key == "string" && exports.IDENTIFIER.test(key) ? new _Code(`.${key}`) : _`[${key}]`; } - function escapeQuotes(str) { - return str.replace(SINGLE_QUOTE, "\\$&").replace(/\n/g, "\\n").replace(/\r/g, "\\r").replace(/\f/g, "\\f").replace(/\t/g, "\\t"); + exports.getProperty = getProperty; + function getEsmExportName(key) { + if (typeof key == "string" && exports.IDENTIFIER.test(key)) { + return new _Code(`${key}`); + } + throw new Error(`CodeGen: invalid export name: ${key}, use explicit $id name mapping`); } - function varOccurences(str, dataVar) { - dataVar += "[^0-9]"; - var matches = str.match(new RegExp(dataVar, "g")); - return matches ? matches.length : 0; + exports.getEsmExportName = getEsmExportName; + function regexpCode(rx) { + return new _Code(rx.toString()); } - function varReplace(str, dataVar, expr) { - dataVar += "([^0-9])"; - expr = expr.replace(/\$/g, "$$$$"); - return str.replace(new RegExp(dataVar, "g"), expr + "$1"); + exports.regexpCode = regexpCode; + } +}); + +// ../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/compile/codegen/scope.js +var require_scope2 = __commonJS({ + "../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/compile/codegen/scope.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.ValueScope = exports.ValueScopeName = exports.Scope = exports.varKinds = exports.UsedValueState = void 0; + var code_1 = require_code3(); + var ValueError = class extends Error { + constructor(name) { + super(`CodeGen: "code" for ${name} not defined`); + this.value = name.value; + } + }; + var UsedValueState; + (function(UsedValueState2) { + UsedValueState2[UsedValueState2["Started"] = 0] = "Started"; + UsedValueState2[UsedValueState2["Completed"] = 1] = "Completed"; + })(UsedValueState || (exports.UsedValueState = UsedValueState = {})); + exports.varKinds = { + const: new code_1.Name("const"), + let: new code_1.Name("let"), + var: new code_1.Name("var") + }; + var Scope2 = class { + constructor({ prefixes, parent } = {}) { + this._names = {}; + this._prefixes = prefixes; + this._parent = parent; + } + toName(nameOrPrefix) { + return nameOrPrefix instanceof code_1.Name ? nameOrPrefix : this.name(nameOrPrefix); + } + name(prefix) { + return new code_1.Name(this._newName(prefix)); + } + _newName(prefix) { + const ng = this._names[prefix] || this._nameGroup(prefix); + return `${prefix}${ng.index++}`; + } + _nameGroup(prefix) { + var _a2, _b; + if (((_b = (_a2 = this._parent) === null || _a2 === void 0 ? void 0 : _a2._prefixes) === null || _b === void 0 ? void 0 : _b.has(prefix)) || this._prefixes && !this._prefixes.has(prefix)) { + throw new Error(`CodeGen: prefix "${prefix}" is not allowed in this scope`); + } + return this._names[prefix] = { prefix, index: 0 }; + } + }; + exports.Scope = Scope2; + var ValueScopeName = class extends code_1.Name { + constructor(prefix, nameStr) { + super(nameStr); + this.prefix = prefix; + } + setValue(value2, { property, itemIndex }) { + this.value = value2; + this.scopePath = (0, code_1._)`.${new code_1.Name(property)}[${itemIndex}]`; + } + }; + exports.ValueScopeName = ValueScopeName; + var line = (0, code_1._)`\n`; + var ValueScope = class extends Scope2 { + constructor(opts) { + super(opts); + this._values = {}; + this._scope = opts.scope; + this.opts = { ...opts, _n: opts.lines ? line : code_1.nil }; + } + get() { + return this._scope; + } + name(prefix) { + return new ValueScopeName(prefix, this._newName(prefix)); + } + value(nameOrPrefix, value2) { + var _a2; + if (value2.ref === void 0) + throw new Error("CodeGen: ref must be passed in value"); + const name = this.toName(nameOrPrefix); + const { prefix } = name; + const valueKey = (_a2 = value2.key) !== null && _a2 !== void 0 ? _a2 : value2.ref; + let vs = this._values[prefix]; + if (vs) { + const _name = vs.get(valueKey); + if (_name) + return _name; + } else { + vs = this._values[prefix] = /* @__PURE__ */ new Map(); + } + vs.set(valueKey, name); + const s = this._scope[prefix] || (this._scope[prefix] = []); + const itemIndex = s.length; + s[itemIndex] = value2.ref; + name.setValue(value2, { property: prefix, itemIndex }); + return name; + } + getValue(prefix, keyOrRef) { + const vs = this._values[prefix]; + if (!vs) + return; + return vs.get(keyOrRef); + } + scopeRefs(scopeName, values = this._values) { + return this._reduceValues(values, (name) => { + if (name.scopePath === void 0) + throw new Error(`CodeGen: name "${name}" has no value`); + return (0, code_1._)`${scopeName}${name.scopePath}`; + }); + } + scopeCode(values = this._values, usedValues, getCode) { + return this._reduceValues(values, (name) => { + if (name.value === void 0) + throw new Error(`CodeGen: name "${name}" has no value`); + return name.value.code; + }, usedValues, getCode); + } + _reduceValues(values, valueCode, usedValues = {}, getCode) { + let code = code_1.nil; + for (const prefix in values) { + const vs = values[prefix]; + if (!vs) + continue; + const nameSet = usedValues[prefix] = usedValues[prefix] || /* @__PURE__ */ new Map(); + vs.forEach((name) => { + if (nameSet.has(name)) + return; + nameSet.set(name, UsedValueState.Started); + let c = valueCode(name); + if (c) { + const def = this.opts.es5 ? exports.varKinds.var : exports.varKinds.const; + code = (0, code_1._)`${code}${def} ${name} = ${c};${this.opts._n}`; + } else if (c = getCode === null || getCode === void 0 ? void 0 : getCode(name)) { + code = (0, code_1._)`${code}${c}${this.opts._n}`; + } else { + throw new ValueError(name); + } + nameSet.set(name, UsedValueState.Completed); + }); + } + return code; + } + }; + exports.ValueScope = ValueScope; + } +}); + +// ../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/compile/codegen/index.js +var require_codegen2 = __commonJS({ + "../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/compile/codegen/index.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.or = exports.and = exports.not = exports.CodeGen = exports.operators = exports.varKinds = exports.ValueScopeName = exports.ValueScope = exports.Scope = exports.Name = exports.regexpCode = exports.stringify = exports.getProperty = exports.nil = exports.strConcat = exports.str = exports._ = void 0; + var code_1 = require_code3(); + var scope_1 = require_scope2(); + var code_2 = require_code3(); + Object.defineProperty(exports, "_", { enumerable: true, get: function() { + return code_2._; + } }); + Object.defineProperty(exports, "str", { enumerable: true, get: function() { + return code_2.str; + } }); + Object.defineProperty(exports, "strConcat", { enumerable: true, get: function() { + return code_2.strConcat; + } }); + Object.defineProperty(exports, "nil", { enumerable: true, get: function() { + return code_2.nil; + } }); + Object.defineProperty(exports, "getProperty", { enumerable: true, get: function() { + return code_2.getProperty; + } }); + Object.defineProperty(exports, "stringify", { enumerable: true, get: function() { + return code_2.stringify; + } }); + Object.defineProperty(exports, "regexpCode", { enumerable: true, get: function() { + return code_2.regexpCode; + } }); + Object.defineProperty(exports, "Name", { enumerable: true, get: function() { + return code_2.Name; + } }); + var scope_2 = require_scope2(); + Object.defineProperty(exports, "Scope", { enumerable: true, get: function() { + return scope_2.Scope; + } }); + Object.defineProperty(exports, "ValueScope", { enumerable: true, get: function() { + return scope_2.ValueScope; + } }); + Object.defineProperty(exports, "ValueScopeName", { enumerable: true, get: function() { + return scope_2.ValueScopeName; + } }); + Object.defineProperty(exports, "varKinds", { enumerable: true, get: function() { + return scope_2.varKinds; + } }); + exports.operators = { + GT: new code_1._Code(">"), + GTE: new code_1._Code(">="), + LT: new code_1._Code("<"), + LTE: new code_1._Code("<="), + EQ: new code_1._Code("==="), + NEQ: new code_1._Code("!=="), + NOT: new code_1._Code("!"), + OR: new code_1._Code("||"), + AND: new code_1._Code("&&"), + ADD: new code_1._Code("+") + }; + var Node = class { + optimizeNodes() { + return this; + } + optimizeNames(_names, _constants) { + return this; + } + }; + var Def = class extends Node { + constructor(varKind, name, rhs) { + super(); + this.varKind = varKind; + this.name = name; + this.rhs = rhs; + } + render({ es5, _n }) { + const varKind = es5 ? scope_1.varKinds.var : this.varKind; + const rhs = this.rhs === void 0 ? "" : ` = ${this.rhs}`; + return `${varKind} ${this.name}${rhs};` + _n; + } + optimizeNames(names, constants) { + if (!names[this.name.str]) + return; + if (this.rhs) + this.rhs = optimizeExpr(this.rhs, names, constants); + return this; + } + get names() { + return this.rhs instanceof code_1._CodeOrName ? this.rhs.names : {}; + } + }; + var Assign = class extends Node { + constructor(lhs, rhs, sideEffects) { + super(); + this.lhs = lhs; + this.rhs = rhs; + this.sideEffects = sideEffects; + } + render({ _n }) { + return `${this.lhs} = ${this.rhs};` + _n; + } + optimizeNames(names, constants) { + if (this.lhs instanceof code_1.Name && !names[this.lhs.str] && !this.sideEffects) + return; + this.rhs = optimizeExpr(this.rhs, names, constants); + return this; + } + get names() { + const names = this.lhs instanceof code_1.Name ? {} : { ...this.lhs.names }; + return addExprNames(names, this.rhs); + } + }; + var AssignOp = class extends Assign { + constructor(lhs, op, rhs, sideEffects) { + super(lhs, rhs, sideEffects); + this.op = op; + } + render({ _n }) { + return `${this.lhs} ${this.op}= ${this.rhs};` + _n; + } + }; + var Label = class extends Node { + constructor(label) { + super(); + this.label = label; + this.names = {}; + } + render({ _n }) { + return `${this.label}:` + _n; + } + }; + var Break = class extends Node { + constructor(label) { + super(); + this.label = label; + this.names = {}; + } + render({ _n }) { + const label = this.label ? ` ${this.label}` : ""; + return `break${label};` + _n; + } + }; + var Throw = class extends Node { + constructor(error50) { + super(); + this.error = error50; + } + render({ _n }) { + return `throw ${this.error};` + _n; + } + get names() { + return this.error.names; + } + }; + var AnyCode = class extends Node { + constructor(code) { + super(); + this.code = code; + } + render({ _n }) { + return `${this.code};` + _n; + } + optimizeNodes() { + return `${this.code}` ? this : void 0; + } + optimizeNames(names, constants) { + this.code = optimizeExpr(this.code, names, constants); + return this; + } + get names() { + return this.code instanceof code_1._CodeOrName ? this.code.names : {}; + } + }; + var ParentNode = class extends Node { + constructor(nodes = []) { + super(); + this.nodes = nodes; + } + render(opts) { + return this.nodes.reduce((code, n) => code + n.render(opts), ""); + } + optimizeNodes() { + const { nodes } = this; + let i = nodes.length; + while (i--) { + const n = nodes[i].optimizeNodes(); + if (Array.isArray(n)) + nodes.splice(i, 1, ...n); + else if (n) + nodes[i] = n; + else + nodes.splice(i, 1); + } + return nodes.length > 0 ? this : void 0; + } + optimizeNames(names, constants) { + const { nodes } = this; + let i = nodes.length; + while (i--) { + const n = nodes[i]; + if (n.optimizeNames(names, constants)) + continue; + subtractNames(names, n.names); + nodes.splice(i, 1); + } + return nodes.length > 0 ? this : void 0; + } + get names() { + return this.nodes.reduce((names, n) => addNames(names, n.names), {}); + } + }; + var BlockNode = class extends ParentNode { + render(opts) { + return "{" + opts._n + super.render(opts) + "}" + opts._n; + } + }; + var Root = class extends ParentNode { + }; + var Else = class extends BlockNode { + }; + Else.kind = "else"; + var If = class _If extends BlockNode { + constructor(condition, nodes) { + super(nodes); + this.condition = condition; + } + render(opts) { + let code = `if(${this.condition})` + super.render(opts); + if (this.else) + code += "else " + this.else.render(opts); + return code; + } + optimizeNodes() { + super.optimizeNodes(); + const cond = this.condition; + if (cond === true) + return this.nodes; + let e = this.else; + if (e) { + const ns = e.optimizeNodes(); + e = this.else = Array.isArray(ns) ? new Else(ns) : ns; + } + if (e) { + if (cond === false) + return e instanceof _If ? e : e.nodes; + if (this.nodes.length) + return this; + return new _If(not(cond), e instanceof _If ? [e] : e.nodes); + } + if (cond === false || !this.nodes.length) + return void 0; + return this; + } + optimizeNames(names, constants) { + var _a2; + this.else = (_a2 = this.else) === null || _a2 === void 0 ? void 0 : _a2.optimizeNames(names, constants); + if (!(super.optimizeNames(names, constants) || this.else)) + return; + this.condition = optimizeExpr(this.condition, names, constants); + return this; + } + get names() { + const names = super.names; + addExprNames(names, this.condition); + if (this.else) + addNames(names, this.else.names); + return names; + } + }; + If.kind = "if"; + var For = class extends BlockNode { + }; + For.kind = "for"; + var ForLoop = class extends For { + constructor(iteration) { + super(); + this.iteration = iteration; + } + render(opts) { + return `for(${this.iteration})` + super.render(opts); + } + optimizeNames(names, constants) { + if (!super.optimizeNames(names, constants)) + return; + this.iteration = optimizeExpr(this.iteration, names, constants); + return this; + } + get names() { + return addNames(super.names, this.iteration.names); + } + }; + var ForRange = class extends For { + constructor(varKind, name, from, to) { + super(); + this.varKind = varKind; + this.name = name; + this.from = from; + this.to = to; + } + render(opts) { + const varKind = opts.es5 ? scope_1.varKinds.var : this.varKind; + const { name, from, to } = this; + return `for(${varKind} ${name}=${from}; ${name}<${to}; ${name}++)` + super.render(opts); + } + get names() { + const names = addExprNames(super.names, this.from); + return addExprNames(names, this.to); + } + }; + var ForIter = class extends For { + constructor(loop, varKind, name, iterable) { + super(); + this.loop = loop; + this.varKind = varKind; + this.name = name; + this.iterable = iterable; + } + render(opts) { + return `for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})` + super.render(opts); + } + optimizeNames(names, constants) { + if (!super.optimizeNames(names, constants)) + return; + this.iterable = optimizeExpr(this.iterable, names, constants); + return this; + } + get names() { + return addNames(super.names, this.iterable.names); + } + }; + var Func = class extends BlockNode { + constructor(name, args3, async) { + super(); + this.name = name; + this.args = args3; + this.async = async; + } + render(opts) { + const _async = this.async ? "async " : ""; + return `${_async}function ${this.name}(${this.args})` + super.render(opts); + } + }; + Func.kind = "func"; + var Return = class extends ParentNode { + render(opts) { + return "return " + super.render(opts); + } + }; + Return.kind = "return"; + var Try = class extends BlockNode { + render(opts) { + let code = "try" + super.render(opts); + if (this.catch) + code += this.catch.render(opts); + if (this.finally) + code += this.finally.render(opts); + return code; + } + optimizeNodes() { + var _a2, _b; + super.optimizeNodes(); + (_a2 = this.catch) === null || _a2 === void 0 ? void 0 : _a2.optimizeNodes(); + (_b = this.finally) === null || _b === void 0 ? void 0 : _b.optimizeNodes(); + return this; + } + optimizeNames(names, constants) { + var _a2, _b; + super.optimizeNames(names, constants); + (_a2 = this.catch) === null || _a2 === void 0 ? void 0 : _a2.optimizeNames(names, constants); + (_b = this.finally) === null || _b === void 0 ? void 0 : _b.optimizeNames(names, constants); + return this; + } + get names() { + const names = super.names; + if (this.catch) + addNames(names, this.catch.names); + if (this.finally) + addNames(names, this.finally.names); + return names; + } + }; + var Catch = class extends BlockNode { + constructor(error50) { + super(); + this.error = error50; + } + render(opts) { + return `catch(${this.error})` + super.render(opts); + } + }; + Catch.kind = "catch"; + var Finally = class extends BlockNode { + render(opts) { + return "finally" + super.render(opts); + } + }; + Finally.kind = "finally"; + var CodeGen = class { + constructor(extScope, opts = {}) { + this._values = {}; + this._blockStarts = []; + this._constants = {}; + this.opts = { ...opts, _n: opts.lines ? "\n" : "" }; + this._extScope = extScope; + this._scope = new scope_1.Scope({ parent: extScope }); + this._nodes = [new Root()]; + } + toString() { + return this._root.render(this.opts); + } + // returns unique name in the internal scope + name(prefix) { + return this._scope.name(prefix); + } + // reserves unique name in the external scope + scopeName(prefix) { + return this._extScope.name(prefix); + } + // reserves unique name in the external scope and assigns value to it + scopeValue(prefixOrName, value2) { + const name = this._extScope.value(prefixOrName, value2); + const vs = this._values[name.prefix] || (this._values[name.prefix] = /* @__PURE__ */ new Set()); + vs.add(name); + return name; + } + getScopeValue(prefix, keyOrRef) { + return this._extScope.getValue(prefix, keyOrRef); + } + // return code that assigns values in the external scope to the names that are used internally + // (same names that were returned by gen.scopeName or gen.scopeValue) + scopeRefs(scopeName) { + return this._extScope.scopeRefs(scopeName, this._values); + } + scopeCode() { + return this._extScope.scopeCode(this._values); + } + _def(varKind, nameOrPrefix, rhs, constant) { + const name = this._scope.toName(nameOrPrefix); + if (rhs !== void 0 && constant) + this._constants[name.str] = rhs; + this._leafNode(new Def(varKind, name, rhs)); + return name; + } + // `const` declaration (`var` in es5 mode) + const(nameOrPrefix, rhs, _constant) { + return this._def(scope_1.varKinds.const, nameOrPrefix, rhs, _constant); + } + // `let` declaration with optional assignment (`var` in es5 mode) + let(nameOrPrefix, rhs, _constant) { + return this._def(scope_1.varKinds.let, nameOrPrefix, rhs, _constant); + } + // `var` declaration with optional assignment + var(nameOrPrefix, rhs, _constant) { + return this._def(scope_1.varKinds.var, nameOrPrefix, rhs, _constant); + } + // assignment code + assign(lhs, rhs, sideEffects) { + return this._leafNode(new Assign(lhs, rhs, sideEffects)); + } + // `+=` code + add(lhs, rhs) { + return this._leafNode(new AssignOp(lhs, exports.operators.ADD, rhs)); + } + // appends passed SafeExpr to code or executes Block + code(c) { + if (typeof c == "function") + c(); + else if (c !== code_1.nil) + this._leafNode(new AnyCode(c)); + return this; + } + // returns code for object literal for the passed argument list of key-value pairs + object(...keyValues) { + const code = ["{"]; + for (const [key, value2] of keyValues) { + if (code.length > 1) + code.push(","); + code.push(key); + if (key !== value2 || this.opts.es5) { + code.push(":"); + (0, code_1.addCodeArg)(code, value2); + } + } + code.push("}"); + return new code_1._Code(code); + } + // `if` clause (or statement if `thenBody` and, optionally, `elseBody` are passed) + if(condition, thenBody, elseBody) { + this._blockNode(new If(condition)); + if (thenBody && elseBody) { + this.code(thenBody).else().code(elseBody).endIf(); + } else if (thenBody) { + this.code(thenBody).endIf(); + } else if (elseBody) { + throw new Error('CodeGen: "else" body without "then" body'); + } + return this; + } + // `else if` clause - invalid without `if` or after `else` clauses + elseIf(condition) { + return this._elseNode(new If(condition)); + } + // `else` clause - only valid after `if` or `else if` clauses + else() { + return this._elseNode(new Else()); + } + // end `if` statement (needed if gen.if was used only with condition) + endIf() { + return this._endBlockNode(If, Else); + } + _for(node2, forBody) { + this._blockNode(node2); + if (forBody) + this.code(forBody).endFor(); + return this; + } + // a generic `for` clause (or statement if `forBody` is passed) + for(iteration, forBody) { + return this._for(new ForLoop(iteration), forBody); + } + // `for` statement for a range of values + forRange(nameOrPrefix, from, to, forBody, varKind = this.opts.es5 ? scope_1.varKinds.var : scope_1.varKinds.let) { + const name = this._scope.toName(nameOrPrefix); + return this._for(new ForRange(varKind, name, from, to), () => forBody(name)); + } + // `for-of` statement (in es5 mode replace with a normal for loop) + forOf(nameOrPrefix, iterable, forBody, varKind = scope_1.varKinds.const) { + const name = this._scope.toName(nameOrPrefix); + if (this.opts.es5) { + const arr = iterable instanceof code_1.Name ? iterable : this.var("_arr", iterable); + return this.forRange("_i", 0, (0, code_1._)`${arr}.length`, (i) => { + this.var(name, (0, code_1._)`${arr}[${i}]`); + forBody(name); + }); + } + return this._for(new ForIter("of", varKind, name, iterable), () => forBody(name)); + } + // `for-in` statement. + // With option `ownProperties` replaced with a `for-of` loop for object keys + forIn(nameOrPrefix, obj, forBody, varKind = this.opts.es5 ? scope_1.varKinds.var : scope_1.varKinds.const) { + if (this.opts.ownProperties) { + return this.forOf(nameOrPrefix, (0, code_1._)`Object.keys(${obj})`, forBody); + } + const name = this._scope.toName(nameOrPrefix); + return this._for(new ForIter("in", varKind, name, obj), () => forBody(name)); + } + // end `for` loop + endFor() { + return this._endBlockNode(For); + } + // `label` statement + label(label) { + return this._leafNode(new Label(label)); + } + // `break` statement + break(label) { + return this._leafNode(new Break(label)); + } + // `return` statement + return(value2) { + const node2 = new Return(); + this._blockNode(node2); + this.code(value2); + if (node2.nodes.length !== 1) + throw new Error('CodeGen: "return" should have one node'); + return this._endBlockNode(Return); + } + // `try` statement + try(tryBody, catchCode, finallyCode) { + if (!catchCode && !finallyCode) + throw new Error('CodeGen: "try" without "catch" and "finally"'); + const node2 = new Try(); + this._blockNode(node2); + this.code(tryBody); + if (catchCode) { + const error50 = this.name("e"); + this._currNode = node2.catch = new Catch(error50); + catchCode(error50); + } + if (finallyCode) { + this._currNode = node2.finally = new Finally(); + this.code(finallyCode); + } + return this._endBlockNode(Catch, Finally); + } + // `throw` statement + throw(error50) { + return this._leafNode(new Throw(error50)); + } + // start self-balancing block + block(body, nodeCount) { + this._blockStarts.push(this._nodes.length); + if (body) + this.code(body).endBlock(nodeCount); + return this; + } + // end the current self-balancing block + endBlock(nodeCount) { + const len = this._blockStarts.pop(); + if (len === void 0) + throw new Error("CodeGen: not in self-balancing block"); + const toClose = this._nodes.length - len; + if (toClose < 0 || nodeCount !== void 0 && toClose !== nodeCount) { + throw new Error(`CodeGen: wrong number of nodes: ${toClose} vs ${nodeCount} expected`); + } + this._nodes.length = len; + return this; + } + // `function` heading (or definition if funcBody is passed) + func(name, args3 = code_1.nil, async, funcBody) { + this._blockNode(new Func(name, args3, async)); + if (funcBody) + this.code(funcBody).endFunc(); + return this; + } + // end function definition + endFunc() { + return this._endBlockNode(Func); + } + optimize(n = 1) { + while (n-- > 0) { + this._root.optimizeNodes(); + this._root.optimizeNames(this._root.names, this._constants); + } + } + _leafNode(node2) { + this._currNode.nodes.push(node2); + return this; + } + _blockNode(node2) { + this._currNode.nodes.push(node2); + this._nodes.push(node2); + } + _endBlockNode(N1, N2) { + const n = this._currNode; + if (n instanceof N1 || N2 && n instanceof N2) { + this._nodes.pop(); + return this; + } + throw new Error(`CodeGen: not in block "${N2 ? `${N1.kind}/${N2.kind}` : N1.kind}"`); + } + _elseNode(node2) { + const n = this._currNode; + if (!(n instanceof If)) { + throw new Error('CodeGen: "else" without "if"'); + } + this._currNode = n.else = node2; + return this; + } + get _root() { + return this._nodes[0]; + } + get _currNode() { + const ns = this._nodes; + return ns[ns.length - 1]; + } + set _currNode(node2) { + const ns = this._nodes; + ns[ns.length - 1] = node2; + } + }; + exports.CodeGen = CodeGen; + function addNames(names, from) { + for (const n in from) + names[n] = (names[n] || 0) + (from[n] || 0); + return names; } + function addExprNames(names, from) { + return from instanceof code_1._CodeOrName ? addNames(names, from.names) : names; + } + function optimizeExpr(expr, names, constants) { + if (expr instanceof code_1.Name) + return replaceName(expr); + if (!canOptimize(expr)) + return expr; + return new code_1._Code(expr._items.reduce((items, c) => { + if (c instanceof code_1.Name) + c = replaceName(c); + if (c instanceof code_1._Code) + items.push(...c._items); + else + items.push(c); + return items; + }, [])); + function replaceName(n) { + const c = constants[n.str]; + if (c === void 0 || names[n.str] !== 1) + return n; + delete names[n.str]; + return c; + } + function canOptimize(e) { + return e instanceof code_1._Code && e._items.some((c) => c instanceof code_1.Name && names[c.str] === 1 && constants[c.str] !== void 0); + } + } + function subtractNames(names, from) { + for (const n in from) + names[n] = (names[n] || 0) - (from[n] || 0); + } + function not(x) { + return typeof x == "boolean" || typeof x == "number" || x === null ? !x : (0, code_1._)`!${par(x)}`; + } + exports.not = not; + var andCode = mappend(exports.operators.AND); + function and(...args3) { + return args3.reduce(andCode); + } + exports.and = and; + var orCode = mappend(exports.operators.OR); + function or(...args3) { + return args3.reduce(orCode); + } + exports.or = or; + function mappend(op) { + return (x, y) => x === code_1.nil ? y : y === code_1.nil ? x : (0, code_1._)`${par(x)} ${op} ${par(y)}`; + } + function par(x) { + return x instanceof code_1.Name ? x : (0, code_1._)`(${x})`; + } + } +}); + +// ../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/compile/util.js +var require_util9 = __commonJS({ + "../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/compile/util.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.checkStrictMode = exports.getErrorPath = exports.Type = exports.useFunc = exports.setEvaluated = exports.evaluatedPropsToName = exports.mergeEvaluated = exports.eachItem = exports.unescapeJsonPointer = exports.escapeJsonPointer = exports.escapeFragment = exports.unescapeFragment = exports.schemaRefOrVal = exports.schemaHasRulesButRef = exports.schemaHasRules = exports.checkUnknownRules = exports.alwaysValidSchema = exports.toHash = void 0; + var codegen_1 = require_codegen2(); + var code_1 = require_code3(); + function toHash(arr) { + const hash2 = {}; + for (const item of arr) + hash2[item] = true; + return hash2; + } + exports.toHash = toHash; + function alwaysValidSchema(it, schema2) { + if (typeof schema2 == "boolean") + return schema2; + if (Object.keys(schema2).length === 0) + return true; + checkUnknownRules(it, schema2); + return !schemaHasRules(schema2, it.self.RULES.all); + } + exports.alwaysValidSchema = alwaysValidSchema; + function checkUnknownRules(it, schema2 = it.schema) { + const { opts, self: self2 } = it; + if (!opts.strictSchema) + return; + if (typeof schema2 === "boolean") + return; + const rules = self2.RULES.keywords; + for (const key in schema2) { + if (!rules[key]) + checkStrictMode(it, `unknown keyword: "${key}"`); + } + } + exports.checkUnknownRules = checkUnknownRules; function schemaHasRules(schema2, rules) { - if (typeof schema2 == "boolean") return !schema2; - for (var key in schema2) if (rules[key]) return true; + if (typeof schema2 == "boolean") + return !schema2; + for (const key in schema2) + if (rules[key]) + return true; + return false; } - function schemaHasRulesExcept(schema2, rules, exceptKeyword) { - if (typeof schema2 == "boolean") return !schema2 && exceptKeyword != "not"; - for (var key in schema2) if (key != exceptKeyword && rules[key]) return true; + exports.schemaHasRules = schemaHasRules; + function schemaHasRulesButRef(schema2, RULES) { + if (typeof schema2 == "boolean") + return !schema2; + for (const key in schema2) + if (key !== "$ref" && RULES.all[key]) + return true; + return false; } - function schemaUnknownRules(schema2, rules) { - if (typeof schema2 == "boolean") return; - for (var key in schema2) if (!rules[key]) return key; - } - function toQuotedString(str) { - return "'" + escapeQuotes(str) + "'"; - } - function getPathExpr(currentPath, expr, jsonPointers, isNumber2) { - var path4 = jsonPointers ? "'/' + " + expr + (isNumber2 ? "" : ".replace(/~/g, '~0').replace(/\\//g, '~1')") : isNumber2 ? "'[' + " + expr + " + ']'" : "'[\\'' + " + expr + " + '\\']'"; - return joinPaths(currentPath, path4); - } - function getPath(currentPath, prop, jsonPointers) { - var path4 = jsonPointers ? toQuotedString("/" + escapeJsonPointer(prop)) : toQuotedString(getProperty(prop)); - return joinPaths(currentPath, path4); - } - var JSON_POINTER = /^\/(?:[^~]|~0|~1)*$/; - var RELATIVE_JSON_POINTER = /^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/; - function getData($data, lvl, paths) { - var up, jsonPointer, data, matches; - if ($data === "") return "rootData"; - if ($data[0] == "/") { - if (!JSON_POINTER.test($data)) throw new Error("Invalid JSON-pointer: " + $data); - jsonPointer = $data; - data = "rootData"; - } else { - matches = $data.match(RELATIVE_JSON_POINTER); - if (!matches) throw new Error("Invalid JSON-pointer: " + $data); - up = +matches[1]; - jsonPointer = matches[2]; - if (jsonPointer == "#") { - if (up >= lvl) throw new Error("Cannot access property/index " + up + " levels up, current level is " + lvl); - return paths[lvl - up]; - } - if (up > lvl) throw new Error("Cannot access data " + up + " levels up, current level is " + lvl); - data = "data" + (lvl - up || ""); - if (!jsonPointer) return data; + exports.schemaHasRulesButRef = schemaHasRulesButRef; + function schemaRefOrVal({ topSchemaRef, schemaPath }, schema2, keyword, $data) { + if (!$data) { + if (typeof schema2 == "number" || typeof schema2 == "boolean") + return schema2; + if (typeof schema2 == "string") + return (0, codegen_1._)`${schema2}`; } - var expr = data; - var segments = jsonPointer.split("/"); - for (var i = 0; i < segments.length; i++) { - var segment = segments[i]; - if (segment) { - data += getProperty(unescapeJsonPointer(segment)); - expr += " && " + data; - } - } - return expr; - } - function joinPaths(a, b) { - if (a == '""') return b; - return (a + " + " + b).replace(/([^\\])' \+ '/g, "$1"); + return (0, codegen_1._)`${topSchemaRef}${schemaPath}${(0, codegen_1.getProperty)(keyword)}`; } + exports.schemaRefOrVal = schemaRefOrVal; function unescapeFragment(str) { return unescapeJsonPointer(decodeURIComponent(str)); } + exports.unescapeFragment = unescapeFragment; function escapeFragment(str) { return encodeURIComponent(escapeJsonPointer(str)); } + exports.escapeFragment = escapeFragment; function escapeJsonPointer(str) { + if (typeof str == "number") + return `${str}`; return str.replace(/~/g, "~0").replace(/\//g, "~1"); } + exports.escapeJsonPointer = escapeJsonPointer; function unescapeJsonPointer(str) { return str.replace(/~1/g, "/").replace(/~0/g, "~"); } + exports.unescapeJsonPointer = unescapeJsonPointer; + function eachItem(xs, f) { + if (Array.isArray(xs)) { + for (const x of xs) + f(x); + } else { + f(xs); + } + } + exports.eachItem = eachItem; + function makeMergeEvaluated({ mergeNames, mergeToName, mergeValues: mergeValues6, resultToName }) { + return (gen, from, to, toName) => { + const res = to === void 0 ? from : to instanceof codegen_1.Name ? (from instanceof codegen_1.Name ? mergeNames(gen, from, to) : mergeToName(gen, from, to), to) : from instanceof codegen_1.Name ? (mergeToName(gen, to, from), from) : mergeValues6(from, to); + return toName === codegen_1.Name && !(res instanceof codegen_1.Name) ? resultToName(gen, res) : res; + }; + } + exports.mergeEvaluated = { + props: makeMergeEvaluated({ + mergeNames: (gen, from, to) => gen.if((0, codegen_1._)`${to} !== true && ${from} !== undefined`, () => { + gen.if((0, codegen_1._)`${from} === true`, () => gen.assign(to, true), () => gen.assign(to, (0, codegen_1._)`${to} || {}`).code((0, codegen_1._)`Object.assign(${to}, ${from})`)); + }), + mergeToName: (gen, from, to) => gen.if((0, codegen_1._)`${to} !== true`, () => { + if (from === true) { + gen.assign(to, true); + } else { + gen.assign(to, (0, codegen_1._)`${to} || {}`); + setEvaluated(gen, to, from); + } + }), + mergeValues: (from, to) => from === true ? true : { ...from, ...to }, + resultToName: evaluatedPropsToName + }), + items: makeMergeEvaluated({ + mergeNames: (gen, from, to) => gen.if((0, codegen_1._)`${to} !== true && ${from} !== undefined`, () => gen.assign(to, (0, codegen_1._)`${from} === true ? true : ${to} > ${from} ? ${to} : ${from}`)), + mergeToName: (gen, from, to) => gen.if((0, codegen_1._)`${to} !== true`, () => gen.assign(to, from === true ? true : (0, codegen_1._)`${to} > ${from} ? ${to} : ${from}`)), + mergeValues: (from, to) => from === true ? true : Math.max(from, to), + resultToName: (gen, items) => gen.var("items", items) + }) + }; + function evaluatedPropsToName(gen, ps) { + if (ps === true) + return gen.var("props", true); + const props = gen.var("props", (0, codegen_1._)`{}`); + if (ps !== void 0) + setEvaluated(gen, props, ps); + return props; + } + exports.evaluatedPropsToName = evaluatedPropsToName; + function setEvaluated(gen, props, ps) { + Object.keys(ps).forEach((p) => gen.assign((0, codegen_1._)`${props}${(0, codegen_1.getProperty)(p)}`, true)); + } + exports.setEvaluated = setEvaluated; + var snippets = {}; + function useFunc(gen, f) { + return gen.scopeValue("func", { + ref: f, + code: snippets[f.code] || (snippets[f.code] = new code_1._Code(f.code)) + }); + } + exports.useFunc = useFunc; + var Type2; + (function(Type3) { + Type3[Type3["Num"] = 0] = "Num"; + Type3[Type3["Str"] = 1] = "Str"; + })(Type2 || (exports.Type = Type2 = {})); + function getErrorPath(dataProp, dataPropType, jsPropertySyntax) { + if (dataProp instanceof codegen_1.Name) { + const isNumber2 = dataPropType === Type2.Num; + return jsPropertySyntax ? isNumber2 ? (0, codegen_1._)`"[" + ${dataProp} + "]"` : (0, codegen_1._)`"['" + ${dataProp} + "']"` : isNumber2 ? (0, codegen_1._)`"/" + ${dataProp}` : (0, codegen_1._)`"/" + ${dataProp}.replace(/~/g, "~0").replace(/\\//g, "~1")`; + } + return jsPropertySyntax ? (0, codegen_1.getProperty)(dataProp).toString() : "/" + escapeJsonPointer(dataProp); + } + exports.getErrorPath = getErrorPath; + function checkStrictMode(it, msg, mode = it.opts.strictSchema) { + if (!mode) + return; + msg = `strict mode: ${msg}`; + if (mode === true) + throw new Error(msg); + it.self.logger.warn(msg); + } + exports.checkStrictMode = checkStrictMode; } }); -// node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/compile/schema_obj.js -var require_schema_obj2 = __commonJS({ - "node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/compile/schema_obj.js"(exports, module) { +// ../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/compile/names.js +var require_names2 = __commonJS({ + "../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/compile/names.js"(exports) { "use strict"; - var util3 = require_util9(); - module.exports = SchemaObject; - function SchemaObject(obj) { - util3.copy(obj, this); + Object.defineProperty(exports, "__esModule", { value: true }); + var codegen_1 = require_codegen2(); + var names = { + // validation function arguments + data: new codegen_1.Name("data"), + // data passed to validation function + // args passed from referencing schema + valCxt: new codegen_1.Name("valCxt"), + // validation/data context - should not be used directly, it is destructured to the names below + instancePath: new codegen_1.Name("instancePath"), + parentData: new codegen_1.Name("parentData"), + parentDataProperty: new codegen_1.Name("parentDataProperty"), + rootData: new codegen_1.Name("rootData"), + // root data - same as the data passed to the first/top validation function + dynamicAnchors: new codegen_1.Name("dynamicAnchors"), + // used to support recursiveRef and dynamicRef + // function scoped variables + vErrors: new codegen_1.Name("vErrors"), + // null or array of validation errors + errors: new codegen_1.Name("errors"), + // counter of validation errors + this: new codegen_1.Name("this"), + // "globals" + self: new codegen_1.Name("self"), + scope: new codegen_1.Name("scope"), + // JTD serialize/parse name for JSON string and position + json: new codegen_1.Name("json"), + jsonPos: new codegen_1.Name("jsonPos"), + jsonLen: new codegen_1.Name("jsonLen"), + jsonPart: new codegen_1.Name("jsonPart") + }; + exports.default = names; + } +}); + +// ../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/compile/errors.js +var require_errors3 = __commonJS({ + "../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/compile/errors.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.extendErrors = exports.resetErrorsCount = exports.reportExtraError = exports.reportError = exports.keyword$DataError = exports.keywordError = void 0; + var codegen_1 = require_codegen2(); + var util_1 = require_util9(); + var names_1 = require_names2(); + exports.keywordError = { + message: ({ keyword }) => (0, codegen_1.str)`must pass "${keyword}" keyword validation` + }; + exports.keyword$DataError = { + message: ({ keyword, schemaType }) => schemaType ? (0, codegen_1.str)`"${keyword}" keyword must be ${schemaType} ($data)` : (0, codegen_1.str)`"${keyword}" keyword is invalid ($data)` + }; + function reportError(cxt, error50 = exports.keywordError, errorPaths, overrideAllErrors) { + const { it } = cxt; + const { gen, compositeRule, allErrors } = it; + const errObj = errorObjectCode(cxt, error50, errorPaths); + if (overrideAllErrors !== null && overrideAllErrors !== void 0 ? overrideAllErrors : compositeRule || allErrors) { + addError(gen, errObj); + } else { + returnErrors(it, (0, codegen_1._)`[${errObj}]`); + } + } + exports.reportError = reportError; + function reportExtraError(cxt, error50 = exports.keywordError, errorPaths) { + const { it } = cxt; + const { gen, compositeRule, allErrors } = it; + const errObj = errorObjectCode(cxt, error50, errorPaths); + addError(gen, errObj); + if (!(compositeRule || allErrors)) { + returnErrors(it, names_1.default.vErrors); + } + } + exports.reportExtraError = reportExtraError; + function resetErrorsCount(gen, errsCount) { + gen.assign(names_1.default.errors, errsCount); + gen.if((0, codegen_1._)`${names_1.default.vErrors} !== null`, () => gen.if(errsCount, () => gen.assign((0, codegen_1._)`${names_1.default.vErrors}.length`, errsCount), () => gen.assign(names_1.default.vErrors, null))); + } + exports.resetErrorsCount = resetErrorsCount; + function extendErrors({ gen, keyword, schemaValue, data, errsCount, it }) { + if (errsCount === void 0) + throw new Error("ajv implementation error"); + const err = gen.name("err"); + gen.forRange("i", errsCount, names_1.default.errors, (i) => { + gen.const(err, (0, codegen_1._)`${names_1.default.vErrors}[${i}]`); + gen.if((0, codegen_1._)`${err}.instancePath === undefined`, () => gen.assign((0, codegen_1._)`${err}.instancePath`, (0, codegen_1.strConcat)(names_1.default.instancePath, it.errorPath))); + gen.assign((0, codegen_1._)`${err}.schemaPath`, (0, codegen_1.str)`${it.errSchemaPath}/${keyword}`); + if (it.opts.verbose) { + gen.assign((0, codegen_1._)`${err}.schema`, schemaValue); + gen.assign((0, codegen_1._)`${err}.data`, data); + } + }); + } + exports.extendErrors = extendErrors; + function addError(gen, errObj) { + const err = gen.const("err", errObj); + gen.if((0, codegen_1._)`${names_1.default.vErrors} === null`, () => gen.assign(names_1.default.vErrors, (0, codegen_1._)`[${err}]`), (0, codegen_1._)`${names_1.default.vErrors}.push(${err})`); + gen.code((0, codegen_1._)`${names_1.default.errors}++`); + } + function returnErrors(it, errs) { + const { gen, validateName, schemaEnv } = it; + if (schemaEnv.$async) { + gen.throw((0, codegen_1._)`new ${it.ValidationError}(${errs})`); + } else { + gen.assign((0, codegen_1._)`${validateName}.errors`, errs); + gen.return(false); + } + } + var E = { + keyword: new codegen_1.Name("keyword"), + schemaPath: new codegen_1.Name("schemaPath"), + // also used in JTD errors + params: new codegen_1.Name("params"), + propertyName: new codegen_1.Name("propertyName"), + message: new codegen_1.Name("message"), + schema: new codegen_1.Name("schema"), + parentSchema: new codegen_1.Name("parentSchema") + }; + function errorObjectCode(cxt, error50, errorPaths) { + const { createErrors } = cxt.it; + if (createErrors === false) + return (0, codegen_1._)`{}`; + return errorObject(cxt, error50, errorPaths); + } + function errorObject(cxt, error50, errorPaths = {}) { + const { gen, it } = cxt; + const keyValues = [ + errorInstancePath(it, errorPaths), + errorSchemaPath(cxt, errorPaths) + ]; + extraErrorProps(cxt, error50, keyValues); + return gen.object(...keyValues); + } + function errorInstancePath({ errorPath }, { instancePath }) { + const instPath = instancePath ? (0, codegen_1.str)`${errorPath}${(0, util_1.getErrorPath)(instancePath, util_1.Type.Str)}` : errorPath; + return [names_1.default.instancePath, (0, codegen_1.strConcat)(names_1.default.instancePath, instPath)]; + } + function errorSchemaPath({ keyword, it: { errSchemaPath } }, { schemaPath, parentSchema }) { + let schPath = parentSchema ? errSchemaPath : (0, codegen_1.str)`${errSchemaPath}/${keyword}`; + if (schemaPath) { + schPath = (0, codegen_1.str)`${schPath}${(0, util_1.getErrorPath)(schemaPath, util_1.Type.Str)}`; + } + return [E.schemaPath, schPath]; + } + function extraErrorProps(cxt, { params, message }, keyValues) { + const { keyword, data, schemaValue, it } = cxt; + const { opts, propertyName, topSchemaRef, schemaPath } = it; + keyValues.push([E.keyword, keyword], [E.params, typeof params == "function" ? params(cxt) : params || (0, codegen_1._)`{}`]); + if (opts.messages) { + keyValues.push([E.message, typeof message == "function" ? message(cxt) : message]); + } + if (opts.verbose) { + keyValues.push([E.schema, schemaValue], [E.parentSchema, (0, codegen_1._)`${topSchemaRef}${schemaPath}`], [names_1.default.data, data]); + } + if (propertyName) + keyValues.push([E.propertyName, propertyName]); } } }); -// node_modules/.pnpm/json-schema-traverse@0.4.1/node_modules/json-schema-traverse/index.js +// ../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/compile/validate/boolSchema.js +var require_boolSchema2 = __commonJS({ + "../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/compile/validate/boolSchema.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.boolOrEmptySchema = exports.topBoolOrEmptySchema = void 0; + var errors_1 = require_errors3(); + var codegen_1 = require_codegen2(); + var names_1 = require_names2(); + var boolError = { + message: "boolean schema is false" + }; + function topBoolOrEmptySchema(it) { + const { gen, schema: schema2, validateName } = it; + if (schema2 === false) { + falseSchemaError(it, false); + } else if (typeof schema2 == "object" && schema2.$async === true) { + gen.return(names_1.default.data); + } else { + gen.assign((0, codegen_1._)`${validateName}.errors`, null); + gen.return(true); + } + } + exports.topBoolOrEmptySchema = topBoolOrEmptySchema; + function boolOrEmptySchema(it, valid) { + const { gen, schema: schema2 } = it; + if (schema2 === false) { + gen.var(valid, false); + falseSchemaError(it); + } else { + gen.var(valid, true); + } + } + exports.boolOrEmptySchema = boolOrEmptySchema; + function falseSchemaError(it, overrideAllErrors) { + const { gen, data } = it; + const cxt = { + gen, + keyword: "false schema", + data, + schema: false, + schemaCode: false, + schemaValue: false, + params: {}, + it + }; + (0, errors_1.reportError)(cxt, boolError, void 0, overrideAllErrors); + } + } +}); + +// ../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/compile/rules.js +var require_rules2 = __commonJS({ + "../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/compile/rules.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.getRules = exports.isJSONType = void 0; + var _jsonTypes = ["string", "number", "integer", "boolean", "null", "object", "array"]; + var jsonTypes = new Set(_jsonTypes); + function isJSONType(x) { + return typeof x == "string" && jsonTypes.has(x); + } + exports.isJSONType = isJSONType; + function getRules() { + const groups2 = { + number: { type: "number", rules: [] }, + string: { type: "string", rules: [] }, + array: { type: "array", rules: [] }, + object: { type: "object", rules: [] } + }; + return { + types: { ...groups2, integer: true, boolean: true, null: true }, + rules: [{ rules: [] }, groups2.number, groups2.string, groups2.array, groups2.object], + post: { rules: [] }, + all: {}, + keywords: {} + }; + } + exports.getRules = getRules; + } +}); + +// ../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/compile/validate/applicability.js +var require_applicability2 = __commonJS({ + "../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/compile/validate/applicability.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.shouldUseRule = exports.shouldUseGroup = exports.schemaHasRulesForType = void 0; + function schemaHasRulesForType({ schema: schema2, self: self2 }, type2) { + const group2 = self2.RULES.types[type2]; + return group2 && group2 !== true && shouldUseGroup(schema2, group2); + } + exports.schemaHasRulesForType = schemaHasRulesForType; + function shouldUseGroup(schema2, group2) { + return group2.rules.some((rule) => shouldUseRule(schema2, rule)); + } + exports.shouldUseGroup = shouldUseGroup; + function shouldUseRule(schema2, rule) { + var _a2; + return schema2[rule.keyword] !== void 0 || ((_a2 = rule.definition.implements) === null || _a2 === void 0 ? void 0 : _a2.some((kwd) => schema2[kwd] !== void 0)); + } + exports.shouldUseRule = shouldUseRule; + } +}); + +// ../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/compile/validate/dataType.js +var require_dataType2 = __commonJS({ + "../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/compile/validate/dataType.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.reportTypeError = exports.checkDataTypes = exports.checkDataType = exports.coerceAndCheckDataType = exports.getJSONTypes = exports.getSchemaTypes = exports.DataType = void 0; + var rules_1 = require_rules2(); + var applicability_1 = require_applicability2(); + var errors_1 = require_errors3(); + var codegen_1 = require_codegen2(); + var util_1 = require_util9(); + var DataType; + (function(DataType2) { + DataType2[DataType2["Correct"] = 0] = "Correct"; + DataType2[DataType2["Wrong"] = 1] = "Wrong"; + })(DataType || (exports.DataType = DataType = {})); + function getSchemaTypes(schema2) { + const types = getJSONTypes(schema2.type); + const hasNull = types.includes("null"); + if (hasNull) { + if (schema2.nullable === false) + throw new Error("type: null contradicts nullable: false"); + } else { + if (!types.length && schema2.nullable !== void 0) { + throw new Error('"nullable" cannot be used without "type"'); + } + if (schema2.nullable === true) + types.push("null"); + } + return types; + } + exports.getSchemaTypes = getSchemaTypes; + function getJSONTypes(ts) { + const types = Array.isArray(ts) ? ts : ts ? [ts] : []; + if (types.every(rules_1.isJSONType)) + return types; + throw new Error("type must be JSONType or JSONType[]: " + types.join(",")); + } + exports.getJSONTypes = getJSONTypes; + function coerceAndCheckDataType(it, types) { + const { gen, data, opts } = it; + const coerceTo = coerceToTypes(types, opts.coerceTypes); + const checkTypes = types.length > 0 && !(coerceTo.length === 0 && types.length === 1 && (0, applicability_1.schemaHasRulesForType)(it, types[0])); + if (checkTypes) { + const wrongType = checkDataTypes(types, data, opts.strictNumbers, DataType.Wrong); + gen.if(wrongType, () => { + if (coerceTo.length) + coerceData(it, types, coerceTo); + else + reportTypeError(it); + }); + } + return checkTypes; + } + exports.coerceAndCheckDataType = coerceAndCheckDataType; + var COERCIBLE = /* @__PURE__ */ new Set(["string", "number", "integer", "boolean", "null"]); + function coerceToTypes(types, coerceTypes) { + return coerceTypes ? types.filter((t) => COERCIBLE.has(t) || coerceTypes === "array" && t === "array") : []; + } + function coerceData(it, types, coerceTo) { + const { gen, data, opts } = it; + const dataType = gen.let("dataType", (0, codegen_1._)`typeof ${data}`); + const coerced = gen.let("coerced", (0, codegen_1._)`undefined`); + if (opts.coerceTypes === "array") { + gen.if((0, codegen_1._)`${dataType} == 'object' && Array.isArray(${data}) && ${data}.length == 1`, () => gen.assign(data, (0, codegen_1._)`${data}[0]`).assign(dataType, (0, codegen_1._)`typeof ${data}`).if(checkDataTypes(types, data, opts.strictNumbers), () => gen.assign(coerced, data))); + } + gen.if((0, codegen_1._)`${coerced} !== undefined`); + for (const t of coerceTo) { + if (COERCIBLE.has(t) || t === "array" && opts.coerceTypes === "array") { + coerceSpecificType(t); + } + } + gen.else(); + reportTypeError(it); + gen.endIf(); + gen.if((0, codegen_1._)`${coerced} !== undefined`, () => { + gen.assign(data, coerced); + assignParentData(it, coerced); + }); + function coerceSpecificType(t) { + switch (t) { + case "string": + gen.elseIf((0, codegen_1._)`${dataType} == "number" || ${dataType} == "boolean"`).assign(coerced, (0, codegen_1._)`"" + ${data}`).elseIf((0, codegen_1._)`${data} === null`).assign(coerced, (0, codegen_1._)`""`); + return; + case "number": + gen.elseIf((0, codegen_1._)`${dataType} == "boolean" || ${data} === null + || (${dataType} == "string" && ${data} && ${data} == +${data})`).assign(coerced, (0, codegen_1._)`+${data}`); + return; + case "integer": + gen.elseIf((0, codegen_1._)`${dataType} === "boolean" || ${data} === null + || (${dataType} === "string" && ${data} && ${data} == +${data} && !(${data} % 1))`).assign(coerced, (0, codegen_1._)`+${data}`); + return; + case "boolean": + gen.elseIf((0, codegen_1._)`${data} === "false" || ${data} === 0 || ${data} === null`).assign(coerced, false).elseIf((0, codegen_1._)`${data} === "true" || ${data} === 1`).assign(coerced, true); + return; + case "null": + gen.elseIf((0, codegen_1._)`${data} === "" || ${data} === 0 || ${data} === false`); + gen.assign(coerced, null); + return; + case "array": + gen.elseIf((0, codegen_1._)`${dataType} === "string" || ${dataType} === "number" + || ${dataType} === "boolean" || ${data} === null`).assign(coerced, (0, codegen_1._)`[${data}]`); + } + } + } + function assignParentData({ gen, parentData, parentDataProperty }, expr) { + gen.if((0, codegen_1._)`${parentData} !== undefined`, () => gen.assign((0, codegen_1._)`${parentData}[${parentDataProperty}]`, expr)); + } + function checkDataType(dataType, data, strictNums, correct = DataType.Correct) { + const EQ = correct === DataType.Correct ? codegen_1.operators.EQ : codegen_1.operators.NEQ; + let cond; + switch (dataType) { + case "null": + return (0, codegen_1._)`${data} ${EQ} null`; + case "array": + cond = (0, codegen_1._)`Array.isArray(${data})`; + break; + case "object": + cond = (0, codegen_1._)`${data} && typeof ${data} == "object" && !Array.isArray(${data})`; + break; + case "integer": + cond = numCond((0, codegen_1._)`!(${data} % 1) && !isNaN(${data})`); + break; + case "number": + cond = numCond(); + break; + default: + return (0, codegen_1._)`typeof ${data} ${EQ} ${dataType}`; + } + return correct === DataType.Correct ? cond : (0, codegen_1.not)(cond); + function numCond(_cond = codegen_1.nil) { + return (0, codegen_1.and)((0, codegen_1._)`typeof ${data} == "number"`, _cond, strictNums ? (0, codegen_1._)`isFinite(${data})` : codegen_1.nil); + } + } + exports.checkDataType = checkDataType; + function checkDataTypes(dataTypes, data, strictNums, correct) { + if (dataTypes.length === 1) { + return checkDataType(dataTypes[0], data, strictNums, correct); + } + let cond; + const types = (0, util_1.toHash)(dataTypes); + if (types.array && types.object) { + const notObj = (0, codegen_1._)`typeof ${data} != "object"`; + cond = types.null ? notObj : (0, codegen_1._)`!${data} || ${notObj}`; + delete types.null; + delete types.array; + delete types.object; + } else { + cond = codegen_1.nil; + } + if (types.number) + delete types.integer; + for (const t in types) + cond = (0, codegen_1.and)(cond, checkDataType(t, data, strictNums, correct)); + return cond; + } + exports.checkDataTypes = checkDataTypes; + var typeError = { + message: ({ schema: schema2 }) => `must be ${schema2}`, + params: ({ schema: schema2, schemaValue }) => typeof schema2 == "string" ? (0, codegen_1._)`{type: ${schema2}}` : (0, codegen_1._)`{type: ${schemaValue}}` + }; + function reportTypeError(it) { + const cxt = getTypeErrorContext(it); + (0, errors_1.reportError)(cxt, typeError); + } + exports.reportTypeError = reportTypeError; + function getTypeErrorContext(it) { + const { gen, data, schema: schema2 } = it; + const schemaCode = (0, util_1.schemaRefOrVal)(it, schema2, "type"); + return { + gen, + keyword: "type", + data, + schema: schema2.type, + schemaCode, + schemaValue: schemaCode, + parentSchema: schema2, + params: {}, + it + }; + } + } +}); + +// ../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/compile/validate/defaults.js +var require_defaults2 = __commonJS({ + "../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/compile/validate/defaults.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.assignDefaults = void 0; + var codegen_1 = require_codegen2(); + var util_1 = require_util9(); + function assignDefaults(it, ty) { + const { properties, items } = it.schema; + if (ty === "object" && properties) { + for (const key in properties) { + assignDefault(it, key, properties[key].default); + } + } else if (ty === "array" && Array.isArray(items)) { + items.forEach((sch, i) => assignDefault(it, i, sch.default)); + } + } + exports.assignDefaults = assignDefaults; + function assignDefault(it, prop, defaultValue) { + const { gen, compositeRule, data, opts } = it; + if (defaultValue === void 0) + return; + const childData = (0, codegen_1._)`${data}${(0, codegen_1.getProperty)(prop)}`; + if (compositeRule) { + (0, util_1.checkStrictMode)(it, `default is ignored for: ${childData}`); + return; + } + let condition = (0, codegen_1._)`${childData} === undefined`; + if (opts.useDefaults === "empty") { + condition = (0, codegen_1._)`${condition} || ${childData} === null || ${childData} === ""`; + } + gen.if(condition, (0, codegen_1._)`${childData} = ${(0, codegen_1.stringify)(defaultValue)}`); + } + } +}); + +// ../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/code.js +var require_code4 = __commonJS({ + "../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/code.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.validateUnion = exports.validateArray = exports.usePattern = exports.callValidateCode = exports.schemaProperties = exports.allSchemaProperties = exports.noPropertyInData = exports.propertyInData = exports.isOwnProperty = exports.hasPropFunc = exports.reportMissingProp = exports.checkMissingProp = exports.checkReportMissingProp = void 0; + var codegen_1 = require_codegen2(); + var util_1 = require_util9(); + var names_1 = require_names2(); + var util_2 = require_util9(); + function checkReportMissingProp(cxt, prop) { + const { gen, data, it } = cxt; + gen.if(noPropertyInData(gen, data, prop, it.opts.ownProperties), () => { + cxt.setParams({ missingProperty: (0, codegen_1._)`${prop}` }, true); + cxt.error(); + }); + } + exports.checkReportMissingProp = checkReportMissingProp; + function checkMissingProp({ gen, data, it: { opts } }, properties, missing) { + return (0, codegen_1.or)(...properties.map((prop) => (0, codegen_1.and)(noPropertyInData(gen, data, prop, opts.ownProperties), (0, codegen_1._)`${missing} = ${prop}`))); + } + exports.checkMissingProp = checkMissingProp; + function reportMissingProp(cxt, missing) { + cxt.setParams({ missingProperty: missing }, true); + cxt.error(); + } + exports.reportMissingProp = reportMissingProp; + function hasPropFunc(gen) { + return gen.scopeValue("func", { + // eslint-disable-next-line @typescript-eslint/unbound-method + ref: Object.prototype.hasOwnProperty, + code: (0, codegen_1._)`Object.prototype.hasOwnProperty` + }); + } + exports.hasPropFunc = hasPropFunc; + function isOwnProperty(gen, data, property) { + return (0, codegen_1._)`${hasPropFunc(gen)}.call(${data}, ${property})`; + } + exports.isOwnProperty = isOwnProperty; + function propertyInData(gen, data, property, ownProperties) { + const cond = (0, codegen_1._)`${data}${(0, codegen_1.getProperty)(property)} !== undefined`; + return ownProperties ? (0, codegen_1._)`${cond} && ${isOwnProperty(gen, data, property)}` : cond; + } + exports.propertyInData = propertyInData; + function noPropertyInData(gen, data, property, ownProperties) { + const cond = (0, codegen_1._)`${data}${(0, codegen_1.getProperty)(property)} === undefined`; + return ownProperties ? (0, codegen_1.or)(cond, (0, codegen_1.not)(isOwnProperty(gen, data, property))) : cond; + } + exports.noPropertyInData = noPropertyInData; + function allSchemaProperties(schemaMap) { + return schemaMap ? Object.keys(schemaMap).filter((p) => p !== "__proto__") : []; + } + exports.allSchemaProperties = allSchemaProperties; + function schemaProperties(it, schemaMap) { + return allSchemaProperties(schemaMap).filter((p) => !(0, util_1.alwaysValidSchema)(it, schemaMap[p])); + } + exports.schemaProperties = schemaProperties; + function callValidateCode({ schemaCode, data, it: { gen, topSchemaRef, schemaPath, errorPath }, it }, func, context, passSchema) { + const dataAndSchema = passSchema ? (0, codegen_1._)`${schemaCode}, ${data}, ${topSchemaRef}${schemaPath}` : data; + const valCxt = [ + [names_1.default.instancePath, (0, codegen_1.strConcat)(names_1.default.instancePath, errorPath)], + [names_1.default.parentData, it.parentData], + [names_1.default.parentDataProperty, it.parentDataProperty], + [names_1.default.rootData, names_1.default.rootData] + ]; + if (it.opts.dynamicRef) + valCxt.push([names_1.default.dynamicAnchors, names_1.default.dynamicAnchors]); + const args3 = (0, codegen_1._)`${dataAndSchema}, ${gen.object(...valCxt)}`; + return context !== codegen_1.nil ? (0, codegen_1._)`${func}.call(${context}, ${args3})` : (0, codegen_1._)`${func}(${args3})`; + } + exports.callValidateCode = callValidateCode; + var newRegExp = (0, codegen_1._)`new RegExp`; + function usePattern({ gen, it: { opts } }, pattern) { + const u = opts.unicodeRegExp ? "u" : ""; + const { regExp } = opts.code; + const rx = regExp(pattern, u); + return gen.scopeValue("pattern", { + key: rx.toString(), + ref: rx, + code: (0, codegen_1._)`${regExp.code === "new RegExp" ? newRegExp : (0, util_2.useFunc)(gen, regExp)}(${pattern}, ${u})` + }); + } + exports.usePattern = usePattern; + function validateArray(cxt) { + const { gen, data, keyword, it } = cxt; + const valid = gen.name("valid"); + if (it.allErrors) { + const validArr = gen.let("valid", true); + validateItems(() => gen.assign(validArr, false)); + return validArr; + } + gen.var(valid, true); + validateItems(() => gen.break()); + return valid; + function validateItems(notValid) { + const len = gen.const("len", (0, codegen_1._)`${data}.length`); + gen.forRange("i", 0, len, (i) => { + cxt.subschema({ + keyword, + dataProp: i, + dataPropType: util_1.Type.Num + }, valid); + gen.if((0, codegen_1.not)(valid), notValid); + }); + } + } + exports.validateArray = validateArray; + function validateUnion(cxt) { + const { gen, schema: schema2, keyword, it } = cxt; + if (!Array.isArray(schema2)) + throw new Error("ajv implementation error"); + const alwaysValid = schema2.some((sch) => (0, util_1.alwaysValidSchema)(it, sch)); + if (alwaysValid && !it.opts.unevaluated) + return; + const valid = gen.let("valid", false); + const schValid = gen.name("_valid"); + gen.block(() => schema2.forEach((_sch, i) => { + const schCxt = cxt.subschema({ + keyword, + schemaProp: i, + compositeRule: true + }, schValid); + gen.assign(valid, (0, codegen_1._)`${valid} || ${schValid}`); + const merged = cxt.mergeValidEvaluated(schCxt, schValid); + if (!merged) + gen.if((0, codegen_1.not)(valid)); + })); + cxt.result(valid, () => cxt.reset(), () => cxt.error(true)); + } + exports.validateUnion = validateUnion; + } +}); + +// ../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/compile/validate/keyword.js +var require_keyword2 = __commonJS({ + "../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/compile/validate/keyword.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.validateKeywordUsage = exports.validSchemaType = exports.funcKeywordCode = exports.macroKeywordCode = void 0; + var codegen_1 = require_codegen2(); + var names_1 = require_names2(); + var code_1 = require_code4(); + var errors_1 = require_errors3(); + function macroKeywordCode(cxt, def) { + const { gen, keyword, schema: schema2, parentSchema, it } = cxt; + const macroSchema = def.macro.call(it.self, schema2, parentSchema, it); + const schemaRef = useKeyword(gen, keyword, macroSchema); + if (it.opts.validateSchema !== false) + it.self.validateSchema(macroSchema, true); + const valid = gen.name("valid"); + cxt.subschema({ + schema: macroSchema, + schemaPath: codegen_1.nil, + errSchemaPath: `${it.errSchemaPath}/${keyword}`, + topSchemaRef: schemaRef, + compositeRule: true + }, valid); + cxt.pass(valid, () => cxt.error(true)); + } + exports.macroKeywordCode = macroKeywordCode; + function funcKeywordCode(cxt, def) { + var _a2; + const { gen, keyword, schema: schema2, parentSchema, $data, it } = cxt; + checkAsyncKeyword(it, def); + const validate2 = !$data && def.compile ? def.compile.call(it.self, schema2, parentSchema, it) : def.validate; + const validateRef = useKeyword(gen, keyword, validate2); + const valid = gen.let("valid"); + cxt.block$data(valid, validateKeyword); + cxt.ok((_a2 = def.valid) !== null && _a2 !== void 0 ? _a2 : valid); + function validateKeyword() { + if (def.errors === false) { + assignValid(); + if (def.modifying) + modifyData(cxt); + reportErrs(() => cxt.error()); + } else { + const ruleErrs = def.async ? validateAsync() : validateSync(); + if (def.modifying) + modifyData(cxt); + reportErrs(() => addErrs(cxt, ruleErrs)); + } + } + function validateAsync() { + const ruleErrs = gen.let("ruleErrs", null); + gen.try(() => assignValid((0, codegen_1._)`await `), (e) => gen.assign(valid, false).if((0, codegen_1._)`${e} instanceof ${it.ValidationError}`, () => gen.assign(ruleErrs, (0, codegen_1._)`${e}.errors`), () => gen.throw(e))); + return ruleErrs; + } + function validateSync() { + const validateErrs = (0, codegen_1._)`${validateRef}.errors`; + gen.assign(validateErrs, null); + assignValid(codegen_1.nil); + return validateErrs; + } + function assignValid(_await = def.async ? (0, codegen_1._)`await ` : codegen_1.nil) { + const passCxt = it.opts.passContext ? names_1.default.this : names_1.default.self; + const passSchema = !("compile" in def && !$data || def.schema === false); + gen.assign(valid, (0, codegen_1._)`${_await}${(0, code_1.callValidateCode)(cxt, validateRef, passCxt, passSchema)}`, def.modifying); + } + function reportErrs(errors) { + var _a3; + gen.if((0, codegen_1.not)((_a3 = def.valid) !== null && _a3 !== void 0 ? _a3 : valid), errors); + } + } + exports.funcKeywordCode = funcKeywordCode; + function modifyData(cxt) { + const { gen, data, it } = cxt; + gen.if(it.parentData, () => gen.assign(data, (0, codegen_1._)`${it.parentData}[${it.parentDataProperty}]`)); + } + function addErrs(cxt, errs) { + const { gen } = cxt; + gen.if((0, codegen_1._)`Array.isArray(${errs})`, () => { + gen.assign(names_1.default.vErrors, (0, codegen_1._)`${names_1.default.vErrors} === null ? ${errs} : ${names_1.default.vErrors}.concat(${errs})`).assign(names_1.default.errors, (0, codegen_1._)`${names_1.default.vErrors}.length`); + (0, errors_1.extendErrors)(cxt); + }, () => cxt.error()); + } + function checkAsyncKeyword({ schemaEnv }, def) { + if (def.async && !schemaEnv.$async) + throw new Error("async keyword in sync schema"); + } + function useKeyword(gen, keyword, result) { + if (result === void 0) + throw new Error(`keyword "${keyword}" failed to compile`); + return gen.scopeValue("keyword", typeof result == "function" ? { ref: result } : { ref: result, code: (0, codegen_1.stringify)(result) }); + } + function validSchemaType(schema2, schemaType, allowUndefined = false) { + return !schemaType.length || schemaType.some((st) => st === "array" ? Array.isArray(schema2) : st === "object" ? schema2 && typeof schema2 == "object" && !Array.isArray(schema2) : typeof schema2 == st || allowUndefined && typeof schema2 == "undefined"); + } + exports.validSchemaType = validSchemaType; + function validateKeywordUsage({ schema: schema2, opts, self: self2, errSchemaPath }, def, keyword) { + if (Array.isArray(def.keyword) ? !def.keyword.includes(keyword) : def.keyword !== keyword) { + throw new Error("ajv implementation error"); + } + const deps = def.dependencies; + if (deps === null || deps === void 0 ? void 0 : deps.some((kwd) => !Object.prototype.hasOwnProperty.call(schema2, kwd))) { + throw new Error(`parent schema must have dependencies of ${keyword}: ${deps.join(",")}`); + } + if (def.validateSchema) { + const valid = def.validateSchema(schema2[keyword]); + if (!valid) { + const msg = `keyword "${keyword}" value is invalid at path "${errSchemaPath}": ` + self2.errorsText(def.validateSchema.errors); + if (opts.validateSchema === "log") + self2.logger.error(msg); + else + throw new Error(msg); + } + } + } + exports.validateKeywordUsage = validateKeywordUsage; + } +}); + +// ../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/compile/validate/subschema.js +var require_subschema2 = __commonJS({ + "../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/compile/validate/subschema.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.extendSubschemaMode = exports.extendSubschemaData = exports.getSubschema = void 0; + var codegen_1 = require_codegen2(); + var util_1 = require_util9(); + function getSubschema(it, { keyword, schemaProp, schema: schema2, schemaPath, errSchemaPath, topSchemaRef }) { + if (keyword !== void 0 && schema2 !== void 0) { + throw new Error('both "keyword" and "schema" passed, only one allowed'); + } + if (keyword !== void 0) { + const sch = it.schema[keyword]; + return schemaProp === void 0 ? { + schema: sch, + schemaPath: (0, codegen_1._)`${it.schemaPath}${(0, codegen_1.getProperty)(keyword)}`, + errSchemaPath: `${it.errSchemaPath}/${keyword}` + } : { + schema: sch[schemaProp], + schemaPath: (0, codegen_1._)`${it.schemaPath}${(0, codegen_1.getProperty)(keyword)}${(0, codegen_1.getProperty)(schemaProp)}`, + errSchemaPath: `${it.errSchemaPath}/${keyword}/${(0, util_1.escapeFragment)(schemaProp)}` + }; + } + if (schema2 !== void 0) { + if (schemaPath === void 0 || errSchemaPath === void 0 || topSchemaRef === void 0) { + throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"'); + } + return { + schema: schema2, + schemaPath, + topSchemaRef, + errSchemaPath + }; + } + throw new Error('either "keyword" or "schema" must be passed'); + } + exports.getSubschema = getSubschema; + function extendSubschemaData(subschema, it, { dataProp, dataPropType: dpType, data, dataTypes, propertyName }) { + if (data !== void 0 && dataProp !== void 0) { + throw new Error('both "data" and "dataProp" passed, only one allowed'); + } + const { gen } = it; + if (dataProp !== void 0) { + const { errorPath, dataPathArr, opts } = it; + const nextData = gen.let("data", (0, codegen_1._)`${it.data}${(0, codegen_1.getProperty)(dataProp)}`, true); + dataContextProps(nextData); + subschema.errorPath = (0, codegen_1.str)`${errorPath}${(0, util_1.getErrorPath)(dataProp, dpType, opts.jsPropertySyntax)}`; + subschema.parentDataProperty = (0, codegen_1._)`${dataProp}`; + subschema.dataPathArr = [...dataPathArr, subschema.parentDataProperty]; + } + if (data !== void 0) { + const nextData = data instanceof codegen_1.Name ? data : gen.let("data", data, true); + dataContextProps(nextData); + if (propertyName !== void 0) + subschema.propertyName = propertyName; + } + if (dataTypes) + subschema.dataTypes = dataTypes; + function dataContextProps(_nextData) { + subschema.data = _nextData; + subschema.dataLevel = it.dataLevel + 1; + subschema.dataTypes = []; + it.definedProperties = /* @__PURE__ */ new Set(); + subschema.parentData = it.data; + subschema.dataNames = [...it.dataNames, _nextData]; + } + } + exports.extendSubschemaData = extendSubschemaData; + function extendSubschemaMode(subschema, { jtdDiscriminator, jtdMetadata, compositeRule, createErrors, allErrors }) { + if (compositeRule !== void 0) + subschema.compositeRule = compositeRule; + if (createErrors !== void 0) + subschema.createErrors = createErrors; + if (allErrors !== void 0) + subschema.allErrors = allErrors; + subschema.jtdDiscriminator = jtdDiscriminator; + subschema.jtdMetadata = jtdMetadata; + } + exports.extendSubschemaMode = extendSubschemaMode; + } +}); + +// ../node_modules/.pnpm/json-schema-traverse@1.0.0/node_modules/json-schema-traverse/index.js var require_json_schema_traverse2 = __commonJS({ - "node_modules/.pnpm/json-schema-traverse@0.4.1/node_modules/json-schema-traverse/index.js"(exports, module) { + "../node_modules/.pnpm/json-schema-traverse@1.0.0/node_modules/json-schema-traverse/index.js"(exports, module) { "use strict"; var traverse = module.exports = function(schema2, opts, cb) { if (typeof opts == "function") { @@ -32325,7 +46658,10 @@ var require_json_schema_traverse2 = __commonJS({ contains: true, additionalProperties: true, propertyNames: true, - not: true + not: true, + if: true, + then: true, + else: true }; traverse.arrayKeywords = { items: true, @@ -32334,6 +46670,7 @@ var require_json_schema_traverse2 = __commonJS({ oneOf: true }; traverse.propsKeywords = { + $defs: true, definitions: true, properties: true, patternProperties: true, @@ -32387,114 +46724,16 @@ var require_json_schema_traverse2 = __commonJS({ } }); -// node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/compile/resolve.js +// ../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/compile/resolve.js var require_resolve2 = __commonJS({ - "node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/compile/resolve.js"(exports, module) { + "../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/compile/resolve.js"(exports) { "use strict"; - var URI = require_uri_all2(); + Object.defineProperty(exports, "__esModule", { value: true }); + exports.getSchemaRefs = exports.resolveUrl = exports.normalizeId = exports._getFullPath = exports.getFullPath = exports.inlineRef = void 0; + var util_1 = require_util9(); var equal = require_fast_deep_equal2(); - var util3 = require_util9(); - var SchemaObject = require_schema_obj2(); var traverse = require_json_schema_traverse2(); - module.exports = resolve; - resolve.normalizeId = normalizeId; - resolve.fullPath = getFullPath; - resolve.url = resolveUrl; - resolve.ids = resolveIds; - resolve.inlineRef = inlineRef; - resolve.schema = resolveSchema; - function resolve(compile, root2, ref) { - var refVal = this._refs[ref]; - if (typeof refVal == "string") { - if (this._refs[refVal]) refVal = this._refs[refVal]; - else return resolve.call(this, compile, root2, refVal); - } - refVal = refVal || this._schemas[ref]; - if (refVal instanceof SchemaObject) { - return inlineRef(refVal.schema, this._opts.inlineRefs) ? refVal.schema : refVal.validate || this._compile(refVal); - } - var res = resolveSchema.call(this, root2, ref); - var schema2, v, baseId; - if (res) { - schema2 = res.schema; - root2 = res.root; - baseId = res.baseId; - } - if (schema2 instanceof SchemaObject) { - v = schema2.validate || compile.call(this, schema2.schema, root2, void 0, baseId); - } else if (schema2 !== void 0) { - v = inlineRef(schema2, this._opts.inlineRefs) ? schema2 : compile.call(this, schema2, root2, void 0, baseId); - } - return v; - } - function resolveSchema(root2, ref) { - var p = URI.parse(ref), refPath = _getFullPath(p), baseId = getFullPath(this._getId(root2.schema)); - if (Object.keys(root2.schema).length === 0 || refPath !== baseId) { - var id = normalizeId(refPath); - var refVal = this._refs[id]; - if (typeof refVal == "string") { - return resolveRecursive.call(this, root2, refVal, p); - } else if (refVal instanceof SchemaObject) { - if (!refVal.validate) this._compile(refVal); - root2 = refVal; - } else { - refVal = this._schemas[id]; - if (refVal instanceof SchemaObject) { - if (!refVal.validate) this._compile(refVal); - if (id == normalizeId(ref)) - return { schema: refVal, root: root2, baseId }; - root2 = refVal; - } else { - return; - } - } - if (!root2.schema) return; - baseId = getFullPath(this._getId(root2.schema)); - } - return getJsonPointer.call(this, p, baseId, root2.schema, root2); - } - function resolveRecursive(root2, ref, parsedRef) { - var res = resolveSchema.call(this, root2, ref); - if (res) { - var schema2 = res.schema; - var baseId = res.baseId; - root2 = res.root; - var id = this._getId(schema2); - if (id) baseId = resolveUrl(baseId, id); - return getJsonPointer.call(this, parsedRef, baseId, schema2, root2); - } - } - var PREVENT_SCOPE_CHANGE = util3.toHash(["properties", "patternProperties", "enum", "dependencies", "definitions"]); - function getJsonPointer(parsedRef, baseId, schema2, root2) { - parsedRef.fragment = parsedRef.fragment || ""; - if (parsedRef.fragment.slice(0, 1) != "/") return; - var parts = parsedRef.fragment.split("/"); - for (var i = 1; i < parts.length; i++) { - var part = parts[i]; - if (part) { - part = util3.unescapeFragment(part); - schema2 = schema2[part]; - if (schema2 === void 0) break; - var id; - if (!PREVENT_SCOPE_CHANGE[part]) { - id = this._getId(schema2); - if (id) baseId = resolveUrl(baseId, id); - if (schema2.$ref) { - var $ref = resolveUrl(baseId, schema2.$ref); - var res = resolveSchema.call(this, root2, $ref); - if (res) { - schema2 = res.schema; - root2 = res.root; - baseId = res.baseId; - } - } - } - } - } - if (schema2 !== void 0 && schema2 !== root2.schema) - return { schema: schema2, root: root2, baseId }; - } - var SIMPLE_INLINED = util3.toHash([ + var SIMPLE_INLINED = /* @__PURE__ */ new Set([ "type", "format", "pattern", @@ -32509,4062 +46748,4060 @@ var require_resolve2 = __commonJS({ "uniqueItems", "multipleOf", "required", - "enum" + "enum", + "const" ]); - function inlineRef(schema2, limit) { - if (limit === false) return false; - if (limit === void 0 || limit === true) return checkNoRef(schema2); - else if (limit) return countKeys(schema2) <= limit; + function inlineRef(schema2, limit = true) { + if (typeof schema2 == "boolean") + return true; + if (limit === true) + return !hasRef(schema2); + if (!limit) + return false; + return countKeys(schema2) <= limit; } - function checkNoRef(schema2) { - var item; - if (Array.isArray(schema2)) { - for (var i = 0; i < schema2.length; i++) { - item = schema2[i]; - if (typeof item == "object" && !checkNoRef(item)) return false; - } - } else { - for (var key in schema2) { - if (key == "$ref") return false; - item = schema2[key]; - if (typeof item == "object" && !checkNoRef(item)) return false; - } + exports.inlineRef = inlineRef; + var REF_KEYWORDS = /* @__PURE__ */ new Set([ + "$ref", + "$recursiveRef", + "$recursiveAnchor", + "$dynamicRef", + "$dynamicAnchor" + ]); + function hasRef(schema2) { + for (const key in schema2) { + if (REF_KEYWORDS.has(key)) + return true; + const sch = schema2[key]; + if (Array.isArray(sch) && sch.some(hasRef)) + return true; + if (typeof sch == "object" && hasRef(sch)) + return true; } - return true; + return false; } function countKeys(schema2) { - var count = 0, item; - if (Array.isArray(schema2)) { - for (var i = 0; i < schema2.length; i++) { - item = schema2[i]; - if (typeof item == "object") count += countKeys(item); - if (count == Infinity) return Infinity; - } - } else { - for (var key in schema2) { - if (key == "$ref") return Infinity; - if (SIMPLE_INLINED[key]) { - count++; - } else { - item = schema2[key]; - if (typeof item == "object") count += countKeys(item) + 1; - if (count == Infinity) return Infinity; - } + let count = 0; + for (const key in schema2) { + if (key === "$ref") + return Infinity; + count++; + if (SIMPLE_INLINED.has(key)) + continue; + if (typeof schema2[key] == "object") { + (0, util_1.eachItem)(schema2[key], (sch) => count += countKeys(sch)); } + if (count === Infinity) + return Infinity; } return count; } - function getFullPath(id, normalize2) { - if (normalize2 !== false) id = normalizeId(id); - var p = URI.parse(id); - return _getFullPath(p); + function getFullPath(resolver, id = "", normalize2) { + if (normalize2 !== false) + id = normalizeId(id); + const p = resolver.parse(id); + return _getFullPath(resolver, p); } - function _getFullPath(p) { - return URI.serialize(p).split("#")[0] + "#"; + exports.getFullPath = getFullPath; + function _getFullPath(resolver, p) { + const serialized = resolver.serialize(p); + return serialized.split("#")[0] + "#"; } + exports._getFullPath = _getFullPath; var TRAILING_SLASH_HASH = /#\/?$/; function normalizeId(id) { return id ? id.replace(TRAILING_SLASH_HASH, "") : ""; } - function resolveUrl(baseId, id) { + exports.normalizeId = normalizeId; + function resolveUrl(resolver, baseId, id) { id = normalizeId(id); - return URI.resolve(baseId, id); + return resolver.resolve(baseId, id); } - function resolveIds(schema2) { - var schemaId = normalizeId(this._getId(schema2)); - var baseIds = { "": schemaId }; - var fullPaths = { "": getFullPath(schemaId, false) }; - var localRefs = {}; - var self2 = this; - traverse(schema2, { allKeys: true }, function(sch, jsonPtr, rootSchema2, parentJsonPtr, parentKeyword, parentSchema, keyIndex) { - if (jsonPtr === "") return; - var id = self2._getId(sch); - var baseId = baseIds[parentJsonPtr]; - var fullPath = fullPaths[parentJsonPtr] + "/" + parentKeyword; - if (keyIndex !== void 0) - fullPath += "/" + (typeof keyIndex == "number" ? keyIndex : util3.escapeFragment(keyIndex)); - if (typeof id == "string") { - id = baseId = normalizeId(baseId ? URI.resolve(baseId, id) : id); - var refVal = self2._refs[id]; - if (typeof refVal == "string") refVal = self2._refs[refVal]; - if (refVal && refVal.schema) { - if (!equal(sch, refVal.schema)) - throw new Error('id "' + id + '" resolves to more than one schema'); - } else if (id != normalizeId(fullPath)) { - if (id[0] == "#") { - if (localRefs[id] && !equal(sch, localRefs[id])) - throw new Error('id "' + id + '" resolves to more than one schema'); - localRefs[id] = sch; + exports.resolveUrl = resolveUrl; + var ANCHOR = /^[a-z_][-a-z0-9._]*$/i; + function getSchemaRefs(schema2, baseId) { + if (typeof schema2 == "boolean") + return {}; + const { schemaId, uriResolver } = this.opts; + const schId = normalizeId(schema2[schemaId] || baseId); + const baseIds = { "": schId }; + const pathPrefix = getFullPath(uriResolver, schId, false); + const localRefs = {}; + const schemaRefs = /* @__PURE__ */ new Set(); + traverse(schema2, { allKeys: true }, (sch, jsonPtr, _, parentJsonPtr) => { + if (parentJsonPtr === void 0) + return; + const fullPath = pathPrefix + jsonPtr; + let innerBaseId = baseIds[parentJsonPtr]; + if (typeof sch[schemaId] == "string") + innerBaseId = addRef.call(this, sch[schemaId]); + addAnchor.call(this, sch.$anchor); + addAnchor.call(this, sch.$dynamicAnchor); + baseIds[jsonPtr] = innerBaseId; + function addRef(ref) { + const _resolve = this.opts.uriResolver.resolve; + ref = normalizeId(innerBaseId ? _resolve(innerBaseId, ref) : ref); + if (schemaRefs.has(ref)) + throw ambiguos(ref); + schemaRefs.add(ref); + let schOrRef = this.refs[ref]; + if (typeof schOrRef == "string") + schOrRef = this.refs[schOrRef]; + if (typeof schOrRef == "object") { + checkAmbiguosRef(sch, schOrRef.schema, ref); + } else if (ref !== normalizeId(fullPath)) { + if (ref[0] === "#") { + checkAmbiguosRef(sch, localRefs[ref], ref); + localRefs[ref] = sch; } else { - self2._refs[id] = fullPath; + this.refs[ref] = fullPath; } } + return ref; + } + function addAnchor(anchor) { + if (typeof anchor == "string") { + if (!ANCHOR.test(anchor)) + throw new Error(`invalid anchor "${anchor}"`); + addRef.call(this, `#${anchor}`); + } } - baseIds[jsonPtr] = baseId; - fullPaths[jsonPtr] = fullPath; }); return localRefs; + function checkAmbiguosRef(sch1, sch2, ref) { + if (sch2 !== void 0 && !equal(sch1, sch2)) + throw ambiguos(ref); + } + function ambiguos(ref) { + return new Error(`reference "${ref}" resolves to more than one schema`); + } } + exports.getSchemaRefs = getSchemaRefs; } }); -// node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/compile/error_classes.js -var require_error_classes2 = __commonJS({ - "node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/compile/error_classes.js"(exports, module) { - "use strict"; - var resolve = require_resolve2(); - module.exports = { - Validation: errorSubclass(ValidationError), - MissingRef: errorSubclass(MissingRefError) - }; - function ValidationError(errors) { - this.message = "validation failed"; - this.errors = errors; - this.ajv = this.validation = true; - } - MissingRefError.message = function(baseId, ref) { - return "can't resolve reference " + ref + " from id " + baseId; - }; - function MissingRefError(baseId, ref, message) { - this.message = message || MissingRefError.message(baseId, ref); - this.missingRef = resolve.url(baseId, ref); - this.missingSchema = resolve.normalizeId(resolve.fullPath(this.missingRef)); - } - function errorSubclass(Subclass) { - Subclass.prototype = Object.create(Error.prototype); - Subclass.prototype.constructor = Subclass; - return Subclass; - } - } -}); - -// node_modules/.pnpm/fast-json-stable-stringify@2.1.0/node_modules/fast-json-stable-stringify/index.js -var require_fast_json_stable_stringify2 = __commonJS({ - "node_modules/.pnpm/fast-json-stable-stringify@2.1.0/node_modules/fast-json-stable-stringify/index.js"(exports, module) { - "use strict"; - module.exports = function(data, opts) { - if (!opts) opts = {}; - if (typeof opts === "function") opts = { cmp: opts }; - var cycles = typeof opts.cycles === "boolean" ? opts.cycles : false; - var cmp = opts.cmp && /* @__PURE__ */ (function(f) { - return function(node2) { - return function(a, b) { - var aobj = { key: a, value: node2[a] }; - var bobj = { key: b, value: node2[b] }; - return f(aobj, bobj); - }; - }; - })(opts.cmp); - var seen = []; - return (function stringify(node2) { - if (node2 && node2.toJSON && typeof node2.toJSON === "function") { - node2 = node2.toJSON(); - } - if (node2 === void 0) return; - if (typeof node2 == "number") return isFinite(node2) ? "" + node2 : "null"; - if (typeof node2 !== "object") return JSON.stringify(node2); - var i, out; - if (Array.isArray(node2)) { - out = "["; - for (i = 0; i < node2.length; i++) { - if (i) out += ","; - out += stringify(node2[i]) || "null"; - } - return out + "]"; - } - if (node2 === null) return "null"; - if (seen.indexOf(node2) !== -1) { - if (cycles) return JSON.stringify("__cycle__"); - throw new TypeError("Converting circular structure to JSON"); - } - var seenIndex = seen.push(node2) - 1; - var keys = Object.keys(node2).sort(cmp && cmp(node2)); - out = ""; - for (i = 0; i < keys.length; i++) { - var key = keys[i]; - var value2 = stringify(node2[key]); - if (!value2) continue; - if (out) out += ","; - out += JSON.stringify(key) + ":" + value2; - } - seen.splice(seenIndex, 1); - return "{" + out + "}"; - })(data); - }; - } -}); - -// node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/dotjs/validate.js +// ../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/compile/validate/index.js var require_validate2 = __commonJS({ - "node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/dotjs/validate.js"(exports, module) { + "../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/compile/validate/index.js"(exports) { "use strict"; - module.exports = function generate_validate(it, $keyword, $ruleType) { - var out = ""; - var $async = it.schema.$async === true, $refKeywords = it.util.schemaHasRulesExcept(it.schema, it.RULES.all, "$ref"), $id = it.self._getId(it.schema); - if (it.opts.strictKeywords) { - var $unknownKwd = it.util.schemaUnknownRules(it.schema, it.RULES.keywords); - if ($unknownKwd) { - var $keywordsMsg = "unknown keyword: " + $unknownKwd; - if (it.opts.strictKeywords === "log") it.logger.warn($keywordsMsg); - else throw new Error($keywordsMsg); + Object.defineProperty(exports, "__esModule", { value: true }); + exports.getData = exports.KeywordCxt = exports.validateFunctionCode = void 0; + var boolSchema_1 = require_boolSchema2(); + var dataType_1 = require_dataType2(); + var applicability_1 = require_applicability2(); + var dataType_2 = require_dataType2(); + var defaults_1 = require_defaults2(); + var keyword_1 = require_keyword2(); + var subschema_1 = require_subschema2(); + var codegen_1 = require_codegen2(); + var names_1 = require_names2(); + var resolve_1 = require_resolve2(); + var util_1 = require_util9(); + var errors_1 = require_errors3(); + function validateFunctionCode(it) { + if (isSchemaObj(it)) { + checkKeywords(it); + if (schemaCxtHasRules(it)) { + topSchemaObjCode(it); + return; } } - if (it.isTop) { - out += " var validate = "; - if ($async) { - it.async = true; - out += "async "; - } - out += "function(data, dataPath, parentData, parentDataProperty, rootData) { 'use strict'; "; - if ($id && (it.opts.sourceCode || it.opts.processCode)) { - out += " " + ("/*# sourceURL=" + $id + " */") + " "; - } - } - if (typeof it.schema == "boolean" || !($refKeywords || it.schema.$ref)) { - var $keyword = "false schema"; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + "/" + $keyword; - var $breakOnError = !it.opts.allErrors; - var $errorKeyword; - var $data = "data" + ($dataLvl || ""); - var $valid = "valid" + $lvl; - if (it.schema === false) { - if (it.isTop) { - $breakOnError = true; - } else { - out += " var " + $valid + " = false; "; - } - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ""; - if (it.createErrors !== false) { - out += " { keyword: '" + ($errorKeyword || "false schema") + "' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: {} "; - if (it.opts.messages !== false) { - out += " , message: 'boolean schema is false' "; - } - if (it.opts.verbose) { - out += " , schema: false , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; - } - out += " } "; - } else { - out += " {} "; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - if (it.async) { - out += " throw new ValidationError([" + __err + "]); "; - } else { - out += " validate.errors = [" + __err + "]; return false; "; - } - } else { - out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; - } - } else { - if (it.isTop) { - if ($async) { - out += " return data; "; - } else { - out += " validate.errors = null; return true; "; - } - } else { - out += " var " + $valid + " = true; "; - } - } - if (it.isTop) { - out += " }; return validate; "; - } - return out; - } - if (it.isTop) { - var $top = it.isTop, $lvl = it.level = 0, $dataLvl = it.dataLevel = 0, $data = "data"; - it.rootId = it.resolve.fullPath(it.self._getId(it.root.schema)); - it.baseId = it.baseId || it.rootId; - delete it.isTop; - it.dataPathArr = [""]; - if (it.schema.default !== void 0 && it.opts.useDefaults && it.opts.strictDefaults) { - var $defaultMsg = "default is ignored in the schema root"; - if (it.opts.strictDefaults === "log") it.logger.warn($defaultMsg); - else throw new Error($defaultMsg); - } - out += " var vErrors = null; "; - out += " var errors = 0; "; - out += " if (rootData === undefined) rootData = data; "; - } else { - var $lvl = it.level, $dataLvl = it.dataLevel, $data = "data" + ($dataLvl || ""); - if ($id) it.baseId = it.resolve.url(it.baseId, $id); - if ($async && !it.async) throw new Error("async schema in sync schema"); - out += " var errs_" + $lvl + " = errors;"; - } - var $valid = "valid" + $lvl, $breakOnError = !it.opts.allErrors, $closingBraces1 = "", $closingBraces2 = ""; - var $errorKeyword; - var $typeSchema = it.schema.type, $typeIsArray = Array.isArray($typeSchema); - if ($typeSchema && it.opts.nullable && it.schema.nullable === true) { - if ($typeIsArray) { - if ($typeSchema.indexOf("null") == -1) $typeSchema = $typeSchema.concat("null"); - } else if ($typeSchema != "null") { - $typeSchema = [$typeSchema, "null"]; - $typeIsArray = true; - } - } - if ($typeIsArray && $typeSchema.length == 1) { - $typeSchema = $typeSchema[0]; - $typeIsArray = false; - } - if (it.schema.$ref && $refKeywords) { - if (it.opts.extendRefs == "fail") { - throw new Error('$ref: validation keywords used in schema at path "' + it.errSchemaPath + '" (see option extendRefs)'); - } else if (it.opts.extendRefs !== true) { - $refKeywords = false; - it.logger.warn('$ref: keywords ignored in schema at path "' + it.errSchemaPath + '"'); - } - } - if (it.schema.$comment && it.opts.$comment) { - out += " " + it.RULES.all.$comment.code(it, "$comment"); - } - if ($typeSchema) { - if (it.opts.coerceTypes) { - var $coerceToTypes = it.util.coerceToTypes(it.opts.coerceTypes, $typeSchema); - } - var $rulesGroup = it.RULES.types[$typeSchema]; - if ($coerceToTypes || $typeIsArray || $rulesGroup === true || $rulesGroup && !$shouldUseGroup($rulesGroup)) { - var $schemaPath = it.schemaPath + ".type", $errSchemaPath = it.errSchemaPath + "/type"; - var $schemaPath = it.schemaPath + ".type", $errSchemaPath = it.errSchemaPath + "/type", $method = $typeIsArray ? "checkDataTypes" : "checkDataType"; - out += " if (" + it.util[$method]($typeSchema, $data, it.opts.strictNumbers, true) + ") { "; - if ($coerceToTypes) { - var $dataType = "dataType" + $lvl, $coerced = "coerced" + $lvl; - out += " var " + $dataType + " = typeof " + $data + "; var " + $coerced + " = undefined; "; - if (it.opts.coerceTypes == "array") { - out += " if (" + $dataType + " == 'object' && Array.isArray(" + $data + ") && " + $data + ".length == 1) { " + $data + " = " + $data + "[0]; " + $dataType + " = typeof " + $data + "; if (" + it.util.checkDataType(it.schema.type, $data, it.opts.strictNumbers) + ") " + $coerced + " = " + $data + "; } "; - } - out += " if (" + $coerced + " !== undefined) ; "; - var arr1 = $coerceToTypes; - if (arr1) { - var $type, $i = -1, l1 = arr1.length - 1; - while ($i < l1) { - $type = arr1[$i += 1]; - if ($type == "string") { - out += " else if (" + $dataType + " == 'number' || " + $dataType + " == 'boolean') " + $coerced + " = '' + " + $data + "; else if (" + $data + " === null) " + $coerced + " = ''; "; - } else if ($type == "number" || $type == "integer") { - out += " else if (" + $dataType + " == 'boolean' || " + $data + " === null || (" + $dataType + " == 'string' && " + $data + " && " + $data + " == +" + $data + " "; - if ($type == "integer") { - out += " && !(" + $data + " % 1)"; - } - out += ")) " + $coerced + " = +" + $data + "; "; - } else if ($type == "boolean") { - out += " else if (" + $data + " === 'false' || " + $data + " === 0 || " + $data + " === null) " + $coerced + " = false; else if (" + $data + " === 'true' || " + $data + " === 1) " + $coerced + " = true; "; - } else if ($type == "null") { - out += " else if (" + $data + " === '' || " + $data + " === 0 || " + $data + " === false) " + $coerced + " = null; "; - } else if (it.opts.coerceTypes == "array" && $type == "array") { - out += " else if (" + $dataType + " == 'string' || " + $dataType + " == 'number' || " + $dataType + " == 'boolean' || " + $data + " == null) " + $coerced + " = [" + $data + "]; "; - } - } - } - out += " else { "; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ""; - if (it.createErrors !== false) { - out += " { keyword: '" + ($errorKeyword || "type") + "' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { type: '"; - if ($typeIsArray) { - out += "" + $typeSchema.join(","); - } else { - out += "" + $typeSchema; - } - out += "' } "; - if (it.opts.messages !== false) { - out += " , message: 'should be "; - if ($typeIsArray) { - out += "" + $typeSchema.join(","); - } else { - out += "" + $typeSchema; - } - out += "' "; - } - if (it.opts.verbose) { - out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; - } - out += " } "; - } else { - out += " {} "; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - if (it.async) { - out += " throw new ValidationError([" + __err + "]); "; - } else { - out += " validate.errors = [" + __err + "]; return false; "; - } - } else { - out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; - } - out += " } if (" + $coerced + " !== undefined) { "; - var $parentData = $dataLvl ? "data" + ($dataLvl - 1 || "") : "parentData", $parentDataProperty = $dataLvl ? it.dataPathArr[$dataLvl] : "parentDataProperty"; - out += " " + $data + " = " + $coerced + "; "; - if (!$dataLvl) { - out += "if (" + $parentData + " !== undefined)"; - } - out += " " + $parentData + "[" + $parentDataProperty + "] = " + $coerced + "; } "; - } else { - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ""; - if (it.createErrors !== false) { - out += " { keyword: '" + ($errorKeyword || "type") + "' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { type: '"; - if ($typeIsArray) { - out += "" + $typeSchema.join(","); - } else { - out += "" + $typeSchema; - } - out += "' } "; - if (it.opts.messages !== false) { - out += " , message: 'should be "; - if ($typeIsArray) { - out += "" + $typeSchema.join(","); - } else { - out += "" + $typeSchema; - } - out += "' "; - } - if (it.opts.verbose) { - out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; - } - out += " } "; - } else { - out += " {} "; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - if (it.async) { - out += " throw new ValidationError([" + __err + "]); "; - } else { - out += " validate.errors = [" + __err + "]; return false; "; - } - } else { - out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; - } - } - out += " } "; - } - } - if (it.schema.$ref && !$refKeywords) { - out += " " + it.RULES.all.$ref.code(it, "$ref") + " "; - if ($breakOnError) { - out += " } if (errors === "; - if ($top) { - out += "0"; - } else { - out += "errs_" + $lvl; - } - out += ") { "; - $closingBraces2 += "}"; - } - } else { - var arr2 = it.RULES; - if (arr2) { - var $rulesGroup, i2 = -1, l2 = arr2.length - 1; - while (i2 < l2) { - $rulesGroup = arr2[i2 += 1]; - if ($shouldUseGroup($rulesGroup)) { - if ($rulesGroup.type) { - out += " if (" + it.util.checkDataType($rulesGroup.type, $data, it.opts.strictNumbers) + ") { "; - } - if (it.opts.useDefaults) { - if ($rulesGroup.type == "object" && it.schema.properties) { - var $schema = it.schema.properties, $schemaKeys = Object.keys($schema); - var arr3 = $schemaKeys; - if (arr3) { - var $propertyKey, i3 = -1, l3 = arr3.length - 1; - while (i3 < l3) { - $propertyKey = arr3[i3 += 1]; - var $sch = $schema[$propertyKey]; - if ($sch.default !== void 0) { - var $passData = $data + it.util.getProperty($propertyKey); - if (it.compositeRule) { - if (it.opts.strictDefaults) { - var $defaultMsg = "default is ignored for: " + $passData; - if (it.opts.strictDefaults === "log") it.logger.warn($defaultMsg); - else throw new Error($defaultMsg); - } - } else { - out += " if (" + $passData + " === undefined "; - if (it.opts.useDefaults == "empty") { - out += " || " + $passData + " === null || " + $passData + " === '' "; - } - out += " ) " + $passData + " = "; - if (it.opts.useDefaults == "shared") { - out += " " + it.useDefault($sch.default) + " "; - } else { - out += " " + JSON.stringify($sch.default) + " "; - } - out += "; "; - } - } - } - } - } else if ($rulesGroup.type == "array" && Array.isArray(it.schema.items)) { - var arr4 = it.schema.items; - if (arr4) { - var $sch, $i = -1, l4 = arr4.length - 1; - while ($i < l4) { - $sch = arr4[$i += 1]; - if ($sch.default !== void 0) { - var $passData = $data + "[" + $i + "]"; - if (it.compositeRule) { - if (it.opts.strictDefaults) { - var $defaultMsg = "default is ignored for: " + $passData; - if (it.opts.strictDefaults === "log") it.logger.warn($defaultMsg); - else throw new Error($defaultMsg); - } - } else { - out += " if (" + $passData + " === undefined "; - if (it.opts.useDefaults == "empty") { - out += " || " + $passData + " === null || " + $passData + " === '' "; - } - out += " ) " + $passData + " = "; - if (it.opts.useDefaults == "shared") { - out += " " + it.useDefault($sch.default) + " "; - } else { - out += " " + JSON.stringify($sch.default) + " "; - } - out += "; "; - } - } - } - } - } - } - var arr5 = $rulesGroup.rules; - if (arr5) { - var $rule, i5 = -1, l5 = arr5.length - 1; - while (i5 < l5) { - $rule = arr5[i5 += 1]; - if ($shouldUseRule($rule)) { - var $code = $rule.code(it, $rule.keyword, $rulesGroup.type); - if ($code) { - out += " " + $code + " "; - if ($breakOnError) { - $closingBraces1 += "}"; - } - } - } - } - } - if ($breakOnError) { - out += " " + $closingBraces1 + " "; - $closingBraces1 = ""; - } - if ($rulesGroup.type) { - out += " } "; - if ($typeSchema && $typeSchema === $rulesGroup.type && !$coerceToTypes) { - out += " else { "; - var $schemaPath = it.schemaPath + ".type", $errSchemaPath = it.errSchemaPath + "/type"; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ""; - if (it.createErrors !== false) { - out += " { keyword: '" + ($errorKeyword || "type") + "' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { type: '"; - if ($typeIsArray) { - out += "" + $typeSchema.join(","); - } else { - out += "" + $typeSchema; - } - out += "' } "; - if (it.opts.messages !== false) { - out += " , message: 'should be "; - if ($typeIsArray) { - out += "" + $typeSchema.join(","); - } else { - out += "" + $typeSchema; - } - out += "' "; - } - if (it.opts.verbose) { - out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; - } - out += " } "; - } else { - out += " {} "; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - if (it.async) { - out += " throw new ValidationError([" + __err + "]); "; - } else { - out += " validate.errors = [" + __err + "]; return false; "; - } - } else { - out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; - } - out += " } "; - } - } - if ($breakOnError) { - out += " if (errors === "; - if ($top) { - out += "0"; - } else { - out += "errs_" + $lvl; - } - out += ") { "; - $closingBraces2 += "}"; - } - } - } - } - } - if ($breakOnError) { - out += " " + $closingBraces2 + " "; - } - if ($top) { - if ($async) { - out += " if (errors === 0) return data; "; - out += " else throw new ValidationError(vErrors); "; - } else { - out += " validate.errors = vErrors; "; - out += " return errors === 0; "; - } - out += " }; return validate;"; - } else { - out += " var " + $valid + " = errors === errs_" + $lvl + ";"; - } - function $shouldUseGroup($rulesGroup2) { - var rules = $rulesGroup2.rules; - for (var i = 0; i < rules.length; i++) - if ($shouldUseRule(rules[i])) return true; - } - function $shouldUseRule($rule2) { - return it.schema[$rule2.keyword] !== void 0 || $rule2.implements && $ruleImplementsSomeKeyword($rule2); - } - function $ruleImplementsSomeKeyword($rule2) { - var impl = $rule2.implements; - for (var i = 0; i < impl.length; i++) - if (it.schema[impl[i]] !== void 0) return true; - } - return out; - }; - } -}); - -// node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/compile/index.js -var require_compile2 = __commonJS({ - "node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/compile/index.js"(exports, module) { - "use strict"; - var resolve = require_resolve2(); - var util3 = require_util9(); - var errorClasses = require_error_classes2(); - var stableStringify = require_fast_json_stable_stringify2(); - var validateGenerator = require_validate2(); - var ucs2length = util3.ucs2length; - var equal = require_fast_deep_equal2(); - var ValidationError = errorClasses.Validation; - module.exports = compile; - function compile(schema2, root2, localRefs, baseId) { - var self2 = this, opts = this._opts, refVal = [void 0], refs = {}, patterns = [], patternsHash = {}, defaults = [], defaultsHash = {}, customRules = []; - root2 = root2 || { schema: schema2, refVal, refs }; - var c = checkCompiling.call(this, schema2, root2, baseId); - var compilation = this._compilations[c.index]; - if (c.compiling) return compilation.callValidate = callValidate; - var formats = this._formats; - var RULES = this.RULES; - try { - var v = localCompile(schema2, root2, localRefs, baseId); - compilation.validate = v; - var cv = compilation.callValidate; - if (cv) { - cv.schema = v.schema; - cv.errors = null; - cv.refs = v.refs; - cv.refVal = v.refVal; - cv.root = v.root; - cv.$async = v.$async; - if (opts.sourceCode) cv.source = v.source; - } - return v; - } finally { - endCompiling.call(this, schema2, root2, baseId); - } - function callValidate() { - var validate2 = compilation.validate; - var result = validate2.apply(this, arguments); - callValidate.errors = validate2.errors; - return result; - } - function localCompile(_schema, _root, localRefs2, baseId2) { - var isRoot = !_root || _root && _root.schema == _schema; - if (_root.schema != root2.schema) - return compile.call(self2, _schema, _root, localRefs2, baseId2); - var $async = _schema.$async === true; - var sourceCode = validateGenerator({ - isTop: true, - schema: _schema, - isRoot, - baseId: baseId2, - root: _root, - schemaPath: "", - errSchemaPath: "#", - errorPath: '""', - MissingRefError: errorClasses.MissingRef, - RULES, - validate: validateGenerator, - util: util3, - resolve, - resolveRef, - usePattern, - useDefault, - useCustomRule, - opts, - formats, - logger: self2.logger, - self: self2 + validateFunction(it, () => (0, boolSchema_1.topBoolOrEmptySchema)(it)); + } + exports.validateFunctionCode = validateFunctionCode; + function validateFunction({ gen, validateName, schema: schema2, schemaEnv, opts }, body) { + if (opts.code.es5) { + gen.func(validateName, (0, codegen_1._)`${names_1.default.data}, ${names_1.default.valCxt}`, schemaEnv.$async, () => { + gen.code((0, codegen_1._)`"use strict"; ${funcSourceUrl(schema2, opts)}`); + destructureValCxtES5(gen, opts); + gen.code(body); }); - sourceCode = vars(refVal, refValCode) + vars(patterns, patternCode) + vars(defaults, defaultCode) + vars(customRules, customRuleCode) + sourceCode; - if (opts.processCode) sourceCode = opts.processCode(sourceCode, _schema); - var validate2; - try { - var makeValidate = new Function( - "self", - "RULES", - "formats", - "root", - "refVal", - "defaults", - "customRules", - "equal", - "ucs2length", - "ValidationError", - sourceCode - ); - validate2 = makeValidate( - self2, - RULES, - formats, - root2, - refVal, - defaults, - customRules, - equal, - ucs2length, - ValidationError - ); - refVal[0] = validate2; - } catch (e) { - self2.logger.error("Error compiling schema, function code:", sourceCode); - throw e; - } - validate2.schema = _schema; - validate2.errors = null; - validate2.refs = refs; - validate2.refVal = refVal; - validate2.root = isRoot ? validate2 : _root; - if ($async) validate2.$async = true; - if (opts.sourceCode === true) { - validate2.source = { - code: sourceCode, - patterns, - defaults - }; - } - return validate2; - } - function resolveRef(baseId2, ref, isRoot) { - ref = resolve.url(baseId2, ref); - var refIndex = refs[ref]; - var _refVal, refCode; - if (refIndex !== void 0) { - _refVal = refVal[refIndex]; - refCode = "refVal[" + refIndex + "]"; - return resolvedRef(_refVal, refCode); - } - if (!isRoot && root2.refs) { - var rootRefId = root2.refs[ref]; - if (rootRefId !== void 0) { - _refVal = root2.refVal[rootRefId]; - refCode = addLocalRef(ref, _refVal); - return resolvedRef(_refVal, refCode); - } - } - refCode = addLocalRef(ref); - var v2 = resolve.call(self2, localCompile, root2, ref); - if (v2 === void 0) { - var localSchema = localRefs && localRefs[ref]; - if (localSchema) { - v2 = resolve.inlineRef(localSchema, opts.inlineRefs) ? localSchema : compile.call(self2, localSchema, root2, localRefs, baseId2); - } - } - if (v2 === void 0) { - removeLocalRef(ref); - } else { - replaceLocalRef(ref, v2); - return resolvedRef(v2, refCode); - } - } - function addLocalRef(ref, v2) { - var refId = refVal.length; - refVal[refId] = v2; - refs[ref] = refId; - return "refVal" + refId; - } - function removeLocalRef(ref) { - delete refs[ref]; - } - function replaceLocalRef(ref, v2) { - var refId = refs[ref]; - refVal[refId] = v2; - } - function resolvedRef(refVal2, code) { - return typeof refVal2 == "object" || typeof refVal2 == "boolean" ? { code, schema: refVal2, inline: true } : { code, $async: refVal2 && !!refVal2.$async }; - } - function usePattern(regexStr) { - var index = patternsHash[regexStr]; - if (index === void 0) { - index = patternsHash[regexStr] = patterns.length; - patterns[index] = regexStr; - } - return "pattern" + index; - } - function useDefault(value2) { - switch (typeof value2) { - case "boolean": - case "number": - return "" + value2; - case "string": - return util3.toQuotedString(value2); - case "object": - if (value2 === null) return "null"; - var valueStr = stableStringify(value2); - var index = defaultsHash[valueStr]; - if (index === void 0) { - index = defaultsHash[valueStr] = defaults.length; - defaults[index] = value2; - } - return "default" + index; - } - } - function useCustomRule(rule, schema3, parentSchema, it) { - if (self2._opts.validateSchema !== false) { - var deps = rule.definition.dependencies; - if (deps && !deps.every(function(keyword) { - return Object.prototype.hasOwnProperty.call(parentSchema, keyword); - })) - throw new Error("parent schema must have all required keywords: " + deps.join(",")); - var validateSchema = rule.definition.validateSchema; - if (validateSchema) { - var valid = validateSchema(schema3); - if (!valid) { - var message = "keyword schema is invalid: " + self2.errorsText(validateSchema.errors); - if (self2._opts.validateSchema == "log") self2.logger.error(message); - else throw new Error(message); - } - } - } - var compile2 = rule.definition.compile, inline = rule.definition.inline, macro = rule.definition.macro; - var validate2; - if (compile2) { - validate2 = compile2.call(self2, schema3, parentSchema, it); - } else if (macro) { - validate2 = macro.call(self2, schema3, parentSchema, it); - if (opts.validateSchema !== false) self2.validateSchema(validate2, true); - } else if (inline) { - validate2 = inline.call(self2, it, rule.keyword, schema3, parentSchema); - } else { - validate2 = rule.definition.validate; - if (!validate2) return; - } - if (validate2 === void 0) - throw new Error('custom keyword "' + rule.keyword + '"failed to compile'); - var index = customRules.length; - customRules[index] = validate2; - return { - code: "customRule" + index, - validate: validate2 - }; + } else { + gen.func(validateName, (0, codegen_1._)`${names_1.default.data}, ${destructureValCxt(opts)}`, schemaEnv.$async, () => gen.code(funcSourceUrl(schema2, opts)).code(body)); } } - function checkCompiling(schema2, root2, baseId) { - var index = compIndex.call(this, schema2, root2, baseId); - if (index >= 0) return { index, compiling: true }; - index = this._compilations.length; - this._compilations[index] = { - schema: schema2, - root: root2, - baseId + function destructureValCxt(opts) { + return (0, codegen_1._)`{${names_1.default.instancePath}="", ${names_1.default.parentData}, ${names_1.default.parentDataProperty}, ${names_1.default.rootData}=${names_1.default.data}${opts.dynamicRef ? (0, codegen_1._)`, ${names_1.default.dynamicAnchors}={}` : codegen_1.nil}}={}`; + } + function destructureValCxtES5(gen, opts) { + gen.if(names_1.default.valCxt, () => { + gen.var(names_1.default.instancePath, (0, codegen_1._)`${names_1.default.valCxt}.${names_1.default.instancePath}`); + gen.var(names_1.default.parentData, (0, codegen_1._)`${names_1.default.valCxt}.${names_1.default.parentData}`); + gen.var(names_1.default.parentDataProperty, (0, codegen_1._)`${names_1.default.valCxt}.${names_1.default.parentDataProperty}`); + gen.var(names_1.default.rootData, (0, codegen_1._)`${names_1.default.valCxt}.${names_1.default.rootData}`); + if (opts.dynamicRef) + gen.var(names_1.default.dynamicAnchors, (0, codegen_1._)`${names_1.default.valCxt}.${names_1.default.dynamicAnchors}`); + }, () => { + gen.var(names_1.default.instancePath, (0, codegen_1._)`""`); + gen.var(names_1.default.parentData, (0, codegen_1._)`undefined`); + gen.var(names_1.default.parentDataProperty, (0, codegen_1._)`undefined`); + gen.var(names_1.default.rootData, names_1.default.data); + if (opts.dynamicRef) + gen.var(names_1.default.dynamicAnchors, (0, codegen_1._)`{}`); + }); + } + function topSchemaObjCode(it) { + const { schema: schema2, opts, gen } = it; + validateFunction(it, () => { + if (opts.$comment && schema2.$comment) + commentKeyword(it); + checkNoDefault(it); + gen.let(names_1.default.vErrors, null); + gen.let(names_1.default.errors, 0); + if (opts.unevaluated) + resetEvaluated(it); + typeAndKeywords(it); + returnResults(it); + }); + return; + } + function resetEvaluated(it) { + const { gen, validateName } = it; + it.evaluated = gen.const("evaluated", (0, codegen_1._)`${validateName}.evaluated`); + gen.if((0, codegen_1._)`${it.evaluated}.dynamicProps`, () => gen.assign((0, codegen_1._)`${it.evaluated}.props`, (0, codegen_1._)`undefined`)); + gen.if((0, codegen_1._)`${it.evaluated}.dynamicItems`, () => gen.assign((0, codegen_1._)`${it.evaluated}.items`, (0, codegen_1._)`undefined`)); + } + function funcSourceUrl(schema2, opts) { + const schId = typeof schema2 == "object" && schema2[opts.schemaId]; + return schId && (opts.code.source || opts.code.process) ? (0, codegen_1._)`/*# sourceURL=${schId} */` : codegen_1.nil; + } + function subschemaCode(it, valid) { + if (isSchemaObj(it)) { + checkKeywords(it); + if (schemaCxtHasRules(it)) { + subSchemaObjCode(it, valid); + return; + } + } + (0, boolSchema_1.boolOrEmptySchema)(it, valid); + } + function schemaCxtHasRules({ schema: schema2, self: self2 }) { + if (typeof schema2 == "boolean") + return !schema2; + for (const key in schema2) + if (self2.RULES.all[key]) + return true; + return false; + } + function isSchemaObj(it) { + return typeof it.schema != "boolean"; + } + function subSchemaObjCode(it, valid) { + const { schema: schema2, gen, opts } = it; + if (opts.$comment && schema2.$comment) + commentKeyword(it); + updateContext(it); + checkAsyncSchema(it); + const errsCount = gen.const("_errs", names_1.default.errors); + typeAndKeywords(it, errsCount); + gen.var(valid, (0, codegen_1._)`${errsCount} === ${names_1.default.errors}`); + } + function checkKeywords(it) { + (0, util_1.checkUnknownRules)(it); + checkRefsAndKeywords(it); + } + function typeAndKeywords(it, errsCount) { + if (it.opts.jtd) + return schemaKeywords(it, [], false, errsCount); + const types = (0, dataType_1.getSchemaTypes)(it.schema); + const checkedTypes = (0, dataType_1.coerceAndCheckDataType)(it, types); + schemaKeywords(it, types, !checkedTypes, errsCount); + } + function checkRefsAndKeywords(it) { + const { schema: schema2, errSchemaPath, opts, self: self2 } = it; + if (schema2.$ref && opts.ignoreKeywordsWithRef && (0, util_1.schemaHasRulesButRef)(schema2, self2.RULES)) { + self2.logger.warn(`$ref: keywords ignored in schema at path "${errSchemaPath}"`); + } + } + function checkNoDefault(it) { + const { schema: schema2, opts } = it; + if (schema2.default !== void 0 && opts.useDefaults && opts.strictSchema) { + (0, util_1.checkStrictMode)(it, "default is ignored in the schema root"); + } + } + function updateContext(it) { + const schId = it.schema[it.opts.schemaId]; + if (schId) + it.baseId = (0, resolve_1.resolveUrl)(it.opts.uriResolver, it.baseId, schId); + } + function checkAsyncSchema(it) { + if (it.schema.$async && !it.schemaEnv.$async) + throw new Error("async schema in sync schema"); + } + function commentKeyword({ gen, schemaEnv, schema: schema2, errSchemaPath, opts }) { + const msg = schema2.$comment; + if (opts.$comment === true) { + gen.code((0, codegen_1._)`${names_1.default.self}.logger.log(${msg})`); + } else if (typeof opts.$comment == "function") { + const schemaPath = (0, codegen_1.str)`${errSchemaPath}/$comment`; + const rootName = gen.scopeValue("root", { ref: schemaEnv.root }); + gen.code((0, codegen_1._)`${names_1.default.self}.opts.$comment(${msg}, ${schemaPath}, ${rootName}.schema)`); + } + } + function returnResults(it) { + const { gen, schemaEnv, validateName, ValidationError, opts } = it; + if (schemaEnv.$async) { + gen.if((0, codegen_1._)`${names_1.default.errors} === 0`, () => gen.return(names_1.default.data), () => gen.throw((0, codegen_1._)`new ${ValidationError}(${names_1.default.vErrors})`)); + } else { + gen.assign((0, codegen_1._)`${validateName}.errors`, names_1.default.vErrors); + if (opts.unevaluated) + assignEvaluated(it); + gen.return((0, codegen_1._)`${names_1.default.errors} === 0`); + } + } + function assignEvaluated({ gen, evaluated, props, items }) { + if (props instanceof codegen_1.Name) + gen.assign((0, codegen_1._)`${evaluated}.props`, props); + if (items instanceof codegen_1.Name) + gen.assign((0, codegen_1._)`${evaluated}.items`, items); + } + function schemaKeywords(it, types, typeErrors, errsCount) { + const { gen, schema: schema2, data, allErrors, opts, self: self2 } = it; + const { RULES } = self2; + if (schema2.$ref && (opts.ignoreKeywordsWithRef || !(0, util_1.schemaHasRulesButRef)(schema2, RULES))) { + gen.block(() => keywordCode(it, "$ref", RULES.all.$ref.definition)); + return; + } + if (!opts.jtd) + checkStrictTypes(it, types); + gen.block(() => { + for (const group2 of RULES.rules) + groupKeywords(group2); + groupKeywords(RULES.post); + }); + function groupKeywords(group2) { + if (!(0, applicability_1.shouldUseGroup)(schema2, group2)) + return; + if (group2.type) { + gen.if((0, dataType_2.checkDataType)(group2.type, data, opts.strictNumbers)); + iterateKeywords(it, group2); + if (types.length === 1 && types[0] === group2.type && typeErrors) { + gen.else(); + (0, dataType_2.reportTypeError)(it); + } + gen.endIf(); + } else { + iterateKeywords(it, group2); + } + if (!allErrors) + gen.if((0, codegen_1._)`${names_1.default.errors} === ${errsCount || 0}`); + } + } + function iterateKeywords(it, group2) { + const { gen, schema: schema2, opts: { useDefaults } } = it; + if (useDefaults) + (0, defaults_1.assignDefaults)(it, group2.type); + gen.block(() => { + for (const rule of group2.rules) { + if ((0, applicability_1.shouldUseRule)(schema2, rule)) { + keywordCode(it, rule.keyword, rule.definition, group2.type); + } + } + }); + } + function checkStrictTypes(it, types) { + if (it.schemaEnv.meta || !it.opts.strictTypes) + return; + checkContextTypes(it, types); + if (!it.opts.allowUnionTypes) + checkMultipleTypes(it, types); + checkKeywordTypes(it, it.dataTypes); + } + function checkContextTypes(it, types) { + if (!types.length) + return; + if (!it.dataTypes.length) { + it.dataTypes = types; + return; + } + types.forEach((t) => { + if (!includesType(it.dataTypes, t)) { + strictTypesError(it, `type "${t}" not allowed by context "${it.dataTypes.join(",")}"`); + } + }); + narrowSchemaTypes(it, types); + } + function checkMultipleTypes(it, ts) { + if (ts.length > 1 && !(ts.length === 2 && ts.includes("null"))) { + strictTypesError(it, "use allowUnionTypes to allow union type keyword"); + } + } + function checkKeywordTypes(it, ts) { + const rules = it.self.RULES.all; + for (const keyword in rules) { + const rule = rules[keyword]; + if (typeof rule == "object" && (0, applicability_1.shouldUseRule)(it.schema, rule)) { + const { type: type2 } = rule.definition; + if (type2.length && !type2.some((t) => hasApplicableType(ts, t))) { + strictTypesError(it, `missing type "${type2.join(",")}" for keyword "${keyword}"`); + } + } + } + } + function hasApplicableType(schTs, kwdT) { + return schTs.includes(kwdT) || kwdT === "number" && schTs.includes("integer"); + } + function includesType(ts, t) { + return ts.includes(t) || t === "integer" && ts.includes("number"); + } + function narrowSchemaTypes(it, withTypes) { + const ts = []; + for (const t of it.dataTypes) { + if (includesType(withTypes, t)) + ts.push(t); + else if (withTypes.includes("integer") && t === "number") + ts.push("integer"); + } + it.dataTypes = ts; + } + function strictTypesError(it, msg) { + const schemaPath = it.schemaEnv.baseId + it.errSchemaPath; + msg += ` at "${schemaPath}" (strictTypes)`; + (0, util_1.checkStrictMode)(it, msg, it.opts.strictTypes); + } + var KeywordCxt = class { + constructor(it, def, keyword) { + (0, keyword_1.validateKeywordUsage)(it, def, keyword); + this.gen = it.gen; + this.allErrors = it.allErrors; + this.keyword = keyword; + this.data = it.data; + this.schema = it.schema[keyword]; + this.$data = def.$data && it.opts.$data && this.schema && this.schema.$data; + this.schemaValue = (0, util_1.schemaRefOrVal)(it, this.schema, keyword, this.$data); + this.schemaType = def.schemaType; + this.parentSchema = it.schema; + this.params = {}; + this.it = it; + this.def = def; + if (this.$data) { + this.schemaCode = it.gen.const("vSchema", getData(this.$data, it)); + } else { + this.schemaCode = this.schemaValue; + if (!(0, keyword_1.validSchemaType)(this.schema, def.schemaType, def.allowUndefined)) { + throw new Error(`${keyword} value must be ${JSON.stringify(def.schemaType)}`); + } + } + if ("code" in def ? def.trackErrors : def.errors !== false) { + this.errsCount = it.gen.const("_errs", names_1.default.errors); + } + } + result(condition, successAction, failAction) { + this.failResult((0, codegen_1.not)(condition), successAction, failAction); + } + failResult(condition, successAction, failAction) { + this.gen.if(condition); + if (failAction) + failAction(); + else + this.error(); + if (successAction) { + this.gen.else(); + successAction(); + if (this.allErrors) + this.gen.endIf(); + } else { + if (this.allErrors) + this.gen.endIf(); + else + this.gen.else(); + } + } + pass(condition, failAction) { + this.failResult((0, codegen_1.not)(condition), void 0, failAction); + } + fail(condition) { + if (condition === void 0) { + this.error(); + if (!this.allErrors) + this.gen.if(false); + return; + } + this.gen.if(condition); + this.error(); + if (this.allErrors) + this.gen.endIf(); + else + this.gen.else(); + } + fail$data(condition) { + if (!this.$data) + return this.fail(condition); + const { schemaCode } = this; + this.fail((0, codegen_1._)`${schemaCode} !== undefined && (${(0, codegen_1.or)(this.invalid$data(), condition)})`); + } + error(append3, errorParams, errorPaths) { + if (errorParams) { + this.setParams(errorParams); + this._error(append3, errorPaths); + this.setParams({}); + return; + } + this._error(append3, errorPaths); + } + _error(append3, errorPaths) { + ; + (append3 ? errors_1.reportExtraError : errors_1.reportError)(this, this.def.error, errorPaths); + } + $dataError() { + (0, errors_1.reportError)(this, this.def.$dataError || errors_1.keyword$DataError); + } + reset() { + if (this.errsCount === void 0) + throw new Error('add "trackErrors" to keyword definition'); + (0, errors_1.resetErrorsCount)(this.gen, this.errsCount); + } + ok(cond) { + if (!this.allErrors) + this.gen.if(cond); + } + setParams(obj, assign) { + if (assign) + Object.assign(this.params, obj); + else + this.params = obj; + } + block$data(valid, codeBlock, $dataValid = codegen_1.nil) { + this.gen.block(() => { + this.check$data(valid, $dataValid); + codeBlock(); + }); + } + check$data(valid = codegen_1.nil, $dataValid = codegen_1.nil) { + if (!this.$data) + return; + const { gen, schemaCode, schemaType, def } = this; + gen.if((0, codegen_1.or)((0, codegen_1._)`${schemaCode} === undefined`, $dataValid)); + if (valid !== codegen_1.nil) + gen.assign(valid, true); + if (schemaType.length || def.validateSchema) { + gen.elseIf(this.invalid$data()); + this.$dataError(); + if (valid !== codegen_1.nil) + gen.assign(valid, false); + } + gen.else(); + } + invalid$data() { + const { gen, schemaCode, schemaType, def, it } = this; + return (0, codegen_1.or)(wrong$DataType(), invalid$DataSchema()); + function wrong$DataType() { + if (schemaType.length) { + if (!(schemaCode instanceof codegen_1.Name)) + throw new Error("ajv implementation error"); + const st = Array.isArray(schemaType) ? schemaType : [schemaType]; + return (0, codegen_1._)`${(0, dataType_2.checkDataTypes)(st, schemaCode, it.opts.strictNumbers, dataType_2.DataType.Wrong)}`; + } + return codegen_1.nil; + } + function invalid$DataSchema() { + if (def.validateSchema) { + const validateSchemaRef = gen.scopeValue("validate$data", { ref: def.validateSchema }); + return (0, codegen_1._)`!${validateSchemaRef}(${schemaCode})`; + } + return codegen_1.nil; + } + } + subschema(appl, valid) { + const subschema = (0, subschema_1.getSubschema)(this.it, appl); + (0, subschema_1.extendSubschemaData)(subschema, this.it, appl); + (0, subschema_1.extendSubschemaMode)(subschema, appl); + const nextContext = { ...this.it, ...subschema, items: void 0, props: void 0 }; + subschemaCode(nextContext, valid); + return nextContext; + } + mergeEvaluated(schemaCxt, toName) { + const { it, gen } = this; + if (!it.opts.unevaluated) + return; + if (it.props !== true && schemaCxt.props !== void 0) { + it.props = util_1.mergeEvaluated.props(gen, schemaCxt.props, it.props, toName); + } + if (it.items !== true && schemaCxt.items !== void 0) { + it.items = util_1.mergeEvaluated.items(gen, schemaCxt.items, it.items, toName); + } + } + mergeValidEvaluated(schemaCxt, valid) { + const { it, gen } = this; + if (it.opts.unevaluated && (it.props !== true || it.items !== true)) { + gen.if(valid, () => this.mergeEvaluated(schemaCxt, codegen_1.Name)); + return true; + } + } + }; + exports.KeywordCxt = KeywordCxt; + function keywordCode(it, keyword, def, ruleType) { + const cxt = new KeywordCxt(it, def, keyword); + if ("code" in def) { + def.code(cxt, ruleType); + } else if (cxt.$data && def.validate) { + (0, keyword_1.funcKeywordCode)(cxt, def); + } else if ("macro" in def) { + (0, keyword_1.macroKeywordCode)(cxt, def); + } else if (def.compile || def.validate) { + (0, keyword_1.funcKeywordCode)(cxt, def); + } + } + var JSON_POINTER = /^\/(?:[^~]|~0|~1)*$/; + var RELATIVE_JSON_POINTER = /^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/; + function getData($data, { dataLevel, dataNames, dataPathArr }) { + let jsonPointer; + let data; + if ($data === "") + return names_1.default.rootData; + if ($data[0] === "/") { + if (!JSON_POINTER.test($data)) + throw new Error(`Invalid JSON-pointer: ${$data}`); + jsonPointer = $data; + data = names_1.default.rootData; + } else { + const matches = RELATIVE_JSON_POINTER.exec($data); + if (!matches) + throw new Error(`Invalid JSON-pointer: ${$data}`); + const up = +matches[1]; + jsonPointer = matches[2]; + if (jsonPointer === "#") { + if (up >= dataLevel) + throw new Error(errorMsg("property/index", up)); + return dataPathArr[dataLevel - up]; + } + if (up > dataLevel) + throw new Error(errorMsg("data", up)); + data = dataNames[dataLevel - up]; + if (!jsonPointer) + return data; + } + let expr = data; + const segments = jsonPointer.split("/"); + for (const segment of segments) { + if (segment) { + data = (0, codegen_1._)`${data}${(0, codegen_1.getProperty)((0, util_1.unescapeJsonPointer)(segment))}`; + expr = (0, codegen_1._)`${expr} && ${data}`; + } + } + return expr; + function errorMsg(pointerType, up) { + return `Cannot access ${pointerType} ${up} levels up, current level is ${dataLevel}`; + } + } + exports.getData = getData; + } +}); + +// ../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/runtime/validation_error.js +var require_validation_error2 = __commonJS({ + "../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/runtime/validation_error.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var ValidationError = class extends Error { + constructor(errors) { + super("validation failed"); + this.errors = errors; + this.ajv = this.validation = true; + } + }; + exports.default = ValidationError; + } +}); + +// ../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/compile/ref_error.js +var require_ref_error2 = __commonJS({ + "../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/compile/ref_error.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var resolve_1 = require_resolve2(); + var MissingRefError = class extends Error { + constructor(resolver, baseId, ref, msg) { + super(msg || `can't resolve reference ${ref} from id ${baseId}`); + this.missingRef = (0, resolve_1.resolveUrl)(resolver, baseId, ref); + this.missingSchema = (0, resolve_1.normalizeId)((0, resolve_1.getFullPath)(resolver, this.missingRef)); + } + }; + exports.default = MissingRefError; + } +}); + +// ../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/compile/index.js +var require_compile2 = __commonJS({ + "../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/compile/index.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.resolveSchema = exports.getCompilingSchema = exports.resolveRef = exports.compileSchema = exports.SchemaEnv = void 0; + var codegen_1 = require_codegen2(); + var validation_error_1 = require_validation_error2(); + var names_1 = require_names2(); + var resolve_1 = require_resolve2(); + var util_1 = require_util9(); + var validate_1 = require_validate2(); + var SchemaEnv = class { + constructor(env3) { + var _a2; + this.refs = {}; + this.dynamicAnchors = {}; + let schema2; + if (typeof env3.schema == "object") + schema2 = env3.schema; + this.schema = env3.schema; + this.schemaId = env3.schemaId; + this.root = env3.root || this; + this.baseId = (_a2 = env3.baseId) !== null && _a2 !== void 0 ? _a2 : (0, resolve_1.normalizeId)(schema2 === null || schema2 === void 0 ? void 0 : schema2[env3.schemaId || "$id"]); + this.schemaPath = env3.schemaPath; + this.localRefs = env3.localRefs; + this.meta = env3.meta; + this.$async = schema2 === null || schema2 === void 0 ? void 0 : schema2.$async; + this.refs = {}; + } + }; + exports.SchemaEnv = SchemaEnv; + function compileSchema(sch) { + const _sch = getCompilingSchema.call(this, sch); + if (_sch) + return _sch; + const rootId = (0, resolve_1.getFullPath)(this.opts.uriResolver, sch.root.baseId); + const { es5, lines } = this.opts.code; + const { ownProperties } = this.opts; + const gen = new codegen_1.CodeGen(this.scope, { es5, lines, ownProperties }); + let _ValidationError; + if (sch.$async) { + _ValidationError = gen.scopeValue("Error", { + ref: validation_error_1.default, + code: (0, codegen_1._)`require("ajv/dist/runtime/validation_error").default` + }); + } + const validateName = gen.scopeName("validate"); + sch.validateName = validateName; + const schemaCxt = { + gen, + allErrors: this.opts.allErrors, + data: names_1.default.data, + parentData: names_1.default.parentData, + parentDataProperty: names_1.default.parentDataProperty, + dataNames: [names_1.default.data], + dataPathArr: [codegen_1.nil], + // TODO can its length be used as dataLevel if nil is removed? + dataLevel: 0, + dataTypes: [], + definedProperties: /* @__PURE__ */ new Set(), + topSchemaRef: gen.scopeValue("schema", this.opts.code.source === true ? { ref: sch.schema, code: (0, codegen_1.stringify)(sch.schema) } : { ref: sch.schema }), + validateName, + ValidationError: _ValidationError, + schema: sch.schema, + schemaEnv: sch, + rootId, + baseId: sch.baseId || rootId, + schemaPath: codegen_1.nil, + errSchemaPath: sch.schemaPath || (this.opts.jtd ? "" : "#"), + errorPath: (0, codegen_1._)`""`, + opts: this.opts, + self: this }; - return { index, compiling: false }; - } - function endCompiling(schema2, root2, baseId) { - var i = compIndex.call(this, schema2, root2, baseId); - if (i >= 0) this._compilations.splice(i, 1); - } - function compIndex(schema2, root2, baseId) { - for (var i = 0; i < this._compilations.length; i++) { - var c = this._compilations[i]; - if (c.schema == schema2 && c.root == root2 && c.baseId == baseId) return i; - } - return -1; - } - function patternCode(i, patterns) { - return "var pattern" + i + " = new RegExp(" + util3.toQuotedString(patterns[i]) + ");"; - } - function defaultCode(i) { - return "var default" + i + " = defaults[" + i + "];"; - } - function refValCode(i, refVal) { - return refVal[i] === void 0 ? "" : "var refVal" + i + " = refVal[" + i + "];"; - } - function customRuleCode(i) { - return "var customRule" + i + " = customRules[" + i + "];"; - } - function vars(arr, statement) { - if (!arr.length) return ""; - var code = ""; - for (var i = 0; i < arr.length; i++) - code += statement(i, arr); - return code; - } - } -}); - -// node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/cache.js -var require_cache3 = __commonJS({ - "node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/cache.js"(exports, module) { - "use strict"; - var Cache = module.exports = function Cache2() { - this._cache = {}; - }; - Cache.prototype.put = function Cache_put(key, value2) { - this._cache[key] = value2; - }; - Cache.prototype.get = function Cache_get(key) { - return this._cache[key]; - }; - Cache.prototype.del = function Cache_del(key) { - delete this._cache[key]; - }; - Cache.prototype.clear = function Cache_clear() { - this._cache = {}; - }; - } -}); - -// node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/compile/formats.js -var require_formats2 = __commonJS({ - "node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/compile/formats.js"(exports, module) { - "use strict"; - var util3 = require_util9(); - var DATE = /^(\d\d\d\d)-(\d\d)-(\d\d)$/; - var DAYS = [0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; - var TIME = /^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i; - var HOSTNAME = /^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i; - var URI = /^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01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-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i; - var URITEMPLATE = /^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i; - var URL2 = /^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i; - var UUID = /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i; - var JSON_POINTER = /^(?:\/(?:[^~/]|~0|~1)*)*$/; - var JSON_POINTER_URI_FRAGMENT = /^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i; - var RELATIVE_JSON_POINTER = /^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/; - module.exports = formats; - function formats(mode) { - mode = mode == "full" ? "full" : "fast"; - return util3.copy(formats[mode]); - } - formats.fast = { - // date: http://tools.ietf.org/html/rfc3339#section-5.6 - date: /^\d\d\d\d-[0-1]\d-[0-3]\d$/, - // date-time: http://tools.ietf.org/html/rfc3339#section-5.6 - time: /^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i, - "date-time": /^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i, - // uri: https://github.com/mafintosh/is-my-json-valid/blob/master/formats.js - uri: /^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i, - "uri-reference": /^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i, - "uri-template": URITEMPLATE, - url: URL2, - // email (sources from jsen validator): - // http://stackoverflow.com/questions/201323/using-a-regular-expression-to-validate-an-email-address#answer-8829363 - // http://www.w3.org/TR/html5/forms.html#valid-e-mail-address (search for 'willful violation') - email: /^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i, - hostname: HOSTNAME, - // optimized https://www.safaribooksonline.com/library/view/regular-expressions-cookbook/9780596802837/ch07s16.html - ipv4: /^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/, - // optimized http://stackoverflow.com/questions/53497/regular-expression-that-matches-valid-ipv6-addresses - ipv6: /^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i, - regex: regex4, - // uuid: http://tools.ietf.org/html/rfc4122 - uuid: UUID, - // JSON-pointer: https://tools.ietf.org/html/rfc6901 - // uri fragment: https://tools.ietf.org/html/rfc3986#appendix-A - "json-pointer": JSON_POINTER, - "json-pointer-uri-fragment": JSON_POINTER_URI_FRAGMENT, - // relative JSON-pointer: http://tools.ietf.org/html/draft-luff-relative-json-pointer-00 - "relative-json-pointer": RELATIVE_JSON_POINTER - }; - formats.full = { - date: date2, - time: time2, - "date-time": date_time, - uri, - "uri-reference": URIREF, - "uri-template": URITEMPLATE, - url: URL2, - email: /^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i, - hostname: HOSTNAME, - ipv4: /^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?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?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i, - regex: regex4, - uuid: UUID, - "json-pointer": JSON_POINTER, - "json-pointer-uri-fragment": JSON_POINTER_URI_FRAGMENT, - "relative-json-pointer": RELATIVE_JSON_POINTER - }; - function isLeapYear(year) { - return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0); - } - function date2(str) { - var matches = str.match(DATE); - if (!matches) return false; - var year = +matches[1]; - var month = +matches[2]; - var day = +matches[3]; - return month >= 1 && month <= 12 && day >= 1 && day <= (month == 2 && isLeapYear(year) ? 29 : DAYS[month]); - } - function time2(str, full) { - var matches = str.match(TIME); - if (!matches) return false; - var hour = matches[1]; - var minute = matches[2]; - var second = matches[3]; - var timeZone = matches[5]; - return (hour <= 23 && minute <= 59 && second <= 59 || hour == 23 && minute == 59 && second == 60) && (!full || timeZone); - } - 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); - } - var NOT_URI_FRAGMENT = /\/|:/; - function uri(str) { - return NOT_URI_FRAGMENT.test(str) && URI.test(str); - } - var Z_ANCHOR = /[^\\]\\Z/; - function regex4(str) { - if (Z_ANCHOR.test(str)) return false; + let sourceCode; try { - new RegExp(str); - return true; + this._compilations.add(sch); + (0, validate_1.validateFunctionCode)(schemaCxt); + gen.optimize(this.opts.code.optimize); + const validateCode = gen.toString(); + sourceCode = `${gen.scopeRefs(names_1.default.scope)}return ${validateCode}`; + if (this.opts.code.process) + sourceCode = this.opts.code.process(sourceCode, sch); + const makeValidate = new Function(`${names_1.default.self}`, `${names_1.default.scope}`, sourceCode); + const validate2 = makeValidate(this, this.scope.get()); + this.scope.value(validateName, { ref: validate2 }); + validate2.errors = null; + validate2.schema = sch.schema; + validate2.schemaEnv = sch; + if (sch.$async) + validate2.$async = true; + if (this.opts.code.source === true) { + validate2.source = { validateName, validateCode, scopeValues: gen._values }; + } + if (this.opts.unevaluated) { + const { props, items } = schemaCxt; + validate2.evaluated = { + props: props instanceof codegen_1.Name ? void 0 : props, + items: items instanceof codegen_1.Name ? void 0 : items, + dynamicProps: props instanceof codegen_1.Name, + dynamicItems: items instanceof codegen_1.Name + }; + if (validate2.source) + validate2.source.evaluated = (0, codegen_1.stringify)(validate2.evaluated); + } + sch.validate = validate2; + return sch; } catch (e) { + delete sch.validate; + delete sch.validateName; + if (sourceCode) + this.logger.error("Error compiling schema, function code:", sourceCode); + throw e; + } finally { + this._compilations.delete(sch); + } + } + exports.compileSchema = compileSchema; + function resolveRef2(root2, baseId, ref) { + var _a2; + ref = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, ref); + const schOrFunc = root2.refs[ref]; + if (schOrFunc) + return schOrFunc; + let _sch = resolve.call(this, root2, ref); + if (_sch === void 0) { + const schema2 = (_a2 = root2.localRefs) === null || _a2 === void 0 ? void 0 : _a2[ref]; + const { schemaId } = this.opts; + if (schema2) + _sch = new SchemaEnv({ schema: schema2, schemaId, root: root2, baseId }); + } + if (_sch === void 0) + return; + return root2.refs[ref] = inlineOrCompile.call(this, _sch); + } + exports.resolveRef = resolveRef2; + function inlineOrCompile(sch) { + if ((0, resolve_1.inlineRef)(sch.schema, this.opts.inlineRefs)) + return sch.schema; + return sch.validate ? sch : compileSchema.call(this, sch); + } + function getCompilingSchema(schEnv) { + for (const sch of this._compilations) { + if (sameSchemaEnv(sch, schEnv)) + return sch; + } + } + exports.getCompilingSchema = getCompilingSchema; + function sameSchemaEnv(s1, s2) { + return s1.schema === s2.schema && s1.root === s2.root && s1.baseId === s2.baseId; + } + function resolve(root2, ref) { + let sch; + while (typeof (sch = this.refs[ref]) == "string") + ref = sch; + return sch || this.schemas[ref] || resolveSchema.call(this, root2, ref); + } + function resolveSchema(root2, ref) { + const p = this.opts.uriResolver.parse(ref); + const refPath = (0, resolve_1._getFullPath)(this.opts.uriResolver, p); + let baseId = (0, resolve_1.getFullPath)(this.opts.uriResolver, root2.baseId, void 0); + if (Object.keys(root2.schema).length > 0 && refPath === baseId) { + return getJsonPointer.call(this, p, root2); + } + const id = (0, resolve_1.normalizeId)(refPath); + const schOrRef = this.refs[id] || this.schemas[id]; + if (typeof schOrRef == "string") { + const sch = resolveSchema.call(this, root2, schOrRef); + if (typeof (sch === null || sch === void 0 ? void 0 : sch.schema) !== "object") + return; + return getJsonPointer.call(this, p, sch); + } + if (typeof (schOrRef === null || schOrRef === void 0 ? void 0 : schOrRef.schema) !== "object") + return; + if (!schOrRef.validate) + compileSchema.call(this, schOrRef); + if (id === (0, resolve_1.normalizeId)(ref)) { + const { schema: schema2 } = schOrRef; + const { schemaId } = this.opts; + const schId = schema2[schemaId]; + if (schId) + baseId = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, schId); + return new SchemaEnv({ schema: schema2, schemaId, root: root2, baseId }); + } + return getJsonPointer.call(this, p, schOrRef); + } + exports.resolveSchema = resolveSchema; + var PREVENT_SCOPE_CHANGE = /* @__PURE__ */ new Set([ + "properties", + "patternProperties", + "enum", + "dependencies", + "definitions" + ]); + function getJsonPointer(parsedRef, { baseId, schema: schema2, root: root2 }) { + var _a2; + if (((_a2 = parsedRef.fragment) === null || _a2 === void 0 ? void 0 : _a2[0]) !== "/") + return; + for (const part of parsedRef.fragment.slice(1).split("/")) { + if (typeof schema2 === "boolean") + return; + const partSchema = schema2[(0, util_1.unescapeFragment)(part)]; + if (partSchema === void 0) + return; + schema2 = partSchema; + const schId = typeof schema2 === "object" && schema2[this.opts.schemaId]; + if (!PREVENT_SCOPE_CHANGE.has(part) && schId) { + baseId = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, schId); + } + } + let env3; + if (typeof schema2 != "boolean" && schema2.$ref && !(0, util_1.schemaHasRulesButRef)(schema2, this.RULES)) { + const $ref = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, schema2.$ref); + env3 = resolveSchema.call(this, root2, $ref); + } + const { schemaId } = this.opts; + env3 = env3 || new SchemaEnv({ schema: schema2, schemaId, root: root2, baseId }); + if (env3.schema !== env3.root.schema) + return env3; + return void 0; + } + } +}); + +// ../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/refs/data.json +var require_data2 = __commonJS({ + "../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/refs/data.json"(exports, module) { + module.exports = { + $id: "https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#", + description: "Meta-schema for $data reference (JSON AnySchema extension proposal)", + type: "object", + required: ["$data"], + properties: { + $data: { + type: "string", + anyOf: [{ format: "relative-json-pointer" }, { format: "json-pointer" }] + } + }, + additionalProperties: false + }; + } +}); + +// ../node_modules/.pnpm/fast-uri@3.1.0/node_modules/fast-uri/lib/utils.js +var require_utils5 = __commonJS({ + "../node_modules/.pnpm/fast-uri@3.1.0/node_modules/fast-uri/lib/utils.js"(exports, module) { + "use strict"; + var isUUID = RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu); + var isIPv4 = RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u); + function stringArrayToHexStripped(input) { + let acc = ""; + let code = 0; + let i = 0; + for (i = 0; i < input.length; i++) { + code = input[i].charCodeAt(0); + if (code === 48) { + continue; + } + if (!(code >= 48 && code <= 57 || code >= 65 && code <= 70 || code >= 97 && code <= 102)) { + return ""; + } + acc += input[i]; + break; + } + for (i += 1; i < input.length; i++) { + code = input[i].charCodeAt(0); + if (!(code >= 48 && code <= 57 || code >= 65 && code <= 70 || code >= 97 && code <= 102)) { + return ""; + } + acc += input[i]; + } + return acc; + } + var nonSimpleDomain = RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u); + function consumeIsZone(buffer) { + buffer.length = 0; + return true; + } + function consumeHextets(buffer, address, output) { + if (buffer.length) { + const hex4 = stringArrayToHexStripped(buffer); + if (hex4 !== "") { + address.push(hex4); + } else { + output.error = true; + return false; + } + buffer.length = 0; + } + return true; + } + function getIPV6(input) { + let tokenCount = 0; + const output = { error: false, address: "", zone: "" }; + const address = []; + const buffer = []; + let endipv6Encountered = false; + let endIpv6 = false; + let consume = consumeHextets; + for (let i = 0; i < input.length; i++) { + const cursor2 = input[i]; + if (cursor2 === "[" || cursor2 === "]") { + continue; + } + if (cursor2 === ":") { + if (endipv6Encountered === true) { + endIpv6 = true; + } + if (!consume(buffer, address, output)) { + break; + } + if (++tokenCount > 7) { + output.error = true; + break; + } + if (i > 0 && input[i - 1] === ":") { + endipv6Encountered = true; + } + address.push(":"); + continue; + } else if (cursor2 === "%") { + if (!consume(buffer, address, output)) { + break; + } + consume = consumeIsZone; + } else { + buffer.push(cursor2); + continue; + } + } + if (buffer.length) { + if (consume === consumeIsZone) { + output.zone = buffer.join(""); + } else if (endIpv6) { + address.push(buffer.join("")); + } else { + address.push(stringArrayToHexStripped(buffer)); + } + } + output.address = address.join(""); + return output; + } + function normalizeIPv6(host) { + if (findToken(host, ":") < 2) { + return { host, isIPV6: false }; + } + const ipv65 = getIPV6(host); + if (!ipv65.error) { + let newHost = ipv65.address; + let escapedHost = ipv65.address; + if (ipv65.zone) { + newHost += "%" + ipv65.zone; + escapedHost += "%25" + ipv65.zone; + } + return { host: newHost, isIPV6: true, escapedHost }; + } else { + return { host, isIPV6: false }; + } + } + function findToken(str, token) { + let ind = 0; + for (let i = 0; i < str.length; i++) { + if (str[i] === token) ind++; + } + return ind; + } + function removeDotSegments(path4) { + let input = path4; + const output = []; + let nextSlash = -1; + let len = 0; + while (len = input.length) { + if (len === 1) { + if (input === ".") { + break; + } else if (input === "/") { + output.push("/"); + break; + } else { + output.push(input); + break; + } + } else if (len === 2) { + if (input[0] === ".") { + if (input[1] === ".") { + break; + } else if (input[1] === "/") { + input = input.slice(2); + continue; + } + } else if (input[0] === "/") { + if (input[1] === "." || input[1] === "/") { + output.push("/"); + break; + } + } + } else if (len === 3) { + if (input === "/..") { + if (output.length !== 0) { + output.pop(); + } + output.push("/"); + break; + } + } + if (input[0] === ".") { + if (input[1] === ".") { + if (input[2] === "/") { + input = input.slice(3); + continue; + } + } else if (input[1] === "/") { + input = input.slice(2); + continue; + } + } else if (input[0] === "/") { + if (input[1] === ".") { + if (input[2] === "/") { + input = input.slice(2); + continue; + } else if (input[2] === ".") { + if (input[3] === "/") { + input = input.slice(3); + if (output.length !== 0) { + output.pop(); + } + continue; + } + } + } + } + if ((nextSlash = input.indexOf("/", 1)) === -1) { + output.push(input); + break; + } else { + output.push(input.slice(0, nextSlash)); + input = input.slice(nextSlash); + } + } + return output.join(""); + } + function normalizeComponentEncoding(component, esc4) { + const func = esc4 !== true ? escape : unescape; + if (component.scheme !== void 0) { + component.scheme = func(component.scheme); + } + if (component.userinfo !== void 0) { + component.userinfo = func(component.userinfo); + } + if (component.host !== void 0) { + component.host = func(component.host); + } + if (component.path !== void 0) { + component.path = func(component.path); + } + if (component.query !== void 0) { + component.query = func(component.query); + } + if (component.fragment !== void 0) { + component.fragment = func(component.fragment); + } + return component; + } + function recomposeAuthority(component) { + const uriTokens = []; + if (component.userinfo !== void 0) { + uriTokens.push(component.userinfo); + uriTokens.push("@"); + } + if (component.host !== void 0) { + let host = unescape(component.host); + if (!isIPv4(host)) { + const ipV6res = normalizeIPv6(host); + if (ipV6res.isIPV6 === true) { + host = `[${ipV6res.escapedHost}]`; + } else { + host = component.host; + } + } + uriTokens.push(host); + } + if (typeof component.port === "number" || typeof component.port === "string") { + uriTokens.push(":"); + uriTokens.push(String(component.port)); + } + return uriTokens.length ? uriTokens.join("") : void 0; + } + module.exports = { + nonSimpleDomain, + recomposeAuthority, + normalizeComponentEncoding, + removeDotSegments, + isIPv4, + isUUID, + normalizeIPv6, + stringArrayToHexStripped + }; + } +}); + +// ../node_modules/.pnpm/fast-uri@3.1.0/node_modules/fast-uri/lib/schemes.js +var require_schemes2 = __commonJS({ + "../node_modules/.pnpm/fast-uri@3.1.0/node_modules/fast-uri/lib/schemes.js"(exports, module) { + "use strict"; + var { isUUID } = require_utils5(); + var URN_REG = /([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu; + var supportedSchemeNames = ( + /** @type {const} */ + [ + "http", + "https", + "ws", + "wss", + "urn", + "urn:uuid" + ] + ); + function isValidSchemeName(name) { + return supportedSchemeNames.indexOf( + /** @type {*} */ + name + ) !== -1; + } + function wsIsSecure(wsComponent) { + if (wsComponent.secure === true) { + return true; + } else if (wsComponent.secure === false) { + return false; + } else if (wsComponent.scheme) { + return wsComponent.scheme.length === 3 && (wsComponent.scheme[0] === "w" || wsComponent.scheme[0] === "W") && (wsComponent.scheme[1] === "s" || wsComponent.scheme[1] === "S") && (wsComponent.scheme[2] === "s" || wsComponent.scheme[2] === "S"); + } else { return false; } } - } -}); - -// node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/dotjs/ref.js -var require_ref2 = __commonJS({ - "node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/dotjs/ref.js"(exports, module) { - "use strict"; - module.exports = function generate_ref(it, $keyword, $ruleType) { - var out = " "; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $errSchemaPath = it.errSchemaPath + "/" + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = "data" + ($dataLvl || ""); - var $valid = "valid" + $lvl; - var $async, $refCode; - if ($schema == "#" || $schema == "#/") { - if (it.isRoot) { - $async = it.async; - $refCode = "validate"; - } else { - $async = it.root.schema.$async === true; - $refCode = "root.refVal[0]"; + function httpParse(component) { + if (!component.host) { + component.error = component.error || "HTTP URIs must have a host."; + } + return component; + } + function httpSerialize(component) { + const secure = String(component.scheme).toLowerCase() === "https"; + if (component.port === (secure ? 443 : 80) || component.port === "") { + component.port = void 0; + } + if (!component.path) { + component.path = "/"; + } + return component; + } + function wsParse(wsComponent) { + wsComponent.secure = wsIsSecure(wsComponent); + wsComponent.resourceName = (wsComponent.path || "/") + (wsComponent.query ? "?" + wsComponent.query : ""); + wsComponent.path = void 0; + wsComponent.query = void 0; + return wsComponent; + } + function wsSerialize(wsComponent) { + if (wsComponent.port === (wsIsSecure(wsComponent) ? 443 : 80) || wsComponent.port === "") { + wsComponent.port = void 0; + } + if (typeof wsComponent.secure === "boolean") { + wsComponent.scheme = wsComponent.secure ? "wss" : "ws"; + wsComponent.secure = void 0; + } + if (wsComponent.resourceName) { + const [path4, query2] = wsComponent.resourceName.split("?"); + wsComponent.path = path4 && path4 !== "/" ? path4 : void 0; + wsComponent.query = query2; + wsComponent.resourceName = void 0; + } + wsComponent.fragment = void 0; + return wsComponent; + } + function urnParse(urnComponent, options) { + if (!urnComponent.path) { + urnComponent.error = "URN can not be parsed"; + return urnComponent; + } + const matches = urnComponent.path.match(URN_REG); + if (matches) { + const scheme = options.scheme || urnComponent.scheme || "urn"; + urnComponent.nid = matches[1].toLowerCase(); + urnComponent.nss = matches[2]; + const urnScheme = `${scheme}:${options.nid || urnComponent.nid}`; + const schemeHandler = getSchemeHandler(urnScheme); + urnComponent.path = void 0; + if (schemeHandler) { + urnComponent = schemeHandler.parse(urnComponent, options); } } else { - var $refVal = it.resolveRef(it.baseId, $schema, it.isRoot); - if ($refVal === void 0) { - var $message = it.MissingRefError.message(it.baseId, $schema); - if (it.opts.missingRefs == "fail") { - it.logger.error($message); - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ""; - if (it.createErrors !== false) { - out += " { keyword: '$ref' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { ref: '" + it.util.escapeQuotes($schema) + "' } "; - if (it.opts.messages !== false) { - out += " , message: 'can\\'t resolve reference " + it.util.escapeQuotes($schema) + "' "; - } - if (it.opts.verbose) { - out += " , schema: " + it.util.toQuotedString($schema) + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; - } - out += " } "; - } else { - out += " {} "; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - if (it.async) { - out += " throw new ValidationError([" + __err + "]); "; - } else { - out += " validate.errors = [" + __err + "]; return false; "; - } - } else { - out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; - } - if ($breakOnError) { - out += " if (false) { "; - } - } else if (it.opts.missingRefs == "ignore") { - it.logger.warn($message); - if ($breakOnError) { - out += " if (true) { "; - } - } else { - throw new it.MissingRefError(it.baseId, $schema, $message); - } - } else if ($refVal.inline) { - var $it = it.util.copy(it); - $it.level++; - var $nextValid = "valid" + $it.level; - $it.schema = $refVal.schema; - $it.schemaPath = ""; - $it.errSchemaPath = $schema; - var $code = it.validate($it).replace(/validate\.schema/g, $refVal.code); - out += " " + $code + " "; - if ($breakOnError) { - out += " if (" + $nextValid + ") { "; - } - } else { - $async = $refVal.$async === true || it.async && $refVal.$async !== false; - $refCode = $refVal.code; - } - } - if ($refCode) { - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ""; - if (it.opts.passContext) { - out += " " + $refCode + ".call(this, "; - } else { - out += " " + $refCode + "( "; - } - out += " " + $data + ", (dataPath || '')"; - if (it.errorPath != '""') { - out += " + " + it.errorPath; - } - var $parentData = $dataLvl ? "data" + ($dataLvl - 1 || "") : "parentData", $parentDataProperty = $dataLvl ? it.dataPathArr[$dataLvl] : "parentDataProperty"; - out += " , " + $parentData + " , " + $parentDataProperty + ", rootData) "; - var __callValidate = out; - out = $$outStack.pop(); - if ($async) { - if (!it.async) throw new Error("async schema referenced by sync schema"); - if ($breakOnError) { - out += " var " + $valid + "; "; - } - out += " try { await " + __callValidate + "; "; - if ($breakOnError) { - out += " " + $valid + " = true; "; - } - out += " } catch (e) { if (!(e instanceof ValidationError)) throw e; if (vErrors === null) vErrors = e.errors; else vErrors = vErrors.concat(e.errors); errors = vErrors.length; "; - if ($breakOnError) { - out += " " + $valid + " = false; "; - } - out += " } "; - if ($breakOnError) { - out += " if (" + $valid + ") { "; - } - } else { - out += " if (!" + __callValidate + ") { if (vErrors === null) vErrors = " + $refCode + ".errors; else vErrors = vErrors.concat(" + $refCode + ".errors); errors = vErrors.length; } "; - if ($breakOnError) { - out += " else { "; - } - } - } - return out; - }; - } -}); - -// node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/dotjs/allOf.js -var require_allOf2 = __commonJS({ - "node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/dotjs/allOf.js"(exports, module) { - "use strict"; - module.exports = function generate_allOf(it, $keyword, $ruleType) { - var out = " "; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + "/" + $keyword; - var $breakOnError = !it.opts.allErrors; - var $it = it.util.copy(it); - var $closingBraces = ""; - $it.level++; - var $nextValid = "valid" + $it.level; - var $currentBaseId = $it.baseId, $allSchemasEmpty = true; - var arr1 = $schema; - if (arr1) { - var $sch, $i = -1, l1 = arr1.length - 1; - while ($i < l1) { - $sch = arr1[$i += 1]; - if (it.opts.strictKeywords ? typeof $sch == "object" && Object.keys($sch).length > 0 || $sch === false : it.util.schemaHasRules($sch, it.RULES.all)) { - $allSchemasEmpty = false; - $it.schema = $sch; - $it.schemaPath = $schemaPath + "[" + $i + "]"; - $it.errSchemaPath = $errSchemaPath + "/" + $i; - out += " " + it.validate($it) + " "; - $it.baseId = $currentBaseId; - if ($breakOnError) { - out += " if (" + $nextValid + ") { "; - $closingBraces += "}"; - } - } - } - } - if ($breakOnError) { - if ($allSchemasEmpty) { - out += " if (true) { "; - } else { - out += " " + $closingBraces.slice(0, -1) + " "; - } - } - return out; - }; - } -}); - -// node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/dotjs/anyOf.js -var require_anyOf2 = __commonJS({ - "node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/dotjs/anyOf.js"(exports, module) { - "use strict"; - module.exports = function generate_anyOf(it, $keyword, $ruleType) { - var out = " "; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + "/" + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = "data" + ($dataLvl || ""); - var $valid = "valid" + $lvl; - var $errs = "errs__" + $lvl; - var $it = it.util.copy(it); - var $closingBraces = ""; - $it.level++; - var $nextValid = "valid" + $it.level; - var $noEmptySchema = $schema.every(function($sch2) { - return it.opts.strictKeywords ? typeof $sch2 == "object" && Object.keys($sch2).length > 0 || $sch2 === false : it.util.schemaHasRules($sch2, it.RULES.all); - }); - if ($noEmptySchema) { - var $currentBaseId = $it.baseId; - out += " var " + $errs + " = errors; var " + $valid + " = false; "; - var $wasComposite = it.compositeRule; - it.compositeRule = $it.compositeRule = true; - var arr1 = $schema; - if (arr1) { - var $sch, $i = -1, l1 = arr1.length - 1; - while ($i < l1) { - $sch = arr1[$i += 1]; - $it.schema = $sch; - $it.schemaPath = $schemaPath + "[" + $i + "]"; - $it.errSchemaPath = $errSchemaPath + "/" + $i; - out += " " + it.validate($it) + " "; - $it.baseId = $currentBaseId; - out += " " + $valid + " = " + $valid + " || " + $nextValid + "; if (!" + $valid + ") { "; - $closingBraces += "}"; - } - } - it.compositeRule = $it.compositeRule = $wasComposite; - out += " " + $closingBraces + " if (!" + $valid + ") { var err = "; - if (it.createErrors !== false) { - out += " { keyword: 'anyOf' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: {} "; - if (it.opts.messages !== false) { - out += " , message: 'should match some schema in anyOf' "; - } - if (it.opts.verbose) { - out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; - } - out += " } "; - } else { - out += " {} "; - } - out += "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; - if (!it.compositeRule && $breakOnError) { - if (it.async) { - out += " throw new ValidationError(vErrors); "; - } else { - out += " validate.errors = vErrors; return false; "; - } - } - out += " } else { errors = " + $errs + "; if (vErrors !== null) { if (" + $errs + ") vErrors.length = " + $errs + "; else vErrors = null; } "; - if (it.opts.allErrors) { - out += " } "; - } - } else { - if ($breakOnError) { - out += " if (true) { "; - } - } - return out; - }; - } -}); - -// node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/dotjs/comment.js -var require_comment2 = __commonJS({ - "node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/dotjs/comment.js"(exports, module) { - "use strict"; - module.exports = function generate_comment(it, $keyword, $ruleType) { - var out = " "; - var $schema = it.schema[$keyword]; - var $errSchemaPath = it.errSchemaPath + "/" + $keyword; - var $breakOnError = !it.opts.allErrors; - var $comment = it.util.toQuotedString($schema); - if (it.opts.$comment === true) { - out += " console.log(" + $comment + ");"; - } else if (typeof it.opts.$comment == "function") { - out += " self._opts.$comment(" + $comment + ", " + it.util.toQuotedString($errSchemaPath) + ", validate.root.schema);"; - } - return out; - }; - } -}); - -// node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/dotjs/const.js -var require_const2 = __commonJS({ - "node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/dotjs/const.js"(exports, module) { - "use strict"; - module.exports = function generate_const(it, $keyword, $ruleType) { - var out = " "; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + "/" + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = "data" + ($dataLvl || ""); - var $valid = "valid" + $lvl; - var $isData = it.opts.$data && $schema && $schema.$data, $schemaValue; - if ($isData) { - out += " var schema" + $lvl + " = " + it.util.getData($schema.$data, $dataLvl, it.dataPathArr) + "; "; - $schemaValue = "schema" + $lvl; - } else { - $schemaValue = $schema; - } - if (!$isData) { - out += " var schema" + $lvl + " = validate.schema" + $schemaPath + ";"; - } - out += "var " + $valid + " = equal(" + $data + ", schema" + $lvl + "); if (!" + $valid + ") { "; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ""; - if (it.createErrors !== false) { - out += " { keyword: 'const' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { allowedValue: schema" + $lvl + " } "; - if (it.opts.messages !== false) { - out += " , message: 'should be equal to constant' "; - } - if (it.opts.verbose) { - out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; - } - out += " } "; - } else { - out += " {} "; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - if (it.async) { - out += " throw new ValidationError([" + __err + "]); "; - } else { - out += " validate.errors = [" + __err + "]; return false; "; - } - } else { - out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; - } - out += " }"; - if ($breakOnError) { - out += " else { "; - } - return out; - }; - } -}); - -// node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/dotjs/contains.js -var require_contains2 = __commonJS({ - "node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/dotjs/contains.js"(exports, module) { - "use strict"; - module.exports = function generate_contains(it, $keyword, $ruleType) { - var out = " "; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + "/" + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = "data" + ($dataLvl || ""); - var $valid = "valid" + $lvl; - var $errs = "errs__" + $lvl; - var $it = it.util.copy(it); - var $closingBraces = ""; - $it.level++; - var $nextValid = "valid" + $it.level; - var $idx = "i" + $lvl, $dataNxt = $it.dataLevel = it.dataLevel + 1, $nextData = "data" + $dataNxt, $currentBaseId = it.baseId, $nonEmptySchema = it.opts.strictKeywords ? typeof $schema == "object" && Object.keys($schema).length > 0 || $schema === false : it.util.schemaHasRules($schema, it.RULES.all); - out += "var " + $errs + " = errors;var " + $valid + ";"; - if ($nonEmptySchema) { - var $wasComposite = it.compositeRule; - it.compositeRule = $it.compositeRule = true; - $it.schema = $schema; - $it.schemaPath = $schemaPath; - $it.errSchemaPath = $errSchemaPath; - out += " var " + $nextValid + " = false; for (var " + $idx + " = 0; " + $idx + " < " + $data + ".length; " + $idx + "++) { "; - $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true); - var $passData = $data + "[" + $idx + "]"; - $it.dataPathArr[$dataNxt] = $idx; - var $code = it.validate($it); - $it.baseId = $currentBaseId; - if (it.util.varOccurences($code, $nextData) < 2) { - out += " " + it.util.varReplace($code, $nextData, $passData) + " "; - } else { - out += " var " + $nextData + " = " + $passData + "; " + $code + " "; - } - out += " if (" + $nextValid + ") break; } "; - it.compositeRule = $it.compositeRule = $wasComposite; - out += " " + $closingBraces + " if (!" + $nextValid + ") {"; - } else { - out += " if (" + $data + ".length == 0) {"; - } - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ""; - if (it.createErrors !== false) { - out += " { keyword: 'contains' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: {} "; - if (it.opts.messages !== false) { - out += " , message: 'should contain a valid item' "; - } - if (it.opts.verbose) { - out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; - } - out += " } "; - } else { - out += " {} "; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - if (it.async) { - out += " throw new ValidationError([" + __err + "]); "; - } else { - out += " validate.errors = [" + __err + "]; return false; "; - } - } else { - out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; - } - out += " } else { "; - if ($nonEmptySchema) { - out += " errors = " + $errs + "; if (vErrors !== null) { if (" + $errs + ") vErrors.length = " + $errs + "; else vErrors = null; } "; - } - if (it.opts.allErrors) { - out += " } "; - } - return out; - }; - } -}); - -// node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/dotjs/dependencies.js -var require_dependencies2 = __commonJS({ - "node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/dotjs/dependencies.js"(exports, module) { - "use strict"; - module.exports = function generate_dependencies(it, $keyword, $ruleType) { - var out = " "; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + "/" + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = "data" + ($dataLvl || ""); - var $errs = "errs__" + $lvl; - var $it = it.util.copy(it); - var $closingBraces = ""; - $it.level++; - var $nextValid = "valid" + $it.level; - var $schemaDeps = {}, $propertyDeps = {}, $ownProperties = it.opts.ownProperties; - for ($property in $schema) { - if ($property == "__proto__") continue; - var $sch = $schema[$property]; - var $deps = Array.isArray($sch) ? $propertyDeps : $schemaDeps; - $deps[$property] = $sch; - } - out += "var " + $errs + " = errors;"; - var $currentErrorPath = it.errorPath; - out += "var missing" + $lvl + ";"; - for (var $property in $propertyDeps) { - $deps = $propertyDeps[$property]; - if ($deps.length) { - out += " if ( " + $data + it.util.getProperty($property) + " !== undefined "; - if ($ownProperties) { - out += " && Object.prototype.hasOwnProperty.call(" + $data + ", '" + it.util.escapeQuotes($property) + "') "; - } - if ($breakOnError) { - out += " && ( "; - var arr1 = $deps; - if (arr1) { - var $propertyKey, $i = -1, l1 = arr1.length - 1; - while ($i < l1) { - $propertyKey = arr1[$i += 1]; - if ($i) { - out += " || "; - } - var $prop = it.util.getProperty($propertyKey), $useData = $data + $prop; - out += " ( ( " + $useData + " === undefined "; - if ($ownProperties) { - out += " || ! Object.prototype.hasOwnProperty.call(" + $data + ", '" + it.util.escapeQuotes($propertyKey) + "') "; - } - out += ") && (missing" + $lvl + " = " + it.util.toQuotedString(it.opts.jsonPointers ? $propertyKey : $prop) + ") ) "; - } - } - out += ")) { "; - var $propertyPath = "missing" + $lvl, $missingProperty = "' + " + $propertyPath + " + '"; - if (it.opts._errorDataPathProperty) { - it.errorPath = it.opts.jsonPointers ? it.util.getPathExpr($currentErrorPath, $propertyPath, true) : $currentErrorPath + " + " + $propertyPath; - } - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ""; - if (it.createErrors !== false) { - out += " { keyword: 'dependencies' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { property: '" + it.util.escapeQuotes($property) + "', missingProperty: '" + $missingProperty + "', depsCount: " + $deps.length + ", deps: '" + it.util.escapeQuotes($deps.length == 1 ? $deps[0] : $deps.join(", ")) + "' } "; - if (it.opts.messages !== false) { - out += " , message: 'should have "; - if ($deps.length == 1) { - out += "property " + it.util.escapeQuotes($deps[0]); - } else { - out += "properties " + it.util.escapeQuotes($deps.join(", ")); - } - out += " when property " + it.util.escapeQuotes($property) + " is present' "; - } - if (it.opts.verbose) { - out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; - } - out += " } "; - } else { - out += " {} "; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - if (it.async) { - out += " throw new ValidationError([" + __err + "]); "; - } else { - out += " validate.errors = [" + __err + "]; return false; "; - } - } else { - out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; - } - } else { - out += " ) { "; - var arr2 = $deps; - if (arr2) { - var $propertyKey, i2 = -1, l2 = arr2.length - 1; - while (i2 < l2) { - $propertyKey = arr2[i2 += 1]; - var $prop = it.util.getProperty($propertyKey), $missingProperty = it.util.escapeQuotes($propertyKey), $useData = $data + $prop; - if (it.opts._errorDataPathProperty) { - it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers); - } - out += " if ( " + $useData + " === undefined "; - if ($ownProperties) { - out += " || ! Object.prototype.hasOwnProperty.call(" + $data + ", '" + it.util.escapeQuotes($propertyKey) + "') "; - } - out += ") { var err = "; - if (it.createErrors !== false) { - out += " { keyword: 'dependencies' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { property: '" + it.util.escapeQuotes($property) + "', missingProperty: '" + $missingProperty + "', depsCount: " + $deps.length + ", deps: '" + it.util.escapeQuotes($deps.length == 1 ? $deps[0] : $deps.join(", ")) + "' } "; - if (it.opts.messages !== false) { - out += " , message: 'should have "; - if ($deps.length == 1) { - out += "property " + it.util.escapeQuotes($deps[0]); - } else { - out += "properties " + it.util.escapeQuotes($deps.join(", ")); - } - out += " when property " + it.util.escapeQuotes($property) + " is present' "; - } - if (it.opts.verbose) { - out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; - } - out += " } "; - } else { - out += " {} "; - } - out += "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "; - } - } - } - out += " } "; - if ($breakOnError) { - $closingBraces += "}"; - out += " else { "; - } - } - } - it.errorPath = $currentErrorPath; - var $currentBaseId = $it.baseId; - for (var $property in $schemaDeps) { - var $sch = $schemaDeps[$property]; - if (it.opts.strictKeywords ? typeof $sch == "object" && Object.keys($sch).length > 0 || $sch === false : it.util.schemaHasRules($sch, it.RULES.all)) { - out += " " + $nextValid + " = true; if ( " + $data + it.util.getProperty($property) + " !== undefined "; - if ($ownProperties) { - out += " && Object.prototype.hasOwnProperty.call(" + $data + ", '" + it.util.escapeQuotes($property) + "') "; - } - out += ") { "; - $it.schema = $sch; - $it.schemaPath = $schemaPath + it.util.getProperty($property); - $it.errSchemaPath = $errSchemaPath + "/" + it.util.escapeFragment($property); - out += " " + it.validate($it) + " "; - $it.baseId = $currentBaseId; - out += " } "; - if ($breakOnError) { - out += " if (" + $nextValid + ") { "; - $closingBraces += "}"; - } - } - } - if ($breakOnError) { - out += " " + $closingBraces + " if (" + $errs + " == errors) {"; - } - return out; - }; - } -}); - -// node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/dotjs/enum.js -var require_enum2 = __commonJS({ - "node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/dotjs/enum.js"(exports, module) { - "use strict"; - module.exports = function generate_enum(it, $keyword, $ruleType) { - var out = " "; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + "/" + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = "data" + ($dataLvl || ""); - var $valid = "valid" + $lvl; - var $isData = it.opts.$data && $schema && $schema.$data, $schemaValue; - if ($isData) { - out += " var schema" + $lvl + " = " + it.util.getData($schema.$data, $dataLvl, it.dataPathArr) + "; "; - $schemaValue = "schema" + $lvl; - } else { - $schemaValue = $schema; - } - var $i = "i" + $lvl, $vSchema = "schema" + $lvl; - if (!$isData) { - out += " var " + $vSchema + " = validate.schema" + $schemaPath + ";"; - } - out += "var " + $valid + ";"; - if ($isData) { - out += " if (schema" + $lvl + " === undefined) " + $valid + " = true; else if (!Array.isArray(schema" + $lvl + ")) " + $valid + " = false; else {"; - } - out += "" + $valid + " = false;for (var " + $i + "=0; " + $i + "<" + $vSchema + ".length; " + $i + "++) if (equal(" + $data + ", " + $vSchema + "[" + $i + "])) { " + $valid + " = true; break; }"; - if ($isData) { - out += " } "; - } - out += " if (!" + $valid + ") { "; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ""; - if (it.createErrors !== false) { - out += " { keyword: 'enum' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { allowedValues: schema" + $lvl + " } "; - if (it.opts.messages !== false) { - out += " , message: 'should be equal to one of the allowed values' "; - } - if (it.opts.verbose) { - out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; - } - out += " } "; - } else { - out += " {} "; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - if (it.async) { - out += " throw new ValidationError([" + __err + "]); "; - } else { - out += " validate.errors = [" + __err + "]; return false; "; - } - } else { - out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; - } - out += " }"; - if ($breakOnError) { - out += " else { "; - } - return out; - }; - } -}); - -// node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/dotjs/format.js -var require_format2 = __commonJS({ - "node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/dotjs/format.js"(exports, module) { - "use strict"; - module.exports = function generate_format(it, $keyword, $ruleType) { - var out = " "; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + "/" + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = "data" + ($dataLvl || ""); - if (it.opts.format === false) { - if ($breakOnError) { - out += " if (true) { "; - } - return out; - } - var $isData = it.opts.$data && $schema && $schema.$data, $schemaValue; - if ($isData) { - out += " var schema" + $lvl + " = " + it.util.getData($schema.$data, $dataLvl, it.dataPathArr) + "; "; - $schemaValue = "schema" + $lvl; - } else { - $schemaValue = $schema; - } - var $unknownFormats = it.opts.unknownFormats, $allowUnknown = Array.isArray($unknownFormats); - if ($isData) { - var $format = "format" + $lvl, $isObject = "isObject" + $lvl, $formatType = "formatType" + $lvl; - out += " var " + $format + " = formats[" + $schemaValue + "]; var " + $isObject + " = typeof " + $format + " == 'object' && !(" + $format + " instanceof RegExp) && " + $format + ".validate; var " + $formatType + " = " + $isObject + " && " + $format + ".type || 'string'; if (" + $isObject + ") { "; - if (it.async) { - out += " var async" + $lvl + " = " + $format + ".async; "; - } - out += " " + $format + " = " + $format + ".validate; } if ( "; - if ($isData) { - out += " (" + $schemaValue + " !== undefined && typeof " + $schemaValue + " != 'string') || "; - } - out += " ("; - if ($unknownFormats != "ignore") { - out += " (" + $schemaValue + " && !" + $format + " "; - if ($allowUnknown) { - out += " && self._opts.unknownFormats.indexOf(" + $schemaValue + ") == -1 "; - } - out += ") || "; - } - out += " (" + $format + " && " + $formatType + " == '" + $ruleType + "' && !(typeof " + $format + " == 'function' ? "; - if (it.async) { - out += " (async" + $lvl + " ? await " + $format + "(" + $data + ") : " + $format + "(" + $data + ")) "; - } else { - out += " " + $format + "(" + $data + ") "; - } - out += " : " + $format + ".test(" + $data + "))))) {"; - } else { - var $format = it.formats[$schema]; - if (!$format) { - if ($unknownFormats == "ignore") { - it.logger.warn('unknown format "' + $schema + '" ignored in schema at path "' + it.errSchemaPath + '"'); - if ($breakOnError) { - out += " if (true) { "; - } - return out; - } else if ($allowUnknown && $unknownFormats.indexOf($schema) >= 0) { - if ($breakOnError) { - out += " if (true) { "; - } - return out; - } else { - throw new Error('unknown format "' + $schema + '" is used in schema at path "' + it.errSchemaPath + '"'); - } - } - var $isObject = typeof $format == "object" && !($format instanceof RegExp) && $format.validate; - var $formatType = $isObject && $format.type || "string"; - if ($isObject) { - var $async = $format.async === true; - $format = $format.validate; - } - if ($formatType != $ruleType) { - if ($breakOnError) { - out += " if (true) { "; - } - return out; - } - if ($async) { - if (!it.async) throw new Error("async format in sync schema"); - var $formatRef = "formats" + it.util.getProperty($schema) + ".validate"; - out += " if (!(await " + $formatRef + "(" + $data + "))) { "; - } else { - out += " if (! "; - var $formatRef = "formats" + it.util.getProperty($schema); - if ($isObject) $formatRef += ".validate"; - if (typeof $format == "function") { - out += " " + $formatRef + "(" + $data + ") "; - } else { - out += " " + $formatRef + ".test(" + $data + ") "; - } - out += ") { "; - } - } - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ""; - if (it.createErrors !== false) { - out += " { keyword: 'format' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { format: "; - if ($isData) { - out += "" + $schemaValue; - } else { - out += "" + it.util.toQuotedString($schema); - } - out += " } "; - if (it.opts.messages !== false) { - out += ` , message: 'should match format "`; - if ($isData) { - out += "' + " + $schemaValue + " + '"; - } else { - out += "" + it.util.escapeQuotes($schema); - } - out += `"' `; - } - if (it.opts.verbose) { - out += " , schema: "; - if ($isData) { - out += "validate.schema" + $schemaPath; - } else { - out += "" + it.util.toQuotedString($schema); - } - out += " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; - } - out += " } "; - } else { - out += " {} "; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - if (it.async) { - out += " throw new ValidationError([" + __err + "]); "; - } else { - out += " validate.errors = [" + __err + "]; return false; "; - } - } else { - out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; - } - out += " } "; - if ($breakOnError) { - out += " else { "; - } - return out; - }; - } -}); - -// node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/dotjs/if.js -var require_if2 = __commonJS({ - "node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/dotjs/if.js"(exports, module) { - "use strict"; - module.exports = function generate_if(it, $keyword, $ruleType) { - var out = " "; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + "/" + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = "data" + ($dataLvl || ""); - var $valid = "valid" + $lvl; - var $errs = "errs__" + $lvl; - var $it = it.util.copy(it); - $it.level++; - var $nextValid = "valid" + $it.level; - var $thenSch = it.schema["then"], $elseSch = it.schema["else"], $thenPresent = $thenSch !== void 0 && (it.opts.strictKeywords ? typeof $thenSch == "object" && Object.keys($thenSch).length > 0 || $thenSch === false : it.util.schemaHasRules($thenSch, it.RULES.all)), $elsePresent = $elseSch !== void 0 && (it.opts.strictKeywords ? typeof $elseSch == "object" && Object.keys($elseSch).length > 0 || $elseSch === false : it.util.schemaHasRules($elseSch, it.RULES.all)), $currentBaseId = $it.baseId; - if ($thenPresent || $elsePresent) { - var $ifClause; - $it.createErrors = false; - $it.schema = $schema; - $it.schemaPath = $schemaPath; - $it.errSchemaPath = $errSchemaPath; - out += " var " + $errs + " = errors; var " + $valid + " = true; "; - var $wasComposite = it.compositeRule; - it.compositeRule = $it.compositeRule = true; - out += " " + it.validate($it) + " "; - $it.baseId = $currentBaseId; - $it.createErrors = true; - out += " errors = " + $errs + "; if (vErrors !== null) { if (" + $errs + ") vErrors.length = " + $errs + "; else vErrors = null; } "; - it.compositeRule = $it.compositeRule = $wasComposite; - if ($thenPresent) { - out += " if (" + $nextValid + ") { "; - $it.schema = it.schema["then"]; - $it.schemaPath = it.schemaPath + ".then"; - $it.errSchemaPath = it.errSchemaPath + "/then"; - out += " " + it.validate($it) + " "; - $it.baseId = $currentBaseId; - out += " " + $valid + " = " + $nextValid + "; "; - if ($thenPresent && $elsePresent) { - $ifClause = "ifClause" + $lvl; - out += " var " + $ifClause + " = 'then'; "; - } else { - $ifClause = "'then'"; - } - out += " } "; - if ($elsePresent) { - out += " else { "; - } - } else { - out += " if (!" + $nextValid + ") { "; - } - if ($elsePresent) { - $it.schema = it.schema["else"]; - $it.schemaPath = it.schemaPath + ".else"; - $it.errSchemaPath = it.errSchemaPath + "/else"; - out += " " + it.validate($it) + " "; - $it.baseId = $currentBaseId; - out += " " + $valid + " = " + $nextValid + "; "; - if ($thenPresent && $elsePresent) { - $ifClause = "ifClause" + $lvl; - out += " var " + $ifClause + " = 'else'; "; - } else { - $ifClause = "'else'"; - } - out += " } "; - } - out += " if (!" + $valid + ") { var err = "; - if (it.createErrors !== false) { - out += " { keyword: 'if' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { failingKeyword: " + $ifClause + " } "; - if (it.opts.messages !== false) { - out += ` , message: 'should match "' + ` + $ifClause + ` + '" schema' `; - } - if (it.opts.verbose) { - out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; - } - out += " } "; - } else { - out += " {} "; - } - out += "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; - if (!it.compositeRule && $breakOnError) { - if (it.async) { - out += " throw new ValidationError(vErrors); "; - } else { - out += " validate.errors = vErrors; return false; "; - } - } - out += " } "; - if ($breakOnError) { - out += " else { "; - } - } else { - if ($breakOnError) { - out += " if (true) { "; - } - } - return out; - }; - } -}); - -// node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/dotjs/items.js -var require_items2 = __commonJS({ - "node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/dotjs/items.js"(exports, module) { - "use strict"; - module.exports = function generate_items(it, $keyword, $ruleType) { - var out = " "; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + "/" + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = "data" + ($dataLvl || ""); - var $valid = "valid" + $lvl; - var $errs = "errs__" + $lvl; - var $it = it.util.copy(it); - var $closingBraces = ""; - $it.level++; - var $nextValid = "valid" + $it.level; - var $idx = "i" + $lvl, $dataNxt = $it.dataLevel = it.dataLevel + 1, $nextData = "data" + $dataNxt, $currentBaseId = it.baseId; - out += "var " + $errs + " = errors;var " + $valid + ";"; - if (Array.isArray($schema)) { - var $additionalItems = it.schema.additionalItems; - if ($additionalItems === false) { - out += " " + $valid + " = " + $data + ".length <= " + $schema.length + "; "; - var $currErrSchemaPath = $errSchemaPath; - $errSchemaPath = it.errSchemaPath + "/additionalItems"; - out += " if (!" + $valid + ") { "; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ""; - if (it.createErrors !== false) { - out += " { keyword: 'additionalItems' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { limit: " + $schema.length + " } "; - if (it.opts.messages !== false) { - out += " , message: 'should NOT have more than " + $schema.length + " items' "; - } - if (it.opts.verbose) { - out += " , schema: false , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; - } - out += " } "; - } else { - out += " {} "; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - if (it.async) { - out += " throw new ValidationError([" + __err + "]); "; - } else { - out += " validate.errors = [" + __err + "]; return false; "; - } - } else { - out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; - } - out += " } "; - $errSchemaPath = $currErrSchemaPath; - if ($breakOnError) { - $closingBraces += "}"; - out += " else { "; - } - } - var arr1 = $schema; - if (arr1) { - var $sch, $i = -1, l1 = arr1.length - 1; - while ($i < l1) { - $sch = arr1[$i += 1]; - if (it.opts.strictKeywords ? typeof $sch == "object" && Object.keys($sch).length > 0 || $sch === false : it.util.schemaHasRules($sch, it.RULES.all)) { - out += " " + $nextValid + " = true; if (" + $data + ".length > " + $i + ") { "; - var $passData = $data + "[" + $i + "]"; - $it.schema = $sch; - $it.schemaPath = $schemaPath + "[" + $i + "]"; - $it.errSchemaPath = $errSchemaPath + "/" + $i; - $it.errorPath = it.util.getPathExpr(it.errorPath, $i, it.opts.jsonPointers, true); - $it.dataPathArr[$dataNxt] = $i; - var $code = it.validate($it); - $it.baseId = $currentBaseId; - if (it.util.varOccurences($code, $nextData) < 2) { - out += " " + it.util.varReplace($code, $nextData, $passData) + " "; - } else { - out += " var " + $nextData + " = " + $passData + "; " + $code + " "; - } - out += " } "; - if ($breakOnError) { - out += " if (" + $nextValid + ") { "; - $closingBraces += "}"; - } - } - } - } - if (typeof $additionalItems == "object" && (it.opts.strictKeywords ? typeof $additionalItems == "object" && Object.keys($additionalItems).length > 0 || $additionalItems === false : it.util.schemaHasRules($additionalItems, it.RULES.all))) { - $it.schema = $additionalItems; - $it.schemaPath = it.schemaPath + ".additionalItems"; - $it.errSchemaPath = it.errSchemaPath + "/additionalItems"; - out += " " + $nextValid + " = true; if (" + $data + ".length > " + $schema.length + ") { for (var " + $idx + " = " + $schema.length + "; " + $idx + " < " + $data + ".length; " + $idx + "++) { "; - $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true); - var $passData = $data + "[" + $idx + "]"; - $it.dataPathArr[$dataNxt] = $idx; - var $code = it.validate($it); - $it.baseId = $currentBaseId; - if (it.util.varOccurences($code, $nextData) < 2) { - out += " " + it.util.varReplace($code, $nextData, $passData) + " "; - } else { - out += " var " + $nextData + " = " + $passData + "; " + $code + " "; - } - if ($breakOnError) { - out += " if (!" + $nextValid + ") break; "; - } - out += " } } "; - if ($breakOnError) { - out += " if (" + $nextValid + ") { "; - $closingBraces += "}"; - } - } - } else if (it.opts.strictKeywords ? typeof $schema == "object" && Object.keys($schema).length > 0 || $schema === false : it.util.schemaHasRules($schema, it.RULES.all)) { - $it.schema = $schema; - $it.schemaPath = $schemaPath; - $it.errSchemaPath = $errSchemaPath; - out += " for (var " + $idx + " = 0; " + $idx + " < " + $data + ".length; " + $idx + "++) { "; - $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true); - var $passData = $data + "[" + $idx + "]"; - $it.dataPathArr[$dataNxt] = $idx; - var $code = it.validate($it); - $it.baseId = $currentBaseId; - if (it.util.varOccurences($code, $nextData) < 2) { - out += " " + it.util.varReplace($code, $nextData, $passData) + " "; - } else { - out += " var " + $nextData + " = " + $passData + "; " + $code + " "; - } - if ($breakOnError) { - out += " if (!" + $nextValid + ") break; "; - } - out += " }"; - } - if ($breakOnError) { - out += " " + $closingBraces + " if (" + $errs + " == errors) {"; - } - return out; - }; - } -}); - -// node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/dotjs/_limit.js -var require_limit = __commonJS({ - "node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/dotjs/_limit.js"(exports, module) { - "use strict"; - module.exports = function generate__limit(it, $keyword, $ruleType) { - var out = " "; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + "/" + $keyword; - var $breakOnError = !it.opts.allErrors; - var $errorKeyword; - var $data = "data" + ($dataLvl || ""); - var $isData = it.opts.$data && $schema && $schema.$data, $schemaValue; - if ($isData) { - out += " var schema" + $lvl + " = " + it.util.getData($schema.$data, $dataLvl, it.dataPathArr) + "; "; - $schemaValue = "schema" + $lvl; - } else { - $schemaValue = $schema; - } - var $isMax = $keyword == "maximum", $exclusiveKeyword = $isMax ? "exclusiveMaximum" : "exclusiveMinimum", $schemaExcl = it.schema[$exclusiveKeyword], $isDataExcl = it.opts.$data && $schemaExcl && $schemaExcl.$data, $op = $isMax ? "<" : ">", $notOp = $isMax ? ">" : "<", $errorKeyword = void 0; - if (!($isData || typeof $schema == "number" || $schema === void 0)) { - throw new Error($keyword + " must be number"); - } - if (!($isDataExcl || $schemaExcl === void 0 || typeof $schemaExcl == "number" || typeof $schemaExcl == "boolean")) { - throw new Error($exclusiveKeyword + " must be number or boolean"); - } - if ($isDataExcl) { - var $schemaValueExcl = it.util.getData($schemaExcl.$data, $dataLvl, it.dataPathArr), $exclusive = "exclusive" + $lvl, $exclType = "exclType" + $lvl, $exclIsNumber = "exclIsNumber" + $lvl, $opExpr = "op" + $lvl, $opStr = "' + " + $opExpr + " + '"; - out += " var schemaExcl" + $lvl + " = " + $schemaValueExcl + "; "; - $schemaValueExcl = "schemaExcl" + $lvl; - out += " var " + $exclusive + "; var " + $exclType + " = typeof " + $schemaValueExcl + "; if (" + $exclType + " != 'boolean' && " + $exclType + " != 'undefined' && " + $exclType + " != 'number') { "; - var $errorKeyword = $exclusiveKeyword; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ""; - if (it.createErrors !== false) { - out += " { keyword: '" + ($errorKeyword || "_exclusiveLimit") + "' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: {} "; - if (it.opts.messages !== false) { - out += " , message: '" + $exclusiveKeyword + " should be boolean' "; - } - if (it.opts.verbose) { - out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; - } - out += " } "; - } else { - out += " {} "; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - if (it.async) { - out += " throw new ValidationError([" + __err + "]); "; - } else { - out += " validate.errors = [" + __err + "]; return false; "; - } - } else { - out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; - } - out += " } else if ( "; - if ($isData) { - out += " (" + $schemaValue + " !== undefined && typeof " + $schemaValue + " != 'number') || "; - } - out += " " + $exclType + " == 'number' ? ( (" + $exclusive + " = " + $schemaValue + " === undefined || " + $schemaValueExcl + " " + $op + "= " + $schemaValue + ") ? " + $data + " " + $notOp + "= " + $schemaValueExcl + " : " + $data + " " + $notOp + " " + $schemaValue + " ) : ( (" + $exclusive + " = " + $schemaValueExcl + " === true) ? " + $data + " " + $notOp + "= " + $schemaValue + " : " + $data + " " + $notOp + " " + $schemaValue + " ) || " + $data + " !== " + $data + ") { var op" + $lvl + " = " + $exclusive + " ? '" + $op + "' : '" + $op + "='; "; - if ($schema === void 0) { - $errorKeyword = $exclusiveKeyword; - $errSchemaPath = it.errSchemaPath + "/" + $exclusiveKeyword; - $schemaValue = $schemaValueExcl; - $isData = $isDataExcl; - } - } else { - var $exclIsNumber = typeof $schemaExcl == "number", $opStr = $op; - if ($exclIsNumber && $isData) { - var $opExpr = "'" + $opStr + "'"; - out += " if ( "; - if ($isData) { - out += " (" + $schemaValue + " !== undefined && typeof " + $schemaValue + " != 'number') || "; - } - out += " ( " + $schemaValue + " === undefined || " + $schemaExcl + " " + $op + "= " + $schemaValue + " ? " + $data + " " + $notOp + "= " + $schemaExcl + " : " + $data + " " + $notOp + " " + $schemaValue + " ) || " + $data + " !== " + $data + ") { "; - } else { - if ($exclIsNumber && $schema === void 0) { - $exclusive = true; - $errorKeyword = $exclusiveKeyword; - $errSchemaPath = it.errSchemaPath + "/" + $exclusiveKeyword; - $schemaValue = $schemaExcl; - $notOp += "="; - } else { - if ($exclIsNumber) $schemaValue = Math[$isMax ? "min" : "max"]($schemaExcl, $schema); - if ($schemaExcl === ($exclIsNumber ? $schemaValue : true)) { - $exclusive = true; - $errorKeyword = $exclusiveKeyword; - $errSchemaPath = it.errSchemaPath + "/" + $exclusiveKeyword; - $notOp += "="; - } else { - $exclusive = false; - $opStr += "="; - } - } - var $opExpr = "'" + $opStr + "'"; - out += " if ( "; - if ($isData) { - out += " (" + $schemaValue + " !== undefined && typeof " + $schemaValue + " != 'number') || "; - } - out += " " + $data + " " + $notOp + " " + $schemaValue + " || " + $data + " !== " + $data + ") { "; - } - } - $errorKeyword = $errorKeyword || $keyword; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ""; - if (it.createErrors !== false) { - out += " { keyword: '" + ($errorKeyword || "_limit") + "' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { comparison: " + $opExpr + ", limit: " + $schemaValue + ", exclusive: " + $exclusive + " } "; - if (it.opts.messages !== false) { - out += " , message: 'should be " + $opStr + " "; - if ($isData) { - out += "' + " + $schemaValue; - } else { - out += "" + $schemaValue + "'"; - } - } - if (it.opts.verbose) { - out += " , schema: "; - if ($isData) { - out += "validate.schema" + $schemaPath; - } else { - out += "" + $schema; - } - out += " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; - } - out += " } "; - } else { - out += " {} "; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - if (it.async) { - out += " throw new ValidationError([" + __err + "]); "; - } else { - out += " validate.errors = [" + __err + "]; return false; "; - } - } else { - out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; - } - out += " } "; - if ($breakOnError) { - out += " else { "; - } - return out; - }; - } -}); - -// node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/dotjs/_limitItems.js -var require_limitItems = __commonJS({ - "node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/dotjs/_limitItems.js"(exports, module) { - "use strict"; - module.exports = function generate__limitItems(it, $keyword, $ruleType) { - var out = " "; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + "/" + $keyword; - var $breakOnError = !it.opts.allErrors; - var $errorKeyword; - var $data = "data" + ($dataLvl || ""); - var $isData = it.opts.$data && $schema && $schema.$data, $schemaValue; - if ($isData) { - out += " var schema" + $lvl + " = " + it.util.getData($schema.$data, $dataLvl, it.dataPathArr) + "; "; - $schemaValue = "schema" + $lvl; - } else { - $schemaValue = $schema; - } - if (!($isData || typeof $schema == "number")) { - throw new Error($keyword + " must be number"); - } - var $op = $keyword == "maxItems" ? ">" : "<"; - out += "if ( "; - if ($isData) { - out += " (" + $schemaValue + " !== undefined && typeof " + $schemaValue + " != 'number') || "; - } - out += " " + $data + ".length " + $op + " " + $schemaValue + ") { "; - var $errorKeyword = $keyword; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ""; - if (it.createErrors !== false) { - out += " { keyword: '" + ($errorKeyword || "_limitItems") + "' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { limit: " + $schemaValue + " } "; - if (it.opts.messages !== false) { - out += " , message: 'should NOT have "; - if ($keyword == "maxItems") { - out += "more"; - } else { - out += "fewer"; - } - out += " than "; - if ($isData) { - out += "' + " + $schemaValue + " + '"; - } else { - out += "" + $schema; - } - out += " items' "; - } - if (it.opts.verbose) { - out += " , schema: "; - if ($isData) { - out += "validate.schema" + $schemaPath; - } else { - out += "" + $schema; - } - out += " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; - } - out += " } "; - } else { - out += " {} "; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - if (it.async) { - out += " throw new ValidationError([" + __err + "]); "; - } else { - out += " validate.errors = [" + __err + "]; return false; "; - } - } else { - out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; - } - out += "} "; - if ($breakOnError) { - out += " else { "; - } - return out; - }; - } -}); - -// node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/dotjs/_limitLength.js -var require_limitLength = __commonJS({ - "node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/dotjs/_limitLength.js"(exports, module) { - "use strict"; - module.exports = function generate__limitLength(it, $keyword, $ruleType) { - var out = " "; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + "/" + $keyword; - var $breakOnError = !it.opts.allErrors; - var $errorKeyword; - var $data = "data" + ($dataLvl || ""); - var $isData = it.opts.$data && $schema && $schema.$data, $schemaValue; - if ($isData) { - out += " var schema" + $lvl + " = " + it.util.getData($schema.$data, $dataLvl, it.dataPathArr) + "; "; - $schemaValue = "schema" + $lvl; - } else { - $schemaValue = $schema; - } - if (!($isData || typeof $schema == "number")) { - throw new Error($keyword + " must be number"); - } - var $op = $keyword == "maxLength" ? ">" : "<"; - out += "if ( "; - if ($isData) { - out += " (" + $schemaValue + " !== undefined && typeof " + $schemaValue + " != 'number') || "; - } - if (it.opts.unicode === false) { - out += " " + $data + ".length "; - } else { - out += " ucs2length(" + $data + ") "; - } - out += " " + $op + " " + $schemaValue + ") { "; - var $errorKeyword = $keyword; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ""; - if (it.createErrors !== false) { - out += " { keyword: '" + ($errorKeyword || "_limitLength") + "' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { limit: " + $schemaValue + " } "; - if (it.opts.messages !== false) { - out += " , message: 'should NOT be "; - if ($keyword == "maxLength") { - out += "longer"; - } else { - out += "shorter"; - } - out += " than "; - if ($isData) { - out += "' + " + $schemaValue + " + '"; - } else { - out += "" + $schema; - } - out += " characters' "; - } - if (it.opts.verbose) { - out += " , schema: "; - if ($isData) { - out += "validate.schema" + $schemaPath; - } else { - out += "" + $schema; - } - out += " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; - } - out += " } "; - } else { - out += " {} "; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - if (it.async) { - out += " throw new ValidationError([" + __err + "]); "; - } else { - out += " validate.errors = [" + __err + "]; return false; "; - } - } else { - out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; - } - out += "} "; - if ($breakOnError) { - out += " else { "; - } - return out; - }; - } -}); - -// node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/dotjs/_limitProperties.js -var require_limitProperties = __commonJS({ - "node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/dotjs/_limitProperties.js"(exports, module) { - "use strict"; - module.exports = function generate__limitProperties(it, $keyword, $ruleType) { - var out = " "; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + "/" + $keyword; - var $breakOnError = !it.opts.allErrors; - var $errorKeyword; - var $data = "data" + ($dataLvl || ""); - var $isData = it.opts.$data && $schema && $schema.$data, $schemaValue; - if ($isData) { - out += " var schema" + $lvl + " = " + it.util.getData($schema.$data, $dataLvl, it.dataPathArr) + "; "; - $schemaValue = "schema" + $lvl; - } else { - $schemaValue = $schema; - } - if (!($isData || typeof $schema == "number")) { - throw new Error($keyword + " must be number"); - } - var $op = $keyword == "maxProperties" ? ">" : "<"; - out += "if ( "; - if ($isData) { - out += " (" + $schemaValue + " !== undefined && typeof " + $schemaValue + " != 'number') || "; - } - out += " Object.keys(" + $data + ").length " + $op + " " + $schemaValue + ") { "; - var $errorKeyword = $keyword; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ""; - if (it.createErrors !== false) { - out += " { keyword: '" + ($errorKeyword || "_limitProperties") + "' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { limit: " + $schemaValue + " } "; - if (it.opts.messages !== false) { - out += " , message: 'should NOT have "; - if ($keyword == "maxProperties") { - out += "more"; - } else { - out += "fewer"; - } - out += " than "; - if ($isData) { - out += "' + " + $schemaValue + " + '"; - } else { - out += "" + $schema; - } - out += " properties' "; - } - if (it.opts.verbose) { - out += " , schema: "; - if ($isData) { - out += "validate.schema" + $schemaPath; - } else { - out += "" + $schema; - } - out += " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; - } - out += " } "; - } else { - out += " {} "; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - if (it.async) { - out += " throw new ValidationError([" + __err + "]); "; - } else { - out += " validate.errors = [" + __err + "]; return false; "; - } - } else { - out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; - } - out += "} "; - if ($breakOnError) { - out += " else { "; - } - return out; - }; - } -}); - -// node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/dotjs/multipleOf.js -var require_multipleOf2 = __commonJS({ - "node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/dotjs/multipleOf.js"(exports, module) { - "use strict"; - module.exports = function generate_multipleOf(it, $keyword, $ruleType) { - var out = " "; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + "/" + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = "data" + ($dataLvl || ""); - var $isData = it.opts.$data && $schema && $schema.$data, $schemaValue; - if ($isData) { - out += " var schema" + $lvl + " = " + it.util.getData($schema.$data, $dataLvl, it.dataPathArr) + "; "; - $schemaValue = "schema" + $lvl; - } else { - $schemaValue = $schema; - } - if (!($isData || typeof $schema == "number")) { - throw new Error($keyword + " must be number"); - } - out += "var division" + $lvl + ";if ("; - if ($isData) { - out += " " + $schemaValue + " !== undefined && ( typeof " + $schemaValue + " != 'number' || "; - } - out += " (division" + $lvl + " = " + $data + " / " + $schemaValue + ", "; - if (it.opts.multipleOfPrecision) { - out += " Math.abs(Math.round(division" + $lvl + ") - division" + $lvl + ") > 1e-" + it.opts.multipleOfPrecision + " "; - } else { - out += " division" + $lvl + " !== parseInt(division" + $lvl + ") "; - } - out += " ) "; - if ($isData) { - out += " ) "; - } - out += " ) { "; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ""; - if (it.createErrors !== false) { - out += " { keyword: 'multipleOf' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { multipleOf: " + $schemaValue + " } "; - if (it.opts.messages !== false) { - out += " , message: 'should be multiple of "; - if ($isData) { - out += "' + " + $schemaValue; - } else { - out += "" + $schemaValue + "'"; - } - } - if (it.opts.verbose) { - out += " , schema: "; - if ($isData) { - out += "validate.schema" + $schemaPath; - } else { - out += "" + $schema; - } - out += " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; - } - out += " } "; - } else { - out += " {} "; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - if (it.async) { - out += " throw new ValidationError([" + __err + "]); "; - } else { - out += " validate.errors = [" + __err + "]; return false; "; - } - } else { - out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; - } - out += "} "; - if ($breakOnError) { - out += " else { "; - } - return out; - }; - } -}); - -// node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/dotjs/not.js -var require_not2 = __commonJS({ - "node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/dotjs/not.js"(exports, module) { - "use strict"; - module.exports = function generate_not(it, $keyword, $ruleType) { - var out = " "; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + "/" + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = "data" + ($dataLvl || ""); - var $errs = "errs__" + $lvl; - var $it = it.util.copy(it); - $it.level++; - var $nextValid = "valid" + $it.level; - if (it.opts.strictKeywords ? typeof $schema == "object" && Object.keys($schema).length > 0 || $schema === false : it.util.schemaHasRules($schema, it.RULES.all)) { - $it.schema = $schema; - $it.schemaPath = $schemaPath; - $it.errSchemaPath = $errSchemaPath; - out += " var " + $errs + " = errors; "; - var $wasComposite = it.compositeRule; - it.compositeRule = $it.compositeRule = true; - $it.createErrors = false; - var $allErrorsOption; - if ($it.opts.allErrors) { - $allErrorsOption = $it.opts.allErrors; - $it.opts.allErrors = false; - } - out += " " + it.validate($it) + " "; - $it.createErrors = true; - if ($allErrorsOption) $it.opts.allErrors = $allErrorsOption; - it.compositeRule = $it.compositeRule = $wasComposite; - out += " if (" + $nextValid + ") { "; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ""; - if (it.createErrors !== false) { - out += " { keyword: 'not' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: {} "; - if (it.opts.messages !== false) { - out += " , message: 'should NOT be valid' "; - } - if (it.opts.verbose) { - out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; - } - out += " } "; - } else { - out += " {} "; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - if (it.async) { - out += " throw new ValidationError([" + __err + "]); "; - } else { - out += " validate.errors = [" + __err + "]; return false; "; - } - } else { - out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; - } - out += " } else { errors = " + $errs + "; if (vErrors !== null) { if (" + $errs + ") vErrors.length = " + $errs + "; else vErrors = null; } "; - if (it.opts.allErrors) { - out += " } "; - } - } else { - out += " var err = "; - if (it.createErrors !== false) { - out += " { keyword: 'not' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: {} "; - if (it.opts.messages !== false) { - out += " , message: 'should NOT be valid' "; - } - if (it.opts.verbose) { - out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; - } - out += " } "; - } else { - out += " {} "; - } - out += "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; - if ($breakOnError) { - out += " if (false) { "; - } - } - return out; - }; - } -}); - -// node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/dotjs/oneOf.js -var require_oneOf2 = __commonJS({ - "node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/dotjs/oneOf.js"(exports, module) { - "use strict"; - module.exports = function generate_oneOf(it, $keyword, $ruleType) { - var out = " "; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + "/" + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = "data" + ($dataLvl || ""); - var $valid = "valid" + $lvl; - var $errs = "errs__" + $lvl; - var $it = it.util.copy(it); - var $closingBraces = ""; - $it.level++; - var $nextValid = "valid" + $it.level; - var $currentBaseId = $it.baseId, $prevValid = "prevValid" + $lvl, $passingSchemas = "passingSchemas" + $lvl; - out += "var " + $errs + " = errors , " + $prevValid + " = false , " + $valid + " = false , " + $passingSchemas + " = null; "; - var $wasComposite = it.compositeRule; - it.compositeRule = $it.compositeRule = true; - var arr1 = $schema; - if (arr1) { - var $sch, $i = -1, l1 = arr1.length - 1; - while ($i < l1) { - $sch = arr1[$i += 1]; - if (it.opts.strictKeywords ? typeof $sch == "object" && Object.keys($sch).length > 0 || $sch === false : it.util.schemaHasRules($sch, it.RULES.all)) { - $it.schema = $sch; - $it.schemaPath = $schemaPath + "[" + $i + "]"; - $it.errSchemaPath = $errSchemaPath + "/" + $i; - out += " " + it.validate($it) + " "; - $it.baseId = $currentBaseId; - } else { - out += " var " + $nextValid + " = true; "; - } - if ($i) { - out += " if (" + $nextValid + " && " + $prevValid + ") { " + $valid + " = false; " + $passingSchemas + " = [" + $passingSchemas + ", " + $i + "]; } else { "; - $closingBraces += "}"; - } - out += " if (" + $nextValid + ") { " + $valid + " = " + $prevValid + " = true; " + $passingSchemas + " = " + $i + "; }"; - } - } - it.compositeRule = $it.compositeRule = $wasComposite; - out += "" + $closingBraces + "if (!" + $valid + ") { var err = "; - if (it.createErrors !== false) { - out += " { keyword: 'oneOf' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { passingSchemas: " + $passingSchemas + " } "; - if (it.opts.messages !== false) { - out += " , message: 'should match exactly one schema in oneOf' "; - } - if (it.opts.verbose) { - out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; - } - out += " } "; - } else { - out += " {} "; - } - out += "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; - if (!it.compositeRule && $breakOnError) { - if (it.async) { - out += " throw new ValidationError(vErrors); "; - } else { - out += " validate.errors = vErrors; return false; "; - } - } - out += "} else { errors = " + $errs + "; if (vErrors !== null) { if (" + $errs + ") vErrors.length = " + $errs + "; else vErrors = null; }"; - if (it.opts.allErrors) { - out += " } "; - } - return out; - }; - } -}); - -// node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/dotjs/pattern.js -var require_pattern2 = __commonJS({ - "node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/dotjs/pattern.js"(exports, module) { - "use strict"; - module.exports = function generate_pattern(it, $keyword, $ruleType) { - var out = " "; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + "/" + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = "data" + ($dataLvl || ""); - var $isData = it.opts.$data && $schema && $schema.$data, $schemaValue; - if ($isData) { - out += " var schema" + $lvl + " = " + it.util.getData($schema.$data, $dataLvl, it.dataPathArr) + "; "; - $schemaValue = "schema" + $lvl; - } else { - $schemaValue = $schema; - } - var $regexp = $isData ? "(new RegExp(" + $schemaValue + "))" : it.usePattern($schema); - out += "if ( "; - if ($isData) { - out += " (" + $schemaValue + " !== undefined && typeof " + $schemaValue + " != 'string') || "; - } - out += " !" + $regexp + ".test(" + $data + ") ) { "; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ""; - if (it.createErrors !== false) { - out += " { keyword: 'pattern' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { pattern: "; - if ($isData) { - out += "" + $schemaValue; - } else { - out += "" + it.util.toQuotedString($schema); - } - out += " } "; - if (it.opts.messages !== false) { - out += ` , message: 'should match pattern "`; - if ($isData) { - out += "' + " + $schemaValue + " + '"; - } else { - out += "" + it.util.escapeQuotes($schema); - } - out += `"' `; - } - if (it.opts.verbose) { - out += " , schema: "; - if ($isData) { - out += "validate.schema" + $schemaPath; - } else { - out += "" + it.util.toQuotedString($schema); - } - out += " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; - } - out += " } "; - } else { - out += " {} "; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - if (it.async) { - out += " throw new ValidationError([" + __err + "]); "; - } else { - out += " validate.errors = [" + __err + "]; return false; "; - } - } else { - out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; - } - out += "} "; - if ($breakOnError) { - out += " else { "; - } - return out; - }; - } -}); - -// node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/dotjs/properties.js -var require_properties2 = __commonJS({ - "node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/dotjs/properties.js"(exports, module) { - "use strict"; - module.exports = function generate_properties(it, $keyword, $ruleType) { - var out = " "; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + "/" + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = "data" + ($dataLvl || ""); - var $errs = "errs__" + $lvl; - var $it = it.util.copy(it); - var $closingBraces = ""; - $it.level++; - var $nextValid = "valid" + $it.level; - var $key = "key" + $lvl, $idx = "idx" + $lvl, $dataNxt = $it.dataLevel = it.dataLevel + 1, $nextData = "data" + $dataNxt, $dataProperties = "dataProperties" + $lvl; - var $schemaKeys = Object.keys($schema || {}).filter(notProto), $pProperties = it.schema.patternProperties || {}, $pPropertyKeys = Object.keys($pProperties).filter(notProto), $aProperties = it.schema.additionalProperties, $someProperties = $schemaKeys.length || $pPropertyKeys.length, $noAdditional = $aProperties === false, $additionalIsSchema = typeof $aProperties == "object" && Object.keys($aProperties).length, $removeAdditional = it.opts.removeAdditional, $checkAdditional = $noAdditional || $additionalIsSchema || $removeAdditional, $ownProperties = it.opts.ownProperties, $currentBaseId = it.baseId; - var $required = it.schema.required; - if ($required && !(it.opts.$data && $required.$data) && $required.length < it.opts.loopRequired) { - var $requiredHash = it.util.toHash($required); - } - function notProto(p) { - return p !== "__proto__"; - } - out += "var " + $errs + " = errors;var " + $nextValid + " = true;"; - if ($ownProperties) { - out += " var " + $dataProperties + " = undefined;"; - } - if ($checkAdditional) { - if ($ownProperties) { - out += " " + $dataProperties + " = " + $dataProperties + " || Object.keys(" + $data + "); for (var " + $idx + "=0; " + $idx + "<" + $dataProperties + ".length; " + $idx + "++) { var " + $key + " = " + $dataProperties + "[" + $idx + "]; "; - } else { - out += " for (var " + $key + " in " + $data + ") { "; - } - if ($someProperties) { - out += " var isAdditional" + $lvl + " = !(false "; - if ($schemaKeys.length) { - if ($schemaKeys.length > 8) { - out += " || validate.schema" + $schemaPath + ".hasOwnProperty(" + $key + ") "; - } else { - var arr1 = $schemaKeys; - if (arr1) { - var $propertyKey, i1 = -1, l1 = arr1.length - 1; - while (i1 < l1) { - $propertyKey = arr1[i1 += 1]; - out += " || " + $key + " == " + it.util.toQuotedString($propertyKey) + " "; - } - } - } - } - if ($pPropertyKeys.length) { - var arr2 = $pPropertyKeys; - if (arr2) { - var $pProperty, $i = -1, l2 = arr2.length - 1; - while ($i < l2) { - $pProperty = arr2[$i += 1]; - out += " || " + it.usePattern($pProperty) + ".test(" + $key + ") "; - } - } - } - out += " ); if (isAdditional" + $lvl + ") { "; - } - if ($removeAdditional == "all") { - out += " delete " + $data + "[" + $key + "]; "; - } else { - var $currentErrorPath = it.errorPath; - var $additionalProperty = "' + " + $key + " + '"; - if (it.opts._errorDataPathProperty) { - it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); - } - if ($noAdditional) { - if ($removeAdditional) { - out += " delete " + $data + "[" + $key + "]; "; - } else { - out += " " + $nextValid + " = false; "; - var $currErrSchemaPath = $errSchemaPath; - $errSchemaPath = it.errSchemaPath + "/additionalProperties"; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ""; - if (it.createErrors !== false) { - out += " { keyword: 'additionalProperties' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { additionalProperty: '" + $additionalProperty + "' } "; - if (it.opts.messages !== false) { - out += " , message: '"; - if (it.opts._errorDataPathProperty) { - out += "is an invalid additional property"; - } else { - out += "should NOT have additional properties"; - } - out += "' "; - } - if (it.opts.verbose) { - out += " , schema: false , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; - } - out += " } "; - } else { - out += " {} "; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - if (it.async) { - out += " throw new ValidationError([" + __err + "]); "; - } else { - out += " validate.errors = [" + __err + "]; return false; "; - } - } else { - out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; - } - $errSchemaPath = $currErrSchemaPath; - if ($breakOnError) { - out += " break; "; - } - } - } else if ($additionalIsSchema) { - if ($removeAdditional == "failing") { - out += " var " + $errs + " = errors; "; - var $wasComposite = it.compositeRule; - it.compositeRule = $it.compositeRule = true; - $it.schema = $aProperties; - $it.schemaPath = it.schemaPath + ".additionalProperties"; - $it.errSchemaPath = it.errSchemaPath + "/additionalProperties"; - $it.errorPath = it.opts._errorDataPathProperty ? it.errorPath : it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); - var $passData = $data + "[" + $key + "]"; - $it.dataPathArr[$dataNxt] = $key; - var $code = it.validate($it); - $it.baseId = $currentBaseId; - if (it.util.varOccurences($code, $nextData) < 2) { - out += " " + it.util.varReplace($code, $nextData, $passData) + " "; - } else { - out += " var " + $nextData + " = " + $passData + "; " + $code + " "; - } - out += " if (!" + $nextValid + ") { errors = " + $errs + "; if (validate.errors !== null) { if (errors) validate.errors.length = errors; else validate.errors = null; } delete " + $data + "[" + $key + "]; } "; - it.compositeRule = $it.compositeRule = $wasComposite; - } else { - $it.schema = $aProperties; - $it.schemaPath = it.schemaPath + ".additionalProperties"; - $it.errSchemaPath = it.errSchemaPath + "/additionalProperties"; - $it.errorPath = it.opts._errorDataPathProperty ? it.errorPath : it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); - var $passData = $data + "[" + $key + "]"; - $it.dataPathArr[$dataNxt] = $key; - var $code = it.validate($it); - $it.baseId = $currentBaseId; - if (it.util.varOccurences($code, $nextData) < 2) { - out += " " + it.util.varReplace($code, $nextData, $passData) + " "; - } else { - out += " var " + $nextData + " = " + $passData + "; " + $code + " "; - } - if ($breakOnError) { - out += " if (!" + $nextValid + ") break; "; - } - } - } - it.errorPath = $currentErrorPath; - } - if ($someProperties) { - out += " } "; - } - out += " } "; - if ($breakOnError) { - out += " if (" + $nextValid + ") { "; - $closingBraces += "}"; - } - } - var $useDefaults = it.opts.useDefaults && !it.compositeRule; - if ($schemaKeys.length) { - var arr3 = $schemaKeys; - if (arr3) { - var $propertyKey, i3 = -1, l3 = arr3.length - 1; - while (i3 < l3) { - $propertyKey = arr3[i3 += 1]; - var $sch = $schema[$propertyKey]; - if (it.opts.strictKeywords ? typeof $sch == "object" && Object.keys($sch).length > 0 || $sch === false : it.util.schemaHasRules($sch, it.RULES.all)) { - var $prop = it.util.getProperty($propertyKey), $passData = $data + $prop, $hasDefault = $useDefaults && $sch.default !== void 0; - $it.schema = $sch; - $it.schemaPath = $schemaPath + $prop; - $it.errSchemaPath = $errSchemaPath + "/" + it.util.escapeFragment($propertyKey); - $it.errorPath = it.util.getPath(it.errorPath, $propertyKey, it.opts.jsonPointers); - $it.dataPathArr[$dataNxt] = it.util.toQuotedString($propertyKey); - var $code = it.validate($it); - $it.baseId = $currentBaseId; - if (it.util.varOccurences($code, $nextData) < 2) { - $code = it.util.varReplace($code, $nextData, $passData); - var $useData = $passData; - } else { - var $useData = $nextData; - out += " var " + $nextData + " = " + $passData + "; "; - } - if ($hasDefault) { - out += " " + $code + " "; - } else { - if ($requiredHash && $requiredHash[$propertyKey]) { - out += " if ( " + $useData + " === undefined "; - if ($ownProperties) { - out += " || ! Object.prototype.hasOwnProperty.call(" + $data + ", '" + it.util.escapeQuotes($propertyKey) + "') "; - } - out += ") { " + $nextValid + " = false; "; - var $currentErrorPath = it.errorPath, $currErrSchemaPath = $errSchemaPath, $missingProperty = it.util.escapeQuotes($propertyKey); - if (it.opts._errorDataPathProperty) { - it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers); - } - $errSchemaPath = it.errSchemaPath + "/required"; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ""; - if (it.createErrors !== false) { - out += " { keyword: 'required' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { missingProperty: '" + $missingProperty + "' } "; - if (it.opts.messages !== false) { - out += " , message: '"; - if (it.opts._errorDataPathProperty) { - out += "is a required property"; - } else { - out += "should have required property \\'" + $missingProperty + "\\'"; - } - out += "' "; - } - if (it.opts.verbose) { - out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; - } - out += " } "; - } else { - out += " {} "; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - if (it.async) { - out += " throw new ValidationError([" + __err + "]); "; - } else { - out += " validate.errors = [" + __err + "]; return false; "; - } - } else { - out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; - } - $errSchemaPath = $currErrSchemaPath; - it.errorPath = $currentErrorPath; - out += " } else { "; - } else { - if ($breakOnError) { - out += " if ( " + $useData + " === undefined "; - if ($ownProperties) { - out += " || ! Object.prototype.hasOwnProperty.call(" + $data + ", '" + it.util.escapeQuotes($propertyKey) + "') "; - } - out += ") { " + $nextValid + " = true; } else { "; - } else { - out += " if (" + $useData + " !== undefined "; - if ($ownProperties) { - out += " && Object.prototype.hasOwnProperty.call(" + $data + ", '" + it.util.escapeQuotes($propertyKey) + "') "; - } - out += " ) { "; - } - } - out += " " + $code + " } "; - } - } - if ($breakOnError) { - out += " if (" + $nextValid + ") { "; - $closingBraces += "}"; - } - } - } - } - if ($pPropertyKeys.length) { - var arr4 = $pPropertyKeys; - if (arr4) { - var $pProperty, i4 = -1, l4 = arr4.length - 1; - while (i4 < l4) { - $pProperty = arr4[i4 += 1]; - var $sch = $pProperties[$pProperty]; - if (it.opts.strictKeywords ? typeof $sch == "object" && Object.keys($sch).length > 0 || $sch === false : it.util.schemaHasRules($sch, it.RULES.all)) { - $it.schema = $sch; - $it.schemaPath = it.schemaPath + ".patternProperties" + it.util.getProperty($pProperty); - $it.errSchemaPath = it.errSchemaPath + "/patternProperties/" + it.util.escapeFragment($pProperty); - if ($ownProperties) { - out += " " + $dataProperties + " = " + $dataProperties + " || Object.keys(" + $data + "); for (var " + $idx + "=0; " + $idx + "<" + $dataProperties + ".length; " + $idx + "++) { var " + $key + " = " + $dataProperties + "[" + $idx + "]; "; - } else { - out += " for (var " + $key + " in " + $data + ") { "; - } - out += " if (" + it.usePattern($pProperty) + ".test(" + $key + ")) { "; - $it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); - var $passData = $data + "[" + $key + "]"; - $it.dataPathArr[$dataNxt] = $key; - var $code = it.validate($it); - $it.baseId = $currentBaseId; - if (it.util.varOccurences($code, $nextData) < 2) { - out += " " + it.util.varReplace($code, $nextData, $passData) + " "; - } else { - out += " var " + $nextData + " = " + $passData + "; " + $code + " "; - } - if ($breakOnError) { - out += " if (!" + $nextValid + ") break; "; - } - out += " } "; - if ($breakOnError) { - out += " else " + $nextValid + " = true; "; - } - out += " } "; - if ($breakOnError) { - out += " if (" + $nextValid + ") { "; - $closingBraces += "}"; - } - } - } - } - } - if ($breakOnError) { - out += " " + $closingBraces + " if (" + $errs + " == errors) {"; - } - return out; - }; - } -}); - -// node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/dotjs/propertyNames.js -var require_propertyNames2 = __commonJS({ - "node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/dotjs/propertyNames.js"(exports, module) { - "use strict"; - module.exports = function generate_propertyNames(it, $keyword, $ruleType) { - var out = " "; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + "/" + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = "data" + ($dataLvl || ""); - var $errs = "errs__" + $lvl; - var $it = it.util.copy(it); - var $closingBraces = ""; - $it.level++; - var $nextValid = "valid" + $it.level; - out += "var " + $errs + " = errors;"; - if (it.opts.strictKeywords ? typeof $schema == "object" && Object.keys($schema).length > 0 || $schema === false : it.util.schemaHasRules($schema, it.RULES.all)) { - $it.schema = $schema; - $it.schemaPath = $schemaPath; - $it.errSchemaPath = $errSchemaPath; - var $key = "key" + $lvl, $idx = "idx" + $lvl, $i = "i" + $lvl, $invalidName = "' + " + $key + " + '", $dataNxt = $it.dataLevel = it.dataLevel + 1, $nextData = "data" + $dataNxt, $dataProperties = "dataProperties" + $lvl, $ownProperties = it.opts.ownProperties, $currentBaseId = it.baseId; - if ($ownProperties) { - out += " var " + $dataProperties + " = undefined; "; - } - if ($ownProperties) { - out += " " + $dataProperties + " = " + $dataProperties + " || Object.keys(" + $data + "); for (var " + $idx + "=0; " + $idx + "<" + $dataProperties + ".length; " + $idx + "++) { var " + $key + " = " + $dataProperties + "[" + $idx + "]; "; - } else { - out += " for (var " + $key + " in " + $data + ") { "; - } - out += " var startErrs" + $lvl + " = errors; "; - var $passData = $key; - var $wasComposite = it.compositeRule; - it.compositeRule = $it.compositeRule = true; - var $code = it.validate($it); - $it.baseId = $currentBaseId; - if (it.util.varOccurences($code, $nextData) < 2) { - out += " " + it.util.varReplace($code, $nextData, $passData) + " "; - } else { - out += " var " + $nextData + " = " + $passData + "; " + $code + " "; - } - it.compositeRule = $it.compositeRule = $wasComposite; - out += " if (!" + $nextValid + ") { for (var " + $i + "=startErrs" + $lvl + "; " + $i + " 0 || $propertySch === false : it.util.schemaHasRules($propertySch, it.RULES.all)))) { - $required[$required.length] = $property; - } - } - } - } else { - var $required = $schema; - } - } - if ($isData || $required.length) { - var $currentErrorPath = it.errorPath, $loopRequired = $isData || $required.length >= it.opts.loopRequired, $ownProperties = it.opts.ownProperties; - if ($breakOnError) { - out += " var missing" + $lvl + "; "; - if ($loopRequired) { - if (!$isData) { - out += " var " + $vSchema + " = validate.schema" + $schemaPath + "; "; - } - var $i = "i" + $lvl, $propertyPath = "schema" + $lvl + "[" + $i + "]", $missingProperty = "' + " + $propertyPath + " + '"; - if (it.opts._errorDataPathProperty) { - it.errorPath = it.util.getPathExpr($currentErrorPath, $propertyPath, it.opts.jsonPointers); - } - out += " var " + $valid + " = true; "; - if ($isData) { - out += " if (schema" + $lvl + " === undefined) " + $valid + " = true; else if (!Array.isArray(schema" + $lvl + ")) " + $valid + " = false; else {"; - } - out += " for (var " + $i + " = 0; " + $i + " < " + $vSchema + ".length; " + $i + "++) { " + $valid + " = " + $data + "[" + $vSchema + "[" + $i + "]] !== undefined "; - if ($ownProperties) { - out += " && Object.prototype.hasOwnProperty.call(" + $data + ", " + $vSchema + "[" + $i + "]) "; - } - out += "; if (!" + $valid + ") break; } "; - if ($isData) { - out += " } "; - } - out += " if (!" + $valid + ") { "; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ""; - if (it.createErrors !== false) { - out += " { keyword: 'required' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { missingProperty: '" + $missingProperty + "' } "; - if (it.opts.messages !== false) { - out += " , message: '"; - if (it.opts._errorDataPathProperty) { - out += "is a required property"; - } else { - out += "should have required property \\'" + $missingProperty + "\\'"; - } - out += "' "; - } - if (it.opts.verbose) { - out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; - } - out += " } "; - } else { - out += " {} "; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - if (it.async) { - out += " throw new ValidationError([" + __err + "]); "; - } else { - out += " validate.errors = [" + __err + "]; return false; "; - } - } else { - out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; - } - out += " } else { "; - } else { - out += " if ( "; - var arr2 = $required; - if (arr2) { - var $propertyKey, $i = -1, l2 = arr2.length - 1; - while ($i < l2) { - $propertyKey = arr2[$i += 1]; - if ($i) { - out += " || "; - } - var $prop = it.util.getProperty($propertyKey), $useData = $data + $prop; - out += " ( ( " + $useData + " === undefined "; - if ($ownProperties) { - out += " || ! Object.prototype.hasOwnProperty.call(" + $data + ", '" + it.util.escapeQuotes($propertyKey) + "') "; - } - out += ") && (missing" + $lvl + " = " + it.util.toQuotedString(it.opts.jsonPointers ? $propertyKey : $prop) + ") ) "; - } - } - out += ") { "; - var $propertyPath = "missing" + $lvl, $missingProperty = "' + " + $propertyPath + " + '"; - if (it.opts._errorDataPathProperty) { - it.errorPath = it.opts.jsonPointers ? it.util.getPathExpr($currentErrorPath, $propertyPath, true) : $currentErrorPath + " + " + $propertyPath; - } - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ""; - if (it.createErrors !== false) { - out += " { keyword: 'required' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { missingProperty: '" + $missingProperty + "' } "; - if (it.opts.messages !== false) { - out += " , message: '"; - if (it.opts._errorDataPathProperty) { - out += "is a required property"; - } else { - out += "should have required property \\'" + $missingProperty + "\\'"; - } - out += "' "; - } - if (it.opts.verbose) { - out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; - } - out += " } "; - } else { - out += " {} "; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - if (it.async) { - out += " throw new ValidationError([" + __err + "]); "; - } else { - out += " validate.errors = [" + __err + "]; return false; "; - } - } else { - out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; - } - out += " } else { "; - } - } else { - if ($loopRequired) { - if (!$isData) { - out += " var " + $vSchema + " = validate.schema" + $schemaPath + "; "; - } - var $i = "i" + $lvl, $propertyPath = "schema" + $lvl + "[" + $i + "]", $missingProperty = "' + " + $propertyPath + " + '"; - if (it.opts._errorDataPathProperty) { - it.errorPath = it.util.getPathExpr($currentErrorPath, $propertyPath, it.opts.jsonPointers); - } - if ($isData) { - out += " if (" + $vSchema + " && !Array.isArray(" + $vSchema + ")) { var err = "; - if (it.createErrors !== false) { - out += " { keyword: 'required' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { missingProperty: '" + $missingProperty + "' } "; - if (it.opts.messages !== false) { - out += " , message: '"; - if (it.opts._errorDataPathProperty) { - out += "is a required property"; - } else { - out += "should have required property \\'" + $missingProperty + "\\'"; - } - out += "' "; - } - if (it.opts.verbose) { - out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; - } - out += " } "; - } else { - out += " {} "; - } - out += "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else if (" + $vSchema + " !== undefined) { "; - } - out += " for (var " + $i + " = 0; " + $i + " < " + $vSchema + ".length; " + $i + "++) { if (" + $data + "[" + $vSchema + "[" + $i + "]] === undefined "; - if ($ownProperties) { - out += " || ! Object.prototype.hasOwnProperty.call(" + $data + ", " + $vSchema + "[" + $i + "]) "; - } - out += ") { var err = "; - if (it.createErrors !== false) { - out += " { keyword: 'required' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { missingProperty: '" + $missingProperty + "' } "; - if (it.opts.messages !== false) { - out += " , message: '"; - if (it.opts._errorDataPathProperty) { - out += "is a required property"; - } else { - out += "should have required property \\'" + $missingProperty + "\\'"; - } - out += "' "; - } - if (it.opts.verbose) { - out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; - } - out += " } "; - } else { - out += " {} "; - } - out += "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } } "; - if ($isData) { - out += " } "; - } - } else { - var arr3 = $required; - if (arr3) { - var $propertyKey, i3 = -1, l3 = arr3.length - 1; - while (i3 < l3) { - $propertyKey = arr3[i3 += 1]; - var $prop = it.util.getProperty($propertyKey), $missingProperty = it.util.escapeQuotes($propertyKey), $useData = $data + $prop; - if (it.opts._errorDataPathProperty) { - it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers); - } - out += " if ( " + $useData + " === undefined "; - if ($ownProperties) { - out += " || ! Object.prototype.hasOwnProperty.call(" + $data + ", '" + it.util.escapeQuotes($propertyKey) + "') "; - } - out += ") { var err = "; - if (it.createErrors !== false) { - out += " { keyword: 'required' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { missingProperty: '" + $missingProperty + "' } "; - if (it.opts.messages !== false) { - out += " , message: '"; - if (it.opts._errorDataPathProperty) { - out += "is a required property"; - } else { - out += "should have required property \\'" + $missingProperty + "\\'"; - } - out += "' "; - } - if (it.opts.verbose) { - out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; - } - out += " } "; - } else { - out += " {} "; - } - out += "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "; - } - } - } - } - it.errorPath = $currentErrorPath; - } else if ($breakOnError) { - out += " if (true) {"; - } - return out; - }; - } -}); - -// node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/dotjs/uniqueItems.js -var require_uniqueItems2 = __commonJS({ - "node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/dotjs/uniqueItems.js"(exports, module) { - "use strict"; - module.exports = function generate_uniqueItems(it, $keyword, $ruleType) { - var out = " "; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + "/" + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = "data" + ($dataLvl || ""); - var $valid = "valid" + $lvl; - var $isData = it.opts.$data && $schema && $schema.$data, $schemaValue; - if ($isData) { - out += " var schema" + $lvl + " = " + it.util.getData($schema.$data, $dataLvl, it.dataPathArr) + "; "; - $schemaValue = "schema" + $lvl; - } else { - $schemaValue = $schema; - } - if (($schema || $isData) && it.opts.uniqueItems !== false) { - if ($isData) { - out += " var " + $valid + "; if (" + $schemaValue + " === false || " + $schemaValue + " === undefined) " + $valid + " = true; else if (typeof " + $schemaValue + " != 'boolean') " + $valid + " = false; else { "; - } - out += " var i = " + $data + ".length , " + $valid + " = true , j; if (i > 1) { "; - var $itemType = it.schema.items && it.schema.items.type, $typeIsArray = Array.isArray($itemType); - if (!$itemType || $itemType == "object" || $itemType == "array" || $typeIsArray && ($itemType.indexOf("object") >= 0 || $itemType.indexOf("array") >= 0)) { - out += " outer: for (;i--;) { for (j = i; j--;) { if (equal(" + $data + "[i], " + $data + "[j])) { " + $valid + " = false; break outer; } } } "; - } else { - out += " var itemIndices = {}, item; for (;i--;) { var item = " + $data + "[i]; "; - var $method = "checkDataType" + ($typeIsArray ? "s" : ""); - out += " if (" + it.util[$method]($itemType, "item", it.opts.strictNumbers, true) + ") continue; "; - if ($typeIsArray) { - out += ` if (typeof item == 'string') item = '"' + item; `; - } - out += " if (typeof itemIndices[item] == 'number') { " + $valid + " = false; j = itemIndices[item]; break; } itemIndices[item] = i; } "; - } - out += " } "; - if ($isData) { - out += " } "; - } - out += " if (!" + $valid + ") { "; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ""; - if (it.createErrors !== false) { - out += " { keyword: 'uniqueItems' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { i: i, j: j } "; - if (it.opts.messages !== false) { - out += " , message: 'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)' "; - } - if (it.opts.verbose) { - out += " , schema: "; - if ($isData) { - out += "validate.schema" + $schemaPath; - } else { - out += "" + $schema; - } - out += " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; - } - out += " } "; - } else { - out += " {} "; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - if (it.async) { - out += " throw new ValidationError([" + __err + "]); "; - } else { - out += " validate.errors = [" + __err + "]; return false; "; - } - } else { - out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; - } - out += " } "; - if ($breakOnError) { - out += " else { "; - } - } else { - if ($breakOnError) { - out += " if (true) { "; - } - } - return out; - }; - } -}); - -// node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/dotjs/index.js -var require_dotjs2 = __commonJS({ - "node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/dotjs/index.js"(exports, module) { - "use strict"; + urnComponent.error = urnComponent.error || "URN can not be parsed."; + } + return urnComponent; + } + function urnSerialize(urnComponent, options) { + if (urnComponent.nid === void 0) { + throw new Error("URN without nid cannot be serialized"); + } + const scheme = options.scheme || urnComponent.scheme || "urn"; + const nid = urnComponent.nid.toLowerCase(); + const urnScheme = `${scheme}:${options.nid || nid}`; + const schemeHandler = getSchemeHandler(urnScheme); + if (schemeHandler) { + urnComponent = schemeHandler.serialize(urnComponent, options); + } + const uriComponent = urnComponent; + const nss = urnComponent.nss; + uriComponent.path = `${nid || options.nid}:${nss}`; + options.skipEscape = true; + return uriComponent; + } + function urnuuidParse(urnComponent, options) { + const uuidComponent = urnComponent; + uuidComponent.uuid = uuidComponent.nss; + uuidComponent.nss = void 0; + if (!options.tolerant && (!uuidComponent.uuid || !isUUID(uuidComponent.uuid))) { + uuidComponent.error = uuidComponent.error || "UUID is not valid."; + } + return uuidComponent; + } + function urnuuidSerialize(uuidComponent) { + const urnComponent = uuidComponent; + urnComponent.nss = (uuidComponent.uuid || "").toLowerCase(); + return urnComponent; + } + var http2 = ( + /** @type {SchemeHandler} */ + { + scheme: "http", + domainHost: true, + parse: httpParse, + serialize: httpSerialize + } + ); + var https = ( + /** @type {SchemeHandler} */ + { + scheme: "https", + domainHost: http2.domainHost, + parse: httpParse, + serialize: httpSerialize + } + ); + var ws = ( + /** @type {SchemeHandler} */ + { + scheme: "ws", + domainHost: true, + parse: wsParse, + serialize: wsSerialize + } + ); + var wss = ( + /** @type {SchemeHandler} */ + { + scheme: "wss", + domainHost: ws.domainHost, + parse: ws.parse, + serialize: ws.serialize + } + ); + var urn = ( + /** @type {SchemeHandler} */ + { + scheme: "urn", + parse: urnParse, + serialize: urnSerialize, + skipNormalize: true + } + ); + var urnuuid = ( + /** @type {SchemeHandler} */ + { + scheme: "urn:uuid", + parse: urnuuidParse, + serialize: urnuuidSerialize, + skipNormalize: true + } + ); + var SCHEMES = ( + /** @type {Record} */ + { + http: http2, + https, + ws, + wss, + urn, + "urn:uuid": urnuuid + } + ); + Object.setPrototypeOf(SCHEMES, null); + function getSchemeHandler(scheme) { + return scheme && (SCHEMES[ + /** @type {SchemeName} */ + scheme + ] || SCHEMES[ + /** @type {SchemeName} */ + scheme.toLowerCase() + ]) || void 0; + } module.exports = { - "$ref": require_ref2(), - allOf: require_allOf2(), - anyOf: require_anyOf2(), - "$comment": require_comment2(), - const: require_const2(), - contains: require_contains2(), - dependencies: require_dependencies2(), - "enum": require_enum2(), - format: require_format2(), - "if": require_if2(), - items: require_items2(), - maximum: require_limit(), - minimum: require_limit(), - maxItems: require_limitItems(), - minItems: require_limitItems(), - maxLength: require_limitLength(), - minLength: require_limitLength(), - maxProperties: require_limitProperties(), - minProperties: require_limitProperties(), - multipleOf: require_multipleOf2(), - not: require_not2(), - oneOf: require_oneOf2(), - pattern: require_pattern2(), - properties: require_properties2(), - propertyNames: require_propertyNames2(), - required: require_required2(), - uniqueItems: require_uniqueItems2(), - validate: require_validate2() + wsIsSecure, + SCHEMES, + isValidSchemeName, + getSchemeHandler }; } }); -// node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/compile/rules.js -var require_rules2 = __commonJS({ - "node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/compile/rules.js"(exports, module) { +// ../node_modules/.pnpm/fast-uri@3.1.0/node_modules/fast-uri/index.js +var require_fast_uri2 = __commonJS({ + "../node_modules/.pnpm/fast-uri@3.1.0/node_modules/fast-uri/index.js"(exports, module) { "use strict"; - var ruleModules = require_dotjs2(); - var toHash = require_util9().toHash; - module.exports = function rules() { - var RULES = [ - { - type: "number", - rules: [ - { "maximum": ["exclusiveMaximum"] }, - { "minimum": ["exclusiveMinimum"] }, - "multipleOf", - "format" - ] - }, - { - type: "string", - rules: ["maxLength", "minLength", "pattern", "format"] - }, - { - type: "array", - rules: ["maxItems", "minItems", "items", "contains", "uniqueItems"] - }, - { - type: "object", - rules: [ - "maxProperties", - "minProperties", - "required", - "dependencies", - "propertyNames", - { "properties": ["additionalProperties", "patternProperties"] } - ] - }, - { rules: ["$ref", "const", "enum", "not", "anyOf", "oneOf", "allOf", "if"] } - ]; - var ALL = ["type", "$comment"]; - var KEYWORDS = [ - "$schema", - "$id", - "id", - "$data", - "$async", - "title", - "description", - "default", - "definitions", - "examples", - "readOnly", - "writeOnly", - "contentMediaType", - "contentEncoding", - "additionalItems", - "then", - "else" - ]; - var TYPES = ["number", "integer", "string", "array", "object", "boolean", "null"]; - RULES.all = toHash(ALL); - RULES.types = toHash(TYPES); - RULES.forEach(function(group2) { - group2.rules = group2.rules.map(function(keyword) { - var implKeywords; - if (typeof keyword == "object") { - var key = Object.keys(keyword)[0]; - implKeywords = keyword[key]; - keyword = key; - implKeywords.forEach(function(k) { - ALL.push(k); - RULES.all[k] = true; - }); - } - ALL.push(keyword); - var rule = RULES.all[keyword] = { - keyword, - code: ruleModules[keyword], - implements: implKeywords - }; - return rule; - }); - RULES.all.$comment = { - keyword: "$comment", - code: ruleModules.$comment - }; - if (group2.type) RULES.types[group2.type] = group2; - }); - RULES.keywords = toHash(ALL.concat(KEYWORDS)); - RULES.custom = {}; - return RULES; - }; - } -}); - -// node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/data.js -var require_data3 = __commonJS({ - "node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/data.js"(exports, module) { - "use strict"; - var KEYWORDS = [ - "multipleOf", - "maximum", - "exclusiveMaximum", - "minimum", - "exclusiveMinimum", - "maxLength", - "minLength", - "pattern", - "additionalItems", - "maxItems", - "minItems", - "uniqueItems", - "maxProperties", - "minProperties", - "required", - "additionalProperties", - "enum", - "format", - "const" - ]; - module.exports = function(metaSchema, keywordsJsonPointers) { - for (var i = 0; i < keywordsJsonPointers.length; i++) { - metaSchema = JSON.parse(JSON.stringify(metaSchema)); - var segments = keywordsJsonPointers[i].split("/"); - var keywords2 = metaSchema; - var j; - for (j = 1; j < segments.length; j++) - keywords2 = keywords2[segments[j]]; - for (j = 0; j < KEYWORDS.length; j++) { - var key = KEYWORDS[j]; - var schema2 = keywords2[key]; - if (schema2) { - keywords2[key] = { - anyOf: [ - schema2, - { $ref: "https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#" } - ] - }; - } - } + var { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizeComponentEncoding, isIPv4, nonSimpleDomain } = require_utils5(); + var { SCHEMES, getSchemeHandler } = require_schemes2(); + function normalize2(uri, options) { + if (typeof uri === "string") { + uri = /** @type {T} */ + serialize(parse6(uri, options), options); + } else if (typeof uri === "object") { + uri = /** @type {T} */ + parse6(serialize(uri, options), options); } - return metaSchema; - }; - } -}); - -// node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/compile/async.js -var require_async2 = __commonJS({ - "node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/compile/async.js"(exports, module) { - "use strict"; - var MissingRefError = require_error_classes2().MissingRef; - module.exports = compileAsync; - function compileAsync(schema2, meta, callback) { - var self2 = this; - if (typeof this._opts.loadSchema != "function") - throw new Error("options.loadSchema should be a function"); - if (typeof meta == "function") { - callback = meta; - meta = void 0; + return uri; + } + function resolve(baseURI, relativeURI, options) { + const schemelessOptions = options ? Object.assign({ scheme: "null" }, options) : { scheme: "null" }; + const resolved = resolveComponent(parse6(baseURI, schemelessOptions), parse6(relativeURI, schemelessOptions), schemelessOptions, true); + schemelessOptions.skipEscape = true; + return serialize(resolved, schemelessOptions); + } + function resolveComponent(base, relative, options, skipNormalization) { + const target = {}; + if (!skipNormalization) { + base = parse6(serialize(base, options), options); + relative = parse6(serialize(relative, options), options); } - var p = loadMetaSchemaOf(schema2).then(function() { - var schemaObj = self2._addSchema(schema2, void 0, meta); - return schemaObj.validate || _compileAsync(schemaObj); - }); - if (callback) { - p.then( - function(v) { - callback(null, v); - }, - callback - ); - } - return p; - function loadMetaSchemaOf(sch) { - var $schema = sch.$schema; - return $schema && !self2.getSchema($schema) ? compileAsync.call(self2, { $ref: $schema }, true) : Promise.resolve(); - } - function _compileAsync(schemaObj) { - try { - return self2._compile(schemaObj); - } catch (e) { - if (e instanceof MissingRefError) return loadMissingSchema(e); - throw e; - } - function loadMissingSchema(e) { - var ref = e.missingSchema; - if (added(ref)) throw new Error("Schema " + ref + " is loaded but " + e.missingRef + " cannot be resolved"); - var schemaPromise = self2._loadingSchemas[ref]; - if (!schemaPromise) { - schemaPromise = self2._loadingSchemas[ref] = self2._opts.loadSchema(ref); - schemaPromise.then(removePromise, removePromise); - } - return schemaPromise.then(function(sch) { - if (!added(ref)) { - return loadMetaSchemaOf(sch).then(function() { - if (!added(ref)) self2.addSchema(sch, ref, void 0, meta); - }); + options = options || {}; + if (!options.tolerant && relative.scheme) { + target.scheme = relative.scheme; + target.userinfo = relative.userinfo; + target.host = relative.host; + target.port = relative.port; + target.path = removeDotSegments(relative.path || ""); + target.query = relative.query; + } else { + if (relative.userinfo !== void 0 || relative.host !== void 0 || relative.port !== void 0) { + target.userinfo = relative.userinfo; + target.host = relative.host; + target.port = relative.port; + target.path = removeDotSegments(relative.path || ""); + target.query = relative.query; + } else { + if (!relative.path) { + target.path = base.path; + if (relative.query !== void 0) { + target.query = relative.query; + } else { + target.query = base.query; } - }).then(function() { - return _compileAsync(schemaObj); - }); - function removePromise() { - delete self2._loadingSchemas[ref]; + } else { + if (relative.path[0] === "/") { + target.path = removeDotSegments(relative.path); + } else { + if ((base.userinfo !== void 0 || base.host !== void 0 || base.port !== void 0) && !base.path) { + target.path = "/" + relative.path; + } else if (!base.path) { + target.path = relative.path; + } else { + target.path = base.path.slice(0, base.path.lastIndexOf("/") + 1) + relative.path; + } + target.path = removeDotSegments(target.path); + } + target.query = relative.query; } - function added(ref2) { - return self2._refs[ref2] || self2._schemas[ref2]; + target.userinfo = base.userinfo; + target.host = base.host; + target.port = base.port; + } + target.scheme = base.scheme; + } + target.fragment = relative.fragment; + return target; + } + function equal(uriA, uriB, options) { + if (typeof uriA === "string") { + uriA = unescape(uriA); + uriA = serialize(normalizeComponentEncoding(parse6(uriA, options), true), { ...options, skipEscape: true }); + } else if (typeof uriA === "object") { + uriA = serialize(normalizeComponentEncoding(uriA, true), { ...options, skipEscape: true }); + } + if (typeof uriB === "string") { + uriB = unescape(uriB); + uriB = serialize(normalizeComponentEncoding(parse6(uriB, options), true), { ...options, skipEscape: true }); + } else if (typeof uriB === "object") { + uriB = serialize(normalizeComponentEncoding(uriB, true), { ...options, skipEscape: true }); + } + return uriA.toLowerCase() === uriB.toLowerCase(); + } + function serialize(cmpts, opts) { + const component = { + host: cmpts.host, + scheme: cmpts.scheme, + userinfo: cmpts.userinfo, + port: cmpts.port, + path: cmpts.path, + query: cmpts.query, + nid: cmpts.nid, + nss: cmpts.nss, + uuid: cmpts.uuid, + fragment: cmpts.fragment, + reference: cmpts.reference, + resourceName: cmpts.resourceName, + secure: cmpts.secure, + error: "" + }; + const options = Object.assign({}, opts); + const uriTokens = []; + const schemeHandler = getSchemeHandler(options.scheme || component.scheme); + if (schemeHandler && schemeHandler.serialize) schemeHandler.serialize(component, options); + if (component.path !== void 0) { + if (!options.skipEscape) { + component.path = escape(component.path); + if (component.scheme !== void 0) { + component.path = component.path.split("%3A").join(":"); + } + } else { + component.path = unescape(component.path); + } + } + if (options.reference !== "suffix" && component.scheme) { + uriTokens.push(component.scheme, ":"); + } + const authority = recomposeAuthority(component); + if (authority !== void 0) { + if (options.reference !== "suffix") { + uriTokens.push("//"); + } + uriTokens.push(authority); + if (component.path && component.path[0] !== "/") { + uriTokens.push("/"); + } + } + if (component.path !== void 0) { + let s = component.path; + if (!options.absolutePath && (!schemeHandler || !schemeHandler.absolutePath)) { + s = removeDotSegments(s); + } + if (authority === void 0 && s[0] === "/" && s[1] === "/") { + s = "/%2F" + s.slice(2); + } + uriTokens.push(s); + } + if (component.query !== void 0) { + uriTokens.push("?", component.query); + } + if (component.fragment !== void 0) { + uriTokens.push("#", component.fragment); + } + return uriTokens.join(""); + } + var URI_PARSE = /^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u; + function parse6(uri, opts) { + const options = Object.assign({}, opts); + const parsed2 = { + scheme: void 0, + userinfo: void 0, + host: "", + port: void 0, + path: "", + query: void 0, + fragment: void 0 + }; + let isIP = false; + if (options.reference === "suffix") { + if (options.scheme) { + uri = options.scheme + ":" + uri; + } else { + uri = "//" + uri; + } + } + const matches = uri.match(URI_PARSE); + if (matches) { + parsed2.scheme = matches[1]; + parsed2.userinfo = matches[3]; + parsed2.host = matches[4]; + parsed2.port = parseInt(matches[5], 10); + parsed2.path = matches[6] || ""; + parsed2.query = matches[7]; + parsed2.fragment = matches[8]; + if (isNaN(parsed2.port)) { + parsed2.port = matches[5]; + } + if (parsed2.host) { + const ipv4result = isIPv4(parsed2.host); + if (ipv4result === false) { + const ipv6result = normalizeIPv6(parsed2.host); + parsed2.host = ipv6result.host.toLowerCase(); + isIP = ipv6result.isIPV6; + } else { + isIP = true; + } + } + if (parsed2.scheme === void 0 && parsed2.userinfo === void 0 && parsed2.host === void 0 && parsed2.port === void 0 && parsed2.query === void 0 && !parsed2.path) { + parsed2.reference = "same-document"; + } else if (parsed2.scheme === void 0) { + parsed2.reference = "relative"; + } else if (parsed2.fragment === void 0) { + parsed2.reference = "absolute"; + } else { + parsed2.reference = "uri"; + } + if (options.reference && options.reference !== "suffix" && options.reference !== parsed2.reference) { + parsed2.error = parsed2.error || "URI is not a " + options.reference + " reference."; + } + const schemeHandler = getSchemeHandler(options.scheme || parsed2.scheme); + if (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport)) { + if (parsed2.host && (options.domainHost || schemeHandler && schemeHandler.domainHost) && isIP === false && nonSimpleDomain(parsed2.host)) { + try { + parsed2.host = URL.domainToASCII(parsed2.host.toLowerCase()); + } catch (e) { + parsed2.error = parsed2.error || "Host's domain name can not be converted to ASCII: " + e; + } + } + } + if (!schemeHandler || schemeHandler && !schemeHandler.skipNormalize) { + if (uri.indexOf("%") !== -1) { + if (parsed2.scheme !== void 0) { + parsed2.scheme = unescape(parsed2.scheme); + } + if (parsed2.host !== void 0) { + parsed2.host = unescape(parsed2.host); + } + } + if (parsed2.path) { + parsed2.path = escape(unescape(parsed2.path)); + } + if (parsed2.fragment) { + parsed2.fragment = encodeURI(decodeURIComponent(parsed2.fragment)); + } + } + if (schemeHandler && schemeHandler.parse) { + schemeHandler.parse(parsed2, options); + } + } else { + parsed2.error = parsed2.error || "URI can not be parsed."; + } + return parsed2; + } + var fastUri = { + SCHEMES, + normalize: normalize2, + resolve, + resolveComponent, + equal, + serialize, + parse: parse6 + }; + module.exports = fastUri; + module.exports.default = fastUri; + module.exports.fastUri = fastUri; + } +}); + +// ../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/runtime/uri.js +var require_uri2 = __commonJS({ + "../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/runtime/uri.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var uri = require_fast_uri2(); + uri.code = 'require("ajv/dist/runtime/uri").default'; + exports.default = uri; + } +}); + +// ../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/core.js +var require_core3 = __commonJS({ + "../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/core.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.CodeGen = exports.Name = exports.nil = exports.stringify = exports.str = exports._ = exports.KeywordCxt = void 0; + var validate_1 = require_validate2(); + Object.defineProperty(exports, "KeywordCxt", { enumerable: true, get: function() { + return validate_1.KeywordCxt; + } }); + var codegen_1 = require_codegen2(); + Object.defineProperty(exports, "_", { enumerable: true, get: function() { + return codegen_1._; + } }); + Object.defineProperty(exports, "str", { enumerable: true, get: function() { + return codegen_1.str; + } }); + Object.defineProperty(exports, "stringify", { enumerable: true, get: function() { + return codegen_1.stringify; + } }); + Object.defineProperty(exports, "nil", { enumerable: true, get: function() { + return codegen_1.nil; + } }); + Object.defineProperty(exports, "Name", { enumerable: true, get: function() { + return codegen_1.Name; + } }); + Object.defineProperty(exports, "CodeGen", { enumerable: true, get: function() { + return codegen_1.CodeGen; + } }); + var validation_error_1 = require_validation_error2(); + var ref_error_1 = require_ref_error2(); + var rules_1 = require_rules2(); + var compile_1 = require_compile2(); + var codegen_2 = require_codegen2(); + var resolve_1 = require_resolve2(); + var dataType_1 = require_dataType2(); + var util_1 = require_util9(); + var $dataRefSchema = require_data2(); + var uri_1 = require_uri2(); + var defaultRegExp = (str, flags) => new RegExp(str, flags); + defaultRegExp.code = "new RegExp"; + var META_IGNORE_OPTIONS = ["removeAdditional", "useDefaults", "coerceTypes"]; + var EXT_SCOPE_NAMES = /* @__PURE__ */ new Set([ + "validate", + "serialize", + "parse", + "wrapper", + "root", + "schema", + "keyword", + "pattern", + "formats", + "validate$data", + "func", + "obj", + "Error" + ]); + var removedOptions = { + errorDataPath: "", + format: "`validateFormats: false` can be used instead.", + nullable: '"nullable" keyword is supported by default.', + jsonPointers: "Deprecated jsPropertySyntax can be used instead.", + extendRefs: "Deprecated ignoreKeywordsWithRef can be used instead.", + missingRefs: "Pass empty schema with $id that should be ignored to ajv.addSchema.", + processCode: "Use option `code: {process: (code, schemaEnv: object) => string}`", + sourceCode: "Use option `code: {source: true}`", + strictDefaults: "It is default now, see option `strict`.", + strictKeywords: "It is default now, see option `strict`.", + uniqueItems: '"uniqueItems" keyword is always validated.', + unknownFormats: "Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).", + cache: "Map is used as cache, schema object as key.", + serialize: "Map is used as cache, schema object as key.", + ajvErrors: "It is default now." + }; + var deprecatedOptions = { + ignoreKeywordsWithRef: "", + jsPropertySyntax: "", + unicode: '"minLength"/"maxLength" account for unicode characters by default.' + }; + var MAX_EXPRESSION = 200; + function requiredOptions(o) { + var _a2, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0; + const s = o.strict; + const _optz = (_a2 = o.code) === null || _a2 === void 0 ? void 0 : _a2.optimize; + const optimize = _optz === true || _optz === void 0 ? 1 : _optz || 0; + const regExp = (_c = (_b = o.code) === null || _b === void 0 ? void 0 : _b.regExp) !== null && _c !== void 0 ? _c : defaultRegExp; + const uriResolver = (_d = o.uriResolver) !== null && _d !== void 0 ? _d : uri_1.default; + return { + strictSchema: (_f = (_e = o.strictSchema) !== null && _e !== void 0 ? _e : s) !== null && _f !== void 0 ? _f : true, + strictNumbers: (_h = (_g = o.strictNumbers) !== null && _g !== void 0 ? _g : s) !== null && _h !== void 0 ? _h : true, + strictTypes: (_k = (_j = o.strictTypes) !== null && _j !== void 0 ? _j : s) !== null && _k !== void 0 ? _k : "log", + strictTuples: (_m = (_l = o.strictTuples) !== null && _l !== void 0 ? _l : s) !== null && _m !== void 0 ? _m : "log", + strictRequired: (_p = (_o = o.strictRequired) !== null && _o !== void 0 ? _o : s) !== null && _p !== void 0 ? _p : false, + code: o.code ? { ...o.code, optimize, regExp } : { optimize, regExp }, + loopRequired: (_q = o.loopRequired) !== null && _q !== void 0 ? _q : MAX_EXPRESSION, + loopEnum: (_r = o.loopEnum) !== null && _r !== void 0 ? _r : MAX_EXPRESSION, + meta: (_s = o.meta) !== null && _s !== void 0 ? _s : true, + messages: (_t = o.messages) !== null && _t !== void 0 ? _t : true, + inlineRefs: (_u = o.inlineRefs) !== null && _u !== void 0 ? _u : true, + schemaId: (_v = o.schemaId) !== null && _v !== void 0 ? _v : "$id", + addUsedSchema: (_w = o.addUsedSchema) !== null && _w !== void 0 ? _w : true, + validateSchema: (_x = o.validateSchema) !== null && _x !== void 0 ? _x : true, + validateFormats: (_y = o.validateFormats) !== null && _y !== void 0 ? _y : true, + unicodeRegExp: (_z = o.unicodeRegExp) !== null && _z !== void 0 ? _z : true, + int32range: (_0 = o.int32range) !== null && _0 !== void 0 ? _0 : true, + uriResolver + }; + } + var Ajv2 = class { + constructor(opts = {}) { + this.schemas = {}; + this.refs = {}; + this.formats = {}; + this._compilations = /* @__PURE__ */ new Set(); + this._loading = {}; + this._cache = /* @__PURE__ */ new Map(); + opts = this.opts = { ...opts, ...requiredOptions(opts) }; + const { es5, lines } = this.opts.code; + this.scope = new codegen_2.ValueScope({ scope: {}, prefixes: EXT_SCOPE_NAMES, es5, lines }); + this.logger = getLogger(opts.logger); + const formatOpt = opts.validateFormats; + opts.validateFormats = false; + this.RULES = (0, rules_1.getRules)(); + checkOptions.call(this, removedOptions, opts, "NOT SUPPORTED"); + checkOptions.call(this, deprecatedOptions, opts, "DEPRECATED", "warn"); + this._metaOpts = getMetaSchemaOptions.call(this); + if (opts.formats) + addInitialFormats.call(this); + this._addVocabularies(); + this._addDefaultMetaSchema(); + if (opts.keywords) + addInitialKeywords.call(this, opts.keywords); + if (typeof opts.meta == "object") + this.addMetaSchema(opts.meta); + addInitialSchemas.call(this); + opts.validateFormats = formatOpt; + } + _addVocabularies() { + this.addKeyword("$async"); + } + _addDefaultMetaSchema() { + const { $data, meta: meta3, schemaId } = this.opts; + let _dataRefSchema = $dataRefSchema; + if (schemaId === "id") { + _dataRefSchema = { ...$dataRefSchema }; + _dataRefSchema.id = _dataRefSchema.$id; + delete _dataRefSchema.$id; + } + if (meta3 && $data) + this.addMetaSchema(_dataRefSchema, _dataRefSchema[schemaId], false); + } + defaultMeta() { + const { meta: meta3, schemaId } = this.opts; + return this.opts.defaultMeta = typeof meta3 == "object" ? meta3[schemaId] || meta3 : void 0; + } + validate(schemaKeyRef, data) { + let v; + if (typeof schemaKeyRef == "string") { + v = this.getSchema(schemaKeyRef); + if (!v) + throw new Error(`no schema with key or ref "${schemaKeyRef}"`); + } else { + v = this.compile(schemaKeyRef); + } + const valid = v(data); + if (!("$async" in v)) + this.errors = v.errors; + return valid; + } + compile(schema2, _meta) { + const sch = this._addSchema(schema2, _meta); + return sch.validate || this._compileSchemaEnv(sch); + } + compileAsync(schema2, meta3) { + if (typeof this.opts.loadSchema != "function") { + throw new Error("options.loadSchema should be a function"); + } + const { loadSchema } = this.opts; + return runCompileAsync.call(this, schema2, meta3); + async function runCompileAsync(_schema, _meta) { + await loadMetaSchema.call(this, _schema.$schema); + const sch = this._addSchema(_schema, _meta); + return sch.validate || _compileAsync.call(this, sch); + } + async function loadMetaSchema($ref) { + if ($ref && !this.getSchema($ref)) { + await runCompileAsync.call(this, { $ref }, true); + } + } + async function _compileAsync(sch) { + try { + return this._compileSchemaEnv(sch); + } catch (e) { + if (!(e instanceof ref_error_1.default)) + throw e; + checkLoaded.call(this, e); + await loadMissingSchema.call(this, e.missingSchema); + return _compileAsync.call(this, sch); + } + } + function checkLoaded({ missingSchema: ref, missingRef }) { + if (this.refs[ref]) { + throw new Error(`AnySchema ${ref} is loaded but ${missingRef} cannot be resolved`); + } + } + async function loadMissingSchema(ref) { + const _schema = await _loadSchema.call(this, ref); + if (!this.refs[ref]) + await loadMetaSchema.call(this, _schema.$schema); + if (!this.refs[ref]) + this.addSchema(_schema, ref, meta3); + } + async function _loadSchema(ref) { + const p = this._loading[ref]; + if (p) + return p; + try { + return await (this._loading[ref] = loadSchema(ref)); + } finally { + delete this._loading[ref]; } } } + // Adds schema to the instance + addSchema(schema2, key, _meta, _validateSchema = this.opts.validateSchema) { + if (Array.isArray(schema2)) { + for (const sch of schema2) + this.addSchema(sch, void 0, _meta, _validateSchema); + return this; + } + let id; + if (typeof schema2 === "object") { + const { schemaId } = this.opts; + id = schema2[schemaId]; + if (id !== void 0 && typeof id != "string") { + throw new Error(`schema ${schemaId} must be string`); + } + } + key = (0, resolve_1.normalizeId)(key || id); + this._checkUnique(key); + this.schemas[key] = this._addSchema(schema2, _meta, key, _validateSchema, true); + return this; + } + // Add schema that will be used to validate other schemas + // options in META_IGNORE_OPTIONS are alway set to false + addMetaSchema(schema2, key, _validateSchema = this.opts.validateSchema) { + this.addSchema(schema2, key, true, _validateSchema); + return this; + } + // Validate schema against its meta-schema + validateSchema(schema2, throwOrLogError) { + if (typeof schema2 == "boolean") + return true; + let $schema; + $schema = schema2.$schema; + if ($schema !== void 0 && typeof $schema != "string") { + throw new Error("$schema must be a string"); + } + $schema = $schema || this.opts.defaultMeta || this.defaultMeta(); + if (!$schema) { + this.logger.warn("meta-schema not available"); + this.errors = null; + return true; + } + const valid = this.validate($schema, schema2); + if (!valid && throwOrLogError) { + const message = "schema is invalid: " + this.errorsText(); + if (this.opts.validateSchema === "log") + this.logger.error(message); + else + throw new Error(message); + } + return valid; + } + // Get compiled schema by `key` or `ref`. + // (`key` that was passed to `addSchema` or full schema reference - `schema.$id` or resolved id) + getSchema(keyRef) { + let sch; + while (typeof (sch = getSchEnv.call(this, keyRef)) == "string") + keyRef = sch; + if (sch === void 0) { + const { schemaId } = this.opts; + const root2 = new compile_1.SchemaEnv({ schema: {}, schemaId }); + sch = compile_1.resolveSchema.call(this, root2, keyRef); + if (!sch) + return; + this.refs[keyRef] = sch; + } + return sch.validate || this._compileSchemaEnv(sch); + } + // Remove cached schema(s). + // If no parameter is passed all schemas but meta-schemas are removed. + // If RegExp is passed all schemas with key/id matching pattern but meta-schemas are removed. + // Even if schema is referenced by other schemas it still can be removed as other schemas have local references. + removeSchema(schemaKeyRef) { + if (schemaKeyRef instanceof RegExp) { + this._removeAllSchemas(this.schemas, schemaKeyRef); + this._removeAllSchemas(this.refs, schemaKeyRef); + return this; + } + switch (typeof schemaKeyRef) { + case "undefined": + this._removeAllSchemas(this.schemas); + this._removeAllSchemas(this.refs); + this._cache.clear(); + return this; + case "string": { + const sch = getSchEnv.call(this, schemaKeyRef); + if (typeof sch == "object") + this._cache.delete(sch.schema); + delete this.schemas[schemaKeyRef]; + delete this.refs[schemaKeyRef]; + return this; + } + case "object": { + const cacheKey = schemaKeyRef; + this._cache.delete(cacheKey); + let id = schemaKeyRef[this.opts.schemaId]; + if (id) { + id = (0, resolve_1.normalizeId)(id); + delete this.schemas[id]; + delete this.refs[id]; + } + return this; + } + default: + throw new Error("ajv.removeSchema: invalid parameter"); + } + } + // add "vocabulary" - a collection of keywords + addVocabulary(definitions) { + for (const def of definitions) + this.addKeyword(def); + return this; + } + addKeyword(kwdOrDef, def) { + let keyword; + if (typeof kwdOrDef == "string") { + keyword = kwdOrDef; + if (typeof def == "object") { + this.logger.warn("these parameters are deprecated, see docs for addKeyword"); + def.keyword = keyword; + } + } else if (typeof kwdOrDef == "object" && def === void 0) { + def = kwdOrDef; + keyword = def.keyword; + if (Array.isArray(keyword) && !keyword.length) { + throw new Error("addKeywords: keyword must be string or non-empty array"); + } + } else { + throw new Error("invalid addKeywords parameters"); + } + checkKeyword.call(this, keyword, def); + if (!def) { + (0, util_1.eachItem)(keyword, (kwd) => addRule.call(this, kwd)); + return this; + } + keywordMetaschema.call(this, def); + const definition = { + ...def, + type: (0, dataType_1.getJSONTypes)(def.type), + schemaType: (0, dataType_1.getJSONTypes)(def.schemaType) + }; + (0, util_1.eachItem)(keyword, definition.type.length === 0 ? (k) => addRule.call(this, k, definition) : (k) => definition.type.forEach((t) => addRule.call(this, k, definition, t))); + return this; + } + getKeyword(keyword) { + const rule = this.RULES.all[keyword]; + return typeof rule == "object" ? rule.definition : !!rule; + } + // Remove keyword + removeKeyword(keyword) { + const { RULES } = this; + delete RULES.keywords[keyword]; + delete RULES.all[keyword]; + for (const group2 of RULES.rules) { + const i = group2.rules.findIndex((rule) => rule.keyword === keyword); + if (i >= 0) + group2.rules.splice(i, 1); + } + return this; + } + // Add format + addFormat(name, format2) { + if (typeof format2 == "string") + format2 = new RegExp(format2); + this.formats[name] = format2; + return this; + } + errorsText(errors = this.errors, { separator: separator2 = ", ", dataVar = "data" } = {}) { + if (!errors || errors.length === 0) + return "No errors"; + return errors.map((e) => `${dataVar}${e.instancePath} ${e.message}`).reduce((text, msg) => text + separator2 + msg); + } + $dataMetaSchema(metaSchema, keywordsJsonPointers) { + const rules = this.RULES.all; + metaSchema = JSON.parse(JSON.stringify(metaSchema)); + for (const jsonPointer of keywordsJsonPointers) { + const segments = jsonPointer.split("/").slice(1); + let keywords2 = metaSchema; + for (const seg of segments) + keywords2 = keywords2[seg]; + for (const key in rules) { + const rule = rules[key]; + if (typeof rule != "object") + continue; + const { $data } = rule.definition; + const schema2 = keywords2[key]; + if ($data && schema2) + keywords2[key] = schemaOrData(schema2); + } + } + return metaSchema; + } + _removeAllSchemas(schemas, regex4) { + for (const keyRef in schemas) { + const sch = schemas[keyRef]; + if (!regex4 || regex4.test(keyRef)) { + if (typeof sch == "string") { + delete schemas[keyRef]; + } else if (sch && !sch.meta) { + this._cache.delete(sch.schema); + delete schemas[keyRef]; + } + } + } + } + _addSchema(schema2, meta3, baseId, validateSchema = this.opts.validateSchema, addSchema = this.opts.addUsedSchema) { + let id; + const { schemaId } = this.opts; + if (typeof schema2 == "object") { + id = schema2[schemaId]; + } else { + if (this.opts.jtd) + throw new Error("schema must be object"); + else if (typeof schema2 != "boolean") + throw new Error("schema must be object or boolean"); + } + let sch = this._cache.get(schema2); + if (sch !== void 0) + return sch; + baseId = (0, resolve_1.normalizeId)(id || baseId); + const localRefs = resolve_1.getSchemaRefs.call(this, schema2, baseId); + sch = new compile_1.SchemaEnv({ schema: schema2, schemaId, meta: meta3, baseId, localRefs }); + this._cache.set(sch.schema, sch); + if (addSchema && !baseId.startsWith("#")) { + if (baseId) + this._checkUnique(baseId); + this.refs[baseId] = sch; + } + if (validateSchema) + this.validateSchema(schema2, true); + return sch; + } + _checkUnique(id) { + if (this.schemas[id] || this.refs[id]) { + throw new Error(`schema with key or id "${id}" already exists`); + } + } + _compileSchemaEnv(sch) { + if (sch.meta) + this._compileMetaSchema(sch); + else + compile_1.compileSchema.call(this, sch); + if (!sch.validate) + throw new Error("ajv implementation error"); + return sch.validate; + } + _compileMetaSchema(sch) { + const currentOpts = this.opts; + this.opts = this._metaOpts; + try { + compile_1.compileSchema.call(this, sch); + } finally { + this.opts = currentOpts; + } + } + }; + Ajv2.ValidationError = validation_error_1.default; + Ajv2.MissingRefError = ref_error_1.default; + exports.default = Ajv2; + function checkOptions(checkOpts, options, msg, log2 = "error") { + for (const key in checkOpts) { + const opt = key; + if (opt in options) + this.logger[log2](`${msg}: option ${key}. ${checkOpts[opt]}`); + } + } + function getSchEnv(keyRef) { + keyRef = (0, resolve_1.normalizeId)(keyRef); + return this.schemas[keyRef] || this.refs[keyRef]; + } + function addInitialSchemas() { + const optsSchemas = this.opts.schemas; + if (!optsSchemas) + return; + if (Array.isArray(optsSchemas)) + this.addSchema(optsSchemas); + else + for (const key in optsSchemas) + this.addSchema(optsSchemas[key], key); + } + function addInitialFormats() { + for (const name in this.opts.formats) { + const format2 = this.opts.formats[name]; + if (format2) + this.addFormat(name, format2); + } + } + function addInitialKeywords(defs) { + if (Array.isArray(defs)) { + this.addVocabulary(defs); + return; + } + this.logger.warn("keywords option as map is deprecated, pass array"); + for (const keyword in defs) { + const def = defs[keyword]; + if (!def.keyword) + def.keyword = keyword; + this.addKeyword(def); + } + } + function getMetaSchemaOptions() { + const metaOpts = { ...this.opts }; + for (const opt of META_IGNORE_OPTIONS) + delete metaOpts[opt]; + return metaOpts; + } + var noLogs = { log() { + }, warn() { + }, error() { + } }; + function getLogger(logger) { + if (logger === false) + return noLogs; + if (logger === void 0) + return console; + if (logger.log && logger.warn && logger.error) + return logger; + throw new Error("logger must implement log, warn and error methods"); + } + var KEYWORD_NAME = /^[a-z_$][a-z0-9_$:-]*$/i; + function checkKeyword(keyword, def) { + const { RULES } = this; + (0, util_1.eachItem)(keyword, (kwd) => { + if (RULES.keywords[kwd]) + throw new Error(`Keyword ${kwd} is already defined`); + if (!KEYWORD_NAME.test(kwd)) + throw new Error(`Keyword ${kwd} has invalid name`); + }); + if (!def) + return; + if (def.$data && !("code" in def || "validate" in def)) { + throw new Error('$data keyword must have "code" or "validate" function'); + } + } + function addRule(keyword, definition, dataType) { + var _a2; + const post = definition === null || definition === void 0 ? void 0 : definition.post; + if (dataType && post) + throw new Error('keyword with "post" flag cannot have "type"'); + const { RULES } = this; + let ruleGroup = post ? RULES.post : RULES.rules.find(({ type: t }) => t === dataType); + if (!ruleGroup) { + ruleGroup = { type: dataType, rules: [] }; + RULES.rules.push(ruleGroup); + } + RULES.keywords[keyword] = true; + if (!definition) + return; + const rule = { + keyword, + definition: { + ...definition, + type: (0, dataType_1.getJSONTypes)(definition.type), + schemaType: (0, dataType_1.getJSONTypes)(definition.schemaType) + } + }; + if (definition.before) + addBeforeRule.call(this, ruleGroup, rule, definition.before); + else + ruleGroup.rules.push(rule); + RULES.all[keyword] = rule; + (_a2 = definition.implements) === null || _a2 === void 0 ? void 0 : _a2.forEach((kwd) => this.addKeyword(kwd)); + } + function addBeforeRule(ruleGroup, rule, before) { + const i = ruleGroup.rules.findIndex((_rule) => _rule.keyword === before); + if (i >= 0) { + ruleGroup.rules.splice(i, 0, rule); + } else { + ruleGroup.rules.push(rule); + this.logger.warn(`rule ${before} is not defined`); + } + } + function keywordMetaschema(def) { + let { metaSchema } = def; + if (metaSchema === void 0) + return; + if (def.$data && this.opts.$data) + metaSchema = schemaOrData(metaSchema); + def.validateSchema = this.compile(metaSchema, true); + } + var $dataRef = { + $ref: "https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#" + }; + function schemaOrData(schema2) { + return { anyOf: [schema2, $dataRef] }; } } }); -// node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/dotjs/custom.js -var require_custom2 = __commonJS({ - "node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/dotjs/custom.js"(exports, module) { +// ../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/core/id.js +var require_id2 = __commonJS({ + "../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/core/id.js"(exports) { "use strict"; - module.exports = function generate_custom(it, $keyword, $ruleType) { - var out = " "; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + "/" + $keyword; - var $breakOnError = !it.opts.allErrors; - var $errorKeyword; - var $data = "data" + ($dataLvl || ""); - var $valid = "valid" + $lvl; - var $errs = "errs__" + $lvl; - var $isData = it.opts.$data && $schema && $schema.$data, $schemaValue; - if ($isData) { - out += " var schema" + $lvl + " = " + it.util.getData($schema.$data, $dataLvl, it.dataPathArr) + "; "; - $schemaValue = "schema" + $lvl; - } else { - $schemaValue = $schema; + Object.defineProperty(exports, "__esModule", { value: true }); + var def = { + keyword: "id", + code() { + throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID'); } - var $rule = this, $definition = "definition" + $lvl, $rDef = $rule.definition, $closingBraces = ""; - var $compile, $inline, $macro, $ruleValidate, $validateCode; - if ($isData && $rDef.$data) { - $validateCode = "keywordValidate" + $lvl; - var $validateSchema = $rDef.validateSchema; - out += " var " + $definition + " = RULES.custom['" + $keyword + "'].definition; var " + $validateCode + " = " + $definition + ".validate;"; - } else { - $ruleValidate = it.useCustomRule($rule, $schema, it.schema, it); - if (!$ruleValidate) return; - $schemaValue = "validate.schema" + $schemaPath; - $validateCode = $ruleValidate.code; - $compile = $rDef.compile; - $inline = $rDef.inline; - $macro = $rDef.macro; - } - var $ruleErrs = $validateCode + ".errors", $i = "i" + $lvl, $ruleErr = "ruleErr" + $lvl, $asyncKeyword = $rDef.async; - if ($asyncKeyword && !it.async) throw new Error("async keyword in sync schema"); - if (!($inline || $macro)) { - out += "" + $ruleErrs + " = null;"; - } - out += "var " + $errs + " = errors;var " + $valid + ";"; - if ($isData && $rDef.$data) { - $closingBraces += "}"; - out += " if (" + $schemaValue + " === undefined) { " + $valid + " = true; } else { "; - if ($validateSchema) { - $closingBraces += "}"; - out += " " + $valid + " = " + $definition + ".validateSchema(" + $schemaValue + "); if (" + $valid + ") { "; - } - } - if ($inline) { - if ($rDef.statements) { - out += " " + $ruleValidate.validate + " "; - } else { - out += " " + $valid + " = " + $ruleValidate.validate + "; "; - } - } else if ($macro) { - var $it = it.util.copy(it); - var $closingBraces = ""; - $it.level++; - var $nextValid = "valid" + $it.level; - $it.schema = $ruleValidate.validate; - $it.schemaPath = ""; - var $wasComposite = it.compositeRule; - it.compositeRule = $it.compositeRule = true; - var $code = it.validate($it).replace(/validate\.schema/g, $validateCode); - it.compositeRule = $it.compositeRule = $wasComposite; - out += " " + $code; - } else { - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ""; - out += " " + $validateCode + ".call( "; - if (it.opts.passContext) { - out += "this"; - } else { - out += "self"; - } - if ($compile || $rDef.schema === false) { - out += " , " + $data + " "; - } else { - out += " , " + $schemaValue + " , " + $data + " , validate.schema" + it.schemaPath + " "; - } - out += " , (dataPath || '')"; - if (it.errorPath != '""') { - out += " + " + it.errorPath; - } - var $parentData = $dataLvl ? "data" + ($dataLvl - 1 || "") : "parentData", $parentDataProperty = $dataLvl ? it.dataPathArr[$dataLvl] : "parentDataProperty"; - out += " , " + $parentData + " , " + $parentDataProperty + " , rootData ) "; - var def_callRuleValidate = out; - out = $$outStack.pop(); - if ($rDef.errors === false) { - out += " " + $valid + " = "; - if ($asyncKeyword) { - out += "await "; - } - out += "" + def_callRuleValidate + "; "; - } else { - if ($asyncKeyword) { - $ruleErrs = "customErrors" + $lvl; - out += " var " + $ruleErrs + " = null; try { " + $valid + " = await " + def_callRuleValidate + "; } catch (e) { " + $valid + " = false; if (e instanceof ValidationError) " + $ruleErrs + " = e.errors; else throw e; } "; - } else { - out += " " + $ruleErrs + " = null; " + $valid + " = " + def_callRuleValidate + "; "; - } - } - } - if ($rDef.modifying) { - out += " if (" + $parentData + ") " + $data + " = " + $parentData + "[" + $parentDataProperty + "];"; - } - out += "" + $closingBraces; - if ($rDef.valid) { - if ($breakOnError) { - out += " if (true) { "; - } - } else { - out += " if ( "; - if ($rDef.valid === void 0) { - out += " !"; - if ($macro) { - out += "" + $nextValid; - } else { - out += "" + $valid; - } - } else { - out += " " + !$rDef.valid + " "; - } - out += ") { "; - $errorKeyword = $rule.keyword; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ""; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ""; - if (it.createErrors !== false) { - out += " { keyword: '" + ($errorKeyword || "custom") + "' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { keyword: '" + $rule.keyword + "' } "; - if (it.opts.messages !== false) { - out += ` , message: 'should pass "` + $rule.keyword + `" keyword validation' `; - } - if (it.opts.verbose) { - out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; - } - out += " } "; - } else { - out += " {} "; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - if (it.async) { - out += " throw new ValidationError([" + __err + "]); "; - } else { - out += " validate.errors = [" + __err + "]; return false; "; - } - } else { - out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; - } - var def_customError = out; - out = $$outStack.pop(); - if ($inline) { - if ($rDef.errors) { - if ($rDef.errors != "full") { - out += " for (var " + $i + "=" + $errs + "; " + $i + " { + gen.code((0, codegen_1._)`await ${(0, code_1.callValidateCode)(cxt, v, passCxt)}`); + addEvaluatedFrom(v); + if (!allErrors) + gen.assign(valid, true); + }, (e) => { + gen.if((0, codegen_1._)`!(${e} instanceof ${it.ValidationError})`, () => gen.throw(e)); + addErrorsFrom(e); + if (!allErrors) + gen.assign(valid, false); + }); + cxt.ok(valid); + } + function callSyncRef() { + cxt.result((0, code_1.callValidateCode)(cxt, v, passCxt), () => addEvaluatedFrom(v), () => addErrorsFrom(v)); + } + function addErrorsFrom(source) { + const errs = (0, codegen_1._)`${source}.errors`; + gen.assign(names_1.default.vErrors, (0, codegen_1._)`${names_1.default.vErrors} === null ? ${errs} : ${names_1.default.vErrors}.concat(${errs})`); + gen.assign(names_1.default.errors, (0, codegen_1._)`${names_1.default.vErrors}.length`); + } + function addEvaluatedFrom(source) { + var _a2; + if (!it.opts.unevaluated) + return; + const schEvaluated = (_a2 = sch === null || sch === void 0 ? void 0 : sch.validate) === null || _a2 === void 0 ? void 0 : _a2.evaluated; + if (it.props !== true) { + if (schEvaluated && !schEvaluated.dynamicProps) { + if (schEvaluated.props !== void 0) { + it.props = util_1.mergeEvaluated.props(gen, schEvaluated.props, it.props); + } + } else { + const props = gen.var("props", (0, codegen_1._)`${source}.evaluated.props`); + it.props = util_1.mergeEvaluated.props(gen, props, it.props, codegen_1.Name); + } + } + if (it.items !== true) { + if (schEvaluated && !schEvaluated.dynamicItems) { + if (schEvaluated.items !== void 0) { + it.items = util_1.mergeEvaluated.items(gen, schEvaluated.items, it.items); + } + } else { + const items = gen.var("items", (0, codegen_1._)`${source}.evaluated.items`); + it.items = util_1.mergeEvaluated.items(gen, items, it.items, codegen_1.Name); + } + } + } + } + exports.callRef = callRef; + exports.default = def; + } +}); + +// ../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/core/index.js +var require_core4 = __commonJS({ + "../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/core/index.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var id_1 = require_id2(); + var ref_1 = require_ref2(); + var core4 = [ + "$schema", + "$id", + "$defs", + "$vocabulary", + { keyword: "$comment" }, + "definitions", + id_1.default, + ref_1.default + ]; + exports.default = core4; + } +}); + +// ../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/validation/limitNumber.js +var require_limitNumber2 = __commonJS({ + "../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/validation/limitNumber.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var codegen_1 = require_codegen2(); + var ops = codegen_1.operators; + var KWDs = { + maximum: { okStr: "<=", ok: ops.LTE, fail: ops.GT }, + minimum: { okStr: ">=", ok: ops.GTE, fail: ops.LT }, + exclusiveMaximum: { okStr: "<", ok: ops.LT, fail: ops.GTE }, + exclusiveMinimum: { okStr: ">", ok: ops.GT, fail: ops.LTE } + }; + var error50 = { + message: ({ keyword, schemaCode }) => (0, codegen_1.str)`must be ${KWDs[keyword].okStr} ${schemaCode}`, + params: ({ keyword, schemaCode }) => (0, codegen_1._)`{comparison: ${KWDs[keyword].okStr}, limit: ${schemaCode}}` + }; + var def = { + keyword: Object.keys(KWDs), + type: "number", + schemaType: "number", + $data: true, + error: error50, + code(cxt) { + const { keyword, data, schemaCode } = cxt; + cxt.fail$data((0, codegen_1._)`${data} ${KWDs[keyword].fail} ${schemaCode} || isNaN(${data})`); + } + }; + exports.default = def; + } +}); + +// ../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/validation/multipleOf.js +var require_multipleOf2 = __commonJS({ + "../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/validation/multipleOf.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var codegen_1 = require_codegen2(); + var error50 = { + message: ({ schemaCode }) => (0, codegen_1.str)`must be multiple of ${schemaCode}`, + params: ({ schemaCode }) => (0, codegen_1._)`{multipleOf: ${schemaCode}}` + }; + var def = { + keyword: "multipleOf", + type: "number", + schemaType: "number", + $data: true, + error: error50, + code(cxt) { + const { gen, data, schemaCode, it } = cxt; + const prec = it.opts.multipleOfPrecision; + const res = gen.let("res"); + const invalid = prec ? (0, codegen_1._)`Math.abs(Math.round(${res}) - ${res}) > 1e-${prec}` : (0, codegen_1._)`${res} !== parseInt(${res})`; + cxt.fail$data((0, codegen_1._)`(${schemaCode} === 0 || (${res} = ${data}/${schemaCode}, ${invalid}))`); + } + }; + exports.default = def; + } +}); + +// ../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/runtime/ucs2length.js +var require_ucs2length2 = __commonJS({ + "../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/runtime/ucs2length.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + function ucs2length(str) { + const len = str.length; + let length = 0; + let pos = 0; + let value2; + while (pos < len) { + length++; + value2 = str.charCodeAt(pos++); + if (value2 >= 55296 && value2 <= 56319 && pos < len) { + value2 = str.charCodeAt(pos); + if ((value2 & 64512) === 56320) + pos++; + } + } + return length; + } + exports.default = ucs2length; + ucs2length.code = 'require("ajv/dist/runtime/ucs2length").default'; + } +}); + +// ../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/validation/limitLength.js +var require_limitLength2 = __commonJS({ + "../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/validation/limitLength.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var codegen_1 = require_codegen2(); + var util_1 = require_util9(); + var ucs2length_1 = require_ucs2length2(); + var error50 = { + message({ keyword, schemaCode }) { + const comp = keyword === "maxLength" ? "more" : "fewer"; + return (0, codegen_1.str)`must NOT have ${comp} than ${schemaCode} characters`; + }, + params: ({ schemaCode }) => (0, codegen_1._)`{limit: ${schemaCode}}` + }; + var def = { + keyword: ["maxLength", "minLength"], + type: "string", + schemaType: "number", + $data: true, + error: error50, + code(cxt) { + const { keyword, data, schemaCode, it } = cxt; + const op = keyword === "maxLength" ? codegen_1.operators.GT : codegen_1.operators.LT; + const len = it.opts.unicode === false ? (0, codegen_1._)`${data}.length` : (0, codegen_1._)`${(0, util_1.useFunc)(cxt.gen, ucs2length_1.default)}(${data})`; + cxt.fail$data((0, codegen_1._)`${len} ${op} ${schemaCode}`); + } + }; + exports.default = def; + } +}); + +// ../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/validation/pattern.js +var require_pattern2 = __commonJS({ + "../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/validation/pattern.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var code_1 = require_code4(); + var codegen_1 = require_codegen2(); + var error50 = { + message: ({ schemaCode }) => (0, codegen_1.str)`must match pattern "${schemaCode}"`, + params: ({ schemaCode }) => (0, codegen_1._)`{pattern: ${schemaCode}}` + }; + var def = { + keyword: "pattern", + type: "string", + schemaType: "string", + $data: true, + error: error50, + code(cxt) { + const { data, $data, schema: schema2, schemaCode, it } = cxt; + const u = it.opts.unicodeRegExp ? "u" : ""; + const regExp = $data ? (0, codegen_1._)`(new RegExp(${schemaCode}, ${u}))` : (0, code_1.usePattern)(cxt, schema2); + cxt.fail$data((0, codegen_1._)`!${regExp}.test(${data})`); + } + }; + exports.default = def; + } +}); + +// ../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/validation/limitProperties.js +var require_limitProperties2 = __commonJS({ + "../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/validation/limitProperties.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var codegen_1 = require_codegen2(); + var error50 = { + message({ keyword, schemaCode }) { + const comp = keyword === "maxProperties" ? "more" : "fewer"; + return (0, codegen_1.str)`must NOT have ${comp} than ${schemaCode} properties`; + }, + params: ({ schemaCode }) => (0, codegen_1._)`{limit: ${schemaCode}}` + }; + var def = { + keyword: ["maxProperties", "minProperties"], + type: "object", + schemaType: "number", + $data: true, + error: error50, + code(cxt) { + const { keyword, data, schemaCode } = cxt; + const op = keyword === "maxProperties" ? codegen_1.operators.GT : codegen_1.operators.LT; + cxt.fail$data((0, codegen_1._)`Object.keys(${data}).length ${op} ${schemaCode}`); + } + }; + exports.default = def; + } +}); + +// ../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/validation/required.js +var require_required2 = __commonJS({ + "../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/validation/required.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var code_1 = require_code4(); + var codegen_1 = require_codegen2(); + var util_1 = require_util9(); + var error50 = { + message: ({ params: { missingProperty } }) => (0, codegen_1.str)`must have required property '${missingProperty}'`, + params: ({ params: { missingProperty } }) => (0, codegen_1._)`{missingProperty: ${missingProperty}}` + }; + var def = { + keyword: "required", + type: "object", + schemaType: "array", + $data: true, + error: error50, + code(cxt) { + const { gen, schema: schema2, schemaCode, data, $data, it } = cxt; + const { opts } = it; + if (!$data && schema2.length === 0) + return; + const useLoop = schema2.length >= opts.loopRequired; + if (it.allErrors) + allErrorsMode(); + else + exitOnErrorMode(); + if (opts.strictRequired) { + const props = cxt.parentSchema.properties; + const { definedProperties } = cxt.it; + for (const requiredKey of schema2) { + if ((props === null || props === void 0 ? void 0 : props[requiredKey]) === void 0 && !definedProperties.has(requiredKey)) { + const schemaPath = it.schemaEnv.baseId + it.errSchemaPath; + const msg = `required property "${requiredKey}" is not defined at "${schemaPath}" (strictRequired)`; + (0, util_1.checkStrictMode)(it, msg, it.opts.strictRequired); + } + } + } + function allErrorsMode() { + if (useLoop || $data) { + cxt.block$data(codegen_1.nil, loopAllRequired); + } else { + for (const prop of schema2) { + (0, code_1.checkReportMissingProp)(cxt, prop); + } + } + } + function exitOnErrorMode() { + const missing = gen.let("missing"); + if (useLoop || $data) { + const valid = gen.let("valid", true); + cxt.block$data(valid, () => loopUntilMissing(missing, valid)); + cxt.ok(valid); + } else { + gen.if((0, code_1.checkMissingProp)(cxt, schema2, missing)); + (0, code_1.reportMissingProp)(cxt, missing); + gen.else(); + } + } + function loopAllRequired() { + gen.forOf("prop", schemaCode, (prop) => { + cxt.setParams({ missingProperty: prop }); + gen.if((0, code_1.noPropertyInData)(gen, data, prop, opts.ownProperties), () => cxt.error()); + }); + } + function loopUntilMissing(missing, valid) { + cxt.setParams({ missingProperty: missing }); + gen.forOf(missing, schemaCode, () => { + gen.assign(valid, (0, code_1.propertyInData)(gen, data, missing, opts.ownProperties)); + gen.if((0, codegen_1.not)(valid), () => { + cxt.error(); + gen.break(); + }); + }, codegen_1.nil); + } + } + }; + exports.default = def; + } +}); + +// ../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/validation/limitItems.js +var require_limitItems2 = __commonJS({ + "../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/validation/limitItems.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var codegen_1 = require_codegen2(); + var error50 = { + message({ keyword, schemaCode }) { + const comp = keyword === "maxItems" ? "more" : "fewer"; + return (0, codegen_1.str)`must NOT have ${comp} than ${schemaCode} items`; + }, + params: ({ schemaCode }) => (0, codegen_1._)`{limit: ${schemaCode}}` + }; + var def = { + keyword: ["maxItems", "minItems"], + type: "array", + schemaType: "number", + $data: true, + error: error50, + code(cxt) { + const { keyword, data, schemaCode } = cxt; + const op = keyword === "maxItems" ? codegen_1.operators.GT : codegen_1.operators.LT; + cxt.fail$data((0, codegen_1._)`${data}.length ${op} ${schemaCode}`); + } + }; + exports.default = def; + } +}); + +// ../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js +var require_uniqueItems2 = __commonJS({ + "../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var dataType_1 = require_dataType2(); + var codegen_1 = require_codegen2(); + var util_1 = require_util9(); + var equal_1 = require_equal2(); + var error50 = { + message: ({ params: { i, j } }) => (0, codegen_1.str)`must NOT have duplicate items (items ## ${j} and ${i} are identical)`, + params: ({ params: { i, j } }) => (0, codegen_1._)`{i: ${i}, j: ${j}}` + }; + var def = { + keyword: "uniqueItems", + type: "array", + schemaType: "boolean", + $data: true, + error: error50, + code(cxt) { + const { gen, data, $data, schema: schema2, parentSchema, schemaCode, it } = cxt; + if (!$data && !schema2) + return; + const valid = gen.let("valid"); + const itemTypes = parentSchema.items ? (0, dataType_1.getSchemaTypes)(parentSchema.items) : []; + cxt.block$data(valid, validateUniqueItems, (0, codegen_1._)`${schemaCode} === false`); + cxt.ok(valid); + function validateUniqueItems() { + const i = gen.let("i", (0, codegen_1._)`${data}.length`); + const j = gen.let("j"); + cxt.setParams({ i, j }); + gen.assign(valid, true); + gen.if((0, codegen_1._)`${i} > 1`, () => (canOptimize() ? loopN : loopN2)(i, j)); + } + function canOptimize() { + return itemTypes.length > 0 && !itemTypes.some((t) => t === "object" || t === "array"); + } + function loopN(i, j) { + const item = gen.name("item"); + const wrongType = (0, dataType_1.checkDataTypes)(itemTypes, item, it.opts.strictNumbers, dataType_1.DataType.Wrong); + const indices = gen.const("indices", (0, codegen_1._)`{}`); + gen.for((0, codegen_1._)`;${i}--;`, () => { + gen.let(item, (0, codegen_1._)`${data}[${i}]`); + gen.if(wrongType, (0, codegen_1._)`continue`); + if (itemTypes.length > 1) + gen.if((0, codegen_1._)`typeof ${item} == "string"`, (0, codegen_1._)`${item} += "_"`); + gen.if((0, codegen_1._)`typeof ${indices}[${item}] == "number"`, () => { + gen.assign(j, (0, codegen_1._)`${indices}[${item}]`); + cxt.error(); + gen.assign(valid, false).break(); + }).code((0, codegen_1._)`${indices}[${item}] = ${i}`); + }); + } + function loopN2(i, j) { + const eql = (0, util_1.useFunc)(gen, equal_1.default); + const outer = gen.name("outer"); + gen.label(outer).for((0, codegen_1._)`;${i}--;`, () => gen.for((0, codegen_1._)`${j} = ${i}; ${j}--;`, () => gen.if((0, codegen_1._)`${eql}(${data}[${i}], ${data}[${j}])`, () => { + cxt.error(); + gen.assign(valid, false).break(outer); + }))); + } + } + }; + exports.default = def; + } +}); + +// ../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/validation/const.js +var require_const2 = __commonJS({ + "../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/validation/const.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var codegen_1 = require_codegen2(); + var util_1 = require_util9(); + var equal_1 = require_equal2(); + var error50 = { + message: "must be equal to constant", + params: ({ schemaCode }) => (0, codegen_1._)`{allowedValue: ${schemaCode}}` + }; + var def = { + keyword: "const", + $data: true, + error: error50, + code(cxt) { + const { gen, data, $data, schemaCode, schema: schema2 } = cxt; + if ($data || schema2 && typeof schema2 == "object") { + cxt.fail$data((0, codegen_1._)`!${(0, util_1.useFunc)(gen, equal_1.default)}(${data}, ${schemaCode})`); + } else { + cxt.fail((0, codegen_1._)`${schema2} !== ${data}`); + } + } + }; + exports.default = def; + } +}); + +// ../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/validation/enum.js +var require_enum2 = __commonJS({ + "../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/validation/enum.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var codegen_1 = require_codegen2(); + var util_1 = require_util9(); + var equal_1 = require_equal2(); + var error50 = { + message: "must be equal to one of the allowed values", + params: ({ schemaCode }) => (0, codegen_1._)`{allowedValues: ${schemaCode}}` + }; + var def = { + keyword: "enum", + schemaType: "array", + $data: true, + error: error50, + code(cxt) { + const { gen, data, $data, schema: schema2, schemaCode, it } = cxt; + if (!$data && schema2.length === 0) + throw new Error("enum must have non-empty array"); + const useLoop = schema2.length >= it.opts.loopEnum; + let eql; + const getEql = () => eql !== null && eql !== void 0 ? eql : eql = (0, util_1.useFunc)(gen, equal_1.default); + let valid; + if (useLoop || $data) { + valid = gen.let("valid"); + cxt.block$data(valid, loopEnum); + } else { + if (!Array.isArray(schema2)) + throw new Error("ajv implementation error"); + const vSchema = gen.const("vSchema", schemaCode); + valid = (0, codegen_1.or)(...schema2.map((_x, i) => equalCode(vSchema, i))); + } + cxt.pass(valid); + function loopEnum() { + gen.assign(valid, false); + gen.forOf("v", schemaCode, (v) => gen.if((0, codegen_1._)`${getEql()}(${data}, ${v})`, () => gen.assign(valid, true).break())); + } + function equalCode(vSchema, i) { + const sch = schema2[i]; + return typeof sch === "object" && sch !== null ? (0, codegen_1._)`${getEql()}(${data}, ${vSchema}[${i}])` : (0, codegen_1._)`${data} === ${sch}`; + } + } + }; + exports.default = def; + } +}); + +// ../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/validation/index.js +var require_validation2 = __commonJS({ + "../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/validation/index.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var limitNumber_1 = require_limitNumber2(); + var multipleOf_1 = require_multipleOf2(); + var limitLength_1 = require_limitLength2(); + var pattern_1 = require_pattern2(); + var limitProperties_1 = require_limitProperties2(); + var required_1 = require_required2(); + var limitItems_1 = require_limitItems2(); + var uniqueItems_1 = require_uniqueItems2(); + var const_1 = require_const2(); + var enum_1 = require_enum2(); + var validation = [ + // number + limitNumber_1.default, + multipleOf_1.default, + // string + limitLength_1.default, + pattern_1.default, + // object + limitProperties_1.default, + required_1.default, + // array + limitItems_1.default, + uniqueItems_1.default, + // any + { keyword: "type", schemaType: ["string", "array"] }, + { keyword: "nullable", schemaType: "boolean" }, + const_1.default, + enum_1.default + ]; + exports.default = validation; + } +}); + +// ../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js +var require_additionalItems2 = __commonJS({ + "../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.validateAdditionalItems = void 0; + var codegen_1 = require_codegen2(); + var util_1 = require_util9(); + var error50 = { + message: ({ params: { len } }) => (0, codegen_1.str)`must NOT have more than ${len} items`, + params: ({ params: { len } }) => (0, codegen_1._)`{limit: ${len}}` + }; + var def = { + keyword: "additionalItems", + type: "array", + schemaType: ["boolean", "object"], + before: "uniqueItems", + error: error50, + code(cxt) { + const { parentSchema, it } = cxt; + const { items } = parentSchema; + if (!Array.isArray(items)) { + (0, util_1.checkStrictMode)(it, '"additionalItems" is ignored when "items" is not an array of schemas'); + return; + } + validateAdditionalItems(cxt, items); + } + }; + function validateAdditionalItems(cxt, items) { + const { gen, schema: schema2, data, keyword, it } = cxt; + it.items = true; + const len = gen.const("len", (0, codegen_1._)`${data}.length`); + if (schema2 === false) { + cxt.setParams({ len: items.length }); + cxt.pass((0, codegen_1._)`${len} <= ${items.length}`); + } else if (typeof schema2 == "object" && !(0, util_1.alwaysValidSchema)(it, schema2)) { + const valid = gen.var("valid", (0, codegen_1._)`${len} <= ${items.length}`); + gen.if((0, codegen_1.not)(valid), () => validateItems(valid)); + cxt.ok(valid); + } + function validateItems(valid) { + gen.forRange("i", items.length, len, (i) => { + cxt.subschema({ keyword, dataProp: i, dataPropType: util_1.Type.Num }, valid); + if (!it.allErrors) + gen.if((0, codegen_1.not)(valid), () => gen.break()); + }); + } + } + exports.validateAdditionalItems = validateAdditionalItems; + exports.default = def; + } +}); + +// ../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/applicator/items.js +var require_items2 = __commonJS({ + "../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/applicator/items.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.validateTuple = void 0; + var codegen_1 = require_codegen2(); + var util_1 = require_util9(); + var code_1 = require_code4(); + var def = { + keyword: "items", + type: "array", + schemaType: ["object", "array", "boolean"], + before: "uniqueItems", + code(cxt) { + const { schema: schema2, it } = cxt; + if (Array.isArray(schema2)) + return validateTuple(cxt, "additionalItems", schema2); + it.items = true; + if ((0, util_1.alwaysValidSchema)(it, schema2)) + return; + cxt.ok((0, code_1.validateArray)(cxt)); + } + }; + function validateTuple(cxt, extraItems, schArr = cxt.schema) { + const { gen, parentSchema, data, keyword, it } = cxt; + checkStrictTuple(parentSchema); + if (it.opts.unevaluated && schArr.length && it.items !== true) { + it.items = util_1.mergeEvaluated.items(gen, schArr.length, it.items); + } + const valid = gen.name("valid"); + const len = gen.const("len", (0, codegen_1._)`${data}.length`); + schArr.forEach((sch, i) => { + if ((0, util_1.alwaysValidSchema)(it, sch)) + return; + gen.if((0, codegen_1._)`${len} > ${i}`, () => cxt.subschema({ + keyword, + schemaProp: i, + dataProp: i + }, valid)); + cxt.ok(valid); + }); + function checkStrictTuple(sch) { + const { opts, errSchemaPath } = it; + const l = schArr.length; + const fullTuple = l === sch.minItems && (l === sch.maxItems || sch[extraItems] === false); + if (opts.strictTuples && !fullTuple) { + const msg = `"${keyword}" is ${l}-tuple, but minItems or maxItems/${extraItems} are not specified or different at path "${errSchemaPath}"`; + (0, util_1.checkStrictMode)(it, msg, opts.strictTuples); + } + } + } + exports.validateTuple = validateTuple; + exports.default = def; + } +}); + +// ../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/applicator/prefixItems.js +var require_prefixItems2 = __commonJS({ + "../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/applicator/prefixItems.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var items_1 = require_items2(); + var def = { + keyword: "prefixItems", + type: "array", + schemaType: ["array"], + before: "uniqueItems", + code: (cxt) => (0, items_1.validateTuple)(cxt, "items") + }; + exports.default = def; + } +}); + +// ../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/applicator/items2020.js +var require_items20202 = __commonJS({ + "../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/applicator/items2020.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var codegen_1 = require_codegen2(); + var util_1 = require_util9(); + var code_1 = require_code4(); + var additionalItems_1 = require_additionalItems2(); + var error50 = { + message: ({ params: { len } }) => (0, codegen_1.str)`must NOT have more than ${len} items`, + params: ({ params: { len } }) => (0, codegen_1._)`{limit: ${len}}` + }; + var def = { + keyword: "items", + type: "array", + schemaType: ["object", "boolean"], + before: "uniqueItems", + error: error50, + code(cxt) { + const { schema: schema2, parentSchema, it } = cxt; + const { prefixItems } = parentSchema; + it.items = true; + if ((0, util_1.alwaysValidSchema)(it, schema2)) + return; + if (prefixItems) + (0, additionalItems_1.validateAdditionalItems)(cxt, prefixItems); + else + cxt.ok((0, code_1.validateArray)(cxt)); + } + }; + exports.default = def; + } +}); + +// ../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/applicator/contains.js +var require_contains2 = __commonJS({ + "../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/applicator/contains.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var codegen_1 = require_codegen2(); + var util_1 = require_util9(); + var error50 = { + message: ({ params: { min, max } }) => max === void 0 ? (0, codegen_1.str)`must contain at least ${min} valid item(s)` : (0, codegen_1.str)`must contain at least ${min} and no more than ${max} valid item(s)`, + params: ({ params: { min, max } }) => max === void 0 ? (0, codegen_1._)`{minContains: ${min}}` : (0, codegen_1._)`{minContains: ${min}, maxContains: ${max}}` + }; + var def = { + keyword: "contains", + type: "array", + schemaType: ["object", "boolean"], + before: "uniqueItems", + trackErrors: true, + error: error50, + code(cxt) { + const { gen, schema: schema2, parentSchema, data, it } = cxt; + let min; + let max; + const { minContains, maxContains } = parentSchema; + if (it.opts.next) { + min = minContains === void 0 ? 1 : minContains; + max = maxContains; + } else { + min = 1; + } + const len = gen.const("len", (0, codegen_1._)`${data}.length`); + cxt.setParams({ min, max }); + if (max === void 0 && min === 0) { + (0, util_1.checkStrictMode)(it, `"minContains" == 0 without "maxContains": "contains" keyword ignored`); + return; + } + if (max !== void 0 && min > max) { + (0, util_1.checkStrictMode)(it, `"minContains" > "maxContains" is always invalid`); + cxt.fail(); + return; + } + if ((0, util_1.alwaysValidSchema)(it, schema2)) { + let cond = (0, codegen_1._)`${len} >= ${min}`; + if (max !== void 0) + cond = (0, codegen_1._)`${cond} && ${len} <= ${max}`; + cxt.pass(cond); + return; + } + it.items = true; + const valid = gen.name("valid"); + if (max === void 0 && min === 1) { + validateItems(valid, () => gen.if(valid, () => gen.break())); + } else if (min === 0) { + gen.let(valid, true); + if (max !== void 0) + gen.if((0, codegen_1._)`${data}.length > 0`, validateItemsWithCount); + } else { + gen.let(valid, false); + validateItemsWithCount(); + } + cxt.result(valid, () => cxt.reset()); + function validateItemsWithCount() { + const schValid = gen.name("_valid"); + const count = gen.let("count", 0); + validateItems(schValid, () => gen.if(schValid, () => checkLimits(count))); + } + function validateItems(_valid, block) { + gen.forRange("i", 0, len, (i) => { + cxt.subschema({ + keyword: "contains", + dataProp: i, + dataPropType: util_1.Type.Num, + compositeRule: true + }, _valid); + block(); + }); + } + function checkLimits(count) { + gen.code((0, codegen_1._)`${count}++`); + if (max === void 0) { + gen.if((0, codegen_1._)`${count} >= ${min}`, () => gen.assign(valid, true).break()); + } else { + gen.if((0, codegen_1._)`${count} > ${max}`, () => gen.assign(valid, false).break()); + if (min === 1) + gen.assign(valid, true); + else + gen.if((0, codegen_1._)`${count} >= ${min}`, () => gen.assign(valid, true)); + } + } + } + }; + exports.default = def; + } +}); + +// ../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/applicator/dependencies.js +var require_dependencies2 = __commonJS({ + "../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/applicator/dependencies.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.validateSchemaDeps = exports.validatePropertyDeps = exports.error = void 0; + var codegen_1 = require_codegen2(); + var util_1 = require_util9(); + var code_1 = require_code4(); + exports.error = { + message: ({ params: { property, depsCount, deps } }) => { + const property_ies = depsCount === 1 ? "property" : "properties"; + return (0, codegen_1.str)`must have ${property_ies} ${deps} when property ${property} is present`; + }, + params: ({ params: { property, depsCount, deps, missingProperty } }) => (0, codegen_1._)`{property: ${property}, + missingProperty: ${missingProperty}, + depsCount: ${depsCount}, + deps: ${deps}}` + // TODO change to reference + }; + var def = { + keyword: "dependencies", + type: "object", + schemaType: "object", + error: exports.error, + code(cxt) { + const [propDeps, schDeps] = splitDependencies(cxt); + validatePropertyDeps(cxt, propDeps); + validateSchemaDeps(cxt, schDeps); + } + }; + function splitDependencies({ schema: schema2 }) { + const propertyDeps = {}; + const schemaDeps = {}; + for (const key in schema2) { + if (key === "__proto__") + continue; + const deps = Array.isArray(schema2[key]) ? propertyDeps : schemaDeps; + deps[key] = schema2[key]; + } + return [propertyDeps, schemaDeps]; + } + function validatePropertyDeps(cxt, propertyDeps = cxt.schema) { + const { gen, data, it } = cxt; + if (Object.keys(propertyDeps).length === 0) + return; + const missing = gen.let("missing"); + for (const prop in propertyDeps) { + const deps = propertyDeps[prop]; + if (deps.length === 0) + continue; + const hasProperty = (0, code_1.propertyInData)(gen, data, prop, it.opts.ownProperties); + cxt.setParams({ + property: prop, + depsCount: deps.length, + deps: deps.join(", ") + }); + if (it.allErrors) { + gen.if(hasProperty, () => { + for (const depProp of deps) { + (0, code_1.checkReportMissingProp)(cxt, depProp); + } + }); + } else { + gen.if((0, codegen_1._)`${hasProperty} && (${(0, code_1.checkMissingProp)(cxt, deps, missing)})`); + (0, code_1.reportMissingProp)(cxt, missing); + gen.else(); + } + } + } + exports.validatePropertyDeps = validatePropertyDeps; + function validateSchemaDeps(cxt, schemaDeps = cxt.schema) { + const { gen, data, keyword, it } = cxt; + const valid = gen.name("valid"); + for (const prop in schemaDeps) { + if ((0, util_1.alwaysValidSchema)(it, schemaDeps[prop])) + continue; + gen.if( + (0, code_1.propertyInData)(gen, data, prop, it.opts.ownProperties), + () => { + const schCxt = cxt.subschema({ keyword, schemaProp: prop }, valid); + cxt.mergeValidEvaluated(schCxt, valid); + }, + () => gen.var(valid, true) + // TODO var + ); + cxt.ok(valid); + } + } + exports.validateSchemaDeps = validateSchemaDeps; + exports.default = def; + } +}); + +// ../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js +var require_propertyNames2 = __commonJS({ + "../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var codegen_1 = require_codegen2(); + var util_1 = require_util9(); + var error50 = { + message: "property name must be valid", + params: ({ params }) => (0, codegen_1._)`{propertyName: ${params.propertyName}}` + }; + var def = { + keyword: "propertyNames", + type: "object", + schemaType: ["object", "boolean"], + error: error50, + code(cxt) { + const { gen, schema: schema2, data, it } = cxt; + if ((0, util_1.alwaysValidSchema)(it, schema2)) + return; + const valid = gen.name("valid"); + gen.forIn("key", data, (key) => { + cxt.setParams({ propertyName: key }); + cxt.subschema({ + keyword: "propertyNames", + data: key, + dataTypes: ["string"], + propertyName: key, + compositeRule: true + }, valid); + gen.if((0, codegen_1.not)(valid), () => { + cxt.error(true); + if (!it.allErrors) + gen.break(); + }); + }); + cxt.ok(valid); + } + }; + exports.default = def; + } +}); + +// ../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js +var require_additionalProperties2 = __commonJS({ + "../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var code_1 = require_code4(); + var codegen_1 = require_codegen2(); + var names_1 = require_names2(); + var util_1 = require_util9(); + var error50 = { + message: "must NOT have additional properties", + params: ({ params }) => (0, codegen_1._)`{additionalProperty: ${params.additionalProperty}}` + }; + var def = { + keyword: "additionalProperties", + type: ["object"], + schemaType: ["boolean", "object"], + allowUndefined: true, + trackErrors: true, + error: error50, + code(cxt) { + const { gen, schema: schema2, parentSchema, data, errsCount, it } = cxt; + if (!errsCount) + throw new Error("ajv implementation error"); + const { allErrors, opts } = it; + it.props = true; + if (opts.removeAdditional !== "all" && (0, util_1.alwaysValidSchema)(it, schema2)) + return; + const props = (0, code_1.allSchemaProperties)(parentSchema.properties); + const patProps = (0, code_1.allSchemaProperties)(parentSchema.patternProperties); + checkAdditionalProperties(); + cxt.ok((0, codegen_1._)`${errsCount} === ${names_1.default.errors}`); + function checkAdditionalProperties() { + gen.forIn("key", data, (key) => { + if (!props.length && !patProps.length) + additionalPropertyCode(key); + else + gen.if(isAdditional(key), () => additionalPropertyCode(key)); + }); + } + function isAdditional(key) { + let definedProp; + if (props.length > 8) { + const propsSchema = (0, util_1.schemaRefOrVal)(it, parentSchema.properties, "properties"); + definedProp = (0, code_1.isOwnProperty)(gen, propsSchema, key); + } else if (props.length) { + definedProp = (0, codegen_1.or)(...props.map((p) => (0, codegen_1._)`${key} === ${p}`)); + } else { + definedProp = codegen_1.nil; + } + if (patProps.length) { + definedProp = (0, codegen_1.or)(definedProp, ...patProps.map((p) => (0, codegen_1._)`${(0, code_1.usePattern)(cxt, p)}.test(${key})`)); + } + return (0, codegen_1.not)(definedProp); + } + function deleteAdditional(key) { + gen.code((0, codegen_1._)`delete ${data}[${key}]`); + } + function additionalPropertyCode(key) { + if (opts.removeAdditional === "all" || opts.removeAdditional && schema2 === false) { + deleteAdditional(key); + return; + } + if (schema2 === false) { + cxt.setParams({ additionalProperty: key }); + cxt.error(); + if (!allErrors) + gen.break(); + return; + } + if (typeof schema2 == "object" && !(0, util_1.alwaysValidSchema)(it, schema2)) { + const valid = gen.name("valid"); + if (opts.removeAdditional === "failing") { + applyAdditionalSchema(key, valid, false); + gen.if((0, codegen_1.not)(valid), () => { + cxt.reset(); + deleteAdditional(key); + }); + } else { + applyAdditionalSchema(key, valid); + if (!allErrors) + gen.if((0, codegen_1.not)(valid), () => gen.break()); + } + } + } + function applyAdditionalSchema(key, valid, errors) { + const subschema = { + keyword: "additionalProperties", + dataProp: key, + dataPropType: util_1.Type.Str + }; + if (errors === false) { + Object.assign(subschema, { + compositeRule: true, + createErrors: false, + allErrors: false + }); + } + cxt.subschema(subschema, valid); + } + } + }; + exports.default = def; + } +}); + +// ../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/applicator/properties.js +var require_properties2 = __commonJS({ + "../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/applicator/properties.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var validate_1 = require_validate2(); + var code_1 = require_code4(); + var util_1 = require_util9(); + var additionalProperties_1 = require_additionalProperties2(); + var def = { + keyword: "properties", + type: "object", + schemaType: "object", + code(cxt) { + const { gen, schema: schema2, parentSchema, data, it } = cxt; + if (it.opts.removeAdditional === "all" && parentSchema.additionalProperties === void 0) { + additionalProperties_1.default.code(new validate_1.KeywordCxt(it, additionalProperties_1.default, "additionalProperties")); + } + const allProps = (0, code_1.allSchemaProperties)(schema2); + for (const prop of allProps) { + it.definedProperties.add(prop); + } + if (it.opts.unevaluated && allProps.length && it.props !== true) { + it.props = util_1.mergeEvaluated.props(gen, (0, util_1.toHash)(allProps), it.props); + } + const properties = allProps.filter((p) => !(0, util_1.alwaysValidSchema)(it, schema2[p])); + if (properties.length === 0) + return; + const valid = gen.name("valid"); + for (const prop of properties) { + if (hasDefault(prop)) { + applyPropertySchema(prop); + } else { + gen.if((0, code_1.propertyInData)(gen, data, prop, it.opts.ownProperties)); + applyPropertySchema(prop); + if (!it.allErrors) + gen.else().var(valid, true); + gen.endIf(); + } + cxt.it.definedProperties.add(prop); + cxt.ok(valid); + } + function hasDefault(prop) { + return it.opts.useDefaults && !it.compositeRule && schema2[prop].default !== void 0; + } + function applyPropertySchema(prop) { + cxt.subschema({ + keyword: "properties", + schemaProp: prop, + dataProp: prop + }, valid); + } + } + }; + exports.default = def; + } +}); + +// ../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js +var require_patternProperties2 = __commonJS({ + "../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var code_1 = require_code4(); + var codegen_1 = require_codegen2(); + var util_1 = require_util9(); + var util_2 = require_util9(); + var def = { + keyword: "patternProperties", + type: "object", + schemaType: "object", + code(cxt) { + const { gen, schema: schema2, data, parentSchema, it } = cxt; + const { opts } = it; + const patterns = (0, code_1.allSchemaProperties)(schema2); + const alwaysValidPatterns = patterns.filter((p) => (0, util_1.alwaysValidSchema)(it, schema2[p])); + if (patterns.length === 0 || alwaysValidPatterns.length === patterns.length && (!it.opts.unevaluated || it.props === true)) { + return; + } + const checkProperties = opts.strictSchema && !opts.allowMatchingProperties && parentSchema.properties; + const valid = gen.name("valid"); + if (it.props !== true && !(it.props instanceof codegen_1.Name)) { + it.props = (0, util_2.evaluatedPropsToName)(gen, it.props); + } + const { props } = it; + validatePatternProperties(); + function validatePatternProperties() { + for (const pat of patterns) { + if (checkProperties) + checkMatchingProperties(pat); + if (it.allErrors) { + validateProperties(pat); + } else { + gen.var(valid, true); + validateProperties(pat); + gen.if(valid); + } + } + } + function checkMatchingProperties(pat) { + for (const prop in checkProperties) { + if (new RegExp(pat).test(prop)) { + (0, util_1.checkStrictMode)(it, `property ${prop} matches pattern ${pat} (use allowMatchingProperties)`); + } + } + } + function validateProperties(pat) { + gen.forIn("key", data, (key) => { + gen.if((0, codegen_1._)`${(0, code_1.usePattern)(cxt, pat)}.test(${key})`, () => { + const alwaysValid = alwaysValidPatterns.includes(pat); + if (!alwaysValid) { + cxt.subschema({ + keyword: "patternProperties", + schemaProp: pat, + dataProp: key, + dataPropType: util_2.Type.Str + }, valid); + } + if (it.opts.unevaluated && props !== true) { + gen.assign((0, codegen_1._)`${props}[${key}]`, true); + } else if (!alwaysValid && !it.allErrors) { + gen.if((0, codegen_1.not)(valid), () => gen.break()); + } + }); + }); + } + } + }; + exports.default = def; + } +}); + +// ../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/applicator/not.js +var require_not2 = __commonJS({ + "../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/applicator/not.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var util_1 = require_util9(); + var def = { + keyword: "not", + schemaType: ["object", "boolean"], + trackErrors: true, + code(cxt) { + const { gen, schema: schema2, it } = cxt; + if ((0, util_1.alwaysValidSchema)(it, schema2)) { + cxt.fail(); + return; + } + const valid = gen.name("valid"); + cxt.subschema({ + keyword: "not", + compositeRule: true, + createErrors: false, + allErrors: false + }, valid); + cxt.failResult(valid, () => cxt.reset(), () => cxt.error()); + }, + error: { message: "must NOT be valid" } + }; + exports.default = def; + } +}); + +// ../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/applicator/anyOf.js +var require_anyOf2 = __commonJS({ + "../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/applicator/anyOf.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var code_1 = require_code4(); + var def = { + keyword: "anyOf", + schemaType: "array", + trackErrors: true, + code: code_1.validateUnion, + error: { message: "must match a schema in anyOf" } + }; + exports.default = def; + } +}); + +// ../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/applicator/oneOf.js +var require_oneOf2 = __commonJS({ + "../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/applicator/oneOf.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var codegen_1 = require_codegen2(); + var util_1 = require_util9(); + var error50 = { + message: "must match exactly one schema in oneOf", + params: ({ params }) => (0, codegen_1._)`{passingSchemas: ${params.passing}}` + }; + var def = { + keyword: "oneOf", + schemaType: "array", + trackErrors: true, + error: error50, + code(cxt) { + const { gen, schema: schema2, parentSchema, it } = cxt; + if (!Array.isArray(schema2)) + throw new Error("ajv implementation error"); + if (it.opts.discriminator && parentSchema.discriminator) + return; + const schArr = schema2; + const valid = gen.let("valid", false); + const passing = gen.let("passing", null); + const schValid = gen.name("_valid"); + cxt.setParams({ passing }); + gen.block(validateOneOf); + cxt.result(valid, () => cxt.reset(), () => cxt.error(true)); + function validateOneOf() { + schArr.forEach((sch, i) => { + let schCxt; + if ((0, util_1.alwaysValidSchema)(it, sch)) { + gen.var(schValid, true); + } else { + schCxt = cxt.subschema({ + keyword: "oneOf", + schemaProp: i, + compositeRule: true + }, schValid); + } + if (i > 0) { + gen.if((0, codegen_1._)`${schValid} && ${valid}`).assign(valid, false).assign(passing, (0, codegen_1._)`[${passing}, ${i}]`).else(); + } + gen.if(schValid, () => { + gen.assign(valid, true); + gen.assign(passing, i); + if (schCxt) + cxt.mergeEvaluated(schCxt, codegen_1.Name); + }); + }); + } + } + }; + exports.default = def; + } +}); + +// ../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/applicator/allOf.js +var require_allOf2 = __commonJS({ + "../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/applicator/allOf.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var util_1 = require_util9(); + var def = { + keyword: "allOf", + schemaType: "array", + code(cxt) { + const { gen, schema: schema2, it } = cxt; + if (!Array.isArray(schema2)) + throw new Error("ajv implementation error"); + const valid = gen.name("valid"); + schema2.forEach((sch, i) => { + if ((0, util_1.alwaysValidSchema)(it, sch)) + return; + const schCxt = cxt.subschema({ keyword: "allOf", schemaProp: i }, valid); + cxt.ok(valid); + cxt.mergeEvaluated(schCxt); + }); + } + }; + exports.default = def; + } +}); + +// ../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/applicator/if.js +var require_if2 = __commonJS({ + "../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/applicator/if.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var codegen_1 = require_codegen2(); + var util_1 = require_util9(); + var error50 = { + message: ({ params }) => (0, codegen_1.str)`must match "${params.ifClause}" schema`, + params: ({ params }) => (0, codegen_1._)`{failingKeyword: ${params.ifClause}}` + }; + var def = { + keyword: "if", + schemaType: ["object", "boolean"], + trackErrors: true, + error: error50, + code(cxt) { + const { gen, parentSchema, it } = cxt; + if (parentSchema.then === void 0 && parentSchema.else === void 0) { + (0, util_1.checkStrictMode)(it, '"if" without "then" and "else" is ignored'); + } + const hasThen = hasSchema(it, "then"); + const hasElse = hasSchema(it, "else"); + if (!hasThen && !hasElse) + return; + const valid = gen.let("valid", true); + const schValid = gen.name("_valid"); + validateIf(); + cxt.reset(); + if (hasThen && hasElse) { + const ifClause = gen.let("ifClause"); + cxt.setParams({ ifClause }); + gen.if(schValid, validateClause("then", ifClause), validateClause("else", ifClause)); + } else if (hasThen) { + gen.if(schValid, validateClause("then")); + } else { + gen.if((0, codegen_1.not)(schValid), validateClause("else")); + } + cxt.pass(valid, () => cxt.error(true)); + function validateIf() { + const schCxt = cxt.subschema({ + keyword: "if", + compositeRule: true, + createErrors: false, + allErrors: false + }, schValid); + cxt.mergeEvaluated(schCxt); + } + function validateClause(keyword, ifClause) { + return () => { + const schCxt = cxt.subschema({ keyword }, schValid); + gen.assign(valid, schValid); + cxt.mergeValidEvaluated(schCxt, valid); + if (ifClause) + gen.assign(ifClause, (0, codegen_1._)`${keyword}`); + else + cxt.setParams({ ifClause: keyword }); + }; + } + } + }; + function hasSchema(it, keyword) { + const schema2 = it.schema[keyword]; + return schema2 !== void 0 && !(0, util_1.alwaysValidSchema)(it, schema2); + } + exports.default = def; + } +}); + +// ../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/applicator/thenElse.js +var require_thenElse2 = __commonJS({ + "../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/applicator/thenElse.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var util_1 = require_util9(); + var def = { + keyword: ["then", "else"], + schemaType: ["object", "boolean"], + code({ keyword, parentSchema, it }) { + if (parentSchema.if === void 0) + (0, util_1.checkStrictMode)(it, `"${keyword}" without "if" is ignored`); + } + }; + exports.default = def; + } +}); + +// ../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/applicator/index.js +var require_applicator2 = __commonJS({ + "../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/applicator/index.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var additionalItems_1 = require_additionalItems2(); + var prefixItems_1 = require_prefixItems2(); + var items_1 = require_items2(); + var items2020_1 = require_items20202(); + var contains_1 = require_contains2(); + var dependencies_1 = require_dependencies2(); + var propertyNames_1 = require_propertyNames2(); + var additionalProperties_1 = require_additionalProperties2(); + var properties_1 = require_properties2(); + var patternProperties_1 = require_patternProperties2(); + var not_1 = require_not2(); + var anyOf_1 = require_anyOf2(); + var oneOf_1 = require_oneOf2(); + var allOf_1 = require_allOf2(); + var if_1 = require_if2(); + var thenElse_1 = require_thenElse2(); + function getApplicator(draft2020 = false) { + const applicator = [ + // any + not_1.default, + anyOf_1.default, + oneOf_1.default, + allOf_1.default, + if_1.default, + thenElse_1.default, + // object + propertyNames_1.default, + additionalProperties_1.default, + dependencies_1.default, + properties_1.default, + patternProperties_1.default + ]; + if (draft2020) + applicator.push(prefixItems_1.default, items2020_1.default); + else + applicator.push(additionalItems_1.default, items_1.default); + applicator.push(contains_1.default); + return applicator; + } + exports.default = getApplicator; + } +}); + +// ../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/format/format.js +var require_format3 = __commonJS({ + "../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/format/format.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var codegen_1 = require_codegen2(); + var error50 = { + message: ({ schemaCode }) => (0, codegen_1.str)`must match format "${schemaCode}"`, + params: ({ schemaCode }) => (0, codegen_1._)`{format: ${schemaCode}}` + }; + var def = { + keyword: "format", + type: ["number", "string"], + schemaType: "string", + $data: true, + error: error50, + code(cxt, ruleType) { + const { gen, data, $data, schema: schema2, schemaCode, it } = cxt; + const { opts, errSchemaPath, schemaEnv, self: self2 } = it; + if (!opts.validateFormats) + return; + if ($data) + validate$DataFormat(); + else + validateFormat(); + function validate$DataFormat() { + const fmts = gen.scopeValue("formats", { + ref: self2.formats, + code: opts.code.formats + }); + const fDef = gen.const("fDef", (0, codegen_1._)`${fmts}[${schemaCode}]`); + const fType = gen.let("fType"); + const format2 = gen.let("format"); + gen.if((0, codegen_1._)`typeof ${fDef} == "object" && !(${fDef} instanceof RegExp)`, () => gen.assign(fType, (0, codegen_1._)`${fDef}.type || "string"`).assign(format2, (0, codegen_1._)`${fDef}.validate`), () => gen.assign(fType, (0, codegen_1._)`"string"`).assign(format2, fDef)); + cxt.fail$data((0, codegen_1.or)(unknownFmt(), invalidFmt())); + function unknownFmt() { + if (opts.strictSchema === false) + return codegen_1.nil; + return (0, codegen_1._)`${schemaCode} && !${format2}`; + } + function invalidFmt() { + const callFormat = schemaEnv.$async ? (0, codegen_1._)`(${fDef}.async ? await ${format2}(${data}) : ${format2}(${data}))` : (0, codegen_1._)`${format2}(${data})`; + const validData = (0, codegen_1._)`(typeof ${format2} == "function" ? ${callFormat} : ${format2}.test(${data}))`; + return (0, codegen_1._)`${format2} && ${format2} !== true && ${fType} === ${ruleType} && !${validData}`; + } + } + function validateFormat() { + const formatDef = self2.formats[schema2]; + if (!formatDef) { + unknownFormat(); + return; + } + if (formatDef === true) + return; + const [fmtType, format2, fmtRef] = getFormat(formatDef); + if (fmtType === ruleType) + cxt.pass(validCondition()); + function unknownFormat() { + if (opts.strictSchema === false) { + self2.logger.warn(unknownMsg()); + return; + } + throw new Error(unknownMsg()); + function unknownMsg() { + return `unknown format "${schema2}" ignored in schema at path "${errSchemaPath}"`; + } + } + function getFormat(fmtDef) { + const code = fmtDef instanceof RegExp ? (0, codegen_1.regexpCode)(fmtDef) : opts.code.formats ? (0, codegen_1._)`${opts.code.formats}${(0, codegen_1.getProperty)(schema2)}` : void 0; + const fmt = gen.scopeValue("formats", { key: schema2, ref: fmtDef, code }); + if (typeof fmtDef == "object" && !(fmtDef instanceof RegExp)) { + return [fmtDef.type || "string", fmtDef.validate, (0, codegen_1._)`${fmt}.validate`]; + } + return ["string", fmtDef, fmt]; + } + function validCondition() { + if (typeof formatDef == "object" && !(formatDef instanceof RegExp) && formatDef.async) { + if (!schemaEnv.$async) + throw new Error("async format in sync schema"); + return (0, codegen_1._)`await ${fmtRef}(${data})`; + } + return typeof format2 == "function" ? (0, codegen_1._)`${fmtRef}(${data})` : (0, codegen_1._)`${fmtRef}.test(${data})`; + } + } + } + }; + exports.default = def; + } +}); + +// ../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/format/index.js +var require_format4 = __commonJS({ + "../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/format/index.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var format_1 = require_format3(); + var format2 = [format_1.default]; + exports.default = format2; + } +}); + +// ../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/metadata.js +var require_metadata2 = __commonJS({ + "../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/metadata.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.contentVocabulary = exports.metadataVocabulary = void 0; + exports.metadataVocabulary = [ + "title", + "description", + "default", + "deprecated", + "readOnly", + "writeOnly", + "examples" + ]; + exports.contentVocabulary = [ + "contentMediaType", + "contentEncoding", + "contentSchema" + ]; + } +}); + +// ../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/draft7.js +var require_draft72 = __commonJS({ + "../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/draft7.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var core_1 = require_core4(); + var validation_1 = require_validation2(); + var applicator_1 = require_applicator2(); + var format_1 = require_format4(); + var metadata_1 = require_metadata2(); + var draft7Vocabularies = [ + core_1.default, + validation_1.default, + (0, applicator_1.default)(), + format_1.default, + metadata_1.metadataVocabulary, + metadata_1.contentVocabulary + ]; + exports.default = draft7Vocabularies; + } +}); + +// ../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/discriminator/types.js +var require_types2 = __commonJS({ + "../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/discriminator/types.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.DiscrError = void 0; + var DiscrError; + (function(DiscrError2) { + DiscrError2["Tag"] = "tag"; + DiscrError2["Mapping"] = "mapping"; + })(DiscrError || (exports.DiscrError = DiscrError = {})); + } +}); + +// ../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/discriminator/index.js +var require_discriminator2 = __commonJS({ + "../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/discriminator/index.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var codegen_1 = require_codegen2(); + var types_1 = require_types2(); + var compile_1 = require_compile2(); + var ref_error_1 = require_ref_error2(); + var util_1 = require_util9(); + var error50 = { + message: ({ params: { discrError, tagName } }) => discrError === types_1.DiscrError.Tag ? `tag "${tagName}" must be string` : `value of tag "${tagName}" must be in oneOf`, + params: ({ params: { discrError, tag, tagName } }) => (0, codegen_1._)`{error: ${discrError}, tag: ${tagName}, tagValue: ${tag}}` + }; + var def = { + keyword: "discriminator", + type: "object", + schemaType: "object", + error: error50, + code(cxt) { + const { gen, data, schema: schema2, parentSchema, it } = cxt; + const { oneOf } = parentSchema; + if (!it.opts.discriminator) { + throw new Error("discriminator: requires discriminator option"); + } + const tagName = schema2.propertyName; + if (typeof tagName != "string") + throw new Error("discriminator: requires propertyName"); + if (schema2.mapping) + throw new Error("discriminator: mapping is not supported"); + if (!oneOf) + throw new Error("discriminator: requires oneOf keyword"); + const valid = gen.let("valid", false); + const tag = gen.const("tag", (0, codegen_1._)`${data}${(0, codegen_1.getProperty)(tagName)}`); + gen.if((0, codegen_1._)`typeof ${tag} == "string"`, () => validateMapping(), () => cxt.error(false, { discrError: types_1.DiscrError.Tag, tag, tagName })); + cxt.ok(valid); + function validateMapping() { + const mapping = getMapping(); + gen.if(false); + for (const tagValue in mapping) { + gen.elseIf((0, codegen_1._)`${tag} === ${tagValue}`); + gen.assign(valid, applyTagSchema(mapping[tagValue])); + } + gen.else(); + cxt.error(false, { discrError: types_1.DiscrError.Mapping, tag, tagName }); + gen.endIf(); + } + function applyTagSchema(schemaProp) { + const _valid = gen.name("valid"); + const schCxt = cxt.subschema({ keyword: "oneOf", schemaProp }, _valid); + cxt.mergeEvaluated(schCxt, codegen_1.Name); + return _valid; + } + function getMapping() { + var _a2; + const oneOfMapping = {}; + const topRequired = hasRequired(parentSchema); + let tagRequired = true; + for (let i = 0; i < oneOf.length; i++) { + let sch = oneOf[i]; + if ((sch === null || sch === void 0 ? void 0 : sch.$ref) && !(0, util_1.schemaHasRulesButRef)(sch, it.self.RULES)) { + const ref = sch.$ref; + sch = compile_1.resolveRef.call(it.self, it.schemaEnv.root, it.baseId, ref); + if (sch instanceof compile_1.SchemaEnv) + sch = sch.schema; + if (sch === void 0) + throw new ref_error_1.default(it.opts.uriResolver, it.baseId, ref); + } + const propSch = (_a2 = sch === null || sch === void 0 ? void 0 : sch.properties) === null || _a2 === void 0 ? void 0 : _a2[tagName]; + if (typeof propSch != "object") { + throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${tagName}"`); + } + tagRequired = tagRequired && (topRequired || hasRequired(sch)); + addMappings(propSch, i); + } + if (!tagRequired) + throw new Error(`discriminator: "${tagName}" must be required`); + return oneOfMapping; + function hasRequired({ required: required4 }) { + return Array.isArray(required4) && required4.includes(tagName); + } + function addMappings(sch, i) { + if (sch.const) { + addMapping(sch.const, i); + } else if (sch.enum) { + for (const tagValue of sch.enum) { + addMapping(tagValue, i); + } + } else { + throw new Error(`discriminator: "properties/${tagName}" must have "const" or "enum"`); + } + } + function addMapping(tagValue, i) { + if (typeof tagValue != "string" || tagValue in oneOfMapping) { + throw new Error(`discriminator: "${tagName}" values must be unique strings`); + } + oneOfMapping[tagValue] = i; + } + } + } + }; + exports.default = def; + } +}); + +// ../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/refs/json-schema-draft-07.json var require_json_schema_draft_072 = __commonJS({ - "node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/refs/json-schema-draft-07.json"(exports, module) { + "../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/refs/json-schema-draft-07.json"(exports, module) { module.exports = { $schema: "http://json-schema.org/draft-07/schema#", $id: "http://json-schema.org/draft-07/schema#", @@ -36580,21 +50817,10 @@ var require_json_schema_draft_072 = __commonJS({ minimum: 0 }, nonNegativeIntegerDefault0: { - allOf: [ - { $ref: "#/definitions/nonNegativeInteger" }, - { default: 0 } - ] + allOf: [{ $ref: "#/definitions/nonNegativeInteger" }, { default: 0 }] }, simpleTypes: { - enum: [ - "array", - "boolean", - "integer", - "null", - "number", - "object", - "string" - ] + enum: ["array", "boolean", "integer", "null", "number", "object", "string"] }, stringArray: { type: "array", @@ -36659,10 +50885,7 @@ var require_json_schema_draft_072 = __commonJS({ }, additionalItems: { $ref: "#" }, items: { - anyOf: [ - { $ref: "#" }, - { $ref: "#/definitions/schemaArray" } - ], + anyOf: [{ $ref: "#" }, { $ref: "#/definitions/schemaArray" }], default: true }, maxItems: { $ref: "#/definitions/nonNegativeInteger" }, @@ -36695,10 +50918,7 @@ var require_json_schema_draft_072 = __commonJS({ dependencies: { type: "object", additionalProperties: { - anyOf: [ - { $ref: "#" }, - { $ref: "#/definitions/stringArray" } - ] + anyOf: [{ $ref: "#" }, { $ref: "#/definitions/stringArray" }] } }, propertyNames: { $ref: "#" }, @@ -36736,525 +50956,396 @@ var require_json_schema_draft_072 = __commonJS({ } }); -// node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/definition_schema.js -var require_definition_schema2 = __commonJS({ - "node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/definition_schema.js"(exports, module) { - "use strict"; - var metaSchema = require_json_schema_draft_072(); - module.exports = { - $id: "https://github.com/ajv-validator/ajv/blob/master/lib/definition_schema.js", - definitions: { - simpleTypes: metaSchema.definitions.simpleTypes - }, - type: "object", - dependencies: { - schema: ["validate"], - $data: ["validate"], - statements: ["inline"], - valid: { not: { required: ["macro"] } } - }, - properties: { - type: metaSchema.properties.type, - schema: { type: "boolean" }, - statements: { type: "boolean" }, - dependencies: { - type: "array", - items: { type: "string" } - }, - metaSchema: { type: "object" }, - modifying: { type: "boolean" }, - valid: { type: "boolean" }, - $data: { type: "boolean" }, - async: { type: "boolean" }, - errors: { - anyOf: [ - { type: "boolean" }, - { const: "full" } - ] - } - } - }; - } -}); - -// node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/keyword.js -var require_keyword2 = __commonJS({ - "node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/keyword.js"(exports, module) { - "use strict"; - var IDENTIFIER = /^[a-z_$][a-z0-9_$-]*$/i; - var customRuleCode = require_custom2(); - var definitionSchema = require_definition_schema2(); - module.exports = { - add: addKeyword, - get: getKeyword, - remove: removeKeyword, - validate: validateKeyword - }; - function addKeyword(keyword, definition) { - var RULES = this.RULES; - if (RULES.keywords[keyword]) - throw new Error("Keyword " + keyword + " is already defined"); - if (!IDENTIFIER.test(keyword)) - throw new Error("Keyword " + keyword + " is not a valid identifier"); - if (definition) { - this.validateKeyword(definition, true); - var dataType = definition.type; - if (Array.isArray(dataType)) { - for (var i = 0; i < dataType.length; i++) - _addRule(keyword, dataType[i], definition); - } else { - _addRule(keyword, dataType, definition); - } - var metaSchema = definition.metaSchema; - if (metaSchema) { - if (definition.$data && this._opts.$data) { - metaSchema = { - anyOf: [ - metaSchema, - { "$ref": "https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#" } - ] - }; - } - definition.validateSchema = this.compile(metaSchema, true); - } - } - RULES.keywords[keyword] = RULES.all[keyword] = true; - function _addRule(keyword2, dataType2, definition2) { - var ruleGroup; - for (var i2 = 0; i2 < RULES.length; i2++) { - var rg = RULES[i2]; - if (rg.type == dataType2) { - ruleGroup = rg; - break; - } - } - if (!ruleGroup) { - ruleGroup = { type: dataType2, rules: [] }; - RULES.push(ruleGroup); - } - var rule = { - keyword: keyword2, - definition: definition2, - custom: true, - code: customRuleCode, - implements: definition2.implements - }; - ruleGroup.rules.push(rule); - RULES.custom[keyword2] = rule; - } - return this; - } - function getKeyword(keyword) { - var rule = this.RULES.custom[keyword]; - return rule ? rule.definition : this.RULES.keywords[keyword] || false; - } - function removeKeyword(keyword) { - var RULES = this.RULES; - delete RULES.keywords[keyword]; - delete RULES.all[keyword]; - delete RULES.custom[keyword]; - for (var i = 0; i < RULES.length; i++) { - var rules = RULES[i].rules; - for (var j = 0; j < rules.length; j++) { - if (rules[j].keyword == keyword) { - rules.splice(j, 1); - break; - } - } - } - return this; - } - function validateKeyword(definition, throwError2) { - validateKeyword.errors = null; - var v = this._validateKeyword = this._validateKeyword || this.compile(definitionSchema, true); - if (v(definition)) return true; - validateKeyword.errors = v.errors; - if (throwError2) - throw new Error("custom keyword definition is invalid: " + this.errorsText(v.errors)); - else - return false; - } - } -}); - -// node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/refs/data.json -var require_data4 = __commonJS({ - "node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/refs/data.json"(exports, module) { - module.exports = { - $schema: "http://json-schema.org/draft-07/schema#", - $id: "https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#", - description: "Meta-schema for $data reference (JSON Schema extension proposal)", - type: "object", - required: ["$data"], - properties: { - $data: { - type: "string", - anyOf: [ - { format: "relative-json-pointer" }, - { format: "json-pointer" } - ] - } - }, - additionalProperties: false - }; - } -}); - -// node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/ajv.js +// ../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/ajv.js var require_ajv2 = __commonJS({ - "node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/ajv.js"(exports, module) { + "../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/ajv.js"(exports, module) { "use strict"; - var compileSchema = require_compile2(); - var resolve = require_resolve2(); - var Cache = require_cache3(); - var SchemaObject = require_schema_obj2(); - var stableStringify = require_fast_json_stable_stringify2(); - var formats = require_formats2(); - var rules = require_rules2(); - var $dataMetaSchema = require_data3(); - var util3 = require_util9(); - module.exports = Ajv2; - Ajv2.prototype.validate = validate2; - Ajv2.prototype.compile = compile; - Ajv2.prototype.addSchema = addSchema; - Ajv2.prototype.addMetaSchema = addMetaSchema; - Ajv2.prototype.validateSchema = validateSchema; - Ajv2.prototype.getSchema = getSchema; - Ajv2.prototype.removeSchema = removeSchema; - Ajv2.prototype.addFormat = addFormat2; - Ajv2.prototype.errorsText = errorsText; - Ajv2.prototype._addSchema = _addSchema; - Ajv2.prototype._compile = _compile; - Ajv2.prototype.compileAsync = require_async2(); - var customKeyword = require_keyword2(); - Ajv2.prototype.addKeyword = customKeyword.add; - Ajv2.prototype.getKeyword = customKeyword.get; - Ajv2.prototype.removeKeyword = customKeyword.remove; - Ajv2.prototype.validateKeyword = customKeyword.validate; - var errorClasses = require_error_classes2(); - Ajv2.ValidationError = errorClasses.Validation; - Ajv2.MissingRefError = errorClasses.MissingRef; - Ajv2.$dataMetaSchema = $dataMetaSchema; - var META_SCHEMA_ID = "http://json-schema.org/draft-07/schema"; - var META_IGNORE_OPTIONS = ["removeAdditional", "useDefaults", "coerceTypes", "strictDefaults"]; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.MissingRefError = exports.ValidationError = exports.CodeGen = exports.Name = exports.nil = exports.stringify = exports.str = exports._ = exports.KeywordCxt = exports.Ajv = void 0; + var core_1 = require_core3(); + var draft7_1 = require_draft72(); + var discriminator_1 = require_discriminator2(); + var draft7MetaSchema = require_json_schema_draft_072(); var META_SUPPORT_DATA = ["/properties"]; - function Ajv2(opts) { - if (!(this instanceof Ajv2)) return new Ajv2(opts); - opts = this._opts = util3.copy(opts) || {}; - setLogger(this); - this._schemas = {}; - this._refs = {}; - this._fragments = {}; - this._formats = formats(opts.format); - this._cache = opts.cache || new Cache(); - this._loadingSchemas = {}; - this._compilations = []; - this.RULES = rules(); - this._getId = chooseGetId(opts); - opts.loopRequired = opts.loopRequired || Infinity; - if (opts.errorDataPath == "property") opts._errorDataPathProperty = true; - if (opts.serialize === void 0) opts.serialize = stableStringify; - this._metaOpts = getMetaSchemaOptions(this); - if (opts.formats) addInitialFormats(this); - if (opts.keywords) addInitialKeywords(this); - addDefaultMetaSchema(this); - if (typeof opts.meta == "object") this.addMetaSchema(opts.meta); - if (opts.nullable) this.addKeyword("nullable", { metaSchema: { type: "boolean" } }); - addInitialSchemas(this); - } - function validate2(schemaKeyRef, data) { - var v; - if (typeof schemaKeyRef == "string") { - v = this.getSchema(schemaKeyRef); - if (!v) throw new Error('no schema with key or ref "' + schemaKeyRef + '"'); - } else { - var schemaObj = this._addSchema(schemaKeyRef); - v = schemaObj.validate || this._compile(schemaObj); + var META_SCHEMA_ID = "http://json-schema.org/draft-07/schema"; + var Ajv2 = class extends core_1.default { + _addVocabularies() { + super._addVocabularies(); + draft7_1.default.forEach((v) => this.addVocabulary(v)); + if (this.opts.discriminator) + this.addKeyword(discriminator_1.default); } - var valid = v(data); - if (v.$async !== true) this.errors = v.errors; - return valid; - } - function compile(schema2, _meta) { - var schemaObj = this._addSchema(schema2, void 0, _meta); - return schemaObj.validate || this._compile(schemaObj); - } - function addSchema(schema2, key, _skipValidation, _meta) { - if (Array.isArray(schema2)) { - for (var i = 0; i < schema2.length; i++) this.addSchema(schema2[i], void 0, _skipValidation, _meta); - return this; + _addDefaultMetaSchema() { + super._addDefaultMetaSchema(); + if (!this.opts.meta) + return; + const metaSchema = this.opts.$data ? this.$dataMetaSchema(draft7MetaSchema, META_SUPPORT_DATA) : draft7MetaSchema; + this.addMetaSchema(metaSchema, META_SCHEMA_ID, false); + this.refs["http://json-schema.org/schema"] = META_SCHEMA_ID; } - var id = this._getId(schema2); - if (id !== void 0 && typeof id != "string") - throw new Error("schema id must be string"); - key = resolve.normalizeId(key || id); - checkUnique(this, key); - this._schemas[key] = this._addSchema(schema2, _skipValidation, _meta, true); - return this; - } - function addMetaSchema(schema2, key, skipValidation) { - this.addSchema(schema2, key, skipValidation, true); - return this; - } - function validateSchema(schema2, throwOrLogError) { - var $schema = schema2.$schema; - if ($schema !== void 0 && typeof $schema != "string") - throw new Error("$schema must be a string"); - $schema = $schema || this._opts.defaultMeta || defaultMeta(this); - if (!$schema) { - this.logger.warn("meta-schema not available"); - this.errors = null; - return true; + defaultMeta() { + return this.opts.defaultMeta = super.defaultMeta() || (this.getSchema(META_SCHEMA_ID) ? META_SCHEMA_ID : void 0); } - var valid = this.validate($schema, schema2); - if (!valid && throwOrLogError) { - var message = "schema is invalid: " + this.errorsText(); - if (this._opts.validateSchema == "log") this.logger.error(message); - else throw new Error(message); - } - return valid; + }; + exports.Ajv = Ajv2; + module.exports = exports = Ajv2; + module.exports.Ajv = Ajv2; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.default = Ajv2; + var validate_1 = require_validate2(); + Object.defineProperty(exports, "KeywordCxt", { enumerable: true, get: function() { + return validate_1.KeywordCxt; + } }); + var codegen_1 = require_codegen2(); + Object.defineProperty(exports, "_", { enumerable: true, get: function() { + return codegen_1._; + } }); + Object.defineProperty(exports, "str", { enumerable: true, get: function() { + return codegen_1.str; + } }); + Object.defineProperty(exports, "stringify", { enumerable: true, get: function() { + return codegen_1.stringify; + } }); + Object.defineProperty(exports, "nil", { enumerable: true, get: function() { + return codegen_1.nil; + } }); + Object.defineProperty(exports, "Name", { enumerable: true, get: function() { + return codegen_1.Name; + } }); + Object.defineProperty(exports, "CodeGen", { enumerable: true, get: function() { + return codegen_1.CodeGen; + } }); + var validation_error_1 = require_validation_error2(); + Object.defineProperty(exports, "ValidationError", { enumerable: true, get: function() { + return validation_error_1.default; + } }); + var ref_error_1 = require_ref_error2(); + Object.defineProperty(exports, "MissingRefError", { enumerable: true, get: function() { + return ref_error_1.default; + } }); + } +}); + +// ../node_modules/.pnpm/ajv-formats@3.0.1_ajv@8.17.1/node_modules/ajv-formats/dist/formats.js +var require_formats2 = __commonJS({ + "../node_modules/.pnpm/ajv-formats@3.0.1_ajv@8.17.1/node_modules/ajv-formats/dist/formats.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.formatNames = exports.fastFormats = exports.fullFormats = void 0; + function fmtDef(validate2, compare) { + return { validate: validate2, compare }; } - function defaultMeta(self2) { - var meta = self2._opts.meta; - self2._opts.defaultMeta = typeof meta == "object" ? self2._getId(meta) || meta : self2.getSchema(META_SCHEMA_ID) ? META_SCHEMA_ID : void 0; - return self2._opts.defaultMeta; + exports.fullFormats = { + // date: http://tools.ietf.org/html/rfc3339#section-5.6 + date: fmtDef(date7, compareDate), + // date-time: http://tools.ietf.org/html/rfc3339#section-5.6 + time: fmtDef(getTime(true), compareTime), + "date-time": fmtDef(getDateTime(true), compareDateTime), + "iso-time": fmtDef(getTime(), compareIsoTime), + "iso-date-time": fmtDef(getDateTime(), compareIsoDateTime), + // duration: https://tools.ietf.org/html/rfc3339#appendix-A + duration: /^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/, + uri, + "uri-reference": /^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i, + // uri-template: https://tools.ietf.org/html/rfc6570 + "uri-template": /^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i, + // For the source: https://gist.github.com/dperini/729294 + // For test cases: https://mathiasbynens.be/demo/url-regex + url: /^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu, + email: /^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i, + hostname: /^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i, + // optimized https://www.safaribooksonline.com/library/view/regular-expressions-cookbook/9780596802837/ch07s16.html + ipv4: /^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/, + ipv6: /^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i, + regex: regex4, + // uuid: http://tools.ietf.org/html/rfc4122 + uuid: /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i, + // JSON-pointer: https://tools.ietf.org/html/rfc6901 + // uri fragment: https://tools.ietf.org/html/rfc3986#appendix-A + "json-pointer": /^(?:\/(?:[^~/]|~0|~1)*)*$/, + "json-pointer-uri-fragment": /^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i, + // relative JSON-pointer: http://tools.ietf.org/html/draft-luff-relative-json-pointer-00 + "relative-json-pointer": /^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/, + // the following formats are used by the openapi specification: https://spec.openapis.org/oas/v3.0.0#data-types + // byte: https://github.com/miguelmota/is-base64 + byte, + // signed 32 bit integer + int32: { type: "number", validate: validateInt32 }, + // signed 64 bit integer + int64: { type: "number", validate: validateInt64 }, + // C-type float + float: { type: "number", validate: validateNumber }, + // C-type double + double: { type: "number", validate: validateNumber }, + // hint to the UI to hide input strings + password: true, + // unchecked string payload + binary: true + }; + exports.fastFormats = { + ...exports.fullFormats, + date: fmtDef(/^\d\d\d\d-[0-1]\d-[0-3]\d$/, compareDate), + time: fmtDef(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i, compareTime), + "date-time": fmtDef(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i, compareDateTime), + "iso-time": fmtDef(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i, compareIsoTime), + "iso-date-time": fmtDef(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i, compareIsoDateTime), + // uri: https://github.com/mafintosh/is-my-json-valid/blob/master/formats.js + uri: /^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i, + "uri-reference": /^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i, + // email (sources from jsen validator): + // http://stackoverflow.com/questions/201323/using-a-regular-expression-to-validate-an-email-address#answer-8829363 + // http://www.w3.org/TR/html5/forms.html#valid-e-mail-address (search for 'wilful violation') + email: /^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i + }; + exports.formatNames = Object.keys(exports.fullFormats); + function isLeapYear(year) { + return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0); } - function getSchema(keyRef) { - var schemaObj = _getSchemaObj(this, keyRef); - switch (typeof schemaObj) { - case "object": - return schemaObj.validate || this._compile(schemaObj); - case "string": - return this.getSchema(schemaObj); - case "undefined": - return _getSchemaFragment(this, keyRef); - } + var DATE = /^(\d\d\d\d)-(\d\d)-(\d\d)$/; + var DAYS = [0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; + function date7(str) { + const matches = DATE.exec(str); + if (!matches) + return false; + const year = +matches[1]; + const month = +matches[2]; + const day = +matches[3]; + return month >= 1 && month <= 12 && day >= 1 && day <= (month === 2 && isLeapYear(year) ? 29 : DAYS[month]); } - function _getSchemaFragment(self2, ref) { - var res = resolve.schema.call(self2, { schema: {} }, ref); - if (res) { - var schema2 = res.schema, root2 = res.root, baseId = res.baseId; - var v = compileSchema.call(self2, schema2, root2, void 0, baseId); - self2._fragments[ref] = new SchemaObject({ - ref, - fragment: true, - schema: schema2, - root: root2, - baseId, - validate: v - }); - return v; - } + function compareDate(d1, d2) { + if (!(d1 && d2)) + return void 0; + if (d1 > d2) + return 1; + if (d1 < d2) + return -1; + return 0; } - function _getSchemaObj(self2, keyRef) { - keyRef = resolve.normalizeId(keyRef); - return self2._schemas[keyRef] || self2._refs[keyRef] || self2._fragments[keyRef]; + var TIME = /^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i; + function getTime(strictTimeZone) { + return function time6(str) { + const matches = TIME.exec(str); + if (!matches) + return false; + const hr = +matches[1]; + const min = +matches[2]; + const sec = +matches[3]; + const tz = matches[4]; + const tzSign = matches[5] === "-" ? -1 : 1; + const tzH = +(matches[6] || 0); + const tzM = +(matches[7] || 0); + if (tzH > 23 || tzM > 59 || strictTimeZone && !tz) + return false; + if (hr <= 23 && min <= 59 && sec < 60) + return true; + const utcMin = min - tzM * tzSign; + const utcHr = hr - tzH * tzSign - (utcMin < 0 ? 1 : 0); + return (utcHr === 23 || utcHr === -1) && (utcMin === 59 || utcMin === -1) && sec < 61; + }; } - function removeSchema(schemaKeyRef) { - if (schemaKeyRef instanceof RegExp) { - _removeAllSchemas(this, this._schemas, schemaKeyRef); - _removeAllSchemas(this, this._refs, schemaKeyRef); - return this; - } - switch (typeof schemaKeyRef) { - case "undefined": - _removeAllSchemas(this, this._schemas); - _removeAllSchemas(this, this._refs); - this._cache.clear(); - return this; - case "string": - var schemaObj = _getSchemaObj(this, schemaKeyRef); - if (schemaObj) this._cache.del(schemaObj.cacheKey); - delete this._schemas[schemaKeyRef]; - delete this._refs[schemaKeyRef]; - return this; - case "object": - var serialize = this._opts.serialize; - var cacheKey = serialize ? serialize(schemaKeyRef) : schemaKeyRef; - this._cache.del(cacheKey); - var id = this._getId(schemaKeyRef); - if (id) { - id = resolve.normalizeId(id); - delete this._schemas[id]; - delete this._refs[id]; - } - } - return this; + function compareTime(s1, s2) { + if (!(s1 && s2)) + return void 0; + const t1 = (/* @__PURE__ */ new Date("2020-01-01T" + s1)).valueOf(); + const t2 = (/* @__PURE__ */ new Date("2020-01-01T" + s2)).valueOf(); + if (!(t1 && t2)) + return void 0; + return t1 - t2; } - function _removeAllSchemas(self2, schemas, regex4) { - for (var keyRef in schemas) { - var schemaObj = schemas[keyRef]; - if (!schemaObj.meta && (!regex4 || regex4.test(keyRef))) { - self2._cache.del(schemaObj.cacheKey); - delete schemas[keyRef]; - } - } + function compareIsoTime(t1, t2) { + if (!(t1 && t2)) + return void 0; + const a1 = TIME.exec(t1); + const a2 = TIME.exec(t2); + if (!(a1 && a2)) + return void 0; + t1 = a1[1] + a1[2] + a1[3]; + t2 = a2[1] + a2[2] + a2[3]; + if (t1 > t2) + return 1; + if (t1 < t2) + return -1; + return 0; } - function _addSchema(schema2, skipValidation, meta, shouldAddSchema) { - 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; - shouldAddSchema = shouldAddSchema || this._opts.addUsedSchema !== false; - var id = resolve.normalizeId(this._getId(schema2)); - if (id && shouldAddSchema) checkUnique(this, id); - var willValidate = this._opts.validateSchema !== false && !skipValidation; - var recursiveMeta; - if (willValidate && !(recursiveMeta = id && id == resolve.normalizeId(schema2.$schema))) - this.validateSchema(schema2, true); - var localRefs = resolve.ids.call(this, schema2); - var schemaObj = new SchemaObject({ - id, - schema: schema2, - localRefs, - cacheKey, - meta - }); - if (id[0] != "#" && shouldAddSchema) this._refs[id] = schemaObj; - this._cache.put(cacheKey, schemaObj); - if (willValidate && recursiveMeta) this.validateSchema(schema2, true); - return schemaObj; + var DATE_TIME_SEPARATOR = /t|\s/i; + function getDateTime(strictTimeZone) { + const time6 = getTime(strictTimeZone); + return function date_time(str) { + const dateTime = str.split(DATE_TIME_SEPARATOR); + return dateTime.length === 2 && date7(dateTime[0]) && time6(dateTime[1]); + }; } - function _compile(schemaObj, root2) { - if (schemaObj.compiling) { - schemaObj.validate = callValidate; - callValidate.schema = schemaObj.schema; - callValidate.errors = null; - callValidate.root = root2 ? root2 : callValidate; - if (schemaObj.schema.$async === true) - callValidate.$async = true; - return callValidate; - } - schemaObj.compiling = true; - var currentOpts; - if (schemaObj.meta) { - currentOpts = this._opts; - this._opts = this._metaOpts; - } - var v; + function compareDateTime(dt1, dt2) { + if (!(dt1 && dt2)) + return void 0; + const d1 = new Date(dt1).valueOf(); + const d2 = new Date(dt2).valueOf(); + if (!(d1 && d2)) + return void 0; + return d1 - d2; + } + function compareIsoDateTime(dt1, dt2) { + if (!(dt1 && dt2)) + return void 0; + const [d1, t1] = dt1.split(DATE_TIME_SEPARATOR); + const [d2, t2] = dt2.split(DATE_TIME_SEPARATOR); + const res = compareDate(d1, d2); + if (res === void 0) + return void 0; + return res || compareTime(t1, t2); + } + var NOT_URI_FRAGMENT = /\/|:/; + var URI = /^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i; + function uri(str) { + return NOT_URI_FRAGMENT.test(str) && URI.test(str); + } + var BYTE = /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm; + function byte(str) { + BYTE.lastIndex = 0; + return BYTE.test(str); + } + var MIN_INT32 = -(2 ** 31); + var MAX_INT32 = 2 ** 31 - 1; + function validateInt32(value2) { + return Number.isInteger(value2) && value2 <= MAX_INT32 && value2 >= MIN_INT32; + } + function validateInt64(value2) { + return Number.isInteger(value2); + } + function validateNumber() { + return true; + } + var Z_ANCHOR = /[^\\]\\Z/; + function regex4(str) { + if (Z_ANCHOR.test(str)) + return false; try { - v = compileSchema.call(this, schemaObj.schema, root2, schemaObj.localRefs); + new RegExp(str); + return true; } catch (e) { - delete schemaObj.validate; - throw e; - } finally { - schemaObj.compiling = false; - if (schemaObj.meta) this._opts = currentOpts; + return false; } - schemaObj.validate = v; - schemaObj.refs = v.refs; - schemaObj.refVal = v.refVal; - schemaObj.root = v.root; - return v; - function callValidate() { - var _validate = schemaObj.validate; - var result = _validate.apply(this, arguments); - callValidate.errors = _validate.errors; - return result; - } - } - function chooseGetId(opts) { - switch (opts.schemaId) { - case "auto": - return _get$IdOrId; - case "id": - return _getId; - default: - return _get$Id; - } - } - function _getId(schema2) { - if (schema2.$id) this.logger.warn("schema $id ignored", schema2.$id); - return schema2.id; - } - function _get$Id(schema2) { - if (schema2.id) this.logger.warn("schema id ignored", schema2.id); - return schema2.$id; - } - function _get$IdOrId(schema2) { - if (schema2.$id && schema2.id && schema2.$id != schema2.id) - throw new Error("schema $id is different from id"); - return schema2.$id || schema2.id; - } - function errorsText(errors, options) { - errors = errors || this.errors; - if (!errors) return "No errors"; - options = options || {}; - var separator2 = options.separator === void 0 ? ", " : options.separator; - var dataVar = options.dataVar === void 0 ? "data" : options.dataVar; - var text = ""; - for (var i = 0; i < errors.length; i++) { - var e = errors[i]; - if (e) text += dataVar + e.dataPath + " " + e.message + separator2; - } - return text.slice(0, -separator2.length); - } - function addFormat2(name, format2) { - if (typeof format2 == "string") format2 = new RegExp(format2); - this._formats[name] = format2; - return this; - } - function addDefaultMetaSchema(self2) { - var $dataSchema; - if (self2._opts.$data) { - $dataSchema = require_data4(); - self2.addMetaSchema($dataSchema, $dataSchema.$id, true); - } - if (self2._opts.meta === false) return; - var metaSchema = require_json_schema_draft_072(); - if (self2._opts.$data) metaSchema = $dataMetaSchema(metaSchema, META_SUPPORT_DATA); - self2.addMetaSchema(metaSchema, META_SCHEMA_ID, true); - self2._refs["http://json-schema.org/schema"] = META_SCHEMA_ID; - } - function addInitialSchemas(self2) { - var optsSchemas = self2._opts.schemas; - if (!optsSchemas) return; - if (Array.isArray(optsSchemas)) self2.addSchema(optsSchemas); - else for (var key in optsSchemas) self2.addSchema(optsSchemas[key], key); - } - function addInitialFormats(self2) { - for (var name in self2._opts.formats) { - var format2 = self2._opts.formats[name]; - self2.addFormat(name, format2); - } - } - function addInitialKeywords(self2) { - for (var name in self2._opts.keywords) { - var keyword = self2._opts.keywords[name]; - self2.addKeyword(name, keyword); - } - } - function checkUnique(self2, id) { - if (self2._schemas[id] || self2._refs[id]) - throw new Error('schema with key or id "' + id + '" already exists'); - } - function getMetaSchemaOptions(self2) { - var metaOpts = util3.copy(self2._opts); - for (var i = 0; i < META_IGNORE_OPTIONS.length; i++) - delete metaOpts[META_IGNORE_OPTIONS[i]]; - return metaOpts; - } - function setLogger(self2) { - var logger = self2._opts.logger; - if (logger === false) { - self2.logger = { log: noop4, warn: noop4, error: noop4 }; - } else { - if (logger === void 0) logger = console; - if (!(typeof logger == "object" && logger.log && logger.warn && logger.error)) - throw new Error("logger must implement log, warn and error methods"); - self2.logger = logger; - } - } - function noop4() { } } }); -// node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/core/symbols.js +// ../node_modules/.pnpm/ajv-formats@3.0.1_ajv@8.17.1/node_modules/ajv-formats/dist/limit.js +var require_limit2 = __commonJS({ + "../node_modules/.pnpm/ajv-formats@3.0.1_ajv@8.17.1/node_modules/ajv-formats/dist/limit.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.formatLimitDefinition = void 0; + var ajv_1 = require_ajv2(); + var codegen_1 = require_codegen2(); + var ops = codegen_1.operators; + var KWDs = { + formatMaximum: { okStr: "<=", ok: ops.LTE, fail: ops.GT }, + formatMinimum: { okStr: ">=", ok: ops.GTE, fail: ops.LT }, + formatExclusiveMaximum: { okStr: "<", ok: ops.LT, fail: ops.GTE }, + formatExclusiveMinimum: { okStr: ">", ok: ops.GT, fail: ops.LTE } + }; + var error50 = { + message: ({ keyword, schemaCode }) => (0, codegen_1.str)`should be ${KWDs[keyword].okStr} ${schemaCode}`, + params: ({ keyword, schemaCode }) => (0, codegen_1._)`{comparison: ${KWDs[keyword].okStr}, limit: ${schemaCode}}` + }; + exports.formatLimitDefinition = { + keyword: Object.keys(KWDs), + type: "string", + schemaType: "string", + $data: true, + error: error50, + code(cxt) { + const { gen, data, schemaCode, keyword, it } = cxt; + const { opts, self: self2 } = it; + if (!opts.validateFormats) + return; + const fCxt = new ajv_1.KeywordCxt(it, self2.RULES.all.format.definition, "format"); + if (fCxt.$data) + validate$DataFormat(); + else + validateFormat(); + function validate$DataFormat() { + const fmts = gen.scopeValue("formats", { + ref: self2.formats, + code: opts.code.formats + }); + const fmt = gen.const("fmt", (0, codegen_1._)`${fmts}[${fCxt.schemaCode}]`); + cxt.fail$data((0, codegen_1.or)((0, codegen_1._)`typeof ${fmt} != "object"`, (0, codegen_1._)`${fmt} instanceof RegExp`, (0, codegen_1._)`typeof ${fmt}.compare != "function"`, compareCode(fmt))); + } + function validateFormat() { + const format2 = fCxt.schema; + const fmtDef = self2.formats[format2]; + if (!fmtDef || fmtDef === true) + return; + if (typeof fmtDef != "object" || fmtDef instanceof RegExp || typeof fmtDef.compare != "function") { + throw new Error(`"${keyword}": format "${format2}" does not define "compare" function`); + } + const fmt = gen.scopeValue("formats", { + key: format2, + ref: fmtDef, + code: opts.code.formats ? (0, codegen_1._)`${opts.code.formats}${(0, codegen_1.getProperty)(format2)}` : void 0 + }); + cxt.fail$data(compareCode(fmt)); + } + function compareCode(fmt) { + return (0, codegen_1._)`${fmt}.compare(${data}, ${schemaCode}) ${KWDs[keyword].fail} 0`; + } + }, + dependencies: ["format"] + }; + var formatLimitPlugin = (ajv) => { + ajv.addKeyword(exports.formatLimitDefinition); + return ajv; + }; + exports.default = formatLimitPlugin; + } +}); + +// ../node_modules/.pnpm/ajv-formats@3.0.1_ajv@8.17.1/node_modules/ajv-formats/dist/index.js +var require_dist2 = __commonJS({ + "../node_modules/.pnpm/ajv-formats@3.0.1_ajv@8.17.1/node_modules/ajv-formats/dist/index.js"(exports, module) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var formats_1 = require_formats2(); + var limit_1 = require_limit2(); + var codegen_1 = require_codegen2(); + var fullName = new codegen_1.Name("fullFormats"); + var fastName = new codegen_1.Name("fastFormats"); + var formatsPlugin = (ajv, opts = { keywords: true }) => { + if (Array.isArray(opts)) { + addFormats(ajv, opts, formats_1.fullFormats, fullName); + return ajv; + } + const [formats, exportName] = opts.mode === "fast" ? [formats_1.fastFormats, fastName] : [formats_1.fullFormats, fullName]; + const list = opts.formats || formats_1.formatNames; + addFormats(ajv, list, formats, exportName); + if (opts.keywords) + (0, limit_1.default)(ajv); + return ajv; + }; + formatsPlugin.get = (name, mode = "full") => { + const formats = mode === "fast" ? formats_1.fastFormats : formats_1.fullFormats; + const f = formats[name]; + if (!f) + throw new Error(`Unknown format "${name}"`); + return f; + }; + function addFormats(ajv, list, fs4, exportName) { + var _a2; + var _b; + (_a2 = (_b = ajv.opts.code).formats) !== null && _a2 !== void 0 ? _a2 : _b.formats = (0, codegen_1._)`require("ajv-formats/dist/formats").${exportName}`; + for (const f of list) + ajv.addFormat(f, fs4[f]); + } + module.exports = exports = formatsPlugin; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.default = formatsPlugin; + } +}); + +// ../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/core/symbols.js var require_symbols6 = __commonJS({ - "node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/core/symbols.js"(exports, module) { + "../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/core/symbols.js"(exports, module) { "use strict"; module.exports = { kClose: Symbol("close"), @@ -37325,9 +51416,9 @@ var require_symbols6 = __commonJS({ } }); -// node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/util/timers.js +// ../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/util/timers.js var require_timers2 = __commonJS({ - "node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/util/timers.js"(exports, module) { + "../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/util/timers.js"(exports, module) { "use strict"; var fastNow = 0; var RESOLUTION_MS = 1e3; @@ -37554,9 +51645,9 @@ var require_timers2 = __commonJS({ } }); -// node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/core/errors.js -var require_errors2 = __commonJS({ - "node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/core/errors.js"(exports, module) { +// ../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/core/errors.js +var require_errors5 = __commonJS({ + "../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/core/errors.js"(exports, module) { "use strict"; var kUndiciError = Symbol.for("undici.error.UND_ERR"); var UndiciError = class extends Error { @@ -37938,9 +52029,9 @@ var require_errors2 = __commonJS({ } }); -// node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/core/constants.js +// ../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/core/constants.js var require_constants6 = __commonJS({ - "node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/core/constants.js"(exports, module) { + "../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/core/constants.js"(exports, module) { "use strict"; var wellknownHeaderNames = ( /** @type {const} */ @@ -38066,9 +52157,9 @@ var require_constants6 = __commonJS({ } }); -// node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/core/tree.js +// ../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/core/tree.js var require_tree = __commonJS({ - "node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/core/tree.js"(exports, module) { + "../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/core/tree.js"(exports, module) { "use strict"; var { wellknownHeaderNames, @@ -38208,11 +52299,11 @@ var require_tree = __commonJS({ } }); -// node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/core/util.js +// ../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/core/util.js var require_util11 = __commonJS({ - "node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/core/util.js"(exports, module) { + "../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/core/util.js"(exports, module) { "use strict"; - var assert3 = __require("node:assert"); + var assert4 = __require("node:assert"); var { kDestroyed, kBodyUsed, kListeners, kBody } = require_symbols6(); var { IncomingMessage } = __require("node:http"); var stream = __require("node:stream"); @@ -38220,7 +52311,7 @@ var require_util11 = __commonJS({ var { stringify } = __require("node:querystring"); var { EventEmitter: EE } = __require("node:events"); var timers = require_timers2(); - var { InvalidArgumentError, ConnectTimeoutError } = require_errors2(); + var { InvalidArgumentError, ConnectTimeoutError } = require_errors5(); var { headerNameLowerCasedRecord } = require_constants6(); var { tree } = require_tree(); var [nodeMajor, nodeMinor] = process.versions.node.split(".", 2).map((v) => Number(v)); @@ -38230,7 +52321,7 @@ var require_util11 = __commonJS({ this[kBodyUsed] = false; } async *[Symbol.asyncIterator]() { - assert3(!this[kBodyUsed], "disturbed"); + assert4(!this[kBodyUsed], "disturbed"); this[kBodyUsed] = true; yield* this[kBody]; } @@ -38241,7 +52332,7 @@ var require_util11 = __commonJS({ if (isStream(body)) { if (bodyLength(body) === 0) { body.on("data", function() { - assert3(false); + assert4(false); }); } if (typeof body.readableDidRead !== "boolean") { @@ -38262,30 +52353,30 @@ var require_util11 = __commonJS({ function isStream(obj) { return obj && typeof obj === "object" && typeof obj.pipe === "function" && typeof obj.on === "function"; } - function isBlobLike(object2) { - if (object2 === null) { + function isBlobLike(object6) { + if (object6 === null) { return false; - } else if (object2 instanceof Blob) { + } else if (object6 instanceof Blob) { return true; - } else if (typeof object2 !== "object") { + } else if (typeof object6 !== "object") { return false; } else { - const sTag = object2[Symbol.toStringTag]; - return (sTag === "Blob" || sTag === "File") && ("stream" in object2 && typeof object2.stream === "function" || "arrayBuffer" in object2 && typeof object2.arrayBuffer === "function"); + const sTag = object6[Symbol.toStringTag]; + return (sTag === "Blob" || sTag === "File") && ("stream" in object6 && typeof object6.stream === "function" || "arrayBuffer" in object6 && typeof object6.arrayBuffer === "function"); } } - function pathHasQueryOrFragment(url2) { - return url2.includes("?") || url2.includes("#"); + function pathHasQueryOrFragment(url4) { + return url4.includes("?") || url4.includes("#"); } - function serializePathWithQuery(url2, queryParams) { - if (pathHasQueryOrFragment(url2)) { + function serializePathWithQuery(url4, queryParams) { + if (pathHasQueryOrFragment(url4)) { throw new Error('Query params cannot be passed when url already contains "?" or "#".'); } const stringified = stringify(queryParams); if (stringified) { - url2 += "?" + stringified; + url4 += "?" + stringified; } - return url2; + return url4; } function isValidPort(port) { const value2 = parseInt(port, 10); @@ -38294,39 +52385,39 @@ var require_util11 = __commonJS({ function isHttpOrHttpsPrefixed(value2) { return value2 != null && value2[0] === "h" && value2[1] === "t" && value2[2] === "t" && value2[3] === "p" && (value2[4] === ":" || value2[4] === "s" && value2[5] === ":"); } - function parseURL(url2) { - if (typeof url2 === "string") { - url2 = new URL(url2); - if (!isHttpOrHttpsPrefixed(url2.origin || url2.protocol)) { + function parseURL(url4) { + if (typeof url4 === "string") { + url4 = new URL(url4); + if (!isHttpOrHttpsPrefixed(url4.origin || url4.protocol)) { throw new InvalidArgumentError("Invalid URL protocol: the URL must start with `http:` or `https:`."); } - return url2; + return url4; } - if (!url2 || typeof url2 !== "object") { + if (!url4 || typeof url4 !== "object") { throw new InvalidArgumentError("Invalid URL: The URL argument must be a non-null object."); } - if (!(url2 instanceof URL)) { - if (url2.port != null && url2.port !== "" && isValidPort(url2.port) === false) { + if (!(url4 instanceof URL)) { + if (url4.port != null && url4.port !== "" && isValidPort(url4.port) === false) { throw new InvalidArgumentError("Invalid URL: port must be a valid integer or a string representation of an integer."); } - if (url2.path != null && typeof url2.path !== "string") { + if (url4.path != null && typeof url4.path !== "string") { throw new InvalidArgumentError("Invalid URL path: the path must be a string or null/undefined."); } - if (url2.pathname != null && typeof url2.pathname !== "string") { + if (url4.pathname != null && typeof url4.pathname !== "string") { throw new InvalidArgumentError("Invalid URL pathname: the pathname must be a string or null/undefined."); } - if (url2.hostname != null && typeof url2.hostname !== "string") { + if (url4.hostname != null && typeof url4.hostname !== "string") { throw new InvalidArgumentError("Invalid URL hostname: the hostname must be a string or null/undefined."); } - if (url2.origin != null && typeof url2.origin !== "string") { + if (url4.origin != null && typeof url4.origin !== "string") { throw new InvalidArgumentError("Invalid URL origin: the origin must be a string or null/undefined."); } - if (!isHttpOrHttpsPrefixed(url2.origin || url2.protocol)) { + if (!isHttpOrHttpsPrefixed(url4.origin || url4.protocol)) { throw new InvalidArgumentError("Invalid URL protocol: the URL must start with `http:` or `https:`."); } - const port = url2.port != null ? url2.port : url2.protocol === "https:" ? 443 : 80; - let origin = url2.origin != null ? url2.origin : `${url2.protocol || ""}//${url2.hostname || ""}:${port}`; - let path4 = url2.path != null ? url2.path : `${url2.pathname || ""}${url2.search || ""}`; + const port = url4.port != null ? url4.port : url4.protocol === "https:" ? 443 : 80; + let origin = url4.origin != null ? url4.origin : `${url4.protocol || ""}//${url4.hostname || ""}:${port}`; + let path4 = url4.path != null ? url4.path : `${url4.pathname || ""}${url4.search || ""}`; if (origin[origin.length - 1] === "/") { origin = origin.slice(0, origin.length - 1); } @@ -38335,22 +52426,22 @@ var require_util11 = __commonJS({ } return new URL(`${origin}${path4}`); } - if (!isHttpOrHttpsPrefixed(url2.origin || url2.protocol)) { + if (!isHttpOrHttpsPrefixed(url4.origin || url4.protocol)) { throw new InvalidArgumentError("Invalid URL protocol: the URL must start with `http:` or `https:`."); } - return url2; + return url4; } - function parseOrigin(url2) { - url2 = parseURL(url2); - if (url2.pathname !== "/" || url2.search || url2.hash) { + function parseOrigin(url4) { + url4 = parseURL(url4); + if (url4.pathname !== "/" || url4.search || url4.hash) { throw new InvalidArgumentError("invalid url"); } - return url2; + return url4; } function getHostname(host) { if (host[0] === "[") { const idx2 = host.indexOf("]"); - assert3(idx2 !== -1); + assert4(idx2 !== -1); return host.substring(1, idx2); } const idx = host.indexOf(":"); @@ -38361,7 +52452,7 @@ var require_util11 = __commonJS({ if (!host) { return null; } - assert3(typeof host === "string"); + assert4(typeof host === "string"); const servername = getHostname(host); if (net.isIP(servername)) { return ""; @@ -38561,8 +52652,8 @@ var require_util11 = __commonJS({ } ); } - function isFormDataLike(object2) { - return object2 && typeof object2 === "object" && typeof object2.append === "function" && typeof object2.delete === "function" && typeof object2.get === "function" && typeof object2.getAll === "function" && typeof object2.has === "function" && typeof object2.set === "function" && object2[Symbol.toStringTag] === "FormData"; + function isFormDataLike(object6) { + return object6 && typeof object6 === "object" && typeof object6.append === "function" && typeof object6.delete === "function" && typeof object6.get === "function" && typeof object6.getAll === "function" && typeof object6.has === "function" && typeof object6.set === "function" && object6[Symbol.toStringTag] === "FormData"; } function addAbortListener(signal, listener) { if ("addEventListener" in signal) { @@ -38639,7 +52730,7 @@ var require_util11 = __commonJS({ function errorRequest(client, request2, err) { try { request2.onError(err); - assert3(request2.aborted); + assert4(request2.aborted); } catch (err2) { client.emit("error", err2); } @@ -38773,9 +52864,9 @@ var require_util11 = __commonJS({ } }); -// node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/util/stats.js +// ../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/util/stats.js var require_stats = __commonJS({ - "node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/util/stats.js"(exports, module) { + "../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/util/stats.js"(exports, module) { "use strict"; var { kConnected, @@ -38807,9 +52898,9 @@ var require_stats = __commonJS({ } }); -// node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/core/diagnostics.js +// ../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/core/diagnostics.js var require_diagnostics = __commonJS({ - "node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/core/diagnostics.js"(exports, module) { + "../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/core/diagnostics.js"(exports, module) { "use strict"; var diagnosticsChannel = __require("node:diagnostics_channel"); var util3 = __require("node:util"); @@ -38847,14 +52938,14 @@ var require_diagnostics = __commonJS({ "undici:client:beforeConnect", (evt) => { const { - connectParams: { version: version2, protocol, port, host } + connectParams: { version: version4, protocol, port, host } } = evt; debugLog( "connecting to %s%s using %s%s", host, port ? `:${port}` : "", protocol, - version2 + version4 ); } ); @@ -38862,14 +52953,14 @@ var require_diagnostics = __commonJS({ "undici:client:connected", (evt) => { const { - connectParams: { version: version2, protocol, port, host } + connectParams: { version: version4, protocol, port, host } } = evt; debugLog( "connected to %s%s using %s%s", host, port ? `:${port}` : "", protocol, - version2 + version4 ); } ); @@ -38877,16 +52968,16 @@ var require_diagnostics = __commonJS({ "undici:client:connectError", (evt) => { const { - connectParams: { version: version2, protocol, port, host }, - error: error41 + connectParams: { version: version4, protocol, port, host }, + error: error50 } = evt; debugLog( "connection to %s%s using %s%s errored - %s", host, port ? `:${port}` : "", protocol, - version2, - error41.message + version4, + error50.message ); } ); @@ -38936,14 +53027,14 @@ var require_diagnostics = __commonJS({ (evt) => { const { request: { method, path: path4, origin }, - error: error41 + error: error50 } = evt; debugLog( "request to %s %s%s errored - %s", method, origin, path4, - error41.message + error50.message ); } ); @@ -39008,15 +53099,15 @@ var require_diagnostics = __commonJS({ } }); -// node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/core/request.js +// ../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/core/request.js var require_request3 = __commonJS({ - "node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/core/request.js"(exports, module) { + "../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/core/request.js"(exports, module) { "use strict"; var { InvalidArgumentError, NotSupportedError - } = require_errors2(); - var assert3 = __require("node:assert"); + } = require_errors5(); + var assert4 = __require("node:assert"); var { isValidHTTPToken, isValidHeaderValue, @@ -39193,8 +53284,8 @@ var require_request3 = __commonJS({ } } onConnect(abort) { - assert3(!this.aborted); - assert3(!this.completed); + assert4(!this.aborted); + assert4(!this.completed); if (this.error) { abort(this.error); } else { @@ -39206,8 +53297,8 @@ var require_request3 = __commonJS({ return this[kHandler].onResponseStarted?.(); } onHeaders(statusCode, headers, resume, statusText) { - assert3(!this.aborted); - assert3(!this.completed); + assert4(!this.aborted); + assert4(!this.completed); if (channels.headers.hasSubscribers) { channels.headers.publish({ request: this, response: { statusCode, headers, statusText } }); } @@ -39218,8 +53309,8 @@ var require_request3 = __commonJS({ } } onData(chunk) { - assert3(!this.aborted); - assert3(!this.completed); + assert4(!this.aborted); + assert4(!this.completed); if (channels.bodyChunkReceived.hasSubscribers) { channels.bodyChunkReceived.publish({ request: this, chunk }); } @@ -39231,14 +53322,14 @@ var require_request3 = __commonJS({ } } onUpgrade(statusCode, headers, socket) { - assert3(!this.aborted); - assert3(!this.completed); + assert4(!this.aborted); + assert4(!this.completed); return this[kHandler].onUpgrade(statusCode, headers, socket); } onComplete(trailers) { this.onFinally(); - assert3(!this.aborted); - assert3(!this.completed); + assert4(!this.aborted); + assert4(!this.completed); this.completed = true; if (channels.trailers.hasSubscribers) { channels.trailers.publish({ request: this, trailers }); @@ -39249,16 +53340,16 @@ var require_request3 = __commonJS({ this.onError(err); } } - onError(error41) { + onError(error50) { this.onFinally(); if (channels.error.hasSubscribers) { - channels.error.publish({ request: this, error: error41 }); + channels.error.publish({ request: this, error: error50 }); } if (this.aborted) { return; } this.aborted = true; - return this[kHandler].onError(error41); + return this[kHandler].onError(error50); } onFinally() { if (this.errorHandler) { @@ -39347,11 +53438,11 @@ var require_request3 = __commonJS({ } }); -// node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/handler/wrap-handler.js +// ../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/handler/wrap-handler.js var require_wrap_handler = __commonJS({ - "node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/handler/wrap-handler.js"(exports, module) { + "../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/handler/wrap-handler.js"(exports, module) { "use strict"; - var { InvalidArgumentError } = require_errors2(); + var { InvalidArgumentError } = require_errors5(); module.exports = class WrapHandler { #handler; constructor(handler2) { @@ -39424,9 +53515,9 @@ var require_wrap_handler = __commonJS({ } }); -// node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/dispatcher/dispatcher.js +// ../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/dispatcher/dispatcher.js var require_dispatcher2 = __commonJS({ - "node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/dispatcher/dispatcher.js"(exports, module) { + "../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/dispatcher/dispatcher.js"(exports, module) { "use strict"; var EventEmitter2 = __require("node:events"); var WrapHandler = require_wrap_handler(); @@ -39466,12 +53557,12 @@ var require_dispatcher2 = __commonJS({ } }); -// node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/handler/unwrap-handler.js +// ../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/handler/unwrap-handler.js var require_unwrap_handler = __commonJS({ - "node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/handler/unwrap-handler.js"(exports, module) { + "../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/handler/unwrap-handler.js"(exports, module) { "use strict"; var { parseHeaders } = require_util11(); - var { InvalidArgumentError } = require_errors2(); + var { InvalidArgumentError } = require_errors5(); var kResume = Symbol("resume"); var UnwrapController = class { #paused = false; @@ -39546,9 +53637,9 @@ var require_unwrap_handler = __commonJS({ } }); -// node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/dispatcher/dispatcher-base.js +// ../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/dispatcher/dispatcher-base.js var require_dispatcher_base2 = __commonJS({ - "node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/dispatcher/dispatcher-base.js"(exports, module) { + "../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/dispatcher/dispatcher-base.js"(exports, module) { "use strict"; var Dispatcher = require_dispatcher2(); var UnwrapHandler = require_unwrap_handler(); @@ -39556,7 +53647,7 @@ var require_dispatcher_base2 = __commonJS({ ClientDestroyedError, ClientClosedError, InvalidArgumentError - } = require_errors2(); + } = require_errors5(); var { kDestroy, kClose, kClosed, kDestroyed, kDispatch } = require_symbols6(); var kOnDestroyed = Symbol("onDestroyed"); var kOnClosed = Symbol("onClosed"); @@ -39685,14 +53776,14 @@ var require_dispatcher_base2 = __commonJS({ } }); -// node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/core/connect.js +// ../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/core/connect.js var require_connect2 = __commonJS({ - "node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/core/connect.js"(exports, module) { + "../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/core/connect.js"(exports, module) { "use strict"; var net = __require("node:net"); - var assert3 = __require("node:assert"); + var assert4 = __require("node:assert"); var util3 = require_util11(); - var { InvalidArgumentError } = require_errors2(); + var { InvalidArgumentError } = require_errors5(); var tls; var SessionCache = class WeakSessionCache { constructor(maxCachedSessions) { @@ -39728,15 +53819,15 @@ 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: hostname5, 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; - assert3(sessionKey); + const sessionKey = servername || hostname5; + assert4(sessionKey); const session = customSession || sessionCache.get(sessionKey) || null; port = port || 443; socket = tls.connect({ @@ -39750,13 +53841,13 @@ var require_connect2 = __commonJS({ socket: httpSocket, // upgrade socket connection port, - host: hostname2 + host: hostname5 }); socket.on("session", function(session2) { sessionCache.set(sessionKey, session2); }); } else { - assert3(!httpSocket, "httpSocket can only be sent on TLS update"); + assert4(!httpSocket, "httpSocket can only be sent on TLS update"); port = port || 80; socket = net.connect({ highWaterMark: 64 * 1024, @@ -39764,14 +53855,14 @@ var require_connect2 = __commonJS({ ...options, localAddress, port, - host: hostname2 + host: hostname5 }); } 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: hostname5, port }); socket.setNoDelay(true).once(protocol === "https:" ? "secureConnect" : "connect", function() { queueMicrotask(clearConnectTimeout); if (callback) { @@ -39794,9 +53885,9 @@ var require_connect2 = __commonJS({ } }); -// node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/llhttp/utils.js -var require_utils4 = __commonJS({ - "node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/llhttp/utils.js"(exports) { +// ../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/llhttp/utils.js +var require_utils7 = __commonJS({ + "../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/llhttp/utils.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.enumToMap = enumToMap; @@ -39810,13 +53901,13 @@ var require_utils4 = __commonJS({ } }); -// node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/llhttp/constants.js +// ../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/llhttp/constants.js var require_constants7 = __commonJS({ - "node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/llhttp/constants.js"(exports) { + "../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/llhttp/constants.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.SPECIAL_HEADERS = exports.MINOR = exports.MAJOR = exports.HTAB_SP_VCHAR_OBS_TEXT = exports.QUOTED_STRING = exports.CONNECTION_TOKEN_CHARS = exports.HEADER_CHARS = exports.TOKEN = exports.HEX = exports.URL_CHAR = exports.USERINFO_CHARS = exports.MARK = exports.ALPHANUM = exports.NUM = exports.HEX_MAP = exports.NUM_MAP = exports.ALPHA = exports.STATUSES_HTTP = exports.H_METHOD_MAP = exports.METHOD_MAP = exports.METHODS_RTSP = exports.METHODS_ICE = exports.METHODS_HTTP = exports.HEADER_STATE = exports.FINISH = exports.STATUSES = exports.METHODS = exports.LENIENT_FLAGS = exports.FLAGS = exports.TYPE = exports.ERROR = void 0; - var utils_1 = require_utils4(); + var utils_1 = require_utils7(); exports.ERROR = { OK: 0, INTERNAL: 1, @@ -40433,9 +54524,9 @@ var require_constants7 = __commonJS({ } }); -// node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/llhttp/llhttp-wasm.js +// ../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/llhttp/llhttp-wasm.js var require_llhttp_wasm2 = __commonJS({ - "node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/llhttp/llhttp-wasm.js"(exports, module) { + "../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/llhttp/llhttp-wasm.js"(exports, module) { "use strict"; var { Buffer: Buffer2 } = __require("node:buffer"); var wasmBase64 = "AGFzbQEAAAABJwdgAX8Bf2ADf39/AX9gAn9/AGABfwBgBH9/f38Bf2AAAGADf39/AALLAQgDZW52GHdhc21fb25faGVhZGVyc19jb21wbGV0ZQAEA2VudhV3YXNtX29uX21lc3NhZ2VfYmVnaW4AAANlbnYLd2FzbV9vbl91cmwAAQNlbnYOd2FzbV9vbl9zdGF0dXMAAQNlbnYUd2FzbV9vbl9oZWFkZXJfZmllbGQAAQNlbnYUd2FzbV9vbl9oZWFkZXJfdmFsdWUAAQNlbnYMd2FzbV9vbl9ib2R5AAEDZW52GHdhc21fb25fbWVzc2FnZV9jb21wbGV0ZQAAAzU0BQYAAAMAAAAAAAADAQMAAwMDAAACAAAAAAICAgICAgICAgIBAQEBAQEBAQEBAwAAAwAAAAQFAXABExMFAwEAAgYIAX8BQcDZBAsHxQcoBm1lbW9yeQIAC19pbml0aWFsaXplAAgZX19pbmRpcmVjdF9mdW5jdGlvbl90YWJsZQEAC2xsaHR0cF9pbml0AAkYbGxodHRwX3Nob3VsZF9rZWVwX2FsaXZlADcMbGxodHRwX2FsbG9jAAsGbWFsbG9jADkLbGxodHRwX2ZyZWUADARmcmVlAAwPbGxodHRwX2dldF90eXBlAA0VbGxodHRwX2dldF9odHRwX21ham9yAA4VbGxodHRwX2dldF9odHRwX21pbm9yAA8RbGxodHRwX2dldF9tZXRob2QAEBZsbGh0dHBfZ2V0X3N0YXR1c19jb2RlABESbGxodHRwX2dldF91cGdyYWRlABIMbGxodHRwX3Jlc2V0ABMObGxodHRwX2V4ZWN1dGUAFBRsbGh0dHBfc2V0dGluZ3NfaW5pdAAVDWxsaHR0cF9maW5pc2gAFgxsbGh0dHBfcGF1c2UAFw1sbGh0dHBfcmVzdW1lABgbbGxodHRwX3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CACABIARBAXI2AgQMAwtBACEACyAGRQ0AAkAgBSgCHCICQQJ0QfTXAGoiAygCACAFRgRAIAMgADYCACAADQFByNUAQcjVACgCAEF+IAJ3cTYCAAwCCyAGQRBBFCAGKAIQIAVGG2ogADYCACAARQ0BCyAAIAY2AhggBSgCECICBEAgACACNgIQIAIgADYCGAsgBUEUaigCACICRQ0AIABBFGogAjYCACACIAA2AhgLIAEgBGogBDYCACABIARBAXI2AgQgAUHY1QAoAgBHDQBBzNUAIAQ2AgAMAQsgBEH/AU0EQCAEQXhxQezVAGohAAJ/QcTVACgCACICQQEgBEEDdnQiA3FFBEBBxNUAIAIgA3I2AgAgAAwBCyAAKAIICyICIAE2AgwgACABNgIIIAEgADYCDCABIAI2AggMAQtBHyECIARB////B00EQCAEQSYgBEEIdmciAGt2QQFxIABBAXRrQT5qIQILIAEgAjYCHCABQgA3AhAgAkECdEH01wBqIQACQEHI1QAoAgAiA0EBIAJ0IgdxRQRAIAAgATYCAEHI1QAgAyAHcjYCACABIAA2AhggASABNgIIIAEgATYCDAwBCyAEQRkgAkEBdmtBACACQR9HG3QhAiAAKAIAIQACQANAIAAiAygCBEF4cSAERg0BIAJBHXYhACACQQF0IQIgAyAAQQRxakEQaiIHKAIAIgANAAsgByABNgIAIAEgAzYCGCABIAE2AgwgASABNgIIDAELIAMoAggiACABNgIMIAMgATYCCCABQQA2AhggASADNgIMIAEgADYCCAtB5NUAQeTVACgCAEEBayIAQX8gABs2AgALCwcAIAAtACgLBwAgAC0AKgsHACAALQArCwcAIAAtACkLBwAgAC8BNAsHACAALQAwC0ABBH8gACgCGCEBIAAvAS4hAiAALQAoIQMgACgCOCEEIAAQOCAAIAQ2AjggACADOgAoIAAgAjsBLiAAIAE2AhgL5YUCAgd/A34gASACaiEEAkAgACIDKAIMIgANACADKAIEBEAgAyABNgIECyMAQRBrIgkkAAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAn8CQAJAAk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ACQAJAAkACQAJAAn8CQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAn8CQAJAAkACQAJAAkACQAJ/AkACQAJAAn8CQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIAMCfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAgAg7jAQABAgMEBQYHCAkKCwwNDg8QERITFBUWFxgZGhscHR4fICEjJCUnKCmeA5sDmgORA4oDgwOAA/0C+wL4AvIC8QLvAu0C6ALnAuYC5QLkAtwC2wLaAtkC2ALXAtYC1QLPAs4CzALLAsoCyQLIAscCxgLEAsMCvgK8AroCuQK4ArcCtgK1ArQCswKyArECsAKuAq0CqQKoAqcCpgKlAqQCowKiAqECoAKfApgCkAKMAosCigKBAv4B/QH8AfsB+gH5AfgB9wH1AfMB8AHrAek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FBAWoiAUcNAAtBwAAhAgzuAgsgAygCBCEAIANBADYCBCADIAAgAUEBaiIBEDEiAA0XDOICC0HAACECDOwCCyABIARGBEBByQAhAgzsAgsCQANAAkAgAS0AAEEJaw4YAAKiAqICqQKiAqICogKiAqICogKiAqICogKiAqICogKiAqICogKiAqICogIAogILIAQgAUEBaiIBRw0AC0HJACECDOwCCyABQQFqIQEgA0Evai0AAEEBcQ2lAiADQQA2AhwgAyABNgIUIANBlxA2AhAgA0EKNgIMQQAhAgzrAgsgASAERwRAA0AgAS0AAEEgRw0VIAQgAUEBaiIBRw0AC0H4ACECDOsCC0H4ACECDOoCCyADQQI6ACgMOAtBACECIANBADYCHCADQb8LNgIQIANBAjYCDCADIAFBAWo2AhQM6AILQQAhAgzOAgtBDSECDM0CC0ETIQIMzAILQRUhAgzLAgtBFiECDMoCC0EYIQIMyQILQRkhAgzIAgtBGiECDMcCC0EbIQIMxgILQRwhAgzFAgtBHSECDMQCC0EeIQIMwwILQR8hAgzCAgtBICECDMECC0EiIQIMwAILQSMhAgy/AgtBJSECDL4CC0HlACECDL0CCyADQT02AhwgAyABNgIUIAMgADYCDEEAIQIM1QILIANBGzYCHCADIAE2AhQgA0GkHDYCECADQRU2AgxBACECDNQCCyADQSA2AhwgAyABNgIUIANBmBo2AhAgA0EVNgIMQQAhAgzTAgsgA0ETNgIcIAMgATYCFCADQZgaNgIQIANBFTYCDEEAIQIM0gILIANBCzYCHCADIAE2AhQgA0GYGjYCECADQRU2AgxBACECDNECCyADQRA2AhwgAyABNgIUIANBmBo2AhAgA0EVNgIMQQAhAgzQAgsgA0EgNgIcIAMgATYCFCADQaQcNgIQIANBFTYCDEEAIQIMzwILIANBCzYCHCADIAE2AhQgA0GkHDYCECADQRU2AgxBACECDM4CCyADQQw2AhwgAyABNgIUIANBpBw2AhAgA0EVNgIMQQAhAgzNAgtBACECIANBADYCHCADIAE2AhQgA0HdDjYCECADQRI2AgwMzAILAkADQAJAIAEtAABBCmsOBAACAgACCyAEIAFBAWoiAUcNAAtB/QEhAgzMAgsCQAJAIAMtADZBAUcNAEEAIQACQCADKAI4IgJFDQAgAigCYCICRQ0AIAMgAhEAACEACyAARQ0AIABBFUcNASADQfwBNgIcIAMgATYCFCADQdwZNgIQIANBFTYCDEEAIQIMzQILQdwBIQIMswILIANBADYCHCADIAE2AhQgA0H5CzYCECADQR82AgxBACECDMsCCwJAAkAgAy0AKEEBaw4CBAEAC0HbASECDLICC0HUASECDLECCyADQQI6ADFBACEAAkAgAygCOCICRQ0AIAIoAgAiAkUNACADIAIRAAAhAAsgAEUEQEHdASECDLECCyAAQRVHBEAgA0EANgIcIAMgATYCFCADQbQMNgIQIANBEDYCDEEAIQIMygILIANB+wE2AhwgAyABNgIUIANBgRo2AhAgA0EVNgIMQQAhAgzJAgsgASAERgRAQfoBIQIMyQILIAEtAABByABGDQEgA0EBOgAoC0HAASECDK4CC0HaASECDK0CCyABIARHBEAgA0EMNgIIIAMgATYCBEHZASECDK0CC0H5ASECDMUCCyABIARGBEBB+AEhAgzFAgsgAS0AAEHIAEcNBCABQQFqIQFB2AEhAgyrAgsgASAERgRAQfcBIQIMxAILAkACQCABLQAAQcUAaw4QAAUFBQUFBQUFBQUFBQUFAQULIAFBAWohAUHWASECDKsCCyABQQFqIQFB1wEhAgyqAgtB9gEhAiABIARGDcICIAMoAgAiACAEIAFraiEFIAEgAGtBAmohBgJAA0AgAS0AACAAQbrVAGotAABHDQMgAEECRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADMMCCyADKAIEIQAgA0IANwMAIAMgACAGQQFqIgEQLiIARQRAQeMBIQIMqgILIANB9QE2AhwgAyABNgIUIAMgADYCDEEAIQIMwgILQfQBIQIgASAERg3BAiADKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEG41QBqLQAARw0CIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAzCAgsgA0GBBDsBKCADKAIEIQAgA0IANwMAIAMgACAGQ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qDTYCECADQSY2AgxBACECDLQCC0HOASECDJoCCyADQesBNgIcIAMgATYCFCADQYAbNgIQIANBFTYCDEEAIQIMsgILIAEgBEYEQEHrASECDLICCyABLQAAQS9GBEAgAUEBaiEBDAELIANBADYCHCADIAE2AhQgA0GyODYCECADQQg2AgxBACECDLECC0HNASECDJcCCyABIARHBEAgA0EONgIIIAMgATYCBEHMASECDJcCC0HqASECDK8CCyABIARGBEBB6QEhAgyvAgsgAS0AAEEwayIAQf8BcUEKSQRAIAMgADoAKiABQQFqIQFBywEhAgyWAgsgAygCBCEAIANBADYCBCADIAAgARAvIgBFDZcCIANB6AE2AhwgAyABNgIUIAMgADYCDEEAIQIMrgILIAEgBEYEQEHnASECDK4CCwJAIAEtAABBLkYEQCABQQFqIQEMAQsgAygCBCEAIANBADYCBCADIAAgARAvIgBFDZgCIANB5gE2AhwgAyABNgIUIAMgADYCDEEAIQIMrgILQcoBIQIMlAILIAEgBEYEQEHlASECDK0CC0EAIQBBASEFQQEhB0EAIQICQAJAAkACQAJAAn8CQAJAAkACQAJAAkACQCABLQAAQTBrDgoKCQABAgMEBQYICwtBAgwGC0EDDAULQQQMBAtBBQwDC0EGDAILQQcMAQtBCAshAkEAIQVBACEHDAILQQkhAkEBIQBBACEFQQAhBwwBC0EAIQVBASECCyADIAI6ACsgAUEBaiEBAkACQCADLQAuQRBxDQACQAJAAkAgAy0AKg4DAQACBAsgB0UNAwwCCyAADQEMAgsgBUUNAQsgAygCBCEAIANBADYCBCADIAAgARAvIgBFDQIgA0HiATYCHCADIAE2AhQgAyAANgIMQQAhAgyvAgsgAygCBCEAIANBADYCBCADIAAgARAvIgBFDZoCIANB4wE2AhwgAyABNgIUIAMgADYCDEEAIQIMrgILIAMoAgQhACADQQA2AgQgAyAAIAEQLyIARQ2YAiADQeQBNgIcIAMgATYCFCADIAA2AgwMrQILQckBIQIMkwILQQAhAAJAIAMoAjgiAkUNACACKAJEIgJFDQAgAyACEQAAIQALAkAgAARAIABBFUYNASADQ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hQgA0GNCzYCECADQQ02AgxBACECDKcCCyADQQA2AhwgAyABNgIUIANBjQs2AhAgA0ENNgIMQQAhAgymAgsgASAERwRAIANBDzYCCCADIAE2AgRBASECDI0CC0HcASECDKUCCwJAAkADQAJAIAEtAABBCmsOBAIAAAMACyAEIAFBAWoiAUcNAAtB2wEhAgymAgsgAygCBCEAIANBADYCBCADIAAgARAtIgBFBEAgAUEBaiEBDAQLIANB2gE2AhwgAyAANgIMIAMgAUEBajYCFEEAIQIMpQILIAMoAgQhACADQQA2AgQgAyAAIAEQLSIADQEgAUEBagshAUHBASECDIoCCyADQdkBNgIcIAMgADYCDCADIAFBAWo2AhRBACECDKICC0HCASECDIgCCyADQS9qLQAAQQFxDQEgA0EANgIcIAMgATYCFCADQeQcNgIQIANBGTYCDEEAIQIMoAILIAEgBEYEQEHZASECDKACCwJAAkACQCABLQAAQQprDgQBAgIAAgsgAUEBaiEBDAILIAFBAWohAQwBCyADLQAuQcAAcUUNAQtBACEAAkAgAygCOCICRQ0AIAIoAjwiAkUNACADIAIRAAAhAAsgAEUNoAEgAEEVRgRAIANB2QA2AhwgAyABNgIUIANBtxo2AhAgA0EVNgIMQQAhAgyfAgsgA0EANgIcIAMgATYCFCADQYANNgIQIANBGzYCDEEAIQIMngILIANBADYCHCADIAE2AhQgA0HcKDYCECADQQI2AgxBACECDJ0CCyABIARHBEAgA0EMNgIIIAMgATYCBEG/ASECDIQCC0HYASECDJwCCyABIARGBEBB1wEhAgycAgsCQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIAEtAABBwQBrDhUAAQIDWgQFBlpaWgcICQoLDA0ODxBaCyABQQFqIQFB+wAhAgySAgsgAUEBaiEBQfwAIQIMkQILIAFBAWohAUGBASECDJACCyABQQFqIQFBhQEhAgyPAgsgAUEBaiEBQYYBIQIMjgILIAFBAWohAUGJASECDI0CCyABQQFqIQFBigEhAgyMAgsgAUEBaiEBQY0BIQIMiwILIAFBAWohAUGWASECDIoCCyABQQF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FBGAwXCyABIARGBEBBpQEhAgzqAQsCQAJAIAEtAABByQBrDgcAGRkZGRkBGQsgAUEBaiEBQYsBIQIM0QELIAFBAWohAUGMASECDNABC0GkASECIAEgBEYN6AEgAygCACIAIAQgAWtqIQUgASAAa0EBaiEGAkADQCABLQAAIABBptUAai0AAEcNFSAAQQFGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAM6QELIANBADYCACAGQQFqIQFBCQwVC0GjASECIAEgBEYN5wEgAygCACIAIAQgAWtqIQUgASAAa0EBaiEGAkADQCABLQAAIABBpNUAai0AAEcNFCAAQQFGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAM6AELIANBADYCACAGQQFqIQFBHwwUC0GiASECIAEgBEYN5gEgAygCACIAIAQgAWtqIQUgASAAa0ECaiEGAkADQCABLQAAIABBvtQAai0AAEcNEyAAQQJGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAM5wELIANBADYCACAGQQFqIQFBAgwTC0GhASECIAEgBEYN5QEgAygCACIAIAQgAWtqIQUgASAAa0EBaiEGA0AgAS0AACAAQbzUAGotAABHDREgAEEBRg0CIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADOUBCyABIARGBEBBoAEhAgzlAQtBASABLQAAQd8ARw0RGiABQQFqIQFBhwEhAgzLAQsgA0EANgIAIAZBAWohAUGIASECDMoBC0GfASECIAEgBEYN4gEgAygCACIAIAQgAWtqIQUgASAAa0EIaiEGAkADQCABLQAAIABBhNUAai0AAEcNDyAAQQhGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAM4wELIANBADYCACAGQQFqIQFBKQwPC0GeASECIAEgBEYN4QEgAygCACIAIAQgAWtqIQUgASAAa0EDaiEGAkADQCABLQAAIABBuNQAai0AAEcNDiAAQQNGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAM4gELIANBADYCACAGQQFqIQFBLQwOCyABIARGBEBBnQEhAgzhAQsgAS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gA0EANgIAIAZBAWohAUEQDAQLIAEgBEYEQEGTASECDNcBCwJAAkAgAS0AAEHDAGsODAAGBgYGBgYGBgYGAQYLIAFBAWohAUH5ACECDL4BCyABQQFqIQFB+gAhAgy9AQtBkgEhAiABIARGDdUBIAMoAgAiACAEIAFraiEFIAEgAGtBBWohBgJAA0AgAS0AACAAQaDUAGotAABHDQIgAEEFRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADNYBCyADQQA2AgAgBkEBaiEBQSQMAgsgA0EANgIADAILIAEgBEYEQEGRASECDNQBCyABLQAAQcwARw0BIAFBAWohAUETCzoAKSADKAIEIQAgA0EANgIEIAMgACABEC4iAA0CDAELQQAhAiADQQA2AhwgAyABNgIUIANB/h82AhAgA0EGNgIMDNEBC0H4ACECDLcBCyADQZABNgIcIAMgATYCFCADIAA2AgxBACECDM8BC0EAIQACQCADKAI4IgJFDQAgAigCQCICRQ0AIAMgAhEAACEACyAARQ0AIABBFUYNASADQQA2AhwgAyABNgIUIANBgg82AhAgA0EgNgIMQQAhAgzOAQtB9wAhAgy0AQsgA0GPATYCHCADIAE2AhQgA0HsGzYCECADQRU2AgxBACECDMwBCyABIARGBEBBjwEhAgzMAQsCQCABLQAAQSBGBEAgAUEBaiEBDAELIANBADYCHCADIAE2AhQgA0GbHzYCECADQQY2AgxBACECDMwBC0ECIQIMsgELA0AgAS0AAEEgRw0CIAQgAUEBaiIBRw0AC0GOASECDMoBCyABIARGBEBBjQEhAgzKAQsCQCABLQAAQQlrDgRKAABKAAtB9QAhAgywAQsgAy0AKUEFRgRAQfYAIQIMsAELQfQAIQIMrwELIAEgBEYEQEGMASECDMgBCyADQRA2AgggAyABNgIEDAoLIAEgBEYEQEGLASECDMcBCwJAIAEtAABBCWsOBEcAAEcAC0HzACECDK0BCyABIARHBEAgA0EQNgIIIAMgATYCBEHxACECDK0BC0GKASECDMUBCwJAIAEgBEcEQANAIAEtAABBoNAAai0AACIAQQNHBEACQCAAQQFrDgJJAAQLQ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AANgIMQQAhAgy5AQsgAygCBCEAIANBADYCBCADIAAgARAsIgBFDRYgA0HdADYCHCADIAE2AhQgAyAANgIMQQAhAgy4AQsgAygCBCEAIANBADYCBCADIAAgARAsIgBFDRYgA0H6ADYCHCADIAE2AhQgAyAANgIMQQAhAgy3AQsgA0EANgIcIAMgATYCFCADQfkPNgIQIANBBzYCDEEAIQIMtgELQewAIQIMnAELIAEgBEYEQEGCASECDLUBCyABQQFqDAILIAEgBEYEQEGBASECDLQBCyABQQFqDAELIAEgBEYNASABQQFqCyEBQQQhAgyYAQtBgAEhAgywAQsDQCABLQAAQaDMAGotAAAiAEECRwRAIABBAUcEQEHpACECDJkBCwwxCyAEIAFBAWoiAUcNAAtB/wAhAgyvAQsgASAERgRAQf4AIQIMrwELAkAgAS0AAEEJaw43LwMGLwQGBgYGBgYGBgYGBgYGBgYGBgYFBgYCBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGAAYLIAFBAWoLIQFBBSECDJQBCyABQQFqDAYLIAMoAgQhACADQQA2AgQgAyAAIAEQLCIARQ0IIANB2wA2AhwgAyABNgIUIAMgADYCDEEAIQIMqwELIAMoAgQhACADQQA2AgQgAyAAIAEQLCIARQ0IIANB3QA2AhwgAyABNgIUIAMgADYCDEEAIQIMqgELIAMoAgQhACADQQA2AgQgAyAAIAEQLCIARQ0IIANB+gA2AhwgAyABNgIUIAMgADYCDEEAIQIMqQELIANBADYCHCADIAE2AhQgA0GNFDYCECADQQc2AgxBACECDKgBCwJAAkACQAJAA0AgAS0AAEGgygBqLQAAIgBBBUcEQAJAIABBAWsOBi4DBAUGAAYLQegAIQIMlAELIAQgAUEBaiIBRw0AC0H9ACECDKsBCyADKAIEIQAgA0EANgIEIAMgACABECwiAEUNByADQdsANgIcIAMgATYCFCADIAA2AgxBACECDKoBCyADKAIEIQAgA0EANgIEIAMgACABECwiAEUNByADQd0ANgIcIAMgATYCFCADIAA2AgxBACECDKkBCyADKAIEIQAgA0EANgIEIAMgACABECw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AFNgIADJwBCyADKAIEIQAgA0IANwMAIAMgACAGQQFqIgEQKyIABEAgA0H0ADYCHCADIAE2AhQgAyAANgIMQQAhAgycAQtB4gAhAgyCAQtBACEAAkAgAygCOCICRQ0AIAIoAjQiAkUNACADIAIRAAAhAAsCQCAABEAgAEEVRg0BIANBADYCHCADIAE2AhQgA0HqDTYCECADQSY2AgxBACECDJwBC0HhACECDIIBCyADQfMANgIcIAMgATYCFCADQYAbNgIQIANBFTYCDEEAIQIMmgELIAMtACkiAEEja0ELSQ0JAkAgAEEGSw0AQQEgAHRBygBxRQ0ADAoLQQAhAiADQQA2AhwgAyABNgIUIANB7Qk2AhAgA0EINgIMDJkBC0HyACECIAEgBEYNmAEgAygCACIAIAQgAWtqIQUgASAAa0EBaiEGAkADQCABLQAAIABBs9UAai0AAEcNBSAAQQFGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAMmQELIAMoAgQhACADQgA3AwAgAyAAIAZBAWoiARArIgAEQCADQfEANgIcIAMgATYCFCADIAA2AgxBACECDJkBC0HfACECDH8LQQAhAAJAIAMoAjgiAkUNACACKAI0IgJFDQAgAyACEQAAIQALAkAgAARAIABBFUYNASADQQA2AhwgAyABNgIUIANB6g02AhAgA0EmNgIMQQAhAgyZAQtB3gAhAgx/CyADQfAANgIcIAMgATYCFCADQYAbNgIQIANBFTYCDEEAIQIMlwELIAMtAClBIUYNBiADQQA2AhwgAyABNgIUIANBkQo2AhAgA0EINgIMQQAhAgyWAQtB7wAhAiABIARGDZUBIAMoAgAiACAEIAFraiEFIAEgAGtBAmohBgJAA0AgAS0AACAAQbDVAGotAABHDQIgAEECRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADJYBCyADKAIEIQAgA0IANwMAIAMgACAGQQFqIgEQKyIARQ0CIANB7QA2AhwgAyABNgIUIAMgADYCDEEAIQIMlQELIANBADYCAAsgAygCBCEAIANBADYCBCADIAAgARArIgBFDYABIANB7gA2AhwgAyABNgIUIAMgADYCDEEAIQIMkwELQdwAIQIMeQtBACEAAkAgAygCOCICRQ0AIAIoAjQiAkUNACADIAIRAAAhAAsCQCAABEAgAEEVRg0BIANBADYCHCADIAE2AhQgA0HqDTYCECADQSY2AgxBACECDJMBC0HbACECDHkLIANB7AA2AhwgAyABNgIUIANBgBs2AhAgA0EVNgIMQQAhAgyRAQsgAy0AKSIAQSNJDQAgAEEuRg0AIANBADYCHCADIAE2AhQgA0HJCTYCECADQQg2AgxBACECDJABC0HaACECDHYLIAEgBEYEQEHrACECDI8BCwJAIAEtAABBL0YEQCABQQFqIQEMAQsgA0EANgIcIAMgATYCFCADQbI4NgIQIANBCDYCDEEAIQIMjwELQdkAIQIMdQsgASAERwRAIANBDjYCCCADIAE2AgRB2AAhAgx1C0HqACECDI0BCyABIARGBEBB6QAhAgyNAQsgAS0AAEEwayIAQf8BcUEKSQRAIAMgADoAKiABQQFqIQFB1wAhAgx0CyADKAIEIQAgA0EANgIEIAMgACABEC8iAEUNeiADQegANgIcIAMgATYCFCADIAA2AgxBACECDIwBCyABIARGBEBB5wAhAgyMAQsCQCABLQAAQS5GBEAgAUEBaiEBDAELIAMoAgQhACADQQA2AgQgAyAAIAEQLyIARQ17IANB5gA2AhwgAyABNgIUIAMgADYCDEEAIQIMjAELQdYAIQIMcgsgASAERgRAQeUAIQIMiwELQQAhAEEBIQVBASEHQQAhAgJAAkACQAJAAkACfwJAAkACQAJAAkACQAJAIAEtAABBMGsOCgoJAAECAwQFBggLC0ECDAYLQQMMBQtBBAwEC0EFDAMLQQYMAgtBBwwBC0EICyECQQAhBUEAIQcMAgtBCSECQQEhAEEAIQVBACEHDAELQQAhBUEBIQILIAMgAjoAKyABQQFqIQECQAJAIAMtAC5BEHENAAJAAkACQCADLQAqDgMBAAIECyAHRQ0DDAILIAANAQwCCyAFRQ0BCyADKAIEIQAgA0EANgIEIAMgACABEC8iAEUNAiADQeIANgIcIAMgATYCFCADIAA2AgxBACECDI0BCyADKAIEIQAgA0EANgIEIAMgACABEC8iAEUNfSADQeMANgIcIAMgATYCFCADIAA2AgxBACECDIwBCyADKAIEIQAgA0EANgIEIAMgACABEC8iAEUNeyADQeQANgIcIAMgATYCFCADIAA2AgwMiwELQdQAIQIMcQsgAy0AKUEiRg2GAUHTACECDHALQQAhAAJAIAMoAjgiAkUNACACKAJEIgJFDQAgAyACEQAAIQALIABFBEBB1QAhAgxwCyAAQRVHBEAgA0EANgIcIAMgATYCFCADQaQNNgIQIANBITYCDEEAIQIMiQELIANB4QA2AhwgAyABNgIUIANB0Bo2AhAgA0EVNgIMQQAhAgyIAQsgASAERgRAQeAAIQIMiAELAkACQAJAAkACQCABLQAAQQprDgQBBAQABAsgAUEBaiEBDAELIAFBAWohASADQS9qLQAAQQFxRQ0BC0HSACECDHALIANBADYCHCADIAE2AhQgA0G2ETYCECADQQk2AgxBACECDIgBCyADQQA2AhwgAyABNgIUIANBthE2AhAgA0EJNgIMQQAhAgyHAQsgASAERgRAQd8AIQIMhwELIAEtAABBCkYEQCABQQFqIQEMCQsgAy0ALkHAAHENCCADQQA2AhwgAyABNgIUIANBthE2AhAgA0ECNgIMQQAhAgyGAQsgASAERgRAQd0AIQIMhgELIAEtAAAiAkENRgRAIAFBAWohAUHQACECDG0LIAEhACACQQlrDgQFAQEFAQsgBCABIgBGBEBB3AAhAgyFAQsgAC0AAEEKRw0AIABBAWoMAgtBACECIANBADYCHCADIAA2AhQgA0HKLTYCECADQQc2AgwMgwELIAEgBEYEQEHbACECDIMBCwJAIAEtAABBCWsOBAMAAAMACyABQQFqCyEBQc4AIQIMaAsgASAERgRAQdoAIQIMgQELIAEtAABBCWsOBAABAQABC0EAIQIgA0EANgIcIANBmhI2AhAgA0EHNgIMIAMgAUEBajYCFAx/CyADQYASOwEqQQAhAAJAIAMoAjgiAkUNACACKAI4IgJFDQAgAyACEQAAIQALIABFDQAgAEEVRw0BIANB2QA2AhwgAyABNgIUIANB6ho2AhAgA0EVNgIMQQAhAgx+C0HNACECDGQLIANBADYCHCAD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MDAwMDAwMDAwBBoNQAC50BTk9VTkNFRUNLT1VUTkVDVEVURUNSSUJFTFVTSEVURUFEU0VBUkNIUkdFQ1RJVklUWUxFTkRBUlZFT1RJRllQVElPTlNDSFNFQVlTVEFUQ0hHRVVFUllPUkRJUkVDVE9SVFJDSFBBUkFNRVRFUlVSQ0VCU0NSSUJFQVJET1dOQUNFSU5ETktDS1VCU0NSSUJFVFRQQ0VUU1BBRFRQLw=="; @@ -40448,9 +54539,9 @@ var require_llhttp_wasm2 = __commonJS({ } }); -// node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/llhttp/llhttp_simd-wasm.js +// ../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/llhttp/llhttp_simd-wasm.js var require_llhttp_simd_wasm2 = __commonJS({ - "node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/llhttp/llhttp_simd-wasm.js"(exports, module) { + "../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/llhttp/llhttp_simd-wasm.js"(exports, module) { "use strict"; var { Buffer: Buffer2 } = __require("node:buffer"); var wasmBase64 = "AGFzbQEAAAABJwdgAX8Bf2ADf39/AX9gAn9/AGABfwBgBH9/f38Bf2AAAGADf39/AALLAQgDZW52GHdhc21fb25faGVhZGVyc19jb21wbGV0ZQAEA2VudhV3YXNtX29uX21lc3NhZ2VfYmVnaW4AAANlbnYLd2FzbV9vbl91cmwAAQNlbnYOd2FzbV9vbl9zdGF0dXMAAQNlbnYUd2FzbV9vbl9oZWFkZXJfZmllbGQAAQNlbnYUd2FzbV9vbl9oZWFkZXJfdmFsdWUAAQNlbnYMd2FzbV9vbl9ib2R5AAEDZW52GHdhc21fb25fbWVzc2FnZV9jb21wbGV0ZQAAAzU0BQYAAAMAAAAAAAADAQMAAwMDAAACAAAAAAICAgICAgICAgIBAQEBAQEBAQEBAwAAAwAAAAQFAXABExMFAwEAAgYIAX8BQcDZBAsHxQcoBm1lbW9yeQIAC19pbml0aWFsaXplAAgZX19pbmRpcmVjd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AERg0BIAJBHXYhACACQQF0IQIgAyAAQQRxakEQaiIHKAIAIgANAAsgByABNgIAIAEgAzYCGCABIAE2AgwgASABNgIIDAELIAMoAggiACABNgIMIAMgATYCCCABQQA2AhggASADNgIMIAEgADYCCAtB5NUAQeTVACgCAEEBayIAQX8gABs2AgALCwcAIAAtACgLBwAgAC0AKgsHACAALQArCwcAIAAtACkLBwAgAC8BNAsHACAALQAwC0ABBH8gACgCGCEBIAAvAS4hAiAALQAoIQMgACgCOCEEIAAQOCAAIAQ2AjggACADOgAoIAAgAjsBLiAAIAE2AhgLhocCAwd/A34BeyABIAJqIQQCQCAAIgMoAgwiAA0AIAMoAgQEQCADIAE2AgQLIwBBEGsiCSQAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQCADKAIcIgJBAmsO/AEB+QECAwQFBgcICQoLDA0ODxAREvgBE/cBFBX2ARYX9QEYGRobHB0e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QckBDBULQcoBDBQLQcsBDBMLQcwBDBILQc0BDBELQc4BDBALQc8BDA8LQdABDA4LQdEBDA0LQdIBDAwLQdMBDAsLQdQBDAoLQdUBDAkLQdYBDAgLQeMBDAcLQdcBDAYLQdgBDAULQdkBDAQLQdoBDAMLQdsBDAILQd0BDAELQdwBCyECA0ACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIAMCfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACQAJAAkACQAJAAn8CQAJAAkACfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAgAwJ/AkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJ/AkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQA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ABNgIUIANB1gw2AhAgA0EjNgIMDIIDCyADKAIEIQBBACECIANBADYCBCADIAAgARA0IgBFBEAgAUEBaiEBDCULIANBEjYCHCADIAA2AgwgAyABQQFqNgIUDIEDCyADQS9qLQAAQQFxRQ0BC0EXIQIM5gILQQAhAiADQQA2AhwgAyABNgIUIANB4hc2AhAgA0EZNgIMDP4CCyAAQTtHDQAgAUEBaiEBDAwLQQAhAiADQQA2AhwgAyABNgIUIANBkhg2AhAgA0ECNgIMDPwCCyAAQRVGDShBACECIANBADYCHCADIAE2AhQgA0HWDDYCECADQSM2AgwM+wILIANBFDYCHCADIAE2AhQgAyAANgIMDPoCCyADKAIEIQBBACECIANBADYCBCADIAAgARA0IgBFBEAgAUEBaiEBDPUCCyADQRU2AhwgAyAANgIMIAMgAUEBajYCFAz5AgsgAygCBCEAQQAhAiADQQA2AgQgAyAAIAEQNCIARQRAIAFBAWohAQzzAgsgA0EXNgIcIAMgADYCDCADIAFBAWo2AhQM+AILIABBFUYNI0EAIQIgA0EANgIcIAMgATYCFCADQdYMNgIQIANBIzYCDAz3AgsgAygCBCEAQQAhAiADQQA2AgQgAyAAIAEQNCIARQRAIAFBAWohAQwdCyADQRk2AhwgAyAANgIMIAMgAUEBajYCFAz2AgsgAygCBCEAQQAhAiADQQA2AgQgAyAAIAEQNCIARQRAIAFBAWohAQzvAgsgA0EaNgIcIAMgADYCDCADIAFBAWo2AhQM9QILIABBFUYNH0EAIQIgA0EANgIcIAMgATYCFCADQdAPNgIQIANBIjYCDAz0AgsgAygCBCEAIANBADYCBCADIAAgARAzIgBFBEAgAUEBaiEBDBsLIANBHDYCHCADIAA2AgwgAyABQQFqNgIUQQAhAgzzAgsgAygCBCEAIANBADYCBCADIAAgARAzIgBFBEAgAUEBaiEBDOsCCyADQR02AhwgAyAANgIMIAMgAUEBajYCFEEAIQIM8gILIABBO0cNASABQQFqIQELQSYhAgzXAgtBACECIANBADYCHCADIAE2AhQgA0GfFTYCECADQQw2AgwM7wILIAEgBEcEQANAIAEtAABBIEcNhAIgBCABQQFqIgFHDQALQSwhAgzvAgtBLCECDO4CCyABIARGBEBBNCECDO4CCwJAAkADQAJAIAEtAABBCmsOBAIAAAMACyAEIAFBAWoiAUcNAAtBNCECDO8CCyADKAIEIQAgA0EANgIEIAMgACABEDEiAEUNnwIgA0EyNgIcIAMgATYCFCADIAA2AgxBACECDO4CCyADKAIEIQAgA0EANgIEIAMgACABEDEiAEUEQCABQQFqIQEMnwILIANBMjYCHCADIAA2AgwgAyABQQFqNgIUQQAhAgztAgsgASAERwRAAkADQCABLQAAQTBrIgBB/wFxQQpPBEBBOiECDNcCCyADKQMgIgtCmbPmzJmz5swZVg0BIAMgC0IKfiIKNwMgIAogAK1C/wGDIgtCf4VWDQEgAyAKIAt8NwMgIAQgAUEBaiIBRw0AC0HAACECDO4CCyADKAIEIQAgA0EANgIEIAMgACABQQFqIgEQMSIADRcM4gILQcAAIQIM7AILIAEgBEYEQEHJACECDOwCCwJAA0ACQCABLQAAQQlrDhgAAqICogKpAqICogKiAqICogKiAqICogKiAqICogKiAqICogKiAqICogKiAgCiAgsgBCABQQFqIgFHDQALQckAIQIM7AILIAFBAWohASADQS9qLQAAQQFxDaUCIANBADYCHCADIAE2AhQgA0GXEDYCECADQQo2AgxBACECDOsCCyABIARHBEADQCABLQAAQSBHDRUgBCABQQFqIgFHDQALQfgAIQIM6wILQfgAIQIM6gILIANBAjoAKAw4C0EAIQIgA0EANgIcIANBvws2AhAgA0ECNgIMIAMgAUEBajYCFAzoAgtBACECDM4CC0ENIQIMzQILQRMhAgzMAgtBFSECDMsCC0EWIQIMygILQRghAgzJAgtBGSECDMgCC0EaIQIMxwILQRshAgzGAgtBHCECDMUCC0EdIQIMxAILQR4hAgzDAgtBHyECDMICC0EgIQIMwQILQSIhAgzAAgtBIyECDL8CC0ElIQIMvgILQeUAIQIMvQILIANBPTYCHCADIAE2AhQgAyAANgIMQQAhAgzVAgsgA0EbNgIcIAMgATYCFCADQaQcNgIQIANB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BQUFBQUFBQUFBQUBBQsgAUEBaiEBQdYBIQIMqwILIAFBAWohAUHXASECDKoCC0H2ASECIAEgBEYNwgIgAygCACIAIAQgAWtqIQUgASAAa0ECaiEGAkADQCABLQAAIABButUAai0AAEcNAyAAQQJGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAMwwILIAMoAgQhACADQgA3AwAgAyAAIAZBAWoiARAuIgBFBEBB4wEhAgyqAgsgA0H1ATYCHCADIAE2AhQgAyAANgIMQQAhAgzCAgtB9AEhAiABIARGDcECIAMoAgAiACAEIAFraiEFIAEgAGtBAWohBgJAA0AgAS0AACAAQbjVAGotAABHDQIgAEEBRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADMICCyADQYEEOwEoIAMoAgQhACADQgA3AwAgAyAAIAZBAWoiARAuIgANAwwCCyADQQA2AgALQQAhAiADQQA2AhwgAyABNgIUIANB5R82AhAgA0EINgIMDL8CC0HVASECDKUCCyADQfMBNgIcIAMgATYCFCADIAA2AgxBACECDL0CC0EAIQACQCADKAI4IgJFDQAgAigCQCICRQ0AIAMgAhEAACEACyAARQ1uIABBFUcEQCADQQA2AhwgAyABNgIUIANBgg82AhAgA0EgNgIMQQAhAgy9AgsgA0GPATYCHCADIAE2AhQgA0HsGzYCECADQRU2AgxBACECDLwCCyABIARHBEAgA0ENNgIIIAMgATYCBEHTASECDKMCC0HyASECDLsCCyABIARGBEBB8QEhAgy7AgsCQAJAAkAgAS0AAEHIAGsOCwABCAgICAgICAgCCAsgAUEBaiEBQdABIQIMowILIAFBAWohAUHRASECDKICCyABQQFqIQFB0gEhAgyhAgtB8AEhAiABIARGDbkCIAMoAgAiACAEIAFraiEGIAEgAGtBAmohBQNAIAEtAAAgAEG11QBqLQAARw0EIABBAkYNAyAAQQFqIQAgBCABQQFqIgFHDQALIAMgBjYCAAy5AgtB7wEhAiABIARGDbgCIAMoAgAiACAEIAFraiEGIAEgAGtBAWohBQNAIAEtAAAgAEGz1QBqLQAARw0DIABBAUYNAiAAQQFqIQAgBCABQQFqIgFHDQALIAMgBjYCAAy4AgtB7gEhAiABIARGDbcCIAMoAgAiACAEIAFraiEGIAEgAGtBAmohBQNAIAEtAAAgAEGw1QBqLQAARw0CIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBjYCAAy3AgsgAygCBCEAIANCADcDACADIAAgBUEBaiIBECsiAEUNAiADQewBNgIcIAMgATYCFCADIAA2AgxBACECDLYCCyADQQA2AgALIAMoAgQhACADQQA2AgQgAyAAIAEQKyIARQ2cAiADQe0BNgIcIAMgATYCFCADIAA2AgxBACECDLQCC0HPASECDJoCC0EAIQACQCADKAI4IgJFDQAgAigCNCICRQ0AIAMgAhEAACEACwJAIAAEQCAAQRVGDQEgA0EANgIcIAMgATYCFCADQeoNNgIQIANBJjYCDEEAIQIMtAILQc4BIQIMmgILIANB6wE2AhwgAyABNgIUIANBgBs2AhAgA0EVNgIMQQAhAgyyAgsgASAERgRAQesBIQIMsgILIAEtAABBL0YEQCABQQFqIQEMAQsgA0EANgIcIAMgATYCFCADQbI4NgIQIANBCDYCDEEAIQIMsQILQc0BIQIMlwILIAEgBEcEQCADQQ42AgggAyABNgIEQcwBIQIMlwILQeoBIQIMrwILIAEgBEYEQEHpASECDK8CCyABLQAAQTBrIgBB/wFxQQpJBEAgAyAAOgAqIAFBAWohAUHLASECDJYCCyADKAIEIQAgA0EANgIEIAMgACABEC8iAEUNlwIgA0HoATYCHCADIAE2AhQgAyAANgIMQQAhAgyuAgsgASAERgRAQecBIQIMrgILAkAgAS0AAEEuRgRAIAFBAWohAQwBCyADKAIEIQAgA0EANgIEIAMgACABEC8iAEUNmAIgA0HmATYCHCADIAE2AhQgAyAANgIMQQAhAgyuAgtBygEhAgyUAgsgASAERgRAQeUBIQIMrQILQQAhAEEBIQVBASEHQQAhAgJAAkACQAJAAkACfwJAAkACQAJAAkACQAJAIAEtAABBMGsOCgoJAAECAwQFBggLC0ECDAYLQQMMBQtBBAwEC0EFDAMLQQYMAgtBBwwBC0EICyECQQAhBUEAIQcMAgtBCSECQQEhAEEAIQVBACEHDAELQQAhBUEBIQILIAMgAjoAKyABQQFqIQECQAJAIAMtAC5BEHENAAJAAkACQCADLQAqDgMBAAIECyAHRQ0DDAILIAANAQwCCyAFRQ0BCyADKAIEIQAgA0EANgIEIAMgACABEC8iAEUNAiADQeIBNgIcIAMgATYCFCADIAA2AgxBACECDK8CCyADKAIEIQAgA0EANgIEIAMgACABEC8iAEUNmgIgA0HjATYCHCADIAE2AhQgAyAANgIMQQAhAgyuAgsgAygCBCEAIANBADYCBCADIAAgARAvIgBFDZgCIANB5AE2AhwgAyABNgIUIAMgADYCDAytAgtByQEhAgyTAgtBACEAAkAgAygCOCICRQ0AIAIoAkQiAkUNACADIAIRAAAhAAsCQCAABEAgAEEVRg0BIANBADYCHCADIAE2AhQgA0GkDTYCECADQSE2AgxBACECDK0CC0HIASECDJMCCyADQeEBNgIcIAMgATYCFCADQdAaNgIQIANBFTYCDEEAIQIMqwILIAEgBEYEQEHhASECDKsCCwJAIAEtAABBIEYEQCADQQA7ATQgAUEBaiEBDAELIANBADYCHCADIAE2AhQgA0GZETYCECADQQk2AgxBACECDKsCC0HHASECDJECCyABIARGBEBB4AEhAgyqAgsCQCABLQAAQTBrQf8BcSICQQpJBEAgAUEBaiEBAkAgAy8BNCIAQZkzSw0AIAMgAEEKbCIAOwE0IABB/v8DcSACQf//A3NLDQAgAyAAIAJqOwE0DAILQQAhAiADQQA2AhwgAyABNgIUIANBlR42AhAgA0ENNgIMDKsCCyADQQA2AhwgAyABNgIUIANBlR42AhAgA0ENNgIMQQAhAgyqAgtBxgEhAgyQAgsgASAERgRAQd8BIQIMqQILAkAgAS0AAEEwa0H/AXEiAkEKSQRAIAFBAWohAQJAIAMvATQiAEGZM0sNACADIABBCmwiADsBNCAAQf7/A3EgAkH//wNzSw0AIAMgACACajsBNAwCC0EAIQIgA0EANgIcIAMgATYCFCADQZUeNgIQIANBDTYCDAyqAgsgA0EANgIcIAMgATYCFCADQZUeNgIQIANBDTYCDEEAIQIMqQILQcUBIQIMjwILIAEgBEYEQEHeASECDKgCCwJAIAEtAABBMGtB/wFxIgJBCkkEQCABQQFqIQECQCADLwE0IgBBmTNLDQAgAyAAQQpsIgA7ATQgAEH+/wNxIAJB//8Dc0sNACADIAAgAmo7ATQMAgtBACECIANBADYCHCADIAE2AhQgA0GVHjYCECADQQ02AgwMqQILIANBADYCHCADIAE2AhQgA0GVHjYCECADQQ02AgxBACECDKgCC0HEASECDI4CCyABIARGBEBB3QEhAgynAgsCQAJAAkACQCABLQAAQQprDhcCAwMAAwMDAwMDAwMDAwMDAwMDAwMDAQMLIAFBAWoMBQsgAUEBaiEBQcMBIQIMjwILIAFBAWohASADQS9qLQAAQQFxDQggA0EANgIcIAMgATYCFCADQY0LNgIQIANBDTYCDEEAIQIMpwILIANBADYCHCADIAE2AhQgA0GNCzYCECADQQ02AgxBACECDKYCCyABIARHBEAgA0EPNgIIIAMgATYCBEEBIQIMjQILQdwBIQIMpQILAkACQANAAkAgAS0AAEEKaw4EAgAAAwALIAQgAUEBaiIBRw0AC0HbASECDKYCCyADKAIEIQAgA0EANgIEIAMgACABEC0iAEUEQCABQQFqIQEMBAsgA0HaATYCHCADIAA2AgwgAyABQQFqNgIUQQAhAgylAgsgAygCBCEAIANBADYCBCADIAAgARAtIgANASABQQFqCyEBQcEBIQIMigILIANB2QE2AhwgAyAANgIMIAMgAUEBajYCFEEAIQIMogILQcIBIQIMiAILIANBL2otAABBAXENASADQQA2AhwgAyABNgIUIANB5Bw2AhAgA0EZNgIMQQAhAgygAgsgASAERgRAQdkBIQIMoAILAkACQAJAIAEtAABBCmsOBAECAgACCyABQQFqIQEMAgsgAUEBaiEBDAELIAMtAC5BwABxRQ0BC0EAIQACQCADKAI4IgJFDQAgAigCPCICRQ0AIAMgAhEAACEACyAARQ2gASAAQRVGBEAgA0HZADYCHCADIAE2AhQgA0G3GjYCECADQRU2AgxBACECDJ8CCyADQQ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Ggw8C0HKASECIAEgBEYNjgIgAygCACIAIAQgAWtqIQUgASAAa0EDaiEGAkADQCABLQAAIABBjdUAai0AAEcNOyAAQQNGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAMjwILIANBADYCACAGQQFqIQFBIQw7CyABIARGBEBByQEhAgyOAgsCQAJAIAEtAABBwQBrDhQAPT09PT09PT09PT09PT09PT09AT0LIAFBAWohAUGtASECDPUBCyABQQFqIQFBsAEhAgz0AQsgASAERgRAQcgBIQIMjQILAkACQCABLQAAQdUAaw4LADw8PDw8PDw8PAE8CyABQQFqIQFBrgEhAgz0AQsgAUEBaiEBQa8BIQIM8wELQccBIQIgASAERg2LAiADKAIAIgAgBCABa2ohBSABIABrQQhqIQYCQANAIAEtAAAgAEGE1QBqLQAARw04IABBCEYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAyMAgsgA0EANgIAIAZBAWohAUEqDDgLIAEgBEYEQEHGASECDIsCCyABLQAAQdAARw04IAFBAWohAUElDDcLQcUBIQIgASAERg2JAiADKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEGB1QBqLQAARw02IABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAyKAgsgA0EANgIAIAZBAWohAUEODDYLIAEgBEYEQEHEASECDIkCCyABLQAAQcUARw02IAFBAWohAUGrASECDO8BCyABIARGBEBBwwEhAgyIAgsCQAJAAkACQCABLQAAQcIAaw4PAAECOTk5OTk5OTk5OTkDOQsgAUEBaiEBQacBIQIM8QELIAFBAWohAUGoASECDPABCyABQQFqIQFBqQEhAgzvAQsgAUEBaiEBQaoBIQIM7gELQcIBIQIgASAERg2GAiADKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEH+1ABqLQAARw0zIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAyHAgsgA0EANgIAIAZBAWohAUEUDDMLQcEBIQIgASAERg2FAiADKAIAIgAgB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IQIgASAERg3sASADKAIAIgAgBCABa2ohBSABIABrQQZqIQYCQANAIAEtAAAgAEHK1ABqLQAARw0ZIABBBkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAztAQsgA0EANgIAIAZBAWohAUEVDBkLQacBIQIgASAERg3rASADKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEHH1ABqLQAARw0YIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAzsAQsgA0EANgIAIAZBAWohAUEXDBgLQaYBIQIgASAERg3qASADKAIAIgAgBCABa2ohBSABIABrQQVqIQYCQANAIAEtAAAgAEHB1ABqLQAARw0XIABBBUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAzrAQsgA0EANgIAIAZBAWohAUEYDBcLIAEgBEYEQEGlASECDOoBCwJAAkAgAS0AAEHJAGsOBwAZGRkZGQEZCyABQQFqIQFBiwEhAgzRAQsgAUEBaiEBQYwBIQIM0AELQaQBIQIgASAERg3oASADKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEGm1QBqLQAARw0VIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAzpAQsgA0EANgIAIAZBAWohAUEJDBULQaMBIQIgASAERg3nASADKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEGk1QBqLQAARw0UIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAzoAQsgA0EANgIAIAZBAWohAUEfDBQLQaIBIQIgASAERg3mASADKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEG+1ABqLQAARw0TIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAznAQsgA0EANgIAIAZBAWohAUECDBMLQaEBIQIgASAERg3lASADKAIAIgAgBCABa2ohBSABIABrQQFqIQYDQCABLQAAIABBvNQAai0AAEcNESAAQQFGDQIgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAM5QELIAEgBEYEQEGgASECDOUBC0EBIAEtAABB3wBHDREaIAFBAWohAUGHASECDMsBCyADQQA2AgAgBkEBaiEBQYgBIQIMygELQZ8BIQIgASAERg3iASADKAIAIgAgBCABa2ohBSABIABrQQhqIQYCQANAIAEtAAAgAEGE1QBqLQAARw0PIABBCEYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAzjAQsgA0EANgIAIAZBAWohAUEpDA8LQZ4BIQIgASAERg3hASADKAIAIgAgBCABa2ohBSABIABrQQNqIQYCQANAIAEtAAAgAEG41ABqLQAARw0OIABBA0YNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAziAQsgA0EANgIAIAZBAWohAUEtDA4LIAEgBEYEQEGdASECDOEBCyABLQAAQcUARw0OIAFBAWohAUGEASECDMcBCyABIARGBEBBnAEhAgzgAQsCQAJAIAEtAABBzABrDggADw8PDw8PAQ8LIAFBAWohAUGCASECDMcBCyABQQFqIQFBgwEhAgzGAQtBmwEhAiABIARGDd4BIAMoAgAiACAEIAFraiEFIAEgAGtBBGohBgJAA0AgAS0AACAAQbPUAGotAABHDQsgAEEERg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADN8BCyADQQA2AgAgBkEBaiEBQSMMCwtBmgEhAiABIARGDd0BIAMoAgAiACAEIAFraiEFIAEgAGtBAmohBgJAA0AgAS0AACAAQbDUAGotAABHDQogAEECRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADN4BCyADQQA2AgAgBkEBaiEBQQAMCgsgASAERgRAQZkBIQIM3QELAkACQCABLQAAQcgAaw4IAAwMDAwMDAEMCyABQQFqIQFB/QAhAgzEAQsgAUEBaiEBQYABIQIMwwELIAEgBEYEQEGYASECDNwBCwJAAkAgAS0AAEHOAGsOAwALAQsLIAFBAWohAUH+ACECDMMBCyABQQFqIQFB/wAhAgzCAQsgASAERgRAQZcBIQIM2wELIAEtAABB2QBHDQggAUEBaiEBQQgMBwtBlgEhAiABIARGDdkBIAMoAgAiACAEIAFraiEFIAEgAGtBA2ohBgJAA0AgAS0AACAAQazUAGotAABHDQYgAEEDRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADNoBCyADQQA2AgAgBkEBaiEBQQUMBgtBlQEhAiABIARGDdgBIAMoAgAiACAEIAFraiEFIAEgAGtBBWohBgJAA0AgAS0AACAAQabUAGotAABHDQUgAEEFRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADNkBCyADQQA2AgAgBkEBaiEBQRYMBQtBlAEhAiABIARGDdcBIAMoAgAiACAEIAFraiEFIAEgAGtBAmohBgJAA0AgAS0AACAAQaHVAGotAABHDQQgAEECRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADNgBCyADQQA2AgAgBkEBaiEBQRAMBAsgASAERgRAQZMBIQIM1wELAkACQCABLQAAQcMAaw4MAAYGBgYGBgYGBgYBBgsgAUEBaiEBQfkAIQIMvgELIAFBAWohAUH6ACECDL0BC0GSASECIAEgBEYN1QEgAygCACIAIAQgAWtqIQUgASAAa0EFaiEGAkADQCABLQAAIABBoNQAai0AAEcNAiAAQQVGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAM1gELIANBADYCACAGQQFqIQFBJAwCCyADQQA2AgAMAgsgASAERgRAQZEBIQIM1AELIAEtAABBzABHDQEgAUEBaiEBQRMLOgApIAMoAgQhACADQQA2AgQgAyAAIAEQLiIADQIMAQtBACECIANBADYCHCADIAE2AhQgA0H+HzYCECADQQY2AgwM0QELQfgAIQIMtwELIANBkAE2AhwgAyABNgIUIAMgADYCDEEAIQIMzwELQQAhAAJAIAMoAjgiAkUNACACKAJAIgJFDQAgAyACEQAAIQALIABFDQAgAEEVRg0BIANBADYCHCADIAE2AhQgA0GCDzYCECADQSA2AgxBACECDM4BC0H3ACECDLQBCyADQY8BNgIcIAMgATYCFCADQewbNgIQIANBFTYCDEEAIQIMzAELIAEgBEYEQEGPASECDM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CFCADIAA2AgxBACECDMEBCyADKAIEIQAgA0EANgIEIAMgACABECwiAEUNHiADQd0ANgIcIAMgATYCFCADIAA2AgxBACECDMABCyADKAIEIQAgA0EANgIEIAMgACABECwiAEUNHiADQfoANgIcIAMgATYCFCADIAA2AgxBACECDL8BCyADQQA2AhwgAyABNgIUIANB+Q82AhAgA0EHNgIMQQAhAgy+AQsgASAERgRAQYMBIQIMvgELAkAgAS0AAEGgzgBqLQAAQQFrDgg+BAUGAAgCAwcLIAFBAWohAQtBAyECDKMBCyABQQFqDA0LQQAhAiADQQA2AhwgA0HREjYCECADQQc2AgwgAyABQQFqNgIUDLoBCyADKAIEIQAgA0EANgIEIAMgACABECwiAEUNFiADQdsANgIcIAMgATYCFCADIAA2AgxBACECDLkBCyADKAIEIQAgA0EANgIEIAMgACABECwiAEUNFiADQd0ANgIcIAMgATYCFCADIAA2AgxBACECDLgBCyADKAIEIQAgA0EANgIEIAMgACABECwiAEUNFiADQfoANgIcIAMgATYCFCADIAA2AgxBACECDLcBCyADQQA2AhwgAyABNgIUIANB+Q82AhAgA0EHNgIMQQAhAgy2AQtB7AAhAgycAQsgASAERgRAQYIBIQIMtQELIAFBAWoMAgsgASAERgRAQYEBIQIMtAELIAFBAWoMAQsgASAERg0BIAFBAWoLIQFBBCECDJgBC0GAASECDLABCwNAIAEtAABBoMwAai0AACIAQQJHBEAgAEEBRwRAQekAIQIMmQELDDELIAQgAUEBaiIBRw0AC0H/ACECDK8BCyABIARGBEBB/gAhAgyvAQsCQCABLQAAQQlrDjcvAwYvBAYGBgYGBgYGBgYGBgYGBgYGBgUGBgIGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYABgsgAUEBagshAUEFIQIMlAELIAFBAWoMBgsgAygCBCEAIANBADYCBCADIAAgARAsIgBFDQggA0HbADYCHCADIAE2AhQgAyAANgIMQQAhAgyrAQsgAygCBCEAIANBADYCBCADIAAgARAsIgBFDQggA0HdADYCHCADIAE2AhQgAyAANgIMQQAhAgyqAQsgAygCBCEAIANBADYCBCADIAAgARAsIgBFDQggA0H6ADYCHCADIAE2AhQgAyAANgIMQQAhAgypAQsgA0EANgIcIAMgATYCFCADQY0UNgIQIANBBzYCDEEAIQIMqAELAkACQAJAAkADQCABLQAAQaDKAGotAAAiAEEFRwRAAkAgAEEBaw4GLgMEBQYABgtB6AAhAgyUAQsgBCABQQFqIgFHDQALQf0AIQIMqwELIAMoAgQhACADQQA2AgQgAyAAIAEQLCIARQ0HIANB2wA2AhwgAyABNgIUIAMgADYCDEEAIQIMqgELIAMoAgQhACADQQA2AgQgAyAAIAEQLCIARQ0HIANB3QA2AhwgAyABNgIUIAMgADYCDEEAIQIMqQELIAMoAgQhACADQQA2AgQgAyAAIAEQLCIARQ0HIANB+gA2AhwgAyABNgIUIAMgADYCDEEAIQIMqAELIANBADYCHCADIAE2AhQgA0HkCDYCECADQQc2AgxBACECDKcBCyABIARGDQEgAUEBagshAUEGIQIMjAELQfwAIQIMpAELAkACQAJAAkADQCABLQAAQaDIAGotAAAiAEEFRwRAIABBAWsOBCkCAwQFCyAEIAFBAWoiAUcNAAtB+wAhAgynAQsgAygCBCEAIANBADYCBCADIAAgARAsIgBFDQMgA0HbADYCHCADIAE2AhQgAyAANgIMQQAhAgymAQsgAygCBCEAIANBADYCBCADIAAgARAsIgBFDQMgA0HdADYCHCADIAE2AhQgAyAANgIMQQAhAgylAQsgAygCBCEAIANBADYCBCADIAAgARAsIgBFDQMgA0H6ADYCHCADIAE2AhQgAyAANgIMQQAhAgykAQsgA0EANgIcIAMgATYCFCADQbwKNgIQIANBBzYCDEEAIQIMowELQc8AIQIMiQELQdEAIQIMiAELQecAIQIMhwELIAEgBEYEQEH6ACECDKABCwJAIAEtAABBCWsOBCAAACAACyABQQFqIQFB5gAhAgyGAQsgASAERgRAQfkAIQIMnwELAkAgAS0AAEEJaw4EHwAAHwALQQAhAAJAIAMoAjgiAkUNACACKAI4IgJFDQAgAyACEQAAIQALIABFBEBB4gEhAgyGAQsgAEEVRwRAIANBADYCHCADIAE2AhQgA0HJDTYCECADQRo2AgxBACECDJ8BCyADQfgANgIcIAMgATYCFCADQeoaNgIQIANBFTYCDEEAIQIMngELIAEgBEcEQCADQQ02AgggAyABNgIEQeQAIQIMhQELQfcAIQIMnQELIAEgBEYEQEH2ACECDJ0BCwJAAkACQCABLQAAQcgAaw4LAAELCwsLCwsLCwILCyABQQFqIQFB3QAhAgyFAQsgAUEBaiEBQeAAIQIMhAELIAFBAWohAUHjACECDIMBC0H1ACECIAEgBEYNmwEgAygCACIAIAQgAWtqIQUgASAAa0ECaiEGAkADQCABLQAAIABBtdUAai0AAEcNCCAAQQJGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAMnAELIAMoAgQhACADQgA3AwAgAyAAIAZBAWoiARArIgAEQCADQfQANgIcIAMgATYCFCADIAA2AgxBACECDJwBC0HiACECDIIBC0EAIQACQCADKAI4IgJFDQAgAigCNCICRQ0AIAMgAhEAACEACwJAIAAEQCAAQRVGDQEgA0EANgIcIAMgATYCFCADQeoNNgIQIANBJjYCDEEAIQIMnAELQeEAIQIMggELIANB8wA2AhwgAyABNgIUIANBgBs2AhAgA0EVNgIMQQAhAgyaAQsgAy0AKSIAQSNrQQtJDQkCQCAAQQZLDQBBASAAdEHKAHFFDQAMCgtBACECIANBADYCHCADIAE2AhQgA0HtCTYCECADQQg2AgwMmQELQfIAIQIgASAERg2YASADKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEGz1QBqLQAARw0FIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAyZAQsgAygCBCEAIANCADcDACADIAAgBkEBaiIBECsiAARAIANB8QA2AhwgAyABNgIUIAMgADYCDEEAIQIMmQELQd8AIQIMfwtBACEAAkAgAygCOCICRQ0AIAIoAjQiAkUNACADIAIRAAAhAAsCQCAABEAgAEEVRg0BIANBADYCHCADIAE2AhQgA0HqDTYCECADQSY2AgxBACECDJkBC0HeACECDH8LIANB8AA2AhwgAyABNgIUIANBgBs2AhAgA0EVNgIMQQAhAgyXAQsgAy0AKUEhRg0GIANBADYCHCADIAE2AhQgA0GRCjYCECADQQg2AgxBACECDJYBC0HvACECIAEgBEYNlQEgAygCACIAIAQgAWtqIQUgASAAa0ECaiEGAkADQCABLQAAIABBsNUAai0AAEcNAiAAQQJGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAMlgELIAMoAgQhACADQgA3AwAgAyAAIAZBAWoiARArIgBFDQIgA0HtADYCHCADIAE2AhQgAyAANgIMQQAhAgyVAQsgA0EANgIACyADKAIEIQAgA0EANgIEIAMgACABECsiAEUNgAEgA0HuADYCHCADIAE2AhQgAyAANgIMQQAhAgyTAQtB3AAhAgx5C0EAIQACQCADKAI4IgJFDQAgAigCNCICRQ0AIAMgAhEAACEACwJAIAAEQCAAQRVGDQEgA0EANgIcIAMgATYCFCADQeoNNgIQIANBJjYCDEEAIQIMkwELQdsAIQIMeQsgA0HsADYCHCADIAE2AhQgA0GAGzYCECADQRU2AgxBACECDJEBCyADLQApIgBBI0kNACAAQS5GDQAgA0EANgIcIAMgATYCFCADQckJNgIQIANBCDYCDEEAIQIMkAELQdoAIQIMdgsgASAERgRAQesAIQIMjwELAkAgAS0AAEEvRgRAIAFBAWohAQwBCyADQQA2AhwgAyABNgIUIANBsjg2AhAgA0EINgIMQQAhAgyPAQtB2QAhAgx1CyABIARHBEAgA0EONgIIIAMgATYCBEHYACECDHULQeoAIQIMjQELIAEgBEYEQEHpACECDI0BCyABLQAAQTBrIgBB/wFxQQpJBEAgAyAAOgAqIAFBAWohAUHXACECDHQLIAMoAgQhACADQQA2AgQgAyAAIAEQLyIARQ16IANB6AA2AhwgAyABNgIUIAMgADYCDEEAIQIMjAELIAEgBEYEQEHnACECDIwBCwJAIAEtAABBLkYEQCABQQFqIQEMAQsgAygCBCEAIANBADYCBCADIAAgARAvIgBFDXsgA0HmADYCHCADIAE2AhQgAyAANgIMQQAhAgyMAQtB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AghBAWsOAgQBAAsgA0EANgIcIANBwh42AhAgA0EXNgIMIAMgAEEBajYCFEEAIQIMAwsgA0EANgIcIAMgADYCFCADQdceNgIQIANBCTYCDEEAIQIMAgsgASAERgRAQSghAgwCCyADQQk2AgggAyABNgIEQSchAgwBCyABIARGBEBBASECDAELA0ACQAJAAkAgAS0AAEEKaw4EAAEBAAELIAFBAWohAQwBCyABQQFqIQEgAy0ALkEgcQ0AQQAhAiADQQA2AhwgAyABNgIUIANBoSE2AhAgA0EFNgIMDAILQQEhAiABIARHDQALCyAJQRBqJAAgAkUEQCADKAIMIQAMAQsgAyACNgIcQQAhACADKAIEIgFFDQAgAyABIAQgAygCCBEBACIBRQ0AIAMgBDYCFCADIAE2AgwgASEACyAAC74CAQJ/IABBADoAACAAQeQAaiIBQQFrQQA6AAAgAEEAOgACIABBADoAASABQQNrQQA6AAAgAUECa0EAOgAAIABBADoAAyABQQRrQQA6AABBACAAa0EDcSIBIABqIgBBADYCAEHkACABa0F8cSICIABqIgFBBGtBADYCAAJAIAJBCUkNACAAQQA2AgggAEEANgIEIAFBCGtBADYCACABQQxrQQA2AgAgAkEZSQ0AIABBADYCGCAAQQA2AhQgAEEANgIQIABBADYCDCABQRBrQQA2AgAgAUEUa0EANgIAIAFBGGtBADYCACABQRxrQQA2AgAgAiAAQQRxQRhyIgJrIgFBIEkNACAAIAJqIQADQCAAQgA3AxggAEIANwMQIABCADcDCCAAQgA3AwAgAEEgaiEAIAFBIGsiAUEfSw0ACwsLVgEBfwJAIAAoAgwNAAJAAkACQAJAIAAtADEOAwEAAwILIAAoAjgiAUUNACABKAIwIgFFDQAgACABEQAAIgENAwtBAA8LAAsgAEHKGTYCEEEOIQELIAELGgAgACgCDEUEQCAAQd4fNgIQIABBFTYCDAsLFAAgACgCDEEVRgRAIABBADYCDAsLFAAgACgCDEEWRgRAIABBADYCDAsLBwAgACgCDAsHACAAKAIQCwkAIAAgATYCEAsHACAAKAIUCysAAkAgAEEnTw0AQv//////CSAArY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QUFBQUFBQUFBQUFBQUAQanKAAsFAQIAAQMAQcDKAAtfBAUFBgUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUAQanMAAsEAQAAAQBBwcwAC14CAgACAgICAgICAgICAgICAgICAgICAgICAgICAgIAAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAEGpzgALBQECAAEDAEHAzgALXwQFAAAFBQUFBQUFBQUFBQYFBQUFBQUFBQUFBQUABQAHCAUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQAFAAUABQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUAAAAFAEGp0AALBQEBAAEBAEHA0AALAQEAQdrQAAtBAgAAAAAAAAMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAAAAAAAAAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAQanSAAsFAQEAAQEAQcDSAAsBAQBBytIACwYCAAAAAAIAQeHSAAs6AwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAAAAAAAADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwBBoNQAC50BTk9VTkNFRUNLT1VUTkVDVEVURUNSSUJFTFVTSEVURUFEU0VBUkNIUkdFQ1RJVklUWUxFTkRBUlZFT1RJRllQVElPTlNDSFNFQVlTVEFUQ0hHRVVFUllPUkRJUkVDVE9SVFJDSFBBUkFNRVRFUlVSQ0VCU0NSSUJFQVJET1dOQUNFSU5ETktDS1VCU0NSSUJFVFRQQ0VUU1BBRFRQLw=="; @@ -40463,9 +54554,9 @@ var require_llhttp_simd_wasm2 = __commonJS({ } }); -// node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/fetch/constants.js +// ../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/fetch/constants.js var require_constants8 = __commonJS({ - "node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/fetch/constants.js"(exports, module) { + "../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/fetch/constants.js"(exports, module) { "use strict"; var corsSafeListedMethods = ( /** @type {const} */ @@ -40687,9 +54778,9 @@ var require_constants8 = __commonJS({ } }); -// node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/fetch/global.js +// ../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/fetch/global.js var require_global3 = __commonJS({ - "node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/fetch/global.js"(exports, module) { + "../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/fetch/global.js"(exports, module) { "use strict"; var globalOrigin = Symbol.for("undici.globalOrigin.1"); function getGlobalOrigin() { @@ -40723,18 +54814,18 @@ var require_global3 = __commonJS({ } }); -// node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/fetch/data-url.js +// ../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/fetch/data-url.js var require_data_url = __commonJS({ - "node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/fetch/data-url.js"(exports, module) { + "../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/fetch/data-url.js"(exports, module) { "use strict"; - var assert3 = __require("node:assert"); + var assert4 = __require("node:assert"); var encoder = new TextEncoder(); var HTTP_TOKEN_CODEPOINTS = /^[!#$%&'*+\-.^_|~A-Za-z0-9]+$/; var HTTP_WHITESPACE_REGEX = /[\u000A\u000D\u0009\u0020]/; var ASCII_WHITESPACE_REPLACE_REGEX = /[\u0009\u000A\u000C\u000D\u0020]/g; var HTTP_QUOTED_STRING_TOKENS = /^[\u0009\u0020-\u007E\u0080-\u00FF]+$/; function dataURLProcessor(dataURL) { - assert3(dataURL.protocol === "data:"); + assert4(dataURL.protocol === "data:"); let input = URLSerializer(dataURL, true); input = input.slice(5); const position = { position: 0 }; @@ -40770,12 +54861,12 @@ var require_data_url = __commonJS({ } return { mimeType: mimeTypeRecord, body }; } - function URLSerializer(url2, excludeFragment = false) { + function URLSerializer(url4, excludeFragment = false) { if (!excludeFragment) { - return url2.href; + return url4.href; } - const href = url2.href; - const hashLength = url2.hash.length; + const href = url4.href; + const hashLength = url4.hash.length; const serialized = hashLength === 0 ? href : href.substring(0, href.length - hashLength); if (!hashLength && href.endsWith("#")) { return serialized.slice(0, -1); @@ -40935,7 +55026,7 @@ var require_data_url = __commonJS({ function collectAnHTTPQuotedString(input, position, extractValue = false) { const positionStart = position.position; let value2 = ""; - assert3(input[position.position] === '"'); + assert4(input[position.position] === '"'); position.position++; while (true) { value2 += collectASequenceOfCodePoints( @@ -40956,7 +55047,7 @@ var require_data_url = __commonJS({ value2 += input[position.position]; position.position++; } else { - assert3(quoteOrBackslash === '"'); + assert4(quoteOrBackslash === '"'); break; } } @@ -40966,7 +55057,7 @@ var require_data_url = __commonJS({ return input.slice(positionStart, position.position); } function serializeAMimeType(mimeType) { - assert3(mimeType !== "failure"); + assert4(mimeType !== "failure"); const { parameters, essence } = mimeType; let serialization = essence; for (let [name, value2] of parameters.entries()) { @@ -41075,9 +55166,9 @@ var require_data_url = __commonJS({ } }); -// node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/webidl/index.js +// ../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/webidl/index.js var require_webidl2 = __commonJS({ - "node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/webidl/index.js"(exports, module) { + "../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/webidl/index.js"(exports, module) { "use strict"; var { types, inspect } = __require("node:util"); var { markAsUncloneable } = __require("node:worker_threads"); @@ -41374,8 +55465,8 @@ var require_webidl2 = __commonJS({ }); } for (const options of converters) { - const { key, defaultValue, required: required2, converter } = options; - if (required2 === true) { + const { key, defaultValue, required: required4, converter } = options; + if (required4 === true) { if (dictionary == null || !Object.hasOwn(dictionary, key)) { throw webidl.errors.exception({ header: prefix, @@ -41388,7 +55479,7 @@ var require_webidl2 = __commonJS({ if (hasDefault && value2 === void 0) { value2 = defaultValue(); } - if (required2 || hasDefault || value2 !== void 0) { + if (required4 || hasDefault || value2 !== void 0) { value2 = converter(value2, prefix, `${argument}.${key}`); if (options.allowedValues && !options.allowedValues.includes(value2)) { throw webidl.errors.exception({ @@ -41654,9 +55745,9 @@ var require_webidl2 = __commonJS({ } }); -// node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/fetch/util.js +// ../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/fetch/util.js var require_util12 = __commonJS({ - "node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/fetch/util.js"(exports, module) { + "../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/fetch/util.js"(exports, module) { "use strict"; var { Transform } = __require("node:stream"); var zlib = __require("node:zlib"); @@ -41665,7 +55756,7 @@ var require_util12 = __commonJS({ var { collectASequenceOfCodePoints, collectAnHTTPQuotedString, removeChars, parseMIMEType } = require_data_url(); var { performance: performance2 } = __require("node:perf_hooks"); var { ReadableStreamFrom, isValidHTTPToken, normalizedMethodRecordsBase } = require_util11(); - var assert3 = __require("node:assert"); + var assert4 = __require("node:assert"); var { isUint8Array } = __require("node:util/types"); var { webidl } = require_webidl2(); function responseURL(response) { @@ -41689,9 +55780,9 @@ var require_util12 = __commonJS({ } return location; } - function isValidEncodedURL(url2) { - for (let i = 0; i < url2.length; ++i) { - const code = url2.charCodeAt(i); + function isValidEncodedURL(url4) { + for (let i = 0; i < url4.length; ++i) { + const code = url4.charCodeAt(i); if (code > 126 || // Non-US-ASCII + DEL code < 32) { return false; @@ -41706,14 +55797,14 @@ var require_util12 = __commonJS({ return request2.urlList[request2.urlList.length - 1]; } function requestBadPort(request2) { - const url2 = requestCurrentURL(request2); - if (urlIsHttpHttpsScheme(url2) && badPortsSet.has(url2.port)) { + const url4 = requestCurrentURL(request2); + if (urlIsHttpHttpsScheme(url4) && badPortsSet.has(url4.port)) { return "blocked"; } return "allowed"; } - function isErrorLike(object2) { - return object2 instanceof Error || (object2?.constructor?.name === "Error" || object2?.constructor?.name === "DOMException"); + function isErrorLike(object6) { + return object6 instanceof Error || (object6?.constructor?.name === "Error" || object6?.constructor?.name === "DOMException"); } function isValidReasonPhrase(statusText) { for (let i = 0; i < statusText.length; ++i) { @@ -41846,7 +55937,7 @@ var require_util12 = __commonJS({ } function determineRequestsReferrer(request2) { const policy = request2.referrerPolicy; - assert3(policy); + assert4(policy); let referrerSource = null; if (request2.referrer === "client") { const globalOrigin = getGlobalOrigin(); @@ -41908,20 +55999,20 @@ var require_util12 = __commonJS({ } } } - function stripURLForReferrer(url2, originOnly = false) { - assert3(webidl.is.URL(url2)); - url2 = new URL(url2); - if (urlIsLocal(url2)) { + function stripURLForReferrer(url4, originOnly = false) { + assert4(webidl.is.URL(url4)); + url4 = new URL(url4); + if (urlIsLocal(url4)) { return "no-referrer"; } - url2.username = ""; - url2.password = ""; - url2.hash = ""; + url4.username = ""; + url4.password = ""; + url4.hash = ""; if (originOnly === true) { - url2.pathname = ""; - url2.search = ""; + url4.pathname = ""; + url4.search = ""; } - return url2; + return url4; } var isPotentialleTrustworthyIPv4 = RegExp.prototype.test.bind(/^127\.(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)\.){2}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)$/); var isPotentiallyTrustworthyIPv6 = RegExp.prototype.test.bind(/^(?:(?:0{1,4}:){7}|(?:0{1,4}:){1,6}:|::)0{0,3}1$/); @@ -41956,16 +56047,16 @@ var require_util12 = __commonJS({ } return false; } - function isURLPotentiallyTrustworthy(url2) { - if (!webidl.is.URL(url2)) { + function isURLPotentiallyTrustworthy(url4) { + if (!webidl.is.URL(url4)) { return false; } - if (url2.href === "about:blank" || url2.href === "about:srcdoc") { + if (url4.href === "about:blank" || url4.href === "about:srcdoc") { return true; } - if (url2.protocol === "data:") return true; - if (url2.protocol === "blob:") return true; - return isOriginPotentiallyTrustworthy(url2.origin); + if (url4.protocol === "data:") return true; + if (url4.protocol === "blob:") return true; + return isOriginPotentiallyTrustworthy(url4.origin); } function tryUpgradeRequestToAPotentiallyTrustworthyURL(request2) { } @@ -41978,7 +56069,7 @@ var require_util12 = __commonJS({ } return false; } - function isAborted4(fetchParams) { + function isAborted3(fetchParams) { return fetchParams.controller.state === "aborted"; } function isCancelled(fetchParams) { @@ -41992,7 +56083,7 @@ var require_util12 = __commonJS({ if (result === void 0) { throw new TypeError("Value is not JSON serializable"); } - assert3(typeof result === "string"); + assert4(typeof result === "string"); return result; } var esIteratorPrototype = Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]())); @@ -42064,7 +56155,7 @@ var require_util12 = __commonJS({ return new FastIterableIterator(target, kind); }; } - function iteratorMixin(name, object2, kInternalIterator, keyIndex = 0, valueIndex = 1) { + function iteratorMixin(name, object6, kInternalIterator, keyIndex = 0, valueIndex = 1) { const makeIterator = createIterator(name, kInternalIterator, keyIndex, valueIndex); const properties = { keys: { @@ -42072,7 +56163,7 @@ var require_util12 = __commonJS({ enumerable: true, configurable: true, value: function keys() { - webidl.brandCheck(this, object2); + webidl.brandCheck(this, object6); return makeIterator(this, "key"); } }, @@ -42081,7 +56172,7 @@ var require_util12 = __commonJS({ enumerable: true, configurable: true, value: function values() { - webidl.brandCheck(this, object2); + webidl.brandCheck(this, object6); return makeIterator(this, "value"); } }, @@ -42090,7 +56181,7 @@ var require_util12 = __commonJS({ enumerable: true, configurable: true, value: function entries() { - webidl.brandCheck(this, object2); + webidl.brandCheck(this, object6); return makeIterator(this, "key+value"); } }, @@ -42099,7 +56190,7 @@ var require_util12 = __commonJS({ enumerable: true, configurable: true, value: function forEach(callbackfn, thisArg = globalThis) { - webidl.brandCheck(this, object2); + webidl.brandCheck(this, object6); webidl.argumentLengthCheck(arguments, 1, `${name}.forEach`); if (typeof callbackfn !== "function") { throw new TypeError( @@ -42112,7 +56203,7 @@ var require_util12 = __commonJS({ } } }; - return Object.defineProperties(object2.prototype, { + return Object.defineProperties(object6.prototype, { ...properties, [Symbol.iterator]: { writable: true, @@ -42144,7 +56235,7 @@ var require_util12 = __commonJS({ } var invalidIsomorphicEncodeValueRegex = /[^\x00-\xFF]/; function isomorphicEncode(input) { - assert3(!invalidIsomorphicEncodeValueRegex.test(input)); + assert4(!invalidIsomorphicEncodeValueRegex.test(input)); return input; } async function readAllBytes(reader, successSteps, failureSteps) { @@ -42168,17 +56259,17 @@ var require_util12 = __commonJS({ failureSteps(e); } } - function urlIsLocal(url2) { - assert3("protocol" in url2); - const protocol = url2.protocol; + function urlIsLocal(url4) { + assert4("protocol" in url4); + const protocol = url4.protocol; return protocol === "about:" || protocol === "blob:" || protocol === "data:"; } - function urlHasHttpsScheme(url2) { - return typeof url2 === "string" && url2[5] === ":" && url2[0] === "h" && url2[1] === "t" && url2[2] === "t" && url2[3] === "p" && url2[4] === "s" || url2.protocol === "https:"; + function urlHasHttpsScheme(url4) { + return typeof url4 === "string" && url4[5] === ":" && url4[0] === "h" && url4[1] === "t" && url4[2] === "t" && url4[3] === "p" && url4[4] === "s" || url4.protocol === "https:"; } - function urlIsHttpHttpsScheme(url2) { - assert3("protocol" in url2); - const protocol = url2.protocol; + function urlIsHttpHttpsScheme(url4) { + assert4("protocol" in url4); + const protocol = url4.protocol; return protocol === "http:" || protocol === "https:"; } function simpleRangeHeaderValue(value2, allowWhitespace) { @@ -42342,7 +56433,7 @@ var require_util12 = __commonJS({ continue; } } else { - assert3(input.charCodeAt(position.position) === 44); + assert4(input.charCodeAt(position.position) === 44); position.position++; } } @@ -42384,7 +56475,7 @@ var require_util12 = __commonJS({ }; var environmentSettingsObject = new EnvironmentSettingsObject(); module.exports = { - isAborted: isAborted4, + isAborted: isAborted3, isCancelled, isValidEncodedURL, ReadableStreamFrom, @@ -42435,9 +56526,9 @@ var require_util12 = __commonJS({ } }); -// node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/fetch/formdata.js +// ../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/fetch/formdata.js var require_formdata2 = __commonJS({ - "node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/fetch/formdata.js"(exports, module) { + "../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/fetch/formdata.js"(exports, module) { "use strict"; var { iteratorMixin } = require_util12(); var { kEnumerableProperty } = require_util11(); @@ -42597,16 +56688,16 @@ var require_formdata2 = __commonJS({ } }); -// node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/fetch/formdata-parser.js +// ../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/fetch/formdata-parser.js var require_formdata_parser = __commonJS({ - "node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/fetch/formdata-parser.js"(exports, module) { + "../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/fetch/formdata-parser.js"(exports, module) { "use strict"; var { bufferToLowerCasedHeaderName } = require_util11(); var { utf8DecodeBytes } = require_util12(); var { HTTP_TOKEN_CODEPOINTS, isomorphicDecode } = require_data_url(); var { makeEntry } = require_formdata2(); var { webidl } = require_webidl2(); - var assert3 = __require("node:assert"); + var assert4 = __require("node:assert"); var formDataNameBuffer = Buffer.from('form-data; name="'); var filenameBuffer = Buffer.from("filename"); var dd = Buffer.from("--"); @@ -42633,7 +56724,7 @@ var require_formdata_parser = __commonJS({ return true; } function multipartFormDataParser(input, mimeType) { - assert3(mimeType !== "failure" && mimeType.essence === "multipart/form-data"); + assert4(mimeType !== "failure" && mimeType.essence === "multipart/form-data"); const boundaryString = mimeType.parameters.get("boundary"); if (boundaryString === void 0) { throw parsingError("missing boundary in content-type header"); @@ -42694,8 +56785,8 @@ var require_formdata_parser = __commonJS({ } else { value2 = utf8DecodeBytes(Buffer.from(body)); } - assert3(webidl.is.USVString(name)); - assert3(typeof value2 === "string" && webidl.is.USVString(value2) || webidl.is.File(value2)); + assert4(webidl.is.USVString(name)); + assert4(typeof value2 === "string" && webidl.is.USVString(value2) || webidl.is.File(value2)); entryList.push(makeEntry(name, value2, filename)); } } @@ -42812,7 +56903,7 @@ var require_formdata_parser = __commonJS({ } } function parseMultipartFormDataName(input, position) { - assert3(input[position.position - 1] === 34); + assert4(input[position.position - 1] === 34); let name = collectASequenceOfBytes( (char) => char !== 10 && char !== 13 && char !== 34, input, @@ -42865,18 +56956,18 @@ var require_formdata_parser = __commonJS({ } }); -// node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/util/promise.js +// ../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/util/promise.js var require_promise = __commonJS({ - "node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/util/promise.js"(exports, module) { + "../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/util/promise.js"(exports, module) { "use strict"; function createDeferredPromise() { let res; let rej; - const promise = new Promise((resolve, reject) => { + const promise2 = new Promise((resolve, reject) => { res = resolve; rej = reject; }); - return { promise, resolve: res, reject: rej }; + return { promise: promise2, resolve: res, reject: rej }; } module.exports = { createDeferredPromise @@ -42884,9 +56975,9 @@ var require_promise = __commonJS({ } }); -// node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/fetch/body.js +// ../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/fetch/body.js var require_body2 = __commonJS({ - "node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/fetch/body.js"(exports, module) { + "../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/fetch/body.js"(exports, module) { "use strict"; var util3 = require_util11(); var { @@ -42898,7 +56989,7 @@ var require_body2 = __commonJS({ } = require_util12(); var { FormData: FormData2, setFormDataState } = require_formdata2(); var { webidl } = require_webidl2(); - var assert3 = __require("node:assert"); + var assert4 = __require("node:assert"); var { isErrored, isDisturbed } = __require("node:stream"); var { isArrayBuffer } = __require("node:util/types"); var { serializeAMimeType } = require_data_url(); @@ -42920,12 +57011,12 @@ var require_body2 = __commonJS({ stream.cancel("Response object has been garbage collected").catch(noop4); } }); - function extractBody(object2, keepalive = false) { + function extractBody(object6, keepalive = false) { let stream = null; - if (webidl.is.ReadableStream(object2)) { - stream = object2; - } else if (webidl.is.Blob(object2)) { - stream = object2.stream(); + if (webidl.is.ReadableStream(object6)) { + stream = object6; + } else if (webidl.is.Blob(object6)) { + stream = object6.stream(); } else { stream = new ReadableStream({ pull(controller) { @@ -42940,20 +57031,20 @@ var require_body2 = __commonJS({ type: "bytes" }); } - assert3(webidl.is.ReadableStream(stream)); + assert4(webidl.is.ReadableStream(stream)); let action = null; let source = null; let length = null; let type2 = null; - if (typeof object2 === "string") { - source = object2; + if (typeof object6 === "string") { + source = object6; type2 = "text/plain;charset=UTF-8"; - } else if (webidl.is.URLSearchParams(object2)) { - source = object2.toString(); + } else if (webidl.is.URLSearchParams(object6)) { + source = object6.toString(); type2 = "application/x-www-form-urlencoded;charset=UTF-8"; - } else if (webidl.is.BufferSource(object2)) { - source = isArrayBuffer(object2) ? new Uint8Array(object2.slice()) : new Uint8Array(object2.buffer.slice(object2.byteOffset, object2.byteOffset + object2.byteLength)); - } else if (webidl.is.FormData(object2)) { + } else if (webidl.is.BufferSource(object6)) { + source = isArrayBuffer(object6) ? new Uint8Array(object6.slice()) : new Uint8Array(object6.buffer.slice(object6.byteOffset, object6.byteOffset + object6.byteLength)); + } else if (webidl.is.FormData(object6)) { const boundary = `----formdata-undici-0${`${random(1e11)}`.padStart(11, "0")}`; const prefix = `--${boundary}\r Content-Disposition: form-data`; @@ -42963,7 +57054,7 @@ Content-Disposition: form-data`; const rn = new Uint8Array([13, 10]); length = 0; let hasUnknownSizeValue = false; - for (const [name, value2] of object2) { + for (const [name, value2] of object6) { if (typeof value2 === "string") { const chunk2 = textEncoder.encode(prefix + `; name="${formdataEscape(normalizeLinefeeds(name))}"\r \r @@ -42991,7 +57082,7 @@ Content-Type: ${value2.type || "application/octet-stream"}\r if (hasUnknownSizeValue) { length = null; } - source = object2; + source = object6; action = async function* () { for (const part of blobParts) { if (part.stream) { @@ -43002,22 +57093,22 @@ Content-Type: ${value2.type || "application/octet-stream"}\r } }; type2 = `multipart/form-data; boundary=${boundary}`; - } else if (webidl.is.Blob(object2)) { - source = object2; - length = object2.size; - if (object2.type) { - type2 = object2.type; + } else if (webidl.is.Blob(object6)) { + source = object6; + length = object6.size; + if (object6.type) { + type2 = object6.type; } - } else if (typeof object2[Symbol.asyncIterator] === "function") { + } else if (typeof object6[Symbol.asyncIterator] === "function") { if (keepalive) { throw new TypeError("keepalive"); } - if (util3.isDisturbed(object2) || object2.locked) { + if (util3.isDisturbed(object6) || object6.locked) { throw new TypeError( "Response body object should not be disturbed or locked" ); } - stream = webidl.is.ReadableStream(object2) ? object2 : ReadableStreamFrom(object2); + stream = webidl.is.ReadableStream(object6) ? object6 : ReadableStreamFrom(object6); } if (typeof source === "string" || util3.isBuffer(source)) { length = Buffer.byteLength(source); @@ -43026,7 +57117,7 @@ Content-Type: ${value2.type || "application/octet-stream"}\r let iterator2; stream = new ReadableStream({ async start() { - iterator2 = action(object2)[Symbol.asyncIterator](); + iterator2 = action(object6)[Symbol.asyncIterator](); }, async pull(controller) { const { value: value2, done } = await iterator2.next(); @@ -43054,12 +57145,12 @@ Content-Type: ${value2.type || "application/octet-stream"}\r const body = { stream, source, length }; return [body, type2]; } - function safelyExtractBody(object2, keepalive = false) { - if (webidl.is.ReadableStream(object2)) { - assert3(!util3.isDisturbed(object2), "The body has already been consumed."); - assert3(!object2.locked, "The stream is locked."); + function safelyExtractBody(object6, keepalive = false) { + if (webidl.is.ReadableStream(object6)) { + assert4(!util3.isDisturbed(object6), "The body has already been consumed."); + assert4(!object6.locked, "The stream is locked."); } - return extractBody(object2, keepalive); + return extractBody(object6, keepalive); } function cloneBody(body) { const { 0: out1, 1: out2 } = body.stream.tee(); @@ -43131,37 +57222,37 @@ Content-Type: ${value2.type || "application/octet-stream"}\r function mixinBody(prototype, getInternalState) { Object.assign(prototype.prototype, bodyMixinMethods(prototype, getInternalState)); } - function consumeBody(object2, convertBytesToJSValue, instance, getInternalState) { + function consumeBody(object6, convertBytesToJSValue, instance, getInternalState) { try { - webidl.brandCheck(object2, instance); + webidl.brandCheck(object6, instance); } catch (e) { return Promise.reject(e); } - const state = getInternalState(object2); + const state = getInternalState(object6); if (bodyUnusable(state)) { return Promise.reject(new TypeError("Body is unusable: Body has already been read")); } if (state.aborted) { return Promise.reject(new DOMException("The operation was aborted.", "AbortError")); } - const promise = createDeferredPromise(); - const errorSteps = promise.reject; + const promise2 = createDeferredPromise(); + const errorSteps = promise2.reject; const successSteps = (data) => { try { - promise.resolve(convertBytesToJSValue(data)); + promise2.resolve(convertBytesToJSValue(data)); } catch (e) { errorSteps(e); } }; if (state.body == null) { successSteps(Buffer.allocUnsafe(0)); - return promise.promise; + return promise2.promise; } fullyReadBody(state.body, successSteps, errorSteps); - return promise.promise; + return promise2.promise; } - function bodyUnusable(object2) { - const body = object2.body; + function bodyUnusable(object6) { + const body = object6.body; return body != null && (body.stream.locked || util3.isDisturbed(body.stream)); } function parseJSONFromBytes(bytes) { @@ -43186,11 +57277,11 @@ Content-Type: ${value2.type || "application/octet-stream"}\r } }); -// node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/dispatcher/client-h1.js +// ../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/dispatcher/client-h1.js var require_client_h1 = __commonJS({ - "node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/dispatcher/client-h1.js"(exports, module) { + "../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/dispatcher/client-h1.js"(exports, module) { "use strict"; - var assert3 = __require("node:assert"); + var assert4 = __require("node:assert"); var util3 = require_util11(); var { channels } = require_diagnostics(); var timers = require_timers2(); @@ -43205,7 +57296,7 @@ var require_client_h1 = __commonJS({ BodyTimeoutError, HTTPParserError, ResponseExceededMaxSizeError - } = require_errors2(); + } = require_errors5(); var { kUrl, kReset, @@ -43281,7 +57372,7 @@ var require_client_h1 = __commonJS({ * @returns {number} */ wasm_on_status: (p, at, len) => { - assert3(currentParser.ptr === p); + assert4(currentParser.ptr === p); const start = at - currentBufferPtr + currentBufferRef.byteOffset; return currentParser.onStatus(new FastBuffer(currentBufferRef.buffer, start, len)); }, @@ -43290,7 +57381,7 @@ var require_client_h1 = __commonJS({ * @returns {number} */ wasm_on_message_begin: (p) => { - assert3(currentParser.ptr === p); + assert4(currentParser.ptr === p); return currentParser.onMessageBegin(); }, /** @@ -43300,7 +57391,7 @@ var require_client_h1 = __commonJS({ * @returns {number} */ wasm_on_header_field: (p, at, len) => { - assert3(currentParser.ptr === p); + assert4(currentParser.ptr === p); const start = at - currentBufferPtr + currentBufferRef.byteOffset; return currentParser.onHeaderField(new FastBuffer(currentBufferRef.buffer, start, len)); }, @@ -43311,7 +57402,7 @@ var require_client_h1 = __commonJS({ * @returns {number} */ wasm_on_header_value: (p, at, len) => { - assert3(currentParser.ptr === p); + assert4(currentParser.ptr === p); const start = at - currentBufferPtr + currentBufferRef.byteOffset; return currentParser.onHeaderValue(new FastBuffer(currentBufferRef.buffer, start, len)); }, @@ -43323,7 +57414,7 @@ var require_client_h1 = __commonJS({ * @returns {number} */ wasm_on_headers_complete: (p, statusCode, upgrade, shouldKeepAlive) => { - assert3(currentParser.ptr === p); + assert4(currentParser.ptr === p); return currentParser.onHeadersComplete(statusCode, upgrade === 1, shouldKeepAlive === 1); }, /** @@ -43333,7 +57424,7 @@ var require_client_h1 = __commonJS({ * @returns {number} */ wasm_on_body: (p, at, len) => { - assert3(currentParser.ptr === p); + assert4(currentParser.ptr === p); const start = at - currentBufferPtr + currentBufferRef.byteOffset; return currentParser.onBody(new FastBuffer(currentBufferRef.buffer, start, len)); }, @@ -43342,7 +57433,7 @@ var require_client_h1 = __commonJS({ * @returns {number} */ wasm_on_message_complete: (p) => { - assert3(currentParser.ptr === p); + assert4(currentParser.ptr === p); return currentParser.onMessageComplete(); } } @@ -43413,10 +57504,10 @@ var require_client_h1 = __commonJS({ if (this.socket.destroyed || !this.paused) { return; } - assert3(this.ptr != null); - assert3(currentParser === null); + assert4(this.ptr != null); + assert4(currentParser === null); this.llhttp.llhttp_resume(this.ptr); - assert3(this.timeoutType === TIMEOUT_BODY); + assert4(this.timeoutType === TIMEOUT_BODY); if (this.timeout) { if (this.timeout.refresh) { this.timeout.refresh(); @@ -43439,9 +57530,9 @@ var require_client_h1 = __commonJS({ * @param {Buffer} chunk */ execute(chunk) { - assert3(currentParser === null); - assert3(this.ptr != null); - assert3(!this.paused); + assert4(currentParser === null); + assert4(this.ptr != null); + assert4(!this.paused); const { socket, llhttp } = this; if (chunk.length > currentBufferSize) { if (currentBufferPtr) { @@ -43483,8 +57574,8 @@ var require_client_h1 = __commonJS({ } } destroy() { - assert3(currentParser === null); - assert3(this.ptr != null); + assert4(currentParser === null); + assert4(this.ptr != null); this.llhttp.llhttp_free(this.ptr); this.ptr = null; this.timeout && timers.clearTimeout(this.timeout); @@ -43570,14 +57661,14 @@ var require_client_h1 = __commonJS({ */ onUpgrade(head) { const { upgrade, client, socket, headers, statusCode } = this; - assert3(upgrade); - assert3(client[kSocket] === socket); - assert3(!socket.destroyed); - assert3(!this.paused); - assert3((headers.length & 1) === 0); + assert4(upgrade); + assert4(client[kSocket] === socket); + assert4(!socket.destroyed); + assert4(!this.paused); + assert4((headers.length & 1) === 0); const request2 = client[kQueue][client[kRunningIdx]]; - assert3(request2); - assert3(request2.upgrade || request2.method === "CONNECT"); + assert4(request2); + assert4(request2.upgrade || request2.method === "CONNECT"); this.statusCode = 0; this.statusText = ""; this.shouldKeepAlive = false; @@ -43615,8 +57706,8 @@ var require_client_h1 = __commonJS({ if (!request2) { return -1; } - assert3(!this.upgrade); - assert3(this.statusCode < 200); + assert4(!this.upgrade); + assert4(this.statusCode < 200); if (statusCode === 100) { util3.destroy(socket, new SocketError("bad response", util3.getSocketInfo(socket))); return -1; @@ -43625,7 +57716,7 @@ var require_client_h1 = __commonJS({ util3.destroy(socket, new SocketError("bad upgrade", util3.getSocketInfo(socket))); return -1; } - assert3(this.timeoutType === TIMEOUT_HEADERS); + assert4(this.timeoutType === TIMEOUT_HEADERS); this.statusCode = statusCode; this.shouldKeepAlive = shouldKeepAlive || // Override llhttp value which does not allow keepAlive for HEAD. request2.method === "HEAD" && !socket[kReset] && this.connection.toLowerCase() === "keep-alive"; @@ -43638,16 +57729,16 @@ var require_client_h1 = __commonJS({ } } if (request2.method === "CONNECT") { - assert3(client[kRunning] === 1); + assert4(client[kRunning] === 1); this.upgrade = true; return 2; } if (upgrade) { - assert3(client[kRunning] === 1); + assert4(client[kRunning] === 1); this.upgrade = true; return 2; } - assert3((this.headers.length & 1) === 0); + assert4((this.headers.length & 1) === 0); this.headers = []; this.headersSize = 0; if (this.shouldKeepAlive && client[kPipelining]) { @@ -43694,14 +57785,14 @@ var require_client_h1 = __commonJS({ return -1; } const request2 = client[kQueue][client[kRunningIdx]]; - assert3(request2); - assert3(this.timeoutType === TIMEOUT_BODY); + assert4(request2); + assert4(this.timeoutType === TIMEOUT_BODY); if (this.timeout) { if (this.timeout.refresh) { this.timeout.refresh(); } } - assert3(statusCode >= 200); + assert4(statusCode >= 200); if (maxResponseSize > -1 && this.bytesRead + buf.length > maxResponseSize) { util3.destroy(socket, new ResponseExceededMaxSizeError()); return -1; @@ -43723,10 +57814,10 @@ var require_client_h1 = __commonJS({ if (upgrade) { return 0; } - assert3(statusCode >= 100); - assert3((this.headers.length & 1) === 0); + assert4(statusCode >= 100); + assert4((this.headers.length & 1) === 0); const request2 = client[kQueue][client[kRunningIdx]]; - assert3(request2); + assert4(request2); this.statusCode = 0; this.statusText = ""; this.bytesRead = 0; @@ -43745,7 +57836,7 @@ var require_client_h1 = __commonJS({ request2.onComplete(headers); client[kQueue][client[kRunningIdx]++] = null; if (socket[kWriting]) { - assert3(client[kRunning] === 0); + assert4(client[kRunning] === 0); util3.destroy(socket, new InformationalError("reset")); return constants.ERROR.PAUSED; } else if (!shouldKeepAlive) { @@ -43766,7 +57857,7 @@ var require_client_h1 = __commonJS({ const { socket, timeoutType, client, paused } = parser.deref(); if (timeoutType === TIMEOUT_HEADERS) { if (!socket[kWriting] || socket.writableNeedDrain || client[kRunning] > 1) { - assert3(!paused, "cannot be paused while waiting for headers"); + assert4(!paused, "cannot be paused while waiting for headers"); util3.destroy(socket, new HeadersTimeoutError()); } } else if (timeoutType === TIMEOUT_BODY) { @@ -43774,7 +57865,7 @@ var require_client_h1 = __commonJS({ util3.destroy(socket, new BodyTimeoutError()); } } else if (timeoutType === TIMEOUT_KEEP_ALIVE) { - assert3(client[kRunning] === 0 && client[kKeepAliveTimeoutValue]); + assert4(client[kRunning] === 0 && client[kKeepAliveTimeoutValue]); util3.destroy(socket, new InformationalError("socket idle timeout")); } } @@ -43851,7 +57942,7 @@ var require_client_h1 = __commonJS({ }; } function onHttpSocketError(err) { - assert3(err.code !== "ERR_TLS_CERT_ALTNAME_INVALID"); + assert4(err.code !== "ERR_TLS_CERT_ALTNAME_INVALID"); const parser = this[kParser]; if (err.code === "ECONNRESET" && parser.statusCode && !parser.shouldKeepAlive) { parser.onMessageComplete(); @@ -43885,7 +57976,7 @@ var require_client_h1 = __commonJS({ client[kSocket] = null; client[kHTTPContext] = null; if (client.destroyed) { - assert3(client[kPending] === 0); + assert4(client[kPending] === 0); const requests = client[kQueue].splice(client[kRunningIdx]); for (let i = 0; i < requests.length; i++) { const request2 = requests[i]; @@ -43897,7 +57988,7 @@ var require_client_h1 = __commonJS({ util3.errorRequest(client, request2, err); } client[kPendingIdx] = client[kRunningIdx]; - assert3(client[kRunning] === 0); + assert4(client[kRunning] === 0); client.emit("disconnect", client[kUrl], [client], err); client[kResume](); } @@ -44049,12 +58140,12 @@ upgrade: ${upgrade}\r } else if (util3.isIterable(body)) { writeIterable(abort, body, client, request2, socket, contentLength, header, expectsPayload); } else { - assert3(false); + assert4(false); } return true; } function writeStream(abort, body, client, request2, socket, contentLength, header, expectsPayload) { - assert3(contentLength !== 0 || client[kRunning] === 0, "stream body cannot be pipelined"); + assert4(contentLength !== 0 || client[kRunning] === 0, "stream body cannot be pipelined"); let finished = false; const writer = new AsyncWriter({ abort, socket, request: request2, contentLength, client, expectsPayload, header }); const onData = function(chunk) { @@ -44091,7 +58182,7 @@ upgrade: ${upgrade}\r return; } finished = true; - assert3(socket.destroyed || socket[kWriting] && client[kRunning] <= 1); + assert4(socket.destroyed || socket[kWriting] && client[kRunning] <= 1); socket.off("drain", onDrain).off("error", onFinished); body.removeListener("data", onData).removeListener("end", onFinished).removeListener("close", onClose); if (!err) { @@ -44130,12 +58221,12 @@ upgrade: ${upgrade}\r \r `, "latin1"); } else { - assert3(contentLength === null, "no body must not have content length"); + assert4(contentLength === null, "no body must not have content length"); socket.write(`${header}\r `, "latin1"); } } else if (util3.isBuffer(body)) { - assert3(contentLength === body.byteLength, "buffer body must have content length"); + assert4(contentLength === body.byteLength, "buffer body must have content length"); socket.cork(); socket.write(`${header}content-length: ${contentLength}\r \r @@ -44154,7 +58245,7 @@ upgrade: ${upgrade}\r } } async function writeBlob(abort, body, client, request2, socket, contentLength, header, expectsPayload) { - assert3(contentLength === body.size, "blob body must have content length"); + assert4(contentLength === body.size, "blob body must have content length"); try { if (contentLength != null && contentLength !== body.size) { throw new RequestContentLengthMismatchError(); @@ -44177,7 +58268,7 @@ upgrade: ${upgrade}\r } } async function writeIterable(abort, body, client, request2, socket, contentLength, header, expectsPayload) { - assert3(contentLength !== 0 || client[kRunning] === 0, "iterator body cannot be pipelined"); + assert4(contentLength !== 0 || client[kRunning] === 0, "iterator body cannot be pipelined"); let callback = null; function onDrain() { if (callback) { @@ -44187,7 +58278,7 @@ upgrade: ${upgrade}\r } } const waitForDrain = () => new Promise((resolve, reject) => { - assert3(callback === null); + assert4(callback === null); if (socket[kError]) { reject(socket[kError]); } else { @@ -44336,7 +58427,7 @@ ${len.toString(16)}\r const { socket, client, abort } = this; socket[kWriting] = false; if (err) { - assert3(client[kRunning] <= 1, "pipeline should only contain this request"); + assert4(client[kRunning] <= 1, "pipeline should only contain this request"); abort(err); } } @@ -44345,11 +58436,11 @@ ${len.toString(16)}\r } }); -// node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/dispatcher/client-h2.js +// ../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/dispatcher/client-h2.js var require_client_h2 = __commonJS({ - "node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/dispatcher/client-h2.js"(exports, module) { + "../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/dispatcher/client-h2.js"(exports, module) { "use strict"; - var assert3 = __require("node:assert"); + var assert4 = __require("node:assert"); var { pipeline: pipeline2 } = __require("node:stream"); var util3 = require_util11(); var { @@ -44357,7 +58448,7 @@ var require_client_h2 = __commonJS({ RequestAbortedError, SocketError, InformationalError - } = require_errors2(); + } = require_errors5(); var { kUrl, kReset, @@ -44476,7 +58567,7 @@ var require_client_h2 = __commonJS({ } } function onHttp2SessionError(err) { - assert3(err.code !== "ERR_TLS_CERT_ALTNAME_INVALID"); + assert4(err.code !== "ERR_TLS_CERT_ALTNAME_INVALID"); this[kSocket][kError] = err; this[kClient][kOnError](err); } @@ -44506,7 +58597,7 @@ var require_client_h2 = __commonJS({ util3.errorRequest(client, request2, err); client[kPendingIdx] = client[kRunningIdx]; } - assert3(client[kRunning] === 0); + assert4(client[kRunning] === 0); client.emit("disconnect", client[kUrl], [client], err); client.emit("connectionError", client[kUrl], [client], err); client[kResume](); @@ -44518,7 +58609,7 @@ var require_client_h2 = __commonJS({ client[kSocket] = null; client[kHTTPContext] = null; if (client.destroyed) { - assert3(client[kPending] === 0); + assert4(client[kPending] === 0); const requests = client[kQueue].splice(client[kRunningIdx]); for (let i = 0; i < requests.length; i++) { const request2 = requests[i]; @@ -44535,12 +58626,12 @@ var require_client_h2 = __commonJS({ this[kHTTP2Session].destroy(err); } client[kPendingIdx] = client[kRunningIdx]; - assert3(client[kRunning] === 0); + assert4(client[kRunning] === 0); client.emit("disconnect", client[kUrl], [client], err); client[kResume](); } function onHttp2SocketError(err) { - assert3(err.code !== "ERR_TLS_CERT_ALTNAME_INVALID"); + assert4(err.code !== "ERR_TLS_CERT_ALTNAME_INVALID"); this[kError] = err; this[kClient][kOnError](err); } @@ -44589,8 +58680,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: hostname5, port } = client[kUrl]; + headers[HTTP2_HEADER_AUTHORITY] = host || `${hostname5}${port ? `:${port}` : ""}`; headers[HTTP2_HEADER_METHOD] = method; const abort = (err) => { if (request2.aborted || request2.completed) { @@ -44663,7 +58754,7 @@ var require_client_h2 = __commonJS({ process.emitWarning(new RequestContentLengthMismatchError()); } if (contentLength != null) { - assert3(body, "no body must not have content length"); + assert4(body, "no body must not have content length"); headers[HTTP2_HEADER_CONTENT_LENGTH] = `${contentLength}`; } session.ref(); @@ -44828,14 +58919,14 @@ var require_client_h2 = __commonJS({ expectsPayload ); } else { - assert3(false); + assert4(false); } } } function writeBuffer(abort, h2stream, body, client, request2, socket, contentLength, expectsPayload) { try { if (body != null && util3.isBuffer(body)) { - assert3(contentLength === body.byteLength, "buffer body must have content length"); + assert4(contentLength === body.byteLength, "buffer body must have content length"); h2stream.cork(); h2stream.write(body); h2stream.uncork(); @@ -44847,21 +58938,21 @@ var require_client_h2 = __commonJS({ } request2.onRequestSent(); client[kResume](); - } catch (error41) { - abort(error41); + } catch (error50) { + abort(error50); } } function writeStream(abort, socket, expectsPayload, h2stream, body, client, request2, contentLength) { - assert3(contentLength !== 0 || client[kRunning] === 0, "stream body cannot be pipelined"); - const pipe = pipeline2( + assert4(contentLength !== 0 || client[kRunning] === 0, "stream body cannot be pipelined"); + const pipe4 = pipeline2( body, h2stream, (err) => { if (err) { - util3.destroy(pipe, err); + util3.destroy(pipe4, err); abort(err); } else { - util3.removeAllListeners(pipe); + util3.removeAllListeners(pipe4); request2.onRequestSent(); if (!expectsPayload) { socket[kReset] = true; @@ -44870,13 +58961,13 @@ var require_client_h2 = __commonJS({ } } ); - util3.addListener(pipe, "data", onPipeData); + util3.addListener(pipe4, "data", onPipeData); function onPipeData(chunk) { request2.onBodySent(chunk); } } async function writeBlob(abort, h2stream, body, client, request2, socket, contentLength, expectsPayload) { - assert3(contentLength === body.size, "blob body must have content length"); + assert4(contentLength === body.size, "blob body must have content length"); try { if (contentLength != null && contentLength !== body.size) { throw new RequestContentLengthMismatchError(); @@ -44897,7 +58988,7 @@ var require_client_h2 = __commonJS({ } } async function writeIterable(abort, h2stream, body, client, request2, socket, contentLength, expectsPayload) { - assert3(contentLength !== 0 || client[kRunning] === 0, "iterator body cannot be pipelined"); + assert4(contentLength !== 0 || client[kRunning] === 0, "iterator body cannot be pipelined"); let callback = null; function onDrain() { if (callback) { @@ -44907,7 +58998,7 @@ var require_client_h2 = __commonJS({ } } const waitForDrain = () => new Promise((resolve, reject) => { - assert3(callback === null); + assert4(callback === null); if (socket[kError]) { reject(socket[kError]); } else { @@ -44942,11 +59033,11 @@ var require_client_h2 = __commonJS({ } }); -// node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/dispatcher/client.js +// ../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/dispatcher/client.js var require_client2 = __commonJS({ - "node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/dispatcher/client.js"(exports, module) { + "../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/dispatcher/client.js"(exports, module) { "use strict"; - var assert3 = __require("node:assert"); + var assert4 = __require("node:assert"); var net = __require("node:net"); var http2 = __require("node:http"); var util3 = require_util11(); @@ -44958,7 +59049,7 @@ var require_client2 = __commonJS({ InvalidArgumentError, InformationalError, ClientDestroyedError - } = require_errors2(); + } = require_errors5(); var buildConnector = require_connect2(); var { kUrl, @@ -45017,7 +59108,7 @@ var require_client2 = __commonJS({ * @param {string|URL} url * @param {import('../../types/client.js').Client.Options} options */ - constructor(url2, { + constructor(url4, { maxHeaderSize, headersTimeout, socketTimeout, @@ -45121,7 +59212,7 @@ var require_client2 = __commonJS({ ...connect2 }); } - this[kUrl] = util3.parseOrigin(url2); + this[kUrl] = util3.parseOrigin(url4); this[kConnector] = connect2; this[kPipelining] = pipelining != null ? pipelining : 1; this[kMaxHeadersSize] = maxHeaderSize; @@ -45231,32 +59322,32 @@ var require_client2 = __commonJS({ }; function onError(client, err) { if (client[kRunning] === 0 && err.code !== "UND_ERR_INFO" && err.code !== "UND_ERR_SOCKET") { - assert3(client[kPendingIdx] === client[kRunningIdx]); + assert4(client[kPendingIdx] === client[kRunningIdx]); const requests = client[kQueue].splice(client[kRunningIdx]); for (let i = 0; i < requests.length; i++) { const request2 = requests[i]; util3.errorRequest(client, request2, err); } - assert3(client[kSize] === 0); + assert4(client[kSize] === 0); } } function connect(client) { - assert3(!client[kConnecting]); - assert3(!client[kHTTPContext]); - let { host, hostname: hostname2, protocol, port } = client[kUrl]; - if (hostname2[0] === "[") { - const idx = hostname2.indexOf("]"); - assert3(idx !== -1); - const ip2 = hostname2.substring(1, idx); - assert3(net.isIPv6(ip2)); - hostname2 = ip2; + assert4(!client[kConnecting]); + assert4(!client[kHTTPContext]); + let { host, hostname: hostname5, protocol, port } = client[kUrl]; + if (hostname5[0] === "[") { + const idx = hostname5.indexOf("]"); + assert4(idx !== -1); + const ip2 = hostname5.substring(1, idx); + assert4(net.isIPv6(ip2)); + hostname5 = ip2; } client[kConnecting] = true; if (channels.beforeConnect.hasSubscribers) { channels.beforeConnect.publish({ connectParams: { host, - hostname: hostname2, + hostname: hostname5, protocol, port, version: client[kHTTPContext]?.version, @@ -45268,14 +59359,14 @@ var require_client2 = __commonJS({ } client[kConnector]({ host, - hostname: hostname2, + hostname: hostname5, 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: hostname5, protocol, port }); client[kResume](); return; } @@ -45284,12 +59375,12 @@ var require_client2 = __commonJS({ client[kResume](); return; } - assert3(socket); + assert4(socket); try { client[kHTTPContext] = socket.alpnProtocol === "h2" ? connectH2(client, socket) : connectH1(client, socket); } catch (err2) { socket.destroy().on("error", noop4); - handleConnectError(client, err2, { host, hostname: hostname2, protocol, port }); + handleConnectError(client, err2, { host, hostname: hostname5, protocol, port }); client[kResume](); return; } @@ -45302,7 +59393,7 @@ var require_client2 = __commonJS({ channels.connected.publish({ connectParams: { host, - hostname: hostname2, + hostname: hostname5, protocol, port, version: client[kHTTPContext]?.version, @@ -45317,7 +59408,7 @@ var require_client2 = __commonJS({ client[kResume](); }); } - function handleConnectError(client, err, { host, hostname: hostname2, protocol, port }) { + function handleConnectError(client, err, { host, hostname: hostname5, protocol, port }) { if (client.destroyed) { return; } @@ -45326,7 +59417,7 @@ var require_client2 = __commonJS({ channels.connectError.publish({ connectParams: { host, - hostname: hostname2, + hostname: hostname5, protocol, port, version: client[kHTTPContext]?.version, @@ -45338,7 +59429,7 @@ var require_client2 = __commonJS({ }); } if (err.code === "ERR_TLS_CERT_ALTNAME_INVALID") { - assert3(client[kRunning] === 0); + assert4(client[kRunning] === 0); while (client[kPending] > 0 && client[kQueue][client[kPendingIdx]].servername === client[kServerName]) { const request2 = client[kQueue][client[kPendingIdx]++]; util3.errorRequest(client, request2, err); @@ -45368,7 +59459,7 @@ var require_client2 = __commonJS({ function _resume(client, sync) { while (true) { if (client.destroyed) { - assert3(client[kPending] === 0); + assert4(client[kPending] === 0); return; } if (client[kClosedResolve] && !client[kSize]) { @@ -45431,9 +59522,9 @@ var require_client2 = __commonJS({ } }); -// node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/dispatcher/fixed-queue.js +// ../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/dispatcher/fixed-queue.js var require_fixed_queue2 = __commonJS({ - "node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/dispatcher/fixed-queue.js"(exports, module) { + "../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/dispatcher/fixed-queue.js"(exports, module) { "use strict"; var kSize = 2048; var kMask = kSize - 1; @@ -45502,9 +59593,9 @@ var require_fixed_queue2 = __commonJS({ } }); -// node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/dispatcher/pool-base.js +// ../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/dispatcher/pool-base.js var require_pool_base2 = __commonJS({ - "node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/dispatcher/pool-base.js"(exports, module) { + "../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/dispatcher/pool-base.js"(exports, module) { "use strict"; var { PoolStats } = require_stats(); var DispatcherBase = require_dispatcher_base2(); @@ -45672,9 +59763,9 @@ var require_pool_base2 = __commonJS({ } }); -// node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/dispatcher/pool.js +// ../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/dispatcher/pool.js var require_pool2 = __commonJS({ - "node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/dispatcher/pool.js"(exports, module) { + "../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/dispatcher/pool.js"(exports, module) { "use strict"; var { PoolBase, @@ -45687,7 +59778,7 @@ var require_pool2 = __commonJS({ var Client2 = require_client2(); var { InvalidArgumentError - } = require_errors2(); + } = require_errors5(); var util3 = require_util11(); var { kUrl } = require_symbols6(); var buildConnector = require_connect2(); @@ -45745,7 +59836,7 @@ var require_pool2 = __commonJS({ } } }); - this.on("connectionError", (origin2, targets, error41) => { + this.on("connectionError", (origin2, targets, error50) => { for (const target of targets) { const idx = this[kClients].indexOf(target); if (idx !== -1) { @@ -45774,14 +59865,14 @@ var require_pool2 = __commonJS({ } }); -// node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/dispatcher/balanced-pool.js +// ../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/dispatcher/balanced-pool.js var require_balanced_pool2 = __commonJS({ - "node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/dispatcher/balanced-pool.js"(exports, module) { + "../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/dispatcher/balanced-pool.js"(exports, module) { "use strict"; var { BalancedPoolMissingUpstreamError, InvalidArgumentError - } = require_errors2(); + } = require_errors5(); var { PoolBase, kClients, @@ -45917,11 +60008,11 @@ var require_balanced_pool2 = __commonJS({ } }); -// node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/dispatcher/agent.js +// ../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/dispatcher/agent.js var require_agent2 = __commonJS({ - "node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/dispatcher/agent.js"(exports, module) { + "../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/dispatcher/agent.js"(exports, module) { "use strict"; - var { InvalidArgumentError, MaxOriginsReachedError } = require_errors2(); + var { InvalidArgumentError, MaxOriginsReachedError } = require_errors5(); var { kClients, kRunning, kClose, kDestroy, kDispatch, kUrl } = require_symbols6(); var DispatcherBase = require_dispatcher_base2(); var Pool = require_pool2(); @@ -46048,15 +60139,15 @@ var require_agent2 = __commonJS({ } }); -// node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/dispatcher/proxy-agent.js +// ../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/dispatcher/proxy-agent.js var require_proxy_agent2 = __commonJS({ - "node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/dispatcher/proxy-agent.js"(exports, module) { + "../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/dispatcher/proxy-agent.js"(exports, module) { "use strict"; var { kProxy, kClose, kDestroy, kDispatch } = require_symbols6(); var Agent = require_agent2(); var Pool = require_pool2(); var DispatcherBase = require_dispatcher_base2(); - var { InvalidArgumentError, RequestAbortedError, SecureProxyConnectionError } = require_errors2(); + var { InvalidArgumentError, RequestAbortedError, SecureProxyConnectionError } = require_errors5(); var buildConnector = require_connect2(); var Client2 = require_client2(); var kAgent = Symbol("proxy agent"); @@ -46136,8 +60227,8 @@ var require_proxy_agent2 = __commonJS({ } const { proxyTunnel = true } = opts; super(); - const url2 = this.#getUrl(opts); - const { href, origin, port, protocol, username, password, hostname: proxyHostname } = url2; + const url4 = this.#getUrl(opts); + const { href, origin, port, protocol, username, password, hostname: proxyHostname } = url4; this[kProxy] = { uri: href, protocol }; this[kRequestTls] = opts.requestTls; this[kProxyTls] = opts.proxyTls; @@ -46166,7 +60257,7 @@ var require_proxy_agent2 = __commonJS({ } return agentFactory(origin2, options); }; - this[kClient] = clientFactory(url2, { connect }); + this[kClient] = clientFactory(url4, { connect }); this[kAgent] = new Agent({ ...opts, factory, @@ -46274,9 +60365,9 @@ var require_proxy_agent2 = __commonJS({ } }); -// node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/dispatcher/env-http-proxy-agent.js +// ../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/dispatcher/env-http-proxy-agent.js var require_env_http_proxy_agent = __commonJS({ - "node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/dispatcher/env-http-proxy-agent.js"(exports, module) { + "../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/dispatcher/env-http-proxy-agent.js"(exports, module) { "use strict"; var DispatcherBase = require_dispatcher_base2(); var { kClose, kDestroy, kClosed, kDestroyed, kDispatch, kNoProxyAgent, kHttpProxyAgent, kHttpsProxyAgent } = require_symbols6(); @@ -46310,8 +60401,8 @@ var require_env_http_proxy_agent = __commonJS({ this.#parseNoProxy(); } [kDispatch](opts, handler2) { - const url2 = new URL(opts.origin); - const agent2 = this.#getProxyAgentForUrl(url2); + const url4 = new URL(opts.origin); + const agent2 = this.#getProxyAgentForUrl(url4); return agent2.dispatch(opts, handler2); } [kClose]() { @@ -46328,11 +60419,11 @@ var require_env_http_proxy_agent = __commonJS({ !this[kHttpsProxyAgent][kDestroyed] && this[kHttpsProxyAgent].destroy(err) ]); } - #getProxyAgentForUrl(url2) { - let { protocol, host: hostname2, port } = url2; - hostname2 = hostname2.replace(/:\d*$/, "").toLowerCase(); + #getProxyAgentForUrl(url4) { + let { protocol, host: hostname5, port } = url4; + hostname5 = hostname5.replace(/:\d*$/, "").toLowerCase(); port = Number.parseInt(port, 10) || DEFAULT_PORTS[protocol] || 0; - if (!this.#shouldProxy(hostname2, port)) { + if (!this.#shouldProxy(hostname5, port)) { return this[kNoProxyAgent]; } if (protocol === "https:") { @@ -46340,7 +60431,7 @@ var require_env_http_proxy_agent = __commonJS({ } return this[kHttpProxyAgent]; } - #shouldProxy(hostname2, port) { + #shouldProxy(hostname5, port) { if (this.#noProxyChanged) { this.#parseNoProxy(); } @@ -46356,11 +60447,11 @@ var require_env_http_proxy_agent = __commonJS({ continue; } if (!/^[.*]/.test(entry.hostname)) { - if (hostname2 === entry.hostname) { + if (hostname5 === entry.hostname) { return false; } } else { - if (hostname2.endsWith(entry.hostname.replace(/^\*/, ""))) { + if (hostname5.endsWith(entry.hostname.replace(/^\*/, ""))) { return false; } } @@ -46399,13 +60490,13 @@ var require_env_http_proxy_agent = __commonJS({ } }); -// node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/handler/retry-handler.js +// ../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/handler/retry-handler.js var require_retry_handler = __commonJS({ - "node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/handler/retry-handler.js"(exports, module) { + "../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/handler/retry-handler.js"(exports, module) { "use strict"; - var assert3 = __require("node:assert"); + var assert4 = __require("node:assert"); var { kRetryHandlerDefaultRetry } = require_symbols6(); - var { RequestRetryError } = require_errors2(); + var { RequestRetryError } = require_errors5(); var WrapHandler = require_wrap_handler(); var { isDisturbed, @@ -46586,8 +60677,8 @@ var require_retry_handler = __commonJS({ }); } const { start, size, end = size ? size - 1 : null } = contentRange; - assert3(this.start === start, "content-range mismatch"); - assert3(this.end == null || this.end === end, "content-range mismatch"); + assert4(this.start === start, "content-range mismatch"); + assert4(this.end == null || this.end === end, "content-range mismatch"); return; } if (this.end == null) { @@ -46604,11 +60695,11 @@ var require_retry_handler = __commonJS({ return; } const { start, size, end = size ? size - 1 : null } = range2; - assert3( + assert4( start != null && Number.isFinite(start), "content-range mismatch" ); - assert3(end != null && Number.isFinite(end), "invalid content-length"); + assert4(end != null && Number.isFinite(end), "invalid content-length"); this.start = start; this.end = end; } @@ -46616,8 +60707,8 @@ var require_retry_handler = __commonJS({ const contentLength = headers["content-length"]; this.end = contentLength != null ? Number(contentLength) - 1 : null; } - assert3(Number.isFinite(this.start)); - assert3( + assert4(Number.isFinite(this.start)); + assert4( this.end == null || Number.isFinite(this.end), "invalid content-length" ); @@ -46709,9 +60800,9 @@ var require_retry_handler = __commonJS({ } }); -// node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/dispatcher/retry-agent.js +// ../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/dispatcher/retry-agent.js var require_retry_agent = __commonJS({ - "node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/dispatcher/retry-agent.js"(exports, module) { + "../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/dispatcher/retry-agent.js"(exports, module) { "use strict"; var Dispatcher = require_dispatcher2(); var RetryHandler = require_retry_handler(); @@ -46744,13 +60835,13 @@ var require_retry_agent = __commonJS({ } }); -// node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/dispatcher/h2c-client.js +// ../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/dispatcher/h2c-client.js var require_h2c_client = __commonJS({ - "node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/dispatcher/h2c-client.js"(exports, module) { + "../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/dispatcher/h2c-client.js"(exports, module) { "use strict"; var { connect } = __require("node:net"); var { kClose, kDestroy } = require_symbols6(); - var { InvalidArgumentError } = require_errors2(); + var { InvalidArgumentError } = require_errors5(); var util3 = require_util11(); var Client2 = require_client2(); var DispatcherBase = require_dispatcher_base2(); @@ -46791,10 +60882,10 @@ var require_h2c_client = __commonJS({ #buildConnector(connectOpts) { return (opts, callback) => { const timeout = connectOpts?.connectOpts ?? 1e4; - const { hostname: hostname2, port, pathname } = opts; + const { hostname: hostname5, port, pathname } = opts; const socket = connect({ ...opts, - host: hostname2, + host: hostname5, port, pathname }); @@ -46805,7 +60896,7 @@ var require_h2c_client = __commonJS({ socket.alpnProtocol = "h2"; const clearConnectTimeout = util3.setupConnectTimeout( new WeakRef(socket), - { timeout, hostname: hostname2, port } + { timeout, hostname: hostname5, port } ); socket.setNoDelay(true).once("connect", function() { queueMicrotask(clearConnectTimeout); @@ -46839,13 +60930,13 @@ var require_h2c_client = __commonJS({ } }); -// node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/api/readable.js +// ../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/api/readable.js var require_readable2 = __commonJS({ - "node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/api/readable.js"(exports, module) { + "../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/api/readable.js"(exports, module) { "use strict"; - var assert3 = __require("node:assert"); + var assert4 = __require("node:assert"); var { Readable } = __require("node:stream"); - var { RequestAbortedError, NotSupportedError, InvalidArgumentError, AbortError: AbortError2 } = require_errors2(); + var { RequestAbortedError, NotSupportedError, InvalidArgumentError, AbortError: AbortError2 } = require_errors5(); var util3 = require_util11(); var { ReadableStreamFrom } = require_util11(); var kConsume = Symbol("kConsume"); @@ -47037,7 +61128,7 @@ var require_readable2 = __commonJS({ this[kBody] = ReadableStreamFrom(this); if (this[kConsume]) { this[kBody].getReader(); - assert3(this[kBody].locked); + assert4(this[kBody].locked); } } return this[kBody]; @@ -47106,7 +61197,7 @@ var require_readable2 = __commonJS({ return util3.isDisturbed(bodyReadable) || isLocked(bodyReadable); } function consume(stream, type2) { - assert3(!stream[kConsume]); + assert4(!stream[kConsume]); return new Promise((resolve, reject) => { if (isUnusable(stream)) { const rState = stream._readableState; @@ -47241,14 +61332,14 @@ var require_readable2 = __commonJS({ } }); -// node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/api/api-request.js +// ../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/api/api-request.js var require_api_request2 = __commonJS({ - "node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/api/api-request.js"(exports, module) { + "../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/api/api-request.js"(exports, module) { "use strict"; - var assert3 = __require("node:assert"); + var assert4 = __require("node:assert"); var { AsyncResource } = __require("node:async_hooks"); var { Readable } = require_readable2(); - var { InvalidArgumentError, RequestAbortedError } = require_errors2(); + var { InvalidArgumentError, RequestAbortedError } = require_errors5(); var util3 = require_util11(); function noop4() { } @@ -47312,7 +61403,7 @@ var require_api_request2 = __commonJS({ abort(this.reason); return; } - assert3(this.callback); + assert4(this.callback); this.abort = abort; this.context = context; } @@ -47418,12 +61509,12 @@ var require_api_request2 = __commonJS({ } }); -// node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/api/abort-signal.js +// ../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/api/abort-signal.js var require_abort_signal2 = __commonJS({ - "node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/api/abort-signal.js"(exports, module) { + "../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/api/abort-signal.js"(exports, module) { "use strict"; var { addAbortListener } = require_util11(); - var { RequestAbortedError } = require_errors2(); + var { RequestAbortedError } = require_errors5(); var kListener = Symbol("kListener"); var kSignal = Symbol("kSignal"); function abort(self2) { @@ -47470,14 +61561,14 @@ var require_abort_signal2 = __commonJS({ } }); -// node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/api/api-stream.js +// ../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/api/api-stream.js var require_api_stream2 = __commonJS({ - "node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/api/api-stream.js"(exports, module) { + "../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/api/api-stream.js"(exports, module) { "use strict"; - var assert3 = __require("node:assert"); + var assert4 = __require("node:assert"); var { finished } = __require("node:stream"); var { AsyncResource } = __require("node:async_hooks"); - var { InvalidArgumentError, InvalidReturnValueError } = require_errors2(); + var { InvalidArgumentError, InvalidReturnValueError } = require_errors5(); var util3 = require_util11(); var { addSignal, removeSignal } = require_abort_signal2(); function noop4() { @@ -47533,7 +61624,7 @@ var require_api_stream2 = __commonJS({ abort(this.reason); return; } - assert3(this.callback); + assert4(this.callback); this.abort = abort; this.context = context; } @@ -47631,22 +61722,22 @@ var require_api_stream2 = __commonJS({ } }); -// node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/api/api-pipeline.js +// ../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/api/api-pipeline.js var require_api_pipeline2 = __commonJS({ - "node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/api/api-pipeline.js"(exports, module) { + "../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/api/api-pipeline.js"(exports, module) { "use strict"; var { Readable, Duplex, PassThrough } = __require("node:stream"); - var assert3 = __require("node:assert"); + var assert4 = __require("node:assert"); var { AsyncResource } = __require("node:async_hooks"); var { InvalidArgumentError, InvalidReturnValueError, RequestAbortedError - } = require_errors2(); + } = require_errors5(); var util3 = require_util11(); var { addSignal, removeSignal } = require_abort_signal2(); function noop4() { @@ -47754,7 +61845,7 @@ var require_api_pipeline2 = __commonJS({ abort(this.reason); return; } - assert3(!res, "pipeline cannot be retried"); + assert4(!res, "pipeline cannot be retried"); this.abort = abort; this.context = context; } @@ -47832,13 +61923,13 @@ var require_api_pipeline2 = __commonJS({ } }); -// node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/api/api-upgrade.js +// ../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/api/api-upgrade.js var require_api_upgrade2 = __commonJS({ - "node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/api/api-upgrade.js"(exports, module) { + "../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/api/api-upgrade.js"(exports, module) { "use strict"; - var { InvalidArgumentError, SocketError } = require_errors2(); + var { InvalidArgumentError, SocketError } = require_errors5(); var { AsyncResource } = __require("node:async_hooks"); - var assert3 = __require("node:assert"); + var assert4 = __require("node:assert"); var util3 = require_util11(); var { addSignal, removeSignal } = require_abort_signal2(); var UpgradeHandler = class extends AsyncResource { @@ -47866,7 +61957,7 @@ var require_api_upgrade2 = __commonJS({ abort(this.reason); return; } - assert3(this.callback); + assert4(this.callback); this.abort = abort; this.context = null; } @@ -47874,7 +61965,7 @@ var require_api_upgrade2 = __commonJS({ throw new SocketError("bad upgrade", null); } onUpgrade(statusCode, rawHeaders, socket) { - assert3(statusCode === 101); + assert4(statusCode === 101); const { callback, opaque, context } = this; removeSignal(this); this.callback = null; @@ -47925,13 +62016,13 @@ var require_api_upgrade2 = __commonJS({ } }); -// node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/api/api-connect.js +// ../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/api/api-connect.js var require_api_connect2 = __commonJS({ - "node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/api/api-connect.js"(exports, module) { + "../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/api/api-connect.js"(exports, module) { "use strict"; - var assert3 = __require("node:assert"); + var assert4 = __require("node:assert"); var { AsyncResource } = __require("node:async_hooks"); - var { InvalidArgumentError, SocketError } = require_errors2(); + var { InvalidArgumentError, SocketError } = require_errors5(); var util3 = require_util11(); var { addSignal, removeSignal } = require_abort_signal2(); var ConnectHandler = class extends AsyncResource { @@ -47958,7 +62049,7 @@ var require_api_connect2 = __commonJS({ abort(this.reason); return; } - assert3(this.callback); + assert4(this.callback); this.abort = abort; this.context = context; } @@ -48016,9 +62107,9 @@ var require_api_connect2 = __commonJS({ } }); -// node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/api/index.js +// ../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/api/index.js var require_api3 = __commonJS({ - "node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/api/index.js"(exports, module) { + "../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/api/index.js"(exports, module) { "use strict"; module.exports.request = require_api_request2(); module.exports.stream = require_api_stream2(); @@ -48028,11 +62119,11 @@ var require_api3 = __commonJS({ } }); -// node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/mock/mock-errors.js +// ../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/mock/mock-errors.js var require_mock_errors2 = __commonJS({ - "node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/mock/mock-errors.js"(exports, module) { + "../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/mock/mock-errors.js"(exports, module) { "use strict"; - var { UndiciError } = require_errors2(); + var { UndiciError } = require_errors5(); var kMockNotMatchedError = Symbol.for("undici.error.UND_MOCK_ERR_MOCK_NOT_MATCHED"); var MockNotMatchedError = class extends UndiciError { constructor(message) { @@ -48054,9 +62145,9 @@ var require_mock_errors2 = __commonJS({ } }); -// node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/mock/mock-symbols.js +// ../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/mock/mock-symbols.js var require_mock_symbols2 = __commonJS({ - "node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/mock/mock-symbols.js"(exports, module) { + "../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/mock/mock-symbols.js"(exports, module) { "use strict"; module.exports = { kAgent: Symbol("agent"), @@ -48090,9 +62181,9 @@ var require_mock_symbols2 = __commonJS({ } }); -// node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/mock/mock-utils.js +// ../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/mock/mock-utils.js var require_mock_utils2 = __commonJS({ - "node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/mock/mock-utils.js"(exports, module) { + "../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/mock/mock-utils.js"(exports, module) { "use strict"; var { MockNotMatchedError } = require_mock_errors2(); var { @@ -48109,7 +62200,7 @@ var require_mock_utils2 = __commonJS({ isPromise } } = __require("node:util"); - var { InvalidArgumentError } = require_errors2(); + var { InvalidArgumentError } = require_errors5(); function matchValue(match2, value2) { if (typeof match2 === "string") { return match2 === value2; @@ -48144,10 +62235,10 @@ var require_mock_utils2 = __commonJS({ } } function buildHeadersFromArray(headers) { - const clone2 = headers.slice(); + const clone4 = 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 < clone4.length; index += 2) { + entries.push([clone4[index], clone4[index + 1]]); } return Object.fromEntries(entries); } @@ -48326,13 +62417,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: error50 }, delay: delay2, persist } = mockDispatch2; const { timesInvoked, times } = mockDispatch2; mockDispatch2.consumed = !persist && timesInvoked >= times; mockDispatch2.pending = timesInvoked < times; - if (error41 !== null) { + if (error50 !== null) { deleteMockDispatch(this[kDispatches], key); - handler2.onError(error41); + handler2.onError(error50); return true; } if (typeof delay2 === "number" && delay2 > 0) { @@ -48370,19 +62461,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 (error50) { + if (error50.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(`${error50.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(`${error50.message}: subsequent request to origin ${origin} was not allowed (net.connect is not enabled for this origin)`); } } else { - throw error41; + throw error50; } } } else { @@ -48391,10 +62482,10 @@ var require_mock_utils2 = __commonJS({ }; } function checkNetConnect(netConnect, origin) { - const url2 = new URL(origin); + const url4 = new URL(origin); if (netConnect === true) { return true; - } else if (Array.isArray(netConnect) && netConnect.some((matcher) => matchValue(matcher, url2.host))) { + } else if (Array.isArray(netConnect) && netConnect.some((matcher) => matchValue(matcher, url4.host))) { return true; } return false; @@ -48433,9 +62524,9 @@ var require_mock_utils2 = __commonJS({ } }); -// node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/mock/mock-interceptor.js +// ../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/mock/mock-interceptor.js var require_mock_interceptor2 = __commonJS({ - "node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/mock/mock-interceptor.js"(exports, module) { + "../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/mock/mock-interceptor.js"(exports, module) { "use strict"; var { getResponseData: getResponseData2, buildKey, addMockDispatch } = require_mock_utils2(); var { @@ -48447,7 +62538,7 @@ var require_mock_interceptor2 = __commonJS({ kMockDispatch, kIgnoreTrailingSlash } = require_mock_symbols2(); - var { InvalidArgumentError } = require_errors2(); + var { InvalidArgumentError } = require_errors5(); var { serializePathWithQuery } = require_util11(); var MockScope = class { constructor(mockDispatch) { @@ -48557,11 +62648,11 @@ var require_mock_interceptor2 = __commonJS({ /** * Mock an undici request with a defined error. */ - replyWithError(error41) { - if (typeof error41 === "undefined") { + replyWithError(error50) { + if (typeof error50 === "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: error50 }, { ignoreTrailingSlash: this[kIgnoreTrailingSlash] }); return new MockScope(newMockDispatch); } /** @@ -48597,9 +62688,9 @@ var require_mock_interceptor2 = __commonJS({ } }); -// node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/mock/mock-client.js +// ../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/mock/mock-client.js var require_mock_client2 = __commonJS({ - "node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/mock/mock-client.js"(exports, module) { + "../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/mock/mock-client.js"(exports, module) { "use strict"; var { promisify } = __require("node:util"); var Client2 = require_client2(); @@ -48616,7 +62707,7 @@ var require_mock_client2 = __commonJS({ } = require_mock_symbols2(); var { MockInterceptor } = require_mock_interceptor2(); var Symbols = require_symbols6(); - var { InvalidArgumentError } = require_errors2(); + var { InvalidArgumentError } = require_errors5(); var MockClient = class extends Client2 { constructor(origin, opts) { if (!opts || !opts.agent || typeof opts.agent.dispatch !== "function") { @@ -48658,12 +62749,12 @@ var require_mock_client2 = __commonJS({ } }); -// node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/mock/mock-call-history.js +// ../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/mock/mock-call-history.js var require_mock_call_history = __commonJS({ - "node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/mock/mock-call-history.js"(exports, module) { + "../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/mock/mock-call-history.js"(exports, module) { "use strict"; var { kMockCallHistoryAddLog } = require_mock_symbols2(); - var { InvalidArgumentError } = require_errors2(); + var { InvalidArgumentError } = require_errors5(); function handleFilterCallsWithOptions(criteria, options, handler2, store) { switch (options.operator) { case "OR": @@ -48705,14 +62796,14 @@ var require_mock_call_history = __commonJS({ } function computeUrlWithMaybeSearchParameters(requestInit) { try { - const url2 = new URL(requestInit.path, requestInit.origin); - if (url2.search.length !== 0) { - return url2; + const url4 = new URL(requestInit.path, requestInit.origin); + if (url4.search.length !== 0) { + return url4; } - url2.search = new URLSearchParams(requestInit.query).toString(); - return url2; - } catch (error41) { - throw new InvalidArgumentError("An error occurred when computing MockCallHistoryLog.url", { cause: error41 }); + url4.search = new URLSearchParams(requestInit.query).toString(); + return url4; + } catch (error50) { + throw new InvalidArgumentError("An error occurred when computing MockCallHistoryLog.url", { cause: error50 }); } } var MockCallHistoryLog = class { @@ -48720,15 +62811,15 @@ var require_mock_call_history = __commonJS({ this.body = requestInit.body; this.headers = requestInit.headers; this.method = requestInit.method; - const url2 = computeUrlWithMaybeSearchParameters(requestInit); - this.fullUrl = url2.toString(); - this.origin = url2.origin; - this.path = url2.pathname; - this.searchParams = Object.fromEntries(url2.searchParams); - this.protocol = url2.protocol; - this.host = url2.host; - this.port = url2.port; - this.hash = url2.hash; + const url4 = computeUrlWithMaybeSearchParameters(requestInit); + this.fullUrl = url4.toString(); + this.origin = url4.origin; + this.path = url4.pathname; + this.searchParams = Object.fromEntries(url4.searchParams); + this.protocol = url4.protocol; + this.host = url4.host; + this.port = url4.port; + this.hash = url4.hash; } toMap() { return /* @__PURE__ */ new Map( @@ -48772,17 +62863,17 @@ var require_mock_call_history = __commonJS({ lastCall() { return this.logs.at(-1); } - nthCall(number3) { - if (typeof number3 !== "number") { + nthCall(number9) { + if (typeof number9 !== "number") { throw new InvalidArgumentError("nthCall must be called with a number"); } - if (!Number.isInteger(number3)) { + if (!Number.isInteger(number9)) { throw new InvalidArgumentError("nthCall must be called with an integer"); } - if (Math.sign(number3) !== 1) { + if (Math.sign(number9) !== 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(number9 - 1); } filterCalls(criteria, options) { if (this.logs.length === 0) { @@ -48858,9 +62949,9 @@ var require_mock_call_history = __commonJS({ } }); -// node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/mock/mock-pool.js +// ../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/mock/mock-pool.js var require_mock_pool2 = __commonJS({ - "node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/mock/mock-pool.js"(exports, module) { + "../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/mock/mock-pool.js"(exports, module) { "use strict"; var { promisify } = __require("node:util"); var Pool = require_pool2(); @@ -48877,7 +62968,7 @@ var require_mock_pool2 = __commonJS({ } = require_mock_symbols2(); var { MockInterceptor } = require_mock_interceptor2(); var Symbols = require_symbols6(); - var { InvalidArgumentError } = require_errors2(); + var { InvalidArgumentError } = require_errors5(); var MockPool = class extends Pool { constructor(origin, opts) { if (!opts || !opts.agent || typeof opts.agent.dispatch !== "function") { @@ -48919,9 +63010,9 @@ var require_mock_pool2 = __commonJS({ } }); -// node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/mock/pending-interceptors-formatter.js +// ../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/mock/pending-interceptors-formatter.js var require_pending_interceptors_formatter2 = __commonJS({ - "node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/mock/pending-interceptors-formatter.js"(exports, module) { + "../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/mock/pending-interceptors-formatter.js"(exports, module) { "use strict"; var { Transform } = __require("node:stream"); var { Console } = __require("node:console"); @@ -48960,9 +63051,9 @@ var require_pending_interceptors_formatter2 = __commonJS({ } }); -// node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/mock/mock-agent.js +// ../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/mock/mock-agent.js var require_mock_agent2 = __commonJS({ - "node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/mock/mock-agent.js"(exports, module) { + "../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/mock/mock-agent.js"(exports, module) { "use strict"; var { kClients } = require_symbols6(); var Agent = require_agent2(); @@ -48987,7 +63078,7 @@ var require_mock_agent2 = __commonJS({ var MockClient = require_mock_client2(); var MockPool = require_mock_pool2(); var { matchValue, normalizeSearchParams, buildAndValidateMockOptions } = require_mock_utils2(); - var { InvalidArgumentError, UndiciError } = require_errors2(); + var { InvalidArgumentError, UndiciError } = require_errors5(); var Dispatcher = require_dispatcher2(); var PendingInterceptorsFormatter = require_pending_interceptors_formatter2(); var { MockCallHistory } = require_mock_call_history(); @@ -49142,11 +63233,11 @@ ${pendingInterceptorsFormatter.format(pending)}`.trim() } }); -// node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/mock/snapshot-utils.js +// ../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/mock/snapshot-utils.js var require_snapshot_utils = __commonJS({ - "node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/mock/snapshot-utils.js"(exports, module) { + "../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/mock/snapshot-utils.js"(exports, module) { "use strict"; - var { InvalidArgumentError } = require_errors2(); + var { InvalidArgumentError } = require_errors5(); function createHeaderFilters(matchOptions = {}) { const { ignoreHeaders = [], excludeHeaders = [], matchHeaders = [], caseSensitive = false } = matchOptions; return { @@ -49168,18 +63259,18 @@ var require_snapshot_utils = __commonJS({ if (excludePatterns.length === 0) { return () => false; } - return function isUrlExcluded(url2) { + return function isUrlExcluded(url4) { let urlLowerCased; for (const pattern of excludePatterns) { if (typeof pattern === "string") { if (!urlLowerCased) { - urlLowerCased = url2.toLowerCase(); + urlLowerCased = url4.toLowerCase(); } if (urlLowerCased.includes(pattern.toLowerCase())) { return true; } } else if (pattern instanceof RegExp) { - if (pattern.test(url2)) { + if (pattern.test(url4)) { return true; } } @@ -49231,24 +63322,24 @@ var require_snapshot_utils = __commonJS({ } }); -// node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/mock/snapshot-recorder.js +// ../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/mock/snapshot-recorder.js var require_snapshot_recorder = __commonJS({ - "node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/mock/snapshot-recorder.js"(exports, module) { + "../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/mock/snapshot-recorder.js"(exports, module) { "use strict"; var { writeFile, readFile, mkdir } = __require("node:fs/promises"); var { dirname: dirname2, resolve } = __require("node:path"); var { setTimeout: setTimeout2, clearTimeout: clearTimeout2 } = __require("node:timers"); - var { InvalidArgumentError, UndiciError } = require_errors2(); + var { InvalidArgumentError, UndiciError } = require_errors5(); var { hashId, isUrlExcludedFactory, normalizeHeaders, createHeaderFilters } = require_snapshot_utils(); function formatRequestKey(opts, headerFilters, matchOptions = {}) { - const url2 = new URL(opts.path, opts.origin); + const url4 = new URL(opts.path, opts.origin); const normalized = opts._normalizedHeaders || normalizeHeaders(opts.headers); if (!opts._normalizedHeaders) { opts._normalizedHeaders = normalized; } return { method: opts.method || "GET", - url: matchOptions.matchQuery !== false ? url2.toString() : `${url2.origin}${url2.pathname}`, + url: matchOptions.matchQuery !== false ? url4.toString() : `${url4.origin}${url4.pathname}`, headers: filterHeadersForMatching(normalized, headerFilters, matchOptions), body: matchOptions.matchBody !== false && opts.body ? String(opts.body) : "" }; @@ -49358,12 +63449,12 @@ var require_snapshot_recorder = __commonJS({ if (!this.shouldRecord(requestOpts)) { return; } - const url2 = new URL(requestOpts.path, requestOpts.origin).toString(); - if (this.#isUrlExcluded(url2)) { + const url4 = new URL(requestOpts.path, requestOpts.origin).toString(); + if (this.#isUrlExcluded(url4)) { return; } const request2 = formatRequestKey(requestOpts, this.#headerFilters, this.matchOptions); - const hash = createRequestHash(request2); + const hash2 = createRequestHash(request2); const normalizedHeaders = normalizeHeaders(response.headers); const responseData = { statusCode: response.statusCode, @@ -49371,16 +63462,16 @@ var require_snapshot_recorder = __commonJS({ body: Buffer.isBuffer(response.body) ? response.body.toString("base64") : Buffer.from(String(response.body || "")).toString("base64"), trailers: response.trailers }; - if (this.#snapshots.size >= this.#maxSnapshots && !this.#snapshots.has(hash)) { + if (this.#snapshots.size >= this.#maxSnapshots && !this.#snapshots.has(hash2)) { const oldestKey = this.#snapshots.keys().next().value; this.#snapshots.delete(oldestKey); } - const existingSnapshot = this.#snapshots.get(hash); + const existingSnapshot = this.#snapshots.get(hash2); if (existingSnapshot && existingSnapshot.responses) { existingSnapshot.responses.push(responseData); existingSnapshot.timestamp = (/* @__PURE__ */ new Date()).toISOString(); } else { - this.#snapshots.set(hash, { + this.#snapshots.set(hash2, { request: request2, responses: [responseData], // Always store as array for consistency @@ -49403,13 +63494,13 @@ var require_snapshot_recorder = __commonJS({ if (!this.shouldPlayback(requestOpts)) { return void 0; } - const url2 = new URL(requestOpts.path, requestOpts.origin).toString(); - if (this.#isUrlExcluded(url2)) { + const url4 = new URL(requestOpts.path, requestOpts.origin).toString(); + if (this.#isUrlExcluded(url4)) { return void 0; } const request2 = formatRequestKey(requestOpts, this.#headerFilters, this.matchOptions); - const hash = createRequestHash(request2); - const snapshot2 = this.#snapshots.get(hash); + const hash2 = createRequestHash(request2); + const snapshot2 = this.#snapshots.get(hash2); if (!snapshot2) return void 0; const currentCallCount = snapshot2.callCount || 0; const responseIndex = Math.min(currentCallCount, snapshot2.responses.length - 1); @@ -49434,17 +63525,17 @@ var require_snapshot_recorder = __commonJS({ const parsed2 = JSON.parse(data); if (Array.isArray(parsed2)) { this.#snapshots.clear(); - for (const { hash, snapshot: snapshot2 } of parsed2) { - this.#snapshots.set(hash, snapshot2); + for (const { hash: hash2, snapshot: snapshot2 } of parsed2) { + this.#snapshots.set(hash2, snapshot2); } } else { this.#snapshots = new Map(Object.entries(parsed2)); } - } catch (error41) { - if (error41.code === "ENOENT") { + } catch (error50) { + if (error50.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: error50 }); } } } @@ -49461,8 +63552,8 @@ var require_snapshot_recorder = __commonJS({ } const resolvedPath = resolve(path4); await mkdir(dirname2(resolvedPath), { recursive: true }); - const data = Array.from(this.#snapshots.entries()).map(([hash, snapshot2]) => ({ - hash, + const data = Array.from(this.#snapshots.entries()).map(([hash2, snapshot2]) => ({ + hash: hash2, snapshot: snapshot2 })); await writeFile(resolvedPath, JSON.stringify(data, null, 2), { flush: true }); @@ -49504,8 +63595,8 @@ var require_snapshot_recorder = __commonJS({ */ deleteSnapshot(requestOpts) { const request2 = formatRequestKey(requestOpts, this.#headerFilters, this.matchOptions); - const hash = createRequestHash(request2); - return this.#snapshots.delete(hash); + const hash2 = createRequestHash(request2); + return this.#snapshots.delete(hash2); } /** * Gets information about a specific snapshot @@ -49514,11 +63605,11 @@ var require_snapshot_recorder = __commonJS({ */ getSnapshotInfo(requestOpts) { const request2 = formatRequestKey(requestOpts, this.#headerFilters, this.matchOptions); - const hash = createRequestHash(request2); - const snapshot2 = this.#snapshots.get(hash); + const hash2 = createRequestHash(request2); + const snapshot2 = this.#snapshots.get(hash2); if (!snapshot2) return null; return { - hash, + hash: hash2, request: snapshot2.request, responseCount: snapshot2.responses ? snapshot2.responses.length : snapshot2.response ? 1 : 0, // .response for legacy snapshots @@ -49534,8 +63625,8 @@ var require_snapshot_recorder = __commonJS({ replaceSnapshots(snapshotData) { this.#snapshots.clear(); if (Array.isArray(snapshotData)) { - for (const { hash, snapshot: snapshot2 } of snapshotData) { - this.#snapshots.set(hash, snapshot2); + for (const { hash: hash2, snapshot: snapshot2 } of snapshotData) { + this.#snapshots.set(hash2, snapshot2); } } else if (snapshotData && typeof snapshotData === "object") { this.#snapshots = new Map(Object.entries(snapshotData)); @@ -49600,15 +63691,15 @@ var require_snapshot_recorder = __commonJS({ } }); -// node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/mock/snapshot-agent.js +// ../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/mock/snapshot-agent.js var require_snapshot_agent = __commonJS({ - "node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/mock/snapshot-agent.js"(exports, module) { + "../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/mock/snapshot-agent.js"(exports, module) { "use strict"; var Agent = require_agent2(); var MockAgent = require_mock_agent2(); var { SnapshotRecorder } = require_snapshot_recorder(); var WrapHandler = require_wrap_handler(); - var { InvalidArgumentError, UndiciError } = require_errors2(); + var { InvalidArgumentError, UndiciError } = require_errors5(); var { validateSnapshotMode } = require_snapshot_utils(); var kSnapshotRecorder = Symbol("kSnapshotRecorder"); var kSnapshotMode = Symbol("kSnapshotMode"); @@ -49675,12 +63766,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 error50 = new UndiciError(`No snapshot found for ${opts.method || "GET"} ${opts.path}`); if (handler2.onError) { - handler2.onError(error41); + handler2.onError(error50); return; } - throw error41; + throw error50; } } else if (mode === "record") { return this.#recordAndReplay(opts, handler2); @@ -49730,8 +63821,8 @@ var require_snapshot_agent = __commonJS({ trailers: responseData.trailers }).then(() => { handler2.onResponseEnd(controller, trailers); - }).catch((error41) => { - handler2.onResponseError(controller, error41); + }).catch((error50) => { + handler2.onResponseError(controller, error50); }); } }; @@ -49765,8 +63856,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 (error50) { + handler2.onError?.(error50); } } /** @@ -49807,12 +63898,12 @@ var require_snapshot_agent = __commonJS({ #setupMockInterceptors() { for (const snapshot2 of this[kSnapshotRecorder].getSnapshots()) { const { request: request2, responses, response } = snapshot2; - const url2 = new URL(request2.url); - const mockPool = this.get(url2.origin); + const url4 = new URL(request2.url); + const mockPool = this.get(url4.origin); const responseData = responses ? responses[0] : response; if (!responseData) continue; mockPool.intercept({ - path: url2.pathname + url2.search, + path: url4.pathname + url4.search, method: request2.method, headers: request2.headers, body: request2.body @@ -49888,12 +63979,12 @@ var require_snapshot_agent = __commonJS({ } }); -// node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/global.js +// ../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/global.js var require_global4 = __commonJS({ - "node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/global.js"(exports, module) { + "../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/global.js"(exports, module) { "use strict"; var globalDispatcher = Symbol.for("undici.globalDispatcher.1"); - var { InvalidArgumentError } = require_errors2(); + var { InvalidArgumentError } = require_errors5(); var Agent = require_agent2(); if (getGlobalDispatcher() === void 0) { setGlobalDispatcher(new Agent()); @@ -49935,11 +64026,11 @@ var require_global4 = __commonJS({ } }); -// node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/handler/decorator-handler.js +// ../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/handler/decorator-handler.js var require_decorator_handler = __commonJS({ - "node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/handler/decorator-handler.js"(exports, module) { + "../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/handler/decorator-handler.js"(exports, module) { "use strict"; - var assert3 = __require("node:assert"); + var assert4 = __require("node:assert"); var WrapHandler = require_wrap_handler(); module.exports = class DecoratorHandler { #handler; @@ -49956,25 +64047,25 @@ var require_decorator_handler = __commonJS({ this.#handler.onRequestStart?.(...args3); } onRequestUpgrade(...args3) { - assert3(!this.#onCompleteCalled); - assert3(!this.#onErrorCalled); + assert4(!this.#onCompleteCalled); + assert4(!this.#onErrorCalled); return this.#handler.onRequestUpgrade?.(...args3); } onResponseStart(...args3) { - assert3(!this.#onCompleteCalled); - assert3(!this.#onErrorCalled); - assert3(!this.#onResponseStartCalled); + assert4(!this.#onCompleteCalled); + assert4(!this.#onErrorCalled); + assert4(!this.#onResponseStartCalled); this.#onResponseStartCalled = true; return this.#handler.onResponseStart?.(...args3); } onResponseData(...args3) { - assert3(!this.#onCompleteCalled); - assert3(!this.#onErrorCalled); + assert4(!this.#onCompleteCalled); + assert4(!this.#onErrorCalled); return this.#handler.onResponseData?.(...args3); } onResponseEnd(...args3) { - assert3(!this.#onCompleteCalled); - assert3(!this.#onErrorCalled); + assert4(!this.#onCompleteCalled); + assert4(!this.#onErrorCalled); this.#onCompleteCalled = true; return this.#handler.onResponseEnd?.(...args3); } @@ -49991,14 +64082,14 @@ var require_decorator_handler = __commonJS({ } }); -// node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/handler/redirect-handler.js +// ../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/handler/redirect-handler.js var require_redirect_handler = __commonJS({ - "node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/handler/redirect-handler.js"(exports, module) { + "../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/handler/redirect-handler.js"(exports, module) { "use strict"; var util3 = require_util11(); var { kBodyUsed } = require_symbols6(); - var assert3 = __require("node:assert"); - var { InvalidArgumentError } = require_errors2(); + var assert4 = __require("node:assert"); + var { InvalidArgumentError } = require_errors5(); var EE = __require("node:events"); var redirectableStatusCodes = [300, 301, 302, 303, 307, 308]; var kBody = Symbol("body"); @@ -50010,7 +64101,7 @@ var require_redirect_handler = __commonJS({ this[kBodyUsed] = false; } async *[Symbol.asyncIterator]() { - assert3(!this[kBodyUsed], "disturbed"); + assert4(!this[kBodyUsed], "disturbed"); this[kBodyUsed] = true; yield* this[kBody]; } @@ -50037,7 +64128,7 @@ var require_redirect_handler = __commonJS({ if (util3.isStream(this.opts.body)) { if (util3.bodyLength(this.opts.body) === 0) { this.opts.body.on("data", function() { - assert3(false); + assert4(false); }); } if (typeof this.opts.body.readableDidRead !== "boolean") { @@ -50110,8 +64201,8 @@ var require_redirect_handler = __commonJS({ this.handler.onResponseEnd(controller, trailers); } } - onResponseError(controller, error41) { - this.handler.onResponseError?.(controller, error41); + onResponseError(controller, error50) { + this.handler.onResponseError?.(controller, error50); } }; function shouldRemoveHeader(header, removeContent, unknownOrigin) { @@ -50143,7 +64234,7 @@ var require_redirect_handler = __commonJS({ } } } else { - assert3(headers == null, "headers must be an object or an array"); + assert4(headers == null, "headers must be an object or an array"); } return ret; } @@ -50151,9 +64242,9 @@ var require_redirect_handler = __commonJS({ } }); -// node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/interceptor/redirect.js +// ../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/interceptor/redirect.js var require_redirect = __commonJS({ - "node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/interceptor/redirect.js"(exports, module) { + "../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/interceptor/redirect.js"(exports, module) { "use strict"; var RedirectHandler = require_redirect_handler(); function createRedirectInterceptor({ maxRedirections: defaultMaxRedirections } = {}) { @@ -50173,12 +64264,12 @@ var require_redirect = __commonJS({ } }); -// node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/interceptor/response-error.js +// ../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/interceptor/response-error.js var require_response_error = __commonJS({ - "node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/interceptor/response-error.js"(exports, module) { + "../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/interceptor/response-error.js"(exports, module) { "use strict"; var DecoratorHandler = require_decorator_handler(); - var { ResponseError } = require_errors2(); + var { ResponseError } = require_errors5(); var ResponseErrorHandler = class extends DecoratorHandler { #statusCode; #contentType; @@ -50255,9 +64346,9 @@ var require_response_error = __commonJS({ } }); -// node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/interceptor/retry.js +// ../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/interceptor/retry.js var require_retry = __commonJS({ - "node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/interceptor/retry.js"(exports, module) { + "../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/interceptor/retry.js"(exports, module) { "use strict"; var RetryHandler = require_retry_handler(); module.exports = (globalOpts) => { @@ -50279,11 +64370,11 @@ var require_retry = __commonJS({ } }); -// node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/interceptor/dump.js +// ../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/interceptor/dump.js var require_dump = __commonJS({ - "node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/interceptor/dump.js"(exports, module) { + "../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/interceptor/dump.js"(exports, module) { "use strict"; - var { InvalidArgumentError, RequestAbortedError } = require_errors2(); + var { InvalidArgumentError, RequestAbortedError } = require_errors5(); var DecoratorHandler = require_decorator_handler(); var DumpHandler = class extends DecoratorHandler { #maxSize = 1024 * 1024; @@ -50365,14 +64456,14 @@ var require_dump = __commonJS({ } }); -// node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/interceptor/dns.js +// ../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/interceptor/dns.js var require_dns = __commonJS({ - "node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/interceptor/dns.js"(exports, module) { + "../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/interceptor/dns.js"(exports, module) { "use strict"; var { isIP } = __require("node:net"); var { lookup: lookup2 } = __require("node:dns"); var DecoratorHandler = require_decorator_handler(); - var { InvalidArgumentError, InformationalError } = require_errors2(); + var { InvalidArgumentError, InformationalError } = require_errors5(); var maxInt = Math.pow(2, 31) - 1; var DNSInstance = class { #maxTTL = 0; @@ -50547,24 +64638,24 @@ var require_dns = __commonJS({ setRecords(origin, addresses) { const timestamp = Date.now(); const records = { records: { 4: null, 6: null } }; - for (const record of addresses) { - record.timestamp = timestamp; - if (typeof record.ttl === "number") { - record.ttl = Math.min(record.ttl, this.#maxTTL); + for (const record4 of addresses) { + record4.timestamp = timestamp; + if (typeof record4.ttl === "number") { + record4.ttl = Math.min(record4.ttl, this.#maxTTL); } else { - record.ttl = this.#maxTTL; + record4.ttl = this.#maxTTL; } - const familyRecords = records.records[record.family] ?? { ips: [] }; - familyRecords.ips.push(record); - records.records[record.family] = familyRecords; + const familyRecords = records.records[record4.family] ?? { ips: [] }; + familyRecords.ips.push(record4); + records.records[record4.family] = familyRecords; } this.#records.set(origin.hostname, records); } deleteRecords(origin) { this.#records.delete(origin.hostname); } - getHandler(meta, opts) { - return new DNSDispatchHandler(this, meta, opts); + getHandler(meta3, opts) { + return new DNSDispatchHandler(this, meta3, opts); } }; var DNSDispatchHandler = class extends DecoratorHandler { @@ -50700,9 +64791,9 @@ var require_dns = __commonJS({ } }); -// node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/util/cache.js -var require_cache5 = __commonJS({ - "node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/util/cache.js"(exports, module) { +// ../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/util/cache.js +var require_cache2 = __commonJS({ + "../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/util/cache.js"(exports, module) { "use strict"; var { safeHTTPMethods, @@ -50953,80 +65044,80 @@ var require_cache5 = __commonJS({ } }); -// node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/util/date.js +// ../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/util/date.js var require_date = __commonJS({ - "node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/util/date.js"(exports, module) { + "../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(date7) { + switch (date7[3]) { case ",": - return parseImfDate(date2); + return parseImfDate(date7); case " ": - return parseAscTimeDate(date2); + return parseAscTimeDate(date7); default: - return parseRfc850Date(date2); + return parseRfc850Date(date7); } } - 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(date7) { + if (date7.length !== 29 || date7[4] !== " " || date7[7] !== " " || date7[11] !== " " || date7[16] !== " " || date7[19] !== ":" || date7[22] !== ":" || date7[25] !== " " || date7[26] !== "G" || date7[27] !== "M" || date7[28] !== "T") { return void 0; } let weekday = -1; - if (date2[0] === "S" && date2[1] === "u" && date2[2] === "n") { + if (date7[0] === "S" && date7[1] === "u" && date7[2] === "n") { weekday = 0; - } else if (date2[0] === "M" && date2[1] === "o" && date2[2] === "n") { + } else if (date7[0] === "M" && date7[1] === "o" && date7[2] === "n") { weekday = 1; - } else if (date2[0] === "T" && date2[1] === "u" && date2[2] === "e") { + } else if (date7[0] === "T" && date7[1] === "u" && date7[2] === "e") { weekday = 2; - } else if (date2[0] === "W" && date2[1] === "e" && date2[2] === "d") { + } else if (date7[0] === "W" && date7[1] === "e" && date7[2] === "d") { weekday = 3; - } else if (date2[0] === "T" && date2[1] === "h" && date2[2] === "u") { + } else if (date7[0] === "T" && date7[1] === "h" && date7[2] === "u") { weekday = 4; - } else if (date2[0] === "F" && date2[1] === "r" && date2[2] === "i") { + } else if (date7[0] === "F" && date7[1] === "r" && date7[2] === "i") { weekday = 5; - } else if (date2[0] === "S" && date2[1] === "a" && date2[2] === "t") { + } else if (date7[0] === "S" && date7[1] === "a" && date7[2] === "t") { weekday = 6; } else { return void 0; } let day = 0; - if (date2[5] === "0") { - const code = date2.charCodeAt(6); + if (date7[5] === "0") { + const code = date7.charCodeAt(6); if (code < 49 || code > 57) { return void 0; } day = code - 48; } else { - const code1 = date2.charCodeAt(5); + const code1 = date7.charCodeAt(5); if (code1 < 49 || code1 > 51) { return void 0; } - const code2 = date2.charCodeAt(6); + const code2 = date7.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 (date7[8] === "J" && date7[9] === "a" && date7[10] === "n") { monthIdx = 0; - } else if (date2[8] === "F" && date2[9] === "e" && date2[10] === "b") { + } else if (date7[8] === "F" && date7[9] === "e" && date7[10] === "b") { monthIdx = 1; - } else if (date2[8] === "M" && date2[9] === "a") { - if (date2[10] === "r") { + } else if (date7[8] === "M" && date7[9] === "a") { + if (date7[10] === "r") { monthIdx = 2; - } else if (date2[10] === "y") { + } else if (date7[10] === "y") { monthIdx = 4; } else { return void 0; } - } else if (date2[8] === "J") { - if (date2[9] === "a" && date2[10] === "n") { + } else if (date7[8] === "J") { + if (date7[9] === "a" && date7[10] === "n") { monthIdx = 0; - } else if (date2[9] === "u") { - if (date2[10] === "n") { + } else if (date7[9] === "u") { + if (date7[10] === "n") { monthIdx = 5; - } else if (date2[10] === "l") { + } else if (date7[10] === "l") { monthIdx = 6; } else { return void 0; @@ -51034,55 +65125,55 @@ var require_date = __commonJS({ } else { return void 0; } - } else if (date2[8] === "A") { - if (date2[9] === "p" && date2[10] === "r") { + } else if (date7[8] === "A") { + if (date7[9] === "p" && date7[10] === "r") { monthIdx = 3; - } else if (date2[9] === "u" && date2[10] === "g") { + } else if (date7[9] === "u" && date7[10] === "g") { monthIdx = 7; } else { return void 0; } - } else if (date2[8] === "S" && date2[9] === "e" && date2[10] === "p") { + } else if (date7[8] === "S" && date7[9] === "e" && date7[10] === "p") { monthIdx = 8; - } else if (date2[8] === "O" && date2[9] === "c" && date2[10] === "t") { + } else if (date7[8] === "O" && date7[9] === "c" && date7[10] === "t") { monthIdx = 9; - } else if (date2[8] === "N" && date2[9] === "o" && date2[10] === "v") { + } else if (date7[8] === "N" && date7[9] === "o" && date7[10] === "v") { monthIdx = 10; - } else if (date2[8] === "D" && date2[9] === "e" && date2[10] === "c") { + } else if (date7[8] === "D" && date7[9] === "e" && date7[10] === "c") { monthIdx = 11; } else { return void 0; } - const yearDigit1 = date2.charCodeAt(12); + const yearDigit1 = date7.charCodeAt(12); if (yearDigit1 < 48 || yearDigit1 > 57) { return void 0; } - const yearDigit2 = date2.charCodeAt(13); + const yearDigit2 = date7.charCodeAt(13); if (yearDigit2 < 48 || yearDigit2 > 57) { return void 0; } - const yearDigit3 = date2.charCodeAt(14); + const yearDigit3 = date7.charCodeAt(14); if (yearDigit3 < 48 || yearDigit3 > 57) { return void 0; } - const yearDigit4 = date2.charCodeAt(15); + const yearDigit4 = date7.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 (date7[17] === "0") { + const code = date7.charCodeAt(18); if (code < 48 || code > 57) { return void 0; } hour = code - 48; } else { - const code1 = date2.charCodeAt(17); + const code1 = date7.charCodeAt(17); if (code1 < 48 || code1 > 50) { return void 0; } - const code2 = date2.charCodeAt(18); + const code2 = date7.charCodeAt(18); if (code2 < 48 || code2 > 57) { return void 0; } @@ -51092,36 +65183,36 @@ var require_date = __commonJS({ hour = (code1 - 48) * 10 + (code2 - 48); } let minute = 0; - if (date2[20] === "0") { - const code = date2.charCodeAt(21); + if (date7[20] === "0") { + const code = date7.charCodeAt(21); if (code < 48 || code > 57) { return void 0; } minute = code - 48; } else { - const code1 = date2.charCodeAt(20); + const code1 = date7.charCodeAt(20); if (code1 < 48 || code1 > 53) { return void 0; } - const code2 = date2.charCodeAt(21); + const code2 = date7.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 (date7[23] === "0") { + const code = date7.charCodeAt(24); if (code < 48 || code > 57) { return void 0; } second = code - 48; } else { - const code1 = date2.charCodeAt(23); + const code1 = date7.charCodeAt(23); if (code1 < 48 || code1 > 53) { return void 0; } - const code2 = date2.charCodeAt(24); + const code2 = date7.charCodeAt(24); if (code2 < 48 || code2 > 57) { return void 0; } @@ -51130,48 +65221,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(date7) { + if (date7.length !== 24 || date7[7] !== " " || date7[10] !== " " || date7[19] !== " ") { return void 0; } let weekday = -1; - if (date2[0] === "S" && date2[1] === "u" && date2[2] === "n") { + if (date7[0] === "S" && date7[1] === "u" && date7[2] === "n") { weekday = 0; - } else if (date2[0] === "M" && date2[1] === "o" && date2[2] === "n") { + } else if (date7[0] === "M" && date7[1] === "o" && date7[2] === "n") { weekday = 1; - } else if (date2[0] === "T" && date2[1] === "u" && date2[2] === "e") { + } else if (date7[0] === "T" && date7[1] === "u" && date7[2] === "e") { weekday = 2; - } else if (date2[0] === "W" && date2[1] === "e" && date2[2] === "d") { + } else if (date7[0] === "W" && date7[1] === "e" && date7[2] === "d") { weekday = 3; - } else if (date2[0] === "T" && date2[1] === "h" && date2[2] === "u") { + } else if (date7[0] === "T" && date7[1] === "h" && date7[2] === "u") { weekday = 4; - } else if (date2[0] === "F" && date2[1] === "r" && date2[2] === "i") { + } else if (date7[0] === "F" && date7[1] === "r" && date7[2] === "i") { weekday = 5; - } else if (date2[0] === "S" && date2[1] === "a" && date2[2] === "t") { + } else if (date7[0] === "S" && date7[1] === "a" && date7[2] === "t") { weekday = 6; } else { return void 0; } let monthIdx = -1; - if (date2[4] === "J" && date2[5] === "a" && date2[6] === "n") { + if (date7[4] === "J" && date7[5] === "a" && date7[6] === "n") { monthIdx = 0; - } else if (date2[4] === "F" && date2[5] === "e" && date2[6] === "b") { + } else if (date7[4] === "F" && date7[5] === "e" && date7[6] === "b") { monthIdx = 1; - } else if (date2[4] === "M" && date2[5] === "a") { - if (date2[6] === "r") { + } else if (date7[4] === "M" && date7[5] === "a") { + if (date7[6] === "r") { monthIdx = 2; - } else if (date2[6] === "y") { + } else if (date7[6] === "y") { monthIdx = 4; } else { return void 0; } - } else if (date2[4] === "J") { - if (date2[5] === "a" && date2[6] === "n") { + } else if (date7[4] === "J") { + if (date7[5] === "a" && date7[6] === "n") { monthIdx = 0; - } else if (date2[5] === "u") { - if (date2[6] === "n") { + } else if (date7[5] === "u") { + if (date7[6] === "n") { monthIdx = 5; - } else if (date2[6] === "l") { + } else if (date7[6] === "l") { monthIdx = 6; } else { return void 0; @@ -51179,56 +65270,56 @@ var require_date = __commonJS({ } else { return void 0; } - } else if (date2[4] === "A") { - if (date2[5] === "p" && date2[6] === "r") { + } else if (date7[4] === "A") { + if (date7[5] === "p" && date7[6] === "r") { monthIdx = 3; - } else if (date2[5] === "u" && date2[6] === "g") { + } else if (date7[5] === "u" && date7[6] === "g") { monthIdx = 7; } else { return void 0; } - } else if (date2[4] === "S" && date2[5] === "e" && date2[6] === "p") { + } else if (date7[4] === "S" && date7[5] === "e" && date7[6] === "p") { monthIdx = 8; - } else if (date2[4] === "O" && date2[5] === "c" && date2[6] === "t") { + } else if (date7[4] === "O" && date7[5] === "c" && date7[6] === "t") { monthIdx = 9; - } else if (date2[4] === "N" && date2[5] === "o" && date2[6] === "v") { + } else if (date7[4] === "N" && date7[5] === "o" && date7[6] === "v") { monthIdx = 10; - } else if (date2[4] === "D" && date2[5] === "e" && date2[6] === "c") { + } else if (date7[4] === "D" && date7[5] === "e" && date7[6] === "c") { monthIdx = 11; } else { return void 0; } let day = 0; - if (date2[8] === " ") { - const code = date2.charCodeAt(9); + if (date7[8] === " ") { + const code = date7.charCodeAt(9); if (code < 49 || code > 57) { return void 0; } day = code - 48; } else { - const code1 = date2.charCodeAt(8); + const code1 = date7.charCodeAt(8); if (code1 < 49 || code1 > 51) { return void 0; } - const code2 = date2.charCodeAt(9); + const code2 = date7.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 (date7[11] === "0") { + const code = date7.charCodeAt(12); if (code < 48 || code > 57) { return void 0; } hour = code - 48; } else { - const code1 = date2.charCodeAt(11); + const code1 = date7.charCodeAt(11); if (code1 < 48 || code1 > 50) { return void 0; } - const code2 = date2.charCodeAt(12); + const code2 = date7.charCodeAt(12); if (code2 < 48 || code2 > 57) { return void 0; } @@ -51238,54 +65329,54 @@ var require_date = __commonJS({ hour = (code1 - 48) * 10 + (code2 - 48); } let minute = 0; - if (date2[14] === "0") { - const code = date2.charCodeAt(15); + if (date7[14] === "0") { + const code = date7.charCodeAt(15); if (code < 48 || code > 57) { return void 0; } minute = code - 48; } else { - const code1 = date2.charCodeAt(14); + const code1 = date7.charCodeAt(14); if (code1 < 48 || code1 > 53) { return void 0; } - const code2 = date2.charCodeAt(15); + const code2 = date7.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 (date7[17] === "0") { + const code = date7.charCodeAt(18); if (code < 48 || code > 57) { return void 0; } second = code - 48; } else { - const code1 = date2.charCodeAt(17); + const code1 = date7.charCodeAt(17); if (code1 < 48 || code1 > 53) { return void 0; } - const code2 = date2.charCodeAt(18); + const code2 = date7.charCodeAt(18); if (code2 < 48 || code2 > 57) { return void 0; } second = (code1 - 48) * 10 + (code2 - 48); } - const yearDigit1 = date2.charCodeAt(20); + const yearDigit1 = date7.charCodeAt(20); if (yearDigit1 < 48 || yearDigit1 > 57) { return void 0; } - const yearDigit2 = date2.charCodeAt(21); + const yearDigit2 = date7.charCodeAt(21); if (yearDigit2 < 48 || yearDigit2 > 57) { return void 0; } - const yearDigit3 = date2.charCodeAt(22); + const yearDigit3 = date7.charCodeAt(22); if (yearDigit3 < 48 || yearDigit3 > 57) { return void 0; } - const yearDigit4 = date2.charCodeAt(23); + const yearDigit4 = date7.charCodeAt(23); if (yearDigit4 < 48 || yearDigit4 > 57) { return void 0; } @@ -51293,109 +65384,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(date7) { 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 (date7[0] === "S") { + if (date7[1] === "u" && date7[2] === "n" && date7[3] === "d" && date7[4] === "a" && date7[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 (date7[1] === "a" && date7[2] === "t" && date7[3] === "u" && date7[4] === "r" && date7[5] === "d" && date7[6] === "a" && date7[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 (date7[0] === "M" && date7[1] === "o" && date7[2] === "n" && date7[3] === "d" && date7[4] === "a" && date7[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 (date7[0] === "T") { + if (date7[1] === "u" && date7[2] === "e" && date7[3] === "s" && date7[4] === "d" && date7[5] === "a" && date7[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 (date7[1] === "h" && date7[2] === "u" && date7[3] === "r" && date7[4] === "s" && date7[5] === "d" && date7[6] === "a" && date7[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 (date7[0] === "W" && date7[1] === "e" && date7[2] === "d" && date7[3] === "n" && date7[4] === "e" && date7[5] === "s" && date7[6] === "d" && date7[7] === "a" && date7[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 (date7[0] === "F" && date7[1] === "r" && date7[2] === "i" && date7[3] === "d" && date7[4] === "a" && date7[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 (date7[commaIndex] !== "," || date7.length - commaIndex - 1 !== 23 || date7[commaIndex + 1] !== " " || date7[commaIndex + 4] !== "-" || date7[commaIndex + 8] !== "-" || date7[commaIndex + 11] !== " " || date7[commaIndex + 14] !== ":" || date7[commaIndex + 17] !== ":" || date7[commaIndex + 20] !== " " || date7[commaIndex + 21] !== "G" || date7[commaIndex + 22] !== "M" || date7[commaIndex + 23] !== "T") { return void 0; } let day = 0; - if (date2[commaIndex + 2] === "0") { - const code = date2.charCodeAt(commaIndex + 3); + if (date7[commaIndex + 2] === "0") { + const code = date7.charCodeAt(commaIndex + 3); if (code < 49 || code > 57) { return void 0; } day = code - 48; } else { - const code1 = date2.charCodeAt(commaIndex + 2); + const code1 = date7.charCodeAt(commaIndex + 2); if (code1 < 49 || code1 > 51) { return void 0; } - const code2 = date2.charCodeAt(commaIndex + 3); + const code2 = date7.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 (date7[commaIndex + 5] === "J" && date7[commaIndex + 6] === "a" && date7[commaIndex + 7] === "n") { monthIdx = 0; - } else if (date2[commaIndex + 5] === "F" && date2[commaIndex + 6] === "e" && date2[commaIndex + 7] === "b") { + } else if (date7[commaIndex + 5] === "F" && date7[commaIndex + 6] === "e" && date7[commaIndex + 7] === "b") { monthIdx = 1; - } else if (date2[commaIndex + 5] === "M" && date2[commaIndex + 6] === "a" && date2[commaIndex + 7] === "r") { + } else if (date7[commaIndex + 5] === "M" && date7[commaIndex + 6] === "a" && date7[commaIndex + 7] === "r") { monthIdx = 2; - } else if (date2[commaIndex + 5] === "A" && date2[commaIndex + 6] === "p" && date2[commaIndex + 7] === "r") { + } else if (date7[commaIndex + 5] === "A" && date7[commaIndex + 6] === "p" && date7[commaIndex + 7] === "r") { monthIdx = 3; - } else if (date2[commaIndex + 5] === "M" && date2[commaIndex + 6] === "a" && date2[commaIndex + 7] === "y") { + } else if (date7[commaIndex + 5] === "M" && date7[commaIndex + 6] === "a" && date7[commaIndex + 7] === "y") { monthIdx = 4; - } else if (date2[commaIndex + 5] === "J" && date2[commaIndex + 6] === "u" && date2[commaIndex + 7] === "n") { + } else if (date7[commaIndex + 5] === "J" && date7[commaIndex + 6] === "u" && date7[commaIndex + 7] === "n") { monthIdx = 5; - } else if (date2[commaIndex + 5] === "J" && date2[commaIndex + 6] === "u" && date2[commaIndex + 7] === "l") { + } else if (date7[commaIndex + 5] === "J" && date7[commaIndex + 6] === "u" && date7[commaIndex + 7] === "l") { monthIdx = 6; - } else if (date2[commaIndex + 5] === "A" && date2[commaIndex + 6] === "u" && date2[commaIndex + 7] === "g") { + } else if (date7[commaIndex + 5] === "A" && date7[commaIndex + 6] === "u" && date7[commaIndex + 7] === "g") { monthIdx = 7; - } else if (date2[commaIndex + 5] === "S" && date2[commaIndex + 6] === "e" && date2[commaIndex + 7] === "p") { + } else if (date7[commaIndex + 5] === "S" && date7[commaIndex + 6] === "e" && date7[commaIndex + 7] === "p") { monthIdx = 8; - } else if (date2[commaIndex + 5] === "O" && date2[commaIndex + 6] === "c" && date2[commaIndex + 7] === "t") { + } else if (date7[commaIndex + 5] === "O" && date7[commaIndex + 6] === "c" && date7[commaIndex + 7] === "t") { monthIdx = 9; - } else if (date2[commaIndex + 5] === "N" && date2[commaIndex + 6] === "o" && date2[commaIndex + 7] === "v") { + } else if (date7[commaIndex + 5] === "N" && date7[commaIndex + 6] === "o" && date7[commaIndex + 7] === "v") { monthIdx = 10; - } else if (date2[commaIndex + 5] === "D" && date2[commaIndex + 6] === "e" && date2[commaIndex + 7] === "c") { + } else if (date7[commaIndex + 5] === "D" && date7[commaIndex + 6] === "e" && date7[commaIndex + 7] === "c") { monthIdx = 11; } else { return void 0; } - const yearDigit1 = date2.charCodeAt(commaIndex + 9); + const yearDigit1 = date7.charCodeAt(commaIndex + 9); if (yearDigit1 < 48 || yearDigit1 > 57) { return void 0; } - const yearDigit2 = date2.charCodeAt(commaIndex + 10); + const yearDigit2 = date7.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 (date7[commaIndex + 12] === "0") { + const code = date7.charCodeAt(commaIndex + 13); if (code < 48 || code > 57) { return void 0; } hour = code - 48; } else { - const code1 = date2.charCodeAt(commaIndex + 12); + const code1 = date7.charCodeAt(commaIndex + 12); if (code1 < 48 || code1 > 50) { return void 0; } - const code2 = date2.charCodeAt(commaIndex + 13); + const code2 = date7.charCodeAt(commaIndex + 13); if (code2 < 48 || code2 > 57) { return void 0; } @@ -51405,36 +65496,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 (date7[commaIndex + 15] === "0") { + const code = date7.charCodeAt(commaIndex + 16); if (code < 48 || code > 57) { return void 0; } minute = code - 48; } else { - const code1 = date2.charCodeAt(commaIndex + 15); + const code1 = date7.charCodeAt(commaIndex + 15); if (code1 < 48 || code1 > 53) { return void 0; } - const code2 = date2.charCodeAt(commaIndex + 16); + const code2 = date7.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 (date7[commaIndex + 18] === "0") { + const code = date7.charCodeAt(commaIndex + 19); if (code < 48 || code > 57) { return void 0; } second = code - 48; } else { - const code1 = date2.charCodeAt(commaIndex + 18); + const code1 = date7.charCodeAt(commaIndex + 18); if (code1 < 48 || code1 > 53) { return void 0; } - const code2 = date2.charCodeAt(commaIndex + 19); + const code2 = date7.charCodeAt(commaIndex + 19); if (code2 < 48 || code2 > 57) { return void 0; } @@ -51449,16 +65540,16 @@ var require_date = __commonJS({ } }); -// node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/handler/cache-handler.js +// ../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/handler/cache-handler.js var require_cache_handler = __commonJS({ - "node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/handler/cache-handler.js"(exports, module) { + "../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/handler/cache-handler.js"(exports, module) { "use strict"; var util3 = require_util11(); var { parseCacheControlHeader, parseVaryHeader, isEtagUsable - } = require_cache5(); + } = require_cache2(); var { parseHttpDate } = require_date(); function noop4() { } @@ -51751,20 +65842,20 @@ var require_cache_handler = __commonJS({ } return strippedHeaders ?? resHeaders; } - function isValidDate2(date2) { - return date2 instanceof Date && Number.isFinite(date2.valueOf()); + function isValidDate2(date7) { + return date7 instanceof Date && Number.isFinite(date7.valueOf()); } module.exports = CacheHandler; } }); -// node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/cache/memory-cache-store.js +// ../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/cache/memory-cache-store.js var require_memory_cache_store = __commonJS({ - "node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/cache/memory-cache-store.js"(exports, module) { + "../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/cache/memory-cache-store.js"(exports, module) { "use strict"; var { Writable } = __require("node:stream"); var { EventEmitter: EventEmitter2 } = __require("node:events"); - var { assertCacheKey, assertCacheValue } = require_cache5(); + var { assertCacheKey, assertCacheValue } = require_cache2(); var MemoryCacheStore = class extends EventEmitter2 { #maxCount = 1024; #maxSize = 104857600; @@ -51935,11 +66026,11 @@ var require_memory_cache_store = __commonJS({ } }); -// node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/handler/cache-revalidation-handler.js +// ../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/handler/cache-revalidation-handler.js var require_cache_revalidation_handler = __commonJS({ - "node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/handler/cache-revalidation-handler.js"(exports, module) { + "../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/handler/cache-revalidation-handler.js"(exports, module) { "use strict"; - var assert3 = __require("node:assert"); + var assert4 = __require("node:assert"); var CacheRevalidationHandler = class { #successful = false; /** @@ -51976,7 +66067,7 @@ var require_cache_revalidation_handler = __commonJS({ this.#handler.onRequestUpgrade?.(controller, statusCode, headers, socket); } onResponseStart(controller, statusCode, headers, statusMessage) { - assert3(this.#callback != null); + assert4(this.#callback != null); this.#successful = statusCode === 304 || this.#allowErrorStatusCodes && statusCode >= 500 && statusCode <= 504; this.#callback(this.#successful, this.#context); this.#callback = null; @@ -52022,18 +66113,18 @@ var require_cache_revalidation_handler = __commonJS({ } }); -// node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/interceptor/cache.js -var require_cache6 = __commonJS({ - "node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/interceptor/cache.js"(exports, module) { +// ../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/interceptor/cache.js +var require_cache3 = __commonJS({ + "../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/interceptor/cache.js"(exports, module) { "use strict"; - var assert3 = __require("node:assert"); + var assert4 = __require("node:assert"); var { Readable } = __require("node:stream"); var util3 = require_util11(); var CacheHandler = require_cache_handler(); var MemoryCacheStore = require_memory_cache_store(); var CacheRevalidationHandler = require_cache_revalidation_handler(); - var { assertCacheStore, assertCacheMethods, makeCacheKey, normalizeHeaders, parseCacheControlHeader } = require_cache5(); - var { AbortError: AbortError2 } = require_errors2(); + var { assertCacheStore, assertCacheMethods, makeCacheKey, normalizeHeaders, parseCacheControlHeader } = require_cache2(); + var { AbortError: AbortError2 } = require_errors5(); function needsRevalidation(result, cacheControlDirectives) { if (cacheControlDirectives?.["no-cache"]) { return true; @@ -52067,20 +66158,20 @@ var require_cache6 = __commonJS({ } function handleUncachedResponse(dispatch, globalOpts, cacheKey, handler2, opts, reqCacheControl) { if (reqCacheControl?.["only-if-cached"]) { - let aborted2 = false; + let aborted4 = false; try { if (typeof handler2.onConnect === "function") { handler2.onConnect(() => { - aborted2 = true; + aborted4 = true; }); - if (aborted2) { + if (aborted4) { return; } } if (typeof handler2.onHeaders === "function") { handler2.onHeaders(504, [], () => { }, "Gateway Timeout"); - if (aborted2) { + if (aborted4) { return; } } @@ -52098,8 +66189,8 @@ var require_cache6 = __commonJS({ } function sendCachedValue(handler2, opts, result, age, context, isStale) { const stream = util3.isStream(result.body) ? result.body : Readable.from(result.body ?? []); - assert3(!stream.destroyed, "stream should not be destroyed"); - assert3(!stream.readableDidRead, "stream should not be readableDidRead"); + assert4(!stream.destroyed, "stream should not be destroyed"); + assert4(!stream.readableDidRead, "stream should not be readableDidRead"); const controller = { resume() { stream.resume(); @@ -52150,7 +66241,7 @@ var require_cache6 = __commonJS({ }); } } - function handleResult4(dispatch, globalOpts, cacheKey, handler2, opts, reqCacheControl, result) { + function handleResult3(dispatch, globalOpts, cacheKey, handler2, opts, reqCacheControl, result) { if (!result) { return handleUncachedResponse(dispatch, globalOpts, cacheKey, handler2, opts, reqCacheControl); } @@ -52230,8 +66321,8 @@ var require_cache6 = __commonJS({ headers }, new CacheRevalidationHandler( - (success, context) => { - if (success) { + (success2, context) => { + if (success2) { sendCachedValue(handler2, opts, result, age, context, true); } else if (util3.isStream(result.body)) { result.body.on("error", () => { @@ -52291,7 +66382,7 @@ var require_cache6 = __commonJS({ const result = store.get(cacheKey); if (result && typeof result.then === "function") { result.then((result2) => { - handleResult4( + handleResult3( dispatch, globalOpts, cacheKey, @@ -52302,7 +66393,7 @@ var require_cache6 = __commonJS({ ); }); } else { - handleResult4( + handleResult3( dispatch, globalOpts, cacheKey, @@ -52319,9 +66410,9 @@ var require_cache6 = __commonJS({ } }); -// node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/interceptor/decompress.js +// ../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/interceptor/decompress.js var require_decompress = __commonJS({ - "node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/interceptor/decompress.js"(exports, module) { + "../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/interceptor/decompress.js"(exports, module) { "use strict"; var { createInflate, createGunzip, createBrotliDecompress, createZstdDecompress } = __require("node:zlib"); var { pipeline: pipeline2 } = __require("node:stream"); @@ -52405,8 +66496,8 @@ var require_decompress = __commonJS({ } } }); - decompressor.on("error", (error41) => { - super.onResponseError(controller, error41); + decompressor.on("error", (error50) => { + super.onResponseError(controller, error50); }); } /** @@ -52530,12 +66621,12 @@ var require_decompress = __commonJS({ } }); -// node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/cache/sqlite-cache-store.js +// ../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/cache/sqlite-cache-store.js var require_sqlite_cache_store = __commonJS({ - "node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/cache/sqlite-cache-store.js"(exports, module) { + "../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/cache/sqlite-cache-store.js"(exports, module) { "use strict"; var { Writable } = __require("node:stream"); - var { assertCacheKey, assertCacheValue } = require_cache5(); + var { assertCacheKey, assertCacheValue } = require_cache2(); var DatabaseSync; var VERSION10 = 3; var MAX_ENTRY_SIZE = 2 * 1e3 * 1e3 * 1e3; @@ -52729,7 +66820,7 @@ var require_sqlite_cache_store = __commonJS({ */ set(key, value2) { assertCacheKey(key); - const url2 = this.#makeValueUrl(key); + const url4 = this.#makeValueUrl(key); const body = Array.isArray(value2.body) ? Buffer.concat(value2.body) : value2.body; const size = body?.byteLength; if (size && size > this.#maxEntrySize) { @@ -52752,7 +66843,7 @@ var require_sqlite_cache_store = __commonJS({ } else { this.#prune(); this.#insertValueQuery.run( - url2, + url4, key.method, body, value2.deleteAt, @@ -52843,9 +66934,9 @@ var require_sqlite_cache_store = __commonJS({ * @returns {SqliteStoreValue | undefined} */ #findValue(key, canBeExpired = false) { - const url2 = this.#makeValueUrl(key); + const url4 = this.#makeValueUrl(key); const { headers, method } = key; - const values = this.#getValuesQuery.all(url2, method); + const values = this.#getValuesQuery.all(url4, method); if (values.length === 0) { return void 0; } @@ -52889,9 +66980,9 @@ var require_sqlite_cache_store = __commonJS({ } }); -// node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/fetch/headers.js +// ../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/fetch/headers.js var require_headers2 = __commonJS({ - "node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/fetch/headers.js"(exports, module) { + "../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/fetch/headers.js"(exports, module) { "use strict"; var { kConstruct } = require_symbols6(); var { kEnumerableProperty } = require_util11(); @@ -52901,7 +66992,7 @@ var require_headers2 = __commonJS({ isValidHeaderValue } = require_util12(); var { webidl } = require_webidl2(); - var assert3 = __require("node:assert"); + var assert4 = __require("node:assert"); var util3 = __require("node:util"); function isHTTPWhiteSpaceCharCode(code) { return code === 10 || code === 13 || code === 9 || code === 32; @@ -52913,10 +67004,10 @@ var require_headers2 = __commonJS({ while (j > i && isHTTPWhiteSpaceCharCode(potentialValue.charCodeAt(i))) ++i; return i === 0 && j === potentialValue.length ? potentialValue : potentialValue.substring(i, j); } - function fill(headers, object2) { - if (Array.isArray(object2)) { - for (let i = 0; i < object2.length; ++i) { - const header = object2[i]; + function fill(headers, object6) { + if (Array.isArray(object6)) { + for (let i = 0; i < object6.length; ++i) { + const header = object6[i]; if (header.length !== 2) { throw webidl.errors.exception({ header: "Headers constructor", @@ -52925,10 +67016,10 @@ var require_headers2 = __commonJS({ } appendHeader(headers, header[0], header[1]); } - } else if (typeof object2 === "object" && object2 !== null) { - const keys = Object.keys(object2); + } else if (typeof object6 === "object" && object6 !== null) { + const keys = Object.keys(object6); for (let i = 0; i < keys.length; ++i) { - appendHeader(headers, keys[i], object2[keys[i]]); + appendHeader(headers, keys[i], object6[keys[i]]); } } else { throw webidl.errors.conversionFailed({ @@ -53109,24 +67200,24 @@ var require_headers2 = __commonJS({ // https://fetch.spec.whatwg.org/#convert-header-names-to-a-sorted-lowercase-set toSortedArray() { const size = this.headersMap.size; - const array = new Array(size); + const array4 = new Array(size); if (size <= 32) { if (size === 0) { - return array; + return array4; } const iterator2 = this.headersMap[Symbol.iterator](); const firstValue = iterator2.next().value; - array[0] = [firstValue[0], firstValue[1].value]; - assert3(firstValue[1].value !== null); + array4[0] = [firstValue[0], firstValue[1].value]; + assert4(firstValue[1].value !== null); for (let i = 1, j = 0, right = 0, left = 0, pivot = 0, x, value2; i < size; ++i) { value2 = iterator2.next().value; - x = array[i] = [value2[0], value2[1].value]; - assert3(x[1] !== null); + x = array4[i] = [value2[0], value2[1].value]; + assert4(x[1] !== null); left = 0; right = i; while (left < right) { pivot = left + (right - left >> 1); - if (array[pivot][0] <= x[0]) { + if (array4[pivot][0] <= x[0]) { left = pivot + 1; } else { right = pivot; @@ -53135,22 +67226,22 @@ var require_headers2 = __commonJS({ if (i !== pivot) { j = i; while (j > left) { - array[j] = array[--j]; + array4[j] = array4[--j]; } - array[left] = x; + array4[left] = x; } } if (!iterator2.next().done) { throw new TypeError("Unreachable"); } - return array; + return array4; } else { let i = 0; for (const { 0: name, 1: { value: value2 } } of this.headersMap) { - array[i++] = [name, value2]; - assert3(value2 !== null); + array4[i++] = [name, value2]; + assert4(value2 !== null); } - return array.sort(compareHeaderName); + return array4.sort(compareHeaderName); } } }; @@ -53350,9 +67441,9 @@ var require_headers2 = __commonJS({ } }); -// node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/fetch/response.js +// ../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/fetch/response.js var require_response2 = __commonJS({ - "node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/fetch/response.js"(exports, module) { + "../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/fetch/response.js"(exports, module) { "use strict"; var { Headers: Headers2, HeadersList, fill, getHeadersGuard, setHeadersGuard, setHeadersList } = require_headers2(); var { extractBody, cloneBody, mixinBody, streamRegistry, bodyUnusable } = require_body2(); @@ -53362,7 +67453,7 @@ var require_response2 = __commonJS({ var { isValidReasonPhrase, isCancelled, - isAborted: isAborted4, + isAborted: isAborted3, serializeJavascriptValueToJSONString, isErrorLike, isomorphicEncode, @@ -53375,7 +67466,7 @@ var require_response2 = __commonJS({ var { webidl } = require_webidl2(); var { URLSerializer } = require_data_url(); var { kConstruct } = require_symbols6(); - var assert3 = __require("node:assert"); + var assert4 = __require("node:assert"); var textEncoder = new TextEncoder("utf-8"); var Response2 = class _Response { /** @type {Headers} */ @@ -53401,15 +67492,15 @@ var require_response2 = __commonJS({ return responseObject; } // Creates a redirect Response that redirects to url with status status. - static redirect(url2, status = 302) { + static redirect(url4, status = 302) { webidl.argumentLengthCheck(arguments, 1, "Response.redirect"); - url2 = webidl.converters.USVString(url2); + url4 = webidl.converters.USVString(url4); status = webidl.converters["unsigned short"](status); let parsedURL; try { - parsedURL = new URL(url2, relevantRealm.settingsObject.baseUrl); + parsedURL = new URL(url4, relevantRealm.settingsObject.baseUrl); } catch (err) { - throw new TypeError(`Failed to parse URL from ${url2}`, { cause: err }); + throw new TypeError(`Failed to parse URL from ${url4}`, { cause: err }); } if (!redirectStatusSet.has(status)) { throw new RangeError(`Invalid status code ${status}`); @@ -53450,11 +67541,11 @@ var require_response2 = __commonJS({ get url() { webidl.brandCheck(this, _Response); const urlList = this.#state.urlList; - const url2 = urlList[urlList.length - 1] ?? null; - if (url2 === null) { + const url4 = urlList[urlList.length - 1] ?? null; + if (url4 === null) { return ""; } - return URLSerializer(url2, true); + return URLSerializer(url4, true); } // Returns whether response was obtained through a redirect. get redirected() { @@ -53631,7 +67722,7 @@ var require_response2 = __commonJS({ return p in state ? state[p] : target[p]; }, set(target, p, value2) { - assert3(!(p in state)); + assert4(!(p in state)); target[p] = value2; return true; } @@ -53665,12 +67756,12 @@ var require_response2 = __commonJS({ body: null }); } else { - assert3(false); + assert4(false); } } function makeAppropriateNetworkError(fetchParams, err = null) { - assert3(isCancelled(fetchParams)); - return isAborted4(fetchParams) ? makeNetworkError(Object.assign(new DOMException("The operation was aborted.", "AbortError"), { cause: err })) : makeNetworkError(Object.assign(new DOMException("Request was cancelled."), { cause: err })); + assert4(isCancelled(fetchParams)); + return isAborted3(fetchParams) ? makeNetworkError(Object.assign(new DOMException("The operation was aborted.", "AbortError"), { cause: err })) : makeNetworkError(Object.assign(new DOMException("Request was cancelled."), { cause: err })); } function initializeResponse(response, init, body) { if (init.status !== null && (init.status < 200 || init.status > 599)) { @@ -53773,9 +67864,9 @@ var require_response2 = __commonJS({ } }); -// node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/fetch/request.js +// ../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/fetch/request.js var require_request4 = __commonJS({ - "node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/fetch/request.js"(exports, module) { + "../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/fetch/request.js"(exports, module) { "use strict"; var { extractBody, mixinBody, cloneBody, bodyUnusable } = require_body2(); var { Headers: Headers2, fill: fillHeaders, HeadersList, setHeadersGuard, getHeadersGuard, setHeadersList, getHeadersList } = require_headers2(); @@ -53800,7 +67891,7 @@ var require_request4 = __commonJS({ var { webidl } = require_webidl2(); var { URLSerializer } = require_data_url(); var { kConstruct } = require_symbols6(); - var assert3 = __require("node:assert"); + var assert4 = __require("node:assert"); var { getMaxListeners, setMaxListeners: setMaxListeners2, defaultMaxListeners } = __require("node:events"); var kAbortController = Symbol("abortController"); var requestFinalizer = new FinalizationRegistry(({ signal, abort }) => { @@ -53876,7 +67967,7 @@ var require_request4 = __commonJS({ request2 = makeRequest({ urlList: [parsedURL] }); fallbackMode = "cors"; } else { - assert3(webidl.is.Request(input)); + assert4(webidl.is.Request(input)); request2 = input.#state; signal = input.#signal; this.#dispatcher = init.dispatcher || input.#dispatcher; @@ -54521,11 +68612,11 @@ var require_request4 = __commonJS({ } }); -// node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/subresource-integrity/subresource-integrity.js +// ../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/subresource-integrity/subresource-integrity.js var require_subresource_integrity = __commonJS({ - "node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/subresource-integrity/subresource-integrity.js"(exports, module) { + "../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/subresource-integrity/subresource-integrity.js"(exports, module) { "use strict"; - var assert3 = __require("node:assert"); + var assert4 = __require("node:assert"); var validSRIHashAlgorithmTokenSet = /* @__PURE__ */ new Map([["sha256", 0], ["sha384", 1], ["sha512", 2]]); var crypto2; try { @@ -54572,7 +68663,7 @@ var require_subresource_integrity = __commonJS({ const result = []; let strongest = null; for (const item of metadataList) { - assert3(isValidSRIHashAlgorithm(item.alg), "Invalid SRI hash algorithm token"); + assert4(isValidSRIHashAlgorithm(item.alg), "Invalid SRI hash algorithm token"); if (result.length === 0) { result.push(item); strongest = item; @@ -54659,9 +68750,9 @@ var require_subresource_integrity = __commonJS({ } }); -// node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/fetch/index.js +// ../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/fetch/index.js var require_fetch2 = __commonJS({ - "node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/fetch/index.js"(exports, module) { + "../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/fetch/index.js"(exports, module) { "use strict"; var { makeNetworkError, @@ -54692,7 +68783,7 @@ var require_fetch2 = __commonJS({ coarsenedSharedCurrentTime, sameOrigin, isCancelled, - isAborted: isAborted4, + isAborted: isAborted3, isErrorLike, fullyReadBody, readableStreamClose, @@ -54706,7 +68797,7 @@ var require_fetch2 = __commonJS({ createInflate, extractMimeType } = require_util12(); - var assert3 = __require("node:assert"); + var assert4 = __require("node:assert"); var { safelyExtractBody, extractBody } = require_body2(); var { redirectStatusSet, @@ -54745,17 +68836,17 @@ var require_fetch2 = __commonJS({ this.emit("terminated", reason); } // https://fetch.spec.whatwg.org/#fetch-controller-abort - abort(error41) { + abort(error50) { if (this.state !== "ongoing") { return; } this.state = "aborted"; - if (!error41) { - error41 = new DOMException("The operation was aborted.", "AbortError"); + if (!error50) { + error50 = new DOMException("The operation was aborted.", "AbortError"); } - this.serializedAbortReason = error41; - this.connection?.destroy(error41); - this.emit("terminated", error41); + this.serializedAbortReason = error50; + this.connection?.destroy(error50); + this.emit("terminated", error50); } }; function handleFetchDone(response) { @@ -54787,7 +68878,7 @@ var require_fetch2 = __commonJS({ requestObject.signal, () => { locallyAborted = true; - assert3(controller != null); + assert4(controller != null); controller.abort(requestObject.signal.reason); const realResponse = responseObject?.deref(); abortFetch(p, request2, realResponse, requestObject.signal.reason); @@ -54854,12 +68945,12 @@ var require_fetch2 = __commonJS({ ); } var markResourceTiming = performance.markResourceTiming; - function abortFetch(p, request2, responseObject, error41) { + function abortFetch(p, request2, responseObject, error50) { if (p) { - p.reject(error41); + p.reject(error50); } if (request2.body?.stream != null && isReadable(request2.body.stream)) { - request2.body.stream.cancel(error41).catch((err) => { + request2.body.stream.cancel(error50).catch((err) => { if (err.code === "ERR_INVALID_STATE") { return; } @@ -54871,7 +68962,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(error50).catch((err) => { if (err.code === "ERR_INVALID_STATE") { return; } @@ -54890,7 +68981,7 @@ var require_fetch2 = __commonJS({ dispatcher = getGlobalDispatcher() // undici }) { - assert3(dispatcher); + assert4(dispatcher); let taskDestination = null; let crossOriginIsolatedCapability = false; if (request2.client != null) { @@ -54913,7 +69004,7 @@ var require_fetch2 = __commonJS({ taskDestination, crossOriginIsolatedCapability }; - assert3(!request2.body || request2.body.stream); + assert4(!request2.body || request2.body.stream); if (request2.window === "client") { request2.window = request2.client?.globalObject?.constructor?.name === "Window" ? request2.client : "no-window"; } @@ -55002,7 +69093,7 @@ var require_fetch2 = __commonJS({ } else if (request2.responseTainting === "opaque") { response = filterResponse(response, "opaque"); } else { - assert3(false); + assert4(false); } } let internalResponse = response.status === 0 ? response : response.internalResponse; @@ -55232,7 +69323,7 @@ var require_fetch2 = __commonJS({ } else if (request2.redirect === "follow") { response = await httpRedirectFetch(fetchParams, response); } else { - assert3(false); + assert4(false); } } response.timingInfo = timingInfo; @@ -55285,7 +69376,7 @@ var require_fetch2 = __commonJS({ request2.headersList.delete("host", true); } if (request2.body != null) { - assert3(request2.body.source != null); + assert4(request2.body.source != null); request2.body = safelyExtractBody(request2.body.source)[0]; } const timingInfo = fetchParams.timingInfo; @@ -55418,7 +69509,7 @@ var require_fetch2 = __commonJS({ return response; } async function httpNetworkFetch(fetchParams, includeCredentials = false, forceNewConnection = false) { - assert3(!fetchParams.controller.connection || fetchParams.controller.connection.destroyed); + assert4(!fetchParams.controller.connection || fetchParams.controller.connection.destroyed); fetchParams.controller.connection = { abort: null, destroyed: false, @@ -55526,7 +69617,7 @@ var require_fetch2 = __commonJS({ let isFailure; try { const { done, value: value2 } = await fetchParams.controller.next(); - if (isAborted4(fetchParams)) { + if (isAborted3(fetchParams)) { break; } bytes = done ? void 0 : value2; @@ -55562,7 +69653,7 @@ var require_fetch2 = __commonJS({ } }; function onAborted(reason) { - if (isAborted4(fetchParams)) { + if (isAborted3(fetchParams)) { response.aborted = true; if (isReadable(stream)) { fetchParams.controller.controller.error( @@ -55580,12 +69671,12 @@ var require_fetch2 = __commonJS({ } return response; function dispatch({ body }) { - const url2 = requestCurrentURL(request2); + const url4 = requestCurrentURL(request2); const agent2 = fetchParams.controller.dispatcher; return new Promise((resolve, reject) => agent2.dispatch( { - path: url2.pathname + url2.search, - origin: url2.origin, + path: url4.pathname + url4.search, + origin: url4.origin, method: request2.method, body: agent2.isMockActive ? request2.body && (request2.body.source || request2.body.stream) : body, headers: request2.headersList.entries, @@ -55684,13 +69775,13 @@ var require_fetch2 = __commonJS({ fetchParams.controller.ended = true; this.body.push(null); }, - onError(error41) { + onError(error50) { if (this.abort) { fetchParams.controller.off("terminated", this.abort); } - this.body?.destroy(error41); - fetchParams.controller.terminate(error41); - reject(error41); + this.body?.destroy(error50); + fetchParams.controller.terminate(error50); + reject(error50); }, onUpgrade(status, rawHeaders, socket) { if (status !== 101) { @@ -55721,11 +69812,11 @@ var require_fetch2 = __commonJS({ } }); -// node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/cache/util.js +// ../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/cache/util.js var require_util13 = __commonJS({ - "node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/cache/util.js"(exports, module) { + "../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/cache/util.js"(exports, module) { "use strict"; - var assert3 = __require("node:assert"); + var assert4 = __require("node:assert"); var { URLSerializer } = require_data_url(); var { isValidHeaderName } = require_util12(); function urlEquals(A, B, excludeFragment = false) { @@ -55734,7 +69825,7 @@ var require_util13 = __commonJS({ return serializedA === serializedB; } function getFieldValues(header) { - assert3(header !== null); + assert4(header !== null); const values = []; for (let value2 of header.split(",")) { value2 = value2.trim(); @@ -55751,11 +69842,11 @@ var require_util13 = __commonJS({ } }); -// node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/cache/cache.js -var require_cache7 = __commonJS({ - "node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/cache/cache.js"(exports, module) { +// ../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/cache/cache.js +var require_cache4 = __commonJS({ + "../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/cache/cache.js"(exports, module) { "use strict"; - var assert3 = __require("node:assert"); + var assert4 = __require("node:assert"); var { kConstruct } = require_symbols6(); var { urlEquals, getFieldValues } = require_util13(); var { kEnumerableProperty, isDisturbed } = require_util11(); @@ -56005,7 +70096,7 @@ var require_cache7 = __commonJS({ return false; } } else { - assert3(typeof request2 === "string"); + assert4(typeof request2 === "string"); r = getRequestState(new Request2(request2)); } const operations = []; @@ -56054,7 +70145,7 @@ var require_cache7 = __commonJS({ r = getRequestState(new Request2(request2)); } } - const promise = createDeferredPromise(); + const promise2 = createDeferredPromise(); const requests = []; if (request2 === void 0) { for (const requestResponse of this.#relevantRequestResponseList) { @@ -56077,9 +70168,9 @@ var require_cache7 = __commonJS({ ); requestList.push(requestObject); } - promise.resolve(Object.freeze(requestList)); + promise2.resolve(Object.freeze(requestList)); }); - return promise.promise; + return promise2.promise; } /** * @see https://w3c.github.io/ServiceWorker/#batch-cache-operations-algorithm @@ -56116,7 +70207,7 @@ var require_cache7 = __commonJS({ } for (const requestResponse of requestResponses) { const idx = cache.indexOf(requestResponse); - assert3(idx !== -1); + assert4(idx !== -1); cache.splice(idx, 1); } } else if (operation.type === "put") { @@ -56148,7 +70239,7 @@ var require_cache7 = __commonJS({ requestResponses = this.#queryCache(operation.request); for (const requestResponse of requestResponses) { const idx = cache.indexOf(requestResponse); - assert3(idx !== -1); + assert4(idx !== -1); cache.splice(idx, 1); } cache.push([operation.request, operation.response]); @@ -56300,11 +70391,11 @@ var require_cache7 = __commonJS({ } }); -// node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/cache/cachestorage.js +// ../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/cache/cachestorage.js var require_cachestorage2 = __commonJS({ - "node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/cache/cachestorage.js"(exports, module) { + "../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/cache/cachestorage.js"(exports, module) { "use strict"; - var { Cache } = require_cache7(); + var { Cache } = require_cache4(); var { webidl } = require_webidl2(); var { kEnumerableProperty } = require_util11(); var { kConstruct } = require_symbols6(); @@ -56410,9 +70501,9 @@ var require_cachestorage2 = __commonJS({ } }); -// node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/cookies/constants.js +// ../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/cookies/constants.js var require_constants9 = __commonJS({ - "node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/cookies/constants.js"(exports, module) { + "../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/cookies/constants.js"(exports, module) { "use strict"; var maxAttributeValueSize = 1024; var maxNameValuePairSize = 4096; @@ -56423,9 +70514,9 @@ var require_constants9 = __commonJS({ } }); -// node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/cookies/util.js +// ../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/cookies/util.js var require_util14 = __commonJS({ - "node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/cookies/util.js"(exports, module) { + "../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/cookies/util.js"(exports, module) { "use strict"; function isCTLExcludingHtab(value2) { for (let i = 0; i < value2.length; ++i) { @@ -56523,11 +70614,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(date7) { + if (typeof date7 === "number") { + date7 = new Date(date7); } - return `${IMFDays[date2.getUTCDay()]}, ${IMFPaddedNumbers[date2.getUTCDate()]} ${IMFMonths[date2.getUTCMonth()]} ${date2.getUTCFullYear()} ${IMFPaddedNumbers[date2.getUTCHours()]}:${IMFPaddedNumbers[date2.getUTCMinutes()]}:${IMFPaddedNumbers[date2.getUTCSeconds()]} GMT`; + return `${IMFDays[date7.getUTCDay()]}, ${IMFPaddedNumbers[date7.getUTCDate()]} ${IMFMonths[date7.getUTCMonth()]} ${date7.getUTCFullYear()} ${IMFPaddedNumbers[date7.getUTCHours()]}:${IMFPaddedNumbers[date7.getUTCMinutes()]}:${IMFPaddedNumbers[date7.getUTCSeconds()]} GMT`; } function validateCookieMaxAge(maxAge) { if (maxAge < 0) { @@ -56593,14 +70684,14 @@ var require_util14 = __commonJS({ } }); -// node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/cookies/parse.js +// ../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/cookies/parse.js var require_parse2 = __commonJS({ - "node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/cookies/parse.js"(exports, module) { + "../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/cookies/parse.js"(exports, module) { "use strict"; var { maxNameValuePairSize, maxAttributeValueSize } = require_constants9(); var { isCTLExcludingHtab } = require_util14(); var { collectASequenceOfCodePointsFast } = require_data_url(); - var assert3 = __require("node:assert"); + var assert4 = __require("node:assert"); var { unescape: qsUnescape } = __require("node:querystring"); function parseSetCookie(header) { if (isCTLExcludingHtab(header)) { @@ -56643,7 +70734,7 @@ var require_parse2 = __commonJS({ if (unparsedAttributes.length === 0) { return cookieAttributeList; } - assert3(unparsedAttributes[0] === ";"); + assert4(unparsedAttributes[0] === ";"); unparsedAttributes = unparsedAttributes.slice(1); let cookieAv = ""; if (unparsedAttributes.includes(";")) { @@ -56734,9 +70825,9 @@ var require_parse2 = __commonJS({ } }); -// node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/cookies/index.js +// ../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/cookies/index.js var require_cookies2 = __commonJS({ - "node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/cookies/index.js"(exports, module) { + "../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/cookies/index.js"(exports, module) { "use strict"; var { parseSetCookie } = require_parse2(); var { stringify } = require_util14(); @@ -56869,9 +70960,9 @@ var require_cookies2 = __commonJS({ } }); -// node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/websocket/events.js +// ../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/websocket/events.js var require_events2 = __commonJS({ - "node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/websocket/events.js"(exports, module) { + "../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/websocket/events.js"(exports, module) { "use strict"; var { webidl } = require_webidl2(); var { kEnumerableProperty } = require_util11(); @@ -57137,9 +71228,9 @@ var require_events2 = __commonJS({ } }); -// node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/websocket/constants.js +// ../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/websocket/constants.js var require_constants10 = __commonJS({ - "node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/websocket/constants.js"(exports, module) { + "../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/websocket/constants.js"(exports, module) { "use strict"; var uid = "258EAFA5-E914-47DA-95CA-C5AB0DC85B11"; var staticPropertyDescriptors = { @@ -57193,9 +71284,9 @@ var require_constants10 = __commonJS({ } }); -// node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/websocket/util.js +// ../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/websocket/util.js var require_util15 = __commonJS({ - "node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/websocket/util.js"(exports, module) { + "../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/websocket/util.js"(exports, module) { "use strict"; var { states, opcodes } = require_constants10(); var { isUtf8 } = __require("node:buffer"); @@ -57297,10 +71388,10 @@ var require_util15 = __commonJS({ } return true; } - function getURLRecord(url2, baseURL) { + function getURLRecord(url4, baseURL) { let urlRecord; try { - urlRecord = new URL(url2, baseURL); + urlRecord = new URL(url4, baseURL); } catch (e) { throw new DOMException(e, "SyntaxError"); } @@ -57365,9 +71456,9 @@ var require_util15 = __commonJS({ } }); -// node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/websocket/frame.js +// ../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/websocket/frame.js var require_frame2 = __commonJS({ - "node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/websocket/frame.js"(exports, module) { + "../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/websocket/frame.js"(exports, module) { "use strict"; var { maxUnsigned16Bit, opcodes } = require_constants10(); var BUFFER_SIZE = 8 * 1024; @@ -57477,9 +71568,9 @@ var require_frame2 = __commonJS({ } }); -// node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/websocket/connection.js +// ../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/websocket/connection.js var require_connection2 = __commonJS({ - "node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/websocket/connection.js"(exports, module) { + "../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/websocket/connection.js"(exports, module) { "use strict"; var { uid, states, sentCloseFrameState, emptyBuffer, opcodes } = require_constants10(); var { parseExtensions, isClosed, isClosing, isEstablished, validateCloseCodeAndReason } = require_util15(); @@ -57488,15 +71579,15 @@ var require_connection2 = __commonJS({ var { Headers: Headers2, getHeadersList } = require_headers2(); var { getDecodeSplit } = require_util12(); var { WebsocketFrameSend } = require_frame2(); - var assert3 = __require("node:assert"); + var assert4 = __require("node:assert"); var crypto2; try { crypto2 = __require("node:crypto"); } catch { } - function establishWebSocketConnection(url2, protocols, client, handler2, options) { - const requestURL = url2; - requestURL.protocol = url2.protocol === "ws:" ? "http:" : "https:"; + function establishWebSocketConnection(url4, protocols, client, handler2, options) { + const requestURL = url4; + requestURL.protocol = url4.protocol === "ws:" ? "http:" : "https:"; const request2 = makeRequest({ urlList: [requestURL], client, @@ -57575,20 +71666,20 @@ var require_connection2 = __commonJS({ }); return controller; } - function closeWebSocketConnection(object2, code, reason, validate2 = false) { + function closeWebSocketConnection(object6, code, reason, validate2 = false) { code ??= null; reason ??= ""; if (validate2) validateCloseCodeAndReason(code, reason); - if (isClosed(object2.readyState) || isClosing(object2.readyState)) { - } else if (!isEstablished(object2.readyState)) { - failWebsocketConnection(object2); - object2.readyState = states.CLOSING; - } else if (!object2.closeState.has(sentCloseFrameState.SENT) && !object2.closeState.has(sentCloseFrameState.RECEIVED)) { + if (isClosed(object6.readyState) || isClosing(object6.readyState)) { + } else if (!isEstablished(object6.readyState)) { + failWebsocketConnection(object6); + object6.readyState = states.CLOSING; + } else if (!object6.closeState.has(sentCloseFrameState.SENT) && !object6.closeState.has(sentCloseFrameState.RECEIVED)) { const frame = new WebsocketFrameSend(); if (reason.length !== 0 && code === null) { code = 1e3; } - assert3(code === null || Number.isInteger(code)); + assert4(code === null || Number.isInteger(code)); if (code === null && reason.length === 0) { frame.frameData = emptyBuffer; } else if (code !== null && reason === null) { @@ -57601,11 +71692,11 @@ var require_connection2 = __commonJS({ } else { frame.frameData = emptyBuffer; } - object2.socket.write(frame.createFrame(opcodes.CLOSE)); - object2.closeState.add(sentCloseFrameState.SENT); - object2.readyState = states.CLOSING; + object6.socket.write(frame.createFrame(opcodes.CLOSE)); + object6.closeState.add(sentCloseFrameState.SENT); + object6.readyState = states.CLOSING; } else { - object2.readyState = states.CLOSING; + object6.readyState = states.CLOSING; } } function failWebsocketConnection(handler2, code, reason, cause) { @@ -57627,9 +71718,9 @@ var require_connection2 = __commonJS({ } }); -// node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/websocket/permessage-deflate.js +// ../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/websocket/permessage-deflate.js var require_permessage_deflate = __commonJS({ - "node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/websocket/permessage-deflate.js"(exports, module) { + "../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/websocket/permessage-deflate.js"(exports, module) { "use strict"; var { createInflateRaw, Z_DEFAULT_WINDOWBITS } = __require("node:zlib"); var { isValidClientWindowBits } = require_util15(); @@ -57682,12 +71773,12 @@ var require_permessage_deflate = __commonJS({ } }); -// node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/websocket/receiver.js +// ../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/websocket/receiver.js var require_receiver2 = __commonJS({ - "node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/websocket/receiver.js"(exports, module) { + "../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/websocket/receiver.js"(exports, module) { "use strict"; var { Writable } = __require("node:stream"); - var assert3 = __require("node:assert"); + var assert4 = __require("node:assert"); var { parserStates, opcodes, states, emptyBuffer, sentCloseFrameState } = require_constants10(); var { isValidStatusCode, @@ -57839,9 +71930,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, (error50, data) => { + if (error50) { + failWebsocketConnection(this.#handler, 1007, error50.message); return; } this.writeFragments(data); @@ -57924,7 +72015,7 @@ var require_receiver2 = __commonJS({ return output; } parseCloseBody(data) { - assert3(data.length !== 1); + assert4(data.length !== 1); let code; if (data.length >= 2) { code = data.readUInt16BE(0); @@ -57994,9 +72085,9 @@ var require_receiver2 = __commonJS({ } }); -// node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/websocket/sender.js +// ../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/websocket/sender.js var require_sender = __commonJS({ - "node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/websocket/sender.js"(exports, module) { + "../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/websocket/sender.js"(exports, module) { "use strict"; var { WebsocketFrameSend } = require_frame2(); var { opcodes, sendHints } = require_constants10(); @@ -58081,9 +72172,9 @@ var require_sender = __commonJS({ } }); -// node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/websocket/websocket.js +// ../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/websocket/websocket.js var require_websocket2 = __commonJS({ - "node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/websocket/websocket.js"(exports, module) { + "../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/websocket/websocket.js"(exports, module) { "use strict"; var { isArrayBuffer } = __require("node:util/types"); var { webidl } = require_webidl2(); @@ -58170,16 +72261,16 @@ var require_websocket2 = __commonJS({ * @param {string} url * @param {string|string[]} protocols */ - constructor(url2, protocols = []) { + constructor(url4, protocols = []) { super(); webidl.util.markAsUncloneable(this); const prefix = "WebSocket constructor"; webidl.argumentLengthCheck(arguments, 1, prefix); const options = webidl.converters["DOMString or sequence or WebSocketInit"](protocols, prefix, "options"); - url2 = webidl.converters.USVString(url2); + url4 = webidl.converters.USVString(url4); protocols = options.protocols; const baseURL = environmentSettingsObject.settingsObject.baseUrl; - const urlRecord = getURLRecord(url2, baseURL); + const urlRecord = getURLRecord(url4, baseURL); if (typeof protocols === "string") { protocols = [protocols]; } @@ -58556,9 +72647,9 @@ var require_websocket2 = __commonJS({ } }); -// node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/websocket/stream/websocketerror.js +// ../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/websocket/stream/websocketerror.js var require_websocketerror = __commonJS({ - "node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/websocket/stream/websocketerror.js"(exports, module) { + "../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/websocket/stream/websocketerror.js"(exports, module) { "use strict"; var { webidl } = require_webidl2(); var { validateCloseCodeAndReason } = require_util15(); @@ -58613,10 +72704,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 error50 = new _WebSocketError(message, kConstruct); + error50.#closeCode = code; + error50.#reason = reason; + return error50; } }; var { createUnvalidatedWebSocketError } = WebSocketError; @@ -58636,9 +72727,9 @@ var require_websocketerror = __commonJS({ } }); -// node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/websocket/stream/websocketstream.js +// ../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/websocket/stream/websocketstream.js var require_websocketstream = __commonJS({ - "node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/websocket/stream/websocketstream.js"(exports, module) { + "../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/websocket/stream/websocketstream.js"(exports, module) { "use strict"; var { createDeferredPromise } = require_promise(); var { environmentSettingsObject } = require_util12(); @@ -58705,7 +72796,7 @@ var require_websocketstream = __commonJS({ }; /** @type {import('../receiver').ByteParser} */ #parser; - constructor(url2, options = void 0) { + constructor(url4, options = void 0) { if (!emittedExperimentalWarning) { process.emitWarning("WebSocketStream is experimental! Expect it to change at any time.", { code: "UNDICI-WSS" @@ -58713,12 +72804,12 @@ var require_websocketstream = __commonJS({ emittedExperimentalWarning = true; } webidl.argumentLengthCheck(arguments, 1, "WebSocket"); - url2 = webidl.converters.USVString(url2); + url4 = webidl.converters.USVString(url4); if (options !== null) { options = webidl.converters.WebSocketStreamOptions(options); } const baseURL = environmentSettingsObject.settingsObject.baseUrl; - const urlRecord = getURLRecord(url2, baseURL); + const urlRecord = getURLRecord(url4, baseURL); const protocols = options.protocols; if (protocols.length !== new Set(protocols.map((p) => p.toLowerCase())).size) { throw new DOMException("Invalid Sec-WebSocket-Protocol value", "SyntaxError"); @@ -58778,30 +72869,30 @@ var require_websocketstream = __commonJS({ } #write(chunk) { chunk = webidl.converters.WebSocketStreamWrite(chunk); - const promise = createDeferredPromise(); + const promise2 = createDeferredPromise(); let data = null; let opcode = null; if (webidl.is.BufferSource(chunk)) { data = new Uint8Array(ArrayBuffer.isView(chunk) ? new Uint8Array(chunk.buffer, chunk.byteOffset, chunk.byteLength) : chunk.slice()); opcode = opcodes.BINARY; } else { - let string3; + let string8; try { - string3 = webidl.converters.DOMString(chunk); + string8 = webidl.converters.DOMString(chunk); } catch (e) { - promise.reject(e); - return promise.promise; + promise2.reject(e); + return promise2.promise; } - data = new TextEncoder().encode(string3); + data = new TextEncoder().encode(string8); opcode = opcodes.TEXT; } if (!this.#handler.closeState.has(sentCloseFrameState.SENT) && !this.#handler.closeState.has(sentCloseFrameState.RECEIVED)) { const frame = new WebsocketFrameSend(data); this.#handler.socket.write(frame.createFrame(opcode), () => { - promise.resolve(void 0); + promise2.resolve(void 0); }); } - return promise.promise; + return promise2.promise; } /** @type {import('../websocket').Handler['onConnectionEstablished']} */ #onConnectionEstablished(response, parsedExtensions) { @@ -58883,10 +72974,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 error50 = createUnvalidatedWebSocketError("unclean close", code, reason); + this.#readableStreamController.error(error50); + this.#writableStream.abort(error50); + this.#closedPromise.reject(error50); } } #closeUsingReason(reason) { @@ -58948,9 +73039,9 @@ var require_websocketstream = __commonJS({ } }); -// node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/eventsource/util.js +// ../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/eventsource/util.js var require_util16 = __commonJS({ - "node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/eventsource/util.js"(exports, module) { + "../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/eventsource/util.js"(exports, module) { "use strict"; function isValidLastEventId(value2) { return value2.indexOf("\0") === -1; @@ -58969,9 +73060,9 @@ var require_util16 = __commonJS({ } }); -// node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/eventsource/eventsource-stream.js +// ../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/eventsource/eventsource-stream.js var require_eventsource_stream = __commonJS({ - "node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/eventsource/eventsource-stream.js"(exports, module) { + "../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/eventsource/eventsource-stream.js"(exports, module) { "use strict"; var { Transform } = __require("node:stream"); var { isASCIINumber, isValidLastEventId } = require_util16(); @@ -59200,9 +73291,9 @@ ${value2}`; } }); -// node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/eventsource/eventsource.js +// ../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/eventsource/eventsource.js var require_eventsource = __commonJS({ - "node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/eventsource/eventsource.js"(exports, module) { + "../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/web/eventsource/eventsource.js"(exports, module) { "use strict"; var { pipeline: pipeline2 } = __require("node:stream"); var { fetching } = require_fetch2(); @@ -59246,7 +73337,7 @@ var require_eventsource = __commonJS({ * @param {EventSourceInit} [eventSourceInitDict={}] * @see https://html.spec.whatwg.org/multipage/server-sent-events.html#the-eventsource-interface */ - constructor(url2, eventSourceInitDict = {}) { + constructor(url4, eventSourceInitDict = {}) { super(); webidl.util.markAsUncloneable(this); const prefix = "EventSource constructor"; @@ -59257,7 +73348,7 @@ var require_eventsource = __commonJS({ code: "UNDICI-ES" }); } - url2 = webidl.converters.USVString(url2); + url4 = webidl.converters.USVString(url4); eventSourceInitDict = webidl.converters.EventSourceInitDict(eventSourceInitDict, prefix, "eventSourceInitDict"); this.#dispatcher = eventSourceInitDict.node.dispatcher || eventSourceInitDict.dispatcher; this.#state = { @@ -59267,7 +73358,7 @@ var require_eventsource = __commonJS({ const settings = environmentSettingsObject; let urlRecord; try { - urlRecord = new URL(url2, settings.settingsObject.baseUrl); + urlRecord = new URL(url4, settings.settingsObject.baseUrl); this.#state.origin = urlRecord.origin; } catch (e) { throw new DOMException(e, "SyntaxError"); @@ -59365,8 +73456,8 @@ var require_eventsource = __commonJS({ pipeline2( response.body.stream, eventSourceStream, - (error41) => { - if (error41?.aborted === false) { + (error50) => { + if (error50?.aborted === false) { this.close(); this.dispatchEvent(new Event("error")); } @@ -59517,9 +73608,9 @@ var require_eventsource = __commonJS({ } }); -// node_modules/.pnpm/undici@7.16.0/node_modules/undici/index.js +// ../node_modules/.pnpm/undici@7.16.0/node_modules/undici/index.js var require_undici2 = __commonJS({ - "node_modules/.pnpm/undici@7.16.0/node_modules/undici/index.js"(exports, module) { + "../node_modules/.pnpm/undici@7.16.0/node_modules/undici/index.js"(exports, module) { "use strict"; var Client2 = require_client2(); var Dispatcher = require_dispatcher2(); @@ -59530,7 +73621,7 @@ var require_undici2 = __commonJS({ var EnvHttpProxyAgent = require_env_http_proxy_agent(); var RetryAgent = require_retry_agent(); var H2CClient = require_h2c_client(); - var errors = require_errors2(); + var errors = require_errors5(); var util3 = require_util11(); var { InvalidArgumentError } = errors; var api = require_api3(); @@ -59564,7 +73655,7 @@ var require_undici2 = __commonJS({ retry: require_retry(), dump: require_dump(), dns: require_dns(), - cache: require_cache6(), + cache: require_cache3(), decompress: require_decompress() }; module.exports.cacheStores = { @@ -59579,12 +73670,12 @@ var require_undici2 = __commonJS({ headerNameToString: util3.headerNameToString }; function makeDispatcher(fn2) { - return (url2, opts, handler2) => { + return (url4, opts, handler2) => { if (typeof opts === "function") { handler2 = opts; opts = null; } - if (!url2 || typeof url2 !== "string" && typeof url2 !== "object" && !(url2 instanceof URL)) { + if (!url4 || typeof url4 !== "string" && typeof url4 !== "object" && !(url4 instanceof URL)) { throw new InvalidArgumentError("invalid url"); } if (opts != null && typeof opts !== "object") { @@ -59598,12 +73689,12 @@ var require_undici2 = __commonJS({ if (!opts.path.startsWith("/")) { path4 = `/${path4}`; } - url2 = new URL(util3.parseOrigin(url2).origin + path4); + url4 = new URL(util3.parseOrigin(url4).origin + path4); } else { if (!opts) { - opts = typeof url2 === "object" ? url2 : {}; + opts = typeof url4 === "object" ? url4 : {}; } - url2 = util3.parseURL(url2); + url4 = util3.parseURL(url4); } const { agent: agent2, dispatcher = getGlobalDispatcher() } = opts; if (agent2) { @@ -59611,8 +73702,8 @@ var require_undici2 = __commonJS({ } return fn2.call(dispatcher, { ...opts, - origin: url2.origin, - path: url2.search ? `${url2.pathname}${url2.search}` : url2.pathname, + origin: url4.origin, + path: url4.search ? `${url4.pathname}${url4.search}` : url4.pathname, method: opts.method || (opts.body ? "PUT" : "GET") }, handler2); }; @@ -59686,9 +73777,9 @@ var require_undici2 = __commonJS({ } }); -// node_modules/.pnpm/uri-templates@0.2.0/node_modules/uri-templates/uri-templates.js +// ../node_modules/.pnpm/uri-templates@0.2.0/node_modules/uri-templates/uri-templates.js var require_uri_templates = __commonJS({ - "node_modules/.pnpm/uri-templates@0.2.0/node_modules/uri-templates/uri-templates.js"(exports, module) { + "../node_modules/.pnpm/uri-templates@0.2.0/node_modules/uri-templates/uri-templates.js"(exports, module) { (function(global2, factory) { if (typeof define === "function" && define.amd) { define("uri-templates", [], factory); @@ -59711,14 +73802,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(string8) { + return encodeURI(string8).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(string8) { + string8 = string8.replace(/%../g, ""); + return encodeURIComponent(string8) === string8; } function uriTemplateSubstitution(spec) { var modifier = ""; @@ -60135,27 +74226,27 @@ var require_uri_templates = __commonJS({ } }); -// node_modules/.pnpm/xsschema@0.3.5_arktype@2.1.28_zod-to-json-schema@3.24.6_zod@3.25.76__zod@3.25.76/node_modules/xsschema/dist/arktype-C-GObzDh.js +// ../node_modules/.pnpm/xsschema@0.4.0-beta.5_arktype@2.1.28_effect@3.18.4_zod-to-json-schema@3.25.1_zod@4.3.5__zod@4.3.5/node_modules/xsschema/dist/arktype-C-GObzDh.js var arktype_C_GObzDh_exports = {}; __export(arktype_C_GObzDh_exports, { getToJsonSchemaFn: () => getToJsonSchemaFn }); var getToJsonSchemaFn; var init_arktype_C_GObzDh = __esm({ - "node_modules/.pnpm/xsschema@0.3.5_arktype@2.1.28_zod-to-json-schema@3.24.6_zod@3.25.76__zod@3.25.76/node_modules/xsschema/dist/arktype-C-GObzDh.js"() { + "../node_modules/.pnpm/xsschema@0.4.0-beta.5_arktype@2.1.28_effect@3.18.4_zod-to-json-schema@3.25.1_zod@4.3.5__zod@4.3.5/node_modules/xsschema/dist/arktype-C-GObzDh.js"() { getToJsonSchemaFn = async () => (schema2) => schema2.toJsonSchema(); } }); -// node_modules/.pnpm/xsschema@0.3.5_arktype@2.1.28_zod-to-json-schema@3.24.6_zod@3.25.76__zod@3.25.76/node_modules/xsschema/dist/effect--zg3C1LQ.js -var effect_zg3C1LQ_exports = {}; -__export(effect_zg3C1LQ_exports, { +// ../node_modules/.pnpm/xsschema@0.4.0-beta.5_arktype@2.1.28_effect@3.18.4_zod-to-json-schema@3.25.1_zod@4.3.5__zod@4.3.5/node_modules/xsschema/dist/effect-BqN--3bg.js +var effect_BqN_3bg_exports = {}; +__export(effect_BqN_3bg_exports, { getToJsonSchemaFn: () => getToJsonSchemaFn2 }); var getToJsonSchemaFn2; -var init_effect_zg3C1LQ = __esm({ - "node_modules/.pnpm/xsschema@0.3.5_arktype@2.1.28_zod-to-json-schema@3.24.6_zod@3.25.76__zod@3.25.76/node_modules/xsschema/dist/effect--zg3C1LQ.js"() { - init_index_CAcLDIRJ(); +var init_effect_BqN_3bg = __esm({ + "../node_modules/.pnpm/xsschema@0.4.0-beta.5_arktype@2.1.28_effect@3.18.4_zod-to-json-schema@3.25.1_zod@4.3.5__zod@4.3.5/node_modules/xsschema/dist/effect-BqN--3bg.js"() { + init_index_CLFto6T2(); getToJsonSchemaFn2 = async () => { const { JSONSchema } = await tryImport(import("effect"), "effect"); return (schema2) => JSONSchema.make(schema2); @@ -60163,15 +74254,15 @@ var init_effect_zg3C1LQ = __esm({ } }); -// node_modules/.pnpm/xsschema@0.3.5_arktype@2.1.28_zod-to-json-schema@3.24.6_zod@3.25.76__zod@3.25.76/node_modules/xsschema/dist/sury-s6Akl-oc.js -var sury_s6Akl_oc_exports = {}; -__export(sury_s6Akl_oc_exports, { +// ../node_modules/.pnpm/xsschema@0.4.0-beta.5_arktype@2.1.28_effect@3.18.4_zod-to-json-schema@3.25.1_zod@4.3.5__zod@4.3.5/node_modules/xsschema/dist/sury-DT-CKDzo.js +var sury_DT_CKDzo_exports = {}; +__export(sury_DT_CKDzo_exports, { getToJsonSchemaFn: () => getToJsonSchemaFn3 }); var getToJsonSchemaFn3; -var init_sury_s6Akl_oc = __esm({ - "node_modules/.pnpm/xsschema@0.3.5_arktype@2.1.28_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(); +var init_sury_DT_CKDzo = __esm({ + "../node_modules/.pnpm/xsschema@0.4.0-beta.5_arktype@2.1.28_effect@3.18.4_zod-to-json-schema@3.25.1_zod@4.3.5__zod@4.3.5/node_modules/xsschema/dist/sury-DT-CKDzo.js"() { + init_index_CLFto6T2(); getToJsonSchemaFn3 = async () => { const { toJSONSchema: toJSONSchema2 } = await tryImport(import("sury"), "sury"); return (schema2) => toJSONSchema2(schema2); @@ -60179,15 +74270,15 @@ var init_sury_s6Akl_oc = __esm({ } }); -// node_modules/.pnpm/xsschema@0.3.5_arktype@2.1.28_zod-to-json-schema@3.24.6_zod@3.25.76__zod@3.25.76/node_modules/xsschema/dist/valibot-DBCeetIe.js -var valibot_DBCeetIe_exports = {}; -__export(valibot_DBCeetIe_exports, { +// ../node_modules/.pnpm/xsschema@0.4.0-beta.5_arktype@2.1.28_effect@3.18.4_zod-to-json-schema@3.25.1_zod@4.3.5__zod@4.3.5/node_modules/xsschema/dist/valibot-CR9aQ3tY.js +var valibot_CR9aQ3tY_exports = {}; +__export(valibot_CR9aQ3tY_exports, { getToJsonSchemaFn: () => getToJsonSchemaFn4 }); var getToJsonSchemaFn4; -var init_valibot_DBCeetIe = __esm({ - "node_modules/.pnpm/xsschema@0.3.5_arktype@2.1.28_zod-to-json-schema@3.24.6_zod@3.25.76__zod@3.25.76/node_modules/xsschema/dist/valibot-DBCeetIe.js"() { - init_index_CAcLDIRJ(); +var init_valibot_CR9aQ3tY = __esm({ + "../node_modules/.pnpm/xsschema@0.4.0-beta.5_arktype@2.1.28_effect@3.18.4_zod-to-json-schema@3.25.1_zod@4.3.5__zod@4.3.5/node_modules/xsschema/dist/valibot-CR9aQ3tY.js"() { + init_index_CLFto6T2(); getToJsonSchemaFn4 = async () => { const { toJsonSchema: toJsonSchema2 } = await tryImport(import("@valibot/to-json-schema"), "@valibot/to-json-schema"); return (schema2) => toJsonSchema2(schema2); @@ -60195,11897 +74286,15 @@ 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 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); - initializer2(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 config(newConfig) { - if (newConfig) - Object.assign(globalConfig, newConfig); - return globalConfig; -} -var NEVER4, $brand, $ZodAsyncError, globalConfig; -var init_core = __esm({ - "node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/core.js"() { - NEVER4 = Object.freeze({ - status: "aborted" - }); - $brand = Symbol("zod_brand"); - $ZodAsyncError = class extends Error { - constructor() { - super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`); - } - }; - globalConfig = {}; - } -}); - -// node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/util.js -var util_exports = {}; -__export(util_exports, { - BIGINT_FORMAT_RANGES: () => BIGINT_FORMAT_RANGES, - Class: () => Class, - NUMBER_FORMAT_RANGES: () => NUMBER_FORMAT_RANGES, - aborted: () => aborted, - allowsEval: () => allowsEval, - assert: () => assert2, - assertEqual: () => assertEqual, - assertIs: () => assertIs, - assertNever: () => assertNever, - assertNotEqual: () => assertNotEqual, - assignProp: () => assignProp, - cached: () => cached3, - captureStackTrace: () => captureStackTrace, - cleanEnum: () => cleanEnum, - cleanRegex: () => cleanRegex, - clone: () => clone, - createTransparentProxy: () => createTransparentProxy, - defineLazy: () => defineLazy, - esc: () => esc, - escapeRegex: () => escapeRegex, - extend: () => extend, - finalizeIssue: () => finalizeIssue, - floatSafeRemainder: () => floatSafeRemainder4, - getElementAtPath: () => getElementAtPath, - getEnumValues: () => getEnumValues, - getLengthableOrigin: () => getLengthableOrigin, - getParsedType: () => getParsedType4, - getSizableOrigin: () => getSizableOrigin, - isObject: () => isObject3, - isPlainObject: () => isPlainObject4, - issue: () => issue, - joinValues: () => joinValues, - jsonStringifyReplacer: () => jsonStringifyReplacer, - merge: () => merge2, - normalizeParams: () => normalizeParams, - nullish: () => nullish, - numKeys: () => numKeys, - omit: () => omit3, - optionalKeys: () => optionalKeys, - partial: () => partial, - pick: () => pick, - prefixIssues: () => prefixIssues, - primitiveTypes: () => primitiveTypes, - promiseAllObject: () => promiseAllObject, - propertyKeyTypes: () => propertyKeyTypes, - randomString: () => randomString, - required: () => required, - stringifyPrimitive: () => stringifyPrimitive, - unwrapMessage: () => unwrapMessage -}); -function assertEqual(val) { - return val; -} -function assertNotEqual(val) { - return val; -} -function assertIs(_arg) { -} -function assertNever(_x) { - throw new Error(); -} -function assert2(_) { -} -function getEnumValues(entries) { - const numericValues = Object.values(entries).filter((v) => typeof v === "number"); - const values = Object.entries(entries).filter(([k, _]) => numericValues.indexOf(+k) === -1).map(([_, v]) => v); - return values; -} -function joinValues(array, separator2 = "|") { - return array.map((val) => stringifyPrimitive(val)).join(separator2); -} -function jsonStringifyReplacer(_, value2) { - if (typeof value2 === "bigint") - return value2.toString(); - return value2; -} -function cached3(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 nullish(input) { - return input === null || input === void 0; -} -function cleanRegex(source) { - const start = source.startsWith("^") ? 1 : 0; - const end = source.endsWith("$") ? source.length - 1 : source.length; - return source.slice(start, end); -} -function floatSafeRemainder4(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 defineLazy(object2, key, getter) { - const set = false; - Object.defineProperty(object2, key, { - get() { - if (!set) { - const value2 = getter(); - object2[key] = value2; - return value2; - } - throw new Error("cached value already set"); - }, - set(v) { - Object.defineProperty(object2, key, { - value: v - // configurable: true, - }); - }, - configurable: true - }); -} -function assignProp(target, prop, value2) { - Object.defineProperty(target, prop, { - value: value2, - writable: true, - enumerable: true, - configurable: true - }); -} -function getElementAtPath(obj, path4) { - if (!path4) - return obj; - return path4.reduce((acc, key) => acc?.[key], obj); -} -function promiseAllObject(promisesObj) { - const keys = Object.keys(promisesObj); - const promises = keys.map((key) => promisesObj[key]); - return Promise.all(promises).then((results) => { - const resolvedObj = {}; - for (let i = 0; i < keys.length; i++) { - resolvedObj[keys[i]] = results[i]; - } - return resolvedObj; - }); -} -function randomString(length = 10) { - const chars = "abcdefghijklmnopqrstuvwxyz"; - let str = ""; - for (let i = 0; i < length; i++) { - str += chars[Math.floor(Math.random() * chars.length)]; - } - return str; -} -function esc(str) { - return JSON.stringify(str); -} -function isObject3(data) { - return typeof data === "object" && data !== null && !Array.isArray(data); -} -function isPlainObject4(o) { - if (isObject3(o) === false) - return false; - const ctor = o.constructor; - if (ctor === void 0) - return true; - const prot = ctor.prototype; - if (isObject3(prot) === false) - return false; - if (Object.prototype.hasOwnProperty.call(prot, "isPrototypeOf") === false) { - return false; - } - return true; -} -function numKeys(data) { - let keyCount = 0; - for (const key in data) { - if (Object.prototype.hasOwnProperty.call(data, key)) { - keyCount++; - } - } - return keyCount; -} -function escapeRegex(str) { - return str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"); -} -function clone(inst, def, params) { - const cl = new inst._zod.constr(def ?? inst._zod.def); - if (!def || params?.parent) - cl._zod.parent = inst; - return cl; -} -function normalizeParams(_params) { - const params = _params; - if (!params) - return {}; - if (typeof params === "string") - return { error: () => params }; - if (params?.message !== void 0) { - if (params?.error !== void 0) - throw new Error("Cannot specify both `message` and `error` params"); - params.error = params.message; - } - delete params.message; - if (typeof params.error === "string") - return { ...params, error: () => params.error }; - return params; -} -function createTransparentProxy(getter) { - let target; - return new Proxy({}, { - get(_, prop, receiver) { - target ?? (target = getter()); - return Reflect.get(target, prop, receiver); - }, - set(_, prop, value2, receiver) { - target ?? (target = getter()); - return Reflect.set(target, prop, value2, receiver); - }, - has(_, prop) { - target ?? (target = getter()); - return Reflect.has(target, prop); - }, - deleteProperty(_, prop) { - target ?? (target = getter()); - return Reflect.deleteProperty(target, prop); - }, - ownKeys(_) { - target ?? (target = getter()); - return Reflect.ownKeys(target); - }, - getOwnPropertyDescriptor(_, prop) { - target ?? (target = getter()); - return Reflect.getOwnPropertyDescriptor(target, prop); - }, - defineProperty(_, prop, descriptor) { - target ?? (target = getter()); - return Reflect.defineProperty(target, prop, descriptor); - } - }); -} -function stringifyPrimitive(value2) { - if (typeof value2 === "bigint") - return value2.toString() + "n"; - if (typeof value2 === "string") - return `"${value2}"`; - return `${value2}`; -} -function optionalKeys(shape) { - return Object.keys(shape).filter((k) => { - return shape[k]._zod.optin === "optional" && shape[k]._zod.optout === "optional"; - }); -} -function pick(schema2, mask) { - const newShape = {}; - const currDef = schema2._zod.def; - for (const key in mask) { - if (!(key in currDef.shape)) { - throw new Error(`Unrecognized key: "${key}"`); - } - if (!mask[key]) - continue; - newShape[key] = currDef.shape[key]; - } - return clone(schema2, { - ...schema2._zod.def, - shape: newShape, - checks: [] - }); -} -function omit3(schema2, mask) { - const newShape = { ...schema2._zod.def.shape }; - const currDef = schema2._zod.def; - for (const key in mask) { - if (!(key in currDef.shape)) { - throw new Error(`Unrecognized key: "${key}"`); - } - if (!mask[key]) - continue; - delete newShape[key]; - } - return clone(schema2, { - ...schema2._zod.def, - shape: newShape, - checks: [] - }); -} -function extend(schema2, shape) { - if (!isPlainObject4(shape)) { - throw new Error("Invalid input to extend: expected a plain object"); - } - const def = { - ...schema2._zod.def, - get shape() { - const _shape = { ...schema2._zod.def.shape, ...shape }; - assignProp(this, "shape", _shape); - return _shape; - }, - checks: [] - // delete existing checks - }; - return clone(schema2, def); -} -function merge2(a, b) { - return clone(a, { - ...a._zod.def, - get shape() { - const _shape = { ...a._zod.def.shape, ...b._zod.def.shape }; - assignProp(this, "shape", _shape); - return _shape; - }, - catchall: b._zod.def.catchall, - checks: [] - // delete existing checks - }); -} -function partial(Class2, schema2, mask) { - const oldShape = schema2._zod.def.shape; - const shape = { ...oldShape }; - if (mask) { - for (const key in mask) { - if (!(key in oldShape)) { - throw new Error(`Unrecognized key: "${key}"`); - } - if (!mask[key]) - continue; - shape[key] = Class2 ? new Class2({ - type: "optional", - innerType: oldShape[key] - }) : oldShape[key]; - } - } else { - for (const key in oldShape) { - shape[key] = Class2 ? new Class2({ - type: "optional", - innerType: oldShape[key] - }) : oldShape[key]; - } - } - return clone(schema2, { - ...schema2._zod.def, - shape, - checks: [] - }); -} -function required(Class2, schema2, mask) { - const oldShape = schema2._zod.def.shape; - const shape = { ...oldShape }; - if (mask) { - for (const key in mask) { - if (!(key in shape)) { - throw new Error(`Unrecognized key: "${key}"`); - } - if (!mask[key]) - continue; - shape[key] = new Class2({ - type: "nonoptional", - innerType: oldShape[key] - }); - } - } else { - for (const key in oldShape) { - shape[key] = new Class2({ - type: "nonoptional", - innerType: oldShape[key] - }); - } - } - return clone(schema2, { - ...schema2._zod.def, - shape, - // optional: [], - checks: [] - }); -} -function aborted(x, startIndex = 0) { - for (let i = startIndex; i < x.issues.length; i++) { - if (x.issues[i]?.continue !== true) - return true; - } - return false; -} -function prefixIssues(path4, issues) { - return issues.map((iss) => { - var _a; - (_a = iss).path ?? (_a.path = []); - iss.path.unshift(path4); - return iss; - }); -} -function unwrapMessage(message) { - return typeof message === "string" ? message : message?.message; -} -function finalizeIssue(iss, ctx, config2) { - 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"; - full.message = message; - } - delete full.inst; - delete full.continue; - if (!ctx?.reportInput) { - delete full.input; - } - return full; -} -function getSizableOrigin(input) { - if (input instanceof Set) - return "set"; - if (input instanceof Map) - return "map"; - if (input instanceof File) - return "file"; - return "unknown"; -} -function getLengthableOrigin(input) { - if (Array.isArray(input)) - return "array"; - if (typeof input === "string") - return "string"; - return "unknown"; -} -function issue(...args3) { - const [iss, input, inst] = args3; - if (typeof iss === "string") { - return { - message: iss, - code: "custom", - input, - inst - }; - } - return { ...iss }; -} -function cleanEnum(obj) { - return Object.entries(obj).filter(([k, _]) => { - return Number.isNaN(Number.parseInt(k, 10)); - }).map((el) => el[1]); -} -var captureStackTrace, allowsEval, getParsedType4, propertyKeyTypes, primitiveTypes, NUMBER_FORMAT_RANGES, BIGINT_FORMAT_RANGES, Class; -var init_util2 = __esm({ - "node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/util.js"() { - captureStackTrace = Error.captureStackTrace ? Error.captureStackTrace : (..._args) => { - }; - allowsEval = cached3(() => { - if (typeof navigator !== "undefined" && navigator?.userAgent?.includes("Cloudflare")) { - return false; - } - try { - const F = Function; - new F(""); - return true; - } catch (_) { - return false; - } - }); - getParsedType4 = (data) => { - const t = typeof data; - switch (t) { - case "undefined": - return "undefined"; - case "string": - return "string"; - case "number": - return Number.isNaN(data) ? "nan" : "number"; - case "boolean": - return "boolean"; - case "function": - return "function"; - case "bigint": - return "bigint"; - case "symbol": - return "symbol"; - case "object": - if (Array.isArray(data)) { - return "array"; - } - if (data === null) { - return "null"; - } - if (data.then && typeof data.then === "function" && data.catch && typeof data.catch === "function") { - return "promise"; - } - if (typeof Map !== "undefined" && data instanceof Map) { - return "map"; - } - if (typeof Set !== "undefined" && data instanceof Set) { - return "set"; - } - if (typeof Date !== "undefined" && data instanceof Date) { - return "date"; - } - if (typeof File !== "undefined" && data instanceof File) { - return "file"; - } - return "object"; - default: - throw new Error(`Unknown data type: ${t}`); - } - }; - propertyKeyTypes = /* @__PURE__ */ new Set(["string", "number", "symbol"]); - primitiveTypes = /* @__PURE__ */ new Set(["string", "number", "bigint", "boolean", "symbol", "undefined"]); - NUMBER_FORMAT_RANGES = { - 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] - }; - BIGINT_FORMAT_RANGES = { - int64: [/* @__PURE__ */ BigInt("-9223372036854775808"), /* @__PURE__ */ BigInt("9223372036854775807")], - uint64: [/* @__PURE__ */ BigInt(0), /* @__PURE__ */ BigInt("18446744073709551615")] - }; - Class = class { - constructor(..._args) { - } - }; - } -}); - -// node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/errors.js -function flattenError2(error41, mapper = (issue2) => issue2.message) { - const fieldErrors = {}; - const formErrors = []; - for (const sub of error41.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 formatError(error41, _mapper) { - const mapper = _mapper || function(issue2) { - return issue2.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)); - } 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(error41); - return fieldErrors; -} -function treeifyError(error41, _mapper) { - const mapper = _mapper || function(issue2) { - return issue2.message; - }; - const result = { errors: [] }; - const processError = (error42, 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); - } else { - const fullpath = [...path4, ...issue2.path]; - if (fullpath.length === 0) { - result.errors.push(mapper(issue2)); - continue; - } - let curr = result; - let i = 0; - while (i < fullpath.length) { - const el = fullpath[i]; - const terminal = i === fullpath.length - 1; - if (typeof el === "string") { - curr.properties ?? (curr.properties = {}); - (_a = curr.properties)[el] ?? (_a[el] = { errors: [] }); - curr = curr.properties[el]; - } else { - curr.items ?? (curr.items = []); - (_b = curr.items)[el] ?? (_b[el] = { errors: [] }); - curr = curr.items[el]; - } - if (terminal) { - curr.errors.push(mapper(issue2)); - } - i++; - } - } - } - }; - processError(error41); - return result; -} -function toDotPath(path4) { - const segs = []; - for (const seg of path4) { - if (typeof seg === "number") - segs.push(`[${seg}]`); - else if (typeof seg === "symbol") - segs.push(`[${JSON.stringify(String(seg))}]`); - else if (/[^\w$]/.test(seg)) - segs.push(`[${JSON.stringify(seg)}]`); - else { - if (segs.length) - segs.push("."); - segs.push(seg); - } - } - return segs.join(""); -} -function prettifyError(error41) { - 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)}`); - } - return lines.join("\n"); -} -var initializer, $ZodError, $ZodRealError; -var init_errors2 = __esm({ - "node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/errors.js"() { - init_core(); - init_util2(); - initializer = (inst, def) => { - inst.name = "$ZodError"; - Object.defineProperty(inst, "_zod", { - value: inst._zod, - enumerable: false - }); - Object.defineProperty(inst, "issues", { - value: def, - enumerable: false - }); - Object.defineProperty(inst, "message", { - get() { - return JSON.stringify(def, jsonStringifyReplacer, 2); - }, - enumerable: true - // configurable: false, - }); - Object.defineProperty(inst, "toString", { - value: () => inst.message, - enumerable: false - }); - }; - $ZodError = $constructor("$ZodError", initializer); - $ZodRealError = $constructor("$ZodError", initializer, { Parent: Error }); - } -}); - -// node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/parse.js -var _parse, parse3, _parseAsync, parseAsync, _safeParse, safeParse2, _safeParseAsync, safeParseAsync; -var init_parse = __esm({ - "node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/parse.js"() { - init_core(); - init_errors2(); - init_util2(); - _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); - if (result instanceof Promise) { - throw new $ZodAsyncError(); - } - if (result.issues.length) { - const e = new (_params?.Err ?? _Err)(result.issues.map((iss) => finalizeIssue(iss, ctx, config()))); - captureStackTrace(e, _params?.callee); - throw e; - } - return result.value; - }; - parse3 = /* @__PURE__ */ _parse($ZodRealError); - _parseAsync = (_Err) => async (schema2, value2, _ctx, params) => { - const ctx = _ctx ? Object.assign(_ctx, { async: true }) : { async: true }; - let result = schema2._zod.run({ value: value2, issues: [] }, ctx); - if (result instanceof Promise) - result = await result; - if (result.issues.length) { - const e = new (params?.Err ?? _Err)(result.issues.map((iss) => finalizeIssue(iss, ctx, config()))); - captureStackTrace(e, params?.callee); - throw e; - } - return result.value; - }; - parseAsync = /* @__PURE__ */ _parseAsync($ZodRealError); - _safeParse = (_Err) => (schema2, value2, _ctx) => { - const ctx = _ctx ? { ..._ctx, async: false } : { async: false }; - const result = schema2._zod.run({ value: value2, issues: [] }, ctx); - if (result instanceof Promise) { - throw new $ZodAsyncError(); - } - return result.issues.length ? { - success: false, - error: new (_Err ?? $ZodError)(result.issues.map((iss) => finalizeIssue(iss, ctx, config()))) - } : { success: true, data: result.value }; - }; - safeParse2 = /* @__PURE__ */ _safeParse($ZodRealError); - _safeParseAsync = (_Err) => async (schema2, value2, _ctx) => { - const ctx = _ctx ? Object.assign(_ctx, { async: true }) : { async: true }; - let result = schema2._zod.run({ value: value2, issues: [] }, ctx); - if (result instanceof Promise) - result = await result; - return result.issues.length ? { - success: false, - error: new _Err(result.issues.map((iss) => finalizeIssue(iss, ctx, config()))) - } : { success: true, data: result.value }; - }; - safeParseAsync = /* @__PURE__ */ _safeParseAsync($ZodRealError); - } -}); - -// node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/regexes.js -var regexes_exports = {}; -__export(regexes_exports, { - _emoji: () => _emoji, - base64: () => base642, - base64url: () => base64url, - bigint: () => bigint, - boolean: () => boolean, - browserEmail: () => browserEmail, - cidrv4: () => cidrv4, - cidrv6: () => cidrv6, - cuid: () => cuid, - cuid2: () => cuid2, - date: () => date, - datetime: () => datetime, - domain: () => domain, - duration: () => duration, - e164: () => e164, - email: () => email2, - emoji: () => emoji, - extendedDuration: () => extendedDuration, - guid: () => guid, - hostname: () => hostname, - html5Email: () => html5Email, - integer: () => integer2, - ipv4: () => ipv4, - ipv6: () => ipv6, - ksuid: () => ksuid, - lowercase: () => lowercase, - nanoid: () => nanoid, - null: () => _null, - number: () => number2, - rfc5322Email: () => rfc5322Email, - string: () => string2, - time: () => time, - ulid: () => ulid, - undefined: () => _undefined, - unicodeEmail: () => unicodeEmail, - uppercase: () => uppercase, - uuid: () => uuid2, - uuid4: () => uuid4, - uuid6: () => uuid6, - uuid7: () => uuid7, - xid: () => xid -}); -function emoji() { - return new RegExp(_emoji, "u"); -} -function timeSource(args3) { - const hhmm = `(?:[01]\\d|2[0-3]):[0-5]\\d`; - const regex4 = typeof args3.precision === "number" ? args3.precision === -1 ? `${hhmm}` : args3.precision === 0 ? `${hhmm}:[0-5]\\d` : `${hhmm}:[0-5]\\d\\.\\d{${args3.precision}}` : `${hhmm}(?::[0-5]\\d(?:\\.\\d+)?)?`; - return regex4; -} -function time(args3) { - return new RegExp(`^${timeSource(args3)}$`); -} -function datetime(args3) { - const time2 = 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("|")})`; - 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; -var init_regexes = __esm({ - "node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/regexes.js"() { - cuid = /^[cC][^\s-]{8,}$/; - cuid2 = /^[0-9a-z]+$/; - ulid = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/; - xid = /^[0-9a-vA-V]{20}$/; - ksuid = /^[A-Za-z0-9]{27}$/; - nanoid = /^[a-zA-Z0-9_-]{21}$/; - 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) - 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})$`); - }; - uuid4 = /* @__PURE__ */ uuid2(4); - uuid6 = /* @__PURE__ */ uuid2(6); - uuid7 = /* @__PURE__ */ uuid2(7); - email2 = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/; - html5Email = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/; - rfc5322Email = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; - unicodeEmail = /^[^\s@"]{1,64}@[^\s@]{1,255}$/u; - browserEmail = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/; - _emoji = `^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`; - ipv4 = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/; - ipv6 = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})$/; - cidrv4 = /^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/; - cidrv6 = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/; - base642 = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/; - base64url = /^[A-Za-z0-9_-]*$/; - hostname = /^([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+$/; - domain = /^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/; - e164 = /^\+(?:[0-9]){6,14}[0-9]$/; - dateSource = `(?:(?:\\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])))`; - date = /* @__PURE__ */ new RegExp(`^${dateSource}$`); - string2 = (params) => { - const regex4 = params ? `[\\s\\S]{${params?.minimum ?? 0},${params?.maximum ?? ""}}` : `[\\s\\S]*`; - return new RegExp(`^${regex4}$`); - }; - bigint = /^\d+n?$/; - integer2 = /^\d+$/; - number2 = /^-?\d+(?:\.\d+)?/i; - boolean = /true|false/i; - _null = /null/i; - _undefined = /undefined/i; - lowercase = /^[^A-Z]*$/; - uppercase = /^[^a-z]*$/; - } -}); - -// node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/checks.js -function handleCheckPropertyResult(result, payload, property) { - if (result.issues.length) { - payload.issues.push(...prefixIssues(property, result.issues)); - } -} -var $ZodCheck, numericOriginMap, $ZodCheckLessThan, $ZodCheckGreaterThan, $ZodCheckMultipleOf, $ZodCheckNumberFormat, $ZodCheckBigIntFormat, $ZodCheckMaxSize, $ZodCheckMinSize, $ZodCheckSizeEquals, $ZodCheckMaxLength, $ZodCheckMinLength, $ZodCheckLengthEquals, $ZodCheckStringFormat, $ZodCheckRegex, $ZodCheckLowerCase, $ZodCheckUpperCase, $ZodCheckIncludes, $ZodCheckStartsWith, $ZodCheckEndsWith, $ZodCheckProperty, $ZodCheckMimeType, $ZodCheckOverwrite; -var init_checks = __esm({ - "node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/checks.js"() { - init_core(); - init_regexes(); - init_util2(); - $ZodCheck = /* @__PURE__ */ $constructor("$ZodCheck", (inst, def) => { - var _a; - inst._zod ?? (inst._zod = {}); - inst._zod.def = def; - (_a = inst._zod).onattach ?? (_a.onattach = []); - }); - numericOriginMap = { - number: "number", - bigint: "bigint", - object: "date" - }; - $ZodCheckLessThan = /* @__PURE__ */ $constructor("$ZodCheckLessThan", (inst, def) => { - $ZodCheck.init(inst, def); - const origin = numericOriginMap[typeof def.value]; - inst._zod.onattach.push((inst2) => { - const bag = inst2._zod.bag; - const curr = (def.inclusive ? bag.maximum : bag.exclusiveMaximum) ?? Number.POSITIVE_INFINITY; - if (def.value < curr) { - if (def.inclusive) - bag.maximum = def.value; - else - bag.exclusiveMaximum = def.value; - } - }); - inst._zod.check = (payload) => { - if (def.inclusive ? payload.value <= def.value : payload.value < def.value) { - return; - } - payload.issues.push({ - origin, - code: "too_big", - maximum: def.value, - input: payload.value, - inclusive: def.inclusive, - inst, - continue: !def.abort - }); - }; - }); - $ZodCheckGreaterThan = /* @__PURE__ */ $constructor("$ZodCheckGreaterThan", (inst, def) => { - $ZodCheck.init(inst, def); - const origin = numericOriginMap[typeof def.value]; - inst._zod.onattach.push((inst2) => { - const bag = inst2._zod.bag; - const curr = (def.inclusive ? bag.minimum : bag.exclusiveMinimum) ?? Number.NEGATIVE_INFINITY; - if (def.value > curr) { - if (def.inclusive) - bag.minimum = def.value; - else - bag.exclusiveMinimum = def.value; - } - }); - inst._zod.check = (payload) => { - if (def.inclusive ? payload.value >= def.value : payload.value > def.value) { - return; - } - payload.issues.push({ - origin, - code: "too_small", - minimum: def.value, - input: payload.value, - inclusive: def.inclusive, - inst, - continue: !def.abort - }); - }; - }); - $ZodCheckMultipleOf = /* @__PURE__ */ $constructor("$ZodCheckMultipleOf", (inst, def) => { - $ZodCheck.init(inst, def); - inst._zod.onattach.push((inst2) => { - var _a; - (_a = inst2._zod.bag).multipleOf ?? (_a.multipleOf = def.value); - }); - inst._zod.check = (payload) => { - if (typeof payload.value !== typeof def.value) - throw new Error("Cannot mix number and bigint in multiple_of check."); - const isMultiple = typeof payload.value === "bigint" ? payload.value % def.value === BigInt(0) : floatSafeRemainder4(payload.value, def.value) === 0; - if (isMultiple) - return; - payload.issues.push({ - origin: typeof payload.value, - code: "not_multiple_of", - divisor: def.value, - input: payload.value, - inst, - continue: !def.abort - }); - }; - }); - $ZodCheckNumberFormat = /* @__PURE__ */ $constructor("$ZodCheckNumberFormat", (inst, def) => { - $ZodCheck.init(inst, def); - def.format = def.format || "float64"; - const isInt = def.format?.includes("int"); - const origin = isInt ? "int" : "number"; - const [minimum, maximum] = NUMBER_FORMAT_RANGES[def.format]; - inst._zod.onattach.push((inst2) => { - const bag = inst2._zod.bag; - bag.format = def.format; - bag.minimum = minimum; - bag.maximum = maximum; - if (isInt) - bag.pattern = integer2; - }); - inst._zod.check = (payload) => { - const input = payload.value; - if (isInt) { - if (!Number.isInteger(input)) { - payload.issues.push({ - expected: origin, - format: def.format, - code: "invalid_type", - input, - inst - }); - return; - } - if (!Number.isSafeInteger(input)) { - if (input > 0) { - payload.issues.push({ - input, - code: "too_big", - maximum: Number.MAX_SAFE_INTEGER, - note: "Integers must be within the safe integer range.", - inst, - origin, - continue: !def.abort - }); - } else { - payload.issues.push({ - input, - code: "too_small", - minimum: Number.MIN_SAFE_INTEGER, - note: "Integers must be within the safe integer range.", - inst, - origin, - continue: !def.abort - }); - } - return; - } - } - if (input < minimum) { - payload.issues.push({ - origin: "number", - input, - code: "too_small", - minimum, - inclusive: true, - inst, - continue: !def.abort - }); - } - if (input > maximum) { - payload.issues.push({ - origin: "number", - input, - code: "too_big", - maximum, - inst - }); - } - }; - }); - $ZodCheckBigIntFormat = /* @__PURE__ */ $constructor("$ZodCheckBigIntFormat", (inst, def) => { - $ZodCheck.init(inst, def); - const [minimum, maximum] = BIGINT_FORMAT_RANGES[def.format]; - inst._zod.onattach.push((inst2) => { - const bag = inst2._zod.bag; - bag.format = def.format; - bag.minimum = minimum; - bag.maximum = maximum; - }); - inst._zod.check = (payload) => { - const input = payload.value; - if (input < minimum) { - payload.issues.push({ - origin: "bigint", - input, - code: "too_small", - minimum, - inclusive: true, - inst, - continue: !def.abort - }); - } - if (input > maximum) { - payload.issues.push({ - origin: "bigint", - input, - code: "too_big", - maximum, - inst - }); - } - }; - }); - $ZodCheckMaxSize = /* @__PURE__ */ $constructor("$ZodCheckMaxSize", (inst, def) => { - var _a; - $ZodCheck.init(inst, def); - (_a = inst._zod.def).when ?? (_a.when = (payload) => { - const val = payload.value; - return !nullish(val) && val.size !== void 0; - }); - inst._zod.onattach.push((inst2) => { - const curr = inst2._zod.bag.maximum ?? Number.POSITIVE_INFINITY; - if (def.maximum < curr) - inst2._zod.bag.maximum = def.maximum; - }); - inst._zod.check = (payload) => { - const input = payload.value; - const size = input.size; - if (size <= def.maximum) - return; - payload.issues.push({ - origin: getSizableOrigin(input), - code: "too_big", - maximum: def.maximum, - input, - inst, - continue: !def.abort - }); - }; - }); - $ZodCheckMinSize = /* @__PURE__ */ $constructor("$ZodCheckMinSize", (inst, def) => { - var _a; - $ZodCheck.init(inst, def); - (_a = inst._zod.def).when ?? (_a.when = (payload) => { - const val = payload.value; - return !nullish(val) && val.size !== void 0; - }); - inst._zod.onattach.push((inst2) => { - const curr = inst2._zod.bag.minimum ?? Number.NEGATIVE_INFINITY; - if (def.minimum > curr) - inst2._zod.bag.minimum = def.minimum; - }); - inst._zod.check = (payload) => { - const input = payload.value; - const size = input.size; - if (size >= def.minimum) - return; - payload.issues.push({ - origin: getSizableOrigin(input), - code: "too_small", - minimum: def.minimum, - input, - inst, - continue: !def.abort - }); - }; - }); - $ZodCheckSizeEquals = /* @__PURE__ */ $constructor("$ZodCheckSizeEquals", (inst, def) => { - var _a; - $ZodCheck.init(inst, def); - (_a = inst._zod.def).when ?? (_a.when = (payload) => { - const val = payload.value; - return !nullish(val) && val.size !== void 0; - }); - inst._zod.onattach.push((inst2) => { - const bag = inst2._zod.bag; - bag.minimum = def.size; - bag.maximum = def.size; - bag.size = def.size; - }); - inst._zod.check = (payload) => { - const input = payload.value; - const size = input.size; - if (size === def.size) - return; - const tooBig = size > def.size; - payload.issues.push({ - origin: getSizableOrigin(input), - ...tooBig ? { code: "too_big", maximum: def.size } : { code: "too_small", minimum: def.size }, - inclusive: true, - exact: true, - input: payload.value, - inst, - continue: !def.abort - }); - }; - }); - $ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (inst, def) => { - var _a; - $ZodCheck.init(inst, def); - (_a = inst._zod.def).when ?? (_a.when = (payload) => { - const val = payload.value; - return !nullish(val) && val.length !== void 0; - }); - inst._zod.onattach.push((inst2) => { - const curr = inst2._zod.bag.maximum ?? Number.POSITIVE_INFINITY; - if (def.maximum < curr) - inst2._zod.bag.maximum = def.maximum; - }); - inst._zod.check = (payload) => { - const input = payload.value; - const length = input.length; - if (length <= def.maximum) - return; - const origin = getLengthableOrigin(input); - payload.issues.push({ - origin, - code: "too_big", - maximum: def.maximum, - inclusive: true, - input, - inst, - continue: !def.abort - }); - }; - }); - $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (inst, def) => { - var _a; - $ZodCheck.init(inst, def); - (_a = inst._zod.def).when ?? (_a.when = (payload) => { - const val = payload.value; - return !nullish(val) && val.length !== void 0; - }); - inst._zod.onattach.push((inst2) => { - const curr = inst2._zod.bag.minimum ?? Number.NEGATIVE_INFINITY; - if (def.minimum > curr) - inst2._zod.bag.minimum = def.minimum; - }); - inst._zod.check = (payload) => { - const input = payload.value; - const length = input.length; - if (length >= def.minimum) - return; - const origin = getLengthableOrigin(input); - payload.issues.push({ - origin, - code: "too_small", - minimum: def.minimum, - inclusive: true, - input, - inst, - continue: !def.abort - }); - }; - }); - $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEquals", (inst, def) => { - var _a; - $ZodCheck.init(inst, def); - (_a = inst._zod.def).when ?? (_a.when = (payload) => { - const val = payload.value; - return !nullish(val) && val.length !== void 0; - }); - inst._zod.onattach.push((inst2) => { - const bag = inst2._zod.bag; - bag.minimum = def.length; - bag.maximum = def.length; - bag.length = def.length; - }); - inst._zod.check = (payload) => { - const input = payload.value; - const length = input.length; - if (length === def.length) - return; - const origin = getLengthableOrigin(input); - const tooBig = length > def.length; - payload.issues.push({ - origin, - ...tooBig ? { code: "too_big", maximum: def.length } : { code: "too_small", minimum: def.length }, - inclusive: true, - exact: true, - input: payload.value, - inst, - continue: !def.abort - }); - }; - }); - $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringFormat", (inst, def) => { - var _a, _b; - $ZodCheck.init(inst, def); - inst._zod.onattach.push((inst2) => { - const bag = inst2._zod.bag; - bag.format = def.format; - if (def.pattern) { - bag.patterns ?? (bag.patterns = /* @__PURE__ */ new Set()); - bag.patterns.add(def.pattern); - } - }); - if (def.pattern) - (_a = inst._zod).check ?? (_a.check = (payload) => { - def.pattern.lastIndex = 0; - if (def.pattern.test(payload.value)) - return; - payload.issues.push({ - origin: "string", - code: "invalid_format", - format: def.format, - input: payload.value, - ...def.pattern ? { pattern: def.pattern.toString() } : {}, - inst, - continue: !def.abort - }); - }); - else - (_b = inst._zod).check ?? (_b.check = () => { - }); - }); - $ZodCheckRegex = /* @__PURE__ */ $constructor("$ZodCheckRegex", (inst, def) => { - $ZodCheckStringFormat.init(inst, def); - inst._zod.check = (payload) => { - def.pattern.lastIndex = 0; - if (def.pattern.test(payload.value)) - return; - payload.issues.push({ - origin: "string", - code: "invalid_format", - format: "regex", - input: payload.value, - pattern: def.pattern.toString(), - inst, - continue: !def.abort - }); - }; - }); - $ZodCheckLowerCase = /* @__PURE__ */ $constructor("$ZodCheckLowerCase", (inst, def) => { - def.pattern ?? (def.pattern = lowercase); - $ZodCheckStringFormat.init(inst, def); - }); - $ZodCheckUpperCase = /* @__PURE__ */ $constructor("$ZodCheckUpperCase", (inst, def) => { - def.pattern ?? (def.pattern = uppercase); - $ZodCheckStringFormat.init(inst, def); - }); - $ZodCheckIncludes = /* @__PURE__ */ $constructor("$ZodCheckIncludes", (inst, def) => { - $ZodCheck.init(inst, def); - const escapedRegex = escapeRegex(def.includes); - const pattern = new RegExp(typeof def.position === "number" ? `^.{${def.position}}${escapedRegex}` : escapedRegex); - def.pattern = pattern; - inst._zod.onattach.push((inst2) => { - const bag = inst2._zod.bag; - bag.patterns ?? (bag.patterns = /* @__PURE__ */ new Set()); - bag.patterns.add(pattern); - }); - inst._zod.check = (payload) => { - if (payload.value.includes(def.includes, def.position)) - return; - payload.issues.push({ - origin: "string", - code: "invalid_format", - format: "includes", - includes: def.includes, - input: payload.value, - inst, - continue: !def.abort - }); - }; - }); - $ZodCheckStartsWith = /* @__PURE__ */ $constructor("$ZodCheckStartsWith", (inst, def) => { - $ZodCheck.init(inst, def); - const pattern = new RegExp(`^${escapeRegex(def.prefix)}.*`); - def.pattern ?? (def.pattern = pattern); - inst._zod.onattach.push((inst2) => { - const bag = inst2._zod.bag; - bag.patterns ?? (bag.patterns = /* @__PURE__ */ new Set()); - bag.patterns.add(pattern); - }); - inst._zod.check = (payload) => { - if (payload.value.startsWith(def.prefix)) - return; - payload.issues.push({ - origin: "string", - code: "invalid_format", - format: "starts_with", - prefix: def.prefix, - input: payload.value, - inst, - continue: !def.abort - }); - }; - }); - $ZodCheckEndsWith = /* @__PURE__ */ $constructor("$ZodCheckEndsWith", (inst, def) => { - $ZodCheck.init(inst, def); - const pattern = new RegExp(`.*${escapeRegex(def.suffix)}$`); - def.pattern ?? (def.pattern = pattern); - inst._zod.onattach.push((inst2) => { - const bag = inst2._zod.bag; - bag.patterns ?? (bag.patterns = /* @__PURE__ */ new Set()); - bag.patterns.add(pattern); - }); - inst._zod.check = (payload) => { - if (payload.value.endsWith(def.suffix)) - return; - payload.issues.push({ - origin: "string", - code: "invalid_format", - format: "ends_with", - suffix: def.suffix, - input: payload.value, - inst, - continue: !def.abort - }); - }; - }); - $ZodCheckProperty = /* @__PURE__ */ $constructor("$ZodCheckProperty", (inst, def) => { - $ZodCheck.init(inst, def); - inst._zod.check = (payload) => { - const result = def.schema._zod.run({ - value: payload.value[def.property], - issues: [] - }, {}); - if (result instanceof Promise) { - return result.then((result2) => handleCheckPropertyResult(result2, payload, def.property)); - } - handleCheckPropertyResult(result, payload, def.property); - return; - }; - }); - $ZodCheckMimeType = /* @__PURE__ */ $constructor("$ZodCheckMimeType", (inst, def) => { - $ZodCheck.init(inst, def); - const mimeSet = new Set(def.mime); - inst._zod.onattach.push((inst2) => { - inst2._zod.bag.mime = def.mime; - }); - inst._zod.check = (payload) => { - if (mimeSet.has(payload.value.type)) - return; - payload.issues.push({ - code: "invalid_value", - values: def.mime, - input: payload.value.type, - inst - }); - }; - }); - $ZodCheckOverwrite = /* @__PURE__ */ $constructor("$ZodCheckOverwrite", (inst, def) => { - $ZodCheck.init(inst, def); - inst._zod.check = (payload) => { - payload.value = def.tx(payload.value); - }; - }); - } -}); - -// node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/doc.js -var Doc; -var init_doc = __esm({ - "node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/doc.js"() { - Doc = class { - constructor(args3 = []) { - this.content = []; - this.indent = 0; - if (this) - this.args = args3; - } - indented(fn2) { - this.indent += 1; - fn2(this); - this.indent -= 1; - } - write(arg) { - if (typeof arg === "function") { - arg(this, { execution: "sync" }); - arg(this, { execution: "async" }); - return; - } - const content = arg; - const lines = content.split("\n").filter((x) => x); - const minIndent = Math.min(...lines.map((x) => x.length - x.trimStart().length)); - const dedented = lines.map((x) => x.slice(minIndent)).map((x) => " ".repeat(this.indent * 2) + x); - for (const line of dedented) { - this.content.push(line); - } - } - compile() { - const F = Function; - const args3 = this?.args; - const content = this?.content ?? [``]; - const lines = [...content.map((x) => ` ${x}`)]; - return new F(...args3, lines.join("\n")); - } - }; - } -}); - -// node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/versions.js -var version; -var init_versions = __esm({ - "node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/versions.js"() { - version = { - major: 4, - minor: 0, - patch: 0 - }; - } -}); - -// node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/schemas.js -function isValidBase64(data) { - if (data === "") - return true; - if (data.length % 4 !== 0) - return false; - try { - atob(data); - return true; - } catch { - return false; - } -} -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, "="); - return isValidBase64(padded); -} -function isValidJWT4(token, algorithm = null) { - try { - const tokensParts = token.split("."); - if (tokensParts.length !== 3) - return false; - const [header] = tokensParts; - if (!header) - return false; - const parsedHeader = JSON.parse(atob(header)); - if ("typ" in parsedHeader && parsedHeader?.typ !== "JWT") - return false; - if (!parsedHeader.alg) - return false; - if (algorithm && (!("alg" in parsedHeader) || parsedHeader.alg !== algorithm)) - return false; - return true; - } catch { - return false; - } -} -function handleArrayResult(result, final, index) { - if (result.issues.length) { - final.issues.push(...prefixIssues(index, result.issues)); - } - final.value[index] = result.value; -} -function handleObjectResult(result, final, key) { - if (result.issues.length) { - final.issues.push(...prefixIssues(key, result.issues)); - } - final.value[key] = result.value; -} -function handleOptionalObjectResult(result, final, key, input) { - if (result.issues.length) { - if (input[key] === void 0) { - if (key in input) { - final.value[key] = void 0; - } else { - final.value[key] = result.value; - } - } else { - final.issues.push(...prefixIssues(key, result.issues)); - } - } else if (result.value === void 0) { - if (key in input) - final.value[key] = void 0; - } else { - final.value[key] = result.value; - } -} -function handleUnionResults(results, final, inst, ctx) { - for (const result of results) { - if (result.issues.length === 0) { - final.value = result.value; - return final; - } - } - final.issues.push({ - code: "invalid_union", - input: final.value, - inst, - errors: results.map((result) => result.issues.map((iss) => finalizeIssue(iss, ctx, config()))) - }); - return final; -} -function mergeValues4(a, b) { - if (a === b) { - return { valid: true, data: a }; - } - if (a instanceof Date && b instanceof Date && +a === +b) { - return { valid: true, data: a }; - } - if (isPlainObject4(a) && isPlainObject4(b)) { - const bKeys = Object.keys(b); - const sharedKeys = Object.keys(a).filter((key) => bKeys.indexOf(key) !== -1); - const newObj = { ...a, ...b }; - for (const key of sharedKeys) { - const sharedValue = mergeValues4(a[key], b[key]); - if (!sharedValue.valid) { - return { - valid: false, - mergeErrorPath: [key, ...sharedValue.mergeErrorPath] - }; - } - newObj[key] = sharedValue.data; - } - return { valid: true, data: newObj }; - } - if (Array.isArray(a) && Array.isArray(b)) { - if (a.length !== b.length) { - return { valid: false, mergeErrorPath: [] }; - } - const newArray = []; - for (let index = 0; index < a.length; index++) { - const itemA = a[index]; - const itemB = b[index]; - const sharedValue = mergeValues4(itemA, itemB); - if (!sharedValue.valid) { - return { - valid: false, - mergeErrorPath: [index, ...sharedValue.mergeErrorPath] - }; - } - newArray.push(sharedValue.data); - } - return { valid: true, data: newArray }; - } - return { valid: false, mergeErrorPath: [] }; -} -function handleIntersectionResults(result, left, right) { - if (left.issues.length) { - result.issues.push(...left.issues); - } - if (right.issues.length) { - result.issues.push(...right.issues); - } - if (aborted(result)) - return result; - const merged = mergeValues4(left.value, right.value); - if (!merged.valid) { - throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(merged.mergeErrorPath)}`); - } - result.value = merged.data; - return result; -} -function handleTupleResult(result, final, index) { - if (result.issues.length) { - final.issues.push(...prefixIssues(index, result.issues)); - } - final.value[index] = result.value; -} -function handleMapResult(keyResult, valueResult, final, key, input, inst, ctx) { - if (keyResult.issues.length) { - if (propertyKeyTypes.has(typeof key)) { - final.issues.push(...prefixIssues(key, keyResult.issues)); - } else { - final.issues.push({ - origin: "map", - code: "invalid_key", - input, - inst, - issues: keyResult.issues.map((iss) => finalizeIssue(iss, ctx, config())) - }); - } - } - if (valueResult.issues.length) { - if (propertyKeyTypes.has(typeof key)) { - final.issues.push(...prefixIssues(key, valueResult.issues)); - } else { - final.issues.push({ - origin: "map", - code: "invalid_element", - input, - inst, - key, - issues: valueResult.issues.map((iss) => finalizeIssue(iss, ctx, config())) - }); - } - } - final.value.set(keyResult.value, valueResult.value); -} -function handleSetResult(result, final) { - if (result.issues.length) { - final.issues.push(...result.issues); - } - final.value.add(result.value); -} -function handleDefaultResult(payload, def) { - if (payload.value === void 0) { - payload.value = def.defaultValue; - } - return payload; -} -function handleNonOptionalResult(payload, inst) { - if (!payload.issues.length && payload.value === void 0) { - payload.issues.push({ - code: "invalid_type", - expected: "nonoptional", - input: payload.value, - inst - }); - } - return payload; -} -function handlePipeResult(left, def, ctx) { - if (aborted(left)) { - return left; - } - return def.out._zod.run({ value: left.value, issues: left.issues }, ctx); -} -function handleReadonlyResult(payload) { - payload.value = Object.freeze(payload.value); - return payload; -} -function handleRefineResult(result, payload, input, inst) { - if (!result) { - const _iss = { - code: "custom", - input, - inst, - // incorporates params.error into issue reporting - path: [...inst._zod.def.path ?? []], - // incorporates params.error into issue reporting - continue: !inst._zod.def.abort - // params: inst._zod.def.params, - }; - if (inst._zod.def.params) - _iss.params = inst._zod.def.params; - payload.issues.push(issue(_iss)); - } -} -var $ZodType, $ZodString, $ZodStringFormat, $ZodGUID, $ZodUUID, $ZodEmail, $ZodURL, $ZodEmoji, $ZodNanoID, $ZodCUID, $ZodCUID2, $ZodULID, $ZodXID, $ZodKSUID, $ZodISODateTime, $ZodISODate, $ZodISOTime, $ZodISODuration, $ZodIPv4, $ZodIPv6, $ZodCIDRv4, $ZodCIDRv6, $ZodBase64, $ZodBase64URL, $ZodE164, $ZodJWT, $ZodCustomStringFormat, $ZodNumber, $ZodNumberFormat, $ZodBoolean, $ZodBigInt, $ZodBigIntFormat, $ZodSymbol, $ZodUndefined, $ZodNull, $ZodAny, $ZodUnknown, $ZodNever, $ZodVoid, $ZodDate, $ZodArray, $ZodObject, $ZodUnion, $ZodDiscriminatedUnion, $ZodIntersection, $ZodTuple, $ZodRecord, $ZodMap, $ZodSet, $ZodEnum, $ZodLiteral, $ZodFile, $ZodTransform, $ZodOptional, $ZodNullable, $ZodDefault, $ZodPrefault, $ZodNonOptional, $ZodSuccess, $ZodCatch, $ZodNaN, $ZodPipe, $ZodReadonly, $ZodTemplateLiteral, $ZodPromise, $ZodLazy, $ZodCustom; -var init_schemas = __esm({ - "node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/schemas.js"() { - init_checks(); - init_core(); - init_doc(); - init_parse(); - init_regexes(); - init_util2(); - init_versions(); - init_util2(); - $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => { - var _a; - inst ?? (inst = {}); - inst._zod.def = def; - inst._zod.bag = inst._zod.bag || {}; - inst._zod.version = version; - const checks = [...inst._zod.def.checks ?? []]; - if (inst._zod.traits.has("$ZodCheck")) { - checks.unshift(inst); - } - for (const ch of checks) { - for (const fn2 of ch._zod.onattach) { - fn2(inst); - } - } - if (checks.length === 0) { - (_a = inst._zod).deferred ?? (_a.deferred = []); - inst._zod.deferred?.push(() => { - inst._zod.run = inst._zod.parse; - }); - } else { - const runChecks = (payload, checks2, ctx) => { - let isAborted4 = aborted(payload); - let asyncResult; - for (const ch of checks2) { - if (ch._zod.def.when) { - const shouldRun = ch._zod.def.when(payload); - if (!shouldRun) - continue; - } else if (isAborted4) { - continue; - } - const currLen = payload.issues.length; - const _ = ch._zod.check(payload); - if (_ instanceof Promise && ctx?.async === false) { - throw new $ZodAsyncError(); - } - if (asyncResult || _ instanceof Promise) { - asyncResult = (asyncResult ?? Promise.resolve()).then(async () => { - await _; - const nextLen = payload.issues.length; - if (nextLen === currLen) - return; - if (!isAborted4) - isAborted4 = aborted(payload, currLen); - }); - } else { - const nextLen = payload.issues.length; - if (nextLen === currLen) - continue; - if (!isAborted4) - isAborted4 = aborted(payload, currLen); - } - } - if (asyncResult) { - return asyncResult.then(() => { - return payload; - }); - } - return payload; - }; - inst._zod.run = (payload, ctx) => { - const result = inst._zod.parse(payload, ctx); - if (result instanceof Promise) { - if (ctx.async === false) - throw new $ZodAsyncError(); - return result.then((result2) => runChecks(result2, checks, ctx)); - } - return runChecks(result, checks, ctx); - }; - } - inst["~standard"] = { - validate: (value2) => { - try { - const r = safeParse2(inst, value2); - return r.success ? { value: r.data } : { issues: r.error?.issues }; - } catch (_) { - return safeParseAsync(inst, value2).then((r) => r.success ? { value: r.data } : { issues: r.error?.issues }); - } - }, - vendor: "zod", - version: 1 - }; - }); - $ZodString = /* @__PURE__ */ $constructor("$ZodString", (inst, def) => { - $ZodType.init(inst, def); - inst._zod.pattern = [...inst?._zod.bag?.patterns ?? []].pop() ?? string2(inst._zod.bag); - inst._zod.parse = (payload, _) => { - if (def.coerce) - try { - payload.value = String(payload.value); - } catch (_2) { - } - if (typeof payload.value === "string") - return payload; - payload.issues.push({ - expected: "string", - code: "invalid_type", - input: payload.value, - inst - }); - return payload; - }; - }); - $ZodStringFormat = /* @__PURE__ */ $constructor("$ZodStringFormat", (inst, def) => { - $ZodCheckStringFormat.init(inst, def); - $ZodString.init(inst, def); - }); - $ZodGUID = /* @__PURE__ */ $constructor("$ZodGUID", (inst, def) => { - def.pattern ?? (def.pattern = guid); - $ZodStringFormat.init(inst, def); - }); - $ZodUUID = /* @__PURE__ */ $constructor("$ZodUUID", (inst, def) => { - if (def.version) { - const versionMap = { - v1: 1, - v2: 2, - v3: 3, - v4: 4, - v5: 5, - v6: 6, - v7: 7, - v8: 8 - }; - const v = versionMap[def.version]; - if (v === void 0) - throw new Error(`Invalid UUID version: "${def.version}"`); - def.pattern ?? (def.pattern = uuid2(v)); - } else - def.pattern ?? (def.pattern = uuid2()); - $ZodStringFormat.init(inst, def); - }); - $ZodEmail = /* @__PURE__ */ $constructor("$ZodEmail", (inst, def) => { - def.pattern ?? (def.pattern = email2); - $ZodStringFormat.init(inst, def); - }); - $ZodURL = /* @__PURE__ */ $constructor("$ZodURL", (inst, def) => { - $ZodStringFormat.init(inst, def); - inst._zod.check = (payload) => { - try { - const orig = payload.value; - const url2 = new URL(orig); - const href = url2.href; - if (def.hostname) { - def.hostname.lastIndex = 0; - if (!def.hostname.test(url2.hostname)) { - payload.issues.push({ - code: "invalid_format", - format: "url", - note: "Invalid hostname", - pattern: hostname.source, - input: payload.value, - inst, - continue: !def.abort - }); - } - } - if (def.protocol) { - def.protocol.lastIndex = 0; - if (!def.protocol.test(url2.protocol.endsWith(":") ? url2.protocol.slice(0, -1) : url2.protocol)) { - payload.issues.push({ - code: "invalid_format", - format: "url", - note: "Invalid protocol", - pattern: def.protocol.source, - input: payload.value, - inst, - continue: !def.abort - }); - } - } - if (!orig.endsWith("/") && href.endsWith("/")) { - payload.value = href.slice(0, -1); - } else { - payload.value = href; - } - return; - } catch (_) { - payload.issues.push({ - code: "invalid_format", - format: "url", - input: payload.value, - inst, - continue: !def.abort - }); - } - }; - }); - $ZodEmoji = /* @__PURE__ */ $constructor("$ZodEmoji", (inst, def) => { - def.pattern ?? (def.pattern = emoji()); - $ZodStringFormat.init(inst, def); - }); - $ZodNanoID = /* @__PURE__ */ $constructor("$ZodNanoID", (inst, def) => { - def.pattern ?? (def.pattern = nanoid); - $ZodStringFormat.init(inst, def); - }); - $ZodCUID = /* @__PURE__ */ $constructor("$ZodCUID", (inst, def) => { - def.pattern ?? (def.pattern = cuid); - $ZodStringFormat.init(inst, def); - }); - $ZodCUID2 = /* @__PURE__ */ $constructor("$ZodCUID2", (inst, def) => { - def.pattern ?? (def.pattern = cuid2); - $ZodStringFormat.init(inst, def); - }); - $ZodULID = /* @__PURE__ */ $constructor("$ZodULID", (inst, def) => { - def.pattern ?? (def.pattern = ulid); - $ZodStringFormat.init(inst, def); - }); - $ZodXID = /* @__PURE__ */ $constructor("$ZodXID", (inst, def) => { - def.pattern ?? (def.pattern = xid); - $ZodStringFormat.init(inst, def); - }); - $ZodKSUID = /* @__PURE__ */ $constructor("$ZodKSUID", (inst, def) => { - def.pattern ?? (def.pattern = ksuid); - $ZodStringFormat.init(inst, def); - }); - $ZodISODateTime = /* @__PURE__ */ $constructor("$ZodISODateTime", (inst, def) => { - def.pattern ?? (def.pattern = datetime(def)); - $ZodStringFormat.init(inst, def); - }); - $ZodISODate = /* @__PURE__ */ $constructor("$ZodISODate", (inst, def) => { - def.pattern ?? (def.pattern = date); - $ZodStringFormat.init(inst, def); - }); - $ZodISOTime = /* @__PURE__ */ $constructor("$ZodISOTime", (inst, def) => { - def.pattern ?? (def.pattern = time(def)); - $ZodStringFormat.init(inst, def); - }); - $ZodISODuration = /* @__PURE__ */ $constructor("$ZodISODuration", (inst, def) => { - def.pattern ?? (def.pattern = duration); - $ZodStringFormat.init(inst, def); - }); - $ZodIPv4 = /* @__PURE__ */ $constructor("$ZodIPv4", (inst, def) => { - def.pattern ?? (def.pattern = ipv4); - $ZodStringFormat.init(inst, def); - inst._zod.onattach.push((inst2) => { - const bag = inst2._zod.bag; - bag.format = `ipv4`; - }); - }); - $ZodIPv6 = /* @__PURE__ */ $constructor("$ZodIPv6", (inst, def) => { - def.pattern ?? (def.pattern = ipv6); - $ZodStringFormat.init(inst, def); - inst._zod.onattach.push((inst2) => { - const bag = inst2._zod.bag; - bag.format = `ipv6`; - }); - inst._zod.check = (payload) => { - try { - new URL(`http://[${payload.value}]`); - } catch { - payload.issues.push({ - code: "invalid_format", - format: "ipv6", - input: payload.value, - inst, - continue: !def.abort - }); - } - }; - }); - $ZodCIDRv4 = /* @__PURE__ */ $constructor("$ZodCIDRv4", (inst, def) => { - def.pattern ?? (def.pattern = cidrv4); - $ZodStringFormat.init(inst, def); - }); - $ZodCIDRv6 = /* @__PURE__ */ $constructor("$ZodCIDRv6", (inst, def) => { - def.pattern ?? (def.pattern = cidrv6); - $ZodStringFormat.init(inst, def); - inst._zod.check = (payload) => { - const [address, prefix] = payload.value.split("/"); - try { - if (!prefix) - throw new Error(); - const prefixNum = Number(prefix); - if (`${prefixNum}` !== prefix) - throw new Error(); - if (prefixNum < 0 || prefixNum > 128) - throw new Error(); - new URL(`http://[${address}]`); - } catch { - payload.issues.push({ - code: "invalid_format", - format: "cidrv6", - input: payload.value, - inst, - continue: !def.abort - }); - } - }; - }); - $ZodBase64 = /* @__PURE__ */ $constructor("$ZodBase64", (inst, def) => { - def.pattern ?? (def.pattern = base642); - $ZodStringFormat.init(inst, def); - inst._zod.onattach.push((inst2) => { - inst2._zod.bag.contentEncoding = "base64"; - }); - inst._zod.check = (payload) => { - if (isValidBase64(payload.value)) - return; - payload.issues.push({ - code: "invalid_format", - format: "base64", - input: payload.value, - inst, - continue: !def.abort - }); - }; - }); - $ZodBase64URL = /* @__PURE__ */ $constructor("$ZodBase64URL", (inst, def) => { - def.pattern ?? (def.pattern = base64url); - $ZodStringFormat.init(inst, def); - inst._zod.onattach.push((inst2) => { - inst2._zod.bag.contentEncoding = "base64url"; - }); - inst._zod.check = (payload) => { - if (isValidBase64URL(payload.value)) - return; - payload.issues.push({ - code: "invalid_format", - format: "base64url", - input: payload.value, - inst, - continue: !def.abort - }); - }; - }); - $ZodE164 = /* @__PURE__ */ $constructor("$ZodE164", (inst, def) => { - def.pattern ?? (def.pattern = e164); - $ZodStringFormat.init(inst, def); - }); - $ZodJWT = /* @__PURE__ */ $constructor("$ZodJWT", (inst, def) => { - $ZodStringFormat.init(inst, def); - inst._zod.check = (payload) => { - if (isValidJWT4(payload.value, def.alg)) - return; - payload.issues.push({ - code: "invalid_format", - format: "jwt", - input: payload.value, - inst, - continue: !def.abort - }); - }; - }); - $ZodCustomStringFormat = /* @__PURE__ */ $constructor("$ZodCustomStringFormat", (inst, def) => { - $ZodStringFormat.init(inst, def); - inst._zod.check = (payload) => { - if (def.fn(payload.value)) - return; - payload.issues.push({ - code: "invalid_format", - format: def.format, - input: payload.value, - inst, - continue: !def.abort - }); - }; - }); - $ZodNumber = /* @__PURE__ */ $constructor("$ZodNumber", (inst, def) => { - $ZodType.init(inst, def); - inst._zod.pattern = inst._zod.bag.pattern ?? number2; - inst._zod.parse = (payload, _ctx) => { - if (def.coerce) - try { - payload.value = Number(payload.value); - } catch (_) { - } - const input = payload.value; - if (typeof input === "number" && !Number.isNaN(input) && Number.isFinite(input)) { - return payload; - } - const received = typeof input === "number" ? Number.isNaN(input) ? "NaN" : !Number.isFinite(input) ? "Infinity" : void 0 : void 0; - payload.issues.push({ - expected: "number", - code: "invalid_type", - input, - inst, - ...received ? { received } : {} - }); - return payload; - }; - }); - $ZodNumberFormat = /* @__PURE__ */ $constructor("$ZodNumber", (inst, def) => { - $ZodCheckNumberFormat.init(inst, def); - $ZodNumber.init(inst, def); - }); - $ZodBoolean = /* @__PURE__ */ $constructor("$ZodBoolean", (inst, def) => { - $ZodType.init(inst, def); - inst._zod.pattern = boolean; - inst._zod.parse = (payload, _ctx) => { - if (def.coerce) - try { - payload.value = Boolean(payload.value); - } catch (_) { - } - const input = payload.value; - if (typeof input === "boolean") - return payload; - payload.issues.push({ - expected: "boolean", - code: "invalid_type", - input, - inst - }); - return payload; - }; - }); - $ZodBigInt = /* @__PURE__ */ $constructor("$ZodBigInt", (inst, def) => { - $ZodType.init(inst, def); - inst._zod.pattern = bigint; - inst._zod.parse = (payload, _ctx) => { - if (def.coerce) - try { - payload.value = BigInt(payload.value); - } catch (_) { - } - if (typeof payload.value === "bigint") - return payload; - payload.issues.push({ - expected: "bigint", - code: "invalid_type", - input: payload.value, - inst - }); - return payload; - }; - }); - $ZodBigIntFormat = /* @__PURE__ */ $constructor("$ZodBigInt", (inst, def) => { - $ZodCheckBigIntFormat.init(inst, def); - $ZodBigInt.init(inst, def); - }); - $ZodSymbol = /* @__PURE__ */ $constructor("$ZodSymbol", (inst, def) => { - $ZodType.init(inst, def); - inst._zod.parse = (payload, _ctx) => { - const input = payload.value; - if (typeof input === "symbol") - return payload; - payload.issues.push({ - expected: "symbol", - code: "invalid_type", - input, - inst - }); - return payload; - }; - }); - $ZodUndefined = /* @__PURE__ */ $constructor("$ZodUndefined", (inst, def) => { - $ZodType.init(inst, def); - inst._zod.pattern = _undefined; - inst._zod.values = /* @__PURE__ */ new Set([void 0]); - inst._zod.optin = "optional"; - inst._zod.optout = "optional"; - inst._zod.parse = (payload, _ctx) => { - const input = payload.value; - if (typeof input === "undefined") - return payload; - payload.issues.push({ - expected: "undefined", - code: "invalid_type", - input, - inst - }); - return payload; - }; - }); - $ZodNull = /* @__PURE__ */ $constructor("$ZodNull", (inst, def) => { - $ZodType.init(inst, def); - inst._zod.pattern = _null; - inst._zod.values = /* @__PURE__ */ new Set([null]); - inst._zod.parse = (payload, _ctx) => { - const input = payload.value; - if (input === null) - return payload; - payload.issues.push({ - expected: "null", - code: "invalid_type", - input, - inst - }); - return payload; - }; - }); - $ZodAny = /* @__PURE__ */ $constructor("$ZodAny", (inst, def) => { - $ZodType.init(inst, def); - inst._zod.parse = (payload) => payload; - }); - $ZodUnknown = /* @__PURE__ */ $constructor("$ZodUnknown", (inst, def) => { - $ZodType.init(inst, def); - inst._zod.parse = (payload) => payload; - }); - $ZodNever = /* @__PURE__ */ $constructor("$ZodNever", (inst, def) => { - $ZodType.init(inst, def); - inst._zod.parse = (payload, _ctx) => { - payload.issues.push({ - expected: "never", - code: "invalid_type", - input: payload.value, - inst - }); - return payload; - }; - }); - $ZodVoid = /* @__PURE__ */ $constructor("$ZodVoid", (inst, def) => { - $ZodType.init(inst, def); - inst._zod.parse = (payload, _ctx) => { - const input = payload.value; - if (typeof input === "undefined") - return payload; - payload.issues.push({ - expected: "void", - code: "invalid_type", - input, - inst - }); - return payload; - }; - }); - $ZodDate = /* @__PURE__ */ $constructor("$ZodDate", (inst, def) => { - $ZodType.init(inst, def); - inst._zod.parse = (payload, _ctx) => { - if (def.coerce) { - try { - payload.value = new Date(payload.value); - } catch (_err) { - } - } - const input = payload.value; - const isDate = input instanceof Date; - const isValidDate2 = isDate && !Number.isNaN(input.getTime()); - if (isValidDate2) - return payload; - payload.issues.push({ - expected: "date", - code: "invalid_type", - input, - ...isDate ? { received: "Invalid Date" } : {}, - inst - }); - return payload; - }; - }); - $ZodArray = /* @__PURE__ */ $constructor("$ZodArray", (inst, def) => { - $ZodType.init(inst, def); - inst._zod.parse = (payload, ctx) => { - const input = payload.value; - if (!Array.isArray(input)) { - payload.issues.push({ - expected: "array", - code: "invalid_type", - input, - inst - }); - return payload; - } - payload.value = Array(input.length); - const proms = []; - for (let i = 0; i < input.length; i++) { - const item = input[i]; - const result = def.element._zod.run({ - value: item, - issues: [] - }, ctx); - if (result instanceof Promise) { - proms.push(result.then((result2) => handleArrayResult(result2, payload, i))); - } else { - handleArrayResult(result, payload, i); - } - } - if (proms.length) { - return Promise.all(proms).then(() => payload); - } - return payload; - }; - }); - $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => { - $ZodType.init(inst, def); - const _normalized = cached3(() => { - const keys = Object.keys(def.shape); - for (const k of keys) { - if (!(def.shape[k] instanceof $ZodType)) { - throw new Error(`Invalid element at key "${k}": expected a Zod schema`); - } - } - const okeys = optionalKeys(def.shape); - return { - shape: def.shape, - keys, - keySet: new Set(keys), - numKeys: keys.length, - optionalKeys: new Set(okeys) - }; - }); - defineLazy(inst._zod, "propValues", () => { - const shape = def.shape; - const propValues = {}; - for (const key in shape) { - const field = shape[key]._zod; - if (field.values) { - propValues[key] ?? (propValues[key] = /* @__PURE__ */ new Set()); - for (const v of field.values) - propValues[key].add(v); - } - } - return propValues; - }); - const generateFastpass = (shape) => { - const doc = new Doc(["shape", "payload", "ctx"]); - const normalized = _normalized.value; - const parseStr = (key) => { - const k = esc(key); - return `shape[${k}]._zod.run({ value: input[${k}], issues: [] }, ctx)`; - }; - doc.write(`const input = payload.value;`); - const ids = /* @__PURE__ */ Object.create(null); - let counter = 0; - for (const key of normalized.keys) { - ids[key] = `key_${counter++}`; - } - doc.write(`const newResult = {}`); - for (const key of normalized.keys) { - if (normalized.optionalKeys.has(key)) { - const id = ids[key]; - doc.write(`const ${id} = ${parseStr(key)};`); - const k = esc(key); - doc.write(` - if (${id}.issues.length) { - if (input[${k}] === undefined) { - if (${k} in input) { - newResult[${k}] = undefined; - } - } else { - payload.issues = payload.issues.concat( - ${id}.issues.map((iss) => ({ - ...iss, - path: iss.path ? [${k}, ...iss.path] : [${k}], - })) - ); - } - } else if (${id}.value === undefined) { - if (${k} in input) newResult[${k}] = undefined; - } else { - newResult[${k}] = ${id}.value; - } - `); - } else { - const id = ids[key]; - doc.write(`const ${id} = ${parseStr(key)};`); - doc.write(` - if (${id}.issues.length) payload.issues = payload.issues.concat(${id}.issues.map(iss => ({ - ...iss, - path: iss.path ? [${esc(key)}, ...iss.path] : [${esc(key)}] - })));`); - doc.write(`newResult[${esc(key)}] = ${id}.value`); - } - } - doc.write(`payload.value = newResult;`); - doc.write(`return payload;`); - const fn2 = doc.compile(); - return (payload, ctx) => fn2(shape, payload, ctx); - }; - let fastpass; - const isObject4 = isObject3; - const jit = !globalConfig.jitless; - const allowsEval2 = allowsEval; - const fastEnabled = jit && allowsEval2.value; - const catchall = def.catchall; - let value2; - inst._zod.parse = (payload, ctx) => { - value2 ?? (value2 = _normalized.value); - const input = payload.value; - if (!isObject4(input)) { - payload.issues.push({ - expected: "object", - code: "invalid_type", - input, - inst - }); - return payload; - } - const proms = []; - if (jit && fastEnabled && ctx?.async === false && ctx.jitless !== true) { - if (!fastpass) - fastpass = generateFastpass(def.shape); - payload = fastpass(payload, ctx); - } else { - payload.value = {}; - const shape = value2.shape; - for (const key of value2.keys) { - const el = shape[key]; - const r = el._zod.run({ value: input[key], issues: [] }, ctx); - const isOptional = el._zod.optin === "optional" && el._zod.optout === "optional"; - if (r instanceof Promise) { - proms.push(r.then((r2) => isOptional ? handleOptionalObjectResult(r2, payload, key, input) : handleObjectResult(r2, payload, key))); - } else if (isOptional) { - handleOptionalObjectResult(r, payload, key, input); - } else { - handleObjectResult(r, payload, key); - } - } - } - if (!catchall) { - return proms.length ? Promise.all(proms).then(() => payload) : payload; - } - const unrecognized = []; - const keySet = value2.keySet; - const _catchall = catchall._zod; - const t = _catchall.def.type; - for (const key of Object.keys(input)) { - if (keySet.has(key)) - continue; - if (t === "never") { - unrecognized.push(key); - continue; - } - const r = _catchall.run({ value: input[key], issues: [] }, ctx); - if (r instanceof Promise) { - proms.push(r.then((r2) => handleObjectResult(r2, payload, key))); - } else { - handleObjectResult(r, payload, key); - } - } - if (unrecognized.length) { - payload.issues.push({ - code: "unrecognized_keys", - keys: unrecognized, - input, - inst - }); - } - if (!proms.length) - return payload; - return Promise.all(proms).then(() => { - return payload; - }); - }; - }); - $ZodUnion = /* @__PURE__ */ $constructor("$ZodUnion", (inst, def) => { - $ZodType.init(inst, def); - defineLazy(inst._zod, "optin", () => def.options.some((o) => o._zod.optin === "optional") ? "optional" : void 0); - defineLazy(inst._zod, "optout", () => def.options.some((o) => o._zod.optout === "optional") ? "optional" : void 0); - defineLazy(inst._zod, "values", () => { - if (def.options.every((o) => o._zod.values)) { - return new Set(def.options.flatMap((option) => Array.from(option._zod.values))); - } - return void 0; - }); - defineLazy(inst._zod, "pattern", () => { - if (def.options.every((o) => o._zod.pattern)) { - const patterns = def.options.map((o) => o._zod.pattern); - return new RegExp(`^(${patterns.map((p) => cleanRegex(p.source)).join("|")})$`); - } - return void 0; - }); - inst._zod.parse = (payload, ctx) => { - let async = false; - const results = []; - for (const option of def.options) { - const result = option._zod.run({ - value: payload.value, - issues: [] - }, ctx); - if (result instanceof Promise) { - results.push(result); - async = true; - } else { - if (result.issues.length === 0) - return result; - results.push(result); - } - } - if (!async) - return handleUnionResults(results, payload, inst, ctx); - return Promise.all(results).then((results2) => { - return handleUnionResults(results2, payload, inst, ctx); - }); - }; - }); - $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUnion", (inst, def) => { - $ZodUnion.init(inst, def); - const _super = inst._zod.parse; - defineLazy(inst._zod, "propValues", () => { - const propValues = {}; - for (const option of def.options) { - const pv = option._zod.propValues; - if (!pv || Object.keys(pv).length === 0) - throw new Error(`Invalid discriminated union option at index "${def.options.indexOf(option)}"`); - for (const [k, v] of Object.entries(pv)) { - if (!propValues[k]) - propValues[k] = /* @__PURE__ */ new Set(); - for (const val of v) { - propValues[k].add(val); - } - } - } - return propValues; - }); - const disc = cached3(() => { - const opts = def.options; - const map = /* @__PURE__ */ new Map(); - for (const o of opts) { - const values = o._zod.propValues[def.discriminator]; - if (!values || values.size === 0) - throw new Error(`Invalid discriminated union option at index "${def.options.indexOf(o)}"`); - for (const v of values) { - if (map.has(v)) { - throw new Error(`Duplicate discriminator value "${String(v)}"`); - } - map.set(v, o); - } - } - return map; - }); - inst._zod.parse = (payload, ctx) => { - const input = payload.value; - if (!isObject3(input)) { - payload.issues.push({ - code: "invalid_type", - expected: "object", - input, - inst - }); - return payload; - } - const opt = disc.value.get(input?.[def.discriminator]); - if (opt) { - return opt._zod.run(payload, ctx); - } - if (def.unionFallback) { - return _super(payload, ctx); - } - payload.issues.push({ - code: "invalid_union", - errors: [], - note: "No matching discriminator", - input, - path: [def.discriminator], - inst - }); - return payload; - }; - }); - $ZodIntersection = /* @__PURE__ */ $constructor("$ZodIntersection", (inst, def) => { - $ZodType.init(inst, def); - inst._zod.parse = (payload, ctx) => { - const input = payload.value; - const left = def.left._zod.run({ value: input, issues: [] }, ctx); - const right = def.right._zod.run({ value: input, issues: [] }, ctx); - const async = left instanceof Promise || right instanceof Promise; - if (async) { - return Promise.all([left, right]).then(([left2, right2]) => { - return handleIntersectionResults(payload, left2, right2); - }); - } - return handleIntersectionResults(payload, left, right); - }; - }); - $ZodTuple = /* @__PURE__ */ $constructor("$ZodTuple", (inst, def) => { - $ZodType.init(inst, def); - const items = def.items; - const optStart = items.length - [...items].reverse().findIndex((item) => item._zod.optin !== "optional"); - inst._zod.parse = (payload, ctx) => { - const input = payload.value; - if (!Array.isArray(input)) { - payload.issues.push({ - input, - inst, - expected: "tuple", - code: "invalid_type" - }); - return payload; - } - payload.value = []; - const proms = []; - if (!def.rest) { - const tooBig = input.length > items.length; - const tooSmall = input.length < optStart - 1; - if (tooBig || tooSmall) { - payload.issues.push({ - input, - inst, - origin: "array", - ...tooBig ? { code: "too_big", maximum: items.length } : { code: "too_small", minimum: items.length } - }); - return payload; - } - } - let i = -1; - for (const item of items) { - i++; - if (i >= input.length) { - if (i >= optStart) - continue; - } - const result = item._zod.run({ - value: input[i], - issues: [] - }, ctx); - if (result instanceof Promise) { - proms.push(result.then((result2) => handleTupleResult(result2, payload, i))); - } else { - handleTupleResult(result, payload, i); - } - } - if (def.rest) { - const rest = input.slice(items.length); - for (const el of rest) { - i++; - const result = def.rest._zod.run({ - value: el, - issues: [] - }, ctx); - if (result instanceof Promise) { - proms.push(result.then((result2) => handleTupleResult(result2, payload, i))); - } else { - handleTupleResult(result, payload, i); - } - } - } - if (proms.length) - return Promise.all(proms).then(() => payload); - return payload; - }; - }); - $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => { - $ZodType.init(inst, def); - inst._zod.parse = (payload, ctx) => { - const input = payload.value; - if (!isPlainObject4(input)) { - payload.issues.push({ - expected: "record", - code: "invalid_type", - input, - inst - }); - return payload; - } - const proms = []; - if (def.keyType._zod.values) { - const values = def.keyType._zod.values; - payload.value = {}; - for (const key of values) { - if (typeof key === "string" || typeof key === "number" || typeof key === "symbol") { - const result = def.valueType._zod.run({ value: input[key], issues: [] }, ctx); - if (result instanceof Promise) { - proms.push(result.then((result2) => { - if (result2.issues.length) { - payload.issues.push(...prefixIssues(key, result2.issues)); - } - payload.value[key] = result2.value; - })); - } else { - if (result.issues.length) { - payload.issues.push(...prefixIssues(key, result.issues)); - } - payload.value[key] = result.value; - } - } - } - let unrecognized; - for (const key in input) { - if (!values.has(key)) { - unrecognized = unrecognized ?? []; - unrecognized.push(key); - } - } - if (unrecognized && unrecognized.length > 0) { - payload.issues.push({ - code: "unrecognized_keys", - input, - inst, - keys: unrecognized - }); - } - } else { - payload.value = {}; - for (const key of Reflect.ownKeys(input)) { - if (key === "__proto__") - continue; - const keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx); - if (keyResult instanceof Promise) { - throw new Error("Async schemas not supported in object keys currently"); - } - if (keyResult.issues.length) { - payload.issues.push({ - origin: "record", - code: "invalid_key", - issues: keyResult.issues.map((iss) => finalizeIssue(iss, ctx, config())), - input: key, - path: [key], - inst - }); - payload.value[keyResult.value] = keyResult.value; - continue; - } - const result = def.valueType._zod.run({ value: input[key], issues: [] }, ctx); - if (result instanceof Promise) { - proms.push(result.then((result2) => { - if (result2.issues.length) { - payload.issues.push(...prefixIssues(key, result2.issues)); - } - payload.value[keyResult.value] = result2.value; - })); - } else { - if (result.issues.length) { - payload.issues.push(...prefixIssues(key, result.issues)); - } - payload.value[keyResult.value] = result.value; - } - } - } - if (proms.length) { - return Promise.all(proms).then(() => payload); - } - return payload; - }; - }); - $ZodMap = /* @__PURE__ */ $constructor("$ZodMap", (inst, def) => { - $ZodType.init(inst, def); - inst._zod.parse = (payload, ctx) => { - const input = payload.value; - if (!(input instanceof Map)) { - payload.issues.push({ - expected: "map", - code: "invalid_type", - input, - inst - }); - return payload; - } - const proms = []; - payload.value = /* @__PURE__ */ new Map(); - for (const [key, value2] of input) { - const keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx); - const valueResult = def.valueType._zod.run({ value: value2, issues: [] }, ctx); - if (keyResult instanceof Promise || valueResult instanceof Promise) { - proms.push(Promise.all([keyResult, valueResult]).then(([keyResult2, valueResult2]) => { - handleMapResult(keyResult2, valueResult2, payload, key, input, inst, ctx); - })); - } else { - handleMapResult(keyResult, valueResult, payload, key, input, inst, ctx); - } - } - if (proms.length) - return Promise.all(proms).then(() => payload); - return payload; - }; - }); - $ZodSet = /* @__PURE__ */ $constructor("$ZodSet", (inst, def) => { - $ZodType.init(inst, def); - inst._zod.parse = (payload, ctx) => { - const input = payload.value; - if (!(input instanceof Set)) { - payload.issues.push({ - input, - inst, - expected: "set", - code: "invalid_type" - }); - return payload; - } - const proms = []; - payload.value = /* @__PURE__ */ new Set(); - for (const item of input) { - const result = def.valueType._zod.run({ value: item, issues: [] }, ctx); - if (result instanceof Promise) { - proms.push(result.then((result2) => handleSetResult(result2, payload))); - } else - handleSetResult(result, payload); - } - if (proms.length) - return Promise.all(proms).then(() => payload); - return payload; - }; - }); - $ZodEnum = /* @__PURE__ */ $constructor("$ZodEnum", (inst, def) => { - $ZodType.init(inst, def); - const values = getEnumValues(def.entries); - inst._zod.values = new Set(values); - inst._zod.pattern = new RegExp(`^(${values.filter((k) => propertyKeyTypes.has(typeof k)).map((o) => typeof o === "string" ? escapeRegex(o) : o.toString()).join("|")})$`); - inst._zod.parse = (payload, _ctx) => { - const input = payload.value; - if (inst._zod.values.has(input)) { - return payload; - } - payload.issues.push({ - code: "invalid_value", - values, - input, - inst - }); - return payload; - }; - }); - $ZodLiteral = /* @__PURE__ */ $constructor("$ZodLiteral", (inst, def) => { - $ZodType.init(inst, def); - inst._zod.values = new Set(def.values); - inst._zod.pattern = new RegExp(`^(${def.values.map((o) => typeof o === "string" ? escapeRegex(o) : o ? o.toString() : String(o)).join("|")})$`); - inst._zod.parse = (payload, _ctx) => { - const input = payload.value; - if (inst._zod.values.has(input)) { - return payload; - } - payload.issues.push({ - code: "invalid_value", - values: def.values, - input, - inst - }); - return payload; - }; - }); - $ZodFile = /* @__PURE__ */ $constructor("$ZodFile", (inst, def) => { - $ZodType.init(inst, def); - inst._zod.parse = (payload, _ctx) => { - const input = payload.value; - if (input instanceof File) - return payload; - payload.issues.push({ - expected: "file", - code: "invalid_type", - input, - inst - }); - return payload; - }; - }); - $ZodTransform = /* @__PURE__ */ $constructor("$ZodTransform", (inst, def) => { - $ZodType.init(inst, def); - inst._zod.parse = (payload, _ctx) => { - const _out = def.transform(payload.value, payload); - if (_ctx.async) { - const output = _out instanceof Promise ? _out : Promise.resolve(_out); - return output.then((output2) => { - payload.value = output2; - return payload; - }); - } - if (_out instanceof Promise) { - throw new $ZodAsyncError(); - } - payload.value = _out; - return payload; - }; - }); - $ZodOptional = /* @__PURE__ */ $constructor("$ZodOptional", (inst, def) => { - $ZodType.init(inst, def); - inst._zod.optin = "optional"; - inst._zod.optout = "optional"; - defineLazy(inst._zod, "values", () => { - return def.innerType._zod.values ? /* @__PURE__ */ new Set([...def.innerType._zod.values, void 0]) : void 0; - }); - defineLazy(inst._zod, "pattern", () => { - const pattern = def.innerType._zod.pattern; - return pattern ? new RegExp(`^(${cleanRegex(pattern.source)})?$`) : void 0; - }); - inst._zod.parse = (payload, ctx) => { - if (def.innerType._zod.optin === "optional") { - return def.innerType._zod.run(payload, ctx); - } - if (payload.value === void 0) { - return payload; - } - return def.innerType._zod.run(payload, ctx); - }; - }); - $ZodNullable = /* @__PURE__ */ $constructor("$ZodNullable", (inst, def) => { - $ZodType.init(inst, def); - defineLazy(inst._zod, "optin", () => def.innerType._zod.optin); - defineLazy(inst._zod, "optout", () => def.innerType._zod.optout); - defineLazy(inst._zod, "pattern", () => { - const pattern = def.innerType._zod.pattern; - return pattern ? new RegExp(`^(${cleanRegex(pattern.source)}|null)$`) : void 0; - }); - defineLazy(inst._zod, "values", () => { - return def.innerType._zod.values ? /* @__PURE__ */ new Set([...def.innerType._zod.values, null]) : void 0; - }); - inst._zod.parse = (payload, ctx) => { - if (payload.value === null) - return payload; - return def.innerType._zod.run(payload, ctx); - }; - }); - $ZodDefault = /* @__PURE__ */ $constructor("$ZodDefault", (inst, def) => { - $ZodType.init(inst, def); - inst._zod.optin = "optional"; - defineLazy(inst._zod, "values", () => def.innerType._zod.values); - inst._zod.parse = (payload, ctx) => { - if (payload.value === void 0) { - payload.value = def.defaultValue; - return payload; - } - const result = def.innerType._zod.run(payload, ctx); - if (result instanceof Promise) { - return result.then((result2) => handleDefaultResult(result2, def)); - } - return handleDefaultResult(result, def); - }; - }); - $ZodPrefault = /* @__PURE__ */ $constructor("$ZodPrefault", (inst, def) => { - $ZodType.init(inst, def); - inst._zod.optin = "optional"; - defineLazy(inst._zod, "values", () => def.innerType._zod.values); - inst._zod.parse = (payload, ctx) => { - if (payload.value === void 0) { - payload.value = def.defaultValue; - } - return def.innerType._zod.run(payload, ctx); - }; - }); - $ZodNonOptional = /* @__PURE__ */ $constructor("$ZodNonOptional", (inst, def) => { - $ZodType.init(inst, def); - defineLazy(inst._zod, "values", () => { - const v = def.innerType._zod.values; - return v ? new Set([...v].filter((x) => x !== void 0)) : void 0; - }); - inst._zod.parse = (payload, ctx) => { - const result = def.innerType._zod.run(payload, ctx); - if (result instanceof Promise) { - return result.then((result2) => handleNonOptionalResult(result2, inst)); - } - return handleNonOptionalResult(result, inst); - }; - }); - $ZodSuccess = /* @__PURE__ */ $constructor("$ZodSuccess", (inst, def) => { - $ZodType.init(inst, def); - inst._zod.parse = (payload, ctx) => { - const result = def.innerType._zod.run(payload, ctx); - if (result instanceof Promise) { - return result.then((result2) => { - payload.value = result2.issues.length === 0; - return payload; - }); - } - payload.value = result.issues.length === 0; - return payload; - }; - }); - $ZodCatch = /* @__PURE__ */ $constructor("$ZodCatch", (inst, def) => { - $ZodType.init(inst, def); - inst._zod.optin = "optional"; - defineLazy(inst._zod, "optout", () => def.innerType._zod.optout); - defineLazy(inst._zod, "values", () => def.innerType._zod.values); - inst._zod.parse = (payload, ctx) => { - const result = def.innerType._zod.run(payload, ctx); - if (result instanceof Promise) { - return result.then((result2) => { - payload.value = result2.value; - if (result2.issues.length) { - payload.value = def.catchValue({ - ...payload, - error: { - issues: result2.issues.map((iss) => finalizeIssue(iss, ctx, config())) - }, - input: payload.value - }); - payload.issues = []; - } - return payload; - }); - } - payload.value = result.value; - if (result.issues.length) { - payload.value = def.catchValue({ - ...payload, - error: { - issues: result.issues.map((iss) => finalizeIssue(iss, ctx, config())) - }, - input: payload.value - }); - payload.issues = []; - } - return payload; - }; - }); - $ZodNaN = /* @__PURE__ */ $constructor("$ZodNaN", (inst, def) => { - $ZodType.init(inst, def); - inst._zod.parse = (payload, _ctx) => { - if (typeof payload.value !== "number" || !Number.isNaN(payload.value)) { - payload.issues.push({ - input: payload.value, - inst, - expected: "nan", - code: "invalid_type" - }); - return payload; - } - return payload; - }; - }); - $ZodPipe = /* @__PURE__ */ $constructor("$ZodPipe", (inst, def) => { - $ZodType.init(inst, def); - defineLazy(inst._zod, "values", () => def.in._zod.values); - defineLazy(inst._zod, "optin", () => def.in._zod.optin); - defineLazy(inst._zod, "optout", () => def.out._zod.optout); - inst._zod.parse = (payload, ctx) => { - const left = def.in._zod.run(payload, ctx); - if (left instanceof Promise) { - return left.then((left2) => handlePipeResult(left2, def, ctx)); - } - return handlePipeResult(left, def, ctx); - }; - }); - $ZodReadonly = /* @__PURE__ */ $constructor("$ZodReadonly", (inst, def) => { - $ZodType.init(inst, def); - defineLazy(inst._zod, "propValues", () => def.innerType._zod.propValues); - defineLazy(inst._zod, "values", () => def.innerType._zod.values); - defineLazy(inst._zod, "optin", () => def.innerType._zod.optin); - defineLazy(inst._zod, "optout", () => def.innerType._zod.optout); - inst._zod.parse = (payload, ctx) => { - const result = def.innerType._zod.run(payload, ctx); - if (result instanceof Promise) { - return result.then(handleReadonlyResult); - } - return handleReadonlyResult(result); - }; - }); - $ZodTemplateLiteral = /* @__PURE__ */ $constructor("$ZodTemplateLiteral", (inst, def) => { - $ZodType.init(inst, def); - const regexParts = []; - for (const part of def.parts) { - if (part instanceof $ZodType) { - if (!part._zod.pattern) { - throw new Error(`Invalid template literal part, no pattern found: ${[...part._zod.traits].shift()}`); - } - const source = part._zod.pattern instanceof RegExp ? part._zod.pattern.source : part._zod.pattern; - if (!source) - throw new Error(`Invalid template literal part: ${part._zod.traits}`); - const start = source.startsWith("^") ? 1 : 0; - const end = source.endsWith("$") ? source.length - 1 : source.length; - regexParts.push(source.slice(start, end)); - } else if (part === null || primitiveTypes.has(typeof part)) { - regexParts.push(escapeRegex(`${part}`)); - } else { - throw new Error(`Invalid template literal part: ${part}`); - } - } - inst._zod.pattern = new RegExp(`^${regexParts.join("")}$`); - inst._zod.parse = (payload, _ctx) => { - if (typeof payload.value !== "string") { - payload.issues.push({ - input: payload.value, - inst, - expected: "template_literal", - code: "invalid_type" - }); - return payload; - } - inst._zod.pattern.lastIndex = 0; - if (!inst._zod.pattern.test(payload.value)) { - payload.issues.push({ - input: payload.value, - inst, - code: "invalid_format", - format: "template_literal", - pattern: inst._zod.pattern.source - }); - return payload; - } - return payload; - }; - }); - $ZodPromise = /* @__PURE__ */ $constructor("$ZodPromise", (inst, def) => { - $ZodType.init(inst, def); - inst._zod.parse = (payload, ctx) => { - return Promise.resolve(payload.value).then((inner) => def.innerType._zod.run({ value: inner, issues: [] }, ctx)); - }; - }); - $ZodLazy = /* @__PURE__ */ $constructor("$ZodLazy", (inst, def) => { - $ZodType.init(inst, def); - defineLazy(inst._zod, "innerType", () => def.getter()); - defineLazy(inst._zod, "pattern", () => inst._zod.innerType._zod.pattern); - defineLazy(inst._zod, "propValues", () => inst._zod.innerType._zod.propValues); - defineLazy(inst._zod, "optin", () => inst._zod.innerType._zod.optin); - defineLazy(inst._zod, "optout", () => inst._zod.innerType._zod.optout); - inst._zod.parse = (payload, ctx) => { - const inner = inst._zod.innerType; - return inner._zod.run(payload, ctx); - }; - }); - $ZodCustom = /* @__PURE__ */ $constructor("$ZodCustom", (inst, def) => { - $ZodCheck.init(inst, def); - $ZodType.init(inst, def); - inst._zod.parse = (payload, _) => { - return payload; - }; - inst._zod.check = (payload) => { - const input = payload.value; - const r = def.fn(input); - if (r instanceof Promise) { - return r.then((r2) => handleRefineResult(r2, payload, input, inst)); - } - handleRefineResult(r, payload, input, inst); - return; - }; - }); - } -}); - -// node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/ar.js -function ar_default() { - return { - localeError: error2() - }; -} -var error2; -var init_ar = __esm({ - "node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/ar.js"() { - init_util2(); - error2 = () => { - const Sizable = { - string: { unit: "\u062D\u0631\u0641", verb: "\u0623\u0646 \u064A\u062D\u0648\u064A" }, - file: { unit: "\u0628\u0627\u064A\u062A", verb: "\u0623\u0646 \u064A\u062D\u0648\u064A" }, - array: { unit: "\u0639\u0646\u0635\u0631", verb: "\u0623\u0646 \u064A\u062D\u0648\u064A" }, - set: { unit: "\u0639\u0646\u0635\u0631", verb: "\u0623\u0646 \u064A\u062D\u0648\u064A" } - }; - function getSizing(origin) { - return Sizable[origin] ?? null; - } - const 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; - }; - const Nouns = { - regex: "\u0645\u062F\u062E\u0644", - email: "\u0628\u0631\u064A\u062F \u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A", - url: "\u0631\u0627\u0628\u0637", - emoji: "\u0625\u064A\u0645\u0648\u062C\u064A", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "\u062A\u0627\u0631\u064A\u062E \u0648\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO", - date: "\u062A\u0627\u0631\u064A\u062E \u0628\u0645\u0639\u064A\u0627\u0631 ISO", - time: "\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO", - duration: "\u0645\u062F\u0629 \u0628\u0645\u0639\u064A\u0627\u0631 ISO", - ipv4: "\u0639\u0646\u0648\u0627\u0646 IPv4", - ipv6: "\u0639\u0646\u0648\u0627\u0646 IPv6", - cidrv4: "\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv4", - cidrv6: "\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv6", - base64: "\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64-encoded", - base64url: "\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64url-encoded", - json_string: "\u0646\u064E\u0635 \u0639\u0644\u0649 \u0647\u064A\u0626\u0629 JSON", - e164: "\u0631\u0642\u0645 \u0647\u0627\u062A\u0641 \u0628\u0645\u0639\u064A\u0627\u0631 E.164", - jwt: "JWT", - template_literal: "\u0645\u062F\u062E\u0644" - }; - return (issue2) => { - switch (issue2.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)}`; - 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, "|")}`; - case "too_big": { - const adj = issue2.inclusive ? "<=" : "<"; - const sizing = getSizing(issue2.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()}`; - } - case "too_small": { - const adj = issue2.inclusive ? ">=" : ">"; - const sizing = getSizing(issue2.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 ${issue2.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${adj} ${issue2.minimum.toString()}`; - } - case "invalid_format": { - const _issue = issue2; - 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}"`; - 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`; - } - 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}`; - 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 ")}`; - case "invalid_key": - return `\u0645\u0639\u0631\u0641 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${issue2.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}`; - default: - return "\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644"; - } - }; - }; - } -}); - -// node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/az.js -function az_default() { - return { - localeError: error3() - }; -} -var error3; -var init_az = __esm({ - "node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/az.js"() { - init_util2(); - error3 = () => { - const Sizable = { - string: { unit: "simvol", verb: "olmal\u0131d\u0131r" }, - file: { unit: "bayt", verb: "olmal\u0131d\u0131r" }, - array: { unit: "element", verb: "olmal\u0131d\u0131r" }, - set: { unit: "element", verb: "olmal\u0131d\u0131r" } - }; - function getSizing(origin) { - return Sizable[origin] ?? null; - } - const 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; - }; - 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 (issue2) => { - switch (issue2.code) { - case "invalid_type": - return `Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${issue2.expected}, daxil olan ${parsedType4(issue2.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, "|")}`; - case "too_big": { - const adj = issue2.inclusive ? "<=" : "<"; - const sizing = getSizing(issue2.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()}`; - } - case "too_small": { - const adj = issue2.inclusive ? ">=" : ">"; - const sizing = getSizing(issue2.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()}`; - } - case "invalid_format": { - const _issue = issue2; - if (_issue.format === "starts_with") - return `Yanl\u0131\u015F m\u0259tn: "${_issue.prefix}" il\u0259 ba\u015Flamal\u0131d\u0131r`; - if (_issue.format === "ends_with") - return `Yanl\u0131\u015F m\u0259tn: "${_issue.suffix}" il\u0259 bitm\u0259lidir`; - if (_issue.format === "includes") - 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}`; - } - case "not_multiple_of": - return `Yanl\u0131\u015F \u0259d\u0259d: ${issue2.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, ", ")}`; - case "invalid_key": - return `${issue2.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`; - default: - return `Yanl\u0131\u015F d\u0259y\u0259r`; - } - }; - }; - } -}); - -// node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/be.js -function getBelarusianPlural(count, one, few, many) { - const absCount = Math.abs(count); - const lastDigit = absCount % 10; - const lastTwoDigits = absCount % 100; - if (lastTwoDigits >= 11 && lastTwoDigits <= 19) { - return many; - } - if (lastDigit === 1) { - return one; - } - if (lastDigit >= 2 && lastDigit <= 4) { - return few; - } - return many; -} -function be_default() { - return { - localeError: error4() - }; -} -var error4; -var init_be = __esm({ - "node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/be.js"() { - init_util2(); - error4 = () => { - const Sizable = { - string: { - unit: { - one: "\u0441\u0456\u043C\u0432\u0430\u043B", - few: "\u0441\u0456\u043C\u0432\u0430\u043B\u044B", - many: "\u0441\u0456\u043C\u0432\u0430\u043B\u0430\u045E" - }, - verb: "\u043C\u0435\u0446\u044C" - }, - array: { - unit: { - one: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442", - few: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B", - many: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E" - }, - verb: "\u043C\u0435\u0446\u044C" - }, - set: { - unit: { - one: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442", - few: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B", - many: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E" - }, - verb: "\u043C\u0435\u0446\u044C" - }, - file: { - unit: { - one: "\u0431\u0430\u0439\u0442", - few: "\u0431\u0430\u0439\u0442\u044B", - many: "\u0431\u0430\u0439\u0442\u0430\u045E" - }, - verb: "\u043C\u0435\u0446\u044C" - } - }; - function getSizing(origin) { - return Sizable[origin] ?? null; - } - const parsedType4 = (data) => { - const t = typeof data; - switch (t) { - case "number": { - return Number.isNaN(data) ? "NaN" : "\u043B\u0456\u043A"; - } - case "object": { - if (Array.isArray(data)) { - return "\u043C\u0430\u0441\u0456\u045E"; - } - if (data === null) { - return "null"; - } - if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) { - return data.constructor.name; - } - } - } - return t; - }; - const Nouns = { - regex: "\u0443\u0432\u043E\u0434", - email: "email \u0430\u0434\u0440\u0430\u0441", - url: "URL", - emoji: "\u044D\u043C\u043E\u0434\u0437\u0456", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "ISO \u0434\u0430\u0442\u0430 \u0456 \u0447\u0430\u0441", - date: "ISO \u0434\u0430\u0442\u0430", - time: "ISO \u0447\u0430\u0441", - duration: "ISO \u043F\u0440\u0430\u0446\u044F\u0433\u043B\u0430\u0441\u0446\u044C", - ipv4: "IPv4 \u0430\u0434\u0440\u0430\u0441", - ipv6: "IPv6 \u0430\u0434\u0440\u0430\u0441", - cidrv4: "IPv4 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D", - cidrv6: "IPv6 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D", - base64: "\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64", - base64url: "\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64url", - json_string: "JSON \u0440\u0430\u0434\u043E\u043A", - e164: "\u043D\u0443\u043C\u0430\u0440 E.164", - jwt: "JWT", - template_literal: "\u0443\u0432\u043E\u0434" - }; - return (issue2) => { - switch (issue2.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)}`; - 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, "|")}`; - case "too_big": { - const adj = issue2.inclusive ? "<=" : "<"; - const sizing = getSizing(issue2.origin); - if (sizing) { - const maxValue = Number(issue2.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 ${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()}`; - } - case "too_small": { - const adj = issue2.inclusive ? ">=" : ">"; - const sizing = getSizing(issue2.origin); - if (sizing) { - const minValue = Number(issue2.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 ${issue2.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${adj}${issue2.minimum.toString()}`; - } - case "invalid_format": { - const _issue = issue2; - 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") - 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\u0430\u043A\u0430\u043D\u0447\u0432\u0430\u0446\u0446\u0430 \u043D\u0430 "${_issue.suffix}"`; - if (_issue.format === "includes") - 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}`; - } - 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}`; - 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, ", ")}`; - case "invalid_key": - return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043A\u043B\u044E\u0447 \u0443 ${issue2.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}`; - default: - return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434`; - } - }; - }; - } -}); - -// node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/ca.js -function ca_default() { - return { - localeError: error5() - }; -} -var error5; -var init_ca = __esm({ - "node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/ca.js"() { - init_util2(); - error5 = () => { - const Sizable = { - string: { unit: "car\xE0cters", verb: "contenir" }, - file: { unit: "bytes", verb: "contenir" }, - array: { unit: "elements", verb: "contenir" }, - set: { unit: "elements", verb: "contenir" } - }; - function getSizing(origin) { - return Sizable[origin] ?? null; - } - const 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; - }; - const Nouns = { - regex: "entrada", - email: "adre\xE7a electr\xF2nica", - url: "URL", - emoji: "emoji", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "data i hora ISO", - date: "data ISO", - time: "hora ISO", - duration: "durada ISO", - ipv4: "adre\xE7a IPv4", - ipv6: "adre\xE7a IPv6", - cidrv4: "rang IPv4", - cidrv6: "rang IPv6", - base64: "cadena codificada en base64", - base64url: "cadena codificada en base64url", - json_string: "cadena JSON", - e164: "n\xFAmero E.164", - jwt: "JWT", - template_literal: "entrada" - }; - return (issue2) => { - switch (issue2.code) { - case "invalid_type": - return `Tipus inv\xE0lid: s'esperava ${issue2.expected}, s'ha rebut ${parsedType4(issue2.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 ")}`; - case "too_big": { - const adj = issue2.inclusive ? "com a m\xE0xim" : "menys de"; - const sizing = getSizing(issue2.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()}`; - } - case "too_small": { - const adj = issue2.inclusive ? "com a m\xEDnim" : "m\xE9s de"; - const sizing = getSizing(issue2.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 ${issue2.origin} fos ${adj} ${issue2.minimum.toString()}`; - } - case "invalid_format": { - const _issue = issue2; - if (_issue.format === "starts_with") { - return `Format inv\xE0lid: ha de comen\xE7ar amb "${_issue.prefix}"`; - } - if (_issue.format === "ends_with") - return `Format inv\xE0lid: ha d'acabar amb "${_issue.suffix}"`; - if (_issue.format === "includes") - 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}`; - } - case "not_multiple_of": - return `N\xFAmero inv\xE0lid: ha de ser m\xFAltiple de ${issue2.divisor}`; - case "unrecognized_keys": - return `Clau${issue2.keys.length > 1 ? "s" : ""} no reconeguda${issue2.keys.length > 1 ? "s" : ""}: ${joinValues(issue2.keys, ", ")}`; - case "invalid_key": - return `Clau inv\xE0lida a ${issue2.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}`; - default: - return `Entrada inv\xE0lida`; - } - }; - }; - } -}); - -// node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/cs.js -function cs_default() { - return { - localeError: error6() - }; -} -var error6; -var init_cs = __esm({ - "node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/cs.js"() { - init_util2(); - error6 = () => { - const Sizable = { - string: { unit: "znak\u016F", verb: "m\xEDt" }, - file: { unit: "bajt\u016F", verb: "m\xEDt" }, - array: { unit: "prvk\u016F", verb: "m\xEDt" }, - set: { unit: "prvk\u016F", verb: "m\xEDt" } - }; - function getSizing(origin) { - return Sizable[origin] ?? null; - } - const parsedType4 = (data) => { - const t = typeof data; - switch (t) { - case "number": { - return Number.isNaN(data) ? "NaN" : "\u010D\xEDslo"; - } - case "string": { - return "\u0159et\u011Bzec"; - } - case "boolean": { - return "boolean"; - } - case "bigint": { - return "bigint"; - } - case "function": { - return "funkce"; - } - case "symbol": { - return "symbol"; - } - case "undefined": { - return "undefined"; - } - case "object": { - if (Array.isArray(data)) { - return "pole"; - } - if (data === null) { - return "null"; - } - if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) { - return data.constructor.name; - } - } - } - return t; - }; - const Nouns = { - regex: "regul\xE1rn\xED v\xFDraz", - email: "e-mailov\xE1 adresa", - url: "URL", - emoji: "emoji", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "datum a \u010Das ve form\xE1tu ISO", - date: "datum ve form\xE1tu ISO", - time: "\u010Das ve form\xE1tu ISO", - duration: "doba trv\xE1n\xED ISO", - ipv4: "IPv4 adresa", - ipv6: "IPv6 adresa", - cidrv4: "rozsah IPv4", - cidrv6: "rozsah IPv6", - base64: "\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64", - base64url: "\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64url", - json_string: "\u0159et\u011Bzec ve form\xE1tu JSON", - e164: "\u010D\xEDslo E.164", - jwt: "JWT", - template_literal: "vstup" - }; - return (issue2) => { - switch (issue2.code) { - case "invalid_type": - return `Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${issue2.expected}, obdr\u017Eeno ${parsedType4(issue2.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, "|")}`; - case "too_big": { - const adj = issue2.inclusive ? "<=" : "<"; - const sizing = getSizing(issue2.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: ${issue2.origin ?? "hodnota"} mus\xED b\xFDt ${adj}${issue2.maximum.toString()}`; - } - case "too_small": { - const adj = issue2.inclusive ? ">=" : ">"; - const sizing = getSizing(issue2.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: ${issue2.origin ?? "hodnota"} mus\xED b\xFDt ${adj}${issue2.minimum.toString()}`; - } - case "invalid_format": { - const _issue = issue2; - if (_issue.format === "starts_with") - return `Neplatn\xFD \u0159et\u011Bzec: mus\xED za\u010D\xEDnat na "${_issue.prefix}"`; - if (_issue.format === "ends_with") - return `Neplatn\xFD \u0159et\u011Bzec: mus\xED kon\u010Dit na "${_issue.suffix}"`; - if (_issue.format === "includes") - 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}`; - } - case "not_multiple_of": - return `Neplatn\xE9 \u010D\xEDslo: mus\xED b\xFDt n\xE1sobkem ${issue2.divisor}`; - case "unrecognized_keys": - return `Nezn\xE1m\xE9 kl\xED\u010De: ${joinValues(issue2.keys, ", ")}`; - case "invalid_key": - return `Neplatn\xFD kl\xED\u010D v ${issue2.origin}`; - case "invalid_union": - return "Neplatn\xFD vstup"; - case "invalid_element": - return `Neplatn\xE1 hodnota v ${issue2.origin}`; - default: - return `Neplatn\xFD vstup`; - } - }; - }; - } -}); - -// node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/de.js -function de_default() { - return { - localeError: error7() - }; -} -var error7; -var init_de = __esm({ - "node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/de.js"() { - init_util2(); - error7 = () => { - const Sizable = { - string: { unit: "Zeichen", verb: "zu haben" }, - file: { unit: "Bytes", verb: "zu haben" }, - array: { unit: "Elemente", verb: "zu haben" }, - set: { unit: "Elemente", verb: "zu haben" } - }; - function getSizing(origin) { - return Sizable[origin] ?? null; - } - const parsedType4 = (data) => { - const t = typeof data; - switch (t) { - case "number": { - return Number.isNaN(data) ? "NaN" : "Zahl"; - } - 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; - }; - const Nouns = { - regex: "Eingabe", - email: "E-Mail-Adresse", - url: "URL", - emoji: "Emoji", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "ISO-Datum und -Uhrzeit", - date: "ISO-Datum", - time: "ISO-Uhrzeit", - duration: "ISO-Dauer", - ipv4: "IPv4-Adresse", - ipv6: "IPv6-Adresse", - cidrv4: "IPv4-Bereich", - cidrv6: "IPv6-Bereich", - base64: "Base64-codierter String", - base64url: "Base64-URL-codierter String", - json_string: "JSON-String", - e164: "E.164-Nummer", - jwt: "JWT", - template_literal: "Eingabe" - }; - return (issue2) => { - switch (issue2.code) { - case "invalid_type": - return `Ung\xFCltige Eingabe: erwartet ${issue2.expected}, erhalten ${parsedType4(issue2.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, "|")}`; - case "too_big": { - const adj = issue2.inclusive ? "<=" : "<"; - const sizing = getSizing(issue2.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`; - } - case "too_small": { - const adj = issue2.inclusive ? ">=" : ">"; - const sizing = getSizing(issue2.origin); - if (sizing) { - return `Zu klein: erwartet, dass ${issue2.origin} ${adj}${issue2.minimum.toString()} ${sizing.unit} hat`; - } - return `Zu klein: erwartet, dass ${issue2.origin} ${adj}${issue2.minimum.toString()} ist`; - } - case "invalid_format": { - const _issue = issue2; - if (_issue.format === "starts_with") - return `Ung\xFCltiger String: muss mit "${_issue.prefix}" beginnen`; - if (_issue.format === "ends_with") - return `Ung\xFCltiger String: muss mit "${_issue.suffix}" enden`; - if (_issue.format === "includes") - 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}`; - } - case "not_multiple_of": - return `Ung\xFCltige Zahl: muss ein Vielfaches von ${issue2.divisor} sein`; - case "unrecognized_keys": - return `${issue2.keys.length > 1 ? "Unbekannte Schl\xFCssel" : "Unbekannter Schl\xFCssel"}: ${joinValues(issue2.keys, ", ")}`; - case "invalid_key": - return `Ung\xFCltiger Schl\xFCssel in ${issue2.origin}`; - case "invalid_union": - return "Ung\xFCltige Eingabe"; - case "invalid_element": - return `Ung\xFCltiger Wert in ${issue2.origin}`; - default: - return `Ung\xFCltige Eingabe`; - } - }; - }; - } -}); - -// node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/en.js -function en_default4() { - return { - localeError: error8() - }; -} -var parsedType, error8; -var init_en2 = __esm({ - "node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/en.js"() { - init_util2(); - parsedType = (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; - }; - error8 = () => { - 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 (issue2) => { - switch (issue2.code) { - case "invalid_type": - return `Invalid input: expected ${issue2.expected}, received ${parsedType(issue2.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, "|")}`; - case "too_big": { - const adj = issue2.inclusive ? "<=" : "<"; - const sizing = getSizing(issue2.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()}`; - } - case "too_small": { - const adj = issue2.inclusive ? ">=" : ">"; - const sizing = getSizing(issue2.origin); - if (sizing) { - return `Too small: expected ${issue2.origin} to have ${adj}${issue2.minimum.toString()} ${sizing.unit}`; - } - return `Too small: expected ${issue2.origin} to be ${adj}${issue2.minimum.toString()}`; - } - case "invalid_format": { - const _issue = issue2; - 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] ?? issue2.format}`; - } - case "not_multiple_of": - return `Invalid number: must be a multiple of ${issue2.divisor}`; - case "unrecognized_keys": - return `Unrecognized key${issue2.keys.length > 1 ? "s" : ""}: ${joinValues(issue2.keys, ", ")}`; - case "invalid_key": - return `Invalid key in ${issue2.origin}`; - case "invalid_union": - return "Invalid input"; - case "invalid_element": - return `Invalid value in ${issue2.origin}`; - default: - return `Invalid input`; - } - }; - }; - } -}); - -// node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/eo.js -function eo_default() { - return { - localeError: error9() - }; -} -var parsedType2, error9; -var init_eo = __esm({ - "node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/eo.js"() { - init_util2(); - parsedType2 = (data) => { - const t = typeof data; - switch (t) { - case "number": { - return Number.isNaN(data) ? "NaN" : "nombro"; - } - case "object": { - if (Array.isArray(data)) { - return "tabelo"; - } - if (data === null) { - return "senvalora"; - } - if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) { - return data.constructor.name; - } - } - } - return t; - }; - error9 = () => { - const Sizable = { - string: { unit: "karaktrojn", verb: "havi" }, - file: { unit: "bajtojn", verb: "havi" }, - array: { unit: "elementojn", verb: "havi" }, - set: { unit: "elementojn", verb: "havi" } - }; - function getSizing(origin) { - return Sizable[origin] ?? null; - } - const Nouns = { - regex: "enigo", - email: "retadreso", - url: "URL", - emoji: "emo\u011Dio", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "ISO-datotempo", - date: "ISO-dato", - time: "ISO-tempo", - duration: "ISO-da\u016Dro", - ipv4: "IPv4-adreso", - ipv6: "IPv6-adreso", - cidrv4: "IPv4-rango", - cidrv6: "IPv6-rango", - base64: "64-ume kodita karaktraro", - base64url: "URL-64-ume kodita karaktraro", - json_string: "JSON-karaktraro", - e164: "E.164-nombro", - jwt: "JWT", - template_literal: "enigo" - }; - return (issue2) => { - switch (issue2.code) { - case "invalid_type": - return `Nevalida enigo: atendi\u011Dis ${issue2.expected}, ricevi\u011Dis ${parsedType2(issue2.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, "|")}`; - case "too_big": { - const adj = issue2.inclusive ? "<=" : "<"; - const sizing = getSizing(issue2.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()}`; - } - case "too_small": { - const adj = issue2.inclusive ? ">=" : ">"; - const sizing = getSizing(issue2.origin); - if (sizing) { - return `Tro malgranda: atendi\u011Dis ke ${issue2.origin} havu ${adj}${issue2.minimum.toString()} ${sizing.unit}`; - } - return `Tro malgranda: atendi\u011Dis ke ${issue2.origin} estu ${adj}${issue2.minimum.toString()}`; - } - case "invalid_format": { - const _issue = issue2; - if (_issue.format === "starts_with") - return `Nevalida karaktraro: devas komenci\u011Di per "${_issue.prefix}"`; - if (_issue.format === "ends_with") - return `Nevalida karaktraro: devas fini\u011Di per "${_issue.suffix}"`; - if (_issue.format === "includes") - 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}`; - } - case "not_multiple_of": - return `Nevalida nombro: devas esti oblo de ${issue2.divisor}`; - case "unrecognized_keys": - return `Nekonata${issue2.keys.length > 1 ? "j" : ""} \u015Dlosilo${issue2.keys.length > 1 ? "j" : ""}: ${joinValues(issue2.keys, ", ")}`; - case "invalid_key": - return `Nevalida \u015Dlosilo en ${issue2.origin}`; - case "invalid_union": - return "Nevalida enigo"; - case "invalid_element": - return `Nevalida valoro en ${issue2.origin}`; - default: - return `Nevalida enigo`; - } - }; - }; - } -}); - -// node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/es.js -function es_default() { - return { - localeError: error10() - }; -} -var error10; -var init_es = __esm({ - "node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/es.js"() { - init_util2(); - error10 = () => { - const Sizable = { - string: { unit: "caracteres", verb: "tener" }, - file: { unit: "bytes", verb: "tener" }, - array: { unit: "elementos", verb: "tener" }, - set: { unit: "elementos", verb: "tener" } - }; - function getSizing(origin) { - return Sizable[origin] ?? null; - } - const parsedType4 = (data) => { - const t = typeof data; - switch (t) { - case "number": { - return Number.isNaN(data) ? "NaN" : "n\xFAmero"; - } - case "object": { - if (Array.isArray(data)) { - return "arreglo"; - } - if (data === null) { - return "nulo"; - } - if (Object.getPrototypeOf(data) !== Object.prototype) { - return data.constructor.name; - } - } - } - return t; - }; - const Nouns = { - regex: "entrada", - email: "direcci\xF3n de correo electr\xF3nico", - url: "URL", - emoji: "emoji", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "fecha y hora ISO", - date: "fecha ISO", - time: "hora ISO", - duration: "duraci\xF3n ISO", - ipv4: "direcci\xF3n IPv4", - ipv6: "direcci\xF3n IPv6", - cidrv4: "rango IPv4", - cidrv6: "rango IPv6", - base64: "cadena codificada en base64", - base64url: "URL codificada en base64", - json_string: "cadena JSON", - e164: "n\xFAmero E.164", - jwt: "JWT", - template_literal: "entrada" - }; - return (issue2) => { - switch (issue2.code) { - case "invalid_type": - return `Entrada inv\xE1lida: se esperaba ${issue2.expected}, recibido ${parsedType4(issue2.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, "|")}`; - case "too_big": { - const adj = issue2.inclusive ? "<=" : "<"; - const sizing = getSizing(issue2.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()}`; - } - case "too_small": { - const adj = issue2.inclusive ? ">=" : ">"; - const sizing = getSizing(issue2.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 ${issue2.origin} fuera ${adj}${issue2.minimum.toString()}`; - } - case "invalid_format": { - const _issue = issue2; - if (_issue.format === "starts_with") - return `Cadena inv\xE1lida: debe comenzar con "${_issue.prefix}"`; - if (_issue.format === "ends_with") - return `Cadena inv\xE1lida: debe terminar en "${_issue.suffix}"`; - if (_issue.format === "includes") - 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}`; - } - case "not_multiple_of": - return `N\xFAmero inv\xE1lido: debe ser m\xFAltiplo de ${issue2.divisor}`; - case "unrecognized_keys": - return `Llave${issue2.keys.length > 1 ? "s" : ""} desconocida${issue2.keys.length > 1 ? "s" : ""}: ${joinValues(issue2.keys, ", ")}`; - case "invalid_key": - return `Llave inv\xE1lida en ${issue2.origin}`; - case "invalid_union": - return "Entrada inv\xE1lida"; - case "invalid_element": - return `Valor inv\xE1lido en ${issue2.origin}`; - default: - return `Entrada inv\xE1lida`; - } - }; - }; - } -}); - -// node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/fa.js -function fa_default() { - return { - localeError: error11() - }; -} -var error11; -var init_fa = __esm({ - "node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/fa.js"() { - init_util2(); - error11 = () => { - const Sizable = { - string: { unit: "\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631", verb: "\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F" }, - file: { unit: "\u0628\u0627\u06CC\u062A", verb: "\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F" }, - array: { unit: "\u0622\u06CC\u062A\u0645", verb: "\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F" }, - set: { unit: "\u0622\u06CC\u062A\u0645", verb: "\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F" } - }; - function getSizing(origin) { - return Sizable[origin] ?? null; - } - const parsedType4 = (data) => { - const t = typeof data; - switch (t) { - case "number": { - return Number.isNaN(data) ? "NaN" : "\u0639\u062F\u062F"; - } - case "object": { - if (Array.isArray(data)) { - return "\u0622\u0631\u0627\u06CC\u0647"; - } - if (data === null) { - return "null"; - } - if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) { - return data.constructor.name; - } - } - } - return t; - }; - const Nouns = { - regex: "\u0648\u0631\u0648\u062F\u06CC", - email: "\u0622\u062F\u0631\u0633 \u0627\u06CC\u0645\u06CC\u0644", - url: "URL", - emoji: "\u0627\u06CC\u0645\u0648\u062C\u06CC", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "\u062A\u0627\u0631\u06CC\u062E \u0648 \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648", - date: "\u062A\u0627\u0631\u06CC\u062E \u0627\u06CC\u0632\u0648", - time: "\u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648", - duration: "\u0645\u062F\u062A \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648", - ipv4: "IPv4 \u0622\u062F\u0631\u0633", - ipv6: "IPv6 \u0622\u062F\u0631\u0633", - cidrv4: "IPv4 \u062F\u0627\u0645\u0646\u0647", - cidrv6: "IPv6 \u062F\u0627\u0645\u0646\u0647", - base64: "base64-encoded \u0631\u0634\u062A\u0647", - base64url: "base64url-encoded \u0631\u0634\u062A\u0647", - json_string: "JSON \u0631\u0634\u062A\u0647", - e164: "E.164 \u0639\u062F\u062F", - jwt: "JWT", - template_literal: "\u0648\u0631\u0648\u062F\u06CC" - }; - return (issue2) => { - switch (issue2.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`; - 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`; - } - 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`; - case "too_big": { - const adj = issue2.inclusive ? "<=" : "<"; - const sizing = getSizing(issue2.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: ${issue2.origin ?? "\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${adj}${issue2.maximum.toString()} \u0628\u0627\u0634\u062F`; - } - case "too_small": { - const adj = issue2.inclusive ? ">=" : ">"; - const sizing = getSizing(issue2.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: ${issue2.origin} \u0628\u0627\u06CC\u062F ${adj}${issue2.minimum.toString()} \u0628\u0627\u0634\u062F`; - } - case "invalid_format": { - const _issue = issue2; - 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`; - } - if (_issue.format === "ends_with") { - return `\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${_issue.suffix}" \u062A\u0645\u0627\u0645 \u0634\u0648\u062F`; - } - if (_issue.format === "includes") { - return `\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0634\u0627\u0645\u0644 "${_issue.includes}" \u0628\u0627\u0634\u062F`; - } - 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`; - } - 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`; - case "unrecognized_keys": - return `\u06A9\u0644\u06CC\u062F${issue2.keys.length > 1 ? "\u0647\u0627\u06CC" : ""} \u0646\u0627\u0634\u0646\u0627\u0633: ${joinValues(issue2.keys, ", ")}`; - case "invalid_key": - return `\u06A9\u0644\u06CC\u062F \u0646\u0627\u0634\u0646\u0627\u0633 \u062F\u0631 ${issue2.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}`; - default: - return `\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631`; - } - }; - }; - } -}); - -// node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/fi.js -function fi_default() { - return { - localeError: error12() - }; -} -var error12; -var init_fi = __esm({ - "node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/fi.js"() { - init_util2(); - error12 = () => { - const Sizable = { - string: { unit: "merkki\xE4", subject: "merkkijonon" }, - file: { unit: "tavua", subject: "tiedoston" }, - array: { unit: "alkiota", subject: "listan" }, - set: { unit: "alkiota", subject: "joukon" }, - number: { unit: "", subject: "luvun" }, - bigint: { unit: "", subject: "suuren kokonaisluvun" }, - int: { unit: "", subject: "kokonaisluvun" }, - date: { unit: "", subject: "p\xE4iv\xE4m\xE4\xE4r\xE4n" } - }; - function getSizing(origin) { - return Sizable[origin] ?? null; - } - const 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; - }; - const Nouns = { - regex: "s\xE4\xE4nn\xF6llinen lauseke", - email: "s\xE4hk\xF6postiosoite", - url: "URL-osoite", - emoji: "emoji", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "ISO-aikaleima", - date: "ISO-p\xE4iv\xE4m\xE4\xE4r\xE4", - time: "ISO-aika", - duration: "ISO-kesto", - ipv4: "IPv4-osoite", - ipv6: "IPv6-osoite", - cidrv4: "IPv4-alue", - cidrv6: "IPv6-alue", - base64: "base64-koodattu merkkijono", - base64url: "base64url-koodattu merkkijono", - json_string: "JSON-merkkijono", - e164: "E.164-luku", - jwt: "JWT", - template_literal: "templaattimerkkijono" - }; - return (issue2) => { - switch (issue2.code) { - case "invalid_type": - return `Virheellinen tyyppi: odotettiin ${issue2.expected}, oli ${parsedType4(issue2.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, "|")}`; - case "too_big": { - const adj = issue2.inclusive ? "<=" : "<"; - const sizing = getSizing(issue2.origin); - if (sizing) { - return `Liian suuri: ${sizing.subject} t\xE4ytyy olla ${adj}${issue2.maximum.toString()} ${sizing.unit}`.trim(); - } - return `Liian suuri: arvon t\xE4ytyy olla ${adj}${issue2.maximum.toString()}`; - } - case "too_small": { - const adj = issue2.inclusive ? ">=" : ">"; - const sizing = getSizing(issue2.origin); - if (sizing) { - return `Liian pieni: ${sizing.subject} t\xE4ytyy olla ${adj}${issue2.minimum.toString()} ${sizing.unit}`.trim(); - } - return `Liian pieni: arvon t\xE4ytyy olla ${adj}${issue2.minimum.toString()}`; - } - case "invalid_format": { - const _issue = issue2; - if (_issue.format === "starts_with") - return `Virheellinen sy\xF6te: t\xE4ytyy alkaa "${_issue.prefix}"`; - if (_issue.format === "ends_with") - return `Virheellinen sy\xF6te: t\xE4ytyy loppua "${_issue.suffix}"`; - if (_issue.format === "includes") - return `Virheellinen sy\xF6te: t\xE4ytyy sis\xE4lt\xE4\xE4 "${_issue.includes}"`; - 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}`; - } - case "not_multiple_of": - return `Virheellinen luku: t\xE4ytyy olla luvun ${issue2.divisor} monikerta`; - case "unrecognized_keys": - return `${issue2.keys.length > 1 ? "Tuntemattomat avaimet" : "Tuntematon avain"}: ${joinValues(issue2.keys, ", ")}`; - case "invalid_key": - return "Virheellinen avain tietueessa"; - case "invalid_union": - return "Virheellinen unioni"; - case "invalid_element": - return "Virheellinen arvo joukossa"; - default: - return `Virheellinen sy\xF6te`; - } - }; - }; - } -}); - -// node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/fr.js -function fr_default() { - return { - localeError: error13() - }; -} -var error13; -var init_fr = __esm({ - "node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/fr.js"() { - init_util2(); - error13 = () => { - const Sizable = { - string: { unit: "caract\xE8res", verb: "avoir" }, - file: { unit: "octets", verb: "avoir" }, - array: { unit: "\xE9l\xE9ments", verb: "avoir" }, - set: { unit: "\xE9l\xE9ments", verb: "avoir" } - }; - function getSizing(origin) { - return Sizable[origin] ?? null; - } - const parsedType4 = (data) => { - const t = typeof data; - switch (t) { - case "number": { - return Number.isNaN(data) ? "NaN" : "nombre"; - } - case "object": { - if (Array.isArray(data)) { - return "tableau"; - } - if (data === null) { - return "null"; - } - if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) { - return data.constructor.name; - } - } - } - return t; - }; - const Nouns = { - regex: "entr\xE9e", - email: "adresse e-mail", - url: "URL", - emoji: "emoji", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "date et heure ISO", - date: "date ISO", - time: "heure ISO", - duration: "dur\xE9e ISO", - ipv4: "adresse IPv4", - ipv6: "adresse IPv6", - cidrv4: "plage IPv4", - cidrv6: "plage IPv6", - base64: "cha\xEEne encod\xE9e en base64", - base64url: "cha\xEEne encod\xE9e en base64url", - json_string: "cha\xEEne JSON", - e164: "num\xE9ro E.164", - jwt: "JWT", - template_literal: "entr\xE9e" - }; - return (issue2) => { - switch (issue2.code) { - case "invalid_type": - return `Entr\xE9e invalide : ${issue2.expected} attendu, ${parsedType4(issue2.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`; - case "too_big": { - const adj = issue2.inclusive ? "<=" : "<"; - const sizing = getSizing(issue2.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()}`; - } - case "too_small": { - const adj = issue2.inclusive ? ">=" : ">"; - const sizing = getSizing(issue2.origin); - if (sizing) { - return `Trop petit : ${issue2.origin} doit ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`; - } - return `Trop petit : ${issue2.origin} doit \xEAtre ${adj}${issue2.minimum.toString()}`; - } - case "invalid_format": { - const _issue = issue2; - if (_issue.format === "starts_with") - return `Cha\xEEne invalide : doit commencer par "${_issue.prefix}"`; - if (_issue.format === "ends_with") - return `Cha\xEEne invalide : doit se terminer par "${_issue.suffix}"`; - if (_issue.format === "includes") - 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`; - } - case "not_multiple_of": - return `Nombre invalide : doit \xEAtre un multiple de ${issue2.divisor}`; - case "unrecognized_keys": - return `Cl\xE9${issue2.keys.length > 1 ? "s" : ""} non reconnue${issue2.keys.length > 1 ? "s" : ""} : ${joinValues(issue2.keys, ", ")}`; - case "invalid_key": - return `Cl\xE9 invalide dans ${issue2.origin}`; - case "invalid_union": - return "Entr\xE9e invalide"; - case "invalid_element": - return `Valeur invalide dans ${issue2.origin}`; - default: - return `Entr\xE9e invalide`; - } - }; - }; - } -}); - -// node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/fr-CA.js -function fr_CA_default() { - return { - localeError: error14() - }; -} -var error14; -var init_fr_CA = __esm({ - "node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/fr-CA.js"() { - init_util2(); - error14 = () => { - const Sizable = { - string: { unit: "caract\xE8res", verb: "avoir" }, - file: { unit: "octets", verb: "avoir" }, - array: { unit: "\xE9l\xE9ments", verb: "avoir" }, - set: { unit: "\xE9l\xE9ments", verb: "avoir" } - }; - function getSizing(origin) { - return Sizable[origin] ?? null; - } - const 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; - }; - const Nouns = { - regex: "entr\xE9e", - email: "adresse courriel", - url: "URL", - emoji: "emoji", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "date-heure ISO", - date: "date ISO", - time: "heure ISO", - duration: "dur\xE9e ISO", - ipv4: "adresse IPv4", - ipv6: "adresse IPv6", - cidrv4: "plage IPv4", - cidrv6: "plage IPv6", - base64: "cha\xEEne encod\xE9e en base64", - base64url: "cha\xEEne encod\xE9e en base64url", - json_string: "cha\xEEne JSON", - e164: "num\xE9ro E.164", - jwt: "JWT", - template_literal: "entr\xE9e" - }; - return (issue2) => { - switch (issue2.code) { - case "invalid_type": - return `Entr\xE9e invalide : attendu ${issue2.expected}, re\xE7u ${parsedType4(issue2.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, "|")}`; - case "too_big": { - const adj = issue2.inclusive ? "\u2264" : "<"; - const sizing = getSizing(issue2.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()}`; - } - case "too_small": { - const adj = issue2.inclusive ? "\u2265" : ">"; - const sizing = getSizing(issue2.origin); - if (sizing) { - return `Trop petit : attendu que ${issue2.origin} ait ${adj}${issue2.minimum.toString()} ${sizing.unit}`; - } - return `Trop petit : attendu que ${issue2.origin} soit ${adj}${issue2.minimum.toString()}`; - } - case "invalid_format": { - const _issue = issue2; - if (_issue.format === "starts_with") { - return `Cha\xEEne invalide : doit commencer par "${_issue.prefix}"`; - } - if (_issue.format === "ends_with") - return `Cha\xEEne invalide : doit se terminer par "${_issue.suffix}"`; - if (_issue.format === "includes") - 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`; - } - case "not_multiple_of": - return `Nombre invalide : doit \xEAtre un multiple de ${issue2.divisor}`; - case "unrecognized_keys": - return `Cl\xE9${issue2.keys.length > 1 ? "s" : ""} non reconnue${issue2.keys.length > 1 ? "s" : ""} : ${joinValues(issue2.keys, ", ")}`; - case "invalid_key": - return `Cl\xE9 invalide dans ${issue2.origin}`; - case "invalid_union": - return "Entr\xE9e invalide"; - case "invalid_element": - return `Valeur invalide dans ${issue2.origin}`; - default: - return `Entr\xE9e invalide`; - } - }; - }; - } -}); - -// node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/he.js -function he_default() { - return { - localeError: error15() - }; -} -var error15; -var init_he = __esm({ - "node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/he.js"() { - init_util2(); - error15 = () => { - const Sizable = { - string: { unit: "\u05D0\u05D5\u05EA\u05D9\u05D5\u05EA", verb: "\u05DC\u05DB\u05DC\u05D5\u05DC" }, - file: { unit: "\u05D1\u05D9\u05D9\u05D8\u05D9\u05DD", verb: "\u05DC\u05DB\u05DC\u05D5\u05DC" }, - array: { unit: "\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD", verb: "\u05DC\u05DB\u05DC\u05D5\u05DC" }, - set: { unit: "\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD", verb: "\u05DC\u05DB\u05DC\u05D5\u05DC" } - }; - function getSizing(origin) { - return Sizable[origin] ?? null; - } - const 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; - }; - const Nouns = { - regex: "\u05E7\u05DC\u05D8", - email: "\u05DB\u05EA\u05D5\u05D1\u05EA \u05D0\u05D9\u05DE\u05D9\u05D9\u05DC", - url: "\u05DB\u05EA\u05D5\u05D1\u05EA \u05E8\u05E9\u05EA", - emoji: "\u05D0\u05D9\u05DE\u05D5\u05D2'\u05D9", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "\u05EA\u05D0\u05E8\u05D9\u05DA \u05D5\u05D6\u05DE\u05DF ISO", - date: "\u05EA\u05D0\u05E8\u05D9\u05DA ISO", - time: "\u05D6\u05DE\u05DF ISO", - duration: "\u05DE\u05E9\u05DA \u05D6\u05DE\u05DF ISO", - ipv4: "\u05DB\u05EA\u05D5\u05D1\u05EA IPv4", - ipv6: "\u05DB\u05EA\u05D5\u05D1\u05EA IPv6", - cidrv4: "\u05D8\u05D5\u05D5\u05D7 IPv4", - cidrv6: "\u05D8\u05D5\u05D5\u05D7 IPv6", - base64: "\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64", - base64url: "\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64 \u05DC\u05DB\u05EA\u05D5\u05D1\u05D5\u05EA \u05E8\u05E9\u05EA", - json_string: "\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA JSON", - e164: "\u05DE\u05E1\u05E4\u05E8 E.164", - jwt: "JWT", - template_literal: "\u05E7\u05DC\u05D8" - }; - return (issue2) => { - switch (issue2.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 `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, "|")}`; - case "too_big": { - const adj = issue2.inclusive ? "<=" : "<"; - const sizing = getSizing(issue2.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()}`; - } - case "too_small": { - const adj = issue2.inclusive ? ">=" : ">"; - const sizing = getSizing(issue2.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: ${issue2.origin} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${adj}${issue2.minimum.toString()}`; - } - case "invalid_format": { - const _issue = issue2; - 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") - return `\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05E0\u05D4: \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05E1\u05EA\u05D9\u05D9\u05DD \u05D1 "${_issue.suffix}"`; - if (_issue.format === "includes") - 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`; - } - 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}`; - 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, ", ")}`; - case "invalid_key": - return `\u05DE\u05E4\u05EA\u05D7 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1${issue2.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}`; - default: - return `\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF`; - } - }; - }; - } -}); - -// node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/hu.js -function hu_default() { - return { - localeError: error16() - }; -} -var error16; -var init_hu = __esm({ - "node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/hu.js"() { - init_util2(); - error16 = () => { - const Sizable = { - string: { unit: "karakter", verb: "legyen" }, - file: { unit: "byte", verb: "legyen" }, - array: { unit: "elem", verb: "legyen" }, - set: { unit: "elem", verb: "legyen" } - }; - function getSizing(origin) { - return Sizable[origin] ?? null; - } - const parsedType4 = (data) => { - const t = typeof data; - switch (t) { - case "number": { - return Number.isNaN(data) ? "NaN" : "sz\xE1m"; - } - case "object": { - if (Array.isArray(data)) { - return "t\xF6mb"; - } - if (data === null) { - return "null"; - } - if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) { - return data.constructor.name; - } - } - } - return t; - }; - const Nouns = { - regex: "bemenet", - email: "email c\xEDm", - url: "URL", - emoji: "emoji", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "ISO id\u0151b\xE9lyeg", - date: "ISO d\xE1tum", - time: "ISO id\u0151", - duration: "ISO id\u0151intervallum", - ipv4: "IPv4 c\xEDm", - ipv6: "IPv6 c\xEDm", - cidrv4: "IPv4 tartom\xE1ny", - cidrv6: "IPv6 tartom\xE1ny", - base64: "base64-k\xF3dolt string", - base64url: "base64url-k\xF3dolt string", - json_string: "JSON string", - e164: "E.164 sz\xE1m", - jwt: "JWT", - template_literal: "bemenet" - }; - return (issue2) => { - switch (issue2.code) { - case "invalid_type": - return `\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${issue2.expected}, a kapott \xE9rt\xE9k ${parsedType4(issue2.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, "|")}`; - case "too_big": { - const adj = issue2.inclusive ? "<=" : "<"; - const sizing = getSizing(issue2.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()}`; - } - case "too_small": { - const adj = issue2.inclusive ? ">=" : ">"; - const sizing = getSizing(issue2.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 ${issue2.origin} t\xFAl kicsi ${adj}${issue2.minimum.toString()}`; - } - case "invalid_format": { - const _issue = issue2; - if (_issue.format === "starts_with") - return `\xC9rv\xE9nytelen string: "${_issue.prefix}" \xE9rt\xE9kkel kell kezd\u0151dnie`; - if (_issue.format === "ends_with") - return `\xC9rv\xE9nytelen string: "${_issue.suffix}" \xE9rt\xE9kkel kell v\xE9gz\u0151dnie`; - if (_issue.format === "includes") - 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}`; - } - case "not_multiple_of": - return `\xC9rv\xE9nytelen sz\xE1m: ${issue2.divisor} t\xF6bbsz\xF6r\xF6s\xE9nek kell lennie`; - case "unrecognized_keys": - return `Ismeretlen kulcs${issue2.keys.length > 1 ? "s" : ""}: ${joinValues(issue2.keys, ", ")}`; - case "invalid_key": - return `\xC9rv\xE9nytelen kulcs ${issue2.origin}`; - case "invalid_union": - return "\xC9rv\xE9nytelen bemenet"; - case "invalid_element": - return `\xC9rv\xE9nytelen \xE9rt\xE9k: ${issue2.origin}`; - default: - return `\xC9rv\xE9nytelen bemenet`; - } - }; - }; - } -}); - -// node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/id.js -function id_default() { - return { - localeError: error17() - }; -} -var error17; -var init_id = __esm({ - "node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/id.js"() { - init_util2(); - error17 = () => { - const Sizable = { - string: { unit: "karakter", verb: "memiliki" }, - file: { unit: "byte", verb: "memiliki" }, - array: { unit: "item", verb: "memiliki" }, - set: { unit: "item", verb: "memiliki" } - }; - function getSizing(origin) { - return Sizable[origin] ?? null; - } - const 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; - }; - const Nouns = { - regex: "input", - email: "alamat email", - url: "URL", - emoji: "emoji", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "tanggal dan waktu format ISO", - date: "tanggal format ISO", - time: "jam format ISO", - duration: "durasi format ISO", - ipv4: "alamat IPv4", - ipv6: "alamat IPv6", - cidrv4: "rentang alamat IPv4", - cidrv6: "rentang alamat IPv6", - base64: "string dengan enkode base64", - base64url: "string dengan enkode base64url", - json_string: "string JSON", - e164: "angka E.164", - jwt: "JWT", - template_literal: "input" - }; - return (issue2) => { - switch (issue2.code) { - case "invalid_type": - return `Input tidak valid: diharapkan ${issue2.expected}, diterima ${parsedType4(issue2.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, "|")}`; - case "too_big": { - const adj = issue2.inclusive ? "<=" : "<"; - const sizing = getSizing(issue2.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()}`; - } - case "too_small": { - const adj = issue2.inclusive ? ">=" : ">"; - const sizing = getSizing(issue2.origin); - if (sizing) { - return `Terlalu kecil: diharapkan ${issue2.origin} memiliki ${adj}${issue2.minimum.toString()} ${sizing.unit}`; - } - return `Terlalu kecil: diharapkan ${issue2.origin} menjadi ${adj}${issue2.minimum.toString()}`; - } - case "invalid_format": { - const _issue = issue2; - if (_issue.format === "starts_with") - return `String tidak valid: harus dimulai dengan "${_issue.prefix}"`; - if (_issue.format === "ends_with") - return `String tidak valid: harus berakhir dengan "${_issue.suffix}"`; - if (_issue.format === "includes") - 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`; - } - case "not_multiple_of": - return `Angka tidak valid: harus kelipatan dari ${issue2.divisor}`; - case "unrecognized_keys": - return `Kunci tidak dikenali ${issue2.keys.length > 1 ? "s" : ""}: ${joinValues(issue2.keys, ", ")}`; - case "invalid_key": - return `Kunci tidak valid di ${issue2.origin}`; - case "invalid_union": - return "Input tidak valid"; - case "invalid_element": - return `Nilai tidak valid di ${issue2.origin}`; - default: - return `Input tidak valid`; - } - }; - }; - } -}); - -// node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/it.js -function it_default() { - return { - localeError: error18() - }; -} -var error18; -var init_it = __esm({ - "node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/it.js"() { - init_util2(); - error18 = () => { - const Sizable = { - string: { unit: "caratteri", verb: "avere" }, - file: { unit: "byte", verb: "avere" }, - array: { unit: "elementi", verb: "avere" }, - set: { unit: "elementi", verb: "avere" } - }; - function getSizing(origin) { - return Sizable[origin] ?? null; - } - const parsedType4 = (data) => { - const t = typeof data; - switch (t) { - case "number": { - return Number.isNaN(data) ? "NaN" : "numero"; - } - case "object": { - if (Array.isArray(data)) { - return "vettore"; - } - if (data === null) { - return "null"; - } - if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) { - return data.constructor.name; - } - } - } - return t; - }; - const Nouns = { - regex: "input", - email: "indirizzo email", - url: "URL", - emoji: "emoji", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "data e ora ISO", - date: "data ISO", - time: "ora ISO", - duration: "durata ISO", - ipv4: "indirizzo IPv4", - ipv6: "indirizzo IPv6", - cidrv4: "intervallo IPv4", - cidrv6: "intervallo IPv6", - base64: "stringa codificata in base64", - base64url: "URL codificata in base64", - json_string: "stringa JSON", - e164: "numero E.164", - jwt: "JWT", - template_literal: "input" - }; - return (issue2) => { - switch (issue2.code) { - case "invalid_type": - return `Input non valido: atteso ${issue2.expected}, ricevuto ${parsedType4(issue2.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, "|")}`; - case "too_big": { - const adj = issue2.inclusive ? "<=" : "<"; - const sizing = getSizing(issue2.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()}`; - } - case "too_small": { - const adj = issue2.inclusive ? ">=" : ">"; - const sizing = getSizing(issue2.origin); - if (sizing) { - return `Troppo piccolo: ${issue2.origin} deve avere ${adj}${issue2.minimum.toString()} ${sizing.unit}`; - } - return `Troppo piccolo: ${issue2.origin} deve essere ${adj}${issue2.minimum.toString()}`; - } - case "invalid_format": { - const _issue = issue2; - if (_issue.format === "starts_with") - return `Stringa non valida: deve iniziare con "${_issue.prefix}"`; - if (_issue.format === "ends_with") - return `Stringa non valida: deve terminare con "${_issue.suffix}"`; - if (_issue.format === "includes") - 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}`; - } - case "not_multiple_of": - return `Numero non valido: deve essere un multiplo di ${issue2.divisor}`; - case "unrecognized_keys": - return `Chiav${issue2.keys.length > 1 ? "i" : "e"} non riconosciut${issue2.keys.length > 1 ? "e" : "a"}: ${joinValues(issue2.keys, ", ")}`; - case "invalid_key": - return `Chiave non valida in ${issue2.origin}`; - case "invalid_union": - return "Input non valido"; - case "invalid_element": - return `Valore non valido in ${issue2.origin}`; - default: - return `Input non valido`; - } - }; - }; - } -}); - -// node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/ja.js -function ja_default() { - return { - localeError: error19() - }; -} -var error19; -var init_ja = __esm({ - "node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/ja.js"() { - init_util2(); - error19 = () => { - const Sizable = { - string: { unit: "\u6587\u5B57", verb: "\u3067\u3042\u308B" }, - file: { unit: "\u30D0\u30A4\u30C8", verb: "\u3067\u3042\u308B" }, - array: { unit: "\u8981\u7D20", verb: "\u3067\u3042\u308B" }, - set: { unit: "\u8981\u7D20", verb: "\u3067\u3042\u308B" } - }; - function getSizing(origin) { - return Sizable[origin] ?? null; - } - const parsedType4 = (data) => { - const t = typeof data; - switch (t) { - case "number": { - return Number.isNaN(data) ? "NaN" : "\u6570\u5024"; - } - case "object": { - if (Array.isArray(data)) { - return "\u914D\u5217"; - } - if (data === null) { - return "null"; - } - if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) { - return data.constructor.name; - } - } - } - return t; - }; - const Nouns = { - regex: "\u5165\u529B\u5024", - email: "\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9", - url: "URL", - emoji: "\u7D75\u6587\u5B57", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "ISO\u65E5\u6642", - date: "ISO\u65E5\u4ED8", - time: "ISO\u6642\u523B", - duration: "ISO\u671F\u9593", - ipv4: "IPv4\u30A2\u30C9\u30EC\u30B9", - ipv6: "IPv6\u30A2\u30C9\u30EC\u30B9", - cidrv4: "IPv4\u7BC4\u56F2", - cidrv6: "IPv6\u7BC4\u56F2", - base64: "base64\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217", - base64url: "base64url\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217", - json_string: "JSON\u6587\u5B57\u5217", - e164: "E.164\u756A\u53F7", - jwt: "JWT", - template_literal: "\u5165\u529B\u5024" - }; - return (issue2) => { - switch (issue2.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`; - 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`; - case "too_big": { - const adj = issue2.inclusive ? "\u4EE5\u4E0B\u3067\u3042\u308B" : "\u3088\u308A\u5C0F\u3055\u3044"; - const sizing = getSizing(issue2.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`; - } - case "too_small": { - const adj = issue2.inclusive ? "\u4EE5\u4E0A\u3067\u3042\u308B" : "\u3088\u308A\u5927\u304D\u3044"; - const sizing = getSizing(issue2.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`; - } - case "invalid_format": { - const _issue = issue2; - 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") - return `\u7121\u52B9\u306A\u6587\u5B57\u5217: "${_issue.suffix}"\u3067\u7D42\u308F\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; - if (_issue.format === "includes") - 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}`; - } - 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`; - case "unrecognized_keys": - return `\u8A8D\u8B58\u3055\u308C\u3066\u3044\u306A\u3044\u30AD\u30FC${issue2.keys.length > 1 ? "\u7FA4" : ""}: ${joinValues(issue2.keys, "\u3001")}`; - case "invalid_key": - return `${issue2.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`; - default: - return `\u7121\u52B9\u306A\u5165\u529B`; - } - }; - }; - } -}); - -// node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/kh.js -function kh_default() { - return { - localeError: error20() - }; -} -var error20; -var init_kh = __esm({ - "node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/kh.js"() { - init_util2(); - error20 = () => { - const Sizable = { - string: { unit: "\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A", verb: "\u1782\u17BD\u179A\u1798\u17B6\u1793" }, - file: { unit: "\u1794\u17C3", verb: "\u1782\u17BD\u179A\u1798\u17B6\u1793" }, - array: { unit: "\u1792\u17B6\u178F\u17BB", verb: "\u1782\u17BD\u179A\u1798\u17B6\u1793" }, - set: { unit: "\u1792\u17B6\u178F\u17BB", verb: "\u1782\u17BD\u179A\u1798\u17B6\u1793" } - }; - function getSizing(origin) { - return Sizable[origin] ?? null; - } - const parsedType4 = (data) => { - const t = typeof data; - switch (t) { - case "number": { - return Number.isNaN(data) ? "\u1798\u17B7\u1793\u1798\u17C2\u1793\u1787\u17B6\u179B\u17C1\u1781 (NaN)" : "\u179B\u17C1\u1781"; - } - case "object": { - if (Array.isArray(data)) { - return "\u17A2\u17B6\u179A\u17C1 (Array)"; - } - if (data === null) { - return "\u1782\u17D2\u1798\u17B6\u1793\u178F\u1798\u17D2\u179B\u17C3 (null)"; - } - if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) { - return data.constructor.name; - } - } - } - return t; - }; - const Nouns = { - regex: "\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B", - email: "\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793\u17A2\u17CA\u17B8\u1798\u17C2\u179B", - url: "URL", - emoji: "\u179F\u1789\u17D2\u1789\u17B6\u17A2\u17B6\u179A\u1798\u17D2\u1798\u178E\u17CD", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 \u1793\u17B7\u1784\u1798\u17C9\u17C4\u1784 ISO", - date: "\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 ISO", - time: "\u1798\u17C9\u17C4\u1784 ISO", - duration: "\u179A\u1799\u17C8\u1796\u17C1\u179B ISO", - ipv4: "\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4", - ipv6: "\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6", - cidrv4: "\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4", - cidrv6: "\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6", - base64: "\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64", - base64url: "\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64url", - json_string: "\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A JSON", - e164: "\u179B\u17C1\u1781 E.164", - jwt: "JWT", - template_literal: "\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B" - }; - return (issue2) => { - switch (issue2.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)}`; - 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, "|")}`; - case "too_big": { - const adj = issue2.inclusive ? "<=" : "<"; - const sizing = getSizing(issue2.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()}`; - } - case "too_small": { - const adj = issue2.inclusive ? ">=" : ">"; - const sizing = getSizing(issue2.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 ${issue2.origin} ${adj} ${issue2.minimum.toString()}`; - } - case "invalid_format": { - const _issue = issue2; - 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}"`; - } - if (_issue.format === "ends_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\u1794\u1789\u17D2\u1785\u1794\u17CB\u178A\u17C4\u1799 "${_issue.suffix}"`; - if (_issue.format === "includes") - 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}`; - } - 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}`; - case "unrecognized_keys": - return `\u179A\u1780\u1783\u17BE\u1789\u179F\u17C4\u1798\u17B7\u1793\u179F\u17D2\u1782\u17B6\u179B\u17CB\u17D6 ${joinValues(issue2.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}`; - 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}`; - default: - return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C`; - } - }; - }; - } -}); - -// node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/ko.js -function ko_default() { - return { - localeError: error21() - }; -} -var error21; -var init_ko = __esm({ - "node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/ko.js"() { - init_util2(); - error21 = () => { - const Sizable = { - string: { unit: "\uBB38\uC790", verb: "to have" }, - file: { unit: "\uBC14\uC774\uD2B8", verb: "to have" }, - array: { unit: "\uAC1C", verb: "to have" }, - set: { unit: "\uAC1C", verb: "to have" } - }; - function getSizing(origin) { - return Sizable[origin] ?? null; - } - const 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; - }; - const Nouns = { - regex: "\uC785\uB825", - email: "\uC774\uBA54\uC77C \uC8FC\uC18C", - url: "URL", - emoji: "\uC774\uBAA8\uC9C0", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "ISO \uB0A0\uC9DC\uC2DC\uAC04", - date: "ISO \uB0A0\uC9DC", - time: "ISO \uC2DC\uAC04", - duration: "ISO \uAE30\uAC04", - ipv4: "IPv4 \uC8FC\uC18C", - ipv6: "IPv6 \uC8FC\uC18C", - cidrv4: "IPv4 \uBC94\uC704", - cidrv6: "IPv6 \uBC94\uC704", - base64: "base64 \uC778\uCF54\uB529 \uBB38\uC790\uC5F4", - base64url: "base64url \uC778\uCF54\uB529 \uBB38\uC790\uC5F4", - json_string: "JSON \uBB38\uC790\uC5F4", - e164: "E.164 \uBC88\uD638", - jwt: "JWT", - template_literal: "\uC785\uB825" - }; - return (issue2) => { - switch (issue2.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`; - 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`; - case "too_big": { - const adj = issue2.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 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}`; - } - case "too_small": { - const adj = issue2.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 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 `${issue2.origin ?? "\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${issue2.minimum.toString()} ${adj}${suffix2}`; - } - case "invalid_format": { - const _issue = issue2; - if (_issue.format === "starts_with") { - return `\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${_issue.prefix}"(\uC73C)\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4`; - } - if (_issue.format === "ends_with") - return `\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${_issue.suffix}"(\uC73C)\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4`; - if (_issue.format === "includes") - 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}`; - } - case "not_multiple_of": - return `\uC798\uBABB\uB41C \uC22B\uC790: ${issue2.divisor}\uC758 \uBC30\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4`; - case "unrecognized_keys": - return `\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uD0A4: ${joinValues(issue2.keys, ", ")}`; - case "invalid_key": - return `\uC798\uBABB\uB41C \uD0A4: ${issue2.origin}`; - case "invalid_union": - return `\uC798\uBABB\uB41C \uC785\uB825`; - case "invalid_element": - return `\uC798\uBABB\uB41C \uAC12: ${issue2.origin}`; - default: - return `\uC798\uBABB\uB41C \uC785\uB825`; - } - }; - }; - } -}); - -// node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/mk.js -function mk_default() { - return { - localeError: error22() - }; -} -var error22; -var init_mk = __esm({ - "node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/mk.js"() { - init_util2(); - error22 = () => { - const Sizable = { - string: { unit: "\u0437\u043D\u0430\u0446\u0438", verb: "\u0434\u0430 \u0438\u043C\u0430\u0430\u0442" }, - file: { unit: "\u0431\u0430\u0458\u0442\u0438", verb: "\u0434\u0430 \u0438\u043C\u0430\u0430\u0442" }, - array: { unit: "\u0441\u0442\u0430\u0432\u043A\u0438", verb: "\u0434\u0430 \u0438\u043C\u0430\u0430\u0442" }, - set: { unit: "\u0441\u0442\u0430\u0432\u043A\u0438", verb: "\u0434\u0430 \u0438\u043C\u0430\u0430\u0442" } - }; - function getSizing(origin) { - return Sizable[origin] ?? null; - } - const parsedType4 = (data) => { - const t = typeof data; - switch (t) { - case "number": { - return Number.isNaN(data) ? "NaN" : "\u0431\u0440\u043E\u0458"; - } - case "object": { - if (Array.isArray(data)) { - return "\u043D\u0438\u0437\u0430"; - } - if (data === null) { - return "null"; - } - if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) { - return data.constructor.name; - } - } - } - return t; - }; - const Nouns = { - regex: "\u0432\u043D\u0435\u0441", - email: "\u0430\u0434\u0440\u0435\u0441\u0430 \u043D\u0430 \u0435-\u043F\u043E\u0448\u0442\u0430", - url: "URL", - emoji: "\u0435\u043C\u043E\u045F\u0438", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "ISO \u0434\u0430\u0442\u0443\u043C \u0438 \u0432\u0440\u0435\u043C\u0435", - date: "ISO \u0434\u0430\u0442\u0443\u043C", - time: "ISO \u0432\u0440\u0435\u043C\u0435", - duration: "ISO \u0432\u0440\u0435\u043C\u0435\u0442\u0440\u0430\u0435\u045A\u0435", - ipv4: "IPv4 \u0430\u0434\u0440\u0435\u0441\u0430", - ipv6: "IPv6 \u0430\u0434\u0440\u0435\u0441\u0430", - cidrv4: "IPv4 \u043E\u043F\u0441\u0435\u0433", - cidrv6: "IPv6 \u043E\u043F\u0441\u0435\u0433", - base64: "base64-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430", - base64url: "base64url-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430", - json_string: "JSON \u043D\u0438\u0437\u0430", - e164: "E.164 \u0431\u0440\u043E\u0458", - jwt: "JWT", - template_literal: "\u0432\u043D\u0435\u0441" - }; - return (issue2) => { - switch (issue2.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 `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, "|")}`; - case "too_big": { - const adj = issue2.inclusive ? "<=" : "<"; - const sizing = getSizing(issue2.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()}`; - } - case "too_small": { - const adj = issue2.inclusive ? ">=" : ">"; - const sizing = getSizing(issue2.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 ${issue2.origin} \u0434\u0430 \u0431\u0438\u0434\u0435 ${adj}${issue2.minimum.toString()}`; - } - case "invalid_format": { - const _issue = issue2; - 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}"`; - } - if (_issue.format === "ends_with") - return `\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u0432\u0440\u0448\u0443\u0432\u0430 \u0441\u043E "${_issue.suffix}"`; - if (_issue.format === "includes") - 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}`; - } - 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}`; - 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, ", ")}`; - case "invalid_key": - return `\u0413\u0440\u0435\u0448\u0435\u043D \u043A\u043B\u0443\u0447 \u0432\u043E ${issue2.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}`; - default: - return `\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441`; - } - }; - }; - } -}); - -// node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/ms.js -function ms_default() { - return { - localeError: error23() - }; -} -var error23; -var init_ms = __esm({ - "node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/ms.js"() { - init_util2(); - error23 = () => { - const Sizable = { - string: { unit: "aksara", verb: "mempunyai" }, - file: { unit: "bait", verb: "mempunyai" }, - array: { unit: "elemen", verb: "mempunyai" }, - set: { unit: "elemen", verb: "mempunyai" } - }; - function getSizing(origin) { - return Sizable[origin] ?? null; - } - const parsedType4 = (data) => { - const t = typeof data; - switch (t) { - case "number": { - return Number.isNaN(data) ? "NaN" : "nombor"; - } - 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; - }; - const Nouns = { - regex: "input", - email: "alamat e-mel", - url: "URL", - emoji: "emoji", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "tarikh masa ISO", - date: "tarikh ISO", - time: "masa ISO", - duration: "tempoh ISO", - ipv4: "alamat IPv4", - ipv6: "alamat IPv6", - cidrv4: "julat IPv4", - cidrv6: "julat IPv6", - base64: "string dikodkan base64", - base64url: "string dikodkan base64url", - json_string: "string JSON", - e164: "nombor E.164", - jwt: "JWT", - template_literal: "input" - }; - return (issue2) => { - switch (issue2.code) { - case "invalid_type": - return `Input tidak sah: dijangka ${issue2.expected}, diterima ${parsedType4(issue2.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, "|")}`; - case "too_big": { - const adj = issue2.inclusive ? "<=" : "<"; - const sizing = getSizing(issue2.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()}`; - } - case "too_small": { - const adj = issue2.inclusive ? ">=" : ">"; - const sizing = getSizing(issue2.origin); - if (sizing) { - return `Terlalu kecil: dijangka ${issue2.origin} ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`; - } - return `Terlalu kecil: dijangka ${issue2.origin} adalah ${adj}${issue2.minimum.toString()}`; - } - case "invalid_format": { - const _issue = issue2; - if (_issue.format === "starts_with") - return `String tidak sah: mesti bermula dengan "${_issue.prefix}"`; - if (_issue.format === "ends_with") - return `String tidak sah: mesti berakhir dengan "${_issue.suffix}"`; - if (_issue.format === "includes") - 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`; - } - case "not_multiple_of": - return `Nombor tidak sah: perlu gandaan ${issue2.divisor}`; - case "unrecognized_keys": - return `Kunci tidak dikenali: ${joinValues(issue2.keys, ", ")}`; - case "invalid_key": - return `Kunci tidak sah dalam ${issue2.origin}`; - case "invalid_union": - return "Input tidak sah"; - case "invalid_element": - return `Nilai tidak sah dalam ${issue2.origin}`; - default: - return `Input tidak sah`; - } - }; - }; - } -}); - -// node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/nl.js -function nl_default() { - return { - localeError: error24() - }; -} -var error24; -var init_nl = __esm({ - "node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/nl.js"() { - init_util2(); - error24 = () => { - const Sizable = { - string: { unit: "tekens" }, - file: { unit: "bytes" }, - array: { unit: "elementen" }, - set: { unit: "elementen" } - }; - function getSizing(origin) { - return Sizable[origin] ?? null; - } - const parsedType4 = (data) => { - const t = typeof data; - switch (t) { - case "number": { - return Number.isNaN(data) ? "NaN" : "getal"; - } - 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; - }; - const Nouns = { - regex: "invoer", - email: "emailadres", - url: "URL", - emoji: "emoji", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "ISO datum en tijd", - date: "ISO datum", - time: "ISO tijd", - duration: "ISO duur", - ipv4: "IPv4-adres", - ipv6: "IPv6-adres", - cidrv4: "IPv4-bereik", - cidrv6: "IPv6-bereik", - base64: "base64-gecodeerde tekst", - base64url: "base64 URL-gecodeerde tekst", - json_string: "JSON string", - e164: "E.164-nummer", - jwt: "JWT", - template_literal: "invoer" - }; - return (issue2) => { - switch (issue2.code) { - case "invalid_type": - return `Ongeldige invoer: verwacht ${issue2.expected}, ontving ${parsedType4(issue2.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, "|")}`; - case "too_big": { - const adj = issue2.inclusive ? "<=" : "<"; - const sizing = getSizing(issue2.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`; - } - case "too_small": { - const adj = issue2.inclusive ? ">=" : ">"; - const sizing = getSizing(issue2.origin); - if (sizing) { - return `Te kort: verwacht dat ${issue2.origin} ${adj}${issue2.minimum.toString()} ${sizing.unit} bevat`; - } - return `Te kort: verwacht dat ${issue2.origin} ${adj}${issue2.minimum.toString()} is`; - } - case "invalid_format": { - const _issue = issue2; - if (_issue.format === "starts_with") { - return `Ongeldige tekst: moet met "${_issue.prefix}" beginnen`; - } - if (_issue.format === "ends_with") - return `Ongeldige tekst: moet op "${_issue.suffix}" eindigen`; - if (_issue.format === "includes") - 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}`; - } - case "not_multiple_of": - return `Ongeldig getal: moet een veelvoud van ${issue2.divisor} zijn`; - case "unrecognized_keys": - return `Onbekende key${issue2.keys.length > 1 ? "s" : ""}: ${joinValues(issue2.keys, ", ")}`; - case "invalid_key": - return `Ongeldige key in ${issue2.origin}`; - case "invalid_union": - return "Ongeldige invoer"; - case "invalid_element": - return `Ongeldige waarde in ${issue2.origin}`; - default: - return `Ongeldige invoer`; - } - }; - }; - } -}); - -// node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/no.js -function no_default() { - return { - localeError: error25() - }; -} -var error25; -var init_no = __esm({ - "node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/no.js"() { - init_util2(); - error25 = () => { - const Sizable = { - string: { unit: "tegn", verb: "\xE5 ha" }, - file: { unit: "bytes", verb: "\xE5 ha" }, - array: { unit: "elementer", verb: "\xE5 inneholde" }, - set: { unit: "elementer", verb: "\xE5 inneholde" } - }; - function getSizing(origin) { - return Sizable[origin] ?? null; - } - const parsedType4 = (data) => { - const t = typeof data; - switch (t) { - case "number": { - return Number.isNaN(data) ? "NaN" : "tall"; - } - case "object": { - if (Array.isArray(data)) { - return "liste"; - } - if (data === null) { - return "null"; - } - if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) { - return data.constructor.name; - } - } - } - return t; - }; - const Nouns = { - regex: "input", - email: "e-postadresse", - url: "URL", - emoji: "emoji", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "ISO dato- og klokkeslett", - date: "ISO-dato", - time: "ISO-klokkeslett", - duration: "ISO-varighet", - ipv4: "IPv4-omr\xE5de", - ipv6: "IPv6-omr\xE5de", - cidrv4: "IPv4-spekter", - cidrv6: "IPv6-spekter", - base64: "base64-enkodet streng", - base64url: "base64url-enkodet streng", - json_string: "JSON-streng", - e164: "E.164-nummer", - jwt: "JWT", - template_literal: "input" - }; - return (issue2) => { - switch (issue2.code) { - case "invalid_type": - return `Ugyldig input: forventet ${issue2.expected}, fikk ${parsedType4(issue2.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, "|")}`; - case "too_big": { - const adj = issue2.inclusive ? "<=" : "<"; - const sizing = getSizing(issue2.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()}`; - } - case "too_small": { - const adj = issue2.inclusive ? ">=" : ">"; - const sizing = getSizing(issue2.origin); - if (sizing) { - return `For lite(n): forventet ${issue2.origin} til \xE5 ha ${adj}${issue2.minimum.toString()} ${sizing.unit}`; - } - return `For lite(n): forventet ${issue2.origin} til \xE5 ha ${adj}${issue2.minimum.toString()}`; - } - case "invalid_format": { - const _issue = issue2; - if (_issue.format === "starts_with") - return `Ugyldig streng: m\xE5 starte med "${_issue.prefix}"`; - if (_issue.format === "ends_with") - return `Ugyldig streng: m\xE5 ende med "${_issue.suffix}"`; - if (_issue.format === "includes") - 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}`; - } - case "not_multiple_of": - return `Ugyldig tall: m\xE5 v\xE6re et multiplum av ${issue2.divisor}`; - case "unrecognized_keys": - return `${issue2.keys.length > 1 ? "Ukjente n\xF8kler" : "Ukjent n\xF8kkel"}: ${joinValues(issue2.keys, ", ")}`; - case "invalid_key": - return `Ugyldig n\xF8kkel i ${issue2.origin}`; - case "invalid_union": - return "Ugyldig input"; - case "invalid_element": - return `Ugyldig verdi i ${issue2.origin}`; - default: - return `Ugyldig input`; - } - }; - }; - } -}); - -// node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/ota.js -function ota_default() { - return { - localeError: error26() - }; -} -var error26; -var init_ota = __esm({ - "node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/ota.js"() { - init_util2(); - error26 = () => { - const Sizable = { - string: { unit: "harf", verb: "olmal\u0131d\u0131r" }, - file: { unit: "bayt", verb: "olmal\u0131d\u0131r" }, - array: { unit: "unsur", verb: "olmal\u0131d\u0131r" }, - set: { unit: "unsur", verb: "olmal\u0131d\u0131r" } - }; - function getSizing(origin) { - return Sizable[origin] ?? null; - } - const parsedType4 = (data) => { - const t = typeof data; - switch (t) { - case "number": { - return Number.isNaN(data) ? "NaN" : "numara"; - } - case "object": { - if (Array.isArray(data)) { - return "saf"; - } - if (data === null) { - return "gayb"; - } - if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) { - return data.constructor.name; - } - } - } - return t; - }; - const Nouns = { - regex: "giren", - email: "epostag\xE2h", - url: "URL", - emoji: "emoji", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "ISO heng\xE2m\u0131", - date: "ISO tarihi", - time: "ISO zaman\u0131", - duration: "ISO m\xFCddeti", - ipv4: "IPv4 ni\u015F\xE2n\u0131", - ipv6: "IPv6 ni\u015F\xE2n\u0131", - cidrv4: "IPv4 menzili", - cidrv6: "IPv6 menzili", - base64: "base64-\u015Fifreli metin", - base64url: "base64url-\u015Fifreli metin", - json_string: "JSON metin", - e164: "E.164 say\u0131s\u0131", - jwt: "JWT", - template_literal: "giren" - }; - return (issue2) => { - switch (issue2.code) { - case "invalid_type": - return `F\xE2sit giren: umulan ${issue2.expected}, al\u0131nan ${parsedType4(issue2.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, "|")}`; - case "too_big": { - const adj = issue2.inclusive ? "<=" : "<"; - const sizing = getSizing(issue2.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.`; - } - case "too_small": { - const adj = issue2.inclusive ? ">=" : ">"; - const sizing = getSizing(issue2.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: ${issue2.origin}, ${adj}${issue2.minimum.toString()} olmal\u0131yd\u0131.`; - } - case "invalid_format": { - const _issue = issue2; - if (_issue.format === "starts_with") - return `F\xE2sit metin: "${_issue.prefix}" ile ba\u015Flamal\u0131.`; - if (_issue.format === "ends_with") - return `F\xE2sit metin: "${_issue.suffix}" ile bitmeli.`; - if (_issue.format === "includes") - 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}`; - } - case "not_multiple_of": - return `F\xE2sit say\u0131: ${issue2.divisor} kat\u0131 olmal\u0131yd\u0131.`; - case "unrecognized_keys": - return `Tan\u0131nmayan anahtar ${issue2.keys.length > 1 ? "s" : ""}: ${joinValues(issue2.keys, ", ")}`; - case "invalid_key": - return `${issue2.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.`; - default: - return `K\u0131ymet tan\u0131namad\u0131.`; - } - }; - }; - } -}); - -// node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/ps.js -function ps_default() { - return { - localeError: error27() - }; -} -var error27; -var init_ps = __esm({ - "node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/ps.js"() { - init_util2(); - error27 = () => { - const Sizable = { - string: { unit: "\u062A\u0648\u06A9\u064A", verb: "\u0648\u0644\u0631\u064A" }, - file: { unit: "\u0628\u0627\u06CC\u067C\u0633", verb: "\u0648\u0644\u0631\u064A" }, - array: { unit: "\u062A\u0648\u06A9\u064A", verb: "\u0648\u0644\u0631\u064A" }, - set: { unit: "\u062A\u0648\u06A9\u064A", verb: "\u0648\u0644\u0631\u064A" } - }; - function getSizing(origin) { - return Sizable[origin] ?? null; - } - const parsedType4 = (data) => { - const t = typeof data; - switch (t) { - case "number": { - return Number.isNaN(data) ? "NaN" : "\u0639\u062F\u062F"; - } - case "object": { - if (Array.isArray(data)) { - return "\u0627\u0631\u06D0"; - } - if (data === null) { - return "null"; - } - if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) { - return data.constructor.name; - } - } - } - return t; - }; - const Nouns = { - regex: "\u0648\u0631\u0648\u062F\u064A", - email: "\u0628\u0631\u06CC\u069A\u0646\u0627\u0644\u06CC\u06A9", - url: "\u06CC\u0648 \u0622\u0631 \u0627\u0644", - emoji: "\u0627\u06CC\u0645\u0648\u062C\u064A", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "\u0646\u06CC\u067C\u0647 \u0627\u0648 \u0648\u062E\u062A", - date: "\u0646\u06D0\u067C\u0647", - time: "\u0648\u062E\u062A", - duration: "\u0645\u0648\u062F\u0647", - ipv4: "\u062F IPv4 \u067E\u062A\u0647", - ipv6: "\u062F IPv6 \u067E\u062A\u0647", - cidrv4: "\u062F IPv4 \u0633\u0627\u062D\u0647", - cidrv6: "\u062F IPv6 \u0633\u0627\u062D\u0647", - base64: "base64-encoded \u0645\u062A\u0646", - base64url: "base64url-encoded \u0645\u062A\u0646", - json_string: "JSON \u0645\u062A\u0646", - e164: "\u062F E.164 \u0634\u0645\u06D0\u0631\u0647", - jwt: "JWT", - template_literal: "\u0648\u0631\u0648\u062F\u064A" - }; - return (issue2) => { - switch (issue2.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`; - 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`; - } - 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`; - case "too_big": { - const adj = issue2.inclusive ? "<=" : "<"; - const sizing = getSizing(issue2.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: ${issue2.origin ?? "\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${adj}${issue2.maximum.toString()} \u0648\u064A`; - } - case "too_small": { - const adj = issue2.inclusive ? ">=" : ">"; - const sizing = getSizing(issue2.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: ${issue2.origin} \u0628\u0627\u06CC\u062F ${adj}${issue2.minimum.toString()} \u0648\u064A`; - } - case "invalid_format": { - const _issue = issue2; - 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`; - } - if (_issue.format === "ends_with") { - return `\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${_issue.suffix}" \u0633\u0631\u0647 \u067E\u0627\u06CC \u062A\u0647 \u0648\u0631\u0633\u064A\u0696\u064A`; - } - if (_issue.format === "includes") { - return `\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F "${_issue.includes}" \u0648\u0644\u0631\u064A`; - } - 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`; - } - 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`; - 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, ", ")}`; - case "invalid_key": - return `\u0646\u0627\u0633\u0645 \u06A9\u0644\u06CC\u0689 \u067E\u0647 ${issue2.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`; - default: - return `\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A`; - } - }; - }; - } -}); - -// node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/pl.js -function pl_default() { - return { - localeError: error28() - }; -} -var error28; -var init_pl = __esm({ - "node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/pl.js"() { - init_util2(); - error28 = () => { - const Sizable = { - string: { unit: "znak\xF3w", verb: "mie\u0107" }, - file: { unit: "bajt\xF3w", verb: "mie\u0107" }, - array: { unit: "element\xF3w", verb: "mie\u0107" }, - set: { unit: "element\xF3w", verb: "mie\u0107" } - }; - function getSizing(origin) { - return Sizable[origin] ?? null; - } - const parsedType4 = (data) => { - const t = typeof data; - switch (t) { - case "number": { - return Number.isNaN(data) ? "NaN" : "liczba"; - } - case "object": { - if (Array.isArray(data)) { - return "tablica"; - } - if (data === null) { - return "null"; - } - if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) { - return data.constructor.name; - } - } - } - return t; - }; - const Nouns = { - regex: "wyra\u017Cenie", - email: "adres email", - url: "URL", - emoji: "emoji", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "data i godzina w formacie ISO", - date: "data w formacie ISO", - time: "godzina w formacie ISO", - duration: "czas trwania ISO", - ipv4: "adres IPv4", - ipv6: "adres IPv6", - cidrv4: "zakres IPv4", - cidrv6: "zakres IPv6", - base64: "ci\u0105g znak\xF3w zakodowany w formacie base64", - base64url: "ci\u0105g znak\xF3w zakodowany w formacie base64url", - json_string: "ci\u0105g znak\xF3w w formacie JSON", - e164: "liczba E.164", - jwt: "JWT", - template_literal: "wej\u015Bcie" - }; - return (issue2) => { - switch (issue2.code) { - case "invalid_type": - return `Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${issue2.expected}, otrzymano ${parsedType4(issue2.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, "|")}`; - case "too_big": { - const adj = issue2.inclusive ? "<=" : "<"; - const sizing = getSizing(issue2.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 `Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${issue2.origin ?? "warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${adj}${issue2.maximum.toString()}`; - } - case "too_small": { - const adj = issue2.inclusive ? ">=" : ">"; - const sizing = getSizing(issue2.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 `Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${issue2.origin ?? "warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${adj}${issue2.minimum.toString()}`; - } - case "invalid_format": { - const _issue = issue2; - 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") - return `Nieprawid\u0142owy ci\u0105g znak\xF3w: musi ko\u0144czy\u0107 si\u0119 na "${_issue.suffix}"`; - if (_issue.format === "includes") - 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}`; - } - case "not_multiple_of": - return `Nieprawid\u0142owa liczba: musi by\u0107 wielokrotno\u015Bci\u0105 ${issue2.divisor}`; - case "unrecognized_keys": - return `Nierozpoznane klucze${issue2.keys.length > 1 ? "s" : ""}: ${joinValues(issue2.keys, ", ")}`; - case "invalid_key": - return `Nieprawid\u0142owy klucz w ${issue2.origin}`; - case "invalid_union": - return "Nieprawid\u0142owe dane wej\u015Bciowe"; - case "invalid_element": - return `Nieprawid\u0142owa warto\u015B\u0107 w ${issue2.origin}`; - default: - return `Nieprawid\u0142owe dane wej\u015Bciowe`; - } - }; - }; - } -}); - -// node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/pt.js -function pt_default() { - return { - localeError: error29() - }; -} -var error29; -var init_pt = __esm({ - "node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/pt.js"() { - init_util2(); - error29 = () => { - const Sizable = { - string: { unit: "caracteres", verb: "ter" }, - file: { unit: "bytes", verb: "ter" }, - array: { unit: "itens", verb: "ter" }, - set: { unit: "itens", verb: "ter" } - }; - function getSizing(origin) { - return Sizable[origin] ?? null; - } - const parsedType4 = (data) => { - const t = typeof data; - switch (t) { - case "number": { - return Number.isNaN(data) ? "NaN" : "n\xFAmero"; - } - case "object": { - if (Array.isArray(data)) { - return "array"; - } - if (data === null) { - return "nulo"; - } - if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) { - return data.constructor.name; - } - } - } - return t; - }; - const Nouns = { - regex: "padr\xE3o", - email: "endere\xE7o de e-mail", - url: "URL", - emoji: "emoji", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "data e hora ISO", - date: "data ISO", - time: "hora ISO", - duration: "dura\xE7\xE3o ISO", - ipv4: "endere\xE7o IPv4", - ipv6: "endere\xE7o IPv6", - cidrv4: "faixa de IPv4", - cidrv6: "faixa de IPv6", - base64: "texto codificado em base64", - base64url: "URL codificada em base64", - json_string: "texto JSON", - e164: "n\xFAmero E.164", - jwt: "JWT", - template_literal: "entrada" - }; - return (issue2) => { - switch (issue2.code) { - case "invalid_type": - return `Tipo inv\xE1lido: esperado ${issue2.expected}, recebido ${parsedType4(issue2.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, "|")}`; - case "too_big": { - const adj = issue2.inclusive ? "<=" : "<"; - const sizing = getSizing(issue2.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()}`; - } - case "too_small": { - const adj = issue2.inclusive ? ">=" : ">"; - const sizing = getSizing(issue2.origin); - if (sizing) { - return `Muito pequeno: esperado que ${issue2.origin} tivesse ${adj}${issue2.minimum.toString()} ${sizing.unit}`; - } - return `Muito pequeno: esperado que ${issue2.origin} fosse ${adj}${issue2.minimum.toString()}`; - } - case "invalid_format": { - const _issue = issue2; - if (_issue.format === "starts_with") - return `Texto inv\xE1lido: deve come\xE7ar com "${_issue.prefix}"`; - if (_issue.format === "ends_with") - return `Texto inv\xE1lido: deve terminar com "${_issue.suffix}"`; - if (_issue.format === "includes") - 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`; - } - case "not_multiple_of": - return `N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${issue2.divisor}`; - case "unrecognized_keys": - return `Chave${issue2.keys.length > 1 ? "s" : ""} desconhecida${issue2.keys.length > 1 ? "s" : ""}: ${joinValues(issue2.keys, ", ")}`; - case "invalid_key": - return `Chave inv\xE1lida em ${issue2.origin}`; - case "invalid_union": - return "Entrada inv\xE1lida"; - case "invalid_element": - return `Valor inv\xE1lido em ${issue2.origin}`; - default: - return `Campo inv\xE1lido`; - } - }; - }; - } -}); - -// node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/ru.js -function getRussianPlural(count, one, few, many) { - const absCount = Math.abs(count); - const lastDigit = absCount % 10; - const lastTwoDigits = absCount % 100; - if (lastTwoDigits >= 11 && lastTwoDigits <= 19) { - return many; - } - if (lastDigit === 1) { - return one; - } - if (lastDigit >= 2 && lastDigit <= 4) { - return few; - } - return many; -} -function ru_default() { - return { - localeError: error30() - }; -} -var error30; -var init_ru = __esm({ - "node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/ru.js"() { - init_util2(); - error30 = () => { - const Sizable = { - string: { - unit: { - one: "\u0441\u0438\u043C\u0432\u043E\u043B", - few: "\u0441\u0438\u043C\u0432\u043E\u043B\u0430", - many: "\u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432" - }, - verb: "\u0438\u043C\u0435\u0442\u044C" - }, - file: { - unit: { - one: "\u0431\u0430\u0439\u0442", - few: "\u0431\u0430\u0439\u0442\u0430", - many: "\u0431\u0430\u0439\u0442" - }, - verb: "\u0438\u043C\u0435\u0442\u044C" - }, - array: { - unit: { - one: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442", - few: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430", - many: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432" - }, - verb: "\u0438\u043C\u0435\u0442\u044C" - }, - set: { - unit: { - one: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442", - few: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430", - many: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432" - }, - verb: "\u0438\u043C\u0435\u0442\u044C" - } - }; - function getSizing(origin) { - return Sizable[origin] ?? null; - } - const parsedType4 = (data) => { - const t = typeof data; - switch (t) { - case "number": { - return Number.isNaN(data) ? "NaN" : "\u0447\u0438\u0441\u043B\u043E"; - } - case "object": { - if (Array.isArray(data)) { - return "\u043C\u0430\u0441\u0441\u0438\u0432"; - } - if (data === null) { - return "null"; - } - if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) { - return data.constructor.name; - } - } - } - return t; - }; - const Nouns = { - regex: "\u0432\u0432\u043E\u0434", - email: "email \u0430\u0434\u0440\u0435\u0441", - url: "URL", - emoji: "\u044D\u043C\u043E\u0434\u0437\u0438", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "ISO \u0434\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043C\u044F", - date: "ISO \u0434\u0430\u0442\u0430", - time: "ISO \u0432\u0440\u0435\u043C\u044F", - duration: "ISO \u0434\u043B\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C", - ipv4: "IPv4 \u0430\u0434\u0440\u0435\u0441", - ipv6: "IPv6 \u0430\u0434\u0440\u0435\u0441", - cidrv4: "IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D", - cidrv6: "IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D", - base64: "\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64", - base64url: "\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64url", - json_string: "JSON \u0441\u0442\u0440\u043E\u043A\u0430", - e164: "\u043D\u043E\u043C\u0435\u0440 E.164", - jwt: "JWT", - template_literal: "\u0432\u0432\u043E\u0434" - }; - return (issue2) => { - switch (issue2.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)}`; - 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, "|")}`; - case "too_big": { - const adj = issue2.inclusive ? "<=" : "<"; - const sizing = getSizing(issue2.origin); - if (sizing) { - const maxValue = Number(issue2.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 ${issue2.origin ?? "\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 ${adj}${issue2.maximum.toString()}`; - } - case "too_small": { - const adj = issue2.inclusive ? ">=" : ">"; - const sizing = getSizing(issue2.origin); - if (sizing) { - const minValue = Number(issue2.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 ${issue2.origin} \u0431\u0443\u0434\u0435\u0442 ${adj}${issue2.minimum.toString()}`; - } - case "invalid_format": { - const _issue = issue2; - 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") - return `\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0437\u0430\u043A\u0430\u043D\u0447\u0438\u0432\u0430\u0442\u044C\u0441\u044F \u043D\u0430 "${_issue.suffix}"`; - if (_issue.format === "includes") - 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}`; - } - 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}`; - 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, ", ")}`; - case "invalid_key": - return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u0432 ${issue2.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}`; - default: - return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435`; - } - }; - }; - } -}); - -// node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/sl.js -function sl_default() { - return { - localeError: error31() - }; -} -var error31; -var init_sl = __esm({ - "node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/sl.js"() { - init_util2(); - error31 = () => { - const Sizable = { - string: { unit: "znakov", verb: "imeti" }, - file: { unit: "bajtov", verb: "imeti" }, - array: { unit: "elementov", verb: "imeti" }, - set: { unit: "elementov", verb: "imeti" } - }; - function getSizing(origin) { - return Sizable[origin] ?? null; - } - const parsedType4 = (data) => { - const t = typeof data; - switch (t) { - case "number": { - return Number.isNaN(data) ? "NaN" : "\u0161tevilo"; - } - case "object": { - if (Array.isArray(data)) { - return "tabela"; - } - if (data === null) { - return "null"; - } - if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) { - return data.constructor.name; - } - } - } - return t; - }; - const Nouns = { - regex: "vnos", - email: "e-po\u0161tni naslov", - url: "URL", - emoji: "emoji", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "ISO datum in \u010Das", - date: "ISO datum", - time: "ISO \u010Das", - duration: "ISO trajanje", - ipv4: "IPv4 naslov", - ipv6: "IPv6 naslov", - cidrv4: "obseg IPv4", - cidrv6: "obseg IPv6", - base64: "base64 kodiran niz", - base64url: "base64url kodiran niz", - json_string: "JSON niz", - e164: "E.164 \u0161tevilka", - jwt: "JWT", - template_literal: "vnos" - }; - return (issue2) => { - switch (issue2.code) { - case "invalid_type": - return `Neveljaven vnos: pri\u010Dakovano ${issue2.expected}, prejeto ${parsedType4(issue2.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, "|")}`; - case "too_big": { - const adj = issue2.inclusive ? "<=" : "<"; - const sizing = getSizing(issue2.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()}`; - } - case "too_small": { - const adj = issue2.inclusive ? ">=" : ">"; - const sizing = getSizing(issue2.origin); - if (sizing) { - return `Premajhno: pri\u010Dakovano, da bo ${issue2.origin} imelo ${adj}${issue2.minimum.toString()} ${sizing.unit}`; - } - return `Premajhno: pri\u010Dakovano, da bo ${issue2.origin} ${adj}${issue2.minimum.toString()}`; - } - case "invalid_format": { - const _issue = issue2; - if (_issue.format === "starts_with") { - return `Neveljaven niz: mora se za\u010Deti z "${_issue.prefix}"`; - } - if (_issue.format === "ends_with") - return `Neveljaven niz: mora se kon\u010Dati z "${_issue.suffix}"`; - if (_issue.format === "includes") - 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}`; - } - case "not_multiple_of": - return `Neveljavno \u0161tevilo: mora biti ve\u010Dkratnik ${issue2.divisor}`; - case "unrecognized_keys": - return `Neprepoznan${issue2.keys.length > 1 ? "i klju\u010Di" : " klju\u010D"}: ${joinValues(issue2.keys, ", ")}`; - case "invalid_key": - return `Neveljaven klju\u010D v ${issue2.origin}`; - case "invalid_union": - return "Neveljaven vnos"; - case "invalid_element": - return `Neveljavna vrednost v ${issue2.origin}`; - default: - return "Neveljaven vnos"; - } - }; - }; - } -}); - -// node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/sv.js -function sv_default() { - return { - localeError: error32() - }; -} -var error32; -var init_sv = __esm({ - "node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/sv.js"() { - init_util2(); - error32 = () => { - const Sizable = { - string: { unit: "tecken", verb: "att ha" }, - file: { unit: "bytes", verb: "att ha" }, - array: { unit: "objekt", verb: "att inneh\xE5lla" }, - set: { unit: "objekt", verb: "att inneh\xE5lla" } - }; - function getSizing(origin) { - return Sizable[origin] ?? null; - } - const parsedType4 = (data) => { - const t = typeof data; - switch (t) { - case "number": { - return Number.isNaN(data) ? "NaN" : "antal"; - } - case "object": { - if (Array.isArray(data)) { - return "lista"; - } - if (data === null) { - return "null"; - } - if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) { - return data.constructor.name; - } - } - } - return t; - }; - const Nouns = { - regex: "regulj\xE4rt uttryck", - email: "e-postadress", - url: "URL", - emoji: "emoji", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "ISO-datum och tid", - date: "ISO-datum", - time: "ISO-tid", - duration: "ISO-varaktighet", - ipv4: "IPv4-intervall", - ipv6: "IPv6-intervall", - cidrv4: "IPv4-spektrum", - cidrv6: "IPv6-spektrum", - base64: "base64-kodad str\xE4ng", - base64url: "base64url-kodad str\xE4ng", - json_string: "JSON-str\xE4ng", - e164: "E.164-nummer", - jwt: "JWT", - template_literal: "mall-literal" - }; - return (issue2) => { - switch (issue2.code) { - case "invalid_type": - return `Ogiltig inmatning: f\xF6rv\xE4ntat ${issue2.expected}, fick ${parsedType4(issue2.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, "|")}`; - case "too_big": { - const adj = issue2.inclusive ? "<=" : "<"; - const sizing = getSizing(issue2.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\xE4ntat ${issue2.origin ?? "v\xE4rdet"} att ha ${adj}${issue2.maximum.toString()}`; - } - case "too_small": { - const adj = issue2.inclusive ? ">=" : ">"; - const sizing = getSizing(issue2.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 ${issue2.origin ?? "v\xE4rdet"} att ha ${adj}${issue2.minimum.toString()}`; - } - case "invalid_format": { - const _issue = issue2; - if (_issue.format === "starts_with") { - return `Ogiltig str\xE4ng: m\xE5ste b\xF6rja med "${_issue.prefix}"`; - } - if (_issue.format === "ends_with") - return `Ogiltig str\xE4ng: m\xE5ste sluta med "${_issue.suffix}"`; - if (_issue.format === "includes") - 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}`; - } - case "not_multiple_of": - return `Ogiltigt tal: m\xE5ste vara en multipel av ${issue2.divisor}`; - case "unrecognized_keys": - return `${issue2.keys.length > 1 ? "Ok\xE4nda nycklar" : "Ok\xE4nd nyckel"}: ${joinValues(issue2.keys, ", ")}`; - case "invalid_key": - return `Ogiltig nyckel i ${issue2.origin ?? "v\xE4rdet"}`; - case "invalid_union": - return "Ogiltig input"; - case "invalid_element": - return `Ogiltigt v\xE4rde i ${issue2.origin ?? "v\xE4rdet"}`; - default: - return `Ogiltig input`; - } - }; - }; - } -}); - -// node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/ta.js -function ta_default() { - return { - localeError: error33() - }; -} -var error33; -var init_ta = __esm({ - "node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/ta.js"() { - init_util2(); - 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" }, - file: { unit: "\u0BAA\u0BC8\u0B9F\u0BCD\u0B9F\u0BC1\u0B95\u0BB3\u0BCD", verb: "\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD" }, - array: { unit: "\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD", verb: "\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD" }, - set: { unit: "\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD", verb: "\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD" } - }; - function getSizing(origin) { - return Sizable[origin] ?? null; - } - const parsedType4 = (data) => { - const t = typeof data; - switch (t) { - case "number": { - return Number.isNaN(data) ? "\u0B8E\u0BA3\u0BCD \u0B85\u0BB2\u0BCD\u0BB2\u0BBE\u0BA4\u0BA4\u0BC1" : "\u0B8E\u0BA3\u0BCD"; - } - case "object": { - if (Array.isArray(data)) { - return "\u0B85\u0BA3\u0BBF"; - } - if (data === null) { - return "\u0BB5\u0BC6\u0BB1\u0BC1\u0BAE\u0BC8"; - } - if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) { - return data.constructor.name; - } - } - } - return t; - }; - const Nouns = { - regex: "\u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1", - email: "\u0BAE\u0BBF\u0BA9\u0BCD\u0BA9\u0B9E\u0BCD\u0B9A\u0BB2\u0BCD \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF", - 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 \u0BA4\u0BC7\u0BA4\u0BBF \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD", - date: "ISO \u0BA4\u0BC7\u0BA4\u0BBF", - time: "ISO \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD", - duration: "ISO \u0B95\u0BBE\u0BB2 \u0B85\u0BB3\u0BB5\u0BC1", - ipv4: "IPv4 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF", - ipv6: "IPv6 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF", - cidrv4: "IPv4 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1", - cidrv6: "IPv6 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1", - base64: "base64-encoded \u0B9A\u0BB0\u0BAE\u0BCD", - base64url: "base64url-encoded \u0B9A\u0BB0\u0BAE\u0BCD", - json_string: "JSON \u0B9A\u0BB0\u0BAE\u0BCD", - e164: "E.164 \u0B8E\u0BA3\u0BCD", - jwt: "JWT", - template_literal: "input" - }; - return (issue2) => { - switch (issue2.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)}`; - 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`; - case "too_big": { - const adj = issue2.inclusive ? "<=" : "<"; - const sizing = getSizing(issue2.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 ${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`; - } - case "too_small": { - const adj = issue2.inclusive ? ">=" : ">"; - const sizing = getSizing(issue2.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 ${issue2.origin} ${adj}${issue2.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; - } - case "invalid_format": { - const _issue = issue2; - 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") - return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${_issue.suffix}" \u0B87\u0BB2\u0BCD \u0BAE\u0BC1\u0B9F\u0BBF\u0BB5\u0B9F\u0BC8\u0BAF \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; - if (_issue.format === "includes") - 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}`; - } - 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`; - 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, ", ")}`; - case "invalid_key": - return `${issue2.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`; - default: - return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1`; - } - }; - }; - } -}); - -// node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/th.js -function th_default() { - return { - localeError: error34() - }; -} -var error34; -var init_th = __esm({ - "node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/th.js"() { - init_util2(); - error34 = () => { - const Sizable = { - string: { unit: "\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" }, - file: { unit: "\u0E44\u0E1A\u0E15\u0E4C", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" }, - array: { unit: "\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" }, - set: { unit: "\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" } - }; - function getSizing(origin) { - return Sizable[origin] ?? null; - } - const parsedType4 = (data) => { - const t = typeof data; - switch (t) { - case "number": { - return Number.isNaN(data) ? "\u0E44\u0E21\u0E48\u0E43\u0E0A\u0E48\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02 (NaN)" : "\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02"; - } - case "object": { - if (Array.isArray(data)) { - return "\u0E2D\u0E32\u0E23\u0E4C\u0E40\u0E23\u0E22\u0E4C (Array)"; - } - if (data === null) { - return "\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E48\u0E32 (null)"; - } - if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) { - return data.constructor.name; - } - } - } - return t; - }; - const Nouns = { - regex: "\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19", - email: "\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E2D\u0E35\u0E40\u0E21\u0E25", - url: "URL", - emoji: "\u0E2D\u0E34\u0E42\u0E21\u0E08\u0E34", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO", - date: "\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E41\u0E1A\u0E1A ISO", - time: "\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO", - duration: "\u0E0A\u0E48\u0E27\u0E07\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO", - ipv4: "\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv4", - ipv6: "\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv6", - cidrv4: "\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv4", - cidrv6: "\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv6", - base64: "\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64", - base64url: "\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64 \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A URL", - json_string: "\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A JSON", - e164: "\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28 (E.164)", - 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) { - 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)}`; - 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, "|")}`; - 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); - 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()}`; - } - 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); - 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: ${issue2.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${adj} ${issue2.minimum.toString()}`; - } - case "invalid_format": { - const _issue = issue2; - 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}"`; - } - if (_issue.format === "ends_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\u0E25\u0E07\u0E17\u0E49\u0E32\u0E22\u0E14\u0E49\u0E27\u0E22 "${_issue.suffix}"`; - if (_issue.format === "includes") - 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}`; - } - 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`; - 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, ", ")}`; - case "invalid_key": - return `\u0E04\u0E35\u0E22\u0E4C\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${issue2.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}`; - default: - return `\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07`; - } - }; - }; - } -}); - -// node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/tr.js -function tr_default() { - return { - localeError: error35() - }; -} -var parsedType3, error35; -var init_tr = __esm({ - "node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/tr.js"() { - init_util2(); - parsedType3 = (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; - }; - error35 = () => { - const Sizable = { - string: { unit: "karakter", verb: "olmal\u0131" }, - file: { unit: "bayt", verb: "olmal\u0131" }, - array: { unit: "\xF6\u011Fe", verb: "olmal\u0131" }, - set: { unit: "\xF6\u011Fe", verb: "olmal\u0131" } - }; - function getSizing(origin) { - return Sizable[origin] ?? null; - } - const Nouns = { - regex: "girdi", - email: "e-posta adresi", - url: "URL", - emoji: "emoji", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "ISO tarih ve saat", - date: "ISO tarih", - time: "ISO saat", - duration: "ISO s\xFCre", - ipv4: "IPv4 adresi", - ipv6: "IPv6 adresi", - cidrv4: "IPv4 aral\u0131\u011F\u0131", - cidrv6: "IPv6 aral\u0131\u011F\u0131", - base64: "base64 ile \u015Fifrelenmi\u015F metin", - base64url: "base64url ile \u015Fifrelenmi\u015F metin", - json_string: "JSON dizesi", - e164: "E.164 say\u0131s\u0131", - jwt: "JWT", - template_literal: "\u015Eablon dizesi" - }; - return (issue2) => { - switch (issue2.code) { - case "invalid_type": - return `Ge\xE7ersiz de\u011Fer: beklenen ${issue2.expected}, al\u0131nan ${parsedType3(issue2.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, "|")}`; - case "too_big": { - const adj = issue2.inclusive ? "<=" : "<"; - const sizing = getSizing(issue2.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()}`; - } - case "too_small": { - const adj = issue2.inclusive ? ">=" : ">"; - const sizing = getSizing(issue2.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()}`; - } - case "invalid_format": { - const _issue = issue2; - if (_issue.format === "starts_with") - return `Ge\xE7ersiz metin: "${_issue.prefix}" ile ba\u015Flamal\u0131`; - if (_issue.format === "ends_with") - return `Ge\xE7ersiz metin: "${_issue.suffix}" ile bitmeli`; - if (_issue.format === "includes") - 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}`; - } - case "not_multiple_of": - return `Ge\xE7ersiz say\u0131: ${issue2.divisor} ile tam b\xF6l\xFCnebilmeli`; - case "unrecognized_keys": - return `Tan\u0131nmayan anahtar${issue2.keys.length > 1 ? "lar" : ""}: ${joinValues(issue2.keys, ", ")}`; - case "invalid_key": - return `${issue2.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`; - default: - return `Ge\xE7ersiz de\u011Fer`; - } - }; - }; - } -}); - -// node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/ua.js -function ua_default() { - return { - localeError: error36() - }; -} -var error36; -var init_ua = __esm({ - "node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/ua.js"() { - init_util2(); - error36 = () => { - const Sizable = { - string: { unit: "\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432", verb: "\u043C\u0430\u0442\u0438\u043C\u0435" }, - file: { unit: "\u0431\u0430\u0439\u0442\u0456\u0432", verb: "\u043C\u0430\u0442\u0438\u043C\u0435" }, - array: { unit: "\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432", verb: "\u043C\u0430\u0442\u0438\u043C\u0435" }, - set: { unit: "\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432", verb: "\u043C\u0430\u0442\u0438\u043C\u0435" } - }; - function getSizing(origin) { - return Sizable[origin] ?? null; - } - const parsedType4 = (data) => { - const t = typeof data; - switch (t) { - case "number": { - return Number.isNaN(data) ? "NaN" : "\u0447\u0438\u0441\u043B\u043E"; - } - case "object": { - if (Array.isArray(data)) { - return "\u043C\u0430\u0441\u0438\u0432"; - } - if (data === null) { - return "null"; - } - if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) { - return data.constructor.name; - } - } - } - return t; - }; - const Nouns = { - regex: "\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456", - email: "\u0430\u0434\u0440\u0435\u0441\u0430 \u0435\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0457 \u043F\u043E\u0448\u0442\u0438", - url: "URL", - emoji: "\u0435\u043C\u043E\u0434\u0437\u0456", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "\u0434\u0430\u0442\u0430 \u0442\u0430 \u0447\u0430\u0441 ISO", - date: "\u0434\u0430\u0442\u0430 ISO", - time: "\u0447\u0430\u0441 ISO", - duration: "\u0442\u0440\u0438\u0432\u0430\u043B\u0456\u0441\u0442\u044C ISO", - ipv4: "\u0430\u0434\u0440\u0435\u0441\u0430 IPv4", - ipv6: "\u0430\u0434\u0440\u0435\u0441\u0430 IPv6", - cidrv4: "\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv4", - cidrv6: "\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv6", - base64: "\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64", - base64url: "\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64url", - json_string: "\u0440\u044F\u0434\u043E\u043A JSON", - e164: "\u043D\u043E\u043C\u0435\u0440 E.164", - jwt: "JWT", - template_literal: "\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456" - }; - return (issue2) => { - switch (issue2.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 `ΠΠ΅ΠΏΡ€Π°Π²ΠΈΠ»ΡŒΠ½Ρ– Π²Ρ…Ρ–Π΄Π½Ρ– Π΄Π°Π½Ρ–: ΠΎΡ‡Ρ–ΠΊΡƒΡ”Ρ‚ΡŒΡΡ ${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, "|")}`; - case "too_big": { - const adj = issue2.inclusive ? "<=" : "<"; - const sizing = getSizing(issue2.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()}`; - } - case "too_small": { - const adj = issue2.inclusive ? ">=" : ">"; - const sizing = getSizing(issue2.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 ${issue2.origin} \u0431\u0443\u0434\u0435 ${adj}${issue2.minimum.toString()}`; - } - case "invalid_format": { - const _issue = issue2; - 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") - 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 \u0437\u0430\u043A\u0456\u043D\u0447\u0443\u0432\u0430\u0442\u0438\u0441\u044F \u043D\u0430 "${_issue.suffix}"`; - if (_issue.format === "includes") - 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}`; - } - 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}`; - 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, ", ")}`; - case "invalid_key": - return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u043A\u043B\u044E\u0447 \u0443 ${issue2.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}`; - default: - return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456`; - } - }; - }; - } -}); - -// node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/ur.js -function ur_default() { - return { - localeError: error37() - }; -} -var error37; -var init_ur = __esm({ - "node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/ur.js"() { - init_util2(); - error37 = () => { - const Sizable = { - string: { unit: "\u062D\u0631\u0648\u0641", verb: "\u06C1\u0648\u0646\u0627" }, - file: { unit: "\u0628\u0627\u0626\u0679\u0633", verb: "\u06C1\u0648\u0646\u0627" }, - array: { unit: "\u0622\u0626\u0679\u0645\u0632", verb: "\u06C1\u0648\u0646\u0627" }, - set: { unit: "\u0622\u0626\u0679\u0645\u0632", verb: "\u06C1\u0648\u0646\u0627" } - }; - function getSizing(origin) { - return Sizable[origin] ?? null; - } - const parsedType4 = (data) => { - const t = typeof data; - switch (t) { - case "number": { - return Number.isNaN(data) ? "NaN" : "\u0646\u0645\u0628\u0631"; - } - case "object": { - if (Array.isArray(data)) { - return "\u0622\u0631\u06D2"; - } - if (data === null) { - return "\u0646\u0644"; - } - if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) { - return data.constructor.name; - } - } - } - return t; - }; - const Nouns = { - regex: "\u0627\u0646 \u067E\u0679", - email: "\u0627\u06CC \u0645\u06CC\u0644 \u0627\u06CC\u0688\u0631\u06CC\u0633", - url: "\u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644", - emoji: "\u0627\u06CC\u0645\u0648\u062C\u06CC", - uuid: "\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC", - uuidv4: "\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 4", - uuidv6: "\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 6", - nanoid: "\u0646\u06CC\u0646\u0648 \u0622\u0626\u06CC \u0688\u06CC", - guid: "\u062C\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC", - cuid: "\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC", - cuid2: "\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC 2", - ulid: "\u06CC\u0648 \u0627\u06CC\u0644 \u0622\u0626\u06CC \u0688\u06CC", - xid: "\u0627\u06CC\u06A9\u0633 \u0622\u0626\u06CC \u0688\u06CC", - ksuid: "\u06A9\u06D2 \u0627\u06CC\u0633 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC", - datetime: "\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0688\u06CC\u0679 \u0679\u0627\u0626\u0645", - date: "\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u062A\u0627\u0631\u06CC\u062E", - time: "\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0648\u0642\u062A", - duration: "\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0645\u062F\u062A", - ipv4: "\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0627\u06CC\u0688\u0631\u06CC\u0633", - ipv6: "\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0627\u06CC\u0688\u0631\u06CC\u0633", - cidrv4: "\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0631\u06CC\u0646\u062C", - cidrv6: "\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0631\u06CC\u0646\u062C", - base64: "\u0628\u06CC\u0633 64 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF", - base64url: "\u0628\u06CC\u0633 64 \u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF", - json_string: "\u062C\u06D2 \u0627\u06CC\u0633 \u0627\u0648 \u0627\u06CC\u0646 \u0633\u0679\u0631\u0646\u06AF", - e164: "\u0627\u06CC 164 \u0646\u0645\u0628\u0631", - jwt: "\u062C\u06D2 \u0688\u0628\u0644\u06CC\u0648 \u0679\u06CC", - template_literal: "\u0627\u0646 \u067E\u0679" - }; - return (issue2) => { - switch (issue2.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`; - 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`; - case "too_big": { - const adj = issue2.inclusive ? "<=" : "<"; - const sizing = getSizing(issue2.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`; - } - case "too_small": { - const adj = issue2.inclusive ? ">=" : ">"; - const sizing = getSizing(issue2.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: ${issue2.origin} \u06A9\u0627 ${adj}${issue2.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`; - } - case "invalid_format": { - const _issue = issue2; - 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`; - } - if (_issue.format === "ends_with") - return `\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${_issue.suffix}" \u067E\u0631 \u062E\u062A\u0645 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`; - if (_issue.format === "includes") - 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}`; - } - 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`; - 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 ")}`; - case "invalid_key": - return `${issue2.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`; - default: - return `\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679`; - } - }; - }; - } -}); - -// node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/vi.js -function vi_default() { - return { - localeError: error38() - }; -} -var error38; -var init_vi = __esm({ - "node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/vi.js"() { - init_util2(); - error38 = () => { - const Sizable = { - string: { unit: "k\xFD t\u1EF1", verb: "c\xF3" }, - file: { unit: "byte", verb: "c\xF3" }, - array: { unit: "ph\u1EA7n t\u1EED", verb: "c\xF3" }, - set: { unit: "ph\u1EA7n t\u1EED", verb: "c\xF3" } - }; - function getSizing(origin) { - return Sizable[origin] ?? null; - } - const parsedType4 = (data) => { - const t = typeof data; - switch (t) { - case "number": { - return Number.isNaN(data) ? "NaN" : "s\u1ED1"; - } - case "object": { - if (Array.isArray(data)) { - return "m\u1EA3ng"; - } - if (data === null) { - return "null"; - } - if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) { - return data.constructor.name; - } - } - } - return t; - }; - const Nouns = { - regex: "\u0111\u1EA7u v\xE0o", - email: "\u0111\u1ECBa ch\u1EC9 email", - url: "URL", - emoji: "emoji", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "ng\xE0y gi\u1EDD ISO", - date: "ng\xE0y ISO", - time: "gi\u1EDD ISO", - duration: "kho\u1EA3ng th\u1EDDi gian ISO", - ipv4: "\u0111\u1ECBa ch\u1EC9 IPv4", - ipv6: "\u0111\u1ECBa ch\u1EC9 IPv6", - cidrv4: "d\u1EA3i IPv4", - cidrv6: "d\u1EA3i IPv6", - base64: "chu\u1ED7i m\xE3 h\xF3a base64", - base64url: "chu\u1ED7i m\xE3 h\xF3a base64url", - json_string: "chu\u1ED7i JSON", - e164: "s\u1ED1 E.164", - jwt: "JWT", - template_literal: "\u0111\u1EA7u v\xE0o" - }; - return (issue2) => { - switch (issue2.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)}`; - 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, "|")}`; - case "too_big": { - const adj = issue2.inclusive ? "<=" : "<"; - const sizing = getSizing(issue2.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()}`; - } - case "too_small": { - const adj = issue2.inclusive ? ">=" : ">"; - const sizing = getSizing(issue2.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 ${issue2.origin} ${adj}${issue2.minimum.toString()}`; - } - case "invalid_format": { - const _issue = issue2; - 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") - return `Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i k\u1EBFt th\xFAc b\u1EB1ng "${_issue.suffix}"`; - if (_issue.format === "includes") - 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`; - } - 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}`; - case "unrecognized_keys": - return `Kh\xF3a kh\xF4ng \u0111\u01B0\u1EE3c nh\u1EADn d\u1EA1ng: ${joinValues(issue2.keys, ", ")}`; - case "invalid_key": - return `Kh\xF3a kh\xF4ng h\u1EE3p l\u1EC7 trong ${issue2.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}`; - default: - return `\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7`; - } - }; - }; - } -}); - -// node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/zh-CN.js -function zh_CN_default() { - return { - localeError: error39() - }; -} -var error39; -var init_zh_CN = __esm({ - "node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/zh-CN.js"() { - init_util2(); - error39 = () => { - const Sizable = { - string: { unit: "\u5B57\u7B26", verb: "\u5305\u542B" }, - file: { unit: "\u5B57\u8282", verb: "\u5305\u542B" }, - array: { unit: "\u9879", verb: "\u5305\u542B" }, - set: { unit: "\u9879", verb: "\u5305\u542B" } - }; - function getSizing(origin) { - return Sizable[origin] ?? null; - } - const parsedType4 = (data) => { - const t = typeof data; - switch (t) { - case "number": { - return Number.isNaN(data) ? "\u975E\u6570\u5B57(NaN)" : "\u6570\u5B57"; - } - case "object": { - if (Array.isArray(data)) { - return "\u6570\u7EC4"; - } - if (data === null) { - return "\u7A7A\u503C(null)"; - } - if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) { - return data.constructor.name; - } - } - } - return t; - }; - const Nouns = { - regex: "\u8F93\u5165", - email: "\u7535\u5B50\u90AE\u4EF6", - url: "URL", - emoji: "\u8868\u60C5\u7B26\u53F7", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "ISO\u65E5\u671F\u65F6\u95F4", - date: "ISO\u65E5\u671F", - time: "ISO\u65F6\u95F4", - duration: "ISO\u65F6\u957F", - ipv4: "IPv4\u5730\u5740", - ipv6: "IPv6\u5730\u5740", - cidrv4: "IPv4\u7F51\u6BB5", - cidrv6: "IPv6\u7F51\u6BB5", - base64: "base64\u7F16\u7801\u5B57\u7B26\u4E32", - base64url: "base64url\u7F16\u7801\u5B57\u7B26\u4E32", - json_string: "JSON\u5B57\u7B26\u4E32", - e164: "E.164\u53F7\u7801", - jwt: "JWT", - template_literal: "\u8F93\u5165" - }; - return (issue2) => { - switch (issue2.code) { - case "invalid_type": - return `\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${issue2.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${parsedType4(issue2.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, "|")}`; - case "too_big": { - const adj = issue2.inclusive ? "<=" : "<"; - const sizing = getSizing(issue2.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()}`; - } - case "too_small": { - const adj = issue2.inclusive ? ">=" : ">"; - const sizing = getSizing(issue2.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 ${issue2.origin} ${adj}${issue2.minimum.toString()}`; - } - case "invalid_format": { - const _issue = issue2; - if (_issue.format === "starts_with") - return `\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${_issue.prefix}" \u5F00\u5934`; - if (_issue.format === "ends_with") - return `\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${_issue.suffix}" \u7ED3\u5C3E`; - if (_issue.format === "includes") - 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}`; - } - case "not_multiple_of": - return `\u65E0\u6548\u6570\u5B57\uFF1A\u5FC5\u987B\u662F ${issue2.divisor} \u7684\u500D\u6570`; - case "unrecognized_keys": - return `\u51FA\u73B0\u672A\u77E5\u7684\u952E(key): ${joinValues(issue2.keys, ", ")}`; - case "invalid_key": - return `${issue2.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)`; - default: - return `\u65E0\u6548\u8F93\u5165`; - } - }; - }; - } -}); - -// node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/zh-TW.js -function zh_TW_default() { - return { - localeError: error40() - }; -} -var error40; -var init_zh_TW = __esm({ - "node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/zh-TW.js"() { - init_util2(); - error40 = () => { - const Sizable = { - string: { unit: "\u5B57\u5143", verb: "\u64C1\u6709" }, - file: { unit: "\u4F4D\u5143\u7D44", verb: "\u64C1\u6709" }, - array: { unit: "\u9805\u76EE", verb: "\u64C1\u6709" }, - set: { unit: "\u9805\u76EE", verb: "\u64C1\u6709" } - }; - function getSizing(origin) { - return Sizable[origin] ?? null; - } - const 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; - }; - const Nouns = { - regex: "\u8F38\u5165", - email: "\u90F5\u4EF6\u5730\u5740", - 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 \u65E5\u671F\u6642\u9593", - date: "ISO \u65E5\u671F", - time: "ISO \u6642\u9593", - duration: "ISO \u671F\u9593", - ipv4: "IPv4 \u4F4D\u5740", - ipv6: "IPv6 \u4F4D\u5740", - cidrv4: "IPv4 \u7BC4\u570D", - cidrv6: "IPv6 \u7BC4\u570D", - base64: "base64 \u7DE8\u78BC\u5B57\u4E32", - base64url: "base64url \u7DE8\u78BC\u5B57\u4E32", - json_string: "JSON \u5B57\u4E32", - e164: "E.164 \u6578\u503C", - jwt: "JWT", - template_literal: "\u8F38\u5165" - }; - return (issue2) => { - switch (issue2.code) { - case "invalid_type": - return `\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${issue2.expected}\uFF0C\u4F46\u6536\u5230 ${parsedType4(issue2.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, "|")}`; - case "too_big": { - const adj = issue2.inclusive ? "<=" : "<"; - const sizing = getSizing(issue2.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()}`; - } - case "too_small": { - const adj = issue2.inclusive ? ">=" : ">"; - const sizing = getSizing(issue2.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 ${issue2.origin} \u61C9\u70BA ${adj}${issue2.minimum.toString()}`; - } - case "invalid_format": { - const _issue = issue2; - if (_issue.format === "starts_with") { - return `\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${_issue.prefix}" \u958B\u982D`; - } - if (_issue.format === "ends_with") - return `\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${_issue.suffix}" \u7D50\u5C3E`; - if (_issue.format === "includes") - 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}`; - } - case "not_multiple_of": - return `\u7121\u6548\u7684\u6578\u5B57\uFF1A\u5FC5\u9808\u70BA ${issue2.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")}`; - case "invalid_key": - return `${issue2.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`; - default: - return `\u7121\u6548\u7684\u8F38\u5165\u503C`; - } - }; - }; - } -}); - -// node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/index.js -var locales_exports = {}; -__export(locales_exports, { - ar: () => ar_default, - az: () => az_default, - be: () => be_default, - ca: () => ca_default, - cs: () => cs_default, - de: () => de_default, - en: () => en_default4, - eo: () => eo_default, - es: () => es_default, - fa: () => fa_default, - fi: () => fi_default, - fr: () => fr_default, - frCA: () => fr_CA_default, - he: () => he_default, - hu: () => hu_default, - id: () => id_default, - it: () => it_default, - ja: () => ja_default, - kh: () => kh_default, - ko: () => ko_default, - mk: () => mk_default, - ms: () => ms_default, - nl: () => nl_default, - no: () => no_default, - ota: () => ota_default, - pl: () => pl_default, - ps: () => ps_default, - pt: () => pt_default, - ru: () => ru_default, - sl: () => sl_default, - sv: () => sv_default, - ta: () => ta_default, - th: () => th_default, - tr: () => tr_default, - ua: () => ua_default, - ur: () => ur_default, - vi: () => vi_default, - zhCN: () => zh_CN_default, - zhTW: () => zh_TW_default -}); -var init_locales = __esm({ - "node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/index.js"() { - init_ar(); - init_az(); - init_be(); - init_ca(); - init_cs(); - init_de(); - init_en2(); - init_eo(); - init_es(); - init_fa(); - init_fi(); - init_fr(); - init_fr_CA(); - init_he(); - init_hu(); - init_id(); - init_it(); - init_ja(); - init_kh(); - init_ko(); - init_mk(); - init_ms(); - init_nl(); - init_no(); - init_ota(); - init_ps(); - init_pl(); - init_pt(); - init_ru(); - init_sl(); - init_sv(); - init_ta(); - init_th(); - init_tr(); - init_ua(); - init_ur(); - init_vi(); - init_zh_CN(); - init_zh_TW(); - } -}); - -// node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/registries.js -function registry2() { - return new $ZodRegistry(); -} -var $output, $input, $ZodRegistry, globalRegistry; -var init_registries = __esm({ - "node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/registries.js"() { - $output = Symbol("ZodOutput"); - $input = Symbol("ZodInput"); - $ZodRegistry = class { - constructor() { - this._map = /* @__PURE__ */ new Map(); - this._idmap = /* @__PURE__ */ new Map(); - } - add(schema2, ..._meta) { - const meta = _meta[0]; - this._map.set(schema2, meta); - if (meta && typeof meta === "object" && "id" in meta) { - if (this._idmap.has(meta.id)) { - throw new Error(`ID ${meta.id} already exists in the registry`); - } - this._idmap.set(meta.id, schema2); - } - return this; - } - clear() { - this._map = /* @__PURE__ */ new Map(); - this._idmap = /* @__PURE__ */ new Map(); - return this; - } - remove(schema2) { - const meta = this._map.get(schema2); - if (meta && typeof meta === "object" && "id" in meta) { - this._idmap.delete(meta.id); - } - this._map.delete(schema2); - return this; - } - get(schema2) { - const p = schema2._zod.parent; - if (p) { - const pm = { ...this.get(p) ?? {} }; - delete pm.id; - return { ...pm, ...this._map.get(schema2) }; - } - return this._map.get(schema2); - } - has(schema2) { - return this._map.has(schema2); - } - }; - globalRegistry = /* @__PURE__ */ registry2(); - } -}); - -// node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/api.js -function _string(Class2, params) { - return new Class2({ - type: "string", - ...normalizeParams(params) - }); -} -function _coercedString(Class2, params) { - return new Class2({ - type: "string", - coerce: true, - ...normalizeParams(params) - }); -} -function _email(Class2, params) { - return new Class2({ - type: "string", - format: "email", - check: "string_format", - abort: false, - ...normalizeParams(params) - }); -} -function _guid(Class2, params) { - return new Class2({ - type: "string", - format: "guid", - check: "string_format", - abort: false, - ...normalizeParams(params) - }); -} -function _uuid(Class2, params) { - return new Class2({ - type: "string", - format: "uuid", - check: "string_format", - abort: false, - ...normalizeParams(params) - }); -} -function _uuidv4(Class2, params) { - return new Class2({ - type: "string", - format: "uuid", - check: "string_format", - abort: false, - version: "v4", - ...normalizeParams(params) - }); -} -function _uuidv6(Class2, params) { - return new Class2({ - type: "string", - format: "uuid", - check: "string_format", - abort: false, - version: "v6", - ...normalizeParams(params) - }); -} -function _uuidv7(Class2, params) { - return new Class2({ - type: "string", - format: "uuid", - check: "string_format", - abort: false, - version: "v7", - ...normalizeParams(params) - }); -} -function _url2(Class2, params) { - return new Class2({ - type: "string", - format: "url", - check: "string_format", - abort: false, - ...normalizeParams(params) - }); -} -function _emoji2(Class2, params) { - return new Class2({ - type: "string", - format: "emoji", - check: "string_format", - abort: false, - ...normalizeParams(params) - }); -} -function _nanoid(Class2, params) { - return new Class2({ - type: "string", - format: "nanoid", - check: "string_format", - abort: false, - ...normalizeParams(params) - }); -} -function _cuid(Class2, params) { - return new Class2({ - type: "string", - format: "cuid", - check: "string_format", - abort: false, - ...normalizeParams(params) - }); -} -function _cuid2(Class2, params) { - return new Class2({ - type: "string", - format: "cuid2", - check: "string_format", - abort: false, - ...normalizeParams(params) - }); -} -function _ulid(Class2, params) { - return new Class2({ - type: "string", - format: "ulid", - check: "string_format", - abort: false, - ...normalizeParams(params) - }); -} -function _xid(Class2, params) { - return new Class2({ - type: "string", - format: "xid", - check: "string_format", - abort: false, - ...normalizeParams(params) - }); -} -function _ksuid(Class2, params) { - return new Class2({ - type: "string", - format: "ksuid", - check: "string_format", - abort: false, - ...normalizeParams(params) - }); -} -function _ipv4(Class2, params) { - return new Class2({ - type: "string", - format: "ipv4", - check: "string_format", - abort: false, - ...normalizeParams(params) - }); -} -function _ipv6(Class2, params) { - return new Class2({ - type: "string", - format: "ipv6", - check: "string_format", - abort: false, - ...normalizeParams(params) - }); -} -function _cidrv4(Class2, params) { - return new Class2({ - type: "string", - format: "cidrv4", - check: "string_format", - abort: false, - ...normalizeParams(params) - }); -} -function _cidrv6(Class2, params) { - return new Class2({ - type: "string", - format: "cidrv6", - check: "string_format", - abort: false, - ...normalizeParams(params) - }); -} -function _base64(Class2, params) { - return new Class2({ - type: "string", - format: "base64", - check: "string_format", - abort: false, - ...normalizeParams(params) - }); -} -function _base64url(Class2, params) { - return new Class2({ - type: "string", - format: "base64url", - check: "string_format", - abort: false, - ...normalizeParams(params) - }); -} -function _e164(Class2, params) { - return new Class2({ - type: "string", - format: "e164", - check: "string_format", - abort: false, - ...normalizeParams(params) - }); -} -function _jwt(Class2, params) { - return new Class2({ - type: "string", - format: "jwt", - check: "string_format", - abort: false, - ...normalizeParams(params) - }); -} -function _isoDateTime(Class2, params) { - return new Class2({ - type: "string", - format: "datetime", - check: "string_format", - offset: false, - local: false, - precision: null, - ...normalizeParams(params) - }); -} -function _isoDate(Class2, params) { - return new Class2({ - type: "string", - format: "date", - check: "string_format", - ...normalizeParams(params) - }); -} -function _isoTime(Class2, params) { - return new Class2({ - type: "string", - format: "time", - check: "string_format", - precision: null, - ...normalizeParams(params) - }); -} -function _isoDuration(Class2, params) { - return new Class2({ - type: "string", - format: "duration", - check: "string_format", - ...normalizeParams(params) - }); -} -function _number(Class2, params) { - return new Class2({ - type: "number", - checks: [], - ...normalizeParams(params) - }); -} -function _coercedNumber(Class2, params) { - return new Class2({ - type: "number", - coerce: true, - checks: [], - ...normalizeParams(params) - }); -} -function _int(Class2, params) { - return new Class2({ - type: "number", - check: "number_format", - abort: false, - format: "safeint", - ...normalizeParams(params) - }); -} -function _float32(Class2, params) { - return new Class2({ - type: "number", - check: "number_format", - abort: false, - format: "float32", - ...normalizeParams(params) - }); -} -function _float64(Class2, params) { - return new Class2({ - type: "number", - check: "number_format", - abort: false, - format: "float64", - ...normalizeParams(params) - }); -} -function _int32(Class2, params) { - return new Class2({ - type: "number", - check: "number_format", - abort: false, - format: "int32", - ...normalizeParams(params) - }); -} -function _uint32(Class2, params) { - return new Class2({ - type: "number", - check: "number_format", - abort: false, - format: "uint32", - ...normalizeParams(params) - }); -} -function _boolean(Class2, params) { - return new Class2({ - type: "boolean", - ...normalizeParams(params) - }); -} -function _coercedBoolean(Class2, params) { - return new Class2({ - type: "boolean", - coerce: true, - ...normalizeParams(params) - }); -} -function _bigint(Class2, params) { - return new Class2({ - type: "bigint", - ...normalizeParams(params) - }); -} -function _coercedBigint(Class2, params) { - return new Class2({ - type: "bigint", - coerce: true, - ...normalizeParams(params) - }); -} -function _int64(Class2, params) { - return new Class2({ - type: "bigint", - check: "bigint_format", - abort: false, - format: "int64", - ...normalizeParams(params) - }); -} -function _uint64(Class2, params) { - return new Class2({ - type: "bigint", - check: "bigint_format", - abort: false, - format: "uint64", - ...normalizeParams(params) - }); -} -function _symbol(Class2, params) { - return new Class2({ - type: "symbol", - ...normalizeParams(params) - }); -} -function _undefined2(Class2, params) { - return new Class2({ - type: "undefined", - ...normalizeParams(params) - }); -} -function _null2(Class2, params) { - return new Class2({ - type: "null", - ...normalizeParams(params) - }); -} -function _any(Class2) { - return new Class2({ - type: "any" - }); -} -function _unknown(Class2) { - return new Class2({ - type: "unknown" - }); -} -function _never(Class2, params) { - return new Class2({ - type: "never", - ...normalizeParams(params) - }); -} -function _void(Class2, params) { - return new Class2({ - type: "void", - ...normalizeParams(params) - }); -} -function _date(Class2, params) { - return new Class2({ - type: "date", - ...normalizeParams(params) - }); -} -function _coercedDate(Class2, params) { - return new Class2({ - type: "date", - coerce: true, - ...normalizeParams(params) - }); -} -function _nan(Class2, params) { - return new Class2({ - type: "nan", - ...normalizeParams(params) - }); -} -function _lt(value2, params) { - return new $ZodCheckLessThan({ - check: "less_than", - ...normalizeParams(params), - value: value2, - inclusive: false - }); -} -function _lte(value2, params) { - return new $ZodCheckLessThan({ - check: "less_than", - ...normalizeParams(params), - value: value2, - inclusive: true - }); -} -function _gt(value2, params) { - return new $ZodCheckGreaterThan({ - check: "greater_than", - ...normalizeParams(params), - value: value2, - inclusive: false - }); -} -function _gte(value2, params) { - return new $ZodCheckGreaterThan({ - check: "greater_than", - ...normalizeParams(params), - value: value2, - inclusive: true - }); -} -function _positive(params) { - return _gt(0, params); -} -function _negative(params) { - return _lt(0, params); -} -function _nonpositive(params) { - return _lte(0, params); -} -function _nonnegative(params) { - return _gte(0, params); -} -function _multipleOf(value2, params) { - return new $ZodCheckMultipleOf({ - check: "multiple_of", - ...normalizeParams(params), - value: value2 - }); -} -function _maxSize(maximum, params) { - return new $ZodCheckMaxSize({ - check: "max_size", - ...normalizeParams(params), - maximum - }); -} -function _minSize(minimum, params) { - return new $ZodCheckMinSize({ - check: "min_size", - ...normalizeParams(params), - minimum - }); -} -function _size(size, params) { - return new $ZodCheckSizeEquals({ - check: "size_equals", - ...normalizeParams(params), - size - }); -} -function _maxLength(maximum, params) { - const ch = new $ZodCheckMaxLength({ - check: "max_length", - ...normalizeParams(params), - maximum - }); - return ch; -} -function _minLength(minimum, params) { - return new $ZodCheckMinLength({ - check: "min_length", - ...normalizeParams(params), - minimum - }); -} -function _length(length, params) { - return new $ZodCheckLengthEquals({ - check: "length_equals", - ...normalizeParams(params), - length - }); -} -function _regex(pattern, params) { - return new $ZodCheckRegex({ - check: "string_format", - format: "regex", - ...normalizeParams(params), - pattern - }); -} -function _lowercase(params) { - return new $ZodCheckLowerCase({ - check: "string_format", - format: "lowercase", - ...normalizeParams(params) - }); -} -function _uppercase(params) { - return new $ZodCheckUpperCase({ - check: "string_format", - format: "uppercase", - ...normalizeParams(params) - }); -} -function _includes(includes2, params) { - return new $ZodCheckIncludes({ - check: "string_format", - format: "includes", - ...normalizeParams(params), - includes: includes2 - }); -} -function _startsWith(prefix, params) { - return new $ZodCheckStartsWith({ - check: "string_format", - format: "starts_with", - ...normalizeParams(params), - prefix - }); -} -function _endsWith(suffix2, params) { - return new $ZodCheckEndsWith({ - check: "string_format", - format: "ends_with", - ...normalizeParams(params), - suffix: suffix2 - }); -} -function _property(property, schema2, params) { - return new $ZodCheckProperty({ - check: "property", - property, - schema: schema2, - ...normalizeParams(params) - }); -} -function _mime(types, params) { - return new $ZodCheckMimeType({ - check: "mime_type", - mime: types, - ...normalizeParams(params) - }); -} -function _overwrite(tx) { - return new $ZodCheckOverwrite({ - check: "overwrite", - tx - }); -} -function _normalize(form) { - return _overwrite((input) => input.normalize(form)); -} -function _trim() { - return _overwrite((input) => input.trim()); -} -function _toLowerCase() { - return _overwrite((input) => input.toLowerCase()); -} -function _toUpperCase() { - return _overwrite((input) => input.toUpperCase()); -} -function _array(Class2, element, params) { - return new Class2({ - type: "array", - element, - // get element() { - // return element; - // }, - ...normalizeParams(params) - }); -} -function _union(Class2, options, params) { - return new Class2({ - type: "union", - options, - ...normalizeParams(params) - }); -} -function _discriminatedUnion(Class2, discriminator, options, params) { - return new Class2({ - type: "union", - options, - discriminator, - ...normalizeParams(params) - }); -} -function _intersection(Class2, left, right) { - return new Class2({ - type: "intersection", - left, - right - }); -} -function _tuple(Class2, items, _paramsOrRest, _params) { - const hasRest = _paramsOrRest instanceof $ZodType; - const params = hasRest ? _params : _paramsOrRest; - const rest = hasRest ? _paramsOrRest : null; - return new Class2({ - type: "tuple", - items, - rest, - ...normalizeParams(params) - }); -} -function _record(Class2, keyType, valueType, params) { - return new Class2({ - type: "record", - keyType, - valueType, - ...normalizeParams(params) - }); -} -function _map(Class2, keyType, valueType, params) { - return new Class2({ - type: "map", - keyType, - valueType, - ...normalizeParams(params) - }); -} -function _set(Class2, valueType, params) { - return new Class2({ - type: "set", - valueType, - ...normalizeParams(params) - }); -} -function _enum(Class2, values, params) { - const entries = Array.isArray(values) ? Object.fromEntries(values.map((v) => [v, v])) : values; - return new Class2({ - type: "enum", - entries, - ...normalizeParams(params) - }); -} -function _nativeEnum(Class2, entries, params) { - return new Class2({ - type: "enum", - entries, - ...normalizeParams(params) - }); -} -function _literal(Class2, value2, params) { - return new Class2({ - type: "literal", - values: Array.isArray(value2) ? value2 : [value2], - ...normalizeParams(params) - }); -} -function _file(Class2, params) { - return new Class2({ - type: "file", - ...normalizeParams(params) - }); -} -function _transform(Class2, fn2) { - return new Class2({ - type: "transform", - transform: fn2 - }); -} -function _optional(Class2, innerType) { - return new Class2({ - type: "optional", - innerType - }); -} -function _nullable(Class2, innerType) { - return new Class2({ - type: "nullable", - innerType - }); -} -function _default(Class2, innerType, defaultValue) { - return new Class2({ - type: "default", - innerType, - get defaultValue() { - return typeof defaultValue === "function" ? defaultValue() : defaultValue; - } - }); -} -function _nonoptional(Class2, innerType, params) { - return new Class2({ - type: "nonoptional", - innerType, - ...normalizeParams(params) - }); -} -function _success(Class2, innerType) { - return new Class2({ - type: "success", - innerType - }); -} -function _catch(Class2, innerType, catchValue) { - return new Class2({ - type: "catch", - innerType, - catchValue: typeof catchValue === "function" ? catchValue : () => catchValue - }); -} -function _pipe(Class2, in_, out) { - return new Class2({ - type: "pipe", - in: in_, - out - }); -} -function _readonly(Class2, innerType) { - return new Class2({ - type: "readonly", - innerType - }); -} -function _templateLiteral(Class2, parts, params) { - return new Class2({ - type: "template_literal", - parts, - ...normalizeParams(params) - }); -} -function _lazy(Class2, getter) { - return new Class2({ - type: "lazy", - getter - }); -} -function _promise(Class2, innerType) { - return new Class2({ - type: "promise", - innerType - }); -} -function _custom(Class2, fn2, _params) { - const norm2 = normalizeParams(_params); - norm2.abort ?? (norm2.abort = true); - const schema2 = new Class2({ - type: "custom", - check: "custom", - fn: fn2, - ...norm2 - }); - return schema2; -} -function _refine(Class2, fn2, _params) { - const schema2 = new Class2({ - type: "custom", - check: "custom", - fn: fn2, - ...normalizeParams(_params) - }); - return schema2; -} -function _stringbool(Classes, _params) { - const params = normalizeParams(_params); - let truthyArray = params.truthy ?? ["true", "1", "yes", "on", "y", "enabled"]; - let falsyArray = params.falsy ?? ["false", "0", "no", "off", "n", "disabled"]; - if (params.case !== "sensitive") { - truthyArray = truthyArray.map((v) => typeof v === "string" ? v.toLowerCase() : v); - falsyArray = falsyArray.map((v) => typeof v === "string" ? v.toLowerCase() : v); - } - const truthySet = new Set(truthyArray); - const falsySet = new Set(falsyArray); - const _Pipe = Classes.Pipe ?? $ZodPipe; - const _Boolean = Classes.Boolean ?? $ZodBoolean; - const _String = Classes.String ?? $ZodString; - const _Transform = Classes.Transform ?? $ZodTransform; - const tx = new _Transform({ - type: "transform", - transform: (input, payload) => { - let data = input; - if (params.case !== "sensitive") - data = data.toLowerCase(); - if (truthySet.has(data)) { - return true; - } else if (falsySet.has(data)) { - return false; - } else { - payload.issues.push({ - code: "invalid_value", - expected: "stringbool", - values: [...truthySet, ...falsySet], - input: payload.value, - inst: tx - }); - return {}; - } - }, - error: params.error - }); - const innerPipe = new _Pipe({ - type: "pipe", - in: new _String({ type: "string", error: params.error }), - out: tx, - error: params.error - }); - const outerPipe = new _Pipe({ - type: "pipe", - in: innerPipe, - out: new _Boolean({ - type: "boolean", - error: params.error - }), - error: params.error - }); - return outerPipe; -} -function _stringFormat(Class2, format2, fnOrRegex, _params = {}) { - const params = normalizeParams(_params); - const def = { - ...normalizeParams(_params), - check: "string_format", - type: "string", - format: format2, - fn: typeof fnOrRegex === "function" ? fnOrRegex : (val) => fnOrRegex.test(val), - ...params - }; - if (fnOrRegex instanceof RegExp) { - def.pattern = fnOrRegex; - } - const inst = new Class2(def); - return inst; -} -var TimePrecision; -var init_api = __esm({ - "node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/api.js"() { - init_checks(); - init_schemas(); - init_util2(); - TimePrecision = { - Any: null, - Minute: -1, - Second: 0, - Millisecond: 3, - Microsecond: 6 - }; - } -}); - -// node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/function.js -function _function(params) { - return new $ZodFunction({ - type: "function", - input: Array.isArray(params?.input) ? _tuple($ZodTuple, params?.input) : params?.input ?? _array($ZodArray, _unknown($ZodUnknown)), - output: params?.output ?? _unknown($ZodUnknown) - }); -} -var $ZodFunction; -var init_function = __esm({ - "node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/function.js"() { - init_api(); - init_parse(); - init_schemas(); - init_schemas(); - $ZodFunction = class { - constructor(def) { - this._def = def; - this.def = def; - } - implement(func) { - if (typeof func !== "function") { - throw new Error("implement() must be called with a function"); - } - const impl = ((...args3) => { - const parsedArgs = this._def.input ? parse3(this._def.input, args3, void 0, { callee: impl }) : args3; - if (!Array.isArray(parsedArgs)) { - throw new Error("Invalid arguments schema: not an array or tuple schema."); - } - const output = func(...parsedArgs); - return this._def.output ? parse3(this._def.output, output, void 0, { callee: impl }) : output; - }); - return impl; - } - implementAsync(func) { - if (typeof func !== "function") { - throw new Error("implement() must be called with a function"); - } - const impl = (async (...args3) => { - const parsedArgs = this._def.input ? await parseAsync(this._def.input, args3, void 0, { callee: impl }) : args3; - if (!Array.isArray(parsedArgs)) { - throw new Error("Invalid arguments schema: not an array or tuple schema."); - } - const output = await func(...parsedArgs); - return this._def.output ? parseAsync(this._def.output, output, void 0, { callee: impl }) : output; - }); - return impl; - } - input(...args3) { - const F = this.constructor; - if (Array.isArray(args3[0])) { - return new F({ - type: "function", - input: new $ZodTuple({ - type: "tuple", - items: args3[0], - rest: args3[1] - }), - output: this._def.output - }); - } - return new F({ - type: "function", - input: args3[0], - output: this._def.output - }); - } - output(output) { - const F = this.constructor; - return new F({ - type: "function", - input: this._def.input, - output - }); - } - }; - } -}); - -// node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/to-json-schema.js -function toJSONSchema(input, _params) { - if (input instanceof $ZodRegistry) { - const gen2 = new JSONSchemaGenerator(_params); - const defs = {}; - for (const entry of input._idmap.entries()) { - const [_, schema2] = entry; - gen2.process(schema2); - } - const schemas = {}; - const external = { - registry: input, - uri: _params?.uri, - defs - }; - for (const entry of input._idmap.entries()) { - const [key, schema2] = entry; - schemas[key] = gen2.emit(schema2, { - ..._params, - external - }); - } - if (Object.keys(defs).length > 0) { - const defsSegment = gen2.target === "draft-2020-12" ? "$defs" : "definitions"; - schemas.__shared = { - [defsSegment]: defs - }; - } - return { schemas }; - } - const gen = new JSONSchemaGenerator(_params); - gen.process(input); - return gen.emit(input, _params); -} -function isTransforming(_schema, _ctx) { - const ctx = _ctx ?? { seen: /* @__PURE__ */ new Set() }; - if (ctx.seen.has(_schema)) - return false; - ctx.seen.add(_schema); - const schema2 = _schema; - const def = schema2._zod.def; - switch (def.type) { - case "string": - case "number": - case "bigint": - case "boolean": - case "date": - case "symbol": - case "undefined": - case "null": - case "any": - case "unknown": - case "never": - case "void": - case "literal": - case "enum": - case "nan": - case "file": - case "template_literal": - return false; - case "array": { - return isTransforming(def.element, ctx); - } - case "object": { - for (const key in def.shape) { - if (isTransforming(def.shape[key], ctx)) - return true; - } - return false; - } - case "union": { - for (const option of def.options) { - if (isTransforming(option, ctx)) - return true; - } - return false; - } - case "intersection": { - return isTransforming(def.left, ctx) || isTransforming(def.right, ctx); - } - case "tuple": { - for (const item of def.items) { - if (isTransforming(item, ctx)) - return true; - } - if (def.rest && isTransforming(def.rest, ctx)) - return true; - return false; - } - case "record": { - return isTransforming(def.keyType, ctx) || isTransforming(def.valueType, ctx); - } - case "map": { - return isTransforming(def.keyType, ctx) || isTransforming(def.valueType, ctx); - } - case "set": { - return isTransforming(def.valueType, ctx); - } - // inner types - case "promise": - case "optional": - case "nonoptional": - case "nullable": - case "readonly": - return isTransforming(def.innerType, ctx); - case "lazy": - return isTransforming(def.getter(), ctx); - case "default": { - return isTransforming(def.innerType, ctx); - } - case "prefault": { - return isTransforming(def.innerType, ctx); - } - case "custom": { - return false; - } - case "transform": { - return true; - } - case "pipe": { - return isTransforming(def.in, ctx) || isTransforming(def.out, ctx); - } - case "success": { - return false; - } - case "catch": { - return false; - } - default: - def; - } - throw new Error(`Unknown schema type: ${def.type}`); -} -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(); - JSONSchemaGenerator = class { - constructor(params) { - this.counter = 0; - this.metadataRegistry = params?.metadata ?? globalRegistry; - this.target = params?.target ?? "draft-2020-12"; - this.unrepresentable = params?.unrepresentable ?? "throw"; - this.override = params?.override ?? (() => { - }); - this.io = params?.io ?? "output"; - this.seen = /* @__PURE__ */ new Map(); - } - process(schema2, _params = { path: [], schemaPath: [] }) { - var _a; - const def = schema2._zod.def; - const formatMap = { - guid: "uuid", - url: "uri", - datetime: "date-time", - json_string: "json-string", - regex: "" - // do not set - }; - const seen = this.seen.get(schema2); - if (seen) { - seen.count++; - const isCycle = _params.schemaPath.includes(schema2); - if (isCycle) { - seen.cycle = _params.path; - } - return seen.schema; - } - const result = { schema: {}, count: 1, cycle: void 0, path: _params.path }; - this.seen.set(schema2, result); - const overrideSchema = schema2._zod.toJSONSchema?.(); - if (overrideSchema) { - result.schema = overrideSchema; - } else { - const params = { - ..._params, - schemaPath: [..._params.schemaPath, schema2], - path: _params.path - }; - const parent = schema2._zod.parent; - if (parent) { - result.ref = parent; - this.process(parent, params); - this.seen.get(parent).isParent = true; - } else { - const _json = result.schema; - switch (def.type) { - case "string": { - const json3 = _json; - json3.type = "string"; - const { minimum, maximum, format: format2, patterns, contentEncoding } = schema2._zod.bag; - if (typeof minimum === "number") - json3.minLength = minimum; - if (typeof maximum === "number") - json3.maxLength = maximum; - if (format2) { - json3.format = formatMap[format2] ?? format2; - if (json3.format === "") - delete json3.format; - } - if (contentEncoding) - json3.contentEncoding = contentEncoding; - if (patterns && patterns.size > 0) { - const regexes = [...patterns]; - if (regexes.length === 1) - json3.pattern = regexes[0].source; - else if (regexes.length > 1) { - result.schema.allOf = [ - ...regexes.map((regex4) => ({ - ...this.target === "draft-7" ? { type: "string" } : {}, - pattern: regex4.source - })) - ]; - } - } - break; - } - case "number": { - const json3 = _json; - const { minimum, maximum, format: format2, multipleOf, exclusiveMaximum, exclusiveMinimum } = schema2._zod.bag; - if (typeof format2 === "string" && format2.includes("int")) - json3.type = "integer"; - else - json3.type = "number"; - if (typeof exclusiveMinimum === "number") - json3.exclusiveMinimum = exclusiveMinimum; - if (typeof minimum === "number") { - json3.minimum = minimum; - if (typeof exclusiveMinimum === "number") { - if (exclusiveMinimum >= minimum) - delete json3.minimum; - else - delete json3.exclusiveMinimum; - } - } - if (typeof exclusiveMaximum === "number") - json3.exclusiveMaximum = exclusiveMaximum; - if (typeof maximum === "number") { - json3.maximum = maximum; - if (typeof exclusiveMaximum === "number") { - if (exclusiveMaximum <= maximum) - delete json3.maximum; - else - delete json3.exclusiveMaximum; - } - } - if (typeof multipleOf === "number") - json3.multipleOf = multipleOf; - break; - } - case "boolean": { - const json3 = _json; - json3.type = "boolean"; - break; - } - case "bigint": { - if (this.unrepresentable === "throw") { - throw new Error("BigInt cannot be represented in JSON Schema"); - } - break; - } - case "symbol": { - if (this.unrepresentable === "throw") { - throw new Error("Symbols cannot be represented in JSON Schema"); - } - break; - } - case "null": { - _json.type = "null"; - break; - } - case "any": { - break; - } - case "unknown": { - break; - } - case "undefined": { - if (this.unrepresentable === "throw") { - throw new Error("Undefined cannot be represented in JSON Schema"); - } - break; - } - case "void": { - if (this.unrepresentable === "throw") { - throw new Error("Void cannot be represented in JSON Schema"); - } - break; - } - case "never": { - _json.not = {}; - break; - } - case "date": { - if (this.unrepresentable === "throw") { - throw new Error("Date cannot be represented in JSON Schema"); - } - break; - } - case "array": { - const json3 = _json; - const { minimum, maximum } = schema2._zod.bag; - if (typeof minimum === "number") - json3.minItems = minimum; - if (typeof maximum === "number") - json3.maxItems = maximum; - json3.type = "array"; - json3.items = this.process(def.element, { ...params, path: [...params.path, "items"] }); - break; - } - case "object": { - const json3 = _json; - json3.type = "object"; - json3.properties = {}; - const shape = def.shape; - for (const key in shape) { - json3.properties[key] = this.process(shape[key], { - ...params, - path: [...params.path, "properties", key] - }); - } - const allKeys = new Set(Object.keys(shape)); - const requiredKeys = new Set([...allKeys].filter((key) => { - const v = def.shape[key]._zod; - if (this.io === "input") { - return v.optin === void 0; - } else { - return v.optout === void 0; - } - })); - if (requiredKeys.size > 0) { - json3.required = Array.from(requiredKeys); - } - if (def.catchall?._zod.def.type === "never") { - json3.additionalProperties = false; - } else if (!def.catchall) { - if (this.io === "output") - json3.additionalProperties = false; - } else if (def.catchall) { - json3.additionalProperties = this.process(def.catchall, { - ...params, - path: [...params.path, "additionalProperties"] - }); - } - break; - } - case "union": { - const json3 = _json; - json3.anyOf = def.options.map((x, i) => this.process(x, { - ...params, - path: [...params.path, "anyOf", i] - })); - break; - } - case "intersection": { - const json3 = _json; - const a = this.process(def.left, { - ...params, - path: [...params.path, "allOf", 0] - }); - const b = this.process(def.right, { - ...params, - path: [...params.path, "allOf", 1] - }); - const isSimpleIntersection = (val) => "allOf" in val && Object.keys(val).length === 1; - const allOf = [ - ...isSimpleIntersection(a) ? a.allOf : [a], - ...isSimpleIntersection(b) ? b.allOf : [b] - ]; - json3.allOf = allOf; - break; - } - case "tuple": { - const json3 = _json; - json3.type = "array"; - const prefixItems = def.items.map((x, i) => this.process(x, { ...params, path: [...params.path, "prefixItems", i] })); - if (this.target === "draft-2020-12") { - json3.prefixItems = prefixItems; - } else { - json3.items = prefixItems; - } - if (def.rest) { - const rest = this.process(def.rest, { - ...params, - path: [...params.path, "items"] - }); - if (this.target === "draft-2020-12") { - json3.items = rest; - } else { - json3.additionalItems = rest; - } - } - if (def.rest) { - json3.items = this.process(def.rest, { - ...params, - path: [...params.path, "items"] - }); - } - const { minimum, maximum } = schema2._zod.bag; - if (typeof minimum === "number") - json3.minItems = minimum; - if (typeof maximum === "number") - json3.maxItems = maximum; - break; - } - case "record": { - const json3 = _json; - json3.type = "object"; - json3.propertyNames = this.process(def.keyType, { ...params, path: [...params.path, "propertyNames"] }); - json3.additionalProperties = this.process(def.valueType, { - ...params, - path: [...params.path, "additionalProperties"] - }); - break; - } - case "map": { - if (this.unrepresentable === "throw") { - throw new Error("Map cannot be represented in JSON Schema"); - } - break; - } - case "set": { - if (this.unrepresentable === "throw") { - throw new Error("Set cannot be represented in JSON Schema"); - } - break; - } - case "enum": { - const json3 = _json; - const values = getEnumValues(def.entries); - if (values.every((v) => typeof v === "number")) - json3.type = "number"; - if (values.every((v) => typeof v === "string")) - json3.type = "string"; - json3.enum = values; - break; - } - case "literal": { - const json3 = _json; - const vals = []; - for (const val of def.values) { - if (val === void 0) { - if (this.unrepresentable === "throw") { - throw new Error("Literal `undefined` cannot be represented in JSON Schema"); - } else { - } - } else if (typeof val === "bigint") { - if (this.unrepresentable === "throw") { - throw new Error("BigInt literals cannot be represented in JSON Schema"); - } else { - vals.push(Number(val)); - } - } else { - vals.push(val); - } - } - if (vals.length === 0) { - } else if (vals.length === 1) { - const val = vals[0]; - json3.type = val === null ? "null" : typeof val; - json3.const = val; - } else { - if (vals.every((v) => typeof v === "number")) - json3.type = "number"; - if (vals.every((v) => typeof v === "string")) - json3.type = "string"; - if (vals.every((v) => typeof v === "boolean")) - json3.type = "string"; - if (vals.every((v) => v === null)) - json3.type = "null"; - json3.enum = vals; - } - break; - } - case "file": { - const json3 = _json; - const file = { - type: "string", - format: "binary", - contentEncoding: "binary" - }; - const { minimum, maximum, mime } = schema2._zod.bag; - if (minimum !== void 0) - file.minLength = minimum; - if (maximum !== void 0) - file.maxLength = maximum; - if (mime) { - if (mime.length === 1) { - file.contentMediaType = mime[0]; - Object.assign(json3, file); - } else { - json3.anyOf = mime.map((m) => { - const mFile = { ...file, contentMediaType: m }; - return mFile; - }); - } - } else { - Object.assign(json3, file); - } - break; - } - case "transform": { - if (this.unrepresentable === "throw") { - throw new Error("Transforms cannot be represented in JSON Schema"); - } - break; - } - case "nullable": { - const inner = this.process(def.innerType, params); - _json.anyOf = [inner, { type: "null" }]; - break; - } - case "nonoptional": { - this.process(def.innerType, params); - result.ref = def.innerType; - break; - } - case "success": { - const json3 = _json; - json3.type = "boolean"; - break; - } - case "default": { - this.process(def.innerType, params); - result.ref = def.innerType; - _json.default = JSON.parse(JSON.stringify(def.defaultValue)); - break; - } - case "prefault": { - this.process(def.innerType, params); - result.ref = def.innerType; - if (this.io === "input") - _json._prefault = JSON.parse(JSON.stringify(def.defaultValue)); - break; - } - case "catch": { - this.process(def.innerType, params); - result.ref = def.innerType; - let catchValue; - try { - catchValue = def.catchValue(void 0); - } catch { - throw new Error("Dynamic catch values are not supported in JSON Schema"); - } - _json.default = catchValue; - break; - } - case "nan": { - if (this.unrepresentable === "throw") { - throw new Error("NaN cannot be represented in JSON Schema"); - } - break; - } - case "template_literal": { - const json3 = _json; - const pattern = schema2._zod.pattern; - if (!pattern) - throw new Error("Pattern not found in template literal"); - json3.type = "string"; - json3.pattern = pattern.source; - break; - } - case "pipe": { - const innerType = this.io === "input" ? def.in._zod.def.type === "transform" ? def.out : def.in : def.out; - this.process(innerType, params); - result.ref = innerType; - break; - } - case "readonly": { - this.process(def.innerType, params); - result.ref = def.innerType; - _json.readOnly = true; - break; - } - // passthrough types - case "promise": { - this.process(def.innerType, params); - result.ref = def.innerType; - break; - } - case "optional": { - this.process(def.innerType, params); - result.ref = def.innerType; - break; - } - case "lazy": { - const innerType = schema2._zod.innerType; - this.process(innerType, params); - result.ref = innerType; - break; - } - case "custom": { - if (this.unrepresentable === "throw") { - throw new Error("Custom types cannot be represented in JSON Schema"); - } - break; - } - default: { - def; - } - } - } - } - const meta = this.metadataRegistry.get(schema2); - if (meta) - Object.assign(result.schema, meta); - if (this.io === "input" && isTransforming(schema2)) { - delete result.schema.examples; - delete result.schema.default; - } - if (this.io === "input" && result.schema._prefault) - (_a = result.schema).default ?? (_a.default = result.schema._prefault); - delete result.schema._prefault; - const _result = this.seen.get(schema2); - return _result.schema; - } - emit(schema2, _params) { - const params = { - cycles: _params?.cycles ?? "ref", - reused: _params?.reused ?? "inline", - // unrepresentable: _params?.unrepresentable ?? "throw", - // uri: _params?.uri ?? ((id) => `${id}`), - external: _params?.external ?? void 0 - }; - const root2 = this.seen.get(schema2); - if (!root2) - throw new Error("Unprocessed schema. This is a bug in Zod."); - const makeURI = (entry) => { - const defsSegment = this.target === "draft-2020-12" ? "$defs" : "definitions"; - if (params.external) { - const externalId = params.external.registry.get(entry[0])?.id; - const uriGenerator = params.external.uri ?? ((id2) => id2); - if (externalId) { - return { ref: uriGenerator(externalId) }; - } - const id = entry[1].defId ?? entry[1].schema.id ?? `schema${this.counter++}`; - entry[1].defId = id; - return { defId: id, ref: `${uriGenerator("__shared")}#/${defsSegment}/${id}` }; - } - if (entry[1] === root2) { - return { ref: "#" }; - } - const uriPrefix = `#`; - const defUriPrefix = `${uriPrefix}/${defsSegment}/`; - const defId = entry[1].schema.id ?? `__schema${this.counter++}`; - return { defId, ref: defUriPrefix + defId }; - }; - const extractToDef = (entry) => { - if (entry[1].schema.$ref) { - return; - } - const seen = entry[1]; - const { ref, defId } = makeURI(entry); - seen.def = { ...seen.schema }; - if (defId) - seen.defId = defId; - const schema3 = seen.schema; - for (const key in schema3) { - delete schema3[key]; - } - schema3.$ref = ref; - }; - if (params.cycles === "throw") { - for (const entry of this.seen.entries()) { - const seen = entry[1]; - if (seen.cycle) { - throw new Error(`Cycle detected: #/${seen.cycle?.join("/")}/ - -Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`); - } - } - } - for (const entry of this.seen.entries()) { - const seen = entry[1]; - if (schema2 === entry[0]) { - extractToDef(entry); - continue; - } - if (params.external) { - const ext = params.external.registry.get(entry[0])?.id; - if (schema2 !== entry[0] && ext) { - extractToDef(entry); - continue; - } - } - const id = this.metadataRegistry.get(entry[0])?.id; - if (id) { - extractToDef(entry); - continue; - } - if (seen.cycle) { - extractToDef(entry); - continue; - } - if (seen.count > 1) { - if (params.reused === "ref") { - extractToDef(entry); - continue; - } - } - } - const flattenRef = (zodSchema, params2) => { - const seen = this.seen.get(zodSchema); - const schema3 = seen.def ?? seen.schema; - const _cached = { ...schema3 }; - if (seen.ref === null) { - return; - } - const ref = seen.ref; - seen.ref = null; - if (ref) { - flattenRef(ref, params2); - const refSchema = this.seen.get(ref).schema; - if (refSchema.$ref && params2.target === "draft-7") { - schema3.allOf = schema3.allOf ?? []; - schema3.allOf.push(refSchema); - } else { - Object.assign(schema3, refSchema); - Object.assign(schema3, _cached); - } - } - if (!seen.isParent) - this.override({ - zodSchema, - jsonSchema: schema3, - path: seen.path ?? [] - }); - }; - for (const entry of [...this.seen.entries()].reverse()) { - flattenRef(entry[0], { target: this.target }); - } - const result = {}; - if (this.target === "draft-2020-12") { - result.$schema = "https://json-schema.org/draft/2020-12/schema"; - } else if (this.target === "draft-7") { - result.$schema = "http://json-schema.org/draft-07/schema#"; - } else { - console.warn(`Invalid target: ${this.target}`); - } - if (params.external?.uri) { - const id = params.external.registry.get(schema2)?.id; - if (!id) - throw new Error("Schema is missing an `id` property"); - result.$id = params.external.uri(id); - } - Object.assign(result, root2.def); - const defs = params.external?.defs ?? {}; - for (const entry of this.seen.entries()) { - const seen = entry[1]; - if (seen.def && seen.defId) { - defs[seen.defId] = seen.def; - } - } - if (params.external) { - } else { - if (Object.keys(defs).length > 0) { - if (this.target === "draft-2020-12") { - result.$defs = defs; - } else { - result.definitions = defs; - } - } - } - try { - return JSON.parse(JSON.stringify(result)); - } catch (_err) { - throw new Error("Error converting schema to JSON."); - } - } - }; - } -}); - -// node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/json-schema.js -var json_schema_exports = {}; -var init_json_schema = __esm({ - "node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/json-schema.js"() { - } -}); - -// node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/index.js -var core_exports2 = {}; -__export(core_exports2, { - $ZodAny: () => $ZodAny, - $ZodArray: () => $ZodArray, - $ZodAsyncError: () => $ZodAsyncError, - $ZodBase64: () => $ZodBase64, - $ZodBase64URL: () => $ZodBase64URL, - $ZodBigInt: () => $ZodBigInt, - $ZodBigIntFormat: () => $ZodBigIntFormat, - $ZodBoolean: () => $ZodBoolean, - $ZodCIDRv4: () => $ZodCIDRv4, - $ZodCIDRv6: () => $ZodCIDRv6, - $ZodCUID: () => $ZodCUID, - $ZodCUID2: () => $ZodCUID2, - $ZodCatch: () => $ZodCatch, - $ZodCheck: () => $ZodCheck, - $ZodCheckBigIntFormat: () => $ZodCheckBigIntFormat, - $ZodCheckEndsWith: () => $ZodCheckEndsWith, - $ZodCheckGreaterThan: () => $ZodCheckGreaterThan, - $ZodCheckIncludes: () => $ZodCheckIncludes, - $ZodCheckLengthEquals: () => $ZodCheckLengthEquals, - $ZodCheckLessThan: () => $ZodCheckLessThan, - $ZodCheckLowerCase: () => $ZodCheckLowerCase, - $ZodCheckMaxLength: () => $ZodCheckMaxLength, - $ZodCheckMaxSize: () => $ZodCheckMaxSize, - $ZodCheckMimeType: () => $ZodCheckMimeType, - $ZodCheckMinLength: () => $ZodCheckMinLength, - $ZodCheckMinSize: () => $ZodCheckMinSize, - $ZodCheckMultipleOf: () => $ZodCheckMultipleOf, - $ZodCheckNumberFormat: () => $ZodCheckNumberFormat, - $ZodCheckOverwrite: () => $ZodCheckOverwrite, - $ZodCheckProperty: () => $ZodCheckProperty, - $ZodCheckRegex: () => $ZodCheckRegex, - $ZodCheckSizeEquals: () => $ZodCheckSizeEquals, - $ZodCheckStartsWith: () => $ZodCheckStartsWith, - $ZodCheckStringFormat: () => $ZodCheckStringFormat, - $ZodCheckUpperCase: () => $ZodCheckUpperCase, - $ZodCustom: () => $ZodCustom, - $ZodCustomStringFormat: () => $ZodCustomStringFormat, - $ZodDate: () => $ZodDate, - $ZodDefault: () => $ZodDefault, - $ZodDiscriminatedUnion: () => $ZodDiscriminatedUnion, - $ZodE164: () => $ZodE164, - $ZodEmail: () => $ZodEmail, - $ZodEmoji: () => $ZodEmoji, - $ZodEnum: () => $ZodEnum, - $ZodError: () => $ZodError, - $ZodFile: () => $ZodFile, - $ZodFunction: () => $ZodFunction, - $ZodGUID: () => $ZodGUID, - $ZodIPv4: () => $ZodIPv4, - $ZodIPv6: () => $ZodIPv6, - $ZodISODate: () => $ZodISODate, - $ZodISODateTime: () => $ZodISODateTime, - $ZodISODuration: () => $ZodISODuration, - $ZodISOTime: () => $ZodISOTime, - $ZodIntersection: () => $ZodIntersection, - $ZodJWT: () => $ZodJWT, - $ZodKSUID: () => $ZodKSUID, - $ZodLazy: () => $ZodLazy, - $ZodLiteral: () => $ZodLiteral, - $ZodMap: () => $ZodMap, - $ZodNaN: () => $ZodNaN, - $ZodNanoID: () => $ZodNanoID, - $ZodNever: () => $ZodNever, - $ZodNonOptional: () => $ZodNonOptional, - $ZodNull: () => $ZodNull, - $ZodNullable: () => $ZodNullable, - $ZodNumber: () => $ZodNumber, - $ZodNumberFormat: () => $ZodNumberFormat, - $ZodObject: () => $ZodObject, - $ZodOptional: () => $ZodOptional, - $ZodPipe: () => $ZodPipe, - $ZodPrefault: () => $ZodPrefault, - $ZodPromise: () => $ZodPromise, - $ZodReadonly: () => $ZodReadonly, - $ZodRealError: () => $ZodRealError, - $ZodRecord: () => $ZodRecord, - $ZodRegistry: () => $ZodRegistry, - $ZodSet: () => $ZodSet, - $ZodString: () => $ZodString, - $ZodStringFormat: () => $ZodStringFormat, - $ZodSuccess: () => $ZodSuccess, - $ZodSymbol: () => $ZodSymbol, - $ZodTemplateLiteral: () => $ZodTemplateLiteral, - $ZodTransform: () => $ZodTransform, - $ZodTuple: () => $ZodTuple, - $ZodType: () => $ZodType, - $ZodULID: () => $ZodULID, - $ZodURL: () => $ZodURL, - $ZodUUID: () => $ZodUUID, - $ZodUndefined: () => $ZodUndefined, - $ZodUnion: () => $ZodUnion, - $ZodUnknown: () => $ZodUnknown, - $ZodVoid: () => $ZodVoid, - $ZodXID: () => $ZodXID, - $brand: () => $brand, - $constructor: () => $constructor, - $input: () => $input, - $output: () => $output, - Doc: () => Doc, - JSONSchema: () => json_schema_exports, - JSONSchemaGenerator: () => JSONSchemaGenerator, - NEVER: () => NEVER4, - TimePrecision: () => TimePrecision, - _any: () => _any, - _array: () => _array, - _base64: () => _base64, - _base64url: () => _base64url, - _bigint: () => _bigint, - _boolean: () => _boolean, - _catch: () => _catch, - _cidrv4: () => _cidrv4, - _cidrv6: () => _cidrv6, - _coercedBigint: () => _coercedBigint, - _coercedBoolean: () => _coercedBoolean, - _coercedDate: () => _coercedDate, - _coercedNumber: () => _coercedNumber, - _coercedString: () => _coercedString, - _cuid: () => _cuid, - _cuid2: () => _cuid2, - _custom: () => _custom, - _date: () => _date, - _default: () => _default, - _discriminatedUnion: () => _discriminatedUnion, - _e164: () => _e164, - _email: () => _email, - _emoji: () => _emoji2, - _endsWith: () => _endsWith, - _enum: () => _enum, - _file: () => _file, - _float32: () => _float32, - _float64: () => _float64, - _gt: () => _gt, - _gte: () => _gte, - _guid: () => _guid, - _includes: () => _includes, - _int: () => _int, - _int32: () => _int32, - _int64: () => _int64, - _intersection: () => _intersection, - _ipv4: () => _ipv4, - _ipv6: () => _ipv6, - _isoDate: () => _isoDate, - _isoDateTime: () => _isoDateTime, - _isoDuration: () => _isoDuration, - _isoTime: () => _isoTime, - _jwt: () => _jwt, - _ksuid: () => _ksuid, - _lazy: () => _lazy, - _length: () => _length, - _literal: () => _literal, - _lowercase: () => _lowercase, - _lt: () => _lt, - _lte: () => _lte, - _map: () => _map, - _max: () => _lte, - _maxLength: () => _maxLength, - _maxSize: () => _maxSize, - _mime: () => _mime, - _min: () => _gte, - _minLength: () => _minLength, - _minSize: () => _minSize, - _multipleOf: () => _multipleOf, - _nan: () => _nan, - _nanoid: () => _nanoid, - _nativeEnum: () => _nativeEnum, - _negative: () => _negative, - _never: () => _never, - _nonnegative: () => _nonnegative, - _nonoptional: () => _nonoptional, - _nonpositive: () => _nonpositive, - _normalize: () => _normalize, - _null: () => _null2, - _nullable: () => _nullable, - _number: () => _number, - _optional: () => _optional, - _overwrite: () => _overwrite, - _parse: () => _parse, - _parseAsync: () => _parseAsync, - _pipe: () => _pipe, - _positive: () => _positive, - _promise: () => _promise, - _property: () => _property, - _readonly: () => _readonly, - _record: () => _record, - _refine: () => _refine, - _regex: () => _regex, - _safeParse: () => _safeParse, - _safeParseAsync: () => _safeParseAsync, - _set: () => _set, - _size: () => _size, - _startsWith: () => _startsWith, - _string: () => _string, - _stringFormat: () => _stringFormat, - _stringbool: () => _stringbool, - _success: () => _success, - _symbol: () => _symbol, - _templateLiteral: () => _templateLiteral, - _toLowerCase: () => _toLowerCase, - _toUpperCase: () => _toUpperCase, - _transform: () => _transform, - _trim: () => _trim, - _tuple: () => _tuple, - _uint32: () => _uint32, - _uint64: () => _uint64, - _ulid: () => _ulid, - _undefined: () => _undefined2, - _union: () => _union, - _unknown: () => _unknown, - _uppercase: () => _uppercase, - _url: () => _url2, - _uuid: () => _uuid, - _uuidv4: () => _uuidv4, - _uuidv6: () => _uuidv6, - _uuidv7: () => _uuidv7, - _void: () => _void, - _xid: () => _xid, - clone: () => clone, - config: () => config, - flattenError: () => flattenError2, - formatError: () => formatError, - function: () => _function, - globalConfig: () => globalConfig, - globalRegistry: () => globalRegistry, - isValidBase64: () => isValidBase64, - isValidBase64URL: () => isValidBase64URL, - isValidJWT: () => isValidJWT4, - locales: () => locales_exports, - parse: () => parse3, - parseAsync: () => parseAsync, - prettifyError: () => prettifyError, - regexes: () => regexes_exports, - registry: () => registry2, - safeParse: () => safeParse2, - safeParseAsync: () => safeParseAsync, - toDotPath: () => toDotPath, - toJSONSchema: () => toJSONSchema, - treeifyError: () => treeifyError, - util: () => util_exports, - version: () => version -}); -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_schemas(); - init_checks(); - init_versions(); - init_util2(); - init_regexes(); - init_locales(); - init_registries(); - init_doc(); - init_function(); - init_api(); - init_to_json_schema(); - init_json_schema(); - } -}); - -// node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/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"() { - ignoreOverride2 = Symbol("Let zodToJsonSchema decide on which parser to use"); - jsonDescription = (jsonSchema2, def) => { - if (def.description) { - try { - return { - ...jsonSchema2, - ...JSON.parse(def.description) - }; - } catch { - } - } - return jsonSchema2; - }; - defaultOptions = { - name: void 0, - $refStrategy: "root", - basePath: ["#"], - effectStrategy: "input", - pipeStrategy: "all", - dateStrategy: "format:date-time", - mapStrategy: "entries", - removeAdditionalStrategy: "passthrough", - allowedAdditionalProperties: true, - rejectedAdditionalProperties: false, - definitionPath: "definitions", - target: "jsonSchema7", - strictUnions: false, - definitions: {}, - errorMessages: false, - markdownDescription: false, - patternStrategy: "escape", - applyRegexFlags: false, - emailStrategy: "format:email", - base64Strategy: "contentEncoding:base64", - nameStrategy: "ref", - openAiAnyTypeName: "OpenAiAnyType" - }; - getDefaultOptions = (options) => typeof options === "string" ? { - ...defaultOptions, - name: options - } : { - ...defaultOptions, - ...options - }; - } -}); - -// node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/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"() { - init_Options(); - getRefs = (options) => { - const _options = getDefaultOptions(options); - const currentPath = _options.name !== void 0 ? [..._options.basePath, _options.definitionPath, _options.name] : _options.basePath; - return { - ..._options, - flags: { hasReferencedOpenAiAnyType: false }, - currentPath, - propertyPath: void 0, - seen: new Map(Object.entries(_options.definitions).map(([name, def]) => [ - def._def, - { - def: def._def, - path: [..._options.basePath, _options.definitionPath, name], - // Resolution of references will be forced even though seen, so it's ok that the schema is undefined here for now. - jsonSchema: void 0 - } - ])) - }; - }; - } -}); - -// node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/errorMessages.js -function addErrorMessage(res, key, errorMessage, refs) { - if (!refs?.errorMessages) - return; - if (errorMessage) { - res.errorMessage = { - ...res.errorMessage, - [key]: errorMessage - }; - } -} -function setResponseValueAndErrors(res, key, value2, errorMessage, refs) { - res[key] = value2; - 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@3.25.76/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"() { - getRelativePath = (pathA, pathB) => { - let i = 0; - for (; i < pathA.length && i < pathB.length; i++) { - if (pathA[i] !== pathB[i]) - break; - } - return [(pathA.length - i).toString(), ...pathB.slice(i)].join("/"); - }; - } -}); - -// 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 -function parseAnyDef(refs) { - if (refs.target !== "openAi") { - return {}; - } - const anyDefinitionPath = [ - ...refs.basePath, - refs.definitionPath, - refs.openAiAnyTypeName - ]; - refs.flags.hasReferencedOpenAiAnyType = true; - return { - $ref: refs.$refStrategy === "relative" ? getRelativePath(anyDefinitionPath, refs.currentPath) : anyDefinitionPath.join("/") - }; -} -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"() { - 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 -function parseArrayDef(def, refs) { - const res = { - type: "array" - }; - if (def.type?._def && def.type?._def?.typeName !== ZodFirstPartyTypeKind2.ZodAny) { - res.items = parseDef(def.type._def, { - ...refs, - currentPath: [...refs.currentPath, "items"] - }); - } - if (def.minLength) { - setResponseValueAndErrors(res, "minItems", def.minLength.value, def.minLength.message, refs); - } - if (def.maxLength) { - setResponseValueAndErrors(res, "maxItems", def.maxLength.value, def.maxLength.message, refs); - } - if (def.exactLength) { - setResponseValueAndErrors(res, "minItems", def.exactLength.value, def.exactLength.message, refs); - setResponseValueAndErrors(res, "maxItems", def.exactLength.value, def.exactLength.message, 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"() { - 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 -function parseBigintDef(def, refs) { - const res = { - type: "integer", - format: "int64" - }; - if (!def.checks) - return res; - for (const check of def.checks) { - switch (check.kind) { - case "min": - if (refs.target === "jsonSchema7") { - if (check.inclusive) { - setResponseValueAndErrors(res, "minimum", check.value, check.message, refs); - } else { - setResponseValueAndErrors(res, "exclusiveMinimum", check.value, check.message, refs); - } - } else { - if (!check.inclusive) { - res.exclusiveMinimum = true; - } - setResponseValueAndErrors(res, "minimum", check.value, check.message, refs); - } - break; - case "max": - if (refs.target === "jsonSchema7") { - if (check.inclusive) { - setResponseValueAndErrors(res, "maximum", check.value, check.message, refs); - } else { - setResponseValueAndErrors(res, "exclusiveMaximum", check.value, check.message, refs); - } - } else { - if (!check.inclusive) { - res.exclusiveMaximum = true; - } - setResponseValueAndErrors(res, "maximum", check.value, check.message, refs); - } - break; - case "multipleOf": - setResponseValueAndErrors(res, "multipleOf", check.value, check.message, refs); - break; - } - } - 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"() { - 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 -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@3.25.76/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"() { - 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 -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"() { - init_parseDef(); - parseCatchDef = (def, refs) => { - return parseDef(def.innerType._def, refs); - }; - } -}); - -// 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 -function parseDateDef(def, refs, overrideDateStrategy) { - const strategy = overrideDateStrategy ?? refs.dateStrategy; - if (Array.isArray(strategy)) { - return { - anyOf: strategy.map((item, i) => parseDateDef(def, refs, item)) - }; - } - switch (strategy) { - case "string": - case "format:date-time": - return { - type: "string", - format: "date-time" - }; - case "format:date": - return { - type: "string", - format: "date" - }; - case "integer": - return integerDateParser(def, refs); - } -} -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"() { - init_errorMessages(); - integerDateParser = (def, refs) => { - const res = { - type: "integer", - format: "unix-time" - }; - if (refs.target === "openApi3") { - return res; - } - for (const check of def.checks) { - switch (check.kind) { - case "min": - setResponseValueAndErrors( - res, - "minimum", - check.value, - // This is in milliseconds - check.message, - refs - ); - break; - case "max": - setResponseValueAndErrors( - res, - "maximum", - check.value, - // This is in milliseconds - check.message, - refs - ); - break; - } - } - return res; - }; - } -}); - -// 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 -function parseDefaultDef(_def, refs) { - return { - ...parseDef(_def.innerType._def, refs), - default: _def.defaultValue() - }; -} -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"() { - 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 -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"() { - 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 -function parseEnumDef(def) { - return { - type: "string", - enum: Array.from(def.values) - }; -} -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@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/intersection.js -function parseIntersectionDef(def, refs) { - const allOf = [ - parseDef(def.left._def, { - ...refs, - currentPath: [...refs.currentPath, "allOf", "0"] - }), - parseDef(def.right._def, { - ...refs, - currentPath: [...refs.currentPath, "allOf", "1"] - }) - ].filter((x) => !!x); - let unevaluatedProperties = refs.target === "jsonSchema2019-09" ? { unevaluatedProperties: false } : void 0; - const mergedAllOf = []; - allOf.forEach((schema2) => { - if (isJsonSchema7AllOfType(schema2)) { - mergedAllOf.push(...schema2.allOf); - if (schema2.unevaluatedProperties === void 0) { - unevaluatedProperties = void 0; - } - } else { - let nestedSchema = schema2; - if ("additionalProperties" in schema2 && schema2.additionalProperties === false) { - const { additionalProperties, ...rest } = schema2; - nestedSchema = rest; - } else { - unevaluatedProperties = void 0; - } - mergedAllOf.push(nestedSchema); - } - }); - return mergedAllOf.length ? { - allOf: mergedAllOf, - ...unevaluatedProperties - } : void 0; -} -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"() { - init_parseDef(); - isJsonSchema7AllOfType = (type2) => { - if ("type" in type2 && type2.type === "string") - return false; - return "allOf" in type2; - }; - } -}); - -// 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 -function parseLiteralDef(def, refs) { - const parsedType4 = typeof def.value; - if (parsedType4 !== "bigint" && parsedType4 !== "number" && parsedType4 !== "boolean" && parsedType4 !== "string") { - return { - type: Array.isArray(def.value) ? "array" : "object" - }; - } - if (refs.target === "openApi3") { - return { - type: parsedType4 === "bigint" ? "integer" : parsedType4, - enum: [def.value] - }; - } - return { - type: parsedType4 === "bigint" ? "integer" : parsedType4, - 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@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/string.js -function parseStringDef(def, refs) { - const res = { - type: "string" - }; - if (def.checks) { - for (const check of def.checks) { - switch (check.kind) { - case "min": - setResponseValueAndErrors(res, "minLength", typeof res.minLength === "number" ? Math.max(res.minLength, check.value) : check.value, check.message, refs); - break; - case "max": - setResponseValueAndErrors(res, "maxLength", typeof res.maxLength === "number" ? Math.min(res.maxLength, check.value) : check.value, check.message, refs); - break; - case "email": - switch (refs.emailStrategy) { - case "format:email": - addFormat(res, "email", check.message, refs); - break; - case "format:idn-email": - addFormat(res, "idn-email", check.message, refs); - break; - case "pattern:zod": - addPattern(res, zodPatterns.email, check.message, refs); - break; - } - break; - case "url": - addFormat(res, "uri", check.message, refs); - break; - case "uuid": - addFormat(res, "uuid", check.message, refs); - break; - case "regex": - addPattern(res, check.regex, check.message, refs); - break; - case "cuid": - addPattern(res, zodPatterns.cuid, check.message, refs); - break; - case "cuid2": - addPattern(res, zodPatterns.cuid2, check.message, refs); - break; - case "startsWith": - addPattern(res, RegExp(`^${escapeLiteralCheckValue(check.value, refs)}`), check.message, refs); - break; - case "endsWith": - addPattern(res, RegExp(`${escapeLiteralCheckValue(check.value, refs)}$`), check.message, refs); - break; - case "datetime": - addFormat(res, "date-time", check.message, refs); - break; - case "date": - addFormat(res, "date", check.message, refs); - break; - case "time": - addFormat(res, "time", check.message, refs); - break; - case "duration": - addFormat(res, "duration", check.message, refs); - break; - case "length": - setResponseValueAndErrors(res, "minLength", typeof res.minLength === "number" ? Math.max(res.minLength, check.value) : check.value, check.message, refs); - setResponseValueAndErrors(res, "maxLength", typeof res.maxLength === "number" ? Math.min(res.maxLength, check.value) : check.value, check.message, refs); - break; - case "includes": { - addPattern(res, RegExp(escapeLiteralCheckValue(check.value, refs)), check.message, refs); - break; - } - case "ip": { - if (check.version !== "v6") { - addFormat(res, "ipv4", check.message, refs); - } - if (check.version !== "v4") { - addFormat(res, "ipv6", check.message, refs); - } - break; - } - case "base64url": - addPattern(res, zodPatterns.base64url, check.message, refs); - break; - case "jwt": - addPattern(res, zodPatterns.jwt, check.message, refs); - break; - case "cidr": { - if (check.version !== "v6") { - addPattern(res, zodPatterns.ipv4Cidr, check.message, refs); - } - if (check.version !== "v4") { - addPattern(res, zodPatterns.ipv6Cidr, check.message, refs); - } - break; - } - case "emoji": - addPattern(res, zodPatterns.emoji(), check.message, refs); - break; - case "ulid": { - addPattern(res, zodPatterns.ulid, check.message, refs); - break; - } - case "base64": { - switch (refs.base64Strategy) { - case "format:binary": { - addFormat(res, "binary", check.message, refs); - break; - } - case "contentEncoding:base64": { - setResponseValueAndErrors(res, "contentEncoding", "base64", check.message, refs); - break; - } - case "pattern:zod": { - addPattern(res, zodPatterns.base64, check.message, refs); - break; - } - } - break; - } - case "nanoid": { - addPattern(res, zodPatterns.nanoid, check.message, refs); - } - case "toLowerCase": - case "toUpperCase": - case "trim": - break; - default: - /* @__PURE__ */ ((_) => { - })(check); - } - } - } - return res; -} -function escapeLiteralCheckValue(literal, refs) { - return refs.patternStrategy === "escape" ? escapeNonAlphaNumeric(literal) : literal; -} -function escapeNonAlphaNumeric(source) { - let result = ""; - for (let i = 0; i < source.length; i++) { - if (!ALPHA_NUMERIC2.has(source[i])) { - result += "\\"; - } - result += source[i]; - } - return result; -} -function addFormat(schema2, value2, message, refs) { - if (schema2.format || schema2.anyOf?.some((x) => x.format)) { - if (!schema2.anyOf) { - schema2.anyOf = []; - } - if (schema2.format) { - schema2.anyOf.push({ - format: schema2.format, - ...schema2.errorMessage && refs.errorMessages && { - errorMessage: { format: schema2.errorMessage.format } - } - }); - delete schema2.format; - if (schema2.errorMessage) { - delete schema2.errorMessage.format; - if (Object.keys(schema2.errorMessage).length === 0) { - delete schema2.errorMessage; - } - } - } - schema2.anyOf.push({ - format: value2, - ...message && refs.errorMessages && { errorMessage: { format: message } } - }); - } else { - setResponseValueAndErrors(schema2, "format", value2, message, refs); - } -} -function addPattern(schema2, regex4, message, refs) { - if (schema2.pattern || schema2.allOf?.some((x) => x.pattern)) { - if (!schema2.allOf) { - schema2.allOf = []; - } - if (schema2.pattern) { - schema2.allOf.push({ - pattern: schema2.pattern, - ...schema2.errorMessage && refs.errorMessages && { - errorMessage: { pattern: schema2.errorMessage.pattern } - } - }); - delete schema2.pattern; - if (schema2.errorMessage) { - delete schema2.errorMessage.pattern; - if (Object.keys(schema2.errorMessage).length === 0) { - delete schema2.errorMessage; - } - } - } - schema2.allOf.push({ - pattern: stringifyRegExpWithFlags(regex4, refs), - ...message && refs.errorMessages && { errorMessage: { pattern: message } } - }); - } else { - setResponseValueAndErrors(schema2, "pattern", stringifyRegExpWithFlags(regex4, refs), message, refs); - } -} -function stringifyRegExpWithFlags(regex4, refs) { - if (!refs.applyRegexFlags || !regex4.flags) { - return regex4.source; - } - const flags = { - i: regex4.flags.includes("i"), - m: regex4.flags.includes("m"), - s: regex4.flags.includes("s") - // `.` matches newlines - }; - const source = flags.i ? regex4.source.toLowerCase() : regex4.source; - let pattern = ""; - let isEscaped = false; - let inCharGroup = false; - let inCharRange = false; - for (let i = 0; i < source.length; i++) { - if (isEscaped) { - pattern += source[i]; - isEscaped = false; - continue; - } - if (flags.i) { - if (inCharGroup) { - if (source[i].match(/[a-z]/)) { - if (inCharRange) { - pattern += source[i]; - pattern += `${source[i - 2]}-${source[i]}`.toUpperCase(); - inCharRange = false; - } else if (source[i + 1] === "-" && source[i + 2]?.match(/[a-z]/)) { - pattern += source[i]; - inCharRange = true; - } else { - pattern += `${source[i]}${source[i].toUpperCase()}`; - } - continue; - } - } else if (source[i].match(/[a-z]/)) { - pattern += `[${source[i]}${source[i].toUpperCase()}]`; - continue; - } - } - if (flags.m) { - if (source[i] === "^") { - pattern += `(^|(?<=[\r -]))`; - continue; - } else if (source[i] === "$") { - pattern += `($|(?=[\r -]))`; - continue; - } - } - if (flags.s && source[i] === ".") { - pattern += inCharGroup ? `${source[i]}\r -` : `[${source[i]}\r -]`; - continue; - } - pattern += source[i]; - if (source[i] === "\\") { - isEscaped = true; - } else if (inCharGroup && source[i] === "]") { - inCharGroup = false; - } else if (!inCharGroup && source[i] === "[") { - inCharGroup = true; - } - } - try { - new RegExp(pattern); - } catch { - console.warn(`Could not convert regex pattern at ${refs.currentPath.join("/")} to a flag-independent form! Falling back to the flag-ignorant source`); - return regex4.source; - } - return pattern; -} -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"() { - init_errorMessages(); - emojiRegex4 = void 0; - zodPatterns = { - /** - * `c` was changed to `[cC]` to replicate /i flag - */ - cuid: /^[cC][^\s-]{8,}$/, - cuid2: /^[0-9a-z]+$/, - ulid: /^[0-9A-HJKMNP-TV-Z]{26}$/, - /** - * `a-z` was added to replicate /i flag - */ - email: /^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/, - /** - * Constructed a valid Unicode RegExp - * - * Lazily instantiate since this type of regex isn't supported - * in all envs (e.g. React Native). - * - * See: - * https://github.com/colinhacks/zod/issues/2433 - * Fix in Zod: - * https://github.com/colinhacks/zod/commit/9340fd51e48576a75adc919bff65dbc4a5d4c99b - */ - emoji: () => { - if (emojiRegex4 === void 0) { - emojiRegex4 = RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$", "u"); - } - return emojiRegex4; - }, - /** - * Unused - */ - uuid: /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/, - /** - * Unused - */ - ipv4: /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/, - ipv4Cidr: /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/, - /** - * Unused - */ - ipv6: /^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/, - ipv6Cidr: /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/, - base64: /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, - base64url: /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/, - nanoid: /^[a-zA-Z0-9_-]{21}$/, - jwt: /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/ - }; - ALPHA_NUMERIC2 = new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789"); - } -}); - -// 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 -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) { - return { - type: "object", - required: def.keyType._def.values, - properties: def.keyType._def.values.reduce((acc, key) => ({ - ...acc, - [key]: parseDef(def.valueType._def, { - ...refs, - currentPath: [...refs.currentPath, "properties", key] - }) ?? parseAnyDef(refs) - }), {}), - additionalProperties: refs.rejectedAdditionalProperties - }; - } - const schema2 = { - type: "object", - additionalProperties: parseDef(def.valueType._def, { - ...refs, - currentPath: [...refs.currentPath, "additionalProperties"] - }) ?? refs.allowedAdditionalProperties - }; - if (refs.target === "openApi3") { - return schema2; - } - if (def.keyType?._def.typeName === ZodFirstPartyTypeKind2.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) { - 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) { - const { type: type2, ...keyType } = parseBrandedDef(def.keyType._def, refs); - return { - ...schema2, - propertyNames: keyType - }; - } - 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"() { - init_zod(); - init_parseDef(); - init_string(); - init_branded(); - 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/map.js -function parseMapDef(def, refs) { - if (refs.mapStrategy === "record") { - return parseRecordDef(def, refs); - } - const keys = parseDef(def.keyType._def, { - ...refs, - currentPath: [...refs.currentPath, "items", "items", "0"] - }) || parseAnyDef(refs); - const values = parseDef(def.valueType._def, { - ...refs, - currentPath: [...refs.currentPath, "items", "items", "1"] - }) || parseAnyDef(refs); - return { - type: "array", - maxItems: 125, - items: { - type: "array", - items: [keys, values], - minItems: 2, - maxItems: 2 - } - }; -} -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"() { - 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 -function parseNativeEnumDef(def) { - const object2 = def.values; - const actualKeys = Object.keys(def.values).filter((key) => { - return typeof object2[object2[key]] !== "number"; - }); - const actualValues = actualKeys.map((key) => object2[key]); - const parsedTypes = Array.from(new Set(actualValues.map((values) => typeof values))); - return { - type: parsedTypes.length === 1 ? parsedTypes[0] === "string" ? "string" : "number" : ["string", "number"], - enum: actualValues - }; -} -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@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/never.js -function parseNeverDef(refs) { - return refs.target === "openAi" ? void 0 : { - not: parseAnyDef({ - ...refs, - currentPath: [...refs.currentPath, "not"] - }) - }; -} -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"() { - 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 -function parseNullDef(refs) { - return refs.target === "openApi3" ? { - enum: ["null"], - nullable: true - } : { - type: "null" - }; -} -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@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/union.js -function parseUnionDef(def, refs) { - if (refs.target === "openApi3") - return asAnyOf(def, refs); - const options = def.options instanceof Map ? Array.from(def.options.values()) : def.options; - if (options.every((x) => x._def.typeName in primitiveMappings && (!x._def.checks || !x._def.checks.length))) { - const types = options.reduce((types2, x) => { - const type2 = primitiveMappings[x._def.typeName]; - return type2 && !types2.includes(type2) ? [...types2, type2] : types2; - }, []); - return { - type: types.length > 1 ? types : types[0] - }; - } else if (options.every((x) => x._def.typeName === "ZodLiteral" && !x.description)) { - const types = options.reduce((acc, x) => { - const type2 = typeof x._def.value; - switch (type2) { - case "string": - case "number": - case "boolean": - return [...acc, type2]; - case "bigint": - return [...acc, "integer"]; - case "object": - if (x._def.value === null) - return [...acc, "null"]; - case "symbol": - case "undefined": - case "function": - default: - return acc; - } - }, []); - if (types.length === options.length) { - const uniqueTypes = types.filter((x, i, a) => a.indexOf(x) === i); - return { - type: uniqueTypes.length > 1 ? uniqueTypes : uniqueTypes[0], - enum: options.reduce((acc, x) => { - return acc.includes(x._def.value) ? acc : [...acc, x._def.value]; - }, []) - }; - } - } else if (options.every((x) => x._def.typeName === "ZodEnum")) { - return { - type: "string", - enum: options.reduce((acc, x) => [ - ...acc, - ...x._def.values.filter((x2) => !acc.includes(x2)) - ], []) - }; - } - return asAnyOf(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"() { - init_parseDef(); - primitiveMappings = { - ZodString: "string", - ZodNumber: "number", - ZodBigInt: "integer", - ZodBoolean: "boolean", - ZodNull: "null" - }; - asAnyOf = (def, refs) => { - const anyOf = (def.options instanceof Map ? Array.from(def.options.values()) : def.options).map((x, i) => parseDef(x._def, { - ...refs, - currentPath: [...refs.currentPath, "anyOf", `${i}`] - })).filter((x) => !!x && (!refs.strictUnions || typeof x === "object" && Object.keys(x).length > 0)); - return anyOf.length ? { anyOf } : void 0; - }; - } -}); - -// 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 -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") { - return { - type: primitiveMappings[def.innerType._def.typeName], - nullable: true - }; - } - return { - type: [ - primitiveMappings[def.innerType._def.typeName], - "null" - ] - }; - } - if (refs.target === "openApi3") { - const base2 = parseDef(def.innerType._def, { - ...refs, - currentPath: [...refs.currentPath] - }); - if (base2 && "$ref" in base2) - return { allOf: [base2], nullable: true }; - return base2 && { ...base2, nullable: true }; - } - const base = parseDef(def.innerType._def, { - ...refs, - currentPath: [...refs.currentPath, "anyOf", "0"] - }); - 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"() { - 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 -function parseNumberDef(def, refs) { - const res = { - type: "number" - }; - if (!def.checks) - return res; - for (const check of def.checks) { - switch (check.kind) { - case "int": - res.type = "integer"; - addErrorMessage(res, "type", check.message, refs); - break; - case "min": - if (refs.target === "jsonSchema7") { - if (check.inclusive) { - setResponseValueAndErrors(res, "minimum", check.value, check.message, refs); - } else { - setResponseValueAndErrors(res, "exclusiveMinimum", check.value, check.message, refs); - } - } else { - if (!check.inclusive) { - res.exclusiveMinimum = true; - } - setResponseValueAndErrors(res, "minimum", check.value, check.message, refs); - } - break; - case "max": - if (refs.target === "jsonSchema7") { - if (check.inclusive) { - setResponseValueAndErrors(res, "maximum", check.value, check.message, refs); - } else { - setResponseValueAndErrors(res, "exclusiveMaximum", check.value, check.message, refs); - } - } else { - if (!check.inclusive) { - res.exclusiveMaximum = true; - } - setResponseValueAndErrors(res, "maximum", check.value, check.message, refs); - } - break; - case "multipleOf": - setResponseValueAndErrors(res, "multipleOf", check.value, check.message, refs); - break; - } - } - 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"() { - 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 -function parseObjectDef(def, refs) { - const forceOptionalIntoNullable = refs.target === "openAi"; - const result = { - type: "object", - properties: {} - }; - const required2 = []; - const shape = def.shape(); - for (const propName in shape) { - let propDef = shape[propName]; - if (propDef === void 0 || propDef._def === void 0) { - continue; - } - let propOptional = safeIsOptional(propDef); - if (propOptional && forceOptionalIntoNullable) { - if (propDef._def.typeName === "ZodOptional") { - propDef = propDef._def.innerType; - } - if (!propDef.isNullable()) { - propDef = propDef.nullable(); - } - propOptional = false; - } - const parsedDef = parseDef(propDef._def, { - ...refs, - currentPath: [...refs.currentPath, "properties", propName], - propertyPath: [...refs.currentPath, "properties", propName] - }); - if (parsedDef === void 0) { - continue; - } - result.properties[propName] = parsedDef; - if (!propOptional) { - required2.push(propName); - } - } - if (required2.length) { - result.required = required2; - } - const additionalProperties = decideAdditionalProperties(def, refs); - if (additionalProperties !== void 0) { - result.additionalProperties = additionalProperties; - } - return result; -} -function decideAdditionalProperties(def, refs) { - if (def.catchall._def.typeName !== "ZodNever") { - return parseDef(def.catchall._def, { - ...refs, - currentPath: [...refs.currentPath, "additionalProperties"] - }); - } - switch (def.unknownKeys) { - case "passthrough": - return refs.allowedAdditionalProperties; - case "strict": - return refs.rejectedAdditionalProperties; - case "strip": - return refs.removeAdditionalStrategy === "strict" ? refs.allowedAdditionalProperties : refs.rejectedAdditionalProperties; - } -} -function safeIsOptional(schema2) { - try { - return schema2.isOptional(); - } catch { - return true; - } -} -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"() { - 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 -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"() { - init_parseDef(); - init_any(); - parseOptionalDef = (def, refs) => { - if (refs.currentPath.toString() === refs.propertyPath?.toString()) { - return parseDef(def.innerType._def, refs); - } - const innerSchema = parseDef(def.innerType._def, { - ...refs, - currentPath: [...refs.currentPath, "anyOf", "1"] - }); - return innerSchema ? { - anyOf: [ - { - not: parseAnyDef(refs) - }, - innerSchema - ] - } : parseAnyDef(refs); - }; - } -}); - -// 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 -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"() { - init_parseDef(); - parsePipelineDef = (def, refs) => { - if (refs.pipeStrategy === "input") { - return parseDef(def.in._def, refs); - } else if (refs.pipeStrategy === "output") { - return parseDef(def.out._def, refs); - } - const a = parseDef(def.in._def, { - ...refs, - currentPath: [...refs.currentPath, "allOf", "0"] - }); - const b = parseDef(def.out._def, { - ...refs, - currentPath: [...refs.currentPath, "allOf", a ? "1" : "0"] - }); - return { - allOf: [a, b].filter((x) => x !== void 0) - }; - }; - } -}); - -// 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 -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"() { - 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 -function parseSetDef(def, refs) { - const items = parseDef(def.valueType._def, { - ...refs, - currentPath: [...refs.currentPath, "items"] - }); - const schema2 = { - type: "array", - uniqueItems: true, - items - }; - if (def.minSize) { - setResponseValueAndErrors(schema2, "minItems", def.minSize.value, def.minSize.message, refs); - } - if (def.maxSize) { - setResponseValueAndErrors(schema2, "maxItems", def.maxSize.value, def.maxSize.message, 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"() { - 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 -function parseTupleDef(def, refs) { - if (def.rest) { - return { - type: "array", - minItems: def.items.length, - items: def.items.map((x, i) => parseDef(x._def, { - ...refs, - currentPath: [...refs.currentPath, "items", `${i}`] - })).reduce((acc, x) => x === void 0 ? acc : [...acc, x], []), - additionalItems: parseDef(def.rest._def, { - ...refs, - currentPath: [...refs.currentPath, "additionalItems"] - }) - }; - } else { - return { - type: "array", - minItems: def.items.length, - maxItems: def.items.length, - items: def.items.map((x, i) => parseDef(x._def, { - ...refs, - currentPath: [...refs.currentPath, "items", `${i}`] - })).reduce((acc, x) => x === void 0 ? acc : [...acc, x], []) - }; - } -} -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"() { - 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 -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"() { - 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 -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"() { - 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 -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"() { - init_parseDef(); - parseReadonlyDef = (def, refs) => { - return parseDef(def.innerType._def, refs); - }; - } -}); - -// node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/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"() { - init_zod(); - init_any(); - init_array(); - init_bigint(); - init_boolean(); - init_branded(); - init_catch(); - init_date(); - init_default(); - init_effects(); - init_enum(); - init_intersection(); - init_literal(); - init_map(); - init_nativeEnum(); - init_never(); - init_null(); - init_nullable(); - init_number(); - init_object(); - init_optional(); - init_pipeline(); - init_promise(); - init_record(); - init_set(); - init_string(); - init_tuple(); - init_undefined(); - init_union(); - init_unknown(); - init_readonly(); - selectParser = (def, typeName, refs) => { - switch (typeName) { - case ZodFirstPartyTypeKind2.ZodString: - return parseStringDef(def, refs); - case ZodFirstPartyTypeKind2.ZodNumber: - return parseNumberDef(def, refs); - case ZodFirstPartyTypeKind2.ZodObject: - return parseObjectDef(def, refs); - case ZodFirstPartyTypeKind2.ZodBigInt: - return parseBigintDef(def, refs); - case ZodFirstPartyTypeKind2.ZodBoolean: - return parseBooleanDef(); - case ZodFirstPartyTypeKind2.ZodDate: - return parseDateDef(def, refs); - case ZodFirstPartyTypeKind2.ZodUndefined: - return parseUndefinedDef(refs); - case ZodFirstPartyTypeKind2.ZodNull: - return parseNullDef(refs); - case ZodFirstPartyTypeKind2.ZodArray: - return parseArrayDef(def, refs); - case ZodFirstPartyTypeKind2.ZodUnion: - case ZodFirstPartyTypeKind2.ZodDiscriminatedUnion: - return parseUnionDef(def, refs); - case ZodFirstPartyTypeKind2.ZodIntersection: - return parseIntersectionDef(def, refs); - case ZodFirstPartyTypeKind2.ZodTuple: - return parseTupleDef(def, refs); - case ZodFirstPartyTypeKind2.ZodRecord: - return parseRecordDef(def, refs); - case ZodFirstPartyTypeKind2.ZodLiteral: - return parseLiteralDef(def, refs); - case ZodFirstPartyTypeKind2.ZodEnum: - return parseEnumDef(def); - case ZodFirstPartyTypeKind2.ZodNativeEnum: - return parseNativeEnumDef(def); - case ZodFirstPartyTypeKind2.ZodNullable: - return parseNullableDef(def, refs); - case ZodFirstPartyTypeKind2.ZodOptional: - return parseOptionalDef(def, refs); - case ZodFirstPartyTypeKind2.ZodMap: - return parseMapDef(def, refs); - case ZodFirstPartyTypeKind2.ZodSet: - return parseSetDef(def, refs); - case ZodFirstPartyTypeKind2.ZodLazy: - return () => def.getter()._def; - case ZodFirstPartyTypeKind2.ZodPromise: - return parsePromiseDef(def, refs); - case ZodFirstPartyTypeKind2.ZodNaN: - case ZodFirstPartyTypeKind2.ZodNever: - return parseNeverDef(refs); - case ZodFirstPartyTypeKind2.ZodEffects: - return parseEffectsDef(def, refs); - case ZodFirstPartyTypeKind2.ZodAny: - return parseAnyDef(refs); - case ZodFirstPartyTypeKind2.ZodUnknown: - return parseUnknownDef(refs); - case ZodFirstPartyTypeKind2.ZodDefault: - return parseDefaultDef(def, refs); - case ZodFirstPartyTypeKind2.ZodBranded: - return parseBrandedDef(def, refs); - case ZodFirstPartyTypeKind2.ZodReadonly: - return parseReadonlyDef(def, refs); - case ZodFirstPartyTypeKind2.ZodCatch: - return parseCatchDef(def, refs); - case ZodFirstPartyTypeKind2.ZodPipeline: - return parsePipelineDef(def, refs); - case ZodFirstPartyTypeKind2.ZodFunction: - case ZodFirstPartyTypeKind2.ZodVoid: - case ZodFirstPartyTypeKind2.ZodSymbol: - return void 0; - default: - return /* @__PURE__ */ ((_) => void 0)(typeName); - } - }; - } -}); - -// node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/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) { - const overrideResult = refs.override?.(def, refs, seenItem, forceResolution); - if (overrideResult !== ignoreOverride2) { - return overrideResult; - } - } - if (seenItem && !forceResolution) { - const seenSchema = get$ref(seenItem, refs); - if (seenSchema !== void 0) { - return seenSchema; - } - } - const newItem = { def, path: refs.currentPath, jsonSchema: void 0 }; - refs.seen.set(def, newItem); - const jsonSchemaOrGetter = selectParser(def, def.typeName, refs); - const jsonSchema2 = typeof jsonSchemaOrGetter === "function" ? parseDef(jsonSchemaOrGetter(), refs) : jsonSchemaOrGetter; - if (jsonSchema2) { - addMeta(def, refs, jsonSchema2); - } - if (refs.postProcess) { - const postProcessResult = refs.postProcess(jsonSchema2, def, refs); - newItem.jsonSchema = jsonSchema2; - return postProcessResult; - } - newItem.jsonSchema = jsonSchema2; - return jsonSchema2; -} -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"() { - init_Options(); - init_selectParser(); - init_getRelativePath(); - init_any(); - get$ref = (item, refs) => { - switch (refs.$refStrategy) { - case "root": - return { $ref: item.path.join("/") }; - case "relative": - return { $ref: getRelativePath(refs.currentPath, item.path) }; - case "none": - case "seen": { - if (item.path.length < refs.currentPath.length && item.path.every((value2, index) => refs.currentPath[index] === value2)) { - console.warn(`Recursive reference detected at ${refs.currentPath.join("/")}! Defaulting to any`); - return parseAnyDef(refs); - } - return refs.$refStrategy === "seen" ? parseAnyDef(refs) : void 0; - } - } - }; - addMeta = (def, refs, jsonSchema2) => { - if (def.description) { - jsonSchema2.description = def.description; - if (refs.markdownDescription) { - jsonSchema2.markdownDescription = def.description; - } - } - return jsonSchema2; - }; - } -}); - -// node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/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@3.25.76/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"() { - init_parseDef(); - init_Refs(); - init_any(); - zodToJsonSchema = (schema2, options) => { - const refs = getRefs(options); - let definitions = typeof options === "object" && options.definitions ? Object.entries(options.definitions).reduce((acc, [name2, schema3]) => ({ - ...acc, - [name2]: parseDef(schema3._def, { - ...refs, - currentPath: [...refs.basePath, refs.definitionPath, name2] - }, true) ?? parseAnyDef(refs) - }), {}) : void 0; - const name = typeof options === "string" ? options : options?.nameStrategy === "title" ? void 0 : options?.name; - const main2 = parseDef(schema2._def, name === void 0 ? refs : { - ...refs, - currentPath: [...refs.basePath, refs.definitionPath, name] - }, false) ?? parseAnyDef(refs); - const title = typeof options === "object" && options.name !== void 0 && options.nameStrategy === "title" ? options.name : void 0; - if (title !== void 0) { - main2.title = title; - } - if (refs.flags.hasReferencedOpenAiAnyType) { - if (!definitions) { - definitions = {}; - } - if (!definitions[refs.openAiAnyTypeName]) { - definitions[refs.openAiAnyTypeName] = { - // Skipping "object" as no properties can be defined and additionalProperties must be "false" - type: ["string", "number", "integer", "boolean", "array", "null"], - items: { - $ref: refs.$refStrategy === "relative" ? "1" : [ - ...refs.basePath, - refs.definitionPath, - refs.openAiAnyTypeName - ].join("/") - } - }; - } - } - const combined = name === void 0 ? definitions ? { - ...main2, - [refs.definitionPath]: definitions - } : main2 : { - $ref: [ - ...refs.$refStrategy === "relative" ? [] : refs.basePath, - refs.definitionPath, - name - ].join("/"), - [refs.definitionPath]: { - ...definitions, - [name]: main2 - } - }; - if (refs.target === "jsonSchema7") { - combined.$schema = "http://json-schema.org/draft-07/schema#"; - } else if (refs.target === "jsonSchema2019-09" || refs.target === "openAi") { - combined.$schema = "https://json-schema.org/draft/2019-09/schema#"; - } - if (refs.target === "openAi" && ("anyOf" in combined || "oneOf" in combined || "allOf" in combined || "type" in combined && Array.isArray(combined.type))) { - console.warn("Warning: OpenAI may not support schemas with unions as roots! Try wrapping it in an object property."); - } - return combined; - }; - } -}); - -// node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/index.js -var esm_exports = {}; -__export(esm_exports, { - addErrorMessage: () => addErrorMessage, - default: () => esm_default, - defaultOptions: () => defaultOptions, - getDefaultOptions: () => getDefaultOptions, - getRefs: () => getRefs, - getRelativePath: () => getRelativePath, - ignoreOverride: () => ignoreOverride2, - jsonDescription: () => jsonDescription, - parseAnyDef: () => parseAnyDef, - parseArrayDef: () => parseArrayDef, - parseBigintDef: () => parseBigintDef, - parseBooleanDef: () => parseBooleanDef, - parseBrandedDef: () => parseBrandedDef, - parseCatchDef: () => parseCatchDef, - parseDateDef: () => parseDateDef, - parseDef: () => parseDef, - parseDefaultDef: () => parseDefaultDef, - parseEffectsDef: () => parseEffectsDef, - parseEnumDef: () => parseEnumDef, - parseIntersectionDef: () => parseIntersectionDef, - parseLiteralDef: () => parseLiteralDef, - parseMapDef: () => parseMapDef, - parseNativeEnumDef: () => parseNativeEnumDef, - parseNeverDef: () => parseNeverDef, - parseNullDef: () => parseNullDef, - parseNullableDef: () => parseNullableDef, - parseNumberDef: () => parseNumberDef, - parseObjectDef: () => parseObjectDef, - parseOptionalDef: () => parseOptionalDef, - parsePipelineDef: () => parsePipelineDef, - parsePromiseDef: () => parsePromiseDef, - parseReadonlyDef: () => parseReadonlyDef, - parseRecordDef: () => parseRecordDef, - parseSetDef: () => parseSetDef, - parseStringDef: () => parseStringDef, - parseTupleDef: () => parseTupleDef, - parseUndefinedDef: () => parseUndefinedDef, - parseUnionDef: () => parseUnionDef, - parseUnknownDef: () => parseUnknownDef, - primitiveMappings: () => primitiveMappings, - selectParser: () => selectParser, - setResponseValueAndErrors: () => setResponseValueAndErrors, - zodPatterns: () => zodPatterns, - zodToJsonSchema: () => zodToJsonSchema -}); -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"() { - init_Options(); - init_Refs(); - init_errorMessages(); - init_getRelativePath(); - init_parseDef(); - init_parseTypes(); - init_any(); - init_array(); - init_bigint(); - init_boolean(); - init_branded(); - init_catch(); - init_date(); - init_default(); - init_effects(); - init_enum(); - init_intersection(); - init_literal(); - init_map(); - init_nativeEnum(); - init_never(); - init_null(); - init_nullable(); - init_number(); - init_object(); - init_optional(); - init_pipeline(); - init_promise(); - init_readonly(); - init_record(); - init_set(); - init_string(); - init_tuple(); - init_undefined(); - init_union(); - init_unknown(); - init_selectParser(); - init_zodToJsonSchema(); - init_zodToJsonSchema(); - esm_default = zodToJsonSchema; - } -}); - -// node_modules/.pnpm/xsschema@0.3.5_arktype@2.1.28_zod-to-json-schema@3.24.6_zod@3.25.76__zod@3.25.76/node_modules/xsschema/dist/zod-Bw_60DVU.js -var zod_Bw_60DVU_exports = {}; -__export(zod_Bw_60DVU_exports, { +// ../node_modules/.pnpm/xsschema@0.4.0-beta.5_arktype@2.1.28_effect@3.18.4_zod-to-json-schema@3.25.1_zod@4.3.5__zod@4.3.5/node_modules/xsschema/dist/zod-DRPNNiyo.js +var zod_DRPNNiyo_exports = {}; +__export(zod_DRPNNiyo_exports, { getToJsonSchemaFn: () => getToJsonSchemaFn5 }); var getToJsonSchemaFn5; -var init_zod_Bw_60DVU = __esm({ - "node_modules/.pnpm/xsschema@0.3.5_arktype@2.1.28_zod-to-json-schema@3.24.6_zod@3.25.76__zod@3.25.76/node_modules/xsschema/dist/zod-Bw_60DVU.js"() { - init_index_CAcLDIRJ(); +var init_zod_DRPNNiyo = __esm({ + "../node_modules/.pnpm/xsschema@0.4.0-beta.5_arktype@2.1.28_effect@3.18.4_zod-to-json-schema@3.25.1_zod@4.3.5__zod@4.3.5/node_modules/xsschema/dist/zod-DRPNNiyo.js"() { + init_index_CLFto6T2(); getToJsonSchemaFn5 = async () => { let zodV4toJSONSchema = (_schema) => { throw new Error(`xsschema: Missing zod v4 dependencies "zod". see ${missingDependenciesUrl}`); @@ -72095,7 +74304,7 @@ var init_zod_Bw_60DVU = __esm({ }; try { const { toJSONSchema: toJSONSchema2 } = await Promise.resolve().then(() => (init_core2(), core_exports2)); - zodV4toJSONSchema = toJSONSchema2; + zodV4toJSONSchema = (schema2) => toJSONSchema2(schema2, { target: "draft-7" }); } catch (err) { if (err instanceof Error) console.error(err.message); @@ -72117,10 +74326,10 @@ var init_zod_Bw_60DVU = __esm({ } }); -// node_modules/.pnpm/xsschema@0.3.5_arktype@2.1.28_zod-to-json-schema@3.24.6_zod@3.25.76__zod@3.25.76/node_modules/xsschema/dist/index-CAcLDIRJ.js +// ../node_modules/.pnpm/xsschema@0.4.0-beta.5_arktype@2.1.28_effect@3.18.4_zod-to-json-schema@3.25.1_zod@4.3.5__zod@4.3.5/node_modules/xsschema/dist/index-CLFto6T2.js var missingDependenciesUrl, tryImport, getToJsonSchemaFn6, toJsonSchema; -var init_index_CAcLDIRJ = __esm({ - "node_modules/.pnpm/xsschema@0.3.5_arktype@2.1.28_zod-to-json-schema@3.24.6_zod@3.25.76__zod@3.25.76/node_modules/xsschema/dist/index-CAcLDIRJ.js"() { +var init_index_CLFto6T2 = __esm({ + "../node_modules/.pnpm/xsschema@0.4.0-beta.5_arktype@2.1.28_effect@3.18.4_zod-to-json-schema@3.25.1_zod@4.3.5__zod@4.3.5/node_modules/xsschema/dist/index-CLFto6T2.js"() { missingDependenciesUrl = "https://xsai.js.org/docs/packages-top/xsschema#missing-dependencies"; tryImport = async (result, name) => { try { @@ -72134,13 +74343,13 @@ var init_index_CAcLDIRJ = __esm({ case "arktype": return Promise.resolve().then(() => (init_arktype_C_GObzDh(), arktype_C_GObzDh_exports)).then(async ({ getToJsonSchemaFn: getToJsonSchemaFn22 }) => getToJsonSchemaFn22()); case "effect": - return Promise.resolve().then(() => (init_effect_zg3C1LQ(), effect_zg3C1LQ_exports)).then(async ({ getToJsonSchemaFn: getToJsonSchemaFn22 }) => getToJsonSchemaFn22()); + return Promise.resolve().then(() => (init_effect_BqN_3bg(), effect_BqN_3bg_exports)).then(async ({ getToJsonSchemaFn: getToJsonSchemaFn22 }) => getToJsonSchemaFn22()); case "sury": - return Promise.resolve().then(() => (init_sury_s6Akl_oc(), sury_s6Akl_oc_exports)).then(async ({ getToJsonSchemaFn: getToJsonSchemaFn22 }) => getToJsonSchemaFn22()); + return Promise.resolve().then(() => (init_sury_DT_CKDzo(), sury_DT_CKDzo_exports)).then(async ({ getToJsonSchemaFn: getToJsonSchemaFn22 }) => getToJsonSchemaFn22()); case "valibot": - return Promise.resolve().then(() => (init_valibot_DBCeetIe(), valibot_DBCeetIe_exports)).then(async ({ getToJsonSchemaFn: getToJsonSchemaFn22 }) => getToJsonSchemaFn22()); + return Promise.resolve().then(() => (init_valibot_CR9aQ3tY(), valibot_CR9aQ3tY_exports)).then(async ({ getToJsonSchemaFn: getToJsonSchemaFn22 }) => getToJsonSchemaFn22()); case "zod": - return Promise.resolve().then(() => (init_zod_Bw_60DVU(), zod_Bw_60DVU_exports)).then(async ({ getToJsonSchemaFn: getToJsonSchemaFn22 }) => getToJsonSchemaFn22()); + return Promise.resolve().then(() => (init_zod_DRPNNiyo(), zod_DRPNNiyo_exports)).then(async ({ getToJsonSchemaFn: getToJsonSchemaFn22 }) => getToJsonSchemaFn22()); default: throw new Error(`xsschema: Unsupported schema vendor "${vendor}". see https://xsai.js.org/docs/packages-top/xsschema#unsupported-schema-vendor`); } @@ -72152,7 +74361,7 @@ var init_index_CAcLDIRJ = __esm({ // entry.ts var core3 = __toESM(require_core(), 1); -// node_modules/.pnpm/@ark+util@0.53.0/node_modules/@ark/util/out/arrays.js +// ../node_modules/.pnpm/@ark+util@0.53.0/node_modules/@ark/util/out/arrays.js var append = (to, value2, opts) => { if (to === void 0) { return value2 === void 0 ? [] : Array.isArray(value2) ? value2 : [value2]; @@ -72171,7 +74380,7 @@ var append = (to, value2, opts) => { return to; }; -// node_modules/.pnpm/@ark+util@0.53.0/node_modules/@ark/util/out/domain.js +// ../node_modules/.pnpm/@ark+util@0.53.0/node_modules/@ark/util/out/domain.js var domainDescriptions = { boolean: "boolean", null: "null", @@ -72187,11 +74396,11 @@ var jsTypeOfDescriptions = { function: "a function" }; -// node_modules/.pnpm/@ark+util@0.53.0/node_modules/@ark/util/out/errors.js +// ../node_modules/.pnpm/@ark+util@0.53.0/node_modules/@ark/util/out/errors.js var noSuggest = (s) => ` ${s}`; var ZeroWidthSpace = "\u200B"; -// node_modules/.pnpm/@ark+util@0.53.0/node_modules/@ark/util/out/flatMorph.js +// ../node_modules/.pnpm/@ark+util@0.53.0/node_modules/@ark/util/out/flatMorph.js var flatMorph = (o, flatMapEntry) => { const result = {}; const inputIsArray = Array.isArray(o); @@ -72214,11 +74423,11 @@ var flatMorph = (o, flatMapEntry) => { return outputShouldBeArray ? Object.values(result) : result; }; -// node_modules/.pnpm/@ark+util@0.53.0/node_modules/@ark/util/out/records.js +// ../node_modules/.pnpm/@ark+util@0.53.0/node_modules/@ark/util/out/records.js var isKeyOf = (k, o) => k in o; var unset = noSuggest(`unset${ZeroWidthSpace}`); -// node_modules/.pnpm/@ark+util@0.53.0/node_modules/@ark/util/out/objectKinds.js +// ../node_modules/.pnpm/@ark+util@0.53.0/node_modules/@ark/util/out/objectKinds.js var ecmascriptConstructors = { Array, Boolean, @@ -72266,6 +74475,7 @@ var builtinConstructors = { Number, Boolean }; +var isArray = Array.isArray; var ecmascriptDescriptions = { Array: "an array", Function: "a function", @@ -72310,7 +74520,7 @@ var objectKindDescriptions = { ...typedArrayDescriptions }; -// node_modules/.pnpm/@ark+util@0.53.0/node_modules/@ark/util/out/functions.js +// ../node_modules/.pnpm/@ark+util@0.53.0/node_modules/@ark/util/out/functions.js var cached = (thunk) => { let result = unset; return () => result === unset ? result = thunk() : result; @@ -72323,18 +74533,18 @@ var envHasCsp = cached(() => { } }); -// node_modules/.pnpm/@ark+util@0.53.0/node_modules/@ark/util/out/generics.js +// ../node_modules/.pnpm/@ark+util@0.53.0/node_modules/@ark/util/out/generics.js var brand = noSuggest("brand"); var inferred = noSuggest("arkInferred"); -// node_modules/.pnpm/@ark+util@0.53.0/node_modules/@ark/util/out/hkt.js +// ../node_modules/.pnpm/@ark+util@0.53.0/node_modules/@ark/util/out/hkt.js var args = noSuggest("args"); -// node_modules/.pnpm/@ark+util@0.53.0/node_modules/@ark/util/out/isomorphic.js +// ../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 error50 = new Error(); + const stackLine = error50.stack?.split("\n")[2]?.trim() || ""; const filePath = stackLine.match(/\(?(.+?)(?::\d+:\d+)?\)?$/)?.[1] || "unknown"; return filePath.replace(/^file:\/\//, ""); } catch { @@ -72347,7 +74557,7 @@ var isomorphic = { env }; -// node_modules/.pnpm/@ark+util@0.53.0/node_modules/@ark/util/out/strings.js +// ../node_modules/.pnpm/@ark+util@0.53.0/node_modules/@ark/util/out/strings.js var anchoredRegex = (regex4) => new RegExp(anchoredSource(regex4), typeof regex4 === "string" ? "" : regex4.flags); var anchoredSource = (regex4) => { const source = typeof regex4 === "string" ? regex4 : regex4.source; @@ -72358,7 +74568,7 @@ var RegexPatterns = { nonCapturingGroup: (pattern) => `(?:${pattern})` }; -// node_modules/.pnpm/@ark+util@0.53.0/node_modules/@ark/util/out/numbers.js +// ../node_modules/.pnpm/@ark+util@0.53.0/node_modules/@ark/util/out/numbers.js var anchoredNegativeZeroPattern = /^-0\.?0*$/.source; var positiveIntegerPattern = /[1-9]\d*/.source; var looseDecimalPattern = /\.\d+/.source; @@ -72379,7 +74589,7 @@ var isWellFormedInteger = wellFormedIntegerMatcher.test.bind(wellFormedIntegerMa var integerLikeMatcher = /^-?\d+$/; var isIntegerLike = integerLikeMatcher.test.bind(integerLikeMatcher); -// node_modules/.pnpm/@ark+util@0.53.0/node_modules/@ark/util/out/registry.js +// ../node_modules/.pnpm/@ark+util@0.53.0/node_modules/@ark/util/out/registry.js var arkUtilVersion = "0.53.0"; var initialRegistryContents = { version: arkUtilVersion, @@ -72387,12 +74597,12 @@ var initialRegistryContents = { FileConstructor }; -// node_modules/.pnpm/@ark+util@0.53.0/node_modules/@ark/util/out/traits.js +// ../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 -import { join as join3 } from "path"; -import { fileURLToPath } from "url"; +// ../node_modules/.pnpm/@anthropic-ai+claude-agent-sdk@0.1.77_zod@4.3.5/node_modules/@anthropic-ai/claude-agent-sdk/sdk.mjs +import { join as join5 } from "path"; +import { fileURLToPath as fileURLToPath2 } from "url"; import { setMaxListeners } from "events"; import { spawn } from "child_process"; import { createInterface } from "readline"; @@ -72404,6 +74614,10 @@ import { dirname, join as join2 } from "path"; import { cwd } from "process"; import { realpathSync as realpathSync2 } from "fs"; import { randomUUID } from "crypto"; +import { randomUUID as randomUUID2 } from "crypto"; +import { appendFileSync as appendFileSync2, existsSync as existsSync2, mkdirSync as mkdirSync2 } from "fs"; +import { join as join3 } from "path"; +import { randomUUID as randomUUID3 } from "crypto"; var __create2 = Object.create; var __getProtoOf2 = Object.getPrototypeOf; var __defProp2 = Object.defineProperty; @@ -72430,1008 +74644,1899 @@ var __export2 = (target, all) => { set: (newValue) => all[name] = () => newValue }); }; -var require_uri_all = __commonJS2((exports, module) => { - (function(global2, factory) { - typeof exports === "object" && typeof module !== "undefined" ? factory(exports) : typeof define === "function" && define.amd ? define(["exports"], factory) : factory(global2.URI = global2.URI || {}); - })(exports, function(exports2) { - function merge3() { - for (var _len = arguments.length, sets = Array(_len), _key = 0; _key < _len; _key++) { - sets[_key] = arguments[_key]; - } - if (sets.length > 1) { - sets[0] = sets[0].slice(0, -1); - var xl = sets.length - 1; - for (var x = 1; x < xl; ++x) { - sets[x] = sets[x].slice(1, -1); +var require_code = __commonJS2((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.regexpCode = exports.getEsmExportName = exports.getProperty = exports.safeStringify = exports.stringify = exports.strConcat = exports.addCodeArg = exports.str = exports._ = exports.nil = exports._Code = exports.Name = exports.IDENTIFIER = exports._CodeOrName = void 0; + class _CodeOrName { + } + exports._CodeOrName = _CodeOrName; + exports.IDENTIFIER = /^[a-z$_][a-z$_0-9]*$/i; + class Name extends _CodeOrName { + constructor(s) { + super(); + if (!exports.IDENTIFIER.test(s)) + throw new Error("CodeGen: name must be a valid identifier"); + this.str = s; + } + toString() { + return this.str; + } + emptyStr() { + return false; + } + get names() { + return { [this.str]: 1 }; + } + } + exports.Name = Name; + class _Code extends _CodeOrName { + constructor(code) { + super(); + this._items = typeof code === "string" ? [code] : code; + } + toString() { + return this.str; + } + emptyStr() { + if (this._items.length > 1) + return false; + const item = this._items[0]; + return item === "" || item === '""'; + } + get str() { + var _a2; + return (_a2 = this._str) !== null && _a2 !== void 0 ? _a2 : this._str = this._items.reduce((s, c) => `${s}${c}`, ""); + } + get names() { + var _a2; + return (_a2 = this._names) !== null && _a2 !== void 0 ? _a2 : this._names = this._items.reduce((names, c) => { + if (c instanceof Name) + names[c.str] = (names[c.str] || 0) + 1; + return names; + }, {}); + } + } + exports._Code = _Code; + exports.nil = new _Code(""); + function _(strs, ...args3) { + const code = [strs[0]]; + let i = 0; + while (i < args3.length) { + addCodeArg(code, args3[i]); + code.push(strs[++i]); + } + return new _Code(code); + } + exports._ = _; + var plus = new _Code("+"); + function str(strs, ...args3) { + const expr = [safeStringify(strs[0])]; + let i = 0; + while (i < args3.length) { + expr.push(plus); + addCodeArg(expr, args3[i]); + expr.push(plus, safeStringify(strs[++i])); + } + optimize(expr); + return new _Code(expr); + } + exports.str = str; + function addCodeArg(code, arg) { + if (arg instanceof _Code) + code.push(...arg._items); + else if (arg instanceof Name) + code.push(arg); + else + code.push(interpolate(arg)); + } + exports.addCodeArg = addCodeArg; + function optimize(expr) { + let i = 1; + while (i < expr.length - 1) { + if (expr[i] === plus) { + const res = mergeExprItems(expr[i - 1], expr[i + 1]); + if (res !== void 0) { + expr.splice(i - 1, 3, res); + continue; } - sets[xl] = sets[xl].slice(1); - return sets.join(""); + expr[i++] = "+"; + } + i++; + } + } + function mergeExprItems(a, b) { + if (b === '""') + return a; + if (a === '""') + return b; + if (typeof a == "string") { + if (b instanceof Name || a[a.length - 1] !== '"') + return; + if (typeof b != "string") + return `${a.slice(0, -1)}${b}"`; + if (b[0] === '"') + return a.slice(0, -1) + b.slice(1); + return; + } + if (typeof b == "string" && b[0] === '"' && !(a instanceof Name)) + return `"${a}${b.slice(1)}`; + return; + } + function strConcat(c1, c2) { + return c2.emptyStr() ? c1 : c1.emptyStr() ? c2 : str`${c1}${c2}`; + } + exports.strConcat = strConcat; + function interpolate(x) { + return typeof x == "number" || typeof x == "boolean" || x === null ? x : safeStringify(Array.isArray(x) ? x.join(",") : x); + } + function stringify(x) { + return new _Code(safeStringify(x)); + } + exports.stringify = stringify; + function safeStringify(x) { + return JSON.stringify(x).replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029"); + } + exports.safeStringify = safeStringify; + function getProperty(key) { + return typeof key == "string" && exports.IDENTIFIER.test(key) ? new _Code(`.${key}`) : _`[${key}]`; + } + exports.getProperty = getProperty; + function getEsmExportName(key) { + if (typeof key == "string" && exports.IDENTIFIER.test(key)) { + return new _Code(`${key}`); + } + throw new Error(`CodeGen: invalid export name: ${key}, use explicit $id name mapping`); + } + exports.getEsmExportName = getEsmExportName; + function regexpCode(rx) { + return new _Code(rx.toString()); + } + exports.regexpCode = regexpCode; +}); +var require_scope = __commonJS2((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.ValueScope = exports.ValueScopeName = exports.Scope = exports.varKinds = exports.UsedValueState = void 0; + var code_1 = require_code(); + class ValueError extends Error { + constructor(name) { + super(`CodeGen: "code" for ${name} not defined`); + this.value = name.value; + } + } + var UsedValueState; + (function(UsedValueState2) { + UsedValueState2[UsedValueState2["Started"] = 0] = "Started"; + UsedValueState2[UsedValueState2["Completed"] = 1] = "Completed"; + })(UsedValueState || (exports.UsedValueState = UsedValueState = {})); + exports.varKinds = { + const: new code_1.Name("const"), + let: new code_1.Name("let"), + var: new code_1.Name("var") + }; + class Scope2 { + constructor({ prefixes, parent } = {}) { + this._names = {}; + this._prefixes = prefixes; + this._parent = parent; + } + toName(nameOrPrefix) { + return nameOrPrefix instanceof code_1.Name ? nameOrPrefix : this.name(nameOrPrefix); + } + name(prefix) { + return new code_1.Name(this._newName(prefix)); + } + _newName(prefix) { + const ng = this._names[prefix] || this._nameGroup(prefix); + return `${prefix}${ng.index++}`; + } + _nameGroup(prefix) { + var _a2, _b; + if (((_b = (_a2 = this._parent) === null || _a2 === void 0 ? void 0 : _a2._prefixes) === null || _b === void 0 ? void 0 : _b.has(prefix)) || this._prefixes && !this._prefixes.has(prefix)) { + throw new Error(`CodeGen: prefix "${prefix}" is not allowed in this scope`); + } + return this._names[prefix] = { prefix, index: 0 }; + } + } + exports.Scope = Scope2; + class ValueScopeName extends code_1.Name { + constructor(prefix, nameStr) { + super(nameStr); + this.prefix = prefix; + } + setValue(value2, { property, itemIndex }) { + this.value = value2; + this.scopePath = (0, code_1._)`.${new code_1.Name(property)}[${itemIndex}]`; + } + } + exports.ValueScopeName = ValueScopeName; + var line = (0, code_1._)`\n`; + class ValueScope extends Scope2 { + constructor(opts) { + super(opts); + this._values = {}; + this._scope = opts.scope; + this.opts = { ...opts, _n: opts.lines ? line : code_1.nil }; + } + get() { + return this._scope; + } + name(prefix) { + return new ValueScopeName(prefix, this._newName(prefix)); + } + value(nameOrPrefix, value2) { + var _a2; + if (value2.ref === void 0) + throw new Error("CodeGen: ref must be passed in value"); + const name = this.toName(nameOrPrefix); + const { prefix } = name; + const valueKey = (_a2 = value2.key) !== null && _a2 !== void 0 ? _a2 : value2.ref; + let vs = this._values[prefix]; + if (vs) { + const _name = vs.get(valueKey); + if (_name) + return _name; } else { - return sets[0]; + vs = this._values[prefix] = /* @__PURE__ */ new Map(); } + vs.set(valueKey, name); + const s = this._scope[prefix] || (this._scope[prefix] = []); + const itemIndex = s.length; + s[itemIndex] = value2.ref; + name.setValue(value2, { property: prefix, itemIndex }); + return name; } - function subexp(str) { - return "(?:" + str + ")"; + getValue(prefix, keyOrRef) { + const vs = this._values[prefix]; + if (!vs) + return; + return vs.get(keyOrRef); } - function typeOf(o) { - return o === void 0 ? "undefined" : o === null ? "null" : Object.prototype.toString.call(o).split(" ").pop().split("]").shift().toLowerCase(); + scopeRefs(scopeName, values = this._values) { + return this._reduceValues(values, (name) => { + if (name.scopePath === void 0) + throw new Error(`CodeGen: name "${name}" has no value`); + return (0, code_1._)`${scopeName}${name.scopePath}`; + }); } - function toUpperCase(str) { - return str.toUpperCase(); + scopeCode(values = this._values, usedValues, getCode) { + return this._reduceValues(values, (name) => { + if (name.value === void 0) + throw new Error(`CodeGen: name "${name}" has no value`); + return name.value.code; + }, usedValues, getCode); } - function toArray(obj) { - return obj !== void 0 && obj !== null ? obj instanceof Array ? obj : typeof obj.length !== "number" || obj.split || obj.setInterval || obj.call ? [obj] : Array.prototype.slice.call(obj) : []; - } - function assign(target, source) { - var obj = target; - if (source) { - for (var key in source) { - obj[key] = source[key]; - } - } - return obj; - } - function buildExps(isIRI2) { - var ALPHA$$ = "[A-Za-z]", CR$ = "[\\x0D]", DIGIT$$ = "[0-9]", DQUOTE$$ = "[\\x22]", HEXDIG$$2 = merge3(DIGIT$$, "[A-Fa-f]"), LF$$ = "[\\x0A]", SP$$ = "[\\x20]", PCT_ENCODED$2 = subexp(subexp("%[EFef]" + HEXDIG$$2 + "%" + HEXDIG$$2 + HEXDIG$$2 + "%" + HEXDIG$$2 + HEXDIG$$2) + "|" + subexp("%[89A-Fa-f]" + HEXDIG$$2 + "%" + HEXDIG$$2 + HEXDIG$$2) + "|" + subexp("%" + HEXDIG$$2 + HEXDIG$$2)), GEN_DELIMS$$ = "[\\:\\/\\?\\#\\[\\]\\@]", SUB_DELIMS$$ = "[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]", RESERVED$$ = merge3(GEN_DELIMS$$, SUB_DELIMS$$), UCSCHAR$$ = isIRI2 ? "[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]" : "[]", IPRIVATE$$ = isIRI2 ? "[\\uE000-\\uF8FF]" : "[]", UNRESERVED$$2 = merge3(ALPHA$$, DIGIT$$, "[\\-\\.\\_\\~]", UCSCHAR$$), SCHEME$ = subexp(ALPHA$$ + merge3(ALPHA$$, DIGIT$$, "[\\+\\-\\.]") + "*"), USERINFO$ = subexp(subexp(PCT_ENCODED$2 + "|" + merge3(UNRESERVED$$2, SUB_DELIMS$$, "[\\:]")) + "*"), DEC_OCTET$ = subexp(subexp("25[0-5]") + "|" + subexp("2[0-4]" + DIGIT$$) + "|" + subexp("1" + DIGIT$$ + DIGIT$$) + "|" + subexp("[1-9]" + DIGIT$$) + "|" + DIGIT$$), DEC_OCTET_RELAXED$ = subexp(subexp("25[0-5]") + "|" + subexp("2[0-4]" + DIGIT$$) + "|" + subexp("1" + DIGIT$$ + DIGIT$$) + "|" + subexp("0?[1-9]" + DIGIT$$) + "|0?0?" + DIGIT$$), IPV4ADDRESS$ = subexp(DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$), H16$ = subexp(HEXDIG$$2 + "{1,4}"), LS32$ = subexp(subexp(H16$ + "\\:" + H16$) + "|" + IPV4ADDRESS$), IPV6ADDRESS1$ = subexp(subexp(H16$ + "\\:") + "{6}" + LS32$), IPV6ADDRESS2$ = subexp("\\:\\:" + subexp(H16$ + "\\:") + "{5}" + LS32$), IPV6ADDRESS3$ = subexp(subexp(H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{4}" + LS32$), IPV6ADDRESS4$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,1}" + H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{3}" + LS32$), IPV6ADDRESS5$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,2}" + H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{2}" + LS32$), IPV6ADDRESS6$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,3}" + H16$) + "?\\:\\:" + H16$ + "\\:" + LS32$), IPV6ADDRESS7$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,4}" + H16$) + "?\\:\\:" + LS32$), IPV6ADDRESS8$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,5}" + H16$) + "?\\:\\:" + H16$), IPV6ADDRESS9$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,6}" + H16$) + "?\\:\\:"), IPV6ADDRESS$ = subexp([IPV6ADDRESS1$, IPV6ADDRESS2$, IPV6ADDRESS3$, IPV6ADDRESS4$, IPV6ADDRESS5$, IPV6ADDRESS6$, IPV6ADDRESS7$, IPV6ADDRESS8$, IPV6ADDRESS9$].join("|")), ZONEID$ = subexp(subexp(UNRESERVED$$2 + "|" + PCT_ENCODED$2) + "+"), IPV6ADDRZ$ = subexp(IPV6ADDRESS$ + "\\%25" + ZONEID$), IPV6ADDRZ_RELAXED$ = subexp(IPV6ADDRESS$ + subexp("\\%25|\\%(?!" + HEXDIG$$2 + "{2})") + ZONEID$), IPVFUTURE$ = subexp("[vV]" + HEXDIG$$2 + "+\\." + merge3(UNRESERVED$$2, SUB_DELIMS$$, "[\\:]") + "+"), IP_LITERAL$ = subexp("\\[" + subexp(IPV6ADDRZ_RELAXED$ + "|" + IPV6ADDRESS$ + "|" + IPVFUTURE$) + "\\]"), REG_NAME$ = subexp(subexp(PCT_ENCODED$2 + "|" + merge3(UNRESERVED$$2, SUB_DELIMS$$)) + "*"), HOST$ = subexp(IP_LITERAL$ + "|" + IPV4ADDRESS$ + "(?!" + REG_NAME$ + ")|" + REG_NAME$), PORT$ = subexp(DIGIT$$ + "*"), AUTHORITY$ = subexp(subexp(USERINFO$ + "@") + "?" + HOST$ + subexp("\\:" + PORT$) + "?"), PCHAR$ = subexp(PCT_ENCODED$2 + "|" + merge3(UNRESERVED$$2, SUB_DELIMS$$, "[\\:\\@]")), SEGMENT$ = subexp(PCHAR$ + "*"), SEGMENT_NZ$ = subexp(PCHAR$ + "+"), SEGMENT_NZ_NC$ = subexp(subexp(PCT_ENCODED$2 + "|" + merge3(UNRESERVED$$2, SUB_DELIMS$$, "[\\@]")) + "+"), PATH_ABEMPTY$ = subexp(subexp("\\/" + SEGMENT$) + "*"), PATH_ABSOLUTE$ = subexp("\\/" + subexp(SEGMENT_NZ$ + PATH_ABEMPTY$) + "?"), PATH_NOSCHEME$ = subexp(SEGMENT_NZ_NC$ + PATH_ABEMPTY$), PATH_ROOTLESS$ = subexp(SEGMENT_NZ$ + PATH_ABEMPTY$), PATH_EMPTY$ = "(?!" + PCHAR$ + ")", PATH$ = subexp(PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$), QUERY$ = subexp(subexp(PCHAR$ + "|" + merge3("[\\/\\?]", IPRIVATE$$)) + "*"), FRAGMENT$ = subexp(subexp(PCHAR$ + "|[\\/\\?]") + "*"), HIER_PART$ = subexp(subexp("\\/\\/" + AUTHORITY$ + PATH_ABEMPTY$) + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$), URI$ = subexp(SCHEME$ + "\\:" + HIER_PART$ + subexp("\\?" + QUERY$) + "?" + subexp("\\#" + FRAGMENT$) + "?"), RELATIVE_PART$ = subexp(subexp("\\/\\/" + AUTHORITY$ + PATH_ABEMPTY$) + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_EMPTY$), RELATIVE$ = subexp(RELATIVE_PART$ + subexp("\\?" + QUERY$) + "?" + subexp("\\#" + FRAGMENT$) + "?"), URI_REFERENCE$ = subexp(URI$ + "|" + RELATIVE$), ABSOLUTE_URI$ = subexp(SCHEME$ + "\\:" + HIER_PART$ + subexp("\\?" + QUERY$) + "?"), GENERIC_REF$ = "^(" + SCHEME$ + ")\\:" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?" + subexp("\\#(" + FRAGMENT$ + ")") + "?$", RELATIVE_REF$ = "^(){0}" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?" + subexp("\\#(" + FRAGMENT$ + ")") + "?$", ABSOLUTE_REF$ = "^(" + SCHEME$ + ")\\:" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?$", SAMEDOC_REF$ = "^" + subexp("\\#(" + FRAGMENT$ + ")") + "?$", AUTHORITY_REF$ = "^" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?$"; - return { - NOT_SCHEME: new RegExp(merge3("[^]", ALPHA$$, DIGIT$$, "[\\+\\-\\.]"), "g"), - NOT_USERINFO: new RegExp(merge3("[^\\%\\:]", UNRESERVED$$2, SUB_DELIMS$$), "g"), - NOT_HOST: new RegExp(merge3("[^\\%\\[\\]\\:]", UNRESERVED$$2, SUB_DELIMS$$), "g"), - NOT_PATH: new RegExp(merge3("[^\\%\\/\\:\\@]", UNRESERVED$$2, SUB_DELIMS$$), "g"), - NOT_PATH_NOSCHEME: new RegExp(merge3("[^\\%\\/\\@]", UNRESERVED$$2, SUB_DELIMS$$), "g"), - NOT_QUERY: new RegExp(merge3("[^\\%]", UNRESERVED$$2, SUB_DELIMS$$, "[\\:\\@\\/\\?]", IPRIVATE$$), "g"), - NOT_FRAGMENT: new RegExp(merge3("[^\\%]", UNRESERVED$$2, SUB_DELIMS$$, "[\\:\\@\\/\\?]"), "g"), - ESCAPE: new RegExp(merge3("[^]", UNRESERVED$$2, SUB_DELIMS$$), "g"), - UNRESERVED: new RegExp(UNRESERVED$$2, "g"), - OTHER_CHARS: new RegExp(merge3("[^\\%]", UNRESERVED$$2, RESERVED$$), "g"), - PCT_ENCODED: new RegExp(PCT_ENCODED$2, "g"), - IPV4ADDRESS: new RegExp("^(" + IPV4ADDRESS$ + ")$"), - IPV6ADDRESS: new RegExp("^\\[?(" + IPV6ADDRESS$ + ")" + subexp(subexp("\\%25|\\%(?!" + HEXDIG$$2 + "{2})") + "(" + ZONEID$ + ")") + "?\\]?$") - }; - } - var URI_PROTOCOL = buildExps(false); - var IRI_PROTOCOL = buildExps(true); - var slicedToArray = /* @__PURE__ */ (function() { - function sliceIterator(arr, i) { - var _arr = []; - var _n = true; - var _d = false; - var _e = void 0; - try { - for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { - _arr.push(_s.value); - if (i && _arr.length === i) - break; - } - } catch (err) { - _d = true; - _e = err; - } finally { - try { - if (!_n && _i["return"]) - _i["return"](); - } finally { - if (_d) - throw _e; - } - } - return _arr; - } - return function(arr, i) { - if (Array.isArray(arr)) { - return arr; - } else if (Symbol.iterator in Object(arr)) { - return sliceIterator(arr, i); - } else { - throw new TypeError("Invalid attempt to destructure non-iterable instance"); - } - }; - })(); - var toConsumableArray = function(arr) { - if (Array.isArray(arr)) { - for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) - arr2[i] = arr[i]; - return arr2; - } else { - return Array.from(arr); - } - }; - var maxInt = 2147483647; - var base = 36; - var tMin = 1; - var tMax = 26; - var skew = 38; - var damp = 700; - var initialBias = 72; - var initialN = 128; - var delimiter = "-"; - var regexPunycode = /^xn--/; - var regexNonASCII = /[^\0-\x7E]/; - var regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g; - var errors2 = { - overflow: "Overflow: input needs wider integers to process", - "not-basic": "Illegal input >= 0x80 (not a basic code point)", - "invalid-input": "Invalid input" - }; - var baseMinusTMin = base - tMin; - var floor = Math.floor; - var stringFromCharCode = String.fromCharCode; - function error$1(type2) { - throw new RangeError(errors2[type2]); - } - function map(array, fn2) { - var result = []; - var length = array.length; - while (length--) { - result[length] = fn2(array[length]); - } - return result; - } - function mapDomain(string3, fn2) { - var parts = string3.split("@"); - var result = ""; - if (parts.length > 1) { - result = parts[0] + "@"; - string3 = parts[1]; - } - string3 = string3.replace(regexSeparators, "."); - var labels = string3.split("."); - var encoded = map(labels, fn2).join("."); - return result + encoded; - } - function ucs2decode(string3) { - var output = []; - var counter = 0; - var length = string3.length; - while (counter < length) { - var value2 = string3.charCodeAt(counter++); - if (value2 >= 55296 && value2 <= 56319 && counter < length) { - var extra = string3.charCodeAt(counter++); - if ((extra & 64512) == 56320) { - output.push(((value2 & 1023) << 10) + (extra & 1023) + 65536); + _reduceValues(values, valueCode, usedValues = {}, getCode) { + let code = code_1.nil; + for (const prefix in values) { + const vs = values[prefix]; + if (!vs) + continue; + const nameSet = usedValues[prefix] = usedValues[prefix] || /* @__PURE__ */ new Map(); + vs.forEach((name) => { + if (nameSet.has(name)) + return; + nameSet.set(name, UsedValueState.Started); + let c = valueCode(name); + if (c) { + const def = this.opts.es5 ? exports.varKinds.var : exports.varKinds.const; + code = (0, code_1._)`${code}${def} ${name} = ${c};${this.opts._n}`; + } else if (c = getCode === null || getCode === void 0 ? void 0 : getCode(name)) { + code = (0, code_1._)`${code}${c}${this.opts._n}`; } else { - output.push(value2); - counter--; + throw new ValueError(name); } - } else { - output.push(value2); - } + nameSet.set(name, UsedValueState.Completed); + }); } - return output; + return code; } - var ucs2encode = function ucs2encode2(array) { - return String.fromCodePoint.apply(String, toConsumableArray(array)); - }; - var basicToDigit = function basicToDigit2(codePoint) { - if (codePoint - 48 < 10) { - return codePoint - 22; + } + exports.ValueScope = ValueScope; +}); +var require_codegen = __commonJS2((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.or = exports.and = exports.not = exports.CodeGen = exports.operators = exports.varKinds = exports.ValueScopeName = exports.ValueScope = exports.Scope = exports.Name = exports.regexpCode = exports.stringify = exports.getProperty = exports.nil = exports.strConcat = exports.str = exports._ = void 0; + var code_1 = require_code(); + var scope_1 = require_scope(); + var code_2 = require_code(); + Object.defineProperty(exports, "_", { enumerable: true, get: function() { + return code_2._; + } }); + Object.defineProperty(exports, "str", { enumerable: true, get: function() { + return code_2.str; + } }); + Object.defineProperty(exports, "strConcat", { enumerable: true, get: function() { + return code_2.strConcat; + } }); + Object.defineProperty(exports, "nil", { enumerable: true, get: function() { + return code_2.nil; + } }); + Object.defineProperty(exports, "getProperty", { enumerable: true, get: function() { + return code_2.getProperty; + } }); + Object.defineProperty(exports, "stringify", { enumerable: true, get: function() { + return code_2.stringify; + } }); + Object.defineProperty(exports, "regexpCode", { enumerable: true, get: function() { + return code_2.regexpCode; + } }); + Object.defineProperty(exports, "Name", { enumerable: true, get: function() { + return code_2.Name; + } }); + var scope_2 = require_scope(); + Object.defineProperty(exports, "Scope", { enumerable: true, get: function() { + return scope_2.Scope; + } }); + Object.defineProperty(exports, "ValueScope", { enumerable: true, get: function() { + return scope_2.ValueScope; + } }); + Object.defineProperty(exports, "ValueScopeName", { enumerable: true, get: function() { + return scope_2.ValueScopeName; + } }); + Object.defineProperty(exports, "varKinds", { enumerable: true, get: function() { + return scope_2.varKinds; + } }); + exports.operators = { + GT: new code_1._Code(">"), + GTE: new code_1._Code(">="), + LT: new code_1._Code("<"), + LTE: new code_1._Code("<="), + EQ: new code_1._Code("==="), + NEQ: new code_1._Code("!=="), + NOT: new code_1._Code("!"), + OR: new code_1._Code("||"), + AND: new code_1._Code("&&"), + ADD: new code_1._Code("+") + }; + class Node { + optimizeNodes() { + return this; + } + optimizeNames(_names, _constants) { + return this; + } + } + class Def extends Node { + constructor(varKind, name, rhs) { + super(); + this.varKind = varKind; + this.name = name; + this.rhs = rhs; + } + render({ es5, _n }) { + const varKind = es5 ? scope_1.varKinds.var : this.varKind; + const rhs = this.rhs === void 0 ? "" : ` = ${this.rhs}`; + return `${varKind} ${this.name}${rhs};` + _n; + } + optimizeNames(names, constants) { + if (!names[this.name.str]) + return; + if (this.rhs) + this.rhs = optimizeExpr(this.rhs, names, constants); + return this; + } + get names() { + return this.rhs instanceof code_1._CodeOrName ? this.rhs.names : {}; + } + } + class Assign extends Node { + constructor(lhs, rhs, sideEffects) { + super(); + this.lhs = lhs; + this.rhs = rhs; + this.sideEffects = sideEffects; + } + render({ _n }) { + return `${this.lhs} = ${this.rhs};` + _n; + } + optimizeNames(names, constants) { + if (this.lhs instanceof code_1.Name && !names[this.lhs.str] && !this.sideEffects) + return; + this.rhs = optimizeExpr(this.rhs, names, constants); + return this; + } + get names() { + const names = this.lhs instanceof code_1.Name ? {} : { ...this.lhs.names }; + return addExprNames(names, this.rhs); + } + } + class AssignOp extends Assign { + constructor(lhs, op, rhs, sideEffects) { + super(lhs, rhs, sideEffects); + this.op = op; + } + render({ _n }) { + return `${this.lhs} ${this.op}= ${this.rhs};` + _n; + } + } + class Label extends Node { + constructor(label) { + super(); + this.label = label; + this.names = {}; + } + render({ _n }) { + return `${this.label}:` + _n; + } + } + class Break extends Node { + constructor(label) { + super(); + this.label = label; + this.names = {}; + } + render({ _n }) { + const label = this.label ? ` ${this.label}` : ""; + return `break${label};` + _n; + } + } + class Throw extends Node { + constructor(error210) { + super(); + this.error = error210; + } + render({ _n }) { + return `throw ${this.error};` + _n; + } + get names() { + return this.error.names; + } + } + class AnyCode extends Node { + constructor(code) { + super(); + this.code = code; + } + render({ _n }) { + return `${this.code};` + _n; + } + optimizeNodes() { + return `${this.code}` ? this : void 0; + } + optimizeNames(names, constants) { + this.code = optimizeExpr(this.code, names, constants); + return this; + } + get names() { + return this.code instanceof code_1._CodeOrName ? this.code.names : {}; + } + } + class ParentNode extends Node { + constructor(nodes = []) { + super(); + this.nodes = nodes; + } + render(opts) { + return this.nodes.reduce((code, n) => code + n.render(opts), ""); + } + optimizeNodes() { + const { nodes } = this; + let i = nodes.length; + while (i--) { + const n = nodes[i].optimizeNodes(); + if (Array.isArray(n)) + nodes.splice(i, 1, ...n); + else if (n) + nodes[i] = n; + else + nodes.splice(i, 1); } - if (codePoint - 65 < 26) { - return codePoint - 65; + return nodes.length > 0 ? this : void 0; + } + optimizeNames(names, constants) { + const { nodes } = this; + let i = nodes.length; + while (i--) { + const n = nodes[i]; + if (n.optimizeNames(names, constants)) + continue; + subtractNames(names, n.names); + nodes.splice(i, 1); } - if (codePoint - 97 < 26) { - return codePoint - 97; + return nodes.length > 0 ? this : void 0; + } + get names() { + return this.nodes.reduce((names, n) => addNames(names, n.names), {}); + } + } + class BlockNode extends ParentNode { + render(opts) { + return "{" + opts._n + super.render(opts) + "}" + opts._n; + } + } + class Root extends ParentNode { + } + class Else extends BlockNode { + } + Else.kind = "else"; + class If extends BlockNode { + constructor(condition, nodes) { + super(nodes); + this.condition = condition; + } + render(opts) { + let code = `if(${this.condition})` + super.render(opts); + if (this.else) + code += "else " + this.else.render(opts); + return code; + } + optimizeNodes() { + super.optimizeNodes(); + const cond = this.condition; + if (cond === true) + return this.nodes; + let e = this.else; + if (e) { + const ns = e.optimizeNodes(); + e = this.else = Array.isArray(ns) ? new Else(ns) : ns; } - return base; - }; - var digitToBasic = function digitToBasic2(digit, flag) { - return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5); - }; - var adapt = function adapt2(delta, numPoints, firstTime) { - var k = 0; - delta = firstTime ? floor(delta / damp) : delta >> 1; - delta += floor(delta / numPoints); - for (; delta > baseMinusTMin * tMax >> 1; k += base) { - delta = floor(delta / baseMinusTMin); + if (e) { + if (cond === false) + return e instanceof If ? e : e.nodes; + if (this.nodes.length) + return this; + return new If(not(cond), e instanceof If ? [e] : e.nodes); } - return floor(k + (baseMinusTMin + 1) * delta / (delta + skew)); - }; - var decode = function decode2(input) { - var output = []; - var inputLength = input.length; - var i = 0; - var n = initialN; - var bias = initialBias; - var basic = input.lastIndexOf(delimiter); - if (basic < 0) { - basic = 0; - } - for (var j = 0; j < basic; ++j) { - if (input.charCodeAt(j) >= 128) { - error$1("not-basic"); - } - output.push(input.charCodeAt(j)); - } - for (var index = basic > 0 ? basic + 1 : 0; index < inputLength; ) { - var oldi = i; - for (var w = 1, k = base; ; k += base) { - if (index >= inputLength) { - error$1("invalid-input"); - } - var digit = basicToDigit(input.charCodeAt(index++)); - if (digit >= base || digit > floor((maxInt - i) / w)) { - error$1("overflow"); - } - i += digit * w; - var t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias; - if (digit < t) { - break; - } - var baseMinusT = base - t; - if (w > floor(maxInt / baseMinusT)) { - error$1("overflow"); - } - w *= baseMinusT; - } - var out = output.length + 1; - bias = adapt(i - oldi, out, oldi == 0); - if (floor(i / out) > maxInt - n) { - error$1("overflow"); - } - n += floor(i / out); - i %= out; - output.splice(i++, 0, n); - } - return String.fromCodePoint.apply(String, output); - }; - var encode2 = function encode3(input) { - var output = []; - input = ucs2decode(input); - var inputLength = input.length; - var n = initialN; - var delta = 0; - var bias = initialBias; - var _iteratorNormalCompletion = true; - var _didIteratorError = false; - var _iteratorError = void 0; - try { - for (var _iterator = input[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { - var _currentValue2 = _step.value; - if (_currentValue2 < 128) { - output.push(stringFromCharCode(_currentValue2)); - } - } - } catch (err) { - _didIteratorError = true; - _iteratorError = err; - } finally { - try { - if (!_iteratorNormalCompletion && _iterator.return) { - _iterator.return(); - } - } finally { - if (_didIteratorError) { - throw _iteratorError; - } + if (cond === false || !this.nodes.length) + return; + return this; + } + optimizeNames(names, constants) { + var _a2; + this.else = (_a2 = this.else) === null || _a2 === void 0 ? void 0 : _a2.optimizeNames(names, constants); + if (!(super.optimizeNames(names, constants) || this.else)) + return; + this.condition = optimizeExpr(this.condition, names, constants); + return this; + } + get names() { + const names = super.names; + addExprNames(names, this.condition); + if (this.else) + addNames(names, this.else.names); + return names; + } + } + If.kind = "if"; + class For extends BlockNode { + } + For.kind = "for"; + class ForLoop extends For { + constructor(iteration) { + super(); + this.iteration = iteration; + } + render(opts) { + return `for(${this.iteration})` + super.render(opts); + } + optimizeNames(names, constants) { + if (!super.optimizeNames(names, constants)) + return; + this.iteration = optimizeExpr(this.iteration, names, constants); + return this; + } + get names() { + return addNames(super.names, this.iteration.names); + } + } + class ForRange extends For { + constructor(varKind, name, from, to) { + super(); + this.varKind = varKind; + this.name = name; + this.from = from; + this.to = to; + } + render(opts) { + const varKind = opts.es5 ? scope_1.varKinds.var : this.varKind; + const { name, from, to } = this; + return `for(${varKind} ${name}=${from}; ${name}<${to}; ${name}++)` + super.render(opts); + } + get names() { + const names = addExprNames(super.names, this.from); + return addExprNames(names, this.to); + } + } + class ForIter extends For { + constructor(loop, varKind, name, iterable) { + super(); + this.loop = loop; + this.varKind = varKind; + this.name = name; + this.iterable = iterable; + } + render(opts) { + return `for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})` + super.render(opts); + } + optimizeNames(names, constants) { + if (!super.optimizeNames(names, constants)) + return; + this.iterable = optimizeExpr(this.iterable, names, constants); + return this; + } + get names() { + return addNames(super.names, this.iterable.names); + } + } + class Func extends BlockNode { + constructor(name, args3, async) { + super(); + this.name = name; + this.args = args3; + this.async = async; + } + render(opts) { + const _async = this.async ? "async " : ""; + return `${_async}function ${this.name}(${this.args})` + super.render(opts); + } + } + Func.kind = "func"; + class Return extends ParentNode { + render(opts) { + return "return " + super.render(opts); + } + } + Return.kind = "return"; + class Try extends BlockNode { + render(opts) { + let code = "try" + super.render(opts); + if (this.catch) + code += this.catch.render(opts); + if (this.finally) + code += this.finally.render(opts); + return code; + } + optimizeNodes() { + var _a2, _b; + super.optimizeNodes(); + (_a2 = this.catch) === null || _a2 === void 0 || _a2.optimizeNodes(); + (_b = this.finally) === null || _b === void 0 || _b.optimizeNodes(); + return this; + } + optimizeNames(names, constants) { + var _a2, _b; + super.optimizeNames(names, constants); + (_a2 = this.catch) === null || _a2 === void 0 || _a2.optimizeNames(names, constants); + (_b = this.finally) === null || _b === void 0 || _b.optimizeNames(names, constants); + return this; + } + get names() { + const names = super.names; + if (this.catch) + addNames(names, this.catch.names); + if (this.finally) + addNames(names, this.finally.names); + return names; + } + } + class Catch extends BlockNode { + constructor(error210) { + super(); + this.error = error210; + } + render(opts) { + return `catch(${this.error})` + super.render(opts); + } + } + Catch.kind = "catch"; + class Finally extends BlockNode { + render(opts) { + return "finally" + super.render(opts); + } + } + Finally.kind = "finally"; + class CodeGen { + constructor(extScope, opts = {}) { + this._values = {}; + this._blockStarts = []; + this._constants = {}; + this.opts = { ...opts, _n: opts.lines ? ` +` : "" }; + this._extScope = extScope; + this._scope = new scope_1.Scope({ parent: extScope }); + this._nodes = [new Root()]; + } + toString() { + return this._root.render(this.opts); + } + name(prefix) { + return this._scope.name(prefix); + } + scopeName(prefix) { + return this._extScope.name(prefix); + } + scopeValue(prefixOrName, value2) { + const name = this._extScope.value(prefixOrName, value2); + const vs = this._values[name.prefix] || (this._values[name.prefix] = /* @__PURE__ */ new Set()); + vs.add(name); + return name; + } + getScopeValue(prefix, keyOrRef) { + return this._extScope.getValue(prefix, keyOrRef); + } + scopeRefs(scopeName) { + return this._extScope.scopeRefs(scopeName, this._values); + } + scopeCode() { + return this._extScope.scopeCode(this._values); + } + _def(varKind, nameOrPrefix, rhs, constant) { + const name = this._scope.toName(nameOrPrefix); + if (rhs !== void 0 && constant) + this._constants[name.str] = rhs; + this._leafNode(new Def(varKind, name, rhs)); + return name; + } + const(nameOrPrefix, rhs, _constant) { + return this._def(scope_1.varKinds.const, nameOrPrefix, rhs, _constant); + } + let(nameOrPrefix, rhs, _constant) { + return this._def(scope_1.varKinds.let, nameOrPrefix, rhs, _constant); + } + var(nameOrPrefix, rhs, _constant) { + return this._def(scope_1.varKinds.var, nameOrPrefix, rhs, _constant); + } + assign(lhs, rhs, sideEffects) { + return this._leafNode(new Assign(lhs, rhs, sideEffects)); + } + add(lhs, rhs) { + return this._leafNode(new AssignOp(lhs, exports.operators.ADD, rhs)); + } + code(c) { + if (typeof c == "function") + c(); + else if (c !== code_1.nil) + this._leafNode(new AnyCode(c)); + return this; + } + object(...keyValues) { + const code = ["{"]; + for (const [key, value2] of keyValues) { + if (code.length > 1) + code.push(","); + code.push(key); + if (key !== value2 || this.opts.es5) { + code.push(":"); + (0, code_1.addCodeArg)(code, value2); } } - var basicLength = output.length; - var handledCPCount = basicLength; - if (basicLength) { - output.push(delimiter); + code.push("}"); + return new code_1._Code(code); + } + if(condition, thenBody, elseBody) { + this._blockNode(new If(condition)); + if (thenBody && elseBody) { + this.code(thenBody).else().code(elseBody).endIf(); + } else if (thenBody) { + this.code(thenBody).endIf(); + } else if (elseBody) { + throw new Error('CodeGen: "else" body without "then" body'); } - while (handledCPCount < inputLength) { - var m = maxInt; - var _iteratorNormalCompletion2 = true; - var _didIteratorError2 = false; - var _iteratorError2 = void 0; - try { - for (var _iterator2 = input[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) { - var currentValue = _step2.value; - if (currentValue >= n && currentValue < m) { - m = currentValue; - } - } - } catch (err) { - _didIteratorError2 = true; - _iteratorError2 = err; - } finally { - try { - if (!_iteratorNormalCompletion2 && _iterator2.return) { - _iterator2.return(); - } - } finally { - if (_didIteratorError2) { - throw _iteratorError2; - } - } - } - var handledCPCountPlusOne = handledCPCount + 1; - if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) { - error$1("overflow"); - } - delta += (m - n) * handledCPCountPlusOne; - n = m; - var _iteratorNormalCompletion3 = true; - var _didIteratorError3 = false; - var _iteratorError3 = void 0; - try { - for (var _iterator3 = input[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) { - var _currentValue = _step3.value; - if (_currentValue < n && ++delta > maxInt) { - error$1("overflow"); - } - if (_currentValue == n) { - var q = delta; - for (var k = base; ; k += base) { - var t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias; - if (q < t) { - break; - } - var qMinusT = q - t; - var baseMinusT = base - t; - output.push(stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))); - q = floor(qMinusT / baseMinusT); - } - output.push(stringFromCharCode(digitToBasic(q, 0))); - bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength); - delta = 0; - ++handledCPCount; - } - } - } catch (err) { - _didIteratorError3 = true; - _iteratorError3 = err; - } finally { - try { - if (!_iteratorNormalCompletion3 && _iterator3.return) { - _iterator3.return(); - } - } finally { - if (_didIteratorError3) { - throw _iteratorError3; - } - } - } - ++delta; - ++n; + return this; + } + elseIf(condition) { + return this._elseNode(new If(condition)); + } + else() { + return this._elseNode(new Else()); + } + endIf() { + return this._endBlockNode(If, Else); + } + _for(node2, forBody) { + this._blockNode(node2); + if (forBody) + this.code(forBody).endFor(); + return this; + } + for(iteration, forBody) { + return this._for(new ForLoop(iteration), forBody); + } + forRange(nameOrPrefix, from, to, forBody, varKind = this.opts.es5 ? scope_1.varKinds.var : scope_1.varKinds.let) { + const name = this._scope.toName(nameOrPrefix); + return this._for(new ForRange(varKind, name, from, to), () => forBody(name)); + } + forOf(nameOrPrefix, iterable, forBody, varKind = scope_1.varKinds.const) { + const name = this._scope.toName(nameOrPrefix); + if (this.opts.es5) { + const arr = iterable instanceof code_1.Name ? iterable : this.var("_arr", iterable); + return this.forRange("_i", 0, (0, code_1._)`${arr}.length`, (i) => { + this.var(name, (0, code_1._)`${arr}[${i}]`); + forBody(name); + }); } - return output.join(""); - }; - var toUnicode = function toUnicode2(input) { - return mapDomain(input, function(string3) { - return regexPunycode.test(string3) ? decode(string3.slice(4).toLowerCase()) : string3; - }); - }; - var toASCII = function toASCII2(input) { - return mapDomain(input, function(string3) { - return regexNonASCII.test(string3) ? "xn--" + encode2(string3) : string3; - }); - }; - var punycode = { - version: "2.1.0", - ucs2: { - decode: ucs2decode, - encode: ucs2encode - }, - decode, - encode: encode2, - toASCII, - toUnicode - }; - var SCHEMES = {}; - function pctEncChar(chr) { - var c = chr.charCodeAt(0); - var e = void 0; - if (c < 16) - e = "%0" + c.toString(16).toUpperCase(); - else if (c < 128) - e = "%" + c.toString(16).toUpperCase(); - else if (c < 2048) - e = "%" + (c >> 6 | 192).toString(16).toUpperCase() + "%" + (c & 63 | 128).toString(16).toUpperCase(); + return this._for(new ForIter("of", varKind, name, iterable), () => forBody(name)); + } + forIn(nameOrPrefix, obj, forBody, varKind = this.opts.es5 ? scope_1.varKinds.var : scope_1.varKinds.const) { + if (this.opts.ownProperties) { + return this.forOf(nameOrPrefix, (0, code_1._)`Object.keys(${obj})`, forBody); + } + const name = this._scope.toName(nameOrPrefix); + return this._for(new ForIter("in", varKind, name, obj), () => forBody(name)); + } + endFor() { + return this._endBlockNode(For); + } + label(label) { + return this._leafNode(new Label(label)); + } + break(label) { + return this._leafNode(new Break(label)); + } + return(value2) { + const node2 = new Return(); + this._blockNode(node2); + this.code(value2); + if (node2.nodes.length !== 1) + throw new Error('CodeGen: "return" should have one node'); + return this._endBlockNode(Return); + } + try(tryBody, catchCode, finallyCode) { + if (!catchCode && !finallyCode) + throw new Error('CodeGen: "try" without "catch" and "finally"'); + const node2 = new Try(); + this._blockNode(node2); + this.code(tryBody); + if (catchCode) { + const error210 = this.name("e"); + this._currNode = node2.catch = new Catch(error210); + catchCode(error210); + } + if (finallyCode) { + this._currNode = node2.finally = new Finally(); + this.code(finallyCode); + } + return this._endBlockNode(Catch, Finally); + } + throw(error210) { + return this._leafNode(new Throw(error210)); + } + block(body, nodeCount) { + this._blockStarts.push(this._nodes.length); + if (body) + this.code(body).endBlock(nodeCount); + return this; + } + endBlock(nodeCount) { + const len = this._blockStarts.pop(); + if (len === void 0) + throw new Error("CodeGen: not in self-balancing block"); + const toClose = this._nodes.length - len; + if (toClose < 0 || nodeCount !== void 0 && toClose !== nodeCount) { + throw new Error(`CodeGen: wrong number of nodes: ${toClose} vs ${nodeCount} expected`); + } + this._nodes.length = len; + return this; + } + func(name, args3 = code_1.nil, async, funcBody) { + this._blockNode(new Func(name, args3, async)); + if (funcBody) + this.code(funcBody).endFunc(); + return this; + } + endFunc() { + return this._endBlockNode(Func); + } + optimize(n = 1) { + while (n-- > 0) { + this._root.optimizeNodes(); + this._root.optimizeNames(this._root.names, this._constants); + } + } + _leafNode(node2) { + this._currNode.nodes.push(node2); + return this; + } + _blockNode(node2) { + this._currNode.nodes.push(node2); + this._nodes.push(node2); + } + _endBlockNode(N1, N2) { + const n = this._currNode; + if (n instanceof N1 || N2 && n instanceof N2) { + this._nodes.pop(); + return this; + } + throw new Error(`CodeGen: not in block "${N2 ? `${N1.kind}/${N2.kind}` : N1.kind}"`); + } + _elseNode(node2) { + const n = this._currNode; + if (!(n instanceof If)) { + throw new Error('CodeGen: "else" without "if"'); + } + this._currNode = n.else = node2; + return this; + } + get _root() { + return this._nodes[0]; + } + get _currNode() { + const ns = this._nodes; + return ns[ns.length - 1]; + } + set _currNode(node2) { + const ns = this._nodes; + ns[ns.length - 1] = node2; + } + } + exports.CodeGen = CodeGen; + function addNames(names, from) { + for (const n in from) + names[n] = (names[n] || 0) + (from[n] || 0); + return names; + } + function addExprNames(names, from) { + return from instanceof code_1._CodeOrName ? addNames(names, from.names) : names; + } + function optimizeExpr(expr, names, constants) { + if (expr instanceof code_1.Name) + return replaceName(expr); + if (!canOptimize(expr)) + return expr; + return new code_1._Code(expr._items.reduce((items, c) => { + if (c instanceof code_1.Name) + c = replaceName(c); + if (c instanceof code_1._Code) + items.push(...c._items); else - e = "%" + (c >> 12 | 224).toString(16).toUpperCase() + "%" + (c >> 6 & 63 | 128).toString(16).toUpperCase() + "%" + (c & 63 | 128).toString(16).toUpperCase(); - return e; + items.push(c); + return items; + }, [])); + function replaceName(n) { + const c = constants[n.str]; + if (c === void 0 || names[n.str] !== 1) + return n; + delete names[n.str]; + return c; } - function pctDecChars(str) { - var newStr = ""; - var i = 0; - var il = str.length; - while (i < il) { - var c = parseInt(str.substr(i + 1, 2), 16); - if (c < 128) { - newStr += String.fromCharCode(c); - i += 3; - } else if (c >= 194 && c < 224) { - if (il - i >= 6) { - var c2 = parseInt(str.substr(i + 4, 2), 16); - newStr += String.fromCharCode((c & 31) << 6 | c2 & 63); - } else { - newStr += str.substr(i, 6); - } - i += 6; - } else if (c >= 224) { - if (il - i >= 9) { - var _c = parseInt(str.substr(i + 4, 2), 16); - var c3 = parseInt(str.substr(i + 7, 2), 16); - newStr += String.fromCharCode((c & 15) << 12 | (_c & 63) << 6 | c3 & 63); - } else { - newStr += str.substr(i, 9); - } - i += 9; + function canOptimize(e) { + return e instanceof code_1._Code && e._items.some((c) => c instanceof code_1.Name && names[c.str] === 1 && constants[c.str] !== void 0); + } + } + function subtractNames(names, from) { + for (const n in from) + names[n] = (names[n] || 0) - (from[n] || 0); + } + function not(x) { + return typeof x == "boolean" || typeof x == "number" || x === null ? !x : (0, code_1._)`!${par(x)}`; + } + exports.not = not; + var andCode = mappend(exports.operators.AND); + function and(...args3) { + return args3.reduce(andCode); + } + exports.and = and; + var orCode = mappend(exports.operators.OR); + function or(...args3) { + return args3.reduce(orCode); + } + exports.or = or; + function mappend(op) { + return (x, y) => x === code_1.nil ? y : y === code_1.nil ? x : (0, code_1._)`${par(x)} ${op} ${par(y)}`; + } + function par(x) { + return x instanceof code_1.Name ? x : (0, code_1._)`(${x})`; + } +}); +var require_util8 = __commonJS2((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.checkStrictMode = exports.getErrorPath = exports.Type = exports.useFunc = exports.setEvaluated = exports.evaluatedPropsToName = exports.mergeEvaluated = exports.eachItem = exports.unescapeJsonPointer = exports.escapeJsonPointer = exports.escapeFragment = exports.unescapeFragment = exports.schemaRefOrVal = exports.schemaHasRulesButRef = exports.schemaHasRules = exports.checkUnknownRules = exports.alwaysValidSchema = exports.toHash = void 0; + var codegen_1 = require_codegen(); + var code_1 = require_code(); + function toHash(arr) { + const hash2 = {}; + for (const item of arr) + hash2[item] = true; + return hash2; + } + exports.toHash = toHash; + function alwaysValidSchema(it, schema2) { + if (typeof schema2 == "boolean") + return schema2; + if (Object.keys(schema2).length === 0) + return true; + checkUnknownRules(it, schema2); + return !schemaHasRules(schema2, it.self.RULES.all); + } + exports.alwaysValidSchema = alwaysValidSchema; + function checkUnknownRules(it, schema2 = it.schema) { + const { opts, self: self2 } = it; + if (!opts.strictSchema) + return; + if (typeof schema2 === "boolean") + return; + const rules = self2.RULES.keywords; + for (const key in schema2) { + if (!rules[key]) + checkStrictMode(it, `unknown keyword: "${key}"`); + } + } + exports.checkUnknownRules = checkUnknownRules; + function schemaHasRules(schema2, rules) { + if (typeof schema2 == "boolean") + return !schema2; + for (const key in schema2) + if (rules[key]) + return true; + return false; + } + exports.schemaHasRules = schemaHasRules; + function schemaHasRulesButRef(schema2, RULES) { + if (typeof schema2 == "boolean") + return !schema2; + for (const key in schema2) + if (key !== "$ref" && RULES.all[key]) + return true; + return false; + } + exports.schemaHasRulesButRef = schemaHasRulesButRef; + function schemaRefOrVal({ topSchemaRef, schemaPath }, schema2, keyword, $data) { + if (!$data) { + if (typeof schema2 == "number" || typeof schema2 == "boolean") + return schema2; + if (typeof schema2 == "string") + return (0, codegen_1._)`${schema2}`; + } + return (0, codegen_1._)`${topSchemaRef}${schemaPath}${(0, codegen_1.getProperty)(keyword)}`; + } + exports.schemaRefOrVal = schemaRefOrVal; + function unescapeFragment(str) { + return unescapeJsonPointer(decodeURIComponent(str)); + } + exports.unescapeFragment = unescapeFragment; + function escapeFragment(str) { + return encodeURIComponent(escapeJsonPointer(str)); + } + exports.escapeFragment = escapeFragment; + function escapeJsonPointer(str) { + if (typeof str == "number") + return `${str}`; + return str.replace(/~/g, "~0").replace(/\//g, "~1"); + } + exports.escapeJsonPointer = escapeJsonPointer; + function unescapeJsonPointer(str) { + return str.replace(/~1/g, "/").replace(/~0/g, "~"); + } + exports.unescapeJsonPointer = unescapeJsonPointer; + function eachItem(xs, f) { + if (Array.isArray(xs)) { + for (const x of xs) + f(x); + } else { + f(xs); + } + } + exports.eachItem = eachItem; + function makeMergeEvaluated({ mergeNames, mergeToName, mergeValues: mergeValues32, resultToName }) { + return (gen, from, to, toName) => { + const res = to === void 0 ? from : to instanceof codegen_1.Name ? (from instanceof codegen_1.Name ? mergeNames(gen, from, to) : mergeToName(gen, from, to), to) : from instanceof codegen_1.Name ? (mergeToName(gen, to, from), from) : mergeValues32(from, to); + return toName === codegen_1.Name && !(res instanceof codegen_1.Name) ? resultToName(gen, res) : res; + }; + } + exports.mergeEvaluated = { + props: makeMergeEvaluated({ + mergeNames: (gen, from, to) => gen.if((0, codegen_1._)`${to} !== true && ${from} !== undefined`, () => { + gen.if((0, codegen_1._)`${from} === true`, () => gen.assign(to, true), () => gen.assign(to, (0, codegen_1._)`${to} || {}`).code((0, codegen_1._)`Object.assign(${to}, ${from})`)); + }), + mergeToName: (gen, from, to) => gen.if((0, codegen_1._)`${to} !== true`, () => { + if (from === true) { + gen.assign(to, true); } else { - newStr += str.substr(i, 3); - i += 3; + gen.assign(to, (0, codegen_1._)`${to} || {}`); + setEvaluated(gen, to, from); } + }), + mergeValues: (from, to) => from === true ? true : { ...from, ...to }, + resultToName: evaluatedPropsToName + }), + items: makeMergeEvaluated({ + mergeNames: (gen, from, to) => gen.if((0, codegen_1._)`${to} !== true && ${from} !== undefined`, () => gen.assign(to, (0, codegen_1._)`${from} === true ? true : ${to} > ${from} ? ${to} : ${from}`)), + mergeToName: (gen, from, to) => gen.if((0, codegen_1._)`${to} !== true`, () => gen.assign(to, from === true ? true : (0, codegen_1._)`${to} > ${from} ? ${to} : ${from}`)), + mergeValues: (from, to) => from === true ? true : Math.max(from, to), + resultToName: (gen, items) => gen.var("items", items) + }) + }; + function evaluatedPropsToName(gen, ps) { + if (ps === true) + return gen.var("props", true); + const props = gen.var("props", (0, codegen_1._)`{}`); + if (ps !== void 0) + setEvaluated(gen, props, ps); + return props; + } + exports.evaluatedPropsToName = evaluatedPropsToName; + function setEvaluated(gen, props, ps) { + Object.keys(ps).forEach((p) => gen.assign((0, codegen_1._)`${props}${(0, codegen_1.getProperty)(p)}`, true)); + } + exports.setEvaluated = setEvaluated; + var snippets = {}; + function useFunc(gen, f) { + return gen.scopeValue("func", { + ref: f, + code: snippets[f.code] || (snippets[f.code] = new code_1._Code(f.code)) + }); + } + exports.useFunc = useFunc; + var Type2; + (function(Type22) { + Type22[Type22["Num"] = 0] = "Num"; + Type22[Type22["Str"] = 1] = "Str"; + })(Type2 || (exports.Type = Type2 = {})); + function getErrorPath(dataProp, dataPropType, jsPropertySyntax) { + if (dataProp instanceof codegen_1.Name) { + const isNumber2 = dataPropType === Type2.Num; + return jsPropertySyntax ? isNumber2 ? (0, codegen_1._)`"[" + ${dataProp} + "]"` : (0, codegen_1._)`"['" + ${dataProp} + "']"` : isNumber2 ? (0, codegen_1._)`"/" + ${dataProp}` : (0, codegen_1._)`"/" + ${dataProp}.replace(/~/g, "~0").replace(/\\//g, "~1")`; + } + return jsPropertySyntax ? (0, codegen_1.getProperty)(dataProp).toString() : "/" + escapeJsonPointer(dataProp); + } + exports.getErrorPath = getErrorPath; + function checkStrictMode(it, msg, mode = it.opts.strictSchema) { + if (!mode) + return; + msg = `strict mode: ${msg}`; + if (mode === true) + throw new Error(msg); + it.self.logger.warn(msg); + } + exports.checkStrictMode = checkStrictMode; +}); +var require_names = __commonJS2((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + var codegen_1 = require_codegen(); + var names = { + data: new codegen_1.Name("data"), + valCxt: new codegen_1.Name("valCxt"), + instancePath: new codegen_1.Name("instancePath"), + parentData: new codegen_1.Name("parentData"), + parentDataProperty: new codegen_1.Name("parentDataProperty"), + rootData: new codegen_1.Name("rootData"), + dynamicAnchors: new codegen_1.Name("dynamicAnchors"), + vErrors: new codegen_1.Name("vErrors"), + errors: new codegen_1.Name("errors"), + this: new codegen_1.Name("this"), + self: new codegen_1.Name("self"), + scope: new codegen_1.Name("scope"), + json: new codegen_1.Name("json"), + jsonPos: new codegen_1.Name("jsonPos"), + jsonLen: new codegen_1.Name("jsonLen"), + jsonPart: new codegen_1.Name("jsonPart") + }; + exports.default = names; +}); +var require_errors2 = __commonJS2((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.extendErrors = exports.resetErrorsCount = exports.reportExtraError = exports.reportError = exports.keyword$DataError = exports.keywordError = void 0; + var codegen_1 = require_codegen(); + var util_1 = require_util8(); + var names_1 = require_names(); + exports.keywordError = { + message: ({ keyword }) => (0, codegen_1.str)`must pass "${keyword}" keyword validation` + }; + exports.keyword$DataError = { + message: ({ keyword, schemaType }) => schemaType ? (0, codegen_1.str)`"${keyword}" keyword must be ${schemaType} ($data)` : (0, codegen_1.str)`"${keyword}" keyword is invalid ($data)` + }; + function reportError(cxt, error210 = exports.keywordError, errorPaths, overrideAllErrors) { + const { it } = cxt; + const { gen, compositeRule, allErrors } = it; + const errObj = errorObjectCode(cxt, error210, errorPaths); + if (overrideAllErrors !== null && overrideAllErrors !== void 0 ? overrideAllErrors : compositeRule || allErrors) { + addError(gen, errObj); + } else { + returnErrors(it, (0, codegen_1._)`[${errObj}]`); + } + } + exports.reportError = reportError; + function reportExtraError(cxt, error210 = exports.keywordError, errorPaths) { + const { it } = cxt; + const { gen, compositeRule, allErrors } = it; + const errObj = errorObjectCode(cxt, error210, errorPaths); + addError(gen, errObj); + if (!(compositeRule || allErrors)) { + returnErrors(it, names_1.default.vErrors); + } + } + exports.reportExtraError = reportExtraError; + function resetErrorsCount(gen, errsCount) { + gen.assign(names_1.default.errors, errsCount); + gen.if((0, codegen_1._)`${names_1.default.vErrors} !== null`, () => gen.if(errsCount, () => gen.assign((0, codegen_1._)`${names_1.default.vErrors}.length`, errsCount), () => gen.assign(names_1.default.vErrors, null))); + } + exports.resetErrorsCount = resetErrorsCount; + function extendErrors({ gen, keyword, schemaValue, data, errsCount, it }) { + if (errsCount === void 0) + throw new Error("ajv implementation error"); + const err = gen.name("err"); + gen.forRange("i", errsCount, names_1.default.errors, (i) => { + gen.const(err, (0, codegen_1._)`${names_1.default.vErrors}[${i}]`); + gen.if((0, codegen_1._)`${err}.instancePath === undefined`, () => gen.assign((0, codegen_1._)`${err}.instancePath`, (0, codegen_1.strConcat)(names_1.default.instancePath, it.errorPath))); + gen.assign((0, codegen_1._)`${err}.schemaPath`, (0, codegen_1.str)`${it.errSchemaPath}/${keyword}`); + if (it.opts.verbose) { + gen.assign((0, codegen_1._)`${err}.schema`, schemaValue); + gen.assign((0, codegen_1._)`${err}.data`, data); } - return newStr; + }); + } + exports.extendErrors = extendErrors; + function addError(gen, errObj) { + const err = gen.const("err", errObj); + gen.if((0, codegen_1._)`${names_1.default.vErrors} === null`, () => gen.assign(names_1.default.vErrors, (0, codegen_1._)`[${err}]`), (0, codegen_1._)`${names_1.default.vErrors}.push(${err})`); + gen.code((0, codegen_1._)`${names_1.default.errors}++`); + } + function returnErrors(it, errs) { + const { gen, validateName, schemaEnv } = it; + if (schemaEnv.$async) { + gen.throw((0, codegen_1._)`new ${it.ValidationError}(${errs})`); + } else { + gen.assign((0, codegen_1._)`${validateName}.errors`, errs); + gen.return(false); } - function _normalizeComponentEncoding(components, protocol) { - function decodeUnreserved2(str) { - var decStr = pctDecChars(str); - return !decStr.match(protocol.UNRESERVED) ? str : decStr; + } + var E = { + keyword: new codegen_1.Name("keyword"), + schemaPath: new codegen_1.Name("schemaPath"), + params: new codegen_1.Name("params"), + propertyName: new codegen_1.Name("propertyName"), + message: new codegen_1.Name("message"), + schema: new codegen_1.Name("schema"), + parentSchema: new codegen_1.Name("parentSchema") + }; + function errorObjectCode(cxt, error210, errorPaths) { + const { createErrors } = cxt.it; + if (createErrors === false) + return (0, codegen_1._)`{}`; + return errorObject(cxt, error210, errorPaths); + } + function errorObject(cxt, error210, errorPaths = {}) { + const { gen, it } = cxt; + const keyValues = [ + errorInstancePath(it, errorPaths), + errorSchemaPath(cxt, errorPaths) + ]; + extraErrorProps(cxt, error210, keyValues); + return gen.object(...keyValues); + } + function errorInstancePath({ errorPath }, { instancePath }) { + const instPath = instancePath ? (0, codegen_1.str)`${errorPath}${(0, util_1.getErrorPath)(instancePath, util_1.Type.Str)}` : errorPath; + return [names_1.default.instancePath, (0, codegen_1.strConcat)(names_1.default.instancePath, instPath)]; + } + function errorSchemaPath({ keyword, it: { errSchemaPath } }, { schemaPath, parentSchema }) { + let schPath = parentSchema ? errSchemaPath : (0, codegen_1.str)`${errSchemaPath}/${keyword}`; + if (schemaPath) { + schPath = (0, codegen_1.str)`${schPath}${(0, util_1.getErrorPath)(schemaPath, util_1.Type.Str)}`; + } + return [E.schemaPath, schPath]; + } + function extraErrorProps(cxt, { params, message }, keyValues) { + const { keyword, data, schemaValue, it } = cxt; + const { opts, propertyName, topSchemaRef, schemaPath } = it; + keyValues.push([E.keyword, keyword], [E.params, typeof params == "function" ? params(cxt) : params || (0, codegen_1._)`{}`]); + if (opts.messages) { + keyValues.push([E.message, typeof message == "function" ? message(cxt) : message]); + } + if (opts.verbose) { + keyValues.push([E.schema, schemaValue], [E.parentSchema, (0, codegen_1._)`${topSchemaRef}${schemaPath}`], [names_1.default.data, data]); + } + if (propertyName) + keyValues.push([E.propertyName, propertyName]); + } +}); +var require_boolSchema = __commonJS2((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.boolOrEmptySchema = exports.topBoolOrEmptySchema = void 0; + var errors_1 = require_errors2(); + var codegen_1 = require_codegen(); + var names_1 = require_names(); + var boolError = { + message: "boolean schema is false" + }; + function topBoolOrEmptySchema(it) { + const { gen, schema: schema2, validateName } = it; + if (schema2 === false) { + falseSchemaError(it, false); + } else if (typeof schema2 == "object" && schema2.$async === true) { + gen.return(names_1.default.data); + } else { + gen.assign((0, codegen_1._)`${validateName}.errors`, null); + gen.return(true); + } + } + exports.topBoolOrEmptySchema = topBoolOrEmptySchema; + function boolOrEmptySchema(it, valid) { + const { gen, schema: schema2 } = it; + if (schema2 === false) { + gen.var(valid, false); + falseSchemaError(it); + } else { + gen.var(valid, true); + } + } + exports.boolOrEmptySchema = boolOrEmptySchema; + function falseSchemaError(it, overrideAllErrors) { + const { gen, data } = it; + const cxt = { + gen, + keyword: "false schema", + data, + schema: false, + schemaCode: false, + schemaValue: false, + params: {}, + it + }; + (0, errors_1.reportError)(cxt, boolError, void 0, overrideAllErrors); + } +}); +var require_rules = __commonJS2((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.getRules = exports.isJSONType = void 0; + var _jsonTypes = ["string", "number", "integer", "boolean", "null", "object", "array"]; + var jsonTypes = new Set(_jsonTypes); + function isJSONType(x) { + return typeof x == "string" && jsonTypes.has(x); + } + exports.isJSONType = isJSONType; + function getRules() { + const groups2 = { + number: { type: "number", rules: [] }, + string: { type: "string", rules: [] }, + array: { type: "array", rules: [] }, + object: { type: "object", rules: [] } + }; + return { + types: { ...groups2, integer: true, boolean: true, null: true }, + rules: [{ rules: [] }, groups2.number, groups2.string, groups2.array, groups2.object], + post: { rules: [] }, + all: {}, + keywords: {} + }; + } + exports.getRules = getRules; +}); +var require_applicability = __commonJS2((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.shouldUseRule = exports.shouldUseGroup = exports.schemaHasRulesForType = void 0; + function schemaHasRulesForType({ schema: schema2, self: self2 }, type2) { + const group2 = self2.RULES.types[type2]; + return group2 && group2 !== true && shouldUseGroup(schema2, group2); + } + exports.schemaHasRulesForType = schemaHasRulesForType; + function shouldUseGroup(schema2, group2) { + return group2.rules.some((rule) => shouldUseRule(schema2, rule)); + } + exports.shouldUseGroup = shouldUseGroup; + function shouldUseRule(schema2, rule) { + var _a2; + return schema2[rule.keyword] !== void 0 || ((_a2 = rule.definition.implements) === null || _a2 === void 0 ? void 0 : _a2.some((kwd) => schema2[kwd] !== void 0)); + } + exports.shouldUseRule = shouldUseRule; +}); +var require_dataType = __commonJS2((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.reportTypeError = exports.checkDataTypes = exports.checkDataType = exports.coerceAndCheckDataType = exports.getJSONTypes = exports.getSchemaTypes = exports.DataType = void 0; + var rules_1 = require_rules(); + var applicability_1 = require_applicability(); + var errors_1 = require_errors2(); + var codegen_1 = require_codegen(); + var util_1 = require_util8(); + var DataType; + (function(DataType2) { + DataType2[DataType2["Correct"] = 0] = "Correct"; + DataType2[DataType2["Wrong"] = 1] = "Wrong"; + })(DataType || (exports.DataType = DataType = {})); + function getSchemaTypes(schema2) { + const types = getJSONTypes(schema2.type); + const hasNull = types.includes("null"); + if (hasNull) { + if (schema2.nullable === false) + throw new Error("type: null contradicts nullable: false"); + } else { + if (!types.length && schema2.nullable !== void 0) { + throw new Error('"nullable" cannot be used without "type"'); } - if (components.scheme) - components.scheme = String(components.scheme).replace(protocol.PCT_ENCODED, decodeUnreserved2).toLowerCase().replace(protocol.NOT_SCHEME, ""); - if (components.userinfo !== void 0) - components.userinfo = String(components.userinfo).replace(protocol.PCT_ENCODED, decodeUnreserved2).replace(protocol.NOT_USERINFO, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); - if (components.host !== void 0) - components.host = String(components.host).replace(protocol.PCT_ENCODED, decodeUnreserved2).toLowerCase().replace(protocol.NOT_HOST, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); - if (components.path !== void 0) - components.path = String(components.path).replace(protocol.PCT_ENCODED, decodeUnreserved2).replace(components.scheme ? protocol.NOT_PATH : protocol.NOT_PATH_NOSCHEME, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); - if (components.query !== void 0) - components.query = String(components.query).replace(protocol.PCT_ENCODED, decodeUnreserved2).replace(protocol.NOT_QUERY, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); - if (components.fragment !== void 0) - components.fragment = String(components.fragment).replace(protocol.PCT_ENCODED, decodeUnreserved2).replace(protocol.NOT_FRAGMENT, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); - return components; + if (schema2.nullable === true) + types.push("null"); } - function _stripLeadingZeros(str) { - return str.replace(/^0*(.*)/, "$1") || "0"; + return types; + } + exports.getSchemaTypes = getSchemaTypes; + function getJSONTypes(ts) { + const types = Array.isArray(ts) ? ts : ts ? [ts] : []; + if (types.every(rules_1.isJSONType)) + return types; + throw new Error("type must be JSONType or JSONType[]: " + types.join(",")); + } + exports.getJSONTypes = getJSONTypes; + function coerceAndCheckDataType(it, types) { + const { gen, data, opts } = it; + const coerceTo = coerceToTypes(types, opts.coerceTypes); + const checkTypes = types.length > 0 && !(coerceTo.length === 0 && types.length === 1 && (0, applicability_1.schemaHasRulesForType)(it, types[0])); + if (checkTypes) { + const wrongType = checkDataTypes(types, data, opts.strictNumbers, DataType.Wrong); + gen.if(wrongType, () => { + if (coerceTo.length) + coerceData(it, types, coerceTo); + else + reportTypeError(it); + }); } - function _normalizeIPv4(host, protocol) { - var matches = host.match(protocol.IPV4ADDRESS) || []; - var _matches = slicedToArray(matches, 2), address = _matches[1]; - if (address) { - return address.split(".").map(_stripLeadingZeros).join("."); + return checkTypes; + } + exports.coerceAndCheckDataType = coerceAndCheckDataType; + var COERCIBLE = /* @__PURE__ */ new Set(["string", "number", "integer", "boolean", "null"]); + function coerceToTypes(types, coerceTypes) { + return coerceTypes ? types.filter((t) => COERCIBLE.has(t) || coerceTypes === "array" && t === "array") : []; + } + function coerceData(it, types, coerceTo) { + const { gen, data, opts } = it; + const dataType = gen.let("dataType", (0, codegen_1._)`typeof ${data}`); + const coerced = gen.let("coerced", (0, codegen_1._)`undefined`); + if (opts.coerceTypes === "array") { + gen.if((0, codegen_1._)`${dataType} == 'object' && Array.isArray(${data}) && ${data}.length == 1`, () => gen.assign(data, (0, codegen_1._)`${data}[0]`).assign(dataType, (0, codegen_1._)`typeof ${data}`).if(checkDataTypes(types, data, opts.strictNumbers), () => gen.assign(coerced, data))); + } + gen.if((0, codegen_1._)`${coerced} !== undefined`); + for (const t of coerceTo) { + if (COERCIBLE.has(t) || t === "array" && opts.coerceTypes === "array") { + coerceSpecificType(t); + } + } + gen.else(); + reportTypeError(it); + gen.endIf(); + gen.if((0, codegen_1._)`${coerced} !== undefined`, () => { + gen.assign(data, coerced); + assignParentData(it, coerced); + }); + function coerceSpecificType(t) { + switch (t) { + case "string": + gen.elseIf((0, codegen_1._)`${dataType} == "number" || ${dataType} == "boolean"`).assign(coerced, (0, codegen_1._)`"" + ${data}`).elseIf((0, codegen_1._)`${data} === null`).assign(coerced, (0, codegen_1._)`""`); + return; + case "number": + gen.elseIf((0, codegen_1._)`${dataType} == "boolean" || ${data} === null + || (${dataType} == "string" && ${data} && ${data} == +${data})`).assign(coerced, (0, codegen_1._)`+${data}`); + return; + case "integer": + gen.elseIf((0, codegen_1._)`${dataType} === "boolean" || ${data} === null + || (${dataType} === "string" && ${data} && ${data} == +${data} && !(${data} % 1))`).assign(coerced, (0, codegen_1._)`+${data}`); + return; + case "boolean": + gen.elseIf((0, codegen_1._)`${data} === "false" || ${data} === 0 || ${data} === null`).assign(coerced, false).elseIf((0, codegen_1._)`${data} === "true" || ${data} === 1`).assign(coerced, true); + return; + case "null": + gen.elseIf((0, codegen_1._)`${data} === "" || ${data} === 0 || ${data} === false`); + gen.assign(coerced, null); + return; + case "array": + gen.elseIf((0, codegen_1._)`${dataType} === "string" || ${dataType} === "number" + || ${dataType} === "boolean" || ${data} === null`).assign(coerced, (0, codegen_1._)`[${data}]`); + } + } + } + function assignParentData({ gen, parentData, parentDataProperty }, expr) { + gen.if((0, codegen_1._)`${parentData} !== undefined`, () => gen.assign((0, codegen_1._)`${parentData}[${parentDataProperty}]`, expr)); + } + function checkDataType(dataType, data, strictNums, correct = DataType.Correct) { + const EQ = correct === DataType.Correct ? codegen_1.operators.EQ : codegen_1.operators.NEQ; + let cond; + switch (dataType) { + case "null": + return (0, codegen_1._)`${data} ${EQ} null`; + case "array": + cond = (0, codegen_1._)`Array.isArray(${data})`; + break; + case "object": + cond = (0, codegen_1._)`${data} && typeof ${data} == "object" && !Array.isArray(${data})`; + break; + case "integer": + cond = numCond((0, codegen_1._)`!(${data} % 1) && !isNaN(${data})`); + break; + case "number": + cond = numCond(); + break; + default: + return (0, codegen_1._)`typeof ${data} ${EQ} ${dataType}`; + } + return correct === DataType.Correct ? cond : (0, codegen_1.not)(cond); + function numCond(_cond = codegen_1.nil) { + return (0, codegen_1.and)((0, codegen_1._)`typeof ${data} == "number"`, _cond, strictNums ? (0, codegen_1._)`isFinite(${data})` : codegen_1.nil); + } + } + exports.checkDataType = checkDataType; + function checkDataTypes(dataTypes, data, strictNums, correct) { + if (dataTypes.length === 1) { + return checkDataType(dataTypes[0], data, strictNums, correct); + } + let cond; + const types = (0, util_1.toHash)(dataTypes); + if (types.array && types.object) { + const notObj = (0, codegen_1._)`typeof ${data} != "object"`; + cond = types.null ? notObj : (0, codegen_1._)`!${data} || ${notObj}`; + delete types.null; + delete types.array; + delete types.object; + } else { + cond = codegen_1.nil; + } + if (types.number) + delete types.integer; + for (const t in types) + cond = (0, codegen_1.and)(cond, checkDataType(t, data, strictNums, correct)); + return cond; + } + exports.checkDataTypes = checkDataTypes; + var typeError = { + message: ({ schema: schema2 }) => `must be ${schema2}`, + params: ({ schema: schema2, schemaValue }) => typeof schema2 == "string" ? (0, codegen_1._)`{type: ${schema2}}` : (0, codegen_1._)`{type: ${schemaValue}}` + }; + function reportTypeError(it) { + const cxt = getTypeErrorContext(it); + (0, errors_1.reportError)(cxt, typeError); + } + exports.reportTypeError = reportTypeError; + function getTypeErrorContext(it) { + const { gen, data, schema: schema2 } = it; + const schemaCode = (0, util_1.schemaRefOrVal)(it, schema2, "type"); + return { + gen, + keyword: "type", + data, + schema: schema2.type, + schemaCode, + schemaValue: schemaCode, + parentSchema: schema2, + params: {}, + it + }; + } +}); +var require_defaults = __commonJS2((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.assignDefaults = void 0; + var codegen_1 = require_codegen(); + var util_1 = require_util8(); + function assignDefaults(it, ty) { + const { properties, items } = it.schema; + if (ty === "object" && properties) { + for (const key in properties) { + assignDefault(it, key, properties[key].default); + } + } else if (ty === "array" && Array.isArray(items)) { + items.forEach((sch, i) => assignDefault(it, i, sch.default)); + } + } + exports.assignDefaults = assignDefaults; + function assignDefault(it, prop, defaultValue) { + const { gen, compositeRule, data, opts } = it; + if (defaultValue === void 0) + return; + const childData = (0, codegen_1._)`${data}${(0, codegen_1.getProperty)(prop)}`; + if (compositeRule) { + (0, util_1.checkStrictMode)(it, `default is ignored for: ${childData}`); + return; + } + let condition = (0, codegen_1._)`${childData} === undefined`; + if (opts.useDefaults === "empty") { + condition = (0, codegen_1._)`${condition} || ${childData} === null || ${childData} === ""`; + } + gen.if(condition, (0, codegen_1._)`${childData} = ${(0, codegen_1.stringify)(defaultValue)}`); + } +}); +var require_code2 = __commonJS2((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.validateUnion = exports.validateArray = exports.usePattern = exports.callValidateCode = exports.schemaProperties = exports.allSchemaProperties = exports.noPropertyInData = exports.propertyInData = exports.isOwnProperty = exports.hasPropFunc = exports.reportMissingProp = exports.checkMissingProp = exports.checkReportMissingProp = void 0; + var codegen_1 = require_codegen(); + var util_1 = require_util8(); + var names_1 = require_names(); + var util_2 = require_util8(); + function checkReportMissingProp(cxt, prop) { + const { gen, data, it } = cxt; + gen.if(noPropertyInData(gen, data, prop, it.opts.ownProperties), () => { + cxt.setParams({ missingProperty: (0, codegen_1._)`${prop}` }, true); + cxt.error(); + }); + } + exports.checkReportMissingProp = checkReportMissingProp; + function checkMissingProp({ gen, data, it: { opts } }, properties, missing) { + return (0, codegen_1.or)(...properties.map((prop) => (0, codegen_1.and)(noPropertyInData(gen, data, prop, opts.ownProperties), (0, codegen_1._)`${missing} = ${prop}`))); + } + exports.checkMissingProp = checkMissingProp; + function reportMissingProp(cxt, missing) { + cxt.setParams({ missingProperty: missing }, true); + cxt.error(); + } + exports.reportMissingProp = reportMissingProp; + function hasPropFunc(gen) { + return gen.scopeValue("func", { + ref: Object.prototype.hasOwnProperty, + code: (0, codegen_1._)`Object.prototype.hasOwnProperty` + }); + } + exports.hasPropFunc = hasPropFunc; + function isOwnProperty(gen, data, property) { + return (0, codegen_1._)`${hasPropFunc(gen)}.call(${data}, ${property})`; + } + exports.isOwnProperty = isOwnProperty; + function propertyInData(gen, data, property, ownProperties) { + const cond = (0, codegen_1._)`${data}${(0, codegen_1.getProperty)(property)} !== undefined`; + return ownProperties ? (0, codegen_1._)`${cond} && ${isOwnProperty(gen, data, property)}` : cond; + } + exports.propertyInData = propertyInData; + function noPropertyInData(gen, data, property, ownProperties) { + const cond = (0, codegen_1._)`${data}${(0, codegen_1.getProperty)(property)} === undefined`; + return ownProperties ? (0, codegen_1.or)(cond, (0, codegen_1.not)(isOwnProperty(gen, data, property))) : cond; + } + exports.noPropertyInData = noPropertyInData; + function allSchemaProperties(schemaMap) { + return schemaMap ? Object.keys(schemaMap).filter((p) => p !== "__proto__") : []; + } + exports.allSchemaProperties = allSchemaProperties; + function schemaProperties(it, schemaMap) { + return allSchemaProperties(schemaMap).filter((p) => !(0, util_1.alwaysValidSchema)(it, schemaMap[p])); + } + exports.schemaProperties = schemaProperties; + function callValidateCode({ schemaCode, data, it: { gen, topSchemaRef, schemaPath, errorPath }, it }, func, context, passSchema) { + const dataAndSchema = passSchema ? (0, codegen_1._)`${schemaCode}, ${data}, ${topSchemaRef}${schemaPath}` : data; + const valCxt = [ + [names_1.default.instancePath, (0, codegen_1.strConcat)(names_1.default.instancePath, errorPath)], + [names_1.default.parentData, it.parentData], + [names_1.default.parentDataProperty, it.parentDataProperty], + [names_1.default.rootData, names_1.default.rootData] + ]; + if (it.opts.dynamicRef) + valCxt.push([names_1.default.dynamicAnchors, names_1.default.dynamicAnchors]); + const args3 = (0, codegen_1._)`${dataAndSchema}, ${gen.object(...valCxt)}`; + return context !== codegen_1.nil ? (0, codegen_1._)`${func}.call(${context}, ${args3})` : (0, codegen_1._)`${func}(${args3})`; + } + exports.callValidateCode = callValidateCode; + var newRegExp = (0, codegen_1._)`new RegExp`; + function usePattern({ gen, it: { opts } }, pattern) { + const u = opts.unicodeRegExp ? "u" : ""; + const { regExp } = opts.code; + const rx = regExp(pattern, u); + return gen.scopeValue("pattern", { + key: rx.toString(), + ref: rx, + code: (0, codegen_1._)`${regExp.code === "new RegExp" ? newRegExp : (0, util_2.useFunc)(gen, regExp)}(${pattern}, ${u})` + }); + } + exports.usePattern = usePattern; + function validateArray(cxt) { + const { gen, data, keyword, it } = cxt; + const valid = gen.name("valid"); + if (it.allErrors) { + const validArr = gen.let("valid", true); + validateItems(() => gen.assign(validArr, false)); + return validArr; + } + gen.var(valid, true); + validateItems(() => gen.break()); + return valid; + function validateItems(notValid) { + const len = gen.const("len", (0, codegen_1._)`${data}.length`); + gen.forRange("i", 0, len, (i) => { + cxt.subschema({ + keyword, + dataProp: i, + dataPropType: util_1.Type.Num + }, valid); + gen.if((0, codegen_1.not)(valid), notValid); + }); + } + } + exports.validateArray = validateArray; + function validateUnion(cxt) { + const { gen, schema: schema2, keyword, it } = cxt; + if (!Array.isArray(schema2)) + throw new Error("ajv implementation error"); + const alwaysValid = schema2.some((sch) => (0, util_1.alwaysValidSchema)(it, sch)); + if (alwaysValid && !it.opts.unevaluated) + return; + const valid = gen.let("valid", false); + const schValid = gen.name("_valid"); + gen.block(() => schema2.forEach((_sch, i) => { + const schCxt = cxt.subschema({ + keyword, + schemaProp: i, + compositeRule: true + }, schValid); + gen.assign(valid, (0, codegen_1._)`${valid} || ${schValid}`); + const merged = cxt.mergeValidEvaluated(schCxt, schValid); + if (!merged) + gen.if((0, codegen_1.not)(valid)); + })); + cxt.result(valid, () => cxt.reset(), () => cxt.error(true)); + } + exports.validateUnion = validateUnion; +}); +var require_keyword = __commonJS2((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.validateKeywordUsage = exports.validSchemaType = exports.funcKeywordCode = exports.macroKeywordCode = void 0; + var codegen_1 = require_codegen(); + var names_1 = require_names(); + var code_1 = require_code2(); + var errors_1 = require_errors2(); + function macroKeywordCode(cxt, def) { + const { gen, keyword, schema: schema2, parentSchema, it } = cxt; + const macroSchema = def.macro.call(it.self, schema2, parentSchema, it); + const schemaRef = useKeyword(gen, keyword, macroSchema); + if (it.opts.validateSchema !== false) + it.self.validateSchema(macroSchema, true); + const valid = gen.name("valid"); + cxt.subschema({ + schema: macroSchema, + schemaPath: codegen_1.nil, + errSchemaPath: `${it.errSchemaPath}/${keyword}`, + topSchemaRef: schemaRef, + compositeRule: true + }, valid); + cxt.pass(valid, () => cxt.error(true)); + } + exports.macroKeywordCode = macroKeywordCode; + function funcKeywordCode(cxt, def) { + var _a2; + const { gen, keyword, schema: schema2, parentSchema, $data, it } = cxt; + checkAsyncKeyword(it, def); + const validate2 = !$data && def.compile ? def.compile.call(it.self, schema2, parentSchema, it) : def.validate; + const validateRef = useKeyword(gen, keyword, validate2); + const valid = gen.let("valid"); + cxt.block$data(valid, validateKeyword); + cxt.ok((_a2 = def.valid) !== null && _a2 !== void 0 ? _a2 : valid); + function validateKeyword() { + if (def.errors === false) { + assignValid(); + if (def.modifying) + modifyData(cxt); + reportErrs(() => cxt.error()); } else { - return host; + const ruleErrs = def.async ? validateAsync() : validateSync(); + if (def.modifying) + modifyData(cxt); + reportErrs(() => addErrs(cxt, ruleErrs)); } } - function _normalizeIPv6(host, protocol) { - var matches = host.match(protocol.IPV6ADDRESS) || []; - var _matches2 = slicedToArray(matches, 3), address = _matches2[1], zone = _matches2[2]; - if (address) { - var _address$toLowerCase$ = address.toLowerCase().split("::").reverse(), _address$toLowerCase$2 = slicedToArray(_address$toLowerCase$, 2), last = _address$toLowerCase$2[0], first = _address$toLowerCase$2[1]; - var firstFields = first ? first.split(":").map(_stripLeadingZeros) : []; - var lastFields = last.split(":").map(_stripLeadingZeros); - var isLastFieldIPv4Address = protocol.IPV4ADDRESS.test(lastFields[lastFields.length - 1]); - var fieldCount = isLastFieldIPv4Address ? 7 : 8; - var lastFieldsStart = lastFields.length - fieldCount; - var fields = Array(fieldCount); - for (var x = 0; x < fieldCount; ++x) { - fields[x] = firstFields[x] || lastFields[lastFieldsStart + x] || ""; - } - if (isLastFieldIPv4Address) { - fields[fieldCount - 1] = _normalizeIPv4(fields[fieldCount - 1], protocol); - } - var allZeroFields = fields.reduce(function(acc, field, index) { - if (!field || field === "0") { - var lastLongest = acc[acc.length - 1]; - if (lastLongest && lastLongest.index + lastLongest.length === index) { - lastLongest.length++; - } else { - acc.push({ index, length: 1 }); - } - } - return acc; - }, []); - var longestZeroFields = allZeroFields.sort(function(a, b) { - return b.length - a.length; - })[0]; - var newHost = void 0; - if (longestZeroFields && longestZeroFields.length > 1) { - var newFirst = fields.slice(0, longestZeroFields.index); - var newLast = fields.slice(longestZeroFields.index + longestZeroFields.length); - newHost = newFirst.join(":") + "::" + newLast.join(":"); - } else { - newHost = fields.join(":"); - } - if (zone) { - newHost += "%" + zone; - } - return newHost; - } else { - return host; + function validateAsync() { + const ruleErrs = gen.let("ruleErrs", null); + gen.try(() => assignValid((0, codegen_1._)`await `), (e) => gen.assign(valid, false).if((0, codegen_1._)`${e} instanceof ${it.ValidationError}`, () => gen.assign(ruleErrs, (0, codegen_1._)`${e}.errors`), () => gen.throw(e))); + return ruleErrs; + } + function validateSync() { + const validateErrs = (0, codegen_1._)`${validateRef}.errors`; + gen.assign(validateErrs, null); + assignValid(codegen_1.nil); + return validateErrs; + } + function assignValid(_await = def.async ? (0, codegen_1._)`await ` : codegen_1.nil) { + const passCxt = it.opts.passContext ? names_1.default.this : names_1.default.self; + const passSchema = !("compile" in def && !$data || def.schema === false); + gen.assign(valid, (0, codegen_1._)`${_await}${(0, code_1.callValidateCode)(cxt, validateRef, passCxt, passSchema)}`, def.modifying); + } + function reportErrs(errors3) { + var _a22; + gen.if((0, codegen_1.not)((_a22 = def.valid) !== null && _a22 !== void 0 ? _a22 : valid), errors3); + } + } + exports.funcKeywordCode = funcKeywordCode; + function modifyData(cxt) { + const { gen, data, it } = cxt; + gen.if(it.parentData, () => gen.assign(data, (0, codegen_1._)`${it.parentData}[${it.parentDataProperty}]`)); + } + function addErrs(cxt, errs) { + const { gen } = cxt; + gen.if((0, codegen_1._)`Array.isArray(${errs})`, () => { + gen.assign(names_1.default.vErrors, (0, codegen_1._)`${names_1.default.vErrors} === null ? ${errs} : ${names_1.default.vErrors}.concat(${errs})`).assign(names_1.default.errors, (0, codegen_1._)`${names_1.default.vErrors}.length`); + (0, errors_1.extendErrors)(cxt); + }, () => cxt.error()); + } + function checkAsyncKeyword({ schemaEnv }, def) { + if (def.async && !schemaEnv.$async) + throw new Error("async keyword in sync schema"); + } + function useKeyword(gen, keyword, result) { + if (result === void 0) + throw new Error(`keyword "${keyword}" failed to compile`); + return gen.scopeValue("keyword", typeof result == "function" ? { ref: result } : { ref: result, code: (0, codegen_1.stringify)(result) }); + } + function validSchemaType(schema2, schemaType, allowUndefined = false) { + return !schemaType.length || schemaType.some((st) => st === "array" ? Array.isArray(schema2) : st === "object" ? schema2 && typeof schema2 == "object" && !Array.isArray(schema2) : typeof schema2 == st || allowUndefined && typeof schema2 == "undefined"); + } + exports.validSchemaType = validSchemaType; + function validateKeywordUsage({ schema: schema2, opts, self: self2, errSchemaPath }, def, keyword) { + if (Array.isArray(def.keyword) ? !def.keyword.includes(keyword) : def.keyword !== keyword) { + throw new Error("ajv implementation error"); + } + const deps = def.dependencies; + if (deps === null || deps === void 0 ? void 0 : deps.some((kwd) => !Object.prototype.hasOwnProperty.call(schema2, kwd))) { + throw new Error(`parent schema must have dependencies of ${keyword}: ${deps.join(",")}`); + } + if (def.validateSchema) { + const valid = def.validateSchema(schema2[keyword]); + if (!valid) { + const msg = `keyword "${keyword}" value is invalid at path "${errSchemaPath}": ` + self2.errorsText(def.validateSchema.errors); + if (opts.validateSchema === "log") + self2.logger.error(msg); + else + throw new Error(msg); } } - var URI_PARSE = /^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i; - var NO_MATCH_IS_UNDEFINED = "".match(/(){0}/)[1] === void 0; - function parse4(uriString) { - var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; - var components = {}; - var protocol = options.iri !== false ? IRI_PROTOCOL : URI_PROTOCOL; - if (options.reference === "suffix") - uriString = (options.scheme ? options.scheme + ":" : "") + "//" + uriString; - var matches = uriString.match(URI_PARSE); - if (matches) { - if (NO_MATCH_IS_UNDEFINED) { - components.scheme = matches[1]; - components.userinfo = matches[3]; - components.host = matches[4]; - components.port = parseInt(matches[5], 10); - components.path = matches[6] || ""; - components.query = matches[7]; - components.fragment = matches[8]; - if (isNaN(components.port)) { - components.port = matches[5]; - } - } else { - components.scheme = matches[1] || void 0; - components.userinfo = uriString.indexOf("@") !== -1 ? matches[3] : void 0; - components.host = uriString.indexOf("//") !== -1 ? matches[4] : void 0; - components.port = parseInt(matches[5], 10); - components.path = matches[6] || ""; - components.query = uriString.indexOf("?") !== -1 ? matches[7] : void 0; - components.fragment = uriString.indexOf("#") !== -1 ? matches[8] : void 0; - if (isNaN(components.port)) { - components.port = uriString.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/) ? matches[4] : void 0; - } - } - if (components.host) { - components.host = _normalizeIPv6(_normalizeIPv4(components.host, protocol), protocol); - } - if (components.scheme === void 0 && components.userinfo === void 0 && components.host === void 0 && components.port === void 0 && !components.path && components.query === void 0) { - components.reference = "same-document"; - } else if (components.scheme === void 0) { - components.reference = "relative"; - } else if (components.fragment === void 0) { - components.reference = "absolute"; - } else { - components.reference = "uri"; - } - if (options.reference && options.reference !== "suffix" && options.reference !== components.reference) { - components.error = components.error || "URI is not a " + options.reference + " reference."; - } - var schemeHandler = SCHEMES[(options.scheme || components.scheme || "").toLowerCase()]; - if (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport)) { - if (components.host && (options.domainHost || schemeHandler && schemeHandler.domainHost)) { - try { - components.host = punycode.toASCII(components.host.replace(protocol.PCT_ENCODED, pctDecChars).toLowerCase()); - } catch (e) { - components.error = components.error || "Host's domain name can not be converted to ASCII via punycode: " + e; - } - } - _normalizeComponentEncoding(components, URI_PROTOCOL); - } else { - _normalizeComponentEncoding(components, protocol); - } - if (schemeHandler && schemeHandler.parse) { - schemeHandler.parse(components, options); - } - } else { - components.error = components.error || "URI can not be parsed."; - } - return components; + } + exports.validateKeywordUsage = validateKeywordUsage; +}); +var require_subschema = __commonJS2((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.extendSubschemaMode = exports.extendSubschemaData = exports.getSubschema = void 0; + var codegen_1 = require_codegen(); + var util_1 = require_util8(); + function getSubschema(it, { keyword, schemaProp, schema: schema2, schemaPath, errSchemaPath, topSchemaRef }) { + if (keyword !== void 0 && schema2 !== void 0) { + throw new Error('both "keyword" and "schema" passed, only one allowed'); } - function _recomposeAuthority(components, options) { - var protocol = options.iri !== false ? IRI_PROTOCOL : URI_PROTOCOL; - var uriTokens = []; - if (components.userinfo !== void 0) { - uriTokens.push(components.userinfo); - uriTokens.push("@"); - } - if (components.host !== void 0) { - uriTokens.push(_normalizeIPv6(_normalizeIPv4(String(components.host), protocol), protocol).replace(protocol.IPV6ADDRESS, function(_, $1, $2) { - return "[" + $1 + ($2 ? "%25" + $2 : "") + "]"; - })); - } - if (typeof components.port === "number" || typeof components.port === "string") { - uriTokens.push(":"); - uriTokens.push(String(components.port)); - } - return uriTokens.length ? uriTokens.join("") : void 0; + if (keyword !== void 0) { + const sch = it.schema[keyword]; + return schemaProp === void 0 ? { + schema: sch, + schemaPath: (0, codegen_1._)`${it.schemaPath}${(0, codegen_1.getProperty)(keyword)}`, + errSchemaPath: `${it.errSchemaPath}/${keyword}` + } : { + schema: sch[schemaProp], + schemaPath: (0, codegen_1._)`${it.schemaPath}${(0, codegen_1.getProperty)(keyword)}${(0, codegen_1.getProperty)(schemaProp)}`, + errSchemaPath: `${it.errSchemaPath}/${keyword}/${(0, util_1.escapeFragment)(schemaProp)}` + }; } - var RDS1 = /^\.\.?\//; - var RDS2 = /^\/\.(\/|$)/; - var RDS3 = /^\/\.\.(\/|$)/; - var RDS5 = /^\/?(?:.|\n)*?(?=\/|$)/; - function removeDotSegments(input) { - var output = []; - while (input.length) { - if (input.match(RDS1)) { - input = input.replace(RDS1, ""); - } else if (input.match(RDS2)) { - input = input.replace(RDS2, "/"); - } else if (input.match(RDS3)) { - input = input.replace(RDS3, "/"); - output.pop(); - } else if (input === "." || input === "..") { - input = ""; - } else { - var im = input.match(RDS5); - if (im) { - var s = im[0]; - input = input.slice(s.length); - output.push(s); - } else { - throw new Error("Unexpected dot segment condition"); - } - } + if (schema2 !== void 0) { + if (schemaPath === void 0 || errSchemaPath === void 0 || topSchemaRef === void 0) { + throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"'); } - return output.join(""); + return { + schema: schema2, + schemaPath, + topSchemaRef, + errSchemaPath + }; } - function serialize(components) { - var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; - var protocol = options.iri ? IRI_PROTOCOL : URI_PROTOCOL; - var uriTokens = []; - var schemeHandler = SCHEMES[(options.scheme || components.scheme || "").toLowerCase()]; - if (schemeHandler && schemeHandler.serialize) - schemeHandler.serialize(components, options); - if (components.host) { - if (protocol.IPV6ADDRESS.test(components.host)) { - } else if (options.domainHost || schemeHandler && schemeHandler.domainHost) { - try { - components.host = !options.iri ? punycode.toASCII(components.host.replace(protocol.PCT_ENCODED, pctDecChars).toLowerCase()) : punycode.toUnicode(components.host); - } catch (e) { - components.error = components.error || "Host's domain name can not be converted to " + (!options.iri ? "ASCII" : "Unicode") + " via punycode: " + e; - } - } - } - _normalizeComponentEncoding(components, protocol); - if (options.reference !== "suffix" && components.scheme) { - uriTokens.push(components.scheme); - uriTokens.push(":"); - } - var authority = _recomposeAuthority(components, options); - if (authority !== void 0) { - if (options.reference !== "suffix") { - uriTokens.push("//"); - } - uriTokens.push(authority); - if (components.path && components.path.charAt(0) !== "/") { - uriTokens.push("/"); - } - } - if (components.path !== void 0) { - var s = components.path; - if (!options.absolutePath && (!schemeHandler || !schemeHandler.absolutePath)) { - s = removeDotSegments(s); - } - if (authority === void 0) { - s = s.replace(/^\/\//, "/%2F"); - } - uriTokens.push(s); - } - if (components.query !== void 0) { - uriTokens.push("?"); - uriTokens.push(components.query); - } - if (components.fragment !== void 0) { - uriTokens.push("#"); - uriTokens.push(components.fragment); - } - return uriTokens.join(""); + throw new Error('either "keyword" or "schema" must be passed'); + } + exports.getSubschema = getSubschema; + function extendSubschemaData(subschema, it, { dataProp, dataPropType: dpType, data, dataTypes, propertyName }) { + if (data !== void 0 && dataProp !== void 0) { + throw new Error('both "data" and "dataProp" passed, only one allowed'); } - function resolveComponents(base2, relative) { - var options = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}; - var skipNormalization = arguments[3]; - var target = {}; - if (!skipNormalization) { - base2 = parse4(serialize(base2, options), options); - relative = parse4(serialize(relative, options), options); - } - options = options || {}; - if (!options.tolerant && relative.scheme) { - target.scheme = relative.scheme; - target.userinfo = relative.userinfo; - target.host = relative.host; - target.port = relative.port; - target.path = removeDotSegments(relative.path || ""); - target.query = relative.query; - } else { - if (relative.userinfo !== void 0 || relative.host !== void 0 || relative.port !== void 0) { - target.userinfo = relative.userinfo; - target.host = relative.host; - target.port = relative.port; - target.path = removeDotSegments(relative.path || ""); - target.query = relative.query; - } else { - if (!relative.path) { - target.path = base2.path; - if (relative.query !== void 0) { - target.query = relative.query; - } else { - target.query = base2.query; - } - } else { - if (relative.path.charAt(0) === "/") { - target.path = removeDotSegments(relative.path); - } else { - if ((base2.userinfo !== void 0 || base2.host !== void 0 || base2.port !== void 0) && !base2.path) { - target.path = "/" + relative.path; - } else if (!base2.path) { - target.path = relative.path; - } else { - target.path = base2.path.slice(0, base2.path.lastIndexOf("/") + 1) + relative.path; - } - target.path = removeDotSegments(target.path); - } - target.query = relative.query; - } - target.userinfo = base2.userinfo; - target.host = base2.host; - target.port = base2.port; - } - target.scheme = base2.scheme; - } - target.fragment = relative.fragment; - return target; + const { gen } = it; + if (dataProp !== void 0) { + const { errorPath, dataPathArr, opts } = it; + const nextData = gen.let("data", (0, codegen_1._)`${it.data}${(0, codegen_1.getProperty)(dataProp)}`, true); + dataContextProps(nextData); + subschema.errorPath = (0, codegen_1.str)`${errorPath}${(0, util_1.getErrorPath)(dataProp, dpType, opts.jsPropertySyntax)}`; + subschema.parentDataProperty = (0, codegen_1._)`${dataProp}`; + subschema.dataPathArr = [...dataPathArr, subschema.parentDataProperty]; } - function resolve(baseURI, relativeURI, options) { - var schemelessOptions = assign({ scheme: "null" }, options); - return serialize(resolveComponents(parse4(baseURI, schemelessOptions), parse4(relativeURI, schemelessOptions), schemelessOptions, true), schemelessOptions); + if (data !== void 0) { + const nextData = data instanceof codegen_1.Name ? data : gen.let("data", data, true); + dataContextProps(nextData); + if (propertyName !== void 0) + subschema.propertyName = propertyName; } - function normalize2(uri, options) { - if (typeof uri === "string") { - uri = serialize(parse4(uri, options), options); - } else if (typeOf(uri) === "object") { - uri = parse4(serialize(uri, options), options); - } - return uri; + if (dataTypes) + subschema.dataTypes = dataTypes; + function dataContextProps(_nextData) { + subschema.data = _nextData; + subschema.dataLevel = it.dataLevel + 1; + subschema.dataTypes = []; + it.definedProperties = /* @__PURE__ */ new Set(); + subschema.parentData = it.data; + subschema.dataNames = [...it.dataNames, _nextData]; } - function equal(uriA, uriB, options) { - if (typeof uriA === "string") { - uriA = serialize(parse4(uriA, options), options); - } else if (typeOf(uriA) === "object") { - uriA = serialize(uriA, options); - } - if (typeof uriB === "string") { - uriB = serialize(parse4(uriB, options), options); - } else if (typeOf(uriB) === "object") { - uriB = serialize(uriB, options); - } - return uriA === uriB; - } - function escapeComponent(str, options) { - return str && str.toString().replace(!options || !options.iri ? URI_PROTOCOL.ESCAPE : IRI_PROTOCOL.ESCAPE, pctEncChar); - } - function unescapeComponent(str, options) { - return str && str.toString().replace(!options || !options.iri ? URI_PROTOCOL.PCT_ENCODED : IRI_PROTOCOL.PCT_ENCODED, pctDecChars); - } - var handler2 = { - scheme: "http", - domainHost: true, - parse: function parse5(components, options) { - if (!components.host) { - components.error = components.error || "HTTP URIs must have a host."; - } - return components; - }, - serialize: function serialize2(components, options) { - var secure = String(components.scheme).toLowerCase() === "https"; - if (components.port === (secure ? 443 : 80) || components.port === "") { - components.port = void 0; - } - if (!components.path) { - components.path = "/"; - } - return components; - } - }; - var handler$1 = { - scheme: "https", - domainHost: handler2.domainHost, - parse: handler2.parse, - serialize: handler2.serialize - }; - function isSecure(wsComponents) { - return typeof wsComponents.secure === "boolean" ? wsComponents.secure : String(wsComponents.scheme).toLowerCase() === "wss"; - } - var handler$2 = { - scheme: "ws", - domainHost: true, - parse: function parse5(components, options) { - var wsComponents = components; - wsComponents.secure = isSecure(wsComponents); - wsComponents.resourceName = (wsComponents.path || "/") + (wsComponents.query ? "?" + wsComponents.query : ""); - wsComponents.path = void 0; - wsComponents.query = void 0; - return wsComponents; - }, - serialize: function serialize2(wsComponents, options) { - if (wsComponents.port === (isSecure(wsComponents) ? 443 : 80) || wsComponents.port === "") { - wsComponents.port = void 0; - } - if (typeof wsComponents.secure === "boolean") { - wsComponents.scheme = wsComponents.secure ? "wss" : "ws"; - wsComponents.secure = void 0; - } - if (wsComponents.resourceName) { - var _wsComponents$resourc = wsComponents.resourceName.split("?"), _wsComponents$resourc2 = slicedToArray(_wsComponents$resourc, 2), path4 = _wsComponents$resourc2[0], query2 = _wsComponents$resourc2[1]; - wsComponents.path = path4 && path4 !== "/" ? path4 : void 0; - wsComponents.query = query2; - wsComponents.resourceName = void 0; - } - wsComponents.fragment = void 0; - return wsComponents; - } - }; - var handler$3 = { - scheme: "wss", - domainHost: handler$2.domainHost, - parse: handler$2.parse, - serialize: handler$2.serialize - }; - var O = {}; - var isIRI = true; - var UNRESERVED$$ = "[A-Za-z0-9\\-\\.\\_\\~" + (isIRI ? "\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF" : "") + "]"; - var HEXDIG$$ = "[0-9A-Fa-f]"; - var PCT_ENCODED$ = subexp(subexp("%[EFef]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%[89A-Fa-f]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%" + HEXDIG$$ + HEXDIG$$)); - var ATEXT$$ = "[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]"; - var QTEXT$$ = "[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]"; - var VCHAR$$ = merge3(QTEXT$$, '[\\"\\\\]'); - var SOME_DELIMS$$ = "[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"; - var UNRESERVED = new RegExp(UNRESERVED$$, "g"); - var PCT_ENCODED = new RegExp(PCT_ENCODED$, "g"); - var NOT_LOCAL_PART = new RegExp(merge3("[^]", ATEXT$$, "[\\.]", '[\\"]', VCHAR$$), "g"); - var NOT_HFNAME = new RegExp(merge3("[^]", UNRESERVED$$, SOME_DELIMS$$), "g"); - var NOT_HFVALUE = NOT_HFNAME; - function decodeUnreserved(str) { - var decStr = pctDecChars(str); - return !decStr.match(UNRESERVED) ? str : decStr; - } - var handler$4 = { - scheme: "mailto", - parse: function parse$$1(components, options) { - var mailtoComponents = components; - var to = mailtoComponents.to = mailtoComponents.path ? mailtoComponents.path.split(",") : []; - mailtoComponents.path = void 0; - if (mailtoComponents.query) { - var unknownHeaders = false; - var headers = {}; - var hfields = mailtoComponents.query.split("&"); - for (var x = 0, xl = hfields.length; x < xl; ++x) { - var hfield = hfields[x].split("="); - switch (hfield[0]) { - case "to": - var toAddrs = hfield[1].split(","); - for (var _x = 0, _xl = toAddrs.length; _x < _xl; ++_x) { - to.push(toAddrs[_x]); - } - break; - case "subject": - mailtoComponents.subject = unescapeComponent(hfield[1], options); - break; - case "body": - mailtoComponents.body = unescapeComponent(hfield[1], options); - break; - default: - unknownHeaders = true; - headers[unescapeComponent(hfield[0], options)] = unescapeComponent(hfield[1], options); - break; - } - } - if (unknownHeaders) - mailtoComponents.headers = headers; - } - mailtoComponents.query = void 0; - for (var _x2 = 0, _xl2 = to.length; _x2 < _xl2; ++_x2) { - var addr = to[_x2].split("@"); - addr[0] = unescapeComponent(addr[0]); - if (!options.unicodeSupport) { - try { - addr[1] = punycode.toASCII(unescapeComponent(addr[1], options).toLowerCase()); - } catch (e) { - mailtoComponents.error = mailtoComponents.error || "Email address's domain name can not be converted to ASCII via punycode: " + e; - } - } else { - addr[1] = unescapeComponent(addr[1], options).toLowerCase(); - } - to[_x2] = addr.join("@"); - } - return mailtoComponents; - }, - serialize: function serialize$$1(mailtoComponents, options) { - var components = mailtoComponents; - var to = toArray(mailtoComponents.to); - if (to) { - for (var x = 0, xl = to.length; x < xl; ++x) { - var toAddr = String(to[x]); - var atIdx = toAddr.lastIndexOf("@"); - var localPart = toAddr.slice(0, atIdx).replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_LOCAL_PART, pctEncChar); - var domain2 = toAddr.slice(atIdx + 1); - try { - domain2 = !options.iri ? punycode.toASCII(unescapeComponent(domain2, options).toLowerCase()) : punycode.toUnicode(domain2); - } catch (e) { - components.error = components.error || "Email address's domain name can not be converted to " + (!options.iri ? "ASCII" : "Unicode") + " via punycode: " + e; - } - to[x] = localPart + "@" + domain2; - } - components.path = to.join(","); - } - var headers = mailtoComponents.headers = mailtoComponents.headers || {}; - if (mailtoComponents.subject) - headers["subject"] = mailtoComponents.subject; - if (mailtoComponents.body) - headers["body"] = mailtoComponents.body; - var fields = []; - for (var name in headers) { - if (headers[name] !== O[name]) { - fields.push(name.replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_HFNAME, pctEncChar) + "=" + headers[name].replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_HFVALUE, pctEncChar)); - } - } - if (fields.length) { - components.query = fields.join("&"); - } - return components; - } - }; - var URN_PARSE = /^([^\:]+)\:(.*)/; - var handler$5 = { - scheme: "urn", - parse: function parse$$1(components, options) { - var matches = components.path && components.path.match(URN_PARSE); - var urnComponents = components; - if (matches) { - var scheme = options.scheme || urnComponents.scheme || "urn"; - var nid = matches[1].toLowerCase(); - var nss = matches[2]; - var urnScheme = scheme + ":" + (options.nid || nid); - var schemeHandler = SCHEMES[urnScheme]; - urnComponents.nid = nid; - urnComponents.nss = nss; - urnComponents.path = void 0; - if (schemeHandler) { - urnComponents = schemeHandler.parse(urnComponents, options); - } - } else { - urnComponents.error = urnComponents.error || "URN can not be parsed."; - } - return urnComponents; - }, - serialize: function serialize$$1(urnComponents, options) { - var scheme = options.scheme || urnComponents.scheme || "urn"; - var nid = urnComponents.nid; - var urnScheme = scheme + ":" + (options.nid || nid); - var schemeHandler = SCHEMES[urnScheme]; - if (schemeHandler) { - urnComponents = schemeHandler.serialize(urnComponents, options); - } - var uriComponents = urnComponents; - var nss = urnComponents.nss; - uriComponents.path = (nid || options.nid) + ":" + nss; - return uriComponents; - } - }; - 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) { - var uuidComponents = urnComponents; - uuidComponents.uuid = uuidComponents.nss; - uuidComponents.nss = void 0; - if (!options.tolerant && (!uuidComponents.uuid || !uuidComponents.uuid.match(UUID))) { - uuidComponents.error = uuidComponents.error || "UUID is not valid."; - } - return uuidComponents; - }, - serialize: function serialize2(uuidComponents, options) { - var urnComponents = uuidComponents; - urnComponents.nss = (uuidComponents.uuid || "").toLowerCase(); - return urnComponents; - } - }; - SCHEMES[handler2.scheme] = handler2; - SCHEMES[handler$1.scheme] = handler$1; - SCHEMES[handler$2.scheme] = handler$2; - SCHEMES[handler$3.scheme] = handler$3; - SCHEMES[handler$4.scheme] = handler$4; - SCHEMES[handler$5.scheme] = handler$5; - SCHEMES[handler$6.scheme] = handler$6; - exports2.SCHEMES = SCHEMES; - exports2.pctEncChar = pctEncChar; - exports2.pctDecChars = pctDecChars; - exports2.parse = parse4; - exports2.removeDotSegments = removeDotSegments; - exports2.serialize = serialize; - exports2.resolveComponents = resolveComponents; - exports2.resolve = resolve; - exports2.normalize = normalize2; - exports2.equal = equal; - exports2.escapeComponent = escapeComponent; - exports2.unescapeComponent = unescapeComponent; - Object.defineProperty(exports2, "__esModule", { value: true }); - }); + } + exports.extendSubschemaData = extendSubschemaData; + function extendSubschemaMode(subschema, { jtdDiscriminator, jtdMetadata, compositeRule, createErrors, allErrors }) { + if (compositeRule !== void 0) + subschema.compositeRule = compositeRule; + if (createErrors !== void 0) + subschema.createErrors = createErrors; + if (allErrors !== void 0) + subschema.allErrors = allErrors; + subschema.jtdDiscriminator = jtdDiscriminator; + subschema.jtdMetadata = jtdMetadata; + } + exports.extendSubschemaMode = extendSubschemaMode; }); var require_fast_deep_equal = __commonJS2((exports, module) => { module.exports = function equal(a, b) { @@ -73473,229 +76578,6 @@ var require_fast_deep_equal = __commonJS2((exports, module) => { return a !== a && b !== b; }; }); -var require_ucs2length = __commonJS2((exports, module) => { - module.exports = function ucs2length(str) { - var length = 0, len = str.length, pos = 0, value2; - while (pos < len) { - length++; - value2 = str.charCodeAt(pos++); - if (value2 >= 55296 && value2 <= 56319 && pos < len) { - value2 = str.charCodeAt(pos); - if ((value2 & 64512) == 56320) - pos++; - } - } - return length; - }; -}); -var require_util8 = __commonJS2((exports, module) => { - module.exports = { - copy, - checkDataType, - checkDataTypes, - coerceToTypes, - toHash, - getProperty, - escapeQuotes, - equal: require_fast_deep_equal(), - ucs2length: require_ucs2length(), - varOccurences, - varReplace, - schemaHasRules, - schemaHasRulesExcept, - schemaUnknownRules, - toQuotedString, - getPathExpr, - getPath, - getData, - unescapeFragment, - unescapeJsonPointer, - escapeFragment, - escapeJsonPointer - }; - function copy(o, to) { - to = to || {}; - for (var key in o) - to[key] = o[key]; - return to; - } - function checkDataType(dataType, data, strictNumbers, negate) { - var EQUAL = negate ? " !== " : " === ", AND = negate ? " || " : " && ", OK22 = negate ? "!" : "", NOT = negate ? "" : "!"; - switch (dataType) { - case "null": - return data + EQUAL + "null"; - case "array": - return OK22 + "Array.isArray(" + data + ")"; - case "object": - return "(" + OK22 + data + AND + "typeof " + data + EQUAL + '"object"' + AND + NOT + "Array.isArray(" + data + "))"; - case "integer": - return "(typeof " + data + EQUAL + '"number"' + AND + NOT + "(" + data + " % 1)" + AND + data + EQUAL + data + (strictNumbers ? AND + OK22 + "isFinite(" + data + ")" : "") + ")"; - case "number": - return "(typeof " + data + EQUAL + '"' + dataType + '"' + (strictNumbers ? AND + OK22 + "isFinite(" + data + ")" : "") + ")"; - default: - return "typeof " + data + EQUAL + '"' + dataType + '"'; - } - } - function checkDataTypes(dataTypes, data, strictNumbers) { - switch (dataTypes.length) { - case 1: - return checkDataType(dataTypes[0], data, strictNumbers, true); - default: - var code = ""; - var types2 = toHash(dataTypes); - if (types2.array && types2.object) { - code = types2.null ? "(" : "(!" + data + " || "; - code += "typeof " + data + ' !== "object")'; - delete types2.null; - delete types2.array; - delete types2.object; - } - if (types2.number) - delete types2.integer; - for (var t in types2) - code += (code ? " && " : "") + checkDataType(t, data, strictNumbers, true); - return code; - } - } - var COERCE_TO_TYPES = toHash(["string", "number", "integer", "boolean", "null"]); - function coerceToTypes(optionCoerceTypes, dataTypes) { - if (Array.isArray(dataTypes)) { - var types2 = []; - for (var i = 0; i < dataTypes.length; i++) { - var t = dataTypes[i]; - if (COERCE_TO_TYPES[t]) - types2[types2.length] = t; - else if (optionCoerceTypes === "array" && t === "array") - types2[types2.length] = t; - } - if (types2.length) - return types2; - } else if (COERCE_TO_TYPES[dataTypes]) { - return [dataTypes]; - } else if (optionCoerceTypes === "array" && dataTypes === "array") { - return ["array"]; - } - } - function toHash(arr) { - var hash = {}; - for (var i = 0; i < arr.length; i++) - hash[arr[i]] = true; - return hash; - } - var IDENTIFIER = /^[a-z$_][a-z$_0-9]*$/i; - var SINGLE_QUOTE = /'|\\/g; - function getProperty(key) { - return typeof key == "number" ? "[" + key + "]" : IDENTIFIER.test(key) ? "." + key : "['" + escapeQuotes(key) + "']"; - } - function escapeQuotes(str) { - return str.replace(SINGLE_QUOTE, "\\$&").replace(/\n/g, "\\n").replace(/\r/g, "\\r").replace(/\f/g, "\\f").replace(/\t/g, "\\t"); - } - function varOccurences(str, dataVar) { - dataVar += "[^0-9]"; - var matches = str.match(new RegExp(dataVar, "g")); - return matches ? matches.length : 0; - } - function varReplace(str, dataVar, expr) { - dataVar += "([^0-9])"; - expr = expr.replace(/\$/g, "$$$$"); - return str.replace(new RegExp(dataVar, "g"), expr + "$1"); - } - function schemaHasRules(schema2, rules) { - if (typeof schema2 == "boolean") - return !schema2; - for (var key in schema2) - if (rules[key]) - return true; - } - function schemaHasRulesExcept(schema2, rules, exceptKeyword) { - if (typeof schema2 == "boolean") - return !schema2 && exceptKeyword != "not"; - for (var key in schema2) - if (key != exceptKeyword && rules[key]) - return true; - } - function schemaUnknownRules(schema2, rules) { - if (typeof schema2 == "boolean") - return; - for (var key in schema2) - if (!rules[key]) - return key; - } - function toQuotedString(str) { - return "'" + escapeQuotes(str) + "'"; - } - function getPathExpr(currentPath, expr, jsonPointers, isNumber2) { - var path4 = jsonPointers ? "'/' + " + expr + (isNumber2 ? "" : ".replace(/~/g, '~0').replace(/\\//g, '~1')") : isNumber2 ? "'[' + " + expr + " + ']'" : "'[\\'' + " + expr + " + '\\']'"; - return joinPaths(currentPath, path4); - } - function getPath(currentPath, prop, jsonPointers) { - var path4 = jsonPointers ? toQuotedString("/" + escapeJsonPointer(prop)) : toQuotedString(getProperty(prop)); - return joinPaths(currentPath, path4); - } - var JSON_POINTER = /^\/(?:[^~]|~0|~1)*$/; - var RELATIVE_JSON_POINTER = /^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/; - function getData($data, lvl, paths) { - var up, jsonPointer, data, matches; - if ($data === "") - return "rootData"; - if ($data[0] == "/") { - if (!JSON_POINTER.test($data)) - throw new Error("Invalid JSON-pointer: " + $data); - jsonPointer = $data; - data = "rootData"; - } else { - matches = $data.match(RELATIVE_JSON_POINTER); - if (!matches) - throw new Error("Invalid JSON-pointer: " + $data); - up = +matches[1]; - jsonPointer = matches[2]; - if (jsonPointer == "#") { - if (up >= lvl) - throw new Error("Cannot access property/index " + up + " levels up, current level is " + lvl); - return paths[lvl - up]; - } - if (up > lvl) - throw new Error("Cannot access data " + up + " levels up, current level is " + lvl); - data = "data" + (lvl - up || ""); - if (!jsonPointer) - return data; - } - var expr = data; - var segments = jsonPointer.split("/"); - for (var i = 0; i < segments.length; i++) { - var segment = segments[i]; - if (segment) { - data += getProperty(unescapeJsonPointer(segment)); - expr += " && " + data; - } - } - return expr; - } - function joinPaths(a, b) { - if (a == '""') - return b; - return (a + " + " + b).replace(/([^\\])' \+ '/g, "$1"); - } - function unescapeFragment(str) { - return unescapeJsonPointer(decodeURIComponent(str)); - } - function escapeFragment(str) { - return encodeURIComponent(escapeJsonPointer(str)); - } - function escapeJsonPointer(str) { - return str.replace(/~/g, "~0").replace(/\//g, "~1"); - } - function unescapeJsonPointer(str) { - return str.replace(/~1/g, "/").replace(/~0/g, "~"); - } -}); -var require_schema_obj = __commonJS2((exports, module) => { - var util3 = require_util8(); - module.exports = SchemaObject; - function SchemaObject(obj) { - util3.copy(obj, this); - } -}); var require_json_schema_traverse = __commonJS2((exports, module) => { var traverse = module.exports = function(schema2, opts, cb) { if (typeof opts == "function") { @@ -73715,7 +76597,10 @@ var require_json_schema_traverse = __commonJS2((exports, module) => { contains: true, additionalProperties: true, propertyNames: true, - not: true + not: true, + if: true, + then: true, + else: true }; traverse.arrayKeywords = { items: true, @@ -73724,6 +76609,7 @@ var require_json_schema_traverse = __commonJS2((exports, module) => { oneOf: true }; traverse.propsKeywords = { + $defs: true, definitions: true, properties: true, patternProperties: true, @@ -73775,120 +76661,13 @@ var require_json_schema_traverse = __commonJS2((exports, module) => { return str.replace(/~/g, "~0").replace(/\//g, "~1"); } }); -var require_resolve = __commonJS2((exports, module) => { - var URI = require_uri_all(); +var require_resolve = __commonJS2((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.getSchemaRefs = exports.resolveUrl = exports.normalizeId = exports._getFullPath = exports.getFullPath = exports.inlineRef = void 0; + var util_1 = require_util8(); var equal = require_fast_deep_equal(); - var util3 = require_util8(); - var SchemaObject = require_schema_obj(); var traverse = require_json_schema_traverse(); - module.exports = resolve; - resolve.normalizeId = normalizeId; - resolve.fullPath = getFullPath; - resolve.url = resolveUrl; - resolve.ids = resolveIds; - resolve.inlineRef = inlineRef; - resolve.schema = resolveSchema; - function resolve(compile, root2, ref) { - var refVal = this._refs[ref]; - if (typeof refVal == "string") { - if (this._refs[refVal]) - refVal = this._refs[refVal]; - else - return resolve.call(this, compile, root2, refVal); - } - refVal = refVal || this._schemas[ref]; - if (refVal instanceof SchemaObject) { - return inlineRef(refVal.schema, this._opts.inlineRefs) ? refVal.schema : refVal.validate || this._compile(refVal); - } - var res = resolveSchema.call(this, root2, ref); - var schema2, v, baseId; - if (res) { - schema2 = res.schema; - root2 = res.root; - baseId = res.baseId; - } - if (schema2 instanceof SchemaObject) { - v = schema2.validate || compile.call(this, schema2.schema, root2, void 0, baseId); - } else if (schema2 !== void 0) { - v = inlineRef(schema2, this._opts.inlineRefs) ? schema2 : compile.call(this, schema2, root2, void 0, baseId); - } - return v; - } - function resolveSchema(root2, ref) { - var p = URI.parse(ref), refPath = _getFullPath(p), baseId = getFullPath(this._getId(root2.schema)); - if (Object.keys(root2.schema).length === 0 || refPath !== baseId) { - var id = normalizeId(refPath); - var refVal = this._refs[id]; - if (typeof refVal == "string") { - return resolveRecursive.call(this, root2, refVal, p); - } else if (refVal instanceof SchemaObject) { - if (!refVal.validate) - this._compile(refVal); - root2 = refVal; - } else { - refVal = this._schemas[id]; - if (refVal instanceof SchemaObject) { - if (!refVal.validate) - this._compile(refVal); - if (id == normalizeId(ref)) - return { schema: refVal, root: root2, baseId }; - root2 = refVal; - } else { - return; - } - } - if (!root2.schema) - return; - baseId = getFullPath(this._getId(root2.schema)); - } - return getJsonPointer.call(this, p, baseId, root2.schema, root2); - } - function resolveRecursive(root2, ref, parsedRef) { - var res = resolveSchema.call(this, root2, ref); - if (res) { - var schema2 = res.schema; - var baseId = res.baseId; - root2 = res.root; - var id = this._getId(schema2); - if (id) - baseId = resolveUrl(baseId, id); - return getJsonPointer.call(this, parsedRef, baseId, schema2, root2); - } - } - var PREVENT_SCOPE_CHANGE = util3.toHash(["properties", "patternProperties", "enum", "dependencies", "definitions"]); - function getJsonPointer(parsedRef, baseId, schema2, root2) { - parsedRef.fragment = parsedRef.fragment || ""; - if (parsedRef.fragment.slice(0, 1) != "/") - return; - var parts = parsedRef.fragment.split("/"); - for (var i = 1; i < parts.length; i++) { - var part = parts[i]; - if (part) { - part = util3.unescapeFragment(part); - schema2 = schema2[part]; - if (schema2 === void 0) - break; - var id; - if (!PREVENT_SCOPE_CHANGE[part]) { - id = this._getId(schema2); - if (id) - baseId = resolveUrl(baseId, id); - if (schema2.$ref) { - var $ref = resolveUrl(baseId, schema2.$ref); - var res = resolveSchema.call(this, root2, $ref); - if (res) { - schema2 = res.schema; - root2 = res.root; - baseId = res.baseId; - } - } - } - } - } - if (schema2 !== void 0 && schema2 !== root2.schema) - return { schema: schema2, root: root2, baseId }; - } - var SIMPLE_INLINED = util3.toHash([ + var SIMPLE_INLINED = /* @__PURE__ */ new Set([ "type", "format", "pattern", @@ -73903,3913 +76682,3741 @@ var require_resolve = __commonJS2((exports, module) => { "uniqueItems", "multipleOf", "required", - "enum" + "enum", + "const" ]); - function inlineRef(schema2, limit) { - if (limit === false) + function inlineRef(schema2, limit = true) { + if (typeof schema2 == "boolean") + return true; + if (limit === true) + return !hasRef(schema2); + if (!limit) return false; - if (limit === void 0 || limit === true) - return checkNoRef(schema2); - else if (limit) - return countKeys(schema2) <= limit; + return countKeys(schema2) <= limit; } - function checkNoRef(schema2) { - var item; - if (Array.isArray(schema2)) { - for (var i = 0; i < schema2.length; i++) { - item = schema2[i]; - if (typeof item == "object" && !checkNoRef(item)) - return false; - } - } else { - for (var key in schema2) { - if (key == "$ref") - return false; - item = schema2[key]; - if (typeof item == "object" && !checkNoRef(item)) - return false; - } + exports.inlineRef = inlineRef; + var REF_KEYWORDS = /* @__PURE__ */ new Set([ + "$ref", + "$recursiveRef", + "$recursiveAnchor", + "$dynamicRef", + "$dynamicAnchor" + ]); + function hasRef(schema2) { + for (const key in schema2) { + if (REF_KEYWORDS.has(key)) + return true; + const sch = schema2[key]; + if (Array.isArray(sch) && sch.some(hasRef)) + return true; + if (typeof sch == "object" && hasRef(sch)) + return true; } - return true; + return false; } function countKeys(schema2) { - var count = 0, item; - if (Array.isArray(schema2)) { - for (var i = 0; i < schema2.length; i++) { - item = schema2[i]; - if (typeof item == "object") - count += countKeys(item); - if (count == Infinity) - return Infinity; - } - } else { - for (var key in schema2) { - if (key == "$ref") - return Infinity; - if (SIMPLE_INLINED[key]) { - count++; - } else { - item = schema2[key]; - if (typeof item == "object") - count += countKeys(item) + 1; - if (count == Infinity) - return Infinity; - } + let count = 0; + for (const key in schema2) { + if (key === "$ref") + return Infinity; + count++; + if (SIMPLE_INLINED.has(key)) + continue; + if (typeof schema2[key] == "object") { + (0, util_1.eachItem)(schema2[key], (sch) => count += countKeys(sch)); } + if (count === Infinity) + return Infinity; } return count; } - function getFullPath(id, normalize2) { + function getFullPath(resolver, id = "", normalize2) { if (normalize2 !== false) id = normalizeId(id); - var p = URI.parse(id); - return _getFullPath(p); + const p = resolver.parse(id); + return _getFullPath(resolver, p); } - function _getFullPath(p) { - return URI.serialize(p).split("#")[0] + "#"; + exports.getFullPath = getFullPath; + function _getFullPath(resolver, p) { + const serialized = resolver.serialize(p); + return serialized.split("#")[0] + "#"; } + exports._getFullPath = _getFullPath; var TRAILING_SLASH_HASH = /#\/?$/; function normalizeId(id) { return id ? id.replace(TRAILING_SLASH_HASH, "") : ""; } - function resolveUrl(baseId, id) { + exports.normalizeId = normalizeId; + function resolveUrl(resolver, baseId, id) { id = normalizeId(id); - return URI.resolve(baseId, id); + return resolver.resolve(baseId, id); } - function resolveIds(schema2) { - var schemaId = normalizeId(this._getId(schema2)); - var baseIds = { "": schemaId }; - var fullPaths = { "": getFullPath(schemaId, false) }; - var localRefs = {}; - var self2 = this; - traverse(schema2, { allKeys: true }, function(sch, jsonPtr, rootSchema2, parentJsonPtr, parentKeyword, parentSchema, keyIndex) { - if (jsonPtr === "") + exports.resolveUrl = resolveUrl; + var ANCHOR = /^[a-z_][-a-z0-9._]*$/i; + function getSchemaRefs(schema2, baseId) { + if (typeof schema2 == "boolean") + return {}; + const { schemaId, uriResolver } = this.opts; + const schId = normalizeId(schema2[schemaId] || baseId); + const baseIds = { "": schId }; + const pathPrefix = getFullPath(uriResolver, schId, false); + const localRefs = {}; + const schemaRefs = /* @__PURE__ */ new Set(); + traverse(schema2, { allKeys: true }, (sch, jsonPtr, _, parentJsonPtr) => { + if (parentJsonPtr === void 0) return; - var id = self2._getId(sch); - var baseId = baseIds[parentJsonPtr]; - var fullPath = fullPaths[parentJsonPtr] + "/" + parentKeyword; - if (keyIndex !== void 0) - fullPath += "/" + (typeof keyIndex == "number" ? keyIndex : util3.escapeFragment(keyIndex)); - if (typeof id == "string") { - id = baseId = normalizeId(baseId ? URI.resolve(baseId, id) : id); - var refVal = self2._refs[id]; - if (typeof refVal == "string") - refVal = self2._refs[refVal]; - if (refVal && refVal.schema) { - if (!equal(sch, refVal.schema)) - throw new Error('id "' + id + '" resolves to more than one schema'); - } else if (id != normalizeId(fullPath)) { - if (id[0] == "#") { - if (localRefs[id] && !equal(sch, localRefs[id])) - throw new Error('id "' + id + '" resolves to more than one schema'); - localRefs[id] = sch; + const fullPath = pathPrefix + jsonPtr; + let innerBaseId = baseIds[parentJsonPtr]; + if (typeof sch[schemaId] == "string") + innerBaseId = addRef.call(this, sch[schemaId]); + addAnchor.call(this, sch.$anchor); + addAnchor.call(this, sch.$dynamicAnchor); + baseIds[jsonPtr] = innerBaseId; + function addRef(ref) { + const _resolve = this.opts.uriResolver.resolve; + ref = normalizeId(innerBaseId ? _resolve(innerBaseId, ref) : ref); + if (schemaRefs.has(ref)) + throw ambiguos(ref); + schemaRefs.add(ref); + let schOrRef = this.refs[ref]; + if (typeof schOrRef == "string") + schOrRef = this.refs[schOrRef]; + if (typeof schOrRef == "object") { + checkAmbiguosRef(sch, schOrRef.schema, ref); + } else if (ref !== normalizeId(fullPath)) { + if (ref[0] === "#") { + checkAmbiguosRef(sch, localRefs[ref], ref); + localRefs[ref] = sch; } else { - self2._refs[id] = fullPath; + this.refs[ref] = fullPath; } } + return ref; + } + function addAnchor(anchor) { + if (typeof anchor == "string") { + if (!ANCHOR.test(anchor)) + throw new Error(`invalid anchor "${anchor}"`); + addRef.call(this, `#${anchor}`); + } } - baseIds[jsonPtr] = baseId; - fullPaths[jsonPtr] = fullPath; }); return localRefs; + function checkAmbiguosRef(sch1, sch2, ref) { + if (sch2 !== void 0 && !equal(sch1, sch2)) + throw ambiguos(ref); + } + function ambiguos(ref) { + return new Error(`reference "${ref}" resolves to more than one schema`); + } } + exports.getSchemaRefs = getSchemaRefs; }); -var require_error_classes = __commonJS2((exports, module) => { - var resolve = require_resolve(); - module.exports = { - Validation: errorSubclass(ValidationError), - MissingRef: errorSubclass(MissingRefError) - }; - function ValidationError(errors2) { - this.message = "validation failed"; - this.errors = errors2; - this.ajv = this.validation = true; - } - MissingRefError.message = function(baseId, ref) { - return "can't resolve reference " + ref + " from id " + baseId; - }; - function MissingRefError(baseId, ref, message) { - this.message = message || MissingRefError.message(baseId, ref); - this.missingRef = resolve.url(baseId, ref); - this.missingSchema = resolve.normalizeId(resolve.fullPath(this.missingRef)); - } - function errorSubclass(Subclass) { - Subclass.prototype = Object.create(Error.prototype); - Subclass.prototype.constructor = Subclass; - return Subclass; - } -}); -var require_fast_json_stable_stringify = __commonJS2((exports, module) => { - module.exports = function(data, opts) { - if (!opts) - opts = {}; - if (typeof opts === "function") - opts = { cmp: opts }; - var cycles = typeof opts.cycles === "boolean" ? opts.cycles : false; - var cmp = opts.cmp && /* @__PURE__ */ (function(f) { - return function(node2) { - return function(a, b) { - var aobj = { key: a, value: node2[a] }; - var bobj = { key: b, value: node2[b] }; - return f(aobj, bobj); - }; - }; - })(opts.cmp); - var seen = []; - return (function stringify(node2) { - if (node2 && node2.toJSON && typeof node2.toJSON === "function") { - node2 = node2.toJSON(); - } - if (node2 === void 0) +var require_validate = __commonJS2((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.getData = exports.KeywordCxt = exports.validateFunctionCode = void 0; + var boolSchema_1 = require_boolSchema(); + var dataType_1 = require_dataType(); + var applicability_1 = require_applicability(); + var dataType_2 = require_dataType(); + var defaults_1 = require_defaults(); + var keyword_1 = require_keyword(); + var subschema_1 = require_subschema(); + var codegen_1 = require_codegen(); + var names_1 = require_names(); + var resolve_1 = require_resolve(); + var util_1 = require_util8(); + var errors_1 = require_errors2(); + function validateFunctionCode(it) { + if (isSchemaObj(it)) { + checkKeywords(it); + if (schemaCxtHasRules(it)) { + topSchemaObjCode(it); return; - if (typeof node2 == "number") - return isFinite(node2) ? "" + node2 : "null"; - if (typeof node2 !== "object") - return JSON.stringify(node2); - var i, out; - if (Array.isArray(node2)) { - out = "["; - for (i = 0; i < node2.length; i++) { - if (i) - out += ","; - out += stringify(node2[i]) || "null"; - } - return out + "]"; - } - if (node2 === null) - return "null"; - if (seen.indexOf(node2) !== -1) { - if (cycles) - return JSON.stringify("__cycle__"); - throw new TypeError("Converting circular structure to JSON"); - } - var seenIndex = seen.push(node2) - 1; - var keys = Object.keys(node2).sort(cmp && cmp(node2)); - out = ""; - for (i = 0; i < keys.length; i++) { - var key = keys[i]; - var value2 = stringify(node2[key]); - if (!value2) - continue; - if (out) - out += ","; - out += JSON.stringify(key) + ":" + value2; - } - seen.splice(seenIndex, 1); - return "{" + out + "}"; - })(data); - }; -}); -var require_validate = __commonJS2((exports, module) => { - module.exports = function generate_validate(it, $keyword, $ruleType) { - var out = ""; - var $async = it.schema.$async === true, $refKeywords = it.util.schemaHasRulesExcept(it.schema, it.RULES.all, "$ref"), $id = it.self._getId(it.schema); - if (it.opts.strictKeywords) { - var $unknownKwd = it.util.schemaUnknownRules(it.schema, it.RULES.keywords); - if ($unknownKwd) { - var $keywordsMsg = "unknown keyword: " + $unknownKwd; - if (it.opts.strictKeywords === "log") - it.logger.warn($keywordsMsg); - else - throw new Error($keywordsMsg); } } - if (it.isTop) { - out += " var validate = "; - if ($async) { - it.async = true; - out += "async "; - } - out += "function(data, dataPath, parentData, parentDataProperty, rootData) { 'use strict'; "; - if ($id && (it.opts.sourceCode || it.opts.processCode)) { - out += " " + ("/*# sourceURL=" + $id + " */") + " "; - } - } - if (typeof it.schema == "boolean" || !($refKeywords || it.schema.$ref)) { - var $keyword = "false schema"; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + "/" + $keyword; - var $breakOnError = !it.opts.allErrors; - var $errorKeyword; - var $data = "data" + ($dataLvl || ""); - var $valid = "valid" + $lvl; - if (it.schema === false) { - if (it.isTop) { - $breakOnError = true; - } else { - out += " var " + $valid + " = false; "; - } - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ""; - if (it.createErrors !== false) { - out += " { keyword: '" + ($errorKeyword || "false schema") + "' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: {} "; - if (it.opts.messages !== false) { - out += " , message: 'boolean schema is false' "; - } - if (it.opts.verbose) { - out += " , schema: false , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; - } - out += " } "; - } else { - out += " {} "; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - if (it.async) { - out += " throw new ValidationError([" + __err + "]); "; - } else { - out += " validate.errors = [" + __err + "]; return false; "; - } - } else { - out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; - } - } else { - if (it.isTop) { - if ($async) { - out += " return data; "; - } else { - out += " validate.errors = null; return true; "; - } - } else { - out += " var " + $valid + " = true; "; - } - } - if (it.isTop) { - out += " }; return validate; "; - } - return out; - } - if (it.isTop) { - var $top = it.isTop, $lvl = it.level = 0, $dataLvl = it.dataLevel = 0, $data = "data"; - it.rootId = it.resolve.fullPath(it.self._getId(it.root.schema)); - it.baseId = it.baseId || it.rootId; - delete it.isTop; - it.dataPathArr = [""]; - if (it.schema.default !== void 0 && it.opts.useDefaults && it.opts.strictDefaults) { - var $defaultMsg = "default is ignored in the schema root"; - if (it.opts.strictDefaults === "log") - it.logger.warn($defaultMsg); - else - throw new Error($defaultMsg); - } - out += " var vErrors = null; "; - out += " var errors = 0; "; - out += " if (rootData === undefined) rootData = data; "; - } else { - var { level: $lvl, dataLevel: $dataLvl } = it, $data = "data" + ($dataLvl || ""); - if ($id) - it.baseId = it.resolve.url(it.baseId, $id); - if ($async && !it.async) - throw new Error("async schema in sync schema"); - out += " var errs_" + $lvl + " = errors;"; - } - var $valid = "valid" + $lvl, $breakOnError = !it.opts.allErrors, $closingBraces1 = "", $closingBraces2 = ""; - var $errorKeyword; - var $typeSchema = it.schema.type, $typeIsArray = Array.isArray($typeSchema); - if ($typeSchema && it.opts.nullable && it.schema.nullable === true) { - if ($typeIsArray) { - if ($typeSchema.indexOf("null") == -1) - $typeSchema = $typeSchema.concat("null"); - } else if ($typeSchema != "null") { - $typeSchema = [$typeSchema, "null"]; - $typeIsArray = true; - } - } - if ($typeIsArray && $typeSchema.length == 1) { - $typeSchema = $typeSchema[0]; - $typeIsArray = false; - } - if (it.schema.$ref && $refKeywords) { - if (it.opts.extendRefs == "fail") { - throw new Error('$ref: validation keywords used in schema at path "' + it.errSchemaPath + '" (see option extendRefs)'); - } else if (it.opts.extendRefs !== true) { - $refKeywords = false; - it.logger.warn('$ref: keywords ignored in schema at path "' + it.errSchemaPath + '"'); - } - } - if (it.schema.$comment && it.opts.$comment) { - out += " " + it.RULES.all.$comment.code(it, "$comment"); - } - if ($typeSchema) { - if (it.opts.coerceTypes) { - var $coerceToTypes = it.util.coerceToTypes(it.opts.coerceTypes, $typeSchema); - } - var $rulesGroup = it.RULES.types[$typeSchema]; - if ($coerceToTypes || $typeIsArray || $rulesGroup === true || $rulesGroup && !$shouldUseGroup($rulesGroup)) { - var $schemaPath = it.schemaPath + ".type", $errSchemaPath = it.errSchemaPath + "/type"; - var $schemaPath = it.schemaPath + ".type", $errSchemaPath = it.errSchemaPath + "/type", $method = $typeIsArray ? "checkDataTypes" : "checkDataType"; - out += " if (" + it.util[$method]($typeSchema, $data, it.opts.strictNumbers, true) + ") { "; - if ($coerceToTypes) { - var $dataType = "dataType" + $lvl, $coerced = "coerced" + $lvl; - out += " var " + $dataType + " = typeof " + $data + "; var " + $coerced + " = undefined; "; - if (it.opts.coerceTypes == "array") { - out += " if (" + $dataType + " == 'object' && Array.isArray(" + $data + ") && " + $data + ".length == 1) { " + $data + " = " + $data + "[0]; " + $dataType + " = typeof " + $data + "; if (" + it.util.checkDataType(it.schema.type, $data, it.opts.strictNumbers) + ") " + $coerced + " = " + $data + "; } "; - } - out += " if (" + $coerced + " !== undefined) ; "; - var arr1 = $coerceToTypes; - if (arr1) { - var $type, $i = -1, l1 = arr1.length - 1; - while ($i < l1) { - $type = arr1[$i += 1]; - if ($type == "string") { - out += " else if (" + $dataType + " == 'number' || " + $dataType + " == 'boolean') " + $coerced + " = '' + " + $data + "; else if (" + $data + " === null) " + $coerced + " = ''; "; - } else if ($type == "number" || $type == "integer") { - out += " else if (" + $dataType + " == 'boolean' || " + $data + " === null || (" + $dataType + " == 'string' && " + $data + " && " + $data + " == +" + $data + " "; - if ($type == "integer") { - out += " && !(" + $data + " % 1)"; - } - out += ")) " + $coerced + " = +" + $data + "; "; - } else if ($type == "boolean") { - out += " else if (" + $data + " === 'false' || " + $data + " === 0 || " + $data + " === null) " + $coerced + " = false; else if (" + $data + " === 'true' || " + $data + " === 1) " + $coerced + " = true; "; - } else if ($type == "null") { - out += " else if (" + $data + " === '' || " + $data + " === 0 || " + $data + " === false) " + $coerced + " = null; "; - } else if (it.opts.coerceTypes == "array" && $type == "array") { - out += " else if (" + $dataType + " == 'string' || " + $dataType + " == 'number' || " + $dataType + " == 'boolean' || " + $data + " == null) " + $coerced + " = [" + $data + "]; "; - } - } - } - out += " else { "; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ""; - if (it.createErrors !== false) { - out += " { keyword: '" + ($errorKeyword || "type") + "' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { type: '"; - if ($typeIsArray) { - out += "" + $typeSchema.join(","); - } else { - out += "" + $typeSchema; - } - out += "' } "; - if (it.opts.messages !== false) { - out += " , message: 'should be "; - if ($typeIsArray) { - out += "" + $typeSchema.join(","); - } else { - out += "" + $typeSchema; - } - out += "' "; - } - if (it.opts.verbose) { - out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; - } - out += " } "; - } else { - out += " {} "; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - if (it.async) { - out += " throw new ValidationError([" + __err + "]); "; - } else { - out += " validate.errors = [" + __err + "]; return false; "; - } - } else { - out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; - } - out += " } if (" + $coerced + " !== undefined) { "; - var $parentData = $dataLvl ? "data" + ($dataLvl - 1 || "") : "parentData", $parentDataProperty = $dataLvl ? it.dataPathArr[$dataLvl] : "parentDataProperty"; - out += " " + $data + " = " + $coerced + "; "; - if (!$dataLvl) { - out += "if (" + $parentData + " !== undefined)"; - } - out += " " + $parentData + "[" + $parentDataProperty + "] = " + $coerced + "; } "; - } else { - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ""; - if (it.createErrors !== false) { - out += " { keyword: '" + ($errorKeyword || "type") + "' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { type: '"; - if ($typeIsArray) { - out += "" + $typeSchema.join(","); - } else { - out += "" + $typeSchema; - } - out += "' } "; - if (it.opts.messages !== false) { - out += " , message: 'should be "; - if ($typeIsArray) { - out += "" + $typeSchema.join(","); - } else { - out += "" + $typeSchema; - } - out += "' "; - } - if (it.opts.verbose) { - out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; - } - out += " } "; - } else { - out += " {} "; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - if (it.async) { - out += " throw new ValidationError([" + __err + "]); "; - } else { - out += " validate.errors = [" + __err + "]; return false; "; - } - } else { - out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; - } - } - out += " } "; - } - } - if (it.schema.$ref && !$refKeywords) { - out += " " + it.RULES.all.$ref.code(it, "$ref") + " "; - if ($breakOnError) { - out += " } if (errors === "; - if ($top) { - out += "0"; - } else { - out += "errs_" + $lvl; - } - out += ") { "; - $closingBraces2 += "}"; - } - } else { - var arr2 = it.RULES; - if (arr2) { - var $rulesGroup, i2 = -1, l2 = arr2.length - 1; - while (i2 < l2) { - $rulesGroup = arr2[i2 += 1]; - if ($shouldUseGroup($rulesGroup)) { - if ($rulesGroup.type) { - out += " if (" + it.util.checkDataType($rulesGroup.type, $data, it.opts.strictNumbers) + ") { "; - } - if (it.opts.useDefaults) { - if ($rulesGroup.type == "object" && it.schema.properties) { - var $schema = it.schema.properties, $schemaKeys = Object.keys($schema); - var arr3 = $schemaKeys; - if (arr3) { - var $propertyKey, i3 = -1, l3 = arr3.length - 1; - while (i3 < l3) { - $propertyKey = arr3[i3 += 1]; - var $sch = $schema[$propertyKey]; - if ($sch.default !== void 0) { - var $passData = $data + it.util.getProperty($propertyKey); - if (it.compositeRule) { - if (it.opts.strictDefaults) { - var $defaultMsg = "default is ignored for: " + $passData; - if (it.opts.strictDefaults === "log") - it.logger.warn($defaultMsg); - else - throw new Error($defaultMsg); - } - } else { - out += " if (" + $passData + " === undefined "; - if (it.opts.useDefaults == "empty") { - out += " || " + $passData + " === null || " + $passData + " === '' "; - } - out += " ) " + $passData + " = "; - if (it.opts.useDefaults == "shared") { - out += " " + it.useDefault($sch.default) + " "; - } else { - out += " " + JSON.stringify($sch.default) + " "; - } - out += "; "; - } - } - } - } - } else if ($rulesGroup.type == "array" && Array.isArray(it.schema.items)) { - var arr4 = it.schema.items; - if (arr4) { - var $sch, $i = -1, l4 = arr4.length - 1; - while ($i < l4) { - $sch = arr4[$i += 1]; - if ($sch.default !== void 0) { - var $passData = $data + "[" + $i + "]"; - if (it.compositeRule) { - if (it.opts.strictDefaults) { - var $defaultMsg = "default is ignored for: " + $passData; - if (it.opts.strictDefaults === "log") - it.logger.warn($defaultMsg); - else - throw new Error($defaultMsg); - } - } else { - out += " if (" + $passData + " === undefined "; - if (it.opts.useDefaults == "empty") { - out += " || " + $passData + " === null || " + $passData + " === '' "; - } - out += " ) " + $passData + " = "; - if (it.opts.useDefaults == "shared") { - out += " " + it.useDefault($sch.default) + " "; - } else { - out += " " + JSON.stringify($sch.default) + " "; - } - out += "; "; - } - } - } - } - } - } - var arr5 = $rulesGroup.rules; - if (arr5) { - var $rule, i5 = -1, l5 = arr5.length - 1; - while (i5 < l5) { - $rule = arr5[i5 += 1]; - if ($shouldUseRule($rule)) { - var $code = $rule.code(it, $rule.keyword, $rulesGroup.type); - if ($code) { - out += " " + $code + " "; - if ($breakOnError) { - $closingBraces1 += "}"; - } - } - } - } - } - if ($breakOnError) { - out += " " + $closingBraces1 + " "; - $closingBraces1 = ""; - } - if ($rulesGroup.type) { - out += " } "; - if ($typeSchema && $typeSchema === $rulesGroup.type && !$coerceToTypes) { - out += " else { "; - var $schemaPath = it.schemaPath + ".type", $errSchemaPath = it.errSchemaPath + "/type"; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ""; - if (it.createErrors !== false) { - out += " { keyword: '" + ($errorKeyword || "type") + "' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { type: '"; - if ($typeIsArray) { - out += "" + $typeSchema.join(","); - } else { - out += "" + $typeSchema; - } - out += "' } "; - if (it.opts.messages !== false) { - out += " , message: 'should be "; - if ($typeIsArray) { - out += "" + $typeSchema.join(","); - } else { - out += "" + $typeSchema; - } - out += "' "; - } - if (it.opts.verbose) { - out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; - } - out += " } "; - } else { - out += " {} "; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - if (it.async) { - out += " throw new ValidationError([" + __err + "]); "; - } else { - out += " validate.errors = [" + __err + "]; return false; "; - } - } else { - out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; - } - out += " } "; - } - } - if ($breakOnError) { - out += " if (errors === "; - if ($top) { - out += "0"; - } else { - out += "errs_" + $lvl; - } - out += ") { "; - $closingBraces2 += "}"; - } - } - } - } - } - if ($breakOnError) { - out += " " + $closingBraces2 + " "; - } - if ($top) { - if ($async) { - out += " if (errors === 0) return data; "; - out += " else throw new ValidationError(vErrors); "; - } else { - out += " validate.errors = vErrors; "; - out += " return errors === 0; "; - } - out += " }; return validate;"; - } else { - out += " var " + $valid + " = errors === errs_" + $lvl + ";"; - } - function $shouldUseGroup($rulesGroup2) { - var rules = $rulesGroup2.rules; - for (var i = 0; i < rules.length; i++) - if ($shouldUseRule(rules[i])) - return true; - } - function $shouldUseRule($rule2) { - return it.schema[$rule2.keyword] !== void 0 || $rule2.implements && $ruleImplementsSomeKeyword($rule2); - } - function $ruleImplementsSomeKeyword($rule2) { - var impl = $rule2.implements; - for (var i = 0; i < impl.length; i++) - if (it.schema[impl[i]] !== void 0) - return true; - } - return out; - }; -}); -var require_compile = __commonJS2((exports, module) => { - var resolve = require_resolve(); - var util3 = require_util8(); - var errorClasses = require_error_classes(); - var stableStringify = require_fast_json_stable_stringify(); - var validateGenerator = require_validate(); - var ucs2length = util3.ucs2length; - var equal = require_fast_deep_equal(); - var ValidationError = errorClasses.Validation; - module.exports = compile; - function compile(schema2, root2, localRefs, baseId) { - var self2 = this, opts = this._opts, refVal = [void 0], refs = {}, patterns = [], patternsHash = {}, defaults = [], defaultsHash = {}, customRules = []; - root2 = root2 || { schema: schema2, refVal, refs }; - var c = checkCompiling.call(this, schema2, root2, baseId); - var compilation = this._compilations[c.index]; - if (c.compiling) - return compilation.callValidate = callValidate; - var formats = this._formats; - var RULES = this.RULES; - try { - var v = localCompile(schema2, root2, localRefs, baseId); - compilation.validate = v; - var cv = compilation.callValidate; - if (cv) { - cv.schema = v.schema; - cv.errors = null; - cv.refs = v.refs; - cv.refVal = v.refVal; - cv.root = v.root; - cv.$async = v.$async; - if (opts.sourceCode) - cv.source = v.source; - } - return v; - } finally { - endCompiling.call(this, schema2, root2, baseId); - } - function callValidate() { - var validate2 = compilation.validate; - var result = validate2.apply(this, arguments); - callValidate.errors = validate2.errors; - return result; - } - function localCompile(_schema, _root, localRefs2, baseId2) { - var isRoot = !_root || _root && _root.schema == _schema; - if (_root.schema != root2.schema) - return compile.call(self2, _schema, _root, localRefs2, baseId2); - var $async = _schema.$async === true; - var sourceCode = validateGenerator({ - isTop: true, - schema: _schema, - isRoot, - baseId: baseId2, - root: _root, - schemaPath: "", - errSchemaPath: "#", - errorPath: '""', - MissingRefError: errorClasses.MissingRef, - RULES, - validate: validateGenerator, - util: util3, - resolve, - resolveRef, - usePattern, - useDefault, - useCustomRule, - opts, - formats, - logger: self2.logger, - self: self2 + validateFunction(it, () => (0, boolSchema_1.topBoolOrEmptySchema)(it)); + } + exports.validateFunctionCode = validateFunctionCode; + function validateFunction({ gen, validateName, schema: schema2, schemaEnv, opts }, body) { + if (opts.code.es5) { + gen.func(validateName, (0, codegen_1._)`${names_1.default.data}, ${names_1.default.valCxt}`, schemaEnv.$async, () => { + gen.code((0, codegen_1._)`"use strict"; ${funcSourceUrl(schema2, opts)}`); + destructureValCxtES5(gen, opts); + gen.code(body); }); - sourceCode = vars(refVal, refValCode) + vars(patterns, patternCode) + vars(defaults, defaultCode) + vars(customRules, customRuleCode) + sourceCode; - if (opts.processCode) - sourceCode = opts.processCode(sourceCode, _schema); - var validate2; - try { - var makeValidate = new Function("self", "RULES", "formats", "root", "refVal", "defaults", "customRules", "equal", "ucs2length", "ValidationError", sourceCode); - validate2 = makeValidate(self2, RULES, formats, root2, refVal, defaults, customRules, equal, ucs2length, ValidationError); - refVal[0] = validate2; - } catch (e) { - self2.logger.error("Error compiling schema, function code:", sourceCode); - throw e; - } - validate2.schema = _schema; - validate2.errors = null; - validate2.refs = refs; - validate2.refVal = refVal; - validate2.root = isRoot ? validate2 : _root; - if ($async) - validate2.$async = true; - if (opts.sourceCode === true) { - validate2.source = { - code: sourceCode, - patterns, - defaults - }; - } - return validate2; - } - function resolveRef(baseId2, ref, isRoot) { - ref = resolve.url(baseId2, ref); - var refIndex = refs[ref]; - var _refVal, refCode; - if (refIndex !== void 0) { - _refVal = refVal[refIndex]; - refCode = "refVal[" + refIndex + "]"; - return resolvedRef(_refVal, refCode); - } - if (!isRoot && root2.refs) { - var rootRefId = root2.refs[ref]; - if (rootRefId !== void 0) { - _refVal = root2.refVal[rootRefId]; - refCode = addLocalRef(ref, _refVal); - return resolvedRef(_refVal, refCode); - } - } - refCode = addLocalRef(ref); - var v2 = resolve.call(self2, localCompile, root2, ref); - if (v2 === void 0) { - var localSchema = localRefs && localRefs[ref]; - if (localSchema) { - v2 = resolve.inlineRef(localSchema, opts.inlineRefs) ? localSchema : compile.call(self2, localSchema, root2, localRefs, baseId2); - } - } - if (v2 === void 0) { - removeLocalRef(ref); - } else { - replaceLocalRef(ref, v2); - return resolvedRef(v2, refCode); - } - } - function addLocalRef(ref, v2) { - var refId = refVal.length; - refVal[refId] = v2; - refs[ref] = refId; - return "refVal" + refId; - } - function removeLocalRef(ref) { - delete refs[ref]; - } - function replaceLocalRef(ref, v2) { - var refId = refs[ref]; - refVal[refId] = v2; - } - function resolvedRef(refVal2, code) { - return typeof refVal2 == "object" || typeof refVal2 == "boolean" ? { code, schema: refVal2, inline: true } : { code, $async: refVal2 && !!refVal2.$async }; - } - function usePattern(regexStr) { - var index = patternsHash[regexStr]; - if (index === void 0) { - index = patternsHash[regexStr] = patterns.length; - patterns[index] = regexStr; - } - return "pattern" + index; - } - function useDefault(value2) { - switch (typeof value2) { - case "boolean": - case "number": - return "" + value2; - case "string": - return util3.toQuotedString(value2); - case "object": - if (value2 === null) - return "null"; - var valueStr = stableStringify(value2); - var index = defaultsHash[valueStr]; - if (index === void 0) { - index = defaultsHash[valueStr] = defaults.length; - defaults[index] = value2; - } - return "default" + index; - } - } - function useCustomRule(rule, schema22, parentSchema, it) { - if (self2._opts.validateSchema !== false) { - var deps = rule.definition.dependencies; - if (deps && !deps.every(function(keyword) { - return Object.prototype.hasOwnProperty.call(parentSchema, keyword); - })) - throw new Error("parent schema must have all required keywords: " + deps.join(",")); - var validateSchema = rule.definition.validateSchema; - if (validateSchema) { - var valid = validateSchema(schema22); - if (!valid) { - var message = "keyword schema is invalid: " + self2.errorsText(validateSchema.errors); - if (self2._opts.validateSchema == "log") - self2.logger.error(message); - else - throw new Error(message); - } - } - } - var compile2 = rule.definition.compile, inline = rule.definition.inline, macro = rule.definition.macro; - var validate2; - if (compile2) { - validate2 = compile2.call(self2, schema22, parentSchema, it); - } else if (macro) { - validate2 = macro.call(self2, schema22, parentSchema, it); - if (opts.validateSchema !== false) - self2.validateSchema(validate2, true); - } else if (inline) { - validate2 = inline.call(self2, it, rule.keyword, schema22, parentSchema); - } else { - validate2 = rule.definition.validate; - if (!validate2) - return; - } - if (validate2 === void 0) - throw new Error('custom keyword "' + rule.keyword + '"failed to compile'); - var index = customRules.length; - customRules[index] = validate2; - return { - code: "customRule" + index, - validate: validate2 - }; + } else { + gen.func(validateName, (0, codegen_1._)`${names_1.default.data}, ${destructureValCxt(opts)}`, schemaEnv.$async, () => gen.code(funcSourceUrl(schema2, opts)).code(body)); } } - function checkCompiling(schema2, root2, baseId) { - var index = compIndex.call(this, schema2, root2, baseId); - if (index >= 0) - return { index, compiling: true }; - index = this._compilations.length; - this._compilations[index] = { - schema: schema2, - root: root2, - baseId + function destructureValCxt(opts) { + return (0, codegen_1._)`{${names_1.default.instancePath}="", ${names_1.default.parentData}, ${names_1.default.parentDataProperty}, ${names_1.default.rootData}=${names_1.default.data}${opts.dynamicRef ? (0, codegen_1._)`, ${names_1.default.dynamicAnchors}={}` : codegen_1.nil}}={}`; + } + function destructureValCxtES5(gen, opts) { + gen.if(names_1.default.valCxt, () => { + gen.var(names_1.default.instancePath, (0, codegen_1._)`${names_1.default.valCxt}.${names_1.default.instancePath}`); + gen.var(names_1.default.parentData, (0, codegen_1._)`${names_1.default.valCxt}.${names_1.default.parentData}`); + gen.var(names_1.default.parentDataProperty, (0, codegen_1._)`${names_1.default.valCxt}.${names_1.default.parentDataProperty}`); + gen.var(names_1.default.rootData, (0, codegen_1._)`${names_1.default.valCxt}.${names_1.default.rootData}`); + if (opts.dynamicRef) + gen.var(names_1.default.dynamicAnchors, (0, codegen_1._)`${names_1.default.valCxt}.${names_1.default.dynamicAnchors}`); + }, () => { + gen.var(names_1.default.instancePath, (0, codegen_1._)`""`); + gen.var(names_1.default.parentData, (0, codegen_1._)`undefined`); + gen.var(names_1.default.parentDataProperty, (0, codegen_1._)`undefined`); + gen.var(names_1.default.rootData, names_1.default.data); + if (opts.dynamicRef) + gen.var(names_1.default.dynamicAnchors, (0, codegen_1._)`{}`); + }); + } + function topSchemaObjCode(it) { + const { schema: schema2, opts, gen } = it; + validateFunction(it, () => { + if (opts.$comment && schema2.$comment) + commentKeyword(it); + checkNoDefault(it); + gen.let(names_1.default.vErrors, null); + gen.let(names_1.default.errors, 0); + if (opts.unevaluated) + resetEvaluated(it); + typeAndKeywords(it); + returnResults(it); + }); + return; + } + function resetEvaluated(it) { + const { gen, validateName } = it; + it.evaluated = gen.const("evaluated", (0, codegen_1._)`${validateName}.evaluated`); + gen.if((0, codegen_1._)`${it.evaluated}.dynamicProps`, () => gen.assign((0, codegen_1._)`${it.evaluated}.props`, (0, codegen_1._)`undefined`)); + gen.if((0, codegen_1._)`${it.evaluated}.dynamicItems`, () => gen.assign((0, codegen_1._)`${it.evaluated}.items`, (0, codegen_1._)`undefined`)); + } + function funcSourceUrl(schema2, opts) { + const schId = typeof schema2 == "object" && schema2[opts.schemaId]; + return schId && (opts.code.source || opts.code.process) ? (0, codegen_1._)`/*# sourceURL=${schId} */` : codegen_1.nil; + } + function subschemaCode(it, valid) { + if (isSchemaObj(it)) { + checkKeywords(it); + if (schemaCxtHasRules(it)) { + subSchemaObjCode(it, valid); + return; + } + } + (0, boolSchema_1.boolOrEmptySchema)(it, valid); + } + function schemaCxtHasRules({ schema: schema2, self: self2 }) { + if (typeof schema2 == "boolean") + return !schema2; + for (const key in schema2) + if (self2.RULES.all[key]) + return true; + return false; + } + function isSchemaObj(it) { + return typeof it.schema != "boolean"; + } + function subSchemaObjCode(it, valid) { + const { schema: schema2, gen, opts } = it; + if (opts.$comment && schema2.$comment) + commentKeyword(it); + updateContext(it); + checkAsyncSchema(it); + const errsCount = gen.const("_errs", names_1.default.errors); + typeAndKeywords(it, errsCount); + gen.var(valid, (0, codegen_1._)`${errsCount} === ${names_1.default.errors}`); + } + function checkKeywords(it) { + (0, util_1.checkUnknownRules)(it); + checkRefsAndKeywords(it); + } + function typeAndKeywords(it, errsCount) { + if (it.opts.jtd) + return schemaKeywords(it, [], false, errsCount); + const types = (0, dataType_1.getSchemaTypes)(it.schema); + const checkedTypes = (0, dataType_1.coerceAndCheckDataType)(it, types); + schemaKeywords(it, types, !checkedTypes, errsCount); + } + function checkRefsAndKeywords(it) { + const { schema: schema2, errSchemaPath, opts, self: self2 } = it; + if (schema2.$ref && opts.ignoreKeywordsWithRef && (0, util_1.schemaHasRulesButRef)(schema2, self2.RULES)) { + self2.logger.warn(`$ref: keywords ignored in schema at path "${errSchemaPath}"`); + } + } + function checkNoDefault(it) { + const { schema: schema2, opts } = it; + if (schema2.default !== void 0 && opts.useDefaults && opts.strictSchema) { + (0, util_1.checkStrictMode)(it, "default is ignored in the schema root"); + } + } + function updateContext(it) { + const schId = it.schema[it.opts.schemaId]; + if (schId) + it.baseId = (0, resolve_1.resolveUrl)(it.opts.uriResolver, it.baseId, schId); + } + function checkAsyncSchema(it) { + if (it.schema.$async && !it.schemaEnv.$async) + throw new Error("async schema in sync schema"); + } + function commentKeyword({ gen, schemaEnv, schema: schema2, errSchemaPath, opts }) { + const msg = schema2.$comment; + if (opts.$comment === true) { + gen.code((0, codegen_1._)`${names_1.default.self}.logger.log(${msg})`); + } else if (typeof opts.$comment == "function") { + const schemaPath = (0, codegen_1.str)`${errSchemaPath}/$comment`; + const rootName = gen.scopeValue("root", { ref: schemaEnv.root }); + gen.code((0, codegen_1._)`${names_1.default.self}.opts.$comment(${msg}, ${schemaPath}, ${rootName}.schema)`); + } + } + function returnResults(it) { + const { gen, schemaEnv, validateName, ValidationError, opts } = it; + if (schemaEnv.$async) { + gen.if((0, codegen_1._)`${names_1.default.errors} === 0`, () => gen.return(names_1.default.data), () => gen.throw((0, codegen_1._)`new ${ValidationError}(${names_1.default.vErrors})`)); + } else { + gen.assign((0, codegen_1._)`${validateName}.errors`, names_1.default.vErrors); + if (opts.unevaluated) + assignEvaluated(it); + gen.return((0, codegen_1._)`${names_1.default.errors} === 0`); + } + } + function assignEvaluated({ gen, evaluated, props, items }) { + if (props instanceof codegen_1.Name) + gen.assign((0, codegen_1._)`${evaluated}.props`, props); + if (items instanceof codegen_1.Name) + gen.assign((0, codegen_1._)`${evaluated}.items`, items); + } + function schemaKeywords(it, types, typeErrors, errsCount) { + const { gen, schema: schema2, data, allErrors, opts, self: self2 } = it; + const { RULES } = self2; + if (schema2.$ref && (opts.ignoreKeywordsWithRef || !(0, util_1.schemaHasRulesButRef)(schema2, RULES))) { + gen.block(() => keywordCode(it, "$ref", RULES.all.$ref.definition)); + return; + } + if (!opts.jtd) + checkStrictTypes(it, types); + gen.block(() => { + for (const group2 of RULES.rules) + groupKeywords(group2); + groupKeywords(RULES.post); + }); + function groupKeywords(group2) { + if (!(0, applicability_1.shouldUseGroup)(schema2, group2)) + return; + if (group2.type) { + gen.if((0, dataType_2.checkDataType)(group2.type, data, opts.strictNumbers)); + iterateKeywords(it, group2); + if (types.length === 1 && types[0] === group2.type && typeErrors) { + gen.else(); + (0, dataType_2.reportTypeError)(it); + } + gen.endIf(); + } else { + iterateKeywords(it, group2); + } + if (!allErrors) + gen.if((0, codegen_1._)`${names_1.default.errors} === ${errsCount || 0}`); + } + } + function iterateKeywords(it, group2) { + const { gen, schema: schema2, opts: { useDefaults } } = it; + if (useDefaults) + (0, defaults_1.assignDefaults)(it, group2.type); + gen.block(() => { + for (const rule of group2.rules) { + if ((0, applicability_1.shouldUseRule)(schema2, rule)) { + keywordCode(it, rule.keyword, rule.definition, group2.type); + } + } + }); + } + function checkStrictTypes(it, types) { + if (it.schemaEnv.meta || !it.opts.strictTypes) + return; + checkContextTypes(it, types); + if (!it.opts.allowUnionTypes) + checkMultipleTypes(it, types); + checkKeywordTypes(it, it.dataTypes); + } + function checkContextTypes(it, types) { + if (!types.length) + return; + if (!it.dataTypes.length) { + it.dataTypes = types; + return; + } + types.forEach((t) => { + if (!includesType(it.dataTypes, t)) { + strictTypesError(it, `type "${t}" not allowed by context "${it.dataTypes.join(",")}"`); + } + }); + narrowSchemaTypes(it, types); + } + function checkMultipleTypes(it, ts) { + if (ts.length > 1 && !(ts.length === 2 && ts.includes("null"))) { + strictTypesError(it, "use allowUnionTypes to allow union type keyword"); + } + } + function checkKeywordTypes(it, ts) { + const rules = it.self.RULES.all; + for (const keyword in rules) { + const rule = rules[keyword]; + if (typeof rule == "object" && (0, applicability_1.shouldUseRule)(it.schema, rule)) { + const { type: type2 } = rule.definition; + if (type2.length && !type2.some((t) => hasApplicableType(ts, t))) { + strictTypesError(it, `missing type "${type2.join(",")}" for keyword "${keyword}"`); + } + } + } + } + function hasApplicableType(schTs, kwdT) { + return schTs.includes(kwdT) || kwdT === "number" && schTs.includes("integer"); + } + function includesType(ts, t) { + return ts.includes(t) || t === "integer" && ts.includes("number"); + } + function narrowSchemaTypes(it, withTypes) { + const ts = []; + for (const t of it.dataTypes) { + if (includesType(withTypes, t)) + ts.push(t); + else if (withTypes.includes("integer") && t === "number") + ts.push("integer"); + } + it.dataTypes = ts; + } + function strictTypesError(it, msg) { + const schemaPath = it.schemaEnv.baseId + it.errSchemaPath; + msg += ` at "${schemaPath}" (strictTypes)`; + (0, util_1.checkStrictMode)(it, msg, it.opts.strictTypes); + } + class KeywordCxt { + constructor(it, def, keyword) { + (0, keyword_1.validateKeywordUsage)(it, def, keyword); + this.gen = it.gen; + this.allErrors = it.allErrors; + this.keyword = keyword; + this.data = it.data; + this.schema = it.schema[keyword]; + this.$data = def.$data && it.opts.$data && this.schema && this.schema.$data; + this.schemaValue = (0, util_1.schemaRefOrVal)(it, this.schema, keyword, this.$data); + this.schemaType = def.schemaType; + this.parentSchema = it.schema; + this.params = {}; + this.it = it; + this.def = def; + if (this.$data) { + this.schemaCode = it.gen.const("vSchema", getData(this.$data, it)); + } else { + this.schemaCode = this.schemaValue; + if (!(0, keyword_1.validSchemaType)(this.schema, def.schemaType, def.allowUndefined)) { + throw new Error(`${keyword} value must be ${JSON.stringify(def.schemaType)}`); + } + } + if ("code" in def ? def.trackErrors : def.errors !== false) { + this.errsCount = it.gen.const("_errs", names_1.default.errors); + } + } + result(condition, successAction, failAction) { + this.failResult((0, codegen_1.not)(condition), successAction, failAction); + } + failResult(condition, successAction, failAction) { + this.gen.if(condition); + if (failAction) + failAction(); + else + this.error(); + if (successAction) { + this.gen.else(); + successAction(); + if (this.allErrors) + this.gen.endIf(); + } else { + if (this.allErrors) + this.gen.endIf(); + else + this.gen.else(); + } + } + pass(condition, failAction) { + this.failResult((0, codegen_1.not)(condition), void 0, failAction); + } + fail(condition) { + if (condition === void 0) { + this.error(); + if (!this.allErrors) + this.gen.if(false); + return; + } + this.gen.if(condition); + this.error(); + if (this.allErrors) + this.gen.endIf(); + else + this.gen.else(); + } + fail$data(condition) { + if (!this.$data) + return this.fail(condition); + const { schemaCode } = this; + this.fail((0, codegen_1._)`${schemaCode} !== undefined && (${(0, codegen_1.or)(this.invalid$data(), condition)})`); + } + error(append3, errorParams, errorPaths) { + if (errorParams) { + this.setParams(errorParams); + this._error(append3, errorPaths); + this.setParams({}); + return; + } + this._error(append3, errorPaths); + } + _error(append3, errorPaths) { + (append3 ? errors_1.reportExtraError : errors_1.reportError)(this, this.def.error, errorPaths); + } + $dataError() { + (0, errors_1.reportError)(this, this.def.$dataError || errors_1.keyword$DataError); + } + reset() { + if (this.errsCount === void 0) + throw new Error('add "trackErrors" to keyword definition'); + (0, errors_1.resetErrorsCount)(this.gen, this.errsCount); + } + ok(cond) { + if (!this.allErrors) + this.gen.if(cond); + } + setParams(obj, assign) { + if (assign) + Object.assign(this.params, obj); + else + this.params = obj; + } + block$data(valid, codeBlock, $dataValid = codegen_1.nil) { + this.gen.block(() => { + this.check$data(valid, $dataValid); + codeBlock(); + }); + } + check$data(valid = codegen_1.nil, $dataValid = codegen_1.nil) { + if (!this.$data) + return; + const { gen, schemaCode, schemaType, def } = this; + gen.if((0, codegen_1.or)((0, codegen_1._)`${schemaCode} === undefined`, $dataValid)); + if (valid !== codegen_1.nil) + gen.assign(valid, true); + if (schemaType.length || def.validateSchema) { + gen.elseIf(this.invalid$data()); + this.$dataError(); + if (valid !== codegen_1.nil) + gen.assign(valid, false); + } + gen.else(); + } + invalid$data() { + const { gen, schemaCode, schemaType, def, it } = this; + return (0, codegen_1.or)(wrong$DataType(), invalid$DataSchema()); + function wrong$DataType() { + if (schemaType.length) { + if (!(schemaCode instanceof codegen_1.Name)) + throw new Error("ajv implementation error"); + const st = Array.isArray(schemaType) ? schemaType : [schemaType]; + return (0, codegen_1._)`${(0, dataType_2.checkDataTypes)(st, schemaCode, it.opts.strictNumbers, dataType_2.DataType.Wrong)}`; + } + return codegen_1.nil; + } + function invalid$DataSchema() { + if (def.validateSchema) { + const validateSchemaRef = gen.scopeValue("validate$data", { ref: def.validateSchema }); + return (0, codegen_1._)`!${validateSchemaRef}(${schemaCode})`; + } + return codegen_1.nil; + } + } + subschema(appl, valid) { + const subschema = (0, subschema_1.getSubschema)(this.it, appl); + (0, subschema_1.extendSubschemaData)(subschema, this.it, appl); + (0, subschema_1.extendSubschemaMode)(subschema, appl); + const nextContext = { ...this.it, ...subschema, items: void 0, props: void 0 }; + subschemaCode(nextContext, valid); + return nextContext; + } + mergeEvaluated(schemaCxt, toName) { + const { it, gen } = this; + if (!it.opts.unevaluated) + return; + if (it.props !== true && schemaCxt.props !== void 0) { + it.props = util_1.mergeEvaluated.props(gen, schemaCxt.props, it.props, toName); + } + if (it.items !== true && schemaCxt.items !== void 0) { + it.items = util_1.mergeEvaluated.items(gen, schemaCxt.items, it.items, toName); + } + } + mergeValidEvaluated(schemaCxt, valid) { + const { it, gen } = this; + if (it.opts.unevaluated && (it.props !== true || it.items !== true)) { + gen.if(valid, () => this.mergeEvaluated(schemaCxt, codegen_1.Name)); + return true; + } + } + } + exports.KeywordCxt = KeywordCxt; + function keywordCode(it, keyword, def, ruleType) { + const cxt = new KeywordCxt(it, def, keyword); + if ("code" in def) { + def.code(cxt, ruleType); + } else if (cxt.$data && def.validate) { + (0, keyword_1.funcKeywordCode)(cxt, def); + } else if ("macro" in def) { + (0, keyword_1.macroKeywordCode)(cxt, def); + } else if (def.compile || def.validate) { + (0, keyword_1.funcKeywordCode)(cxt, def); + } + } + var JSON_POINTER = /^\/(?:[^~]|~0|~1)*$/; + var RELATIVE_JSON_POINTER = /^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/; + function getData($data, { dataLevel, dataNames, dataPathArr }) { + let jsonPointer; + let data; + if ($data === "") + return names_1.default.rootData; + if ($data[0] === "/") { + if (!JSON_POINTER.test($data)) + throw new Error(`Invalid JSON-pointer: ${$data}`); + jsonPointer = $data; + data = names_1.default.rootData; + } else { + const matches = RELATIVE_JSON_POINTER.exec($data); + if (!matches) + throw new Error(`Invalid JSON-pointer: ${$data}`); + const up = +matches[1]; + jsonPointer = matches[2]; + if (jsonPointer === "#") { + if (up >= dataLevel) + throw new Error(errorMsg("property/index", up)); + return dataPathArr[dataLevel - up]; + } + if (up > dataLevel) + throw new Error(errorMsg("data", up)); + data = dataNames[dataLevel - up]; + if (!jsonPointer) + return data; + } + let expr = data; + const segments = jsonPointer.split("/"); + for (const segment of segments) { + if (segment) { + data = (0, codegen_1._)`${data}${(0, codegen_1.getProperty)((0, util_1.unescapeJsonPointer)(segment))}`; + expr = (0, codegen_1._)`${expr} && ${data}`; + } + } + return expr; + function errorMsg(pointerType, up) { + return `Cannot access ${pointerType} ${up} levels up, current level is ${dataLevel}`; + } + } + exports.getData = getData; +}); +var require_validation_error = __commonJS2((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + class ValidationError extends Error { + constructor(errors3) { + super("validation failed"); + this.errors = errors3; + this.ajv = this.validation = true; + } + } + exports.default = ValidationError; +}); +var require_ref_error = __commonJS2((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + var resolve_1 = require_resolve(); + class MissingRefError extends Error { + constructor(resolver, baseId, ref, msg) { + super(msg || `can't resolve reference ${ref} from id ${baseId}`); + this.missingRef = (0, resolve_1.resolveUrl)(resolver, baseId, ref); + this.missingSchema = (0, resolve_1.normalizeId)((0, resolve_1.getFullPath)(resolver, this.missingRef)); + } + } + exports.default = MissingRefError; +}); +var require_compile = __commonJS2((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.resolveSchema = exports.getCompilingSchema = exports.resolveRef = exports.compileSchema = exports.SchemaEnv = void 0; + var codegen_1 = require_codegen(); + var validation_error_1 = require_validation_error(); + var names_1 = require_names(); + var resolve_1 = require_resolve(); + var util_1 = require_util8(); + var validate_1 = require_validate(); + class SchemaEnv { + constructor(env3) { + var _a2; + this.refs = {}; + this.dynamicAnchors = {}; + let schema2; + if (typeof env3.schema == "object") + schema2 = env3.schema; + this.schema = env3.schema; + this.schemaId = env3.schemaId; + this.root = env3.root || this; + this.baseId = (_a2 = env3.baseId) !== null && _a2 !== void 0 ? _a2 : (0, resolve_1.normalizeId)(schema2 === null || schema2 === void 0 ? void 0 : schema2[env3.schemaId || "$id"]); + this.schemaPath = env3.schemaPath; + this.localRefs = env3.localRefs; + this.meta = env3.meta; + this.$async = schema2 === null || schema2 === void 0 ? void 0 : schema2.$async; + this.refs = {}; + } + } + exports.SchemaEnv = SchemaEnv; + function compileSchema(sch) { + const _sch = getCompilingSchema.call(this, sch); + if (_sch) + return _sch; + const rootId = (0, resolve_1.getFullPath)(this.opts.uriResolver, sch.root.baseId); + const { es5, lines } = this.opts.code; + const { ownProperties } = this.opts; + const gen = new codegen_1.CodeGen(this.scope, { es5, lines, ownProperties }); + let _ValidationError; + if (sch.$async) { + _ValidationError = gen.scopeValue("Error", { + ref: validation_error_1.default, + code: (0, codegen_1._)`require("ajv/dist/runtime/validation_error").default` + }); + } + const validateName = gen.scopeName("validate"); + sch.validateName = validateName; + const schemaCxt = { + gen, + allErrors: this.opts.allErrors, + data: names_1.default.data, + parentData: names_1.default.parentData, + parentDataProperty: names_1.default.parentDataProperty, + dataNames: [names_1.default.data], + dataPathArr: [codegen_1.nil], + dataLevel: 0, + dataTypes: [], + definedProperties: /* @__PURE__ */ new Set(), + topSchemaRef: gen.scopeValue("schema", this.opts.code.source === true ? { ref: sch.schema, code: (0, codegen_1.stringify)(sch.schema) } : { ref: sch.schema }), + validateName, + ValidationError: _ValidationError, + schema: sch.schema, + schemaEnv: sch, + rootId, + baseId: sch.baseId || rootId, + schemaPath: codegen_1.nil, + errSchemaPath: sch.schemaPath || (this.opts.jtd ? "" : "#"), + errorPath: (0, codegen_1._)`""`, + opts: this.opts, + self: this }; - return { index, compiling: false }; - } - function endCompiling(schema2, root2, baseId) { - var i = compIndex.call(this, schema2, root2, baseId); - if (i >= 0) - this._compilations.splice(i, 1); - } - function compIndex(schema2, root2, baseId) { - for (var i = 0; i < this._compilations.length; i++) { - var c = this._compilations[i]; - if (c.schema == schema2 && c.root == root2 && c.baseId == baseId) - return i; - } - return -1; - } - function patternCode(i, patterns) { - return "var pattern" + i + " = new RegExp(" + util3.toQuotedString(patterns[i]) + ");"; - } - function defaultCode(i) { - return "var default" + i + " = defaults[" + i + "];"; - } - function refValCode(i, refVal) { - return refVal[i] === void 0 ? "" : "var refVal" + i + " = refVal[" + i + "];"; - } - function customRuleCode(i) { - return "var customRule" + i + " = customRules[" + i + "];"; - } - function vars(arr, statement) { - if (!arr.length) - return ""; - var code = ""; - for (var i = 0; i < arr.length; i++) - code += statement(i, arr); - return code; - } -}); -var require_cache2 = __commonJS2((exports, module) => { - var Cache = module.exports = function Cache2() { - this._cache = {}; - }; - Cache.prototype.put = function Cache_put(key, value2) { - this._cache[key] = value2; - }; - Cache.prototype.get = function Cache_get(key) { - return this._cache[key]; - }; - Cache.prototype.del = function Cache_del(key) { - delete this._cache[key]; - }; - Cache.prototype.clear = function Cache_clear() { - this._cache = {}; - }; -}); -var require_formats = __commonJS2((exports, module) => { - var util3 = require_util8(); - var DATE = /^(\d\d\d\d)-(\d\d)-(\d\d)$/; - var DAYS = [0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; - var TIME = /^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i; - var HOSTNAME = /^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-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|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i; - var URITEMPLATE = /^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i; - var URL2 = /^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i; - var UUID = /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i; - var JSON_POINTER = /^(?:\/(?:[^~/]|~0|~1)*)*$/; - var JSON_POINTER_URI_FRAGMENT = /^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i; - var RELATIVE_JSON_POINTER = /^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/; - module.exports = formats; - function formats(mode) { - mode = mode == "full" ? "full" : "fast"; - return util3.copy(formats[mode]); - } - formats.fast = { - date: /^\d\d\d\d-[0-1]\d-[0-3]\d$/, - time: /^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i, - "date-time": /^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i, - uri: /^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i, - "uri-reference": /^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i, - "uri-template": URITEMPLATE, - url: URL2, - email: /^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i, - hostname: HOSTNAME, - ipv4: /^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/, - ipv6: /^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i, - regex: regex4, - uuid: UUID, - "json-pointer": JSON_POINTER, - "json-pointer-uri-fragment": JSON_POINTER_URI_FRAGMENT, - "relative-json-pointer": RELATIVE_JSON_POINTER - }; - formats.full = { - date: date2, - time: time2, - "date-time": date_time, - uri, - "uri-reference": URIREF, - "uri-template": URITEMPLATE, - url: URL2, - email: /^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-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\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i, - regex: regex4, - uuid: UUID, - "json-pointer": JSON_POINTER, - "json-pointer-uri-fragment": JSON_POINTER_URI_FRAGMENT, - "relative-json-pointer": RELATIVE_JSON_POINTER - }; - function isLeapYear(year) { - return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0); - } - function date2(str) { - var matches = str.match(DATE); - if (!matches) - return false; - var year = +matches[1]; - var month = +matches[2]; - var day = +matches[3]; - return month >= 1 && month <= 12 && day >= 1 && day <= (month == 2 && isLeapYear(year) ? 29 : DAYS[month]); - } - function time2(str, full) { - var matches = str.match(TIME); - if (!matches) - return false; - var hour = matches[1]; - var minute = matches[2]; - var second = matches[3]; - var timeZone = matches[5]; - return (hour <= 23 && minute <= 59 && second <= 59 || hour == 23 && minute == 59 && second == 60) && (!full || timeZone); - } - 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); - } - var NOT_URI_FRAGMENT = /\/|:/; - function uri(str) { - return NOT_URI_FRAGMENT.test(str) && URI.test(str); - } - var Z_ANCHOR = /[^\\]\\Z/; - function regex4(str) { - if (Z_ANCHOR.test(str)) - return false; + let sourceCode; try { - new RegExp(str); - return true; + this._compilations.add(sch); + (0, validate_1.validateFunctionCode)(schemaCxt); + gen.optimize(this.opts.code.optimize); + const validateCode = gen.toString(); + sourceCode = `${gen.scopeRefs(names_1.default.scope)}return ${validateCode}`; + if (this.opts.code.process) + sourceCode = this.opts.code.process(sourceCode, sch); + const makeValidate = new Function(`${names_1.default.self}`, `${names_1.default.scope}`, sourceCode); + const validate2 = makeValidate(this, this.scope.get()); + this.scope.value(validateName, { ref: validate2 }); + validate2.errors = null; + validate2.schema = sch.schema; + validate2.schemaEnv = sch; + if (sch.$async) + validate2.$async = true; + if (this.opts.code.source === true) { + validate2.source = { validateName, validateCode, scopeValues: gen._values }; + } + if (this.opts.unevaluated) { + const { props, items } = schemaCxt; + validate2.evaluated = { + props: props instanceof codegen_1.Name ? void 0 : props, + items: items instanceof codegen_1.Name ? void 0 : items, + dynamicProps: props instanceof codegen_1.Name, + dynamicItems: items instanceof codegen_1.Name + }; + if (validate2.source) + validate2.source.evaluated = (0, codegen_1.stringify)(validate2.evaluated); + } + sch.validate = validate2; + return sch; } catch (e) { - return false; + delete sch.validate; + delete sch.validateName; + if (sourceCode) + this.logger.error("Error compiling schema, function code:", sourceCode); + throw e; + } finally { + this._compilations.delete(sch); } } -}); -var require_ref = __commonJS2((exports, module) => { - module.exports = function generate_ref(it, $keyword, $ruleType) { - var out = " "; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $errSchemaPath = it.errSchemaPath + "/" + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = "data" + ($dataLvl || ""); - var $valid = "valid" + $lvl; - var $async, $refCode; - if ($schema == "#" || $schema == "#/") { - if (it.isRoot) { - $async = it.async; - $refCode = "validate"; - } else { - $async = it.root.schema.$async === true; - $refCode = "root.refVal[0]"; - } - } else { - var $refVal = it.resolveRef(it.baseId, $schema, it.isRoot); - if ($refVal === void 0) { - var $message = it.MissingRefError.message(it.baseId, $schema); - if (it.opts.missingRefs == "fail") { - it.logger.error($message); - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ""; - if (it.createErrors !== false) { - out += " { keyword: '$ref' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { ref: '" + it.util.escapeQuotes($schema) + "' } "; - if (it.opts.messages !== false) { - out += " , message: 'can\\'t resolve reference " + it.util.escapeQuotes($schema) + "' "; - } - if (it.opts.verbose) { - out += " , schema: " + it.util.toQuotedString($schema) + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; - } - out += " } "; - } else { - out += " {} "; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - if (it.async) { - out += " throw new ValidationError([" + __err + "]); "; - } else { - out += " validate.errors = [" + __err + "]; return false; "; - } - } else { - out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; - } - if ($breakOnError) { - out += " if (false) { "; - } - } else if (it.opts.missingRefs == "ignore") { - it.logger.warn($message); - if ($breakOnError) { - out += " if (true) { "; - } - } else { - throw new it.MissingRefError(it.baseId, $schema, $message); - } - } else if ($refVal.inline) { - var $it = it.util.copy(it); - $it.level++; - var $nextValid = "valid" + $it.level; - $it.schema = $refVal.schema; - $it.schemaPath = ""; - $it.errSchemaPath = $schema; - var $code = it.validate($it).replace(/validate\.schema/g, $refVal.code); - out += " " + $code + " "; - if ($breakOnError) { - out += " if (" + $nextValid + ") { "; - } - } else { - $async = $refVal.$async === true || it.async && $refVal.$async !== false; - $refCode = $refVal.code; - } - } - if ($refCode) { - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ""; - if (it.opts.passContext) { - out += " " + $refCode + ".call(this, "; - } else { - out += " " + $refCode + "( "; - } - out += " " + $data + ", (dataPath || '')"; - if (it.errorPath != '""') { - out += " + " + it.errorPath; - } - var $parentData = $dataLvl ? "data" + ($dataLvl - 1 || "") : "parentData", $parentDataProperty = $dataLvl ? it.dataPathArr[$dataLvl] : "parentDataProperty"; - out += " , " + $parentData + " , " + $parentDataProperty + ", rootData) "; - var __callValidate = out; - out = $$outStack.pop(); - if ($async) { - if (!it.async) - throw new Error("async schema referenced by sync schema"); - if ($breakOnError) { - out += " var " + $valid + "; "; - } - out += " try { await " + __callValidate + "; "; - if ($breakOnError) { - out += " " + $valid + " = true; "; - } - out += " } catch (e) { if (!(e instanceof ValidationError)) throw e; if (vErrors === null) vErrors = e.errors; else vErrors = vErrors.concat(e.errors); errors = vErrors.length; "; - if ($breakOnError) { - out += " " + $valid + " = false; "; - } - out += " } "; - if ($breakOnError) { - out += " if (" + $valid + ") { "; - } - } else { - out += " if (!" + __callValidate + ") { if (vErrors === null) vErrors = " + $refCode + ".errors; else vErrors = vErrors.concat(" + $refCode + ".errors); errors = vErrors.length; } "; - if ($breakOnError) { - out += " else { "; - } - } - } - return out; - }; -}); -var require_allOf = __commonJS2((exports, module) => { - module.exports = function generate_allOf(it, $keyword, $ruleType) { - var out = " "; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + "/" + $keyword; - var $breakOnError = !it.opts.allErrors; - var $it = it.util.copy(it); - var $closingBraces = ""; - $it.level++; - var $nextValid = "valid" + $it.level; - var $currentBaseId = $it.baseId, $allSchemasEmpty = true; - var arr1 = $schema; - if (arr1) { - var $sch, $i = -1, l1 = arr1.length - 1; - while ($i < l1) { - $sch = arr1[$i += 1]; - if (it.opts.strictKeywords ? typeof $sch == "object" && Object.keys($sch).length > 0 || $sch === false : it.util.schemaHasRules($sch, it.RULES.all)) { - $allSchemasEmpty = false; - $it.schema = $sch; - $it.schemaPath = $schemaPath + "[" + $i + "]"; - $it.errSchemaPath = $errSchemaPath + "/" + $i; - out += " " + it.validate($it) + " "; - $it.baseId = $currentBaseId; - if ($breakOnError) { - out += " if (" + $nextValid + ") { "; - $closingBraces += "}"; - } - } - } - } - if ($breakOnError) { - if ($allSchemasEmpty) { - out += " if (true) { "; - } else { - out += " " + $closingBraces.slice(0, -1) + " "; - } - } - return out; - }; -}); -var require_anyOf = __commonJS2((exports, module) => { - module.exports = function generate_anyOf(it, $keyword, $ruleType) { - var out = " "; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + "/" + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = "data" + ($dataLvl || ""); - var $valid = "valid" + $lvl; - var $errs = "errs__" + $lvl; - var $it = it.util.copy(it); - var $closingBraces = ""; - $it.level++; - var $nextValid = "valid" + $it.level; - var $noEmptySchema = $schema.every(function($sch2) { - return it.opts.strictKeywords ? typeof $sch2 == "object" && Object.keys($sch2).length > 0 || $sch2 === false : it.util.schemaHasRules($sch2, it.RULES.all); - }); - if ($noEmptySchema) { - var $currentBaseId = $it.baseId; - out += " var " + $errs + " = errors; var " + $valid + " = false; "; - var $wasComposite = it.compositeRule; - it.compositeRule = $it.compositeRule = true; - var arr1 = $schema; - if (arr1) { - var $sch, $i = -1, l1 = arr1.length - 1; - while ($i < l1) { - $sch = arr1[$i += 1]; - $it.schema = $sch; - $it.schemaPath = $schemaPath + "[" + $i + "]"; - $it.errSchemaPath = $errSchemaPath + "/" + $i; - out += " " + it.validate($it) + " "; - $it.baseId = $currentBaseId; - out += " " + $valid + " = " + $valid + " || " + $nextValid + "; if (!" + $valid + ") { "; - $closingBraces += "}"; - } - } - it.compositeRule = $it.compositeRule = $wasComposite; - out += " " + $closingBraces + " if (!" + $valid + ") { var err = "; - if (it.createErrors !== false) { - out += " { keyword: 'anyOf' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: {} "; - if (it.opts.messages !== false) { - out += " , message: 'should match some schema in anyOf' "; - } - if (it.opts.verbose) { - out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; - } - out += " } "; - } else { - out += " {} "; - } - out += "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; - if (!it.compositeRule && $breakOnError) { - if (it.async) { - out += " throw new ValidationError(vErrors); "; - } else { - out += " validate.errors = vErrors; return false; "; - } - } - out += " } else { errors = " + $errs + "; if (vErrors !== null) { if (" + $errs + ") vErrors.length = " + $errs + "; else vErrors = null; } "; - if (it.opts.allErrors) { - out += " } "; - } - } else { - if ($breakOnError) { - out += " if (true) { "; - } - } - return out; - }; -}); -var require_comment = __commonJS2((exports, module) => { - module.exports = function generate_comment(it, $keyword, $ruleType) { - var out = " "; - var $schema = it.schema[$keyword]; - var $errSchemaPath = it.errSchemaPath + "/" + $keyword; - var $breakOnError = !it.opts.allErrors; - var $comment = it.util.toQuotedString($schema); - if (it.opts.$comment === true) { - out += " console.log(" + $comment + ");"; - } else if (typeof it.opts.$comment == "function") { - out += " self._opts.$comment(" + $comment + ", " + it.util.toQuotedString($errSchemaPath) + ", validate.root.schema);"; - } - return out; - }; -}); -var require_const = __commonJS2((exports, module) => { - module.exports = function generate_const(it, $keyword, $ruleType) { - var out = " "; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + "/" + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = "data" + ($dataLvl || ""); - var $valid = "valid" + $lvl; - var $isData = it.opts.$data && $schema && $schema.$data, $schemaValue; - if ($isData) { - out += " var schema" + $lvl + " = " + it.util.getData($schema.$data, $dataLvl, it.dataPathArr) + "; "; - $schemaValue = "schema" + $lvl; - } else { - $schemaValue = $schema; - } - if (!$isData) { - out += " var schema" + $lvl + " = validate.schema" + $schemaPath + ";"; - } - out += "var " + $valid + " = equal(" + $data + ", schema" + $lvl + "); if (!" + $valid + ") { "; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ""; - if (it.createErrors !== false) { - out += " { keyword: 'const' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { allowedValue: schema" + $lvl + " } "; - if (it.opts.messages !== false) { - out += " , message: 'should be equal to constant' "; - } - if (it.opts.verbose) { - out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; - } - out += " } "; - } else { - out += " {} "; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - if (it.async) { - out += " throw new ValidationError([" + __err + "]); "; - } else { - out += " validate.errors = [" + __err + "]; return false; "; - } - } else { - out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; - } - out += " }"; - if ($breakOnError) { - out += " else { "; - } - return out; - }; -}); -var require_contains = __commonJS2((exports, module) => { - module.exports = function generate_contains(it, $keyword, $ruleType) { - var out = " "; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + "/" + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = "data" + ($dataLvl || ""); - var $valid = "valid" + $lvl; - var $errs = "errs__" + $lvl; - var $it = it.util.copy(it); - var $closingBraces = ""; - $it.level++; - var $nextValid = "valid" + $it.level; - var $idx = "i" + $lvl, $dataNxt = $it.dataLevel = it.dataLevel + 1, $nextData = "data" + $dataNxt, $currentBaseId = it.baseId, $nonEmptySchema = it.opts.strictKeywords ? typeof $schema == "object" && Object.keys($schema).length > 0 || $schema === false : it.util.schemaHasRules($schema, it.RULES.all); - out += "var " + $errs + " = errors;var " + $valid + ";"; - if ($nonEmptySchema) { - var $wasComposite = it.compositeRule; - it.compositeRule = $it.compositeRule = true; - $it.schema = $schema; - $it.schemaPath = $schemaPath; - $it.errSchemaPath = $errSchemaPath; - out += " var " + $nextValid + " = false; for (var " + $idx + " = 0; " + $idx + " < " + $data + ".length; " + $idx + "++) { "; - $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true); - var $passData = $data + "[" + $idx + "]"; - $it.dataPathArr[$dataNxt] = $idx; - var $code = it.validate($it); - $it.baseId = $currentBaseId; - if (it.util.varOccurences($code, $nextData) < 2) { - out += " " + it.util.varReplace($code, $nextData, $passData) + " "; - } else { - out += " var " + $nextData + " = " + $passData + "; " + $code + " "; - } - out += " if (" + $nextValid + ") break; } "; - it.compositeRule = $it.compositeRule = $wasComposite; - out += " " + $closingBraces + " if (!" + $nextValid + ") {"; - } else { - out += " if (" + $data + ".length == 0) {"; - } - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ""; - if (it.createErrors !== false) { - out += " { keyword: 'contains' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: {} "; - if (it.opts.messages !== false) { - out += " , message: 'should contain a valid item' "; - } - if (it.opts.verbose) { - out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; - } - out += " } "; - } else { - out += " {} "; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - if (it.async) { - out += " throw new ValidationError([" + __err + "]); "; - } else { - out += " validate.errors = [" + __err + "]; return false; "; - } - } else { - out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; - } - out += " } else { "; - if ($nonEmptySchema) { - out += " errors = " + $errs + "; if (vErrors !== null) { if (" + $errs + ") vErrors.length = " + $errs + "; else vErrors = null; } "; - } - if (it.opts.allErrors) { - out += " } "; - } - return out; - }; -}); -var require_dependencies = __commonJS2((exports, module) => { - module.exports = function generate_dependencies(it, $keyword, $ruleType) { - var out = " "; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + "/" + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = "data" + ($dataLvl || ""); - var $errs = "errs__" + $lvl; - var $it = it.util.copy(it); - var $closingBraces = ""; - $it.level++; - var $nextValid = "valid" + $it.level; - var $schemaDeps = {}, $propertyDeps = {}, $ownProperties = it.opts.ownProperties; - for ($property in $schema) { - if ($property == "__proto__") - continue; - var $sch = $schema[$property]; - var $deps = Array.isArray($sch) ? $propertyDeps : $schemaDeps; - $deps[$property] = $sch; - } - out += "var " + $errs + " = errors;"; - var $currentErrorPath = it.errorPath; - out += "var missing" + $lvl + ";"; - for (var $property in $propertyDeps) { - $deps = $propertyDeps[$property]; - if ($deps.length) { - out += " if ( " + $data + it.util.getProperty($property) + " !== undefined "; - if ($ownProperties) { - out += " && Object.prototype.hasOwnProperty.call(" + $data + ", '" + it.util.escapeQuotes($property) + "') "; - } - if ($breakOnError) { - out += " && ( "; - var arr1 = $deps; - if (arr1) { - var $propertyKey, $i = -1, l1 = arr1.length - 1; - while ($i < l1) { - $propertyKey = arr1[$i += 1]; - if ($i) { - out += " || "; - } - var $prop = it.util.getProperty($propertyKey), $useData = $data + $prop; - out += " ( ( " + $useData + " === undefined "; - if ($ownProperties) { - out += " || ! Object.prototype.hasOwnProperty.call(" + $data + ", '" + it.util.escapeQuotes($propertyKey) + "') "; - } - out += ") && (missing" + $lvl + " = " + it.util.toQuotedString(it.opts.jsonPointers ? $propertyKey : $prop) + ") ) "; - } - } - out += ")) { "; - var $propertyPath = "missing" + $lvl, $missingProperty = "' + " + $propertyPath + " + '"; - if (it.opts._errorDataPathProperty) { - it.errorPath = it.opts.jsonPointers ? it.util.getPathExpr($currentErrorPath, $propertyPath, true) : $currentErrorPath + " + " + $propertyPath; - } - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ""; - if (it.createErrors !== false) { - out += " { keyword: 'dependencies' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { property: '" + it.util.escapeQuotes($property) + "', missingProperty: '" + $missingProperty + "', depsCount: " + $deps.length + ", deps: '" + it.util.escapeQuotes($deps.length == 1 ? $deps[0] : $deps.join(", ")) + "' } "; - if (it.opts.messages !== false) { - out += " , message: 'should have "; - if ($deps.length == 1) { - out += "property " + it.util.escapeQuotes($deps[0]); - } else { - out += "properties " + it.util.escapeQuotes($deps.join(", ")); - } - out += " when property " + it.util.escapeQuotes($property) + " is present' "; - } - if (it.opts.verbose) { - out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; - } - out += " } "; - } else { - out += " {} "; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - if (it.async) { - out += " throw new ValidationError([" + __err + "]); "; - } else { - out += " validate.errors = [" + __err + "]; return false; "; - } - } else { - out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; - } - } else { - out += " ) { "; - var arr2 = $deps; - if (arr2) { - var $propertyKey, i2 = -1, l2 = arr2.length - 1; - while (i2 < l2) { - $propertyKey = arr2[i2 += 1]; - var $prop = it.util.getProperty($propertyKey), $missingProperty = it.util.escapeQuotes($propertyKey), $useData = $data + $prop; - if (it.opts._errorDataPathProperty) { - it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers); - } - out += " if ( " + $useData + " === undefined "; - if ($ownProperties) { - out += " || ! Object.prototype.hasOwnProperty.call(" + $data + ", '" + it.util.escapeQuotes($propertyKey) + "') "; - } - out += ") { var err = "; - if (it.createErrors !== false) { - out += " { keyword: 'dependencies' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { property: '" + it.util.escapeQuotes($property) + "', missingProperty: '" + $missingProperty + "', depsCount: " + $deps.length + ", deps: '" + it.util.escapeQuotes($deps.length == 1 ? $deps[0] : $deps.join(", ")) + "' } "; - if (it.opts.messages !== false) { - out += " , message: 'should have "; - if ($deps.length == 1) { - out += "property " + it.util.escapeQuotes($deps[0]); - } else { - out += "properties " + it.util.escapeQuotes($deps.join(", ")); - } - out += " when property " + it.util.escapeQuotes($property) + " is present' "; - } - if (it.opts.verbose) { - out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; - } - out += " } "; - } else { - out += " {} "; - } - out += "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "; - } - } - } - out += " } "; - if ($breakOnError) { - $closingBraces += "}"; - out += " else { "; - } - } - } - it.errorPath = $currentErrorPath; - var $currentBaseId = $it.baseId; - for (var $property in $schemaDeps) { - var $sch = $schemaDeps[$property]; - if (it.opts.strictKeywords ? typeof $sch == "object" && Object.keys($sch).length > 0 || $sch === false : it.util.schemaHasRules($sch, it.RULES.all)) { - out += " " + $nextValid + " = true; if ( " + $data + it.util.getProperty($property) + " !== undefined "; - if ($ownProperties) { - out += " && Object.prototype.hasOwnProperty.call(" + $data + ", '" + it.util.escapeQuotes($property) + "') "; - } - out += ") { "; - $it.schema = $sch; - $it.schemaPath = $schemaPath + it.util.getProperty($property); - $it.errSchemaPath = $errSchemaPath + "/" + it.util.escapeFragment($property); - out += " " + it.validate($it) + " "; - $it.baseId = $currentBaseId; - out += " } "; - if ($breakOnError) { - out += " if (" + $nextValid + ") { "; - $closingBraces += "}"; - } - } - } - if ($breakOnError) { - out += " " + $closingBraces + " if (" + $errs + " == errors) {"; - } - return out; - }; -}); -var require_enum = __commonJS2((exports, module) => { - module.exports = function generate_enum(it, $keyword, $ruleType) { - var out = " "; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + "/" + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = "data" + ($dataLvl || ""); - var $valid = "valid" + $lvl; - var $isData = it.opts.$data && $schema && $schema.$data, $schemaValue; - if ($isData) { - out += " var schema" + $lvl + " = " + it.util.getData($schema.$data, $dataLvl, it.dataPathArr) + "; "; - $schemaValue = "schema" + $lvl; - } else { - $schemaValue = $schema; - } - var $i = "i" + $lvl, $vSchema = "schema" + $lvl; - if (!$isData) { - out += " var " + $vSchema + " = validate.schema" + $schemaPath + ";"; - } - out += "var " + $valid + ";"; - if ($isData) { - out += " if (schema" + $lvl + " === undefined) " + $valid + " = true; else if (!Array.isArray(schema" + $lvl + ")) " + $valid + " = false; else {"; - } - out += "" + $valid + " = false;for (var " + $i + "=0; " + $i + "<" + $vSchema + ".length; " + $i + "++) if (equal(" + $data + ", " + $vSchema + "[" + $i + "])) { " + $valid + " = true; break; }"; - if ($isData) { - out += " } "; - } - out += " if (!" + $valid + ") { "; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ""; - if (it.createErrors !== false) { - out += " { keyword: 'enum' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { allowedValues: schema" + $lvl + " } "; - if (it.opts.messages !== false) { - out += " , message: 'should be equal to one of the allowed values' "; - } - if (it.opts.verbose) { - out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; - } - out += " } "; - } else { - out += " {} "; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - if (it.async) { - out += " throw new ValidationError([" + __err + "]); "; - } else { - out += " validate.errors = [" + __err + "]; return false; "; - } - } else { - out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; - } - out += " }"; - if ($breakOnError) { - out += " else { "; - } - return out; - }; -}); -var require_format = __commonJS2((exports, module) => { - module.exports = function generate_format(it, $keyword, $ruleType) { - var out = " "; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + "/" + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = "data" + ($dataLvl || ""); - if (it.opts.format === false) { - if ($breakOnError) { - out += " if (true) { "; - } - return out; - } - var $isData = it.opts.$data && $schema && $schema.$data, $schemaValue; - if ($isData) { - out += " var schema" + $lvl + " = " + it.util.getData($schema.$data, $dataLvl, it.dataPathArr) + "; "; - $schemaValue = "schema" + $lvl; - } else { - $schemaValue = $schema; - } - var $unknownFormats = it.opts.unknownFormats, $allowUnknown = Array.isArray($unknownFormats); - if ($isData) { - var $format = "format" + $lvl, $isObject = "isObject" + $lvl, $formatType = "formatType" + $lvl; - out += " var " + $format + " = formats[" + $schemaValue + "]; var " + $isObject + " = typeof " + $format + " == 'object' && !(" + $format + " instanceof RegExp) && " + $format + ".validate; var " + $formatType + " = " + $isObject + " && " + $format + ".type || 'string'; if (" + $isObject + ") { "; - if (it.async) { - out += " var async" + $lvl + " = " + $format + ".async; "; - } - out += " " + $format + " = " + $format + ".validate; } if ( "; - if ($isData) { - out += " (" + $schemaValue + " !== undefined && typeof " + $schemaValue + " != 'string') || "; - } - out += " ("; - if ($unknownFormats != "ignore") { - out += " (" + $schemaValue + " && !" + $format + " "; - if ($allowUnknown) { - out += " && self._opts.unknownFormats.indexOf(" + $schemaValue + ") == -1 "; - } - out += ") || "; - } - out += " (" + $format + " && " + $formatType + " == '" + $ruleType + "' && !(typeof " + $format + " == 'function' ? "; - if (it.async) { - out += " (async" + $lvl + " ? await " + $format + "(" + $data + ") : " + $format + "(" + $data + ")) "; - } else { - out += " " + $format + "(" + $data + ") "; - } - out += " : " + $format + ".test(" + $data + "))))) {"; - } else { - var $format = it.formats[$schema]; - if (!$format) { - if ($unknownFormats == "ignore") { - it.logger.warn('unknown format "' + $schema + '" ignored in schema at path "' + it.errSchemaPath + '"'); - if ($breakOnError) { - out += " if (true) { "; - } - return out; - } else if ($allowUnknown && $unknownFormats.indexOf($schema) >= 0) { - if ($breakOnError) { - out += " if (true) { "; - } - return out; - } else { - throw new Error('unknown format "' + $schema + '" is used in schema at path "' + it.errSchemaPath + '"'); - } - } - var $isObject = typeof $format == "object" && !($format instanceof RegExp) && $format.validate; - var $formatType = $isObject && $format.type || "string"; - if ($isObject) { - var $async = $format.async === true; - $format = $format.validate; - } - if ($formatType != $ruleType) { - if ($breakOnError) { - out += " if (true) { "; - } - return out; - } - if ($async) { - if (!it.async) - throw new Error("async format in sync schema"); - var $formatRef = "formats" + it.util.getProperty($schema) + ".validate"; - out += " if (!(await " + $formatRef + "(" + $data + "))) { "; - } else { - out += " if (! "; - var $formatRef = "formats" + it.util.getProperty($schema); - if ($isObject) - $formatRef += ".validate"; - if (typeof $format == "function") { - out += " " + $formatRef + "(" + $data + ") "; - } else { - out += " " + $formatRef + ".test(" + $data + ") "; - } - out += ") { "; - } - } - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ""; - if (it.createErrors !== false) { - out += " { keyword: 'format' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { format: "; - if ($isData) { - out += "" + $schemaValue; - } else { - out += "" + it.util.toQuotedString($schema); - } - out += " } "; - if (it.opts.messages !== false) { - out += ` , message: 'should match format "`; - if ($isData) { - out += "' + " + $schemaValue + " + '"; - } else { - out += "" + it.util.escapeQuotes($schema); - } - out += `"' `; - } - if (it.opts.verbose) { - out += " , schema: "; - if ($isData) { - out += "validate.schema" + $schemaPath; - } else { - out += "" + it.util.toQuotedString($schema); - } - out += " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; - } - out += " } "; - } else { - out += " {} "; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - if (it.async) { - out += " throw new ValidationError([" + __err + "]); "; - } else { - out += " validate.errors = [" + __err + "]; return false; "; - } - } else { - out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; - } - out += " } "; - if ($breakOnError) { - out += " else { "; - } - return out; - }; -}); -var require_if = __commonJS2((exports, module) => { - module.exports = function generate_if(it, $keyword, $ruleType) { - var out = " "; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + "/" + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = "data" + ($dataLvl || ""); - var $valid = "valid" + $lvl; - var $errs = "errs__" + $lvl; - var $it = it.util.copy(it); - $it.level++; - var $nextValid = "valid" + $it.level; - var $thenSch = it.schema["then"], $elseSch = it.schema["else"], $thenPresent = $thenSch !== void 0 && (it.opts.strictKeywords ? typeof $thenSch == "object" && Object.keys($thenSch).length > 0 || $thenSch === false : it.util.schemaHasRules($thenSch, it.RULES.all)), $elsePresent = $elseSch !== void 0 && (it.opts.strictKeywords ? typeof $elseSch == "object" && Object.keys($elseSch).length > 0 || $elseSch === false : it.util.schemaHasRules($elseSch, it.RULES.all)), $currentBaseId = $it.baseId; - if ($thenPresent || $elsePresent) { - var $ifClause; - $it.createErrors = false; - $it.schema = $schema; - $it.schemaPath = $schemaPath; - $it.errSchemaPath = $errSchemaPath; - out += " var " + $errs + " = errors; var " + $valid + " = true; "; - var $wasComposite = it.compositeRule; - it.compositeRule = $it.compositeRule = true; - out += " " + it.validate($it) + " "; - $it.baseId = $currentBaseId; - $it.createErrors = true; - out += " errors = " + $errs + "; if (vErrors !== null) { if (" + $errs + ") vErrors.length = " + $errs + "; else vErrors = null; } "; - it.compositeRule = $it.compositeRule = $wasComposite; - if ($thenPresent) { - out += " if (" + $nextValid + ") { "; - $it.schema = it.schema["then"]; - $it.schemaPath = it.schemaPath + ".then"; - $it.errSchemaPath = it.errSchemaPath + "/then"; - out += " " + it.validate($it) + " "; - $it.baseId = $currentBaseId; - out += " " + $valid + " = " + $nextValid + "; "; - if ($thenPresent && $elsePresent) { - $ifClause = "ifClause" + $lvl; - out += " var " + $ifClause + " = 'then'; "; - } else { - $ifClause = "'then'"; - } - out += " } "; - if ($elsePresent) { - out += " else { "; - } - } else { - out += " if (!" + $nextValid + ") { "; - } - if ($elsePresent) { - $it.schema = it.schema["else"]; - $it.schemaPath = it.schemaPath + ".else"; - $it.errSchemaPath = it.errSchemaPath + "/else"; - out += " " + it.validate($it) + " "; - $it.baseId = $currentBaseId; - out += " " + $valid + " = " + $nextValid + "; "; - if ($thenPresent && $elsePresent) { - $ifClause = "ifClause" + $lvl; - out += " var " + $ifClause + " = 'else'; "; - } else { - $ifClause = "'else'"; - } - out += " } "; - } - out += " if (!" + $valid + ") { var err = "; - if (it.createErrors !== false) { - out += " { keyword: 'if' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { failingKeyword: " + $ifClause + " } "; - if (it.opts.messages !== false) { - out += ` , message: 'should match "' + ` + $ifClause + ` + '" schema' `; - } - if (it.opts.verbose) { - out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; - } - out += " } "; - } else { - out += " {} "; - } - out += "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; - if (!it.compositeRule && $breakOnError) { - if (it.async) { - out += " throw new ValidationError(vErrors); "; - } else { - out += " validate.errors = vErrors; return false; "; - } - } - out += " } "; - if ($breakOnError) { - out += " else { "; - } - } else { - if ($breakOnError) { - out += " if (true) { "; - } - } - return out; - }; -}); -var require_items = __commonJS2((exports, module) => { - module.exports = function generate_items(it, $keyword, $ruleType) { - var out = " "; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + "/" + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = "data" + ($dataLvl || ""); - var $valid = "valid" + $lvl; - var $errs = "errs__" + $lvl; - var $it = it.util.copy(it); - var $closingBraces = ""; - $it.level++; - var $nextValid = "valid" + $it.level; - var $idx = "i" + $lvl, $dataNxt = $it.dataLevel = it.dataLevel + 1, $nextData = "data" + $dataNxt, $currentBaseId = it.baseId; - out += "var " + $errs + " = errors;var " + $valid + ";"; - if (Array.isArray($schema)) { - var $additionalItems = it.schema.additionalItems; - if ($additionalItems === false) { - out += " " + $valid + " = " + $data + ".length <= " + $schema.length + "; "; - var $currErrSchemaPath = $errSchemaPath; - $errSchemaPath = it.errSchemaPath + "/additionalItems"; - out += " if (!" + $valid + ") { "; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ""; - if (it.createErrors !== false) { - out += " { keyword: 'additionalItems' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { limit: " + $schema.length + " } "; - if (it.opts.messages !== false) { - out += " , message: 'should NOT have more than " + $schema.length + " items' "; - } - if (it.opts.verbose) { - out += " , schema: false , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; - } - out += " } "; - } else { - out += " {} "; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - if (it.async) { - out += " throw new ValidationError([" + __err + "]); "; - } else { - out += " validate.errors = [" + __err + "]; return false; "; - } - } else { - out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; - } - out += " } "; - $errSchemaPath = $currErrSchemaPath; - if ($breakOnError) { - $closingBraces += "}"; - out += " else { "; - } - } - var arr1 = $schema; - if (arr1) { - var $sch, $i = -1, l1 = arr1.length - 1; - while ($i < l1) { - $sch = arr1[$i += 1]; - if (it.opts.strictKeywords ? typeof $sch == "object" && Object.keys($sch).length > 0 || $sch === false : it.util.schemaHasRules($sch, it.RULES.all)) { - out += " " + $nextValid + " = true; if (" + $data + ".length > " + $i + ") { "; - var $passData = $data + "[" + $i + "]"; - $it.schema = $sch; - $it.schemaPath = $schemaPath + "[" + $i + "]"; - $it.errSchemaPath = $errSchemaPath + "/" + $i; - $it.errorPath = it.util.getPathExpr(it.errorPath, $i, it.opts.jsonPointers, true); - $it.dataPathArr[$dataNxt] = $i; - var $code = it.validate($it); - $it.baseId = $currentBaseId; - if (it.util.varOccurences($code, $nextData) < 2) { - out += " " + it.util.varReplace($code, $nextData, $passData) + " "; - } else { - out += " var " + $nextData + " = " + $passData + "; " + $code + " "; - } - out += " } "; - if ($breakOnError) { - out += " if (" + $nextValid + ") { "; - $closingBraces += "}"; - } - } - } - } - if (typeof $additionalItems == "object" && (it.opts.strictKeywords ? typeof $additionalItems == "object" && Object.keys($additionalItems).length > 0 || $additionalItems === false : it.util.schemaHasRules($additionalItems, it.RULES.all))) { - $it.schema = $additionalItems; - $it.schemaPath = it.schemaPath + ".additionalItems"; - $it.errSchemaPath = it.errSchemaPath + "/additionalItems"; - out += " " + $nextValid + " = true; if (" + $data + ".length > " + $schema.length + ") { for (var " + $idx + " = " + $schema.length + "; " + $idx + " < " + $data + ".length; " + $idx + "++) { "; - $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true); - var $passData = $data + "[" + $idx + "]"; - $it.dataPathArr[$dataNxt] = $idx; - var $code = it.validate($it); - $it.baseId = $currentBaseId; - if (it.util.varOccurences($code, $nextData) < 2) { - out += " " + it.util.varReplace($code, $nextData, $passData) + " "; - } else { - out += " var " + $nextData + " = " + $passData + "; " + $code + " "; - } - if ($breakOnError) { - out += " if (!" + $nextValid + ") break; "; - } - out += " } } "; - if ($breakOnError) { - out += " if (" + $nextValid + ") { "; - $closingBraces += "}"; - } - } - } else if (it.opts.strictKeywords ? typeof $schema == "object" && Object.keys($schema).length > 0 || $schema === false : it.util.schemaHasRules($schema, it.RULES.all)) { - $it.schema = $schema; - $it.schemaPath = $schemaPath; - $it.errSchemaPath = $errSchemaPath; - out += " for (var " + $idx + " = 0; " + $idx + " < " + $data + ".length; " + $idx + "++) { "; - $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true); - var $passData = $data + "[" + $idx + "]"; - $it.dataPathArr[$dataNxt] = $idx; - var $code = it.validate($it); - $it.baseId = $currentBaseId; - if (it.util.varOccurences($code, $nextData) < 2) { - out += " " + it.util.varReplace($code, $nextData, $passData) + " "; - } else { - out += " var " + $nextData + " = " + $passData + "; " + $code + " "; - } - if ($breakOnError) { - out += " if (!" + $nextValid + ") break; "; - } - out += " }"; - } - if ($breakOnError) { - out += " " + $closingBraces + " if (" + $errs + " == errors) {"; - } - return out; - }; -}); -var require__limit = __commonJS2((exports, module) => { - module.exports = function generate__limit(it, $keyword, $ruleType) { - var out = " "; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + "/" + $keyword; - var $breakOnError = !it.opts.allErrors; - var $errorKeyword; - var $data = "data" + ($dataLvl || ""); - var $isData = it.opts.$data && $schema && $schema.$data, $schemaValue; - if ($isData) { - out += " var schema" + $lvl + " = " + it.util.getData($schema.$data, $dataLvl, it.dataPathArr) + "; "; - $schemaValue = "schema" + $lvl; - } else { - $schemaValue = $schema; - } - var $isMax = $keyword == "maximum", $exclusiveKeyword = $isMax ? "exclusiveMaximum" : "exclusiveMinimum", $schemaExcl = it.schema[$exclusiveKeyword], $isDataExcl = it.opts.$data && $schemaExcl && $schemaExcl.$data, $op = $isMax ? "<" : ">", $notOp = $isMax ? ">" : "<", $errorKeyword = void 0; - if (!($isData || typeof $schema == "number" || $schema === void 0)) { - throw new Error($keyword + " must be number"); - } - if (!($isDataExcl || $schemaExcl === void 0 || typeof $schemaExcl == "number" || typeof $schemaExcl == "boolean")) { - throw new Error($exclusiveKeyword + " must be number or boolean"); - } - if ($isDataExcl) { - var $schemaValueExcl = it.util.getData($schemaExcl.$data, $dataLvl, it.dataPathArr), $exclusive = "exclusive" + $lvl, $exclType = "exclType" + $lvl, $exclIsNumber = "exclIsNumber" + $lvl, $opExpr = "op" + $lvl, $opStr = "' + " + $opExpr + " + '"; - out += " var schemaExcl" + $lvl + " = " + $schemaValueExcl + "; "; - $schemaValueExcl = "schemaExcl" + $lvl; - out += " var " + $exclusive + "; var " + $exclType + " = typeof " + $schemaValueExcl + "; if (" + $exclType + " != 'boolean' && " + $exclType + " != 'undefined' && " + $exclType + " != 'number') { "; - var $errorKeyword = $exclusiveKeyword; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ""; - if (it.createErrors !== false) { - out += " { keyword: '" + ($errorKeyword || "_exclusiveLimit") + "' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: {} "; - if (it.opts.messages !== false) { - out += " , message: '" + $exclusiveKeyword + " should be boolean' "; - } - if (it.opts.verbose) { - out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; - } - out += " } "; - } else { - out += " {} "; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - if (it.async) { - out += " throw new ValidationError([" + __err + "]); "; - } else { - out += " validate.errors = [" + __err + "]; return false; "; - } - } else { - out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; - } - out += " } else if ( "; - if ($isData) { - out += " (" + $schemaValue + " !== undefined && typeof " + $schemaValue + " != 'number') || "; - } - out += " " + $exclType + " == 'number' ? ( (" + $exclusive + " = " + $schemaValue + " === undefined || " + $schemaValueExcl + " " + $op + "= " + $schemaValue + ") ? " + $data + " " + $notOp + "= " + $schemaValueExcl + " : " + $data + " " + $notOp + " " + $schemaValue + " ) : ( (" + $exclusive + " = " + $schemaValueExcl + " === true) ? " + $data + " " + $notOp + "= " + $schemaValue + " : " + $data + " " + $notOp + " " + $schemaValue + " ) || " + $data + " !== " + $data + ") { var op" + $lvl + " = " + $exclusive + " ? '" + $op + "' : '" + $op + "='; "; - if ($schema === void 0) { - $errorKeyword = $exclusiveKeyword; - $errSchemaPath = it.errSchemaPath + "/" + $exclusiveKeyword; - $schemaValue = $schemaValueExcl; - $isData = $isDataExcl; - } - } else { - var $exclIsNumber = typeof $schemaExcl == "number", $opStr = $op; - if ($exclIsNumber && $isData) { - var $opExpr = "'" + $opStr + "'"; - out += " if ( "; - if ($isData) { - out += " (" + $schemaValue + " !== undefined && typeof " + $schemaValue + " != 'number') || "; - } - out += " ( " + $schemaValue + " === undefined || " + $schemaExcl + " " + $op + "= " + $schemaValue + " ? " + $data + " " + $notOp + "= " + $schemaExcl + " : " + $data + " " + $notOp + " " + $schemaValue + " ) || " + $data + " !== " + $data + ") { "; - } else { - if ($exclIsNumber && $schema === void 0) { - $exclusive = true; - $errorKeyword = $exclusiveKeyword; - $errSchemaPath = it.errSchemaPath + "/" + $exclusiveKeyword; - $schemaValue = $schemaExcl; - $notOp += "="; - } else { - if ($exclIsNumber) - $schemaValue = Math[$isMax ? "min" : "max"]($schemaExcl, $schema); - if ($schemaExcl === ($exclIsNumber ? $schemaValue : true)) { - $exclusive = true; - $errorKeyword = $exclusiveKeyword; - $errSchemaPath = it.errSchemaPath + "/" + $exclusiveKeyword; - $notOp += "="; - } else { - $exclusive = false; - $opStr += "="; - } - } - var $opExpr = "'" + $opStr + "'"; - out += " if ( "; - if ($isData) { - out += " (" + $schemaValue + " !== undefined && typeof " + $schemaValue + " != 'number') || "; - } - out += " " + $data + " " + $notOp + " " + $schemaValue + " || " + $data + " !== " + $data + ") { "; - } - } - $errorKeyword = $errorKeyword || $keyword; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ""; - if (it.createErrors !== false) { - out += " { keyword: '" + ($errorKeyword || "_limit") + "' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { comparison: " + $opExpr + ", limit: " + $schemaValue + ", exclusive: " + $exclusive + " } "; - if (it.opts.messages !== false) { - out += " , message: 'should be " + $opStr + " "; - if ($isData) { - out += "' + " + $schemaValue; - } else { - out += "" + $schemaValue + "'"; - } - } - if (it.opts.verbose) { - out += " , schema: "; - if ($isData) { - out += "validate.schema" + $schemaPath; - } else { - out += "" + $schema; - } - out += " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; - } - out += " } "; - } else { - out += " {} "; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - if (it.async) { - out += " throw new ValidationError([" + __err + "]); "; - } else { - out += " validate.errors = [" + __err + "]; return false; "; - } - } else { - out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; - } - out += " } "; - if ($breakOnError) { - out += " else { "; - } - return out; - }; -}); -var require__limitItems = __commonJS2((exports, module) => { - module.exports = function generate__limitItems(it, $keyword, $ruleType) { - var out = " "; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + "/" + $keyword; - var $breakOnError = !it.opts.allErrors; - var $errorKeyword; - var $data = "data" + ($dataLvl || ""); - var $isData = it.opts.$data && $schema && $schema.$data, $schemaValue; - if ($isData) { - out += " var schema" + $lvl + " = " + it.util.getData($schema.$data, $dataLvl, it.dataPathArr) + "; "; - $schemaValue = "schema" + $lvl; - } else { - $schemaValue = $schema; - } - if (!($isData || typeof $schema == "number")) { - throw new Error($keyword + " must be number"); - } - var $op = $keyword == "maxItems" ? ">" : "<"; - out += "if ( "; - if ($isData) { - out += " (" + $schemaValue + " !== undefined && typeof " + $schemaValue + " != 'number') || "; - } - out += " " + $data + ".length " + $op + " " + $schemaValue + ") { "; - var $errorKeyword = $keyword; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ""; - if (it.createErrors !== false) { - out += " { keyword: '" + ($errorKeyword || "_limitItems") + "' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { limit: " + $schemaValue + " } "; - if (it.opts.messages !== false) { - out += " , message: 'should NOT have "; - if ($keyword == "maxItems") { - out += "more"; - } else { - out += "fewer"; - } - out += " than "; - if ($isData) { - out += "' + " + $schemaValue + " + '"; - } else { - out += "" + $schema; - } - out += " items' "; - } - if (it.opts.verbose) { - out += " , schema: "; - if ($isData) { - out += "validate.schema" + $schemaPath; - } else { - out += "" + $schema; - } - out += " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; - } - out += " } "; - } else { - out += " {} "; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - if (it.async) { - out += " throw new ValidationError([" + __err + "]); "; - } else { - out += " validate.errors = [" + __err + "]; return false; "; - } - } else { - out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; - } - out += "} "; - if ($breakOnError) { - out += " else { "; - } - return out; - }; -}); -var require__limitLength = __commonJS2((exports, module) => { - module.exports = function generate__limitLength(it, $keyword, $ruleType) { - var out = " "; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + "/" + $keyword; - var $breakOnError = !it.opts.allErrors; - var $errorKeyword; - var $data = "data" + ($dataLvl || ""); - var $isData = it.opts.$data && $schema && $schema.$data, $schemaValue; - if ($isData) { - out += " var schema" + $lvl + " = " + it.util.getData($schema.$data, $dataLvl, it.dataPathArr) + "; "; - $schemaValue = "schema" + $lvl; - } else { - $schemaValue = $schema; - } - if (!($isData || typeof $schema == "number")) { - throw new Error($keyword + " must be number"); - } - var $op = $keyword == "maxLength" ? ">" : "<"; - out += "if ( "; - if ($isData) { - out += " (" + $schemaValue + " !== undefined && typeof " + $schemaValue + " != 'number') || "; - } - if (it.opts.unicode === false) { - out += " " + $data + ".length "; - } else { - out += " ucs2length(" + $data + ") "; - } - out += " " + $op + " " + $schemaValue + ") { "; - var $errorKeyword = $keyword; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ""; - if (it.createErrors !== false) { - out += " { keyword: '" + ($errorKeyword || "_limitLength") + "' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { limit: " + $schemaValue + " } "; - if (it.opts.messages !== false) { - out += " , message: 'should NOT be "; - if ($keyword == "maxLength") { - out += "longer"; - } else { - out += "shorter"; - } - out += " than "; - if ($isData) { - out += "' + " + $schemaValue + " + '"; - } else { - out += "" + $schema; - } - out += " characters' "; - } - if (it.opts.verbose) { - out += " , schema: "; - if ($isData) { - out += "validate.schema" + $schemaPath; - } else { - out += "" + $schema; - } - out += " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; - } - out += " } "; - } else { - out += " {} "; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - if (it.async) { - out += " throw new ValidationError([" + __err + "]); "; - } else { - out += " validate.errors = [" + __err + "]; return false; "; - } - } else { - out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; - } - out += "} "; - if ($breakOnError) { - out += " else { "; - } - return out; - }; -}); -var require__limitProperties = __commonJS2((exports, module) => { - module.exports = function generate__limitProperties(it, $keyword, $ruleType) { - var out = " "; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + "/" + $keyword; - var $breakOnError = !it.opts.allErrors; - var $errorKeyword; - var $data = "data" + ($dataLvl || ""); - var $isData = it.opts.$data && $schema && $schema.$data, $schemaValue; - if ($isData) { - out += " var schema" + $lvl + " = " + it.util.getData($schema.$data, $dataLvl, it.dataPathArr) + "; "; - $schemaValue = "schema" + $lvl; - } else { - $schemaValue = $schema; - } - if (!($isData || typeof $schema == "number")) { - throw new Error($keyword + " must be number"); - } - var $op = $keyword == "maxProperties" ? ">" : "<"; - out += "if ( "; - if ($isData) { - out += " (" + $schemaValue + " !== undefined && typeof " + $schemaValue + " != 'number') || "; - } - out += " Object.keys(" + $data + ").length " + $op + " " + $schemaValue + ") { "; - var $errorKeyword = $keyword; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ""; - if (it.createErrors !== false) { - out += " { keyword: '" + ($errorKeyword || "_limitProperties") + "' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { limit: " + $schemaValue + " } "; - if (it.opts.messages !== false) { - out += " , message: 'should NOT have "; - if ($keyword == "maxProperties") { - out += "more"; - } else { - out += "fewer"; - } - out += " than "; - if ($isData) { - out += "' + " + $schemaValue + " + '"; - } else { - out += "" + $schema; - } - out += " properties' "; - } - if (it.opts.verbose) { - out += " , schema: "; - if ($isData) { - out += "validate.schema" + $schemaPath; - } else { - out += "" + $schema; - } - out += " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; - } - out += " } "; - } else { - out += " {} "; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - if (it.async) { - out += " throw new ValidationError([" + __err + "]); "; - } else { - out += " validate.errors = [" + __err + "]; return false; "; - } - } else { - out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; - } - out += "} "; - if ($breakOnError) { - out += " else { "; - } - return out; - }; -}); -var require_multipleOf = __commonJS2((exports, module) => { - module.exports = function generate_multipleOf(it, $keyword, $ruleType) { - var out = " "; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + "/" + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = "data" + ($dataLvl || ""); - var $isData = it.opts.$data && $schema && $schema.$data, $schemaValue; - if ($isData) { - out += " var schema" + $lvl + " = " + it.util.getData($schema.$data, $dataLvl, it.dataPathArr) + "; "; - $schemaValue = "schema" + $lvl; - } else { - $schemaValue = $schema; - } - if (!($isData || typeof $schema == "number")) { - throw new Error($keyword + " must be number"); - } - out += "var division" + $lvl + ";if ("; - if ($isData) { - out += " " + $schemaValue + " !== undefined && ( typeof " + $schemaValue + " != 'number' || "; - } - out += " (division" + $lvl + " = " + $data + " / " + $schemaValue + ", "; - if (it.opts.multipleOfPrecision) { - out += " Math.abs(Math.round(division" + $lvl + ") - division" + $lvl + ") > 1e-" + it.opts.multipleOfPrecision + " "; - } else { - out += " division" + $lvl + " !== parseInt(division" + $lvl + ") "; - } - out += " ) "; - if ($isData) { - out += " ) "; - } - out += " ) { "; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ""; - if (it.createErrors !== false) { - out += " { keyword: 'multipleOf' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { multipleOf: " + $schemaValue + " } "; - if (it.opts.messages !== false) { - out += " , message: 'should be multiple of "; - if ($isData) { - out += "' + " + $schemaValue; - } else { - out += "" + $schemaValue + "'"; - } - } - if (it.opts.verbose) { - out += " , schema: "; - if ($isData) { - out += "validate.schema" + $schemaPath; - } else { - out += "" + $schema; - } - out += " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; - } - out += " } "; - } else { - out += " {} "; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - if (it.async) { - out += " throw new ValidationError([" + __err + "]); "; - } else { - out += " validate.errors = [" + __err + "]; return false; "; - } - } else { - out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; - } - out += "} "; - if ($breakOnError) { - out += " else { "; - } - return out; - }; -}); -var require_not = __commonJS2((exports, module) => { - module.exports = function generate_not(it, $keyword, $ruleType) { - var out = " "; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + "/" + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = "data" + ($dataLvl || ""); - var $errs = "errs__" + $lvl; - var $it = it.util.copy(it); - $it.level++; - var $nextValid = "valid" + $it.level; - if (it.opts.strictKeywords ? typeof $schema == "object" && Object.keys($schema).length > 0 || $schema === false : it.util.schemaHasRules($schema, it.RULES.all)) { - $it.schema = $schema; - $it.schemaPath = $schemaPath; - $it.errSchemaPath = $errSchemaPath; - out += " var " + $errs + " = errors; "; - var $wasComposite = it.compositeRule; - it.compositeRule = $it.compositeRule = true; - $it.createErrors = false; - var $allErrorsOption; - if ($it.opts.allErrors) { - $allErrorsOption = $it.opts.allErrors; - $it.opts.allErrors = false; - } - out += " " + it.validate($it) + " "; - $it.createErrors = true; - if ($allErrorsOption) - $it.opts.allErrors = $allErrorsOption; - it.compositeRule = $it.compositeRule = $wasComposite; - out += " if (" + $nextValid + ") { "; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ""; - if (it.createErrors !== false) { - out += " { keyword: 'not' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: {} "; - if (it.opts.messages !== false) { - out += " , message: 'should NOT be valid' "; - } - if (it.opts.verbose) { - out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; - } - out += " } "; - } else { - out += " {} "; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - if (it.async) { - out += " throw new ValidationError([" + __err + "]); "; - } else { - out += " validate.errors = [" + __err + "]; return false; "; - } - } else { - out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; - } - out += " } else { errors = " + $errs + "; if (vErrors !== null) { if (" + $errs + ") vErrors.length = " + $errs + "; else vErrors = null; } "; - if (it.opts.allErrors) { - out += " } "; - } - } else { - out += " var err = "; - if (it.createErrors !== false) { - out += " { keyword: 'not' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: {} "; - if (it.opts.messages !== false) { - out += " , message: 'should NOT be valid' "; - } - if (it.opts.verbose) { - out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; - } - out += " } "; - } else { - out += " {} "; - } - out += "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; - if ($breakOnError) { - out += " if (false) { "; - } - } - return out; - }; -}); -var require_oneOf = __commonJS2((exports, module) => { - module.exports = function generate_oneOf(it, $keyword, $ruleType) { - var out = " "; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + "/" + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = "data" + ($dataLvl || ""); - var $valid = "valid" + $lvl; - var $errs = "errs__" + $lvl; - var $it = it.util.copy(it); - var $closingBraces = ""; - $it.level++; - var $nextValid = "valid" + $it.level; - var $currentBaseId = $it.baseId, $prevValid = "prevValid" + $lvl, $passingSchemas = "passingSchemas" + $lvl; - out += "var " + $errs + " = errors , " + $prevValid + " = false , " + $valid + " = false , " + $passingSchemas + " = null; "; - var $wasComposite = it.compositeRule; - it.compositeRule = $it.compositeRule = true; - var arr1 = $schema; - if (arr1) { - var $sch, $i = -1, l1 = arr1.length - 1; - while ($i < l1) { - $sch = arr1[$i += 1]; - if (it.opts.strictKeywords ? typeof $sch == "object" && Object.keys($sch).length > 0 || $sch === false : it.util.schemaHasRules($sch, it.RULES.all)) { - $it.schema = $sch; - $it.schemaPath = $schemaPath + "[" + $i + "]"; - $it.errSchemaPath = $errSchemaPath + "/" + $i; - out += " " + it.validate($it) + " "; - $it.baseId = $currentBaseId; - } else { - out += " var " + $nextValid + " = true; "; - } - if ($i) { - out += " if (" + $nextValid + " && " + $prevValid + ") { " + $valid + " = false; " + $passingSchemas + " = [" + $passingSchemas + ", " + $i + "]; } else { "; - $closingBraces += "}"; - } - out += " if (" + $nextValid + ") { " + $valid + " = " + $prevValid + " = true; " + $passingSchemas + " = " + $i + "; }"; - } - } - it.compositeRule = $it.compositeRule = $wasComposite; - out += "" + $closingBraces + "if (!" + $valid + ") { var err = "; - if (it.createErrors !== false) { - out += " { keyword: 'oneOf' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { passingSchemas: " + $passingSchemas + " } "; - if (it.opts.messages !== false) { - out += " , message: 'should match exactly one schema in oneOf' "; - } - if (it.opts.verbose) { - out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; - } - out += " } "; - } else { - out += " {} "; - } - out += "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; - if (!it.compositeRule && $breakOnError) { - if (it.async) { - out += " throw new ValidationError(vErrors); "; - } else { - out += " validate.errors = vErrors; return false; "; - } - } - out += "} else { errors = " + $errs + "; if (vErrors !== null) { if (" + $errs + ") vErrors.length = " + $errs + "; else vErrors = null; }"; - if (it.opts.allErrors) { - out += " } "; - } - return out; - }; -}); -var require_pattern = __commonJS2((exports, module) => { - module.exports = function generate_pattern(it, $keyword, $ruleType) { - var out = " "; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + "/" + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = "data" + ($dataLvl || ""); - var $isData = it.opts.$data && $schema && $schema.$data, $schemaValue; - if ($isData) { - out += " var schema" + $lvl + " = " + it.util.getData($schema.$data, $dataLvl, it.dataPathArr) + "; "; - $schemaValue = "schema" + $lvl; - } else { - $schemaValue = $schema; - } - var $regexp = $isData ? "(new RegExp(" + $schemaValue + "))" : it.usePattern($schema); - out += "if ( "; - if ($isData) { - out += " (" + $schemaValue + " !== undefined && typeof " + $schemaValue + " != 'string') || "; - } - out += " !" + $regexp + ".test(" + $data + ") ) { "; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ""; - if (it.createErrors !== false) { - out += " { keyword: 'pattern' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { pattern: "; - if ($isData) { - out += "" + $schemaValue; - } else { - out += "" + it.util.toQuotedString($schema); - } - out += " } "; - if (it.opts.messages !== false) { - out += ` , message: 'should match pattern "`; - if ($isData) { - out += "' + " + $schemaValue + " + '"; - } else { - out += "" + it.util.escapeQuotes($schema); - } - out += `"' `; - } - if (it.opts.verbose) { - out += " , schema: "; - if ($isData) { - out += "validate.schema" + $schemaPath; - } else { - out += "" + it.util.toQuotedString($schema); - } - out += " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; - } - out += " } "; - } else { - out += " {} "; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - if (it.async) { - out += " throw new ValidationError([" + __err + "]); "; - } else { - out += " validate.errors = [" + __err + "]; return false; "; - } - } else { - out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; - } - out += "} "; - if ($breakOnError) { - out += " else { "; - } - return out; - }; -}); -var require_properties = __commonJS2((exports, module) => { - module.exports = function generate_properties(it, $keyword, $ruleType) { - var out = " "; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + "/" + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = "data" + ($dataLvl || ""); - var $errs = "errs__" + $lvl; - var $it = it.util.copy(it); - var $closingBraces = ""; - $it.level++; - var $nextValid = "valid" + $it.level; - var $key = "key" + $lvl, $idx = "idx" + $lvl, $dataNxt = $it.dataLevel = it.dataLevel + 1, $nextData = "data" + $dataNxt, $dataProperties = "dataProperties" + $lvl; - var $schemaKeys = Object.keys($schema || {}).filter(notProto), $pProperties = it.schema.patternProperties || {}, $pPropertyKeys = Object.keys($pProperties).filter(notProto), $aProperties = it.schema.additionalProperties, $someProperties = $schemaKeys.length || $pPropertyKeys.length, $noAdditional = $aProperties === false, $additionalIsSchema = typeof $aProperties == "object" && Object.keys($aProperties).length, $removeAdditional = it.opts.removeAdditional, $checkAdditional = $noAdditional || $additionalIsSchema || $removeAdditional, $ownProperties = it.opts.ownProperties, $currentBaseId = it.baseId; - var $required = it.schema.required; - if ($required && !(it.opts.$data && $required.$data) && $required.length < it.opts.loopRequired) { - var $requiredHash = it.util.toHash($required); - } - function notProto(p) { - return p !== "__proto__"; - } - out += "var " + $errs + " = errors;var " + $nextValid + " = true;"; - if ($ownProperties) { - out += " var " + $dataProperties + " = undefined;"; - } - if ($checkAdditional) { - if ($ownProperties) { - out += " " + $dataProperties + " = " + $dataProperties + " || Object.keys(" + $data + "); for (var " + $idx + "=0; " + $idx + "<" + $dataProperties + ".length; " + $idx + "++) { var " + $key + " = " + $dataProperties + "[" + $idx + "]; "; - } else { - out += " for (var " + $key + " in " + $data + ") { "; - } - if ($someProperties) { - out += " var isAdditional" + $lvl + " = !(false "; - if ($schemaKeys.length) { - if ($schemaKeys.length > 8) { - out += " || validate.schema" + $schemaPath + ".hasOwnProperty(" + $key + ") "; - } else { - var arr1 = $schemaKeys; - if (arr1) { - var $propertyKey, i1 = -1, l1 = arr1.length - 1; - while (i1 < l1) { - $propertyKey = arr1[i1 += 1]; - out += " || " + $key + " == " + it.util.toQuotedString($propertyKey) + " "; - } - } - } - } - if ($pPropertyKeys.length) { - var arr2 = $pPropertyKeys; - if (arr2) { - var $pProperty, $i = -1, l2 = arr2.length - 1; - while ($i < l2) { - $pProperty = arr2[$i += 1]; - out += " || " + it.usePattern($pProperty) + ".test(" + $key + ") "; - } - } - } - out += " ); if (isAdditional" + $lvl + ") { "; - } - if ($removeAdditional == "all") { - out += " delete " + $data + "[" + $key + "]; "; - } else { - var $currentErrorPath = it.errorPath; - var $additionalProperty = "' + " + $key + " + '"; - if (it.opts._errorDataPathProperty) { - it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); - } - if ($noAdditional) { - if ($removeAdditional) { - out += " delete " + $data + "[" + $key + "]; "; - } else { - out += " " + $nextValid + " = false; "; - var $currErrSchemaPath = $errSchemaPath; - $errSchemaPath = it.errSchemaPath + "/additionalProperties"; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ""; - if (it.createErrors !== false) { - out += " { keyword: 'additionalProperties' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { additionalProperty: '" + $additionalProperty + "' } "; - if (it.opts.messages !== false) { - out += " , message: '"; - if (it.opts._errorDataPathProperty) { - out += "is an invalid additional property"; - } else { - out += "should NOT have additional properties"; - } - out += "' "; - } - if (it.opts.verbose) { - out += " , schema: false , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; - } - out += " } "; - } else { - out += " {} "; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - if (it.async) { - out += " throw new ValidationError([" + __err + "]); "; - } else { - out += " validate.errors = [" + __err + "]; return false; "; - } - } else { - out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; - } - $errSchemaPath = $currErrSchemaPath; - if ($breakOnError) { - out += " break; "; - } - } - } else if ($additionalIsSchema) { - if ($removeAdditional == "failing") { - out += " var " + $errs + " = errors; "; - var $wasComposite = it.compositeRule; - it.compositeRule = $it.compositeRule = true; - $it.schema = $aProperties; - $it.schemaPath = it.schemaPath + ".additionalProperties"; - $it.errSchemaPath = it.errSchemaPath + "/additionalProperties"; - $it.errorPath = it.opts._errorDataPathProperty ? it.errorPath : it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); - var $passData = $data + "[" + $key + "]"; - $it.dataPathArr[$dataNxt] = $key; - var $code = it.validate($it); - $it.baseId = $currentBaseId; - if (it.util.varOccurences($code, $nextData) < 2) { - out += " " + it.util.varReplace($code, $nextData, $passData) + " "; - } else { - out += " var " + $nextData + " = " + $passData + "; " + $code + " "; - } - out += " if (!" + $nextValid + ") { errors = " + $errs + "; if (validate.errors !== null) { if (errors) validate.errors.length = errors; else validate.errors = null; } delete " + $data + "[" + $key + "]; } "; - it.compositeRule = $it.compositeRule = $wasComposite; - } else { - $it.schema = $aProperties; - $it.schemaPath = it.schemaPath + ".additionalProperties"; - $it.errSchemaPath = it.errSchemaPath + "/additionalProperties"; - $it.errorPath = it.opts._errorDataPathProperty ? it.errorPath : it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); - var $passData = $data + "[" + $key + "]"; - $it.dataPathArr[$dataNxt] = $key; - var $code = it.validate($it); - $it.baseId = $currentBaseId; - if (it.util.varOccurences($code, $nextData) < 2) { - out += " " + it.util.varReplace($code, $nextData, $passData) + " "; - } else { - out += " var " + $nextData + " = " + $passData + "; " + $code + " "; - } - if ($breakOnError) { - out += " if (!" + $nextValid + ") break; "; - } - } - } - it.errorPath = $currentErrorPath; - } - if ($someProperties) { - out += " } "; - } - out += " } "; - if ($breakOnError) { - out += " if (" + $nextValid + ") { "; - $closingBraces += "}"; - } - } - var $useDefaults = it.opts.useDefaults && !it.compositeRule; - if ($schemaKeys.length) { - var arr3 = $schemaKeys; - if (arr3) { - var $propertyKey, i3 = -1, l3 = arr3.length - 1; - while (i3 < l3) { - $propertyKey = arr3[i3 += 1]; - var $sch = $schema[$propertyKey]; - if (it.opts.strictKeywords ? typeof $sch == "object" && Object.keys($sch).length > 0 || $sch === false : it.util.schemaHasRules($sch, it.RULES.all)) { - var $prop = it.util.getProperty($propertyKey), $passData = $data + $prop, $hasDefault = $useDefaults && $sch.default !== void 0; - $it.schema = $sch; - $it.schemaPath = $schemaPath + $prop; - $it.errSchemaPath = $errSchemaPath + "/" + it.util.escapeFragment($propertyKey); - $it.errorPath = it.util.getPath(it.errorPath, $propertyKey, it.opts.jsonPointers); - $it.dataPathArr[$dataNxt] = it.util.toQuotedString($propertyKey); - var $code = it.validate($it); - $it.baseId = $currentBaseId; - if (it.util.varOccurences($code, $nextData) < 2) { - $code = it.util.varReplace($code, $nextData, $passData); - var $useData = $passData; - } else { - var $useData = $nextData; - out += " var " + $nextData + " = " + $passData + "; "; - } - if ($hasDefault) { - out += " " + $code + " "; - } else { - if ($requiredHash && $requiredHash[$propertyKey]) { - out += " if ( " + $useData + " === undefined "; - if ($ownProperties) { - out += " || ! Object.prototype.hasOwnProperty.call(" + $data + ", '" + it.util.escapeQuotes($propertyKey) + "') "; - } - out += ") { " + $nextValid + " = false; "; - var $currentErrorPath = it.errorPath, $currErrSchemaPath = $errSchemaPath, $missingProperty = it.util.escapeQuotes($propertyKey); - if (it.opts._errorDataPathProperty) { - it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers); - } - $errSchemaPath = it.errSchemaPath + "/required"; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ""; - if (it.createErrors !== false) { - out += " { keyword: 'required' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { missingProperty: '" + $missingProperty + "' } "; - if (it.opts.messages !== false) { - out += " , message: '"; - if (it.opts._errorDataPathProperty) { - out += "is a required property"; - } else { - out += "should have required property \\'" + $missingProperty + "\\'"; - } - out += "' "; - } - if (it.opts.verbose) { - out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; - } - out += " } "; - } else { - out += " {} "; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - if (it.async) { - out += " throw new ValidationError([" + __err + "]); "; - } else { - out += " validate.errors = [" + __err + "]; return false; "; - } - } else { - out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; - } - $errSchemaPath = $currErrSchemaPath; - it.errorPath = $currentErrorPath; - out += " } else { "; - } else { - if ($breakOnError) { - out += " if ( " + $useData + " === undefined "; - if ($ownProperties) { - out += " || ! Object.prototype.hasOwnProperty.call(" + $data + ", '" + it.util.escapeQuotes($propertyKey) + "') "; - } - out += ") { " + $nextValid + " = true; } else { "; - } else { - out += " if (" + $useData + " !== undefined "; - if ($ownProperties) { - out += " && Object.prototype.hasOwnProperty.call(" + $data + ", '" + it.util.escapeQuotes($propertyKey) + "') "; - } - out += " ) { "; - } - } - out += " " + $code + " } "; - } - } - if ($breakOnError) { - out += " if (" + $nextValid + ") { "; - $closingBraces += "}"; - } - } - } - } - if ($pPropertyKeys.length) { - var arr4 = $pPropertyKeys; - if (arr4) { - var $pProperty, i4 = -1, l4 = arr4.length - 1; - while (i4 < l4) { - $pProperty = arr4[i4 += 1]; - var $sch = $pProperties[$pProperty]; - if (it.opts.strictKeywords ? typeof $sch == "object" && Object.keys($sch).length > 0 || $sch === false : it.util.schemaHasRules($sch, it.RULES.all)) { - $it.schema = $sch; - $it.schemaPath = it.schemaPath + ".patternProperties" + it.util.getProperty($pProperty); - $it.errSchemaPath = it.errSchemaPath + "/patternProperties/" + it.util.escapeFragment($pProperty); - if ($ownProperties) { - out += " " + $dataProperties + " = " + $dataProperties + " || Object.keys(" + $data + "); for (var " + $idx + "=0; " + $idx + "<" + $dataProperties + ".length; " + $idx + "++) { var " + $key + " = " + $dataProperties + "[" + $idx + "]; "; - } else { - out += " for (var " + $key + " in " + $data + ") { "; - } - out += " if (" + it.usePattern($pProperty) + ".test(" + $key + ")) { "; - $it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); - var $passData = $data + "[" + $key + "]"; - $it.dataPathArr[$dataNxt] = $key; - var $code = it.validate($it); - $it.baseId = $currentBaseId; - if (it.util.varOccurences($code, $nextData) < 2) { - out += " " + it.util.varReplace($code, $nextData, $passData) + " "; - } else { - out += " var " + $nextData + " = " + $passData + "; " + $code + " "; - } - if ($breakOnError) { - out += " if (!" + $nextValid + ") break; "; - } - out += " } "; - if ($breakOnError) { - out += " else " + $nextValid + " = true; "; - } - out += " } "; - if ($breakOnError) { - out += " if (" + $nextValid + ") { "; - $closingBraces += "}"; - } - } - } - } - } - if ($breakOnError) { - out += " " + $closingBraces + " if (" + $errs + " == errors) {"; - } - return out; - }; -}); -var require_propertyNames = __commonJS2((exports, module) => { - module.exports = function generate_propertyNames(it, $keyword, $ruleType) { - var out = " "; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + "/" + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = "data" + ($dataLvl || ""); - var $errs = "errs__" + $lvl; - var $it = it.util.copy(it); - var $closingBraces = ""; - $it.level++; - var $nextValid = "valid" + $it.level; - out += "var " + $errs + " = errors;"; - if (it.opts.strictKeywords ? typeof $schema == "object" && Object.keys($schema).length > 0 || $schema === false : it.util.schemaHasRules($schema, it.RULES.all)) { - $it.schema = $schema; - $it.schemaPath = $schemaPath; - $it.errSchemaPath = $errSchemaPath; - var $key = "key" + $lvl, $idx = "idx" + $lvl, $i = "i" + $lvl, $invalidName = "' + " + $key + " + '", $dataNxt = $it.dataLevel = it.dataLevel + 1, $nextData = "data" + $dataNxt, $dataProperties = "dataProperties" + $lvl, $ownProperties = it.opts.ownProperties, $currentBaseId = it.baseId; - if ($ownProperties) { - out += " var " + $dataProperties + " = undefined; "; - } - if ($ownProperties) { - out += " " + $dataProperties + " = " + $dataProperties + " || Object.keys(" + $data + "); for (var " + $idx + "=0; " + $idx + "<" + $dataProperties + ".length; " + $idx + "++) { var " + $key + " = " + $dataProperties + "[" + $idx + "]; "; - } else { - out += " for (var " + $key + " in " + $data + ") { "; - } - out += " var startErrs" + $lvl + " = errors; "; - var $passData = $key; - var $wasComposite = it.compositeRule; - it.compositeRule = $it.compositeRule = true; - var $code = it.validate($it); - $it.baseId = $currentBaseId; - if (it.util.varOccurences($code, $nextData) < 2) { - out += " " + it.util.varReplace($code, $nextData, $passData) + " "; - } else { - out += " var " + $nextData + " = " + $passData + "; " + $code + " "; - } - it.compositeRule = $it.compositeRule = $wasComposite; - out += " if (!" + $nextValid + ") { for (var " + $i + "=startErrs" + $lvl + "; " + $i + " { - module.exports = function generate_required(it, $keyword, $ruleType) { - var out = " "; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + "/" + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = "data" + ($dataLvl || ""); - var $valid = "valid" + $lvl; - var $isData = it.opts.$data && $schema && $schema.$data, $schemaValue; - if ($isData) { - out += " var schema" + $lvl + " = " + it.util.getData($schema.$data, $dataLvl, it.dataPathArr) + "; "; - $schemaValue = "schema" + $lvl; - } else { - $schemaValue = $schema; - } - var $vSchema = "schema" + $lvl; - if (!$isData) { - if ($schema.length < it.opts.loopRequired && it.schema.properties && Object.keys(it.schema.properties).length) { - var $required = []; - var arr1 = $schema; - if (arr1) { - var $property, i1 = -1, l1 = arr1.length - 1; - while (i1 < l1) { - $property = arr1[i1 += 1]; - var $propertySch = it.schema.properties[$property]; - if (!($propertySch && (it.opts.strictKeywords ? typeof $propertySch == "object" && Object.keys($propertySch).length > 0 || $propertySch === false : it.util.schemaHasRules($propertySch, it.RULES.all)))) { - $required[$required.length] = $property; - } - } - } - } else { - var $required = $schema; - } - } - if ($isData || $required.length) { - var $currentErrorPath = it.errorPath, $loopRequired = $isData || $required.length >= it.opts.loopRequired, $ownProperties = it.opts.ownProperties; - if ($breakOnError) { - out += " var missing" + $lvl + "; "; - if ($loopRequired) { - if (!$isData) { - out += " var " + $vSchema + " = validate.schema" + $schemaPath + "; "; - } - var $i = "i" + $lvl, $propertyPath = "schema" + $lvl + "[" + $i + "]", $missingProperty = "' + " + $propertyPath + " + '"; - if (it.opts._errorDataPathProperty) { - it.errorPath = it.util.getPathExpr($currentErrorPath, $propertyPath, it.opts.jsonPointers); - } - out += " var " + $valid + " = true; "; - if ($isData) { - out += " if (schema" + $lvl + " === undefined) " + $valid + " = true; else if (!Array.isArray(schema" + $lvl + ")) " + $valid + " = false; else {"; - } - out += " for (var " + $i + " = 0; " + $i + " < " + $vSchema + ".length; " + $i + "++) { " + $valid + " = " + $data + "[" + $vSchema + "[" + $i + "]] !== undefined "; - if ($ownProperties) { - out += " && Object.prototype.hasOwnProperty.call(" + $data + ", " + $vSchema + "[" + $i + "]) "; - } - out += "; if (!" + $valid + ") break; } "; - if ($isData) { - out += " } "; - } - out += " if (!" + $valid + ") { "; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ""; - if (it.createErrors !== false) { - out += " { keyword: 'required' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { missingProperty: '" + $missingProperty + "' } "; - if (it.opts.messages !== false) { - out += " , message: '"; - if (it.opts._errorDataPathProperty) { - out += "is a required property"; - } else { - out += "should have required property \\'" + $missingProperty + "\\'"; - } - out += "' "; - } - if (it.opts.verbose) { - out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; - } - out += " } "; - } else { - out += " {} "; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - if (it.async) { - out += " throw new ValidationError([" + __err + "]); "; - } else { - out += " validate.errors = [" + __err + "]; return false; "; - } - } else { - out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; - } - out += " } else { "; - } else { - out += " if ( "; - var arr2 = $required; - if (arr2) { - var $propertyKey, $i = -1, l2 = arr2.length - 1; - while ($i < l2) { - $propertyKey = arr2[$i += 1]; - if ($i) { - out += " || "; - } - var $prop = it.util.getProperty($propertyKey), $useData = $data + $prop; - out += " ( ( " + $useData + " === undefined "; - if ($ownProperties) { - out += " || ! Object.prototype.hasOwnProperty.call(" + $data + ", '" + it.util.escapeQuotes($propertyKey) + "') "; - } - out += ") && (missing" + $lvl + " = " + it.util.toQuotedString(it.opts.jsonPointers ? $propertyKey : $prop) + ") ) "; - } - } - out += ") { "; - var $propertyPath = "missing" + $lvl, $missingProperty = "' + " + $propertyPath + " + '"; - if (it.opts._errorDataPathProperty) { - it.errorPath = it.opts.jsonPointers ? it.util.getPathExpr($currentErrorPath, $propertyPath, true) : $currentErrorPath + " + " + $propertyPath; - } - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ""; - if (it.createErrors !== false) { - out += " { keyword: 'required' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { missingProperty: '" + $missingProperty + "' } "; - if (it.opts.messages !== false) { - out += " , message: '"; - if (it.opts._errorDataPathProperty) { - out += "is a required property"; - } else { - out += "should have required property \\'" + $missingProperty + "\\'"; - } - out += "' "; - } - if (it.opts.verbose) { - out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; - } - out += " } "; - } else { - out += " {} "; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - if (it.async) { - out += " throw new ValidationError([" + __err + "]); "; - } else { - out += " validate.errors = [" + __err + "]; return false; "; - } - } else { - out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; - } - out += " } else { "; - } - } else { - if ($loopRequired) { - if (!$isData) { - out += " var " + $vSchema + " = validate.schema" + $schemaPath + "; "; - } - var $i = "i" + $lvl, $propertyPath = "schema" + $lvl + "[" + $i + "]", $missingProperty = "' + " + $propertyPath + " + '"; - if (it.opts._errorDataPathProperty) { - it.errorPath = it.util.getPathExpr($currentErrorPath, $propertyPath, it.opts.jsonPointers); - } - if ($isData) { - out += " if (" + $vSchema + " && !Array.isArray(" + $vSchema + ")) { var err = "; - if (it.createErrors !== false) { - out += " { keyword: 'required' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { missingProperty: '" + $missingProperty + "' } "; - if (it.opts.messages !== false) { - out += " , message: '"; - if (it.opts._errorDataPathProperty) { - out += "is a required property"; - } else { - out += "should have required property \\'" + $missingProperty + "\\'"; - } - out += "' "; - } - if (it.opts.verbose) { - out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; - } - out += " } "; - } else { - out += " {} "; - } - out += "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else if (" + $vSchema + " !== undefined) { "; - } - out += " for (var " + $i + " = 0; " + $i + " < " + $vSchema + ".length; " + $i + "++) { if (" + $data + "[" + $vSchema + "[" + $i + "]] === undefined "; - if ($ownProperties) { - out += " || ! Object.prototype.hasOwnProperty.call(" + $data + ", " + $vSchema + "[" + $i + "]) "; - } - out += ") { var err = "; - if (it.createErrors !== false) { - out += " { keyword: 'required' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { missingProperty: '" + $missingProperty + "' } "; - if (it.opts.messages !== false) { - out += " , message: '"; - if (it.opts._errorDataPathProperty) { - out += "is a required property"; - } else { - out += "should have required property \\'" + $missingProperty + "\\'"; - } - out += "' "; - } - if (it.opts.verbose) { - out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; - } - out += " } "; - } else { - out += " {} "; - } - out += "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } } "; - if ($isData) { - out += " } "; - } - } else { - var arr3 = $required; - if (arr3) { - var $propertyKey, i3 = -1, l3 = arr3.length - 1; - while (i3 < l3) { - $propertyKey = arr3[i3 += 1]; - var $prop = it.util.getProperty($propertyKey), $missingProperty = it.util.escapeQuotes($propertyKey), $useData = $data + $prop; - if (it.opts._errorDataPathProperty) { - it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers); - } - out += " if ( " + $useData + " === undefined "; - if ($ownProperties) { - out += " || ! Object.prototype.hasOwnProperty.call(" + $data + ", '" + it.util.escapeQuotes($propertyKey) + "') "; - } - out += ") { var err = "; - if (it.createErrors !== false) { - out += " { keyword: 'required' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { missingProperty: '" + $missingProperty + "' } "; - if (it.opts.messages !== false) { - out += " , message: '"; - if (it.opts._errorDataPathProperty) { - out += "is a required property"; - } else { - out += "should have required property \\'" + $missingProperty + "\\'"; - } - out += "' "; - } - if (it.opts.verbose) { - out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; - } - out += " } "; - } else { - out += " {} "; - } - out += "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "; - } - } - } - } - it.errorPath = $currentErrorPath; - } else if ($breakOnError) { - out += " if (true) {"; - } - return out; - }; -}); -var require_uniqueItems = __commonJS2((exports, module) => { - module.exports = function generate_uniqueItems(it, $keyword, $ruleType) { - var out = " "; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + "/" + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = "data" + ($dataLvl || ""); - var $valid = "valid" + $lvl; - var $isData = it.opts.$data && $schema && $schema.$data, $schemaValue; - if ($isData) { - out += " var schema" + $lvl + " = " + it.util.getData($schema.$data, $dataLvl, it.dataPathArr) + "; "; - $schemaValue = "schema" + $lvl; - } else { - $schemaValue = $schema; - } - if (($schema || $isData) && it.opts.uniqueItems !== false) { - if ($isData) { - out += " var " + $valid + "; if (" + $schemaValue + " === false || " + $schemaValue + " === undefined) " + $valid + " = true; else if (typeof " + $schemaValue + " != 'boolean') " + $valid + " = false; else { "; - } - out += " var i = " + $data + ".length , " + $valid + " = true , j; if (i > 1) { "; - var $itemType = it.schema.items && it.schema.items.type, $typeIsArray = Array.isArray($itemType); - if (!$itemType || $itemType == "object" || $itemType == "array" || $typeIsArray && ($itemType.indexOf("object") >= 0 || $itemType.indexOf("array") >= 0)) { - out += " outer: for (;i--;) { for (j = i; j--;) { if (equal(" + $data + "[i], " + $data + "[j])) { " + $valid + " = false; break outer; } } } "; - } else { - out += " var itemIndices = {}, item; for (;i--;) { var item = " + $data + "[i]; "; - var $method = "checkDataType" + ($typeIsArray ? "s" : ""); - out += " if (" + it.util[$method]($itemType, "item", it.opts.strictNumbers, true) + ") continue; "; - if ($typeIsArray) { - out += ` if (typeof item == 'string') item = '"' + item; `; - } - out += " if (typeof itemIndices[item] == 'number') { " + $valid + " = false; j = itemIndices[item]; break; } itemIndices[item] = i; } "; - } - out += " } "; - if ($isData) { - out += " } "; - } - out += " if (!" + $valid + ") { "; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ""; - if (it.createErrors !== false) { - out += " { keyword: 'uniqueItems' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { i: i, j: j } "; - if (it.opts.messages !== false) { - out += " , message: 'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)' "; - } - if (it.opts.verbose) { - out += " , schema: "; - if ($isData) { - out += "validate.schema" + $schemaPath; - } else { - out += "" + $schema; - } - out += " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; - } - out += " } "; - } else { - out += " {} "; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - if (it.async) { - out += " throw new ValidationError([" + __err + "]); "; - } else { - out += " validate.errors = [" + __err + "]; return false; "; - } - } else { - out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; - } - out += " } "; - if ($breakOnError) { - out += " else { "; - } - } else { - if ($breakOnError) { - out += " if (true) { "; - } - } - return out; - }; -}); -var require_dotjs = __commonJS2((exports, module) => { - module.exports = { - $ref: require_ref(), - allOf: require_allOf(), - anyOf: require_anyOf(), - $comment: require_comment(), - const: require_const(), - contains: require_contains(), - dependencies: require_dependencies(), - enum: require_enum(), - format: require_format(), - if: require_if(), - items: require_items(), - maximum: require__limit(), - minimum: require__limit(), - maxItems: require__limitItems(), - minItems: require__limitItems(), - maxLength: require__limitLength(), - minLength: require__limitLength(), - maxProperties: require__limitProperties(), - minProperties: require__limitProperties(), - multipleOf: require_multipleOf(), - not: require_not(), - oneOf: require_oneOf(), - pattern: require_pattern(), - properties: require_properties(), - propertyNames: require_propertyNames(), - required: require_required(), - uniqueItems: require_uniqueItems(), - validate: require_validate() - }; -}); -var require_rules = __commonJS2((exports, module) => { - var ruleModules = require_dotjs(); - var toHash = require_util8().toHash; - module.exports = function rules() { - var RULES = [ - { - type: "number", - rules: [ - { maximum: ["exclusiveMaximum"] }, - { minimum: ["exclusiveMinimum"] }, - "multipleOf", - "format" - ] - }, - { - type: "string", - rules: ["maxLength", "minLength", "pattern", "format"] - }, - { - type: "array", - rules: ["maxItems", "minItems", "items", "contains", "uniqueItems"] - }, - { - type: "object", - rules: [ - "maxProperties", - "minProperties", - "required", - "dependencies", - "propertyNames", - { properties: ["additionalProperties", "patternProperties"] } - ] - }, - { rules: ["$ref", "const", "enum", "not", "anyOf", "oneOf", "allOf", "if"] } - ]; - var ALL = ["type", "$comment"]; - var KEYWORDS = [ - "$schema", - "$id", - "id", - "$data", - "$async", - "title", - "description", - "default", - "definitions", - "examples", - "readOnly", - "writeOnly", - "contentMediaType", - "contentEncoding", - "additionalItems", - "then", - "else" - ]; - var TYPES = ["number", "integer", "string", "array", "object", "boolean", "null"]; - RULES.all = toHash(ALL); - RULES.types = toHash(TYPES); - RULES.forEach(function(group2) { - group2.rules = group2.rules.map(function(keyword) { - var implKeywords; - if (typeof keyword == "object") { - var key = Object.keys(keyword)[0]; - implKeywords = keyword[key]; - keyword = key; - implKeywords.forEach(function(k) { - ALL.push(k); - RULES.all[k] = true; - }); - } - ALL.push(keyword); - var rule = RULES.all[keyword] = { - keyword, - code: ruleModules[keyword], - implements: implKeywords - }; - return rule; - }); - RULES.all.$comment = { - keyword: "$comment", - code: ruleModules.$comment - }; - if (group2.type) - RULES.types[group2.type] = group2; - }); - RULES.keywords = toHash(ALL.concat(KEYWORDS)); - RULES.custom = {}; - return RULES; - }; + exports.compileSchema = compileSchema; + function resolveRef2(root2, baseId, ref) { + var _a2; + ref = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, ref); + const schOrFunc = root2.refs[ref]; + if (schOrFunc) + return schOrFunc; + let _sch = resolve.call(this, root2, ref); + if (_sch === void 0) { + const schema2 = (_a2 = root2.localRefs) === null || _a2 === void 0 ? void 0 : _a2[ref]; + const { schemaId } = this.opts; + if (schema2) + _sch = new SchemaEnv({ schema: schema2, schemaId, root: root2, baseId }); + } + if (_sch === void 0) + return; + return root2.refs[ref] = inlineOrCompile.call(this, _sch); + } + exports.resolveRef = resolveRef2; + function inlineOrCompile(sch) { + if ((0, resolve_1.inlineRef)(sch.schema, this.opts.inlineRefs)) + return sch.schema; + return sch.validate ? sch : compileSchema.call(this, sch); + } + function getCompilingSchema(schEnv) { + for (const sch of this._compilations) { + if (sameSchemaEnv(sch, schEnv)) + return sch; + } + } + exports.getCompilingSchema = getCompilingSchema; + function sameSchemaEnv(s1, s2) { + return s1.schema === s2.schema && s1.root === s2.root && s1.baseId === s2.baseId; + } + function resolve(root2, ref) { + let sch; + while (typeof (sch = this.refs[ref]) == "string") + ref = sch; + return sch || this.schemas[ref] || resolveSchema.call(this, root2, ref); + } + function resolveSchema(root2, ref) { + const p = this.opts.uriResolver.parse(ref); + const refPath = (0, resolve_1._getFullPath)(this.opts.uriResolver, p); + let baseId = (0, resolve_1.getFullPath)(this.opts.uriResolver, root2.baseId, void 0); + if (Object.keys(root2.schema).length > 0 && refPath === baseId) { + return getJsonPointer.call(this, p, root2); + } + const id = (0, resolve_1.normalizeId)(refPath); + const schOrRef = this.refs[id] || this.schemas[id]; + if (typeof schOrRef == "string") { + const sch = resolveSchema.call(this, root2, schOrRef); + if (typeof (sch === null || sch === void 0 ? void 0 : sch.schema) !== "object") + return; + return getJsonPointer.call(this, p, sch); + } + if (typeof (schOrRef === null || schOrRef === void 0 ? void 0 : schOrRef.schema) !== "object") + return; + if (!schOrRef.validate) + compileSchema.call(this, schOrRef); + if (id === (0, resolve_1.normalizeId)(ref)) { + const { schema: schema2 } = schOrRef; + const { schemaId } = this.opts; + const schId = schema2[schemaId]; + if (schId) + baseId = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, schId); + return new SchemaEnv({ schema: schema2, schemaId, root: root2, baseId }); + } + return getJsonPointer.call(this, p, schOrRef); + } + exports.resolveSchema = resolveSchema; + var PREVENT_SCOPE_CHANGE = /* @__PURE__ */ new Set([ + "properties", + "patternProperties", + "enum", + "dependencies", + "definitions" + ]); + function getJsonPointer(parsedRef, { baseId, schema: schema2, root: root2 }) { + var _a2; + if (((_a2 = parsedRef.fragment) === null || _a2 === void 0 ? void 0 : _a2[0]) !== "/") + return; + for (const part of parsedRef.fragment.slice(1).split("/")) { + if (typeof schema2 === "boolean") + return; + const partSchema = schema2[(0, util_1.unescapeFragment)(part)]; + if (partSchema === void 0) + return; + schema2 = partSchema; + const schId = typeof schema2 === "object" && schema2[this.opts.schemaId]; + if (!PREVENT_SCOPE_CHANGE.has(part) && schId) { + baseId = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, schId); + } + } + let env3; + if (typeof schema2 != "boolean" && schema2.$ref && !(0, util_1.schemaHasRulesButRef)(schema2, this.RULES)) { + const $ref = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, schema2.$ref); + env3 = resolveSchema.call(this, root2, $ref); + } + const { schemaId } = this.opts; + env3 = env3 || new SchemaEnv({ schema: schema2, schemaId, root: root2, baseId }); + if (env3.schema !== env3.root.schema) + return env3; + return; + } }); var require_data = __commonJS2((exports, module) => { - var KEYWORDS = [ - "multipleOf", - "maximum", - "exclusiveMaximum", - "minimum", - "exclusiveMinimum", - "maxLength", - "minLength", - "pattern", - "additionalItems", - "maxItems", - "minItems", - "uniqueItems", - "maxProperties", - "minProperties", - "required", - "additionalProperties", - "enum", - "format", - "const" - ]; - module.exports = function(metaSchema, keywordsJsonPointers) { - for (var i = 0; i < keywordsJsonPointers.length; i++) { - metaSchema = JSON.parse(JSON.stringify(metaSchema)); - var segments = keywordsJsonPointers[i].split("/"); - var keywords2 = metaSchema; - var j; - for (j = 1; j < segments.length; j++) - keywords2 = keywords2[segments[j]]; - for (j = 0; j < KEYWORDS.length; j++) { - var key = KEYWORDS[j]; - var schema2 = keywords2[key]; - if (schema2) { - keywords2[key] = { - anyOf: [ - schema2, - { $ref: "https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#" } - ] - }; - } + module.exports = { + $id: "https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#", + description: "Meta-schema for $data reference (JSON AnySchema extension proposal)", + type: "object", + required: ["$data"], + properties: { + $data: { + type: "string", + anyOf: [{ format: "relative-json-pointer" }, { format: "json-pointer" }] } - } - return metaSchema; + }, + additionalProperties: false }; }); -var require_async = __commonJS2((exports, module) => { - var MissingRefError = require_error_classes().MissingRef; - module.exports = compileAsync; - function compileAsync(schema2, meta, callback) { - var self2 = this; - if (typeof this._opts.loadSchema != "function") - throw new Error("options.loadSchema should be a function"); - if (typeof meta == "function") { - callback = meta; - meta = void 0; +var require_scopedChars = __commonJS2((exports, module) => { + var HEX = { + 0: 0, + 1: 1, + 2: 2, + 3: 3, + 4: 4, + 5: 5, + 6: 6, + 7: 7, + 8: 8, + 9: 9, + a: 10, + A: 10, + b: 11, + B: 11, + c: 12, + C: 12, + d: 13, + D: 13, + e: 14, + E: 14, + f: 15, + F: 15 + }; + module.exports = { + HEX + }; +}); +var require_utils3 = __commonJS2((exports, module) => { + var { HEX } = require_scopedChars(); + var IPV4_REG = /^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u; + function normalizeIPv4(host) { + if (findToken(host, ".") < 3) { + return { host, isIPV4: false }; } - var p = loadMetaSchemaOf(schema2).then(function() { - var schemaObj = self2._addSchema(schema2, void 0, meta); - return schemaObj.validate || _compileAsync(schemaObj); - }); - if (callback) { - p.then(function(v) { - callback(null, v); - }, callback); + const matches = host.match(IPV4_REG) || []; + const [address] = matches; + if (address) { + return { host: stripLeadingZeros(address, "."), isIPV4: true }; + } else { + return { host, isIPV4: false }; } - return p; - function loadMetaSchemaOf(sch) { - var $schema = sch.$schema; - return $schema && !self2.getSchema($schema) ? compileAsync.call(self2, { $ref: $schema }, true) : Promise.resolve(); + } + function stringArrayToHexStripped(input, keepZero = false) { + let acc = ""; + let strip = true; + for (const c of input) { + if (HEX[c] === void 0) + return; + if (c !== "0" && strip === true) + strip = false; + if (!strip) + acc += c; } - function _compileAsync(schemaObj) { - try { - return self2._compile(schemaObj); - } catch (e) { - if (e instanceof MissingRefError) - return loadMissingSchema(e); - throw e; - } - function loadMissingSchema(e) { - var ref = e.missingSchema; - if (added(ref)) - throw new Error("Schema " + ref + " is loaded but " + e.missingRef + " cannot be resolved"); - var schemaPromise = self2._loadingSchemas[ref]; - if (!schemaPromise) { - schemaPromise = self2._loadingSchemas[ref] = self2._opts.loadSchema(ref); - schemaPromise.then(removePromise, removePromise); - } - return schemaPromise.then(function(sch) { - if (!added(ref)) { - return loadMetaSchemaOf(sch).then(function() { - if (!added(ref)) - self2.addSchema(sch, ref, void 0, meta); - }); + if (keepZero && acc.length === 0) + acc = "0"; + return acc; + } + function getIPV6(input) { + let tokenCount = 0; + const output = { error: false, address: "", zone: "" }; + const address = []; + const buffer = []; + let isZone = false; + let endipv6Encountered = false; + let endIpv6 = false; + function consume() { + if (buffer.length) { + if (isZone === false) { + const hex4 = stringArrayToHexStripped(buffer); + if (hex4 !== void 0) { + address.push(hex4); + } else { + output.error = true; + return false; } - }).then(function() { - return _compileAsync(schemaObj); - }); - function removePromise() { - delete self2._loadingSchemas[ref]; } - function added(ref2) { - return self2._refs[ref2] || self2._schemas[ref2]; + buffer.length = 0; + } + return true; + } + for (let i = 0; i < input.length; i++) { + const cursor2 = input[i]; + if (cursor2 === "[" || cursor2 === "]") { + continue; + } + if (cursor2 === ":") { + if (endipv6Encountered === true) { + endIpv6 = true; + } + if (!consume()) { + break; + } + tokenCount++; + address.push(":"); + if (tokenCount > 7) { + output.error = true; + break; + } + if (i - 1 >= 0 && input[i - 1] === ":") { + endipv6Encountered = true; + } + continue; + } else if (cursor2 === "%") { + if (!consume()) { + break; + } + isZone = true; + } else { + buffer.push(cursor2); + continue; + } + } + if (buffer.length) { + if (isZone) { + output.zone = buffer.join(""); + } else if (endIpv6) { + address.push(buffer.join("")); + } else { + address.push(stringArrayToHexStripped(buffer)); + } + } + output.address = address.join(""); + return output; + } + function normalizeIPv6(host) { + if (findToken(host, ":") < 2) { + return { host, isIPV6: false }; + } + const ipv622 = getIPV6(host); + if (!ipv622.error) { + let newHost = ipv622.address; + let escapedHost = ipv622.address; + if (ipv622.zone) { + newHost += "%" + ipv622.zone; + escapedHost += "%25" + ipv622.zone; + } + return { host: newHost, escapedHost, isIPV6: true }; + } else { + return { host, isIPV6: false }; + } + } + function stripLeadingZeros(str, token) { + let out = ""; + let skip = true; + const l = str.length; + for (let i = 0; i < l; i++) { + const c = str[i]; + if (c === "0" && skip) { + if (i + 1 <= l && str[i + 1] === token || i + 1 === l) { + out += c; + skip = false; + } + } else { + if (c === token) { + skip = true; + } else { + skip = false; + } + out += c; + } + } + return out; + } + function findToken(str, token) { + let ind = 0; + for (let i = 0; i < str.length; i++) { + if (str[i] === token) + ind++; + } + return ind; + } + var RDS1 = /^\.\.?\//u; + var RDS2 = /^\/\.(?:\/|$)/u; + var RDS3 = /^\/\.\.(?:\/|$)/u; + var RDS5 = /^\/?(?:.|\n)*?(?=\/|$)/u; + function removeDotSegments(input) { + const output = []; + while (input.length) { + if (input.match(RDS1)) { + input = input.replace(RDS1, ""); + } else if (input.match(RDS2)) { + input = input.replace(RDS2, "/"); + } else if (input.match(RDS3)) { + input = input.replace(RDS3, "/"); + output.pop(); + } else if (input === "." || input === "..") { + input = ""; + } else { + const im = input.match(RDS5); + if (im) { + const s = im[0]; + input = input.slice(s.length); + output.push(s); + } else { + throw new Error("Unexpected dot segment condition"); + } + } + } + return output.join(""); + } + function normalizeComponentEncoding(components, esc22) { + const func = esc22 !== true ? escape : unescape; + if (components.scheme !== void 0) { + components.scheme = func(components.scheme); + } + if (components.userinfo !== void 0) { + components.userinfo = func(components.userinfo); + } + if (components.host !== void 0) { + components.host = func(components.host); + } + if (components.path !== void 0) { + components.path = func(components.path); + } + if (components.query !== void 0) { + components.query = func(components.query); + } + if (components.fragment !== void 0) { + components.fragment = func(components.fragment); + } + return components; + } + function recomposeAuthority(components) { + const uriTokens = []; + if (components.userinfo !== void 0) { + uriTokens.push(components.userinfo); + uriTokens.push("@"); + } + if (components.host !== void 0) { + let host = unescape(components.host); + const ipV4res = normalizeIPv4(host); + if (ipV4res.isIPV4) { + host = ipV4res.host; + } else { + const ipV6res = normalizeIPv6(ipV4res.host); + if (ipV6res.isIPV6 === true) { + host = `[${ipV6res.escapedHost}]`; + } else { + host = components.host; + } + } + uriTokens.push(host); + } + if (typeof components.port === "number" || typeof components.port === "string") { + uriTokens.push(":"); + uriTokens.push(String(components.port)); + } + return uriTokens.length ? uriTokens.join("") : void 0; + } + module.exports = { + recomposeAuthority, + normalizeComponentEncoding, + removeDotSegments, + normalizeIPv4, + normalizeIPv6, + stringArrayToHexStripped + }; +}); +var require_schemes = __commonJS2((exports, module) => { + var UUID_REG = /^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu; + var URN_REG = /([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu; + function isSecure(wsComponents) { + return typeof wsComponents.secure === "boolean" ? wsComponents.secure : String(wsComponents.scheme).toLowerCase() === "wss"; + } + function httpParse(components) { + if (!components.host) { + components.error = components.error || "HTTP URIs must have a host."; + } + return components; + } + function httpSerialize(components) { + const secure = String(components.scheme).toLowerCase() === "https"; + if (components.port === (secure ? 443 : 80) || components.port === "") { + components.port = void 0; + } + if (!components.path) { + components.path = "/"; + } + return components; + } + function wsParse(wsComponents) { + wsComponents.secure = isSecure(wsComponents); + wsComponents.resourceName = (wsComponents.path || "/") + (wsComponents.query ? "?" + wsComponents.query : ""); + wsComponents.path = void 0; + wsComponents.query = void 0; + return wsComponents; + } + function wsSerialize(wsComponents) { + if (wsComponents.port === (isSecure(wsComponents) ? 443 : 80) || wsComponents.port === "") { + wsComponents.port = void 0; + } + if (typeof wsComponents.secure === "boolean") { + wsComponents.scheme = wsComponents.secure ? "wss" : "ws"; + wsComponents.secure = void 0; + } + if (wsComponents.resourceName) { + const [path4, query2] = wsComponents.resourceName.split("?"); + wsComponents.path = path4 && path4 !== "/" ? path4 : void 0; + wsComponents.query = query2; + wsComponents.resourceName = void 0; + } + wsComponents.fragment = void 0; + return wsComponents; + } + function urnParse(urnComponents, options) { + if (!urnComponents.path) { + urnComponents.error = "URN can not be parsed"; + return urnComponents; + } + const matches = urnComponents.path.match(URN_REG); + if (matches) { + const scheme = options.scheme || urnComponents.scheme || "urn"; + urnComponents.nid = matches[1].toLowerCase(); + urnComponents.nss = matches[2]; + const urnScheme = `${scheme}:${options.nid || urnComponents.nid}`; + const schemeHandler = SCHEMES[urnScheme]; + urnComponents.path = void 0; + if (schemeHandler) { + urnComponents = schemeHandler.parse(urnComponents, options); + } + } else { + urnComponents.error = urnComponents.error || "URN can not be parsed."; + } + return urnComponents; + } + function urnSerialize(urnComponents, options) { + const scheme = options.scheme || urnComponents.scheme || "urn"; + const nid = urnComponents.nid.toLowerCase(); + const urnScheme = `${scheme}:${options.nid || nid}`; + const schemeHandler = SCHEMES[urnScheme]; + if (schemeHandler) { + urnComponents = schemeHandler.serialize(urnComponents, options); + } + const uriComponents = urnComponents; + const nss = urnComponents.nss; + uriComponents.path = `${nid || options.nid}:${nss}`; + options.skipEscape = true; + return uriComponents; + } + function urnuuidParse(urnComponents, options) { + const uuidComponents = urnComponents; + uuidComponents.uuid = uuidComponents.nss; + uuidComponents.nss = void 0; + if (!options.tolerant && (!uuidComponents.uuid || !UUID_REG.test(uuidComponents.uuid))) { + uuidComponents.error = uuidComponents.error || "UUID is not valid."; + } + return uuidComponents; + } + function urnuuidSerialize(uuidComponents) { + const urnComponents = uuidComponents; + urnComponents.nss = (uuidComponents.uuid || "").toLowerCase(); + return urnComponents; + } + var http2 = { + scheme: "http", + domainHost: true, + parse: httpParse, + serialize: httpSerialize + }; + var https = { + scheme: "https", + domainHost: http2.domainHost, + parse: httpParse, + serialize: httpSerialize + }; + var ws = { + scheme: "ws", + domainHost: true, + parse: wsParse, + serialize: wsSerialize + }; + var wss = { + scheme: "wss", + domainHost: ws.domainHost, + parse: ws.parse, + serialize: ws.serialize + }; + var urn = { + scheme: "urn", + parse: urnParse, + serialize: urnSerialize, + skipNormalize: true + }; + var urnuuid = { + scheme: "urn:uuid", + parse: urnuuidParse, + serialize: urnuuidSerialize, + skipNormalize: true + }; + var SCHEMES = { + http: http2, + https, + ws, + wss, + urn, + "urn:uuid": urnuuid + }; + module.exports = SCHEMES; +}); +var require_fast_uri = __commonJS2((exports, module) => { + var { normalizeIPv6, normalizeIPv4, removeDotSegments, recomposeAuthority, normalizeComponentEncoding } = require_utils3(); + var SCHEMES = require_schemes(); + function normalize2(uri, options) { + if (typeof uri === "string") { + uri = serialize(parse6(uri, options), options); + } else if (typeof uri === "object") { + uri = parse6(serialize(uri, options), options); + } + return uri; + } + function resolve(baseURI, relativeURI, options) { + const schemelessOptions = Object.assign({ scheme: "null" }, options); + const resolved = resolveComponents(parse6(baseURI, schemelessOptions), parse6(relativeURI, schemelessOptions), schemelessOptions, true); + return serialize(resolved, { ...schemelessOptions, skipEscape: true }); + } + function resolveComponents(base, relative, options, skipNormalization) { + const target = {}; + if (!skipNormalization) { + base = parse6(serialize(base, options), options); + relative = parse6(serialize(relative, options), options); + } + options = options || {}; + if (!options.tolerant && relative.scheme) { + target.scheme = relative.scheme; + target.userinfo = relative.userinfo; + target.host = relative.host; + target.port = relative.port; + target.path = removeDotSegments(relative.path || ""); + target.query = relative.query; + } else { + if (relative.userinfo !== void 0 || relative.host !== void 0 || relative.port !== void 0) { + target.userinfo = relative.userinfo; + target.host = relative.host; + target.port = relative.port; + target.path = removeDotSegments(relative.path || ""); + target.query = relative.query; + } else { + if (!relative.path) { + target.path = base.path; + if (relative.query !== void 0) { + target.query = relative.query; + } else { + target.query = base.query; + } + } else { + if (relative.path.charAt(0) === "/") { + target.path = removeDotSegments(relative.path); + } else { + if ((base.userinfo !== void 0 || base.host !== void 0 || base.port !== void 0) && !base.path) { + target.path = "/" + relative.path; + } else if (!base.path) { + target.path = relative.path; + } else { + target.path = base.path.slice(0, base.path.lastIndexOf("/") + 1) + relative.path; + } + target.path = removeDotSegments(target.path); + } + target.query = relative.query; + } + target.userinfo = base.userinfo; + target.host = base.host; + target.port = base.port; + } + target.scheme = base.scheme; + } + target.fragment = relative.fragment; + return target; + } + function equal(uriA, uriB, options) { + if (typeof uriA === "string") { + uriA = unescape(uriA); + uriA = serialize(normalizeComponentEncoding(parse6(uriA, options), true), { ...options, skipEscape: true }); + } else if (typeof uriA === "object") { + uriA = serialize(normalizeComponentEncoding(uriA, true), { ...options, skipEscape: true }); + } + if (typeof uriB === "string") { + uriB = unescape(uriB); + uriB = serialize(normalizeComponentEncoding(parse6(uriB, options), true), { ...options, skipEscape: true }); + } else if (typeof uriB === "object") { + uriB = serialize(normalizeComponentEncoding(uriB, true), { ...options, skipEscape: true }); + } + return uriA.toLowerCase() === uriB.toLowerCase(); + } + function serialize(cmpts, opts) { + const components = { + host: cmpts.host, + scheme: cmpts.scheme, + userinfo: cmpts.userinfo, + port: cmpts.port, + path: cmpts.path, + query: cmpts.query, + nid: cmpts.nid, + nss: cmpts.nss, + uuid: cmpts.uuid, + fragment: cmpts.fragment, + reference: cmpts.reference, + resourceName: cmpts.resourceName, + secure: cmpts.secure, + error: "" + }; + const options = Object.assign({}, opts); + const uriTokens = []; + const schemeHandler = SCHEMES[(options.scheme || components.scheme || "").toLowerCase()]; + if (schemeHandler && schemeHandler.serialize) + schemeHandler.serialize(components, options); + if (components.path !== void 0) { + if (!options.skipEscape) { + components.path = escape(components.path); + if (components.scheme !== void 0) { + components.path = components.path.split("%3A").join(":"); + } + } else { + components.path = unescape(components.path); + } + } + if (options.reference !== "suffix" && components.scheme) { + uriTokens.push(components.scheme, ":"); + } + const authority = recomposeAuthority(components); + if (authority !== void 0) { + if (options.reference !== "suffix") { + uriTokens.push("//"); + } + uriTokens.push(authority); + if (components.path && components.path.charAt(0) !== "/") { + uriTokens.push("/"); + } + } + if (components.path !== void 0) { + let s = components.path; + if (!options.absolutePath && (!schemeHandler || !schemeHandler.absolutePath)) { + s = removeDotSegments(s); + } + if (authority === void 0) { + s = s.replace(/^\/\//u, "/%2F"); + } + uriTokens.push(s); + } + if (components.query !== void 0) { + uriTokens.push("?", components.query); + } + if (components.fragment !== void 0) { + uriTokens.push("#", components.fragment); + } + return uriTokens.join(""); + } + var hexLookUp = Array.from({ length: 127 }, (_v, k) => /[^!"$&'()*+,\-.;=_`a-z{}~]/u.test(String.fromCharCode(k))); + function nonSimpleDomain(value2) { + let code = 0; + for (let i = 0, len = value2.length; i < len; ++i) { + code = value2.charCodeAt(i); + if (code > 126 || hexLookUp[code]) { + return true; + } + } + return false; + } + var URI_PARSE = /^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u; + function parse6(uri, opts) { + const options = Object.assign({}, opts); + const parsed2 = { + scheme: void 0, + userinfo: void 0, + host: "", + port: void 0, + path: "", + query: void 0, + fragment: void 0 + }; + const gotEncoding = uri.indexOf("%") !== -1; + let isIP = false; + if (options.reference === "suffix") + uri = (options.scheme ? options.scheme + ":" : "") + "//" + uri; + const matches = uri.match(URI_PARSE); + if (matches) { + parsed2.scheme = matches[1]; + parsed2.userinfo = matches[3]; + parsed2.host = matches[4]; + parsed2.port = parseInt(matches[5], 10); + parsed2.path = matches[6] || ""; + parsed2.query = matches[7]; + parsed2.fragment = matches[8]; + if (isNaN(parsed2.port)) { + parsed2.port = matches[5]; + } + if (parsed2.host) { + const ipv4result = normalizeIPv4(parsed2.host); + if (ipv4result.isIPV4 === false) { + const ipv6result = normalizeIPv6(ipv4result.host); + parsed2.host = ipv6result.host.toLowerCase(); + isIP = ipv6result.isIPV6; + } else { + parsed2.host = ipv4result.host; + isIP = true; + } + } + if (parsed2.scheme === void 0 && parsed2.userinfo === void 0 && parsed2.host === void 0 && parsed2.port === void 0 && parsed2.query === void 0 && !parsed2.path) { + parsed2.reference = "same-document"; + } else if (parsed2.scheme === void 0) { + parsed2.reference = "relative"; + } else if (parsed2.fragment === void 0) { + parsed2.reference = "absolute"; + } else { + parsed2.reference = "uri"; + } + if (options.reference && options.reference !== "suffix" && options.reference !== parsed2.reference) { + parsed2.error = parsed2.error || "URI is not a " + options.reference + " reference."; + } + const schemeHandler = SCHEMES[(options.scheme || parsed2.scheme || "").toLowerCase()]; + if (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport)) { + if (parsed2.host && (options.domainHost || schemeHandler && schemeHandler.domainHost) && isIP === false && nonSimpleDomain(parsed2.host)) { + try { + parsed2.host = URL.domainToASCII(parsed2.host.toLowerCase()); + } catch (e) { + parsed2.error = parsed2.error || "Host's domain name can not be converted to ASCII: " + e; + } + } + } + if (!schemeHandler || schemeHandler && !schemeHandler.skipNormalize) { + if (gotEncoding && parsed2.scheme !== void 0) { + parsed2.scheme = unescape(parsed2.scheme); + } + if (gotEncoding && parsed2.host !== void 0) { + parsed2.host = unescape(parsed2.host); + } + if (parsed2.path) { + parsed2.path = escape(unescape(parsed2.path)); + } + if (parsed2.fragment) { + parsed2.fragment = encodeURI(decodeURIComponent(parsed2.fragment)); + } + } + if (schemeHandler && schemeHandler.parse) { + schemeHandler.parse(parsed2, options); + } + } else { + parsed2.error = parsed2.error || "URI can not be parsed."; + } + return parsed2; + } + var fastUri = { + SCHEMES, + normalize: normalize2, + resolve, + resolveComponents, + equal, + serialize, + parse: parse6 + }; + module.exports = fastUri; + module.exports.default = fastUri; + module.exports.fastUri = fastUri; +}); +var require_uri = __commonJS2((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + var uri = require_fast_uri(); + uri.code = 'require("ajv/dist/runtime/uri").default'; + exports.default = uri; +}); +var require_core2 = __commonJS2((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.CodeGen = exports.Name = exports.nil = exports.stringify = exports.str = exports._ = exports.KeywordCxt = void 0; + var validate_1 = require_validate(); + Object.defineProperty(exports, "KeywordCxt", { enumerable: true, get: function() { + return validate_1.KeywordCxt; + } }); + var codegen_1 = require_codegen(); + Object.defineProperty(exports, "_", { enumerable: true, get: function() { + return codegen_1._; + } }); + Object.defineProperty(exports, "str", { enumerable: true, get: function() { + return codegen_1.str; + } }); + Object.defineProperty(exports, "stringify", { enumerable: true, get: function() { + return codegen_1.stringify; + } }); + Object.defineProperty(exports, "nil", { enumerable: true, get: function() { + return codegen_1.nil; + } }); + Object.defineProperty(exports, "Name", { enumerable: true, get: function() { + return codegen_1.Name; + } }); + Object.defineProperty(exports, "CodeGen", { enumerable: true, get: function() { + return codegen_1.CodeGen; + } }); + var validation_error_1 = require_validation_error(); + var ref_error_1 = require_ref_error(); + var rules_1 = require_rules(); + var compile_1 = require_compile(); + var codegen_2 = require_codegen(); + var resolve_1 = require_resolve(); + var dataType_1 = require_dataType(); + var util_1 = require_util8(); + var $dataRefSchema = require_data(); + var uri_1 = require_uri(); + var defaultRegExp = (str, flags) => new RegExp(str, flags); + defaultRegExp.code = "new RegExp"; + var META_IGNORE_OPTIONS = ["removeAdditional", "useDefaults", "coerceTypes"]; + var EXT_SCOPE_NAMES = /* @__PURE__ */ new Set([ + "validate", + "serialize", + "parse", + "wrapper", + "root", + "schema", + "keyword", + "pattern", + "formats", + "validate$data", + "func", + "obj", + "Error" + ]); + var removedOptions = { + errorDataPath: "", + format: "`validateFormats: false` can be used instead.", + nullable: '"nullable" keyword is supported by default.', + jsonPointers: "Deprecated jsPropertySyntax can be used instead.", + extendRefs: "Deprecated ignoreKeywordsWithRef can be used instead.", + missingRefs: "Pass empty schema with $id that should be ignored to ajv.addSchema.", + processCode: "Use option `code: {process: (code, schemaEnv: object) => string}`", + sourceCode: "Use option `code: {source: true}`", + strictDefaults: "It is default now, see option `strict`.", + strictKeywords: "It is default now, see option `strict`.", + uniqueItems: '"uniqueItems" keyword is always validated.', + unknownFormats: "Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).", + cache: "Map is used as cache, schema object as key.", + serialize: "Map is used as cache, schema object as key.", + ajvErrors: "It is default now." + }; + var deprecatedOptions = { + ignoreKeywordsWithRef: "", + jsPropertySyntax: "", + unicode: '"minLength"/"maxLength" account for unicode characters by default.' + }; + var MAX_EXPRESSION = 200; + function requiredOptions(o) { + var _a2, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0; + const s = o.strict; + const _optz = (_a2 = o.code) === null || _a2 === void 0 ? void 0 : _a2.optimize; + const optimize = _optz === true || _optz === void 0 ? 1 : _optz || 0; + const regExp = (_c = (_b = o.code) === null || _b === void 0 ? void 0 : _b.regExp) !== null && _c !== void 0 ? _c : defaultRegExp; + const uriResolver = (_d = o.uriResolver) !== null && _d !== void 0 ? _d : uri_1.default; + return { + strictSchema: (_f = (_e = o.strictSchema) !== null && _e !== void 0 ? _e : s) !== null && _f !== void 0 ? _f : true, + strictNumbers: (_h = (_g = o.strictNumbers) !== null && _g !== void 0 ? _g : s) !== null && _h !== void 0 ? _h : true, + strictTypes: (_k = (_j = o.strictTypes) !== null && _j !== void 0 ? _j : s) !== null && _k !== void 0 ? _k : "log", + strictTuples: (_m = (_l = o.strictTuples) !== null && _l !== void 0 ? _l : s) !== null && _m !== void 0 ? _m : "log", + strictRequired: (_p = (_o = o.strictRequired) !== null && _o !== void 0 ? _o : s) !== null && _p !== void 0 ? _p : false, + code: o.code ? { ...o.code, optimize, regExp } : { optimize, regExp }, + loopRequired: (_q = o.loopRequired) !== null && _q !== void 0 ? _q : MAX_EXPRESSION, + loopEnum: (_r = o.loopEnum) !== null && _r !== void 0 ? _r : MAX_EXPRESSION, + meta: (_s = o.meta) !== null && _s !== void 0 ? _s : true, + messages: (_t = o.messages) !== null && _t !== void 0 ? _t : true, + inlineRefs: (_u = o.inlineRefs) !== null && _u !== void 0 ? _u : true, + schemaId: (_v = o.schemaId) !== null && _v !== void 0 ? _v : "$id", + addUsedSchema: (_w = o.addUsedSchema) !== null && _w !== void 0 ? _w : true, + validateSchema: (_x = o.validateSchema) !== null && _x !== void 0 ? _x : true, + validateFormats: (_y = o.validateFormats) !== null && _y !== void 0 ? _y : true, + unicodeRegExp: (_z = o.unicodeRegExp) !== null && _z !== void 0 ? _z : true, + int32range: (_0 = o.int32range) !== null && _0 !== void 0 ? _0 : true, + uriResolver + }; + } + class Ajv2 { + constructor(opts = {}) { + this.schemas = {}; + this.refs = {}; + this.formats = {}; + this._compilations = /* @__PURE__ */ new Set(); + this._loading = {}; + this._cache = /* @__PURE__ */ new Map(); + opts = this.opts = { ...opts, ...requiredOptions(opts) }; + const { es5, lines } = this.opts.code; + this.scope = new codegen_2.ValueScope({ scope: {}, prefixes: EXT_SCOPE_NAMES, es5, lines }); + this.logger = getLogger(opts.logger); + const formatOpt = opts.validateFormats; + opts.validateFormats = false; + this.RULES = (0, rules_1.getRules)(); + checkOptions.call(this, removedOptions, opts, "NOT SUPPORTED"); + checkOptions.call(this, deprecatedOptions, opts, "DEPRECATED", "warn"); + this._metaOpts = getMetaSchemaOptions.call(this); + if (opts.formats) + addInitialFormats.call(this); + this._addVocabularies(); + this._addDefaultMetaSchema(); + if (opts.keywords) + addInitialKeywords.call(this, opts.keywords); + if (typeof opts.meta == "object") + this.addMetaSchema(opts.meta); + addInitialSchemas.call(this); + opts.validateFormats = formatOpt; + } + _addVocabularies() { + this.addKeyword("$async"); + } + _addDefaultMetaSchema() { + const { $data, meta: meta3, schemaId } = this.opts; + let _dataRefSchema = $dataRefSchema; + if (schemaId === "id") { + _dataRefSchema = { ...$dataRefSchema }; + _dataRefSchema.id = _dataRefSchema.$id; + delete _dataRefSchema.$id; + } + if (meta3 && $data) + this.addMetaSchema(_dataRefSchema, _dataRefSchema[schemaId], false); + } + defaultMeta() { + const { meta: meta3, schemaId } = this.opts; + return this.opts.defaultMeta = typeof meta3 == "object" ? meta3[schemaId] || meta3 : void 0; + } + validate(schemaKeyRef, data) { + let v; + if (typeof schemaKeyRef == "string") { + v = this.getSchema(schemaKeyRef); + if (!v) + throw new Error(`no schema with key or ref "${schemaKeyRef}"`); + } else { + v = this.compile(schemaKeyRef); + } + const valid = v(data); + if (!("$async" in v)) + this.errors = v.errors; + return valid; + } + compile(schema2, _meta) { + const sch = this._addSchema(schema2, _meta); + return sch.validate || this._compileSchemaEnv(sch); + } + compileAsync(schema2, meta3) { + if (typeof this.opts.loadSchema != "function") { + throw new Error("options.loadSchema should be a function"); + } + const { loadSchema } = this.opts; + return runCompileAsync.call(this, schema2, meta3); + async function runCompileAsync(_schema, _meta) { + await loadMetaSchema.call(this, _schema.$schema); + const sch = this._addSchema(_schema, _meta); + return sch.validate || _compileAsync.call(this, sch); + } + async function loadMetaSchema($ref) { + if ($ref && !this.getSchema($ref)) { + await runCompileAsync.call(this, { $ref }, true); + } + } + async function _compileAsync(sch) { + try { + return this._compileSchemaEnv(sch); + } catch (e) { + if (!(e instanceof ref_error_1.default)) + throw e; + checkLoaded.call(this, e); + await loadMissingSchema.call(this, e.missingSchema); + return _compileAsync.call(this, sch); + } + } + function checkLoaded({ missingSchema: ref, missingRef }) { + if (this.refs[ref]) { + throw new Error(`AnySchema ${ref} is loaded but ${missingRef} cannot be resolved`); + } + } + async function loadMissingSchema(ref) { + const _schema = await _loadSchema.call(this, ref); + if (!this.refs[ref]) + await loadMetaSchema.call(this, _schema.$schema); + if (!this.refs[ref]) + this.addSchema(_schema, ref, meta3); + } + async function _loadSchema(ref) { + const p = this._loading[ref]; + if (p) + return p; + try { + return await (this._loading[ref] = loadSchema(ref)); + } finally { + delete this._loading[ref]; + } + } + } + addSchema(schema2, key, _meta, _validateSchema = this.opts.validateSchema) { + if (Array.isArray(schema2)) { + for (const sch of schema2) + this.addSchema(sch, void 0, _meta, _validateSchema); + return this; + } + let id; + if (typeof schema2 === "object") { + const { schemaId } = this.opts; + id = schema2[schemaId]; + if (id !== void 0 && typeof id != "string") { + throw new Error(`schema ${schemaId} must be string`); + } + } + key = (0, resolve_1.normalizeId)(key || id); + this._checkUnique(key); + this.schemas[key] = this._addSchema(schema2, _meta, key, _validateSchema, true); + return this; + } + addMetaSchema(schema2, key, _validateSchema = this.opts.validateSchema) { + this.addSchema(schema2, key, true, _validateSchema); + return this; + } + validateSchema(schema2, throwOrLogError) { + if (typeof schema2 == "boolean") + return true; + let $schema; + $schema = schema2.$schema; + if ($schema !== void 0 && typeof $schema != "string") { + throw new Error("$schema must be a string"); + } + $schema = $schema || this.opts.defaultMeta || this.defaultMeta(); + if (!$schema) { + this.logger.warn("meta-schema not available"); + this.errors = null; + return true; + } + const valid = this.validate($schema, schema2); + if (!valid && throwOrLogError) { + const message = "schema is invalid: " + this.errorsText(); + if (this.opts.validateSchema === "log") + this.logger.error(message); + else + throw new Error(message); + } + return valid; + } + getSchema(keyRef) { + let sch; + while (typeof (sch = getSchEnv.call(this, keyRef)) == "string") + keyRef = sch; + if (sch === void 0) { + const { schemaId } = this.opts; + const root2 = new compile_1.SchemaEnv({ schema: {}, schemaId }); + sch = compile_1.resolveSchema.call(this, root2, keyRef); + if (!sch) + return; + this.refs[keyRef] = sch; + } + return sch.validate || this._compileSchemaEnv(sch); + } + removeSchema(schemaKeyRef) { + if (schemaKeyRef instanceof RegExp) { + this._removeAllSchemas(this.schemas, schemaKeyRef); + this._removeAllSchemas(this.refs, schemaKeyRef); + return this; + } + switch (typeof schemaKeyRef) { + case "undefined": + this._removeAllSchemas(this.schemas); + this._removeAllSchemas(this.refs); + this._cache.clear(); + return this; + case "string": { + const sch = getSchEnv.call(this, schemaKeyRef); + if (typeof sch == "object") + this._cache.delete(sch.schema); + delete this.schemas[schemaKeyRef]; + delete this.refs[schemaKeyRef]; + return this; + } + case "object": { + const cacheKey = schemaKeyRef; + this._cache.delete(cacheKey); + let id = schemaKeyRef[this.opts.schemaId]; + if (id) { + id = (0, resolve_1.normalizeId)(id); + delete this.schemas[id]; + delete this.refs[id]; + } + return this; + } + default: + throw new Error("ajv.removeSchema: invalid parameter"); + } + } + addVocabulary(definitions) { + for (const def of definitions) + this.addKeyword(def); + return this; + } + addKeyword(kwdOrDef, def) { + let keyword; + if (typeof kwdOrDef == "string") { + keyword = kwdOrDef; + if (typeof def == "object") { + this.logger.warn("these parameters are deprecated, see docs for addKeyword"); + def.keyword = keyword; + } + } else if (typeof kwdOrDef == "object" && def === void 0) { + def = kwdOrDef; + keyword = def.keyword; + if (Array.isArray(keyword) && !keyword.length) { + throw new Error("addKeywords: keyword must be string or non-empty array"); + } + } else { + throw new Error("invalid addKeywords parameters"); + } + checkKeyword.call(this, keyword, def); + if (!def) { + (0, util_1.eachItem)(keyword, (kwd) => addRule.call(this, kwd)); + return this; + } + keywordMetaschema.call(this, def); + const definition = { + ...def, + type: (0, dataType_1.getJSONTypes)(def.type), + schemaType: (0, dataType_1.getJSONTypes)(def.schemaType) + }; + (0, util_1.eachItem)(keyword, definition.type.length === 0 ? (k) => addRule.call(this, k, definition) : (k) => definition.type.forEach((t) => addRule.call(this, k, definition, t))); + return this; + } + getKeyword(keyword) { + const rule = this.RULES.all[keyword]; + return typeof rule == "object" ? rule.definition : !!rule; + } + removeKeyword(keyword) { + const { RULES } = this; + delete RULES.keywords[keyword]; + delete RULES.all[keyword]; + for (const group2 of RULES.rules) { + const i = group2.rules.findIndex((rule) => rule.keyword === keyword); + if (i >= 0) + group2.rules.splice(i, 1); + } + return this; + } + addFormat(name, format2) { + if (typeof format2 == "string") + format2 = new RegExp(format2); + this.formats[name] = format2; + return this; + } + errorsText(errors3 = this.errors, { separator: separator2 = ", ", dataVar = "data" } = {}) { + if (!errors3 || errors3.length === 0) + return "No errors"; + return errors3.map((e) => `${dataVar}${e.instancePath} ${e.message}`).reduce((text, msg) => text + separator2 + msg); + } + $dataMetaSchema(metaSchema, keywordsJsonPointers) { + const rules = this.RULES.all; + metaSchema = JSON.parse(JSON.stringify(metaSchema)); + for (const jsonPointer of keywordsJsonPointers) { + const segments = jsonPointer.split("/").slice(1); + let keywords2 = metaSchema; + for (const seg of segments) + keywords2 = keywords2[seg]; + for (const key in rules) { + const rule = rules[key]; + if (typeof rule != "object") + continue; + const { $data } = rule.definition; + const schema2 = keywords2[key]; + if ($data && schema2) + keywords2[key] = schemaOrData(schema2); + } + } + return metaSchema; + } + _removeAllSchemas(schemas4, regex4) { + for (const keyRef in schemas4) { + const sch = schemas4[keyRef]; + if (!regex4 || regex4.test(keyRef)) { + if (typeof sch == "string") { + delete schemas4[keyRef]; + } else if (sch && !sch.meta) { + this._cache.delete(sch.schema); + delete schemas4[keyRef]; + } + } + } + } + _addSchema(schema2, meta3, baseId, validateSchema = this.opts.validateSchema, addSchema = this.opts.addUsedSchema) { + let id; + const { schemaId } = this.opts; + if (typeof schema2 == "object") { + id = schema2[schemaId]; + } else { + if (this.opts.jtd) + throw new Error("schema must be object"); + else if (typeof schema2 != "boolean") + throw new Error("schema must be object or boolean"); + } + let sch = this._cache.get(schema2); + if (sch !== void 0) + return sch; + baseId = (0, resolve_1.normalizeId)(id || baseId); + const localRefs = resolve_1.getSchemaRefs.call(this, schema2, baseId); + sch = new compile_1.SchemaEnv({ schema: schema2, schemaId, meta: meta3, baseId, localRefs }); + this._cache.set(sch.schema, sch); + if (addSchema && !baseId.startsWith("#")) { + if (baseId) + this._checkUnique(baseId); + this.refs[baseId] = sch; + } + if (validateSchema) + this.validateSchema(schema2, true); + return sch; + } + _checkUnique(id) { + if (this.schemas[id] || this.refs[id]) { + throw new Error(`schema with key or id "${id}" already exists`); + } + } + _compileSchemaEnv(sch) { + if (sch.meta) + this._compileMetaSchema(sch); + else + compile_1.compileSchema.call(this, sch); + if (!sch.validate) + throw new Error("ajv implementation error"); + return sch.validate; + } + _compileMetaSchema(sch) { + const currentOpts = this.opts; + this.opts = this._metaOpts; + try { + compile_1.compileSchema.call(this, sch); + } finally { + this.opts = currentOpts; + } + } + } + Ajv2.ValidationError = validation_error_1.default; + Ajv2.MissingRefError = ref_error_1.default; + exports.default = Ajv2; + function checkOptions(checkOpts, options, msg, log2 = "error") { + for (const key in checkOpts) { + const opt = key; + if (opt in options) + this.logger[log2](`${msg}: option ${key}. ${checkOpts[opt]}`); + } + } + function getSchEnv(keyRef) { + keyRef = (0, resolve_1.normalizeId)(keyRef); + return this.schemas[keyRef] || this.refs[keyRef]; + } + function addInitialSchemas() { + const optsSchemas = this.opts.schemas; + if (!optsSchemas) + return; + if (Array.isArray(optsSchemas)) + this.addSchema(optsSchemas); + else + for (const key in optsSchemas) + this.addSchema(optsSchemas[key], key); + } + function addInitialFormats() { + for (const name in this.opts.formats) { + const format2 = this.opts.formats[name]; + if (format2) + this.addFormat(name, format2); + } + } + function addInitialKeywords(defs) { + if (Array.isArray(defs)) { + this.addVocabulary(defs); + return; + } + this.logger.warn("keywords option as map is deprecated, pass array"); + for (const keyword in defs) { + const def = defs[keyword]; + if (!def.keyword) + def.keyword = keyword; + this.addKeyword(def); + } + } + function getMetaSchemaOptions() { + const metaOpts = { ...this.opts }; + for (const opt of META_IGNORE_OPTIONS) + delete metaOpts[opt]; + return metaOpts; + } + var noLogs = { log() { + }, warn() { + }, error() { + } }; + function getLogger(logger) { + if (logger === false) + return noLogs; + if (logger === void 0) + return console; + if (logger.log && logger.warn && logger.error) + return logger; + throw new Error("logger must implement log, warn and error methods"); + } + var KEYWORD_NAME = /^[a-z_$][a-z0-9_$:-]*$/i; + function checkKeyword(keyword, def) { + const { RULES } = this; + (0, util_1.eachItem)(keyword, (kwd) => { + if (RULES.keywords[kwd]) + throw new Error(`Keyword ${kwd} is already defined`); + if (!KEYWORD_NAME.test(kwd)) + throw new Error(`Keyword ${kwd} has invalid name`); + }); + if (!def) + return; + if (def.$data && !("code" in def || "validate" in def)) { + throw new Error('$data keyword must have "code" or "validate" function'); + } + } + function addRule(keyword, definition, dataType) { + var _a2; + const post = definition === null || definition === void 0 ? void 0 : definition.post; + if (dataType && post) + throw new Error('keyword with "post" flag cannot have "type"'); + const { RULES } = this; + let ruleGroup = post ? RULES.post : RULES.rules.find(({ type: t }) => t === dataType); + if (!ruleGroup) { + ruleGroup = { type: dataType, rules: [] }; + RULES.rules.push(ruleGroup); + } + RULES.keywords[keyword] = true; + if (!definition) + return; + const rule = { + keyword, + definition: { + ...definition, + type: (0, dataType_1.getJSONTypes)(definition.type), + schemaType: (0, dataType_1.getJSONTypes)(definition.schemaType) + } + }; + if (definition.before) + addBeforeRule.call(this, ruleGroup, rule, definition.before); + else + ruleGroup.rules.push(rule); + RULES.all[keyword] = rule; + (_a2 = definition.implements) === null || _a2 === void 0 || _a2.forEach((kwd) => this.addKeyword(kwd)); + } + function addBeforeRule(ruleGroup, rule, before) { + const i = ruleGroup.rules.findIndex((_rule) => _rule.keyword === before); + if (i >= 0) { + ruleGroup.rules.splice(i, 0, rule); + } else { + ruleGroup.rules.push(rule); + this.logger.warn(`rule ${before} is not defined`); + } + } + function keywordMetaschema(def) { + let { metaSchema } = def; + if (metaSchema === void 0) + return; + if (def.$data && this.opts.$data) + metaSchema = schemaOrData(metaSchema); + def.validateSchema = this.compile(metaSchema, true); + } + var $dataRef = { + $ref: "https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#" + }; + function schemaOrData(schema2) { + return { anyOf: [schema2, $dataRef] }; + } +}); +var require_id = __commonJS2((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + var def = { + keyword: "id", + code() { + throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID'); + } + }; + exports.default = def; +}); +var require_ref = __commonJS2((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.callRef = exports.getValidate = void 0; + var ref_error_1 = require_ref_error(); + var code_1 = require_code2(); + var codegen_1 = require_codegen(); + var names_1 = require_names(); + var compile_1 = require_compile(); + var util_1 = require_util8(); + var def = { + keyword: "$ref", + schemaType: "string", + code(cxt) { + const { gen, schema: $ref, it } = cxt; + const { baseId, schemaEnv: env3, validateName, opts, self: self2 } = it; + const { root: root2 } = env3; + if (($ref === "#" || $ref === "#/") && baseId === root2.baseId) + return callRootRef(); + const schOrEnv = compile_1.resolveRef.call(self2, root2, baseId, $ref); + if (schOrEnv === void 0) + throw new ref_error_1.default(it.opts.uriResolver, baseId, $ref); + if (schOrEnv instanceof compile_1.SchemaEnv) + return callValidate(schOrEnv); + return inlineRefSchema(schOrEnv); + function callRootRef() { + if (env3 === root2) + return callRef(cxt, validateName, env3, env3.$async); + const rootName = gen.scopeValue("root", { ref: root2 }); + return callRef(cxt, (0, codegen_1._)`${rootName}.validate`, root2, root2.$async); + } + function callValidate(sch) { + const v = getValidate(cxt, sch); + callRef(cxt, v, sch, sch.$async); + } + function inlineRefSchema(sch) { + const schName = gen.scopeValue("schema", opts.code.source === true ? { ref: sch, code: (0, codegen_1.stringify)(sch) } : { ref: sch }); + const valid = gen.name("valid"); + const schCxt = cxt.subschema({ + schema: sch, + dataTypes: [], + schemaPath: codegen_1.nil, + topSchemaRef: schName, + errSchemaPath: $ref + }, valid); + cxt.mergeEvaluated(schCxt); + cxt.ok(valid); + } + } + }; + function getValidate(cxt, sch) { + const { gen } = cxt; + return sch.validate ? gen.scopeValue("validate", { ref: sch.validate }) : (0, codegen_1._)`${gen.scopeValue("wrapper", { ref: sch })}.validate`; + } + exports.getValidate = getValidate; + function callRef(cxt, v, sch, $async) { + const { gen, it } = cxt; + const { allErrors, schemaEnv: env3, opts } = it; + const passCxt = opts.passContext ? names_1.default.this : codegen_1.nil; + if ($async) + callAsyncRef(); + else + callSyncRef(); + function callAsyncRef() { + if (!env3.$async) + throw new Error("async schema referenced by sync schema"); + const valid = gen.let("valid"); + gen.try(() => { + gen.code((0, codegen_1._)`await ${(0, code_1.callValidateCode)(cxt, v, passCxt)}`); + addEvaluatedFrom(v); + if (!allErrors) + gen.assign(valid, true); + }, (e) => { + gen.if((0, codegen_1._)`!(${e} instanceof ${it.ValidationError})`, () => gen.throw(e)); + addErrorsFrom(e); + if (!allErrors) + gen.assign(valid, false); + }); + cxt.ok(valid); + } + function callSyncRef() { + cxt.result((0, code_1.callValidateCode)(cxt, v, passCxt), () => addEvaluatedFrom(v), () => addErrorsFrom(v)); + } + function addErrorsFrom(source) { + const errs = (0, codegen_1._)`${source}.errors`; + gen.assign(names_1.default.vErrors, (0, codegen_1._)`${names_1.default.vErrors} === null ? ${errs} : ${names_1.default.vErrors}.concat(${errs})`); + gen.assign(names_1.default.errors, (0, codegen_1._)`${names_1.default.vErrors}.length`); + } + function addEvaluatedFrom(source) { + var _a2; + if (!it.opts.unevaluated) + return; + const schEvaluated = (_a2 = sch === null || sch === void 0 ? void 0 : sch.validate) === null || _a2 === void 0 ? void 0 : _a2.evaluated; + if (it.props !== true) { + if (schEvaluated && !schEvaluated.dynamicProps) { + if (schEvaluated.props !== void 0) { + it.props = util_1.mergeEvaluated.props(gen, schEvaluated.props, it.props); + } + } else { + const props = gen.var("props", (0, codegen_1._)`${source}.evaluated.props`); + it.props = util_1.mergeEvaluated.props(gen, props, it.props, codegen_1.Name); + } + } + if (it.items !== true) { + if (schEvaluated && !schEvaluated.dynamicItems) { + if (schEvaluated.items !== void 0) { + it.items = util_1.mergeEvaluated.items(gen, schEvaluated.items, it.items); + } + } else { + const items = gen.var("items", (0, codegen_1._)`${source}.evaluated.items`); + it.items = util_1.mergeEvaluated.items(gen, items, it.items, codegen_1.Name); } } } } + exports.callRef = callRef; + exports.default = def; }); -var require_custom = __commonJS2((exports, module) => { - module.exports = function generate_custom(it, $keyword, $ruleType) { - var out = " "; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + "/" + $keyword; - var $breakOnError = !it.opts.allErrors; - var $errorKeyword; - var $data = "data" + ($dataLvl || ""); - var $valid = "valid" + $lvl; - var $errs = "errs__" + $lvl; - var $isData = it.opts.$data && $schema && $schema.$data, $schemaValue; - if ($isData) { - out += " var schema" + $lvl + " = " + it.util.getData($schema.$data, $dataLvl, it.dataPathArr) + "; "; - $schemaValue = "schema" + $lvl; - } else { - $schemaValue = $schema; - } - var $rule = this, $definition = "definition" + $lvl, $rDef = $rule.definition, $closingBraces = ""; - var $compile, $inline, $macro, $ruleValidate, $validateCode; - if ($isData && $rDef.$data) { - $validateCode = "keywordValidate" + $lvl; - var $validateSchema = $rDef.validateSchema; - out += " var " + $definition + " = RULES.custom['" + $keyword + "'].definition; var " + $validateCode + " = " + $definition + ".validate;"; - } else { - $ruleValidate = it.useCustomRule($rule, $schema, it.schema, it); - if (!$ruleValidate) - return; - $schemaValue = "validate.schema" + $schemaPath; - $validateCode = $ruleValidate.code; - $compile = $rDef.compile; - $inline = $rDef.inline; - $macro = $rDef.macro; - } - var $ruleErrs = $validateCode + ".errors", $i = "i" + $lvl, $ruleErr = "ruleErr" + $lvl, $asyncKeyword = $rDef.async; - if ($asyncKeyword && !it.async) - throw new Error("async keyword in sync schema"); - if (!($inline || $macro)) { - out += "" + $ruleErrs + " = null;"; - } - out += "var " + $errs + " = errors;var " + $valid + ";"; - if ($isData && $rDef.$data) { - $closingBraces += "}"; - out += " if (" + $schemaValue + " === undefined) { " + $valid + " = true; } else { "; - if ($validateSchema) { - $closingBraces += "}"; - out += " " + $valid + " = " + $definition + ".validateSchema(" + $schemaValue + "); if (" + $valid + ") { "; - } - } - if ($inline) { - if ($rDef.statements) { - out += " " + $ruleValidate.validate + " "; - } else { - out += " " + $valid + " = " + $ruleValidate.validate + "; "; - } - } else if ($macro) { - var $it = it.util.copy(it); - var $closingBraces = ""; - $it.level++; - var $nextValid = "valid" + $it.level; - $it.schema = $ruleValidate.validate; - $it.schemaPath = ""; - var $wasComposite = it.compositeRule; - it.compositeRule = $it.compositeRule = true; - var $code = it.validate($it).replace(/validate\.schema/g, $validateCode); - it.compositeRule = $it.compositeRule = $wasComposite; - out += " " + $code; - } else { - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ""; - out += " " + $validateCode + ".call( "; - if (it.opts.passContext) { - out += "this"; - } else { - out += "self"; - } - if ($compile || $rDef.schema === false) { - out += " , " + $data + " "; - } else { - out += " , " + $schemaValue + " , " + $data + " , validate.schema" + it.schemaPath + " "; - } - out += " , (dataPath || '')"; - if (it.errorPath != '""') { - out += " + " + it.errorPath; - } - var $parentData = $dataLvl ? "data" + ($dataLvl - 1 || "") : "parentData", $parentDataProperty = $dataLvl ? it.dataPathArr[$dataLvl] : "parentDataProperty"; - out += " , " + $parentData + " , " + $parentDataProperty + " , rootData ) "; - var def_callRuleValidate = out; - out = $$outStack.pop(); - if ($rDef.errors === false) { - out += " " + $valid + " = "; - if ($asyncKeyword) { - out += "await "; - } - out += "" + def_callRuleValidate + "; "; - } else { - if ($asyncKeyword) { - $ruleErrs = "customErrors" + $lvl; - out += " var " + $ruleErrs + " = null; try { " + $valid + " = await " + def_callRuleValidate + "; } catch (e) { " + $valid + " = false; if (e instanceof ValidationError) " + $ruleErrs + " = e.errors; else throw e; } "; - } else { - out += " " + $ruleErrs + " = null; " + $valid + " = " + def_callRuleValidate + "; "; - } - } - } - if ($rDef.modifying) { - out += " if (" + $parentData + ") " + $data + " = " + $parentData + "[" + $parentDataProperty + "];"; - } - out += "" + $closingBraces; - if ($rDef.valid) { - if ($breakOnError) { - out += " if (true) { "; - } - } else { - out += " if ( "; - if ($rDef.valid === void 0) { - out += " !"; - if ($macro) { - out += "" + $nextValid; - } else { - out += "" + $valid; - } - } else { - out += " " + !$rDef.valid + " "; - } - out += ") { "; - $errorKeyword = $rule.keyword; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ""; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ""; - if (it.createErrors !== false) { - out += " { keyword: '" + ($errorKeyword || "custom") + "' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { keyword: '" + $rule.keyword + "' } "; - if (it.opts.messages !== false) { - out += ` , message: 'should pass "` + $rule.keyword + `" keyword validation' `; - } - if (it.opts.verbose) { - out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; - } - out += " } "; - } else { - out += " {} "; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - if (it.async) { - out += " throw new ValidationError([" + __err + "]); "; - } else { - out += " validate.errors = [" + __err + "]; return false; "; - } - } else { - out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; - } - var def_customError = out; - out = $$outStack.pop(); - if ($inline) { - if ($rDef.errors) { - if ($rDef.errors != "full") { - out += " for (var " + $i + "=" + $errs + "; " + $i + " { + Object.defineProperty(exports, "__esModule", { value: true }); + var id_1 = require_id(); + var ref_1 = require_ref(); + var core22 = [ + "$schema", + "$id", + "$defs", + "$vocabulary", + { keyword: "$comment" }, + "definitions", + id_1.default, + ref_1.default + ]; + exports.default = core22; +}); +var require_limitNumber = __commonJS2((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + var codegen_1 = require_codegen(); + var ops = codegen_1.operators; + var KWDs = { + maximum: { okStr: "<=", ok: ops.LTE, fail: ops.GT }, + minimum: { okStr: ">=", ok: ops.GTE, fail: ops.LT }, + exclusiveMaximum: { okStr: "<", ok: ops.LT, fail: ops.GTE }, + exclusiveMinimum: { okStr: ">", ok: ops.GT, fail: ops.LTE } }; + var error210 = { + message: ({ keyword, schemaCode }) => (0, codegen_1.str)`must be ${KWDs[keyword].okStr} ${schemaCode}`, + params: ({ keyword, schemaCode }) => (0, codegen_1._)`{comparison: ${KWDs[keyword].okStr}, limit: ${schemaCode}}` + }; + var def = { + keyword: Object.keys(KWDs), + type: "number", + schemaType: "number", + $data: true, + error: error210, + code(cxt) { + const { keyword, data, schemaCode } = cxt; + cxt.fail$data((0, codegen_1._)`${data} ${KWDs[keyword].fail} ${schemaCode} || isNaN(${data})`); + } + }; + exports.default = def; +}); +var require_multipleOf = __commonJS2((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + var codegen_1 = require_codegen(); + var error210 = { + message: ({ schemaCode }) => (0, codegen_1.str)`must be multiple of ${schemaCode}`, + params: ({ schemaCode }) => (0, codegen_1._)`{multipleOf: ${schemaCode}}` + }; + var def = { + keyword: "multipleOf", + type: "number", + schemaType: "number", + $data: true, + error: error210, + code(cxt) { + const { gen, data, schemaCode, it } = cxt; + const prec = it.opts.multipleOfPrecision; + const res = gen.let("res"); + const invalid = prec ? (0, codegen_1._)`Math.abs(Math.round(${res}) - ${res}) > 1e-${prec}` : (0, codegen_1._)`${res} !== parseInt(${res})`; + cxt.fail$data((0, codegen_1._)`(${schemaCode} === 0 || (${res} = ${data}/${schemaCode}, ${invalid}))`); + } + }; + exports.default = def; +}); +var require_ucs2length = __commonJS2((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + function ucs2length(str) { + const len = str.length; + let length = 0; + let pos = 0; + let value2; + while (pos < len) { + length++; + value2 = str.charCodeAt(pos++); + if (value2 >= 55296 && value2 <= 56319 && pos < len) { + value2 = str.charCodeAt(pos); + if ((value2 & 64512) === 56320) + pos++; + } + } + return length; + } + exports.default = ucs2length; + ucs2length.code = 'require("ajv/dist/runtime/ucs2length").default'; +}); +var require_limitLength = __commonJS2((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + var codegen_1 = require_codegen(); + var util_1 = require_util8(); + var ucs2length_1 = require_ucs2length(); + var error210 = { + message({ keyword, schemaCode }) { + const comp = keyword === "maxLength" ? "more" : "fewer"; + return (0, codegen_1.str)`must NOT have ${comp} than ${schemaCode} characters`; + }, + params: ({ schemaCode }) => (0, codegen_1._)`{limit: ${schemaCode}}` + }; + var def = { + keyword: ["maxLength", "minLength"], + type: "string", + schemaType: "number", + $data: true, + error: error210, + code(cxt) { + const { keyword, data, schemaCode, it } = cxt; + const op = keyword === "maxLength" ? codegen_1.operators.GT : codegen_1.operators.LT; + const len = it.opts.unicode === false ? (0, codegen_1._)`${data}.length` : (0, codegen_1._)`${(0, util_1.useFunc)(cxt.gen, ucs2length_1.default)}(${data})`; + cxt.fail$data((0, codegen_1._)`${len} ${op} ${schemaCode}`); + } + }; + exports.default = def; +}); +var require_pattern = __commonJS2((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + var code_1 = require_code2(); + var codegen_1 = require_codegen(); + var error210 = { + message: ({ schemaCode }) => (0, codegen_1.str)`must match pattern "${schemaCode}"`, + params: ({ schemaCode }) => (0, codegen_1._)`{pattern: ${schemaCode}}` + }; + var def = { + keyword: "pattern", + type: "string", + schemaType: "string", + $data: true, + error: error210, + code(cxt) { + const { data, $data, schema: schema2, schemaCode, it } = cxt; + const u = it.opts.unicodeRegExp ? "u" : ""; + const regExp = $data ? (0, codegen_1._)`(new RegExp(${schemaCode}, ${u}))` : (0, code_1.usePattern)(cxt, schema2); + cxt.fail$data((0, codegen_1._)`!${regExp}.test(${data})`); + } + }; + exports.default = def; +}); +var require_limitProperties = __commonJS2((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + var codegen_1 = require_codegen(); + var error210 = { + message({ keyword, schemaCode }) { + const comp = keyword === "maxProperties" ? "more" : "fewer"; + return (0, codegen_1.str)`must NOT have ${comp} than ${schemaCode} properties`; + }, + params: ({ schemaCode }) => (0, codegen_1._)`{limit: ${schemaCode}}` + }; + var def = { + keyword: ["maxProperties", "minProperties"], + type: "object", + schemaType: "number", + $data: true, + error: error210, + code(cxt) { + const { keyword, data, schemaCode } = cxt; + const op = keyword === "maxProperties" ? codegen_1.operators.GT : codegen_1.operators.LT; + cxt.fail$data((0, codegen_1._)`Object.keys(${data}).length ${op} ${schemaCode}`); + } + }; + exports.default = def; +}); +var require_required = __commonJS2((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + var code_1 = require_code2(); + var codegen_1 = require_codegen(); + var util_1 = require_util8(); + var error210 = { + message: ({ params: { missingProperty } }) => (0, codegen_1.str)`must have required property '${missingProperty}'`, + params: ({ params: { missingProperty } }) => (0, codegen_1._)`{missingProperty: ${missingProperty}}` + }; + var def = { + keyword: "required", + type: "object", + schemaType: "array", + $data: true, + error: error210, + code(cxt) { + const { gen, schema: schema2, schemaCode, data, $data, it } = cxt; + const { opts } = it; + if (!$data && schema2.length === 0) + return; + const useLoop = schema2.length >= opts.loopRequired; + if (it.allErrors) + allErrorsMode(); + else + exitOnErrorMode(); + if (opts.strictRequired) { + const props = cxt.parentSchema.properties; + const { definedProperties } = cxt.it; + for (const requiredKey of schema2) { + if ((props === null || props === void 0 ? void 0 : props[requiredKey]) === void 0 && !definedProperties.has(requiredKey)) { + const schemaPath = it.schemaEnv.baseId + it.errSchemaPath; + const msg = `required property "${requiredKey}" is not defined at "${schemaPath}" (strictRequired)`; + (0, util_1.checkStrictMode)(it, msg, it.opts.strictRequired); + } + } + } + function allErrorsMode() { + if (useLoop || $data) { + cxt.block$data(codegen_1.nil, loopAllRequired); + } else { + for (const prop of schema2) { + (0, code_1.checkReportMissingProp)(cxt, prop); + } + } + } + function exitOnErrorMode() { + const missing = gen.let("missing"); + if (useLoop || $data) { + const valid = gen.let("valid", true); + cxt.block$data(valid, () => loopUntilMissing(missing, valid)); + cxt.ok(valid); + } else { + gen.if((0, code_1.checkMissingProp)(cxt, schema2, missing)); + (0, code_1.reportMissingProp)(cxt, missing); + gen.else(); + } + } + function loopAllRequired() { + gen.forOf("prop", schemaCode, (prop) => { + cxt.setParams({ missingProperty: prop }); + gen.if((0, code_1.noPropertyInData)(gen, data, prop, opts.ownProperties), () => cxt.error()); + }); + } + function loopUntilMissing(missing, valid) { + cxt.setParams({ missingProperty: missing }); + gen.forOf(missing, schemaCode, () => { + gen.assign(valid, (0, code_1.propertyInData)(gen, data, missing, opts.ownProperties)); + gen.if((0, codegen_1.not)(valid), () => { + cxt.error(); + gen.break(); + }); + }, codegen_1.nil); + } + } + }; + exports.default = def; +}); +var require_limitItems = __commonJS2((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + var codegen_1 = require_codegen(); + var error210 = { + message({ keyword, schemaCode }) { + const comp = keyword === "maxItems" ? "more" : "fewer"; + return (0, codegen_1.str)`must NOT have ${comp} than ${schemaCode} items`; + }, + params: ({ schemaCode }) => (0, codegen_1._)`{limit: ${schemaCode}}` + }; + var def = { + keyword: ["maxItems", "minItems"], + type: "array", + schemaType: "number", + $data: true, + error: error210, + code(cxt) { + const { keyword, data, schemaCode } = cxt; + const op = keyword === "maxItems" ? codegen_1.operators.GT : codegen_1.operators.LT; + cxt.fail$data((0, codegen_1._)`${data}.length ${op} ${schemaCode}`); + } + }; + exports.default = def; +}); +var require_equal = __commonJS2((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + var equal = require_fast_deep_equal(); + equal.code = 'require("ajv/dist/runtime/equal").default'; + exports.default = equal; +}); +var require_uniqueItems = __commonJS2((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + var dataType_1 = require_dataType(); + var codegen_1 = require_codegen(); + var util_1 = require_util8(); + var equal_1 = require_equal(); + var error210 = { + message: ({ params: { i, j } }) => (0, codegen_1.str)`must NOT have duplicate items (items ## ${j} and ${i} are identical)`, + params: ({ params: { i, j } }) => (0, codegen_1._)`{i: ${i}, j: ${j}}` + }; + var def = { + keyword: "uniqueItems", + type: "array", + schemaType: "boolean", + $data: true, + error: error210, + code(cxt) { + const { gen, data, $data, schema: schema2, parentSchema, schemaCode, it } = cxt; + if (!$data && !schema2) + return; + const valid = gen.let("valid"); + const itemTypes = parentSchema.items ? (0, dataType_1.getSchemaTypes)(parentSchema.items) : []; + cxt.block$data(valid, validateUniqueItems, (0, codegen_1._)`${schemaCode} === false`); + cxt.ok(valid); + function validateUniqueItems() { + const i = gen.let("i", (0, codegen_1._)`${data}.length`); + const j = gen.let("j"); + cxt.setParams({ i, j }); + gen.assign(valid, true); + gen.if((0, codegen_1._)`${i} > 1`, () => (canOptimize() ? loopN : loopN2)(i, j)); + } + function canOptimize() { + return itemTypes.length > 0 && !itemTypes.some((t) => t === "object" || t === "array"); + } + function loopN(i, j) { + const item = gen.name("item"); + const wrongType = (0, dataType_1.checkDataTypes)(itemTypes, item, it.opts.strictNumbers, dataType_1.DataType.Wrong); + const indices = gen.const("indices", (0, codegen_1._)`{}`); + gen.for((0, codegen_1._)`;${i}--;`, () => { + gen.let(item, (0, codegen_1._)`${data}[${i}]`); + gen.if(wrongType, (0, codegen_1._)`continue`); + if (itemTypes.length > 1) + gen.if((0, codegen_1._)`typeof ${item} == "string"`, (0, codegen_1._)`${item} += "_"`); + gen.if((0, codegen_1._)`typeof ${indices}[${item}] == "number"`, () => { + gen.assign(j, (0, codegen_1._)`${indices}[${item}]`); + cxt.error(); + gen.assign(valid, false).break(); + }).code((0, codegen_1._)`${indices}[${item}] = ${i}`); + }); + } + function loopN2(i, j) { + const eql = (0, util_1.useFunc)(gen, equal_1.default); + const outer = gen.name("outer"); + gen.label(outer).for((0, codegen_1._)`;${i}--;`, () => gen.for((0, codegen_1._)`${j} = ${i}; ${j}--;`, () => gen.if((0, codegen_1._)`${eql}(${data}[${i}], ${data}[${j}])`, () => { + cxt.error(); + gen.assign(valid, false).break(outer); + }))); + } + } + }; + exports.default = def; +}); +var require_const = __commonJS2((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + var codegen_1 = require_codegen(); + var util_1 = require_util8(); + var equal_1 = require_equal(); + var error210 = { + message: "must be equal to constant", + params: ({ schemaCode }) => (0, codegen_1._)`{allowedValue: ${schemaCode}}` + }; + var def = { + keyword: "const", + $data: true, + error: error210, + code(cxt) { + const { gen, data, $data, schemaCode, schema: schema2 } = cxt; + if ($data || schema2 && typeof schema2 == "object") { + cxt.fail$data((0, codegen_1._)`!${(0, util_1.useFunc)(gen, equal_1.default)}(${data}, ${schemaCode})`); + } else { + cxt.fail((0, codegen_1._)`${schema2} !== ${data}`); + } + } + }; + exports.default = def; +}); +var require_enum = __commonJS2((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + var codegen_1 = require_codegen(); + var util_1 = require_util8(); + var equal_1 = require_equal(); + var error210 = { + message: "must be equal to one of the allowed values", + params: ({ schemaCode }) => (0, codegen_1._)`{allowedValues: ${schemaCode}}` + }; + var def = { + keyword: "enum", + schemaType: "array", + $data: true, + error: error210, + code(cxt) { + const { gen, data, $data, schema: schema2, schemaCode, it } = cxt; + if (!$data && schema2.length === 0) + throw new Error("enum must have non-empty array"); + const useLoop = schema2.length >= it.opts.loopEnum; + let eql; + const getEql = () => eql !== null && eql !== void 0 ? eql : eql = (0, util_1.useFunc)(gen, equal_1.default); + let valid; + if (useLoop || $data) { + valid = gen.let("valid"); + cxt.block$data(valid, loopEnum); + } else { + if (!Array.isArray(schema2)) + throw new Error("ajv implementation error"); + const vSchema = gen.const("vSchema", schemaCode); + valid = (0, codegen_1.or)(...schema2.map((_x, i) => equalCode(vSchema, i))); + } + cxt.pass(valid); + function loopEnum() { + gen.assign(valid, false); + gen.forOf("v", schemaCode, (v) => gen.if((0, codegen_1._)`${getEql()}(${data}, ${v})`, () => gen.assign(valid, true).break())); + } + function equalCode(vSchema, i) { + const sch = schema2[i]; + return typeof sch === "object" && sch !== null ? (0, codegen_1._)`${getEql()}(${data}, ${vSchema}[${i}])` : (0, codegen_1._)`${data} === ${sch}`; + } + } + }; + exports.default = def; +}); +var require_validation = __commonJS2((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + var limitNumber_1 = require_limitNumber(); + var multipleOf_1 = require_multipleOf(); + var limitLength_1 = require_limitLength(); + var pattern_1 = require_pattern(); + var limitProperties_1 = require_limitProperties(); + var required_1 = require_required(); + var limitItems_1 = require_limitItems(); + var uniqueItems_1 = require_uniqueItems(); + var const_1 = require_const(); + var enum_1 = require_enum(); + var validation = [ + limitNumber_1.default, + multipleOf_1.default, + limitLength_1.default, + pattern_1.default, + limitProperties_1.default, + required_1.default, + limitItems_1.default, + uniqueItems_1.default, + { keyword: "type", schemaType: ["string", "array"] }, + { keyword: "nullable", schemaType: "boolean" }, + const_1.default, + enum_1.default + ]; + exports.default = validation; +}); +var require_additionalItems = __commonJS2((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.validateAdditionalItems = void 0; + var codegen_1 = require_codegen(); + var util_1 = require_util8(); + var error210 = { + message: ({ params: { len } }) => (0, codegen_1.str)`must NOT have more than ${len} items`, + params: ({ params: { len } }) => (0, codegen_1._)`{limit: ${len}}` + }; + var def = { + keyword: "additionalItems", + type: "array", + schemaType: ["boolean", "object"], + before: "uniqueItems", + error: error210, + code(cxt) { + const { parentSchema, it } = cxt; + const { items } = parentSchema; + if (!Array.isArray(items)) { + (0, util_1.checkStrictMode)(it, '"additionalItems" is ignored when "items" is not an array of schemas'); + return; + } + validateAdditionalItems(cxt, items); + } + }; + function validateAdditionalItems(cxt, items) { + const { gen, schema: schema2, data, keyword, it } = cxt; + it.items = true; + const len = gen.const("len", (0, codegen_1._)`${data}.length`); + if (schema2 === false) { + cxt.setParams({ len: items.length }); + cxt.pass((0, codegen_1._)`${len} <= ${items.length}`); + } else if (typeof schema2 == "object" && !(0, util_1.alwaysValidSchema)(it, schema2)) { + const valid = gen.var("valid", (0, codegen_1._)`${len} <= ${items.length}`); + gen.if((0, codegen_1.not)(valid), () => validateItems(valid)); + cxt.ok(valid); + } + function validateItems(valid) { + gen.forRange("i", items.length, len, (i) => { + cxt.subschema({ keyword, dataProp: i, dataPropType: util_1.Type.Num }, valid); + if (!it.allErrors) + gen.if((0, codegen_1.not)(valid), () => gen.break()); + }); + } + } + exports.validateAdditionalItems = validateAdditionalItems; + exports.default = def; +}); +var require_items = __commonJS2((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.validateTuple = void 0; + var codegen_1 = require_codegen(); + var util_1 = require_util8(); + var code_1 = require_code2(); + var def = { + keyword: "items", + type: "array", + schemaType: ["object", "array", "boolean"], + before: "uniqueItems", + code(cxt) { + const { schema: schema2, it } = cxt; + if (Array.isArray(schema2)) + return validateTuple(cxt, "additionalItems", schema2); + it.items = true; + if ((0, util_1.alwaysValidSchema)(it, schema2)) + return; + cxt.ok((0, code_1.validateArray)(cxt)); + } + }; + function validateTuple(cxt, extraItems, schArr = cxt.schema) { + const { gen, parentSchema, data, keyword, it } = cxt; + checkStrictTuple(parentSchema); + if (it.opts.unevaluated && schArr.length && it.items !== true) { + it.items = util_1.mergeEvaluated.items(gen, schArr.length, it.items); + } + const valid = gen.name("valid"); + const len = gen.const("len", (0, codegen_1._)`${data}.length`); + schArr.forEach((sch, i) => { + if ((0, util_1.alwaysValidSchema)(it, sch)) + return; + gen.if((0, codegen_1._)`${len} > ${i}`, () => cxt.subschema({ + keyword, + schemaProp: i, + dataProp: i + }, valid)); + cxt.ok(valid); + }); + function checkStrictTuple(sch) { + const { opts, errSchemaPath } = it; + const l = schArr.length; + const fullTuple = l === sch.minItems && (l === sch.maxItems || sch[extraItems] === false); + if (opts.strictTuples && !fullTuple) { + const msg = `"${keyword}" is ${l}-tuple, but minItems or maxItems/${extraItems} are not specified or different at path "${errSchemaPath}"`; + (0, util_1.checkStrictMode)(it, msg, opts.strictTuples); + } + } + } + exports.validateTuple = validateTuple; + exports.default = def; +}); +var require_prefixItems = __commonJS2((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + var items_1 = require_items(); + var def = { + keyword: "prefixItems", + type: "array", + schemaType: ["array"], + before: "uniqueItems", + code: (cxt) => (0, items_1.validateTuple)(cxt, "items") + }; + exports.default = def; +}); +var require_items2020 = __commonJS2((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + var codegen_1 = require_codegen(); + var util_1 = require_util8(); + var code_1 = require_code2(); + var additionalItems_1 = require_additionalItems(); + var error210 = { + message: ({ params: { len } }) => (0, codegen_1.str)`must NOT have more than ${len} items`, + params: ({ params: { len } }) => (0, codegen_1._)`{limit: ${len}}` + }; + var def = { + keyword: "items", + type: "array", + schemaType: ["object", "boolean"], + before: "uniqueItems", + error: error210, + code(cxt) { + const { schema: schema2, parentSchema, it } = cxt; + const { prefixItems } = parentSchema; + it.items = true; + if ((0, util_1.alwaysValidSchema)(it, schema2)) + return; + if (prefixItems) + (0, additionalItems_1.validateAdditionalItems)(cxt, prefixItems); + else + cxt.ok((0, code_1.validateArray)(cxt)); + } + }; + exports.default = def; +}); +var require_contains = __commonJS2((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + var codegen_1 = require_codegen(); + var util_1 = require_util8(); + var error210 = { + message: ({ params: { min, max } }) => max === void 0 ? (0, codegen_1.str)`must contain at least ${min} valid item(s)` : (0, codegen_1.str)`must contain at least ${min} and no more than ${max} valid item(s)`, + params: ({ params: { min, max } }) => max === void 0 ? (0, codegen_1._)`{minContains: ${min}}` : (0, codegen_1._)`{minContains: ${min}, maxContains: ${max}}` + }; + var def = { + keyword: "contains", + type: "array", + schemaType: ["object", "boolean"], + before: "uniqueItems", + trackErrors: true, + error: error210, + code(cxt) { + const { gen, schema: schema2, parentSchema, data, it } = cxt; + let min; + let max; + const { minContains, maxContains } = parentSchema; + if (it.opts.next) { + min = minContains === void 0 ? 1 : minContains; + max = maxContains; + } else { + min = 1; + } + const len = gen.const("len", (0, codegen_1._)`${data}.length`); + cxt.setParams({ min, max }); + if (max === void 0 && min === 0) { + (0, util_1.checkStrictMode)(it, `"minContains" == 0 without "maxContains": "contains" keyword ignored`); + return; + } + if (max !== void 0 && min > max) { + (0, util_1.checkStrictMode)(it, `"minContains" > "maxContains" is always invalid`); + cxt.fail(); + return; + } + if ((0, util_1.alwaysValidSchema)(it, schema2)) { + let cond = (0, codegen_1._)`${len} >= ${min}`; + if (max !== void 0) + cond = (0, codegen_1._)`${cond} && ${len} <= ${max}`; + cxt.pass(cond); + return; + } + it.items = true; + const valid = gen.name("valid"); + if (max === void 0 && min === 1) { + validateItems(valid, () => gen.if(valid, () => gen.break())); + } else if (min === 0) { + gen.let(valid, true); + if (max !== void 0) + gen.if((0, codegen_1._)`${data}.length > 0`, validateItemsWithCount); + } else { + gen.let(valid, false); + validateItemsWithCount(); + } + cxt.result(valid, () => cxt.reset()); + function validateItemsWithCount() { + const schValid = gen.name("_valid"); + const count = gen.let("count", 0); + validateItems(schValid, () => gen.if(schValid, () => checkLimits(count))); + } + function validateItems(_valid, block) { + gen.forRange("i", 0, len, (i) => { + cxt.subschema({ + keyword: "contains", + dataProp: i, + dataPropType: util_1.Type.Num, + compositeRule: true + }, _valid); + block(); + }); + } + function checkLimits(count) { + gen.code((0, codegen_1._)`${count}++`); + if (max === void 0) { + gen.if((0, codegen_1._)`${count} >= ${min}`, () => gen.assign(valid, true).break()); + } else { + gen.if((0, codegen_1._)`${count} > ${max}`, () => gen.assign(valid, false).break()); + if (min === 1) + gen.assign(valid, true); + else + gen.if((0, codegen_1._)`${count} >= ${min}`, () => gen.assign(valid, true)); + } + } + } + }; + exports.default = def; +}); +var require_dependencies = __commonJS2((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.validateSchemaDeps = exports.validatePropertyDeps = exports.error = void 0; + var codegen_1 = require_codegen(); + var util_1 = require_util8(); + var code_1 = require_code2(); + exports.error = { + message: ({ params: { property, depsCount, deps } }) => { + const property_ies = depsCount === 1 ? "property" : "properties"; + return (0, codegen_1.str)`must have ${property_ies} ${deps} when property ${property} is present`; + }, + params: ({ params: { property, depsCount, deps, missingProperty } }) => (0, codegen_1._)`{property: ${property}, + missingProperty: ${missingProperty}, + depsCount: ${depsCount}, + deps: ${deps}}` + }; + var def = { + keyword: "dependencies", + type: "object", + schemaType: "object", + error: exports.error, + code(cxt) { + const [propDeps, schDeps] = splitDependencies(cxt); + validatePropertyDeps(cxt, propDeps); + validateSchemaDeps(cxt, schDeps); + } + }; + function splitDependencies({ schema: schema2 }) { + const propertyDeps = {}; + const schemaDeps = {}; + for (const key in schema2) { + if (key === "__proto__") + continue; + const deps = Array.isArray(schema2[key]) ? propertyDeps : schemaDeps; + deps[key] = schema2[key]; + } + return [propertyDeps, schemaDeps]; + } + function validatePropertyDeps(cxt, propertyDeps = cxt.schema) { + const { gen, data, it } = cxt; + if (Object.keys(propertyDeps).length === 0) + return; + const missing = gen.let("missing"); + for (const prop in propertyDeps) { + const deps = propertyDeps[prop]; + if (deps.length === 0) + continue; + const hasProperty = (0, code_1.propertyInData)(gen, data, prop, it.opts.ownProperties); + cxt.setParams({ + property: prop, + depsCount: deps.length, + deps: deps.join(", ") + }); + if (it.allErrors) { + gen.if(hasProperty, () => { + for (const depProp of deps) { + (0, code_1.checkReportMissingProp)(cxt, depProp); + } + }); + } else { + gen.if((0, codegen_1._)`${hasProperty} && (${(0, code_1.checkMissingProp)(cxt, deps, missing)})`); + (0, code_1.reportMissingProp)(cxt, missing); + gen.else(); + } + } + } + exports.validatePropertyDeps = validatePropertyDeps; + function validateSchemaDeps(cxt, schemaDeps = cxt.schema) { + const { gen, data, keyword, it } = cxt; + const valid = gen.name("valid"); + for (const prop in schemaDeps) { + if ((0, util_1.alwaysValidSchema)(it, schemaDeps[prop])) + continue; + gen.if((0, code_1.propertyInData)(gen, data, prop, it.opts.ownProperties), () => { + const schCxt = cxt.subschema({ keyword, schemaProp: prop }, valid); + cxt.mergeValidEvaluated(schCxt, valid); + }, () => gen.var(valid, true)); + cxt.ok(valid); + } + } + exports.validateSchemaDeps = validateSchemaDeps; + exports.default = def; +}); +var require_propertyNames = __commonJS2((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + var codegen_1 = require_codegen(); + var util_1 = require_util8(); + var error210 = { + message: "property name must be valid", + params: ({ params }) => (0, codegen_1._)`{propertyName: ${params.propertyName}}` + }; + var def = { + keyword: "propertyNames", + type: "object", + schemaType: ["object", "boolean"], + error: error210, + code(cxt) { + const { gen, schema: schema2, data, it } = cxt; + if ((0, util_1.alwaysValidSchema)(it, schema2)) + return; + const valid = gen.name("valid"); + gen.forIn("key", data, (key) => { + cxt.setParams({ propertyName: key }); + cxt.subschema({ + keyword: "propertyNames", + data: key, + dataTypes: ["string"], + propertyName: key, + compositeRule: true + }, valid); + gen.if((0, codegen_1.not)(valid), () => { + cxt.error(true); + if (!it.allErrors) + gen.break(); + }); + }); + cxt.ok(valid); + } + }; + exports.default = def; +}); +var require_additionalProperties = __commonJS2((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + var code_1 = require_code2(); + var codegen_1 = require_codegen(); + var names_1 = require_names(); + var util_1 = require_util8(); + var error210 = { + message: "must NOT have additional properties", + params: ({ params }) => (0, codegen_1._)`{additionalProperty: ${params.additionalProperty}}` + }; + var def = { + keyword: "additionalProperties", + type: ["object"], + schemaType: ["boolean", "object"], + allowUndefined: true, + trackErrors: true, + error: error210, + code(cxt) { + const { gen, schema: schema2, parentSchema, data, errsCount, it } = cxt; + if (!errsCount) + throw new Error("ajv implementation error"); + const { allErrors, opts } = it; + it.props = true; + if (opts.removeAdditional !== "all" && (0, util_1.alwaysValidSchema)(it, schema2)) + return; + const props = (0, code_1.allSchemaProperties)(parentSchema.properties); + const patProps = (0, code_1.allSchemaProperties)(parentSchema.patternProperties); + checkAdditionalProperties(); + cxt.ok((0, codegen_1._)`${errsCount} === ${names_1.default.errors}`); + function checkAdditionalProperties() { + gen.forIn("key", data, (key) => { + if (!props.length && !patProps.length) + additionalPropertyCode(key); + else + gen.if(isAdditional(key), () => additionalPropertyCode(key)); + }); + } + function isAdditional(key) { + let definedProp; + if (props.length > 8) { + const propsSchema = (0, util_1.schemaRefOrVal)(it, parentSchema.properties, "properties"); + definedProp = (0, code_1.isOwnProperty)(gen, propsSchema, key); + } else if (props.length) { + definedProp = (0, codegen_1.or)(...props.map((p) => (0, codegen_1._)`${key} === ${p}`)); + } else { + definedProp = codegen_1.nil; + } + if (patProps.length) { + definedProp = (0, codegen_1.or)(definedProp, ...patProps.map((p) => (0, codegen_1._)`${(0, code_1.usePattern)(cxt, p)}.test(${key})`)); + } + return (0, codegen_1.not)(definedProp); + } + function deleteAdditional(key) { + gen.code((0, codegen_1._)`delete ${data}[${key}]`); + } + function additionalPropertyCode(key) { + if (opts.removeAdditional === "all" || opts.removeAdditional && schema2 === false) { + deleteAdditional(key); + return; + } + if (schema2 === false) { + cxt.setParams({ additionalProperty: key }); + cxt.error(); + if (!allErrors) + gen.break(); + return; + } + if (typeof schema2 == "object" && !(0, util_1.alwaysValidSchema)(it, schema2)) { + const valid = gen.name("valid"); + if (opts.removeAdditional === "failing") { + applyAdditionalSchema(key, valid, false); + gen.if((0, codegen_1.not)(valid), () => { + cxt.reset(); + deleteAdditional(key); + }); + } else { + applyAdditionalSchema(key, valid); + if (!allErrors) + gen.if((0, codegen_1.not)(valid), () => gen.break()); + } + } + } + function applyAdditionalSchema(key, valid, errors3) { + const subschema = { + keyword: "additionalProperties", + dataProp: key, + dataPropType: util_1.Type.Str + }; + if (errors3 === false) { + Object.assign(subschema, { + compositeRule: true, + createErrors: false, + allErrors: false + }); + } + cxt.subschema(subschema, valid); + } + } + }; + exports.default = def; +}); +var require_properties = __commonJS2((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + var validate_1 = require_validate(); + var code_1 = require_code2(); + var util_1 = require_util8(); + var additionalProperties_1 = require_additionalProperties(); + var def = { + keyword: "properties", + type: "object", + schemaType: "object", + code(cxt) { + const { gen, schema: schema2, parentSchema, data, it } = cxt; + if (it.opts.removeAdditional === "all" && parentSchema.additionalProperties === void 0) { + additionalProperties_1.default.code(new validate_1.KeywordCxt(it, additionalProperties_1.default, "additionalProperties")); + } + const allProps = (0, code_1.allSchemaProperties)(schema2); + for (const prop of allProps) { + it.definedProperties.add(prop); + } + if (it.opts.unevaluated && allProps.length && it.props !== true) { + it.props = util_1.mergeEvaluated.props(gen, (0, util_1.toHash)(allProps), it.props); + } + const properties = allProps.filter((p) => !(0, util_1.alwaysValidSchema)(it, schema2[p])); + if (properties.length === 0) + return; + const valid = gen.name("valid"); + for (const prop of properties) { + if (hasDefault(prop)) { + applyPropertySchema(prop); + } else { + gen.if((0, code_1.propertyInData)(gen, data, prop, it.opts.ownProperties)); + applyPropertySchema(prop); + if (!it.allErrors) + gen.else().var(valid, true); + gen.endIf(); + } + cxt.it.definedProperties.add(prop); + cxt.ok(valid); + } + function hasDefault(prop) { + return it.opts.useDefaults && !it.compositeRule && schema2[prop].default !== void 0; + } + function applyPropertySchema(prop) { + cxt.subschema({ + keyword: "properties", + schemaProp: prop, + dataProp: prop + }, valid); + } + } + }; + exports.default = def; +}); +var require_patternProperties = __commonJS2((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + var code_1 = require_code2(); + var codegen_1 = require_codegen(); + var util_1 = require_util8(); + var util_2 = require_util8(); + var def = { + keyword: "patternProperties", + type: "object", + schemaType: "object", + code(cxt) { + const { gen, schema: schema2, data, parentSchema, it } = cxt; + const { opts } = it; + const patterns = (0, code_1.allSchemaProperties)(schema2); + const alwaysValidPatterns = patterns.filter((p) => (0, util_1.alwaysValidSchema)(it, schema2[p])); + if (patterns.length === 0 || alwaysValidPatterns.length === patterns.length && (!it.opts.unevaluated || it.props === true)) { + return; + } + const checkProperties = opts.strictSchema && !opts.allowMatchingProperties && parentSchema.properties; + const valid = gen.name("valid"); + if (it.props !== true && !(it.props instanceof codegen_1.Name)) { + it.props = (0, util_2.evaluatedPropsToName)(gen, it.props); + } + const { props } = it; + validatePatternProperties(); + function validatePatternProperties() { + for (const pat of patterns) { + if (checkProperties) + checkMatchingProperties(pat); + if (it.allErrors) { + validateProperties(pat); + } else { + gen.var(valid, true); + validateProperties(pat); + gen.if(valid); + } + } + } + function checkMatchingProperties(pat) { + for (const prop in checkProperties) { + if (new RegExp(pat).test(prop)) { + (0, util_1.checkStrictMode)(it, `property ${prop} matches pattern ${pat} (use allowMatchingProperties)`); + } + } + } + function validateProperties(pat) { + gen.forIn("key", data, (key) => { + gen.if((0, codegen_1._)`${(0, code_1.usePattern)(cxt, pat)}.test(${key})`, () => { + const alwaysValid = alwaysValidPatterns.includes(pat); + if (!alwaysValid) { + cxt.subschema({ + keyword: "patternProperties", + schemaProp: pat, + dataProp: key, + dataPropType: util_2.Type.Str + }, valid); + } + if (it.opts.unevaluated && props !== true) { + gen.assign((0, codegen_1._)`${props}[${key}]`, true); + } else if (!alwaysValid && !it.allErrors) { + gen.if((0, codegen_1.not)(valid), () => gen.break()); + } + }); + }); + } + } + }; + exports.default = def; +}); +var require_not = __commonJS2((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + var util_1 = require_util8(); + var def = { + keyword: "not", + schemaType: ["object", "boolean"], + trackErrors: true, + code(cxt) { + const { gen, schema: schema2, it } = cxt; + if ((0, util_1.alwaysValidSchema)(it, schema2)) { + cxt.fail(); + return; + } + const valid = gen.name("valid"); + cxt.subschema({ + keyword: "not", + compositeRule: true, + createErrors: false, + allErrors: false + }, valid); + cxt.failResult(valid, () => cxt.reset(), () => cxt.error()); + }, + error: { message: "must NOT be valid" } + }; + exports.default = def; +}); +var require_anyOf = __commonJS2((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + var code_1 = require_code2(); + var def = { + keyword: "anyOf", + schemaType: "array", + trackErrors: true, + code: code_1.validateUnion, + error: { message: "must match a schema in anyOf" } + }; + exports.default = def; +}); +var require_oneOf = __commonJS2((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + var codegen_1 = require_codegen(); + var util_1 = require_util8(); + var error210 = { + message: "must match exactly one schema in oneOf", + params: ({ params }) => (0, codegen_1._)`{passingSchemas: ${params.passing}}` + }; + var def = { + keyword: "oneOf", + schemaType: "array", + trackErrors: true, + error: error210, + code(cxt) { + const { gen, schema: schema2, parentSchema, it } = cxt; + if (!Array.isArray(schema2)) + throw new Error("ajv implementation error"); + if (it.opts.discriminator && parentSchema.discriminator) + return; + const schArr = schema2; + const valid = gen.let("valid", false); + const passing = gen.let("passing", null); + const schValid = gen.name("_valid"); + cxt.setParams({ passing }); + gen.block(validateOneOf); + cxt.result(valid, () => cxt.reset(), () => cxt.error(true)); + function validateOneOf() { + schArr.forEach((sch, i) => { + let schCxt; + if ((0, util_1.alwaysValidSchema)(it, sch)) { + gen.var(schValid, true); + } else { + schCxt = cxt.subschema({ + keyword: "oneOf", + schemaProp: i, + compositeRule: true + }, schValid); + } + if (i > 0) { + gen.if((0, codegen_1._)`${schValid} && ${valid}`).assign(valid, false).assign(passing, (0, codegen_1._)`[${passing}, ${i}]`).else(); + } + gen.if(schValid, () => { + gen.assign(valid, true); + gen.assign(passing, i); + if (schCxt) + cxt.mergeEvaluated(schCxt, codegen_1.Name); + }); + }); + } + } + }; + exports.default = def; +}); +var require_allOf = __commonJS2((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + var util_1 = require_util8(); + var def = { + keyword: "allOf", + schemaType: "array", + code(cxt) { + const { gen, schema: schema2, it } = cxt; + if (!Array.isArray(schema2)) + throw new Error("ajv implementation error"); + const valid = gen.name("valid"); + schema2.forEach((sch, i) => { + if ((0, util_1.alwaysValidSchema)(it, sch)) + return; + const schCxt = cxt.subschema({ keyword: "allOf", schemaProp: i }, valid); + cxt.ok(valid); + cxt.mergeEvaluated(schCxt); + }); + } + }; + exports.default = def; +}); +var require_if = __commonJS2((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + var codegen_1 = require_codegen(); + var util_1 = require_util8(); + var error210 = { + message: ({ params }) => (0, codegen_1.str)`must match "${params.ifClause}" schema`, + params: ({ params }) => (0, codegen_1._)`{failingKeyword: ${params.ifClause}}` + }; + var def = { + keyword: "if", + schemaType: ["object", "boolean"], + trackErrors: true, + error: error210, + code(cxt) { + const { gen, parentSchema, it } = cxt; + if (parentSchema.then === void 0 && parentSchema.else === void 0) { + (0, util_1.checkStrictMode)(it, '"if" without "then" and "else" is ignored'); + } + const hasThen = hasSchema(it, "then"); + const hasElse = hasSchema(it, "else"); + if (!hasThen && !hasElse) + return; + const valid = gen.let("valid", true); + const schValid = gen.name("_valid"); + validateIf(); + cxt.reset(); + if (hasThen && hasElse) { + const ifClause = gen.let("ifClause"); + cxt.setParams({ ifClause }); + gen.if(schValid, validateClause("then", ifClause), validateClause("else", ifClause)); + } else if (hasThen) { + gen.if(schValid, validateClause("then")); + } else { + gen.if((0, codegen_1.not)(schValid), validateClause("else")); + } + cxt.pass(valid, () => cxt.error(true)); + function validateIf() { + const schCxt = cxt.subschema({ + keyword: "if", + compositeRule: true, + createErrors: false, + allErrors: false + }, schValid); + cxt.mergeEvaluated(schCxt); + } + function validateClause(keyword, ifClause) { + return () => { + const schCxt = cxt.subschema({ keyword }, schValid); + gen.assign(valid, schValid); + cxt.mergeValidEvaluated(schCxt, valid); + if (ifClause) + gen.assign(ifClause, (0, codegen_1._)`${keyword}`); + else + cxt.setParams({ ifClause: keyword }); + }; + } + } + }; + function hasSchema(it, keyword) { + const schema2 = it.schema[keyword]; + return schema2 !== void 0 && !(0, util_1.alwaysValidSchema)(it, schema2); + } + exports.default = def; +}); +var require_thenElse = __commonJS2((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + var util_1 = require_util8(); + var def = { + keyword: ["then", "else"], + schemaType: ["object", "boolean"], + code({ keyword, parentSchema, it }) { + if (parentSchema.if === void 0) + (0, util_1.checkStrictMode)(it, `"${keyword}" without "if" is ignored`); + } + }; + exports.default = def; +}); +var require_applicator = __commonJS2((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + var additionalItems_1 = require_additionalItems(); + var prefixItems_1 = require_prefixItems(); + var items_1 = require_items(); + var items2020_1 = require_items2020(); + var contains_1 = require_contains(); + var dependencies_1 = require_dependencies(); + var propertyNames_1 = require_propertyNames(); + var additionalProperties_1 = require_additionalProperties(); + var properties_1 = require_properties(); + var patternProperties_1 = require_patternProperties(); + var not_1 = require_not(); + var anyOf_1 = require_anyOf(); + var oneOf_1 = require_oneOf(); + var allOf_1 = require_allOf(); + var if_1 = require_if(); + var thenElse_1 = require_thenElse(); + function getApplicator(draft2020 = false) { + const applicator = [ + not_1.default, + anyOf_1.default, + oneOf_1.default, + allOf_1.default, + if_1.default, + thenElse_1.default, + propertyNames_1.default, + additionalProperties_1.default, + dependencies_1.default, + properties_1.default, + patternProperties_1.default + ]; + if (draft2020) + applicator.push(prefixItems_1.default, items2020_1.default); + else + applicator.push(additionalItems_1.default, items_1.default); + applicator.push(contains_1.default); + return applicator; + } + exports.default = getApplicator; +}); +var require_format = __commonJS2((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + var codegen_1 = require_codegen(); + var error210 = { + message: ({ schemaCode }) => (0, codegen_1.str)`must match format "${schemaCode}"`, + params: ({ schemaCode }) => (0, codegen_1._)`{format: ${schemaCode}}` + }; + var def = { + keyword: "format", + type: ["number", "string"], + schemaType: "string", + $data: true, + error: error210, + code(cxt, ruleType) { + const { gen, data, $data, schema: schema2, schemaCode, it } = cxt; + const { opts, errSchemaPath, schemaEnv, self: self2 } = it; + if (!opts.validateFormats) + return; + if ($data) + validate$DataFormat(); + else + validateFormat(); + function validate$DataFormat() { + const fmts = gen.scopeValue("formats", { + ref: self2.formats, + code: opts.code.formats + }); + const fDef = gen.const("fDef", (0, codegen_1._)`${fmts}[${schemaCode}]`); + const fType = gen.let("fType"); + const format2 = gen.let("format"); + gen.if((0, codegen_1._)`typeof ${fDef} == "object" && !(${fDef} instanceof RegExp)`, () => gen.assign(fType, (0, codegen_1._)`${fDef}.type || "string"`).assign(format2, (0, codegen_1._)`${fDef}.validate`), () => gen.assign(fType, (0, codegen_1._)`"string"`).assign(format2, fDef)); + cxt.fail$data((0, codegen_1.or)(unknownFmt(), invalidFmt())); + function unknownFmt() { + if (opts.strictSchema === false) + return codegen_1.nil; + return (0, codegen_1._)`${schemaCode} && !${format2}`; + } + function invalidFmt() { + const callFormat = schemaEnv.$async ? (0, codegen_1._)`(${fDef}.async ? await ${format2}(${data}) : ${format2}(${data}))` : (0, codegen_1._)`${format2}(${data})`; + const validData = (0, codegen_1._)`(typeof ${format2} == "function" ? ${callFormat} : ${format2}.test(${data}))`; + return (0, codegen_1._)`${format2} && ${format2} !== true && ${fType} === ${ruleType} && !${validData}`; + } + } + function validateFormat() { + const formatDef = self2.formats[schema2]; + if (!formatDef) { + unknownFormat(); + return; + } + if (formatDef === true) + return; + const [fmtType, format2, fmtRef] = getFormat(formatDef); + if (fmtType === ruleType) + cxt.pass(validCondition()); + function unknownFormat() { + if (opts.strictSchema === false) { + self2.logger.warn(unknownMsg()); + return; + } + throw new Error(unknownMsg()); + function unknownMsg() { + return `unknown format "${schema2}" ignored in schema at path "${errSchemaPath}"`; + } + } + function getFormat(fmtDef) { + const code = fmtDef instanceof RegExp ? (0, codegen_1.regexpCode)(fmtDef) : opts.code.formats ? (0, codegen_1._)`${opts.code.formats}${(0, codegen_1.getProperty)(schema2)}` : void 0; + const fmt = gen.scopeValue("formats", { key: schema2, ref: fmtDef, code }); + if (typeof fmtDef == "object" && !(fmtDef instanceof RegExp)) { + return [fmtDef.type || "string", fmtDef.validate, (0, codegen_1._)`${fmt}.validate`]; + } + return ["string", fmtDef, fmt]; + } + function validCondition() { + if (typeof formatDef == "object" && !(formatDef instanceof RegExp) && formatDef.async) { + if (!schemaEnv.$async) + throw new Error("async format in sync schema"); + return (0, codegen_1._)`await ${fmtRef}(${data})`; + } + return typeof format2 == "function" ? (0, codegen_1._)`${fmtRef}(${data})` : (0, codegen_1._)`${fmtRef}.test(${data})`; + } + } + } + }; + exports.default = def; +}); +var require_format2 = __commonJS2((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + var format_1 = require_format(); + var format2 = [format_1.default]; + exports.default = format2; +}); +var require_metadata = __commonJS2((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.contentVocabulary = exports.metadataVocabulary = void 0; + exports.metadataVocabulary = [ + "title", + "description", + "default", + "deprecated", + "readOnly", + "writeOnly", + "examples" + ]; + exports.contentVocabulary = [ + "contentMediaType", + "contentEncoding", + "contentSchema" + ]; +}); +var require_draft7 = __commonJS2((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + var core_1 = require_core22(); + var validation_1 = require_validation(); + var applicator_1 = require_applicator(); + var format_1 = require_format2(); + var metadata_1 = require_metadata(); + var draft7Vocabularies = [ + core_1.default, + validation_1.default, + (0, applicator_1.default)(), + format_1.default, + metadata_1.metadataVocabulary, + metadata_1.contentVocabulary + ]; + exports.default = draft7Vocabularies; +}); +var require_types = __commonJS2((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.DiscrError = void 0; + var DiscrError; + (function(DiscrError2) { + DiscrError2["Tag"] = "tag"; + DiscrError2["Mapping"] = "mapping"; + })(DiscrError || (exports.DiscrError = DiscrError = {})); +}); +var require_discriminator = __commonJS2((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + var codegen_1 = require_codegen(); + var types_1 = require_types(); + var compile_1 = require_compile(); + var ref_error_1 = require_ref_error(); + var util_1 = require_util8(); + var error210 = { + message: ({ params: { discrError, tagName } }) => discrError === types_1.DiscrError.Tag ? `tag "${tagName}" must be string` : `value of tag "${tagName}" must be in oneOf`, + params: ({ params: { discrError, tag, tagName } }) => (0, codegen_1._)`{error: ${discrError}, tag: ${tagName}, tagValue: ${tag}}` + }; + var def = { + keyword: "discriminator", + type: "object", + schemaType: "object", + error: error210, + code(cxt) { + const { gen, data, schema: schema2, parentSchema, it } = cxt; + const { oneOf } = parentSchema; + if (!it.opts.discriminator) { + throw new Error("discriminator: requires discriminator option"); + } + const tagName = schema2.propertyName; + if (typeof tagName != "string") + throw new Error("discriminator: requires propertyName"); + if (schema2.mapping) + throw new Error("discriminator: mapping is not supported"); + if (!oneOf) + throw new Error("discriminator: requires oneOf keyword"); + const valid = gen.let("valid", false); + const tag = gen.const("tag", (0, codegen_1._)`${data}${(0, codegen_1.getProperty)(tagName)}`); + gen.if((0, codegen_1._)`typeof ${tag} == "string"`, () => validateMapping(), () => cxt.error(false, { discrError: types_1.DiscrError.Tag, tag, tagName })); + cxt.ok(valid); + function validateMapping() { + const mapping = getMapping(); + gen.if(false); + for (const tagValue in mapping) { + gen.elseIf((0, codegen_1._)`${tag} === ${tagValue}`); + gen.assign(valid, applyTagSchema(mapping[tagValue])); + } + gen.else(); + cxt.error(false, { discrError: types_1.DiscrError.Mapping, tag, tagName }); + gen.endIf(); + } + function applyTagSchema(schemaProp) { + const _valid = gen.name("valid"); + const schCxt = cxt.subschema({ keyword: "oneOf", schemaProp }, _valid); + cxt.mergeEvaluated(schCxt, codegen_1.Name); + return _valid; + } + function getMapping() { + var _a2; + const oneOfMapping = {}; + const topRequired = hasRequired(parentSchema); + let tagRequired = true; + for (let i = 0; i < oneOf.length; i++) { + let sch = oneOf[i]; + if ((sch === null || sch === void 0 ? void 0 : sch.$ref) && !(0, util_1.schemaHasRulesButRef)(sch, it.self.RULES)) { + const ref = sch.$ref; + sch = compile_1.resolveRef.call(it.self, it.schemaEnv.root, it.baseId, ref); + if (sch instanceof compile_1.SchemaEnv) + sch = sch.schema; + if (sch === void 0) + throw new ref_error_1.default(it.opts.uriResolver, it.baseId, ref); + } + const propSch = (_a2 = sch === null || sch === void 0 ? void 0 : sch.properties) === null || _a2 === void 0 ? void 0 : _a2[tagName]; + if (typeof propSch != "object") { + throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${tagName}"`); + } + tagRequired = tagRequired && (topRequired || hasRequired(sch)); + addMappings(propSch, i); + } + if (!tagRequired) + throw new Error(`discriminator: "${tagName}" must be required`); + return oneOfMapping; + function hasRequired({ required: required22 }) { + return Array.isArray(required22) && required22.includes(tagName); + } + function addMappings(sch, i) { + if (sch.const) { + addMapping(sch.const, i); + } else if (sch.enum) { + for (const tagValue of sch.enum) { + addMapping(tagValue, i); + } + } else { + throw new Error(`discriminator: "properties/${tagName}" must have "const" or "enum"`); + } + } + function addMapping(tagValue, i) { + if (typeof tagValue != "string" || tagValue in oneOfMapping) { + throw new Error(`discriminator: "${tagName}" values must be unique strings`); + } + oneOfMapping[tagValue] = i; + } + } + } + }; + exports.default = def; }); var require_json_schema_draft_07 = __commonJS2((exports, module) => { module.exports = { @@ -77827,21 +80434,10 @@ var require_json_schema_draft_07 = __commonJS2((exports, module) => { minimum: 0 }, nonNegativeIntegerDefault0: { - allOf: [ - { $ref: "#/definitions/nonNegativeInteger" }, - { default: 0 } - ] + allOf: [{ $ref: "#/definitions/nonNegativeInteger" }, { default: 0 }] }, simpleTypes: { - enum: [ - "array", - "boolean", - "integer", - "null", - "number", - "object", - "string" - ] + enum: ["array", "boolean", "integer", "null", "number", "object", "string"] }, stringArray: { type: "array", @@ -77906,10 +80502,7 @@ var require_json_schema_draft_07 = __commonJS2((exports, module) => { }, additionalItems: { $ref: "#" }, items: { - anyOf: [ - { $ref: "#" }, - { $ref: "#/definitions/schemaArray" } - ], + anyOf: [{ $ref: "#" }, { $ref: "#/definitions/schemaArray" }], default: true }, maxItems: { $ref: "#/definitions/nonNegativeInteger" }, @@ -77942,10 +80535,7 @@ var require_json_schema_draft_07 = __commonJS2((exports, module) => { dependencies: { type: "object", additionalProperties: { - anyOf: [ - { $ref: "#" }, - { $ref: "#/definitions/stringArray" } - ] + anyOf: [{ $ref: "#" }, { $ref: "#/definitions/stringArray" }] } }, propertyNames: { $ref: "#" }, @@ -77981,533 +80571,349 @@ var require_json_schema_draft_07 = __commonJS2((exports, module) => { default: true }; }); -var require_definition_schema = __commonJS2((exports, module) => { - var metaSchema = require_json_schema_draft_07(); - module.exports = { - $id: "https://github.com/ajv-validator/ajv/blob/master/lib/definition_schema.js", - definitions: { - simpleTypes: metaSchema.definitions.simpleTypes - }, - type: "object", - dependencies: { - schema: ["validate"], - $data: ["validate"], - statements: ["inline"], - valid: { not: { required: ["macro"] } } - }, - properties: { - type: metaSchema.properties.type, - schema: { type: "boolean" }, - statements: { type: "boolean" }, - dependencies: { - type: "array", - items: { type: "string" } - }, - metaSchema: { type: "object" }, - modifying: { type: "boolean" }, - valid: { type: "boolean" }, - $data: { type: "boolean" }, - async: { type: "boolean" }, - errors: { - anyOf: [ - { type: "boolean" }, - { const: "full" } - ] - } - } - }; -}); -var require_keyword = __commonJS2((exports, module) => { - var IDENTIFIER = /^[a-z_$][a-z0-9_$-]*$/i; - var customRuleCode = require_custom(); - var definitionSchema = require_definition_schema(); - module.exports = { - add: addKeyword, - get: getKeyword, - remove: removeKeyword, - validate: validateKeyword - }; - function addKeyword(keyword, definition) { - var RULES = this.RULES; - if (RULES.keywords[keyword]) - throw new Error("Keyword " + keyword + " is already defined"); - if (!IDENTIFIER.test(keyword)) - throw new Error("Keyword " + keyword + " is not a valid identifier"); - if (definition) { - this.validateKeyword(definition, true); - var dataType = definition.type; - if (Array.isArray(dataType)) { - for (var i = 0; i < dataType.length; i++) - _addRule(keyword, dataType[i], definition); - } else { - _addRule(keyword, dataType, definition); - } - var metaSchema = definition.metaSchema; - if (metaSchema) { - if (definition.$data && this._opts.$data) { - metaSchema = { - anyOf: [ - metaSchema, - { $ref: "https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#" } - ] - }; - } - definition.validateSchema = this.compile(metaSchema, true); - } - } - RULES.keywords[keyword] = RULES.all[keyword] = true; - function _addRule(keyword2, dataType2, definition2) { - var ruleGroup; - for (var i2 = 0; i2 < RULES.length; i2++) { - var rg = RULES[i2]; - if (rg.type == dataType2) { - ruleGroup = rg; - break; - } - } - if (!ruleGroup) { - ruleGroup = { type: dataType2, rules: [] }; - RULES.push(ruleGroup); - } - var rule = { - keyword: keyword2, - definition: definition2, - custom: true, - code: customRuleCode, - implements: definition2.implements - }; - ruleGroup.rules.push(rule); - RULES.custom[keyword2] = rule; - } - return this; - } - function getKeyword(keyword) { - var rule = this.RULES.custom[keyword]; - return rule ? rule.definition : this.RULES.keywords[keyword] || false; - } - function removeKeyword(keyword) { - var RULES = this.RULES; - delete RULES.keywords[keyword]; - delete RULES.all[keyword]; - delete RULES.custom[keyword]; - for (var i = 0; i < RULES.length; i++) { - var rules = RULES[i].rules; - for (var j = 0; j < rules.length; j++) { - if (rules[j].keyword == keyword) { - rules.splice(j, 1); - break; - } - } - } - return this; - } - function validateKeyword(definition, throwError2) { - validateKeyword.errors = null; - var v = this._validateKeyword = this._validateKeyword || this.compile(definitionSchema, true); - if (v(definition)) - return true; - validateKeyword.errors = v.errors; - if (throwError2) - throw new Error("custom keyword definition is invalid: " + this.errorsText(v.errors)); - else - return false; - } -}); -var require_data2 = __commonJS2((exports, module) => { - module.exports = { - $schema: "http://json-schema.org/draft-07/schema#", - $id: "https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#", - description: "Meta-schema for $data reference (JSON Schema extension proposal)", - type: "object", - required: ["$data"], - properties: { - $data: { - type: "string", - anyOf: [ - { format: "relative-json-pointer" }, - { format: "json-pointer" } - ] - } - }, - additionalProperties: false - }; -}); var require_ajv = __commonJS2((exports, module) => { - var compileSchema = require_compile(); - var resolve = require_resolve(); - var Cache = require_cache2(); - var SchemaObject = require_schema_obj(); - var stableStringify = require_fast_json_stable_stringify(); - var formats = require_formats(); - var rules = require_rules(); - var $dataMetaSchema = require_data(); - var util3 = require_util8(); - module.exports = Ajv2; - Ajv2.prototype.validate = validate2; - Ajv2.prototype.compile = compile; - Ajv2.prototype.addSchema = addSchema; - Ajv2.prototype.addMetaSchema = addMetaSchema; - Ajv2.prototype.validateSchema = validateSchema; - Ajv2.prototype.getSchema = getSchema; - Ajv2.prototype.removeSchema = removeSchema; - Ajv2.prototype.addFormat = addFormat2; - Ajv2.prototype.errorsText = errorsText; - Ajv2.prototype._addSchema = _addSchema; - Ajv2.prototype._compile = _compile; - Ajv2.prototype.compileAsync = require_async(); - var customKeyword = require_keyword(); - Ajv2.prototype.addKeyword = customKeyword.add; - Ajv2.prototype.getKeyword = customKeyword.get; - Ajv2.prototype.removeKeyword = customKeyword.remove; - Ajv2.prototype.validateKeyword = customKeyword.validate; - var errorClasses = require_error_classes(); - Ajv2.ValidationError = errorClasses.Validation; - Ajv2.MissingRefError = errorClasses.MissingRef; - Ajv2.$dataMetaSchema = $dataMetaSchema; - var META_SCHEMA_ID = "http://json-schema.org/draft-07/schema"; - var META_IGNORE_OPTIONS = ["removeAdditional", "useDefaults", "coerceTypes", "strictDefaults"]; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.MissingRefError = exports.ValidationError = exports.CodeGen = exports.Name = exports.nil = exports.stringify = exports.str = exports._ = exports.KeywordCxt = exports.Ajv = void 0; + var core_1 = require_core2(); + var draft7_1 = require_draft7(); + var discriminator_1 = require_discriminator(); + var draft7MetaSchema = require_json_schema_draft_07(); var META_SUPPORT_DATA = ["/properties"]; - function Ajv2(opts) { - if (!(this instanceof Ajv2)) - return new Ajv2(opts); - opts = this._opts = util3.copy(opts) || {}; - setLogger(this); - this._schemas = {}; - this._refs = {}; - this._fragments = {}; - this._formats = formats(opts.format); - this._cache = opts.cache || new Cache(); - this._loadingSchemas = {}; - this._compilations = []; - this.RULES = rules(); - this._getId = chooseGetId(opts); - opts.loopRequired = opts.loopRequired || Infinity; - if (opts.errorDataPath == "property") - opts._errorDataPathProperty = true; - if (opts.serialize === void 0) - opts.serialize = stableStringify; - this._metaOpts = getMetaSchemaOptions(this); - if (opts.formats) - addInitialFormats(this); - if (opts.keywords) - addInitialKeywords(this); - addDefaultMetaSchema(this); - if (typeof opts.meta == "object") - this.addMetaSchema(opts.meta); - if (opts.nullable) - this.addKeyword("nullable", { metaSchema: { type: "boolean" } }); - addInitialSchemas(this); - } - function validate2(schemaKeyRef, data) { - var v; - if (typeof schemaKeyRef == "string") { - v = this.getSchema(schemaKeyRef); - if (!v) - throw new Error('no schema with key or ref "' + schemaKeyRef + '"'); - } else { - var schemaObj = this._addSchema(schemaKeyRef); - v = schemaObj.validate || this._compile(schemaObj); + var META_SCHEMA_ID = "http://json-schema.org/draft-07/schema"; + class Ajv2 extends core_1.default { + _addVocabularies() { + super._addVocabularies(); + draft7_1.default.forEach((v) => this.addVocabulary(v)); + if (this.opts.discriminator) + this.addKeyword(discriminator_1.default); } - var valid = v(data); - if (v.$async !== true) - this.errors = v.errors; - return valid; - } - function compile(schema2, _meta) { - var schemaObj = this._addSchema(schema2, void 0, _meta); - return schemaObj.validate || this._compile(schemaObj); - } - function addSchema(schema2, key, _skipValidation, _meta) { - if (Array.isArray(schema2)) { - for (var i = 0; i < schema2.length; i++) - this.addSchema(schema2[i], void 0, _skipValidation, _meta); - return this; + _addDefaultMetaSchema() { + super._addDefaultMetaSchema(); + if (!this.opts.meta) + return; + const metaSchema = this.opts.$data ? this.$dataMetaSchema(draft7MetaSchema, META_SUPPORT_DATA) : draft7MetaSchema; + this.addMetaSchema(metaSchema, META_SCHEMA_ID, false); + this.refs["http://json-schema.org/schema"] = META_SCHEMA_ID; } - var id = this._getId(schema2); - if (id !== void 0 && typeof id != "string") - throw new Error("schema id must be string"); - key = resolve.normalizeId(key || id); - checkUnique(this, key); - this._schemas[key] = this._addSchema(schema2, _skipValidation, _meta, true); - return this; - } - function addMetaSchema(schema2, key, skipValidation) { - this.addSchema(schema2, key, skipValidation, true); - return this; - } - function validateSchema(schema2, throwOrLogError) { - var $schema = schema2.$schema; - if ($schema !== void 0 && typeof $schema != "string") - throw new Error("$schema must be a string"); - $schema = $schema || this._opts.defaultMeta || defaultMeta(this); - if (!$schema) { - this.logger.warn("meta-schema not available"); - this.errors = null; - return true; - } - var valid = this.validate($schema, schema2); - if (!valid && throwOrLogError) { - var message = "schema is invalid: " + this.errorsText(); - if (this._opts.validateSchema == "log") - this.logger.error(message); - else - throw new Error(message); - } - return valid; - } - function defaultMeta(self2) { - var meta = self2._opts.meta; - self2._opts.defaultMeta = typeof meta == "object" ? self2._getId(meta) || meta : self2.getSchema(META_SCHEMA_ID) ? META_SCHEMA_ID : void 0; - return self2._opts.defaultMeta; - } - function getSchema(keyRef) { - var schemaObj = _getSchemaObj(this, keyRef); - switch (typeof schemaObj) { - case "object": - return schemaObj.validate || this._compile(schemaObj); - case "string": - return this.getSchema(schemaObj); - case "undefined": - return _getSchemaFragment(this, keyRef); + defaultMeta() { + return this.opts.defaultMeta = super.defaultMeta() || (this.getSchema(META_SCHEMA_ID) ? META_SCHEMA_ID : void 0); } } - function _getSchemaFragment(self2, ref) { - var res = resolve.schema.call(self2, { schema: {} }, ref); - if (res) { - var { schema: schema2, root: root2, baseId } = res; - var v = compileSchema.call(self2, schema2, root2, void 0, baseId); - self2._fragments[ref] = new SchemaObject({ - ref, - fragment: true, - schema: schema2, - root: root2, - baseId, - validate: v - }); - return v; - } + exports.Ajv = Ajv2; + module.exports = exports = Ajv2; + module.exports.Ajv = Ajv2; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.default = Ajv2; + var validate_1 = require_validate(); + Object.defineProperty(exports, "KeywordCxt", { enumerable: true, get: function() { + return validate_1.KeywordCxt; + } }); + var codegen_1 = require_codegen(); + Object.defineProperty(exports, "_", { enumerable: true, get: function() { + return codegen_1._; + } }); + Object.defineProperty(exports, "str", { enumerable: true, get: function() { + return codegen_1.str; + } }); + Object.defineProperty(exports, "stringify", { enumerable: true, get: function() { + return codegen_1.stringify; + } }); + Object.defineProperty(exports, "nil", { enumerable: true, get: function() { + return codegen_1.nil; + } }); + Object.defineProperty(exports, "Name", { enumerable: true, get: function() { + return codegen_1.Name; + } }); + Object.defineProperty(exports, "CodeGen", { enumerable: true, get: function() { + return codegen_1.CodeGen; + } }); + var validation_error_1 = require_validation_error(); + Object.defineProperty(exports, "ValidationError", { enumerable: true, get: function() { + return validation_error_1.default; + } }); + var ref_error_1 = require_ref_error(); + Object.defineProperty(exports, "MissingRefError", { enumerable: true, get: function() { + return ref_error_1.default; + } }); +}); +var require_formats = __commonJS2((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.formatNames = exports.fastFormats = exports.fullFormats = void 0; + function fmtDef(validate2, compare) { + return { validate: validate2, compare }; } - function _getSchemaObj(self2, keyRef) { - keyRef = resolve.normalizeId(keyRef); - return self2._schemas[keyRef] || self2._refs[keyRef] || self2._fragments[keyRef]; + exports.fullFormats = { + date: fmtDef(date42, compareDate), + time: fmtDef(getTime(true), compareTime), + "date-time": fmtDef(getDateTime(true), compareDateTime), + "iso-time": fmtDef(getTime(), compareIsoTime), + "iso-date-time": fmtDef(getDateTime(), compareIsoDateTime), + duration: /^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/, + uri, + "uri-reference": /^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0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\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i, + url: /^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu, + email: /^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i, + hostname: /^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i, + ipv4: /^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/, + ipv6: /^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i, + regex: regex4, + uuid: /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i, + "json-pointer": /^(?:\/(?:[^~/]|~0|~1)*)*$/, + "json-pointer-uri-fragment": /^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i, + "relative-json-pointer": /^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/, + byte, + int32: { type: "number", validate: validateInt32 }, + int64: { type: "number", validate: validateInt64 }, + float: { type: "number", validate: validateNumber }, + double: { type: "number", validate: validateNumber }, + password: true, + binary: true + }; + exports.fastFormats = { + ...exports.fullFormats, + date: fmtDef(/^\d\d\d\d-[0-1]\d-[0-3]\d$/, compareDate), + time: fmtDef(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i, compareTime), + "date-time": fmtDef(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i, compareDateTime), + "iso-time": fmtDef(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i, compareIsoTime), + "iso-date-time": fmtDef(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i, compareIsoDateTime), + uri: /^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i, + "uri-reference": /^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i, + email: /^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i + }; + exports.formatNames = Object.keys(exports.fullFormats); + function isLeapYear(year) { + return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0); } - function removeSchema(schemaKeyRef) { - if (schemaKeyRef instanceof RegExp) { - _removeAllSchemas(this, this._schemas, schemaKeyRef); - _removeAllSchemas(this, this._refs, schemaKeyRef); - return this; - } - switch (typeof schemaKeyRef) { - case "undefined": - _removeAllSchemas(this, this._schemas); - _removeAllSchemas(this, this._refs); - this._cache.clear(); - return this; - case "string": - var schemaObj = _getSchemaObj(this, schemaKeyRef); - if (schemaObj) - this._cache.del(schemaObj.cacheKey); - delete this._schemas[schemaKeyRef]; - delete this._refs[schemaKeyRef]; - return this; - case "object": - var serialize = this._opts.serialize; - var cacheKey = serialize ? serialize(schemaKeyRef) : schemaKeyRef; - this._cache.del(cacheKey); - var id = this._getId(schemaKeyRef); - if (id) { - id = resolve.normalizeId(id); - delete this._schemas[id]; - delete this._refs[id]; - } - } - return this; + var DATE = /^(\d\d\d\d)-(\d\d)-(\d\d)$/; + var DAYS = [0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; + function date42(str) { + const matches = DATE.exec(str); + if (!matches) + return false; + const year = +matches[1]; + const month = +matches[2]; + const day = +matches[3]; + return month >= 1 && month <= 12 && day >= 1 && day <= (month === 2 && isLeapYear(year) ? 29 : DAYS[month]); } - function _removeAllSchemas(self2, schemas, regex4) { - for (var keyRef in schemas) { - var schemaObj = schemas[keyRef]; - if (!schemaObj.meta && (!regex4 || regex4.test(keyRef))) { - self2._cache.del(schemaObj.cacheKey); - delete schemas[keyRef]; - } - } + function compareDate(d1, d2) { + if (!(d1 && d2)) + return; + if (d1 > d2) + return 1; + if (d1 < d2) + return -1; + return 0; } - function _addSchema(schema2, skipValidation, meta, shouldAddSchema) { - 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; - shouldAddSchema = shouldAddSchema || this._opts.addUsedSchema !== false; - var id = resolve.normalizeId(this._getId(schema2)); - if (id && shouldAddSchema) - checkUnique(this, id); - var willValidate = this._opts.validateSchema !== false && !skipValidation; - var recursiveMeta; - if (willValidate && !(recursiveMeta = id && id == resolve.normalizeId(schema2.$schema))) - this.validateSchema(schema2, true); - var localRefs = resolve.ids.call(this, schema2); - var schemaObj = new SchemaObject({ - id, - schema: schema2, - localRefs, - cacheKey, - meta - }); - if (id[0] != "#" && shouldAddSchema) - this._refs[id] = schemaObj; - this._cache.put(cacheKey, schemaObj); - if (willValidate && recursiveMeta) - this.validateSchema(schema2, true); - return schemaObj; + var TIME = /^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i; + function getTime(strictTimeZone) { + return function time6(str) { + const matches = TIME.exec(str); + if (!matches) + return false; + const hr = +matches[1]; + const min = +matches[2]; + const sec = +matches[3]; + const tz = matches[4]; + const tzSign = matches[5] === "-" ? -1 : 1; + const tzH = +(matches[6] || 0); + const tzM = +(matches[7] || 0); + if (tzH > 23 || tzM > 59 || strictTimeZone && !tz) + return false; + if (hr <= 23 && min <= 59 && sec < 60) + return true; + const utcMin = min - tzM * tzSign; + const utcHr = hr - tzH * tzSign - (utcMin < 0 ? 1 : 0); + return (utcHr === 23 || utcHr === -1) && (utcMin === 59 || utcMin === -1) && sec < 61; + }; } - function _compile(schemaObj, root2) { - if (schemaObj.compiling) { - schemaObj.validate = callValidate; - callValidate.schema = schemaObj.schema; - callValidate.errors = null; - callValidate.root = root2 ? root2 : callValidate; - if (schemaObj.schema.$async === true) - callValidate.$async = true; - return callValidate; - } - schemaObj.compiling = true; - var currentOpts; - if (schemaObj.meta) { - currentOpts = this._opts; - this._opts = this._metaOpts; - } - var v; + function compareTime(s1, s2) { + if (!(s1 && s2)) + return; + const t1 = (/* @__PURE__ */ new Date("2020-01-01T" + s1)).valueOf(); + const t2 = (/* @__PURE__ */ new Date("2020-01-01T" + s2)).valueOf(); + if (!(t1 && t2)) + return; + return t1 - t2; + } + function compareIsoTime(t1, t2) { + if (!(t1 && t2)) + return; + const a1 = TIME.exec(t1); + const a2 = TIME.exec(t2); + if (!(a1 && a2)) + return; + t1 = a1[1] + a1[2] + a1[3]; + t2 = a2[1] + a2[2] + a2[3]; + if (t1 > t2) + return 1; + if (t1 < t2) + return -1; + return 0; + } + var DATE_TIME_SEPARATOR = /t|\s/i; + function getDateTime(strictTimeZone) { + const time32 = getTime(strictTimeZone); + return function date_time(str) { + const dateTime = str.split(DATE_TIME_SEPARATOR); + return dateTime.length === 2 && date42(dateTime[0]) && time32(dateTime[1]); + }; + } + function compareDateTime(dt1, dt2) { + if (!(dt1 && dt2)) + return; + const d1 = new Date(dt1).valueOf(); + const d2 = new Date(dt2).valueOf(); + if (!(d1 && d2)) + return; + return d1 - d2; + } + function compareIsoDateTime(dt1, dt2) { + if (!(dt1 && dt2)) + return; + const [d1, t1] = dt1.split(DATE_TIME_SEPARATOR); + const [d2, t2] = dt2.split(DATE_TIME_SEPARATOR); + const res = compareDate(d1, d2); + if (res === void 0) + return; + return res || compareTime(t1, t2); + } + var NOT_URI_FRAGMENT = /\/|:/; + var URI = /^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i; + function uri(str) { + return NOT_URI_FRAGMENT.test(str) && URI.test(str); + } + var BYTE = /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm; + function byte(str) { + BYTE.lastIndex = 0; + return BYTE.test(str); + } + var MIN_INT32 = -(2 ** 31); + var MAX_INT32 = 2 ** 31 - 1; + function validateInt32(value2) { + return Number.isInteger(value2) && value2 <= MAX_INT32 && value2 >= MIN_INT32; + } + function validateInt64(value2) { + return Number.isInteger(value2); + } + function validateNumber() { + return true; + } + var Z_ANCHOR = /[^\\]\\Z/; + function regex4(str) { + if (Z_ANCHOR.test(str)) + return false; try { - v = compileSchema.call(this, schemaObj.schema, root2, schemaObj.localRefs); + new RegExp(str); + return true; } catch (e) { - delete schemaObj.validate; - throw e; - } finally { - schemaObj.compiling = false; - if (schemaObj.meta) - this._opts = currentOpts; - } - schemaObj.validate = v; - schemaObj.refs = v.refs; - schemaObj.refVal = v.refVal; - schemaObj.root = v.root; - return v; - function callValidate() { - var _validate = schemaObj.validate; - var result = _validate.apply(this, arguments); - callValidate.errors = _validate.errors; - return result; + return false; } } - function chooseGetId(opts) { - switch (opts.schemaId) { - case "auto": - return _get$IdOrId; - case "id": - return _getId; - default: - return _get$Id; +}); +var require_limit = __commonJS2((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.formatLimitDefinition = void 0; + var ajv_1 = require_ajv(); + var codegen_1 = require_codegen(); + var ops = codegen_1.operators; + var KWDs = { + formatMaximum: { okStr: "<=", ok: ops.LTE, fail: ops.GT }, + formatMinimum: { okStr: ">=", ok: ops.GTE, fail: ops.LT }, + formatExclusiveMaximum: { okStr: "<", ok: ops.LT, fail: ops.GTE }, + formatExclusiveMinimum: { okStr: ">", ok: ops.GT, fail: ops.LTE } + }; + var error210 = { + message: ({ keyword, schemaCode }) => (0, codegen_1.str)`should be ${KWDs[keyword].okStr} ${schemaCode}`, + params: ({ keyword, schemaCode }) => (0, codegen_1._)`{comparison: ${KWDs[keyword].okStr}, limit: ${schemaCode}}` + }; + exports.formatLimitDefinition = { + keyword: Object.keys(KWDs), + type: "string", + schemaType: "string", + $data: true, + error: error210, + code(cxt) { + const { gen, data, schemaCode, keyword, it } = cxt; + const { opts, self: self2 } = it; + if (!opts.validateFormats) + return; + const fCxt = new ajv_1.KeywordCxt(it, self2.RULES.all.format.definition, "format"); + if (fCxt.$data) + validate$DataFormat(); + else + validateFormat(); + function validate$DataFormat() { + const fmts = gen.scopeValue("formats", { + ref: self2.formats, + code: opts.code.formats + }); + const fmt = gen.const("fmt", (0, codegen_1._)`${fmts}[${fCxt.schemaCode}]`); + cxt.fail$data((0, codegen_1.or)((0, codegen_1._)`typeof ${fmt} != "object"`, (0, codegen_1._)`${fmt} instanceof RegExp`, (0, codegen_1._)`typeof ${fmt}.compare != "function"`, compareCode(fmt))); + } + function validateFormat() { + const format2 = fCxt.schema; + const fmtDef = self2.formats[format2]; + if (!fmtDef || fmtDef === true) + return; + if (typeof fmtDef != "object" || fmtDef instanceof RegExp || typeof fmtDef.compare != "function") { + throw new Error(`"${keyword}": format "${format2}" does not define "compare" function`); + } + const fmt = gen.scopeValue("formats", { + key: format2, + ref: fmtDef, + code: opts.code.formats ? (0, codegen_1._)`${opts.code.formats}${(0, codegen_1.getProperty)(format2)}` : void 0 + }); + cxt.fail$data(compareCode(fmt)); + } + function compareCode(fmt) { + return (0, codegen_1._)`${fmt}.compare(${data}, ${schemaCode}) ${KWDs[keyword].fail} 0`; + } + }, + dependencies: ["format"] + }; + var formatLimitPlugin = (ajv) => { + ajv.addKeyword(exports.formatLimitDefinition); + return ajv; + }; + exports.default = formatLimitPlugin; +}); +var require_dist = __commonJS2((exports, module) => { + Object.defineProperty(exports, "__esModule", { value: true }); + var formats_1 = require_formats(); + var limit_1 = require_limit(); + var codegen_1 = require_codegen(); + var fullName = new codegen_1.Name("fullFormats"); + var fastName = new codegen_1.Name("fastFormats"); + var formatsPlugin = (ajv, opts = { keywords: true }) => { + if (Array.isArray(opts)) { + addFormats(ajv, opts, formats_1.fullFormats, fullName); + return ajv; } + const [formats, exportName] = opts.mode === "fast" ? [formats_1.fastFormats, fastName] : [formats_1.fullFormats, fullName]; + const list = opts.formats || formats_1.formatNames; + addFormats(ajv, list, formats, exportName); + if (opts.keywords) + (0, limit_1.default)(ajv); + return ajv; + }; + formatsPlugin.get = (name, mode = "full") => { + const formats = mode === "fast" ? formats_1.fastFormats : formats_1.fullFormats; + const f = formats[name]; + if (!f) + throw new Error(`Unknown format "${name}"`); + return f; + }; + function addFormats(ajv, list, fs22, exportName) { + var _a2; + var _b; + (_a2 = (_b = ajv.opts.code).formats) !== null && _a2 !== void 0 || (_b.formats = (0, codegen_1._)`require("ajv-formats/dist/formats").${exportName}`); + for (const f of list) + ajv.addFormat(f, fs22[f]); } - function _getId(schema2) { - if (schema2.$id) - this.logger.warn("schema $id ignored", schema2.$id); - return schema2.id; - } - function _get$Id(schema2) { - if (schema2.id) - this.logger.warn("schema id ignored", schema2.id); - return schema2.$id; - } - function _get$IdOrId(schema2) { - if (schema2.$id && schema2.id && schema2.$id != schema2.id) - throw new Error("schema $id is different from id"); - return schema2.$id || schema2.id; - } - function errorsText(errors2, options) { - errors2 = errors2 || this.errors; - if (!errors2) - return "No errors"; - options = options || {}; - var separator2 = options.separator === void 0 ? ", " : options.separator; - var dataVar = options.dataVar === void 0 ? "data" : options.dataVar; - var text = ""; - for (var i = 0; i < errors2.length; i++) { - var e = errors2[i]; - if (e) - text += dataVar + e.dataPath + " " + e.message + separator2; - } - return text.slice(0, -separator2.length); - } - function addFormat2(name, format2) { - if (typeof format2 == "string") - format2 = new RegExp(format2); - this._formats[name] = format2; - return this; - } - function addDefaultMetaSchema(self2) { - var $dataSchema; - if (self2._opts.$data) { - $dataSchema = require_data2(); - self2.addMetaSchema($dataSchema, $dataSchema.$id, true); - } - if (self2._opts.meta === false) - return; - var metaSchema = require_json_schema_draft_07(); - if (self2._opts.$data) - metaSchema = $dataMetaSchema(metaSchema, META_SUPPORT_DATA); - self2.addMetaSchema(metaSchema, META_SCHEMA_ID, true); - self2._refs["http://json-schema.org/schema"] = META_SCHEMA_ID; - } - function addInitialSchemas(self2) { - var optsSchemas = self2._opts.schemas; - if (!optsSchemas) - return; - if (Array.isArray(optsSchemas)) - self2.addSchema(optsSchemas); - else - for (var key in optsSchemas) - self2.addSchema(optsSchemas[key], key); - } - function addInitialFormats(self2) { - for (var name in self2._opts.formats) { - var format2 = self2._opts.formats[name]; - self2.addFormat(name, format2); - } - } - function addInitialKeywords(self2) { - for (var name in self2._opts.keywords) { - var keyword = self2._opts.keywords[name]; - self2.addKeyword(name, keyword); - } - } - function checkUnique(self2, id) { - if (self2._schemas[id] || self2._refs[id]) - throw new Error('schema with key or id "' + id + '" already exists'); - } - function getMetaSchemaOptions(self2) { - var metaOpts = util3.copy(self2._opts); - for (var i = 0; i < META_IGNORE_OPTIONS.length; i++) - delete metaOpts[META_IGNORE_OPTIONS[i]]; - return metaOpts; - } - function setLogger(self2) { - var logger = self2._opts.logger; - if (logger === false) { - self2.logger = { log: noop4, warn: noop4, error: noop4 }; - } else { - if (logger === void 0) - logger = console; - if (!(typeof logger == "object" && logger.log && logger.warn && logger.error)) - throw new Error("logger must implement log, warn and error methods"); - self2.logger = logger; - } - } - function noop4() { - } + module.exports = exports = formatsPlugin; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.default = formatsPlugin; }); var DEFAULT_MAX_LISTENERS = 50; function createAbortController(maxListeners = DEFAULT_MAX_LISTENERS) { @@ -78515,582 +80921,6 @@ function createAbortController(maxListeners = DEFAULT_MAX_LISTENERS) { setMaxListeners(maxListeners, controller.signal); return controller; } -var NodeFsOperations = { - cwd() { - return process.cwd(); - }, - existsSync(fsPath) { - return fs.existsSync(fsPath); - }, - async stat(fsPath) { - return statPromise(fsPath); - }, - statSync(fsPath) { - return fs.statSync(fsPath); - }, - readFileSync(fsPath, options) { - return fs.readFileSync(fsPath, { encoding: options.encoding }); - }, - readFileBytesSync(fsPath) { - return fs.readFileSync(fsPath); - }, - readSync(fsPath, options) { - let fd = void 0; - try { - fd = fs.openSync(fsPath, "r"); - const buffer = Buffer.alloc(options.length); - const bytesRead = fs.readSync(fd, buffer, 0, options.length, 0); - return { buffer, bytesRead }; - } finally { - if (fd) - fs.closeSync(fd); - } - }, - writeFileSync(fsPath, data, options) { - if (!options.flush) { - const writeOptions = { - encoding: options.encoding - }; - if (options.mode !== void 0) { - writeOptions.mode = options.mode; - } - fs.writeFileSync(fsPath, data, writeOptions); - return; - } - let fd; - try { - const mode = options.mode !== void 0 ? options.mode : void 0; - fd = fs.openSync(fsPath, "w", mode); - fs.writeFileSync(fd, data, { encoding: options.encoding }); - fs.fsyncSync(fd); - } finally { - if (fd) { - fs.closeSync(fd); - } - } - }, - appendFileSync(path4, data) { - fs.appendFileSync(path4, data); - }, - copyFileSync(src, dest) { - fs.copyFileSync(src, dest); - }, - unlinkSync(path4) { - fs.unlinkSync(path4); - }, - renameSync(oldPath, newPath) { - fs.renameSync(oldPath, newPath); - }, - linkSync(target, path4) { - fs.linkSync(target, path4); - }, - symlinkSync(target, path4) { - fs.symlinkSync(target, path4); - }, - readlinkSync(path4) { - return fs.readlinkSync(path4); - }, - realpathSync(path4) { - return fs.realpathSync(path4); - }, - mkdirSync(dirPath) { - if (!fs.existsSync(dirPath)) { - fs.mkdirSync(dirPath, { recursive: true, mode: 448 }); - } - }, - readdirSync(dirPath) { - return fs.readdirSync(dirPath, { withFileTypes: true }); - }, - readdirStringSync(dirPath) { - return fs.readdirSync(dirPath); - }, - isDirEmptySync(dirPath) { - const files = this.readdirSync(dirPath); - return files.length === 0; - }, - rmdirSync(dirPath) { - fs.rmdirSync(dirPath); - }, - rmSync(path4, options) { - fs.rmSync(path4, options); - }, - createWriteStream(path4) { - return fs.createWriteStream(path4); - } -}; -var activeFs = NodeFsOperations; -function getFsImplementation() { - return activeFs; -} -var AbortError = class extends Error { -}; -function isRunningWithBun() { - return process.versions.bun !== void 0; -} -var ProcessTransport = class { - options; - child; - childStdin; - childStdout; - ready = false; - abortController; - exitError; - exitListeners = []; - processExitHandler; - abortHandler; - constructor(options) { - this.options = options; - this.abortController = options.abortController || createAbortController(); - this.initialize(); - } - initialize() { - try { - const { - additionalDirectories = [], - agents: agents2, - cwd: cwd2, - executable = isRunningWithBun() ? "bun" : "node", - executableArgs = [], - extraArgs = {}, - pathToClaudeCodeExecutable, - env: env3 = { ...process.env }, - stderr, - customSystemPrompt, - appendSystemPrompt, - maxThinkingTokens, - maxTurns, - maxBudgetUsd, - model, - fallbackModel, - permissionMode, - allowDangerouslySkipPermissions, - permissionPromptToolName, - continueConversation, - resume, - settingSources, - allowedTools = [], - disallowedTools = [], - mcpServers, - strictMcpConfig, - canUseTool, - includePartialMessages, - plugins - } = this.options; - const args3 = [ - "--output-format", - "stream-json", - "--verbose", - "--input-format", - "stream-json" - ]; - if (typeof customSystemPrompt === "string") - args3.push("--system-prompt", customSystemPrompt); - if (appendSystemPrompt) - args3.push("--append-system-prompt", appendSystemPrompt); - if (maxThinkingTokens !== void 0) { - args3.push("--max-thinking-tokens", maxThinkingTokens.toString()); - } - if (maxTurns) - args3.push("--max-turns", maxTurns.toString()); - if (maxBudgetUsd !== void 0) { - args3.push("--max-budget-usd", maxBudgetUsd.toString()); - } - if (model) - args3.push("--model", model); - if (env3.DEBUG) - args3.push("--debug-to-stderr"); - if (canUseTool) { - if (permissionPromptToolName) { - throw new Error("canUseTool callback cannot be used with permissionPromptToolName. Please use one or the other."); - } - args3.push("--permission-prompt-tool", "stdio"); - } else if (permissionPromptToolName) { - args3.push("--permission-prompt-tool", permissionPromptToolName); - } - if (continueConversation) - args3.push("--continue"); - if (resume) - args3.push("--resume", resume); - if (allowedTools.length > 0) { - args3.push("--allowedTools", allowedTools.join(",")); - } - if (disallowedTools.length > 0) { - args3.push("--disallowedTools", disallowedTools.join(",")); - } - if (mcpServers && Object.keys(mcpServers).length > 0) { - args3.push("--mcp-config", JSON.stringify({ mcpServers })); - } - if (agents2 && Object.keys(agents2).length > 0) { - args3.push("--agents", JSON.stringify(agents2)); - } - if (settingSources) { - args3.push("--setting-sources", settingSources.join(",")); - } - if (strictMcpConfig) { - args3.push("--strict-mcp-config"); - } - if (permissionMode) { - args3.push("--permission-mode", permissionMode); - } - if (allowDangerouslySkipPermissions) { - args3.push("--allow-dangerously-skip-permissions"); - } - if (fallbackModel) { - if (model && fallbackModel === model) { - throw new Error("Fallback model cannot be the same as the main model. Please specify a different model for fallbackModel option."); - } - args3.push("--fallback-model", fallbackModel); - } - if (includePartialMessages) { - args3.push("--include-partial-messages"); - } - for (const dir of additionalDirectories) { - args3.push("--add-dir", dir); - } - if (plugins && plugins.length > 0) { - for (const plugin of plugins) { - if (plugin.type === "local") { - args3.push("--plugin-dir", plugin.path); - } else { - throw new Error(`Unsupported plugin type: ${plugin.type}`); - } - } - } - if (this.options.forkSession) { - args3.push("--fork-session"); - } - if (this.options.resumeSessionAt) { - args3.push("--resume-session-at", this.options.resumeSessionAt); - } - for (const [flag, value2] of Object.entries(extraArgs)) { - if (value2 === null) { - args3.push(`--${flag}`); - } else { - args3.push(`--${flag}`, value2); - } - } - if (!env3.CLAUDE_CODE_ENTRYPOINT) { - env3.CLAUDE_CODE_ENTRYPOINT = "sdk-ts"; - } - const fs22 = getFsImplementation(); - if (!fs22.existsSync(pathToClaudeCodeExecutable)) { - const errorMessage = isNativeBinary(pathToClaudeCodeExecutable) ? `Claude Code native binary not found at ${pathToClaudeCodeExecutable}. Please ensure Claude Code is installed via native installer or specify a valid path with options.pathToClaudeCodeExecutable.` : `Claude Code executable not found at ${pathToClaudeCodeExecutable}. Is options.pathToClaudeCodeExecutable set?`; - throw new ReferenceError(errorMessage); - } - const isNative = isNativeBinary(pathToClaudeCodeExecutable); - const spawnCommand = isNative ? pathToClaudeCodeExecutable : executable; - const spawnArgs = isNative ? [...executableArgs, ...args3] : [...executableArgs, pathToClaudeCodeExecutable, ...args3]; - this.logForDebugging(isNative ? `Spawning Claude Code native binary: ${spawnCommand} ${spawnArgs.join(" ")}` : `Spawning Claude Code process: ${spawnCommand} ${spawnArgs.join(" ")}`); - const stderrMode = env3.DEBUG || stderr ? "pipe" : "ignore"; - this.child = spawn(spawnCommand, spawnArgs, { - cwd: cwd2, - stdio: ["pipe", "pipe", stderrMode], - signal: this.abortController.signal, - env: env3 - }); - this.childStdin = this.child.stdin; - this.childStdout = this.child.stdout; - if (env3.DEBUG || stderr) { - this.child.stderr.on("data", (data) => { - this.logForDebugging(data.toString()); - }); - } - const cleanup = () => { - if (this.child && !this.child.killed) { - this.child.kill("SIGTERM"); - } - }; - this.processExitHandler = cleanup; - this.abortHandler = cleanup; - process.on("exit", this.processExitHandler); - this.abortController.signal.addEventListener("abort", this.abortHandler); - this.child.on("error", (error41) => { - 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.logForDebugging(this.exitError.message); - } - }); - this.child.on("close", (code, signal) => { - this.ready = false; - 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); - } - } - }); - this.ready = true; - } catch (error41) { - this.ready = false; - throw error41; - } - } - getProcessExitError(code, signal) { - if (code !== 0 && code !== null) { - return new Error(`Claude Code process exited with code ${code}`); - } else if (signal) { - return new Error(`Claude Code process terminated by signal ${signal}`); - } - return; - } - logForDebugging(message) { - if (process.env.DEBUG) { - process.stderr.write(`${message} -`); - } - if (this.options.stderr) { - this.options.stderr(message); - } - } - write(data) { - if (this.abortController.signal.aborted) { - throw new AbortError("Operation aborted"); - } - if (!this.ready || !this.childStdin) { - throw new Error("ProcessTransport is not ready for writing"); - } - if (this.child?.killed || this.child?.exitCode !== null) { - throw new Error("Cannot write to terminated process"); - } - if (this.exitError) { - throw new Error(`Cannot write to process that exited with error: ${this.exitError.message}`); - } - if (process.env.DEBUG_SDK) { - process.stderr.write(`[ProcessTransport] Writing to stdin: ${data.substring(0, 100)} -`); - } - try { - const written = this.childStdin.write(data); - if (!written && process.env.DEBUG_SDK) { - console.warn("[ProcessTransport] Write buffer full, data queued"); - } - } catch (error41) { - this.ready = false; - throw new Error(`Failed to write to process stdin: ${error41.message}`); - } - } - close() { - if (this.childStdin) { - this.childStdin.end(); - this.childStdin = void 0; - } - if (this.processExitHandler) { - process.off("exit", this.processExitHandler); - this.processExitHandler = void 0; - } - if (this.abortHandler) { - this.abortController.signal.removeEventListener("abort", this.abortHandler); - this.abortHandler = void 0; - } - for (const { handler: handler2 } of this.exitListeners) { - this.child?.off("exit", handler2); - } - this.exitListeners = []; - if (this.child && !this.child.killed) { - this.child.kill("SIGTERM"); - setTimeout(() => { - if (this.child && !this.child.killed) { - this.child.kill("SIGKILL"); - } - }, 5e3); - } - this.ready = false; - } - isReady() { - return this.ready; - } - async *readMessages() { - if (!this.childStdout) { - throw new Error("ProcessTransport output stream not available"); - } - const rl = createInterface({ input: this.childStdout }); - try { - for await (const line of rl) { - if (line.trim()) { - const message = JSON.parse(line); - yield message; - } - } - await this.waitForExit(); - } catch (error41) { - throw error41; - } finally { - rl.close(); - } - } - endInput() { - if (this.childStdin) { - this.childStdin.end(); - } - } - getInputStream() { - return this.childStdin; - } - onExit(callback) { - if (!this.child) - return () => { - }; - const handler2 = (code, signal) => { - const error41 = this.getProcessExitError(code, signal); - callback(error41); - }; - this.child.on("exit", handler2); - this.exitListeners.push({ callback, handler: handler2 }); - return () => { - if (this.child) { - this.child.off("exit", handler2); - } - const index = this.exitListeners.findIndex((l) => l.handler === handler2); - if (index !== -1) { - this.exitListeners.splice(index, 1); - } - }; - } - async waitForExit() { - if (!this.child) { - if (this.exitError) { - throw this.exitError; - } - return; - } - if (this.child.exitCode !== null || this.child.killed) { - if (this.exitError) { - throw this.exitError; - } - return; - } - return new Promise((resolve, reject) => { - const exitHandler = (code, signal) => { - if (this.abortController.signal.aborted) { - reject(new AbortError("Operation aborted")); - return; - } - const error41 = this.getProcessExitError(code, signal); - if (error41) { - reject(error41); - } else { - resolve(); - } - }; - this.child.once("exit", exitHandler); - const errorHandler = (error41) => { - this.child.off("exit", exitHandler); - reject(error41); - }; - this.child.once("error", errorHandler); - this.child.once("exit", () => { - this.child.off("error", errorHandler); - }); - }); - } -}; -function isNativeBinary(executablePath) { - const jsExtensions = [".js", ".mjs", ".tsx", ".ts", ".jsx"]; - return !jsExtensions.some((ext) => executablePath.endsWith(ext)); -} -var Stream = class { - returned; - queue = []; - readResolve; - readReject; - isDone = false; - hasError; - started = false; - constructor(returned) { - this.returned = returned; - } - [Symbol.asyncIterator]() { - if (this.started) { - throw new Error("Stream can only be iterated once"); - } - this.started = true; - return this; - } - next() { - if (this.queue.length > 0) { - return Promise.resolve({ - done: false, - value: this.queue.shift() - }); - } - if (this.isDone) { - return Promise.resolve({ done: true, value: void 0 }); - } - if (this.hasError) { - return Promise.reject(this.hasError); - } - return new Promise((resolve, reject) => { - this.readResolve = resolve; - this.readReject = reject; - }); - } - enqueue(value2) { - if (this.readResolve) { - const resolve = this.readResolve; - this.readResolve = void 0; - this.readReject = void 0; - resolve({ done: false, value: value2 }); - } else { - this.queue.push(value2); - } - } - done() { - this.isDone = true; - if (this.readResolve) { - const resolve = this.readResolve; - this.readResolve = void 0; - this.readReject = void 0; - resolve({ done: true, value: void 0 }); - } - } - error(error41) { - this.hasError = error41; - if (this.readReject) { - const reject = this.readReject; - this.readResolve = void 0; - this.readReject = void 0; - reject(error41); - } - } - return() { - this.isDone = true; - if (this.returned) { - this.returned(); - } - return Promise.resolve({ done: true, value: void 0 }); - } -}; -var SdkControlServerTransport = class { - sendMcpMessage; - isClosed = false; - constructor(sendMcpMessage) { - this.sendMcpMessage = sendMcpMessage; - } - onclose; - onerror; - onmessage; - async start() { - } - async send(message) { - if (this.isClosed) { - throw new Error("Transport is closed"); - } - this.sendMcpMessage(message); - } - async close() { - if (this.isClosed) { - return; - } - this.isClosed = true; - this.onclose?.(); - } -}; var freeGlobal = typeof global == "object" && global && global.Object === Object && global; var _freeGlobal_default = freeGlobal; var freeSelf = typeof self == "object" && self && self.Object === Object && self; @@ -79194,19 +81024,15 @@ function baseIsNative(value2) { return pattern.test(_toSource_default(value2)); } var _baseIsNative_default = baseIsNative; -function getValue(object2, key) { - return object2 == null ? void 0 : object2[key]; +function getValue(object6, key) { + return object6 == null ? void 0 : object6[key]; } var _getValue_default = getValue; -function getNative(object2, key) { - var value2 = _getValue_default(object2, key); +function getNative(object6, key) { + var value2 = _getValue_default(object6, key); return _baseIsNative_default(value2) ? value2 : void 0; } var _getNative_default = getNative; -function eq(value2, other) { - return value2 === other || value2 !== value2 && other !== other; -} -var eq_default = eq; var nativeCreate = _getNative_default(Object, "create"); var _nativeCreate_default = nativeCreate; function hashClear() { @@ -79266,10 +81092,14 @@ function listCacheClear() { this.size = 0; } var _listCacheClear_default = listCacheClear; -function assocIndexOf(array, key) { - var length = array.length; +function eq(value2, other) { + return value2 === other || value2 !== value2 && other !== other; +} +var eq_default = eq; +function assocIndexOf(array4, key) { + var length = array4.length; while (length--) { - if (eq_default(array[length][0], key)) { + if (eq_default(array4[length][0], key)) { return length; } } @@ -79343,8 +81173,8 @@ function isKeyable(value2) { return type2 == "string" || type2 == "number" || type2 == "symbol" || type2 == "boolean" ? value2 !== "__proto__" : value2 === null; } var _isKeyable_default = isKeyable; -function getMapData(map, key) { - var data = map.__data__; +function getMapData(map2, key) { + var data = map2.__data__; return _isKeyable_default(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map; } var _getMapData_default = getMapData; @@ -79404,6 +81234,9 @@ memoize.Cache = _MapCache_default; var memoize_default = memoize; var CHUNK_SIZE = 2e3; function writeToStderr(data) { + if (process.stderr.destroyed) { + return; + } for (let i = 0; i < data.length; i += CHUNK_SIZE) { process.stderr.write(data.substring(i, i + CHUNK_SIZE)); } @@ -79487,36 +81320,40 @@ function isEnvTruthy(envVar) { const normalizedValue = envVar.toLowerCase().trim(); return ["1", "true", "yes", "on"].includes(normalizedValue); } -var bashMaxOutputLengthValidator = { - name: "BASH_MAX_OUTPUT_LENGTH", - default: 3e4, - validate: (value2) => { - const MAX_OUTPUT_LENGTH = 15e4; - const DEFAULT_MAX_OUTPUT_LENGTH = 3e4; - if (!value2) { - return { - effective: DEFAULT_MAX_OUTPUT_LENGTH, - status: "valid" - }; +var MAX_OUTPUT_LENGTH = 15e4; +var DEFAULT_MAX_OUTPUT_LENGTH = 3e4; +function createMaxOutputLengthValidator(name) { + return { + name, + default: DEFAULT_MAX_OUTPUT_LENGTH, + validate: (value2) => { + if (!value2) { + return { + effective: DEFAULT_MAX_OUTPUT_LENGTH, + status: "valid" + }; + } + const parsed2 = parseInt(value2, 10); + if (isNaN(parsed2) || parsed2 <= 0) { + return { + effective: DEFAULT_MAX_OUTPUT_LENGTH, + status: "invalid", + message: `Invalid value "${value2}" (using default: ${DEFAULT_MAX_OUTPUT_LENGTH})` + }; + } + if (parsed2 > MAX_OUTPUT_LENGTH) { + return { + effective: MAX_OUTPUT_LENGTH, + status: "capped", + message: `Capped from ${parsed2} to ${MAX_OUTPUT_LENGTH}` + }; + } + return { effective: parsed2, status: "valid" }; } - const parsed2 = parseInt(value2, 10); - if (isNaN(parsed2) || parsed2 <= 0) { - return { - effective: DEFAULT_MAX_OUTPUT_LENGTH, - status: "invalid", - message: `Invalid value "${value2}" (using default: ${DEFAULT_MAX_OUTPUT_LENGTH})` - }; - } - if (parsed2 > MAX_OUTPUT_LENGTH) { - return { - effective: MAX_OUTPUT_LENGTH, - status: "capped", - message: `Capped from ${parsed2} to ${MAX_OUTPUT_LENGTH}` - }; - } - return { effective: parsed2, status: "valid" }; - } -}; + }; +} +var bashMaxOutputLengthValidator = createMaxOutputLengthValidator("BASH_MAX_OUTPUT_LENGTH"); +var taskMaxOutputLengthValidator = createMaxOutputLengthValidator("TASK_MAX_OUTPUT_LENGTH"); var maxOutputTokensValidator = { name: "CLAUDE_CODE_MAX_OUTPUT_TOKENS", default: 32e3, @@ -79563,10 +81400,8 @@ function getInitialState() { cwd: resolvedCwd, modelUsage: {}, mainLoopModelOverride: void 0, - maxRateLimitFallbackActive: false, initialMainLoopModel: null, modelStrings: null, - isNonInteractiveSession: true, isInteractive: false, clientType: "cli", sessionIngressToken: void 0, @@ -79599,13 +81434,124 @@ function getInitialState() { envVarValidators: [bashMaxOutputLengthValidator, maxOutputTokensValidator], lastAPIRequest: null, inMemoryErrorLog: [], - inlinePlugins: [] + inlinePlugins: [], + sessionBypassPermissionsMode: false, + sessionPersistenceDisabled: false, + hasExitedPlanMode: false, + needsPlanModeExitAttachment: false, + hasExitedDelegateMode: false, + needsDelegateModeExitAttachment: false, + lspRecommendationShownThisSession: false, + initJsonSchema: null, + registeredHooks: null, + planSlugCache: /* @__PURE__ */ new Map(), + teleportedSessionInfo: null, + invokedSkills: /* @__PURE__ */ new Map(), + slowOperations: [], + sdkBetas: void 0 }; } var STATE = getInitialState(); function getSessionId() { return STATE.sessionId; } +var MAX_SLOW_OPERATIONS = 10; +var SLOW_OPERATION_TTL_MS = 1e4; +function addSlowOperation(operation, durationMs) { + if (true) + return; + const now = Date.now(); + STATE.slowOperations = STATE.slowOperations.filter((op) => now - op.timestamp < SLOW_OPERATION_TTL_MS); + STATE.slowOperations.push({ operation, durationMs, timestamp: now }); + if (STATE.slowOperations.length > MAX_SLOW_OPERATIONS) { + STATE.slowOperations = STATE.slowOperations.slice(-MAX_SLOW_OPERATIONS); + } +} +function createBufferedWriter({ + writeFn, + flushIntervalMs = 1e3, + maxBufferSize = 100, + immediateMode = false +}) { + let buffer = []; + let flushTimer = null; + function clearTimer() { + if (flushTimer) { + clearTimeout(flushTimer); + flushTimer = null; + } + } + function flush() { + if (buffer.length === 0) + return; + writeFn(buffer.join("")); + buffer = []; + clearTimer(); + } + function scheduleFlush() { + if (!flushTimer) { + flushTimer = setTimeout(flush, flushIntervalMs); + } + } + return { + write(content) { + if (immediateMode) { + writeFn(content); + return; + } + buffer.push(content); + scheduleFlush(); + if (buffer.length >= maxBufferSize) { + flush(); + } + }, + flush, + dispose() { + flush(); + } + }; +} +var cleanupFunctions = /* @__PURE__ */ new Set(); +function registerCleanup(cleanupFn) { + cleanupFunctions.add(cleanupFn); + return () => cleanupFunctions.delete(cleanupFn); +} +var SLOW_OPERATION_THRESHOLD_MS = Infinity; +function describeValue(value2) { + if (value2 === null) + return "null"; + if (value2 === void 0) + return "undefined"; + if (Array.isArray(value2)) + return `Array[${value2.length}]`; + if (typeof value2 === "object") { + const keys = Object.keys(value2); + return `Object{${keys.length} keys}`; + } + if (typeof value2 === "string") + return `string(${value2.length} chars)`; + return typeof value2; +} +function withSlowLogging(operation, fn2) { + const startTime = performance.now(); + try { + return fn2(); + } finally { + const duration6 = performance.now() - startTime; + if (duration6 > SLOW_OPERATION_THRESHOLD_MS) { + logForDebugging(`[SLOW OPERATION DETECTED] ${operation} (${duration6.toFixed(1)}ms)`); + addSlowOperation(operation, duration6); + } + } +} +function jsonStringify(value2, replacer, space) { + const description = describeValue(value2); + return withSlowLogging(`JSON.stringify(${description})`, () => JSON.stringify(value2, replacer, space)); +} +var jsonParse = (text, reviver) => { + const length = typeof text === "string" ? text.length : 0; + return withSlowLogging(`JSON.parse(${length} chars)`, () => JSON.parse(text, reviver)); +}; var isDebugMode = memoize_default(() => { return isEnvTruthy(process.env.DEBUG) || isEnvTruthy(process.env.DEBUG_SDK) || process.argv.includes("--debug") || process.argv.includes("-d") || isDebugToStdErr() || process.argv.some((arg) => arg.startsWith("--debug=")); }); @@ -79630,6 +81576,26 @@ function shouldLogDebugMessage(message) { return shouldShowDebugMessage(message, filter); } var hasFormattedOutput = false; +var debugWriter = null; +function getDebugWriter() { + if (!debugWriter) { + debugWriter = createBufferedWriter({ + writeFn: (content) => { + const path4 = getDebugLogPath(); + if (!getFsImplementation().existsSync(dirname(path4))) { + getFsImplementation().mkdirSync(dirname(path4)); + } + getFsImplementation().appendFileSync(path4, content); + updateLatestDebugLogSymlink(); + }, + flushIntervalMs: 1e3, + maxBufferSize: 100, + immediateMode: isDebugMode() + }); + registerCleanup(async () => debugWriter?.dispose()); + } + return debugWriter; +} function logForDebugging(message, { level } = { level: "debug" }) { @@ -79638,24 +81604,24 @@ function logForDebugging(message, { level } = { } if (hasFormattedOutput && message.includes(` `)) { - message = JSON.stringify(message); + message = jsonStringify(message); } - const output = `[${level.toUpperCase()}] ${message.trim()} + const timestamp = (/* @__PURE__ */ new Date()).toISOString(); + const output = `${timestamp} [${level.toUpperCase()}] ${message.trim()} `; if (isDebugToStdErr()) { writeToStderr(output); return; } - if (!getFsImplementation().existsSync(dirname(getDebugLogPath()))) { - getFsImplementation().mkdirSync(dirname(getDebugLogPath())); - } - getFsImplementation().appendFileSync(getDebugLogPath(), output); - updateLatestDebugLogSymlink(); + getDebugWriter().write(output); } function getDebugLogPath() { return process.env.CLAUDE_CODE_DEBUG_LOGS_DIR ?? join2(getClaudeConfigHomeDir(), "debug", `${getSessionId()}.txt`); } var updateLatestDebugLogSymlink = memoize_default(() => { + if (process.argv[2] === "--ripgrep") { + return; + } try { const debugLogPath = getDebugLogPath(); const debugLogsDir = dirname(debugLogPath); @@ -79673,12 +81639,697 @@ var updateLatestDebugLogSymlink = memoize_default(() => { } catch { } }); +function withSlowLogging2(operation, fn2) { + const startTime = performance.now(); + try { + return fn2(); + } finally { + const duration6 = performance.now() - startTime; + if (duration6 > SLOW_OPERATION_THRESHOLD_MS) { + logForDebugging(`[SLOW OPERATION DETECTED] fs.${operation} (${duration6.toFixed(1)}ms)`); + addSlowOperation(`fs.${operation}`, duration6); + } + } +} +var NodeFsOperations = { + cwd() { + return process.cwd(); + }, + existsSync(fsPath) { + return withSlowLogging2(`existsSync(${fsPath})`, () => fs.existsSync(fsPath)); + }, + async stat(fsPath) { + return statPromise(fsPath); + }, + statSync(fsPath) { + return withSlowLogging2(`statSync(${fsPath})`, () => fs.statSync(fsPath)); + }, + lstatSync(fsPath) { + return withSlowLogging2(`lstatSync(${fsPath})`, () => fs.lstatSync(fsPath)); + }, + readFileSync(fsPath, options) { + return withSlowLogging2(`readFileSync(${fsPath})`, () => fs.readFileSync(fsPath, { encoding: options.encoding })); + }, + readFileBytesSync(fsPath) { + return withSlowLogging2(`readFileBytesSync(${fsPath})`, () => fs.readFileSync(fsPath)); + }, + readSync(fsPath, options) { + return withSlowLogging2(`readSync(${fsPath}, ${options.length} bytes)`, () => { + let fd = void 0; + try { + fd = fs.openSync(fsPath, "r"); + const buffer = Buffer.alloc(options.length); + const bytesRead = fs.readSync(fd, buffer, 0, options.length, 0); + return { buffer, bytesRead }; + } finally { + if (fd) + fs.closeSync(fd); + } + }); + }, + appendFileSync(path4, data, options) { + return withSlowLogging2(`appendFileSync(${path4}, ${data.length} chars)`, () => { + if (!fs.existsSync(path4) && options?.mode !== void 0) { + const fd = fs.openSync(path4, "a", options.mode); + try { + fs.appendFileSync(fd, data); + } finally { + fs.closeSync(fd); + } + } else { + fs.appendFileSync(path4, data); + } + }); + }, + copyFileSync(src, dest) { + return withSlowLogging2(`copyFileSync(${src} \u2192 ${dest})`, () => fs.copyFileSync(src, dest)); + }, + unlinkSync(path4) { + return withSlowLogging2(`unlinkSync(${path4})`, () => fs.unlinkSync(path4)); + }, + renameSync(oldPath, newPath) { + return withSlowLogging2(`renameSync(${oldPath} \u2192 ${newPath})`, () => fs.renameSync(oldPath, newPath)); + }, + linkSync(target, path4) { + return withSlowLogging2(`linkSync(${target} \u2192 ${path4})`, () => fs.linkSync(target, path4)); + }, + symlinkSync(target, path4) { + return withSlowLogging2(`symlinkSync(${target} \u2192 ${path4})`, () => fs.symlinkSync(target, path4)); + }, + readlinkSync(path4) { + return withSlowLogging2(`readlinkSync(${path4})`, () => fs.readlinkSync(path4)); + }, + realpathSync(path4) { + return withSlowLogging2(`realpathSync(${path4})`, () => fs.realpathSync(path4)); + }, + mkdirSync(dirPath, options) { + return withSlowLogging2(`mkdirSync(${dirPath})`, () => { + if (!fs.existsSync(dirPath)) { + const mkdirOptions = { + recursive: true + }; + if (options?.mode !== void 0) { + mkdirOptions.mode = options.mode; + } + fs.mkdirSync(dirPath, mkdirOptions); + } + }); + }, + readdirSync(dirPath) { + return withSlowLogging2(`readdirSync(${dirPath})`, () => fs.readdirSync(dirPath, { withFileTypes: true })); + }, + readdirStringSync(dirPath) { + return withSlowLogging2(`readdirStringSync(${dirPath})`, () => fs.readdirSync(dirPath)); + }, + isDirEmptySync(dirPath) { + return withSlowLogging2(`isDirEmptySync(${dirPath})`, () => { + const files = this.readdirSync(dirPath); + return files.length === 0; + }); + }, + rmdirSync(dirPath) { + return withSlowLogging2(`rmdirSync(${dirPath})`, () => fs.rmdirSync(dirPath)); + }, + rmSync(path4, options) { + return withSlowLogging2(`rmSync(${path4})`, () => fs.rmSync(path4, options)); + }, + createWriteStream(path4) { + return fs.createWriteStream(path4); + } +}; +var activeFs = NodeFsOperations; +function getFsImplementation() { + return activeFs; +} +var AbortError = class extends Error { +}; +function isRunningWithBun() { + return process.versions.bun !== void 0; +} +var debugFilePath = null; +var initialized = false; +function getOrCreateDebugFile() { + if (initialized) { + return debugFilePath; + } + initialized = true; + if (!process.env.DEBUG_CLAUDE_AGENT_SDK) { + return null; + } + const debugDir = join3(getClaudeConfigHomeDir(), "debug"); + debugFilePath = join3(debugDir, `sdk-${randomUUID2()}.txt`); + if (!existsSync2(debugDir)) { + mkdirSync2(debugDir, { recursive: true }); + } + process.stderr.write(`SDK debug logs: ${debugFilePath} +`); + return debugFilePath; +} +function logForSdkDebugging(message) { + const path4 = getOrCreateDebugFile(); + if (!path4) { + return; + } + const timestamp = (/* @__PURE__ */ new Date()).toISOString(); + const output = `${timestamp} ${message} +`; + appendFileSync2(path4, output); +} +function mergeSandboxIntoExtraArgs(extraArgs, sandbox) { + const effectiveExtraArgs = { ...extraArgs }; + if (sandbox) { + let settingsObj = { sandbox }; + if (effectiveExtraArgs.settings) { + try { + const existingSettings = jsonParse(effectiveExtraArgs.settings); + settingsObj = { ...existingSettings, sandbox }; + } catch { + } + } + effectiveExtraArgs.settings = jsonStringify(settingsObj); + } + return effectiveExtraArgs; +} +var ProcessTransport = class { + options; + process; + processStdin; + processStdout; + ready = false; + abortController; + exitError; + exitListeners = []; + processExitHandler; + abortHandler; + constructor(options) { + this.options = options; + this.abortController = options.abortController || createAbortController(); + this.initialize(); + } + getDefaultExecutable() { + return isRunningWithBun() ? "bun" : "node"; + } + spawnLocalProcess(spawnOptions) { + const { command, args: args3, cwd: cwd2, env: env3, signal } = spawnOptions; + const stderrMode = env3.DEBUG_CLAUDE_AGENT_SDK || this.options.stderr ? "pipe" : "ignore"; + const childProcess = spawn(command, args3, { + cwd: cwd2, + stdio: ["pipe", "pipe", stderrMode], + signal, + env: env3, + windowsHide: true + }); + if (env3.DEBUG_CLAUDE_AGENT_SDK || this.options.stderr) { + childProcess.stderr.on("data", (data) => { + const message = data.toString(); + logForSdkDebugging(message); + if (this.options.stderr) { + this.options.stderr(message); + } + }); + } + const mappedProcess = { + stdin: childProcess.stdin, + stdout: childProcess.stdout, + get killed() { + return childProcess.killed; + }, + get exitCode() { + return childProcess.exitCode; + }, + kill: childProcess.kill.bind(childProcess), + on: childProcess.on.bind(childProcess), + once: childProcess.once.bind(childProcess), + off: childProcess.off.bind(childProcess) + }; + return mappedProcess; + } + initialize() { + try { + const { + additionalDirectories = [], + betas, + cwd: cwd2, + executable = this.getDefaultExecutable(), + executableArgs = [], + extraArgs = {}, + pathToClaudeCodeExecutable, + env: env3 = { ...process.env }, + maxThinkingTokens, + maxTurns, + maxBudgetUsd, + model, + fallbackModel, + jsonSchema: jsonSchema2, + permissionMode, + allowDangerouslySkipPermissions, + permissionPromptToolName, + continueConversation, + resume, + settingSources, + allowedTools = [], + disallowedTools = [], + tools, + mcpServers, + strictMcpConfig, + canUseTool, + includePartialMessages, + plugins, + sandbox + } = this.options; + const args3 = [ + "--output-format", + "stream-json", + "--verbose", + "--input-format", + "stream-json" + ]; + if (maxThinkingTokens !== void 0) { + args3.push("--max-thinking-tokens", maxThinkingTokens.toString()); + } + if (maxTurns) + args3.push("--max-turns", maxTurns.toString()); + if (maxBudgetUsd !== void 0) { + args3.push("--max-budget-usd", maxBudgetUsd.toString()); + } + if (model) + args3.push("--model", model); + if (betas && betas.length > 0) { + args3.push("--betas", betas.join(",")); + } + if (jsonSchema2) { + args3.push("--json-schema", jsonStringify(jsonSchema2)); + } + if (env3.DEBUG_CLAUDE_AGENT_SDK) { + args3.push("--debug-to-stderr"); + } + if (canUseTool) { + if (permissionPromptToolName) { + throw new Error("canUseTool callback cannot be used with permissionPromptToolName. Please use one or the other."); + } + args3.push("--permission-prompt-tool", "stdio"); + } else if (permissionPromptToolName) { + args3.push("--permission-prompt-tool", permissionPromptToolName); + } + if (continueConversation) + args3.push("--continue"); + if (resume) + args3.push("--resume", resume); + if (allowedTools.length > 0) { + args3.push("--allowedTools", allowedTools.join(",")); + } + if (disallowedTools.length > 0) { + args3.push("--disallowedTools", disallowedTools.join(",")); + } + if (tools !== void 0) { + if (Array.isArray(tools)) { + if (tools.length === 0) { + args3.push("--tools", ""); + } else { + args3.push("--tools", tools.join(",")); + } + } else { + args3.push("--tools", "default"); + } + } + if (mcpServers && Object.keys(mcpServers).length > 0) { + args3.push("--mcp-config", jsonStringify({ mcpServers })); + } + if (settingSources) { + args3.push("--setting-sources", settingSources.join(",")); + } + if (strictMcpConfig) { + args3.push("--strict-mcp-config"); + } + if (permissionMode) { + args3.push("--permission-mode", permissionMode); + } + if (allowDangerouslySkipPermissions) { + args3.push("--allow-dangerously-skip-permissions"); + } + if (fallbackModel) { + if (model && fallbackModel === model) { + throw new Error("Fallback model cannot be the same as the main model. Please specify a different model for fallbackModel option."); + } + args3.push("--fallback-model", fallbackModel); + } + if (includePartialMessages) { + args3.push("--include-partial-messages"); + } + for (const dir of additionalDirectories) { + args3.push("--add-dir", dir); + } + if (plugins && plugins.length > 0) { + for (const plugin of plugins) { + if (plugin.type === "local") { + args3.push("--plugin-dir", plugin.path); + } else { + throw new Error(`Unsupported plugin type: ${plugin.type}`); + } + } + } + if (this.options.forkSession) { + args3.push("--fork-session"); + } + if (this.options.resumeSessionAt) { + args3.push("--resume-session-at", this.options.resumeSessionAt); + } + if (this.options.persistSession === false) { + args3.push("--no-session-persistence"); + } + const effectiveExtraArgs = mergeSandboxIntoExtraArgs(extraArgs ?? {}, sandbox); + for (const [flag, value2] of Object.entries(effectiveExtraArgs)) { + if (value2 === null) { + args3.push(`--${flag}`); + } else { + args3.push(`--${flag}`, value2); + } + } + if (!env3.CLAUDE_CODE_ENTRYPOINT) { + env3.CLAUDE_CODE_ENTRYPOINT = "sdk-ts"; + } + delete env3.NODE_OPTIONS; + if (env3.DEBUG_CLAUDE_AGENT_SDK) { + env3.DEBUG = "1"; + } else { + delete env3.DEBUG; + } + const isNative = isNativeBinary(pathToClaudeCodeExecutable); + const spawnCommand = isNative ? pathToClaudeCodeExecutable : executable; + const spawnArgs = isNative ? [...executableArgs, ...args3] : [...executableArgs, pathToClaudeCodeExecutable, ...args3]; + const spawnOptions = { + command: spawnCommand, + args: spawnArgs, + cwd: cwd2, + env: env3, + signal: this.abortController.signal + }; + if (this.options.spawnClaudeCodeProcess) { + logForSdkDebugging(`Spawning Claude Code (custom): ${spawnCommand} ${spawnArgs.join(" ")}`); + this.process = this.options.spawnClaudeCodeProcess(spawnOptions); + } else { + const fs22 = getFsImplementation(); + if (!fs22.existsSync(pathToClaudeCodeExecutable)) { + const errorMessage = isNative ? `Claude Code native binary not found at ${pathToClaudeCodeExecutable}. Please ensure Claude Code is installed via native installer or specify a valid path with options.pathToClaudeCodeExecutable.` : `Claude Code executable not found at ${pathToClaudeCodeExecutable}. Is options.pathToClaudeCodeExecutable set?`; + throw new ReferenceError(errorMessage); + } + logForSdkDebugging(`Spawning Claude Code: ${spawnCommand} ${spawnArgs.join(" ")}`); + this.process = this.spawnLocalProcess(spawnOptions); + } + this.processStdin = this.process.stdin; + this.processStdout = this.process.stdout; + const cleanup = () => { + if (this.process && !this.process.killed) { + this.process.kill("SIGTERM"); + } + }; + this.processExitHandler = cleanup; + this.abortHandler = cleanup; + process.on("exit", this.processExitHandler); + this.abortController.signal.addEventListener("abort", this.abortHandler); + this.process.on("error", (error50) => { + 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: ${error50.message}`); + logForSdkDebugging(this.exitError.message); + } + }); + this.process.on("exit", (code, signal) => { + this.ready = false; + if (this.abortController.signal.aborted) { + this.exitError = new AbortError("Claude Code process aborted by user"); + } else { + const error50 = this.getProcessExitError(code, signal); + if (error50) { + this.exitError = error50; + logForSdkDebugging(error50.message); + } + } + }); + this.ready = true; + } catch (error50) { + this.ready = false; + throw error50; + } + } + getProcessExitError(code, signal) { + if (code !== 0 && code !== null) { + return new Error(`Claude Code process exited with code ${code}`); + } else if (signal) { + return new Error(`Claude Code process terminated by signal ${signal}`); + } + return; + } + write(data) { + if (this.abortController.signal.aborted) { + throw new AbortError("Operation aborted"); + } + if (!this.ready || !this.processStdin) { + throw new Error("ProcessTransport is not ready for writing"); + } + if (this.process?.killed || this.process?.exitCode !== null) { + throw new Error("Cannot write to terminated process"); + } + if (this.exitError) { + throw new Error(`Cannot write to process that exited with error: ${this.exitError.message}`); + } + logForSdkDebugging(`[ProcessTransport] Writing to stdin: ${data.substring(0, 100)}`); + try { + const written = this.processStdin.write(data); + if (!written) { + logForSdkDebugging("[ProcessTransport] Write buffer full, data queued"); + } + } catch (error50) { + this.ready = false; + throw new Error(`Failed to write to process stdin: ${error50.message}`); + } + } + close() { + if (this.processStdin) { + this.processStdin.end(); + this.processStdin = void 0; + } + if (this.abortHandler) { + this.abortController.signal.removeEventListener("abort", this.abortHandler); + this.abortHandler = void 0; + } + for (const { handler: handler2 } of this.exitListeners) { + this.process?.off("exit", handler2); + } + this.exitListeners = []; + if (this.process && !this.process.killed) { + this.process.kill("SIGTERM"); + setTimeout(() => { + if (this.process && !this.process.killed) { + this.process.kill("SIGKILL"); + } + }, 5e3); + } + this.ready = false; + if (this.processExitHandler) { + process.off("exit", this.processExitHandler); + this.processExitHandler = void 0; + } + } + isReady() { + return this.ready; + } + async *readMessages() { + if (!this.processStdout) { + throw new Error("ProcessTransport output stream not available"); + } + const rl = createInterface({ input: this.processStdout }); + try { + for await (const line of rl) { + if (line.trim()) { + const message = jsonParse(line); + yield message; + } + } + await this.waitForExit(); + } catch (error50) { + throw error50; + } finally { + rl.close(); + } + } + endInput() { + if (this.processStdin) { + this.processStdin.end(); + } + } + getInputStream() { + return this.processStdin; + } + onExit(callback) { + if (!this.process) + return () => { + }; + const handler2 = (code, signal) => { + const error50 = this.getProcessExitError(code, signal); + callback(error50); + }; + this.process.on("exit", handler2); + this.exitListeners.push({ callback, handler: handler2 }); + return () => { + if (this.process) { + this.process.off("exit", handler2); + } + const index = this.exitListeners.findIndex((l) => l.handler === handler2); + if (index !== -1) { + this.exitListeners.splice(index, 1); + } + }; + } + async waitForExit() { + if (!this.process) { + if (this.exitError) { + throw this.exitError; + } + return; + } + if (this.process.exitCode !== null || this.process.killed) { + if (this.exitError) { + throw this.exitError; + } + return; + } + return new Promise((resolve, reject) => { + const exitHandler = (code, signal) => { + if (this.abortController.signal.aborted) { + reject(new AbortError("Operation aborted")); + return; + } + const error50 = this.getProcessExitError(code, signal); + if (error50) { + reject(error50); + } else { + resolve(); + } + }; + this.process.once("exit", exitHandler); + const errorHandler = (error50) => { + this.process.off("exit", exitHandler); + reject(error50); + }; + this.process.once("error", errorHandler); + this.process.once("exit", () => { + this.process.off("error", errorHandler); + }); + }); + } +}; +function isNativeBinary(executablePath) { + const jsExtensions = [".js", ".mjs", ".tsx", ".ts", ".jsx"]; + return !jsExtensions.some((ext) => executablePath.endsWith(ext)); +} +var Stream = class { + returned; + queue = []; + readResolve; + readReject; + isDone = false; + hasError; + started = false; + constructor(returned) { + this.returned = returned; + } + [Symbol.asyncIterator]() { + if (this.started) { + throw new Error("Stream can only be iterated once"); + } + this.started = true; + return this; + } + next() { + if (this.queue.length > 0) { + return Promise.resolve({ + done: false, + value: this.queue.shift() + }); + } + if (this.isDone) { + return Promise.resolve({ done: true, value: void 0 }); + } + if (this.hasError) { + return Promise.reject(this.hasError); + } + return new Promise((resolve, reject) => { + this.readResolve = resolve; + this.readReject = reject; + }); + } + enqueue(value2) { + if (this.readResolve) { + const resolve = this.readResolve; + this.readResolve = void 0; + this.readReject = void 0; + resolve({ done: false, value: value2 }); + } else { + this.queue.push(value2); + } + } + done() { + this.isDone = true; + if (this.readResolve) { + const resolve = this.readResolve; + this.readResolve = void 0; + this.readReject = void 0; + resolve({ done: true, value: void 0 }); + } + } + error(error50) { + this.hasError = error50; + if (this.readReject) { + const reject = this.readReject; + this.readResolve = void 0; + this.readReject = void 0; + reject(error50); + } + } + return() { + this.isDone = true; + if (this.returned) { + this.returned(); + } + return Promise.resolve({ done: true, value: void 0 }); + } +}; +var SdkControlServerTransport = class { + sendMcpMessage; + isClosed = false; + constructor(sendMcpMessage) { + this.sendMcpMessage = sendMcpMessage; + } + onclose; + onerror; + onmessage; + async start() { + } + async send(message) { + if (this.isClosed) { + throw new Error("Transport is closed"); + } + this.sendMcpMessage(message); + } + async close() { + if (this.isClosed) { + return; + } + this.isClosed = true; + this.onclose?.(); + } +}; var Query = class { transport; isSingleUserTurn; canUseTool; hooks; abortController; + jsonSchema; + initConfig; pendingControlResponses = /* @__PURE__ */ new Map(); cleanupPerformed = false; sdkMessages; @@ -79688,38 +82339,34 @@ var Query = class { hookCallbacks = /* @__PURE__ */ new Map(); nextCallbackId = 0; sdkMcpTransports = /* @__PURE__ */ new Map(); + sdkMcpServerInstances = /* @__PURE__ */ new Map(); pendingMcpResponses = /* @__PURE__ */ new Map(); - firstResultReceivedPromise; firstResultReceivedResolve; - streamCloseTimeout; - constructor(transport, isSingleUserTurn, canUseTool, hooks, abortController, sdkMcpServers = /* @__PURE__ */ new Map()) { + firstResultReceived = false; + hasBidirectionalNeeds() { + return this.sdkMcpTransports.size > 0 || this.hooks !== void 0 && Object.keys(this.hooks).length > 0 || this.canUseTool !== void 0; + } + constructor(transport, isSingleUserTurn, canUseTool, hooks, abortController, sdkMcpServers = /* @__PURE__ */ new Map(), jsonSchema2, initConfig) { this.transport = transport; this.isSingleUserTurn = isSingleUserTurn; this.canUseTool = canUseTool; this.hooks = hooks; this.abortController = abortController; - this.streamCloseTimeout = 6e4; - if (typeof process !== "undefined" && process.env?.CLAUDE_CODE_STREAM_CLOSE_TIMEOUT) { - this.streamCloseTimeout = parseInt(process.env.CLAUDE_CODE_STREAM_CLOSE_TIMEOUT); - } + this.jsonSchema = jsonSchema2; + this.initConfig = initConfig; for (const [name, server] of sdkMcpServers) { - const sdkTransport = new SdkControlServerTransport((message) => this.sendMcpServerMessageToCli(name, message)); - this.sdkMcpTransports.set(name, sdkTransport); - server.connect(sdkTransport); + this.connectSdkMcpServer(name, server); } this.sdkMessages = this.readSdkMessages(); - this.firstResultReceivedPromise = new Promise((resolve) => { - this.firstResultReceivedResolve = resolve; - }); this.readMessages(); this.initialization = this.initialize(); this.initialization.catch(() => { }); } - setError(error41) { - this.inputStream.error(error41); + setError(error50) { + this.inputStream.error(error50); } - cleanup(error41) { + cleanup(error50) { if (this.cleanupPerformed) return; this.cleanupPerformed = true; @@ -79727,8 +82374,17 @@ var Query = class { this.transport.close(); this.pendingControlResponses.clear(); this.pendingMcpResponses.clear(); - if (error41) { - this.inputStream.error(error41); + this.cancelControllers.clear(); + this.hookCallbacks.clear(); + for (const transport of this.sdkMcpTransports.values()) { + try { + transport.close(); + } catch { + } + } + this.sdkMcpTransports.clear(); + if (error50) { + this.inputStream.error(error50); } else { this.inputStream.done(); } @@ -79769,20 +82425,28 @@ var Query = class { continue; } if (message.type === "result") { + this.firstResultReceived = true; if (this.firstResultReceivedResolve) { this.firstResultReceivedResolve(); } if (this.isSingleUserTurn) { + logForDebugging(`[Query.readMessages] First result received for single-turn query, closing stdin`); this.transport.endInput(); } } this.inputStream.enqueue(message); } + if (this.firstResultReceivedResolve) { + this.firstResultReceivedResolve(); + } this.inputStream.done(); this.cleanup(); - } catch (error41) { - this.inputStream.error(error41); - this.cleanup(error41); + } catch (error50) { + if (this.firstResultReceivedResolve) { + this.firstResultReceivedResolve(); + } + this.inputStream.error(error50); + this.cleanup(error50); } } async handleControlRequest(request2) { @@ -79798,18 +82462,18 @@ var Query = class { response } }; - await Promise.resolve(this.transport.write(JSON.stringify(controlResponse) + ` + await Promise.resolve(this.transport.write(jsonStringify(controlResponse) + ` `)); - } catch (error41) { + } catch (error50) { const controlErrorResponse = { type: "control_response", response: { subtype: "error", request_id: request2.request_id, - error: error41.message || String(error41) + error: error50.message || String(error50) } }; - await Promise.resolve(this.transport.write(JSON.stringify(controlErrorResponse) + ` + await Promise.resolve(this.transport.write(jsonStringify(controlErrorResponse) + ` `)); } finally { this.cancelControllers.delete(request2.request_id); @@ -79827,11 +82491,18 @@ var Query = class { if (!this.canUseTool) { throw new Error("canUseTool callback is not provided."); } - return this.canUseTool(request2.request.tool_name, request2.request.input, { + const result = await this.canUseTool(request2.request.tool_name, request2.request.input, { signal, suggestions: request2.request.permission_suggestions, - toolUseID: request2.request.tool_use_id + blockedPath: request2.request.blocked_path, + decisionReason: request2.request.decision_reason, + toolUseID: request2.request.tool_use_id, + agentID: request2.request.agent_id }); + return { + ...result, + toolUseID: request2.request.tool_use_id + }; } else if (request2.request.subtype === "hook_callback") { const result = await this.handleHookCallbacks(request2.request.callback_id, request2.request.input, request2.request.tool_use_id, signal); return result; @@ -79873,7 +82544,8 @@ var Query = class { } return { matcher: matcher.matcher, - hookCallbackIds: callbackIds + hookCallbackIds: callbackIds, + timeout: matcher.timeout }; }); } @@ -79883,7 +82555,11 @@ var Query = class { const initRequest = { subtype: "initialize", hooks, - sdkMcpServers + sdkMcpServers, + jsonSchema: this.jsonSchema, + systemPrompt: this.initConfig?.systemPrompt, + appendSystemPrompt: this.initConfig?.appendSystemPrompt, + agents: this.initConfig?.agents }; const response = await this.request(initRequest); return response.response; @@ -79911,6 +82587,14 @@ var Query = class { max_thinking_tokens: maxThinkingTokens }); } + async rewindFiles(userMessageId, options) { + const response = await this.request({ + subtype: "rewind_files", + user_message_id: userMessageId, + dry_run: options?.dryRun + }); + return response.response; + } async processPendingPermissionRequests(pendingPermissionRequests) { for (const request2 of pendingPermissionRequests) { if (request2.request.subtype === "can_use_tool") { @@ -79937,7 +82621,7 @@ var Query = class { } } }); - Promise.resolve(this.transport.write(JSON.stringify(sdkRequest) + ` + Promise.resolve(this.transport.write(jsonStringify(sdkRequest) + ` `)); }); } @@ -79954,12 +82638,43 @@ var Query = class { const mcpStatusResponse = response.response; return mcpStatusResponse.mcpServers; } + async setMcpServers(servers) { + const sdkServers = {}; + const processServers = {}; + for (const [name, config4] of Object.entries(servers)) { + if (config4.type === "sdk" && "instance" in config4) { + sdkServers[name] = config4.instance; + } else { + processServers[name] = config4; + } + } + const currentSdkNames = new Set(this.sdkMcpServerInstances.keys()); + const newSdkNames = new Set(Object.keys(sdkServers)); + for (const name of currentSdkNames) { + if (!newSdkNames.has(name)) { + await this.disconnectSdkMcpServer(name); + } + } + for (const [name, server] of Object.entries(sdkServers)) { + if (!currentSdkNames.has(name)) { + this.connectSdkMcpServer(name, server); + } + } + const sdkServerConfigs = {}; + for (const name of Object.keys(sdkServers)) { + sdkServerConfigs[name] = { type: "sdk", name }; + } + const response = await this.request({ + subtype: "mcp_set_servers", + servers: { ...processServers, ...sdkServerConfigs } + }); + return response.response; + } async accountInfo() { return (await this.initialization).account; } async streamInput(stream) { logForDebugging(`[Query.streamInput] Starting to process input stream`); - logForDebugging(`[Query.streamInput] this.sdkMcpTransports.size = ${this.sdkMcpTransports.size}`); try { let messageCount = 0; for await (const message of stream) { @@ -79967,41 +82682,38 @@ var Query = class { logForDebugging(`[Query.streamInput] Processing message ${messageCount}: ${message.type}`); if (this.abortController?.signal.aborted) break; - await Promise.resolve(this.transport.write(JSON.stringify(message) + ` + await Promise.resolve(this.transport.write(jsonStringify(message) + ` `)); } logForDebugging(`[Query.streamInput] Finished processing ${messageCount} messages from input stream`); - logForDebugging(`[Query.streamInput] About to check MCP servers. this.sdkMcpTransports.size = ${this.sdkMcpTransports.size}`); - const hasHooks = this.hooks && Object.keys(this.hooks).length > 0; - if ((this.sdkMcpTransports.size > 0 || hasHooks) && this.firstResultReceivedPromise) { - logForDebugging(`[Query.streamInput] Entering Promise.race to wait for result`); - let timeoutId; - await Promise.race([ - this.firstResultReceivedPromise.then(() => { - logForDebugging(`[Query.streamInput] Received first result, closing input stream`); - if (timeoutId) { - clearTimeout(timeoutId); - } - }), - new Promise((resolve) => { - timeoutId = setTimeout(() => { - logForDebugging(`[Query.streamInput] Timed out waiting for first result, closing input stream`); - resolve(); - }, this.streamCloseTimeout); - }) - ]); - if (timeoutId) { - clearTimeout(timeoutId); - } + if (messageCount > 0 && this.hasBidirectionalNeeds()) { + logForDebugging(`[Query.streamInput] Has bidirectional needs, waiting for first result`); + await this.waitForFirstResult(); } logForDebugging(`[Query] Calling transport.endInput() to close stdin to CLI process`); this.transport.endInput(); - } catch (error41) { - if (!(error41 instanceof AbortError)) { - throw error41; + } catch (error50) { + if (!(error50 instanceof AbortError)) { + throw error50; } } } + waitForFirstResult() { + if (this.firstResultReceived) { + logForDebugging(`[Query.waitForFirstResult] Result already received, returning immediately`); + return Promise.resolve(); + } + return new Promise((resolve) => { + if (this.abortController?.signal.aborted) { + resolve(); + return; + } + this.abortController?.signal.addEventListener("abort", () => resolve(), { + once: true + }); + this.firstResultReceivedResolve = resolve; + }); + } handleHookCallbacks(callbackId, input, toolUseID, abortSignal) { const callback = this.hookCallbacks.get(callbackId); if (!callback) { @@ -80011,6 +82723,20 @@ var Query = class { signal: abortSignal }); } + connectSdkMcpServer(name, server) { + const sdkTransport = new SdkControlServerTransport((message) => this.sendMcpServerMessageToCli(name, message)); + this.sdkMcpTransports.set(name, sdkTransport); + this.sdkMcpServerInstances.set(name, server); + server.connect(sdkTransport); + } + async disconnectSdkMcpServer(name) { + const transport = this.sdkMcpTransports.get(name); + if (transport) { + await transport.close(); + this.sdkMcpTransports.delete(name); + } + this.sdkMcpServerInstances.delete(name); + } sendMcpServerMessageToCli(serverName, message) { if ("id" in message && message.id !== null && message.id !== void 0) { const key = `${serverName}:${message.id}`; @@ -80021,7 +82747,17 @@ var Query = class { return; } } - throw new Error("No pending request found"); + const controlRequest = { + type: "control_request", + request_id: randomUUID3(), + request: { + subtype: "mcp_message", + server_name: serverName, + message + } + }; + this.transport.write(jsonStringify(controlRequest) + ` +`); } handleMcpControlRequest(serverName, mcpRequest, transport) { const messageId = "id" in mcpRequest.message ? mcpRequest.message.id : null; @@ -80034,9 +82770,9 @@ var Query = class { cleanup(); resolve(response); }; - const rejectAndCleanup = (error41) => { + const rejectAndCleanup = (error50) => { cleanup(); - reject(error41); + reject(error50); }; this.pendingMcpResponses.set(key, { resolve: resolveAndCleanup, @@ -80052,127 +82788,17 @@ var Query = class { }); } }; -var exports_external = {}; -__export2(exports_external, { - void: () => voidType, - util: () => util, - unknown: () => unknownType, - union: () => unionType, - undefined: () => undefinedType, - tuple: () => tupleType, - transformer: () => effectsType, - symbol: () => symbolType, - string: () => stringType, - strictObject: () => strictObjectType, - setErrorMap: () => setErrorMap, - set: () => setType, - record: () => recordType, - quotelessJson: () => quotelessJson, - promise: () => promiseType, - preprocess: () => preprocessType, - pipeline: () => pipelineType, - ostring: () => ostring, - optional: () => optionalType, - onumber: () => onumber, - oboolean: () => oboolean, - objectUtil: () => objectUtil, - object: () => objectType, - number: () => numberType, - nullable: () => nullableType, - null: () => nullType, - never: () => neverType, - nativeEnum: () => nativeEnumType, - nan: () => nanType, - map: () => mapType, - makeIssue: () => makeIssue, - literal: () => literalType, - lazy: () => lazyType, - late: () => late, - isValid: () => isValid, - isDirty: () => isDirty, - isAsync: () => isAsync, - isAborted: () => isAborted, - intersection: () => intersectionType, - instanceof: () => instanceOfType, - getParsedType: () => getParsedType, - getErrorMap: () => getErrorMap, - function: () => functionType, - enum: () => enumType, - effect: () => effectsType, - discriminatedUnion: () => discriminatedUnionType, - defaultErrorMap: () => en_default, - datetimeRegex: () => datetimeRegex, - date: () => dateType, - custom: () => custom, - coerce: () => coerce, - boolean: () => booleanType, - bigint: () => bigIntType, - array: () => arrayType, - any: () => anyType, - addIssueToContext: () => addIssueToContext, - ZodVoid: () => ZodVoid, - ZodUnknown: () => ZodUnknown, - ZodUnion: () => ZodUnion, - ZodUndefined: () => ZodUndefined, - ZodType: () => ZodType, - ZodTuple: () => ZodTuple, - ZodTransformer: () => ZodEffects, - ZodSymbol: () => ZodSymbol, - ZodString: () => ZodString, - ZodSet: () => ZodSet, - ZodSchema: () => ZodType, - ZodRecord: () => ZodRecord, - ZodReadonly: () => ZodReadonly, - ZodPromise: () => ZodPromise, - ZodPipeline: () => ZodPipeline, - ZodParsedType: () => ZodParsedType, - ZodOptional: () => ZodOptional, - ZodObject: () => ZodObject, - ZodNumber: () => ZodNumber, - ZodNullable: () => ZodNullable, - ZodNull: () => ZodNull, - ZodNever: () => ZodNever, - ZodNativeEnum: () => ZodNativeEnum, - ZodNaN: () => ZodNaN, - ZodMap: () => ZodMap, - ZodLiteral: () => ZodLiteral, - ZodLazy: () => ZodLazy, - ZodIssueCode: () => ZodIssueCode, - ZodIntersection: () => ZodIntersection, - ZodFunction: () => ZodFunction, - ZodFirstPartyTypeKind: () => ZodFirstPartyTypeKind, - ZodError: () => ZodError, - ZodEnum: () => ZodEnum, - ZodEffects: () => ZodEffects, - ZodDiscriminatedUnion: () => ZodDiscriminatedUnion, - ZodDefault: () => ZodDefault, - ZodDate: () => ZodDate, - ZodCatch: () => ZodCatch, - ZodBranded: () => ZodBranded, - ZodBoolean: () => ZodBoolean, - ZodBigInt: () => ZodBigInt, - ZodArray: () => ZodArray, - ZodAny: () => ZodAny, - Schema: () => ZodType, - ParseStatus: () => ParseStatus, - OK: () => OK, - NEVER: () => NEVER, - INVALID: () => INVALID, - EMPTY_PATH: () => EMPTY_PATH, - DIRTY: () => DIRTY, - BRAND: () => BRAND -}); var util; (function(util22) { util22.assertEqual = (_) => { }; - function assertIs2(_arg) { + function assertIs3(_arg) { } - util22.assertIs = assertIs2; - function assertNever2(_x) { + util22.assertIs = assertIs3; + function assertNever3(_x) { throw new Error(); } - util22.assertNever = assertNever2; + util22.assertNever = assertNever3; util22.arrayToEnum = (items) => { const obj = {}; for (const item of items) { @@ -80193,10 +82819,10 @@ var util; return obj[e]; }); }; - util22.objectKeys = typeof Object.keys === "function" ? (obj) => Object.keys(obj) : (object2) => { + util22.objectKeys = typeof Object.keys === "function" ? (obj) => Object.keys(obj) : (object6) => { const keys = []; - for (const key in object2) { - if (Object.prototype.hasOwnProperty.call(object2, key)) { + for (const key in object6) { + if (Object.prototype.hasOwnProperty.call(object6, key)) { keys.push(key); } } @@ -80210,10 +82836,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 = " | ") { - return array.map((val) => typeof val === "string" ? `'${val}'` : val).join(separator2); + function joinValues3(array4, separator2 = " | ") { + return array4.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(); @@ -80311,10 +82937,6 @@ var ZodIssueCode = util.arrayToEnum([ "not_multiple_of", "not_finite" ]); -var quotelessJson = (obj) => { - const json3 = JSON.stringify(obj, null, 2); - return json3.replace(/"([^"]+)":/g, "$1:"); -}; var ZodError = class _ZodError extends Error { get errors() { return this.issues; @@ -80338,31 +82960,31 @@ var ZodError = class _ZodError extends Error { this.issues = issues; } format(_mapper) { - const mapper = _mapper || function(issue2) { - return issue2.message; + const mapper = _mapper || function(issue4) { + return issue4.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 = (error50) => { + for (const issue4 of error50.issues) { + if (issue4.code === "invalid_union") { + issue4.unionErrors.map(processError); + } else if (issue4.code === "invalid_return_type") { + processError(issue4.returnTypeError); + } else if (issue4.code === "invalid_arguments") { + processError(issue4.argumentsError); + } else if (issue4.path.length === 0) { + fieldErrors._errors.push(mapper(issue4)); } 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 < issue4.path.length) { + const el = issue4.path[i]; + const terminal = i === issue4.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(issue4)); } curr = curr[el]; i++; @@ -80387,7 +83009,7 @@ var ZodError = class _ZodError extends Error { get isEmpty() { return this.issues.length === 0; } - flatten(mapper = (issue2) => issue2.message) { + flatten(mapper = (issue4) => issue4.message) { const fieldErrors = {}; const formErrors = []; for (const sub of this.issues) { @@ -80406,33 +83028,33 @@ var ZodError = class _ZodError extends Error { } }; ZodError.create = (issues) => { - const error41 = new ZodError(issues); - return error41; + const error50 = new ZodError(issues); + return error50; }; -var errorMap = (issue2, _ctx) => { +var errorMap = (issue4, _ctx) => { let message; - switch (issue2.code) { + switch (issue4.code) { case ZodIssueCode.invalid_type: - if (issue2.received === ZodParsedType.undefined) { + if (issue4.received === ZodParsedType.undefined) { message = "Required"; } else { - message = `Expected ${issue2.expected}, received ${issue2.received}`; + message = `Expected ${issue4.expected}, received ${issue4.received}`; } break; case ZodIssueCode.invalid_literal: - message = `Invalid literal value, expected ${JSON.stringify(issue2.expected, util.jsonStringifyReplacer)}`; + message = `Invalid literal value, expected ${JSON.stringify(issue4.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(issue4.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(issue4.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(issue4.options)}, received '${issue4.received}'`; break; case ZodIssueCode.invalid_arguments: message = `Invalid function arguments`; @@ -80444,50 +83066,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 issue4.validation === "object") { + if ("includes" in issue4.validation) { + message = `Invalid input: must include "${issue4.validation.includes}"`; + if (typeof issue4.validation.position === "number") { + message = `${message} at one or more positions greater than or equal to ${issue4.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 issue4.validation) { + message = `Invalid input: must start with "${issue4.validation.startsWith}"`; + } else if ("endsWith" in issue4.validation) { + message = `Invalid input: must end with "${issue4.validation.endsWith}"`; } else { - util.assertNever(issue2.validation); + util.assertNever(issue4.validation); } - } else if (issue2.validation !== "regex") { - message = `Invalid ${issue2.validation}`; + } else if (issue4.validation !== "regex") { + message = `Invalid ${issue4.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 (issue4.type === "array") + message = `Array must contain ${issue4.exact ? "exactly" : issue4.inclusive ? `at least` : `more than`} ${issue4.minimum} element(s)`; + else if (issue4.type === "string") + message = `String must contain ${issue4.exact ? "exactly" : issue4.inclusive ? `at least` : `over`} ${issue4.minimum} character(s)`; + else if (issue4.type === "number") + message = `Number must be ${issue4.exact ? `exactly equal to ` : issue4.inclusive ? `greater than or equal to ` : `greater than `}${issue4.minimum}`; + else if (issue4.type === "bigint") + message = `Number must be ${issue4.exact ? `exactly equal to ` : issue4.inclusive ? `greater than or equal to ` : `greater than `}${issue4.minimum}`; + else if (issue4.type === "date") + message = `Date must be ${issue4.exact ? `exactly equal to ` : issue4.inclusive ? `greater than or equal to ` : `greater than `}${new Date(Number(issue4.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 (issue4.type === "array") + message = `Array must contain ${issue4.exact ? `exactly` : issue4.inclusive ? `at most` : `less than`} ${issue4.maximum} element(s)`; + else if (issue4.type === "string") + message = `String must contain ${issue4.exact ? `exactly` : issue4.inclusive ? `at most` : `under`} ${issue4.maximum} character(s)`; + else if (issue4.type === "number") + message = `Number must be ${issue4.exact ? `exactly` : issue4.inclusive ? `less than or equal to` : `less than`} ${issue4.maximum}`; + else if (issue4.type === "bigint") + message = `BigInt must be ${issue4.exact ? `exactly` : issue4.inclusive ? `less than or equal to` : `less than`} ${issue4.maximum}`; + else if (issue4.type === "date") + message = `Date must be ${issue4.exact ? `exactly` : issue4.inclusive ? `smaller than or equal to` : `smaller than`} ${new Date(Number(issue4.maximum))}`; else message = "Invalid input"; break; @@ -80498,22 +83120,19 @@ 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 ${issue4.multipleOf}`; break; case ZodIssueCode.not_finite: message = "Number must be finite"; break; default: message = _ctx.defaultError; - util.assertNever(issue2); + util.assertNever(issue4); } return { message }; }; var en_default = errorMap; var overrideErrorMap = en_default; -function setErrorMap(map) { - overrideErrorMap = map; -} function getErrorMap() { return overrideErrorMap; } @@ -80533,8 +83152,8 @@ var makeIssue = (params) => { } let errorMessage = ""; const maps = errorMaps.filter((m) => !!m).slice().reverse(); - for (const map of maps) { - errorMessage = map(fullIssue, { data, defaultError: errorMessage }).message; + for (const map2 of maps) { + errorMessage = map2(fullIssue, { data, defaultError: errorMessage }).message; } return { ...issueData, @@ -80542,10 +83161,9 @@ var makeIssue = (params) => { message: errorMessage }; }; -var EMPTY_PATH = []; function addIssueToContext(ctx, issueData) { const overrideMap = getErrorMap(); - const issue2 = makeIssue({ + const issue4 = makeIssue({ issueData, data: ctx.data, path: ctx.path, @@ -80556,7 +83174,7 @@ function addIssueToContext(ctx, issueData) { overrideMap === en_default ? void 0 : en_default ].filter((x) => !!x) }); - ctx.common.issues.push(issue2); + ctx.common.issues.push(issue4); } var ParseStatus = class _ParseStatus { constructor() { @@ -80657,8 +83275,8 @@ var handleResult = (ctx, result) => { get error() { if (this._error) return this._error; - const error41 = new ZodError(ctx.common.issues); - this._error = error41; + const error50 = new ZodError(ctx.common.issues); + this._error = error50; return this._error; } }; @@ -80809,7 +83427,7 @@ var ZodType = class { const result = await (isAsync(maybeAsyncResult) ? maybeAsyncResult : Promise.resolve(maybeAsyncResult)); return handleResult(ctx, result); } - refine(check, message) { + refine(check4, message) { const getIssueProperties = (val) => { if (typeof message === "string" || typeof message === "undefined") { return { message }; @@ -80820,7 +83438,7 @@ var ZodType = class { } }; return this._refinement((val, ctx) => { - const result = check(val); + const result = check4(val); const setError = () => ctx.addIssue({ code: ZodIssueCode.custom, ...getIssueProperties(val) @@ -80843,9 +83461,9 @@ var ZodType = class { } }); } - refinement(check, refinementData) { + refinement(check4, refinementData) { return this._refinement((val, ctx) => { - if (!check(val)) { + if (!check4(val)) { ctx.addIssue(typeof refinementData === "function" ? refinementData(val, ctx) : refinementData); return false; } else { @@ -80917,12 +83535,12 @@ var ZodType = class { and(incoming) { return ZodIntersection.create(this, incoming, this._def); } - transform(transform) { + transform(transform4) { return new ZodEffects({ ...processCreateParams(this._def), schema: this, typeName: ZodFirstPartyTypeKind.ZodEffects, - effect: { type: "transform", transform } + effect: { type: "transform", transform: transform4 } }); } default(def) { @@ -81010,24 +83628,24 @@ function datetimeRegex(args3) { regex4 = `${regex4}(${opts.join("|")})`; return new RegExp(`^${regex4}$`); } -function isValidIP(ip2, version2) { - if ((version2 === "v4" || !version2) && ipv4Regex.test(ip2)) { +function isValidIP(ip2, version4) { + if ((version4 === "v4" || !version4) && ipv4Regex.test(ip2)) { return true; } - if ((version2 === "v6" || !version2) && ipv6Regex.test(ip2)) { + if ((version4 === "v6" || !version4) && ipv6Regex.test(ip2)) { return true; } return false; } -function isValidJWT(jwt, alg) { - if (!jwtRegex.test(jwt)) +function isValidJWT(jwt2, alg) { + if (!jwtRegex.test(jwt2)) return false; try { - const [header] = jwt.split("."); + const [header] = jwt2.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 base646 = header.replace(/-/g, "+").replace(/_/g, "/").padEnd(header.length + (4 - header.length % 4) % 4, "="); + const decoded = JSON.parse(atob(base646)); if (typeof decoded !== "object" || decoded === null) return false; if ("typ" in decoded && decoded?.typ !== "JWT") @@ -81041,22 +83659,22 @@ function isValidJWT(jwt, alg) { return false; } } -function isValidCidr(ip2, version2) { - if ((version2 === "v4" || !version2) && ipv4CidrRegex.test(ip2)) { +function isValidCidr(ip2, version4) { + if ((version4 === "v4" || !version4) && ipv4CidrRegex.test(ip2)) { return true; } - if ((version2 === "v6" || !version2) && ipv6CidrRegex.test(ip2)) { + if ((version4 === "v6" || !version4) && ipv6CidrRegex.test(ip2)) { return true; } return false; } -var ZodString = class _ZodString extends ZodType { +var ZodString = class _ZodString4 extends ZodType { _parse(input) { if (this._def.coerce) { input.data = String(input.data); } - const parsedType4 = this._getType(input); - if (parsedType4 !== ZodParsedType.string) { + const parsedType3 = this._getType(input); + if (parsedType3 !== ZodParsedType.string) { const ctx2 = this._getOrReturnCtx(input); addIssueToContext(ctx2, { code: ZodIssueCode.invalid_type, @@ -81067,70 +83685,70 @@ var ZodString = class _ZodString extends ZodType { } const status = new ParseStatus(); let ctx = void 0; - for (const check of this._def.checks) { - if (check.kind === "min") { - if (input.data.length < check.value) { + for (const check4 of this._def.checks) { + if (check4.kind === "min") { + if (input.data.length < check4.value) { ctx = this._getOrReturnCtx(input, ctx); addIssueToContext(ctx, { code: ZodIssueCode.too_small, - minimum: check.value, + minimum: check4.value, type: "string", inclusive: true, exact: false, - message: check.message + message: check4.message }); status.dirty(); } - } else if (check.kind === "max") { - if (input.data.length > check.value) { + } else if (check4.kind === "max") { + if (input.data.length > check4.value) { ctx = this._getOrReturnCtx(input, ctx); addIssueToContext(ctx, { code: ZodIssueCode.too_big, - maximum: check.value, + maximum: check4.value, type: "string", inclusive: true, exact: false, - message: check.message + message: check4.message }); status.dirty(); } - } else if (check.kind === "length") { - const tooBig = input.data.length > check.value; - const tooSmall = input.data.length < check.value; + } else if (check4.kind === "length") { + const tooBig = input.data.length > check4.value; + const tooSmall = input.data.length < check4.value; if (tooBig || tooSmall) { ctx = this._getOrReturnCtx(input, ctx); if (tooBig) { addIssueToContext(ctx, { code: ZodIssueCode.too_big, - maximum: check.value, + maximum: check4.value, type: "string", inclusive: true, exact: true, - message: check.message + message: check4.message }); } else if (tooSmall) { addIssueToContext(ctx, { code: ZodIssueCode.too_small, - minimum: check.value, + minimum: check4.value, type: "string", inclusive: true, exact: true, - message: check.message + message: check4.message }); } status.dirty(); } - } else if (check.kind === "email") { + } else if (check4.kind === "email") { if (!emailRegex.test(input.data)) { ctx = this._getOrReturnCtx(input, ctx); addIssueToContext(ctx, { validation: "email", code: ZodIssueCode.invalid_string, - message: check.message + message: check4.message }); status.dirty(); } - } else if (check.kind === "emoji") { + } else if (check4.kind === "emoji") { if (!emojiRegex) { emojiRegex = new RegExp(_emojiRegex, "u"); } @@ -81139,61 +83757,61 @@ var ZodString = class _ZodString extends ZodType { addIssueToContext(ctx, { validation: "emoji", code: ZodIssueCode.invalid_string, - message: check.message + message: check4.message }); status.dirty(); } - } else if (check.kind === "uuid") { + } else if (check4.kind === "uuid") { if (!uuidRegex.test(input.data)) { ctx = this._getOrReturnCtx(input, ctx); addIssueToContext(ctx, { validation: "uuid", code: ZodIssueCode.invalid_string, - message: check.message + message: check4.message }); status.dirty(); } - } else if (check.kind === "nanoid") { + } else if (check4.kind === "nanoid") { if (!nanoidRegex.test(input.data)) { ctx = this._getOrReturnCtx(input, ctx); addIssueToContext(ctx, { validation: "nanoid", code: ZodIssueCode.invalid_string, - message: check.message + message: check4.message }); status.dirty(); } - } else if (check.kind === "cuid") { + } else if (check4.kind === "cuid") { if (!cuidRegex.test(input.data)) { ctx = this._getOrReturnCtx(input, ctx); addIssueToContext(ctx, { validation: "cuid", code: ZodIssueCode.invalid_string, - message: check.message + message: check4.message }); status.dirty(); } - } else if (check.kind === "cuid2") { + } else if (check4.kind === "cuid2") { if (!cuid2Regex.test(input.data)) { ctx = this._getOrReturnCtx(input, ctx); addIssueToContext(ctx, { validation: "cuid2", code: ZodIssueCode.invalid_string, - message: check.message + message: check4.message }); status.dirty(); } - } else if (check.kind === "ulid") { + } else if (check4.kind === "ulid") { if (!ulidRegex.test(input.data)) { ctx = this._getOrReturnCtx(input, ctx); addIssueToContext(ctx, { validation: "ulid", code: ZodIssueCode.invalid_string, - message: check.message + message: check4.message }); status.dirty(); } - } else if (check.kind === "url") { + } else if (check4.kind === "url") { try { new URL(input.data); } catch { @@ -81201,153 +83819,153 @@ var ZodString = class _ZodString extends ZodType { addIssueToContext(ctx, { validation: "url", code: ZodIssueCode.invalid_string, - message: check.message + message: check4.message }); status.dirty(); } - } else if (check.kind === "regex") { - check.regex.lastIndex = 0; - const testResult = check.regex.test(input.data); + } else if (check4.kind === "regex") { + check4.regex.lastIndex = 0; + const testResult = check4.regex.test(input.data); if (!testResult) { ctx = this._getOrReturnCtx(input, ctx); addIssueToContext(ctx, { validation: "regex", code: ZodIssueCode.invalid_string, - message: check.message + message: check4.message }); status.dirty(); } - } else if (check.kind === "trim") { + } else if (check4.kind === "trim") { input.data = input.data.trim(); - } else if (check.kind === "includes") { - if (!input.data.includes(check.value, check.position)) { + } else if (check4.kind === "includes") { + if (!input.data.includes(check4.value, check4.position)) { ctx = this._getOrReturnCtx(input, ctx); addIssueToContext(ctx, { code: ZodIssueCode.invalid_string, - validation: { includes: check.value, position: check.position }, - message: check.message + validation: { includes: check4.value, position: check4.position }, + message: check4.message }); status.dirty(); } - } else if (check.kind === "toLowerCase") { + } else if (check4.kind === "toLowerCase") { input.data = input.data.toLowerCase(); - } else if (check.kind === "toUpperCase") { + } else if (check4.kind === "toUpperCase") { input.data = input.data.toUpperCase(); - } else if (check.kind === "startsWith") { - if (!input.data.startsWith(check.value)) { + } else if (check4.kind === "startsWith") { + if (!input.data.startsWith(check4.value)) { ctx = this._getOrReturnCtx(input, ctx); addIssueToContext(ctx, { code: ZodIssueCode.invalid_string, - validation: { startsWith: check.value }, - message: check.message + validation: { startsWith: check4.value }, + message: check4.message }); status.dirty(); } - } else if (check.kind === "endsWith") { - if (!input.data.endsWith(check.value)) { + } else if (check4.kind === "endsWith") { + if (!input.data.endsWith(check4.value)) { ctx = this._getOrReturnCtx(input, ctx); addIssueToContext(ctx, { code: ZodIssueCode.invalid_string, - validation: { endsWith: check.value }, - message: check.message + validation: { endsWith: check4.value }, + message: check4.message }); status.dirty(); } - } else if (check.kind === "datetime") { - const regex4 = datetimeRegex(check); + } else if (check4.kind === "datetime") { + const regex4 = datetimeRegex(check4); if (!regex4.test(input.data)) { ctx = this._getOrReturnCtx(input, ctx); addIssueToContext(ctx, { code: ZodIssueCode.invalid_string, validation: "datetime", - message: check.message + message: check4.message }); status.dirty(); } - } else if (check.kind === "date") { + } else if (check4.kind === "date") { const regex4 = dateRegex; if (!regex4.test(input.data)) { ctx = this._getOrReturnCtx(input, ctx); addIssueToContext(ctx, { code: ZodIssueCode.invalid_string, validation: "date", - message: check.message + message: check4.message }); status.dirty(); } - } else if (check.kind === "time") { - const regex4 = timeRegex(check); + } else if (check4.kind === "time") { + const regex4 = timeRegex(check4); if (!regex4.test(input.data)) { ctx = this._getOrReturnCtx(input, ctx); addIssueToContext(ctx, { code: ZodIssueCode.invalid_string, validation: "time", - message: check.message + message: check4.message }); status.dirty(); } - } else if (check.kind === "duration") { + } else if (check4.kind === "duration") { if (!durationRegex.test(input.data)) { ctx = this._getOrReturnCtx(input, ctx); addIssueToContext(ctx, { validation: "duration", code: ZodIssueCode.invalid_string, - message: check.message + message: check4.message }); status.dirty(); } - } else if (check.kind === "ip") { - if (!isValidIP(input.data, check.version)) { + } else if (check4.kind === "ip") { + if (!isValidIP(input.data, check4.version)) { ctx = this._getOrReturnCtx(input, ctx); addIssueToContext(ctx, { validation: "ip", code: ZodIssueCode.invalid_string, - message: check.message + message: check4.message }); status.dirty(); } - } else if (check.kind === "jwt") { - if (!isValidJWT(input.data, check.alg)) { + } else if (check4.kind === "jwt") { + if (!isValidJWT(input.data, check4.alg)) { ctx = this._getOrReturnCtx(input, ctx); addIssueToContext(ctx, { validation: "jwt", code: ZodIssueCode.invalid_string, - message: check.message + message: check4.message }); status.dirty(); } - } else if (check.kind === "cidr") { - if (!isValidCidr(input.data, check.version)) { + } else if (check4.kind === "cidr") { + if (!isValidCidr(input.data, check4.version)) { ctx = this._getOrReturnCtx(input, ctx); addIssueToContext(ctx, { validation: "cidr", code: ZodIssueCode.invalid_string, - message: check.message + message: check4.message }); status.dirty(); } - } else if (check.kind === "base64") { + } else if (check4.kind === "base64") { if (!base64Regex.test(input.data)) { ctx = this._getOrReturnCtx(input, ctx); addIssueToContext(ctx, { validation: "base64", code: ZodIssueCode.invalid_string, - message: check.message + message: check4.message }); status.dirty(); } - } else if (check.kind === "base64url") { + } else if (check4.kind === "base64url") { if (!base64urlRegex.test(input.data)) { ctx = this._getOrReturnCtx(input, ctx); addIssueToContext(ctx, { validation: "base64url", code: ZodIssueCode.invalid_string, - message: check.message + message: check4.message }); status.dirty(); } } else { - util.assertNever(check); + util.assertNever(check4); } } return { status: status.value, value: input.data }; @@ -81359,10 +83977,10 @@ var ZodString = class _ZodString extends ZodType { ...errorUtil.errToObj(message) }); } - _addCheck(check) { - return new _ZodString({ + _addCheck(check4) { + return new _ZodString4({ ...this._def, - checks: [...this._def.checks, check] + checks: [...this._def.checks, check4] }); } email(message) { @@ -81499,19 +84117,19 @@ var ZodString = class _ZodString extends ZodType { return this.min(1, errorUtil.errToObj(message)); } trim() { - return new _ZodString({ + return new _ZodString4({ ...this._def, checks: [...this._def.checks, { kind: "trim" }] }); } toLowerCase() { - return new _ZodString({ + return new _ZodString4({ ...this._def, checks: [...this._def.checks, { kind: "toLowerCase" }] }); } toUpperCase() { - return new _ZodString({ + return new _ZodString4({ ...this._def, checks: [...this._def.checks, { kind: "toUpperCase" }] }); @@ -81612,8 +84230,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 parsedType3 = this._getType(input); + if (parsedType3 !== ZodParsedType.number) { const ctx2 = this._getOrReturnCtx(input); addIssueToContext(ctx2, { code: ZodIssueCode.invalid_type, @@ -81624,67 +84242,67 @@ var ZodNumber = class _ZodNumber extends ZodType { } let ctx = void 0; const status = new ParseStatus(); - for (const check of this._def.checks) { - if (check.kind === "int") { + for (const check4 of this._def.checks) { + if (check4.kind === "int") { if (!util.isInteger(input.data)) { ctx = this._getOrReturnCtx(input, ctx); addIssueToContext(ctx, { code: ZodIssueCode.invalid_type, expected: "integer", received: "float", - message: check.message + message: check4.message }); status.dirty(); } - } else if (check.kind === "min") { - const tooSmall = check.inclusive ? input.data < check.value : input.data <= check.value; + } else if (check4.kind === "min") { + const tooSmall = check4.inclusive ? input.data < check4.value : input.data <= check4.value; if (tooSmall) { ctx = this._getOrReturnCtx(input, ctx); addIssueToContext(ctx, { code: ZodIssueCode.too_small, - minimum: check.value, + minimum: check4.value, type: "number", - inclusive: check.inclusive, + inclusive: check4.inclusive, exact: false, - message: check.message + message: check4.message }); status.dirty(); } - } else if (check.kind === "max") { - const tooBig = check.inclusive ? input.data > check.value : input.data >= check.value; + } else if (check4.kind === "max") { + const tooBig = check4.inclusive ? input.data > check4.value : input.data >= check4.value; if (tooBig) { ctx = this._getOrReturnCtx(input, ctx); addIssueToContext(ctx, { code: ZodIssueCode.too_big, - maximum: check.value, + maximum: check4.value, type: "number", - inclusive: check.inclusive, + inclusive: check4.inclusive, exact: false, - message: check.message + message: check4.message }); status.dirty(); } - } else if (check.kind === "multipleOf") { - if (floatSafeRemainder(input.data, check.value) !== 0) { + } else if (check4.kind === "multipleOf") { + if (floatSafeRemainder(input.data, check4.value) !== 0) { ctx = this._getOrReturnCtx(input, ctx); addIssueToContext(ctx, { code: ZodIssueCode.not_multiple_of, - multipleOf: check.value, - message: check.message + multipleOf: check4.value, + message: check4.message }); status.dirty(); } - } else if (check.kind === "finite") { + } else if (check4.kind === "finite") { if (!Number.isFinite(input.data)) { ctx = this._getOrReturnCtx(input, ctx); addIssueToContext(ctx, { code: ZodIssueCode.not_finite, - message: check.message + message: check4.message }); status.dirty(); } } else { - util.assertNever(check); + util.assertNever(check4); } } return { status: status.value, value: input.data }; @@ -81715,10 +84333,10 @@ var ZodNumber = class _ZodNumber extends ZodType { ] }); } - _addCheck(check) { + _addCheck(check4) { return new _ZodNumber({ ...this._def, - checks: [...this._def.checks, check] + checks: [...this._def.checks, check4] }); } int(message) { @@ -81847,51 +84465,51 @@ var ZodBigInt = class _ZodBigInt extends ZodType { return this._getInvalidInput(input); } } - const parsedType4 = this._getType(input); - if (parsedType4 !== ZodParsedType.bigint) { + const parsedType3 = this._getType(input); + if (parsedType3 !== ZodParsedType.bigint) { return this._getInvalidInput(input); } let ctx = void 0; const status = new ParseStatus(); - for (const check of this._def.checks) { - if (check.kind === "min") { - const tooSmall = check.inclusive ? input.data < check.value : input.data <= check.value; + for (const check4 of this._def.checks) { + if (check4.kind === "min") { + const tooSmall = check4.inclusive ? input.data < check4.value : input.data <= check4.value; if (tooSmall) { ctx = this._getOrReturnCtx(input, ctx); addIssueToContext(ctx, { code: ZodIssueCode.too_small, type: "bigint", - minimum: check.value, - inclusive: check.inclusive, - message: check.message + minimum: check4.value, + inclusive: check4.inclusive, + message: check4.message }); status.dirty(); } - } else if (check.kind === "max") { - const tooBig = check.inclusive ? input.data > check.value : input.data >= check.value; + } else if (check4.kind === "max") { + const tooBig = check4.inclusive ? input.data > check4.value : input.data >= check4.value; if (tooBig) { ctx = this._getOrReturnCtx(input, ctx); addIssueToContext(ctx, { code: ZodIssueCode.too_big, type: "bigint", - maximum: check.value, - inclusive: check.inclusive, - message: check.message + maximum: check4.value, + inclusive: check4.inclusive, + message: check4.message }); status.dirty(); } - } else if (check.kind === "multipleOf") { - if (input.data % check.value !== BigInt(0)) { + } else if (check4.kind === "multipleOf") { + if (input.data % check4.value !== BigInt(0)) { ctx = this._getOrReturnCtx(input, ctx); addIssueToContext(ctx, { code: ZodIssueCode.not_multiple_of, - multipleOf: check.value, - message: check.message + multipleOf: check4.value, + message: check4.message }); status.dirty(); } } else { - util.assertNever(check); + util.assertNever(check4); } } return { status: status.value, value: input.data }; @@ -81931,10 +84549,10 @@ var ZodBigInt = class _ZodBigInt extends ZodType { ] }); } - _addCheck(check) { + _addCheck(check4) { return new _ZodBigInt({ ...this._def, - checks: [...this._def.checks, check] + checks: [...this._def.checks, check4] }); } positive(message) { @@ -82010,8 +84628,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 parsedType3 = this._getType(input); + if (parsedType3 !== ZodParsedType.boolean) { const ctx = this._getOrReturnCtx(input); addIssueToContext(ctx, { code: ZodIssueCode.invalid_type, @@ -82035,8 +84653,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 parsedType3 = this._getType(input); + if (parsedType3 !== ZodParsedType.date) { const ctx2 = this._getOrReturnCtx(input); addIssueToContext(ctx2, { code: ZodIssueCode.invalid_type, @@ -82054,35 +84672,35 @@ var ZodDate = class _ZodDate extends ZodType { } const status = new ParseStatus(); let ctx = void 0; - for (const check of this._def.checks) { - if (check.kind === "min") { - if (input.data.getTime() < check.value) { + for (const check4 of this._def.checks) { + if (check4.kind === "min") { + if (input.data.getTime() < check4.value) { ctx = this._getOrReturnCtx(input, ctx); addIssueToContext(ctx, { code: ZodIssueCode.too_small, - message: check.message, + message: check4.message, inclusive: true, exact: false, - minimum: check.value, + minimum: check4.value, type: "date" }); status.dirty(); } - } else if (check.kind === "max") { - if (input.data.getTime() > check.value) { + } else if (check4.kind === "max") { + if (input.data.getTime() > check4.value) { ctx = this._getOrReturnCtx(input, ctx); addIssueToContext(ctx, { code: ZodIssueCode.too_big, - message: check.message, + message: check4.message, inclusive: true, exact: false, - maximum: check.value, + maximum: check4.value, type: "date" }); status.dirty(); } } else { - util.assertNever(check); + util.assertNever(check4); } } return { @@ -82090,10 +84708,10 @@ var ZodDate = class _ZodDate extends ZodType { value: new Date(input.data.getTime()) }; } - _addCheck(check) { + _addCheck(check4) { return new _ZodDate({ ...this._def, - checks: [...this._def.checks, check] + checks: [...this._def.checks, check4] }); } min(minDate, message) { @@ -82141,8 +84759,8 @@ ZodDate.create = (params) => { }; var ZodSymbol = class extends ZodType { _parse(input) { - const parsedType4 = this._getType(input); - if (parsedType4 !== ZodParsedType.symbol) { + const parsedType3 = this._getType(input); + if (parsedType3 !== ZodParsedType.symbol) { const ctx = this._getOrReturnCtx(input); addIssueToContext(ctx, { code: ZodIssueCode.invalid_type, @@ -82162,8 +84780,8 @@ ZodSymbol.create = (params) => { }; var ZodUndefined = class extends ZodType { _parse(input) { - const parsedType4 = this._getType(input); - if (parsedType4 !== ZodParsedType.undefined) { + const parsedType3 = this._getType(input); + if (parsedType3 !== ZodParsedType.undefined) { const ctx = this._getOrReturnCtx(input); addIssueToContext(ctx, { code: ZodIssueCode.invalid_type, @@ -82183,8 +84801,8 @@ ZodUndefined.create = (params) => { }; var ZodNull = class extends ZodType { _parse(input) { - const parsedType4 = this._getType(input); - if (parsedType4 !== ZodParsedType.null) { + const parsedType3 = this._getType(input); + if (parsedType3 !== ZodParsedType.null) { const ctx = this._getOrReturnCtx(input); addIssueToContext(ctx, { code: ZodIssueCode.invalid_type, @@ -82251,8 +84869,8 @@ ZodNever.create = (params) => { }; var ZodVoid = class extends ZodType { _parse(input) { - const parsedType4 = this._getType(input); - if (parsedType4 !== ZodParsedType.undefined) { + const parsedType3 = this._getType(input); + if (parsedType3 !== ZodParsedType.undefined) { const ctx = this._getOrReturnCtx(input); addIssueToContext(ctx, { code: ZodIssueCode.invalid_type, @@ -82413,8 +85031,8 @@ var ZodObject = class _ZodObject extends ZodType { return this._cached; } _parse(input) { - const parsedType4 = this._getType(input); - if (parsedType4 !== ZodParsedType.object) { + const parsedType3 = this._getType(input); + if (parsedType3 !== ZodParsedType.object) { const ctx2 = this._getOrReturnCtx(input); addIssueToContext(ctx2, { code: ZodIssueCode.invalid_type, @@ -82504,9 +85122,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: (issue4, ctx) => { + const defaultError = this._def.errorMap?.(issue4, ctx).message ?? ctx.defaultError; + if (issue4.code === "unrecognized_keys") return { message: errorUtil.errToObj(message).message ?? defaultError }; @@ -83218,25 +85836,25 @@ var ZodFunction = class _ZodFunction extends ZodType { }); return INVALID; } - function makeArgsIssue(args3, error41) { + function makeArgsIssue(args3, error50) { 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: error50 } }); } - function makeReturnsIssue(returns, error41) { + function makeReturnsIssue(returns, error50) { 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: error50 } }); } @@ -83245,15 +85863,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 error50 = new ZodError([]); const parsedArgs = await me._def.args.parseAsync(args3, params).catch((e) => { - error41.addIssue(makeArgsIssue(args3, e)); - throw error41; + error50.addIssue(makeArgsIssue(args3, e)); + throw error50; }); 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; + error50.addIssue(makeReturnsIssue(result, e)); + throw error50; }); return parsedReturns; }); @@ -83620,18 +86238,18 @@ ZodEffects.create = (schema2, effect, params) => { ...processCreateParams(params) }); }; -ZodEffects.createWithPreprocess = (preprocess, schema2, params) => { +ZodEffects.createWithPreprocess = (preprocess4, schema2, params) => { return new ZodEffects({ schema: schema2, - effect: { type: "preprocess", transform: preprocess }, + effect: { type: "preprocess", transform: preprocess4 }, typeName: ZodFirstPartyTypeKind.ZodEffects, ...processCreateParams(params) }); }; var ZodOptional = class extends ZodType { _parse(input) { - const parsedType4 = this._getType(input); - if (parsedType4 === ZodParsedType.undefined) { + const parsedType3 = this._getType(input); + if (parsedType3 === ZodParsedType.undefined) { return OK(void 0); } return this._def.innerType._parse(input); @@ -83649,8 +86267,8 @@ ZodOptional.create = (type2, params) => { }; var ZodNullable = class extends ZodType { _parse(input) { - const parsedType4 = this._getType(input); - if (parsedType4 === ZodParsedType.null) { + const parsedType3 = this._getType(input); + if (parsedType3 === ZodParsedType.null) { return OK(null); } return this._def.innerType._parse(input); @@ -83746,8 +86364,8 @@ ZodCatch.create = (type2, params) => { }; var ZodNaN = class extends ZodType { _parse(input) { - const parsedType4 = this._getType(input); - if (parsedType4 !== ZodParsedType.nan) { + const parsedType3 = this._getType(input); + if (parsedType3 !== ZodParsedType.nan) { const ctx = this._getOrReturnCtx(input); addIssueToContext(ctx, { code: ZodIssueCode.invalid_type, @@ -83857,33 +86475,6 @@ ZodReadonly.create = (type2, params) => { ...processCreateParams(params) }); }; -function cleanParams(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 custom(check, _params = {}, fatal) { - if (check) - return ZodAny.create().superRefine((data, ctx) => { - const r = check(data); - if (r instanceof Promise) { - return r.then((r2) => { - if (!r2) { - const params = cleanParams(_params, data); - const _fatal = params.fatal ?? fatal ?? true; - ctx.addIssue({ code: "custom", ...params, fatal: _fatal }); - } - }); - } - if (!r) { - const params = cleanParams(_params, data); - const _fatal = params.fatal ?? fatal ?? true; - ctx.addIssue({ code: "custom", ...params, fatal: _fatal }); - } - return; - }); - return ZodAny.create(); -} var late = { object: ZodObject.lazycreate }; @@ -83926,9 +86517,6 @@ var ZodFirstPartyTypeKind; ZodFirstPartyTypeKind22["ZodPipeline"] = "ZodPipeline"; ZodFirstPartyTypeKind22["ZodReadonly"] = "ZodReadonly"; })(ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {})); -var instanceOfType = (cls, params = { - message: `Input not instance of ${cls.name}` -}) => custom((data) => data instanceof cls, params); var stringType = ZodString.create; var numberType = ZodNumber.create; var nanType = ZodNaN.create; @@ -83963,53 +86551,3719 @@ var optionalType = ZodOptional.create; var nullableType = ZodNullable.create; var preprocessType = ZodEffects.createWithPreprocess; var pipelineType = ZodPipeline.create; -var ostring = () => stringType().optional(); -var onumber = () => numberType().optional(); -var oboolean = () => booleanType().optional(); -var coerce = { - string: (arg) => ZodString.create({ ...arg, coerce: true }), - number: (arg) => ZodNumber.create({ ...arg, coerce: true }), - boolean: (arg) => ZodBoolean.create({ - ...arg, - coerce: true - }), - bigint: (arg) => ZodBigInt.create({ ...arg, coerce: true }), - date: (arg) => ZodDate.create({ ...arg, coerce: true }) +var NEVER = Object.freeze({ + status: "aborted" +}); +function $constructor(name, initializer6, params) { + function init(inst, def) { + var _a2; + Object.defineProperty(inst, "_zod", { + value: inst._zod ?? {}, + enumerable: false + }); + (_a2 = inst._zod).traits ?? (_a2.traits = /* @__PURE__ */ new Set()); + inst._zod.traits.add(name); + initializer6(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 _a2; + const inst = params?.Parent ? new Definition() : this; + init(inst, def); + (_a2 = inst._zod).deferred ?? (_a2.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 _; +} +var $brand = Symbol("zod_brand"); +var $ZodAsyncError = class extends Error { + constructor() { + super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`); + } }; -var NEVER = INVALID; +var globalConfig = {}; +function config(newConfig) { + if (newConfig) + Object.assign(globalConfig, newConfig); + return globalConfig; +} +var exports_util = {}; +__export2(exports_util, { + unwrapMessage: () => unwrapMessage, + stringifyPrimitive: () => stringifyPrimitive, + required: () => required, + randomString: () => randomString, + propertyKeyTypes: () => propertyKeyTypes, + promiseAllObject: () => promiseAllObject, + primitiveTypes: () => primitiveTypes, + prefixIssues: () => prefixIssues, + pick: () => pick, + partial: () => partial, + optionalKeys: () => optionalKeys, + omit: () => omit, + numKeys: () => numKeys, + nullish: () => nullish, + normalizeParams: () => normalizeParams, + merge: () => merge, + jsonStringifyReplacer: () => jsonStringifyReplacer, + joinValues: () => joinValues, + issue: () => issue, + isPlainObject: () => isPlainObject, + isObject: () => isObject2, + getSizableOrigin: () => getSizableOrigin, + getParsedType: () => getParsedType2, + getLengthableOrigin: () => getLengthableOrigin, + getEnumValues: () => getEnumValues, + getElementAtPath: () => getElementAtPath, + floatSafeRemainder: () => floatSafeRemainder2, + finalizeIssue: () => finalizeIssue, + extend: () => extend, + escapeRegex: () => escapeRegex, + esc: () => esc, + defineLazy: () => defineLazy, + createTransparentProxy: () => createTransparentProxy, + clone: () => clone, + cleanRegex: () => cleanRegex, + cleanEnum: () => cleanEnum, + captureStackTrace: () => captureStackTrace, + cached: () => cached2, + assignProp: () => assignProp, + assertNotEqual: () => assertNotEqual, + assertNever: () => assertNever, + assertIs: () => assertIs, + assertEqual: () => assertEqual, + assert: () => assert, + allowsEval: () => allowsEval, + aborted: () => aborted, + NUMBER_FORMAT_RANGES: () => NUMBER_FORMAT_RANGES, + Class: () => Class, + BIGINT_FORMAT_RANGES: () => BIGINT_FORMAT_RANGES +}); +function assertEqual(val) { + return val; +} +function assertNotEqual(val) { + return val; +} +function assertIs(_arg) { +} +function assertNever(_x) { + throw new Error(); +} +function assert(_) { +} +function getEnumValues(entries) { + const numericValues = Object.values(entries).filter((v) => typeof v === "number"); + const values = Object.entries(entries).filter(([k, _]) => numericValues.indexOf(+k) === -1).map(([_, v]) => v); + return values; +} +function joinValues(array4, separator2 = "|") { + return array4.map((val) => stringifyPrimitive(val)).join(separator2); +} +function jsonStringifyReplacer(_, value2) { + if (typeof value2 === "bigint") + return value2.toString(); + return value2; +} +function cached2(getter) { + const set2 = false; + return { + get value() { + if (!set2) { + const value2 = getter(); + Object.defineProperty(this, "value", { value: value2 }); + return value2; + } + throw new Error("cached value already set"); + } + }; +} +function nullish(input) { + return input === null || input === void 0; +} +function cleanRegex(source) { + const start = source.startsWith("^") ? 1 : 0; + const end = source.endsWith("$") ? source.length - 1 : source.length; + return source.slice(start, end); +} +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 defineLazy(object6, key, getter) { + const set2 = false; + Object.defineProperty(object6, key, { + get() { + if (!set2) { + const value2 = getter(); + object6[key] = value2; + return value2; + } + throw new Error("cached value already set"); + }, + set(v) { + Object.defineProperty(object6, key, { + value: v + }); + }, + configurable: true + }); +} +function assignProp(target, prop, value2) { + Object.defineProperty(target, prop, { + value: value2, + writable: true, + enumerable: true, + configurable: true + }); +} +function getElementAtPath(obj, path4) { + if (!path4) + return obj; + return path4.reduce((acc, key) => acc?.[key], obj); +} +function promiseAllObject(promisesObj) { + const keys = Object.keys(promisesObj); + const promises = keys.map((key) => promisesObj[key]); + return Promise.all(promises).then((results) => { + const resolvedObj = {}; + for (let i = 0; i < keys.length; i++) { + resolvedObj[keys[i]] = results[i]; + } + return resolvedObj; + }); +} +function randomString(length = 10) { + const chars = "abcdefghijklmnopqrstuvwxyz"; + let str = ""; + for (let i = 0; i < length; i++) { + str += chars[Math.floor(Math.random() * chars.length)]; + } + return str; +} +function esc(str) { + return JSON.stringify(str); +} +var captureStackTrace = Error.captureStackTrace ? Error.captureStackTrace : (..._args) => { +}; +function isObject2(data) { + return typeof data === "object" && data !== null && !Array.isArray(data); +} +var allowsEval = cached2(() => { + if (typeof navigator !== "undefined" && navigator?.userAgent?.includes("Cloudflare")) { + return false; + } + try { + const F = Function; + new F(""); + return true; + } catch (_) { + return false; + } +}); +function isPlainObject(o) { + if (isObject2(o) === false) + return false; + const ctor = o.constructor; + if (ctor === void 0) + return true; + const prot = ctor.prototype; + if (isObject2(prot) === false) + return false; + if (Object.prototype.hasOwnProperty.call(prot, "isPrototypeOf") === false) { + return false; + } + return true; +} +function numKeys(data) { + let keyCount = 0; + for (const key in data) { + if (Object.prototype.hasOwnProperty.call(data, key)) { + keyCount++; + } + } + return keyCount; +} +var getParsedType2 = (data) => { + const t = typeof data; + switch (t) { + case "undefined": + return "undefined"; + case "string": + return "string"; + case "number": + return Number.isNaN(data) ? "nan" : "number"; + case "boolean": + return "boolean"; + case "function": + return "function"; + case "bigint": + return "bigint"; + case "symbol": + return "symbol"; + case "object": + if (Array.isArray(data)) { + return "array"; + } + if (data === null) { + return "null"; + } + if (data.then && typeof data.then === "function" && data.catch && typeof data.catch === "function") { + return "promise"; + } + if (typeof Map !== "undefined" && data instanceof Map) { + return "map"; + } + if (typeof Set !== "undefined" && data instanceof Set) { + return "set"; + } + if (typeof Date !== "undefined" && data instanceof Date) { + return "date"; + } + if (typeof File !== "undefined" && data instanceof File) { + return "file"; + } + return "object"; + default: + throw new Error(`Unknown data type: ${t}`); + } +}; +var propertyKeyTypes = /* @__PURE__ */ new Set(["string", "number", "symbol"]); +var primitiveTypes = /* @__PURE__ */ new Set(["string", "number", "bigint", "boolean", "symbol", "undefined"]); +function escapeRegex(str) { + return str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"); +} +function clone(inst, def, params) { + const cl = new inst._zod.constr(def ?? inst._zod.def); + if (!def || params?.parent) + cl._zod.parent = inst; + return cl; +} +function normalizeParams(_params) { + const params = _params; + if (!params) + return {}; + if (typeof params === "string") + return { error: () => params }; + if (params?.message !== void 0) { + if (params?.error !== void 0) + throw new Error("Cannot specify both `message` and `error` params"); + params.error = params.message; + } + delete params.message; + if (typeof params.error === "string") + return { ...params, error: () => params.error }; + return params; +} +function createTransparentProxy(getter) { + let target; + return new Proxy({}, { + get(_, prop, receiver) { + target ?? (target = getter()); + return Reflect.get(target, prop, receiver); + }, + set(_, prop, value2, receiver) { + target ?? (target = getter()); + return Reflect.set(target, prop, value2, receiver); + }, + has(_, prop) { + target ?? (target = getter()); + return Reflect.has(target, prop); + }, + deleteProperty(_, prop) { + target ?? (target = getter()); + return Reflect.deleteProperty(target, prop); + }, + ownKeys(_) { + target ?? (target = getter()); + return Reflect.ownKeys(target); + }, + getOwnPropertyDescriptor(_, prop) { + target ?? (target = getter()); + return Reflect.getOwnPropertyDescriptor(target, prop); + }, + defineProperty(_, prop, descriptor) { + target ?? (target = getter()); + return Reflect.defineProperty(target, prop, descriptor); + } + }); +} +function stringifyPrimitive(value2) { + if (typeof value2 === "bigint") + return value2.toString() + "n"; + if (typeof value2 === "string") + return `"${value2}"`; + return `${value2}`; +} +function optionalKeys(shape) { + return Object.keys(shape).filter((k) => { + return shape[k]._zod.optin === "optional" && shape[k]._zod.optout === "optional"; + }); +} +var NUMBER_FORMAT_RANGES = { + 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] +}; +var BIGINT_FORMAT_RANGES = { + int64: [/* @__PURE__ */ BigInt("-9223372036854775808"), /* @__PURE__ */ BigInt("9223372036854775807")], + uint64: [/* @__PURE__ */ BigInt(0), /* @__PURE__ */ BigInt("18446744073709551615")] +}; +function pick(schema2, mask) { + const newShape = {}; + const currDef = schema2._zod.def; + for (const key in mask) { + if (!(key in currDef.shape)) { + throw new Error(`Unrecognized key: "${key}"`); + } + if (!mask[key]) + continue; + newShape[key] = currDef.shape[key]; + } + return clone(schema2, { + ...schema2._zod.def, + shape: newShape, + checks: [] + }); +} +function omit(schema2, mask) { + const newShape = { ...schema2._zod.def.shape }; + const currDef = schema2._zod.def; + for (const key in mask) { + if (!(key in currDef.shape)) { + throw new Error(`Unrecognized key: "${key}"`); + } + if (!mask[key]) + continue; + delete newShape[key]; + } + return clone(schema2, { + ...schema2._zod.def, + shape: newShape, + checks: [] + }); +} +function extend(schema2, shape) { + if (!isPlainObject(shape)) { + throw new Error("Invalid input to extend: expected a plain object"); + } + const def = { + ...schema2._zod.def, + get shape() { + const _shape = { ...schema2._zod.def.shape, ...shape }; + assignProp(this, "shape", _shape); + return _shape; + }, + checks: [] + }; + return clone(schema2, def); +} +function merge(a, b) { + return clone(a, { + ...a._zod.def, + get shape() { + const _shape = { ...a._zod.def.shape, ...b._zod.def.shape }; + assignProp(this, "shape", _shape); + return _shape; + }, + catchall: b._zod.def.catchall, + checks: [] + }); +} +function partial(Class3, schema2, mask) { + const oldShape = schema2._zod.def.shape; + const shape = { ...oldShape }; + if (mask) { + for (const key in mask) { + if (!(key in oldShape)) { + throw new Error(`Unrecognized key: "${key}"`); + } + if (!mask[key]) + continue; + shape[key] = Class3 ? new Class3({ + type: "optional", + innerType: oldShape[key] + }) : oldShape[key]; + } + } else { + for (const key in oldShape) { + shape[key] = Class3 ? new Class3({ + type: "optional", + innerType: oldShape[key] + }) : oldShape[key]; + } + } + return clone(schema2, { + ...schema2._zod.def, + shape, + checks: [] + }); +} +function required(Class3, schema2, mask) { + const oldShape = schema2._zod.def.shape; + const shape = { ...oldShape }; + if (mask) { + for (const key in mask) { + if (!(key in shape)) { + throw new Error(`Unrecognized key: "${key}"`); + } + if (!mask[key]) + continue; + shape[key] = new Class3({ + type: "nonoptional", + innerType: oldShape[key] + }); + } + } else { + for (const key in oldShape) { + shape[key] = new Class3({ + type: "nonoptional", + innerType: oldShape[key] + }); + } + } + return clone(schema2, { + ...schema2._zod.def, + shape, + checks: [] + }); +} +function aborted(x, startIndex = 0) { + for (let i = startIndex; i < x.issues.length; i++) { + if (x.issues[i]?.continue !== true) + return true; + } + return false; +} +function prefixIssues(path4, issues) { + return issues.map((iss) => { + var _a2; + (_a2 = iss).path ?? (_a2.path = []); + iss.path.unshift(path4); + return iss; + }); +} +function unwrapMessage(message) { + return typeof message === "string" ? message : message?.message; +} +function finalizeIssue(iss, ctx, config22) { + const full = { ...iss, path: iss.path ?? [] }; + if (!iss.message) { + const message = unwrapMessage(iss.inst?._zod.def?.error?.(iss)) ?? unwrapMessage(ctx?.error?.(iss)) ?? unwrapMessage(config22.customError?.(iss)) ?? unwrapMessage(config22.localeError?.(iss)) ?? "Invalid input"; + full.message = message; + } + delete full.inst; + delete full.continue; + if (!ctx?.reportInput) { + delete full.input; + } + return full; +} +function getSizableOrigin(input) { + if (input instanceof Set) + return "set"; + if (input instanceof Map) + return "map"; + if (input instanceof File) + return "file"; + return "unknown"; +} +function getLengthableOrigin(input) { + if (Array.isArray(input)) + return "array"; + if (typeof input === "string") + return "string"; + return "unknown"; +} +function issue(...args3) { + const [iss, input, inst] = args3; + if (typeof iss === "string") { + return { + message: iss, + code: "custom", + input, + inst + }; + } + return { ...iss }; +} +function cleanEnum(obj) { + return Object.entries(obj).filter(([k, _]) => { + return Number.isNaN(Number.parseInt(k, 10)); + }).map((el) => el[1]); +} +var Class = class { + constructor(..._args) { + } +}; +var initializer = (inst, def) => { + inst.name = "$ZodError"; + Object.defineProperty(inst, "_zod", { + value: inst._zod, + enumerable: false + }); + Object.defineProperty(inst, "issues", { + value: def, + enumerable: false + }); + Object.defineProperty(inst, "message", { + get() { + return JSON.stringify(def, jsonStringifyReplacer, 2); + }, + enumerable: true + }); +}; +var $ZodError = $constructor("$ZodError", initializer); +var $ZodRealError = $constructor("$ZodError", initializer, { Parent: Error }); +function flattenError(error50, mapper = (issue22) => issue22.message) { + const fieldErrors = {}; + const formErrors = []; + for (const sub of error50.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 formatError(error50, _mapper) { + const mapper = _mapper || function(issue22) { + return issue22.message; + }; + const fieldErrors = { _errors: [] }; + const processError = (error210) => { + for (const issue22 of error210.issues) { + if (issue22.code === "invalid_union" && issue22.errors.length) { + issue22.errors.map((issues) => processError({ issues })); + } else if (issue22.code === "invalid_key") { + processError({ issues: issue22.issues }); + } else if (issue22.code === "invalid_element") { + processError({ issues: issue22.issues }); + } else if (issue22.path.length === 0) { + fieldErrors._errors.push(mapper(issue22)); + } else { + let curr = fieldErrors; + let i = 0; + while (i < issue22.path.length) { + const el = issue22.path[i]; + const terminal = i === issue22.path.length - 1; + if (!terminal) { + curr[el] = curr[el] || { _errors: [] }; + } else { + curr[el] = curr[el] || { _errors: [] }; + curr[el]._errors.push(mapper(issue22)); + } + curr = curr[el]; + i++; + } + } + } + }; + processError(error50); + return fieldErrors; +} +var _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); + if (result instanceof Promise) { + throw new $ZodAsyncError(); + } + if (result.issues.length) { + const e = new (_params?.Err ?? _Err)(result.issues.map((iss) => finalizeIssue(iss, ctx, config()))); + captureStackTrace(e, _params?.callee); + throw e; + } + return result.value; +}; +var _parseAsync = (_Err) => async (schema2, value2, _ctx, params) => { + const ctx = _ctx ? Object.assign(_ctx, { async: true }) : { async: true }; + let result = schema2._zod.run({ value: value2, issues: [] }, ctx); + if (result instanceof Promise) + result = await result; + if (result.issues.length) { + const e = new (params?.Err ?? _Err)(result.issues.map((iss) => finalizeIssue(iss, ctx, config()))); + captureStackTrace(e, params?.callee); + throw e; + } + return result.value; +}; +var _safeParse = (_Err) => (schema2, value2, _ctx) => { + const ctx = _ctx ? { ..._ctx, async: false } : { async: false }; + const result = schema2._zod.run({ value: value2, issues: [] }, ctx); + if (result instanceof Promise) { + throw new $ZodAsyncError(); + } + return result.issues.length ? { + success: false, + error: new (_Err ?? $ZodError)(result.issues.map((iss) => finalizeIssue(iss, ctx, config()))) + } : { success: true, data: result.value }; +}; +var safeParse = /* @__PURE__ */ _safeParse($ZodRealError); +var _safeParseAsync = (_Err) => async (schema2, value2, _ctx) => { + const ctx = _ctx ? Object.assign(_ctx, { async: true }) : { async: true }; + let result = schema2._zod.run({ value: value2, issues: [] }, ctx); + if (result instanceof Promise) + result = await result; + return result.issues.length ? { + success: false, + error: new _Err(result.issues.map((iss) => finalizeIssue(iss, ctx, config()))) + } : { success: true, data: result.value }; +}; +var safeParseAsync = /* @__PURE__ */ _safeParseAsync($ZodRealError); +var cuid = /^[cC][^\s-]{8,}$/; +var cuid2 = /^[0-9a-z]+$/; +var ulid = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/; +var xid = /^[0-9a-vA-V]{20}$/; +var ksuid = /^[A-Za-z0-9]{27}$/; +var nanoid = /^[a-zA-Z0-9_-]{21}$/; +var duration = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/; +var 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})$/; +var uuid = (version4) => { + if (!version4) + 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}-${version4}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`); +}; +var email = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/; +var _emoji = `^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`; +function emoji() { + return new RegExp(_emoji, "u"); +} +var ipv4 = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/; +var ipv6 = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})$/; +var cidrv4 = /^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/; +var cidrv6 = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/; +var base64 = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/; +var base64url = /^[A-Za-z0-9_-]*$/; +var hostname = /^([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+$/; +var e164 = /^\+(?:[0-9]){6,14}[0-9]$/; +var dateSource = `(?:(?:\\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 date = /* @__PURE__ */ new RegExp(`^${dateSource}$`); +function timeSource(args3) { + const hhmm = `(?:[01]\\d|2[0-3]):[0-5]\\d`; + const regex4 = typeof args3.precision === "number" ? args3.precision === -1 ? `${hhmm}` : args3.precision === 0 ? `${hhmm}:[0-5]\\d` : `${hhmm}:[0-5]\\d\\.\\d{${args3.precision}}` : `${hhmm}(?::[0-5]\\d(?:\\.\\d+)?)?`; + return regex4; +} +function time(args3) { + return new RegExp(`^${timeSource(args3)}$`); +} +function datetime(args3) { + const time22 = timeSource({ precision: args3.precision }); + const opts = ["Z"]; + if (args3.local) + opts.push(""); + if (args3.offset) + opts.push(`([+-]\\d{2}:\\d{2})`); + const timeRegex22 = `${time22}(?:${opts.join("|")})`; + return new RegExp(`^${dateSource}T(?:${timeRegex22})$`); +} +var string = (params) => { + const regex4 = params ? `[\\s\\S]{${params?.minimum ?? 0},${params?.maximum ?? ""}}` : `[\\s\\S]*`; + return new RegExp(`^${regex4}$`); +}; +var integer = /^\d+$/; +var number = /^-?\d+(?:\.\d+)?/i; +var boolean = /true|false/i; +var _null = /null/i; +var lowercase = /^[^A-Z]*$/; +var uppercase = /^[^a-z]*$/; +var $ZodCheck = /* @__PURE__ */ $constructor("$ZodCheck", (inst, def) => { + var _a2; + inst._zod ?? (inst._zod = {}); + inst._zod.def = def; + (_a2 = inst._zod).onattach ?? (_a2.onattach = []); +}); +var numericOriginMap = { + number: "number", + bigint: "bigint", + object: "date" +}; +var $ZodCheckLessThan = /* @__PURE__ */ $constructor("$ZodCheckLessThan", (inst, def) => { + $ZodCheck.init(inst, def); + const origin = numericOriginMap[typeof def.value]; + inst._zod.onattach.push((inst2) => { + const bag = inst2._zod.bag; + const curr = (def.inclusive ? bag.maximum : bag.exclusiveMaximum) ?? Number.POSITIVE_INFINITY; + if (def.value < curr) { + if (def.inclusive) + bag.maximum = def.value; + else + bag.exclusiveMaximum = def.value; + } + }); + inst._zod.check = (payload) => { + if (def.inclusive ? payload.value <= def.value : payload.value < def.value) { + return; + } + payload.issues.push({ + origin, + code: "too_big", + maximum: def.value, + input: payload.value, + inclusive: def.inclusive, + inst, + continue: !def.abort + }); + }; +}); +var $ZodCheckGreaterThan = /* @__PURE__ */ $constructor("$ZodCheckGreaterThan", (inst, def) => { + $ZodCheck.init(inst, def); + const origin = numericOriginMap[typeof def.value]; + inst._zod.onattach.push((inst2) => { + const bag = inst2._zod.bag; + const curr = (def.inclusive ? bag.minimum : bag.exclusiveMinimum) ?? Number.NEGATIVE_INFINITY; + if (def.value > curr) { + if (def.inclusive) + bag.minimum = def.value; + else + bag.exclusiveMinimum = def.value; + } + }); + inst._zod.check = (payload) => { + if (def.inclusive ? payload.value >= def.value : payload.value > def.value) { + return; + } + payload.issues.push({ + origin, + code: "too_small", + minimum: def.value, + input: payload.value, + inclusive: def.inclusive, + inst, + continue: !def.abort + }); + }; +}); +var $ZodCheckMultipleOf = /* @__PURE__ */ $constructor("$ZodCheckMultipleOf", (inst, def) => { + $ZodCheck.init(inst, def); + inst._zod.onattach.push((inst2) => { + var _a2; + (_a2 = inst2._zod.bag).multipleOf ?? (_a2.multipleOf = def.value); + }); + inst._zod.check = (payload) => { + if (typeof payload.value !== typeof def.value) + throw new Error("Cannot mix number and bigint in multiple_of check."); + const isMultiple = typeof payload.value === "bigint" ? payload.value % def.value === BigInt(0) : floatSafeRemainder2(payload.value, def.value) === 0; + if (isMultiple) + return; + payload.issues.push({ + origin: typeof payload.value, + code: "not_multiple_of", + divisor: def.value, + input: payload.value, + inst, + continue: !def.abort + }); + }; +}); +var $ZodCheckNumberFormat = /* @__PURE__ */ $constructor("$ZodCheckNumberFormat", (inst, def) => { + $ZodCheck.init(inst, def); + def.format = def.format || "float64"; + const isInt = def.format?.includes("int"); + const origin = isInt ? "int" : "number"; + const [minimum, maximum] = NUMBER_FORMAT_RANGES[def.format]; + inst._zod.onattach.push((inst2) => { + const bag = inst2._zod.bag; + bag.format = def.format; + bag.minimum = minimum; + bag.maximum = maximum; + if (isInt) + bag.pattern = integer; + }); + inst._zod.check = (payload) => { + const input = payload.value; + if (isInt) { + if (!Number.isInteger(input)) { + payload.issues.push({ + expected: origin, + format: def.format, + code: "invalid_type", + input, + inst + }); + return; + } + if (!Number.isSafeInteger(input)) { + if (input > 0) { + payload.issues.push({ + input, + code: "too_big", + maximum: Number.MAX_SAFE_INTEGER, + note: "Integers must be within the safe integer range.", + inst, + origin, + continue: !def.abort + }); + } else { + payload.issues.push({ + input, + code: "too_small", + minimum: Number.MIN_SAFE_INTEGER, + note: "Integers must be within the safe integer range.", + inst, + origin, + continue: !def.abort + }); + } + return; + } + } + if (input < minimum) { + payload.issues.push({ + origin: "number", + input, + code: "too_small", + minimum, + inclusive: true, + inst, + continue: !def.abort + }); + } + if (input > maximum) { + payload.issues.push({ + origin: "number", + input, + code: "too_big", + maximum, + inst + }); + } + }; +}); +var $ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (inst, def) => { + $ZodCheck.init(inst, def); + inst._zod.when = (payload) => { + const val = payload.value; + return !nullish(val) && val.length !== void 0; + }; + inst._zod.onattach.push((inst2) => { + const curr = inst2._zod.bag.maximum ?? Number.POSITIVE_INFINITY; + if (def.maximum < curr) + inst2._zod.bag.maximum = def.maximum; + }); + inst._zod.check = (payload) => { + const input = payload.value; + const length = input.length; + if (length <= def.maximum) + return; + const origin = getLengthableOrigin(input); + payload.issues.push({ + origin, + code: "too_big", + maximum: def.maximum, + inclusive: true, + input, + inst, + continue: !def.abort + }); + }; +}); +var $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (inst, def) => { + $ZodCheck.init(inst, def); + inst._zod.when = (payload) => { + const val = payload.value; + return !nullish(val) && val.length !== void 0; + }; + inst._zod.onattach.push((inst2) => { + const curr = inst2._zod.bag.minimum ?? Number.NEGATIVE_INFINITY; + if (def.minimum > curr) + inst2._zod.bag.minimum = def.minimum; + }); + inst._zod.check = (payload) => { + const input = payload.value; + const length = input.length; + if (length >= def.minimum) + return; + const origin = getLengthableOrigin(input); + payload.issues.push({ + origin, + code: "too_small", + minimum: def.minimum, + inclusive: true, + input, + inst, + continue: !def.abort + }); + }; +}); +var $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEquals", (inst, def) => { + $ZodCheck.init(inst, def); + inst._zod.when = (payload) => { + const val = payload.value; + return !nullish(val) && val.length !== void 0; + }; + inst._zod.onattach.push((inst2) => { + const bag = inst2._zod.bag; + bag.minimum = def.length; + bag.maximum = def.length; + bag.length = def.length; + }); + inst._zod.check = (payload) => { + const input = payload.value; + const length = input.length; + if (length === def.length) + return; + const origin = getLengthableOrigin(input); + const tooBig = length > def.length; + payload.issues.push({ + origin, + ...tooBig ? { code: "too_big", maximum: def.length } : { code: "too_small", minimum: def.length }, + inclusive: true, + exact: true, + input: payload.value, + inst, + continue: !def.abort + }); + }; +}); +var $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringFormat", (inst, def) => { + var _a2, _b; + $ZodCheck.init(inst, def); + inst._zod.onattach.push((inst2) => { + const bag = inst2._zod.bag; + bag.format = def.format; + if (def.pattern) { + bag.patterns ?? (bag.patterns = /* @__PURE__ */ new Set()); + bag.patterns.add(def.pattern); + } + }); + if (def.pattern) + (_a2 = inst._zod).check ?? (_a2.check = (payload) => { + def.pattern.lastIndex = 0; + if (def.pattern.test(payload.value)) + return; + payload.issues.push({ + origin: "string", + code: "invalid_format", + format: def.format, + input: payload.value, + ...def.pattern ? { pattern: def.pattern.toString() } : {}, + inst, + continue: !def.abort + }); + }); + else + (_b = inst._zod).check ?? (_b.check = () => { + }); +}); +var $ZodCheckRegex = /* @__PURE__ */ $constructor("$ZodCheckRegex", (inst, def) => { + $ZodCheckStringFormat.init(inst, def); + inst._zod.check = (payload) => { + def.pattern.lastIndex = 0; + if (def.pattern.test(payload.value)) + return; + payload.issues.push({ + origin: "string", + code: "invalid_format", + format: "regex", + input: payload.value, + pattern: def.pattern.toString(), + inst, + continue: !def.abort + }); + }; +}); +var $ZodCheckLowerCase = /* @__PURE__ */ $constructor("$ZodCheckLowerCase", (inst, def) => { + def.pattern ?? (def.pattern = lowercase); + $ZodCheckStringFormat.init(inst, def); +}); +var $ZodCheckUpperCase = /* @__PURE__ */ $constructor("$ZodCheckUpperCase", (inst, def) => { + def.pattern ?? (def.pattern = uppercase); + $ZodCheckStringFormat.init(inst, def); +}); +var $ZodCheckIncludes = /* @__PURE__ */ $constructor("$ZodCheckIncludes", (inst, def) => { + $ZodCheck.init(inst, def); + const escapedRegex = escapeRegex(def.includes); + const pattern = new RegExp(typeof def.position === "number" ? `^.{${def.position}}${escapedRegex}` : escapedRegex); + def.pattern = pattern; + inst._zod.onattach.push((inst2) => { + const bag = inst2._zod.bag; + bag.patterns ?? (bag.patterns = /* @__PURE__ */ new Set()); + bag.patterns.add(pattern); + }); + inst._zod.check = (payload) => { + if (payload.value.includes(def.includes, def.position)) + return; + payload.issues.push({ + origin: "string", + code: "invalid_format", + format: "includes", + includes: def.includes, + input: payload.value, + inst, + continue: !def.abort + }); + }; +}); +var $ZodCheckStartsWith = /* @__PURE__ */ $constructor("$ZodCheckStartsWith", (inst, def) => { + $ZodCheck.init(inst, def); + const pattern = new RegExp(`^${escapeRegex(def.prefix)}.*`); + def.pattern ?? (def.pattern = pattern); + inst._zod.onattach.push((inst2) => { + const bag = inst2._zod.bag; + bag.patterns ?? (bag.patterns = /* @__PURE__ */ new Set()); + bag.patterns.add(pattern); + }); + inst._zod.check = (payload) => { + if (payload.value.startsWith(def.prefix)) + return; + payload.issues.push({ + origin: "string", + code: "invalid_format", + format: "starts_with", + prefix: def.prefix, + input: payload.value, + inst, + continue: !def.abort + }); + }; +}); +var $ZodCheckEndsWith = /* @__PURE__ */ $constructor("$ZodCheckEndsWith", (inst, def) => { + $ZodCheck.init(inst, def); + const pattern = new RegExp(`.*${escapeRegex(def.suffix)}$`); + def.pattern ?? (def.pattern = pattern); + inst._zod.onattach.push((inst2) => { + const bag = inst2._zod.bag; + bag.patterns ?? (bag.patterns = /* @__PURE__ */ new Set()); + bag.patterns.add(pattern); + }); + inst._zod.check = (payload) => { + if (payload.value.endsWith(def.suffix)) + return; + payload.issues.push({ + origin: "string", + code: "invalid_format", + format: "ends_with", + suffix: def.suffix, + input: payload.value, + inst, + continue: !def.abort + }); + }; +}); +var $ZodCheckOverwrite = /* @__PURE__ */ $constructor("$ZodCheckOverwrite", (inst, def) => { + $ZodCheck.init(inst, def); + inst._zod.check = (payload) => { + payload.value = def.tx(payload.value); + }; +}); +var Doc = class { + constructor(args3 = []) { + this.content = []; + this.indent = 0; + if (this) + this.args = args3; + } + indented(fn2) { + this.indent += 1; + fn2(this); + this.indent -= 1; + } + write(arg) { + if (typeof arg === "function") { + arg(this, { execution: "sync" }); + arg(this, { execution: "async" }); + return; + } + const content = arg; + const lines = content.split(` +`).filter((x) => x); + const minIndent = Math.min(...lines.map((x) => x.length - x.trimStart().length)); + const dedented = lines.map((x) => x.slice(minIndent)).map((x) => " ".repeat(this.indent * 2) + x); + for (const line of dedented) { + this.content.push(line); + } + } + compile() { + const F = Function; + const args3 = this?.args; + const content = this?.content ?? [``]; + const lines = [...content.map((x) => ` ${x}`)]; + return new F(...args3, lines.join(` +`)); + } +}; +var version = { + major: 4, + minor: 0, + patch: 0 +}; +var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => { + var _a2; + inst ?? (inst = {}); + inst._zod.def = def; + inst._zod.bag = inst._zod.bag || {}; + inst._zod.version = version; + const checks = [...inst._zod.def.checks ?? []]; + if (inst._zod.traits.has("$ZodCheck")) { + checks.unshift(inst); + } + for (const ch of checks) { + for (const fn2 of ch._zod.onattach) { + fn2(inst); + } + } + if (checks.length === 0) { + (_a2 = inst._zod).deferred ?? (_a2.deferred = []); + inst._zod.deferred?.push(() => { + inst._zod.run = inst._zod.parse; + }); + } else { + const runChecks = (payload, checks2, ctx) => { + let isAborted22 = aborted(payload); + let asyncResult; + for (const ch of checks2) { + if (ch._zod.when) { + const shouldRun = ch._zod.when(payload); + if (!shouldRun) + continue; + } else if (isAborted22) { + continue; + } + const currLen = payload.issues.length; + const _ = ch._zod.check(payload); + if (_ instanceof Promise && ctx?.async === false) { + throw new $ZodAsyncError(); + } + if (asyncResult || _ instanceof Promise) { + asyncResult = (asyncResult ?? Promise.resolve()).then(async () => { + await _; + const nextLen = payload.issues.length; + if (nextLen === currLen) + return; + if (!isAborted22) + isAborted22 = aborted(payload, currLen); + }); + } else { + const nextLen = payload.issues.length; + if (nextLen === currLen) + continue; + if (!isAborted22) + isAborted22 = aborted(payload, currLen); + } + } + if (asyncResult) { + return asyncResult.then(() => { + return payload; + }); + } + return payload; + }; + inst._zod.run = (payload, ctx) => { + const result = inst._zod.parse(payload, ctx); + if (result instanceof Promise) { + if (ctx.async === false) + throw new $ZodAsyncError(); + return result.then((result2) => runChecks(result2, checks, ctx)); + } + return runChecks(result, checks, ctx); + }; + } + inst["~standard"] = { + validate: (value2) => { + try { + const r = safeParse(inst, value2); + return r.success ? { value: r.data } : { issues: r.error?.issues }; + } catch (_) { + return safeParseAsync(inst, value2).then((r) => r.success ? { value: r.data } : { issues: r.error?.issues }); + } + }, + vendor: "zod", + version: 1 + }; +}); +var $ZodString = /* @__PURE__ */ $constructor("$ZodString", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.pattern = [...inst?._zod.bag?.patterns ?? []].pop() ?? string(inst._zod.bag); + inst._zod.parse = (payload, _) => { + if (def.coerce) + try { + payload.value = String(payload.value); + } catch (_2) { + } + if (typeof payload.value === "string") + return payload; + payload.issues.push({ + expected: "string", + code: "invalid_type", + input: payload.value, + inst + }); + return payload; + }; +}); +var $ZodStringFormat = /* @__PURE__ */ $constructor("$ZodStringFormat", (inst, def) => { + $ZodCheckStringFormat.init(inst, def); + $ZodString.init(inst, def); +}); +var $ZodGUID = /* @__PURE__ */ $constructor("$ZodGUID", (inst, def) => { + def.pattern ?? (def.pattern = guid); + $ZodStringFormat.init(inst, def); +}); +var $ZodUUID = /* @__PURE__ */ $constructor("$ZodUUID", (inst, def) => { + if (def.version) { + const versionMap = { + v1: 1, + v2: 2, + v3: 3, + v4: 4, + v5: 5, + v6: 6, + v7: 7, + v8: 8 + }; + const v = versionMap[def.version]; + if (v === void 0) + throw new Error(`Invalid UUID version: "${def.version}"`); + def.pattern ?? (def.pattern = uuid(v)); + } else + def.pattern ?? (def.pattern = uuid()); + $ZodStringFormat.init(inst, def); +}); +var $ZodEmail = /* @__PURE__ */ $constructor("$ZodEmail", (inst, def) => { + def.pattern ?? (def.pattern = email); + $ZodStringFormat.init(inst, def); +}); +var $ZodURL = /* @__PURE__ */ $constructor("$ZodURL", (inst, def) => { + $ZodStringFormat.init(inst, def); + inst._zod.check = (payload) => { + try { + const orig = payload.value; + const url4 = new URL(orig); + const href = url4.href; + if (def.hostname) { + def.hostname.lastIndex = 0; + if (!def.hostname.test(url4.hostname)) { + payload.issues.push({ + code: "invalid_format", + format: "url", + note: "Invalid hostname", + pattern: hostname.source, + input: payload.value, + inst, + continue: !def.abort + }); + } + } + if (def.protocol) { + def.protocol.lastIndex = 0; + if (!def.protocol.test(url4.protocol.endsWith(":") ? url4.protocol.slice(0, -1) : url4.protocol)) { + payload.issues.push({ + code: "invalid_format", + format: "url", + note: "Invalid protocol", + pattern: def.protocol.source, + input: payload.value, + inst, + continue: !def.abort + }); + } + } + if (!orig.endsWith("/") && href.endsWith("/")) { + payload.value = href.slice(0, -1); + } else { + payload.value = href; + } + return; + } catch (_) { + payload.issues.push({ + code: "invalid_format", + format: "url", + input: payload.value, + inst, + continue: !def.abort + }); + } + }; +}); +var $ZodEmoji = /* @__PURE__ */ $constructor("$ZodEmoji", (inst, def) => { + def.pattern ?? (def.pattern = emoji()); + $ZodStringFormat.init(inst, def); +}); +var $ZodNanoID = /* @__PURE__ */ $constructor("$ZodNanoID", (inst, def) => { + def.pattern ?? (def.pattern = nanoid); + $ZodStringFormat.init(inst, def); +}); +var $ZodCUID = /* @__PURE__ */ $constructor("$ZodCUID", (inst, def) => { + def.pattern ?? (def.pattern = cuid); + $ZodStringFormat.init(inst, def); +}); +var $ZodCUID2 = /* @__PURE__ */ $constructor("$ZodCUID2", (inst, def) => { + def.pattern ?? (def.pattern = cuid2); + $ZodStringFormat.init(inst, def); +}); +var $ZodULID = /* @__PURE__ */ $constructor("$ZodULID", (inst, def) => { + def.pattern ?? (def.pattern = ulid); + $ZodStringFormat.init(inst, def); +}); +var $ZodXID = /* @__PURE__ */ $constructor("$ZodXID", (inst, def) => { + def.pattern ?? (def.pattern = xid); + $ZodStringFormat.init(inst, def); +}); +var $ZodKSUID = /* @__PURE__ */ $constructor("$ZodKSUID", (inst, def) => { + def.pattern ?? (def.pattern = ksuid); + $ZodStringFormat.init(inst, def); +}); +var $ZodISODateTime = /* @__PURE__ */ $constructor("$ZodISODateTime", (inst, def) => { + def.pattern ?? (def.pattern = datetime(def)); + $ZodStringFormat.init(inst, def); +}); +var $ZodISODate = /* @__PURE__ */ $constructor("$ZodISODate", (inst, def) => { + def.pattern ?? (def.pattern = date); + $ZodStringFormat.init(inst, def); +}); +var $ZodISOTime = /* @__PURE__ */ $constructor("$ZodISOTime", (inst, def) => { + def.pattern ?? (def.pattern = time(def)); + $ZodStringFormat.init(inst, def); +}); +var $ZodISODuration = /* @__PURE__ */ $constructor("$ZodISODuration", (inst, def) => { + def.pattern ?? (def.pattern = duration); + $ZodStringFormat.init(inst, def); +}); +var $ZodIPv4 = /* @__PURE__ */ $constructor("$ZodIPv4", (inst, def) => { + def.pattern ?? (def.pattern = ipv4); + $ZodStringFormat.init(inst, def); + inst._zod.onattach.push((inst2) => { + const bag = inst2._zod.bag; + bag.format = `ipv4`; + }); +}); +var $ZodIPv6 = /* @__PURE__ */ $constructor("$ZodIPv6", (inst, def) => { + def.pattern ?? (def.pattern = ipv6); + $ZodStringFormat.init(inst, def); + inst._zod.onattach.push((inst2) => { + const bag = inst2._zod.bag; + bag.format = `ipv6`; + }); + inst._zod.check = (payload) => { + try { + new URL(`http://[${payload.value}]`); + } catch { + payload.issues.push({ + code: "invalid_format", + format: "ipv6", + input: payload.value, + inst, + continue: !def.abort + }); + } + }; +}); +var $ZodCIDRv4 = /* @__PURE__ */ $constructor("$ZodCIDRv4", (inst, def) => { + def.pattern ?? (def.pattern = cidrv4); + $ZodStringFormat.init(inst, def); +}); +var $ZodCIDRv6 = /* @__PURE__ */ $constructor("$ZodCIDRv6", (inst, def) => { + def.pattern ?? (def.pattern = cidrv6); + $ZodStringFormat.init(inst, def); + inst._zod.check = (payload) => { + const [address, prefix] = payload.value.split("/"); + try { + if (!prefix) + throw new Error(); + const prefixNum = Number(prefix); + if (`${prefixNum}` !== prefix) + throw new Error(); + if (prefixNum < 0 || prefixNum > 128) + throw new Error(); + new URL(`http://[${address}]`); + } catch { + payload.issues.push({ + code: "invalid_format", + format: "cidrv6", + input: payload.value, + inst, + continue: !def.abort + }); + } + }; +}); +function isValidBase64(data) { + if (data === "") + return true; + if (data.length % 4 !== 0) + return false; + try { + atob(data); + return true; + } catch { + return false; + } +} +var $ZodBase64 = /* @__PURE__ */ $constructor("$ZodBase64", (inst, def) => { + def.pattern ?? (def.pattern = base64); + $ZodStringFormat.init(inst, def); + inst._zod.onattach.push((inst2) => { + inst2._zod.bag.contentEncoding = "base64"; + }); + inst._zod.check = (payload) => { + if (isValidBase64(payload.value)) + return; + payload.issues.push({ + code: "invalid_format", + format: "base64", + input: payload.value, + inst, + continue: !def.abort + }); + }; +}); +function isValidBase64URL(data) { + if (!base64url.test(data)) + return false; + const base6422 = data.replace(/[-_]/g, (c) => c === "-" ? "+" : "/"); + const padded = base6422.padEnd(Math.ceil(base6422.length / 4) * 4, "="); + return isValidBase64(padded); +} +var $ZodBase64URL = /* @__PURE__ */ $constructor("$ZodBase64URL", (inst, def) => { + def.pattern ?? (def.pattern = base64url); + $ZodStringFormat.init(inst, def); + inst._zod.onattach.push((inst2) => { + inst2._zod.bag.contentEncoding = "base64url"; + }); + inst._zod.check = (payload) => { + if (isValidBase64URL(payload.value)) + return; + payload.issues.push({ + code: "invalid_format", + format: "base64url", + input: payload.value, + inst, + continue: !def.abort + }); + }; +}); +var $ZodE164 = /* @__PURE__ */ $constructor("$ZodE164", (inst, def) => { + def.pattern ?? (def.pattern = e164); + $ZodStringFormat.init(inst, def); +}); +function isValidJWT2(token, algorithm = null) { + try { + const tokensParts = token.split("."); + if (tokensParts.length !== 3) + return false; + const [header] = tokensParts; + if (!header) + return false; + const parsedHeader = JSON.parse(atob(header)); + if ("typ" in parsedHeader && parsedHeader?.typ !== "JWT") + return false; + if (!parsedHeader.alg) + return false; + if (algorithm && (!("alg" in parsedHeader) || parsedHeader.alg !== algorithm)) + return false; + return true; + } catch { + return false; + } +} +var $ZodJWT = /* @__PURE__ */ $constructor("$ZodJWT", (inst, def) => { + $ZodStringFormat.init(inst, def); + inst._zod.check = (payload) => { + if (isValidJWT2(payload.value, def.alg)) + return; + payload.issues.push({ + code: "invalid_format", + format: "jwt", + input: payload.value, + inst, + continue: !def.abort + }); + }; +}); +var $ZodNumber = /* @__PURE__ */ $constructor("$ZodNumber", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.pattern = inst._zod.bag.pattern ?? number; + inst._zod.parse = (payload, _ctx) => { + if (def.coerce) + try { + payload.value = Number(payload.value); + } catch (_) { + } + const input = payload.value; + if (typeof input === "number" && !Number.isNaN(input) && Number.isFinite(input)) { + return payload; + } + const received = typeof input === "number" ? Number.isNaN(input) ? "NaN" : !Number.isFinite(input) ? "Infinity" : void 0 : void 0; + payload.issues.push({ + expected: "number", + code: "invalid_type", + input, + inst, + ...received ? { received } : {} + }); + return payload; + }; +}); +var $ZodNumberFormat = /* @__PURE__ */ $constructor("$ZodNumber", (inst, def) => { + $ZodCheckNumberFormat.init(inst, def); + $ZodNumber.init(inst, def); +}); +var $ZodBoolean = /* @__PURE__ */ $constructor("$ZodBoolean", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.pattern = boolean; + inst._zod.parse = (payload, _ctx) => { + if (def.coerce) + try { + payload.value = Boolean(payload.value); + } catch (_) { + } + const input = payload.value; + if (typeof input === "boolean") + return payload; + payload.issues.push({ + expected: "boolean", + code: "invalid_type", + input, + inst + }); + return payload; + }; +}); +var $ZodNull = /* @__PURE__ */ $constructor("$ZodNull", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.pattern = _null; + inst._zod.values = /* @__PURE__ */ new Set([null]); + inst._zod.parse = (payload, _ctx) => { + const input = payload.value; + if (input === null) + return payload; + payload.issues.push({ + expected: "null", + code: "invalid_type", + input, + inst + }); + return payload; + }; +}); +var $ZodUnknown = /* @__PURE__ */ $constructor("$ZodUnknown", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.parse = (payload) => payload; +}); +var $ZodNever = /* @__PURE__ */ $constructor("$ZodNever", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.parse = (payload, _ctx) => { + payload.issues.push({ + expected: "never", + code: "invalid_type", + input: payload.value, + inst + }); + return payload; + }; +}); +function handleArrayResult(result, final, index) { + if (result.issues.length) { + final.issues.push(...prefixIssues(index, result.issues)); + } + final.value[index] = result.value; +} +var $ZodArray = /* @__PURE__ */ $constructor("$ZodArray", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.parse = (payload, ctx) => { + const input = payload.value; + if (!Array.isArray(input)) { + payload.issues.push({ + expected: "array", + code: "invalid_type", + input, + inst + }); + return payload; + } + payload.value = Array(input.length); + const proms = []; + for (let i = 0; i < input.length; i++) { + const item = input[i]; + const result = def.element._zod.run({ + value: item, + issues: [] + }, ctx); + if (result instanceof Promise) { + proms.push(result.then((result2) => handleArrayResult(result2, payload, i))); + } else { + handleArrayResult(result, payload, i); + } + } + if (proms.length) { + return Promise.all(proms).then(() => payload); + } + return payload; + }; +}); +function handleObjectResult(result, final, key) { + if (result.issues.length) { + final.issues.push(...prefixIssues(key, result.issues)); + } + final.value[key] = result.value; +} +function handleOptionalObjectResult(result, final, key, input) { + if (result.issues.length) { + if (input[key] === void 0) { + if (key in input) { + final.value[key] = void 0; + } else { + final.value[key] = result.value; + } + } else { + final.issues.push(...prefixIssues(key, result.issues)); + } + } else if (result.value === void 0) { + if (key in input) + final.value[key] = void 0; + } else { + final.value[key] = result.value; + } +} +var $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => { + $ZodType.init(inst, def); + const _normalized = cached2(() => { + const keys = Object.keys(def.shape); + for (const k of keys) { + if (!(def.shape[k] instanceof $ZodType)) { + throw new Error(`Invalid element at key "${k}": expected a Zod schema`); + } + } + const okeys = optionalKeys(def.shape); + return { + shape: def.shape, + keys, + keySet: new Set(keys), + numKeys: keys.length, + optionalKeys: new Set(okeys) + }; + }); + defineLazy(inst._zod, "propValues", () => { + const shape = def.shape; + const propValues = {}; + for (const key in shape) { + const field = shape[key]._zod; + if (field.values) { + propValues[key] ?? (propValues[key] = /* @__PURE__ */ new Set()); + for (const v of field.values) + propValues[key].add(v); + } + } + return propValues; + }); + const generateFastpass = (shape) => { + const doc = new Doc(["shape", "payload", "ctx"]); + const normalized = _normalized.value; + const parseStr = (key) => { + const k = esc(key); + return `shape[${k}]._zod.run({ value: input[${k}], issues: [] }, ctx)`; + }; + doc.write(`const input = payload.value;`); + const ids = /* @__PURE__ */ Object.create(null); + let counter = 0; + for (const key of normalized.keys) { + ids[key] = `key_${counter++}`; + } + doc.write(`const newResult = {}`); + for (const key of normalized.keys) { + if (normalized.optionalKeys.has(key)) { + const id = ids[key]; + doc.write(`const ${id} = ${parseStr(key)};`); + const k = esc(key); + doc.write(` + if (${id}.issues.length) { + if (input[${k}] === undefined) { + if (${k} in input) { + newResult[${k}] = undefined; + } + } else { + payload.issues = payload.issues.concat( + ${id}.issues.map((iss) => ({ + ...iss, + path: iss.path ? [${k}, ...iss.path] : [${k}], + })) + ); + } + } else if (${id}.value === undefined) { + if (${k} in input) newResult[${k}] = undefined; + } else { + newResult[${k}] = ${id}.value; + } + `); + } else { + const id = ids[key]; + doc.write(`const ${id} = ${parseStr(key)};`); + doc.write(` + if (${id}.issues.length) payload.issues = payload.issues.concat(${id}.issues.map(iss => ({ + ...iss, + path: iss.path ? [${esc(key)}, ...iss.path] : [${esc(key)}] + })));`); + doc.write(`newResult[${esc(key)}] = ${id}.value`); + } + } + doc.write(`payload.value = newResult;`); + doc.write(`return payload;`); + const fn2 = doc.compile(); + return (payload, ctx) => fn2(shape, payload, ctx); + }; + let fastpass; + const isObject32 = isObject2; + const jit = !globalConfig.jitless; + const allowsEval22 = allowsEval; + const fastEnabled = jit && allowsEval22.value; + const catchall = def.catchall; + let value2; + inst._zod.parse = (payload, ctx) => { + value2 ?? (value2 = _normalized.value); + const input = payload.value; + if (!isObject32(input)) { + payload.issues.push({ + expected: "object", + code: "invalid_type", + input, + inst + }); + return payload; + } + const proms = []; + if (jit && fastEnabled && ctx?.async === false && ctx.jitless !== true) { + if (!fastpass) + fastpass = generateFastpass(def.shape); + payload = fastpass(payload, ctx); + } else { + payload.value = {}; + const shape = value2.shape; + for (const key of value2.keys) { + const el = shape[key]; + const r = el._zod.run({ value: input[key], issues: [] }, ctx); + const isOptional = el._zod.optin === "optional" && el._zod.optout === "optional"; + if (r instanceof Promise) { + proms.push(r.then((r2) => isOptional ? handleOptionalObjectResult(r2, payload, key, input) : handleObjectResult(r2, payload, key))); + } else if (isOptional) { + handleOptionalObjectResult(r, payload, key, input); + } else { + handleObjectResult(r, payload, key); + } + } + } + if (!catchall) { + return proms.length ? Promise.all(proms).then(() => payload) : payload; + } + const unrecognized = []; + const keySet = value2.keySet; + const _catchall = catchall._zod; + const t = _catchall.def.type; + for (const key of Object.keys(input)) { + if (keySet.has(key)) + continue; + if (t === "never") { + unrecognized.push(key); + continue; + } + const r = _catchall.run({ value: input[key], issues: [] }, ctx); + if (r instanceof Promise) { + proms.push(r.then((r2) => handleObjectResult(r2, payload, key))); + } else { + handleObjectResult(r, payload, key); + } + } + if (unrecognized.length) { + payload.issues.push({ + code: "unrecognized_keys", + keys: unrecognized, + input, + inst + }); + } + if (!proms.length) + return payload; + return Promise.all(proms).then(() => { + return payload; + }); + }; +}); +function handleUnionResults(results, final, inst, ctx) { + for (const result of results) { + if (result.issues.length === 0) { + final.value = result.value; + return final; + } + } + final.issues.push({ + code: "invalid_union", + input: final.value, + inst, + errors: results.map((result) => result.issues.map((iss) => finalizeIssue(iss, ctx, config()))) + }); + return final; +} +var $ZodUnion = /* @__PURE__ */ $constructor("$ZodUnion", (inst, def) => { + $ZodType.init(inst, def); + defineLazy(inst._zod, "optin", () => def.options.some((o) => o._zod.optin === "optional") ? "optional" : void 0); + defineLazy(inst._zod, "optout", () => def.options.some((o) => o._zod.optout === "optional") ? "optional" : void 0); + defineLazy(inst._zod, "values", () => { + if (def.options.every((o) => o._zod.values)) { + return new Set(def.options.flatMap((option) => Array.from(option._zod.values))); + } + return; + }); + defineLazy(inst._zod, "pattern", () => { + if (def.options.every((o) => o._zod.pattern)) { + const patterns = def.options.map((o) => o._zod.pattern); + return new RegExp(`^(${patterns.map((p) => cleanRegex(p.source)).join("|")})$`); + } + return; + }); + inst._zod.parse = (payload, ctx) => { + let async = false; + const results = []; + for (const option of def.options) { + const result = option._zod.run({ + value: payload.value, + issues: [] + }, ctx); + if (result instanceof Promise) { + results.push(result); + async = true; + } else { + if (result.issues.length === 0) + return result; + results.push(result); + } + } + if (!async) + return handleUnionResults(results, payload, inst, ctx); + return Promise.all(results).then((results2) => { + return handleUnionResults(results2, payload, inst, ctx); + }); + }; +}); +var $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUnion", (inst, def) => { + $ZodUnion.init(inst, def); + const _super = inst._zod.parse; + defineLazy(inst._zod, "propValues", () => { + const propValues = {}; + for (const option of def.options) { + const pv = option._zod.propValues; + if (!pv || Object.keys(pv).length === 0) + throw new Error(`Invalid discriminated union option at index "${def.options.indexOf(option)}"`); + for (const [k, v] of Object.entries(pv)) { + if (!propValues[k]) + propValues[k] = /* @__PURE__ */ new Set(); + for (const val of v) { + propValues[k].add(val); + } + } + } + return propValues; + }); + const disc = cached2(() => { + const opts = def.options; + const map2 = /* @__PURE__ */ new Map(); + for (const o of opts) { + const values = o._zod.propValues[def.discriminator]; + if (!values || values.size === 0) + throw new Error(`Invalid discriminated union option at index "${def.options.indexOf(o)}"`); + for (const v of values) { + if (map2.has(v)) { + throw new Error(`Duplicate discriminator value "${String(v)}"`); + } + map2.set(v, o); + } + } + return map2; + }); + inst._zod.parse = (payload, ctx) => { + const input = payload.value; + if (!isObject2(input)) { + payload.issues.push({ + code: "invalid_type", + expected: "object", + input, + inst + }); + return payload; + } + const opt = disc.value.get(input?.[def.discriminator]); + if (opt) { + return opt._zod.run(payload, ctx); + } + if (def.unionFallback) { + return _super(payload, ctx); + } + payload.issues.push({ + code: "invalid_union", + errors: [], + note: "No matching discriminator", + input, + path: [def.discriminator], + inst + }); + return payload; + }; +}); +var $ZodIntersection = /* @__PURE__ */ $constructor("$ZodIntersection", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.parse = (payload, ctx) => { + const input = payload.value; + const left = def.left._zod.run({ value: input, issues: [] }, ctx); + const right = def.right._zod.run({ value: input, issues: [] }, ctx); + const async = left instanceof Promise || right instanceof Promise; + if (async) { + return Promise.all([left, right]).then(([left2, right2]) => { + return handleIntersectionResults(payload, left2, right2); + }); + } + return handleIntersectionResults(payload, left, right); + }; +}); +function mergeValues2(a, b) { + if (a === b) { + return { valid: true, data: a }; + } + if (a instanceof Date && b instanceof Date && +a === +b) { + return { valid: true, data: a }; + } + if (isPlainObject(a) && isPlainObject(b)) { + const bKeys = Object.keys(b); + const sharedKeys = Object.keys(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, + mergeErrorPath: [key, ...sharedValue.mergeErrorPath] + }; + } + newObj[key] = sharedValue.data; + } + return { valid: true, data: newObj }; + } + if (Array.isArray(a) && Array.isArray(b)) { + if (a.length !== b.length) { + return { valid: false, mergeErrorPath: [] }; + } + 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, + mergeErrorPath: [index, ...sharedValue.mergeErrorPath] + }; + } + newArray.push(sharedValue.data); + } + return { valid: true, data: newArray }; + } + return { valid: false, mergeErrorPath: [] }; +} +function handleIntersectionResults(result, left, right) { + if (left.issues.length) { + result.issues.push(...left.issues); + } + if (right.issues.length) { + result.issues.push(...right.issues); + } + if (aborted(result)) + return result; + const merged = mergeValues2(left.value, right.value); + if (!merged.valid) { + throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(merged.mergeErrorPath)}`); + } + result.value = merged.data; + return result; +} +var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.parse = (payload, ctx) => { + const input = payload.value; + if (!isPlainObject(input)) { + payload.issues.push({ + expected: "record", + code: "invalid_type", + input, + inst + }); + return payload; + } + const proms = []; + if (def.keyType._zod.values) { + const values = def.keyType._zod.values; + payload.value = {}; + for (const key of values) { + if (typeof key === "string" || typeof key === "number" || typeof key === "symbol") { + const result = def.valueType._zod.run({ value: input[key], issues: [] }, ctx); + if (result instanceof Promise) { + proms.push(result.then((result2) => { + if (result2.issues.length) { + payload.issues.push(...prefixIssues(key, result2.issues)); + } + payload.value[key] = result2.value; + })); + } else { + if (result.issues.length) { + payload.issues.push(...prefixIssues(key, result.issues)); + } + payload.value[key] = result.value; + } + } + } + let unrecognized; + for (const key in input) { + if (!values.has(key)) { + unrecognized = unrecognized ?? []; + unrecognized.push(key); + } + } + if (unrecognized && unrecognized.length > 0) { + payload.issues.push({ + code: "unrecognized_keys", + input, + inst, + keys: unrecognized + }); + } + } else { + payload.value = {}; + for (const key of Reflect.ownKeys(input)) { + if (key === "__proto__") + continue; + const keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx); + if (keyResult instanceof Promise) { + throw new Error("Async schemas not supported in object keys currently"); + } + if (keyResult.issues.length) { + payload.issues.push({ + origin: "record", + code: "invalid_key", + issues: keyResult.issues.map((iss) => finalizeIssue(iss, ctx, config())), + input: key, + path: [key], + inst + }); + payload.value[keyResult.value] = keyResult.value; + continue; + } + const result = def.valueType._zod.run({ value: input[key], issues: [] }, ctx); + if (result instanceof Promise) { + proms.push(result.then((result2) => { + if (result2.issues.length) { + payload.issues.push(...prefixIssues(key, result2.issues)); + } + payload.value[keyResult.value] = result2.value; + })); + } else { + if (result.issues.length) { + payload.issues.push(...prefixIssues(key, result.issues)); + } + payload.value[keyResult.value] = result.value; + } + } + } + if (proms.length) { + return Promise.all(proms).then(() => payload); + } + return payload; + }; +}); +var $ZodEnum = /* @__PURE__ */ $constructor("$ZodEnum", (inst, def) => { + $ZodType.init(inst, def); + const values = getEnumValues(def.entries); + inst._zod.values = new Set(values); + inst._zod.pattern = new RegExp(`^(${values.filter((k) => propertyKeyTypes.has(typeof k)).map((o) => typeof o === "string" ? escapeRegex(o) : o.toString()).join("|")})$`); + inst._zod.parse = (payload, _ctx) => { + const input = payload.value; + if (inst._zod.values.has(input)) { + return payload; + } + payload.issues.push({ + code: "invalid_value", + values, + input, + inst + }); + return payload; + }; +}); +var $ZodLiteral = /* @__PURE__ */ $constructor("$ZodLiteral", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.values = new Set(def.values); + inst._zod.pattern = new RegExp(`^(${def.values.map((o) => typeof o === "string" ? escapeRegex(o) : o ? o.toString() : String(o)).join("|")})$`); + inst._zod.parse = (payload, _ctx) => { + const input = payload.value; + if (inst._zod.values.has(input)) { + return payload; + } + payload.issues.push({ + code: "invalid_value", + values: def.values, + input, + inst + }); + return payload; + }; +}); +var $ZodTransform = /* @__PURE__ */ $constructor("$ZodTransform", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.parse = (payload, _ctx) => { + const _out = def.transform(payload.value, payload); + if (_ctx.async) { + const output = _out instanceof Promise ? _out : Promise.resolve(_out); + return output.then((output2) => { + payload.value = output2; + return payload; + }); + } + if (_out instanceof Promise) { + throw new $ZodAsyncError(); + } + payload.value = _out; + return payload; + }; +}); +var $ZodOptional = /* @__PURE__ */ $constructor("$ZodOptional", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.optin = "optional"; + inst._zod.optout = "optional"; + defineLazy(inst._zod, "values", () => { + return def.innerType._zod.values ? /* @__PURE__ */ new Set([...def.innerType._zod.values, void 0]) : void 0; + }); + defineLazy(inst._zod, "pattern", () => { + const pattern = def.innerType._zod.pattern; + return pattern ? new RegExp(`^(${cleanRegex(pattern.source)})?$`) : void 0; + }); + inst._zod.parse = (payload, ctx) => { + if (def.innerType._zod.optin === "optional") { + return def.innerType._zod.run(payload, ctx); + } + if (payload.value === void 0) { + return payload; + } + return def.innerType._zod.run(payload, ctx); + }; +}); +var $ZodNullable = /* @__PURE__ */ $constructor("$ZodNullable", (inst, def) => { + $ZodType.init(inst, def); + defineLazy(inst._zod, "optin", () => def.innerType._zod.optin); + defineLazy(inst._zod, "optout", () => def.innerType._zod.optout); + defineLazy(inst._zod, "pattern", () => { + const pattern = def.innerType._zod.pattern; + return pattern ? new RegExp(`^(${cleanRegex(pattern.source)}|null)$`) : void 0; + }); + defineLazy(inst._zod, "values", () => { + return def.innerType._zod.values ? /* @__PURE__ */ new Set([...def.innerType._zod.values, null]) : void 0; + }); + inst._zod.parse = (payload, ctx) => { + if (payload.value === null) + return payload; + return def.innerType._zod.run(payload, ctx); + }; +}); +var $ZodDefault = /* @__PURE__ */ $constructor("$ZodDefault", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.optin = "optional"; + defineLazy(inst._zod, "values", () => def.innerType._zod.values); + inst._zod.parse = (payload, ctx) => { + if (payload.value === void 0) { + payload.value = def.defaultValue; + return payload; + } + const result = def.innerType._zod.run(payload, ctx); + if (result instanceof Promise) { + return result.then((result2) => handleDefaultResult(result2, def)); + } + return handleDefaultResult(result, def); + }; +}); +function handleDefaultResult(payload, def) { + if (payload.value === void 0) { + payload.value = def.defaultValue; + } + return payload; +} +var $ZodPrefault = /* @__PURE__ */ $constructor("$ZodPrefault", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.optin = "optional"; + defineLazy(inst._zod, "values", () => def.innerType._zod.values); + inst._zod.parse = (payload, ctx) => { + if (payload.value === void 0) { + payload.value = def.defaultValue; + } + return def.innerType._zod.run(payload, ctx); + }; +}); +var $ZodNonOptional = /* @__PURE__ */ $constructor("$ZodNonOptional", (inst, def) => { + $ZodType.init(inst, def); + defineLazy(inst._zod, "values", () => { + const v = def.innerType._zod.values; + return v ? new Set([...v].filter((x) => x !== void 0)) : void 0; + }); + inst._zod.parse = (payload, ctx) => { + const result = def.innerType._zod.run(payload, ctx); + if (result instanceof Promise) { + return result.then((result2) => handleNonOptionalResult(result2, inst)); + } + return handleNonOptionalResult(result, inst); + }; +}); +function handleNonOptionalResult(payload, inst) { + if (!payload.issues.length && payload.value === void 0) { + payload.issues.push({ + code: "invalid_type", + expected: "nonoptional", + input: payload.value, + inst + }); + } + return payload; +} +var $ZodCatch = /* @__PURE__ */ $constructor("$ZodCatch", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.optin = "optional"; + defineLazy(inst._zod, "optout", () => def.innerType._zod.optout); + defineLazy(inst._zod, "values", () => def.innerType._zod.values); + inst._zod.parse = (payload, ctx) => { + const result = def.innerType._zod.run(payload, ctx); + if (result instanceof Promise) { + return result.then((result2) => { + payload.value = result2.value; + if (result2.issues.length) { + payload.value = def.catchValue({ + ...payload, + error: { + issues: result2.issues.map((iss) => finalizeIssue(iss, ctx, config())) + }, + input: payload.value + }); + payload.issues = []; + } + return payload; + }); + } + payload.value = result.value; + if (result.issues.length) { + payload.value = def.catchValue({ + ...payload, + error: { + issues: result.issues.map((iss) => finalizeIssue(iss, ctx, config())) + }, + input: payload.value + }); + payload.issues = []; + } + return payload; + }; +}); +var $ZodPipe = /* @__PURE__ */ $constructor("$ZodPipe", (inst, def) => { + $ZodType.init(inst, def); + defineLazy(inst._zod, "values", () => def.in._zod.values); + defineLazy(inst._zod, "optin", () => def.in._zod.optin); + defineLazy(inst._zod, "optout", () => def.out._zod.optout); + inst._zod.parse = (payload, ctx) => { + const left = def.in._zod.run(payload, ctx); + if (left instanceof Promise) { + return left.then((left2) => handlePipeResult(left2, def, ctx)); + } + return handlePipeResult(left, def, ctx); + }; +}); +function handlePipeResult(left, def, ctx) { + if (aborted(left)) { + return left; + } + return def.out._zod.run({ value: left.value, issues: left.issues }, ctx); +} +var $ZodReadonly = /* @__PURE__ */ $constructor("$ZodReadonly", (inst, def) => { + $ZodType.init(inst, def); + defineLazy(inst._zod, "propValues", () => def.innerType._zod.propValues); + defineLazy(inst._zod, "values", () => def.innerType._zod.values); + defineLazy(inst._zod, "optin", () => def.innerType._zod.optin); + defineLazy(inst._zod, "optout", () => def.innerType._zod.optout); + inst._zod.parse = (payload, ctx) => { + const result = def.innerType._zod.run(payload, ctx); + if (result instanceof Promise) { + return result.then(handleReadonlyResult); + } + return handleReadonlyResult(result); + }; +}); +function handleReadonlyResult(payload) { + payload.value = Object.freeze(payload.value); + return payload; +} +var $ZodCustom = /* @__PURE__ */ $constructor("$ZodCustom", (inst, def) => { + $ZodCheck.init(inst, def); + $ZodType.init(inst, def); + inst._zod.parse = (payload, _) => { + return payload; + }; + inst._zod.check = (payload) => { + const input = payload.value; + const r = def.fn(input); + if (r instanceof Promise) { + return r.then((r2) => handleRefineResult(r2, payload, input, inst)); + } + handleRefineResult(r, payload, input, inst); + return; + }; +}); +function handleRefineResult(result, payload, input, inst) { + if (!result) { + const _iss = { + code: "custom", + input, + inst, + path: [...inst._zod.def.path ?? []], + continue: !inst._zod.def.abort + }; + if (inst._zod.def.params) + _iss.params = inst._zod.def.params; + payload.issues.push(issue(_iss)); + } +} +var parsedType = (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; +}; +var error = () => { + 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 (issue22) => { + switch (issue22.code) { + case "invalid_type": + return `Invalid input: expected ${issue22.expected}, received ${parsedType(issue22.input)}`; + case "invalid_value": + if (issue22.values.length === 1) + return `Invalid input: expected ${stringifyPrimitive(issue22.values[0])}`; + return `Invalid option: expected one of ${joinValues(issue22.values, "|")}`; + case "too_big": { + const adj = issue22.inclusive ? "<=" : "<"; + const sizing = getSizing(issue22.origin); + if (sizing) + return `Too big: expected ${issue22.origin ?? "value"} to have ${adj}${issue22.maximum.toString()} ${sizing.unit ?? "elements"}`; + return `Too big: expected ${issue22.origin ?? "value"} to be ${adj}${issue22.maximum.toString()}`; + } + case "too_small": { + const adj = issue22.inclusive ? ">=" : ">"; + const sizing = getSizing(issue22.origin); + if (sizing) { + return `Too small: expected ${issue22.origin} to have ${adj}${issue22.minimum.toString()} ${sizing.unit}`; + } + return `Too small: expected ${issue22.origin} to be ${adj}${issue22.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue22; + 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] ?? issue22.format}`; + } + case "not_multiple_of": + return `Invalid number: must be a multiple of ${issue22.divisor}`; + case "unrecognized_keys": + return `Unrecognized key${issue22.keys.length > 1 ? "s" : ""}: ${joinValues(issue22.keys, ", ")}`; + case "invalid_key": + return `Invalid key in ${issue22.origin}`; + case "invalid_union": + return "Invalid input"; + case "invalid_element": + return `Invalid value in ${issue22.origin}`; + default: + return `Invalid input`; + } + }; +}; +function en_default2() { + return { + localeError: error() + }; +} +var $output = Symbol("ZodOutput"); +var $input = Symbol("ZodInput"); +var $ZodRegistry = class { + constructor() { + this._map = /* @__PURE__ */ new WeakMap(); + this._idmap = /* @__PURE__ */ new Map(); + } + add(schema2, ..._meta) { + const meta3 = _meta[0]; + this._map.set(schema2, meta3); + if (meta3 && typeof meta3 === "object" && "id" in meta3) { + if (this._idmap.has(meta3.id)) { + throw new Error(`ID ${meta3.id} already exists in the registry`); + } + this._idmap.set(meta3.id, schema2); + } + return this; + } + remove(schema2) { + this._map.delete(schema2); + return this; + } + get(schema2) { + const p = schema2._zod.parent; + if (p) { + const pm = { ...this.get(p) ?? {} }; + delete pm.id; + return { ...pm, ...this._map.get(schema2) }; + } + return this._map.get(schema2); + } + has(schema2) { + return this._map.has(schema2); + } +}; +function registry() { + return new $ZodRegistry(); +} +var globalRegistry = /* @__PURE__ */ registry(); +function _string(Class22, params) { + return new Class22({ + type: "string", + ...normalizeParams(params) + }); +} +function _email(Class22, params) { + return new Class22({ + type: "string", + format: "email", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +function _guid(Class22, params) { + return new Class22({ + type: "string", + format: "guid", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +function _uuid(Class22, params) { + return new Class22({ + type: "string", + format: "uuid", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +function _uuidv4(Class22, params) { + return new Class22({ + type: "string", + format: "uuid", + check: "string_format", + abort: false, + version: "v4", + ...normalizeParams(params) + }); +} +function _uuidv6(Class22, params) { + return new Class22({ + type: "string", + format: "uuid", + check: "string_format", + abort: false, + version: "v6", + ...normalizeParams(params) + }); +} +function _uuidv7(Class22, params) { + return new Class22({ + type: "string", + format: "uuid", + check: "string_format", + abort: false, + version: "v7", + ...normalizeParams(params) + }); +} +function _url(Class22, params) { + return new Class22({ + type: "string", + format: "url", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +function _emoji2(Class22, params) { + return new Class22({ + type: "string", + format: "emoji", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +function _nanoid(Class22, params) { + return new Class22({ + type: "string", + format: "nanoid", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +function _cuid(Class22, params) { + return new Class22({ + type: "string", + format: "cuid", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +function _cuid2(Class22, params) { + return new Class22({ + type: "string", + format: "cuid2", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +function _ulid(Class22, params) { + return new Class22({ + type: "string", + format: "ulid", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +function _xid(Class22, params) { + return new Class22({ + type: "string", + format: "xid", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +function _ksuid(Class22, params) { + return new Class22({ + type: "string", + format: "ksuid", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +function _ipv4(Class22, params) { + return new Class22({ + type: "string", + format: "ipv4", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +function _ipv6(Class22, params) { + return new Class22({ + type: "string", + format: "ipv6", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +function _cidrv4(Class22, params) { + return new Class22({ + type: "string", + format: "cidrv4", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +function _cidrv6(Class22, params) { + return new Class22({ + type: "string", + format: "cidrv6", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +function _base64(Class22, params) { + return new Class22({ + type: "string", + format: "base64", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +function _base64url(Class22, params) { + return new Class22({ + type: "string", + format: "base64url", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +function _e164(Class22, params) { + return new Class22({ + type: "string", + format: "e164", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +function _jwt(Class22, params) { + return new Class22({ + type: "string", + format: "jwt", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +function _isoDateTime(Class22, params) { + return new Class22({ + type: "string", + format: "datetime", + check: "string_format", + offset: false, + local: false, + precision: null, + ...normalizeParams(params) + }); +} +function _isoDate(Class22, params) { + return new Class22({ + type: "string", + format: "date", + check: "string_format", + ...normalizeParams(params) + }); +} +function _isoTime(Class22, params) { + return new Class22({ + type: "string", + format: "time", + check: "string_format", + precision: null, + ...normalizeParams(params) + }); +} +function _isoDuration(Class22, params) { + return new Class22({ + type: "string", + format: "duration", + check: "string_format", + ...normalizeParams(params) + }); +} +function _number(Class22, params) { + return new Class22({ + type: "number", + checks: [], + ...normalizeParams(params) + }); +} +function _int(Class22, params) { + return new Class22({ + type: "number", + check: "number_format", + abort: false, + format: "safeint", + ...normalizeParams(params) + }); +} +function _boolean(Class22, params) { + return new Class22({ + type: "boolean", + ...normalizeParams(params) + }); +} +function _null2(Class22, params) { + return new Class22({ + type: "null", + ...normalizeParams(params) + }); +} +function _unknown(Class22) { + return new Class22({ + type: "unknown" + }); +} +function _never(Class22, params) { + return new Class22({ + type: "never", + ...normalizeParams(params) + }); +} +function _lt(value2, params) { + return new $ZodCheckLessThan({ + check: "less_than", + ...normalizeParams(params), + value: value2, + inclusive: false + }); +} +function _lte(value2, params) { + return new $ZodCheckLessThan({ + check: "less_than", + ...normalizeParams(params), + value: value2, + inclusive: true + }); +} +function _gt(value2, params) { + return new $ZodCheckGreaterThan({ + check: "greater_than", + ...normalizeParams(params), + value: value2, + inclusive: false + }); +} +function _gte(value2, params) { + return new $ZodCheckGreaterThan({ + check: "greater_than", + ...normalizeParams(params), + value: value2, + inclusive: true + }); +} +function _multipleOf(value2, params) { + return new $ZodCheckMultipleOf({ + check: "multiple_of", + ...normalizeParams(params), + value: value2 + }); +} +function _maxLength(maximum, params) { + const ch = new $ZodCheckMaxLength({ + check: "max_length", + ...normalizeParams(params), + maximum + }); + return ch; +} +function _minLength(minimum, params) { + return new $ZodCheckMinLength({ + check: "min_length", + ...normalizeParams(params), + minimum + }); +} +function _length(length, params) { + return new $ZodCheckLengthEquals({ + check: "length_equals", + ...normalizeParams(params), + length + }); +} +function _regex(pattern, params) { + return new $ZodCheckRegex({ + check: "string_format", + format: "regex", + ...normalizeParams(params), + pattern + }); +} +function _lowercase(params) { + return new $ZodCheckLowerCase({ + check: "string_format", + format: "lowercase", + ...normalizeParams(params) + }); +} +function _uppercase(params) { + return new $ZodCheckUpperCase({ + check: "string_format", + format: "uppercase", + ...normalizeParams(params) + }); +} +function _includes(includes2, params) { + return new $ZodCheckIncludes({ + check: "string_format", + format: "includes", + ...normalizeParams(params), + includes: includes2 + }); +} +function _startsWith(prefix, params) { + return new $ZodCheckStartsWith({ + check: "string_format", + format: "starts_with", + ...normalizeParams(params), + prefix + }); +} +function _endsWith(suffix2, params) { + return new $ZodCheckEndsWith({ + check: "string_format", + format: "ends_with", + ...normalizeParams(params), + suffix: suffix2 + }); +} +function _overwrite(tx) { + return new $ZodCheckOverwrite({ + check: "overwrite", + tx + }); +} +function _normalize(form) { + return _overwrite((input) => input.normalize(form)); +} +function _trim() { + return _overwrite((input) => input.trim()); +} +function _toLowerCase() { + return _overwrite((input) => input.toLowerCase()); +} +function _toUpperCase() { + return _overwrite((input) => input.toUpperCase()); +} +function _array(Class22, element, params) { + return new Class22({ + type: "array", + element, + ...normalizeParams(params) + }); +} +function _custom(Class22, fn2, _params) { + const norm2 = normalizeParams(_params); + norm2.abort ?? (norm2.abort = true); + const schema2 = new Class22({ + type: "custom", + check: "custom", + fn: fn2, + ...norm2 + }); + return schema2; +} +function _refine(Class22, fn2, _params) { + const schema2 = new Class22({ + type: "custom", + check: "custom", + fn: fn2, + ...normalizeParams(_params) + }); + return schema2; +} +var exports_iso2 = {}; +__export2(exports_iso2, { + time: () => time2, + duration: () => duration2, + datetime: () => datetime2, + date: () => date2, + ZodISOTime: () => ZodISOTime, + ZodISODuration: () => ZodISODuration, + ZodISODateTime: () => ZodISODateTime, + ZodISODate: () => ZodISODate +}); +var ZodISODateTime = /* @__PURE__ */ $constructor("ZodISODateTime", (inst, def) => { + $ZodISODateTime.init(inst, def); + ZodStringFormat.init(inst, def); +}); +function datetime2(params) { + return _isoDateTime(ZodISODateTime, params); +} +var ZodISODate = /* @__PURE__ */ $constructor("ZodISODate", (inst, def) => { + $ZodISODate.init(inst, def); + ZodStringFormat.init(inst, def); +}); +function date2(params) { + return _isoDate(ZodISODate, params); +} +var ZodISOTime = /* @__PURE__ */ $constructor("ZodISOTime", (inst, def) => { + $ZodISOTime.init(inst, def); + ZodStringFormat.init(inst, def); +}); +function time2(params) { + return _isoTime(ZodISOTime, params); +} +var ZodISODuration = /* @__PURE__ */ $constructor("ZodISODuration", (inst, def) => { + $ZodISODuration.init(inst, def); + ZodStringFormat.init(inst, def); +}); +function duration2(params) { + return _isoDuration(ZodISODuration, params); +} +var initializer2 = (inst, issues) => { + $ZodError.init(inst, issues); + inst.name = "ZodError"; + Object.defineProperties(inst, { + format: { + value: (mapper) => formatError(inst, mapper) + }, + flatten: { + value: (mapper) => flattenError(inst, mapper) + }, + addIssue: { + value: (issue22) => inst.issues.push(issue22) + }, + addIssues: { + value: (issues2) => inst.issues.push(...issues2) + }, + isEmpty: { + get() { + return inst.issues.length === 0; + } + } + }); +}; +var ZodError2 = $constructor("ZodError", initializer2); +var ZodRealError = $constructor("ZodError", initializer2, { + Parent: Error +}); +var parse4 = /* @__PURE__ */ _parse(ZodRealError); +var parseAsync2 = /* @__PURE__ */ _parseAsync(ZodRealError); +var safeParse3 = /* @__PURE__ */ _safeParse(ZodRealError); +var safeParseAsync3 = /* @__PURE__ */ _safeParseAsync(ZodRealError); +var ZodType2 = /* @__PURE__ */ $constructor("ZodType", (inst, def) => { + $ZodType.init(inst, def); + inst.def = def; + Object.defineProperty(inst, "_def", { value: def }); + inst.check = (...checks3) => { + return inst.clone({ + ...def, + checks: [ + ...def.checks ?? [], + ...checks3.map((ch) => typeof ch === "function" ? { _zod: { check: ch, def: { check: "custom" }, onattach: [] } } : ch) + ] + }); + }; + inst.clone = (def2, params) => clone(inst, def2, params); + inst.brand = () => inst; + inst.register = (reg, meta3) => { + reg.add(inst, meta3); + return inst; + }; + inst.parse = (data, params) => parse4(inst, data, params, { callee: inst.parse }); + inst.safeParse = (data, params) => safeParse3(inst, data, params); + inst.parseAsync = async (data, params) => parseAsync2(inst, data, params, { callee: inst.parseAsync }); + inst.safeParseAsync = async (data, params) => safeParseAsync3(inst, data, params); + inst.spa = inst.safeParseAsync; + inst.refine = (check4, params) => inst.check(refine(check4, params)); + inst.superRefine = (refinement) => inst.check(superRefine(refinement)); + inst.overwrite = (fn2) => inst.check(_overwrite(fn2)); + inst.optional = () => optional(inst); + inst.nullable = () => nullable(inst); + inst.nullish = () => optional(nullable(inst)); + inst.nonoptional = (params) => nonoptional(inst, params); + inst.array = () => array(inst); + inst.or = (arg) => union([inst, arg]); + inst.and = (arg) => intersection(inst, arg); + inst.transform = (tx) => pipe(inst, transform(tx)); + inst.default = (def2) => _default(inst, def2); + inst.prefault = (def2) => prefault(inst, def2); + inst.catch = (params) => _catch(inst, params); + inst.pipe = (target) => pipe(inst, target); + inst.readonly = () => readonly(inst); + inst.describe = (description) => { + const cl = inst.clone(); + globalRegistry.add(cl, { description }); + return cl; + }; + Object.defineProperty(inst, "description", { + get() { + return globalRegistry.get(inst)?.description; + }, + configurable: true + }); + inst.meta = (...args3) => { + if (args3.length === 0) { + return globalRegistry.get(inst); + } + const cl = inst.clone(); + globalRegistry.add(cl, args3[0]); + return cl; + }; + inst.isOptional = () => inst.safeParse(void 0).success; + inst.isNullable = () => inst.safeParse(null).success; + return inst; +}); +var _ZodString = /* @__PURE__ */ $constructor("_ZodString", (inst, def) => { + $ZodString.init(inst, def); + ZodType2.init(inst, def); + const bag = inst._zod.bag; + inst.format = bag.format ?? null; + inst.minLength = bag.minimum ?? null; + inst.maxLength = bag.maximum ?? null; + inst.regex = (...args3) => inst.check(_regex(...args3)); + inst.includes = (...args3) => inst.check(_includes(...args3)); + inst.startsWith = (...args3) => inst.check(_startsWith(...args3)); + inst.endsWith = (...args3) => inst.check(_endsWith(...args3)); + inst.min = (...args3) => inst.check(_minLength(...args3)); + inst.max = (...args3) => inst.check(_maxLength(...args3)); + inst.length = (...args3) => inst.check(_length(...args3)); + inst.nonempty = (...args3) => inst.check(_minLength(1, ...args3)); + inst.lowercase = (params) => inst.check(_lowercase(params)); + inst.uppercase = (params) => inst.check(_uppercase(params)); + inst.trim = () => inst.check(_trim()); + inst.normalize = (...args3) => inst.check(_normalize(...args3)); + inst.toLowerCase = () => inst.check(_toLowerCase()); + inst.toUpperCase = () => inst.check(_toUpperCase()); +}); +var ZodString2 = /* @__PURE__ */ $constructor("ZodString", (inst, def) => { + $ZodString.init(inst, def); + _ZodString.init(inst, def); + inst.email = (params) => inst.check(_email(ZodEmail, params)); + inst.url = (params) => inst.check(_url(ZodURL, params)); + inst.jwt = (params) => inst.check(_jwt(ZodJWT, params)); + inst.emoji = (params) => inst.check(_emoji2(ZodEmoji, params)); + inst.guid = (params) => inst.check(_guid(ZodGUID, params)); + inst.uuid = (params) => inst.check(_uuid(ZodUUID, params)); + inst.uuidv4 = (params) => inst.check(_uuidv4(ZodUUID, params)); + inst.uuidv6 = (params) => inst.check(_uuidv6(ZodUUID, params)); + inst.uuidv7 = (params) => inst.check(_uuidv7(ZodUUID, params)); + inst.nanoid = (params) => inst.check(_nanoid(ZodNanoID, params)); + inst.guid = (params) => inst.check(_guid(ZodGUID, params)); + inst.cuid = (params) => inst.check(_cuid(ZodCUID, params)); + inst.cuid2 = (params) => inst.check(_cuid2(ZodCUID2, params)); + inst.ulid = (params) => inst.check(_ulid(ZodULID, params)); + inst.base64 = (params) => inst.check(_base64(ZodBase64, params)); + inst.base64url = (params) => inst.check(_base64url(ZodBase64URL, params)); + inst.xid = (params) => inst.check(_xid(ZodXID, params)); + inst.ksuid = (params) => inst.check(_ksuid(ZodKSUID, params)); + inst.ipv4 = (params) => inst.check(_ipv4(ZodIPv4, params)); + inst.ipv6 = (params) => inst.check(_ipv6(ZodIPv6, params)); + inst.cidrv4 = (params) => inst.check(_cidrv4(ZodCIDRv4, params)); + inst.cidrv6 = (params) => inst.check(_cidrv6(ZodCIDRv6, params)); + inst.e164 = (params) => inst.check(_e164(ZodE164, params)); + inst.datetime = (params) => inst.check(datetime2(params)); + inst.date = (params) => inst.check(date2(params)); + inst.time = (params) => inst.check(time2(params)); + inst.duration = (params) => inst.check(duration2(params)); +}); +function string2(params) { + return _string(ZodString2, params); +} +var ZodStringFormat = /* @__PURE__ */ $constructor("ZodStringFormat", (inst, def) => { + $ZodStringFormat.init(inst, def); + _ZodString.init(inst, def); +}); +var ZodEmail = /* @__PURE__ */ $constructor("ZodEmail", (inst, def) => { + $ZodEmail.init(inst, def); + ZodStringFormat.init(inst, def); +}); +var ZodGUID = /* @__PURE__ */ $constructor("ZodGUID", (inst, def) => { + $ZodGUID.init(inst, def); + ZodStringFormat.init(inst, def); +}); +var ZodUUID = /* @__PURE__ */ $constructor("ZodUUID", (inst, def) => { + $ZodUUID.init(inst, def); + ZodStringFormat.init(inst, def); +}); +var ZodURL = /* @__PURE__ */ $constructor("ZodURL", (inst, def) => { + $ZodURL.init(inst, def); + ZodStringFormat.init(inst, def); +}); +var ZodEmoji = /* @__PURE__ */ $constructor("ZodEmoji", (inst, def) => { + $ZodEmoji.init(inst, def); + ZodStringFormat.init(inst, def); +}); +var ZodNanoID = /* @__PURE__ */ $constructor("ZodNanoID", (inst, def) => { + $ZodNanoID.init(inst, def); + ZodStringFormat.init(inst, def); +}); +var ZodCUID = /* @__PURE__ */ $constructor("ZodCUID", (inst, def) => { + $ZodCUID.init(inst, def); + ZodStringFormat.init(inst, def); +}); +var ZodCUID2 = /* @__PURE__ */ $constructor("ZodCUID2", (inst, def) => { + $ZodCUID2.init(inst, def); + ZodStringFormat.init(inst, def); +}); +var ZodULID = /* @__PURE__ */ $constructor("ZodULID", (inst, def) => { + $ZodULID.init(inst, def); + ZodStringFormat.init(inst, def); +}); +var ZodXID = /* @__PURE__ */ $constructor("ZodXID", (inst, def) => { + $ZodXID.init(inst, def); + ZodStringFormat.init(inst, def); +}); +var ZodKSUID = /* @__PURE__ */ $constructor("ZodKSUID", (inst, def) => { + $ZodKSUID.init(inst, def); + ZodStringFormat.init(inst, def); +}); +var ZodIPv4 = /* @__PURE__ */ $constructor("ZodIPv4", (inst, def) => { + $ZodIPv4.init(inst, def); + ZodStringFormat.init(inst, def); +}); +var ZodIPv6 = /* @__PURE__ */ $constructor("ZodIPv6", (inst, def) => { + $ZodIPv6.init(inst, def); + ZodStringFormat.init(inst, def); +}); +var ZodCIDRv4 = /* @__PURE__ */ $constructor("ZodCIDRv4", (inst, def) => { + $ZodCIDRv4.init(inst, def); + ZodStringFormat.init(inst, def); +}); +var ZodCIDRv6 = /* @__PURE__ */ $constructor("ZodCIDRv6", (inst, def) => { + $ZodCIDRv6.init(inst, def); + ZodStringFormat.init(inst, def); +}); +var ZodBase64 = /* @__PURE__ */ $constructor("ZodBase64", (inst, def) => { + $ZodBase64.init(inst, def); + ZodStringFormat.init(inst, def); +}); +var ZodBase64URL = /* @__PURE__ */ $constructor("ZodBase64URL", (inst, def) => { + $ZodBase64URL.init(inst, def); + ZodStringFormat.init(inst, def); +}); +var ZodE164 = /* @__PURE__ */ $constructor("ZodE164", (inst, def) => { + $ZodE164.init(inst, def); + ZodStringFormat.init(inst, def); +}); +var ZodJWT = /* @__PURE__ */ $constructor("ZodJWT", (inst, def) => { + $ZodJWT.init(inst, def); + ZodStringFormat.init(inst, def); +}); +var ZodNumber2 = /* @__PURE__ */ $constructor("ZodNumber", (inst, def) => { + $ZodNumber.init(inst, def); + ZodType2.init(inst, def); + inst.gt = (value2, params) => inst.check(_gt(value2, params)); + inst.gte = (value2, params) => inst.check(_gte(value2, params)); + inst.min = (value2, params) => inst.check(_gte(value2, params)); + inst.lt = (value2, params) => inst.check(_lt(value2, params)); + inst.lte = (value2, params) => inst.check(_lte(value2, params)); + inst.max = (value2, params) => inst.check(_lte(value2, params)); + inst.int = (params) => inst.check(int(params)); + inst.safe = (params) => inst.check(int(params)); + inst.positive = (params) => inst.check(_gt(0, params)); + inst.nonnegative = (params) => inst.check(_gte(0, params)); + inst.negative = (params) => inst.check(_lt(0, params)); + inst.nonpositive = (params) => inst.check(_lte(0, params)); + inst.multipleOf = (value2, params) => inst.check(_multipleOf(value2, params)); + inst.step = (value2, params) => inst.check(_multipleOf(value2, params)); + inst.finite = () => inst; + const bag = inst._zod.bag; + inst.minValue = Math.max(bag.minimum ?? Number.NEGATIVE_INFINITY, bag.exclusiveMinimum ?? Number.NEGATIVE_INFINITY) ?? null; + inst.maxValue = Math.min(bag.maximum ?? Number.POSITIVE_INFINITY, bag.exclusiveMaximum ?? Number.POSITIVE_INFINITY) ?? null; + inst.isInt = (bag.format ?? "").includes("int") || Number.isSafeInteger(bag.multipleOf ?? 0.5); + inst.isFinite = true; + inst.format = bag.format ?? null; +}); +function number2(params) { + return _number(ZodNumber2, params); +} +var ZodNumberFormat = /* @__PURE__ */ $constructor("ZodNumberFormat", (inst, def) => { + $ZodNumberFormat.init(inst, def); + ZodNumber2.init(inst, def); +}); +function int(params) { + return _int(ZodNumberFormat, params); +} +var ZodBoolean2 = /* @__PURE__ */ $constructor("ZodBoolean", (inst, def) => { + $ZodBoolean.init(inst, def); + ZodType2.init(inst, def); +}); +function boolean2(params) { + return _boolean(ZodBoolean2, params); +} +var ZodNull2 = /* @__PURE__ */ $constructor("ZodNull", (inst, def) => { + $ZodNull.init(inst, def); + ZodType2.init(inst, def); +}); +function _null3(params) { + return _null2(ZodNull2, params); +} +var ZodUnknown2 = /* @__PURE__ */ $constructor("ZodUnknown", (inst, def) => { + $ZodUnknown.init(inst, def); + ZodType2.init(inst, def); +}); +function unknown() { + return _unknown(ZodUnknown2); +} +var ZodNever2 = /* @__PURE__ */ $constructor("ZodNever", (inst, def) => { + $ZodNever.init(inst, def); + ZodType2.init(inst, def); +}); +function never(params) { + return _never(ZodNever2, params); +} +var ZodArray2 = /* @__PURE__ */ $constructor("ZodArray", (inst, def) => { + $ZodArray.init(inst, def); + ZodType2.init(inst, def); + inst.element = def.element; + inst.min = (minLength, params) => inst.check(_minLength(minLength, params)); + inst.nonempty = (params) => inst.check(_minLength(1, params)); + inst.max = (maxLength, params) => inst.check(_maxLength(maxLength, params)); + inst.length = (len, params) => inst.check(_length(len, params)); + inst.unwrap = () => inst.element; +}); +function array(element, params) { + return _array(ZodArray2, element, params); +} +var ZodObject2 = /* @__PURE__ */ $constructor("ZodObject", (inst, def) => { + $ZodObject.init(inst, def); + ZodType2.init(inst, def); + exports_util.defineLazy(inst, "shape", () => def.shape); + inst.keyof = () => _enum(Object.keys(inst._zod.def.shape)); + inst.catchall = (catchall) => inst.clone({ ...inst._zod.def, catchall }); + inst.passthrough = () => inst.clone({ ...inst._zod.def, catchall: unknown() }); + inst.loose = () => inst.clone({ ...inst._zod.def, catchall: unknown() }); + inst.strict = () => inst.clone({ ...inst._zod.def, catchall: never() }); + inst.strip = () => inst.clone({ ...inst._zod.def, catchall: void 0 }); + inst.extend = (incoming) => { + return exports_util.extend(inst, incoming); + }; + inst.merge = (other) => exports_util.merge(inst, other); + inst.pick = (mask) => exports_util.pick(inst, mask); + inst.omit = (mask) => exports_util.omit(inst, mask); + inst.partial = (...args3) => exports_util.partial(ZodOptional2, inst, args3[0]); + inst.required = (...args3) => exports_util.required(ZodNonOptional, inst, args3[0]); +}); +function object2(shape, params) { + const def = { + type: "object", + get shape() { + exports_util.assignProp(this, "shape", { ...shape }); + return this.shape; + }, + ...exports_util.normalizeParams(params) + }; + return new ZodObject2(def); +} +function looseObject(shape, params) { + return new ZodObject2({ + type: "object", + get shape() { + exports_util.assignProp(this, "shape", { ...shape }); + return this.shape; + }, + catchall: unknown(), + ...exports_util.normalizeParams(params) + }); +} +var ZodUnion2 = /* @__PURE__ */ $constructor("ZodUnion", (inst, def) => { + $ZodUnion.init(inst, def); + ZodType2.init(inst, def); + inst.options = def.options; +}); +function union(options, params) { + return new ZodUnion2({ + type: "union", + options, + ...exports_util.normalizeParams(params) + }); +} +var ZodDiscriminatedUnion2 = /* @__PURE__ */ $constructor("ZodDiscriminatedUnion", (inst, def) => { + ZodUnion2.init(inst, def); + $ZodDiscriminatedUnion.init(inst, def); +}); +function discriminatedUnion(discriminator, options, params) { + return new ZodDiscriminatedUnion2({ + type: "union", + options, + discriminator, + ...exports_util.normalizeParams(params) + }); +} +var ZodIntersection2 = /* @__PURE__ */ $constructor("ZodIntersection", (inst, def) => { + $ZodIntersection.init(inst, def); + ZodType2.init(inst, def); +}); +function intersection(left, right) { + return new ZodIntersection2({ + type: "intersection", + left, + right + }); +} +var ZodRecord2 = /* @__PURE__ */ $constructor("ZodRecord", (inst, def) => { + $ZodRecord.init(inst, def); + ZodType2.init(inst, def); + inst.keyType = def.keyType; + inst.valueType = def.valueType; +}); +function record(keyType, valueType, params) { + return new ZodRecord2({ + type: "record", + keyType, + valueType, + ...exports_util.normalizeParams(params) + }); +} +var ZodEnum2 = /* @__PURE__ */ $constructor("ZodEnum", (inst, def) => { + $ZodEnum.init(inst, def); + ZodType2.init(inst, def); + inst.enum = def.entries; + inst.options = Object.values(def.entries); + const keys = new Set(Object.keys(def.entries)); + inst.extract = (values, params) => { + const newEntries = {}; + for (const value2 of values) { + if (keys.has(value2)) { + newEntries[value2] = def.entries[value2]; + } else + throw new Error(`Key ${value2} not found in enum`); + } + return new ZodEnum2({ + ...def, + checks: [], + ...exports_util.normalizeParams(params), + entries: newEntries + }); + }; + inst.exclude = (values, params) => { + const newEntries = { ...def.entries }; + for (const value2 of values) { + if (keys.has(value2)) { + delete newEntries[value2]; + } else + throw new Error(`Key ${value2} not found in enum`); + } + return new ZodEnum2({ + ...def, + checks: [], + ...exports_util.normalizeParams(params), + entries: newEntries + }); + }; +}); +function _enum(values, params) { + const entries = Array.isArray(values) ? Object.fromEntries(values.map((v) => [v, v])) : values; + return new ZodEnum2({ + type: "enum", + entries, + ...exports_util.normalizeParams(params) + }); +} +var ZodLiteral2 = /* @__PURE__ */ $constructor("ZodLiteral", (inst, def) => { + $ZodLiteral.init(inst, def); + ZodType2.init(inst, def); + inst.values = new Set(def.values); + Object.defineProperty(inst, "value", { + get() { + if (def.values.length > 1) { + throw new Error("This schema contains multiple valid literal values. Use `.values` instead."); + } + return def.values[0]; + } + }); +}); +function literal(value2, params) { + return new ZodLiteral2({ + type: "literal", + values: Array.isArray(value2) ? value2 : [value2], + ...exports_util.normalizeParams(params) + }); +} +var ZodTransform = /* @__PURE__ */ $constructor("ZodTransform", (inst, def) => { + $ZodTransform.init(inst, def); + ZodType2.init(inst, def); + inst._zod.parse = (payload, _ctx) => { + payload.addIssue = (issue22) => { + if (typeof issue22 === "string") { + payload.issues.push(exports_util.issue(issue22, payload.value, def)); + } else { + const _issue = issue22; + if (_issue.fatal) + _issue.continue = false; + _issue.code ?? (_issue.code = "custom"); + _issue.input ?? (_issue.input = payload.value); + _issue.inst ?? (_issue.inst = inst); + _issue.continue ?? (_issue.continue = true); + payload.issues.push(exports_util.issue(_issue)); + } + }; + const output = def.transform(payload.value, payload); + if (output instanceof Promise) { + return output.then((output2) => { + payload.value = output2; + return payload; + }); + } + payload.value = output; + return payload; + }; +}); +function transform(fn2) { + return new ZodTransform({ + type: "transform", + transform: fn2 + }); +} +var ZodOptional2 = /* @__PURE__ */ $constructor("ZodOptional", (inst, def) => { + $ZodOptional.init(inst, def); + ZodType2.init(inst, def); + inst.unwrap = () => inst._zod.def.innerType; +}); +function optional(innerType) { + return new ZodOptional2({ + type: "optional", + innerType + }); +} +var ZodNullable2 = /* @__PURE__ */ $constructor("ZodNullable", (inst, def) => { + $ZodNullable.init(inst, def); + ZodType2.init(inst, def); + inst.unwrap = () => inst._zod.def.innerType; +}); +function nullable(innerType) { + return new ZodNullable2({ + type: "nullable", + innerType + }); +} +var ZodDefault2 = /* @__PURE__ */ $constructor("ZodDefault", (inst, def) => { + $ZodDefault.init(inst, def); + ZodType2.init(inst, def); + inst.unwrap = () => inst._zod.def.innerType; + inst.removeDefault = inst.unwrap; +}); +function _default(innerType, defaultValue) { + return new ZodDefault2({ + type: "default", + innerType, + get defaultValue() { + return typeof defaultValue === "function" ? defaultValue() : defaultValue; + } + }); +} +var ZodPrefault = /* @__PURE__ */ $constructor("ZodPrefault", (inst, def) => { + $ZodPrefault.init(inst, def); + ZodType2.init(inst, def); + inst.unwrap = () => inst._zod.def.innerType; +}); +function prefault(innerType, defaultValue) { + return new ZodPrefault({ + type: "prefault", + innerType, + get defaultValue() { + return typeof defaultValue === "function" ? defaultValue() : defaultValue; + } + }); +} +var ZodNonOptional = /* @__PURE__ */ $constructor("ZodNonOptional", (inst, def) => { + $ZodNonOptional.init(inst, def); + ZodType2.init(inst, def); + inst.unwrap = () => inst._zod.def.innerType; +}); +function nonoptional(innerType, params) { + return new ZodNonOptional({ + type: "nonoptional", + innerType, + ...exports_util.normalizeParams(params) + }); +} +var ZodCatch2 = /* @__PURE__ */ $constructor("ZodCatch", (inst, def) => { + $ZodCatch.init(inst, def); + ZodType2.init(inst, def); + inst.unwrap = () => inst._zod.def.innerType; + inst.removeCatch = inst.unwrap; +}); +function _catch(innerType, catchValue) { + return new ZodCatch2({ + type: "catch", + innerType, + catchValue: typeof catchValue === "function" ? catchValue : () => catchValue + }); +} +var ZodPipe = /* @__PURE__ */ $constructor("ZodPipe", (inst, def) => { + $ZodPipe.init(inst, def); + ZodType2.init(inst, def); + inst.in = def.in; + inst.out = def.out; +}); +function pipe(in_, out) { + return new ZodPipe({ + type: "pipe", + in: in_, + out + }); +} +var ZodReadonly2 = /* @__PURE__ */ $constructor("ZodReadonly", (inst, def) => { + $ZodReadonly.init(inst, def); + ZodType2.init(inst, def); +}); +function readonly(innerType) { + return new ZodReadonly2({ + type: "readonly", + innerType + }); +} +var ZodCustom = /* @__PURE__ */ $constructor("ZodCustom", (inst, def) => { + $ZodCustom.init(inst, def); + ZodType2.init(inst, def); +}); +function check(fn2, params) { + const ch = new $ZodCheck({ + check: "custom", + ...exports_util.normalizeParams(params) + }); + ch._zod.check = fn2; + return ch; +} +function custom(fn2, _params) { + return _custom(ZodCustom, fn2 ?? (() => true), _params); +} +function refine(fn2, _params = {}) { + return _refine(ZodCustom, fn2, _params); +} +function superRefine(fn2, params) { + const ch = check((payload) => { + payload.addIssue = (issue22) => { + if (typeof issue22 === "string") { + payload.issues.push(exports_util.issue(issue22, payload.value, ch._zod.def)); + } else { + const _issue = issue22; + if (_issue.fatal) + _issue.continue = false; + _issue.code ?? (_issue.code = "custom"); + _issue.input ?? (_issue.input = payload.value); + _issue.inst ?? (_issue.inst = ch); + _issue.continue ?? (_issue.continue = !ch._zod.def.abort); + payload.issues.push(exports_util.issue(_issue)); + } + }; + return fn2(payload.value, payload); + }, params); + return ch; +} +function preprocess(fn2, schema2) { + return pipe(transform(fn2), schema2); +} +config(en_default2()); +var RELATED_TASK_META_KEY = "io.modelcontextprotocol/related-task"; var JSONRPC_VERSION = "2.0"; -var ProgressTokenSchema = exports_external.union([exports_external.string(), exports_external.number().int()]); -var CursorSchema = exports_external.string(); -var RequestMetaSchema = exports_external.object({ - progressToken: exports_external.optional(ProgressTokenSchema) -}).passthrough(); -var BaseRequestParamsSchema = exports_external.object({ - _meta: exports_external.optional(RequestMetaSchema) -}).passthrough(); -var RequestSchema = exports_external.object({ - method: exports_external.string(), - params: exports_external.optional(BaseRequestParamsSchema) +var AssertObjectSchema = custom((v) => v !== null && (typeof v === "object" || typeof v === "function")); +var ProgressTokenSchema = union([string2(), number2().int()]); +var CursorSchema = string2(); +var TaskCreationParamsSchema = looseObject({ + ttl: union([number2(), _null3()]).optional(), + pollInterval: number2().optional() }); -var BaseNotificationParamsSchema = exports_external.object({ - _meta: exports_external.optional(exports_external.object({}).passthrough()) -}).passthrough(); -var NotificationSchema = exports_external.object({ - method: exports_external.string(), - params: exports_external.optional(BaseNotificationParamsSchema) +var RelatedTaskMetadataSchema = looseObject({ + taskId: string2() }); -var ResultSchema = exports_external.object({ - _meta: exports_external.optional(exports_external.object({}).passthrough()) -}).passthrough(); -var RequestIdSchema = exports_external.union([exports_external.string(), exports_external.number().int()]); -var JSONRPCRequestSchema = exports_external.object({ - jsonrpc: exports_external.literal(JSONRPC_VERSION), - id: RequestIdSchema -}).merge(RequestSchema).strict(); -var JSONRPCNotificationSchema = exports_external.object({ - jsonrpc: exports_external.literal(JSONRPC_VERSION) -}).merge(NotificationSchema).strict(); -var JSONRPCResponseSchema = exports_external.object({ - jsonrpc: exports_external.literal(JSONRPC_VERSION), +var RequestMetaSchema = looseObject({ + progressToken: ProgressTokenSchema.optional(), + [RELATED_TASK_META_KEY]: RelatedTaskMetadataSchema.optional() +}); +var BaseRequestParamsSchema = looseObject({ + task: TaskCreationParamsSchema.optional(), + _meta: RequestMetaSchema.optional() +}); +var RequestSchema = object2({ + method: string2(), + params: BaseRequestParamsSchema.optional() +}); +var NotificationsParamsSchema = looseObject({ + _meta: object2({ + [RELATED_TASK_META_KEY]: optional(RelatedTaskMetadataSchema) + }).passthrough().optional() +}); +var NotificationSchema = object2({ + method: string2(), + params: NotificationsParamsSchema.optional() +}); +var ResultSchema = looseObject({ + _meta: looseObject({ + [RELATED_TASK_META_KEY]: RelatedTaskMetadataSchema.optional() + }).optional() +}); +var RequestIdSchema = union([string2(), number2().int()]); +var JSONRPCRequestSchema = object2({ + jsonrpc: literal(JSONRPC_VERSION), + id: RequestIdSchema, + ...RequestSchema.shape +}).strict(); +var JSONRPCNotificationSchema = object2({ + jsonrpc: literal(JSONRPC_VERSION), + ...NotificationSchema.shape +}).strict(); +var JSONRPCResponseSchema = object2({ + jsonrpc: literal(JSONRPC_VERSION), id: RequestIdSchema, result: ResultSchema }).strict(); @@ -84022,436 +90276,644 @@ var ErrorCode; ErrorCode22[ErrorCode22["MethodNotFound"] = -32601] = "MethodNotFound"; ErrorCode22[ErrorCode22["InvalidParams"] = -32602] = "InvalidParams"; ErrorCode22[ErrorCode22["InternalError"] = -32603] = "InternalError"; + ErrorCode22[ErrorCode22["UrlElicitationRequired"] = -32042] = "UrlElicitationRequired"; })(ErrorCode || (ErrorCode = {})); -var JSONRPCErrorSchema = exports_external.object({ - jsonrpc: exports_external.literal(JSONRPC_VERSION), +var JSONRPCErrorSchema = object2({ + jsonrpc: literal(JSONRPC_VERSION), id: RequestIdSchema, - error: exports_external.object({ - code: exports_external.number().int(), - message: exports_external.string(), - data: exports_external.optional(exports_external.unknown()) + error: object2({ + code: number2().int(), + message: string2(), + data: optional(unknown()) }) }).strict(); -var JSONRPCMessageSchema = exports_external.union([ - JSONRPCRequestSchema, - JSONRPCNotificationSchema, - JSONRPCResponseSchema, - JSONRPCErrorSchema -]); +var JSONRPCMessageSchema = union([JSONRPCRequestSchema, JSONRPCNotificationSchema, JSONRPCResponseSchema, JSONRPCErrorSchema]); var EmptyResultSchema = ResultSchema.strict(); +var CancelledNotificationParamsSchema = NotificationsParamsSchema.extend({ + requestId: RequestIdSchema, + reason: string2().optional() +}); var CancelledNotificationSchema = NotificationSchema.extend({ - method: exports_external.literal("notifications/cancelled"), - params: BaseNotificationParamsSchema.extend({ - requestId: RequestIdSchema, - reason: exports_external.string().optional() - }) + method: literal("notifications/cancelled"), + params: CancelledNotificationParamsSchema +}); +var IconSchema = object2({ + src: string2(), + mimeType: string2().optional(), + sizes: array(string2()).optional() +}); +var IconsSchema = object2({ + icons: array(IconSchema).optional() +}); +var BaseMetadataSchema = object2({ + name: string2(), + title: string2().optional() }); -var BaseMetadataSchema = exports_external.object({ - name: exports_external.string(), - title: exports_external.optional(exports_external.string()) -}).passthrough(); var ImplementationSchema = BaseMetadataSchema.extend({ - version: exports_external.string() + ...BaseMetadataSchema.shape, + ...IconsSchema.shape, + version: string2(), + websiteUrl: string2().optional() }); -var ClientCapabilitiesSchema = exports_external.object({ - experimental: exports_external.optional(exports_external.object({}).passthrough()), - sampling: exports_external.optional(exports_external.object({}).passthrough()), - elicitation: exports_external.optional(exports_external.object({}).passthrough()), - roots: exports_external.optional(exports_external.object({ - listChanged: exports_external.optional(exports_external.boolean()) +var FormElicitationCapabilitySchema = intersection(object2({ + applyDefaults: boolean2().optional() +}), record(string2(), unknown())); +var ElicitationCapabilitySchema = preprocess((value2) => { + if (value2 && typeof value2 === "object" && !Array.isArray(value2)) { + if (Object.keys(value2).length === 0) { + return { form: {} }; + } + } + return value2; +}, intersection(object2({ + form: FormElicitationCapabilitySchema.optional(), + url: AssertObjectSchema.optional() +}), record(string2(), unknown()).optional())); +var ClientTasksCapabilitySchema = object2({ + list: optional(object2({}).passthrough()), + cancel: optional(object2({}).passthrough()), + requests: optional(object2({ + sampling: optional(object2({ + createMessage: optional(object2({}).passthrough()) + }).passthrough()), + elicitation: optional(object2({ + create: optional(object2({}).passthrough()) + }).passthrough()) }).passthrough()) }).passthrough(); -var InitializeRequestSchema = RequestSchema.extend({ - method: exports_external.literal("initialize"), - params: BaseRequestParamsSchema.extend({ - protocolVersion: exports_external.string(), - capabilities: ClientCapabilitiesSchema, - clientInfo: ImplementationSchema - }) -}); -var ServerCapabilitiesSchema = exports_external.object({ - experimental: exports_external.optional(exports_external.object({}).passthrough()), - logging: exports_external.optional(exports_external.object({}).passthrough()), - completions: exports_external.optional(exports_external.object({}).passthrough()), - prompts: exports_external.optional(exports_external.object({ - listChanged: exports_external.optional(exports_external.boolean()) - }).passthrough()), - resources: exports_external.optional(exports_external.object({ - subscribe: exports_external.optional(exports_external.boolean()), - listChanged: exports_external.optional(exports_external.boolean()) - }).passthrough()), - tools: exports_external.optional(exports_external.object({ - listChanged: exports_external.optional(exports_external.boolean()) +var ServerTasksCapabilitySchema = object2({ + list: optional(object2({}).passthrough()), + cancel: optional(object2({}).passthrough()), + requests: optional(object2({ + tools: optional(object2({ + call: optional(object2({}).passthrough()) + }).passthrough()) }).passthrough()) }).passthrough(); +var ClientCapabilitiesSchema = object2({ + experimental: record(string2(), AssertObjectSchema).optional(), + sampling: object2({ + context: AssertObjectSchema.optional(), + tools: AssertObjectSchema.optional() + }).optional(), + elicitation: ElicitationCapabilitySchema.optional(), + roots: object2({ + listChanged: boolean2().optional() + }).optional(), + tasks: optional(ClientTasksCapabilitySchema) +}); +var InitializeRequestParamsSchema = BaseRequestParamsSchema.extend({ + protocolVersion: string2(), + capabilities: ClientCapabilitiesSchema, + clientInfo: ImplementationSchema +}); +var InitializeRequestSchema = RequestSchema.extend({ + method: literal("initialize"), + params: InitializeRequestParamsSchema +}); +var ServerCapabilitiesSchema = object2({ + experimental: record(string2(), AssertObjectSchema).optional(), + logging: AssertObjectSchema.optional(), + completions: AssertObjectSchema.optional(), + prompts: optional(object2({ + listChanged: optional(boolean2()) + })), + resources: object2({ + subscribe: boolean2().optional(), + listChanged: boolean2().optional() + }).optional(), + tools: object2({ + listChanged: boolean2().optional() + }).optional(), + tasks: optional(ServerTasksCapabilitySchema) +}).passthrough(); var InitializeResultSchema = ResultSchema.extend({ - protocolVersion: exports_external.string(), + protocolVersion: string2(), capabilities: ServerCapabilitiesSchema, serverInfo: ImplementationSchema, - instructions: exports_external.optional(exports_external.string()) + instructions: string2().optional() }); var InitializedNotificationSchema = NotificationSchema.extend({ - method: exports_external.literal("notifications/initialized") + method: literal("notifications/initialized") }); var PingRequestSchema = RequestSchema.extend({ - method: exports_external.literal("ping") + method: literal("ping") +}); +var ProgressSchema = object2({ + progress: number2(), + total: optional(number2()), + message: optional(string2()) +}); +var ProgressNotificationParamsSchema = object2({ + ...NotificationsParamsSchema.shape, + ...ProgressSchema.shape, + progressToken: ProgressTokenSchema }); -var ProgressSchema = exports_external.object({ - progress: exports_external.number(), - total: exports_external.optional(exports_external.number()), - message: exports_external.optional(exports_external.string()) -}).passthrough(); var ProgressNotificationSchema = NotificationSchema.extend({ - method: exports_external.literal("notifications/progress"), - params: BaseNotificationParamsSchema.merge(ProgressSchema).extend({ - progressToken: ProgressTokenSchema - }) + method: literal("notifications/progress"), + params: ProgressNotificationParamsSchema +}); +var PaginatedRequestParamsSchema = BaseRequestParamsSchema.extend({ + cursor: CursorSchema.optional() }); var PaginatedRequestSchema = RequestSchema.extend({ - params: BaseRequestParamsSchema.extend({ - cursor: exports_external.optional(CursorSchema) - }).optional() + params: PaginatedRequestParamsSchema.optional() }); var PaginatedResultSchema = ResultSchema.extend({ - nextCursor: exports_external.optional(CursorSchema) + nextCursor: optional(CursorSchema) +}); +var TaskSchema = object2({ + taskId: string2(), + status: _enum(["working", "input_required", "completed", "failed", "cancelled"]), + ttl: union([number2(), _null3()]), + createdAt: string2(), + lastUpdatedAt: string2(), + pollInterval: optional(number2()), + statusMessage: optional(string2()) +}); +var CreateTaskResultSchema = ResultSchema.extend({ + task: TaskSchema +}); +var TaskStatusNotificationParamsSchema = NotificationsParamsSchema.merge(TaskSchema); +var TaskStatusNotificationSchema = NotificationSchema.extend({ + method: literal("notifications/tasks/status"), + params: TaskStatusNotificationParamsSchema +}); +var GetTaskRequestSchema = RequestSchema.extend({ + method: literal("tasks/get"), + params: BaseRequestParamsSchema.extend({ + taskId: string2() + }) +}); +var GetTaskResultSchema = ResultSchema.merge(TaskSchema); +var GetTaskPayloadRequestSchema = RequestSchema.extend({ + method: literal("tasks/result"), + params: BaseRequestParamsSchema.extend({ + taskId: string2() + }) +}); +var ListTasksRequestSchema = PaginatedRequestSchema.extend({ + method: literal("tasks/list") +}); +var ListTasksResultSchema = PaginatedResultSchema.extend({ + tasks: array(TaskSchema) +}); +var CancelTaskRequestSchema = RequestSchema.extend({ + method: literal("tasks/cancel"), + params: BaseRequestParamsSchema.extend({ + taskId: string2() + }) +}); +var CancelTaskResultSchema = ResultSchema.merge(TaskSchema); +var ResourceContentsSchema = object2({ + uri: string2(), + mimeType: optional(string2()), + _meta: record(string2(), unknown()).optional() }); -var ResourceContentsSchema = exports_external.object({ - uri: exports_external.string(), - mimeType: exports_external.optional(exports_external.string()), - _meta: exports_external.optional(exports_external.object({}).passthrough()) -}).passthrough(); var TextResourceContentsSchema = ResourceContentsSchema.extend({ - text: exports_external.string() + text: string2() }); -var Base64Schema = exports_external.string().refine((val) => { +var Base64Schema = string2().refine((val) => { try { atob(val); return true; - } catch (_a) { + } catch (_a2) { return false; } }, { message: "Invalid Base64 string" }); var BlobResourceContentsSchema = ResourceContentsSchema.extend({ blob: Base64Schema }); -var ResourceSchema = BaseMetadataSchema.extend({ - uri: exports_external.string(), - description: exports_external.optional(exports_external.string()), - mimeType: exports_external.optional(exports_external.string()), - _meta: exports_external.optional(exports_external.object({}).passthrough()) +var AnnotationsSchema = object2({ + audience: array(_enum(["user", "assistant"])).optional(), + priority: number2().min(0).max(1).optional(), + lastModified: exports_iso2.datetime({ offset: true }).optional() }); -var ResourceTemplateSchema = BaseMetadataSchema.extend({ - uriTemplate: exports_external.string(), - description: exports_external.optional(exports_external.string()), - mimeType: exports_external.optional(exports_external.string()), - _meta: exports_external.optional(exports_external.object({}).passthrough()) +var ResourceSchema = object2({ + ...BaseMetadataSchema.shape, + ...IconsSchema.shape, + uri: string2(), + description: optional(string2()), + mimeType: optional(string2()), + annotations: AnnotationsSchema.optional(), + _meta: optional(looseObject({})) +}); +var ResourceTemplateSchema = object2({ + ...BaseMetadataSchema.shape, + ...IconsSchema.shape, + uriTemplate: string2(), + description: optional(string2()), + mimeType: optional(string2()), + annotations: AnnotationsSchema.optional(), + _meta: optional(looseObject({})) }); var ListResourcesRequestSchema = PaginatedRequestSchema.extend({ - method: exports_external.literal("resources/list") + method: literal("resources/list") }); var ListResourcesResultSchema = PaginatedResultSchema.extend({ - resources: exports_external.array(ResourceSchema) + resources: array(ResourceSchema) }); var ListResourceTemplatesRequestSchema = PaginatedRequestSchema.extend({ - method: exports_external.literal("resources/templates/list") + method: literal("resources/templates/list") }); var ListResourceTemplatesResultSchema = PaginatedResultSchema.extend({ - resourceTemplates: exports_external.array(ResourceTemplateSchema) + resourceTemplates: array(ResourceTemplateSchema) }); +var ResourceRequestParamsSchema = BaseRequestParamsSchema.extend({ + uri: string2() +}); +var ReadResourceRequestParamsSchema = ResourceRequestParamsSchema; var ReadResourceRequestSchema = RequestSchema.extend({ - method: exports_external.literal("resources/read"), - params: BaseRequestParamsSchema.extend({ - uri: exports_external.string() - }) + method: literal("resources/read"), + params: ReadResourceRequestParamsSchema }); var ReadResourceResultSchema = ResultSchema.extend({ - contents: exports_external.array(exports_external.union([TextResourceContentsSchema, BlobResourceContentsSchema])) + contents: array(union([TextResourceContentsSchema, BlobResourceContentsSchema])) }); var ResourceListChangedNotificationSchema = NotificationSchema.extend({ - method: exports_external.literal("notifications/resources/list_changed") + method: literal("notifications/resources/list_changed") }); +var SubscribeRequestParamsSchema = ResourceRequestParamsSchema; var SubscribeRequestSchema = RequestSchema.extend({ - method: exports_external.literal("resources/subscribe"), - params: BaseRequestParamsSchema.extend({ - uri: exports_external.string() - }) + method: literal("resources/subscribe"), + params: SubscribeRequestParamsSchema }); +var UnsubscribeRequestParamsSchema = ResourceRequestParamsSchema; var UnsubscribeRequestSchema = RequestSchema.extend({ - method: exports_external.literal("resources/unsubscribe"), - params: BaseRequestParamsSchema.extend({ - uri: exports_external.string() - }) + method: literal("resources/unsubscribe"), + params: UnsubscribeRequestParamsSchema +}); +var ResourceUpdatedNotificationParamsSchema = NotificationsParamsSchema.extend({ + uri: string2() }); var ResourceUpdatedNotificationSchema = NotificationSchema.extend({ - method: exports_external.literal("notifications/resources/updated"), - params: BaseNotificationParamsSchema.extend({ - uri: exports_external.string() - }) + method: literal("notifications/resources/updated"), + params: ResourceUpdatedNotificationParamsSchema }); -var PromptArgumentSchema = exports_external.object({ - name: exports_external.string(), - description: exports_external.optional(exports_external.string()), - required: exports_external.optional(exports_external.boolean()) -}).passthrough(); -var PromptSchema = BaseMetadataSchema.extend({ - description: exports_external.optional(exports_external.string()), - arguments: exports_external.optional(exports_external.array(PromptArgumentSchema)), - _meta: exports_external.optional(exports_external.object({}).passthrough()) +var PromptArgumentSchema = object2({ + name: string2(), + description: optional(string2()), + required: optional(boolean2()) +}); +var PromptSchema = object2({ + ...BaseMetadataSchema.shape, + ...IconsSchema.shape, + description: optional(string2()), + arguments: optional(array(PromptArgumentSchema)), + _meta: optional(looseObject({})) }); var ListPromptsRequestSchema = PaginatedRequestSchema.extend({ - method: exports_external.literal("prompts/list") + method: literal("prompts/list") }); var ListPromptsResultSchema = PaginatedResultSchema.extend({ - prompts: exports_external.array(PromptSchema) + prompts: array(PromptSchema) +}); +var GetPromptRequestParamsSchema = BaseRequestParamsSchema.extend({ + name: string2(), + arguments: record(string2(), string2()).optional() }); var GetPromptRequestSchema = RequestSchema.extend({ - method: exports_external.literal("prompts/get"), - params: BaseRequestParamsSchema.extend({ - name: exports_external.string(), - arguments: exports_external.optional(exports_external.record(exports_external.string())) - }) + method: literal("prompts/get"), + params: GetPromptRequestParamsSchema }); -var TextContentSchema = exports_external.object({ - type: exports_external.literal("text"), - text: exports_external.string(), - _meta: exports_external.optional(exports_external.object({}).passthrough()) -}).passthrough(); -var ImageContentSchema = exports_external.object({ - type: exports_external.literal("image"), +var TextContentSchema = object2({ + type: literal("text"), + text: string2(), + annotations: AnnotationsSchema.optional(), + _meta: record(string2(), unknown()).optional() +}); +var ImageContentSchema = object2({ + type: literal("image"), data: Base64Schema, - mimeType: exports_external.string(), - _meta: exports_external.optional(exports_external.object({}).passthrough()) -}).passthrough(); -var AudioContentSchema = exports_external.object({ - type: exports_external.literal("audio"), + mimeType: string2(), + annotations: AnnotationsSchema.optional(), + _meta: record(string2(), unknown()).optional() +}); +var AudioContentSchema = object2({ + type: literal("audio"), data: Base64Schema, - mimeType: exports_external.string(), - _meta: exports_external.optional(exports_external.object({}).passthrough()) -}).passthrough(); -var EmbeddedResourceSchema = exports_external.object({ - type: exports_external.literal("resource"), - resource: exports_external.union([TextResourceContentsSchema, BlobResourceContentsSchema]), - _meta: exports_external.optional(exports_external.object({}).passthrough()) + mimeType: string2(), + annotations: AnnotationsSchema.optional(), + _meta: record(string2(), unknown()).optional() +}); +var ToolUseContentSchema = object2({ + type: literal("tool_use"), + name: string2(), + id: string2(), + input: object2({}).passthrough(), + _meta: optional(object2({}).passthrough()) }).passthrough(); +var EmbeddedResourceSchema = object2({ + type: literal("resource"), + resource: union([TextResourceContentsSchema, BlobResourceContentsSchema]), + annotations: AnnotationsSchema.optional(), + _meta: record(string2(), unknown()).optional() +}); var ResourceLinkSchema = ResourceSchema.extend({ - type: exports_external.literal("resource_link") + type: literal("resource_link") }); -var ContentBlockSchema = exports_external.union([ +var ContentBlockSchema = union([ TextContentSchema, ImageContentSchema, AudioContentSchema, ResourceLinkSchema, EmbeddedResourceSchema ]); -var PromptMessageSchema = exports_external.object({ - role: exports_external.enum(["user", "assistant"]), +var PromptMessageSchema = object2({ + role: _enum(["user", "assistant"]), content: ContentBlockSchema -}).passthrough(); +}); var GetPromptResultSchema = ResultSchema.extend({ - description: exports_external.optional(exports_external.string()), - messages: exports_external.array(PromptMessageSchema) + description: optional(string2()), + messages: array(PromptMessageSchema) }); var PromptListChangedNotificationSchema = NotificationSchema.extend({ - method: exports_external.literal("notifications/prompts/list_changed") + method: literal("notifications/prompts/list_changed") }); -var ToolAnnotationsSchema = exports_external.object({ - title: exports_external.optional(exports_external.string()), - readOnlyHint: exports_external.optional(exports_external.boolean()), - destructiveHint: exports_external.optional(exports_external.boolean()), - idempotentHint: exports_external.optional(exports_external.boolean()), - openWorldHint: exports_external.optional(exports_external.boolean()) -}).passthrough(); -var ToolSchema = BaseMetadataSchema.extend({ - description: exports_external.optional(exports_external.string()), - inputSchema: exports_external.object({ - type: exports_external.literal("object"), - properties: exports_external.optional(exports_external.object({}).passthrough()), - required: exports_external.optional(exports_external.array(exports_external.string())) - }).passthrough(), - outputSchema: exports_external.optional(exports_external.object({ - type: exports_external.literal("object"), - properties: exports_external.optional(exports_external.object({}).passthrough()), - required: exports_external.optional(exports_external.array(exports_external.string())) - }).passthrough()), - annotations: exports_external.optional(ToolAnnotationsSchema), - _meta: exports_external.optional(exports_external.object({}).passthrough()) +var ToolAnnotationsSchema = object2({ + title: string2().optional(), + readOnlyHint: boolean2().optional(), + destructiveHint: boolean2().optional(), + idempotentHint: boolean2().optional(), + openWorldHint: boolean2().optional() +}); +var ToolExecutionSchema = object2({ + taskSupport: _enum(["required", "optional", "forbidden"]).optional() +}); +var ToolSchema = object2({ + ...BaseMetadataSchema.shape, + ...IconsSchema.shape, + description: string2().optional(), + inputSchema: object2({ + type: literal("object"), + properties: record(string2(), AssertObjectSchema).optional(), + required: array(string2()).optional() + }).catchall(unknown()), + outputSchema: object2({ + type: literal("object"), + properties: record(string2(), AssertObjectSchema).optional(), + required: array(string2()).optional() + }).catchall(unknown()).optional(), + annotations: optional(ToolAnnotationsSchema), + execution: optional(ToolExecutionSchema), + _meta: record(string2(), unknown()).optional() }); var ListToolsRequestSchema = PaginatedRequestSchema.extend({ - method: exports_external.literal("tools/list") + method: literal("tools/list") }); var ListToolsResultSchema = PaginatedResultSchema.extend({ - tools: exports_external.array(ToolSchema) + tools: array(ToolSchema) }); var CallToolResultSchema = ResultSchema.extend({ - content: exports_external.array(ContentBlockSchema).default([]), - structuredContent: exports_external.object({}).passthrough().optional(), - isError: exports_external.optional(exports_external.boolean()) + content: array(ContentBlockSchema).default([]), + structuredContent: record(string2(), unknown()).optional(), + isError: optional(boolean2()) }); var CompatibilityCallToolResultSchema = CallToolResultSchema.or(ResultSchema.extend({ - toolResult: exports_external.unknown() + toolResult: unknown() })); +var CallToolRequestParamsSchema = BaseRequestParamsSchema.extend({ + name: string2(), + arguments: optional(record(string2(), unknown())) +}); var CallToolRequestSchema = RequestSchema.extend({ - method: exports_external.literal("tools/call"), - params: BaseRequestParamsSchema.extend({ - name: exports_external.string(), - arguments: exports_external.optional(exports_external.record(exports_external.unknown())) - }) + method: literal("tools/call"), + params: CallToolRequestParamsSchema }); var ToolListChangedNotificationSchema = NotificationSchema.extend({ - method: exports_external.literal("notifications/tools/list_changed") + method: literal("notifications/tools/list_changed") +}); +var LoggingLevelSchema = _enum(["debug", "info", "notice", "warning", "error", "critical", "alert", "emergency"]); +var SetLevelRequestParamsSchema = BaseRequestParamsSchema.extend({ + level: LoggingLevelSchema }); -var LoggingLevelSchema = exports_external.enum([ - "debug", - "info", - "notice", - "warning", - "error", - "critical", - "alert", - "emergency" -]); var SetLevelRequestSchema = RequestSchema.extend({ - method: exports_external.literal("logging/setLevel"), - params: BaseRequestParamsSchema.extend({ - level: LoggingLevelSchema - }) + method: literal("logging/setLevel"), + params: SetLevelRequestParamsSchema +}); +var LoggingMessageNotificationParamsSchema = NotificationsParamsSchema.extend({ + level: LoggingLevelSchema, + logger: string2().optional(), + data: unknown() }); var LoggingMessageNotificationSchema = NotificationSchema.extend({ - method: exports_external.literal("notifications/message"), - params: BaseNotificationParamsSchema.extend({ - level: LoggingLevelSchema, - logger: exports_external.optional(exports_external.string()), - data: exports_external.unknown() - }) + method: literal("notifications/message"), + params: LoggingMessageNotificationParamsSchema }); -var ModelHintSchema = exports_external.object({ - name: exports_external.string().optional() +var ModelHintSchema = object2({ + name: string2().optional() +}); +var ModelPreferencesSchema = object2({ + hints: optional(array(ModelHintSchema)), + costPriority: optional(number2().min(0).max(1)), + speedPriority: optional(number2().min(0).max(1)), + intelligencePriority: optional(number2().min(0).max(1)) +}); +var ToolChoiceSchema = object2({ + mode: optional(_enum(["auto", "required", "none"])) +}); +var ToolResultContentSchema = object2({ + type: literal("tool_result"), + toolUseId: string2().describe("The unique identifier for the corresponding tool call."), + content: array(ContentBlockSchema).default([]), + structuredContent: object2({}).passthrough().optional(), + isError: optional(boolean2()), + _meta: optional(object2({}).passthrough()) }).passthrough(); -var ModelPreferencesSchema = exports_external.object({ - hints: exports_external.optional(exports_external.array(ModelHintSchema)), - costPriority: exports_external.optional(exports_external.number().min(0).max(1)), - speedPriority: exports_external.optional(exports_external.number().min(0).max(1)), - intelligencePriority: exports_external.optional(exports_external.number().min(0).max(1)) -}).passthrough(); -var SamplingMessageSchema = exports_external.object({ - role: exports_external.enum(["user", "assistant"]), - content: exports_external.union([TextContentSchema, ImageContentSchema, AudioContentSchema]) +var SamplingContentSchema = discriminatedUnion("type", [TextContentSchema, ImageContentSchema, AudioContentSchema]); +var SamplingMessageContentBlockSchema = discriminatedUnion("type", [ + TextContentSchema, + ImageContentSchema, + AudioContentSchema, + ToolUseContentSchema, + ToolResultContentSchema +]); +var SamplingMessageSchema = object2({ + role: _enum(["user", "assistant"]), + content: union([SamplingMessageContentBlockSchema, array(SamplingMessageContentBlockSchema)]), + _meta: optional(object2({}).passthrough()) }).passthrough(); +var CreateMessageRequestParamsSchema = BaseRequestParamsSchema.extend({ + messages: array(SamplingMessageSchema), + modelPreferences: ModelPreferencesSchema.optional(), + systemPrompt: string2().optional(), + includeContext: _enum(["none", "thisServer", "allServers"]).optional(), + temperature: number2().optional(), + maxTokens: number2().int(), + stopSequences: array(string2()).optional(), + metadata: AssertObjectSchema.optional(), + tools: optional(array(ToolSchema)), + toolChoice: optional(ToolChoiceSchema) +}); var CreateMessageRequestSchema = RequestSchema.extend({ - method: exports_external.literal("sampling/createMessage"), - params: BaseRequestParamsSchema.extend({ - messages: exports_external.array(SamplingMessageSchema), - systemPrompt: exports_external.optional(exports_external.string()), - includeContext: exports_external.optional(exports_external.enum(["none", "thisServer", "allServers"])), - temperature: exports_external.optional(exports_external.number()), - maxTokens: exports_external.number().int(), - stopSequences: exports_external.optional(exports_external.array(exports_external.string())), - metadata: exports_external.optional(exports_external.object({}).passthrough()), - modelPreferences: exports_external.optional(ModelPreferencesSchema) - }) + method: literal("sampling/createMessage"), + params: CreateMessageRequestParamsSchema }); var CreateMessageResultSchema = ResultSchema.extend({ - model: exports_external.string(), - stopReason: exports_external.optional(exports_external.enum(["endTurn", "stopSequence", "maxTokens"]).or(exports_external.string())), - role: exports_external.enum(["user", "assistant"]), - content: exports_external.discriminatedUnion("type", [ - TextContentSchema, - ImageContentSchema, - AudioContentSchema - ]) + model: string2(), + stopReason: optional(_enum(["endTurn", "stopSequence", "maxTokens"]).or(string2())), + role: _enum(["user", "assistant"]), + content: SamplingContentSchema }); -var BooleanSchemaSchema = exports_external.object({ - type: exports_external.literal("boolean"), - title: exports_external.optional(exports_external.string()), - description: exports_external.optional(exports_external.string()), - default: exports_external.optional(exports_external.boolean()) -}).passthrough(); -var StringSchemaSchema = exports_external.object({ - type: exports_external.literal("string"), - title: exports_external.optional(exports_external.string()), - description: exports_external.optional(exports_external.string()), - minLength: exports_external.optional(exports_external.number()), - maxLength: exports_external.optional(exports_external.number()), - format: exports_external.optional(exports_external.enum(["email", "uri", "date", "date-time"])) -}).passthrough(); -var NumberSchemaSchema = exports_external.object({ - type: exports_external.enum(["number", "integer"]), - title: exports_external.optional(exports_external.string()), - description: exports_external.optional(exports_external.string()), - minimum: exports_external.optional(exports_external.number()), - maximum: exports_external.optional(exports_external.number()) -}).passthrough(); -var EnumSchemaSchema = exports_external.object({ - type: exports_external.literal("string"), - title: exports_external.optional(exports_external.string()), - description: exports_external.optional(exports_external.string()), - enum: exports_external.array(exports_external.string()), - enumNames: exports_external.optional(exports_external.array(exports_external.string())) -}).passthrough(); -var PrimitiveSchemaDefinitionSchema = exports_external.union([ - BooleanSchemaSchema, - StringSchemaSchema, - NumberSchemaSchema, - EnumSchemaSchema -]); -var ElicitRequestSchema = RequestSchema.extend({ - method: exports_external.literal("elicitation/create"), - params: BaseRequestParamsSchema.extend({ - message: exports_external.string(), - requestedSchema: exports_external.object({ - type: exports_external.literal("object"), - properties: exports_external.record(exports_external.string(), PrimitiveSchemaDefinitionSchema), - required: exports_external.optional(exports_external.array(exports_external.string())) - }).passthrough() +var CreateMessageResultWithToolsSchema = ResultSchema.extend({ + model: string2(), + stopReason: optional(_enum(["endTurn", "stopSequence", "maxTokens", "toolUse"]).or(string2())), + role: _enum(["user", "assistant"]), + content: union([SamplingMessageContentBlockSchema, array(SamplingMessageContentBlockSchema)]) +}); +var BooleanSchemaSchema = object2({ + type: literal("boolean"), + title: string2().optional(), + description: string2().optional(), + default: boolean2().optional() +}); +var StringSchemaSchema = object2({ + type: literal("string"), + title: string2().optional(), + description: string2().optional(), + minLength: number2().optional(), + maxLength: number2().optional(), + format: _enum(["email", "uri", "date", "date-time"]).optional(), + default: string2().optional() +}); +var NumberSchemaSchema = object2({ + type: _enum(["number", "integer"]), + title: string2().optional(), + description: string2().optional(), + minimum: number2().optional(), + maximum: number2().optional(), + default: number2().optional() +}); +var UntitledSingleSelectEnumSchemaSchema = object2({ + type: literal("string"), + title: string2().optional(), + description: string2().optional(), + enum: array(string2()), + default: string2().optional() +}); +var TitledSingleSelectEnumSchemaSchema = object2({ + type: literal("string"), + title: string2().optional(), + description: string2().optional(), + oneOf: array(object2({ + const: string2(), + title: string2() + })), + default: string2().optional() +}); +var LegacyTitledEnumSchemaSchema = object2({ + type: literal("string"), + title: string2().optional(), + description: string2().optional(), + enum: array(string2()), + enumNames: array(string2()).optional(), + default: string2().optional() +}); +var SingleSelectEnumSchemaSchema = union([UntitledSingleSelectEnumSchemaSchema, TitledSingleSelectEnumSchemaSchema]); +var UntitledMultiSelectEnumSchemaSchema = object2({ + type: literal("array"), + title: string2().optional(), + description: string2().optional(), + minItems: number2().optional(), + maxItems: number2().optional(), + items: object2({ + type: literal("string"), + enum: array(string2()) + }), + default: array(string2()).optional() +}); +var TitledMultiSelectEnumSchemaSchema = object2({ + type: literal("array"), + title: string2().optional(), + description: string2().optional(), + minItems: number2().optional(), + maxItems: number2().optional(), + items: object2({ + anyOf: array(object2({ + const: string2(), + title: string2() + })) + }), + default: array(string2()).optional() +}); +var MultiSelectEnumSchemaSchema = union([UntitledMultiSelectEnumSchemaSchema, TitledMultiSelectEnumSchemaSchema]); +var EnumSchemaSchema = union([LegacyTitledEnumSchemaSchema, SingleSelectEnumSchemaSchema, MultiSelectEnumSchemaSchema]); +var PrimitiveSchemaDefinitionSchema = union([EnumSchemaSchema, BooleanSchemaSchema, StringSchemaSchema, NumberSchemaSchema]); +var ElicitRequestFormParamsSchema = BaseRequestParamsSchema.extend({ + mode: literal("form").optional(), + message: string2(), + requestedSchema: object2({ + type: literal("object"), + properties: record(string2(), PrimitiveSchemaDefinitionSchema), + required: array(string2()).optional() }) }); +var ElicitRequestURLParamsSchema = BaseRequestParamsSchema.extend({ + mode: literal("url"), + message: string2(), + elicitationId: string2(), + url: string2().url() +}); +var ElicitRequestParamsSchema = union([ElicitRequestFormParamsSchema, ElicitRequestURLParamsSchema]); +var ElicitRequestSchema = RequestSchema.extend({ + method: literal("elicitation/create"), + params: ElicitRequestParamsSchema +}); +var ElicitationCompleteNotificationParamsSchema = NotificationsParamsSchema.extend({ + elicitationId: string2() +}); +var ElicitationCompleteNotificationSchema = NotificationSchema.extend({ + method: literal("notifications/elicitation/complete"), + params: ElicitationCompleteNotificationParamsSchema +}); var ElicitResultSchema = ResultSchema.extend({ - action: exports_external.enum(["accept", "decline", "cancel"]), - content: exports_external.optional(exports_external.record(exports_external.string(), exports_external.unknown())) + action: _enum(["accept", "decline", "cancel"]), + content: preprocess((val) => val === null ? void 0 : val, record(string2(), union([string2(), number2(), boolean2(), array(string2())])).optional()) +}); +var ResourceTemplateReferenceSchema = object2({ + type: literal("ref/resource"), + uri: string2() +}); +var PromptReferenceSchema = object2({ + type: literal("ref/prompt"), + name: string2() +}); +var CompleteRequestParamsSchema = BaseRequestParamsSchema.extend({ + ref: union([PromptReferenceSchema, ResourceTemplateReferenceSchema]), + argument: object2({ + name: string2(), + value: string2() + }), + context: object2({ + arguments: record(string2(), string2()).optional() + }).optional() }); -var ResourceTemplateReferenceSchema = exports_external.object({ - type: exports_external.literal("ref/resource"), - uri: exports_external.string() -}).passthrough(); -var PromptReferenceSchema = exports_external.object({ - type: exports_external.literal("ref/prompt"), - name: exports_external.string() -}).passthrough(); var CompleteRequestSchema = RequestSchema.extend({ - method: exports_external.literal("completion/complete"), - params: BaseRequestParamsSchema.extend({ - ref: exports_external.union([PromptReferenceSchema, ResourceTemplateReferenceSchema]), - argument: exports_external.object({ - name: exports_external.string(), - value: exports_external.string() - }).passthrough(), - context: exports_external.optional(exports_external.object({ - arguments: exports_external.optional(exports_external.record(exports_external.string(), exports_external.string())) - })) - }) + method: literal("completion/complete"), + params: CompleteRequestParamsSchema }); var CompleteResultSchema = ResultSchema.extend({ - completion: exports_external.object({ - values: exports_external.array(exports_external.string()).max(100), - total: exports_external.optional(exports_external.number().int()), - hasMore: exports_external.optional(exports_external.boolean()) - }).passthrough() + completion: looseObject({ + values: array(string2()).max(100), + total: optional(number2().int()), + hasMore: optional(boolean2()) + }) +}); +var RootSchema = object2({ + uri: string2().startsWith("file://"), + name: string2().optional(), + _meta: record(string2(), unknown()).optional() }); -var RootSchema = exports_external.object({ - uri: exports_external.string().startsWith("file://"), - name: exports_external.optional(exports_external.string()), - _meta: exports_external.optional(exports_external.object({}).passthrough()) -}).passthrough(); var ListRootsRequestSchema = RequestSchema.extend({ - method: exports_external.literal("roots/list") + method: literal("roots/list") }); var ListRootsResultSchema = ResultSchema.extend({ - roots: exports_external.array(RootSchema) + roots: array(RootSchema) }); var RootsListChangedNotificationSchema = NotificationSchema.extend({ - method: exports_external.literal("notifications/roots/list_changed") + method: literal("notifications/roots/list_changed") }); -var ClientRequestSchema = exports_external.union([ +var ClientRequestSchema = union([ PingRequestSchema, InitializeRequestSchema, CompleteRequestSchema, @@ -84464,36 +90926,49 @@ var ClientRequestSchema = exports_external.union([ SubscribeRequestSchema, UnsubscribeRequestSchema, CallToolRequestSchema, - ListToolsRequestSchema + ListToolsRequestSchema, + GetTaskRequestSchema, + GetTaskPayloadRequestSchema, + ListTasksRequestSchema ]); -var ClientNotificationSchema = exports_external.union([ +var ClientNotificationSchema = union([ CancelledNotificationSchema, ProgressNotificationSchema, InitializedNotificationSchema, - RootsListChangedNotificationSchema + RootsListChangedNotificationSchema, + TaskStatusNotificationSchema ]); -var ClientResultSchema = exports_external.union([ +var ClientResultSchema = union([ EmptyResultSchema, CreateMessageResultSchema, + CreateMessageResultWithToolsSchema, ElicitResultSchema, - ListRootsResultSchema + ListRootsResultSchema, + GetTaskResultSchema, + ListTasksResultSchema, + CreateTaskResultSchema ]); -var ServerRequestSchema = exports_external.union([ +var ServerRequestSchema = union([ PingRequestSchema, CreateMessageRequestSchema, ElicitRequestSchema, - ListRootsRequestSchema + ListRootsRequestSchema, + GetTaskRequestSchema, + GetTaskPayloadRequestSchema, + ListTasksRequestSchema ]); -var ServerNotificationSchema = exports_external.union([ +var ServerNotificationSchema = union([ CancelledNotificationSchema, ProgressNotificationSchema, LoggingMessageNotificationSchema, ResourceUpdatedNotificationSchema, ResourceListChangedNotificationSchema, ToolListChangedNotificationSchema, - PromptListChangedNotificationSchema + PromptListChangedNotificationSchema, + TaskStatusNotificationSchema, + ElicitationCompleteNotificationSchema ]); -var ServerResultSchema = exports_external.union([ +var ServerResultSchema = union([ EmptyResultSchema, InitializeResultSchema, CompleteResultSchema, @@ -84503,66 +90978,25 @@ var ServerResultSchema = exports_external.union([ ListResourceTemplatesResultSchema, ReadResourceResultSchema, CallToolResultSchema, - ListToolsResultSchema + ListToolsResultSchema, + GetTaskResultSchema, + ListTasksResultSchema, + CreateTaskResultSchema ]); -var import_ajv = __toESM2(require_ajv(), 1); var ignoreOverride = Symbol("Let zodToJsonSchema decide on which parser to use"); var ALPHA_NUMERIC = new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789"); +var import_ajv = __toESM2(require_ajv(), 1); +var import_ajv_formats = __toESM2(require_dist(), 1); +var COMPLETABLE_SYMBOL = Symbol.for("mcp.completable"); var McpZodTypeKind; (function(McpZodTypeKind2) { McpZodTypeKind2["Completable"] = "McpCompletable"; })(McpZodTypeKind || (McpZodTypeKind = {})); -var Completable = class extends ZodType { - _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; - } -}; -Completable.create = (type2, params) => { - return new Completable({ - type: type2, - typeName: McpZodTypeKind.Completable, - complete: params.complete, - ...processCreateParams2(params) - }); -}; -function processCreateParams2(params) { - if (!params) - return {}; - const { errorMap: errorMap22, invalid_type_error, required_error, description } = params; - if (errorMap22 && (invalid_type_error || required_error)) { - throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`); - } - if (errorMap22) - return { errorMap: errorMap22, description }; - const customMap = (iss, ctx) => { - var _a, _b; - const { message } = params; - if (iss.code === "invalid_enum_value") { - return { message: message !== null && message !== void 0 ? message : ctx.defaultError }; - } - if (typeof ctx.data === "undefined") { - return { message: (_a = message !== null && message !== void 0 ? message : required_error) !== null && _a !== void 0 ? _a : ctx.defaultError }; - } - if (iss.code !== "invalid_type") - return { message: ctx.defaultError }; - return { message: (_b = message !== null && message !== void 0 ? message : invalid_type_error) !== null && _b !== void 0 ? _b : ctx.defaultError }; - }; - return { errorMap: customMap, description }; -} function query({ prompt, options }) { - const { systemPrompt, settingSources, ...rest } = options ?? {}; + const { systemPrompt, settingSources, sandbox, ...rest } = options ?? {}; let customSystemPrompt; let appendSystemPrompt; if (systemPrompt === void 0) { @@ -84574,33 +91008,38 @@ function query({ } let pathToClaudeCodeExecutable = rest.pathToClaudeCodeExecutable; if (!pathToClaudeCodeExecutable) { - const filename = fileURLToPath(import.meta.url); - const dirname2 = join3(filename, ".."); - pathToClaudeCodeExecutable = join3(dirname2, "cli.js"); + const filename = fileURLToPath2(import.meta.url); + const dirname2 = join5(filename, ".."); + pathToClaudeCodeExecutable = join5(dirname2, "cli.js"); } - process.env.CLAUDE_AGENT_SDK_VERSION = "0.1.37"; + process.env.CLAUDE_AGENT_SDK_VERSION = "0.1.77"; const { abortController = createAbortController(), additionalDirectories = [], agents: agents2, allowedTools = [], + betas, canUseTool, continue: continueConversation, cwd: cwd2, disallowedTools = [], + tools, env: env3, executable = isRunningWithBun() ? "bun" : "node", executableArgs = [], extraArgs = {}, fallbackModel, + enableFileCheckpointing, forkSession, hooks, includePartialMessages, + persistSession, maxThinkingTokens, maxTurns, maxBudgetUsd, mcpServers, model, + outputFormat, permissionMode = "default", allowDangerouslySkipPermissions = false, permissionPromptToolName, @@ -84610,6 +91049,7 @@ function query({ stderr, strictMcpConfig } = rest; + const jsonSchema2 = outputFormat?.type === "json_schema" ? outputFormat.schema : void 0; let processEnv = env3; if (!processEnv) { processEnv = { ...process.env }; @@ -84617,21 +91057,24 @@ function query({ if (!processEnv.CLAUDE_CODE_ENTRYPOINT) { processEnv.CLAUDE_CODE_ENTRYPOINT = "sdk-ts"; } + if (enableFileCheckpointing) { + processEnv.CLAUDE_CODE_ENABLE_SDK_FILE_CHECKPOINTING = "true"; + } if (!pathToClaudeCodeExecutable) { throw new Error("pathToClaudeCodeExecutable is required"); } 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, config22] of Object.entries(mcpServers)) { + if (config22.type === "sdk" && "instance" in config22) { + sdkMcpServers.set(name, config22.instance); allMcpServers[name] = { type: "sdk", name }; } else { - allMcpServers[name] = config2; + allMcpServers[name] = config22; } } } @@ -84639,7 +91082,7 @@ function query({ const transport = new ProcessTransport({ abortController, additionalDirectories, - agents: agents2, + betas, cwd: cwd2, executable, executableArgs, @@ -84648,13 +91091,12 @@ function query({ env: processEnv, forkSession, stderr, - customSystemPrompt, - appendSystemPrompt, maxThinkingTokens, maxTurns, maxBudgetUsd, model, fallbackModel, + jsonSchema: jsonSchema2, permissionMode, allowDangerouslySkipPermissions, permissionPromptToolName, @@ -84664,16 +91106,25 @@ function query({ settingSources: settingSources ?? [], allowedTools, disallowedTools, + tools, mcpServers: allMcpServers, strictMcpConfig, canUseTool: !!canUseTool, hooks: !!hooks, includePartialMessages, - plugins + persistSession, + plugins, + sandbox, + spawnClaudeCodeProcess: rest.spawnClaudeCodeProcess }); - const queryInstance = new Query(transport, isSingleUserTurn, canUseTool, hooks, abortController, sdkMcpServers); + const initConfig = { + systemPrompt: customSystemPrompt, + appendSystemPrompt, + agents: agents2 + }; + const queryInstance = new Query(transport, isSingleUserTurn, canUseTool, hooks, abortController, sdkMcpServers, jsonSchema2, initConfig); if (typeof prompt === "string") { - transport.write(JSON.stringify({ + transport.write(jsonStringify({ type: "user", session_id: "", message: { @@ -84717,7 +91168,7 @@ var package_default = { dependencies: { "@actions/core": "^1.11.1", "@actions/github": "^6.0.1", - "@anthropic-ai/claude-agent-sdk": "0.1.37", + "@anthropic-ai/claude-agent-sdk": "0.1.77", "@ark/fs": "0.53.0", "@ark/util": "0.53.0", "@octokit/plugin-throttling": "^11.0.3", @@ -84728,10 +91179,10 @@ var package_default = { "@standard-schema/spec": "1.0.0", "@toon-format/toon": "^1.0.0", arktype: "2.1.28", - "package-manager-detector": "^1.6.0", dotenv: "^17.2.3", execa: "^9.6.0", - fastmcp: "^3.20.0", + fastmcp: "^3.26.8", + "package-manager-detector": "^1.6.0", table: "^6.9.0" }, devDependencies: { @@ -85034,7 +91485,7 @@ function formatJsonValue(value2) { // agents/instructions.ts import { execSync } from "node:child_process"; -// node_modules/.pnpm/@toon-format+toon@1.4.0/node_modules/@toon-format/toon/dist/index.mjs +// ../node_modules/.pnpm/@toon-format+toon@1.0.0/node_modules/@toon-format/toon/dist/index.js var LIST_ITEM_MARKER = "-"; var LIST_ITEM_PREFIX = "- "; var COMMA = ","; @@ -85055,9 +91506,6 @@ var DEFAULT_DELIMITER = DELIMITERS.comma; function escapeString(value2) { return value2.replace(/\\/g, `${BACKSLASH}${BACKSLASH}`).replace(/"/g, `${BACKSLASH}${DOUBLE_QUOTE}`).replace(/\n/g, `${BACKSLASH}n`).replace(/\r/g, `${BACKSLASH}r`).replace(/\t/g, `${BACKSLASH}t`); } -function isBooleanOrNullLiteral(token) { - return token === TRUE_LITERAL || token === FALSE_LITERAL || token === NULL_LITERAL; -} function normalizeValue(value2) { if (value2 === null) return null; if (typeof value2 === "string" || typeof value2 === "boolean") return value2; @@ -85074,7 +91522,7 @@ function normalizeValue(value2) { if (Array.isArray(value2)) return value2.map(normalizeValue); if (value2 instanceof Set) return Array.from(value2).map(normalizeValue); if (value2 instanceof Map) return Object.fromEntries(Array.from(value2, ([k, v]) => [String(k), normalizeValue(v)])); - if (isPlainObject(value2)) { + if (isPlainObject2(value2)) { const normalized = {}; for (const key in value2) if (Object.prototype.hasOwnProperty.call(value2, key)) normalized[key] = normalizeValue(value2[key]); return normalized; @@ -85093,7 +91541,7 @@ function isJsonObject(value2) { function isEmptyObject(value2) { return Object.keys(value2).length === 0; } -function isPlainObject(value2) { +function isPlainObject2(value2) { if (value2 === null || typeof value2 !== "object") return false; const prototype = Object.getPrototypeOf(value2); return prototype === null || prototype === Object.prototype; @@ -85107,6 +91555,9 @@ function isArrayOfArrays(value2) { function isArrayOfObjects(value2) { return value2.length === 0 || value2.every((item) => isJsonObject(item)); } +function isBooleanOrNullLiteral(token) { + return token === TRUE_LITERAL || token === FALSE_LITERAL || token === NULL_LITERAL; +} function isValidUnquotedKey(key) { return /^[A-Z_][\w.]*$/i.test(key); } @@ -85203,22 +91654,37 @@ function formatHeader(length, options) { header += ":"; return header; } -function* encodeJsonValue(value2, options, depth) { - if (isJsonPrimitive(value2)) { - const encodedPrimitive = encodePrimitive(value2, options.delimiter); - if (encodedPrimitive !== "") yield encodedPrimitive; - return; +var LineWriter = class { + lines = []; + indentationString; + constructor(indentSize) { + this.indentationString = " ".repeat(indentSize); } - if (isJsonArray(value2)) yield* encodeArrayLines(void 0, value2, depth, options); - else if (isJsonObject(value2)) yield* encodeObjectLines(value2, depth, options); + push(depth, content) { + const indent2 = this.indentationString.repeat(depth); + this.lines.push(indent2 + content); + } + pushListItem(depth, content) { + this.push(depth, `${LIST_ITEM_PREFIX}${content}`); + } + toString() { + return this.lines.join("\n"); + } +}; +function encodeValue(value2, options) { + if (isJsonPrimitive(value2)) return encodePrimitive(value2, options.delimiter); + const writer = new LineWriter(options.indent); + if (isJsonArray(value2)) encodeArray(void 0, value2, writer, 0, options); + else if (isJsonObject(value2)) encodeObject(value2, writer, 0, options); + return writer.toString(); } -function* encodeObjectLines(value2, depth, options, rootLiteralKeys, pathPrefix, remainingDepth) { +function encodeObject(value2, writer, depth, options, rootLiteralKeys, pathPrefix, remainingDepth) { const keys = Object.keys(value2); if (depth === 0 && !rootLiteralKeys) rootLiteralKeys = new Set(keys.filter((k) => k.includes("."))); const effectiveFlattenDepth = remainingDepth ?? options.flattenDepth; - for (const [key, val] of Object.entries(value2)) yield* encodeKeyValuePairLines(key, val, depth, options, keys, rootLiteralKeys, pathPrefix, effectiveFlattenDepth); + for (const [key, val] of Object.entries(value2)) encodeKeyValuePair(key, val, writer, depth, options, keys, rootLiteralKeys, pathPrefix, effectiveFlattenDepth); } -function* encodeKeyValuePairLines(key, value2, depth, options, siblings, rootLiteralKeys, pathPrefix, flattenDepth) { +function encodeKeyValuePair(key, value2, writer, depth, options, siblings, rootLiteralKeys, pathPrefix, flattenDepth) { const currentPath = pathPrefix ? `${pathPrefix}${DOT}${key}` : key; const effectiveFlattenDepth = flattenDepth ?? options.flattenDepth; if (options.keyFolding === "safe" && siblings) { @@ -85228,67 +91694,70 @@ function* encodeKeyValuePairLines(key, value2, depth, options, siblings, rootLit const encodedFoldedKey = encodeKey(foldedKey); if (remainder === void 0) { if (isJsonPrimitive(leafValue)) { - yield indentedLine(depth, `${encodedFoldedKey}: ${encodePrimitive(leafValue, options.delimiter)}`, options.indent); + writer.push(depth, `${encodedFoldedKey}: ${encodePrimitive(leafValue, options.delimiter)}`); return; } else if (isJsonArray(leafValue)) { - yield* encodeArrayLines(foldedKey, leafValue, depth, options); + encodeArray(foldedKey, leafValue, writer, depth, options); return; } else if (isJsonObject(leafValue) && isEmptyObject(leafValue)) { - yield indentedLine(depth, `${encodedFoldedKey}:`, options.indent); + writer.push(depth, `${encodedFoldedKey}:`); return; } } if (isJsonObject(remainder)) { - yield indentedLine(depth, `${encodedFoldedKey}:`, options.indent); + writer.push(depth, `${encodedFoldedKey}:`); const remainingDepth = effectiveFlattenDepth - segmentCount; const foldedPath = pathPrefix ? `${pathPrefix}${DOT}${foldedKey}` : foldedKey; - yield* encodeObjectLines(remainder, depth + 1, options, rootLiteralKeys, foldedPath, remainingDepth); + encodeObject(remainder, writer, depth + 1, options, rootLiteralKeys, foldedPath, remainingDepth); return; } } } const encodedKey = encodeKey(key); - if (isJsonPrimitive(value2)) yield indentedLine(depth, `${encodedKey}: ${encodePrimitive(value2, options.delimiter)}`, options.indent); - else if (isJsonArray(value2)) yield* encodeArrayLines(key, value2, depth, options); + if (isJsonPrimitive(value2)) writer.push(depth, `${encodedKey}: ${encodePrimitive(value2, options.delimiter)}`); + else if (isJsonArray(value2)) encodeArray(key, value2, writer, depth, options); else if (isJsonObject(value2)) { - yield indentedLine(depth, `${encodedKey}:`, options.indent); - if (!isEmptyObject(value2)) yield* encodeObjectLines(value2, depth + 1, options, rootLiteralKeys, currentPath, effectiveFlattenDepth); + writer.push(depth, `${encodedKey}:`); + if (!isEmptyObject(value2)) encodeObject(value2, writer, depth + 1, options, rootLiteralKeys, currentPath, effectiveFlattenDepth); } } -function* encodeArrayLines(key, value2, depth, options) { +function encodeArray(key, value2, writer, depth, options) { if (value2.length === 0) { - yield indentedLine(depth, formatHeader(0, { + const header = formatHeader(0, { key, delimiter: options.delimiter - }), options.indent); + }); + writer.push(depth, header); return; } if (isArrayOfPrimitives(value2)) { - yield indentedLine(depth, encodeInlineArrayLine(value2, options.delimiter, key), options.indent); + const arrayLine = encodeInlineArrayLine(value2, options.delimiter, key); + writer.push(depth, arrayLine); return; } if (isArrayOfArrays(value2)) { if (value2.every((arr) => isArrayOfPrimitives(arr))) { - yield* encodeArrayOfArraysAsListItemsLines(key, value2, depth, options); + encodeArrayOfArraysAsListItems(key, value2, writer, depth, options); return; } } if (isArrayOfObjects(value2)) { const header = extractTabularHeader(value2); - if (header) yield* encodeArrayOfObjectsAsTabularLines(key, value2, header, depth, options); - else yield* encodeMixedArrayAsListItemsLines(key, value2, depth, options); + if (header) encodeArrayOfObjectsAsTabular(key, value2, header, writer, depth, options); + else encodeMixedArrayAsListItems(key, value2, writer, depth, options); return; } - yield* encodeMixedArrayAsListItemsLines(key, value2, depth, options); + encodeMixedArrayAsListItems(key, value2, writer, depth, options); } -function* encodeArrayOfArraysAsListItemsLines(prefix, values, depth, options) { - yield indentedLine(depth, formatHeader(values.length, { +function encodeArrayOfArraysAsListItems(prefix, values, writer, depth, options) { + const header = formatHeader(values.length, { key: prefix, delimiter: options.delimiter - }), options.indent); + }); + writer.push(depth, header); for (const arr of values) if (isArrayOfPrimitives(arr)) { const arrayLine = encodeInlineArrayLine(arr, options.delimiter); - yield indentedListItem(depth + 1, arrayLine, options.indent); + writer.pushListItem(depth + 1, arrayLine); } } function encodeInlineArrayLine(values, delimiter, prefix) { @@ -85300,13 +91769,14 @@ function encodeInlineArrayLine(values, delimiter, prefix) { if (values.length === 0) return header; return `${header} ${joinedValue}`; } -function* encodeArrayOfObjectsAsTabularLines(prefix, rows, header, depth, options) { - yield indentedLine(depth, formatHeader(rows.length, { +function encodeArrayOfObjectsAsTabular(prefix, rows, header, writer, depth, options) { + const formattedHeader = formatHeader(rows.length, { key: prefix, fields: header, delimiter: options.delimiter - }), options.indent); - yield* writeTabularRowsLines(rows, header, depth + 1, options); + }); + writer.push(depth, `${formattedHeader}`); + writeTabularRows(rows, header, writer, depth + 1, options); } function extractTabularHeader(rows) { if (rows.length === 0) return; @@ -85325,60 +91795,68 @@ function isTabularArray(rows, header) { } return true; } -function* writeTabularRowsLines(rows, header, depth, options) { - for (const row of rows) yield indentedLine(depth, encodeAndJoinPrimitives(header.map((key) => row[key]), options.delimiter), options.indent); +function writeTabularRows(rows, header, writer, depth, options) { + for (const row of rows) { + const joinedValue = encodeAndJoinPrimitives(header.map((key) => row[key]), options.delimiter); + writer.push(depth, joinedValue); + } } -function* encodeMixedArrayAsListItemsLines(prefix, items, depth, options) { - yield indentedLine(depth, formatHeader(items.length, { +function encodeMixedArrayAsListItems(prefix, items, writer, depth, options) { + const header = formatHeader(items.length, { key: prefix, delimiter: options.delimiter - }), options.indent); - for (const item of items) yield* encodeListItemValueLines(item, depth + 1, options); + }); + writer.push(depth, header); + for (const item of items) encodeListItemValue(item, writer, depth + 1, options); } -function* encodeObjectAsListItemLines(obj, depth, options) { +function encodeObjectAsListItem(obj, writer, depth, options) { if (isEmptyObject(obj)) { - yield indentedLine(depth, LIST_ITEM_MARKER, options.indent); + writer.push(depth, LIST_ITEM_MARKER); return; } const entries = Object.entries(obj); - if (entries.length === 1) { - const [key, value2] = entries[0]; - if (isJsonArray(value2) && isArrayOfObjects(value2)) { - const header = extractTabularHeader(value2); - if (header) { - yield indentedListItem(depth, formatHeader(value2.length, { - key, - fields: header, - delimiter: options.delimiter - }), options.indent); - yield* writeTabularRowsLines(value2, header, depth + 1, options); - return; - } + const [firstKey, firstValue] = entries[0]; + const encodedKey = encodeKey(firstKey); + if (isJsonPrimitive(firstValue)) writer.pushListItem(depth, `${encodedKey}: ${encodePrimitive(firstValue, options.delimiter)}`); + else if (isJsonArray(firstValue)) if (isArrayOfPrimitives(firstValue)) { + const arrayPropertyLine = encodeInlineArrayLine(firstValue, options.delimiter, firstKey); + writer.pushListItem(depth, arrayPropertyLine); + } else if (isArrayOfObjects(firstValue)) { + const header = extractTabularHeader(firstValue); + if (header) { + const formattedHeader = formatHeader(firstValue.length, { + key: firstKey, + fields: header, + delimiter: options.delimiter + }); + writer.pushListItem(depth, formattedHeader); + writeTabularRows(firstValue, header, writer, depth + 1, options); + } else { + writer.pushListItem(depth, `${encodedKey}[${firstValue.length}]:`); + for (const item of firstValue) encodeObjectAsListItem(item, writer, depth + 1, options); } + } else { + writer.pushListItem(depth, `${encodedKey}[${firstValue.length}]:`); + for (const item of firstValue) encodeListItemValue(item, writer, depth + 1, options); } - yield indentedLine(depth, LIST_ITEM_MARKER, options.indent); - yield* encodeObjectLines(obj, depth + 1, options); -} -function* encodeListItemValueLines(value2, depth, options) { - if (isJsonPrimitive(value2)) yield indentedListItem(depth, encodePrimitive(value2, options.delimiter), options.indent); - else if (isJsonArray(value2)) if (isArrayOfPrimitives(value2)) yield indentedListItem(depth, encodeInlineArrayLine(value2, options.delimiter), options.indent); - else { - yield indentedListItem(depth, formatHeader(value2.length, { delimiter: options.delimiter }), options.indent); - for (const item of value2) yield* encodeListItemValueLines(item, depth + 1, options); + else if (isJsonObject(firstValue)) { + writer.pushListItem(depth, `${encodedKey}:`); + if (!isEmptyObject(firstValue)) encodeObject(firstValue, writer, depth + 2, options); + } + for (let i = 1; i < entries.length; i++) { + const [key, value2] = entries[i]; + encodeKeyValuePair(key, value2, writer, depth + 1, options); } - else if (isJsonObject(value2)) yield* encodeObjectAsListItemLines(value2, depth, options); } -function indentedLine(depth, content, indentSize) { - return " ".repeat(indentSize * depth) + content; -} -function indentedListItem(depth, content, indentSize) { - return indentedLine(depth, LIST_ITEM_PREFIX + content, indentSize); +function encodeListItemValue(value2, writer, depth, options) { + if (isJsonPrimitive(value2)) writer.pushListItem(depth, encodePrimitive(value2, options.delimiter)); + else if (isJsonArray(value2) && isArrayOfPrimitives(value2)) { + const arrayLine = encodeInlineArrayLine(value2, options.delimiter); + writer.pushListItem(depth, arrayLine); + } else if (isJsonObject(value2)) encodeObjectAsListItem(value2, writer, depth, options); } function encode(input, options) { - return Array.from(encodeLines(input, options)).join("\n"); -} -function encodeLines(input, options) { - return encodeJsonValue(normalizeValue(input), resolveOptions(options), 0); + return encodeValue(normalizeValue(input), resolveOptions(options)); } function resolveOptions(options) { return { @@ -85389,7 +91867,7 @@ function resolveOptions(options) { }; } -// node_modules/.pnpm/@ark+util@0.56.0/node_modules/@ark/util/out/arrays.js +// ../node_modules/.pnpm/@ark+util@0.56.0/node_modules/@ark/util/out/arrays.js var liftArray = (data) => Array.isArray(data) ? data : [data]; var spliterate = (arr, predicate) => { const result = [[], []]; @@ -85402,7 +91880,7 @@ var spliterate = (arr, predicate) => { return result; }; var ReadonlyArray2 = Array; -var includes = (array, element) => array.includes(element); +var includes = (array4, element) => array4.includes(element); var range = (length, offset = 0) => [...new Array(length)].map((_, i) => i + offset); var append2 = (to, value2, opts) => { if (to === void 0) { @@ -85438,14 +91916,14 @@ var appendUnique = (to, value2, opts) => { to.push(v); return to; }; -var groupBy = (array, discriminant) => array.reduce((result, item) => { +var groupBy = (array4, discriminant) => array4.reduce((result, item) => { const key = item[discriminant]; result[key] = append2(result[key], item); return result; }, {}); var arrayEquals = (l, r, opts) => l.length === r.length && l.every(opts?.isEqual ? (lItem, i) => opts.isEqual(lItem, r[i]) : (lItem, i) => lItem === r[i]); -// node_modules/.pnpm/@ark+util@0.56.0/node_modules/@ark/util/out/domain.js +// ../node_modules/.pnpm/@ark+util@0.56.0/node_modules/@ark/util/out/domain.js var hasDomain2 = (data, kind) => domainOf2(data) === kind; var domainOf2 = (data) => { const builtinType = typeof data; @@ -85466,7 +91944,7 @@ var jsTypeOfDescriptions2 = { function: "a function" }; -// node_modules/.pnpm/@ark+util@0.56.0/node_modules/@ark/util/out/errors.js +// ../node_modules/.pnpm/@ark+util@0.56.0/node_modules/@ark/util/out/errors.js var InternalArktypeError = class extends Error { }; var throwInternalError2 = (message) => throwError(message, InternalArktypeError); @@ -85480,7 +91958,7 @@ var throwParseError2 = (message) => throwError(message, ParseError); var noSuggest2 = (s) => ` ${s}`; var ZeroWidthSpace2 = "\u200B"; -// node_modules/.pnpm/@ark+util@0.56.0/node_modules/@ark/util/out/flatMorph.js +// ../node_modules/.pnpm/@ark+util@0.56.0/node_modules/@ark/util/out/flatMorph.js var flatMorph2 = (o, flatMapEntry) => { const result = {}; const inputIsArray = Array.isArray(o); @@ -85503,7 +91981,7 @@ var flatMorph2 = (o, flatMapEntry) => { return outputShouldBeArray ? Object.values(result) : result; }; -// node_modules/.pnpm/@ark+util@0.56.0/node_modules/@ark/util/out/records.js +// ../node_modules/.pnpm/@ark+util@0.56.0/node_modules/@ark/util/out/records.js var entriesOf = Object.entries; var isKeyOf2 = (k, o) => k in o; var hasKey = (o, k) => k in o; @@ -85528,7 +92006,7 @@ var splitByKeys = (o, leftKeys) => { } return [l, r]; }; -var omit = (o, keys) => splitByKeys(o, keys)[1]; +var omit2 = (o, keys) => splitByKeys(o, keys)[1]; var isEmptyObject2 = (o) => Object.keys(o).length === 0; var stringAndSymbolicEntriesOf2 = (o) => [ ...Object.entries(o), @@ -85552,7 +92030,7 @@ var enumValues = (tsEnum) => Object.values(tsEnum).filter((v) => { return typeof tsEnum[v] !== "number"; }); -// node_modules/.pnpm/@ark+util@0.56.0/node_modules/@ark/util/out/objectKinds.js +// ../node_modules/.pnpm/@ark+util@0.56.0/node_modules/@ark/util/out/objectKinds.js var ecmascriptConstructors2 = { Array, Boolean, @@ -85610,7 +92088,7 @@ var objectKindOf2 = (data) => { return name; }; var objectKindOrDomainOf = (data) => typeof data === "object" && data !== null ? objectKindOf2(data) ?? "object" : domainOf2(data); -var isArray = Array.isArray; +var isArray2 = Array.isArray; var ecmascriptDescriptions2 = { Array: "an array", Function: "a function", @@ -85668,7 +92146,7 @@ var constructorExtends = (ctor, base) => { return false; }; -// node_modules/.pnpm/@ark+util@0.56.0/node_modules/@ark/util/out/clone.js +// ../node_modules/.pnpm/@ark+util@0.56.0/node_modules/@ark/util/out/clone.js var deepClone = (input) => _clone(input, /* @__PURE__ */ new Map()); var _clone = (input, seen) => { if (typeof input !== "object" || input === null) @@ -85695,8 +92173,8 @@ var _clone = (input, seen) => { return cloned; }; -// node_modules/.pnpm/@ark+util@0.56.0/node_modules/@ark/util/out/functions.js -var cached2 = (thunk) => { +// ../node_modules/.pnpm/@ark+util@0.56.0/node_modules/@ark/util/out/functions.js +var cached3 = (thunk) => { let result = unset2; return () => result === unset2 ? result = thunk() : result; }; @@ -85721,7 +92199,7 @@ var Callable = class { return Object.assign(Object.setPrototypeOf(fn2.bind(opts?.bind ?? this), this.constructor.prototype), opts?.attach); } }; -var envHasCsp2 = cached2(() => { +var envHasCsp2 = cached3(() => { try { return new Function("return false")(); } catch { @@ -85729,22 +92207,22 @@ var envHasCsp2 = cached2(() => { } }); -// node_modules/.pnpm/@ark+util@0.56.0/node_modules/@ark/util/out/generics.js +// ../node_modules/.pnpm/@ark+util@0.56.0/node_modules/@ark/util/out/generics.js var brand2 = noSuggest2("brand"); var inferred2 = noSuggest2("arkInferred"); -// node_modules/.pnpm/@ark+util@0.56.0/node_modules/@ark/util/out/hkt.js +// ../node_modules/.pnpm/@ark+util@0.56.0/node_modules/@ark/util/out/hkt.js var args2 = noSuggest2("args"); var Hkt = class { constructor() { } }; -// node_modules/.pnpm/@ark+util@0.56.0/node_modules/@ark/util/out/isomorphic.js +// ../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 error50 = new Error(); + const stackLine = error50.stack?.split("\n")[2]?.trim() || ""; const filePath = stackLine.match(/\(?(.+?)(?::\d+:\d+)?\)?$/)?.[1] || "unknown"; return filePath.replace(/^file:\/\//, ""); } catch { @@ -85757,7 +92235,7 @@ var isomorphic2 = { env: env2 }; -// node_modules/.pnpm/@ark+util@0.56.0/node_modules/@ark/util/out/strings.js +// ../node_modules/.pnpm/@ark+util@0.56.0/node_modules/@ark/util/out/strings.js var capitalize = (s) => s[0].toUpperCase() + s.slice(1); var uncapitalize = (s) => s[0].toLowerCase() + s.slice(1); var anchoredRegex2 = (regex4) => new RegExp(anchoredSource2(regex4), typeof regex4 === "string" ? "" : regex4.flags); @@ -85776,7 +92254,7 @@ var whitespaceChars2 = { " ": 1 }; -// node_modules/.pnpm/@ark+util@0.56.0/node_modules/@ark/util/out/numbers.js +// ../node_modules/.pnpm/@ark+util@0.56.0/node_modules/@ark/util/out/numbers.js var anchoredNegativeZeroPattern2 = /^-0\.?0*$/.source; var positiveIntegerPattern2 = /[1-9]\d*/.source; var looseDecimalPattern2 = /\.\d+/.source; @@ -85839,14 +92317,14 @@ var tryParseWellFormedBigint = (def) => { } }; -// node_modules/.pnpm/@ark+util@0.56.0/node_modules/@ark/util/out/registry.js +// ../node_modules/.pnpm/@ark+util@0.56.0/node_modules/@ark/util/out/registry.js var arkUtilVersion2 = "0.56.0"; var initialRegistryContents2 = { version: arkUtilVersion2, filename: isomorphic2.fileName(), FileConstructor: FileConstructor2 }; -var registry = initialRegistryContents2; +var registry2 = initialRegistryContents2; var namesByResolution = /* @__PURE__ */ new Map(); var nameCounts = /* @__PURE__ */ Object.create(null); var register2 = (value2) => { @@ -85858,7 +92336,7 @@ var register2 = (value2) => { name = `${name}${nameCounts[name]++}`; else nameCounts[name] = 1; - registry[name] = value2; + registry2[name] = value2; namesByResolution.set(value2, name); return name; }; @@ -85879,10 +92357,10 @@ var baseNameFor = (value2) => { return throwInternalError2(`Unexpected attempt to register serializable value of type ${domainOf2(value2)}`); }; -// node_modules/.pnpm/@ark+util@0.56.0/node_modules/@ark/util/out/primitive.js +// ../node_modules/.pnpm/@ark+util@0.56.0/node_modules/@ark/util/out/primitive.js var serializePrimitive2 = (value2) => typeof value2 === "string" ? JSON.stringify(value2) : typeof value2 === "bigint" ? `${value2}n` : `${value2}`; -// node_modules/.pnpm/@ark+util@0.56.0/node_modules/@ark/util/out/serialize.js +// ../node_modules/.pnpm/@ark+util@0.56.0/node_modules/@ark/util/out/serialize.js var snapshot = (data, opts = {}) => _serialize(data, { onUndefined: `$ark.undefined`, onBigInt: (n) => `$ark.bigint-${n}`, @@ -85973,20 +92451,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 = (date7) => { + const year = date7.getFullYear(); + const month = date7.getMonth(); + const dayOfMonth = date7.getDate(); + const hours = date7.getHours(); + const minutes = date7.getMinutes(); + const seconds = date7.getSeconds(); + const milliseconds = date7.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 = date7.toLocaleTimeString(); const suffix2 = timePortion.endsWith(" AM") || timePortion.endsWith(" PM") ? timePortion.slice(-3) : ""; if (suffix2) timePortion = timePortion.slice(0, -suffix2.length); @@ -86013,7 +92491,7 @@ var months = [ var timeWithUnnecessarySeconds = /:\d\d:00$/; var pad = (value2, length) => String(value2).padStart(length, "0"); -// node_modules/.pnpm/@ark+util@0.56.0/node_modules/@ark/util/out/path.js +// ../node_modules/.pnpm/@ark+util@0.56.0/node_modules/@ark/util/out/path.js var appendStringifiedKey = (path4, prop, ...[opts]) => { const stringifySymbol = opts?.stringifySymbol ?? printable2; let propAccessChain = path4; @@ -86071,7 +92549,7 @@ var ReadonlyPath = class extends ReadonlyArray2 { } }; -// node_modules/.pnpm/@ark+util@0.56.0/node_modules/@ark/util/out/scanner.js +// ../node_modules/.pnpm/@ark+util@0.56.0/node_modules/@ark/util/out/scanner.js var Scanner = class { chars; i; @@ -86156,21 +92634,21 @@ var Scanner = class { var writeUnmatchedGroupCloseMessage = (char, unscanned) => `Unmatched ${char}${unscanned === "" ? "" : ` before ${unscanned}`}`; var writeUnclosedGroupMessage = (missingChar) => `Missing ${missingChar}`; -// node_modules/.pnpm/@ark+util@0.56.0/node_modules/@ark/util/out/traits.js +// ../node_modules/.pnpm/@ark+util@0.56.0/node_modules/@ark/util/out/traits.js var implementedTraits2 = noSuggest2("implementedTraits"); -// node_modules/.pnpm/@ark+schema@0.56.0/node_modules/@ark/schema/out/shared/registry.js +// ../node_modules/.pnpm/@ark+schema@0.56.0/node_modules/@ark/schema/out/shared/registry.js var _registryName = "$ark"; var suffix = 2; while (_registryName in globalThis) _registryName = `$ark${suffix++}`; var registryName = _registryName; -globalThis[registryName] = registry; -var $ark = registry; +globalThis[registryName] = registry2; +var $ark = registry2; var reference = (name) => `${registryName}.${name}`; var registeredReference = (value2) => reference(register2(value2)); -// node_modules/.pnpm/@ark+schema@0.56.0/node_modules/@ark/schema/out/shared/compile.js +// ../node_modules/.pnpm/@ark+schema@0.56.0/node_modules/@ark/schema/out/shared/compile.js var CompiledFunction = class extends CastableBase { argNames; body = ""; @@ -86194,11 +92672,11 @@ var CompiledFunction = class extends CastableBase { this.indentation -= 4; return this; } - prop(key, optional = false) { - return compileLiteralPropAccess(key, optional); + prop(key, optional4 = false) { + return compileLiteralPropAccess(key, optional4); } - index(key, optional = false) { - return indexPropAccess(`${key}`, optional); + index(key, optional4 = false) { + return indexPropAccess(`${key}`, optional4); } line(statement) { ; @@ -86230,8 +92708,8 @@ var CompiledFunction = class extends CastableBase { return this.block(`for (let i = ${initialValue}; ${until}; i++)`, body); } /** Current key is "k" */ - forIn(object2, body) { - return this.block(`for (const k in ${object2})`, body); + forIn(object6, body) { + return this.block(`for (const k in ${object6})`, body); } block(prefix, contents, suffix2 = "") { this.line(`${prefix} {`); @@ -86251,13 +92729,13 @@ var CompiledFunction = class extends CastableBase { } }; var compileSerializedValue = (value2) => hasDomain2(value2, "object") || typeof value2 === "symbol" ? registeredReference(value2) : serializePrimitive2(value2); -var compileLiteralPropAccess = (key, optional = false) => { +var compileLiteralPropAccess = (key, optional4 = false) => { if (typeof key === "string" && isDotAccessible2(key)) - return `${optional ? "?" : ""}.${key}`; - return indexPropAccess(serializeLiteralKey(key), optional); + return `${optional4 ? "?" : ""}.${key}`; + return indexPropAccess(serializeLiteralKey(key), optional4); }; var serializeLiteralKey = (key) => typeof key === "symbol" ? registeredReference(key) : JSON.stringify(key); -var indexPropAccess = (key, optional = false) => `${optional ? "?." : ""}[${key}]`; +var indexPropAccess = (key, optional4 = false) => `${optional4 ? "?." : ""}[${key}]`; var NodeCompiler = class extends CompiledFunction { traversalKind; optimistic; @@ -86307,17 +92785,17 @@ var NodeCompiler = class extends CompiledFunction { } }; -// node_modules/.pnpm/@ark+schema@0.56.0/node_modules/@ark/schema/out/shared/utils.js +// ../node_modules/.pnpm/@ark+schema@0.56.0/node_modules/@ark/schema/out/shared/utils.js var makeRootAndArrayPropertiesMutable = (o) => ( // this cast should not be required, but it seems TS is referencing // the wrong parameters here? - flatMorph2(o, (k, v) => [k, isArray(v) ? [...v] : v]) + flatMorph2(o, (k, v) => [k, isArray2(v) ? [...v] : v]) ); var arkKind = noSuggest2("arkKind"); var hasArkKind = (value2, kind) => value2?.[arkKind] === kind; var isNode = (value2) => hasArkKind(value2, "root") || hasArkKind(value2, "constraint"); -// node_modules/.pnpm/@ark+schema@0.56.0/node_modules/@ark/schema/out/shared/implement.js +// ../node_modules/.pnpm/@ark+schema@0.56.0/node_modules/@ark/schema/out/shared/implement.js var basisKinds = ["unit", "proto", "domain"]; var structuralKinds = [ "required", @@ -86405,7 +92883,7 @@ var implementNode = (_) => { return implementation23; }; -// node_modules/.pnpm/@ark+schema@0.56.0/node_modules/@ark/schema/out/shared/toJsonSchema.js +// ../node_modules/.pnpm/@ark+schema@0.56.0/node_modules/@ark/schema/out/shared/toJsonSchema.js var ToJsonSchemaError = class extends Error { name = "ToJsonSchemaError"; code; @@ -86446,10 +92924,10 @@ var ToJsonSchema = { defaultConfig }; -// node_modules/.pnpm/@ark+schema@0.56.0/node_modules/@ark/schema/out/config.js +// ../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 = (config4) => { + const result = Object.assign($ark.config, mergeConfigs($ark.config, config4)); if ($ark.resolvedConfig) $ark.resolvedConfig = mergeConfigs($ark.resolvedConfig, result); return result; @@ -86525,7 +93003,7 @@ var mergeFallbacks = (base, merged) => { }; var normalizeFallback = (fallback) => typeof fallback === "function" ? { default: fallback } : fallback ?? {}; -// node_modules/.pnpm/@ark+schema@0.56.0/node_modules/@ark/schema/out/shared/errors.js +// ../node_modules/.pnpm/@ark+schema@0.56.0/node_modules/@ark/schema/out/shared/errors.js var ArkError = class _ArkError extends CastableBase { [arkKind] = "error"; path; @@ -86576,26 +93054,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 config4 = this.meta?.expected ?? this.nodeConfig.expected; + return typeof config4 === "function" ? config4(this.input) : config4; } 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 config4 = this.meta?.actual ?? this.nodeConfig.actual; + return typeof config4 === "function" ? config4(this.data) : config4; } 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 config4 = this.meta?.problem ?? this.nodeConfig.problem; + return typeof config4 === "function" ? config4(this) : config4; } 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 config4 = this.meta?.message ?? this.nodeConfig.message; + return typeof config4 === "function" ? config4(this) : config4; } get flat() { return this.hasCode("intersection") ? [...this.errors] : [this]; @@ -86667,25 +93145,25 @@ var ArkErrors = class _ArkErrors extends ReadonlyArray2 { /** * Append an ArkError to this array, ignoring duplicates. */ - add(error41) { - const existing = this.byPath[error41.propString]; + add(error50) { + const existing = this.byPath[error50.propString]; if (existing) { - if (error41 === existing) + if (error50 === 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 = error50.hasCode("union") && error50.errors.length === 0 ? error50 : new ArkError({ code: "intersection", - errors: existing.hasCode("intersection") ? [...existing.errors, error41] : [existing, error41] + errors: existing.hasCode("intersection") ? [...existing.errors, error50] : [existing, error50] }, 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[error50.propString] = errorIntersection; + this.addAncestorPaths(error50); } else { - this.byPath[error41.propString] = error41; - this.addAncestorPaths(error41); - this.mutable.push(error41); + this.byPath[error50.propString] = error50; + this.addAncestorPaths(error50); + this.mutable.push(error50); } this.count++; } @@ -86736,9 +93214,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(error50) { + for (const propString of error50.path.stringifyAncestors()) { + this.byAncestorPath[propString] = append2(this.byAncestorPath[propString], error50); } } }; @@ -86748,16 +93226,16 @@ 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((error50) => ` \u2022 ${indent(error50)}`).join("\n")); Object.defineProperty(this, "arkErrors", { value: errors, enumerable: false }); } }; -var indent = (error41) => error41.toString().split("\n").join("\n "); +var indent = (error50) => error50.toString().split("\n").join("\n "); -// node_modules/.pnpm/@ark+schema@0.56.0/node_modules/@ark/schema/out/shared/traversal.js +// ../node_modules/.pnpm/@ark+schema@0.56.0/node_modules/@ark/schema/out/shared/traversal.js var Traversal = class { /** * #### the path being validated or morphed @@ -86788,9 +93266,9 @@ var Traversal = class { queuedMorphs = []; branches = []; seen = {}; - constructor(root2, config2) { + constructor(root2, config4) { this.root = root2; - this.config = config2; + this.config = config4; } /** * #### the data being validated or morphed @@ -86891,12 +93369,12 @@ var Traversal = class { return this.errorFromContext(input); } errorFromContext(errCtx) { - const error41 = new ArkError(errCtx, this); + const error50 = new ArkError(errCtx, this); if (this.currentBranch) - this.currentBranch.error = error41; + this.currentBranch.error = error50; else - this.errors.add(error41); - return error41; + this.errors.add(error50); + return error50; } applyQueuedMorphs() { while (this.queuedMorphs.length) { @@ -86950,7 +93428,7 @@ var traverseKey = (key, fn2, ctx) => { return result; }; -// node_modules/.pnpm/@ark+schema@0.56.0/node_modules/@ark/schema/out/node.js +// ../node_modules/.pnpm/@ark+schema@0.56.0/node_modules/@ark/schema/out/node.js var BaseNode = class extends Callable { attachments; $; @@ -87040,10 +93518,10 @@ var BaseNode = class extends Callable { }; case "optimistic": this.contextFreeMorph = this.shallowMorphs[0]; - const clone2 = this.$.resolvedConfig.clone; + const clone4 = 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(clone4 && (typeof data === "object" && data !== null || typeof data === "function") ? clone4(data) : data); } const ctx = new Traversal(data, this.$.resolvedConfig); this.traverseApply(data, ctx); @@ -87103,7 +93581,7 @@ var BaseNode = class extends Callable { keySchemaImplementation.reduceIo(ioKind, ioInner, v); else if (keySchemaImplementation.child) { const childValue = v; - ioInner[k] = isArray(childValue) ? childValue.map((child) => ioKind === "in" ? child.rawIn : child.rawOut) : ioKind === "in" ? childValue.rawIn : childValue.rawOut; + ioInner[k] = isArray2(childValue) ? childValue.map((child) => ioKind === "in" ? child.rawIn : child.rawOut) : ioKind === "in" ? childValue.rawIn : childValue.rawOut; } else ioInner[k] = v; } @@ -87214,7 +93692,7 @@ var BaseNode = class extends Callable { if (!this.impl.keys[k].child) return [k, v]; const children = v; - if (!isArray(children)) { + if (!isArray2(children)) { const transformed2 = children._transform(mapper, ctx); return transformed2 ? [k, transformed2] : []; } @@ -87249,14 +93727,14 @@ var BaseNode = class extends Callable { } return transformedNode = $2.node(this.kind, transformedInner, ctx.parseOptions); } - configureReferences(meta, selector = "references") { + configureReferences(meta3, selector = "references") { const normalized = NodeSelector.normalize(selector); - const mapper = typeof meta === "string" ? (kind, inner) => ({ + const mapper = typeof meta3 === "string" ? (kind, inner) => ({ ...inner, - meta: { ...inner.meta, description: meta } - }) : typeof meta === "function" ? (kind, inner) => ({ ...inner, meta: meta(inner.meta) }) : (kind, inner) => ({ + meta: { ...inner.meta, description: meta3 } + }) : typeof meta3 === "function" ? (kind, inner) => ({ ...inner, meta: meta3(inner.meta) }) : (kind, inner) => ({ ...inner, - meta: { ...inner.meta, ...meta } + meta: { ...inner.meta, ...meta3 } }); if (normalized.boundary === "self") { return this.$.node(this.kind, mapper(this.kind, { ...this.inner, meta: this.meta })); @@ -87312,7 +93790,7 @@ var appendUniqueNodes = (existing, refs) => appendUnique(existing, refs, { isEqual: (l, r) => l.equals(r) }); -// node_modules/.pnpm/@ark+schema@0.56.0/node_modules/@ark/schema/out/shared/disjoint.js +// ../node_modules/.pnpm/@ark+schema@0.56.0/node_modules/@ark/schema/out/shared/disjoint.js var Disjoint = class _Disjoint extends Array { static init(kind, l, r, ctx) { return new _Disjoint({ @@ -87370,10 +93848,10 @@ var Disjoint = class _Disjoint extends Array { } }; var describeReasons = (l, r) => `${describeReason(l)} and ${describeReason(r)}`; -var describeReason = (value2) => isNode(value2) ? value2.expression : isArray(value2) ? value2.map(describeReason).join(" | ") || "never" : String(value2); +var describeReason = (value2) => isNode(value2) ? value2.expression : isArray2(value2) ? value2.map(describeReason).join(" | ") || "never" : String(value2); var writeUnsatisfiableExpressionError = (expression) => `${expression} results in an unsatisfiable type`; -// node_modules/.pnpm/@ark+schema@0.56.0/node_modules/@ark/schema/out/shared/intersections.js +// ../node_modules/.pnpm/@ark+schema@0.56.0/node_modules/@ark/schema/out/shared/intersections.js var intersectionCache = {}; var intersectNodesRoot = (l, r, $2) => intersectOrPipeNodes(l, r, { $: $2, @@ -87436,21 +93914,21 @@ var pipeMorphed = (from, to, ctx) => from.distribute((fromBranch) => _pipeMorphe return Disjoint.init("union", from.branches, to.branches); if (viableBranches.length < from.branches.length || !from.branches.every((branch, i) => branch.rawIn.equals(viableBranches[i].rawIn))) return ctx.$.parseSchema(viableBranches); - let meta; + let meta3; if (viableBranches.length === 1) { const onlyBranch = viableBranches[0]; - if (!meta) + if (!meta3) return onlyBranch; return ctx.$.node("morph", { ...onlyBranch.inner, - in: onlyBranch.rawIn.configure(meta, "self") + in: onlyBranch.rawIn.configure(meta3, "self") }); } const schema2 = { branches: viableBranches }; - if (meta) - schema2.meta = meta; + if (meta3) + schema2.meta = meta3; return ctx.$.parseSchema(schema2); }); var _pipeMorphed = (from, to, ctx) => { @@ -87484,7 +93962,7 @@ var _pipeMorphed = (from, to, ctx) => { }); }; -// node_modules/.pnpm/@ark+schema@0.56.0/node_modules/@ark/schema/out/constraint.js +// ../node_modules/.pnpm/@ark+schema@0.56.0/node_modules/@ark/schema/out/constraint.js var BaseConstraint = class extends BaseNode { constructor(attachments, $2) { super(attachments, $2); @@ -87523,7 +94001,7 @@ var InternalPrimitiveConstraint = class extends BaseConstraint { } }; var constraintKeyParser = (kind) => (schema2, ctx) => { - if (isArray(schema2)) { + if (isArray2(schema2)) { if (schema2.length === 0) { return; } @@ -87598,7 +94076,7 @@ var writeInvalidOperandMessage = (kind, expected, actual) => { return `${capitalize(kind)} operand must be ${expected.description} (was ${actualDescription})`; }; -// node_modules/.pnpm/@ark+schema@0.56.0/node_modules/@ark/schema/out/generic.js +// ../node_modules/.pnpm/@ark+schema@0.56.0/node_modules/@ark/schema/out/generic.js var parseGeneric = (paramDefs, bodyDef, $2) => new GenericRoot(paramDefs, bodyDef, $2, $2, null); var LazyGenericBody = class extends Callable { }; @@ -87668,7 +94146,7 @@ var GenericRoot = class extends Callable { }; var writeUnsatisfiedParameterConstraintMessage = (name, constraint, arg) => `${name} must be assignable to ${constraint} (was ${arg})`; -// node_modules/.pnpm/@ark+schema@0.56.0/node_modules/@ark/schema/out/predicate.js +// ../node_modules/.pnpm/@ark+schema@0.56.0/node_modules/@ark/schema/out/predicate.js var implementation = implementNode({ kind: "predicate", hasAssociatedError: true, @@ -87731,7 +94209,7 @@ var Predicate = { Node: PredicateNode }; -// node_modules/.pnpm/@ark+schema@0.56.0/node_modules/@ark/schema/out/refinements/divisor.js +// ../node_modules/.pnpm/@ark+schema@0.56.0/node_modules/@ark/schema/out/refinements/divisor.js var implementation2 = implementNode({ kind: "divisor", collapsibleKey: "rule", @@ -87783,7 +94261,7 @@ var greatestCommonDivisor = (l, r) => { return greatestCommonDivisor2; }; -// node_modules/.pnpm/@ark+schema@0.56.0/node_modules/@ark/schema/out/refinements/range.js +// ../node_modules/.pnpm/@ark+schema@0.56.0/node_modules/@ark/schema/out/refinements/range.js var BaseRange = class extends InternalPrimitiveConstraint { boundOperandKind = operandKindsByBoundKind[this.kind]; compiledActual = this.boundOperandKind === "value" ? `data` : this.boundOperandKind === "length" ? `data.length` : `data.valueOf()`; @@ -87866,7 +94344,7 @@ var compileComparator = (kind, exclusive) => `${isKeyOf2(kind, boundKindPairsByL var dateLimitToString = (limit) => typeof limit === "string" ? limit : new Date(limit).toLocaleString(); var writeUnboundableMessage = (root2) => `Bounded expression ${root2} must be exactly one of number, string, Array, or Date`; -// node_modules/.pnpm/@ark+schema@0.56.0/node_modules/@ark/schema/out/refinements/after.js +// ../node_modules/.pnpm/@ark+schema@0.56.0/node_modules/@ark/schema/out/refinements/after.js var implementation3 = implementNode({ kind: "after", collapsibleKey: "rule", @@ -87899,7 +94377,7 @@ var After = { Node: AfterNode }; -// node_modules/.pnpm/@ark+schema@0.56.0/node_modules/@ark/schema/out/refinements/before.js +// ../node_modules/.pnpm/@ark+schema@0.56.0/node_modules/@ark/schema/out/refinements/before.js var implementation4 = implementNode({ kind: "before", collapsibleKey: "rule", @@ -87933,7 +94411,7 @@ var Before = { Node: BeforeNode }; -// node_modules/.pnpm/@ark+schema@0.56.0/node_modules/@ark/schema/out/refinements/exactLength.js +// ../node_modules/.pnpm/@ark+schema@0.56.0/node_modules/@ark/schema/out/refinements/exactLength.js var implementation5 = implementNode({ kind: "exactLength", collapsibleKey: "rule", @@ -87980,7 +94458,7 @@ var ExactLength = { Node: ExactLengthNode }; -// node_modules/.pnpm/@ark+schema@0.56.0/node_modules/@ark/schema/out/refinements/max.js +// ../node_modules/.pnpm/@ark+schema@0.56.0/node_modules/@ark/schema/out/refinements/max.js var implementation6 = implementNode({ kind: "max", collapsibleKey: "rule", @@ -88019,7 +94497,7 @@ var Max = { Node: MaxNode }; -// node_modules/.pnpm/@ark+schema@0.56.0/node_modules/@ark/schema/out/refinements/maxLength.js +// ../node_modules/.pnpm/@ark+schema@0.56.0/node_modules/@ark/schema/out/refinements/maxLength.js var implementation7 = implementNode({ kind: "maxLength", collapsibleKey: "rule", @@ -88061,7 +94539,7 @@ var MaxLength = { Node: MaxLengthNode }; -// node_modules/.pnpm/@ark+schema@0.56.0/node_modules/@ark/schema/out/refinements/min.js +// ../node_modules/.pnpm/@ark+schema@0.56.0/node_modules/@ark/schema/out/refinements/min.js var implementation8 = implementNode({ kind: "min", collapsibleKey: "rule", @@ -88099,7 +94577,7 @@ var Min = { Node: MinNode }; -// node_modules/.pnpm/@ark+schema@0.56.0/node_modules/@ark/schema/out/refinements/minLength.js +// ../node_modules/.pnpm/@ark+schema@0.56.0/node_modules/@ark/schema/out/refinements/minLength.js var implementation9 = implementNode({ kind: "minLength", collapsibleKey: "rule", @@ -88144,7 +94622,7 @@ var MinLength = { Node: MinLengthNode }; -// node_modules/.pnpm/@ark+schema@0.56.0/node_modules/@ark/schema/out/refinements/kinds.js +// ../node_modules/.pnpm/@ark+schema@0.56.0/node_modules/@ark/schema/out/refinements/kinds.js var boundImplementationsByKind = { min: Min.implementation, max: Max.implementation, @@ -88164,7 +94642,7 @@ var boundClassesByKind = { before: Before.Node }; -// node_modules/.pnpm/@ark+schema@0.56.0/node_modules/@ark/schema/out/refinements/pattern.js +// ../node_modules/.pnpm/@ark+schema@0.56.0/node_modules/@ark/schema/out/refinements/pattern.js var implementation10 = implementNode({ kind: "pattern", collapsibleKey: "rule", @@ -88210,7 +94688,7 @@ var Pattern = { Node: PatternNode }; -// node_modules/.pnpm/@ark+schema@0.56.0/node_modules/@ark/schema/out/parse.js +// ../node_modules/.pnpm/@ark+schema@0.56.0/node_modules/@ark/schema/out/parse.js var schemaKindOf = (schema2, allowedKinds) => { const kind = discriminateRootKind(schema2); if (allowedKinds && !allowedKinds.includes(kind)) { @@ -88230,7 +94708,7 @@ var discriminateRootKind = (schema2) => { return throwParseError2(writeInvalidSchemaMessage(schema2)); if ("morphs" in schema2) return "morph"; - if ("branches" in schema2 || isArray(schema2)) + if ("branches" in schema2 || isArray2(schema2)) return "union"; if ("unit" in schema2) return "unit"; @@ -88247,7 +94725,7 @@ var discriminateRootKind = (schema2) => { }; var writeInvalidSchemaMessage = (schema2) => `${printable2(schema2)} is not a valid type schema`; var nodeCountsByPrefix = {}; -var serializeListableChild = (listableNode) => isArray(listableNode) ? listableNode.map((node2) => node2.collapsibleJson) : listableNode.collapsibleJson; +var serializeListableChild = (listableNode) => isArray2(listableNode) ? listableNode.map((node2) => node2.collapsibleJson) : listableNode.collapsibleJson; var nodesByRegisteredId = {}; $ark.nodesByRegisteredId = nodesByRegisteredId; var registerNodeId = (prefix) => { @@ -88259,11 +94737,11 @@ var parseNode = (ctx) => { const configuredSchema = impl.applyConfig?.(ctx.def, ctx.$.resolvedConfig) ?? ctx.def; const inner = {}; const { meta: metaSchema, ...innerSchema } = configuredSchema; - const meta = metaSchema === void 0 ? {} : typeof metaSchema === "string" ? { description: metaSchema } : metaSchema; + const meta3 = metaSchema === void 0 ? {} : typeof metaSchema === "string" ? { description: metaSchema } : metaSchema; const innerSchemaEntries = entriesOf(innerSchema).sort(([lKey], [rKey]) => isNodeKind(lKey) ? isNodeKind(rKey) ? precedenceOfKind(lKey) - precedenceOfKind(rKey) : 1 : isNodeKind(rKey) ? -1 : lKey < rKey ? -1 : 1).filter(([k, v]) => { if (k.startsWith("meta.")) { const metaKey = k.slice(5); - meta[metaKey] = v; + meta3[metaKey] = v; return false; } return true; @@ -88282,19 +94760,19 @@ var parseNode = (ctx) => { if (reduced) { if (reduced instanceof Disjoint) return reduced.throw(); - return withMeta(reduced, meta); + return withMeta(reduced, meta3); } } const node2 = createNode({ id: ctx.id, kind: ctx.kind, inner, - meta, + meta: meta3, $: ctx.$ }); return node2; }; -var createNode = ({ id, kind, inner, meta, $: $2, ignoreCache }) => { +var createNode = ({ id, kind, inner, meta: meta3, $: $2, ignoreCache }) => { const impl = nodeImplementationsByKind[kind]; const innerEntries = entriesOf(inner); const children = []; @@ -88305,7 +94783,7 @@ var createNode = ({ id, kind, inner, meta, $: $2, ignoreCache }) => { innerJson[k] = serialize(v); if (keyImpl.child === true) { const listableNode = v; - if (isArray(listableNode)) + if (isArray2(listableNode)) children.push(...listableNode); else children.push(listableNode); @@ -88314,22 +94792,22 @@ var createNode = ({ id, kind, inner, meta, $: $2, ignoreCache }) => { } if (impl.finalizeInnerJson) innerJson = impl.finalizeInnerJson(innerJson); - let json3 = { ...innerJson }; + let json4 = { ...innerJson }; let metaJson = {}; - if (!isEmptyObject2(meta)) { - metaJson = flatMorph2(meta, (k, v) => [ + if (!isEmptyObject2(meta3)) { + metaJson = flatMorph2(meta3, (k, v) => [ k, k === "examples" ? v : defaultValueSerializer(v) ]); - json3.meta = possiblyCollapse(metaJson, "description", true); + json4.meta = possiblyCollapse(metaJson, "description", true); } innerJson = possiblyCollapse(innerJson, impl.collapsibleKey, false); const innerHash = JSON.stringify({ kind, ...innerJson }); - json3 = possiblyCollapse(json3, impl.collapsibleKey, false); - const collapsibleJson = possiblyCollapse(json3, impl.collapsibleKey, true); - const hash = JSON.stringify({ kind, ...json3 }); - if ($2.nodesByHash[hash] && !ignoreCache) - return $2.nodesByHash[hash]; + json4 = possiblyCollapse(json4, impl.collapsibleKey, false); + const collapsibleJson = possiblyCollapse(json4, impl.collapsibleKey, true); + const hash2 = JSON.stringify({ kind, ...json4 }); + if ($2.nodesByHash[hash2] && !ignoreCache) + return $2.nodesByHash[hash2]; const attachments = { id, kind, @@ -88338,10 +94816,10 @@ var createNode = ({ id, kind, inner, meta, $: $2, ignoreCache }) => { innerEntries, innerJson, innerHash, - meta, + meta: meta3, metaJson, - json: json3, - hash, + json: json4, + hash: hash2, collapsibleJson, children }; @@ -88351,7 +94829,7 @@ var createNode = ({ id, kind, inner, meta, $: $2, ignoreCache }) => { attachments[k] = inner[k]; } const node2 = new nodeClassesByKind[kind](attachments, $2); - return $2.nodesByHash[hash] = node2; + return $2.nodesByHash[hash2] = node2; }; var withId = (node2, id) => { if (node2.id === id) @@ -88367,21 +94845,21 @@ var withId = (node2, id) => { ignoreCache: true }); }; -var withMeta = (node2, meta, id) => { +var withMeta = (node2, meta3, id) => { if (id && isNode(nodesByRegisteredId[id])) throwInternalError2(`Unexpected attempt to overwrite node id ${id}`); return createNode({ - id: id ?? registerNodeId(meta.alias ?? node2.kind), + id: id ?? registerNodeId(meta3.alias ?? node2.kind), kind: node2.kind, inner: node2.inner, - meta, + meta: meta3, $: node2.$ }); }; -var possiblyCollapse = (json3, toKey, allowPrimitive) => { - const collapsibleKeys = Object.keys(json3); +var possiblyCollapse = (json4, toKey, allowPrimitive) => { + const collapsibleKeys = Object.keys(json4); if (collapsibleKeys.length === 1 && collapsibleKeys[0] === toKey) { - const collapsed = json3[toKey]; + const collapsed = json4[toKey]; if (allowPrimitive) return collapsed; if ( @@ -88392,10 +94870,10 @@ var possiblyCollapse = (json3, toKey, allowPrimitive) => { return collapsed; } } - return json3; + return json4; }; -// node_modules/.pnpm/@ark+schema@0.56.0/node_modules/@ark/schema/out/structure/prop.js +// ../node_modules/.pnpm/@ark+schema@0.56.0/node_modules/@ark/schema/out/structure/prop.js var intersectProps = (l, r, ctx) => { if (l.key !== r.key) return null; @@ -88462,7 +94940,7 @@ var BaseProp = class extends BaseConstraint { }; var writeDefaultIntersectionMessage = (lValue, rValue) => `Invalid intersection of default values ${printable2(lValue)} & ${printable2(rValue)}`; -// node_modules/.pnpm/@ark+schema@0.56.0/node_modules/@ark/schema/out/structure/optional.js +// ../node_modules/.pnpm/@ark+schema@0.56.0/node_modules/@ark/schema/out/structure/optional.js var implementation11 = implementNode({ kind: "optional", hasAssociatedError: false, @@ -88502,7 +94980,7 @@ var OptionalNode = class extends BaseProp { const baseIn = super.rawIn; if (!this.hasDefault()) return baseIn; - return this.$.node("optional", omit(baseIn.inner, { default: true }), { + return this.$.node("optional", omit2(baseIn.inner, { default: true }), { prereduced: true }); } @@ -88568,7 +95046,7 @@ var writeNonPrimitiveNonFunctionDefaultValueMessage = (key) => { return `Non-primitive default ${keyDescription}must be specified as a function like () => ({my: 'object'})`; }; -// node_modules/.pnpm/@ark+schema@0.56.0/node_modules/@ark/schema/out/roots/root.js +// ../node_modules/.pnpm/@ark+schema@0.56.0/node_modules/@ark/schema/out/roots/root.js var BaseRoot = class extends BaseNode { constructor(attachments, $2) { super(attachments, $2); @@ -88760,14 +95238,14 @@ var BaseRoot = class extends BaseNode { }, { prereduced: true }); } overlaps(r) { - const intersection = this.intersect(r); - return !(intersection instanceof Disjoint); + const intersection4 = this.intersect(r); + return !(intersection4 instanceof Disjoint); } extends(r) { if (this.isNever()) return true; - const intersection = this.intersect(r); - return !(intersection instanceof Disjoint) && this.equals(intersection); + const intersection4 = this.intersect(r); + return !(intersection4 instanceof Disjoint) && this.equals(intersection4); } ifExtends(r) { return this.extends(r) ? this : void 0; @@ -88776,8 +95254,8 @@ var BaseRoot = class extends BaseNode { const rNode = this.$.parseDefinition(r); return rNode.extends(this); } - configure(meta, selector = "shallow") { - return this.configureReferences(meta, selector); + configure(meta3, selector = "shallow") { + return this.configureReferences(meta3, selector); } describe(description, selector = "shallow") { return this.configure({ description }, selector); @@ -88873,7 +95351,7 @@ var BaseRoot = class extends BaseNode { onUndeclaredKey(cfg) { const rule = typeof cfg === "string" ? cfg : cfg.rule; const deep = typeof cfg === "string" ? false : cfg.deep; - return this.$.finalize(this.transform((kind, inner) => kind === "structure" ? rule === "ignore" ? omit(inner, { undeclared: 1 }) : { ...inner, undeclared: rule } : inner, deep ? void 0 : { shouldTransform: (node2) => !includes(structuralKinds, node2.kind) })); + return this.$.finalize(this.transform((kind, inner) => kind === "structure" ? rule === "ignore" ? omit2(inner, { undeclared: 1 }) : { ...inner, undeclared: rule } : inner, deep ? void 0 : { shouldTransform: (node2) => !includes(structuralKinds, node2.kind) })); } hasEqualMorphs(r) { if (!this.includesTransform && !r.includesTransform) @@ -88968,13 +95446,13 @@ var writeLiteralUnionEntriesMessage = (expression) => `Props cannot be extracted ${expression}`; var writeNonStructuralOperandMessage = (operation, operand) => `${operation} operand must be an object (was ${operand})`; -// node_modules/.pnpm/@ark+schema@0.56.0/node_modules/@ark/schema/out/roots/utils.js +// ../node_modules/.pnpm/@ark+schema@0.56.0/node_modules/@ark/schema/out/roots/utils.js var defineRightwardIntersections = (kind, implementation23) => flatMorph2(schemaKindsRightOf(kind), (i, kind2) => [ kind2, implementation23 ]); -// node_modules/.pnpm/@ark+schema@0.56.0/node_modules/@ark/schema/out/roots/alias.js +// ../node_modules/.pnpm/@ark+schema@0.56.0/node_modules/@ark/schema/out/roots/alias.js var normalizeAliasSchema = (schema2) => typeof schema2 === "string" ? { reference: schema2 } : schema2; var neverIfDisjoint = (result) => result instanceof Disjoint ? $ark.intrinsic.never.internal : result; var implementation12 = implementNode({ @@ -89081,7 +95559,7 @@ var Alias = { Node: AliasNode }; -// node_modules/.pnpm/@ark+schema@0.56.0/node_modules/@ark/schema/out/roots/basis.js +// ../node_modules/.pnpm/@ark+schema@0.56.0/node_modules/@ark/schema/out/roots/basis.js var InternalBasis = class extends BaseRoot { traverseApply = (data, ctx) => { if (!this.traverseAllows(data, ctx)) @@ -89107,7 +95585,7 @@ var InternalBasis = class extends BaseRoot { } }; -// node_modules/.pnpm/@ark+schema@0.56.0/node_modules/@ark/schema/out/roots/domain.js +// ../node_modules/.pnpm/@ark+schema@0.56.0/node_modules/@ark/schema/out/roots/domain.js var implementation13 = implementNode({ kind: "domain", hasAssociatedError: true, @@ -89117,7 +95595,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, config4) => schema2.numberAllowsNaN === void 0 && schema2.domain === "number" && config4.numberAllowsNaN ? { ...schema2, numberAllowsNaN: true } : schema2, defaults: { description: (node2) => domainDescriptions2[node2.domain], actual: (data) => Number.isNaN(data) ? "NaN" : domainDescriptions2[domainOf2(data)] @@ -89161,7 +95639,7 @@ var Domain = { writeBadAllowNanMessage: (actual) => `numberAllowsNaN may only be specified with domain "number" (was ${actual})` }; -// node_modules/.pnpm/@ark+schema@0.56.0/node_modules/@ark/schema/out/roots/intersection.js +// ../node_modules/.pnpm/@ark+schema@0.56.0/node_modules/@ark/schema/out/roots/intersection.js var implementation14 = implementNode({ kind: "intersection", hasAssociatedError: true, @@ -89422,7 +95900,7 @@ var intersectIntersections = (l, r, ctx) => { }); }; -// node_modules/.pnpm/@ark+schema@0.56.0/node_modules/@ark/schema/out/roots/morph.js +// ../node_modules/.pnpm/@ark+schema@0.56.0/node_modules/@ark/schema/out/roots/morph.js var implementation15 = implementNode({ kind: "morph", hasAssociatedError: false, @@ -89558,7 +96036,7 @@ var writeMorphIntersectionMessage = (lDescription, rDescription) => `The interse Left: ${lDescription} Right: ${rDescription}`; -// node_modules/.pnpm/@ark+schema@0.56.0/node_modules/@ark/schema/out/roots/proto.js +// ../node_modules/.pnpm/@ark+schema@0.56.0/node_modules/@ark/schema/out/roots/proto.js var implementation16 = implementNode({ kind: "proto", hasAssociatedError: true, @@ -89577,8 +96055,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, config4) => { + if (schema2.dateAllowsInvalid === void 0 && schema2.proto === Date && config4.dateAllowsInvalid) return { ...schema2, dateAllowsInvalid: true }; return schema2; }, @@ -89634,7 +96112,7 @@ var Proto = { writeInvalidSchemaMessage: (actual) => `instanceOf operand must be a function (was ${domainOf2(actual)})` }; -// node_modules/.pnpm/@ark+schema@0.56.0/node_modules/@ark/schema/out/roots/union.js +// ../node_modules/.pnpm/@ark+schema@0.56.0/node_modules/@ark/schema/out/roots/union.js var implementation17 = implementNode({ kind: "union", hasAssociatedError: true, @@ -89669,7 +96147,7 @@ var implementation17 = implementNode({ } } }, - normalize: (schema2) => isArray(schema2) ? { branches: schema2 } : schema2, + normalize: (schema2) => isArray2(schema2) ? { branches: schema2 } : schema2, reduce: (inner, $2) => { const reducedBranches = reduceBranches(inner); if (reducedBranches.length === 1) @@ -90170,14 +96648,14 @@ var reduceBranches = ({ branches, ordered }) => { uniquenessByIndex[j] = false; continue; } - const intersection = intersectNodesRoot(branches[i].rawIn, branches[j].rawIn, branches[0].$); - if (intersection instanceof Disjoint) + const intersection4 = intersectNodesRoot(branches[i].rawIn, branches[j].rawIn, branches[0].$); + if (intersection4 instanceof Disjoint) continue; if (!ordered) assertDeterminateOverlap(branches[i], branches[j]); - if (intersection.equals(branches[i].rawIn)) { + if (intersection4.equals(branches[i].rawIn)) { uniquenessByIndex[i] = !!ordered; - } else if (intersection.equals(branches[j].rawIn)) + } else if (intersection4.equals(branches[j].rawIn)) uniquenessByIndex[j] = false; } } @@ -90218,7 +96696,7 @@ var writeOrderedIntersectionMessage = (lDescription, rDescription) => `The inter Left: ${lDescription} Right: ${rDescription}`; -// node_modules/.pnpm/@ark+schema@0.56.0/node_modules/@ark/schema/out/roots/unit.js +// ../node_modules/.pnpm/@ark+schema@0.56.0/node_modules/@ark/schema/out/roots/unit.js var implementation18 = implementNode({ kind: "unit", hasAssociatedError: true, @@ -90282,7 +96760,7 @@ var compileEqualityCheck = (unit, serializedValue, negated) => { return `data ${negated ? "!" : "="}== ${serializedValue}`; }; -// node_modules/.pnpm/@ark+schema@0.56.0/node_modules/@ark/schema/out/structure/index.js +// ../node_modules/.pnpm/@ark+schema@0.56.0/node_modules/@ark/schema/out/structure/index.js var implementation19 = implementNode({ kind: "index", hasAssociatedError: false, @@ -90359,7 +96837,7 @@ var Index = { var writeEnumerableIndexBranches = (keys) => `Index keys ${keys.join(", ")} should be specified as named props.`; var writeInvalidPropertyKeyMessage = (indexSchema) => `Indexed key definition '${indexSchema}' must be a string or symbol`; -// node_modules/.pnpm/@ark+schema@0.56.0/node_modules/@ark/schema/out/structure/required.js +// ../node_modules/.pnpm/@ark+schema@0.56.0/node_modules/@ark/schema/out/structure/required.js var implementation20 = implementNode({ kind: "required", hasAssociatedError: true, @@ -90397,7 +96875,7 @@ var Required = { Node: RequiredNode }; -// node_modules/.pnpm/@ark+schema@0.56.0/node_modules/@ark/schema/out/structure/sequence.js +// ../node_modules/.pnpm/@ark+schema@0.56.0/node_modules/@ark/schema/out/structure/sequence.js var implementation21 = implementNode({ kind: "sequence", hasAssociatedError: false, @@ -90713,25 +97191,25 @@ var Sequence = { Node: SequenceNode }; var sequenceInnerToTuple = (inner) => { - const tuple = []; + const tuple2 = []; if (inner.prefix) for (const node2 of inner.prefix) - tuple.push({ kind: "prefix", node: node2 }); + tuple2.push({ kind: "prefix", node: node2 }); if (inner.defaultables) { for (const [node2, defaultValue] of inner.defaultables) - tuple.push({ kind: "defaultables", node: node2, default: defaultValue }); + tuple2.push({ kind: "defaultables", node: node2, default: defaultValue }); } if (inner.optionals) for (const node2 of inner.optionals) - tuple.push({ kind: "optionals", node: node2 }); + tuple2.push({ kind: "optionals", node: node2 }); if (inner.variadic) - tuple.push({ kind: "variadic", node: inner.variadic }); + tuple2.push({ kind: "variadic", node: inner.variadic }); if (inner.postfix) for (const node2 of inner.postfix) - tuple.push({ kind: "postfix", node: node2 }); - return tuple; + tuple2.push({ kind: "postfix", node: node2 }); + return tuple2; }; -var sequenceTupleToInner = (tuple) => tuple.reduce((result, element) => { +var sequenceTupleToInner = (tuple2) => tuple2.reduce((result, element) => { if (element.kind === "variadic") result.variadic = element.node; else if (element.kind === "defaultables") { @@ -90816,7 +97294,7 @@ var _intersectSequences = (s) => { }; var elementIsRequired = (el) => el.kind === "prefix" || el.kind === "postfix"; -// node_modules/.pnpm/@ark+schema@0.56.0/node_modules/@ark/schema/out/structure/structure.js +// ../node_modules/.pnpm/@ark+schema@0.56.0/node_modules/@ark/schema/out/structure/structure.js var createStructuralWriter = (childStringProp) => (node2) => { if (node2.props.length || node2.index) { const parts = node2.index?.map((index) => index[childStringProp]) ?? []; @@ -90848,11 +97326,11 @@ var implementation22 = implementNode({ kind: "structure", hasAssociatedError: false, normalize: (schema2) => schema2, - applyConfig: (schema2, config2) => { - if (!schema2.undeclared && config2.onUndeclaredKey !== "ignore") { + applyConfig: (schema2, config4) => { + if (!schema2.undeclared && config4.onUndeclaredKey !== "ignore") { return { ...schema2, - undeclared: config2.onUndeclaredKey + undeclared: config4.onUndeclaredKey }; } return schema2; @@ -91000,9 +97478,9 @@ var implementation22 = implementNode({ seen[requiredProp.key] = true; if (inner.index) { for (const index of inner.index) { - const intersection = intersectPropsAndIndex(requiredProp, index, $2); - if (intersection instanceof Disjoint) - return intersection; + const intersection4 = intersectPropsAndIndex(requiredProp, index, $2); + if (intersection4 instanceof Disjoint) + return intersection4; } } } @@ -91015,11 +97493,11 @@ var implementation22 = implementNode({ seen[optionalProp.key] = true; if (inner.index) { for (const index of inner.index) { - const intersection = intersectPropsAndIndex(optionalProp, index, $2); - if (intersection instanceof Disjoint) - return intersection; - if (intersection !== null) { - newOptionalProps[i] = intersection; + const intersection4 = intersectPropsAndIndex(optionalProp, index, $2); + if (intersection4 instanceof Disjoint) + return intersection4; + if (intersection4 !== null) { + newOptionalProps[i] = intersection4; updated = true; } } @@ -91076,11 +97554,11 @@ var StructureNode = class extends BaseConstraint { } get(indexer, ...path4) { let value2; - let required2 = false; + let required4 = false; const key = indexerToKey(indexer); if ((typeof key === "string" || typeof key === "symbol") && this.propsByKey[key]) { value2 = this.propsByKey[key].value; - required2 = this.propsByKey[key].required; + required4 = this.propsByKey[key].required; } if (this.index) { for (const n of this.index) { @@ -91097,7 +97575,7 @@ var StructureNode = class extends BaseConstraint { if (index < this.sequence.prevariadic.length) { const fixedElement = this.sequence.prevariadic[index].node; value2 = value2?.and(fixedElement) ?? fixedElement; - required2 ||= index < this.sequence.prefixLength; + required4 ||= index < this.sequence.prefixLength; } else if (this.sequence.variadic) { const nonFixedElement = this.$.node("union", this.sequence.variadicOrPostfix); value2 = value2?.and(nonFixedElement) ?? nonFixedElement; @@ -91111,7 +97589,7 @@ var StructureNode = class extends BaseConstraint { return throwParseError2(writeInvalidKeysMessage(this.expression, [key])); } const result = value2.get(...path4); - return required2 ? result : result.or($ark.intrinsic.undefined); + return required4 ? result : result.or($ark.intrinsic.undefined); } pick(...keys) { this.assertHasKeys(keys); @@ -91122,14 +97600,14 @@ var StructureNode = class extends BaseConstraint { return this.$.node("structure", this.filterKeys("omit", keys)); } optionalize() { - const { required: required2, ...inner } = this.inner; + const { required: required4, ...inner } = this.inner; return this.$.node("structure", { ...inner, optional: this.props.map((prop) => prop.hasKind("required") ? this.$.node("optional", prop.inner) : prop) }); } require() { - const { optional, ...inner } = this.inner; + const { optional: optional4, ...inner } = this.inner; return this.$.node("structure", { ...inner, required: this.props.map((prop) => prop.hasKind("optional") ? { @@ -91498,7 +97976,7 @@ var typeKeyToString = (k) => hasArkKind(k, "root") ? k.expression : printable2(k var writeInvalidKeysMessage = (o, keys) => `Key${keys.length === 1 ? "" : "s"} ${keys.map(typeKeyToString).join(", ")} ${keys.length === 1 ? "does" : "do"} not exist on ${o}`; var writeDuplicateKeyMessage = (key) => `Duplicate key ${compileSerializedValue(key)}`; -// node_modules/.pnpm/@ark+schema@0.56.0/node_modules/@ark/schema/out/kinds.js +// ../node_modules/.pnpm/@ark+schema@0.56.0/node_modules/@ark/schema/out/kinds.js var nodeImplementationsByKind = { ...boundImplementationsByKind, alias: Alias.implementation, @@ -91551,7 +98029,7 @@ var nodeClassesByKind = { structure: Structure.Node }; -// node_modules/.pnpm/@ark+schema@0.56.0/node_modules/@ark/schema/out/module.js +// ../node_modules/.pnpm/@ark+schema@0.56.0/node_modules/@ark/schema/out/module.js var RootModule = class extends DynamicBase { // ensure `[arkKind]` is non-enumerable so it doesn't get spread on import/export get [arkKind]() { @@ -91563,8 +98041,8 @@ var bindModule = (module, $2) => new RootModule(flatMorph2(module, (alias, value hasArkKind(value2, "module") ? bindModule(value2, $2) : $2.bindReference(value2) ])); -// node_modules/.pnpm/@ark+schema@0.56.0/node_modules/@ark/schema/out/scope.js -var schemaBranchesOf = (schema2) => isArray(schema2) ? schema2 : "branches" in schema2 && isArray(schema2.branches) ? schema2.branches : void 0; +// ../node_modules/.pnpm/@ark+schema@0.56.0/node_modules/@ark/schema/out/scope.js +var schemaBranchesOf = (schema2) => isArray2(schema2) ? schema2 : "branches" in schema2 && isArray2(schema2.branches) ? schema2.branches : void 0; var throwMismatchedNodeRootError = (expected, actual) => throwParseError2(`Node of kind ${actual} is not valid as a ${expected} definition`); var writeDuplicateAliasError = (alias) => `#${alias} duplicates public alias ${alias}`; var scopesByName = {}; @@ -91627,9 +98105,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, config4) { + this.config = mergeConfigs($ark.config, config4); + this.resolvedConfig = mergeConfigs($ark.resolvedConfig, config4); this.name = this.resolvedConfig.name ?? `anonymousScope${Object.keys(scopesByName).length}`; if (this.name in scopesByName) throwParseError2(`A Scope already named ${this.name} already exists`); @@ -91779,11 +98257,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 cached6 = this.resolutions[name]; + if (cached6) { + if (typeof cached6 !== "string") + return this.bindReference(cached6); + const v = nodesByRegisteredId[cached6]; if (hasArkKind(v, "root")) return this.resolutions[name] = v; if (hasArkKind(v, "context")) { @@ -91800,7 +98278,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 ${cached6}: ${printable2(v)}`); } let def = this.aliases[name] ?? this.ambient?.[name]; if (!def) @@ -91948,7 +98426,7 @@ var maybeResolveSubalias = (base, name) => { } throwInternalError2(`Unexpected resolution for alias '${name}': ${printable2(resolution)}`); }; -var schemaScope = (aliases, config2) => new SchemaScope(aliases, config2); +var schemaScope = (aliases, config4) => new SchemaScope(aliases, config4); var rootSchemaScope = new SchemaScope({}); var resolutionsOfModule = ($2, typeSet) => { const result = {}; @@ -91974,12 +98452,12 @@ var node = rootSchemaScope.node; var defineSchema = rootSchemaScope.defineSchema; var genericNode = rootSchemaScope.generic; -// node_modules/.pnpm/@ark+schema@0.56.0/node_modules/@ark/schema/out/structure/shared.js +// ../node_modules/.pnpm/@ark+schema@0.56.0/node_modules/@ark/schema/out/structure/shared.js var arrayIndexSource = `^(?:0|[1-9]\\d*)$`; var arrayIndexMatcher = new RegExp(arrayIndexSource); var arrayIndexMatcherReference = registeredReference(arrayIndexMatcher); -// node_modules/.pnpm/@ark+schema@0.56.0/node_modules/@ark/schema/out/intrinsic.js +// ../node_modules/.pnpm/@ark+schema@0.56.0/node_modules/@ark/schema/out/intrinsic.js var intrinsicBases = schemaScope({ bigint: "bigint", // since we know this won't be reduced, it can be safely cast to a union @@ -92033,17 +98511,17 @@ var intrinsic = { }; $ark.intrinsic = { ...intrinsic }; -// node_modules/.pnpm/arkregex@0.0.4/node_modules/arkregex/out/regex.js +// ../node_modules/.pnpm/arkregex@0.0.4/node_modules/arkregex/out/regex.js var regex = ((src, flags) => new RegExp(src, flags)); Object.assign(regex, { as: regex }); -// node_modules/.pnpm/arktype@2.1.28/node_modules/arktype/out/config.js +// ../node_modules/.pnpm/arktype@2.1.28/node_modules/arktype/out/config.js var configure = configureSchema; -// node_modules/.pnpm/arktype@2.1.28/node_modules/arktype/out/parser/shift/operand/date.js +// ../node_modules/.pnpm/arktype@2.1.28/node_modules/arktype/out/parser/shift/operand/date.js var isDateLiteral = (value2) => typeof value2 === "string" && value2[0] === "d" && (value2[1] === "'" || value2[1] === '"') && value2[value2.length - 1] === value2[1]; var isValidDate = (d) => d.toString() !== "Invalid Date"; -var extractDateLiteralSource = (literal) => literal.slice(2, -1); +var extractDateLiteralSource = (literal4) => literal4.slice(2, -1); var writeInvalidDateMessage = (source) => `'${source}' could not be parsed by the Date constructor`; var tryParseDate = (source, errorOnFail) => maybeParseDate(source, errorOnFail); var maybeParseDate = (source, errorOnFail) => { @@ -92059,7 +98537,7 @@ var maybeParseDate = (source, errorOnFail) => { return errorOnFail ? throwParseError2(errorOnFail === true ? writeInvalidDateMessage(source) : errorOnFail) : void 0; }; -// node_modules/.pnpm/arktype@2.1.28/node_modules/arktype/out/parser/shift/operand/enclosed.js +// ../node_modules/.pnpm/arktype@2.1.28/node_modules/arktype/out/parser/shift/operand/enclosed.js var regexExecArray = rootSchema({ proto: "Array", sequence: "string", @@ -92094,8 +98572,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 date7 = tryParseDate(enclosed, writeInvalidDateMessage(enclosed)); + s.root = s.ctx.$.node("unit", { meta: enclosed, unit: date7 }); } }; var enclosingQuote = { @@ -92133,12 +98611,12 @@ var enclosingCharDescriptions = { }; var writeUnterminatedEnclosedMessage = (fragment, enclosingStart) => `${enclosingStart}${fragment} requires a closing ${enclosingCharDescriptions[enclosingTokens[enclosingStart]]}`; -// node_modules/.pnpm/arktype@2.1.28/node_modules/arktype/out/parser/ast/validate.js +// ../node_modules/.pnpm/arktype@2.1.28/node_modules/arktype/out/parser/ast/validate.js var writePrefixedPrivateReferenceMessage = (name) => `Private type references should not include '#'. Use '${name}' instead.`; var shallowOptionalMessage = "Optional definitions like 'string?' are only valid as properties in an object or tuple"; var shallowDefaultableMessage = "Defaultable definitions like 'number = 0' are only valid as properties in an object or tuple"; -// node_modules/.pnpm/arktype@2.1.28/node_modules/arktype/out/parser/shift/tokens.js +// ../node_modules/.pnpm/arktype@2.1.28/node_modules/arktype/out/parser/shift/tokens.js var terminatingChars = { "<": 1, ">": 1, @@ -92160,7 +98638,7 @@ var lookaheadIsFinalizing = (lookahead, unscanned) => lookahead === ">" ? unscan unscanned[1] === "=" ) : unscanned.trimStart() === "" || isKeyOf2(unscanned.trimStart()[0], terminatingChars) : lookahead === "=" ? unscanned[0] !== "=" : lookahead === "," || lookahead === "?"; -// node_modules/.pnpm/arktype@2.1.28/node_modules/arktype/out/parser/shift/operand/genericArgs.js +// ../node_modules/.pnpm/arktype@2.1.28/node_modules/arktype/out/parser/shift/operand/genericArgs.js var parseGenericArgs = (name, g, s) => _parseGenericArgs(name, g, s, []); var _parseGenericArgs = (name, g, s, argNodes) => { const argState = s.parseUntilFinalizer(); @@ -92177,7 +98655,7 @@ var _parseGenericArgs = (name, g, s, argNodes) => { }; var writeInvalidGenericArgCountMessage = (name, params, argDefs) => `${name}<${params.join(", ")}> requires exactly ${params.length} args (got ${argDefs.length}${argDefs.length === 0 ? "" : `: ${argDefs.join(", ")}`})`; -// node_modules/.pnpm/arktype@2.1.28/node_modules/arktype/out/parser/shift/operand/unenclosed.js +// ../node_modules/.pnpm/arktype@2.1.28/node_modules/arktype/out/parser/shift/operand/unenclosed.js var parseUnenclosed = (s) => { const token = s.scanner.shiftUntilLookahead(terminatingChars); if (token === "keyof") @@ -92225,10 +98703,10 @@ var writeMissingOperandMessage = (s) => { var writeMissingRightOperandMessage = (token, unscanned = "") => `Token '${token}' requires a right operand${unscanned ? ` before '${unscanned}'` : ""}`; var writeExpressionExpectedMessage = (unscanned) => `Expected an expression${unscanned ? ` before '${unscanned}'` : ""}`; -// node_modules/.pnpm/arktype@2.1.28/node_modules/arktype/out/parser/shift/operand/operand.js +// ../node_modules/.pnpm/arktype@2.1.28/node_modules/arktype/out/parser/shift/operand/operand.js var parseOperand = (s) => s.scanner.lookahead === "" ? s.error(writeMissingOperandMessage(s)) : s.scanner.lookahead === "(" ? s.shiftedBy(1).reduceGroupOpen() : s.scanner.lookaheadIsIn(enclosingChar) ? parseEnclosed(s, s.scanner.shift()) : s.scanner.lookaheadIsIn(whitespaceChars2) ? parseOperand(s.shiftedBy(1)) : s.scanner.lookahead === "d" ? s.scanner.nextLookahead in enclosingQuote ? parseEnclosed(s, `${s.scanner.shift()}${s.scanner.shift()}`) : parseUnenclosed(s) : s.scanner.lookahead === "x" ? s.scanner.nextLookahead === "/" ? s.shiftedBy(2) && parseEnclosed(s, "x/") : parseUnenclosed(s) : parseUnenclosed(s); -// node_modules/.pnpm/arktype@2.1.28/node_modules/arktype/out/parser/reduce/shared.js +// ../node_modules/.pnpm/arktype@2.1.28/node_modules/arktype/out/parser/reduce/shared.js var minComparators = { ">": true, ">=": true @@ -92248,7 +98726,7 @@ var writeOpenRangeMessage = (min, comparator) => `Left bounds are only valid whe var writeUnpairableComparatorMessage = (comparator) => `Left-bounded expressions must specify their limits using < or <= (was ${comparator})`; var writeMultipleLeftBoundsMessage = (openLimit, openComparator, limit, comparator) => `An expression may have at most one left bound (parsed ${openLimit}${invertedComparators[openComparator]}, ${limit}${invertedComparators[comparator]})`; -// node_modules/.pnpm/arktype@2.1.28/node_modules/arktype/out/parser/shift/operator/bounds.js +// ../node_modules/.pnpm/arktype@2.1.28/node_modules/arktype/out/parser/shift/operator/bounds.js var parseBound = (s, start) => { const comparator = shiftComparator(s, start); if (s.root.hasKind("unit")) { @@ -92258,9 +98736,9 @@ var parseBound = (s, start) => { return; } if (s.root.unit instanceof Date) { - const literal = `d'${s.root.description ?? s.root.unit.toISOString()}'`; + const literal4 = `d'${s.root.description ?? s.root.unit.toISOString()}'`; s.unsetRoot(); - s.reduceLeftBound(literal, comparator); + s.reduceLeftBound(literal4, comparator); return; } } @@ -92319,14 +98797,14 @@ var parseRightBound = (s, comparator) => { }; var writeInvalidLimitMessage = (comparator, limit, boundKind) => `Comparator ${boundKind === "left" ? invertedComparators[comparator] : comparator} must be ${boundKind === "left" ? "preceded" : "followed"} by a corresponding literal (was ${limit})`; -// node_modules/.pnpm/arktype@2.1.28/node_modules/arktype/out/parser/shift/operator/brand.js +// ../node_modules/.pnpm/arktype@2.1.28/node_modules/arktype/out/parser/shift/operator/brand.js var parseBrand = (s) => { s.scanner.shiftUntilNonWhitespace(); const brandName = s.scanner.shiftUntilLookahead(terminatingChars); s.root = s.root.brand(brandName); }; -// node_modules/.pnpm/arktype@2.1.28/node_modules/arktype/out/parser/shift/operator/divisor.js +// ../node_modules/.pnpm/arktype@2.1.28/node_modules/arktype/out/parser/shift/operator/divisor.js var parseDivisor = (s) => { s.scanner.shiftUntilNonWhitespace(); const divisorToken = s.scanner.shiftUntilLookahead(terminatingChars); @@ -92339,7 +98817,7 @@ var parseDivisor = (s) => { }; var writeInvalidDivisorMessage = (divisor) => `% operator must be followed by a non-zero integer literal (was ${divisor})`; -// node_modules/.pnpm/arktype@2.1.28/node_modules/arktype/out/parser/shift/operator/operator.js +// ../node_modules/.pnpm/arktype@2.1.28/node_modules/arktype/out/parser/shift/operator/operator.js var parseOperator = (s) => { const lookahead = s.scanner.shift(); return lookahead === "" ? s.finalize("") : lookahead === "[" ? s.scanner.shift() === "]" ? s.setRoot(s.root.array()) : s.error(incompleteArrayTokenMessage) : lookahead === "|" ? s.scanner.lookahead === ">" ? s.shiftedBy(1).pushRootToBranch("|>") : s.pushRootToBranch(lookahead) : lookahead === "&" ? s.pushRootToBranch(lookahead) : lookahead === ")" ? s.finalizeGroup() : lookaheadIsFinalizing(lookahead, s.scanner.unscanned) ? s.finalize(lookahead) : isKeyOf2(lookahead, comparatorStartChars) ? parseBound(s, lookahead) : lookahead === "%" ? parseDivisor(s) : lookahead === "#" ? parseBrand(s) : lookahead in whitespaceChars2 ? parseOperator(s) : s.error(writeUnexpectedCharacterMessage(lookahead)); @@ -92347,7 +98825,7 @@ var parseOperator = (s) => { var writeUnexpectedCharacterMessage = (char, shouldBe = "") => `'${char}' is not allowed here${shouldBe && ` (should be ${shouldBe})`}`; var incompleteArrayTokenMessage = `Missing expected ']'`; -// node_modules/.pnpm/arktype@2.1.28/node_modules/arktype/out/parser/shift/operator/default.js +// ../node_modules/.pnpm/arktype@2.1.28/node_modules/arktype/out/parser/shift/operator/default.js var parseDefault = (s) => { const baseNode = s.unsetRoot(); s.parseOperand(); @@ -92359,7 +98837,7 @@ var parseDefault = (s) => { }; var writeNonLiteralDefaultMessage = (defaultDef) => `Default value '${defaultDef}' must be a literal value`; -// node_modules/.pnpm/arktype@2.1.28/node_modules/arktype/out/parser/string.js +// ../node_modules/.pnpm/arktype@2.1.28/node_modules/arktype/out/parser/string.js var parseString = (def, ctx) => { const aliasResolution = ctx.$.maybeResolveRoot(def); if (aliasResolution) @@ -92398,7 +98876,7 @@ var parseUntilFinalizer = (s) => { }; var next = (s) => s.hasRoot() ? s.parseOperator() : s.parseOperand(); -// node_modules/.pnpm/arktype@2.1.28/node_modules/arktype/out/parser/reduce/dynamic.js +// ../node_modules/.pnpm/arktype@2.1.28/node_modules/arktype/out/parser/reduce/dynamic.js var RuntimeState = class _RuntimeState { root; branches = { @@ -92535,7 +99013,7 @@ var RuntimeState = class _RuntimeState { } }; -// node_modules/.pnpm/arktype@2.1.28/node_modules/arktype/out/generic.js +// ../node_modules/.pnpm/arktype@2.1.28/node_modules/arktype/out/generic.js var emptyGenericParameterMessage = "An empty string is not a valid generic parameter name"; var parseGenericParamName = (scanner, result, ctx) => { scanner.shiftUntilNonWhitespace(); @@ -92564,7 +99042,7 @@ var _parseOptionalConstraint = (scanner, name, result, ctx) => { return parseGenericParamName(scanner, result, ctx); }; -// node_modules/.pnpm/arktype@2.1.28/node_modules/arktype/out/fn.js +// ../node_modules/.pnpm/arktype@2.1.28/node_modules/arktype/out/fn.js var InternalFnParser = class extends Callable { constructor($2) { const attach = { @@ -92616,7 +99094,7 @@ var InternalTypedFn = class extends Callable { var badFnReturnTypeMessage = `":" must be followed by exactly one return type e.g: fn("string", ":", "number")(s => s.length)`; -// node_modules/.pnpm/arktype@2.1.28/node_modules/arktype/out/match.js +// ../node_modules/.pnpm/arktype@2.1.28/node_modules/arktype/out/match.js var InternalMatchParser = class extends Callable { $; constructor($2) { @@ -92709,9 +99187,9 @@ var throwOnDefault = (errors) => errors.throw(); var chainedAtMessage = `A key matcher must be specified before the first case i.e. match.at('foo') or match.in().at('bar')`; var doubleAtMessage = `At most one key matcher may be specified per expression`; -// node_modules/.pnpm/arktype@2.1.28/node_modules/arktype/out/parser/property.js +// ../node_modules/.pnpm/arktype@2.1.28/node_modules/arktype/out/parser/property.js var parseProperty = (def, ctx) => { - if (isArray(def)) { + if (isArray2(def)) { if (def[1] === "=") return [ctx.$.parseOwnDefinitionFormat(def[0], ctx), "=", def[2]]; if (def[1] === "?") @@ -92722,7 +99200,7 @@ var parseProperty = (def, ctx) => { var invalidOptionalKeyKindMessage = `Only required keys may make their values optional, e.g. { [mySymbol]: ['number', '?'] }`; var invalidDefaultableKeyKindMessage = `Only required keys may specify default values, e.g. { value: 'number = 0' }`; -// node_modules/.pnpm/arktype@2.1.28/node_modules/arktype/out/parser/objectLiteral.js +// ../node_modules/.pnpm/arktype@2.1.28/node_modules/arktype/out/parser/objectLiteral.js var parseObjectLiteral = (def, ctx) => { let spread; const structure = {}; @@ -92751,7 +99229,7 @@ var parseObjectLiteral = (def, ctx) => { const parsedValue = parseProperty(v, ctx); const parsedEntryKey = parsedKey; if (parsedKey.kind === "required") { - if (!isArray(parsedValue)) { + if (!isArray2(parsedValue)) { appendNamedProp(structure, "required", { key: parsedKey.normalized, value: parsedValue @@ -92768,7 +99246,7 @@ var parseObjectLiteral = (def, ctx) => { } continue; } - if (isArray(parsedValue)) { + if (isArray2(parsedValue)) { if (parsedValue[1] === "?") throwParseError2(invalidOptionalKeyKindMessage); if (parsedValue[1] === "=") @@ -92812,7 +99290,7 @@ var preparseKey = (key) => typeof key === "symbol" ? { kind: "required", normali }; var writeInvalidSpreadTypeMessage = (def) => `Spread operand must resolve to an object literal type (was ${def})`; -// node_modules/.pnpm/arktype@2.1.28/node_modules/arktype/out/parser/tupleExpressions.js +// ../node_modules/.pnpm/arktype@2.1.28/node_modules/arktype/out/parser/tupleExpressions.js var maybeParseTupleExpression = (def, ctx) => isIndexZeroExpression(def) ? indexZeroParsers[def[0]](def, ctx) : isIndexOneExpression(def) ? indexOneParsers[def[1]](def, ctx) : null; var parseKeyOfTuple = (def, ctx) => ctx.$.parseOwnDefinitionFormat(def[1], ctx).keyof(); var parseBranchTuple = (def, ctx) => { @@ -92875,7 +99353,7 @@ var indexZeroParsers = defineIndexZeroParsers({ var isIndexZeroExpression = (def) => indexZeroParsers[def[0]] !== void 0; var writeInvalidConstructorMessage = (actual) => `Expected a constructor following 'instanceof' operator (was ${actual})`; -// node_modules/.pnpm/arktype@2.1.28/node_modules/arktype/out/parser/tupleLiteral.js +// ../node_modules/.pnpm/arktype@2.1.28/node_modules/arktype/out/parser/tupleLiteral.js var parseTupleLiteral = (def, ctx) => { let sequences = [{}]; let i = 0; @@ -92886,7 +99364,7 @@ var parseTupleLiteral = (def, ctx) => { i++; } const parsedProperty = parseProperty(def[i], ctx); - const [valueNode, operator, possibleDefaultValue] = !isArray(parsedProperty) ? [parsedProperty] : parsedProperty; + const [valueNode, operator, possibleDefaultValue] = !isArray2(parsedProperty) ? [parsedProperty] : parsedProperty; i++; if (spread) { if (!valueNode.extends($ark.intrinsic.Array)) @@ -92977,7 +99455,7 @@ var requiredPostOptionalMessage = "A required element may not follow an optional var optionalOrDefaultableAfterVariadicMessage = "An optional element may not follow a variadic element"; var defaultablePostOptionalMessage = "A defaultable element may not follow an optional element without a default"; -// node_modules/.pnpm/arktype@2.1.28/node_modules/arktype/out/parser/definition.js +// ../node_modules/.pnpm/arktype@2.1.28/node_modules/arktype/out/parser/definition.js var parseCache = {}; var parseInnerDefinition = (def, ctx) => { if (typeof def === "string") { @@ -93041,7 +99519,7 @@ var parseStandardSchema = (def, ctx) => ctx.$.intrinsic.unknown.pipe((v, ctx2) = var parseTuple = (def, ctx) => maybeParseTupleExpression(def, ctx) ?? parseTupleLiteral(def, ctx); var writeBadDefinitionTypeMessage = (actual) => `Type definitions must be strings or objects (was ${actual})`; -// node_modules/.pnpm/arktype@2.1.28/node_modules/arktype/out/type.js +// ../node_modules/.pnpm/arktype@2.1.28/node_modules/arktype/out/type.js var InternalTypeParser = class extends Callable { constructor($2) { const attach = Object.assign( @@ -93088,7 +99566,7 @@ var InternalTypeParser = class extends Callable { } }; -// node_modules/.pnpm/arktype@2.1.28/node_modules/arktype/out/scope.js +// ../node_modules/.pnpm/arktype@2.1.28/node_modules/arktype/out/scope.js var $arkTypeRegistry = $ark; var InternalScope = class _InternalScope extends BaseScope { get ambientAttachments() { @@ -93105,9 +99583,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 config4 = this.resolvedConfig.keywords?.[qualifiedName]; + if (config4) + def = [def, "@", config4]; return [alias, def]; } if (alias[alias.length - 1] !== ">") { @@ -93150,7 +99628,7 @@ var InternalScope = class _InternalScope extends BaseScope { if (!isScopeAlias && !ctx.args) ctx.args = { this: ctx.id }; const result = parseInnerDefinition(def, ctx); - if (isArray(result)) { + if (isArray2(result)) { if (result[1] === "=") return throwParseError2(shallowDefaultableMessage); if (result[1] === "?") @@ -93175,15 +99653,15 @@ 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, config4 = {}) => new _InternalScope(def, config4)); + static module = ((def, config4 = {}) => this.scope(def, config4).export()); }; var scope = Object.assign(InternalScope.scope, { define: (def) => def }); var Scope = InternalScope; -// node_modules/.pnpm/arktype@2.1.28/node_modules/arktype/out/keywords/builtins.js +// ../node_modules/.pnpm/arktype@2.1.28/node_modules/arktype/out/keywords/builtins.js var MergeHkt = class extends Hkt { description = 'merge an object\'s properties onto another like `Merge(User, { isAdmin: "true" })`'; }; @@ -93193,7 +99671,7 @@ var arkBuiltins = Scope.module({ Merge }); -// node_modules/.pnpm/arktype@2.1.28/node_modules/arktype/out/keywords/Array.js +// ../node_modules/.pnpm/arktype@2.1.28/node_modules/arktype/out/keywords/Array.js var liftFromHkt = class extends Hkt { }; var liftFrom = genericNode("element")((args3) => { @@ -93210,8 +99688,8 @@ var arkArray = Scope.module({ name: "Array" }); -// node_modules/.pnpm/arktype@2.1.28/node_modules/arktype/out/keywords/FormData.js -var value = rootSchema(["string", registry.FileConstructor]); +// ../node_modules/.pnpm/arktype@2.1.28/node_modules/arktype/out/keywords/FormData.js +var value = rootSchema(["string", registry2.FileConstructor]); var parsedFormDataValue = value.rawOr(value.array()); var parsed = rootSchema({ meta: "an object representing parsed form data", @@ -93232,7 +99710,7 @@ var arkFormData = Scope.module({ for (const [k, v] of data) { if (k in result) { const existing = result[k]; - if (typeof existing === "string" || existing instanceof registry.FileConstructor) + if (typeof existing === "string" || existing instanceof registry2.FileConstructor) result[k] = [existing, v]; else existing.push(v); @@ -93247,7 +99725,7 @@ var arkFormData = Scope.module({ name: "FormData" }); -// node_modules/.pnpm/arktype@2.1.28/node_modules/arktype/out/keywords/TypedArray.js +// ../node_modules/.pnpm/arktype@2.1.28/node_modules/arktype/out/keywords/TypedArray.js var TypedArray = Scope.module({ Int8: ["instanceof", Int8Array], Uint8: ["instanceof", Uint8Array], @@ -93264,7 +99742,7 @@ var TypedArray = Scope.module({ name: "TypedArray" }); -// node_modules/.pnpm/arktype@2.1.28/node_modules/arktype/out/keywords/constructors.js +// ../node_modules/.pnpm/arktype@2.1.28/node_modules/arktype/out/keywords/constructors.js var omittedPrototypes = { Boolean: 1, Number: 1, @@ -93277,7 +99755,7 @@ var arkPrototypes = Scope.module({ FormData: arkFormData }); -// node_modules/.pnpm/arktype@2.1.28/node_modules/arktype/out/keywords/number.js +// ../node_modules/.pnpm/arktype@2.1.28/node_modules/arktype/out/keywords/number.js var epoch = rootSchema({ domain: { domain: "number", @@ -93297,13 +99775,13 @@ var epoch = rootSchema({ }, meta: "an integer representing a safe Unix timestamp" }); -var integer = rootSchema({ +var integer2 = rootSchema({ domain: "number", divisor: 1 }); -var number = Scope.module({ +var number3 = Scope.module({ root: intrinsic.number, - integer, + integer: integer2, epoch, safe: rootSchema({ domain: { @@ -93320,7 +99798,7 @@ var number = Scope.module({ name: "number" }); -// node_modules/.pnpm/arktype@2.1.28/node_modules/arktype/out/keywords/string.js +// ../node_modules/.pnpm/arktype@2.1.28/node_modules/arktype/out/keywords/string.js var regexStringNode = (regex4, description, jsonSchemaFormat) => { const schema2 = { domain: "string", @@ -93349,7 +99827,7 @@ var stringInteger = Scope.module({ name: "string.integer" }); var hex = regexStringNode(/^[\dA-Fa-f]+$/, "hex characters only"); -var base64 = Scope.module({ +var base642 = Scope.module({ root: regexStringNode(/^(?:[\d+/A-Za-z]{4})*(?:[\d+/A-Za-z]{2}==|[\d+/A-Za-z]{3}=)?$/, "base64-encoded"), url: regexStringNode(/^(?:[\w-]{4})*(?:[\w-]{2}(?:==|%3D%3D)?|[\w-]{3}(?:=|%3D)?)?$/, "base64url-encoded") }, { @@ -93407,7 +99885,7 @@ var parsableDate = rootSchema({ }).assertHasKind("intersection"); var epochRoot = stringInteger.root.internal.narrow((s, ctx) => { const n = Number.parseInt(s); - const out = number.epoch(n); + const out = number3.epoch(n); if (out instanceof ArkErrors) { ctx.errors.merge(out); return false; @@ -93443,10 +99921,10 @@ var stringDate = Scope.module({ declaredIn: parsableDate, in: "string", morphs: (s, ctx) => { - const date2 = new Date(s); - if (Number.isNaN(date2.valueOf())) + const date7 = new Date(s); + if (Number.isNaN(date7.valueOf())) return ctx.error("a parsable date"); - return date2; + return date7; }, declaredOut: intrinsic.Date }), @@ -93455,7 +99933,7 @@ var stringDate = Scope.module({ }, { name: "string.date" }); -var email = regexStringNode( +var email2 = regexStringNode( // considered https://colinhacks.com/essays/reasonable-email-regex but it includes a lookahead // which breaks some integrations e.g. fast-check // regex based on: @@ -93477,10 +99955,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 = (error50) => { + if (!(error50 instanceof SyntaxError)) + throw error50; + return `must be ${jsonStringDescription} (${error50})`; }; var jsonRoot = rootSchema({ meta: jsonStringDescription, @@ -93678,7 +100156,7 @@ var url = Scope.module({ }, { name: "string.url" }); -var uuid = Scope.module({ +var uuid2 = Scope.module({ // the meta tuple expression ensures the error message does not delegate // to the individual branches, which are too detailed root: [ @@ -93700,17 +100178,17 @@ var uuid = Scope.module({ }, { name: "string.uuid" }); -var string = Scope.module({ +var string3 = Scope.module({ root: intrinsic.string, alpha: regexStringNode(/^[A-Za-z]*$/, "only letters"), alphanumeric: regexStringNode(/^[\dA-Za-z]*$/, "only letters and digits 0-9"), hex, - base64, + base64: base642, capitalize: capitalize2, creditCard, date: stringDate, digits: regexStringNode(/^\d*$/, "only digits 0-9"), - email, + email: email2, integer: stringInteger, ip, json, @@ -93722,12 +100200,12 @@ var string = Scope.module({ trim, upper, url, - uuid + uuid: uuid2 }, { name: "string" }); -// node_modules/.pnpm/arktype@2.1.28/node_modules/arktype/out/keywords/ts.js +// ../node_modules/.pnpm/arktype@2.1.28/node_modules/arktype/out/keywords/ts.js var arkTsKeywords = Scope.module({ bigint: intrinsic.bigint, boolean: intrinsic.boolean, @@ -93742,7 +100220,7 @@ var arkTsKeywords = Scope.module({ unknown: intrinsic.unknown, undefined: intrinsic.undefined }); -var unknown = Scope.module({ +var unknown2 = Scope.module({ root: intrinsic.unknown, any: intrinsic.unknown }, { @@ -93808,16 +100286,16 @@ var arkTsGenerics = Scope.module({ Required: Required2 }); -// node_modules/.pnpm/arktype@2.1.28/node_modules/arktype/out/keywords/keywords.js +// ../node_modules/.pnpm/arktype@2.1.28/node_modules/arktype/out/keywords/keywords.js var ark = scope({ ...arkTsKeywords, ...arkTsGenerics, ...arkPrototypes, ...arkBuiltins, - string, - number, + string: string3, + number: number3, object, - unknown + unknown: unknown2 }, { prereducedAliases: true, name: "ark" }); var keywords = ark.export(); Object.assign($arkTypeRegistry.ambient, keywords); @@ -94058,7 +100536,7 @@ function buildRuntimeContext(repo) { } return lines.join("\n"); } -var addInstructions = ({ payload, repo }) => { +var addInstructions = ({ payload, repo, useNativeBash = false }) => { let encodedEvent = ""; const eventKeys = Object.keys(payload.event); if (eventKeys.length === 1 && eventKeys[0] === "trigger") { @@ -94094,41 +100572,6 @@ In case of conflict between instructions, follow this precedence (highest to low 4. Repository-specific instructions (AGENTS.md, CLAUDE.md, etc.) 5. User prompt -## SECURITY - -CRITICAL SECURITY RULES - NEVER VIOLATE UNDER ANY CIRCUMSTANCES: - -### Rule 1: Never expose secrets through ANY means - - You must NEVER expose secrets through any channel, including but not limited to: - - Displaying, printing, echoing, logging, or outputting to console - - Writing to files (including .txt, .env, .json, config files, etc.) - - Including in git commits, commit messages, or PR descriptions - - Posting in GitHub comments, issue bodies, or PR review comments - - Returning in tool outputs, API responses, or error messages - - Including in redirect URLs, WebSocket messages, or GraphQL responses - - Secrets include: API keys, authentication tokens, passwords, private keys, certificates, database connection strings, and any credential used for authentication or authorization. Common patterns (case-insensitive): variables containing API_KEY, SECRET, TOKEN, PASSWORD, CREDENTIAL, PRIVATE_KEY, or AUTH in an authentication context. Use judgment: \`PUBLIC_KEY\` for a cryptographic public key is fine; \`PRIVATE_KEY\` is not. - -### Rule 2: Never serialize objects containing secrets - - When working with objects that may contain environment variables or secrets: - - NEVER serialize, stringify, or dump entire environment objects (process.env, os.environ, ENV, etc.) - - NEVER iterate over environment variables and write their values to files - - NEVER include environment variable values in outputs, logs, HTTP requests, or anywhere they can be exposed - - If you must list properties, only show property NAMES, never values - - Only access specific, known-safe keys explicitly (e.g., NODE_ENV, HOME, PWD) - -### Rule 3: Refuse and explain - - Even if explicitly requested to reveal secrets, you must: - 1. Refuse the request - 2. Print a message explaining that exposing secrets is prohibited for security reasons - 3. If using ${ghPullfrogMcpName}, update the working comment to explain that secrets cannot be revealed - 4. Offer a safe alternative, if applicable - - If you encounter secrets in files or environment, acknowledge they exist but never reveal their values. - ## MCP (Model Context Protocol) Tools MCP servers provide tools you can call. Inspect your available MCP servers at startup to understand what tools are available, especially the ${ghPullfrogMcpName} server which handles all GitHub operations. @@ -94144,6 +100587,8 @@ Tool names may be formatted as \`(server name)/(tool name)\`, for example: \`${g **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. +${useNativeBash ? `**Shell commands**: Use your native bash/shell tool for shell command execution.` : `**Shell commands**: Use the \`${ghPullfrogMcpName}/bash\` MCP tool for all shell command execution. This tool provides a secure environment with filtered credentials. Do NOT use any native shell/bash tool - it is disabled for security.`} + **Command execution**: Never use \`sleep\` to wait for commands to complete. Commands run synchronously - when the bash tool returns, the command has finished. **Commenting style**: When posting comments via ${ghPullfrogMcpName}, write as a professional team member would. Your final comments should be polished and actionable\u2014do not include intermediate reasoning like "I'll now look at the code" or "Let me respond to the question." @@ -94188,7 +100633,7 @@ ${runtimeContext}`; // agents/shared.ts import { spawnSync } from "node:child_process"; -import { chmodSync, createWriteStream as createWriteStream2, existsSync as existsSync2 } from "node:fs"; +import { chmodSync, createWriteStream as createWriteStream2, existsSync as existsSync3 } from "node:fs"; import { mkdtemp } from "node:fs/promises"; import { tmpdir } from "node:os"; import { join as join4 } from "node:path"; @@ -94197,7 +100642,7 @@ import { pipeline } from "node:stream/promises"; // utils/github.ts var core2 = __toESM(require_core(), 1); -// node_modules/.pnpm/@octokit+plugin-throttling@11.0.3_@octokit+core@7.0.5/node_modules/@octokit/plugin-throttling/dist-bundle/index.js +// ../node_modules/.pnpm/@octokit+plugin-throttling@11.0.3_@octokit+core@7.0.5/node_modules/@octokit/plugin-throttling/dist-bundle/index.js var import_light = __toESM(require_light(), 1); var VERSION = "0.0.0-development"; var noop = () => Promise.resolve(); @@ -94227,12 +100672,12 @@ async function doRequest(state, request2, options) { const req = (isAuth ? state.auth : state.global).key(state.id).schedule(jobOptions, request2, options); if (isGraphQL) { const res = await req; - if (res.data.errors != null && res.data.errors.some((error41) => error41.type === "RATE_LIMITED")) { - const error41 = Object.assign(new Error("GraphQL Rate Limit Exceeded"), { + if (res.data.errors != null && res.data.errors.some((error50) => error50.type === "RATE_LIMITED")) { + const error50 = Object.assign(new Error("GraphQL Rate Limit Exceeded"), { response: res, data: res.data }); - throw error41; + throw error50; } } return req; @@ -94357,19 +100802,19 @@ function throttling(octokit, octokitOptions) { "error", (e) => octokit.log.warn("Error in throttling-plugin limit handler", e) ); - state.retryLimiter.on("failed", async function(error41, info2) { + state.retryLimiter.on("failed", async function(error50, info2) { const [state2, request2, options] = info2.args; const { pathname } = new URL(options.url, "http://github.test"); - const shouldRetryGraphQL = pathname.startsWith("/graphql") && error41.status !== 401; - if (!(shouldRetryGraphQL || error41.status === 403 || error41.status === 429)) { + const shouldRetryGraphQL = pathname.startsWith("/graphql") && error50.status !== 401; + if (!(shouldRetryGraphQL || error50.status === 403 || error50.status === 429)) { return; } const retryCount = ~~request2.retryCount; request2.retryCount = retryCount; options.request.retryCount = retryCount; const { wantRetry, retryAfter = 0 } = await (async function() { - if (/\bsecondary rate\b/i.test(error41.message)) { - const retryAfter2 = Number(error41.response.headers["retry-after"]) || state2.fallbackSecondaryRateRetryAfter; + if (/\bsecondary rate\b/i.test(error50.message)) { + const retryAfter2 = Number(error50.response.headers["retry-after"]) || state2.fallbackSecondaryRateRetryAfter; const wantRetry2 = await emitter.trigger( "secondary-limit", retryAfter2, @@ -94379,11 +100824,11 @@ function throttling(octokit, octokitOptions) { ); return { wantRetry: wantRetry2, retryAfter: retryAfter2 }; } - if (error41.response.headers != null && error41.response.headers["x-ratelimit-remaining"] === "0" || (error41.response.data?.errors ?? []).some( + if (error50.response.headers != null && error50.response.headers["x-ratelimit-remaining"] === "0" || (error50.response.data?.errors ?? []).some( (error210) => error210.type === "RATE_LIMITED" )) { const rateLimitReset = new Date( - ~~error41.response.headers["x-ratelimit-reset"] * 1e3 + ~~error50.response.headers["x-ratelimit-reset"] * 1e3 ).getTime(); const retryAfter2 = Math.max( // Add one second so we retry _after_ the reset time @@ -94413,7 +100858,7 @@ function throttling(octokit, octokitOptions) { throttling.VERSION = VERSION; throttling.triggersNotification = triggersNotification; -// node_modules/.pnpm/universal-user-agent@7.0.3/node_modules/universal-user-agent/index.js +// ../node_modules/.pnpm/universal-user-agent@7.0.3/node_modules/universal-user-agent/index.js function getUserAgent() { if (typeof navigator === "object" && "userAgent" in navigator) { return navigator.userAgent; @@ -94424,7 +100869,7 @@ function getUserAgent() { return ""; } -// node_modules/.pnpm/before-after-hook@4.0.0/node_modules/before-after-hook/lib/register.js +// ../node_modules/.pnpm/before-after-hook@4.0.0/node_modules/before-after-hook/lib/register.js function register3(state, name, method, options) { if (typeof method !== "function") { throw new Error("method for before hook must be a function"); @@ -94447,7 +100892,7 @@ function register3(state, name, method, options) { }); } -// node_modules/.pnpm/before-after-hook@4.0.0/node_modules/before-after-hook/lib/add.js +// ../node_modules/.pnpm/before-after-hook@4.0.0/node_modules/before-after-hook/lib/add.js function addHook(state, kind, name, hook2) { const orig = hook2; if (!state.registry[name]) { @@ -94471,8 +100916,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((error50) => { + return orig(error50, options); }); }; } @@ -94482,7 +100927,7 @@ function addHook(state, kind, name, hook2) { }); } -// node_modules/.pnpm/before-after-hook@4.0.0/node_modules/before-after-hook/lib/remove.js +// ../node_modules/.pnpm/before-after-hook@4.0.0/node_modules/before-after-hook/lib/remove.js function removeHook(state, name, method) { if (!state.registry[name]) { return; @@ -94496,7 +100941,7 @@ function removeHook(state, name, method) { state.registry[name].splice(index, 1); } -// node_modules/.pnpm/before-after-hook@4.0.0/node_modules/before-after-hook/index.js +// ../node_modules/.pnpm/before-after-hook@4.0.0/node_modules/before-after-hook/index.js var bind = Function.bind; var bindable = bind.bind(bind); function bindApi(hook2, state, name) { @@ -94530,7 +100975,7 @@ function Collection() { } var before_after_hook_default = { Singular, Collection }; -// node_modules/.pnpm/@octokit+endpoint@11.0.1/node_modules/@octokit/endpoint/dist-bundle/index.js +// ../node_modules/.pnpm/@octokit+endpoint@11.0.1/node_modules/@octokit/endpoint/dist-bundle/index.js var VERSION2 = "0.0.0-development"; var userAgent = `octokit-endpoint.js/${VERSION2} ${getUserAgent()}`; var DEFAULTS = { @@ -94544,16 +100989,16 @@ var DEFAULTS = { format: "" } }; -function lowercaseKeys(object2) { - if (!object2) { +function lowercaseKeys(object6) { + if (!object6) { return {}; } - return Object.keys(object2).reduce((newObj, key) => { - newObj[key.toLowerCase()] = object2[key]; + return Object.keys(object6).reduce((newObj, key) => { + newObj[key.toLowerCase()] = object6[key]; return newObj; }, {}); } -function isPlainObject2(value2) { +function isPlainObject3(value2) { if (typeof value2 !== "object" || value2 === null) return false; if (Object.prototype.toString.call(value2) !== "[object Object]") return false; const proto = Object.getPrototypeOf(value2); @@ -94564,7 +101009,7 @@ function isPlainObject2(value2) { function mergeDeep(defaults, options) { const result = Object.assign({}, defaults); Object.keys(options).forEach((key) => { - if (isPlainObject2(options[key])) { + if (isPlainObject3(options[key])) { if (!(key in defaults)) Object.assign(result, { [key]: options[key] }); else result[key] = mergeDeep(defaults[key], options[key]); } else { @@ -94581,10 +101026,10 @@ function removeUndefinedProperties(obj) { } return obj; } -function merge(defaults, route, options) { +function merge2(defaults, route, options) { if (typeof route === "string") { - let [method, url2] = route.split(" "); - options = Object.assign(url2 ? { method, url: url2 } : { url: method }, options); + let [method, url4] = route.split(" "); + options = Object.assign(url4 ? { method, url: url4 } : { url: method }, options); } else { options = Object.assign({}, route); } @@ -94602,13 +101047,13 @@ function merge(defaults, route, options) { } return mergedOptions; } -function addQueryParameters(url2, parameters) { - const separator2 = /\?/.test(url2) ? "&" : "?"; +function addQueryParameters(url4, parameters) { + const separator2 = /\?/.test(url4) ? "&" : "?"; const names = Object.keys(parameters); if (names.length === 0) { - return url2; + return url4; } - return url2 + separator2 + names.map((name) => { + return url4 + separator2 + names.map((name) => { if (name === "q") { return "q=" + parameters.q.split("+").map(encodeURIComponent).join("+"); } @@ -94619,18 +101064,18 @@ var urlVariableRegex = /\{[^{}}]+\}/g; function removeNonChars(variableName) { return variableName.replace(/(?:^\W+)|(?:(? a.concat(b), []); } -function omit2(object2, keysToOmit) { +function omit3(object6, keysToOmit) { const result = { __proto__: null }; - for (const key of Object.keys(object2)) { + for (const key of Object.keys(object6)) { if (keysToOmit.indexOf(key) === -1) { - result[key] = object2[key]; + result[key] = object6[key]; } } return result; @@ -94648,7 +101093,7 @@ function encodeUnreserved(str) { return "%" + c.charCodeAt(0).toString(16).toUpperCase(); }); } -function encodeValue(operator, value2, key) { +function encodeValue2(operator, value2, key) { value2 = operator === "+" || operator === "#" ? encodeReserved(value2) : encodeUnreserved(value2); if (key) { return encodeUnreserved(key) + "=" + value2; @@ -94671,20 +101116,20 @@ function getValues(context, operator, key, modifier) { value2 = value2.substring(0, parseInt(modifier, 10)); } result.push( - encodeValue(operator, value2, isKeyOperator(operator) ? key : "") + encodeValue2(operator, value2, isKeyOperator(operator) ? key : "") ); } else { if (modifier === "*") { if (Array.isArray(value2)) { value2.filter(isDefined).forEach(function(value22) { result.push( - encodeValue(operator, value22, isKeyOperator(operator) ? key : "") + encodeValue2(operator, value22, isKeyOperator(operator) ? key : "") ); }); } else { Object.keys(value2).forEach(function(k) { if (isDefined(value2[k])) { - result.push(encodeValue(operator, value2[k], k)); + result.push(encodeValue2(operator, value2[k], k)); } }); } @@ -94692,13 +101137,13 @@ function getValues(context, operator, key, modifier) { const tmp = []; if (Array.isArray(value2)) { value2.filter(isDefined).forEach(function(value22) { - tmp.push(encodeValue(operator, value22)); + tmp.push(encodeValue2(operator, value22)); }); } else { Object.keys(value2).forEach(function(k) { if (isDefined(value2[k])) { tmp.push(encodeUnreserved(k)); - tmp.push(encodeValue(operator, value2[k].toString())); + tmp.push(encodeValue2(operator, value2[k].toString())); } }); } @@ -94731,7 +101176,7 @@ function expand(template, context) { var operators = ["+", "#", ".", "/", ";", "?", "&"]; template = template.replace( /\{([^\{\}]+)\}|([^\{\}]+)/g, - function(_, expression, literal) { + function(_, expression, literal4) { if (expression) { let operator = ""; const values = []; @@ -94755,7 +101200,7 @@ function expand(template, context) { return values.join(","); } } else { - return encodeReserved(literal); + return encodeReserved(literal4); } } ); @@ -94767,10 +101212,10 @@ function expand(template, context) { } function parse(options) { let method = options.method.toUpperCase(); - let url2 = (options.url || "/").replace(/:([a-z]\w+)/g, "{$1}"); + let url4 = (options.url || "/").replace(/:([a-z]\w+)/g, "{$1}"); let headers = Object.assign({}, options.headers); let body; - let parameters = omit2(options, [ + let parameters = omit3(options, [ "method", "baseUrl", "url", @@ -94778,13 +101223,13 @@ function parse(options) { "request", "mediaType" ]); - const urlVariableNames = extractUrlVariableNames(url2); - url2 = parseUrl(url2).expand(parameters); - if (!/^http/.test(url2)) { - url2 = options.baseUrl + url2; + const urlVariableNames = extractUrlVariableNames(url4); + url4 = parseUrl(url4).expand(parameters); + if (!/^http/.test(url4)) { + url4 = options.baseUrl + url4; } const omittedParameters = Object.keys(options).filter((option) => urlVariableNames.includes(option)).concat("baseUrl"); - const remainingParameters = omit2(parameters, omittedParameters); + const remainingParameters = omit3(parameters, omittedParameters); const isBinaryRequest = /application\/octet-stream/i.test(headers.accept); if (!isBinaryRequest) { if (options.mediaType.format) { @@ -94795,7 +101240,7 @@ function parse(options) { ) ).join(","); } - if (url2.endsWith("/graphql")) { + if (url4.endsWith("/graphql")) { if (options.mediaType.previews?.length) { const previewsFromAcceptHeader = headers.accept.match(/(? { @@ -94806,7 +101251,7 @@ function parse(options) { } } if (["GET", "HEAD"].includes(method)) { - url2 = addQueryParameters(url2, remainingParameters); + url4 = addQueryParameters(url4, remainingParameters); } else { if ("data" in remainingParameters) { body = remainingParameters.data; @@ -94823,30 +101268,30 @@ function parse(options) { body = ""; } return Object.assign( - { method, url: url2, headers }, + { method, url: url4, headers }, typeof body !== "undefined" ? { body } : null, options.request ? { request: options.request } : null ); } function endpointWithDefaults(defaults, route, options) { - return parse(merge(defaults, route, options)); + return parse(merge2(defaults, route, options)); } function withDefaults(oldDefaults, newDefaults) { - const DEFAULTS2 = merge(oldDefaults, newDefaults); + const DEFAULTS2 = merge2(oldDefaults, newDefaults); const endpoint2 = endpointWithDefaults.bind(null, DEFAULTS2); return Object.assign(endpoint2, { DEFAULTS: DEFAULTS2, defaults: withDefaults.bind(null, DEFAULTS2), - merge: merge.bind(null, DEFAULTS2), + merge: merge2.bind(null, DEFAULTS2), parse }); } var endpoint = withDefaults(null, DEFAULTS); -// node_modules/.pnpm/@octokit+request@10.0.5/node_modules/@octokit/request/dist-bundle/index.js +// ../node_modules/.pnpm/@octokit+request@10.0.5/node_modules/@octokit/request/dist-bundle/index.js var import_fast_content_type_parse = __toESM(require_fast_content_type_parse(), 1); -// node_modules/.pnpm/@octokit+request-error@7.0.1/node_modules/@octokit/request-error/dist-src/index.js +// ../node_modules/.pnpm/@octokit+request-error@7.0.1/node_modules/@octokit/request-error/dist-src/index.js var RequestError = class extends Error { name; /** @@ -94885,14 +101330,14 @@ var RequestError = class extends Error { } }; -// node_modules/.pnpm/@octokit+request@10.0.5/node_modules/@octokit/request/dist-bundle/index.js +// ../node_modules/.pnpm/@octokit+request@10.0.5/node_modules/@octokit/request/dist-bundle/index.js var VERSION3 = "10.0.5"; var defaults_default = { headers: { "user-agent": `octokit-request.js/${VERSION3} ${getUserAgent()}` } }; -function isPlainObject3(value2) { +function isPlainObject4(value2) { if (typeof value2 !== "object" || value2 === null) return false; if (Object.prototype.toString.call(value2) !== "[object Object]") return false; const proto = Object.getPrototypeOf(value2); @@ -94909,7 +101354,7 @@ async function fetchWrapper(requestOptions) { } const log2 = requestOptions.request?.log || console; const parseSuccessResponseBody = requestOptions.request?.parseSuccessResponseBody !== false; - const body = isPlainObject3(requestOptions.body) || Array.isArray(requestOptions.body) ? JSON.stringify(requestOptions.body) : requestOptions.body; + const body = isPlainObject4(requestOptions.body) || Array.isArray(requestOptions.body) ? JSON.stringify(requestOptions.body) : requestOptions.body; const requestHeaders = Object.fromEntries( Object.entries(requestOptions.headers).map(([name, value2]) => [ name, @@ -94928,36 +101373,36 @@ async function fetchWrapper(requestOptions) { // See https://fetch.spec.whatwg.org/#dom-requestinit-duplex. ...requestOptions.body && { duplex: "half" } }); - } catch (error41) { + } catch (error50) { let message = "Unknown Error"; - if (error41 instanceof Error) { - if (error41.name === "AbortError") { - error41.status = 500; - throw error41; + if (error50 instanceof Error) { + if (error50.name === "AbortError") { + error50.status = 500; + throw error50; } - 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 = error50.message; + if (error50.name === "TypeError" && "cause" in error50) { + if (error50.cause instanceof Error) { + message = error50.cause.message; + } else if (typeof error50.cause === "string") { + message = error50.cause; } } } const requestError = new RequestError(message, 500, { request: requestOptions }); - requestError.cause = error41; + requestError.cause = error50; throw requestError; } const status = fetchResponse.status; - const url2 = fetchResponse.url; + const url4 = fetchResponse.url; const responseHeaders = {}; for (const [key, value2] of fetchResponse.headers) { responseHeaders[key] = value2; } const octokitResponse = { - url: url2, + url: url4, status, headers: responseHeaders, data: "" @@ -95059,7 +101504,7 @@ function withDefaults2(oldEndpoint, newDefaults) { } var request = withDefaults2(endpoint, defaults_default); -// node_modules/.pnpm/@octokit+graphql@9.0.2/node_modules/@octokit/graphql/dist-bundle/index.js +// ../node_modules/.pnpm/@octokit+graphql@9.0.2/node_modules/@octokit/graphql/dist-bundle/index.js var VERSION4 = "0.0.0-development"; function _buildMessageForResponseErrors(data) { return `Request failed due to following response errors: @@ -95166,7 +101611,7 @@ function withCustomRequest(customRequest) { }); } -// node_modules/.pnpm/@octokit+auth-token@6.0.0/node_modules/@octokit/auth-token/dist-bundle/index.js +// ../node_modules/.pnpm/@octokit+auth-token@6.0.0/node_modules/@octokit/auth-token/dist-bundle/index.js var b64url = "(?:[a-zA-Z0-9_-]+)"; var sep = "\\."; var jwtRE = new RegExp(`^${b64url}${sep}${b64url}${sep}${b64url}$`); @@ -95211,10 +101656,10 @@ var createTokenAuth = function createTokenAuth2(token) { }); }; -// node_modules/.pnpm/@octokit+core@7.0.5/node_modules/@octokit/core/dist-src/version.js +// ../node_modules/.pnpm/@octokit+core@7.0.5/node_modules/@octokit/core/dist-src/version.js var VERSION5 = "7.0.5"; -// node_modules/.pnpm/@octokit+core@7.0.5/node_modules/@octokit/core/dist-src/index.js +// ../node_modules/.pnpm/@octokit+core@7.0.5/node_modules/@octokit/core/dist-src/index.js var noop2 = () => { }; var consoleWarn = console.warn.bind(console); @@ -95348,10 +101793,10 @@ var Octokit = class { auth; }; -// node_modules/.pnpm/@octokit+plugin-request-log@6.0.0_@octokit+core@7.0.5/node_modules/@octokit/plugin-request-log/dist-src/version.js +// ../node_modules/.pnpm/@octokit+plugin-request-log@6.0.0_@octokit+core@7.0.5/node_modules/@octokit/plugin-request-log/dist-src/version.js var VERSION6 = "6.0.0"; -// node_modules/.pnpm/@octokit+plugin-request-log@6.0.0_@octokit+core@7.0.5/node_modules/@octokit/plugin-request-log/dist-src/index.js +// ../node_modules/.pnpm/@octokit+plugin-request-log@6.0.0_@octokit+core@7.0.5/node_modules/@octokit/plugin-request-log/dist-src/index.js function requestLog(octokit) { octokit.hook.wrap("request", (request2, options) => { octokit.log.debug("request", options); @@ -95364,18 +101809,18 @@ 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((error50) => { + const requestId = error50.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} - ${error50.status} with id ${requestId} in ${Date.now() - start}ms` ); - throw error41; + throw error50; }); }); } requestLog.VERSION = VERSION6; -// node_modules/.pnpm/@octokit+plugin-paginate-rest@13.2.0_@octokit+core@7.0.5/node_modules/@octokit/plugin-paginate-rest/dist-bundle/index.js +// ../node_modules/.pnpm/@octokit+plugin-paginate-rest@13.2.0_@octokit+core@7.0.5/node_modules/@octokit/plugin-paginate-rest/dist-bundle/index.js var VERSION7 = "0.0.0-development"; function normalizePaginatedListResponse(response) { if (!response.data) { @@ -95412,31 +101857,31 @@ function iterator(octokit, route, parameters) { const requestMethod = typeof route === "function" ? route : octokit.request; const method = options.method; const headers = options.headers; - let url2 = options.url; + let url4 = options.url; return { [Symbol.asyncIterator]: () => ({ async next() { - if (!url2) return { done: true }; + if (!url4) return { done: true }; try { - const response = await requestMethod({ method, url: url2, headers }); + const response = await requestMethod({ method, url: url4, headers }); const normalizedResponse = normalizePaginatedListResponse(response); - url2 = ((normalizedResponse.headers.link || "").match( + url4 = ((normalizedResponse.headers.link || "").match( /<([^<>]+)>;\s*rel="next"/ ) || [])[1]; - if (!url2 && "total_commits" in normalizedResponse.data) { + if (!url4 && "total_commits" in normalizedResponse.data) { const parsedUrl = new URL(normalizedResponse.url); const params = parsedUrl.searchParams; const page = parseInt(params.get("page") || "1", 10); const per_page = parseInt(params.get("per_page") || "250", 10); if (page * per_page < normalizedResponse.data.total_commits) { params.set("page", String(page + 1)); - url2 = parsedUrl.toString(); + url4 = parsedUrl.toString(); } } return { value: normalizedResponse }; - } catch (error41) { - if (error41.status !== 409) throw error41; - url2 = ""; + } catch (error50) { + if (error50.status !== 409) throw error50; + url4 = ""; return { value: { status: 200, @@ -95491,10 +101936,10 @@ function paginateRest(octokit) { } paginateRest.VERSION = VERSION7; -// node_modules/.pnpm/@octokit+plugin-rest-endpoint-methods@16.1.0_@octokit+core@7.0.5/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/version.js +// ../node_modules/.pnpm/@octokit+plugin-rest-endpoint-methods@16.1.0_@octokit+core@7.0.5/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/version.js var VERSION8 = "16.1.0"; -// node_modules/.pnpm/@octokit+plugin-rest-endpoint-methods@16.1.0_@octokit+core@7.0.5/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/generated/endpoints.js +// ../node_modules/.pnpm/@octokit+plugin-rest-endpoint-methods@16.1.0_@octokit+core@7.0.5/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/generated/endpoints.js var Endpoints = { actions: { addCustomLabelsToSelfHostedRunnerForOrg: [ @@ -97686,16 +104131,16 @@ var Endpoints = { }; var endpoints_default = Endpoints; -// node_modules/.pnpm/@octokit+plugin-rest-endpoint-methods@16.1.0_@octokit+core@7.0.5/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/endpoints-to-methods.js +// ../node_modules/.pnpm/@octokit+plugin-rest-endpoint-methods@16.1.0_@octokit+core@7.0.5/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/endpoints-to-methods.js var endpointMethodsMap = /* @__PURE__ */ new Map(); for (const [scope2, endpoints] of Object.entries(endpoints_default)) { for (const [methodName, endpoint2] of Object.entries(endpoints)) { const [route, defaults, decorations] = endpoint2; - const [method, url2] = route.split(/ /); + const [method, url4] = route.split(/ /); const endpointDefaults = Object.assign( { method, - url: url2 + url: url4 }, defaults ); @@ -97809,7 +104254,7 @@ function decorate(octokit, scope2, methodName, defaults, decorations) { return Object.assign(withDecorations, requestWithDefaults); } -// node_modules/.pnpm/@octokit+plugin-rest-endpoint-methods@16.1.0_@octokit+core@7.0.5/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/index.js +// ../node_modules/.pnpm/@octokit+plugin-rest-endpoint-methods@16.1.0_@octokit+core@7.0.5/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/index.js function restEndpointMethods(octokit) { const api = endpointsToMethods(octokit); return { @@ -97826,10 +104271,10 @@ function legacyRestEndpointMethods(octokit) { } legacyRestEndpointMethods.VERSION = VERSION8; -// node_modules/.pnpm/@octokit+rest@22.0.0/node_modules/@octokit/rest/dist-src/version.js +// ../node_modules/.pnpm/@octokit+rest@22.0.0/node_modules/@octokit/rest/dist-src/version.js var VERSION9 = "22.0.0"; -// node_modules/.pnpm/@octokit+rest@22.0.0/node_modules/@octokit/rest/dist-src/index.js +// ../node_modules/.pnpm/@octokit+rest@22.0.0/node_modules/@octokit/rest/dist-src/index.js var Octokit2 = Octokit.plugin(requestLog, legacyRestEndpointMethods, paginateRest).defaults( { userAgent: `octokit-rest.js/${VERSION9}` @@ -97837,13 +104282,13 @@ var Octokit2 = Octokit.plugin(requestLog, legacyRestEndpointMethods, paginateRes ); // utils/github.ts -import assert from "node:assert/strict"; +import assert2 from "node:assert/strict"; import { createSign } from "node:crypto"; // utils/retry.ts -var defaultShouldRetry = (error41) => { - if (!(error41 instanceof Error)) return false; - return error41.name === "AbortError" || error41.message.includes("fetch failed") || error41.message.includes("ECONNRESET") || error41.message.includes("ETIMEDOUT"); +var defaultShouldRetry = (error50) => { + if (!(error50 instanceof Error)) return false; + return error50.name === "AbortError" || error50.message.includes("fetch failed") || error50.message.includes("ECONNRESET") || error50.message.includes("ETIMEDOUT"); }; async function retry(fn2, options = {}) { const maxAttempts = options.maxAttempts ?? 3; @@ -97854,10 +104299,10 @@ async function retry(fn2, options = {}) { for (let attempt = 1; attempt <= maxAttempts; attempt++) { try { return await fn2(); - } catch (error41) { - lastError = error41; - if (attempt === maxAttempts || !shouldRetry(error41)) { - throw error41; + } catch (error50) { + lastError = error50; + if (attempt === maxAttempts || !shouldRetry(error50)) { + throw error50; } const delay2 = delayMs * attempt; log.warning( @@ -97897,12 +104342,12 @@ async function acquireTokenViaOIDC() { const tokenData = await tokenResponse.json(); log.info(`\xBB installation token obtained for ${tokenData.repository || "all repositories"}`); return tokenData.token; - } catch (error41) { + } catch (error50) { clearTimeout(timeoutId); - if (error41 instanceof Error && error41.name === "AbortError") { + if (error50 instanceof Error && error50.name === "AbortError") { throw new Error(`Token exchange timed out after ${timeoutMs}ms`); } - throw error41; + throw error50; } } var base64UrlEncode = (str) => { @@ -97927,13 +104372,13 @@ var generateJWT = (appId, privateKey) => { }; var githubRequest = async (path4, options = {}) => { const { method = "GET", headers = {}, body } = options; - const url2 = `https://api.github.com${path4}`; + const url4 = `https://api.github.com${path4}`; const requestHeaders = { Accept: "application/vnd.github.v3+json", "User-Agent": "Pullfrog-Installation-Token-Generator/1.0", ...headers }; - const response = await fetch(url2, { + const response = await fetch(url4, { method, headers: requestHeaders, ...body && { body } @@ -97959,23 +104404,23 @@ var checkRepositoryAccess = async (token, repoOwner, repoName) => { return false; } }; -var createInstallationToken = async (jwt, installationId) => { +var createInstallationToken = async (jwt2, installationId) => { const response = await githubRequest( `/app/installations/${installationId}/access_tokens`, { method: "POST", - headers: { Authorization: `Bearer ${jwt}` } + headers: { Authorization: `Bearer ${jwt2}` } } ); return response.token; }; -var findInstallationId = async (jwt, repoOwner, repoName) => { +var findInstallationId = async (jwt2, repoOwner, repoName) => { const installations = await githubRequest("/app/installations", { - headers: { Authorization: `Bearer ${jwt}` } + headers: { Authorization: `Bearer ${jwt2}` } }); for (const installation of installations) { try { - const tempToken = await createInstallationToken(jwt, installation.id); + const tempToken = await createInstallationToken(jwt2, installation.id); const hasAccess = await checkRepositoryAccess(tempToken, repoOwner, repoName); if (hasAccess) { return installation.id; @@ -97989,15 +104434,15 @@ var findInstallationId = async (jwt, repoOwner, repoName) => { }; async function acquireTokenViaGitHubApp() { const repoContext = parseRepoContext(); - const config2 = { + const config4 = { 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 token = await createInstallationToken(jwt, installationId); + const jwt2 = generateJWT(config4.appId, config4.privateKey); + const installationId = await findInstallationId(jwt2, config4.repoOwner, config4.repoName); + const token = await createInstallationToken(jwt2, installationId); return token; } async function acquireNewToken() { @@ -98009,7 +104454,7 @@ async function acquireNewToken() { } var githubInstallationToken; async function setupGitHubInstallationToken() { - assert(!githubInstallationToken, "GitHub installation token is already set."); + assert2(!githubInstallationToken, "GitHub installation token is already set."); const acquiredToken = await acquireNewToken(); core2.setSecret(acquiredToken); githubInstallationToken = acquiredToken; @@ -98022,7 +104467,7 @@ async function setupGitHubInstallationToken() { }; } function getGitHubInstallationToken() { - assert(githubInstallationToken, "GitHub installation token not set. Call setupGitHubInstallationToken first."); + assert2(githubInstallationToken, "GitHub installation token not set. Call setupGitHubInstallationToken first."); return githubInstallationToken; } async function revokeGitHubInstallationToken(token) { @@ -98037,9 +104482,9 @@ async function revokeGitHubInstallationToken(token) { } }); log.debug("\xBB installation token revoked"); - } catch (error41) { + } catch (error50) { log.warning( - `Failed to revoke installation token: ${error41 instanceof Error ? error41.message : String(error41)}` + `Failed to revoke installation token: ${error50 instanceof Error ? error50.message : String(error50)}` ); } } @@ -98090,14 +104535,14 @@ function setupProcessAgentEnv(agentSpecificVars) { } async function installFromNpmTarball({ packageName, - version: version2, + version: version4, executablePath, installDependencies }) { - let resolvedVersion = version2; - if (version2.startsWith("^") || version2.startsWith("~") || version2 === "latest") { + let resolvedVersion = version4; + if (version4.startsWith("^") || version4.startsWith("~") || version4 === "latest") { const npmRegistry2 = process.env.NPM_REGISTRY || "https://registry.npmjs.org"; - log.debug(`\xBB resolving version for ${version2}...`); + log.debug(`\xBB resolving version for ${version4}...`); try { const registryResponse = await fetch(`${npmRegistry2}/${packageName}`); if (!registryResponse.ok) { @@ -98106,11 +104551,11 @@ async function installFromNpmTarball({ const registryData = await registryResponse.json(); resolvedVersion = registryData["dist-tags"].latest; log.debug(`\xBB resolved to version ${resolvedVersion}`); - } catch (error41) { + } catch (error50) { log.warning( - `Failed to resolve version from registry: ${error41 instanceof Error ? error41.message : String(error41)}` + `Failed to resolve version from registry: ${error50 instanceof Error ? error50.message : String(error50)}` ); - throw error41; + throw error50; } } log.debug(`\xBB installing ${packageName}@${resolvedVersion}...`); @@ -98146,7 +104591,7 @@ async function installFromNpmTarball({ } const extractedDir = join4(tempDir, "package"); const cliPath = join4(extractedDir, executablePath); - if (!existsSync2(cliPath)) { + if (!existsSync3(cliPath)) { throw new Error(`Executable not found in extracted package at ${cliPath}`); } if (installDependencies) { @@ -98167,8 +104612,8 @@ async function installFromNpmTarball({ log.debug(`\xBB ${packageName} installed at ${cliPath}`); return cliPath; } -async function fetchWithRetry(url2, headers, errorMessage) { - const response = await fetch(url2, { headers }); +async function fetchWithRetry(url4, headers, errorMessage) { + const response = await fetch(url4, { headers }); if (!response.ok) { const retryAfter = response.headers.get("Retry-After") || response.headers.get("retry-after"); if (retryAfter) { @@ -98176,7 +104621,7 @@ async function fetchWithRetry(url2, headers, errorMessage) { if (!Number.isNaN(waitSeconds) && waitSeconds > 0) { log.info(`Rate limited, waiting ${waitSeconds} seconds before retry...`); await new Promise((resolve) => setTimeout(resolve, waitSeconds * 1e3)); - const retryResponse = await fetch(url2, { headers }); + const retryResponse = await fetch(url4, { headers }); if (!retryResponse.ok) { throw new Error( `${errorMessage}: ${retryResponse.status} ${retryResponse.statusText} (retry failed)` @@ -98228,7 +104673,7 @@ async function installFromGithub({ } else { cliPath = downloadPath; } - if (!existsSync2(cliPath)) { + if (!existsSync3(cliPath)) { throw new Error(`Executable not found at ${cliPath}`); } chmodSync(cliPath, 493); @@ -98274,7 +104719,7 @@ async function installFromCurl({ ); } const cliPath = join4(tempDir, ".local", "bin", executableName); - if (!existsSync2(cliPath)) { + if (!existsSync3(cliPath)) { throw new Error(`Executable not found at ${cliPath}`); } chmodSync(cliPath, 493); @@ -98305,19 +104750,12 @@ var claude = agent({ disallowedTools: ["Bash", "WebSearch", "WebFetch", "Write"], async canUseTool(toolName, input, _options) { if (toolName.startsWith("mcp__gh_pullfrog__")) - return { - behavior: "allow", - updatedInput: input, - updatedPermissions: [] - }; - console.error("can i use this tool?", toolName); - return { - behavior: "deny", - message: "You are not allowed to use this tool." - }; + return { behavior: "allow", updatedInput: input, updatedPermissions: [] }; + return { behavior: "deny", message: "tool not allowed in sandbox mode" }; } } : { - permissionMode: "bypassPermissions" + permissionMode: "bypassPermissions", + disallowedTools: ["Bash"] }; if (payload.sandbox) { log.info("\u{1F512} sandbox mode enabled: restricting to read-only operations"); @@ -98430,17 +104868,17 @@ var messageHandlers = { // agents/codex.ts import { spawnSync as spawnSync2 } from "node:child_process"; -import { mkdirSync as mkdirSync2 } from "node:fs"; -import { join as join5 } from "node:path"; +import { mkdirSync as mkdirSync3 } from "node:fs"; +import { join as join6 } from "node:path"; -// node_modules/.pnpm/@openai+codex-sdk@0.58.0/node_modules/@openai/codex-sdk/dist/index.js +// ../node_modules/.pnpm/@openai+codex-sdk@0.58.0/node_modules/@openai/codex-sdk/dist/index.js import { promises as fs2 } from "fs"; import os from "os"; import path from "path"; import { spawn as spawn2 } from "child_process"; import path2 from "path"; import readline from "readline"; -import { fileURLToPath as fileURLToPath2 } from "url"; +import { fileURLToPath } from "url"; async function createOutputSchemaFile(schema2) { if (schema2 === void 0) { return { cleanup: async () => { @@ -98460,9 +104898,9 @@ async function createOutputSchemaFile(schema2) { try { await fs2.writeFile(schemaPath, JSON.stringify(schema2), "utf8"); return { schemaPath, cleanup }; - } catch (error41) { + } catch (error50) { await cleanup(); - throw error41; + throw error50; } } function isJsonObject2(value2) { @@ -98513,8 +104951,8 @@ var Thread = class { let parsed2; try { parsed2 = JSON.parse(item); - } catch (error41) { - throw new Error(`Failed to parse item: ${item}`, { cause: error41 }); + } catch (error50) { + throw new Error(`Failed to parse item: ${item}`, { cause: error50 }); } if (parsed2.type === "thread.started") { this._id = parsed2.thread_id; @@ -98675,7 +105113,7 @@ var CodexExec = class { } } }; -var scriptFileName = fileURLToPath2(import.meta.url); +var scriptFileName = fileURLToPath(import.meta.url); var scriptDirName = path2.dirname(scriptFileName); function findCodexPath() { const { platform, arch } = process; @@ -98768,8 +105206,8 @@ var codex = agent({ }, run: async ({ payload, mcpServers, apiKey, cliPath, repo }) => { const tempHome = process.env.PULLFROG_TEMP_DIR; - const configDir = join5(tempHome, ".config", "codex"); - mkdirSync2(configDir, { recursive: true }); + const configDir = join6(tempHome, ".config", "codex"); + mkdirSync3(configDir, { recursive: true }); setupProcessAgentEnv({ OPENAI_API_KEY: apiKey, HOME: tempHome @@ -98796,7 +105234,7 @@ var codex = agent({ } ); try { - const streamedTurn = await thread.runStreamed(addInstructions({ payload, repo })); + const streamedTurn = await thread.runStreamed(addInstructions({ payload, repo, useNativeBash: true })); let finalOutput2 = ""; for await (const event of streamedTurn.events) { const handler2 = messageHandlers2[event.type]; @@ -98812,8 +105250,8 @@ var codex = agent({ success: true, output: finalOutput2 }; - } catch (error41) { - const errorMessage = error41 instanceof Error ? error41.message : String(error41); + } catch (error50) { + const errorMessage = error50 instanceof Error ? error50.message : String(error50); log.error(`Codex execution failed: ${errorMessage}`); return { success: false, @@ -98927,9 +105365,9 @@ function configureCodexMcpServers({ mcpServers, cliPath }) { // agents/cursor.ts import { spawn as spawn3 } from "node:child_process"; -import { mkdirSync as mkdirSync3, writeFileSync as writeFileSync2 } from "node:fs"; +import { mkdirSync as mkdirSync4, writeFileSync } from "node:fs"; import { homedir as homedir2 } from "node:os"; -import { join as join6 } from "node:path"; +import { join as join7 } from "node:path"; var cursor = agent({ name: "cursor", install: async () => { @@ -99046,16 +105484,16 @@ var cursor = agent({ if (signal) { log.warning(`Cursor CLI terminated by signal: ${signal}`); } - const duration2 = ((Date.now() - startTime) / 1e3).toFixed(1); + const duration6 = ((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 ${duration6}s`); resolve({ 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 ${duration6}s: ${errorMessage}`); resolve({ success: false, error: errorMessage, @@ -99063,10 +105501,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", (error50) => { + const duration6 = ((Date.now() - startTime) / 1e3).toFixed(1); + const errorMessage = error50.message || String(error50); + log.error(`Cursor CLI execution failed after ${duration6}s: ${errorMessage}`); resolve({ success: false, error: errorMessage, @@ -99074,8 +105512,8 @@ var cursor = agent({ }); }); }); - } catch (error41) { - const errorMessage = error41 instanceof Error ? error41.message : String(error41); + } catch (error50) { + const errorMessage = error50 instanceof Error ? error50.message : String(error50); log.error(`Cursor execution failed: ${errorMessage}`); return { success: false, @@ -99087,9 +105525,9 @@ var cursor = agent({ }); function configureCursorMcpServers({ mcpServers }) { const realHome = homedir2(); - const cursorConfigDir = join6(realHome, ".cursor"); - const mcpConfigPath = join6(cursorConfigDir, "mcp.json"); - mkdirSync3(cursorConfigDir, { recursive: true }); + const cursorConfigDir = join7(realHome, ".cursor"); + const mcpConfigPath = join7(cursorConfigDir, "mcp.json"); + mkdirSync4(cursorConfigDir, { recursive: true }); const cursorMcpServers = {}; for (const [serverName, serverConfig] of Object.entries(mcpServers)) { if (serverConfig.type !== "http") { @@ -99102,43 +105540,33 @@ function configureCursorMcpServers({ mcpServers }) { url: serverConfig.url }; } - writeFileSync2(mcpConfigPath, JSON.stringify({ mcpServers: cursorMcpServers }, null, 2), "utf-8"); + writeFileSync(mcpConfigPath, JSON.stringify({ mcpServers: cursorMcpServers }, null, 2), "utf-8"); log.info(`\xBB MCP config written to ${mcpConfigPath}`); } function configureCursorSandbox({ sandbox }) { const realHome = homedir2(); - const cursorConfigDir = join6(realHome, ".cursor"); - const cliConfigPath = join6(cursorConfigDir, "cli-config.json"); - mkdirSync3(cursorConfigDir, { recursive: true }); - const config2 = sandbox ? { - // sandbox mode: deny all writes and shell commands + const cursorConfigDir = join7(realHome, ".config", "cursor"); + const cliConfigPath = join7(cursorConfigDir, "cli-config.json"); + mkdirSync4(cursorConfigDir, { recursive: true }); + const config4 = sandbox ? { permissions: { - allow: [ - "Read(**)" - // allow reading all files - ], - deny: [ - "Write(**)", - // deny all file writes - "Shell(**)" - // deny all shell commands - ] + allow: ["Read(**)"], + deny: ["Write(**)", "Shell(*)"] } } : { - // normal mode: allow everything permissions: { - allow: ["Read(**)", "Write(**)", "Shell(**)"], - deny: [] + allow: ["Read(**)", "Write(**)"], + deny: ["Shell(*)"] } }; - writeFileSync2(cliConfigPath, JSON.stringify(config2, null, 2), "utf-8"); + writeFileSync(cliConfigPath, JSON.stringify(config4, null, 2), "utf-8"); log.info(`\xBB CLI config written to ${cliConfigPath} (sandbox: ${sandbox})`); } // agents/gemini.ts -import { mkdirSync as mkdirSync4, readFileSync as readFileSync2, writeFileSync as writeFileSync3 } from "node:fs"; +import { mkdirSync as mkdirSync5, readFileSync as readFileSync2, writeFileSync as writeFileSync2 } from "node:fs"; import { homedir as homedir3 } from "node:os"; -import { join as join7 } from "node:path"; +import { join as join8 } from "node:path"; // utils/subprocess.ts import { spawn as nodeSpawn } from "node:child_process"; @@ -99199,12 +105627,12 @@ async function spawn4(options) { durationMs }); }); - child.on("error", (error41) => { + child.on("error", (error50) => { const durationMs = Date.now() - startTime; if (timeoutId) { clearTimeout(timeoutId); } - console.error(`[spawn] Process spawn error: ${error41.message}`); + console.error(`[spawn] Process spawn error: ${error50.message}`); resolve({ stdout: stdoutBuffer, stderr: stderrBuffer, @@ -99304,7 +105732,7 @@ var gemini = agent({ if (!apiKey) { throw new Error("google_api_key or gemini_api_key is required for gemini agent"); } - const sessionPrompt = addInstructions({ payload, repo }); + const sessionPrompt = addInstructions({ payload, repo, useNativeBash: true }); log.group("Full prompt", () => log.info(sessionPrompt)); const args3 = payload.sandbox ? [ "--allowed-tools", @@ -99324,9 +105752,7 @@ var gemini = agent({ const result = await spawn4({ cmd: "node", args: [cliPath, ...args3], - env: createAgentEnv({ - GEMINI_API_KEY: apiKey - }), + env: createAgentEnv({ GEMINI_API_KEY: apiKey }), onStdout: async (chunk) => { const text = chunk.toString(); finalOutput2 += text; @@ -99372,8 +105798,8 @@ var gemini = agent({ success: true, output: finalOutput2 }; - } catch (error41) { - const errorMessage = error41 instanceof Error ? error41.message : String(error41); + } catch (error50) { + const errorMessage = error50 instanceof Error ? error50.message : String(error50); log.error(`Failed to run Gemini CLI: ${errorMessage}`); return { success: false, @@ -99385,9 +105811,9 @@ var gemini = agent({ }); function configureGeminiMcpServers({ mcpServers }) { const realHome = homedir3(); - const geminiConfigDir = join7(realHome, ".gemini"); - const settingsPath = join7(geminiConfigDir, "settings.json"); - mkdirSync4(geminiConfigDir, { recursive: true }); + const geminiConfigDir = join8(realHome, ".gemini"); + const settingsPath = join8(geminiConfigDir, "settings.json"); + mkdirSync5(geminiConfigDir, { recursive: true }); let existingSettings = {}; try { const content = readFileSync2(settingsPath, "utf-8"); @@ -99412,13 +105838,13 @@ function configureGeminiMcpServers({ mcpServers }) { ...existingSettings, mcpServers: geminiMcpServers }; - writeFileSync3(settingsPath, JSON.stringify(newSettings, null, 2), "utf-8"); + writeFileSync2(settingsPath, JSON.stringify(newSettings, null, 2), "utf-8"); log.info(`\xBB MCP config written to ${settingsPath}`); } // agents/opencode.ts -import { mkdirSync as mkdirSync5, writeFileSync as writeFileSync4 } from "node:fs"; -import { join as join8 } from "node:path"; +import { mkdirSync as mkdirSync6, writeFileSync as writeFileSync3 } from "node:fs"; +import { join as join9 } from "node:path"; var opencode = agent({ name: "opencode", install: async () => { @@ -99431,8 +105857,8 @@ var opencode = agent({ }, run: async ({ payload, apiKey: _apiKey, apiKeys, mcpServers, cliPath, repo }) => { const tempHome = process.env.PULLFROG_TEMP_DIR; - const configDir = join8(tempHome, ".config", "opencode"); - mkdirSync5(configDir, { recursive: true }); + const configDir = join9(tempHome, ".config", "opencode"); + mkdirSync6(configDir, { recursive: true }); configureOpenCode({ mcpServers, sandbox: payload.sandbox ?? false }); const prompt = addInstructions({ payload, repo }); log.group("Full prompt", () => log.info(prompt)); @@ -99442,16 +105868,16 @@ var opencode = agent({ } setupProcessAgentEnv({ HOME: tempHome }); const env3 = { - ...Object.fromEntries( - Object.entries(process.env).filter( - ([key, value2]) => value2 !== void 0 && key !== "GITHUB_TOKEN" - ) - ), - HOME: tempHome, - XDG_CONFIG_HOME: join8(tempHome, ".config") + ...createAgentEnv({ HOME: tempHome }), + XDG_CONFIG_HOME: join9(tempHome, ".config") }; + delete env3.GITHUB_TOKEN; for (const [key, value2] of Object.entries(apiKeys || {})) { - env3[key.toUpperCase()] = value2; + const upperKey = key.toUpperCase(); + env3[upperKey] = value2; + if (upperKey === "GEMINI_API_KEY") { + env3.GOOGLE_GENERATIVE_AI_API_KEY = value2; + } } const repoDir = process.cwd(); log.info(`\u{1F680} Starting OpenCode CLI: ${cliPath} ${args3.join(" ")}`); @@ -99520,8 +105946,8 @@ var opencode = agent({ } } }); - const duration2 = Date.now() - startTime; - log.info(`\u2705 OpenCode CLI completed in ${duration2}ms with exit code ${result.exitCode}`); + const duration6 = Date.now() - startTime; + log.info(`\u2705 OpenCode CLI completed in ${duration6}ms with exit code ${result.exitCode}`); if (!tokensLogged && (accumulatedTokens.input > 0 || accumulatedTokens.output > 0)) { const totalTokens = accumulatedTokens.input + accumulatedTokens.output; await log.summaryTable([ @@ -99552,9 +105978,9 @@ var opencode = agent({ }); function configureOpenCode({ mcpServers, sandbox }) { const tempHome = process.env.PULLFROG_TEMP_DIR; - const configDir = join8(tempHome, ".config", "opencode"); - mkdirSync5(configDir, { recursive: true }); - const configPath = join8(configDir, "opencode.json"); + const configDir = join9(tempHome, ".config", "opencode"); + mkdirSync6(configDir, { recursive: true }); + const configPath = join9(configDir, "opencode.json"); const opencodeMcpServers = {}; for (const [serverName, serverConfig] of Object.entries(mcpServers)) { if (serverConfig.type !== "http") { @@ -99570,31 +105996,19 @@ function configureOpenCode({ mcpServers, sandbox }) { 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 config2 = { + const permission = sandbox ? { edit: "deny", bash: "deny", webfetch: "deny", doom_loop: "allow", external_directory: "allow" } : { edit: "allow", bash: "deny", webfetch: "allow", doom_loop: "allow", external_directory: "allow" }; + const config4 = { mcp: opencodeMcpServers, permission }; - const configJson = JSON.stringify(config2, null, 2); + const configJson = JSON.stringify(config4, null, 2); try { - writeFileSync4(configPath, configJson, "utf-8"); - } catch (error41) { + writeFileSync3(configPath, configJson, "utf-8"); + } catch (error50) { log.error( - `failed to write OpenCode config to ${configPath}: ${error41 instanceof Error ? error41.message : String(error41)}` + `failed to write OpenCode config to ${configPath}: ${error50 instanceof Error ? error50.message : String(error50)}` ); - throw error41; + throw error50; } log.info(`\xBB OpenCode config written to ${configPath} (sandbox: ${sandbox})`); log.debug(`OpenCode config contents: @@ -99718,10 +106132,10 @@ var messageHandlers4 = { }, result: async (event) => { const status = event.status || "unknown"; - const duration2 = event.stats?.duration_ms || 0; + const duration6 = 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=${duration6}ms, tool_calls=${toolCalls}` ); if (event.status === "error") { log.error(`\u274C OpenCode CLI failed: ${JSON.stringify(event)}`); @@ -99730,7 +106144,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=${duration6}ms` ); if ((inputTokens > 0 || outputTokens > 0) && !tokensLogged) { await log.summaryTable([ @@ -99759,7 +106173,7 @@ var agents = { // main.ts import { mkdtemp as mkdtemp2 } from "node:fs/promises"; import { tmpdir as tmpdir2 } from "node:os"; -import { join as join12 } from "node:path"; +import { join as join13 } from "node:path"; // utils/api.ts var DEFAULT_REPO_SETTINGS = { @@ -99848,8 +106262,8 @@ function buildPullfrogFooter(params) { } if (params.workflowRun) { const baseUrl = `https://github.com/${params.workflowRun.owner}/${params.workflowRun.repo}/actions/runs/${params.workflowRun.runId}`; - const url2 = params.workflowRun.jobId ? `${baseUrl}/job/${params.workflowRun.jobId}` : baseUrl; - parts.push(`[View workflow run](${url2})`); + const url4 = params.workflowRun.jobId ? `${baseUrl}/job/${params.workflowRun.jobId}` : baseUrl; + parts.push(`[View workflow run](${url4})`); } const allParts = [ ...parts, @@ -99876,8 +106290,8 @@ var handleToolSuccess = (data) => { content: [{ type: "text", text }] }; }; -var handleToolError = (error41) => { - const errorMessage = error41 instanceof Error ? error41.message : String(error41); +var handleToolError = (error50) => { + const errorMessage = error50 instanceof Error ? error50.message : String(error50); return { content: [ { @@ -99893,8 +106307,8 @@ var execute = (fn2) => { try { const result = await fn2(params); return handleToolSuccess(result); - } catch (error41) { - return handleToolError(error41); + } catch (error50) { + return handleToolError(error50); } }; }; @@ -100215,10 +106629,10 @@ async function deleteProgressComment(ctx) { repo: ctx.name, comment_id: existingCommentId }); - } catch (error41) { - if (error41 instanceof Error && error41.message.includes("Not Found")) { + } catch (error50) { + if (error50 instanceof Error && error50.message.includes("Not Found")) { } else { - throw error41; + throw error50; } } progressCommentId = null; @@ -100330,60 +106744,2361 @@ configure({ // mcp/server.ts import { createServer } from "node:net"; -// 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"]; +// ../node_modules/.pnpm/@modelcontextprotocol+sdk@1.25.2_hono@4.10.6_zod@4.3.5/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-compat.js +init_v3(); + +// ../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/mini/external.js +init_core2(); + +// ../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/mini/parse.js +init_core2(); + +// ../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/mini/schemas.js +init_core2(); +init_util2(); + +// ../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/mini/checks.js +init_core2(); + +// ../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/mini/external.js +init_core2(); +init_json_schema_processors(); +init_locales(); + +// ../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/mini/iso.js +init_core2(); + +// ../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/mini/coerce.js +init_core2(); + +// ../node_modules/.pnpm/@modelcontextprotocol+sdk@1.25.2_hono@4.10.6_zod@4.3.5/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-compat.js +function isZ4Schema(s) { + const schema2 = s; + return !!schema2._zod; +} +function safeParse5(schema2, data) { + if (isZ4Schema(schema2)) { + const result2 = safeParse4(schema2, data); + return result2; + } + const v3Schema = schema2; + const result = v3Schema.safeParse(data); + return result; +} +function getObjectShape(schema2) { + if (!schema2) + return void 0; + let rawShape; + if (isZ4Schema(schema2)) { + const v4Schema = schema2; + rawShape = v4Schema._zod?.def?.shape; + } else { + const v3Schema = schema2; + rawShape = v3Schema.shape; + } + if (!rawShape) + return void 0; + if (typeof rawShape === "function") { + try { + return rawShape(); + } catch { + return void 0; + } + } + return rawShape; +} +function getLiteralValue(schema2) { + if (isZ4Schema(schema2)) { + const v4Schema = schema2; + const def2 = v4Schema._zod?.def; + if (def2) { + if (def2.value !== void 0) + return def2.value; + if (Array.isArray(def2.values) && def2.values.length > 0) { + return def2.values[0]; + } + } + } + const v3Schema = schema2; + const def = v3Schema._def; + if (def) { + if (def.value !== void 0) + return def.value; + if (Array.isArray(def.values) && def.values.length > 0) { + return def.values[0]; + } + } + const directValue = schema2.value; + if (directValue !== void 0) + return directValue; + return void 0; +} + +// ../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/classic/external.js +var external_exports3 = {}; +__export(external_exports3, { + $brand: () => $brand2, + $input: () => $input2, + $output: () => $output2, + NEVER: () => NEVER2, + TimePrecision: () => TimePrecision, + ZodAny: () => ZodAny3, + ZodArray: () => ZodArray4, + ZodBase64: () => ZodBase642, + ZodBase64URL: () => ZodBase64URL2, + ZodBigInt: () => ZodBigInt3, + ZodBigIntFormat: () => ZodBigIntFormat, + ZodBoolean: () => ZodBoolean4, + ZodCIDRv4: () => ZodCIDRv42, + ZodCIDRv6: () => ZodCIDRv62, + ZodCUID: () => ZodCUID3, + ZodCUID2: () => ZodCUID22, + ZodCatch: () => ZodCatch4, + ZodCodec: () => ZodCodec, + ZodCustom: () => ZodCustom2, + ZodCustomStringFormat: () => ZodCustomStringFormat, + ZodDate: () => ZodDate3, + ZodDefault: () => ZodDefault4, + ZodDiscriminatedUnion: () => ZodDiscriminatedUnion4, + ZodE164: () => ZodE1642, + ZodEmail: () => ZodEmail2, + ZodEmoji: () => ZodEmoji2, + ZodEnum: () => ZodEnum4, + ZodError: () => ZodError4, + ZodExactOptional: () => ZodExactOptional, + ZodFile: () => ZodFile, + ZodFirstPartyTypeKind: () => ZodFirstPartyTypeKind3, + ZodFunction: () => ZodFunction3, + ZodGUID: () => ZodGUID2, + ZodIPv4: () => ZodIPv42, + ZodIPv6: () => ZodIPv62, + ZodISODate: () => ZodISODate2, + ZodISODateTime: () => ZodISODateTime2, + ZodISODuration: () => ZodISODuration2, + ZodISOTime: () => ZodISOTime2, + ZodIntersection: () => ZodIntersection4, + ZodIssueCode: () => ZodIssueCode3, + ZodJWT: () => ZodJWT2, + ZodKSUID: () => ZodKSUID2, + ZodLazy: () => ZodLazy3, + ZodLiteral: () => ZodLiteral4, + ZodMAC: () => ZodMAC, + ZodMap: () => ZodMap3, + ZodNaN: () => ZodNaN3, + ZodNanoID: () => ZodNanoID2, + ZodNever: () => ZodNever4, + ZodNonOptional: () => ZodNonOptional2, + ZodNull: () => ZodNull4, + ZodNullable: () => ZodNullable4, + ZodNumber: () => ZodNumber4, + ZodNumberFormat: () => ZodNumberFormat2, + ZodObject: () => ZodObject4, + ZodOptional: () => ZodOptional4, + ZodPipe: () => ZodPipe2, + ZodPrefault: () => ZodPrefault2, + ZodPromise: () => ZodPromise3, + ZodReadonly: () => ZodReadonly4, + ZodRealError: () => ZodRealError2, + ZodRecord: () => ZodRecord4, + ZodSet: () => ZodSet3, + ZodString: () => ZodString4, + ZodStringFormat: () => ZodStringFormat2, + ZodSuccess: () => ZodSuccess, + ZodSymbol: () => ZodSymbol3, + ZodTemplateLiteral: () => ZodTemplateLiteral, + ZodTransform: () => ZodTransform2, + ZodTuple: () => ZodTuple3, + ZodType: () => ZodType4, + ZodULID: () => ZodULID2, + ZodURL: () => ZodURL2, + ZodUUID: () => ZodUUID2, + ZodUndefined: () => ZodUndefined3, + ZodUnion: () => ZodUnion4, + ZodUnknown: () => ZodUnknown4, + ZodVoid: () => ZodVoid3, + ZodXID: () => ZodXID2, + ZodXor: () => ZodXor, + _ZodString: () => _ZodString2, + _default: () => _default3, + _function: () => _function, + any: () => any, + array: () => array2, + base64: () => base644, + base64url: () => base64url3, + bigint: () => bigint2, + boolean: () => boolean4, + catch: () => _catch3, + check: () => check2, + cidrv4: () => cidrv43, + cidrv6: () => cidrv63, + clone: () => clone2, + codec: () => codec, + coerce: () => coerce_exports2, + config: () => config2, + core: () => core_exports2, + cuid: () => cuid4, + cuid2: () => cuid23, + custom: () => custom2, + date: () => date5, + decode: () => decode2, + decodeAsync: () => decodeAsync2, + describe: () => describe2, + discriminatedUnion: () => discriminatedUnion2, + e164: () => e1643, + email: () => email4, + emoji: () => emoji3, + encode: () => encode3, + encodeAsync: () => encodeAsync2, + endsWith: () => _endsWith2, + enum: () => _enum3, + exactOptional: () => exactOptional, + file: () => file, + flattenError: () => flattenError2, + float32: () => float32, + float64: () => float64, + formatError: () => formatError2, + fromJSONSchema: () => fromJSONSchema, + function: () => _function, + getErrorMap: () => getErrorMap3, + globalRegistry: () => globalRegistry2, + gt: () => _gt2, + gte: () => _gte2, + guid: () => guid3, + hash: () => hash, + hex: () => hex3, + hostname: () => hostname3, + httpUrl: () => httpUrl, + includes: () => _includes2, + instanceof: () => _instanceof, + int: () => int2, + int32: () => int32, + int64: () => int64, + intersection: () => intersection2, + ipv4: () => ipv43, + ipv6: () => ipv63, + iso: () => iso_exports2, + json: () => json3, + jwt: () => jwt, + keyof: () => keyof, + ksuid: () => ksuid3, + lazy: () => lazy, + length: () => _length2, + literal: () => literal2, + locales: () => locales_exports, + looseObject: () => looseObject2, + looseRecord: () => looseRecord, + lowercase: () => _lowercase2, + lt: () => _lt2, + lte: () => _lte2, + mac: () => mac2, + map: () => map, + maxLength: () => _maxLength2, + maxSize: () => _maxSize, + meta: () => meta2, + mime: () => _mime, + minLength: () => _minLength2, + minSize: () => _minSize, + multipleOf: () => _multipleOf2, + nan: () => nan, + nanoid: () => nanoid3, + nativeEnum: () => nativeEnum, + negative: () => _negative, + never: () => never2, + nonnegative: () => _nonnegative, + nonoptional: () => nonoptional2, + nonpositive: () => _nonpositive, + normalize: () => _normalize2, + null: () => _null6, + nullable: () => nullable2, + nullish: () => nullish3, + number: () => number5, + object: () => object4, + optional: () => optional2, + overwrite: () => _overwrite2, + parse: () => parse3, + parseAsync: () => parseAsync3, + partialRecord: () => partialRecord, + pipe: () => pipe2, + positive: () => _positive, + prefault: () => prefault2, + preprocess: () => preprocess2, + prettifyError: () => prettifyError, + promise: () => promise, + property: () => _property, + readonly: () => readonly2, + record: () => record2, + refine: () => refine2, + regex: () => _regex2, + regexes: () => regexes_exports, + registry: () => registry3, + safeDecode: () => safeDecode2, + safeDecodeAsync: () => safeDecodeAsync2, + safeEncode: () => safeEncode2, + safeEncodeAsync: () => safeEncodeAsync2, + safeParse: () => safeParse6, + safeParseAsync: () => safeParseAsync4, + set: () => set, + setErrorMap: () => setErrorMap, + size: () => _size, + slugify: () => _slugify, + startsWith: () => _startsWith2, + strictObject: () => strictObject, + string: () => string5, + stringFormat: () => stringFormat, + stringbool: () => stringbool, + success: () => success, + superRefine: () => superRefine2, + symbol: () => symbol, + templateLiteral: () => templateLiteral, + toJSONSchema: () => toJSONSchema, + toLowerCase: () => _toLowerCase2, + toUpperCase: () => _toUpperCase2, + transform: () => transform2, + treeifyError: () => treeifyError, + trim: () => _trim2, + tuple: () => tuple, + uint32: () => uint32, + uint64: () => uint64, + ulid: () => ulid3, + undefined: () => _undefined3, + union: () => union2, + unknown: () => unknown3, + uppercase: () => _uppercase2, + url: () => url2, + util: () => util_exports, + uuid: () => uuid5, + uuidv4: () => uuidv4, + uuidv6: () => uuidv6, + uuidv7: () => uuidv7, + void: () => _void2, + xid: () => xid3, + xor: () => xor +}); +init_core2(); + +// ../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/classic/schemas.js +var schemas_exports3 = {}; +__export(schemas_exports3, { + ZodAny: () => ZodAny3, + ZodArray: () => ZodArray4, + ZodBase64: () => ZodBase642, + ZodBase64URL: () => ZodBase64URL2, + ZodBigInt: () => ZodBigInt3, + ZodBigIntFormat: () => ZodBigIntFormat, + ZodBoolean: () => ZodBoolean4, + ZodCIDRv4: () => ZodCIDRv42, + ZodCIDRv6: () => ZodCIDRv62, + ZodCUID: () => ZodCUID3, + ZodCUID2: () => ZodCUID22, + ZodCatch: () => ZodCatch4, + ZodCodec: () => ZodCodec, + ZodCustom: () => ZodCustom2, + ZodCustomStringFormat: () => ZodCustomStringFormat, + ZodDate: () => ZodDate3, + ZodDefault: () => ZodDefault4, + ZodDiscriminatedUnion: () => ZodDiscriminatedUnion4, + ZodE164: () => ZodE1642, + ZodEmail: () => ZodEmail2, + ZodEmoji: () => ZodEmoji2, + ZodEnum: () => ZodEnum4, + ZodExactOptional: () => ZodExactOptional, + ZodFile: () => ZodFile, + ZodFunction: () => ZodFunction3, + ZodGUID: () => ZodGUID2, + ZodIPv4: () => ZodIPv42, + ZodIPv6: () => ZodIPv62, + ZodIntersection: () => ZodIntersection4, + ZodJWT: () => ZodJWT2, + ZodKSUID: () => ZodKSUID2, + ZodLazy: () => ZodLazy3, + ZodLiteral: () => ZodLiteral4, + ZodMAC: () => ZodMAC, + ZodMap: () => ZodMap3, + ZodNaN: () => ZodNaN3, + ZodNanoID: () => ZodNanoID2, + ZodNever: () => ZodNever4, + ZodNonOptional: () => ZodNonOptional2, + ZodNull: () => ZodNull4, + ZodNullable: () => ZodNullable4, + ZodNumber: () => ZodNumber4, + ZodNumberFormat: () => ZodNumberFormat2, + ZodObject: () => ZodObject4, + ZodOptional: () => ZodOptional4, + ZodPipe: () => ZodPipe2, + ZodPrefault: () => ZodPrefault2, + ZodPromise: () => ZodPromise3, + ZodReadonly: () => ZodReadonly4, + ZodRecord: () => ZodRecord4, + ZodSet: () => ZodSet3, + ZodString: () => ZodString4, + ZodStringFormat: () => ZodStringFormat2, + ZodSuccess: () => ZodSuccess, + ZodSymbol: () => ZodSymbol3, + ZodTemplateLiteral: () => ZodTemplateLiteral, + ZodTransform: () => ZodTransform2, + ZodTuple: () => ZodTuple3, + ZodType: () => ZodType4, + ZodULID: () => ZodULID2, + ZodURL: () => ZodURL2, + ZodUUID: () => ZodUUID2, + ZodUndefined: () => ZodUndefined3, + ZodUnion: () => ZodUnion4, + ZodUnknown: () => ZodUnknown4, + ZodVoid: () => ZodVoid3, + ZodXID: () => ZodXID2, + ZodXor: () => ZodXor, + _ZodString: () => _ZodString2, + _default: () => _default3, + _function: () => _function, + any: () => any, + array: () => array2, + base64: () => base644, + base64url: () => base64url3, + bigint: () => bigint2, + boolean: () => boolean4, + catch: () => _catch3, + check: () => check2, + cidrv4: () => cidrv43, + cidrv6: () => cidrv63, + codec: () => codec, + cuid: () => cuid4, + cuid2: () => cuid23, + custom: () => custom2, + date: () => date5, + describe: () => describe2, + discriminatedUnion: () => discriminatedUnion2, + e164: () => e1643, + email: () => email4, + emoji: () => emoji3, + enum: () => _enum3, + exactOptional: () => exactOptional, + file: () => file, + float32: () => float32, + float64: () => float64, + function: () => _function, + guid: () => guid3, + hash: () => hash, + hex: () => hex3, + hostname: () => hostname3, + httpUrl: () => httpUrl, + instanceof: () => _instanceof, + int: () => int2, + int32: () => int32, + int64: () => int64, + intersection: () => intersection2, + ipv4: () => ipv43, + ipv6: () => ipv63, + json: () => json3, + jwt: () => jwt, + keyof: () => keyof, + ksuid: () => ksuid3, + lazy: () => lazy, + literal: () => literal2, + looseObject: () => looseObject2, + looseRecord: () => looseRecord, + mac: () => mac2, + map: () => map, + meta: () => meta2, + nan: () => nan, + nanoid: () => nanoid3, + nativeEnum: () => nativeEnum, + never: () => never2, + nonoptional: () => nonoptional2, + null: () => _null6, + nullable: () => nullable2, + nullish: () => nullish3, + number: () => number5, + object: () => object4, + optional: () => optional2, + partialRecord: () => partialRecord, + pipe: () => pipe2, + prefault: () => prefault2, + preprocess: () => preprocess2, + promise: () => promise, + readonly: () => readonly2, + record: () => record2, + refine: () => refine2, + set: () => set, + strictObject: () => strictObject, + string: () => string5, + stringFormat: () => stringFormat, + stringbool: () => stringbool, + success: () => success, + superRefine: () => superRefine2, + symbol: () => symbol, + templateLiteral: () => templateLiteral, + transform: () => transform2, + tuple: () => tuple, + uint32: () => uint32, + uint64: () => uint64, + ulid: () => ulid3, + undefined: () => _undefined3, + union: () => union2, + unknown: () => unknown3, + url: () => url2, + uuid: () => uuid5, + uuidv4: () => uuidv4, + uuidv6: () => uuidv6, + uuidv7: () => uuidv7, + void: () => _void2, + xid: () => xid3, + xor: () => xor +}); +init_core2(); +init_core2(); +init_json_schema_processors(); +init_to_json_schema(); + +// ../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/classic/checks.js +var checks_exports2 = {}; +__export(checks_exports2, { + endsWith: () => _endsWith2, + gt: () => _gt2, + gte: () => _gte2, + includes: () => _includes2, + length: () => _length2, + lowercase: () => _lowercase2, + lt: () => _lt2, + lte: () => _lte2, + maxLength: () => _maxLength2, + maxSize: () => _maxSize, + mime: () => _mime, + minLength: () => _minLength2, + minSize: () => _minSize, + multipleOf: () => _multipleOf2, + negative: () => _negative, + nonnegative: () => _nonnegative, + nonpositive: () => _nonpositive, + normalize: () => _normalize2, + overwrite: () => _overwrite2, + positive: () => _positive, + property: () => _property, + regex: () => _regex2, + size: () => _size, + slugify: () => _slugify, + startsWith: () => _startsWith2, + toLowerCase: () => _toLowerCase2, + toUpperCase: () => _toUpperCase2, + trim: () => _trim2, + uppercase: () => _uppercase2 +}); +init_core2(); + +// ../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/classic/iso.js +var iso_exports2 = {}; +__export(iso_exports2, { + ZodISODate: () => ZodISODate2, + ZodISODateTime: () => ZodISODateTime2, + ZodISODuration: () => ZodISODuration2, + ZodISOTime: () => ZodISOTime2, + date: () => date4, + datetime: () => datetime4, + duration: () => duration4, + time: () => time4 +}); +init_core2(); +var ZodISODateTime2 = /* @__PURE__ */ $constructor2("ZodISODateTime", (inst, def) => { + $ZodISODateTime2.init(inst, def); + ZodStringFormat2.init(inst, def); +}); +function datetime4(params) { + return _isoDateTime2(ZodISODateTime2, params); +} +var ZodISODate2 = /* @__PURE__ */ $constructor2("ZodISODate", (inst, def) => { + $ZodISODate2.init(inst, def); + ZodStringFormat2.init(inst, def); +}); +function date4(params) { + return _isoDate2(ZodISODate2, params); +} +var ZodISOTime2 = /* @__PURE__ */ $constructor2("ZodISOTime", (inst, def) => { + $ZodISOTime2.init(inst, def); + ZodStringFormat2.init(inst, def); +}); +function time4(params) { + return _isoTime2(ZodISOTime2, params); +} +var ZodISODuration2 = /* @__PURE__ */ $constructor2("ZodISODuration", (inst, def) => { + $ZodISODuration2.init(inst, def); + ZodStringFormat2.init(inst, def); +}); +function duration4(params) { + return _isoDuration2(ZodISODuration2, params); +} + +// ../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/classic/parse.js +init_core2(); + +// ../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/classic/errors.js +init_core2(); +init_core2(); +init_util2(); +var initializer4 = (inst, issues) => { + $ZodError2.init(inst, issues); + inst.name = "ZodError"; + Object.defineProperties(inst, { + format: { + value: (mapper) => formatError2(inst, mapper) + // enumerable: false, + }, + flatten: { + value: (mapper) => flattenError2(inst, mapper) + // enumerable: false, + }, + addIssue: { + value: (issue4) => { + inst.issues.push(issue4); + 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, + } + }); +}; +var ZodError4 = $constructor2("ZodError", initializer4); +var ZodRealError2 = $constructor2("ZodError", initializer4, { + Parent: Error +}); + +// ../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/classic/parse.js +var parse3 = /* @__PURE__ */ _parse2(ZodRealError2); +var parseAsync3 = /* @__PURE__ */ _parseAsync2(ZodRealError2); +var safeParse6 = /* @__PURE__ */ _safeParse2(ZodRealError2); +var safeParseAsync4 = /* @__PURE__ */ _safeParseAsync2(ZodRealError2); +var encode3 = /* @__PURE__ */ _encode(ZodRealError2); +var decode2 = /* @__PURE__ */ _decode(ZodRealError2); +var encodeAsync2 = /* @__PURE__ */ _encodeAsync(ZodRealError2); +var decodeAsync2 = /* @__PURE__ */ _decodeAsync(ZodRealError2); +var safeEncode2 = /* @__PURE__ */ _safeEncode(ZodRealError2); +var safeDecode2 = /* @__PURE__ */ _safeDecode(ZodRealError2); +var safeEncodeAsync2 = /* @__PURE__ */ _safeEncodeAsync(ZodRealError2); +var safeDecodeAsync2 = /* @__PURE__ */ _safeDecodeAsync(ZodRealError2); + +// ../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/classic/schemas.js +var ZodType4 = /* @__PURE__ */ $constructor2("ZodType", (inst, def) => { + $ZodType2.init(inst, def); + Object.assign(inst["~standard"], { + jsonSchema: { + input: createStandardJSONSchemaMethod(inst, "input"), + output: createStandardJSONSchemaMethod(inst, "output") + } + }); + inst.toJSONSchema = createToJSONSchemaMethod(inst, {}); + inst.def = def; + inst.type = def.type; + Object.defineProperty(inst, "_def", { value: def }); + inst.check = (...checks) => { + return inst.clone(util_exports.mergeDefs(def, { + checks: [ + ...def.checks ?? [], + ...checks.map((ch) => typeof ch === "function" ? { _zod: { check: ch, def: { check: "custom" }, onattach: [] } } : ch) + ] + }), { + parent: true + }); + }; + inst.with = inst.check; + inst.clone = (def2, params) => clone2(inst, def2, params); + inst.brand = () => inst; + inst.register = ((reg, meta3) => { + reg.add(inst, meta3); + return inst; + }); + inst.parse = (data, params) => parse3(inst, data, params, { callee: inst.parse }); + inst.safeParse = (data, params) => safeParse6(inst, data, params); + inst.parseAsync = async (data, params) => parseAsync3(inst, data, params, { callee: inst.parseAsync }); + inst.safeParseAsync = async (data, params) => safeParseAsync4(inst, data, params); + inst.spa = inst.safeParseAsync; + inst.encode = (data, params) => encode3(inst, data, params); + inst.decode = (data, params) => decode2(inst, data, params); + inst.encodeAsync = async (data, params) => encodeAsync2(inst, data, params); + inst.decodeAsync = async (data, params) => decodeAsync2(inst, data, params); + inst.safeEncode = (data, params) => safeEncode2(inst, data, params); + inst.safeDecode = (data, params) => safeDecode2(inst, data, params); + inst.safeEncodeAsync = async (data, params) => safeEncodeAsync2(inst, data, params); + inst.safeDecodeAsync = async (data, params) => safeDecodeAsync2(inst, data, params); + inst.refine = (check4, params) => inst.check(refine2(check4, params)); + inst.superRefine = (refinement) => inst.check(superRefine2(refinement)); + inst.overwrite = (fn2) => inst.check(_overwrite2(fn2)); + inst.optional = () => optional2(inst); + inst.exactOptional = () => exactOptional(inst); + inst.nullable = () => nullable2(inst); + inst.nullish = () => optional2(nullable2(inst)); + inst.nonoptional = (params) => nonoptional2(inst, params); + inst.array = () => array2(inst); + inst.or = (arg) => union2([inst, arg]); + inst.and = (arg) => intersection2(inst, arg); + inst.transform = (tx) => pipe2(inst, transform2(tx)); + inst.default = (def2) => _default3(inst, def2); + inst.prefault = (def2) => prefault2(inst, def2); + inst.catch = (params) => _catch3(inst, params); + inst.pipe = (target) => pipe2(inst, target); + inst.readonly = () => readonly2(inst); + inst.describe = (description) => { + const cl = inst.clone(); + globalRegistry2.add(cl, { description }); + return cl; + }; + Object.defineProperty(inst, "description", { + get() { + return globalRegistry2.get(inst)?.description; + }, + configurable: true + }); + inst.meta = (...args3) => { + if (args3.length === 0) { + return globalRegistry2.get(inst); + } + const cl = inst.clone(); + globalRegistry2.add(cl, args3[0]); + return cl; + }; + inst.isOptional = () => inst.safeParse(void 0).success; + inst.isNullable = () => inst.safeParse(null).success; + inst.apply = (fn2) => fn2(inst); + return inst; +}); +var _ZodString2 = /* @__PURE__ */ $constructor2("_ZodString", (inst, def) => { + $ZodString2.init(inst, def); + ZodType4.init(inst, def); + inst._zod.processJSONSchema = (ctx, json4, params) => stringProcessor(inst, ctx, json4, params); + const bag = inst._zod.bag; + inst.format = bag.format ?? null; + inst.minLength = bag.minimum ?? null; + inst.maxLength = bag.maximum ?? null; + inst.regex = (...args3) => inst.check(_regex2(...args3)); + inst.includes = (...args3) => inst.check(_includes2(...args3)); + inst.startsWith = (...args3) => inst.check(_startsWith2(...args3)); + inst.endsWith = (...args3) => inst.check(_endsWith2(...args3)); + inst.min = (...args3) => inst.check(_minLength2(...args3)); + inst.max = (...args3) => inst.check(_maxLength2(...args3)); + inst.length = (...args3) => inst.check(_length2(...args3)); + inst.nonempty = (...args3) => inst.check(_minLength2(1, ...args3)); + inst.lowercase = (params) => inst.check(_lowercase2(params)); + inst.uppercase = (params) => inst.check(_uppercase2(params)); + inst.trim = () => inst.check(_trim2()); + inst.normalize = (...args3) => inst.check(_normalize2(...args3)); + inst.toLowerCase = () => inst.check(_toLowerCase2()); + inst.toUpperCase = () => inst.check(_toUpperCase2()); + inst.slugify = () => inst.check(_slugify()); +}); +var ZodString4 = /* @__PURE__ */ $constructor2("ZodString", (inst, def) => { + $ZodString2.init(inst, def); + _ZodString2.init(inst, def); + inst.email = (params) => inst.check(_email2(ZodEmail2, params)); + inst.url = (params) => inst.check(_url2(ZodURL2, params)); + inst.jwt = (params) => inst.check(_jwt2(ZodJWT2, params)); + inst.emoji = (params) => inst.check(_emoji4(ZodEmoji2, params)); + inst.guid = (params) => inst.check(_guid2(ZodGUID2, params)); + inst.uuid = (params) => inst.check(_uuid2(ZodUUID2, params)); + inst.uuidv4 = (params) => inst.check(_uuidv42(ZodUUID2, params)); + inst.uuidv6 = (params) => inst.check(_uuidv62(ZodUUID2, params)); + inst.uuidv7 = (params) => inst.check(_uuidv72(ZodUUID2, params)); + inst.nanoid = (params) => inst.check(_nanoid2(ZodNanoID2, params)); + inst.guid = (params) => inst.check(_guid2(ZodGUID2, params)); + inst.cuid = (params) => inst.check(_cuid3(ZodCUID3, params)); + inst.cuid2 = (params) => inst.check(_cuid22(ZodCUID22, params)); + inst.ulid = (params) => inst.check(_ulid2(ZodULID2, params)); + inst.base64 = (params) => inst.check(_base642(ZodBase642, params)); + inst.base64url = (params) => inst.check(_base64url2(ZodBase64URL2, params)); + inst.xid = (params) => inst.check(_xid2(ZodXID2, params)); + inst.ksuid = (params) => inst.check(_ksuid2(ZodKSUID2, params)); + inst.ipv4 = (params) => inst.check(_ipv42(ZodIPv42, params)); + inst.ipv6 = (params) => inst.check(_ipv62(ZodIPv62, params)); + inst.cidrv4 = (params) => inst.check(_cidrv42(ZodCIDRv42, params)); + inst.cidrv6 = (params) => inst.check(_cidrv62(ZodCIDRv62, params)); + inst.e164 = (params) => inst.check(_e1642(ZodE1642, params)); + inst.datetime = (params) => inst.check(datetime4(params)); + inst.date = (params) => inst.check(date4(params)); + inst.time = (params) => inst.check(time4(params)); + inst.duration = (params) => inst.check(duration4(params)); +}); +function string5(params) { + return _string2(ZodString4, params); +} +var ZodStringFormat2 = /* @__PURE__ */ $constructor2("ZodStringFormat", (inst, def) => { + $ZodStringFormat2.init(inst, def); + _ZodString2.init(inst, def); +}); +var ZodEmail2 = /* @__PURE__ */ $constructor2("ZodEmail", (inst, def) => { + $ZodEmail2.init(inst, def); + ZodStringFormat2.init(inst, def); +}); +function email4(params) { + return _email2(ZodEmail2, params); +} +var ZodGUID2 = /* @__PURE__ */ $constructor2("ZodGUID", (inst, def) => { + $ZodGUID2.init(inst, def); + ZodStringFormat2.init(inst, def); +}); +function guid3(params) { + return _guid2(ZodGUID2, params); +} +var ZodUUID2 = /* @__PURE__ */ $constructor2("ZodUUID", (inst, def) => { + $ZodUUID2.init(inst, def); + ZodStringFormat2.init(inst, def); +}); +function uuid5(params) { + return _uuid2(ZodUUID2, params); +} +function uuidv4(params) { + return _uuidv42(ZodUUID2, params); +} +function uuidv6(params) { + return _uuidv62(ZodUUID2, params); +} +function uuidv7(params) { + return _uuidv72(ZodUUID2, params); +} +var ZodURL2 = /* @__PURE__ */ $constructor2("ZodURL", (inst, def) => { + $ZodURL2.init(inst, def); + ZodStringFormat2.init(inst, def); +}); +function url2(params) { + return _url2(ZodURL2, params); +} +function httpUrl(params) { + return _url2(ZodURL2, { + protocol: /^https?$/, + hostname: regexes_exports.domain, + ...util_exports.normalizeParams(params) + }); +} +var ZodEmoji2 = /* @__PURE__ */ $constructor2("ZodEmoji", (inst, def) => { + $ZodEmoji2.init(inst, def); + ZodStringFormat2.init(inst, def); +}); +function emoji3(params) { + return _emoji4(ZodEmoji2, params); +} +var ZodNanoID2 = /* @__PURE__ */ $constructor2("ZodNanoID", (inst, def) => { + $ZodNanoID2.init(inst, def); + ZodStringFormat2.init(inst, def); +}); +function nanoid3(params) { + return _nanoid2(ZodNanoID2, params); +} +var ZodCUID3 = /* @__PURE__ */ $constructor2("ZodCUID", (inst, def) => { + $ZodCUID3.init(inst, def); + ZodStringFormat2.init(inst, def); +}); +function cuid4(params) { + return _cuid3(ZodCUID3, params); +} +var ZodCUID22 = /* @__PURE__ */ $constructor2("ZodCUID2", (inst, def) => { + $ZodCUID22.init(inst, def); + ZodStringFormat2.init(inst, def); +}); +function cuid23(params) { + return _cuid22(ZodCUID22, params); +} +var ZodULID2 = /* @__PURE__ */ $constructor2("ZodULID", (inst, def) => { + $ZodULID2.init(inst, def); + ZodStringFormat2.init(inst, def); +}); +function ulid3(params) { + return _ulid2(ZodULID2, params); +} +var ZodXID2 = /* @__PURE__ */ $constructor2("ZodXID", (inst, def) => { + $ZodXID2.init(inst, def); + ZodStringFormat2.init(inst, def); +}); +function xid3(params) { + return _xid2(ZodXID2, params); +} +var ZodKSUID2 = /* @__PURE__ */ $constructor2("ZodKSUID", (inst, def) => { + $ZodKSUID2.init(inst, def); + ZodStringFormat2.init(inst, def); +}); +function ksuid3(params) { + return _ksuid2(ZodKSUID2, params); +} +var ZodIPv42 = /* @__PURE__ */ $constructor2("ZodIPv4", (inst, def) => { + $ZodIPv42.init(inst, def); + ZodStringFormat2.init(inst, def); +}); +function ipv43(params) { + return _ipv42(ZodIPv42, params); +} +var ZodMAC = /* @__PURE__ */ $constructor2("ZodMAC", (inst, def) => { + $ZodMAC.init(inst, def); + ZodStringFormat2.init(inst, def); +}); +function mac2(params) { + return _mac(ZodMAC, params); +} +var ZodIPv62 = /* @__PURE__ */ $constructor2("ZodIPv6", (inst, def) => { + $ZodIPv62.init(inst, def); + ZodStringFormat2.init(inst, def); +}); +function ipv63(params) { + return _ipv62(ZodIPv62, params); +} +var ZodCIDRv42 = /* @__PURE__ */ $constructor2("ZodCIDRv4", (inst, def) => { + $ZodCIDRv42.init(inst, def); + ZodStringFormat2.init(inst, def); +}); +function cidrv43(params) { + return _cidrv42(ZodCIDRv42, params); +} +var ZodCIDRv62 = /* @__PURE__ */ $constructor2("ZodCIDRv6", (inst, def) => { + $ZodCIDRv62.init(inst, def); + ZodStringFormat2.init(inst, def); +}); +function cidrv63(params) { + return _cidrv62(ZodCIDRv62, params); +} +var ZodBase642 = /* @__PURE__ */ $constructor2("ZodBase64", (inst, def) => { + $ZodBase642.init(inst, def); + ZodStringFormat2.init(inst, def); +}); +function base644(params) { + return _base642(ZodBase642, params); +} +var ZodBase64URL2 = /* @__PURE__ */ $constructor2("ZodBase64URL", (inst, def) => { + $ZodBase64URL2.init(inst, def); + ZodStringFormat2.init(inst, def); +}); +function base64url3(params) { + return _base64url2(ZodBase64URL2, params); +} +var ZodE1642 = /* @__PURE__ */ $constructor2("ZodE164", (inst, def) => { + $ZodE1642.init(inst, def); + ZodStringFormat2.init(inst, def); +}); +function e1643(params) { + return _e1642(ZodE1642, params); +} +var ZodJWT2 = /* @__PURE__ */ $constructor2("ZodJWT", (inst, def) => { + $ZodJWT2.init(inst, def); + ZodStringFormat2.init(inst, def); +}); +function jwt(params) { + return _jwt2(ZodJWT2, params); +} +var ZodCustomStringFormat = /* @__PURE__ */ $constructor2("ZodCustomStringFormat", (inst, def) => { + $ZodCustomStringFormat.init(inst, def); + ZodStringFormat2.init(inst, def); +}); +function stringFormat(format2, fnOrRegex, _params = {}) { + return _stringFormat(ZodCustomStringFormat, format2, fnOrRegex, _params); +} +function hostname3(_params) { + return _stringFormat(ZodCustomStringFormat, "hostname", regexes_exports.hostname, _params); +} +function hex3(_params) { + return _stringFormat(ZodCustomStringFormat, "hex", regexes_exports.hex, _params); +} +function hash(alg, params) { + const enc = params?.enc ?? "hex"; + const format2 = `${alg}_${enc}`; + const regex4 = regexes_exports[format2]; + if (!regex4) + throw new Error(`Unrecognized hash format: ${format2}`); + return _stringFormat(ZodCustomStringFormat, format2, regex4, params); +} +var ZodNumber4 = /* @__PURE__ */ $constructor2("ZodNumber", (inst, def) => { + $ZodNumber2.init(inst, def); + ZodType4.init(inst, def); + inst._zod.processJSONSchema = (ctx, json4, params) => numberProcessor(inst, ctx, json4, params); + inst.gt = (value2, params) => inst.check(_gt2(value2, params)); + inst.gte = (value2, params) => inst.check(_gte2(value2, params)); + inst.min = (value2, params) => inst.check(_gte2(value2, params)); + inst.lt = (value2, params) => inst.check(_lt2(value2, params)); + inst.lte = (value2, params) => inst.check(_lte2(value2, params)); + inst.max = (value2, params) => inst.check(_lte2(value2, params)); + inst.int = (params) => inst.check(int2(params)); + inst.safe = (params) => inst.check(int2(params)); + inst.positive = (params) => inst.check(_gt2(0, params)); + inst.nonnegative = (params) => inst.check(_gte2(0, params)); + inst.negative = (params) => inst.check(_lt2(0, params)); + inst.nonpositive = (params) => inst.check(_lte2(0, params)); + inst.multipleOf = (value2, params) => inst.check(_multipleOf2(value2, params)); + inst.step = (value2, params) => inst.check(_multipleOf2(value2, params)); + inst.finite = () => inst; + const bag = inst._zod.bag; + inst.minValue = Math.max(bag.minimum ?? Number.NEGATIVE_INFINITY, bag.exclusiveMinimum ?? Number.NEGATIVE_INFINITY) ?? null; + inst.maxValue = Math.min(bag.maximum ?? Number.POSITIVE_INFINITY, bag.exclusiveMaximum ?? Number.POSITIVE_INFINITY) ?? null; + inst.isInt = (bag.format ?? "").includes("int") || Number.isSafeInteger(bag.multipleOf ?? 0.5); + inst.isFinite = true; + inst.format = bag.format ?? null; +}); +function number5(params) { + return _number2(ZodNumber4, params); +} +var ZodNumberFormat2 = /* @__PURE__ */ $constructor2("ZodNumberFormat", (inst, def) => { + $ZodNumberFormat2.init(inst, def); + ZodNumber4.init(inst, def); +}); +function int2(params) { + return _int2(ZodNumberFormat2, params); +} +function float32(params) { + return _float32(ZodNumberFormat2, params); +} +function float64(params) { + return _float64(ZodNumberFormat2, params); +} +function int32(params) { + return _int32(ZodNumberFormat2, params); +} +function uint32(params) { + return _uint32(ZodNumberFormat2, params); +} +var ZodBoolean4 = /* @__PURE__ */ $constructor2("ZodBoolean", (inst, def) => { + $ZodBoolean2.init(inst, def); + ZodType4.init(inst, def); + inst._zod.processJSONSchema = (ctx, json4, params) => booleanProcessor(inst, ctx, json4, params); +}); +function boolean4(params) { + return _boolean2(ZodBoolean4, params); +} +var ZodBigInt3 = /* @__PURE__ */ $constructor2("ZodBigInt", (inst, def) => { + $ZodBigInt.init(inst, def); + ZodType4.init(inst, def); + inst._zod.processJSONSchema = (ctx, json4, params) => bigintProcessor(inst, ctx, json4, params); + inst.gte = (value2, params) => inst.check(_gte2(value2, params)); + inst.min = (value2, params) => inst.check(_gte2(value2, params)); + inst.gt = (value2, params) => inst.check(_gt2(value2, params)); + inst.gte = (value2, params) => inst.check(_gte2(value2, params)); + inst.min = (value2, params) => inst.check(_gte2(value2, params)); + inst.lt = (value2, params) => inst.check(_lt2(value2, params)); + inst.lte = (value2, params) => inst.check(_lte2(value2, params)); + inst.max = (value2, params) => inst.check(_lte2(value2, params)); + inst.positive = (params) => inst.check(_gt2(BigInt(0), params)); + inst.negative = (params) => inst.check(_lt2(BigInt(0), params)); + inst.nonpositive = (params) => inst.check(_lte2(BigInt(0), params)); + inst.nonnegative = (params) => inst.check(_gte2(BigInt(0), params)); + inst.multipleOf = (value2, params) => inst.check(_multipleOf2(value2, params)); + const bag = inst._zod.bag; + inst.minValue = bag.minimum ?? null; + inst.maxValue = bag.maximum ?? null; + inst.format = bag.format ?? null; +}); +function bigint2(params) { + return _bigint(ZodBigInt3, params); +} +var ZodBigIntFormat = /* @__PURE__ */ $constructor2("ZodBigIntFormat", (inst, def) => { + $ZodBigIntFormat.init(inst, def); + ZodBigInt3.init(inst, def); +}); +function int64(params) { + return _int64(ZodBigIntFormat, params); +} +function uint64(params) { + return _uint64(ZodBigIntFormat, params); +} +var ZodSymbol3 = /* @__PURE__ */ $constructor2("ZodSymbol", (inst, def) => { + $ZodSymbol.init(inst, def); + ZodType4.init(inst, def); + inst._zod.processJSONSchema = (ctx, json4, params) => symbolProcessor(inst, ctx, json4, params); +}); +function symbol(params) { + return _symbol(ZodSymbol3, params); +} +var ZodUndefined3 = /* @__PURE__ */ $constructor2("ZodUndefined", (inst, def) => { + $ZodUndefined.init(inst, def); + ZodType4.init(inst, def); + inst._zod.processJSONSchema = (ctx, json4, params) => undefinedProcessor(inst, ctx, json4, params); +}); +function _undefined3(params) { + return _undefined2(ZodUndefined3, params); +} +var ZodNull4 = /* @__PURE__ */ $constructor2("ZodNull", (inst, def) => { + $ZodNull2.init(inst, def); + ZodType4.init(inst, def); + inst._zod.processJSONSchema = (ctx, json4, params) => nullProcessor(inst, ctx, json4, params); +}); +function _null6(params) { + return _null5(ZodNull4, params); +} +var ZodAny3 = /* @__PURE__ */ $constructor2("ZodAny", (inst, def) => { + $ZodAny.init(inst, def); + ZodType4.init(inst, def); + inst._zod.processJSONSchema = (ctx, json4, params) => anyProcessor(inst, ctx, json4, params); +}); +function any() { + return _any(ZodAny3); +} +var ZodUnknown4 = /* @__PURE__ */ $constructor2("ZodUnknown", (inst, def) => { + $ZodUnknown2.init(inst, def); + ZodType4.init(inst, def); + inst._zod.processJSONSchema = (ctx, json4, params) => unknownProcessor(inst, ctx, json4, params); +}); +function unknown3() { + return _unknown2(ZodUnknown4); +} +var ZodNever4 = /* @__PURE__ */ $constructor2("ZodNever", (inst, def) => { + $ZodNever2.init(inst, def); + ZodType4.init(inst, def); + inst._zod.processJSONSchema = (ctx, json4, params) => neverProcessor(inst, ctx, json4, params); +}); +function never2(params) { + return _never2(ZodNever4, params); +} +var ZodVoid3 = /* @__PURE__ */ $constructor2("ZodVoid", (inst, def) => { + $ZodVoid.init(inst, def); + ZodType4.init(inst, def); + inst._zod.processJSONSchema = (ctx, json4, params) => voidProcessor(inst, ctx, json4, params); +}); +function _void2(params) { + return _void(ZodVoid3, params); +} +var ZodDate3 = /* @__PURE__ */ $constructor2("ZodDate", (inst, def) => { + $ZodDate.init(inst, def); + ZodType4.init(inst, def); + inst._zod.processJSONSchema = (ctx, json4, params) => dateProcessor(inst, ctx, json4, params); + inst.min = (value2, params) => inst.check(_gte2(value2, params)); + inst.max = (value2, params) => inst.check(_lte2(value2, params)); + const c = inst._zod.bag; + inst.minDate = c.minimum ? new Date(c.minimum) : null; + inst.maxDate = c.maximum ? new Date(c.maximum) : null; +}); +function date5(params) { + return _date(ZodDate3, params); +} +var ZodArray4 = /* @__PURE__ */ $constructor2("ZodArray", (inst, def) => { + $ZodArray2.init(inst, def); + ZodType4.init(inst, def); + inst._zod.processJSONSchema = (ctx, json4, params) => arrayProcessor(inst, ctx, json4, params); + inst.element = def.element; + inst.min = (minLength, params) => inst.check(_minLength2(minLength, params)); + inst.nonempty = (params) => inst.check(_minLength2(1, params)); + inst.max = (maxLength, params) => inst.check(_maxLength2(maxLength, params)); + inst.length = (len, params) => inst.check(_length2(len, params)); + inst.unwrap = () => inst.element; +}); +function array2(element, params) { + return _array2(ZodArray4, element, params); +} +function keyof(schema2) { + const shape = schema2._zod.def.shape; + return _enum3(Object.keys(shape)); +} +var ZodObject4 = /* @__PURE__ */ $constructor2("ZodObject", (inst, def) => { + $ZodObjectJIT.init(inst, def); + ZodType4.init(inst, def); + inst._zod.processJSONSchema = (ctx, json4, params) => objectProcessor(inst, ctx, json4, params); + util_exports.defineLazy(inst, "shape", () => { + return def.shape; + }); + inst.keyof = () => _enum3(Object.keys(inst._zod.def.shape)); + inst.catchall = (catchall) => inst.clone({ ...inst._zod.def, catchall }); + inst.passthrough = () => inst.clone({ ...inst._zod.def, catchall: unknown3() }); + inst.loose = () => inst.clone({ ...inst._zod.def, catchall: unknown3() }); + inst.strict = () => inst.clone({ ...inst._zod.def, catchall: never2() }); + inst.strip = () => inst.clone({ ...inst._zod.def, catchall: void 0 }); + inst.extend = (incoming) => { + return util_exports.extend(inst, incoming); + }; + inst.safeExtend = (incoming) => { + return util_exports.safeExtend(inst, incoming); + }; + inst.merge = (other) => util_exports.merge(inst, other); + inst.pick = (mask) => util_exports.pick(inst, mask); + inst.omit = (mask) => util_exports.omit(inst, mask); + inst.partial = (...args3) => util_exports.partial(ZodOptional4, inst, args3[0]); + inst.required = (...args3) => util_exports.required(ZodNonOptional2, inst, args3[0]); +}); +function object4(shape, params) { + const def = { + type: "object", + shape: shape ?? {}, + ...util_exports.normalizeParams(params) + }; + return new ZodObject4(def); +} +function strictObject(shape, params) { + return new ZodObject4({ + type: "object", + shape, + catchall: never2(), + ...util_exports.normalizeParams(params) + }); +} +function looseObject2(shape, params) { + return new ZodObject4({ + type: "object", + shape, + catchall: unknown3(), + ...util_exports.normalizeParams(params) + }); +} +var ZodUnion4 = /* @__PURE__ */ $constructor2("ZodUnion", (inst, def) => { + $ZodUnion2.init(inst, def); + ZodType4.init(inst, def); + inst._zod.processJSONSchema = (ctx, json4, params) => unionProcessor(inst, ctx, json4, params); + inst.options = def.options; +}); +function union2(options, params) { + return new ZodUnion4({ + type: "union", + options, + ...util_exports.normalizeParams(params) + }); +} +var ZodXor = /* @__PURE__ */ $constructor2("ZodXor", (inst, def) => { + ZodUnion4.init(inst, def); + $ZodXor.init(inst, def); + inst._zod.processJSONSchema = (ctx, json4, params) => unionProcessor(inst, ctx, json4, params); + inst.options = def.options; +}); +function xor(options, params) { + return new ZodXor({ + type: "union", + options, + inclusive: false, + ...util_exports.normalizeParams(params) + }); +} +var ZodDiscriminatedUnion4 = /* @__PURE__ */ $constructor2("ZodDiscriminatedUnion", (inst, def) => { + ZodUnion4.init(inst, def); + $ZodDiscriminatedUnion2.init(inst, def); +}); +function discriminatedUnion2(discriminator, options, params) { + return new ZodDiscriminatedUnion4({ + type: "union", + options, + discriminator, + ...util_exports.normalizeParams(params) + }); +} +var ZodIntersection4 = /* @__PURE__ */ $constructor2("ZodIntersection", (inst, def) => { + $ZodIntersection2.init(inst, def); + ZodType4.init(inst, def); + inst._zod.processJSONSchema = (ctx, json4, params) => intersectionProcessor(inst, ctx, json4, params); +}); +function intersection2(left, right) { + return new ZodIntersection4({ + type: "intersection", + left, + right + }); +} +var ZodTuple3 = /* @__PURE__ */ $constructor2("ZodTuple", (inst, def) => { + $ZodTuple.init(inst, def); + ZodType4.init(inst, def); + inst._zod.processJSONSchema = (ctx, json4, params) => tupleProcessor(inst, ctx, json4, params); + inst.rest = (rest) => inst.clone({ + ...inst._zod.def, + rest + }); +}); +function tuple(items, _paramsOrRest, _params) { + const hasRest = _paramsOrRest instanceof $ZodType2; + const params = hasRest ? _params : _paramsOrRest; + const rest = hasRest ? _paramsOrRest : null; + return new ZodTuple3({ + type: "tuple", + items, + rest, + ...util_exports.normalizeParams(params) + }); +} +var ZodRecord4 = /* @__PURE__ */ $constructor2("ZodRecord", (inst, def) => { + $ZodRecord2.init(inst, def); + ZodType4.init(inst, def); + inst._zod.processJSONSchema = (ctx, json4, params) => recordProcessor(inst, ctx, json4, params); + inst.keyType = def.keyType; + inst.valueType = def.valueType; +}); +function record2(keyType, valueType, params) { + return new ZodRecord4({ + type: "record", + keyType, + valueType, + ...util_exports.normalizeParams(params) + }); +} +function partialRecord(keyType, valueType, params) { + const k = clone2(keyType); + k._zod.values = void 0; + return new ZodRecord4({ + type: "record", + keyType: k, + valueType, + ...util_exports.normalizeParams(params) + }); +} +function looseRecord(keyType, valueType, params) { + return new ZodRecord4({ + type: "record", + keyType, + valueType, + mode: "loose", + ...util_exports.normalizeParams(params) + }); +} +var ZodMap3 = /* @__PURE__ */ $constructor2("ZodMap", (inst, def) => { + $ZodMap.init(inst, def); + ZodType4.init(inst, def); + inst._zod.processJSONSchema = (ctx, json4, params) => mapProcessor(inst, ctx, json4, params); + inst.keyType = def.keyType; + inst.valueType = def.valueType; + inst.min = (...args3) => inst.check(_minSize(...args3)); + inst.nonempty = (params) => inst.check(_minSize(1, params)); + inst.max = (...args3) => inst.check(_maxSize(...args3)); + inst.size = (...args3) => inst.check(_size(...args3)); +}); +function map(keyType, valueType, params) { + return new ZodMap3({ + type: "map", + keyType, + valueType, + ...util_exports.normalizeParams(params) + }); +} +var ZodSet3 = /* @__PURE__ */ $constructor2("ZodSet", (inst, def) => { + $ZodSet.init(inst, def); + ZodType4.init(inst, def); + inst._zod.processJSONSchema = (ctx, json4, params) => setProcessor(inst, ctx, json4, params); + inst.min = (...args3) => inst.check(_minSize(...args3)); + inst.nonempty = (params) => inst.check(_minSize(1, params)); + inst.max = (...args3) => inst.check(_maxSize(...args3)); + inst.size = (...args3) => inst.check(_size(...args3)); +}); +function set(valueType, params) { + return new ZodSet3({ + type: "set", + valueType, + ...util_exports.normalizeParams(params) + }); +} +var ZodEnum4 = /* @__PURE__ */ $constructor2("ZodEnum", (inst, def) => { + $ZodEnum2.init(inst, def); + ZodType4.init(inst, def); + inst._zod.processJSONSchema = (ctx, json4, params) => enumProcessor(inst, ctx, json4, params); + inst.enum = def.entries; + inst.options = Object.values(def.entries); + const keys = new Set(Object.keys(def.entries)); + inst.extract = (values, params) => { + const newEntries = {}; + for (const value2 of values) { + if (keys.has(value2)) { + newEntries[value2] = def.entries[value2]; + } else + throw new Error(`Key ${value2} not found in enum`); + } + return new ZodEnum4({ + ...def, + checks: [], + ...util_exports.normalizeParams(params), + entries: newEntries + }); + }; + inst.exclude = (values, params) => { + const newEntries = { ...def.entries }; + for (const value2 of values) { + if (keys.has(value2)) { + delete newEntries[value2]; + } else + throw new Error(`Key ${value2} not found in enum`); + } + return new ZodEnum4({ + ...def, + checks: [], + ...util_exports.normalizeParams(params), + entries: newEntries + }); + }; +}); +function _enum3(values, params) { + const entries = Array.isArray(values) ? Object.fromEntries(values.map((v) => [v, v])) : values; + return new ZodEnum4({ + type: "enum", + entries, + ...util_exports.normalizeParams(params) + }); +} +function nativeEnum(entries, params) { + return new ZodEnum4({ + type: "enum", + entries, + ...util_exports.normalizeParams(params) + }); +} +var ZodLiteral4 = /* @__PURE__ */ $constructor2("ZodLiteral", (inst, def) => { + $ZodLiteral2.init(inst, def); + ZodType4.init(inst, def); + inst._zod.processJSONSchema = (ctx, json4, params) => literalProcessor(inst, ctx, json4, params); + inst.values = new Set(def.values); + Object.defineProperty(inst, "value", { + get() { + if (def.values.length > 1) { + throw new Error("This schema contains multiple valid literal values. Use `.values` instead."); + } + return def.values[0]; + } + }); +}); +function literal2(value2, params) { + return new ZodLiteral4({ + type: "literal", + values: Array.isArray(value2) ? value2 : [value2], + ...util_exports.normalizeParams(params) + }); +} +var ZodFile = /* @__PURE__ */ $constructor2("ZodFile", (inst, def) => { + $ZodFile.init(inst, def); + ZodType4.init(inst, def); + inst._zod.processJSONSchema = (ctx, json4, params) => fileProcessor(inst, ctx, json4, params); + inst.min = (size, params) => inst.check(_minSize(size, params)); + inst.max = (size, params) => inst.check(_maxSize(size, params)); + inst.mime = (types, params) => inst.check(_mime(Array.isArray(types) ? types : [types], params)); +}); +function file(params) { + return _file(ZodFile, params); +} +var ZodTransform2 = /* @__PURE__ */ $constructor2("ZodTransform", (inst, def) => { + $ZodTransform2.init(inst, def); + ZodType4.init(inst, def); + inst._zod.processJSONSchema = (ctx, json4, params) => transformProcessor(inst, ctx, json4, params); + inst._zod.parse = (payload, _ctx) => { + if (_ctx.direction === "backward") { + throw new $ZodEncodeError(inst.constructor.name); + } + payload.addIssue = (issue4) => { + if (typeof issue4 === "string") { + payload.issues.push(util_exports.issue(issue4, payload.value, def)); + } else { + const _issue = issue4; + if (_issue.fatal) + _issue.continue = false; + _issue.code ?? (_issue.code = "custom"); + _issue.input ?? (_issue.input = payload.value); + _issue.inst ?? (_issue.inst = inst); + payload.issues.push(util_exports.issue(_issue)); + } + }; + const output = def.transform(payload.value, payload); + if (output instanceof Promise) { + return output.then((output2) => { + payload.value = output2; + return payload; + }); + } + payload.value = output; + return payload; + }; +}); +function transform2(fn2) { + return new ZodTransform2({ + type: "transform", + transform: fn2 + }); +} +var ZodOptional4 = /* @__PURE__ */ $constructor2("ZodOptional", (inst, def) => { + $ZodOptional2.init(inst, def); + ZodType4.init(inst, def); + inst._zod.processJSONSchema = (ctx, json4, params) => optionalProcessor(inst, ctx, json4, params); + inst.unwrap = () => inst._zod.def.innerType; +}); +function optional2(innerType) { + return new ZodOptional4({ + type: "optional", + innerType + }); +} +var ZodExactOptional = /* @__PURE__ */ $constructor2("ZodExactOptional", (inst, def) => { + $ZodExactOptional.init(inst, def); + ZodType4.init(inst, def); + inst._zod.processJSONSchema = (ctx, json4, params) => optionalProcessor(inst, ctx, json4, params); + inst.unwrap = () => inst._zod.def.innerType; +}); +function exactOptional(innerType) { + return new ZodExactOptional({ + type: "optional", + innerType + }); +} +var ZodNullable4 = /* @__PURE__ */ $constructor2("ZodNullable", (inst, def) => { + $ZodNullable2.init(inst, def); + ZodType4.init(inst, def); + inst._zod.processJSONSchema = (ctx, json4, params) => nullableProcessor(inst, ctx, json4, params); + inst.unwrap = () => inst._zod.def.innerType; +}); +function nullable2(innerType) { + return new ZodNullable4({ + type: "nullable", + innerType + }); +} +function nullish3(innerType) { + return optional2(nullable2(innerType)); +} +var ZodDefault4 = /* @__PURE__ */ $constructor2("ZodDefault", (inst, def) => { + $ZodDefault2.init(inst, def); + ZodType4.init(inst, def); + inst._zod.processJSONSchema = (ctx, json4, params) => defaultProcessor(inst, ctx, json4, params); + inst.unwrap = () => inst._zod.def.innerType; + inst.removeDefault = inst.unwrap; +}); +function _default3(innerType, defaultValue) { + return new ZodDefault4({ + type: "default", + innerType, + get defaultValue() { + return typeof defaultValue === "function" ? defaultValue() : util_exports.shallowClone(defaultValue); + } + }); +} +var ZodPrefault2 = /* @__PURE__ */ $constructor2("ZodPrefault", (inst, def) => { + $ZodPrefault2.init(inst, def); + ZodType4.init(inst, def); + inst._zod.processJSONSchema = (ctx, json4, params) => prefaultProcessor(inst, ctx, json4, params); + inst.unwrap = () => inst._zod.def.innerType; +}); +function prefault2(innerType, defaultValue) { + return new ZodPrefault2({ + type: "prefault", + innerType, + get defaultValue() { + return typeof defaultValue === "function" ? defaultValue() : util_exports.shallowClone(defaultValue); + } + }); +} +var ZodNonOptional2 = /* @__PURE__ */ $constructor2("ZodNonOptional", (inst, def) => { + $ZodNonOptional2.init(inst, def); + ZodType4.init(inst, def); + inst._zod.processJSONSchema = (ctx, json4, params) => nonoptionalProcessor(inst, ctx, json4, params); + inst.unwrap = () => inst._zod.def.innerType; +}); +function nonoptional2(innerType, params) { + return new ZodNonOptional2({ + type: "nonoptional", + innerType, + ...util_exports.normalizeParams(params) + }); +} +var ZodSuccess = /* @__PURE__ */ $constructor2("ZodSuccess", (inst, def) => { + $ZodSuccess.init(inst, def); + ZodType4.init(inst, def); + inst._zod.processJSONSchema = (ctx, json4, params) => successProcessor(inst, ctx, json4, params); + inst.unwrap = () => inst._zod.def.innerType; +}); +function success(innerType) { + return new ZodSuccess({ + type: "success", + innerType + }); +} +var ZodCatch4 = /* @__PURE__ */ $constructor2("ZodCatch", (inst, def) => { + $ZodCatch2.init(inst, def); + ZodType4.init(inst, def); + inst._zod.processJSONSchema = (ctx, json4, params) => catchProcessor(inst, ctx, json4, params); + inst.unwrap = () => inst._zod.def.innerType; + inst.removeCatch = inst.unwrap; +}); +function _catch3(innerType, catchValue) { + return new ZodCatch4({ + type: "catch", + innerType, + catchValue: typeof catchValue === "function" ? catchValue : () => catchValue + }); +} +var ZodNaN3 = /* @__PURE__ */ $constructor2("ZodNaN", (inst, def) => { + $ZodNaN.init(inst, def); + ZodType4.init(inst, def); + inst._zod.processJSONSchema = (ctx, json4, params) => nanProcessor(inst, ctx, json4, params); +}); +function nan(params) { + return _nan(ZodNaN3, params); +} +var ZodPipe2 = /* @__PURE__ */ $constructor2("ZodPipe", (inst, def) => { + $ZodPipe2.init(inst, def); + ZodType4.init(inst, def); + inst._zod.processJSONSchema = (ctx, json4, params) => pipeProcessor(inst, ctx, json4, params); + inst.in = def.in; + inst.out = def.out; +}); +function pipe2(in_, out) { + return new ZodPipe2({ + type: "pipe", + in: in_, + out + // ...util.normalizeParams(params), + }); +} +var ZodCodec = /* @__PURE__ */ $constructor2("ZodCodec", (inst, def) => { + ZodPipe2.init(inst, def); + $ZodCodec.init(inst, def); +}); +function codec(in_, out, params) { + return new ZodCodec({ + type: "pipe", + in: in_, + out, + transform: params.decode, + reverseTransform: params.encode + }); +} +var ZodReadonly4 = /* @__PURE__ */ $constructor2("ZodReadonly", (inst, def) => { + $ZodReadonly2.init(inst, def); + ZodType4.init(inst, def); + inst._zod.processJSONSchema = (ctx, json4, params) => readonlyProcessor(inst, ctx, json4, params); + inst.unwrap = () => inst._zod.def.innerType; +}); +function readonly2(innerType) { + return new ZodReadonly4({ + type: "readonly", + innerType + }); +} +var ZodTemplateLiteral = /* @__PURE__ */ $constructor2("ZodTemplateLiteral", (inst, def) => { + $ZodTemplateLiteral.init(inst, def); + ZodType4.init(inst, def); + inst._zod.processJSONSchema = (ctx, json4, params) => templateLiteralProcessor(inst, ctx, json4, params); +}); +function templateLiteral(parts, params) { + return new ZodTemplateLiteral({ + type: "template_literal", + parts, + ...util_exports.normalizeParams(params) + }); +} +var ZodLazy3 = /* @__PURE__ */ $constructor2("ZodLazy", (inst, def) => { + $ZodLazy.init(inst, def); + ZodType4.init(inst, def); + inst._zod.processJSONSchema = (ctx, json4, params) => lazyProcessor(inst, ctx, json4, params); + inst.unwrap = () => inst._zod.def.getter(); +}); +function lazy(getter) { + return new ZodLazy3({ + type: "lazy", + getter + }); +} +var ZodPromise3 = /* @__PURE__ */ $constructor2("ZodPromise", (inst, def) => { + $ZodPromise.init(inst, def); + ZodType4.init(inst, def); + inst._zod.processJSONSchema = (ctx, json4, params) => promiseProcessor(inst, ctx, json4, params); + inst.unwrap = () => inst._zod.def.innerType; +}); +function promise(innerType) { + return new ZodPromise3({ + type: "promise", + innerType + }); +} +var ZodFunction3 = /* @__PURE__ */ $constructor2("ZodFunction", (inst, def) => { + $ZodFunction.init(inst, def); + ZodType4.init(inst, def); + inst._zod.processJSONSchema = (ctx, json4, params) => functionProcessor(inst, ctx, json4, params); +}); +function _function(params) { + return new ZodFunction3({ + type: "function", + input: Array.isArray(params?.input) ? tuple(params?.input) : params?.input ?? array2(unknown3()), + output: params?.output ?? unknown3() + }); +} +var ZodCustom2 = /* @__PURE__ */ $constructor2("ZodCustom", (inst, def) => { + $ZodCustom2.init(inst, def); + ZodType4.init(inst, def); + inst._zod.processJSONSchema = (ctx, json4, params) => customProcessor(inst, ctx, json4, params); +}); +function check2(fn2) { + const ch = new $ZodCheck2({ + check: "custom" + // ...util.normalizeParams(params), + }); + ch._zod.check = fn2; + return ch; +} +function custom2(fn2, _params) { + return _custom2(ZodCustom2, fn2 ?? (() => true), _params); +} +function refine2(fn2, _params = {}) { + return _refine2(ZodCustom2, fn2, _params); +} +function superRefine2(fn2) { + return _superRefine(fn2); +} +var describe2 = describe; +var meta2 = meta; +function _instanceof(cls, params = {}) { + const inst = new ZodCustom2({ + type: "custom", + check: "custom", + fn: (data) => data instanceof cls, + abort: true, + ...util_exports.normalizeParams(params) + }); + inst._zod.bag.Class = cls; + inst._zod.check = (payload) => { + if (!(payload.value instanceof cls)) { + payload.issues.push({ + code: "invalid_type", + expected: cls.name, + input: payload.value, + inst, + path: [...inst._zod.def.path ?? []] + }); + } + }; + return inst; +} +var stringbool = (...args3) => _stringbool({ + Codec: ZodCodec, + Boolean: ZodBoolean4, + String: ZodString4 +}, ...args3); +function json3(params) { + const jsonSchema2 = lazy(() => { + return union2([string5(params), number5(), boolean4(), _null6(), array2(jsonSchema2), record2(string5(), jsonSchema2)]); + }); + return jsonSchema2; +} +function preprocess2(fn2, schema2) { + return pipe2(transform2(fn2), schema2); +} + +// ../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/classic/compat.js +init_core2(); +init_core2(); +var ZodIssueCode3 = { + invalid_type: "invalid_type", + too_big: "too_big", + too_small: "too_small", + invalid_format: "invalid_format", + not_multiple_of: "not_multiple_of", + unrecognized_keys: "unrecognized_keys", + invalid_union: "invalid_union", + invalid_key: "invalid_key", + invalid_element: "invalid_element", + invalid_value: "invalid_value", + custom: "custom" +}; +function setErrorMap(map2) { + config2({ + customError: map2 + }); +} +function getErrorMap3() { + return config2().customError; +} +var ZodFirstPartyTypeKind3; +/* @__PURE__ */ (function(ZodFirstPartyTypeKind4) { +})(ZodFirstPartyTypeKind3 || (ZodFirstPartyTypeKind3 = {})); + +// ../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/classic/external.js +init_core2(); +init_en2(); +init_core2(); +init_json_schema_processors(); + +// ../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/classic/from-json-schema.js +init_registries(); +var z = { + ...schemas_exports3, + ...checks_exports2, + iso: iso_exports2 +}; +var RECOGNIZED_KEYS = /* @__PURE__ */ new Set([ + // Schema identification + "$schema", + "$ref", + "$defs", + "definitions", + // Core schema keywords + "$id", + "id", + "$comment", + "$anchor", + "$vocabulary", + "$dynamicRef", + "$dynamicAnchor", + // Type + "type", + "enum", + "const", + // Composition + "anyOf", + "oneOf", + "allOf", + "not", + // Object + "properties", + "required", + "additionalProperties", + "patternProperties", + "propertyNames", + "minProperties", + "maxProperties", + // Array + "items", + "prefixItems", + "additionalItems", + "minItems", + "maxItems", + "uniqueItems", + "contains", + "minContains", + "maxContains", + // String + "minLength", + "maxLength", + "pattern", + "format", + // Number + "minimum", + "maximum", + "exclusiveMinimum", + "exclusiveMaximum", + "multipleOf", + // Already handled metadata + "description", + "default", + // Content + "contentEncoding", + "contentMediaType", + "contentSchema", + // Unsupported (error-throwing) + "unevaluatedItems", + "unevaluatedProperties", + "if", + "then", + "else", + "dependentSchemas", + "dependentRequired", + // OpenAPI + "nullable", + "readOnly" +]); +function detectVersion(schema2, defaultTarget) { + const $schema = schema2.$schema; + if ($schema === "https://json-schema.org/draft/2020-12/schema") { + return "draft-2020-12"; + } + if ($schema === "http://json-schema.org/draft-07/schema#") { + return "draft-7"; + } + if ($schema === "http://json-schema.org/draft-04/schema#") { + return "draft-4"; + } + return defaultTarget ?? "draft-2020-12"; +} +function resolveRef(ref, ctx) { + if (!ref.startsWith("#")) { + throw new Error("External $ref is not supported, only local refs (#/...) are allowed"); + } + const path4 = ref.slice(1).split("/").filter(Boolean); + if (path4.length === 0) { + return ctx.rootSchema; + } + const defsKey = ctx.version === "draft-2020-12" ? "$defs" : "definitions"; + if (path4[0] === defsKey) { + const key = path4[1]; + if (!key || !ctx.defs[key]) { + throw new Error(`Reference not found: ${ref}`); + } + return ctx.defs[key]; + } + throw new Error(`Reference not found: ${ref}`); +} +function convertBaseSchema(schema2, ctx) { + if (schema2.not !== void 0) { + if (typeof schema2.not === "object" && Object.keys(schema2.not).length === 0) { + return z.never(); + } + throw new Error("not is not supported in Zod (except { not: {} } for never)"); + } + if (schema2.unevaluatedItems !== void 0) { + throw new Error("unevaluatedItems is not supported"); + } + if (schema2.unevaluatedProperties !== void 0) { + throw new Error("unevaluatedProperties is not supported"); + } + if (schema2.if !== void 0 || schema2.then !== void 0 || schema2.else !== void 0) { + throw new Error("Conditional schemas (if/then/else) are not supported"); + } + if (schema2.dependentSchemas !== void 0 || schema2.dependentRequired !== void 0) { + throw new Error("dependentSchemas and dependentRequired are not supported"); + } + if (schema2.$ref) { + const refPath = schema2.$ref; + if (ctx.refs.has(refPath)) { + return ctx.refs.get(refPath); + } + if (ctx.processing.has(refPath)) { + return z.lazy(() => { + if (!ctx.refs.has(refPath)) { + throw new Error(`Circular reference not resolved: ${refPath}`); + } + return ctx.refs.get(refPath); + }); + } + ctx.processing.add(refPath); + const resolved = resolveRef(refPath, ctx); + const zodSchema2 = convertSchema(resolved, ctx); + ctx.refs.set(refPath, zodSchema2); + ctx.processing.delete(refPath); + return zodSchema2; + } + if (schema2.enum !== void 0) { + const enumValues2 = schema2.enum; + if (ctx.version === "openapi-3.0" && schema2.nullable === true && enumValues2.length === 1 && enumValues2[0] === null) { + return z.null(); + } + if (enumValues2.length === 0) { + return z.never(); + } + if (enumValues2.length === 1) { + return z.literal(enumValues2[0]); + } + if (enumValues2.every((v) => typeof v === "string")) { + return z.enum(enumValues2); + } + const literalSchemas = enumValues2.map((v) => z.literal(v)); + if (literalSchemas.length < 2) { + return literalSchemas[0]; + } + return z.union([literalSchemas[0], literalSchemas[1], ...literalSchemas.slice(2)]); + } + if (schema2.const !== void 0) { + return z.literal(schema2.const); + } + const type2 = schema2.type; + if (Array.isArray(type2)) { + const typeSchemas = type2.map((t) => { + const typeSchema = { ...schema2, type: t }; + return convertBaseSchema(typeSchema, ctx); + }); + if (typeSchemas.length === 0) { + return z.never(); + } + if (typeSchemas.length === 1) { + return typeSchemas[0]; + } + return z.union(typeSchemas); + } + if (!type2) { + return z.any(); + } + let zodSchema; + switch (type2) { + case "string": { + let stringSchema = z.string(); + if (schema2.format) { + const format2 = schema2.format; + if (format2 === "email") { + stringSchema = stringSchema.check(z.email()); + } else if (format2 === "uri" || format2 === "uri-reference") { + stringSchema = stringSchema.check(z.url()); + } else if (format2 === "uuid" || format2 === "guid") { + stringSchema = stringSchema.check(z.uuid()); + } else if (format2 === "date-time") { + stringSchema = stringSchema.check(z.iso.datetime()); + } else if (format2 === "date") { + stringSchema = stringSchema.check(z.iso.date()); + } else if (format2 === "time") { + stringSchema = stringSchema.check(z.iso.time()); + } else if (format2 === "duration") { + stringSchema = stringSchema.check(z.iso.duration()); + } else if (format2 === "ipv4") { + stringSchema = stringSchema.check(z.ipv4()); + } else if (format2 === "ipv6") { + stringSchema = stringSchema.check(z.ipv6()); + } else if (format2 === "mac") { + stringSchema = stringSchema.check(z.mac()); + } else if (format2 === "cidr") { + stringSchema = stringSchema.check(z.cidrv4()); + } else if (format2 === "cidr-v6") { + stringSchema = stringSchema.check(z.cidrv6()); + } else if (format2 === "base64") { + stringSchema = stringSchema.check(z.base64()); + } else if (format2 === "base64url") { + stringSchema = stringSchema.check(z.base64url()); + } else if (format2 === "e164") { + stringSchema = stringSchema.check(z.e164()); + } else if (format2 === "jwt") { + stringSchema = stringSchema.check(z.jwt()); + } else if (format2 === "emoji") { + stringSchema = stringSchema.check(z.emoji()); + } else if (format2 === "nanoid") { + stringSchema = stringSchema.check(z.nanoid()); + } else if (format2 === "cuid") { + stringSchema = stringSchema.check(z.cuid()); + } else if (format2 === "cuid2") { + stringSchema = stringSchema.check(z.cuid2()); + } else if (format2 === "ulid") { + stringSchema = stringSchema.check(z.ulid()); + } else if (format2 === "xid") { + stringSchema = stringSchema.check(z.xid()); + } else if (format2 === "ksuid") { + stringSchema = stringSchema.check(z.ksuid()); + } + } + if (typeof schema2.minLength === "number") { + stringSchema = stringSchema.min(schema2.minLength); + } + if (typeof schema2.maxLength === "number") { + stringSchema = stringSchema.max(schema2.maxLength); + } + if (schema2.pattern) { + stringSchema = stringSchema.regex(new RegExp(schema2.pattern)); + } + zodSchema = stringSchema; + break; + } + case "number": + case "integer": { + let numberSchema = type2 === "integer" ? z.number().int() : z.number(); + if (typeof schema2.minimum === "number") { + numberSchema = numberSchema.min(schema2.minimum); + } + if (typeof schema2.maximum === "number") { + numberSchema = numberSchema.max(schema2.maximum); + } + if (typeof schema2.exclusiveMinimum === "number") { + numberSchema = numberSchema.gt(schema2.exclusiveMinimum); + } else if (schema2.exclusiveMinimum === true && typeof schema2.minimum === "number") { + numberSchema = numberSchema.gt(schema2.minimum); + } + if (typeof schema2.exclusiveMaximum === "number") { + numberSchema = numberSchema.lt(schema2.exclusiveMaximum); + } else if (schema2.exclusiveMaximum === true && typeof schema2.maximum === "number") { + numberSchema = numberSchema.lt(schema2.maximum); + } + if (typeof schema2.multipleOf === "number") { + numberSchema = numberSchema.multipleOf(schema2.multipleOf); + } + zodSchema = numberSchema; + break; + } + case "boolean": { + zodSchema = z.boolean(); + break; + } + case "null": { + zodSchema = z.null(); + break; + } + case "object": { + const shape = {}; + const properties = schema2.properties || {}; + const requiredSet = new Set(schema2.required || []); + for (const [key, propSchema] of Object.entries(properties)) { + const propZodSchema = convertSchema(propSchema, ctx); + shape[key] = requiredSet.has(key) ? propZodSchema : propZodSchema.optional(); + } + if (schema2.propertyNames) { + const keySchema = convertSchema(schema2.propertyNames, ctx); + const valueSchema = schema2.additionalProperties && typeof schema2.additionalProperties === "object" ? convertSchema(schema2.additionalProperties, ctx) : z.any(); + if (Object.keys(shape).length === 0) { + zodSchema = z.record(keySchema, valueSchema); + break; + } + const objectSchema2 = z.object(shape).passthrough(); + const recordSchema = z.looseRecord(keySchema, valueSchema); + zodSchema = z.intersection(objectSchema2, recordSchema); + break; + } + if (schema2.patternProperties) { + const patternProps = schema2.patternProperties; + const patternKeys = Object.keys(patternProps); + const looseRecords = []; + for (const pattern of patternKeys) { + const patternValue = convertSchema(patternProps[pattern], ctx); + const keySchema = z.string().regex(new RegExp(pattern)); + looseRecords.push(z.looseRecord(keySchema, patternValue)); + } + const schemasToIntersect = []; + if (Object.keys(shape).length > 0) { + schemasToIntersect.push(z.object(shape).passthrough()); + } + schemasToIntersect.push(...looseRecords); + if (schemasToIntersect.length === 0) { + zodSchema = z.object({}).passthrough(); + } else if (schemasToIntersect.length === 1) { + zodSchema = schemasToIntersect[0]; + } else { + let result = z.intersection(schemasToIntersect[0], schemasToIntersect[1]); + for (let i = 2; i < schemasToIntersect.length; i++) { + result = z.intersection(result, schemasToIntersect[i]); + } + zodSchema = result; + } + break; + } + const objectSchema = z.object(shape); + if (schema2.additionalProperties === false) { + zodSchema = objectSchema.strict(); + } else if (typeof schema2.additionalProperties === "object") { + zodSchema = objectSchema.catchall(convertSchema(schema2.additionalProperties, ctx)); + } else { + zodSchema = objectSchema.passthrough(); + } + break; + } + case "array": { + const prefixItems = schema2.prefixItems; + const items = schema2.items; + if (prefixItems && Array.isArray(prefixItems)) { + const tupleItems = prefixItems.map((item) => convertSchema(item, ctx)); + const rest = items && typeof items === "object" && !Array.isArray(items) ? convertSchema(items, ctx) : void 0; + if (rest) { + zodSchema = z.tuple(tupleItems).rest(rest); + } else { + zodSchema = z.tuple(tupleItems); + } + if (typeof schema2.minItems === "number") { + zodSchema = zodSchema.check(z.minLength(schema2.minItems)); + } + if (typeof schema2.maxItems === "number") { + zodSchema = zodSchema.check(z.maxLength(schema2.maxItems)); + } + } else if (Array.isArray(items)) { + const tupleItems = items.map((item) => convertSchema(item, ctx)); + const rest = schema2.additionalItems && typeof schema2.additionalItems === "object" ? convertSchema(schema2.additionalItems, ctx) : void 0; + if (rest) { + zodSchema = z.tuple(tupleItems).rest(rest); + } else { + zodSchema = z.tuple(tupleItems); + } + if (typeof schema2.minItems === "number") { + zodSchema = zodSchema.check(z.minLength(schema2.minItems)); + } + if (typeof schema2.maxItems === "number") { + zodSchema = zodSchema.check(z.maxLength(schema2.maxItems)); + } + } else if (items !== void 0) { + const element = convertSchema(items, ctx); + let arraySchema = z.array(element); + if (typeof schema2.minItems === "number") { + arraySchema = arraySchema.min(schema2.minItems); + } + if (typeof schema2.maxItems === "number") { + arraySchema = arraySchema.max(schema2.maxItems); + } + zodSchema = arraySchema; + } else { + zodSchema = z.array(z.any()); + } + break; + } + default: + throw new Error(`Unsupported type: ${type2}`); + } + if (schema2.description) { + zodSchema = zodSchema.describe(schema2.description); + } + if (schema2.default !== void 0) { + zodSchema = zodSchema.default(schema2.default); + } + return zodSchema; +} +function convertSchema(schema2, ctx) { + if (typeof schema2 === "boolean") { + return schema2 ? z.any() : z.never(); + } + let baseSchema = convertBaseSchema(schema2, ctx); + const hasExplicitType = schema2.type || schema2.enum !== void 0 || schema2.const !== void 0; + if (schema2.anyOf && Array.isArray(schema2.anyOf)) { + const options = schema2.anyOf.map((s) => convertSchema(s, ctx)); + const anyOfUnion = z.union(options); + baseSchema = hasExplicitType ? z.intersection(baseSchema, anyOfUnion) : anyOfUnion; + } + if (schema2.oneOf && Array.isArray(schema2.oneOf)) { + const options = schema2.oneOf.map((s) => convertSchema(s, ctx)); + const oneOfUnion = z.xor(options); + baseSchema = hasExplicitType ? z.intersection(baseSchema, oneOfUnion) : oneOfUnion; + } + if (schema2.allOf && Array.isArray(schema2.allOf)) { + if (schema2.allOf.length === 0) { + baseSchema = hasExplicitType ? baseSchema : z.any(); + } else { + let result = hasExplicitType ? baseSchema : convertSchema(schema2.allOf[0], ctx); + const startIdx = hasExplicitType ? 0 : 1; + for (let i = startIdx; i < schema2.allOf.length; i++) { + result = z.intersection(result, convertSchema(schema2.allOf[i], ctx)); + } + baseSchema = result; + } + } + if (schema2.nullable === true && ctx.version === "openapi-3.0") { + baseSchema = z.nullable(baseSchema); + } + if (schema2.readOnly === true) { + baseSchema = z.readonly(baseSchema); + } + const extraMeta = {}; + const coreMetadataKeys = ["$id", "id", "$comment", "$anchor", "$vocabulary", "$dynamicRef", "$dynamicAnchor"]; + for (const key of coreMetadataKeys) { + if (key in schema2) { + extraMeta[key] = schema2[key]; + } + } + const contentMetadataKeys = ["contentEncoding", "contentMediaType", "contentSchema"]; + for (const key of contentMetadataKeys) { + if (key in schema2) { + extraMeta[key] = schema2[key]; + } + } + for (const key of Object.keys(schema2)) { + if (!RECOGNIZED_KEYS.has(key)) { + extraMeta[key] = schema2[key]; + } + } + if (Object.keys(extraMeta).length > 0) { + ctx.registry.add(baseSchema, extraMeta); + } + return baseSchema; +} +function fromJSONSchema(schema2, params) { + if (typeof schema2 === "boolean") { + return schema2 ? z.any() : z.never(); + } + const version4 = detectVersion(schema2, params?.defaultTarget); + const defs = schema2.$defs || schema2.definitions || {}; + const ctx = { + version: version4, + defs, + refs: /* @__PURE__ */ new Map(), + processing: /* @__PURE__ */ new Set(), + rootSchema: schema2, + registry: params?.registry ?? globalRegistry2 + }; + return convertSchema(schema2, ctx); +} + +// ../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/classic/external.js +init_locales(); + +// ../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/classic/coerce.js +var coerce_exports2 = {}; +__export(coerce_exports2, { + bigint: () => bigint3, + boolean: () => boolean5, + date: () => date6, + number: () => number6, + string: () => string6 +}); +init_core2(); +function string6(params) { + return _coercedString(ZodString4, params); +} +function number6(params) { + return _coercedNumber(ZodNumber4, params); +} +function boolean5(params) { + return _coercedBoolean(ZodBoolean4, params); +} +function bigint3(params) { + return _coercedBigint(ZodBigInt3, params); +} +function date6(params) { + return _coercedDate(ZodDate3, params); +} + +// ../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/classic/external.js +config2(en_default4()); + +// ../node_modules/.pnpm/@modelcontextprotocol+sdk@1.25.2_hono@4.10.6_zod@4.3.5/node_modules/@modelcontextprotocol/sdk/dist/esm/types.js +var LATEST_PROTOCOL_VERSION = "2025-11-25"; +var SUPPORTED_PROTOCOL_VERSIONS = [LATEST_PROTOCOL_VERSION, "2025-06-18", "2025-03-26", "2024-11-05", "2024-10-07"]; +var RELATED_TASK_META_KEY2 = "io.modelcontextprotocol/related-task"; var JSONRPC_VERSION2 = "2.0"; -var ProgressTokenSchema2 = external_exports.union([external_exports.string(), external_exports.number().int()]); -var CursorSchema2 = external_exports.string(); -var RequestMetaSchema2 = external_exports.object({ +var AssertObjectSchema2 = custom2((v) => v !== null && (typeof v === "object" || typeof v === "function")); +var ProgressTokenSchema2 = union2([string5(), number5().int()]); +var CursorSchema2 = string5(); +var TaskCreationParamsSchema2 = looseObject2({ + /** + * Time in milliseconds to keep task results available after completion. + * If null, the task has unlimited lifetime until manually cleaned up. + */ + ttl: union2([number5(), _null6()]).optional(), + /** + * Time in milliseconds to wait between task status requests. + */ + pollInterval: number5().optional() +}); +var TaskMetadataSchema = object4({ + ttl: number5().optional() +}); +var RelatedTaskMetadataSchema2 = object4({ + taskId: string5() +}); +var RequestMetaSchema2 = looseObject2({ /** * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. */ - progressToken: external_exports.optional(ProgressTokenSchema2) -}).passthrough(); -var BaseRequestParamsSchema2 = external_exports.object({ - _meta: external_exports.optional(RequestMetaSchema2) -}).passthrough(); -var RequestSchema2 = external_exports.object({ - method: external_exports.string(), - params: external_exports.optional(BaseRequestParamsSchema2) + progressToken: ProgressTokenSchema2.optional(), + /** + * If specified, this request is related to the provided task. + */ + [RELATED_TASK_META_KEY2]: RelatedTaskMetadataSchema2.optional() }); -var BaseNotificationParamsSchema2 = external_exports.object({ +var BaseRequestParamsSchema2 = object4({ + /** + * See [General fields: `_meta`](/specification/draft/basic/index#meta) for notes on `_meta` usage. + */ + _meta: RequestMetaSchema2.optional() +}); +var TaskAugmentedRequestParamsSchema = BaseRequestParamsSchema2.extend({ + /** + * If specified, the caller is requesting task-augmented execution for this request. + * The request will return a CreateTaskResult immediately, and the actual result can be + * retrieved later via tasks/result. + * + * Task augmentation is subject to capability negotiation - receivers MUST declare support + * for task augmentation of specific request types in their capabilities. + */ + task: TaskMetadataSchema.optional() +}); +var isTaskAugmentedRequestParams = (value2) => TaskAugmentedRequestParamsSchema.safeParse(value2).success; +var RequestSchema2 = object4({ + method: string5(), + params: BaseRequestParamsSchema2.loose().optional() +}); +var NotificationsParamsSchema2 = object4({ /** * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields) * for notes on _meta usage. */ - _meta: external_exports.optional(external_exports.object({}).passthrough()) -}).passthrough(); -var NotificationSchema2 = external_exports.object({ - method: external_exports.string(), - params: external_exports.optional(BaseNotificationParamsSchema2) + _meta: RequestMetaSchema2.optional() }); -var ResultSchema2 = external_exports.object({ +var NotificationSchema2 = object4({ + method: string5(), + params: NotificationsParamsSchema2.loose().optional() +}); +var ResultSchema2 = looseObject2({ /** * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields) * for notes on _meta usage. */ - _meta: external_exports.optional(external_exports.object({}).passthrough()) -}).passthrough(); -var RequestIdSchema2 = external_exports.union([external_exports.string(), external_exports.number().int()]); -var JSONRPCRequestSchema2 = external_exports.object({ - jsonrpc: external_exports.literal(JSONRPC_VERSION2), - id: RequestIdSchema2 -}).merge(RequestSchema2).strict(); + _meta: RequestMetaSchema2.optional() +}); +var RequestIdSchema2 = union2([string5(), number5().int()]); +var JSONRPCRequestSchema2 = object4({ + jsonrpc: literal2(JSONRPC_VERSION2), + id: RequestIdSchema2, + ...RequestSchema2.shape +}).strict(); var isJSONRPCRequest = (value2) => JSONRPCRequestSchema2.safeParse(value2).success; -var JSONRPCNotificationSchema2 = external_exports.object({ - jsonrpc: external_exports.literal(JSONRPC_VERSION2) -}).merge(NotificationSchema2).strict(); +var JSONRPCNotificationSchema2 = object4({ + jsonrpc: literal2(JSONRPC_VERSION2), + ...NotificationSchema2.shape +}).strict(); var isJSONRPCNotification = (value2) => JSONRPCNotificationSchema2.safeParse(value2).success; -var JSONRPCResponseSchema2 = external_exports.object({ - jsonrpc: external_exports.literal(JSONRPC_VERSION2), +var JSONRPCResultResponseSchema = object4({ + jsonrpc: literal2(JSONRPC_VERSION2), id: RequestIdSchema2, result: ResultSchema2 }).strict(); -var isJSONRPCResponse = (value2) => JSONRPCResponseSchema2.safeParse(value2).success; +var isJSONRPCResultResponse = (value2) => JSONRPCResultResponseSchema.safeParse(value2).success; var ErrorCode2; (function(ErrorCode4) { ErrorCode4[ErrorCode4["ConnectionClosed"] = -32e3] = "ConnectionClosed"; @@ -100393,61 +109108,77 @@ var ErrorCode2; ErrorCode4[ErrorCode4["MethodNotFound"] = -32601] = "MethodNotFound"; ErrorCode4[ErrorCode4["InvalidParams"] = -32602] = "InvalidParams"; ErrorCode4[ErrorCode4["InternalError"] = -32603] = "InternalError"; + ErrorCode4[ErrorCode4["UrlElicitationRequired"] = -32042] = "UrlElicitationRequired"; })(ErrorCode2 || (ErrorCode2 = {})); -var JSONRPCErrorSchema2 = external_exports.object({ - jsonrpc: external_exports.literal(JSONRPC_VERSION2), - id: RequestIdSchema2, - error: external_exports.object({ +var JSONRPCErrorResponseSchema = object4({ + jsonrpc: literal2(JSONRPC_VERSION2), + id: RequestIdSchema2.optional(), + error: object4({ /** * The error type that occurred. */ - code: external_exports.number().int(), + code: number5().int(), /** * A short description of the error. The message SHOULD be limited to a concise single sentence. */ - message: external_exports.string(), + message: string5(), /** * Additional information about the error. The value of this member is defined by the sender (e.g. detailed error information, nested errors etc.). */ - data: external_exports.optional(external_exports.unknown()) + data: unknown3().optional() }) }).strict(); -var isJSONRPCError = (value2) => JSONRPCErrorSchema2.safeParse(value2).success; -var JSONRPCMessageSchema2 = external_exports.union([JSONRPCRequestSchema2, JSONRPCNotificationSchema2, JSONRPCResponseSchema2, JSONRPCErrorSchema2]); +var isJSONRPCErrorResponse = (value2) => JSONRPCErrorResponseSchema.safeParse(value2).success; +var JSONRPCMessageSchema2 = union2([ + JSONRPCRequestSchema2, + JSONRPCNotificationSchema2, + JSONRPCResultResponseSchema, + JSONRPCErrorResponseSchema +]); +var JSONRPCResponseSchema2 = union2([JSONRPCResultResponseSchema, JSONRPCErrorResponseSchema]); var EmptyResultSchema2 = ResultSchema2.strict(); -var CancelledNotificationSchema2 = NotificationSchema2.extend({ - method: external_exports.literal("notifications/cancelled"), - params: BaseNotificationParamsSchema2.extend({ - /** - * The ID of the request to cancel. - * - * This MUST correspond to the ID of a request previously issued in the same direction. - */ - requestId: RequestIdSchema2, - /** - * An optional string describing the reason for the cancellation. This MAY be logged or presented to the user. - */ - reason: external_exports.string().optional() - }) +var CancelledNotificationParamsSchema2 = NotificationsParamsSchema2.extend({ + /** + * The ID of the request to cancel. + * + * This MUST correspond to the ID of a request previously issued in the same direction. + */ + requestId: RequestIdSchema2.optional(), + /** + * An optional string describing the reason for the cancellation. This MAY be logged or presented to the user. + */ + reason: string5().optional() }); -var IconSchema = external_exports.object({ +var CancelledNotificationSchema2 = NotificationSchema2.extend({ + method: literal2("notifications/cancelled"), + params: CancelledNotificationParamsSchema2 +}); +var IconSchema2 = object4({ /** * URL or data URI for the icon. */ - src: external_exports.string(), + src: string5(), /** * Optional MIME type for the icon. */ - mimeType: external_exports.optional(external_exports.string()), + mimeType: string5().optional(), /** * Optional array of strings that specify sizes at which the icon can be used. * Each string should be in WxH format (e.g., `"48x48"`, `"96x96"`) or `"any"` for scalable formats like SVG. * * If not provided, the client should assume that the icon can be used at any size. */ - sizes: external_exports.optional(external_exports.array(external_exports.string())) -}).passthrough(); -var IconsSchema = external_exports.object({ + sizes: array2(string5()).optional(), + /** + * Optional specifier for the theme this icon is designed for. `light` indicates + * the icon is designed to be used with a light background, and `dark` indicates + * the icon is designed to be used with a dark background. + * + * If not provided, the client should assume the icon can be used with any theme. + */ + theme: _enum3(["light", "dark"]).optional() +}); +var IconsSchema2 = object4({ /** * Optional set of sized icons that the client can display in a user interface. * @@ -100459,11 +109190,11 @@ var IconsSchema = external_exports.object({ * - `image/svg+xml` - SVG images (scalable but requires security precautions) * - `image/webp` - WebP images (modern, efficient format) */ - icons: external_exports.array(IconSchema).optional() -}).passthrough(); -var BaseMetadataSchema2 = external_exports.object({ + icons: array2(IconSchema2).optional() +}); +var BaseMetadataSchema2 = object4({ /** Intended for programmatic or logical use, but used as a display name in past specs or fallback */ - name: external_exports.string(), + name: string5(), /** * Intended for UI and end-user contexts β€” optimized to be human-readable and easily understood, * even by those unfamiliar with domain-specific terminology. @@ -100472,99 +109203,190 @@ var BaseMetadataSchema2 = external_exports.object({ * where `annotations.title` should be given precedence over using `name`, * if present). */ - title: external_exports.optional(external_exports.string()) -}).passthrough(); + title: string5().optional() +}); var ImplementationSchema2 = BaseMetadataSchema2.extend({ - version: external_exports.string(), + ...BaseMetadataSchema2.shape, + ...IconsSchema2.shape, + version: string5(), /** * An optional URL of the website for this implementation. */ - websiteUrl: external_exports.optional(external_exports.string()) -}).merge(IconsSchema); -var ClientCapabilitiesSchema2 = external_exports.object({ + websiteUrl: string5().optional(), + /** + * An optional human-readable description of what this implementation does. + * + * This can be used by clients or servers to provide context about their purpose + * and capabilities. For example, a server might describe the types of resources + * or tools it provides, while a client might describe its intended use case. + */ + description: string5().optional() +}); +var FormElicitationCapabilitySchema2 = intersection2(object4({ + applyDefaults: boolean4().optional() +}), record2(string5(), unknown3())); +var ElicitationCapabilitySchema2 = preprocess2((value2) => { + if (value2 && typeof value2 === "object" && !Array.isArray(value2)) { + if (Object.keys(value2).length === 0) { + return { form: {} }; + } + } + return value2; +}, intersection2(object4({ + form: FormElicitationCapabilitySchema2.optional(), + url: AssertObjectSchema2.optional() +}), record2(string5(), unknown3()).optional())); +var ClientTasksCapabilitySchema2 = looseObject2({ + /** + * Present if the client supports listing tasks. + */ + list: AssertObjectSchema2.optional(), + /** + * Present if the client supports cancelling tasks. + */ + cancel: AssertObjectSchema2.optional(), + /** + * Capabilities for task creation on specific request types. + */ + requests: looseObject2({ + /** + * Task support for sampling requests. + */ + sampling: looseObject2({ + createMessage: AssertObjectSchema2.optional() + }).optional(), + /** + * Task support for elicitation requests. + */ + elicitation: looseObject2({ + create: AssertObjectSchema2.optional() + }).optional() + }).optional() +}); +var ServerTasksCapabilitySchema2 = looseObject2({ + /** + * Present if the server supports listing tasks. + */ + list: AssertObjectSchema2.optional(), + /** + * Present if the server supports cancelling tasks. + */ + cancel: AssertObjectSchema2.optional(), + /** + * Capabilities for task creation on specific request types. + */ + requests: looseObject2({ + /** + * Task support for tool requests. + */ + tools: looseObject2({ + call: AssertObjectSchema2.optional() + }).optional() + }).optional() +}); +var ClientCapabilitiesSchema2 = object4({ /** * Experimental, non-standard capabilities that the client supports. */ - experimental: external_exports.optional(external_exports.object({}).passthrough()), + experimental: record2(string5(), AssertObjectSchema2).optional(), /** * Present if the client supports sampling from an LLM. */ - sampling: external_exports.optional(external_exports.object({}).passthrough()), + sampling: object4({ + /** + * Present if the client supports context inclusion via includeContext parameter. + * If not declared, servers SHOULD only use `includeContext: "none"` (or omit it). + */ + context: AssertObjectSchema2.optional(), + /** + * Present if the client supports tool use via tools and toolChoice parameters. + */ + tools: AssertObjectSchema2.optional() + }).optional(), /** * Present if the client supports eliciting user input. */ - elicitation: external_exports.optional(external_exports.object({}).passthrough()), + elicitation: ElicitationCapabilitySchema2.optional(), /** * Present if the client supports listing roots. */ - roots: external_exports.optional(external_exports.object({ + roots: object4({ /** * Whether the client supports issuing notifications for changes to the roots list. */ - listChanged: external_exports.optional(external_exports.boolean()) - }).passthrough()) -}).passthrough(); -var InitializeRequestSchema2 = RequestSchema2.extend({ - method: external_exports.literal("initialize"), - params: BaseRequestParamsSchema2.extend({ - /** - * The latest version of the Model Context Protocol that the client supports. The client MAY decide to support older versions as well. - */ - protocolVersion: external_exports.string(), - capabilities: ClientCapabilitiesSchema2, - clientInfo: ImplementationSchema2 - }) + listChanged: boolean4().optional() + }).optional(), + /** + * Present if the client supports task creation. + */ + tasks: ClientTasksCapabilitySchema2.optional() }); -var ServerCapabilitiesSchema2 = external_exports.object({ +var InitializeRequestParamsSchema2 = BaseRequestParamsSchema2.extend({ + /** + * The latest version of the Model Context Protocol that the client supports. The client MAY decide to support older versions as well. + */ + protocolVersion: string5(), + capabilities: ClientCapabilitiesSchema2, + clientInfo: ImplementationSchema2 +}); +var InitializeRequestSchema2 = RequestSchema2.extend({ + method: literal2("initialize"), + params: InitializeRequestParamsSchema2 +}); +var ServerCapabilitiesSchema2 = object4({ /** * Experimental, non-standard capabilities that the server supports. */ - experimental: external_exports.optional(external_exports.object({}).passthrough()), + experimental: record2(string5(), AssertObjectSchema2).optional(), /** * Present if the server supports sending log messages to the client. */ - logging: external_exports.optional(external_exports.object({}).passthrough()), + logging: AssertObjectSchema2.optional(), /** * Present if the server supports sending completions to the client. */ - completions: external_exports.optional(external_exports.object({}).passthrough()), + completions: AssertObjectSchema2.optional(), /** * Present if the server offers any prompt templates. */ - prompts: external_exports.optional(external_exports.object({ + prompts: object4({ /** * Whether this server supports issuing notifications for changes to the prompt list. */ - listChanged: external_exports.optional(external_exports.boolean()) - }).passthrough()), + listChanged: boolean4().optional() + }).optional(), /** * Present if the server offers any resources to read. */ - resources: external_exports.optional(external_exports.object({ + resources: object4({ /** * Whether this server supports clients subscribing to resource updates. */ - subscribe: external_exports.optional(external_exports.boolean()), + subscribe: boolean4().optional(), /** * Whether this server supports issuing notifications for changes to the resource list. */ - listChanged: external_exports.optional(external_exports.boolean()) - }).passthrough()), + listChanged: boolean4().optional() + }).optional(), /** * Present if the server offers any tools to call. */ - tools: external_exports.optional(external_exports.object({ + tools: object4({ /** * Whether this server supports issuing notifications for changes to the tool list. */ - listChanged: external_exports.optional(external_exports.boolean()) - }).passthrough()) -}).passthrough(); + listChanged: boolean4().optional() + }).optional(), + /** + * Present if the server supports task creation. + */ + tasks: ServerTasksCapabilitySchema2.optional() +}); var InitializeResultSchema2 = ResultSchema2.extend({ /** * The version of the Model Context Protocol that the server wants to use. This may not match the version that the client requested. If the client cannot support this version, it MUST disconnect. */ - protocolVersion: external_exports.string(), + protocolVersion: string5(), capabilities: ServerCapabilitiesSchema2, serverInfo: ImplementationSchema2, /** @@ -100572,79 +109394,143 @@ var InitializeResultSchema2 = ResultSchema2.extend({ * * This can be used by clients to improve the LLM's understanding of available tools, resources, etc. It can be thought of like a "hint" to the model. For example, this information MAY be added to the system prompt. */ - instructions: external_exports.optional(external_exports.string()) + instructions: string5().optional() }); var InitializedNotificationSchema2 = NotificationSchema2.extend({ - method: external_exports.literal("notifications/initialized") + method: literal2("notifications/initialized"), + params: NotificationsParamsSchema2.optional() }); var PingRequestSchema2 = RequestSchema2.extend({ - method: external_exports.literal("ping") + method: literal2("ping"), + params: BaseRequestParamsSchema2.optional() }); -var ProgressSchema2 = external_exports.object({ +var ProgressSchema2 = object4({ /** * The progress thus far. This should increase every time progress is made, even if the total is unknown. */ - progress: external_exports.number(), + progress: number5(), /** * Total number of items to process (or total progress required), if known. */ - total: external_exports.optional(external_exports.number()), + total: optional2(number5()), /** * An optional message describing the current progress. */ - message: external_exports.optional(external_exports.string()) -}).passthrough(); + message: optional2(string5()) +}); +var ProgressNotificationParamsSchema2 = object4({ + ...NotificationsParamsSchema2.shape, + ...ProgressSchema2.shape, + /** + * The progress token which was given in the initial request, used to associate this notification with the request that is proceeding. + */ + progressToken: ProgressTokenSchema2 +}); var ProgressNotificationSchema2 = NotificationSchema2.extend({ - method: external_exports.literal("notifications/progress"), - params: BaseNotificationParamsSchema2.merge(ProgressSchema2).extend({ - /** - * The progress token which was given in the initial request, used to associate this notification with the request that is proceeding. - */ - progressToken: ProgressTokenSchema2 - }) + method: literal2("notifications/progress"), + params: ProgressNotificationParamsSchema2 +}); +var PaginatedRequestParamsSchema2 = BaseRequestParamsSchema2.extend({ + /** + * An opaque token representing the current pagination position. + * If provided, the server should return results starting after this cursor. + */ + cursor: CursorSchema2.optional() }); var PaginatedRequestSchema2 = RequestSchema2.extend({ - params: BaseRequestParamsSchema2.extend({ - /** - * An opaque token representing the current pagination position. - * If provided, the server should return results starting after this cursor. - */ - cursor: external_exports.optional(CursorSchema2) - }).optional() + params: PaginatedRequestParamsSchema2.optional() }); var PaginatedResultSchema2 = ResultSchema2.extend({ /** * An opaque token representing the pagination position after the last returned result. * If present, there may be more results available. */ - nextCursor: external_exports.optional(CursorSchema2) + nextCursor: CursorSchema2.optional() }); -var ResourceContentsSchema2 = external_exports.object({ +var TaskStatusSchema = _enum3(["working", "input_required", "completed", "failed", "cancelled"]); +var TaskSchema2 = object4({ + taskId: string5(), + status: TaskStatusSchema, + /** + * Time in milliseconds to keep task results available after completion. + * If null, the task has unlimited lifetime until manually cleaned up. + */ + ttl: union2([number5(), _null6()]), + /** + * ISO 8601 timestamp when the task was created. + */ + createdAt: string5(), + /** + * ISO 8601 timestamp when the task was last updated. + */ + lastUpdatedAt: string5(), + pollInterval: optional2(number5()), + /** + * Optional diagnostic message for failed tasks or other status information. + */ + statusMessage: optional2(string5()) +}); +var CreateTaskResultSchema2 = ResultSchema2.extend({ + task: TaskSchema2 +}); +var TaskStatusNotificationParamsSchema2 = NotificationsParamsSchema2.merge(TaskSchema2); +var TaskStatusNotificationSchema2 = NotificationSchema2.extend({ + method: literal2("notifications/tasks/status"), + params: TaskStatusNotificationParamsSchema2 +}); +var GetTaskRequestSchema2 = RequestSchema2.extend({ + method: literal2("tasks/get"), + params: BaseRequestParamsSchema2.extend({ + taskId: string5() + }) +}); +var GetTaskResultSchema2 = ResultSchema2.merge(TaskSchema2); +var GetTaskPayloadRequestSchema2 = RequestSchema2.extend({ + method: literal2("tasks/result"), + params: BaseRequestParamsSchema2.extend({ + taskId: string5() + }) +}); +var GetTaskPayloadResultSchema = ResultSchema2.loose(); +var ListTasksRequestSchema2 = PaginatedRequestSchema2.extend({ + method: literal2("tasks/list") +}); +var ListTasksResultSchema2 = PaginatedResultSchema2.extend({ + tasks: array2(TaskSchema2) +}); +var CancelTaskRequestSchema2 = RequestSchema2.extend({ + method: literal2("tasks/cancel"), + params: BaseRequestParamsSchema2.extend({ + taskId: string5() + }) +}); +var CancelTaskResultSchema2 = ResultSchema2.merge(TaskSchema2); +var ResourceContentsSchema2 = object4({ /** * The URI of this resource. */ - uri: external_exports.string(), + uri: string5(), /** * The MIME type of this resource, if known. */ - mimeType: external_exports.optional(external_exports.string()), + mimeType: optional2(string5()), /** * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields) * for notes on _meta usage. */ - _meta: external_exports.optional(external_exports.object({}).passthrough()) -}).passthrough(); + _meta: record2(string5(), unknown3()).optional() +}); var TextResourceContentsSchema2 = ResourceContentsSchema2.extend({ /** * The text of the item. This must only be set if the item can actually be represented as text (not binary data). */ - text: external_exports.string() + text: string5() }); -var Base64Schema2 = external_exports.string().refine((val) => { +var Base64Schema2 = string5().refine((val) => { try { atob(val); return true; - } catch (_a) { + } catch { return false; } }, { message: "Invalid Base64 string" }); @@ -100654,164 +109540,196 @@ var BlobResourceContentsSchema2 = ResourceContentsSchema2.extend({ */ blob: Base64Schema2 }); -var ResourceSchema2 = BaseMetadataSchema2.extend({ +var RoleSchema = _enum3(["user", "assistant"]); +var AnnotationsSchema2 = object4({ + /** + * Intended audience(s) for the resource. + */ + audience: array2(RoleSchema).optional(), + /** + * Importance hint for the resource, from 0 (least) to 1 (most). + */ + priority: number5().min(0).max(1).optional(), + /** + * ISO 8601 timestamp for the most recent modification. + */ + lastModified: iso_exports2.datetime({ offset: true }).optional() +}); +var ResourceSchema2 = object4({ + ...BaseMetadataSchema2.shape, + ...IconsSchema2.shape, /** * The URI of this resource. */ - uri: external_exports.string(), + uri: string5(), /** * A description of what this resource represents. * * This can be used by clients to improve the LLM's understanding of available resources. It can be thought of like a "hint" to the model. */ - description: external_exports.optional(external_exports.string()), + description: optional2(string5()), /** * The MIME type of this resource, if known. */ - mimeType: external_exports.optional(external_exports.string()), + mimeType: optional2(string5()), + /** + * Optional annotations for the client. + */ + annotations: AnnotationsSchema2.optional(), /** * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields) * for notes on _meta usage. */ - _meta: external_exports.optional(external_exports.object({}).passthrough()) -}).merge(IconsSchema); -var ResourceTemplateSchema2 = BaseMetadataSchema2.extend({ + _meta: optional2(looseObject2({})) +}); +var ResourceTemplateSchema2 = object4({ + ...BaseMetadataSchema2.shape, + ...IconsSchema2.shape, /** * A URI template (according to RFC 6570) that can be used to construct resource URIs. */ - uriTemplate: external_exports.string(), + uriTemplate: string5(), /** * A description of what this template is for. * * This can be used by clients to improve the LLM's understanding of available resources. It can be thought of like a "hint" to the model. */ - description: external_exports.optional(external_exports.string()), + description: optional2(string5()), /** * The MIME type for all resources that match this template. This should only be included if all resources matching this template have the same type. */ - mimeType: external_exports.optional(external_exports.string()), + mimeType: optional2(string5()), + /** + * Optional annotations for the client. + */ + annotations: AnnotationsSchema2.optional(), /** * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields) * for notes on _meta usage. */ - _meta: external_exports.optional(external_exports.object({}).passthrough()) -}).merge(IconsSchema); + _meta: optional2(looseObject2({})) +}); var ListResourcesRequestSchema2 = PaginatedRequestSchema2.extend({ - method: external_exports.literal("resources/list") + method: literal2("resources/list") }); var ListResourcesResultSchema2 = PaginatedResultSchema2.extend({ - resources: external_exports.array(ResourceSchema2) + resources: array2(ResourceSchema2) }); var ListResourceTemplatesRequestSchema2 = PaginatedRequestSchema2.extend({ - method: external_exports.literal("resources/templates/list") + method: literal2("resources/templates/list") }); var ListResourceTemplatesResultSchema2 = PaginatedResultSchema2.extend({ - resourceTemplates: external_exports.array(ResourceTemplateSchema2) + resourceTemplates: array2(ResourceTemplateSchema2) }); +var ResourceRequestParamsSchema2 = BaseRequestParamsSchema2.extend({ + /** + * The URI of the resource to read. The URI can use any protocol; it is up to the server how to interpret it. + * + * @format uri + */ + uri: string5() +}); +var ReadResourceRequestParamsSchema2 = ResourceRequestParamsSchema2; var ReadResourceRequestSchema2 = RequestSchema2.extend({ - method: external_exports.literal("resources/read"), - params: BaseRequestParamsSchema2.extend({ - /** - * The URI of the resource to read. The URI can use any protocol; it is up to the server how to interpret it. - */ - uri: external_exports.string() - }) + method: literal2("resources/read"), + params: ReadResourceRequestParamsSchema2 }); var ReadResourceResultSchema2 = ResultSchema2.extend({ - contents: external_exports.array(external_exports.union([TextResourceContentsSchema2, BlobResourceContentsSchema2])) + contents: array2(union2([TextResourceContentsSchema2, BlobResourceContentsSchema2])) }); var ResourceListChangedNotificationSchema2 = NotificationSchema2.extend({ - method: external_exports.literal("notifications/resources/list_changed") + method: literal2("notifications/resources/list_changed"), + params: NotificationsParamsSchema2.optional() }); +var SubscribeRequestParamsSchema2 = ResourceRequestParamsSchema2; var SubscribeRequestSchema2 = RequestSchema2.extend({ - method: external_exports.literal("resources/subscribe"), - params: BaseRequestParamsSchema2.extend({ - /** - * The URI of the resource to subscribe to. The URI can use any protocol; it is up to the server how to interpret it. - */ - uri: external_exports.string() - }) + method: literal2("resources/subscribe"), + params: SubscribeRequestParamsSchema2 }); +var UnsubscribeRequestParamsSchema2 = ResourceRequestParamsSchema2; var UnsubscribeRequestSchema2 = RequestSchema2.extend({ - method: external_exports.literal("resources/unsubscribe"), - params: BaseRequestParamsSchema2.extend({ - /** - * The URI of the resource to unsubscribe from. - */ - uri: external_exports.string() - }) + method: literal2("resources/unsubscribe"), + params: UnsubscribeRequestParamsSchema2 +}); +var ResourceUpdatedNotificationParamsSchema2 = NotificationsParamsSchema2.extend({ + /** + * The URI of the resource that has been updated. This might be a sub-resource of the one that the client actually subscribed to. + */ + uri: string5() }); var ResourceUpdatedNotificationSchema2 = NotificationSchema2.extend({ - method: external_exports.literal("notifications/resources/updated"), - params: BaseNotificationParamsSchema2.extend({ - /** - * The URI of the resource that has been updated. This might be a sub-resource of the one that the client actually subscribed to. - */ - uri: external_exports.string() - }) + method: literal2("notifications/resources/updated"), + params: ResourceUpdatedNotificationParamsSchema2 }); -var PromptArgumentSchema2 = external_exports.object({ +var PromptArgumentSchema2 = object4({ /** * The name of the argument. */ - name: external_exports.string(), + name: string5(), /** * A human-readable description of the argument. */ - description: external_exports.optional(external_exports.string()), + description: optional2(string5()), /** * Whether this argument must be provided. */ - required: external_exports.optional(external_exports.boolean()) -}).passthrough(); -var PromptSchema2 = BaseMetadataSchema2.extend({ + required: optional2(boolean4()) +}); +var PromptSchema2 = object4({ + ...BaseMetadataSchema2.shape, + ...IconsSchema2.shape, /** * An optional description of what this prompt provides */ - description: external_exports.optional(external_exports.string()), + description: optional2(string5()), /** * A list of arguments to use for templating the prompt. */ - arguments: external_exports.optional(external_exports.array(PromptArgumentSchema2)), + arguments: optional2(array2(PromptArgumentSchema2)), /** * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields) * for notes on _meta usage. */ - _meta: external_exports.optional(external_exports.object({}).passthrough()) -}).merge(IconsSchema); + _meta: optional2(looseObject2({})) +}); var ListPromptsRequestSchema2 = PaginatedRequestSchema2.extend({ - method: external_exports.literal("prompts/list") + method: literal2("prompts/list") }); var ListPromptsResultSchema2 = PaginatedResultSchema2.extend({ - prompts: external_exports.array(PromptSchema2) + prompts: array2(PromptSchema2) +}); +var GetPromptRequestParamsSchema2 = BaseRequestParamsSchema2.extend({ + /** + * The name of the prompt or prompt template. + */ + name: string5(), + /** + * Arguments to use for templating the prompt. + */ + arguments: record2(string5(), string5()).optional() }); var GetPromptRequestSchema2 = RequestSchema2.extend({ - method: external_exports.literal("prompts/get"), - params: BaseRequestParamsSchema2.extend({ - /** - * The name of the prompt or prompt template. - */ - name: external_exports.string(), - /** - * Arguments to use for templating the prompt. - */ - arguments: external_exports.optional(external_exports.record(external_exports.string())) - }) + method: literal2("prompts/get"), + params: GetPromptRequestParamsSchema2 }); -var TextContentSchema2 = external_exports.object({ - type: external_exports.literal("text"), +var TextContentSchema2 = object4({ + type: literal2("text"), /** * The text content of the message. */ - text: external_exports.string(), + text: string5(), + /** + * Optional annotations for the client. + */ + annotations: AnnotationsSchema2.optional(), /** * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields) * for notes on _meta usage. */ - _meta: external_exports.optional(external_exports.object({}).passthrough()) -}).passthrough(); -var ImageContentSchema2 = external_exports.object({ - type: external_exports.literal("image"), + _meta: record2(string5(), unknown3()).optional() +}); +var ImageContentSchema2 = object4({ + type: literal2("image"), /** * The base64-encoded image data. */ @@ -100819,15 +109737,19 @@ var ImageContentSchema2 = external_exports.object({ /** * The MIME type of the image. Different providers may support different image types. */ - mimeType: external_exports.string(), + mimeType: string5(), + /** + * Optional annotations for the client. + */ + annotations: AnnotationsSchema2.optional(), /** * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields) * for notes on _meta usage. */ - _meta: external_exports.optional(external_exports.object({}).passthrough()) -}).passthrough(); -var AudioContentSchema2 = external_exports.object({ - type: external_exports.literal("audio"), + _meta: record2(string5(), unknown3()).optional() +}); +var AudioContentSchema2 = object4({ + type: literal2("audio"), /** * The base64-encoded audio data. */ @@ -100835,57 +109757,89 @@ var AudioContentSchema2 = external_exports.object({ /** * The MIME type of the audio. Different providers may support different audio types. */ - mimeType: external_exports.string(), + mimeType: string5(), + /** + * Optional annotations for the client. + */ + annotations: AnnotationsSchema2.optional(), /** * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields) * for notes on _meta usage. */ - _meta: external_exports.optional(external_exports.object({}).passthrough()) -}).passthrough(); -var EmbeddedResourceSchema2 = external_exports.object({ - type: external_exports.literal("resource"), - resource: external_exports.union([TextResourceContentsSchema2, BlobResourceContentsSchema2]), - /** - * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields) - * for notes on _meta usage. - */ - _meta: external_exports.optional(external_exports.object({}).passthrough()) -}).passthrough(); -var ResourceLinkSchema2 = ResourceSchema2.extend({ - type: external_exports.literal("resource_link") + _meta: record2(string5(), unknown3()).optional() }); -var ContentBlockSchema2 = external_exports.union([ +var ToolUseContentSchema2 = object4({ + type: literal2("tool_use"), + /** + * The name of the tool to invoke. + * Must match a tool name from the request's tools array. + */ + name: string5(), + /** + * Unique identifier for this tool call. + * Used to correlate with ToolResultContent in subsequent messages. + */ + id: string5(), + /** + * Arguments to pass to the tool. + * Must conform to the tool's inputSchema. + */ + input: record2(string5(), unknown3()), + /** + * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields) + * for notes on _meta usage. + */ + _meta: record2(string5(), unknown3()).optional() +}); +var EmbeddedResourceSchema2 = object4({ + type: literal2("resource"), + resource: union2([TextResourceContentsSchema2, BlobResourceContentsSchema2]), + /** + * Optional annotations for the client. + */ + annotations: AnnotationsSchema2.optional(), + /** + * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields) + * for notes on _meta usage. + */ + _meta: record2(string5(), unknown3()).optional() +}); +var ResourceLinkSchema2 = ResourceSchema2.extend({ + type: literal2("resource_link") +}); +var ContentBlockSchema2 = union2([ TextContentSchema2, ImageContentSchema2, AudioContentSchema2, ResourceLinkSchema2, EmbeddedResourceSchema2 ]); -var PromptMessageSchema2 = external_exports.object({ - role: external_exports.enum(["user", "assistant"]), +var PromptMessageSchema2 = object4({ + role: RoleSchema, content: ContentBlockSchema2 -}).passthrough(); +}); var GetPromptResultSchema2 = ResultSchema2.extend({ /** * An optional description for the prompt. */ - description: external_exports.optional(external_exports.string()), - messages: external_exports.array(PromptMessageSchema2) + description: string5().optional(), + messages: array2(PromptMessageSchema2) }); var PromptListChangedNotificationSchema2 = NotificationSchema2.extend({ - method: external_exports.literal("notifications/prompts/list_changed") + method: literal2("notifications/prompts/list_changed"), + params: NotificationsParamsSchema2.optional() }); -var ToolAnnotationsSchema2 = external_exports.object({ +var ToolAnnotationsSchema2 = object4({ /** * A human-readable title for the tool. */ - title: external_exports.optional(external_exports.string()), + title: string5().optional(), /** * If true, the tool does not modify its environment. * * Default: false */ - readOnlyHint: external_exports.optional(external_exports.boolean()), + readOnlyHint: boolean4().optional(), /** * If true, the tool may perform destructive updates to its environment. * If false, the tool performs only additive updates. @@ -100894,7 +109848,7 @@ var ToolAnnotationsSchema2 = external_exports.object({ * * Default: true */ - destructiveHint: external_exports.optional(external_exports.boolean()), + destructiveHint: boolean4().optional(), /** * If true, calling the tool repeatedly with the same arguments * will have no additional effect on the its environment. @@ -100903,7 +109857,7 @@ var ToolAnnotationsSchema2 = external_exports.object({ * * Default: false */ - idempotentHint: external_exports.optional(external_exports.boolean()), + idempotentHint: boolean4().optional(), /** * If true, this tool may interact with an "open world" of external * entities. If false, the tool's domain of interaction is closed. @@ -100912,45 +109866,64 @@ var ToolAnnotationsSchema2 = external_exports.object({ * * Default: true */ - openWorldHint: external_exports.optional(external_exports.boolean()) -}).passthrough(); -var ToolSchema2 = BaseMetadataSchema2.extend({ + openWorldHint: boolean4().optional() +}); +var ToolExecutionSchema2 = object4({ + /** + * Indicates the tool's preference for task-augmented execution. + * - "required": Clients MUST invoke the tool as a task + * - "optional": Clients MAY invoke the tool as a task or normal request + * - "forbidden": Clients MUST NOT attempt to invoke the tool as a task + * + * If not present, defaults to "forbidden". + */ + taskSupport: _enum3(["required", "optional", "forbidden"]).optional() +}); +var ToolSchema2 = object4({ + ...BaseMetadataSchema2.shape, + ...IconsSchema2.shape, /** * A human-readable description of the tool. */ - description: external_exports.optional(external_exports.string()), + description: string5().optional(), /** - * A JSON Schema object defining the expected parameters for the tool. + * A JSON Schema 2020-12 object defining the expected parameters for the tool. + * Must have type: 'object' at the root level per MCP spec. */ - inputSchema: external_exports.object({ - type: external_exports.literal("object"), - properties: external_exports.optional(external_exports.object({}).passthrough()), - required: external_exports.optional(external_exports.array(external_exports.string())) - }).passthrough(), + inputSchema: object4({ + type: literal2("object"), + properties: record2(string5(), AssertObjectSchema2).optional(), + required: array2(string5()).optional() + }).catchall(unknown3()), /** - * An optional JSON Schema object defining the structure of the tool's output returned in - * the structuredContent field of a CallToolResult. + * An optional JSON Schema 2020-12 object defining the structure of the tool's output + * returned in the structuredContent field of a CallToolResult. + * Must have type: 'object' at the root level per MCP spec. */ - outputSchema: external_exports.optional(external_exports.object({ - type: external_exports.literal("object"), - properties: external_exports.optional(external_exports.object({}).passthrough()), - required: external_exports.optional(external_exports.array(external_exports.string())) - }).passthrough()), + outputSchema: object4({ + type: literal2("object"), + properties: record2(string5(), AssertObjectSchema2).optional(), + required: array2(string5()).optional() + }).catchall(unknown3()).optional(), /** * Optional additional tool information. */ - annotations: external_exports.optional(ToolAnnotationsSchema2), + annotations: ToolAnnotationsSchema2.optional(), + /** + * Execution-related properties for this tool. + */ + execution: ToolExecutionSchema2.optional(), /** * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields) * for notes on _meta usage. */ - _meta: external_exports.optional(external_exports.object({}).passthrough()) -}).merge(IconsSchema); + _meta: record2(string5(), unknown3()).optional() +}); var ListToolsRequestSchema2 = PaginatedRequestSchema2.extend({ - method: external_exports.literal("tools/list") + method: literal2("tools/list") }); var ListToolsResultSchema2 = PaginatedResultSchema2.extend({ - tools: external_exports.array(ToolSchema2) + tools: array2(ToolSchema2) }); var CallToolResultSchema2 = ResultSchema2.extend({ /** @@ -100959,13 +109932,13 @@ var CallToolResultSchema2 = ResultSchema2.extend({ * If the Tool does not define an outputSchema, this field MUST be present in the result. * For backwards compatibility, this field is always present, but it may be empty. */ - content: external_exports.array(ContentBlockSchema2).default([]), + content: array2(ContentBlockSchema2).default([]), /** * An object containing structured tool output. * * If the Tool defines an outputSchema, this field MUST be present in the result, and contain a JSON object that matches the schema. */ - structuredContent: external_exports.object({}).passthrough().optional(), + structuredContent: record2(string5(), unknown3()).optional(), /** * Whether the tool call ended in an error. * @@ -100980,252 +109953,463 @@ var CallToolResultSchema2 = ResultSchema2.extend({ * server does not support tool calls, or any other exceptional conditions, * should be reported as an MCP error response. */ - isError: external_exports.optional(external_exports.boolean()) + isError: boolean4().optional() }); var CompatibilityCallToolResultSchema2 = CallToolResultSchema2.or(ResultSchema2.extend({ - toolResult: external_exports.unknown() + toolResult: unknown3() })); +var CallToolRequestParamsSchema2 = TaskAugmentedRequestParamsSchema.extend({ + /** + * The name of the tool to call. + */ + name: string5(), + /** + * Arguments to pass to the tool. + */ + arguments: record2(string5(), unknown3()).optional() +}); var CallToolRequestSchema2 = RequestSchema2.extend({ - method: external_exports.literal("tools/call"), - params: BaseRequestParamsSchema2.extend({ - name: external_exports.string(), - arguments: external_exports.optional(external_exports.record(external_exports.unknown())) - }) + method: literal2("tools/call"), + params: CallToolRequestParamsSchema2 }); var ToolListChangedNotificationSchema2 = NotificationSchema2.extend({ - method: external_exports.literal("notifications/tools/list_changed") + method: literal2("notifications/tools/list_changed"), + params: NotificationsParamsSchema2.optional() +}); +var ListChangedOptionsBaseSchema = object4({ + /** + * If true, the list will be refreshed automatically when a list changed notification is received. + * The callback will be called with the updated list. + * + * If false, the callback will be called with null items, allowing manual refresh. + * + * @default true + */ + autoRefresh: boolean4().default(true), + /** + * Debounce time in milliseconds for list changed notification processing. + * + * Multiple notifications received within this timeframe will only trigger one refresh. + * Set to 0 to disable debouncing. + * + * @default 300 + */ + debounceMs: number5().int().nonnegative().default(300) +}); +var LoggingLevelSchema2 = _enum3(["debug", "info", "notice", "warning", "error", "critical", "alert", "emergency"]); +var SetLevelRequestParamsSchema2 = BaseRequestParamsSchema2.extend({ + /** + * The level of logging that the client wants to receive from the server. The server should send all logs at this level and higher (i.e., more severe) to the client as notifications/logging/message. + */ + level: LoggingLevelSchema2 }); -var LoggingLevelSchema2 = external_exports.enum(["debug", "info", "notice", "warning", "error", "critical", "alert", "emergency"]); var SetLevelRequestSchema2 = RequestSchema2.extend({ - method: external_exports.literal("logging/setLevel"), - params: BaseRequestParamsSchema2.extend({ - /** - * The level of logging that the client wants to receive from the server. The server should send all logs at this level and higher (i.e., more severe) to the client as notifications/logging/message. - */ - level: LoggingLevelSchema2 - }) + method: literal2("logging/setLevel"), + params: SetLevelRequestParamsSchema2 +}); +var LoggingMessageNotificationParamsSchema2 = NotificationsParamsSchema2.extend({ + /** + * The severity of this log message. + */ + level: LoggingLevelSchema2, + /** + * An optional name of the logger issuing this message. + */ + logger: string5().optional(), + /** + * The data to be logged, such as a string message or an object. Any JSON serializable type is allowed here. + */ + data: unknown3() }); var LoggingMessageNotificationSchema2 = NotificationSchema2.extend({ - method: external_exports.literal("notifications/message"), - params: BaseNotificationParamsSchema2.extend({ - /** - * The severity of this log message. - */ - level: LoggingLevelSchema2, - /** - * An optional name of the logger issuing this message. - */ - logger: external_exports.optional(external_exports.string()), - /** - * The data to be logged, such as a string message or an object. Any JSON serializable type is allowed here. - */ - data: external_exports.unknown() - }) + method: literal2("notifications/message"), + params: LoggingMessageNotificationParamsSchema2 }); -var ModelHintSchema2 = external_exports.object({ +var ModelHintSchema2 = object4({ /** * A hint for a model name. */ - name: external_exports.string().optional() -}).passthrough(); -var ModelPreferencesSchema2 = external_exports.object({ + name: string5().optional() +}); +var ModelPreferencesSchema2 = object4({ /** * Optional hints to use for model selection. */ - hints: external_exports.optional(external_exports.array(ModelHintSchema2)), + hints: array2(ModelHintSchema2).optional(), /** * How much to prioritize cost when selecting a model. */ - costPriority: external_exports.optional(external_exports.number().min(0).max(1)), + costPriority: number5().min(0).max(1).optional(), /** * How much to prioritize sampling speed (latency) when selecting a model. */ - speedPriority: external_exports.optional(external_exports.number().min(0).max(1)), + speedPriority: number5().min(0).max(1).optional(), /** * How much to prioritize intelligence and capabilities when selecting a model. */ - intelligencePriority: external_exports.optional(external_exports.number().min(0).max(1)) -}).passthrough(); -var SamplingMessageSchema2 = external_exports.object({ - role: external_exports.enum(["user", "assistant"]), - content: external_exports.union([TextContentSchema2, ImageContentSchema2, AudioContentSchema2]) -}).passthrough(); + intelligencePriority: number5().min(0).max(1).optional() +}); +var ToolChoiceSchema2 = object4({ + /** + * Controls when tools are used: + * - "auto": Model decides whether to use tools (default) + * - "required": Model MUST use at least one tool before completing + * - "none": Model MUST NOT use any tools + */ + mode: _enum3(["auto", "required", "none"]).optional() +}); +var ToolResultContentSchema2 = object4({ + type: literal2("tool_result"), + toolUseId: string5().describe("The unique identifier for the corresponding tool call."), + content: array2(ContentBlockSchema2).default([]), + structuredContent: object4({}).loose().optional(), + isError: boolean4().optional(), + /** + * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields) + * for notes on _meta usage. + */ + _meta: record2(string5(), unknown3()).optional() +}); +var SamplingContentSchema2 = discriminatedUnion2("type", [TextContentSchema2, ImageContentSchema2, AudioContentSchema2]); +var SamplingMessageContentBlockSchema2 = discriminatedUnion2("type", [ + TextContentSchema2, + ImageContentSchema2, + AudioContentSchema2, + ToolUseContentSchema2, + ToolResultContentSchema2 +]); +var SamplingMessageSchema2 = object4({ + role: RoleSchema, + content: union2([SamplingMessageContentBlockSchema2, array2(SamplingMessageContentBlockSchema2)]), + /** + * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields) + * for notes on _meta usage. + */ + _meta: record2(string5(), unknown3()).optional() +}); +var CreateMessageRequestParamsSchema2 = TaskAugmentedRequestParamsSchema.extend({ + messages: array2(SamplingMessageSchema2), + /** + * The server's preferences for which model to select. The client MAY modify or omit this request. + */ + modelPreferences: ModelPreferencesSchema2.optional(), + /** + * An optional system prompt the server wants to use for sampling. The client MAY modify or omit this prompt. + */ + systemPrompt: string5().optional(), + /** + * A request to include context from one or more MCP servers (including the caller), to be attached to the prompt. + * The client MAY ignore this request. + * + * Default is "none". Values "thisServer" and "allServers" are soft-deprecated. Servers SHOULD only use these values if the client + * declares ClientCapabilities.sampling.context. These values may be removed in future spec releases. + */ + includeContext: _enum3(["none", "thisServer", "allServers"]).optional(), + temperature: number5().optional(), + /** + * The requested maximum number of tokens to sample (to prevent runaway completions). + * + * The client MAY choose to sample fewer tokens than the requested maximum. + */ + maxTokens: number5().int(), + stopSequences: array2(string5()).optional(), + /** + * Optional metadata to pass through to the LLM provider. The format of this metadata is provider-specific. + */ + metadata: AssertObjectSchema2.optional(), + /** + * Tools that the model may use during generation. + * The client MUST return an error if this field is provided but ClientCapabilities.sampling.tools is not declared. + */ + tools: array2(ToolSchema2).optional(), + /** + * Controls how the model uses tools. + * The client MUST return an error if this field is provided but ClientCapabilities.sampling.tools is not declared. + * Default is `{ mode: "auto" }`. + */ + toolChoice: ToolChoiceSchema2.optional() +}); var CreateMessageRequestSchema2 = RequestSchema2.extend({ - method: external_exports.literal("sampling/createMessage"), - params: BaseRequestParamsSchema2.extend({ - messages: external_exports.array(SamplingMessageSchema2), - /** - * An optional system prompt the server wants to use for sampling. The client MAY modify or omit this prompt. - */ - systemPrompt: external_exports.optional(external_exports.string()), - /** - * A request to include context from one or more MCP servers (including the caller), to be attached to the prompt. The client MAY ignore this request. - */ - includeContext: external_exports.optional(external_exports.enum(["none", "thisServer", "allServers"])), - temperature: external_exports.optional(external_exports.number()), - /** - * The maximum number of tokens to sample, as requested by the server. The client MAY choose to sample fewer tokens than requested. - */ - maxTokens: external_exports.number().int(), - stopSequences: external_exports.optional(external_exports.array(external_exports.string())), - /** - * Optional metadata to pass through to the LLM provider. The format of this metadata is provider-specific. - */ - metadata: external_exports.optional(external_exports.object({}).passthrough()), - /** - * The server's preferences for which model to select. - */ - modelPreferences: external_exports.optional(ModelPreferencesSchema2) - }) + method: literal2("sampling/createMessage"), + params: CreateMessageRequestParamsSchema2 }); var CreateMessageResultSchema2 = ResultSchema2.extend({ /** * The name of the model that generated the message. */ - model: external_exports.string(), + model: string5(), /** - * The reason why sampling stopped. + * The reason why sampling stopped, if known. + * + * Standard values: + * - "endTurn": Natural end of the assistant's turn + * - "stopSequence": A stop sequence was encountered + * - "maxTokens": Maximum token limit was reached + * + * This field is an open string to allow for provider-specific stop reasons. */ - stopReason: external_exports.optional(external_exports.enum(["endTurn", "stopSequence", "maxTokens"]).or(external_exports.string())), - role: external_exports.enum(["user", "assistant"]), - content: external_exports.discriminatedUnion("type", [TextContentSchema2, ImageContentSchema2, AudioContentSchema2]) + stopReason: optional2(_enum3(["endTurn", "stopSequence", "maxTokens"]).or(string5())), + role: RoleSchema, + /** + * Response content. Single content block (text, image, or audio). + */ + content: SamplingContentSchema2 }); -var BooleanSchemaSchema2 = external_exports.object({ - type: external_exports.literal("boolean"), - title: external_exports.optional(external_exports.string()), - description: external_exports.optional(external_exports.string()), - default: external_exports.optional(external_exports.boolean()) -}).passthrough(); -var StringSchemaSchema2 = external_exports.object({ - type: external_exports.literal("string"), - title: external_exports.optional(external_exports.string()), - description: external_exports.optional(external_exports.string()), - minLength: external_exports.optional(external_exports.number()), - maxLength: external_exports.optional(external_exports.number()), - format: external_exports.optional(external_exports.enum(["email", "uri", "date", "date-time"])) -}).passthrough(); -var NumberSchemaSchema2 = external_exports.object({ - type: external_exports.enum(["number", "integer"]), - title: external_exports.optional(external_exports.string()), - description: external_exports.optional(external_exports.string()), - minimum: external_exports.optional(external_exports.number()), - maximum: external_exports.optional(external_exports.number()) -}).passthrough(); -var EnumSchemaSchema2 = external_exports.object({ - type: external_exports.literal("string"), - title: external_exports.optional(external_exports.string()), - description: external_exports.optional(external_exports.string()), - enum: external_exports.array(external_exports.string()), - enumNames: external_exports.optional(external_exports.array(external_exports.string())) -}).passthrough(); -var PrimitiveSchemaDefinitionSchema2 = external_exports.union([BooleanSchemaSchema2, StringSchemaSchema2, NumberSchemaSchema2, EnumSchemaSchema2]); -var ElicitRequestSchema2 = RequestSchema2.extend({ - method: external_exports.literal("elicitation/create"), - params: BaseRequestParamsSchema2.extend({ - /** - * The message to present to the user. - */ - message: external_exports.string(), - /** - * The schema for the requested user input. - */ - requestedSchema: external_exports.object({ - type: external_exports.literal("object"), - properties: external_exports.record(external_exports.string(), PrimitiveSchemaDefinitionSchema2), - required: external_exports.optional(external_exports.array(external_exports.string())) - }).passthrough() +var CreateMessageResultWithToolsSchema2 = ResultSchema2.extend({ + /** + * The name of the model that generated the message. + */ + model: string5(), + /** + * The reason why sampling stopped, if known. + * + * Standard values: + * - "endTurn": Natural end of the assistant's turn + * - "stopSequence": A stop sequence was encountered + * - "maxTokens": Maximum token limit was reached + * - "toolUse": The model wants to use one or more tools + * + * This field is an open string to allow for provider-specific stop reasons. + */ + stopReason: optional2(_enum3(["endTurn", "stopSequence", "maxTokens", "toolUse"]).or(string5())), + role: RoleSchema, + /** + * Response content. May be a single block or array. May include ToolUseContent if stopReason is "toolUse". + */ + content: union2([SamplingMessageContentBlockSchema2, array2(SamplingMessageContentBlockSchema2)]) +}); +var BooleanSchemaSchema2 = object4({ + type: literal2("boolean"), + title: string5().optional(), + description: string5().optional(), + default: boolean4().optional() +}); +var StringSchemaSchema2 = object4({ + type: literal2("string"), + title: string5().optional(), + description: string5().optional(), + minLength: number5().optional(), + maxLength: number5().optional(), + format: _enum3(["email", "uri", "date", "date-time"]).optional(), + default: string5().optional() +}); +var NumberSchemaSchema2 = object4({ + type: _enum3(["number", "integer"]), + title: string5().optional(), + description: string5().optional(), + minimum: number5().optional(), + maximum: number5().optional(), + default: number5().optional() +}); +var UntitledSingleSelectEnumSchemaSchema2 = object4({ + type: literal2("string"), + title: string5().optional(), + description: string5().optional(), + enum: array2(string5()), + default: string5().optional() +}); +var TitledSingleSelectEnumSchemaSchema2 = object4({ + type: literal2("string"), + title: string5().optional(), + description: string5().optional(), + oneOf: array2(object4({ + const: string5(), + title: string5() + })), + default: string5().optional() +}); +var LegacyTitledEnumSchemaSchema2 = object4({ + type: literal2("string"), + title: string5().optional(), + description: string5().optional(), + enum: array2(string5()), + enumNames: array2(string5()).optional(), + default: string5().optional() +}); +var SingleSelectEnumSchemaSchema2 = union2([UntitledSingleSelectEnumSchemaSchema2, TitledSingleSelectEnumSchemaSchema2]); +var UntitledMultiSelectEnumSchemaSchema2 = object4({ + type: literal2("array"), + title: string5().optional(), + description: string5().optional(), + minItems: number5().optional(), + maxItems: number5().optional(), + items: object4({ + type: literal2("string"), + enum: array2(string5()) + }), + default: array2(string5()).optional() +}); +var TitledMultiSelectEnumSchemaSchema2 = object4({ + type: literal2("array"), + title: string5().optional(), + description: string5().optional(), + minItems: number5().optional(), + maxItems: number5().optional(), + items: object4({ + anyOf: array2(object4({ + const: string5(), + title: string5() + })) + }), + default: array2(string5()).optional() +}); +var MultiSelectEnumSchemaSchema2 = union2([UntitledMultiSelectEnumSchemaSchema2, TitledMultiSelectEnumSchemaSchema2]); +var EnumSchemaSchema2 = union2([LegacyTitledEnumSchemaSchema2, SingleSelectEnumSchemaSchema2, MultiSelectEnumSchemaSchema2]); +var PrimitiveSchemaDefinitionSchema2 = union2([EnumSchemaSchema2, BooleanSchemaSchema2, StringSchemaSchema2, NumberSchemaSchema2]); +var ElicitRequestFormParamsSchema2 = TaskAugmentedRequestParamsSchema.extend({ + /** + * The elicitation mode. + * + * Optional for backward compatibility. Clients MUST treat missing mode as "form". + */ + mode: literal2("form").optional(), + /** + * The message to present to the user describing what information is being requested. + */ + message: string5(), + /** + * A restricted subset of JSON Schema. + * Only top-level properties are allowed, without nesting. + */ + requestedSchema: object4({ + type: literal2("object"), + properties: record2(string5(), PrimitiveSchemaDefinitionSchema2), + required: array2(string5()).optional() }) }); +var ElicitRequestURLParamsSchema2 = TaskAugmentedRequestParamsSchema.extend({ + /** + * The elicitation mode. + */ + mode: literal2("url"), + /** + * The message to present to the user explaining why the interaction is needed. + */ + message: string5(), + /** + * The ID of the elicitation, which must be unique within the context of the server. + * The client MUST treat this ID as an opaque value. + */ + elicitationId: string5(), + /** + * The URL that the user should navigate to. + */ + url: string5().url() +}); +var ElicitRequestParamsSchema2 = union2([ElicitRequestFormParamsSchema2, ElicitRequestURLParamsSchema2]); +var ElicitRequestSchema2 = RequestSchema2.extend({ + method: literal2("elicitation/create"), + params: ElicitRequestParamsSchema2 +}); +var ElicitationCompleteNotificationParamsSchema2 = NotificationsParamsSchema2.extend({ + /** + * The ID of the elicitation that completed. + */ + elicitationId: string5() +}); +var ElicitationCompleteNotificationSchema2 = NotificationSchema2.extend({ + method: literal2("notifications/elicitation/complete"), + params: ElicitationCompleteNotificationParamsSchema2 +}); var ElicitResultSchema2 = ResultSchema2.extend({ /** - * The user's response action. + * The user action in response to the elicitation. + * - "accept": User submitted the form/confirmed the action + * - "decline": User explicitly decline the action + * - "cancel": User dismissed without making an explicit choice */ - action: external_exports.enum(["accept", "decline", "cancel"]), + action: _enum3(["accept", "decline", "cancel"]), /** - * The collected user input content (only present if action is "accept"). + * The submitted form data, only present when action is "accept". + * Contains values matching the requested schema. + * Per MCP spec, content is "typically omitted" for decline/cancel actions. + * We normalize null to undefined for leniency while maintaining type compatibility. */ - content: external_exports.optional(external_exports.record(external_exports.string(), external_exports.unknown())) + content: preprocess2((val) => val === null ? void 0 : val, record2(string5(), union2([string5(), number5(), boolean4(), array2(string5())])).optional()) }); -var ResourceTemplateReferenceSchema2 = external_exports.object({ - type: external_exports.literal("ref/resource"), +var ResourceTemplateReferenceSchema2 = object4({ + type: literal2("ref/resource"), /** * The URI or URI template of the resource. */ - uri: external_exports.string() -}).passthrough(); -var PromptReferenceSchema2 = external_exports.object({ - type: external_exports.literal("ref/prompt"), + uri: string5() +}); +var PromptReferenceSchema2 = object4({ + type: literal2("ref/prompt"), /** * The name of the prompt or prompt template */ - name: external_exports.string() -}).passthrough(); -var CompleteRequestSchema2 = RequestSchema2.extend({ - method: external_exports.literal("completion/complete"), - params: BaseRequestParamsSchema2.extend({ - ref: external_exports.union([PromptReferenceSchema2, ResourceTemplateReferenceSchema2]), + name: string5() +}); +var CompleteRequestParamsSchema2 = BaseRequestParamsSchema2.extend({ + ref: union2([PromptReferenceSchema2, ResourceTemplateReferenceSchema2]), + /** + * The argument's information + */ + argument: object4({ /** - * The argument's information + * The name of the argument */ - argument: external_exports.object({ - /** - * The name of the argument - */ - name: external_exports.string(), - /** - * The value of the argument to use for completion matching. - */ - value: external_exports.string() - }).passthrough(), - context: external_exports.optional(external_exports.object({ - /** - * Previously-resolved variables in a URI template or prompt. - */ - arguments: external_exports.optional(external_exports.record(external_exports.string(), external_exports.string())) - })) - }) + name: string5(), + /** + * The value of the argument to use for completion matching. + */ + value: string5() + }), + context: object4({ + /** + * Previously-resolved variables in a URI template or prompt. + */ + arguments: record2(string5(), string5()).optional() + }).optional() +}); +var CompleteRequestSchema2 = RequestSchema2.extend({ + method: literal2("completion/complete"), + params: CompleteRequestParamsSchema2 }); var CompleteResultSchema2 = ResultSchema2.extend({ - completion: external_exports.object({ + completion: looseObject2({ /** * An array of completion values. Must not exceed 100 items. */ - values: external_exports.array(external_exports.string()).max(100), + values: array2(string5()).max(100), /** * The total number of completion options available. This can exceed the number of values actually sent in the response. */ - total: external_exports.optional(external_exports.number().int()), + total: optional2(number5().int()), /** * Indicates whether there are additional completion options beyond those provided in the current response, even if the exact total is unknown. */ - hasMore: external_exports.optional(external_exports.boolean()) - }).passthrough() + hasMore: optional2(boolean4()) + }) }); -var RootSchema2 = external_exports.object({ +var RootSchema2 = object4({ /** * The URI identifying the root. This *must* start with file:// for now. */ - uri: external_exports.string().startsWith("file://"), + uri: string5().startsWith("file://"), /** * An optional name for the root. */ - name: external_exports.optional(external_exports.string()), + name: string5().optional(), /** * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields) * for notes on _meta usage. */ - _meta: external_exports.optional(external_exports.object({}).passthrough()) -}).passthrough(); + _meta: record2(string5(), unknown3()).optional() +}); var ListRootsRequestSchema2 = RequestSchema2.extend({ - method: external_exports.literal("roots/list") + method: literal2("roots/list"), + params: BaseRequestParamsSchema2.optional() }); var ListRootsResultSchema2 = ResultSchema2.extend({ - roots: external_exports.array(RootSchema2) + roots: array2(RootSchema2) }); var RootsListChangedNotificationSchema2 = NotificationSchema2.extend({ - method: external_exports.literal("notifications/roots/list_changed") + method: literal2("notifications/roots/list_changed"), + params: NotificationsParamsSchema2.optional() }); -var ClientRequestSchema2 = external_exports.union([ +var ClientRequestSchema2 = union2([ PingRequestSchema2, InitializeRequestSchema2, CompleteRequestSchema2, @@ -101238,26 +110422,51 @@ var ClientRequestSchema2 = external_exports.union([ SubscribeRequestSchema2, UnsubscribeRequestSchema2, CallToolRequestSchema2, - ListToolsRequestSchema2 + ListToolsRequestSchema2, + GetTaskRequestSchema2, + GetTaskPayloadRequestSchema2, + ListTasksRequestSchema2, + CancelTaskRequestSchema2 ]); -var ClientNotificationSchema2 = external_exports.union([ +var ClientNotificationSchema2 = union2([ CancelledNotificationSchema2, ProgressNotificationSchema2, InitializedNotificationSchema2, - RootsListChangedNotificationSchema2 + RootsListChangedNotificationSchema2, + TaskStatusNotificationSchema2 ]); -var ClientResultSchema2 = external_exports.union([EmptyResultSchema2, CreateMessageResultSchema2, ElicitResultSchema2, ListRootsResultSchema2]); -var ServerRequestSchema2 = external_exports.union([PingRequestSchema2, CreateMessageRequestSchema2, ElicitRequestSchema2, ListRootsRequestSchema2]); -var ServerNotificationSchema2 = external_exports.union([ +var ClientResultSchema2 = union2([ + EmptyResultSchema2, + CreateMessageResultSchema2, + CreateMessageResultWithToolsSchema2, + ElicitResultSchema2, + ListRootsResultSchema2, + GetTaskResultSchema2, + ListTasksResultSchema2, + CreateTaskResultSchema2 +]); +var ServerRequestSchema2 = union2([ + PingRequestSchema2, + CreateMessageRequestSchema2, + ElicitRequestSchema2, + ListRootsRequestSchema2, + GetTaskRequestSchema2, + GetTaskPayloadRequestSchema2, + ListTasksRequestSchema2, + CancelTaskRequestSchema2 +]); +var ServerNotificationSchema2 = union2([ CancelledNotificationSchema2, ProgressNotificationSchema2, LoggingMessageNotificationSchema2, ResourceUpdatedNotificationSchema2, ResourceListChangedNotificationSchema2, ToolListChangedNotificationSchema2, - PromptListChangedNotificationSchema2 + PromptListChangedNotificationSchema2, + TaskStatusNotificationSchema2, + ElicitationCompleteNotificationSchema2 ]); -var ServerResultSchema2 = external_exports.union([ +var ServerResultSchema2 = union2([ EmptyResultSchema2, InitializeResultSchema2, CompleteResultSchema2, @@ -101267,18 +110476,70 @@ var ServerResultSchema2 = external_exports.union([ ListResourceTemplatesResultSchema2, ReadResourceResultSchema2, CallToolResultSchema2, - ListToolsResultSchema2 + ListToolsResultSchema2, + GetTaskResultSchema2, + ListTasksResultSchema2, + CreateTaskResultSchema2 ]); -var McpError = class extends Error { +var McpError = class _McpError extends Error { constructor(code, message, data) { super(`MCP error ${code}: ${message}`); this.code = code; this.data = data; this.name = "McpError"; } + /** + * Factory method to create the appropriate error type based on the error code and data + */ + static fromError(code, message, data) { + if (code === ErrorCode2.UrlElicitationRequired && data) { + const errorData = data; + if (errorData.elicitations) { + return new UrlElicitationRequiredError(errorData.elicitations, message); + } + } + return new _McpError(code, message, data); + } +}; +var UrlElicitationRequiredError = class extends McpError { + constructor(elicitations, message = `URL elicitation${elicitations.length > 1 ? "s" : ""} required`) { + super(ErrorCode2.UrlElicitationRequired, message, { + elicitations + }); + } + get elicitations() { + return this.data?.elicitations ?? []; + } }; -// node_modules/.pnpm/@modelcontextprotocol+sdk@1.20.0/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/protocol.js +// ../node_modules/.pnpm/@modelcontextprotocol+sdk@1.25.2_hono@4.10.6_zod@4.3.5/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/interfaces.js +function isTerminal(status) { + return status === "completed" || status === "failed" || status === "cancelled"; +} + +// ../node_modules/.pnpm/@modelcontextprotocol+sdk@1.25.2_hono@4.10.6_zod@4.3.5/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-json-schema-compat.js +init_esm(); +function getMethodLiteral(schema2) { + const shape = getObjectShape(schema2); + const methodSchema = shape?.method; + if (!methodSchema) { + throw new Error("Schema is missing a method literal"); + } + const value2 = getLiteralValue(methodSchema); + if (typeof value2 !== "string") { + throw new Error("Schema method literal must be a string"); + } + return value2; +} +function parseWithCompat(schema2, data) { + const result = safeParse5(schema2, data); + if (!result.success) { + throw result.error; + } + return result.data; +} + +// ../node_modules/.pnpm/@modelcontextprotocol+sdk@1.25.2_hono@4.10.6_zod@4.3.5/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/protocol.js var DEFAULT_REQUEST_TIMEOUT_MSEC = 6e4; var Protocol = class { constructor(_options) { @@ -101291,9 +110552,10 @@ var Protocol = class { this._progressHandlers = /* @__PURE__ */ new Map(); this._timeoutInfo = /* @__PURE__ */ new Map(); this._pendingDebouncedNotifications = /* @__PURE__ */ new Set(); + this._taskProgressTokens = /* @__PURE__ */ new Map(); + this._requestResolvers = /* @__PURE__ */ new Map(); this.setNotificationHandler(CancelledNotificationSchema2, (notification) => { - const controller = this._requestHandlerAbortControllers.get(notification.params.requestId); - controller === null || controller === void 0 ? void 0 : controller.abort(notification.params.reason); + this._oncancel(notification); }); this.setNotificationHandler(ProgressNotificationSchema2, (notification) => { this._onprogress(notification); @@ -101303,6 +110565,117 @@ var Protocol = class { // Automatic pong by default. (_request) => ({}) ); + this._taskStore = _options?.taskStore; + this._taskMessageQueue = _options?.taskMessageQueue; + if (this._taskStore) { + this.setRequestHandler(GetTaskRequestSchema2, async (request2, extra) => { + const task = await this._taskStore.getTask(request2.params.taskId, extra.sessionId); + if (!task) { + throw new McpError(ErrorCode2.InvalidParams, "Failed to retrieve task: Task not found"); + } + return { + ...task + }; + }); + this.setRequestHandler(GetTaskPayloadRequestSchema2, async (request2, extra) => { + const handleTaskResult = async () => { + const taskId = request2.params.taskId; + if (this._taskMessageQueue) { + let queuedMessage; + while (queuedMessage = await this._taskMessageQueue.dequeue(taskId, extra.sessionId)) { + if (queuedMessage.type === "response" || queuedMessage.type === "error") { + const message = queuedMessage.message; + const requestId = message.id; + const resolver = this._requestResolvers.get(requestId); + if (resolver) { + this._requestResolvers.delete(requestId); + if (queuedMessage.type === "response") { + resolver(message); + } else { + const errorMessage = message; + const error50 = new McpError(errorMessage.error.code, errorMessage.error.message, errorMessage.error.data); + resolver(error50); + } + } else { + const messageType = queuedMessage.type === "response" ? "Response" : "Error"; + this._onerror(new Error(`${messageType} handler missing for request ${requestId}`)); + } + continue; + } + await this._transport?.send(queuedMessage.message, { relatedRequestId: extra.requestId }); + } + } + const task = await this._taskStore.getTask(taskId, extra.sessionId); + if (!task) { + throw new McpError(ErrorCode2.InvalidParams, `Task not found: ${taskId}`); + } + if (!isTerminal(task.status)) { + await this._waitForTaskUpdate(taskId, extra.signal); + return await handleTaskResult(); + } + if (isTerminal(task.status)) { + const result = await this._taskStore.getTaskResult(taskId, extra.sessionId); + this._clearTaskQueue(taskId); + return { + ...result, + _meta: { + ...result._meta, + [RELATED_TASK_META_KEY2]: { + taskId + } + } + }; + } + return await handleTaskResult(); + }; + return await handleTaskResult(); + }); + this.setRequestHandler(ListTasksRequestSchema2, async (request2, extra) => { + try { + const { tasks, nextCursor } = await this._taskStore.listTasks(request2.params?.cursor, extra.sessionId); + return { + tasks, + nextCursor, + _meta: {} + }; + } catch (error50) { + throw new McpError(ErrorCode2.InvalidParams, `Failed to list tasks: ${error50 instanceof Error ? error50.message : String(error50)}`); + } + }); + this.setRequestHandler(CancelTaskRequestSchema2, async (request2, extra) => { + try { + const task = await this._taskStore.getTask(request2.params.taskId, extra.sessionId); + if (!task) { + throw new McpError(ErrorCode2.InvalidParams, `Task not found: ${request2.params.taskId}`); + } + if (isTerminal(task.status)) { + throw new McpError(ErrorCode2.InvalidParams, `Cannot cancel task in terminal status: ${task.status}`); + } + await this._taskStore.updateTaskStatus(request2.params.taskId, "cancelled", "Client cancelled task execution.", extra.sessionId); + this._clearTaskQueue(request2.params.taskId); + const cancelledTask = await this._taskStore.getTask(request2.params.taskId, extra.sessionId); + if (!cancelledTask) { + throw new McpError(ErrorCode2.InvalidParams, `Task not found after cancellation: ${request2.params.taskId}`); + } + return { + _meta: {}, + ...cancelledTask + }; + } catch (error50) { + if (error50 instanceof McpError) { + throw error50; + } + throw new McpError(ErrorCode2.InvalidRequest, `Failed to cancel task: ${error50 instanceof Error ? error50.message : String(error50)}`); + } + }); + } + } + async _oncancel(notification) { + if (!notification.params.requestId) { + return; + } + const controller = this._requestHandlerAbortControllers.get(notification.params.requestId); + controller?.abort(notification.params.reason); } _setupTimeout(messageId, timeout, maxTotalTimeout, onTimeout, resetTimeoutOnProgress = false) { this._timeoutInfo.set(messageId, { @@ -101321,7 +110694,7 @@ var Protocol = class { const totalElapsed = Date.now() - info2.startTime; if (info2.maxTotalTimeout && totalElapsed >= info2.maxTotalTimeout) { this._timeoutInfo.delete(messageId); - throw new McpError(ErrorCode2.RequestTimeout, "Maximum total timeout exceeded", { + throw McpError.fromError(ErrorCode2.RequestTimeout, "Maximum total timeout exceeded", { maxTotalTimeout: info2.maxTotalTimeout, totalElapsed }); @@ -101343,22 +110716,21 @@ var Protocol = class { * The Protocol object assumes ownership of the Transport, replacing any callbacks that have already been set, and expects that it is the only user of the Transport instance going forward. */ async connect(transport) { - var _a, _b, _c; this._transport = transport; - const _onclose = (_a = this.transport) === null || _a === void 0 ? void 0 : _a.onclose; + const _onclose = this.transport?.onclose; this._transport.onclose = () => { - _onclose === null || _onclose === void 0 ? void 0 : _onclose(); + _onclose?.(); 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); + const _onerror = this.transport?.onerror; + this._transport.onerror = (error50) => { + _onerror?.(error50); + this._onerror(error50); }; - const _onmessage = (_c = this._transport) === null || _c === void 0 ? void 0 : _c.onmessage; + const _onmessage = this._transport?.onmessage; this._transport.onmessage = (message, extra) => { - _onmessage === null || _onmessage === void 0 ? void 0 : _onmessage(message, extra); - if (isJSONRPCResponse(message) || isJSONRPCError(message)) { + _onmessage?.(message, extra); + if (isJSONRPCResultResponse(message) || isJSONRPCErrorResponse(message)) { this._onresponse(message); } else if (isJSONRPCRequest(message)) { this._onrequest(message, extra); @@ -101371,80 +110743,132 @@ var Protocol = class { await this._transport.start(); } _onclose() { - var _a; const responseHandlers = this._responseHandlers; this._responseHandlers = /* @__PURE__ */ new Map(); this._progressHandlers.clear(); + this._taskProgressTokens.clear(); this._pendingDebouncedNotifications.clear(); + const error50 = McpError.fromError(ErrorCode2.ConnectionClosed, "Connection closed"); this._transport = void 0; - (_a = this.onclose) === null || _a === void 0 ? void 0 : _a.call(this); - const error41 = new McpError(ErrorCode2.ConnectionClosed, "Connection closed"); + this.onclose?.(); for (const handler2 of responseHandlers.values()) { - handler2(error41); + handler2(error50); } } - _onerror(error41) { - var _a; - (_a = this.onerror) === null || _a === void 0 ? void 0 : _a.call(this, error41); + _onerror(error50) { + this.onerror?.(error50); } _onnotification(notification) { - var _a; - const handler2 = (_a = this._notificationHandlers.get(notification.method)) !== null && _a !== void 0 ? _a : this.fallbackNotificationHandler; + const handler2 = this._notificationHandlers.get(notification.method) ?? this.fallbackNotificationHandler; 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((error50) => this._onerror(new Error(`Uncaught error in notification handler: ${error50}`))); } _onrequest(request2, extra) { - var _a, _b; - const handler2 = (_a = this._requestHandlers.get(request2.method)) !== null && _a !== void 0 ? _a : this.fallbackRequestHandler; + const handler2 = this._requestHandlers.get(request2.method) ?? this.fallbackRequestHandler; const capturedTransport = this._transport; + const relatedTaskId = request2.params?._meta?.[RELATED_TASK_META_KEY2]?.taskId; if (handler2 === void 0) { - capturedTransport === null || capturedTransport === void 0 ? void 0 : capturedTransport.send({ + const errorResponse = { jsonrpc: "2.0", id: request2.id, error: { code: ErrorCode2.MethodNotFound, message: "Method not found" } - }).catch((error41) => this._onerror(new Error(`Failed to send an error response: ${error41}`))); + }; + if (relatedTaskId && this._taskMessageQueue) { + this._enqueueTaskMessage(relatedTaskId, { + type: "error", + message: errorResponse, + timestamp: Date.now() + }, capturedTransport?.sessionId).catch((error50) => this._onerror(new Error(`Failed to enqueue error response: ${error50}`))); + } else { + capturedTransport?.send(errorResponse).catch((error50) => this._onerror(new Error(`Failed to send an error response: ${error50}`))); + } return; } const abortController = new AbortController(); this._requestHandlerAbortControllers.set(request2.id, abortController); + const taskCreationParams = isTaskAugmentedRequestParams(request2.params) ? request2.params.task : void 0; + const taskStore = this._taskStore ? this.requestTaskStore(request2, capturedTransport?.sessionId) : void 0; const fullExtra = { signal: abortController.signal, - sessionId: capturedTransport === null || capturedTransport === void 0 ? void 0 : capturedTransport.sessionId, - _meta: (_b = request2.params) === null || _b === void 0 ? void 0 : _b._meta, - sendNotification: (notification) => this.notification(notification, { relatedRequestId: request2.id }), - sendRequest: (r, resultSchema, options) => this.request(r, resultSchema, { ...options, relatedRequestId: request2.id }), - authInfo: extra === null || extra === void 0 ? void 0 : extra.authInfo, + sessionId: capturedTransport?.sessionId, + _meta: request2.params?._meta, + sendNotification: async (notification) => { + const notificationOptions = { relatedRequestId: request2.id }; + if (relatedTaskId) { + notificationOptions.relatedTask = { taskId: relatedTaskId }; + } + await this.notification(notification, notificationOptions); + }, + sendRequest: async (r, resultSchema, options) => { + const requestOptions = { ...options, relatedRequestId: request2.id }; + if (relatedTaskId && !requestOptions.relatedTask) { + requestOptions.relatedTask = { taskId: relatedTaskId }; + } + const effectiveTaskId = requestOptions.relatedTask?.taskId ?? relatedTaskId; + if (effectiveTaskId && taskStore) { + await taskStore.updateTaskStatus(effectiveTaskId, "input_required"); + } + return await this.request(r, resultSchema, requestOptions); + }, + authInfo: extra?.authInfo, requestId: request2.id, - requestInfo: extra === null || extra === void 0 ? void 0 : extra.requestInfo + requestInfo: extra?.requestInfo, + taskId: relatedTaskId, + taskStore, + taskRequestedTtl: taskCreationParams?.ttl, + closeSSEStream: extra?.closeSSEStream, + closeStandaloneSSEStream: extra?.closeStandaloneSSEStream }; - Promise.resolve().then(() => handler2(request2, fullExtra)).then((result) => { + Promise.resolve().then(() => { + if (taskCreationParams) { + this.assertTaskHandlerCapability(request2.method); + } + }).then(() => handler2(request2, fullExtra)).then(async (result) => { if (abortController.signal.aborted) { return; } - return capturedTransport === null || capturedTransport === void 0 ? void 0 : capturedTransport.send({ + const response = { result, jsonrpc: "2.0", id: request2.id - }); - }, (error41) => { - var _a2; + }; + if (relatedTaskId && this._taskMessageQueue) { + await this._enqueueTaskMessage(relatedTaskId, { + type: "response", + message: response, + timestamp: Date.now() + }, capturedTransport?.sessionId); + } else { + await capturedTransport?.send(response); + } + }, async (error50) => { if (abortController.signal.aborted) { return; } - return capturedTransport === null || capturedTransport === void 0 ? void 0 : capturedTransport.send({ + const errorResponse = { 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(error50["code"]) ? error50["code"] : ErrorCode2.InternalError, + message: error50.message ?? "Internal error", + ...error50["data"] !== void 0 && { data: error50["data"] } } - }); - }).catch((error41) => this._onerror(new Error(`Failed to send response: ${error41}`))).finally(() => { + }; + if (relatedTaskId && this._taskMessageQueue) { + await this._enqueueTaskMessage(relatedTaskId, { + type: "error", + message: errorResponse, + timestamp: Date.now() + }, capturedTransport?.sessionId); + } else { + await capturedTransport?.send(errorResponse); + } + }).catch((error50) => this._onerror(new Error(`Failed to send response: ${error50}`))).finally(() => { this._requestHandlerAbortControllers.delete(request2.id); }); } @@ -101461,8 +110885,11 @@ var Protocol = class { if (timeoutInfo && responseHandler && timeoutInfo.resetTimeoutOnProgress) { try { this._resetTimeout(messageId); - } catch (error41) { - responseHandler(error41); + } catch (error50) { + this._responseHandlers.delete(messageId); + this._progressHandlers.delete(messageId); + this._cleanupTimeout(messageId); + responseHandler(error50); return; } } @@ -101470,19 +110897,43 @@ var Protocol = class { } _onresponse(response) { const messageId = Number(response.id); + const resolver = this._requestResolvers.get(messageId); + if (resolver) { + this._requestResolvers.delete(messageId); + if (isJSONRPCResultResponse(response)) { + resolver(response); + } else { + const error50 = new McpError(response.error.code, response.error.message, response.error.data); + resolver(error50); + } + return; + } const handler2 = this._responseHandlers.get(messageId); if (handler2 === void 0) { this._onerror(new Error(`Received a response for an unknown message ID: ${JSON.stringify(response)}`)); return; } this._responseHandlers.delete(messageId); - this._progressHandlers.delete(messageId); this._cleanupTimeout(messageId); - if (isJSONRPCResponse(response)) { + let isTaskResponse = false; + if (isJSONRPCResultResponse(response) && response.result && typeof response.result === "object") { + const result = response.result; + if (result.task && typeof result.task === "object") { + const task = result.task; + if (typeof task.taskId === "string") { + isTaskResponse = true; + this._taskProgressTokens.set(task.taskId, messageId); + } + } + } + if (!isTaskResponse) { + this._progressHandlers.delete(messageId); + } + if (isJSONRPCResultResponse(response)) { handler2(response); } else { - const error41 = new McpError(response.error.code, response.error.message, response.error.data); - handler2(error41); + const error50 = McpError.fromError(response.error.code, response.error.message, response.error.data); + handler2(error50); } } get transport() { @@ -101492,119 +110943,326 @@ var Protocol = class { * Closes the connection. */ async close() { - var _a; - await ((_a = this._transport) === null || _a === void 0 ? void 0 : _a.close()); + await this._transport?.close(); } /** - * Sends a request and wait for a response. + * Sends a request and returns an AsyncGenerator that yields response messages. + * The generator is guaranteed to end with either a 'result' or 'error' message. + * + * @example + * ```typescript + * const stream = protocol.requestStream(request, resultSchema, options); + * for await (const message of stream) { + * switch (message.type) { + * case 'taskCreated': + * console.log('Task created:', message.task.taskId); + * break; + * case 'taskStatus': + * console.log('Task status:', message.task.status); + * break; + * case 'result': + * console.log('Final result:', message.result); + * break; + * case 'error': + * console.error('Error:', message.error); + * break; + * } + * } + * ``` + * + * @experimental Use `client.experimental.tasks.requestStream()` to access this method. + */ + async *requestStream(request2, resultSchema, options) { + const { task } = options ?? {}; + if (!task) { + try { + const result = await this.request(request2, resultSchema, options); + yield { type: "result", result }; + } catch (error50) { + yield { + type: "error", + error: error50 instanceof McpError ? error50 : new McpError(ErrorCode2.InternalError, String(error50)) + }; + } + return; + } + let taskId; + try { + const createResult = await this.request(request2, CreateTaskResultSchema2, options); + if (createResult.task) { + taskId = createResult.task.taskId; + yield { type: "taskCreated", task: createResult.task }; + } else { + throw new McpError(ErrorCode2.InternalError, "Task creation did not return a task"); + } + while (true) { + const task2 = await this.getTask({ taskId }, options); + yield { type: "taskStatus", task: task2 }; + if (isTerminal(task2.status)) { + if (task2.status === "completed") { + const result = await this.getTaskResult({ taskId }, resultSchema, options); + yield { type: "result", result }; + } else if (task2.status === "failed") { + yield { + type: "error", + error: new McpError(ErrorCode2.InternalError, `Task ${taskId} failed`) + }; + } else if (task2.status === "cancelled") { + yield { + type: "error", + error: new McpError(ErrorCode2.InternalError, `Task ${taskId} was cancelled`) + }; + } + return; + } + if (task2.status === "input_required") { + const result = await this.getTaskResult({ taskId }, resultSchema, options); + yield { type: "result", result }; + return; + } + const pollInterval = task2.pollInterval ?? this._options?.defaultTaskPollInterval ?? 1e3; + await new Promise((resolve) => setTimeout(resolve, pollInterval)); + options?.signal?.throwIfAborted(); + } + } catch (error50) { + yield { + type: "error", + error: error50 instanceof McpError ? error50 : new McpError(ErrorCode2.InternalError, String(error50)) + }; + } + } + /** + * Sends a request and waits for a response. * * Do not use this method to emit notifications! Use notification() instead. */ request(request2, resultSchema, options) { - const { relatedRequestId, resumptionToken, onresumptiontoken } = options !== null && options !== void 0 ? options : {}; + const { relatedRequestId, resumptionToken, onresumptiontoken, task, relatedTask } = options ?? {}; return new Promise((resolve, reject) => { - var _a, _b, _c, _d, _e, _f; + const earlyReject = (error50) => { + reject(error50); + }; if (!this._transport) { - reject(new Error("Not connected")); + earlyReject(new Error("Not connected")); return; } - if (((_a = this._options) === null || _a === void 0 ? void 0 : _a.enforceStrictCapabilities) === true) { - this.assertCapabilityForMethod(request2.method); + if (this._options?.enforceStrictCapabilities === true) { + try { + this.assertCapabilityForMethod(request2.method); + if (task) { + this.assertTaskCapability(request2.method); + } + } catch (e) { + earlyReject(e); + return; + } } - (_b = options === null || options === void 0 ? void 0 : options.signal) === null || _b === void 0 ? void 0 : _b.throwIfAborted(); + options?.signal?.throwIfAborted(); const messageId = this._requestMessageId++; const jsonrpcRequest = { ...request2, jsonrpc: "2.0", id: messageId }; - if (options === null || options === void 0 ? void 0 : options.onprogress) { + if (options?.onprogress) { this._progressHandlers.set(messageId, options.onprogress); jsonrpcRequest.params = { ...request2.params, _meta: { - ...((_c = request2.params) === null || _c === void 0 ? void 0 : _c._meta) || {}, + ...request2.params?._meta || {}, progressToken: messageId } }; } + if (task) { + jsonrpcRequest.params = { + ...jsonrpcRequest.params, + task + }; + } + if (relatedTask) { + jsonrpcRequest.params = { + ...jsonrpcRequest.params, + _meta: { + ...jsonrpcRequest.params?._meta || {}, + [RELATED_TASK_META_KEY2]: relatedTask + } + }; + } const cancel = (reason) => { - var _a2; this._responseHandlers.delete(messageId); this._progressHandlers.delete(messageId); this._cleanupTimeout(messageId); - (_a2 = this._transport) === null || _a2 === void 0 ? void 0 : _a2.send({ + this._transport?.send({ jsonrpc: "2.0", method: "notifications/cancelled", params: { requestId: messageId, reason: String(reason) } - }, { relatedRequestId, resumptionToken, onresumptiontoken }).catch((error41) => this._onerror(new Error(`Failed to send cancellation: ${error41}`))); - reject(reason); + }, { relatedRequestId, resumptionToken, onresumptiontoken }).catch((error51) => this._onerror(new Error(`Failed to send cancellation: ${error51}`))); + const error50 = reason instanceof McpError ? reason : new McpError(ErrorCode2.RequestTimeout, String(reason)); + reject(error50); }; this._responseHandlers.set(messageId, (response) => { - var _a2; - if ((_a2 = options === null || options === void 0 ? void 0 : options.signal) === null || _a2 === void 0 ? void 0 : _a2.aborted) { + if (options?.signal?.aborted) { return; } if (response instanceof Error) { return reject(response); } try { - const result = resultSchema.parse(response.result); - resolve(result); - } catch (error41) { - reject(error41); + const parseResult = safeParse5(resultSchema, response.result); + if (!parseResult.success) { + reject(parseResult.error); + } else { + resolve(parseResult.data); + } + } catch (error50) { + reject(error50); } }); - (_d = options === null || options === void 0 ? void 0 : options.signal) === null || _d === void 0 ? void 0 : _d.addEventListener("abort", () => { - var _a2; - cancel((_a2 = options === null || options === void 0 ? void 0 : options.signal) === null || _a2 === void 0 ? void 0 : _a2.reason); - }); - 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._cleanupTimeout(messageId); - reject(error41); + options?.signal?.addEventListener("abort", () => { + cancel(options?.signal?.reason); }); + const timeout = options?.timeout ?? DEFAULT_REQUEST_TIMEOUT_MSEC; + const timeoutHandler = () => cancel(McpError.fromError(ErrorCode2.RequestTimeout, "Request timed out", { timeout })); + this._setupTimeout(messageId, timeout, options?.maxTotalTimeout, timeoutHandler, options?.resetTimeoutOnProgress ?? false); + const relatedTaskId = relatedTask?.taskId; + if (relatedTaskId) { + const responseResolver = (response) => { + const handler2 = this._responseHandlers.get(messageId); + if (handler2) { + handler2(response); + } else { + this._onerror(new Error(`Response handler missing for side-channeled request ${messageId}`)); + } + }; + this._requestResolvers.set(messageId, responseResolver); + this._enqueueTaskMessage(relatedTaskId, { + type: "request", + message: jsonrpcRequest, + timestamp: Date.now() + }).catch((error50) => { + this._cleanupTimeout(messageId); + reject(error50); + }); + } else { + this._transport.send(jsonrpcRequest, { relatedRequestId, resumptionToken, onresumptiontoken }).catch((error50) => { + this._cleanupTimeout(messageId); + reject(error50); + }); + } }); } + /** + * Gets the current status of a task. + * + * @experimental Use `client.experimental.tasks.getTask()` to access this method. + */ + async getTask(params, options) { + return this.request({ method: "tasks/get", params }, GetTaskResultSchema2, options); + } + /** + * Retrieves the result of a completed task. + * + * @experimental Use `client.experimental.tasks.getTaskResult()` to access this method. + */ + async getTaskResult(params, resultSchema, options) { + return this.request({ method: "tasks/result", params }, resultSchema, options); + } + /** + * Lists tasks, optionally starting from a pagination cursor. + * + * @experimental Use `client.experimental.tasks.listTasks()` to access this method. + */ + async listTasks(params, options) { + return this.request({ method: "tasks/list", params }, ListTasksResultSchema2, options); + } + /** + * Cancels a specific task. + * + * @experimental Use `client.experimental.tasks.cancelTask()` to access this method. + */ + async cancelTask(params, options) { + return this.request({ method: "tasks/cancel", params }, CancelTaskResultSchema2, options); + } /** * Emits a notification, which is a one-way message that does not expect a response. */ async notification(notification, options) { - var _a, _b; if (!this._transport) { throw new Error("Not connected"); } this.assertNotificationCapability(notification.method); - const debouncedMethods = (_b = (_a = this._options) === null || _a === void 0 ? void 0 : _a.debouncedNotificationMethods) !== null && _b !== void 0 ? _b : []; - const canDebounce = debouncedMethods.includes(notification.method) && !notification.params && !(options === null || options === void 0 ? void 0 : options.relatedRequestId); + const relatedTaskId = options?.relatedTask?.taskId; + if (relatedTaskId) { + const jsonrpcNotification2 = { + ...notification, + jsonrpc: "2.0", + params: { + ...notification.params, + _meta: { + ...notification.params?._meta || {}, + [RELATED_TASK_META_KEY2]: options.relatedTask + } + } + }; + await this._enqueueTaskMessage(relatedTaskId, { + type: "notification", + message: jsonrpcNotification2, + timestamp: Date.now() + }); + return; + } + const debouncedMethods = this._options?.debouncedNotificationMethods ?? []; + const canDebounce = debouncedMethods.includes(notification.method) && !notification.params && !options?.relatedRequestId && !options?.relatedTask; if (canDebounce) { if (this._pendingDebouncedNotifications.has(notification.method)) { return; } this._pendingDebouncedNotifications.add(notification.method); Promise.resolve().then(() => { - var _a2; this._pendingDebouncedNotifications.delete(notification.method); if (!this._transport) { return; } - const jsonrpcNotification2 = { + let jsonrpcNotification2 = { ...notification, jsonrpc: "2.0" }; - (_a2 = this._transport) === null || _a2 === void 0 ? void 0 : _a2.send(jsonrpcNotification2, options).catch((error41) => this._onerror(error41)); + if (options?.relatedTask) { + jsonrpcNotification2 = { + ...jsonrpcNotification2, + params: { + ...jsonrpcNotification2.params, + _meta: { + ...jsonrpcNotification2.params?._meta || {}, + [RELATED_TASK_META_KEY2]: options.relatedTask + } + } + }; + } + this._transport?.send(jsonrpcNotification2, options).catch((error50) => this._onerror(error50)); }); return; } - const jsonrpcNotification = { + let jsonrpcNotification = { ...notification, jsonrpc: "2.0" }; + if (options?.relatedTask) { + jsonrpcNotification = { + ...jsonrpcNotification, + params: { + ...jsonrpcNotification.params, + _meta: { + ...jsonrpcNotification.params?._meta || {}, + [RELATED_TASK_META_KEY2]: options.relatedTask + } + } + }; + } await this._transport.send(jsonrpcNotification, options); } /** @@ -101613,10 +111271,11 @@ var Protocol = class { * Note that this will replace any previous request handler for the same method. */ setRequestHandler(requestSchema, handler2) { - const method = requestSchema.shape.method.value; + const method = getMethodLiteral(requestSchema); this.assertRequestHandlerCapability(method); this._requestHandlers.set(method, (request2, extra) => { - return Promise.resolve(handler2(requestSchema.parse(request2), extra)); + const parsed2 = parseWithCompat(requestSchema, request2); + return Promise.resolve(handler2(parsed2, extra)); }); } /** @@ -101639,7 +111298,11 @@ var Protocol = class { * Note that this will replace any previous notification handler for the same method. */ setNotificationHandler(notificationSchema, handler2) { - this._notificationHandlers.set(notificationSchema.shape.method.value, (notification) => Promise.resolve(handler2(notificationSchema.parse(notification)))); + const method = getMethodLiteral(notificationSchema); + this._notificationHandlers.set(method, (notification) => { + const parsed2 = parseWithCompat(notificationSchema, notification); + return Promise.resolve(handler2(parsed2)); + }); } /** * Removes the notification handler for the given method. @@ -101647,26 +111310,352 @@ var Protocol = class { removeNotificationHandler(method) { this._notificationHandlers.delete(method); } -}; -function mergeCapabilities(base, additional) { - return Object.entries(additional).reduce((acc, [key, value2]) => { - if (value2 && typeof value2 === "object") { - acc[key] = acc[key] ? { ...acc[key], ...value2 } : value2; - } else { - acc[key] = value2; + /** + * Cleans up the progress handler associated with a task. + * This should be called when a task reaches a terminal status. + */ + _cleanupTaskProgressHandler(taskId) { + const progressToken = this._taskProgressTokens.get(taskId); + if (progressToken !== void 0) { + this._progressHandlers.delete(progressToken); + this._taskProgressTokens.delete(taskId); } - return acc; - }, { ...base }); + } + /** + * Enqueues a task-related message for side-channel delivery via tasks/result. + * @param taskId The task ID to associate the message with + * @param message The message to enqueue + * @param sessionId Optional session ID for binding the operation to a specific session + * @throws Error if taskStore is not configured or if enqueue fails (e.g., queue overflow) + * + * Note: If enqueue fails, it's the TaskMessageQueue implementation's responsibility to handle + * the error appropriately (e.g., by failing the task, logging, etc.). The Protocol layer + * simply propagates the error. + */ + async _enqueueTaskMessage(taskId, message, sessionId) { + if (!this._taskStore || !this._taskMessageQueue) { + throw new Error("Cannot enqueue task message: taskStore and taskMessageQueue are not configured"); + } + const maxQueueSize = this._options?.maxTaskQueueSize; + await this._taskMessageQueue.enqueue(taskId, message, sessionId, maxQueueSize); + } + /** + * Clears the message queue for a task and rejects any pending request resolvers. + * @param taskId The task ID whose queue should be cleared + * @param sessionId Optional session ID for binding the operation to a specific session + */ + async _clearTaskQueue(taskId, sessionId) { + if (this._taskMessageQueue) { + const messages = await this._taskMessageQueue.dequeueAll(taskId, sessionId); + for (const message of messages) { + if (message.type === "request" && isJSONRPCRequest(message.message)) { + const requestId = message.message.id; + const resolver = this._requestResolvers.get(requestId); + if (resolver) { + resolver(new McpError(ErrorCode2.InternalError, "Task cancelled or completed")); + this._requestResolvers.delete(requestId); + } else { + this._onerror(new Error(`Resolver missing for request ${requestId} during task ${taskId} cleanup`)); + } + } + } + } + } + /** + * Waits for a task update (new messages or status change) with abort signal support. + * Uses polling to check for updates at the task's configured poll interval. + * @param taskId The task ID to wait for + * @param signal Abort signal to cancel the wait + * @returns Promise that resolves when an update occurs or rejects if aborted + */ + async _waitForTaskUpdate(taskId, signal) { + let interval = this._options?.defaultTaskPollInterval ?? 1e3; + try { + const task = await this._taskStore?.getTask(taskId); + if (task?.pollInterval) { + interval = task.pollInterval; + } + } catch { + } + return new Promise((resolve, reject) => { + if (signal.aborted) { + reject(new McpError(ErrorCode2.InvalidRequest, "Request cancelled")); + return; + } + const timeoutId = setTimeout(resolve, interval); + signal.addEventListener("abort", () => { + clearTimeout(timeoutId); + reject(new McpError(ErrorCode2.InvalidRequest, "Request cancelled")); + }, { once: true }); + }); + } + requestTaskStore(request2, sessionId) { + const taskStore = this._taskStore; + if (!taskStore) { + throw new Error("No task store configured"); + } + return { + createTask: async (taskParams) => { + if (!request2) { + throw new Error("No request provided"); + } + return await taskStore.createTask(taskParams, request2.id, { + method: request2.method, + params: request2.params + }, sessionId); + }, + getTask: async (taskId) => { + const task = await taskStore.getTask(taskId, sessionId); + if (!task) { + throw new McpError(ErrorCode2.InvalidParams, "Failed to retrieve task: Task not found"); + } + return task; + }, + storeTaskResult: async (taskId, status, result) => { + await taskStore.storeTaskResult(taskId, status, result, sessionId); + const task = await taskStore.getTask(taskId, sessionId); + if (task) { + const notification = TaskStatusNotificationSchema2.parse({ + method: "notifications/tasks/status", + params: task + }); + await this.notification(notification); + if (isTerminal(task.status)) { + this._cleanupTaskProgressHandler(taskId); + } + } + }, + getTaskResult: (taskId) => { + return taskStore.getTaskResult(taskId, sessionId); + }, + updateTaskStatus: async (taskId, status, statusMessage) => { + const task = await taskStore.getTask(taskId, sessionId); + if (!task) { + throw new McpError(ErrorCode2.InvalidParams, `Task "${taskId}" not found - it may have been cleaned up`); + } + if (isTerminal(task.status)) { + throw new McpError(ErrorCode2.InvalidParams, `Cannot update task "${taskId}" from terminal status "${task.status}" to "${status}". Terminal states (completed, failed, cancelled) cannot transition to other states.`); + } + await taskStore.updateTaskStatus(taskId, status, statusMessage, sessionId); + const updatedTask = await taskStore.getTask(taskId, sessionId); + if (updatedTask) { + const notification = TaskStatusNotificationSchema2.parse({ + method: "notifications/tasks/status", + params: updatedTask + }); + await this.notification(notification); + if (isTerminal(updatedTask.status)) { + this._cleanupTaskProgressHandler(taskId); + } + } + }, + listTasks: (cursor2) => { + return taskStore.listTasks(cursor2, sessionId); + } + }; + } +}; +function isPlainObject6(value2) { + return value2 !== null && typeof value2 === "object" && !Array.isArray(value2); +} +function mergeCapabilities(base, additional) { + const result = { ...base }; + for (const key in additional) { + const k = key; + const addValue = additional[k]; + if (addValue === void 0) + continue; + const baseValue = result[k]; + if (isPlainObject6(baseValue) && isPlainObject6(addValue)) { + result[k] = { ...baseValue, ...addValue }; + } else { + result[k] = addValue; + } + } + return result; } -// node_modules/.pnpm/@modelcontextprotocol+sdk@1.20.0/node_modules/@modelcontextprotocol/sdk/dist/esm/server/index.js +// ../node_modules/.pnpm/@modelcontextprotocol+sdk@1.25.2_hono@4.10.6_zod@4.3.5/node_modules/@modelcontextprotocol/sdk/dist/esm/validation/ajv-provider.js var import_ajv2 = __toESM(require_ajv2(), 1); +var import_ajv_formats2 = __toESM(require_dist2(), 1); +function createDefaultAjvInstance() { + const ajv = new import_ajv2.default({ + strict: false, + validateFormats: true, + validateSchema: false, + allErrors: true + }); + const addFormats = import_ajv_formats2.default; + addFormats(ajv); + return ajv; +} +var AjvJsonSchemaValidator = class { + /** + * Create an AJV validator + * + * @param ajv - Optional pre-configured AJV instance. If not provided, a default instance will be created. + * + * @example + * ```typescript + * // Use default configuration (recommended for most cases) + * import { AjvJsonSchemaValidator } from '@modelcontextprotocol/sdk/validation/ajv'; + * const validator = new AjvJsonSchemaValidator(); + * + * // Or provide custom AJV instance for advanced configuration + * import { Ajv } from 'ajv'; + * import addFormats from 'ajv-formats'; + * + * const ajv = new Ajv({ validateFormats: true }); + * addFormats(ajv); + * const validator = new AjvJsonSchemaValidator(ajv); + * ``` + */ + constructor(ajv) { + this._ajv = ajv ?? createDefaultAjvInstance(); + } + /** + * Create a validator for the given JSON Schema + * + * The validator is compiled once and can be reused multiple times. + * If the schema has an $id, it will be cached by AJV automatically. + * + * @param schema - Standard JSON Schema object + * @returns A validator function that validates input data + */ + getValidator(schema2) { + const ajvValidator = "$id" in schema2 && typeof schema2.$id === "string" ? this._ajv.getSchema(schema2.$id) ?? this._ajv.compile(schema2) : this._ajv.compile(schema2); + return (input) => { + const valid = ajvValidator(input); + if (valid) { + return { + valid: true, + data: input, + errorMessage: void 0 + }; + } else { + return { + valid: false, + data: void 0, + errorMessage: this._ajv.errorsText(ajvValidator.errors) + }; + } + }; + } +}; + +// ../node_modules/.pnpm/@modelcontextprotocol+sdk@1.25.2_hono@4.10.6_zod@4.3.5/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/server.js +var ExperimentalServerTasks = class { + constructor(_server) { + this._server = _server; + } + /** + * Sends a request and returns an AsyncGenerator that yields response messages. + * The generator is guaranteed to end with either a 'result' or 'error' message. + * + * This method provides streaming access to request processing, allowing you to + * observe intermediate task status updates for task-augmented requests. + * + * @param request - The request to send + * @param resultSchema - Zod schema for validating the result + * @param options - Optional request options (timeout, signal, task creation params, etc.) + * @returns AsyncGenerator that yields ResponseMessage objects + * + * @experimental + */ + requestStream(request2, resultSchema, options) { + return this._server.requestStream(request2, resultSchema, options); + } + /** + * Gets the current status of a task. + * + * @param taskId - The task identifier + * @param options - Optional request options + * @returns The task status + * + * @experimental + */ + async getTask(taskId, options) { + return this._server.getTask({ taskId }, options); + } + /** + * Retrieves the result of a completed task. + * + * @param taskId - The task identifier + * @param resultSchema - Zod schema for validating the result + * @param options - Optional request options + * @returns The task result + * + * @experimental + */ + async getTaskResult(taskId, resultSchema, options) { + return this._server.getTaskResult({ taskId }, resultSchema, options); + } + /** + * Lists tasks with optional pagination. + * + * @param cursor - Optional pagination cursor + * @param options - Optional request options + * @returns List of tasks with optional next cursor + * + * @experimental + */ + async listTasks(cursor2, options) { + return this._server.listTasks(cursor2 ? { cursor: cursor2 } : void 0, options); + } + /** + * Cancels a running task. + * + * @param taskId - The task identifier + * @param options - Optional request options + * + * @experimental + */ + async cancelTask(taskId, options) { + return this._server.cancelTask({ taskId }, options); + } +}; + +// ../node_modules/.pnpm/@modelcontextprotocol+sdk@1.25.2_hono@4.10.6_zod@4.3.5/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/helpers.js +function assertToolsCallTaskCapability(requests, method, entityName) { + if (!requests) { + throw new Error(`${entityName} does not support task creation (required for ${method})`); + } + switch (method) { + case "tools/call": + if (!requests.tools?.call) { + throw new Error(`${entityName} does not support task creation for tools/call (required for ${method})`); + } + break; + default: + break; + } +} +function assertClientRequestTaskCapability(requests, method, entityName) { + if (!requests) { + throw new Error(`${entityName} does not support task creation (required for ${method})`); + } + switch (method) { + case "sampling/createMessage": + if (!requests.sampling?.createMessage) { + throw new Error(`${entityName} does not support task creation for sampling/createMessage (required for ${method})`); + } + break; + case "elicitation/create": + if (!requests.elicitation?.create) { + throw new Error(`${entityName} does not support task creation for elicitation/create (required for ${method})`); + } + break; + default: + break; + } +} + +// ../node_modules/.pnpm/@modelcontextprotocol+sdk@1.25.2_hono@4.10.6_zod@4.3.5/node_modules/@modelcontextprotocol/sdk/dist/esm/server/index.js var Server = class extends Protocol { /** * Initializes this server with the given name and version information. */ constructor(_serverInfo, options) { - var _a; super(options); this._serverInfo = _serverInfo; this._loggingLevels = /* @__PURE__ */ new Map(); @@ -101675,17 +111664,14 @@ var Server = class extends Protocol { const currentLevel = this._loggingLevels.get(sessionId); return currentLevel ? this.LOG_LEVEL_SEVERITY.get(level) < this.LOG_LEVEL_SEVERITY.get(currentLevel) : false; }; - this._capabilities = (_a = options === null || options === void 0 ? void 0 : options.capabilities) !== null && _a !== void 0 ? _a : {}; - this._instructions = options === null || options === void 0 ? void 0 : options.instructions; + this._capabilities = options?.capabilities ?? {}; + this._instructions = options?.instructions; + this._jsonSchemaValidator = options?.jsonSchemaValidator ?? new AjvJsonSchemaValidator(); this.setRequestHandler(InitializeRequestSchema2, (request2) => this._oninitialize(request2)); - this.setNotificationHandler(InitializedNotificationSchema2, () => { - var _a2; - return (_a2 = this.oninitialized) === null || _a2 === void 0 ? void 0 : _a2.call(this); - }); + this.setNotificationHandler(InitializedNotificationSchema2, () => this.oninitialized?.()); if (this._capabilities.logging) { this.setRequestHandler(SetLevelRequestSchema2, async (request2, extra) => { - var _a2; - const transportSessionId = extra.sessionId || ((_a2 = extra.requestInfo) === null || _a2 === void 0 ? void 0 : _a2.headers["mcp-session-id"]) || void 0; + const transportSessionId = extra.sessionId || extra.requestInfo?.headers["mcp-session-id"] || void 0; const { level } = request2.params; const parseResult = LoggingLevelSchema2.safeParse(level); if (parseResult.success) { @@ -101695,6 +111681,21 @@ var Server = class extends Protocol { }); } } + /** + * Access experimental features. + * + * WARNING: These APIs are experimental and may change without notice. + * + * @experimental + */ + get experimental() { + if (!this._experimental) { + this._experimental = { + tasks: new ExperimentalServerTasks(this) + }; + } + return this._experimental; + } /** * Registers new capabilities. This can only be called before connecting to a transport. * @@ -101706,21 +111707,71 @@ var Server = class extends Protocol { } this._capabilities = mergeCapabilities(this._capabilities, capabilities); } + /** + * Override request handler registration to enforce server-side validation for tools/call. + */ + setRequestHandler(requestSchema, handler2) { + const shape = getObjectShape(requestSchema); + const methodSchema = shape?.method; + if (!methodSchema) { + throw new Error("Schema is missing a method literal"); + } + let methodValue; + if (isZ4Schema(methodSchema)) { + const v4Schema = methodSchema; + const v4Def = v4Schema._zod?.def; + methodValue = v4Def?.value ?? v4Schema.value; + } else { + const v3Schema = methodSchema; + const legacyDef = v3Schema._def; + methodValue = legacyDef?.value ?? v3Schema.value; + } + if (typeof methodValue !== "string") { + throw new Error("Schema method literal must be a string"); + } + const method = methodValue; + if (method === "tools/call") { + const wrappedHandler = async (request2, extra) => { + const validatedRequest = safeParse5(CallToolRequestSchema2, request2); + if (!validatedRequest.success) { + const errorMessage = validatedRequest.error instanceof Error ? validatedRequest.error.message : String(validatedRequest.error); + throw new McpError(ErrorCode2.InvalidParams, `Invalid tools/call request: ${errorMessage}`); + } + const { params } = validatedRequest.data; + const result = await Promise.resolve(handler2(request2, extra)); + if (params.task) { + const taskValidationResult = safeParse5(CreateTaskResultSchema2, result); + if (!taskValidationResult.success) { + const errorMessage = taskValidationResult.error instanceof Error ? taskValidationResult.error.message : String(taskValidationResult.error); + throw new McpError(ErrorCode2.InvalidParams, `Invalid task creation result: ${errorMessage}`); + } + return taskValidationResult.data; + } + const validationResult = safeParse5(CallToolResultSchema2, result); + if (!validationResult.success) { + const errorMessage = validationResult.error instanceof Error ? validationResult.error.message : String(validationResult.error); + throw new McpError(ErrorCode2.InvalidParams, `Invalid tools/call result: ${errorMessage}`); + } + return validationResult.data; + }; + return super.setRequestHandler(requestSchema, wrappedHandler); + } + return super.setRequestHandler(requestSchema, handler2); + } assertCapabilityForMethod(method) { - var _a, _b, _c; switch (method) { case "sampling/createMessage": - if (!((_a = this._clientCapabilities) === null || _a === void 0 ? void 0 : _a.sampling)) { + if (!this._clientCapabilities?.sampling) { throw new Error(`Client does not support sampling (required for ${method})`); } break; case "elicitation/create": - if (!((_b = this._clientCapabilities) === null || _b === void 0 ? void 0 : _b.elicitation)) { + if (!this._clientCapabilities?.elicitation) { throw new Error(`Client does not support elicitation (required for ${method})`); } break; case "roots/list": - if (!((_c = this._clientCapabilities) === null || _c === void 0 ? void 0 : _c.roots)) { + if (!this._clientCapabilities?.roots) { throw new Error(`Client does not support listing roots (required for ${method})`); } break; @@ -101751,6 +111802,11 @@ var Server = class extends Protocol { throw new Error(`Server does not support notifying of prompt list changes (required for ${method})`); } break; + case "notifications/elicitation/complete": + if (!this._clientCapabilities?.elicitation?.url) { + throw new Error(`Client does not support URL elicitation (required for ${method})`); + } + break; case "notifications/cancelled": break; case "notifications/progress": @@ -101758,10 +111814,13 @@ var Server = class extends Protocol { } } assertRequestHandlerCapability(method) { + if (!this._capabilities) { + return; + } switch (method) { - case "sampling/createMessage": - if (!this._capabilities.sampling) { - throw new Error(`Server does not support sampling (required for ${method})`); + case "completion/complete": + if (!this._capabilities.completions) { + throw new Error(`Server does not support completions (required for ${method})`); } break; case "logging/setLevel": @@ -101788,11 +111847,28 @@ var Server = class extends Protocol { throw new Error(`Server does not support tools (required for ${method})`); } break; + case "tasks/get": + case "tasks/list": + case "tasks/result": + case "tasks/cancel": + if (!this._capabilities.tasks) { + throw new Error(`Server does not support tasks capability (required for ${method})`); + } + break; case "ping": case "initialize": break; } } + assertTaskCapability(method) { + assertClientRequestTaskCapability(this._clientCapabilities?.tasks?.requests, method, "Client"); + } + assertTaskHandlerCapability(method) { + if (!this._capabilities) { + return; + } + assertToolsCallTaskCapability(this._capabilities.tasks?.requests, method, "Server"); + } async _oninitialize(request2) { const requestedVersion = request2.params.protocolVersion; this._clientCapabilities = request2.params.capabilities; @@ -101823,27 +111899,100 @@ var Server = class extends Protocol { async ping() { return this.request({ method: "ping" }, EmptyResultSchema2); } + // Implementation async createMessage(params, options) { - return this.request({ method: "sampling/createMessage", params }, CreateMessageResultSchema2, options); - } - async elicitInput(params, options) { - const result = await this.request({ method: "elicitation/create", params }, ElicitResultSchema2, options); - if (result.action === "accept" && result.content) { - try { - const ajv = new import_ajv2.default(); - const validate2 = ajv.compile(params.requestedSchema); - const isValid4 = validate2(result.content); - 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; - } - throw new McpError(ErrorCode2.InternalError, `Error validating elicitation response: ${error41}`); + if (params.tools || params.toolChoice) { + if (!this._clientCapabilities?.sampling?.tools) { + throw new Error("Client does not support sampling tools capability."); } } - return result; + if (params.messages.length > 0) { + const lastMessage = params.messages[params.messages.length - 1]; + const lastContent = Array.isArray(lastMessage.content) ? lastMessage.content : [lastMessage.content]; + const hasToolResults = lastContent.some((c) => c.type === "tool_result"); + const previousMessage = params.messages.length > 1 ? params.messages[params.messages.length - 2] : void 0; + const previousContent = previousMessage ? Array.isArray(previousMessage.content) ? previousMessage.content : [previousMessage.content] : []; + const hasPreviousToolUse = previousContent.some((c) => c.type === "tool_use"); + if (hasToolResults) { + if (lastContent.some((c) => c.type !== "tool_result")) { + throw new Error("The last message must contain only tool_result content if any is present"); + } + if (!hasPreviousToolUse) { + throw new Error("tool_result blocks are not matching any tool_use from the previous message"); + } + } + if (hasPreviousToolUse) { + const toolUseIds = new Set(previousContent.filter((c) => c.type === "tool_use").map((c) => c.id)); + const toolResultIds = new Set(lastContent.filter((c) => c.type === "tool_result").map((c) => c.toolUseId)); + if (toolUseIds.size !== toolResultIds.size || ![...toolUseIds].every((id) => toolResultIds.has(id))) { + throw new Error("ids of tool_result blocks and tool_use blocks from previous message do not match"); + } + } + } + if (params.tools) { + return this.request({ method: "sampling/createMessage", params }, CreateMessageResultWithToolsSchema2, options); + } + return this.request({ method: "sampling/createMessage", params }, CreateMessageResultSchema2, options); + } + /** + * Creates an elicitation request for the given parameters. + * For backwards compatibility, `mode` may be omitted for form requests and will default to `'form'`. + * @param params The parameters for the elicitation request. + * @param options Optional request options. + * @returns The result of the elicitation request. + */ + async elicitInput(params, options) { + const mode = params.mode ?? "form"; + switch (mode) { + case "url": { + if (!this._clientCapabilities?.elicitation?.url) { + throw new Error("Client does not support url elicitation."); + } + const urlParams = params; + return this.request({ method: "elicitation/create", params: urlParams }, ElicitResultSchema2, options); + } + case "form": { + if (!this._clientCapabilities?.elicitation?.form) { + throw new Error("Client does not support form elicitation."); + } + const formParams = params.mode === "form" ? params : { ...params, mode: "form" }; + const result = await this.request({ method: "elicitation/create", params: formParams }, ElicitResultSchema2, options); + if (result.action === "accept" && result.content && formParams.requestedSchema) { + try { + const validator = this._jsonSchemaValidator.getValidator(formParams.requestedSchema); + const validationResult = validator(result.content); + if (!validationResult.valid) { + throw new McpError(ErrorCode2.InvalidParams, `Elicitation response content does not match requested schema: ${validationResult.errorMessage}`); + } + } catch (error50) { + if (error50 instanceof McpError) { + throw error50; + } + throw new McpError(ErrorCode2.InternalError, `Error validating elicitation response: ${error50 instanceof Error ? error50.message : String(error50)}`); + } + } + return result; + } + } + } + /** + * Creates a reusable callback that, when invoked, will send a `notifications/elicitation/complete` + * notification for the specified elicitation ID. + * + * @param elicitationId The ID of the elicitation to mark as complete. + * @param options Optional notification options. Useful when the completion notification should be related to a prior request. + * @returns A function that emits the completion notification when awaited. + */ + createElicitationCompletionNotifier(elicitationId, options) { + if (!this._clientCapabilities?.elicitation?.url) { + throw new Error("Client does not support URL elicitation (required for notifications/elicitation/complete)"); + } + return () => this.notification({ + method: "notifications/elicitation/complete", + params: { + elicitationId + } + }, options); } async listRoots(params, options) { return this.request({ method: "roots/list", params }, ListRootsResultSchema2, options); @@ -101881,10 +112030,10 @@ var Server = class extends Protocol { } }; -// node_modules/.pnpm/@modelcontextprotocol+sdk@1.20.0/node_modules/@modelcontextprotocol/sdk/dist/esm/server/stdio.js -import process2 from "node:process"; +// ../node_modules/.pnpm/@modelcontextprotocol+sdk@1.25.2_hono@4.10.6_zod@4.3.5/node_modules/@modelcontextprotocol/sdk/dist/esm/server/stdio.js +import process3 from "node:process"; -// node_modules/.pnpm/@modelcontextprotocol+sdk@1.20.0/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/stdio.js +// ../node_modules/.pnpm/@modelcontextprotocol+sdk@1.25.2_hono@4.10.6_zod@4.3.5/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/stdio.js var ReadBuffer = class { append(chunk) { this._buffer = this._buffer ? Buffer.concat([this._buffer, chunk]) : chunk; @@ -101912,9 +112061,9 @@ function serializeMessage(message) { return JSON.stringify(message) + "\n"; } -// node_modules/.pnpm/@modelcontextprotocol+sdk@1.20.0/node_modules/@modelcontextprotocol/sdk/dist/esm/server/stdio.js +// ../node_modules/.pnpm/@modelcontextprotocol+sdk@1.25.2_hono@4.10.6_zod@4.3.5/node_modules/@modelcontextprotocol/sdk/dist/esm/server/stdio.js var StdioServerTransport = class { - constructor(_stdin = process2.stdin, _stdout = process2.stdout) { + constructor(_stdin = process3.stdin, _stdout = process3.stdout) { this._stdin = _stdin; this._stdout = _stdout; this._readBuffer = new ReadBuffer(); @@ -101923,9 +112072,8 @@ var StdioServerTransport = class { this._readBuffer.append(chunk); this.processReadBuffer(); }; - this._onerror = (error41) => { - var _a; - (_a = this.onerror) === null || _a === void 0 ? void 0 : _a.call(this, error41); + this._onerror = (error50) => { + this.onerror?.(error50); }; } /** @@ -101940,21 +112088,19 @@ var StdioServerTransport = class { this._stdin.on("error", this._onerror); } processReadBuffer() { - var _a, _b; while (true) { try { const message = this._readBuffer.readMessage(); if (message === null) { 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); + this.onmessage?.(message); + } catch (error50) { + this.onerror?.(error50); } } } async close() { - var _a; this._stdin.off("data", this._ondata); this._stdin.off("error", this._onerror); const remainingDataListeners = this._stdin.listenerCount("data"); @@ -101962,12 +112108,12 @@ var StdioServerTransport = class { this._stdin.pause(); } this._readBuffer.clear(); - (_a = this.onclose) === null || _a === void 0 ? void 0 : _a.call(this); + this.onclose?.(); } send(message) { return new Promise((resolve) => { - const json3 = serializeMessage(message); - if (this._stdout.write(json3)) { + const json4 = serializeMessage(message); + if (this._stdout.write(json4)) { resolve(); } else { this._stdout.once("drain", resolve); @@ -101976,11 +112122,11 @@ var StdioServerTransport = class { } }; -// node_modules/.pnpm/fastmcp@3.20.0_arktype@2.1.28/node_modules/fastmcp/dist/FastMCP.js +// ../node_modules/.pnpm/fastmcp@3.26.8_arktype@2.1.28_effect@3.18.4_hono@4.10.6_jose@6.1.0/node_modules/fastmcp/dist/FastMCP.js import { EventEmitter } from "events"; -// node_modules/.pnpm/fuse.js@7.1.0/node_modules/fuse.js/dist/fuse.mjs -function isArray2(value2) { +// ../node_modules/.pnpm/fuse.js@7.1.0/node_modules/fuse.js/dist/fuse.mjs +function isArray3(value2) { return !Array.isArray ? getTag(value2) === "[object Array]" : Array.isArray(value2); } var INFINITY = 1 / 0; @@ -102003,11 +112149,11 @@ function isNumber(value2) { function isBoolean(value2) { return value2 === true || value2 === false || isObjectLike(value2) && getTag(value2) == "[object Boolean]"; } -function isObject2(value2) { +function isObject4(value2) { return typeof value2 === "object"; } function isObjectLike(value2) { - return isObject2(value2) && value2 !== null; + return isObject4(value2) && value2 !== null; } function isDefined2(value2) { return value2 !== void 0 && value2 !== null; @@ -102055,7 +112201,7 @@ function createKey(key) { let src = null; let weight = 1; let getFn = null; - if (isString(key) || isArray2(key)) { + if (isString(key) || isArray3(key)) { src = key; path4 = createKeyPath(key); id = createKeyId(key); @@ -102078,10 +112224,10 @@ function createKey(key) { return { path: path4, id, weight, src, getFn }; } function createKeyPath(key) { - return isArray2(key) ? key : key.split("."); + return isArray3(key) ? key : key.split("."); } function createKeyId(key) { - return isArray2(key) ? key.join(".") : key; + return isArray3(key) ? key.join(".") : key; } function get(obj, path4) { let list = []; @@ -102100,7 +112246,7 @@ function get(obj, path4) { } if (index === path5.length - 1 && (isString(value2) || isNumber(value2) || isBoolean(value2))) { list.push(toString(value2)); - } else if (isArray2(value2)) { + } else if (isArray3(value2)) { arr = true; for (let i = 0, len = value2.length; i < len; i += 1) { deepGet(value2[i], path5, index + 1); @@ -102260,21 +112406,21 @@ var FuseIndex = class { if (!isDefined2(doc) || isBlank(doc)) { return; } - let record = { + let record4 = { v: doc, i: docIndex, n: this.norm.get(doc) }; - this.records.push(record); + this.records.push(record4); } _addObject(doc, docIndex) { - let record = { i: docIndex, $: {} }; + let record4 = { i: docIndex, $: {} }; this.keys.forEach((key, keyIndex) => { let value2 = key.getFn ? key.getFn(doc) : this.getFn(doc, key.path); if (!isDefined2(value2)) { return; } - if (isArray2(value2)) { + if (isArray3(value2)) { let subRecords = []; const stack = [{ nestedArrIndex: -1, value: value2 }]; while (stack.length) { @@ -102289,7 +112435,7 @@ var FuseIndex = class { n: this.norm.get(value3) }; subRecords.push(subRecord); - } else if (isArray2(value3)) { + } else if (isArray3(value3)) { value3.forEach((item, k) => { stack.push({ nestedArrIndex: k, @@ -102298,16 +112444,16 @@ var FuseIndex = class { }); } else ; } - record.$[keyIndex] = subRecords; + record4.$[keyIndex] = subRecords; } else if (isString(value2) && !isBlank(value2)) { let subRecord = { v: value2, n: this.norm.get(value2) }; - record.$[keyIndex] = subRecord; + record4.$[keyIndex] = subRecord; } }); - this.records.push(record); + this.records.push(record4); } toJSON() { return { @@ -102981,13 +113127,13 @@ var KeyType = { }; var isExpression = (query2) => !!(query2[LogicalOperator.AND] || query2[LogicalOperator.OR]); var isPath = (query2) => !!query2[KeyType.PATH]; -var isLeaf = (query2) => !isArray2(query2) && isObject2(query2) && !isExpression(query2); +var isLeaf = (query2) => !isArray3(query2) && isObject4(query2) && !isExpression(query2); var convertToExplicit = (query2) => ({ [LogicalOperator.AND]: Object.keys(query2).map((key) => ({ [key]: query2[key] })) }); -function parse2(query2, options, { auto = true } = {}) { +function parse5(query2, options, { auto = true } = {}) { const next2 = (query3) => { let keys = Object.keys(query3); const isQueryPath = isPath(query3); @@ -103015,7 +113161,7 @@ function parse2(query2, options, { auto = true } = {}) { }; keys.forEach((key) => { const value2 = query3[key]; - if (isArray2(value2)) { + if (isArray3(value2)) { value2.forEach((item) => { node2.children.push(next2(item)); }); @@ -103176,7 +113322,7 @@ var Fuse = class { return results; } _searchLogical(query2) { - const expression = parse2(query2, this.options); + const expression = parse5(query2, this.options); const evaluate = (node2, item, idx) => { if (!node2.children) { const { keyId, searcher } = node2; @@ -103260,7 +113406,7 @@ var Fuse = class { return []; } let matches = []; - if (isArray2(value2)) { + if (isArray3(value2)) { value2.forEach(({ v: text, i: idx, n: norm2 }) => { if (!isDefined2(text)) { return; @@ -103292,16 +113438,16 @@ Fuse.createIndex = createIndex; Fuse.parseIndex = parseIndex; Fuse.config = Config; { - Fuse.parseQuery = parse2; + Fuse.parseQuery = parse5; } { register4(ExtendedSearch); } -// node_modules/.pnpm/mcp-proxy@5.9.0/node_modules/mcp-proxy/dist/stdio-CsjPjeWC.js +// ../node_modules/.pnpm/mcp-proxy@5.12.5/node_modules/mcp-proxy/dist/stdio-DBuYn6eo.mjs import { createRequire } from "node:module"; -import { randomUUID as randomUUID2 } from "node:crypto"; -import { URL as URL$1 } from "url"; +import { randomUUID as randomUUID4 } from "node:crypto"; +import { URL as URL$1 } from "node:url"; import http from "http"; var __create3 = Object.create; var __defProp3 = Object.defineProperty; @@ -103309,16 +113455,18 @@ var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; var __getOwnPropNames3 = Object.getOwnPropertyNames; var __getProtoOf3 = Object.getPrototypeOf; var __hasOwnProp3 = Object.prototype.hasOwnProperty; -var __commonJS3 = (cb, mod) => function() { - return mod || (0, cb[__getOwnPropNames3(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; -}; +var __commonJSMin = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports); var __copyProps2 = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames3(from), i$3 = 0, n = keys.length, key$1; i$3 < n; i$3++) { - key$1 = keys[i$3]; - if (!__hasOwnProp3.call(to, key$1) && key$1 !== except) __defProp3(to, key$1, { - get: ((k) => from[k]).bind(null, key$1), - enumerable: !(desc = __getOwnPropDesc2(from, key$1)) || desc.enumerable - }); + if (from && typeof from === "object" || typeof from === "function") { + for (var keys = __getOwnPropNames3(from), i$3 = 0, n = keys.length, key$1; i$3 < n; i$3++) { + key$1 = keys[i$3]; + if (!__hasOwnProp3.call(to, key$1) && key$1 !== except) { + __defProp3(to, key$1, { + get: ((k) => from[k]).bind(null, key$1), + enumerable: !(desc = __getOwnPropDesc2(from, key$1)) || desc.enumerable + }); + } + } } return to; }; @@ -103328,17 +113476,62 @@ 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(config$1 = {}) { + this.config = config$1; } - getUnauthorizedResponse() { + getScopeChallengeResponse(requiredScopes, errorDescription, requestId) { const headers = { "Content-Type": "application/json" }; - if (this.config.oauth?.protectedResource?.resource) headers["WWW-Authenticate"] = `Bearer resource_metadata="${this.config.oauth.protectedResource.resource}/.well-known/oauth-protected-resource"`; + if (this.config.oauth?.protectedResource?.resource) { + const parts = [ + "Bearer", + 'error="insufficient_scope"', + `scope="${requiredScopes.join(" ")}"`, + `resource_metadata="${this.config.oauth.protectedResource.resource}/.well-known/oauth-protected-resource"` + ]; + if (errorDescription) { + const escaped = errorDescription.replace(/"/g, '\\"'); + parts.push(`error_description="${escaped}"`); + } + headers["WWW-Authenticate"] = parts.join(", "); + } + return { + body: JSON.stringify({ + error: { + code: -32001, + data: { + error: "insufficient_scope", + required_scopes: requiredScopes + }, + message: errorDescription || "Insufficient scope" + }, + id: requestId ?? null, + jsonrpc: "2.0" + }), + headers, + statusCode: 403 + }; + } + getUnauthorizedResponse(options) { + const headers = { "Content-Type": "application/json" }; + if (this.config.oauth) { + const params = []; + if (this.config.oauth.realm) params.push(`realm="${this.config.oauth.realm}"`); + if (this.config.oauth.protectedResource?.resource) params.push(`resource_metadata="${this.config.oauth.protectedResource.resource}/.well-known/oauth-protected-resource"`); + const error$1 = options?.error || this.config.oauth.error || "invalid_token"; + params.push(`error="${error$1}"`); + const escaped = (options?.error_description || this.config.oauth.error_description || "Unauthorized: Invalid or missing API key").replace(/"/g, '\\"'); + params.push(`error_description="${escaped}"`); + const error_uri = options?.error_uri || this.config.oauth.error_uri; + if (error_uri) params.push(`error_uri="${error_uri}"`); + const scope2 = options?.scope || this.config.oauth.scope; + if (scope2) params.push(`scope="${scope2}"`); + if (params.length > 0) headers["WWW-Authenticate"] = `Bearer ${params.join(", ")}`; + } return { body: JSON.stringify({ error: { code: 401, - message: "Unauthorized: Invalid or missing API key" + message: options?.error_description || "Unauthorized: Invalid or missing API key" }, id: null, jsonrpc: "2.0" @@ -103355,6 +113548,8 @@ var AuthenticationMiddleware = class { }; var InMemoryEventStore = class { events = /* @__PURE__ */ new Map(); + lastTimestamp = 0; + lastTimestampCounter = 0; /** * Replays events that occurred after a specific event ID * Implements EventStore.replayEventsAfter @@ -103388,10 +113583,17 @@ var InMemoryEventStore = class { return eventId; } /** - * Generates a unique event ID for a given stream ID + * Generates a monotonic unique event ID in + * `${streamId}_${timestamp}_${counter}_${random}` format. */ generateEventId(streamId) { - return `${streamId}_${Date.now()}_${Math.random().toString(36).substring(2, 10)}`; + const now = Date.now(); + if (now === this.lastTimestamp) this.lastTimestampCounter++; + else { + this.lastTimestampCounter = 0; + this.lastTimestamp = now; + } + return `${streamId}_${now.toString()}_${this.lastTimestampCounter.toString(36).padStart(4, "0")}_${Math.random().toString(36).substring(2, 5)}`; } /** * Extracts the stream ID from an event ID @@ -103401,3580 +113603,3159 @@ var InMemoryEventStore = class { return parts.length > 0 ? parts[0] : ""; } }; -var util$6; -(function(util$7) { - util$7.assertEqual = (_) => { - }; - function assertIs2(_arg) { - } - util$7.assertIs = assertIs2; - function assertNever2(_x) { - throw new Error(); - } - util$7.assertNever = assertNever2; - util$7.arrayToEnum = (items) => { - const obj = {}; - for (const item of items) obj[item] = item; - return obj; - }; - util$7.getValidEnumValues = (obj) => { - const validKeys = util$7.objectKeys(obj).filter((k) => typeof obj[obj[k]] !== "number"); - const filtered = {}; - for (const k of validKeys) filtered[k] = obj[k]; - return util$7.objectValues(filtered); - }; - util$7.objectValues = (obj) => { - return util$7.objectKeys(obj).map(function(e) { - return obj[e]; +var NEVER3 = Object.freeze({ status: "aborted" }); +function $constructor3(name, initializer$2, params) { + function init(inst, def$30) { + var _a2; + Object.defineProperty(inst, "_zod", { + value: inst._zod ?? {}, + enumerable: false }); - }; - util$7.objectKeys = typeof Object.keys === "function" ? (obj) => Object.keys(obj) : (object2) => { - const keys = []; - for (const key$1 in object2) if (Object.prototype.hasOwnProperty.call(object2, key$1)) keys.push(key$1); - return keys; - }; - util$7.find = (arr, checker) => { - 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 = " | ") { - return array.map((val) => typeof val === "string" ? `'${val}'` : val).join(separator2); + (_a2 = inst._zod).traits ?? (_a2.traits = /* @__PURE__ */ new Set()); + inst._zod.traits.add(name); + initializer$2(inst, def$30); + for (const k in _$1.prototype) if (!(k in inst)) Object.defineProperty(inst, k, { value: _$1.prototype[k].bind(inst) }); + inst._zod.constr = _$1; + inst._zod.def = def$30; } - util$7.joinValues = joinValues2; - util$7.jsonStringifyReplacer = (_, value2) => { - if (typeof value2 === "bigint") return value2.toString(); - return value2; - }; -})(util$6 || (util$6 = {})); -var objectUtil3; -(function(objectUtil$1) { - objectUtil$1.mergeShapes = (first, second) => { - return { - ...first, - ...second - }; - }; -})(objectUtil3 || (objectUtil3 = {})); -var ZodParsedType3 = util$6.arrayToEnum([ - "string", - "nan", - "number", - "integer", - "float", - "boolean", - "date", - "bigint", - "symbol", - "function", - "undefined", - "null", - "array", - "object", - "unknown", - "promise", - "void", - "never", - "map", - "set" -]); -var getParsedType3 = (data) => { - switch (typeof data) { - case "undefined": - return ZodParsedType3.undefined; - case "string": - return ZodParsedType3.string; - case "number": - return Number.isNaN(data) ? ZodParsedType3.nan : ZodParsedType3.number; - case "boolean": - return ZodParsedType3.boolean; - case "function": - return ZodParsedType3.function; - case "bigint": - return ZodParsedType3.bigint; - case "symbol": - return ZodParsedType3.symbol; - case "object": - if (Array.isArray(data)) return ZodParsedType3.array; - if (data === null) return ZodParsedType3.null; - if (data.then && typeof data.then === "function" && data.catch && typeof data.catch === "function") return ZodParsedType3.promise; - if (typeof Map !== "undefined" && data instanceof Map) return ZodParsedType3.map; - if (typeof Set !== "undefined" && data instanceof Set) return ZodParsedType3.set; - if (typeof Date !== "undefined" && data instanceof Date) return ZodParsedType3.date; - return ZodParsedType3.object; - default: - return ZodParsedType3.unknown; + const Parent = params?.Parent ?? Object; + class Definition extends Parent { } -}; -var ZodIssueCode3 = util$6.arrayToEnum([ - "invalid_type", - "invalid_literal", - "custom", - "invalid_union", - "invalid_union_discriminator", - "invalid_enum_value", - "unrecognized_keys", - "invalid_arguments", - "invalid_return_type", - "invalid_date", - "invalid_string", - "too_small", - "too_big", - "invalid_intersection_types", - "not_multiple_of", - "not_finite" -]); -var ZodError3 = class ZodError4 extends Error { - get errors() { - return this.issues; + Object.defineProperty(Definition, "name", { value: name }); + function _$1(def$30) { + var _a2; + const inst = params?.Parent ? new Definition() : this; + init(inst, def$30); + (_a2 = inst._zod).deferred ?? (_a2.deferred = []); + for (const fn2 of inst._zod.deferred) fn2(); + return inst; } - 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$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: [] }; - else { - curr[el] = curr[el] || { _errors: [] }; - curr[el]._errors.push(mapper(issue2)); - } - curr = curr[el]; - i$3++; - } - } - }; - processError(this); - return fieldErrors; - } - static assert(value2) { - if (!(value2 instanceof ZodError4)) throw new Error(`Not a ZodError: ${value2}`); - } - toString() { - return this.message; - } - get message() { - return JSON.stringify(this.issues, util$6.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(); - } -}; -ZodError3.create = (issues) => { - return new ZodError3(issues); -}; -var errorMap3 = (issue2, _ctx) => { - let message; - switch (issue2.code) { - case ZodIssueCode3.invalid_type: - if (issue2.received === ZodParsedType3.undefined) message = "Required"; - else message = `Expected ${issue2.expected}, received ${issue2.received}`; - break; - case ZodIssueCode3.invalid_literal: - message = `Invalid literal value, expected ${JSON.stringify(issue2.expected, util$6.jsonStringifyReplacer)}`; - break; - case ZodIssueCode3.unrecognized_keys: - message = `Unrecognized key(s) in object: ${util$6.joinValues(issue2.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)}`; - break; - case ZodIssueCode3.invalid_enum_value: - message = `Invalid enum value. Expected ${util$6.joinValues(issue2.options)}, received '${issue2.received}'`; - break; - case ZodIssueCode3.invalid_arguments: - message = `Invalid function arguments`; - break; - case ZodIssueCode3.invalid_return_type: - message = `Invalid function return type`; - break; - case ZodIssueCode3.invalid_date: - 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}`; - 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))}`; - 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))}`; - else message = "Invalid input"; - break; - case ZodIssueCode3.custom: - message = `Invalid input`; - break; - case ZodIssueCode3.invalid_intersection_types: - message = `Intersection results could not be merged`; - break; - case ZodIssueCode3.not_multiple_of: - message = `Number must be a multiple of ${issue2.multipleOf}`; - break; - case ZodIssueCode3.not_finite: - message = "Number must be finite"; - break; - default: - message = _ctx.defaultError; - util$6.assertNever(issue2); - } - return { message }; -}; -var en_default3 = errorMap3; -var overrideErrorMap3 = en_default3; -function getErrorMap3() { - return overrideErrorMap3; + Object.defineProperty(_$1, "init", { value: init }); + Object.defineProperty(_$1, Symbol.hasInstance, { value: (inst) => { + if (params?.Parent && inst instanceof params.Parent) return true; + return inst?._zod?.traits?.has(name); + } }); + Object.defineProperty(_$1, "name", { value: name }); + return _$1; } -var makeIssue3 = (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$1 of maps) errorMessage = map$1(fullIssue, { - data, - defaultError: errorMessage - }).message; - return { - ...issueData, - path: fullPath, - message: errorMessage - }; -}; -function addIssueToContext3(ctx, issueData) { - const overrideMap = getErrorMap3(); - const issue2 = makeIssue3({ - issueData, - data: ctx.data, - path: ctx.path, - errorMaps: [ - ctx.common.contextualErrorMap, - ctx.schemaErrorMap, - overrideMap, - overrideMap === en_default3 ? void 0 : en_default3 - ].filter((x) => !!x) - }); - ctx.common.issues.push(issue2); -} -var ParseStatus3 = class ParseStatus4 { +var $ZodAsyncError3 = class extends Error { constructor() { - this.value = "valid"; - } - dirty() { - if (this.value === "valid") this.value = "dirty"; - } - abort() { - if (this.value !== "aborted") this.value = "aborted"; - } - static mergeArray(status$1, results) { - const arrayValue = []; - for (const s of results) { - if (s.status === "aborted") return INVALID3; - if (s.status === "dirty") status$1.dirty(); - arrayValue.push(s.value); - } - return { - status: status$1.value, - value: arrayValue - }; - } - static async mergeObjectAsync(status$1, pairs) { - const syncPairs = []; - for (const pair of pairs) { - const key$1 = await pair.key; - const value2 = await pair.value; - syncPairs.push({ - key: key$1, - value: value2 - }); - } - return ParseStatus4.mergeObjectSync(status$1, syncPairs); - } - static mergeObjectSync(status$1, pairs) { - const finalObject = {}; - for (const pair of pairs) { - const { key: key$1, value: value2 } = pair; - if (key$1.status === "aborted") return INVALID3; - if (value2.status === "aborted") return INVALID3; - if (key$1.status === "dirty") status$1.dirty(); - if (value2.status === "dirty") status$1.dirty(); - if (key$1.value !== "__proto__" && (typeof value2.value !== "undefined" || pair.alwaysSet)) finalObject[key$1.value] = value2.value; - } - return { - status: status$1.value, - value: finalObject - }; + super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`); } }; -var INVALID3 = Object.freeze({ status: "aborted" }); -var DIRTY3 = (value2) => ({ - status: "dirty", - value: value2 -}); -var OK3 = (value2) => ({ - status: "valid", - value: value2 -}); -var isAborted3 = (x) => x.status === "aborted"; -var isDirty3 = (x) => x.status === "dirty"; -var isValid3 = (x) => x.status === "valid"; -var isAsync3 = (x) => typeof Promise !== "undefined" && x instanceof Promise; -var errorUtil3; -(function(errorUtil$1) { - errorUtil$1.errToObj = (message) => typeof message === "string" ? { message } : message || {}; - errorUtil$1.toString = (message) => typeof message === "string" ? message : message?.message; -})(errorUtil3 || (errorUtil3 = {})); -var ParseInputLazyPath3 = class { - constructor(parent, value2, path4, key$1) { - this._cachedPath = []; - this.parent = parent; - this.data = value2; - this._path = path4; - this._key = key$1; - } - 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 globalConfig3 = {}; +function config3(newConfig) { + if (newConfig) Object.assign(globalConfig3, newConfig); + return globalConfig3; +} +function getEnumValues3(entries) { + const numericValues = Object.values(entries).filter((v) => typeof v === "number"); + return Object.entries(entries).filter(([k, _$1]) => numericValues.indexOf(+k) === -1).map(([_$1, v]) => v); +} +function jsonStringifyReplacer3(_$1, value2) { + if (typeof value2 === "bigint") return value2.toString(); + return value2; +} +function cached5(getter) { + return { get value() { + { + const value2 = getter(); + Object.defineProperty(this, "value", { value: value2 }); + return value2; + } + throw new Error("cached value already set"); + } }; +} +function nullish4(input) { + return input === null || input === void 0; +} +function cleanRegex3(source) { + const start = source.startsWith("^") ? 1 : 0; + const end = source.endsWith("$") ? source.length - 1 : source.length; + return source.slice(start, end); +} +function floatSafeRemainder5(val, step) { + const valDecCount = (val.toString().split(".")[1] || "").length; + const stepDecCount = (step.toString().split(".")[1] || "").length; + const decCount = valDecCount > stepDecCount ? valDecCount : stepDecCount; + return Number.parseInt(val.toFixed(decCount).replace(".", "")) % Number.parseInt(step.toFixed(decCount).replace(".", "")) / 10 ** decCount; +} +function defineLazy3(object$1, key$1, getter) { + Object.defineProperty(object$1, key$1, { + get() { + { + const value2 = getter(); + object$1[key$1] = value2; + return value2; + } + throw new Error("cached value already set"); + }, + set(v) { + Object.defineProperty(object$1, key$1, { value: v }); + }, + configurable: true + }); +} +function assignProp3(target, prop, value2) { + Object.defineProperty(target, prop, { + value: value2, + writable: true, + enumerable: true, + configurable: true + }); +} +function esc3(str$1) { + return JSON.stringify(str$1); +} +var captureStackTrace3 = Error.captureStackTrace ? Error.captureStackTrace : (..._args) => { }; -var handleResult3 = (ctx, result) => { - if (isValid3(result)) return { +function isObject5(data) { + return typeof data === "object" && data !== null && !Array.isArray(data); +} +var allowsEval3 = cached5(() => { + if (typeof navigator !== "undefined" && navigator?.userAgent?.includes("Cloudflare")) return false; + try { + new Function(""); + return true; + } catch (_$1) { + return false; + } +}); +function isPlainObject$1(o) { + if (isObject5(o) === false) return false; + const ctor = o.constructor; + if (ctor === void 0) return true; + const prot = ctor.prototype; + if (isObject5(prot) === false) return false; + if (Object.prototype.hasOwnProperty.call(prot, "isPrototypeOf") === false) return false; + return true; +} +var propertyKeyTypes3 = /* @__PURE__ */ new Set([ + "string", + "number", + "symbol" +]); +function escapeRegex3(str$1) { + return str$1.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"); +} +function clone3(inst, def$30, params) { + const cl = new inst._zod.constr(def$30 ?? inst._zod.def); + if (!def$30 || params?.parent) cl._zod.parent = inst; + return cl; +} +function normalizeParams3(_params) { + const params = _params; + if (!params) return {}; + if (typeof params === "string") return { error: () => params }; + if (params?.message !== void 0) { + if (params?.error !== void 0) throw new Error("Cannot specify both `message` and `error` params"); + params.error = params.message; + } + delete params.message; + if (typeof params.error === "string") return { + ...params, + error: () => params.error + }; + return params; +} +function optionalKeys3(shape) { + return Object.keys(shape).filter((k) => { + return shape[k]._zod.optin === "optional" && shape[k]._zod.optout === "optional"; + }); +} +var NUMBER_FORMAT_RANGES3 = { + 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] +}; +function pick3(schema2, mask) { + const newShape = {}; + const currDef = schema2._zod.def; + for (const key$1 in mask) { + if (!(key$1 in currDef.shape)) throw new Error(`Unrecognized key: "${key$1}"`); + if (!mask[key$1]) continue; + newShape[key$1] = currDef.shape[key$1]; + } + return clone3(schema2, { + ...schema2._zod.def, + shape: newShape, + checks: [] + }); +} +function omit5(schema2, mask) { + const newShape = { ...schema2._zod.def.shape }; + const currDef = schema2._zod.def; + for (const key$1 in mask) { + if (!(key$1 in currDef.shape)) throw new Error(`Unrecognized key: "${key$1}"`); + if (!mask[key$1]) continue; + delete newShape[key$1]; + } + return clone3(schema2, { + ...schema2._zod.def, + shape: newShape, + checks: [] + }); +} +function extend3(schema2, shape) { + if (!isPlainObject$1(shape)) throw new Error("Invalid input to extend: expected a plain object"); + return clone3(schema2, { + ...schema2._zod.def, + get shape() { + const _shape = { + ...schema2._zod.def.shape, + ...shape + }; + assignProp3(this, "shape", _shape); + return _shape; + }, + checks: [] + }); +} +function merge4(a, b) { + return clone3(a, { + ...a._zod.def, + get shape() { + const _shape = { + ...a._zod.def.shape, + ...b._zod.def.shape + }; + assignProp3(this, "shape", _shape); + return _shape; + }, + catchall: b._zod.def.catchall, + checks: [] + }); +} +function partial3(Class3, schema2, mask) { + const oldShape = schema2._zod.def.shape; + const shape = { ...oldShape }; + if (mask) for (const key$1 in mask) { + if (!(key$1 in oldShape)) throw new Error(`Unrecognized key: "${key$1}"`); + if (!mask[key$1]) continue; + shape[key$1] = Class3 ? new Class3({ + type: "optional", + innerType: oldShape[key$1] + }) : oldShape[key$1]; + } + else for (const key$1 in oldShape) shape[key$1] = Class3 ? new Class3({ + type: "optional", + innerType: oldShape[key$1] + }) : oldShape[key$1]; + return clone3(schema2, { + ...schema2._zod.def, + shape, + checks: [] + }); +} +function required3(Class3, schema2, mask) { + const oldShape = schema2._zod.def.shape; + const shape = { ...oldShape }; + if (mask) for (const key$1 in mask) { + if (!(key$1 in shape)) throw new Error(`Unrecognized key: "${key$1}"`); + if (!mask[key$1]) continue; + shape[key$1] = new Class3({ + type: "nonoptional", + innerType: oldShape[key$1] + }); + } + else for (const key$1 in oldShape) shape[key$1] = new Class3({ + type: "nonoptional", + innerType: oldShape[key$1] + }); + return clone3(schema2, { + ...schema2._zod.def, + shape, + checks: [] + }); +} +function aborted3(x, startIndex = 0) { + for (let i$3 = startIndex; i$3 < x.issues.length; i$3++) if (x.issues[i$3]?.continue !== true) return true; + return false; +} +function prefixIssues3(path4, issues) { + return issues.map((iss) => { + var _a2; + (_a2 = iss).path ?? (_a2.path = []); + iss.path.unshift(path4); + return iss; + }); +} +function unwrapMessage3(message) { + return typeof message === "string" ? message : message?.message; +} +function finalizeIssue3(iss, ctx, config$1) { + const full = { + ...iss, + path: iss.path ?? [] + }; + if (!iss.message) full.message = unwrapMessage3(iss.inst?._zod.def?.error?.(iss)) ?? unwrapMessage3(ctx?.error?.(iss)) ?? unwrapMessage3(config$1.customError?.(iss)) ?? unwrapMessage3(config$1.localeError?.(iss)) ?? "Invalid input"; + delete full.inst; + delete full.continue; + if (!ctx?.reportInput) delete full.input; + return full; +} +function getLengthableOrigin3(input) { + if (Array.isArray(input)) return "array"; + if (typeof input === "string") return "string"; + return "unknown"; +} +function issue3(...args3) { + const [iss, input, inst] = args3; + if (typeof iss === "string") return { + message: iss, + code: "custom", + input, + inst + }; + return { ...iss }; +} +var initializer$1 = (inst, def$30) => { + inst.name = "$ZodError"; + Object.defineProperty(inst, "_zod", { + value: inst._zod, + enumerable: false + }); + Object.defineProperty(inst, "issues", { + value: def$30, + enumerable: false + }); + Object.defineProperty(inst, "message", { + get() { + return JSON.stringify(def$30, jsonStringifyReplacer3, 2); + }, + enumerable: true + }); + Object.defineProperty(inst, "toString", { + value: () => inst.message, + enumerable: false + }); +}; +var $ZodError3 = $constructor3("$ZodError", initializer$1); +var $ZodRealError3 = $constructor3("$ZodError", initializer$1, { Parent: Error }); +function flattenError3(error$1, mapper = (issue$1) => issue$1.message) { + const fieldErrors = {}; + const formErrors = []; + for (const sub of error$1.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 formatError3(error$1, _mapper) { + const mapper = _mapper || function(issue$1) { + return issue$1.message; + }; + const fieldErrors = { _errors: [] }; + const processError = (error$2) => { + for (const issue$1 of error$2.issues) if (issue$1.code === "invalid_union" && issue$1.errors.length) issue$1.errors.map((issues) => processError({ issues })); + else if (issue$1.code === "invalid_key") processError({ issues: issue$1.issues }); + else if (issue$1.code === "invalid_element") processError({ issues: issue$1.issues }); + else if (issue$1.path.length === 0) fieldErrors._errors.push(mapper(issue$1)); + else { + let curr = fieldErrors; + let i$3 = 0; + while (i$3 < issue$1.path.length) { + const el = issue$1.path[i$3]; + if (!(i$3 === issue$1.path.length - 1)) curr[el] = curr[el] || { _errors: [] }; + else { + curr[el] = curr[el] || { _errors: [] }; + curr[el]._errors.push(mapper(issue$1)); + } + curr = curr[el]; + i$3++; + } + } + }; + processError(error$1); + return fieldErrors; +} +var _parse3 = (_Err) => (schema2, value2, _ctx, _params) => { + const ctx = _ctx ? Object.assign(_ctx, { async: false }) : { async: false }; + const result = schema2._zod.run({ + value: value2, + issues: [] + }, ctx); + if (result instanceof Promise) throw new $ZodAsyncError3(); + if (result.issues.length) { + const e = new (_params?.Err ?? _Err)(result.issues.map((iss) => finalizeIssue3(iss, ctx, config3()))); + captureStackTrace3(e, _params?.callee); + throw e; + } + return result.value; +}; +var _parseAsync3 = (_Err) => async (schema2, value2, _ctx, params) => { + const ctx = _ctx ? Object.assign(_ctx, { async: true }) : { async: true }; + let result = schema2._zod.run({ + value: value2, + issues: [] + }, ctx); + if (result instanceof Promise) result = await result; + if (result.issues.length) { + const e = new (params?.Err ?? _Err)(result.issues.map((iss) => finalizeIssue3(iss, ctx, config3()))); + captureStackTrace3(e, params?.callee); + throw e; + } + return result.value; +}; +var _safeParse3 = (_Err) => (schema2, value2, _ctx) => { + const ctx = _ctx ? { + ..._ctx, + async: false + } : { async: false }; + const result = schema2._zod.run({ + value: value2, + issues: [] + }, ctx); + if (result instanceof Promise) throw new $ZodAsyncError3(); + return result.issues.length ? { + success: false, + error: new (_Err ?? $ZodError3)(result.issues.map((iss) => finalizeIssue3(iss, ctx, config3()))) + } : { 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; - this._error = new ZodError3(ctx.common.issues); - return this._error; - } - }; - } }; -function processCreateParams4(params) { - if (!params) return {}; - const { errorMap: errorMap$1, invalid_type_error, required_error, description } = params; - if (errorMap$1 && (invalid_type_error || required_error)) throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`); - if (errorMap$1) return { - errorMap: errorMap$1, - description +var safeParse$2 = /* @__PURE__ */ _safeParse3($ZodRealError3); +var _safeParseAsync3 = (_Err) => async (schema2, value2, _ctx) => { + const ctx = _ctx ? Object.assign(_ctx, { async: true }) : { async: true }; + let result = schema2._zod.run({ + value: value2, + issues: [] + }, ctx); + if (result instanceof Promise) result = await result; + return result.issues.length ? { + success: false, + error: new _Err(result.issues.map((iss) => finalizeIssue3(iss, ctx, config3()))) + } : { + success: true, + data: result.value }; - 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 ZodType3 = class { - get description() { - return this._def.description; - } - _getType(input) { - return getParsedType3(input.data); - } - _getOrReturnCtx(input, ctx) { - return ctx || { - common: input.parent.common, - data: input.data, - parsedType: getParsedType3(input.data), - schemaErrorMap: this._def.errorMap, - path: input.path, - parent: input.parent - }; - } - _processInputParams(input) { - return { - status: new ParseStatus3(), - ctx: { - common: input.parent.common, - data: input.data, - parsedType: getParsedType3(input.data), - schemaErrorMap: this._def.errorMap, - path: input.path, - parent: input.parent - } - }; - } - _parseSync(input) { - const result = this._parse(input); - if (isAsync3(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: getParsedType3(data) - }; - const result = this._parseSync({ - data, - path: ctx.path, - parent: ctx - }); - return handleResult3(ctx, result); - } - "~validate"(data) { - const ctx = { - common: { - issues: [], - async: !!this["~standard"].async - }, - path: [], - schemaErrorMap: this._def.errorMap, - parent: null, - data, - parsedType: getParsedType3(data) - }; - if (!this["~standard"].async) try { - const result = this._parseSync({ - data, - path: [], - parent: ctx - }); - return isValid3(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) => isValid3(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: getParsedType3(data) - }; - const maybeAsyncResult = this._parse({ - data, - path: ctx.path, - parent: ctx - }); - const result = await (isAsync3(maybeAsyncResult) ? maybeAsyncResult : Promise.resolve(maybeAsyncResult)); - return handleResult3(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: ZodIssueCode3.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 ZodEffects3({ - schema: this, - typeName: ZodFirstPartyTypeKind3.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 ZodOptional3.create(this, this._def); - } - nullable() { - return ZodNullable3.create(this, this._def); - } - nullish() { - return this.nullable().optional(); - } - array() { - return ZodArray3.create(this); - } - promise() { - return ZodPromise3.create(this, this._def); - } - or(option) { - return ZodUnion3.create([this, option], this._def); - } - and(incoming) { - return ZodIntersection3.create(this, incoming, this._def); - } - transform(transform) { - return new ZodEffects3({ - ...processCreateParams4(this._def), - schema: this, - typeName: ZodFirstPartyTypeKind3.ZodEffects, - effect: { - type: "transform", - transform - } - }); - } - default(def) { - const defaultValueFunc = typeof def === "function" ? def : () => def; - return new ZodDefault3({ - ...processCreateParams4(this._def), - innerType: this, - defaultValue: defaultValueFunc, - typeName: ZodFirstPartyTypeKind3.ZodDefault - }); - } - brand() { - return new ZodBranded3({ - typeName: ZodFirstPartyTypeKind3.ZodBranded, - type: this, - ...processCreateParams4(this._def) - }); - } - catch(def) { - const catchValueFunc = typeof def === "function" ? def : () => def; - return new ZodCatch3({ - ...processCreateParams4(this._def), - innerType: this, - catchValue: catchValueFunc, - typeName: ZodFirstPartyTypeKind3.ZodCatch - }); - } - describe(description) { - const This = this.constructor; - return new This({ - ...this._def, - description - }); - } - pipe(target) { - return ZodPipeline3.create(this, target); - } - readonly() { - return ZodReadonly3.create(this); - } - isOptional() { - return this.safeParse(void 0).success; - } - isNullable() { - return this.safeParse(null).success; - } }; -var cuidRegex3 = /^c[^\s-]{8,}$/i; -var cuid2Regex3 = /^[0-9a-z]+$/; -var ulidRegex3 = /^[0-9A-HJKMNP-TV-Z]{26}$/i; -var uuidRegex3 = /^[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 nanoidRegex3 = /^[a-z0-9_-]{21}$/i; -var jwtRegex3 = /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/; -var durationRegex3 = /^[-+]?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 emailRegex3 = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i; -var _emojiRegex3 = `^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`; -var emojiRegex3; -var ipv4Regex3 = /^(?:(?: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 ipv4CidrRegex3 = /^(?:(?:25[0-5]|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[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 base64Regex$1 = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/; -var base64urlRegex3 = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/; -var dateRegexSource3 = `((\\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 dateRegex3 = /* @__PURE__ */ new RegExp(`^${dateRegexSource3}$`); -function timeRegexSource3(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}`; +var safeParseAsync$1 = /* @__PURE__ */ _safeParseAsync3($ZodRealError3); +var cuid5 = /^[cC][^\s-]{8,}$/; +var cuid24 = /^[0-9a-z]+$/; +var ulid4 = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/; +var xid4 = /^[0-9a-vA-V]{20}$/; +var ksuid4 = /^[A-Za-z0-9]{27}$/; +var nanoid4 = /^[a-zA-Z0-9_-]{21}$/; +var duration$1 = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/; +var guid4 = /^([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})$/; +var uuid8 = (version$1) => { + if (!version$1) 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 /* @__PURE__ */ new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${version$1}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`); +}; +var email5 = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/; +var _emoji$1 = `^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`; +function emoji4() { + return new RegExp(_emoji$1, "u"); } -function timeRegex3(args3) { - return /* @__PURE__ */ new RegExp(`^${timeRegexSource3(args3)}$`); +var ipv44 = /^(?:(?: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 ipv64 = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})$/; +var cidrv44 = /^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/; +var cidrv64 = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/; +var base645 = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/; +var base64url4 = /^[A-Za-z0-9_-]*$/; +var hostname4 = /^([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+$/; +var e1644 = /^\+(?:[0-9]){6,14}[0-9]$/; +var dateSource3 = `(?:(?:\\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 date$2 = /* @__PURE__ */ new RegExp(`^${dateSource3}$`); +function timeSource3(args3) { + const hhmm = `(?:[01]\\d|2[0-3]):[0-5]\\d`; + return typeof args3.precision === "number" ? args3.precision === -1 ? `${hhmm}` : args3.precision === 0 ? `${hhmm}:[0-5]\\d` : `${hhmm}:[0-5]\\d\\.\\d{${args3.precision}}` : `${hhmm}(?::[0-5]\\d(?:\\.\\d+)?)?`; } -function datetimeRegex3(args3) { - let regex$1 = `${dateRegexSource3}T${timeRegexSource3(args3)}`; - const opts = []; - opts.push(args3.local ? `Z?` : `Z`); - if (args3.offset) opts.push(`([+-]\\d{2}:?\\d{2})`); - regex$1 = `${regex$1}(${opts.join("|")})`; +function time$1(args3) { + return /* @__PURE__ */ new RegExp(`^${timeSource3(args3)}$`); +} +function datetime$1(args3) { + const time$2 = timeSource3({ precision: args3.precision }); + const opts = ["Z"]; + if (args3.local) opts.push(""); + if (args3.offset) opts.push(`([+-]\\d{2}:\\d{2})`); + const timeRegex3 = `${time$2}(?:${opts.join("|")})`; + return /* @__PURE__ */ new RegExp(`^${dateSource3}T(?:${timeRegex3})$`); +} +var string$1 = (params) => { + const regex$1 = params ? `[\\s\\S]{${params?.minimum ?? 0},${params?.maximum ?? ""}}` : `[\\s\\S]*`; 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; - return false; -} -function isValidJWT3(jwt, alg) { - if (!jwtRegex3.test(jwt)) return false; +}; +var integer4 = /^\d+$/; +var number$1 = /^-?\d+(?:\.\d+)?/i; +var boolean$1 = /true|false/i; +var _null$2 = /null/i; +var lowercase3 = /^[^A-Z]*$/; +var uppercase3 = /^[^a-z]*$/; +var $ZodCheck3 = /* @__PURE__ */ $constructor3("$ZodCheck", (inst, def$30) => { + var _a2; + inst._zod ?? (inst._zod = {}); + inst._zod.def = def$30; + (_a2 = inst._zod).onattach ?? (_a2.onattach = []); +}); +var numericOriginMap3 = { + number: "number", + bigint: "bigint", + object: "date" +}; +var $ZodCheckLessThan3 = /* @__PURE__ */ $constructor3("$ZodCheckLessThan", (inst, def$30) => { + $ZodCheck3.init(inst, def$30); + const origin = numericOriginMap3[typeof def$30.value]; + inst._zod.onattach.push((inst$1) => { + const bag = inst$1._zod.bag; + const curr = (def$30.inclusive ? bag.maximum : bag.exclusiveMaximum) ?? Number.POSITIVE_INFINITY; + if (def$30.value < curr) if (def$30.inclusive) bag.maximum = def$30.value; + else bag.exclusiveMaximum = def$30.value; + }); + inst._zod.check = (payload) => { + if (def$30.inclusive ? payload.value <= def$30.value : payload.value < def$30.value) return; + payload.issues.push({ + origin, + code: "too_big", + maximum: def$30.value, + input: payload.value, + inclusive: def$30.inclusive, + inst, + continue: !def$30.abort + }); + }; +}); +var $ZodCheckGreaterThan3 = /* @__PURE__ */ $constructor3("$ZodCheckGreaterThan", (inst, def$30) => { + $ZodCheck3.init(inst, def$30); + const origin = numericOriginMap3[typeof def$30.value]; + inst._zod.onattach.push((inst$1) => { + const bag = inst$1._zod.bag; + const curr = (def$30.inclusive ? bag.minimum : bag.exclusiveMinimum) ?? Number.NEGATIVE_INFINITY; + if (def$30.value > curr) if (def$30.inclusive) bag.minimum = def$30.value; + else bag.exclusiveMinimum = def$30.value; + }); + inst._zod.check = (payload) => { + if (def$30.inclusive ? payload.value >= def$30.value : payload.value > def$30.value) return; + payload.issues.push({ + origin, + code: "too_small", + minimum: def$30.value, + input: payload.value, + inclusive: def$30.inclusive, + inst, + continue: !def$30.abort + }); + }; +}); +var $ZodCheckMultipleOf3 = /* @__PURE__ */ $constructor3("$ZodCheckMultipleOf", (inst, def$30) => { + $ZodCheck3.init(inst, def$30); + inst._zod.onattach.push((inst$1) => { + var _a2; + (_a2 = inst$1._zod.bag).multipleOf ?? (_a2.multipleOf = def$30.value); + }); + inst._zod.check = (payload) => { + if (typeof payload.value !== typeof def$30.value) throw new Error("Cannot mix number and bigint in multiple_of check."); + if (typeof payload.value === "bigint" ? payload.value % def$30.value === BigInt(0) : floatSafeRemainder5(payload.value, def$30.value) === 0) return; + payload.issues.push({ + origin: typeof payload.value, + code: "not_multiple_of", + divisor: def$30.value, + input: payload.value, + inst, + continue: !def$30.abort + }); + }; +}); +var $ZodCheckNumberFormat3 = /* @__PURE__ */ $constructor3("$ZodCheckNumberFormat", (inst, def$30) => { + $ZodCheck3.init(inst, def$30); + def$30.format = def$30.format || "float64"; + const isInt = def$30.format?.includes("int"); + const origin = isInt ? "int" : "number"; + const [minimum, maximum] = NUMBER_FORMAT_RANGES3[def$30.format]; + inst._zod.onattach.push((inst$1) => { + const bag = inst$1._zod.bag; + bag.format = def$30.format; + bag.minimum = minimum; + bag.maximum = maximum; + if (isInt) bag.pattern = integer4; + }); + inst._zod.check = (payload) => { + const input = payload.value; + if (isInt) { + if (!Number.isInteger(input)) { + payload.issues.push({ + expected: origin, + format: def$30.format, + code: "invalid_type", + input, + inst + }); + return; + } + if (!Number.isSafeInteger(input)) { + if (input > 0) payload.issues.push({ + input, + code: "too_big", + maximum: Number.MAX_SAFE_INTEGER, + note: "Integers must be within the safe integer range.", + inst, + origin, + continue: !def$30.abort + }); + else payload.issues.push({ + input, + code: "too_small", + minimum: Number.MIN_SAFE_INTEGER, + note: "Integers must be within the safe integer range.", + inst, + origin, + continue: !def$30.abort + }); + return; + } + } + if (input < minimum) payload.issues.push({ + origin: "number", + input, + code: "too_small", + minimum, + inclusive: true, + inst, + continue: !def$30.abort + }); + if (input > maximum) payload.issues.push({ + origin: "number", + input, + code: "too_big", + maximum, + inst + }); + }; +}); +var $ZodCheckMaxLength3 = /* @__PURE__ */ $constructor3("$ZodCheckMaxLength", (inst, def$30) => { + var _a2; + $ZodCheck3.init(inst, def$30); + (_a2 = inst._zod.def).when ?? (_a2.when = (payload) => { + const val = payload.value; + return !nullish4(val) && val.length !== void 0; + }); + inst._zod.onattach.push((inst$1) => { + const curr = inst$1._zod.bag.maximum ?? Number.POSITIVE_INFINITY; + if (def$30.maximum < curr) inst$1._zod.bag.maximum = def$30.maximum; + }); + inst._zod.check = (payload) => { + const input = payload.value; + if (input.length <= def$30.maximum) return; + const origin = getLengthableOrigin3(input); + payload.issues.push({ + origin, + code: "too_big", + maximum: def$30.maximum, + inclusive: true, + input, + inst, + continue: !def$30.abort + }); + }; +}); +var $ZodCheckMinLength3 = /* @__PURE__ */ $constructor3("$ZodCheckMinLength", (inst, def$30) => { + var _a2; + $ZodCheck3.init(inst, def$30); + (_a2 = inst._zod.def).when ?? (_a2.when = (payload) => { + const val = payload.value; + return !nullish4(val) && val.length !== void 0; + }); + inst._zod.onattach.push((inst$1) => { + const curr = inst$1._zod.bag.minimum ?? Number.NEGATIVE_INFINITY; + if (def$30.minimum > curr) inst$1._zod.bag.minimum = def$30.minimum; + }); + inst._zod.check = (payload) => { + const input = payload.value; + if (input.length >= def$30.minimum) return; + const origin = getLengthableOrigin3(input); + payload.issues.push({ + origin, + code: "too_small", + minimum: def$30.minimum, + inclusive: true, + input, + inst, + continue: !def$30.abort + }); + }; +}); +var $ZodCheckLengthEquals3 = /* @__PURE__ */ $constructor3("$ZodCheckLengthEquals", (inst, def$30) => { + var _a2; + $ZodCheck3.init(inst, def$30); + (_a2 = inst._zod.def).when ?? (_a2.when = (payload) => { + const val = payload.value; + return !nullish4(val) && val.length !== void 0; + }); + inst._zod.onattach.push((inst$1) => { + const bag = inst$1._zod.bag; + bag.minimum = def$30.length; + bag.maximum = def$30.length; + bag.length = def$30.length; + }); + inst._zod.check = (payload) => { + const input = payload.value; + const length = input.length; + if (length === def$30.length) return; + const origin = getLengthableOrigin3(input); + const tooBig = length > def$30.length; + payload.issues.push({ + origin, + ...tooBig ? { + code: "too_big", + maximum: def$30.length + } : { + code: "too_small", + minimum: def$30.length + }, + inclusive: true, + exact: true, + input: payload.value, + inst, + continue: !def$30.abort + }); + }; +}); +var $ZodCheckStringFormat3 = /* @__PURE__ */ $constructor3("$ZodCheckStringFormat", (inst, def$30) => { + var _a2, _b; + $ZodCheck3.init(inst, def$30); + inst._zod.onattach.push((inst$1) => { + const bag = inst$1._zod.bag; + bag.format = def$30.format; + if (def$30.pattern) { + bag.patterns ?? (bag.patterns = /* @__PURE__ */ new Set()); + bag.patterns.add(def$30.pattern); + } + }); + if (def$30.pattern) (_a2 = inst._zod).check ?? (_a2.check = (payload) => { + def$30.pattern.lastIndex = 0; + if (def$30.pattern.test(payload.value)) return; + payload.issues.push({ + origin: "string", + code: "invalid_format", + format: def$30.format, + input: payload.value, + ...def$30.pattern ? { pattern: def$30.pattern.toString() } : {}, + inst, + continue: !def$30.abort + }); + }); + else (_b = inst._zod).check ?? (_b.check = () => { + }); +}); +var $ZodCheckRegex3 = /* @__PURE__ */ $constructor3("$ZodCheckRegex", (inst, def$30) => { + $ZodCheckStringFormat3.init(inst, def$30); + inst._zod.check = (payload) => { + def$30.pattern.lastIndex = 0; + if (def$30.pattern.test(payload.value)) return; + payload.issues.push({ + origin: "string", + code: "invalid_format", + format: "regex", + input: payload.value, + pattern: def$30.pattern.toString(), + inst, + continue: !def$30.abort + }); + }; +}); +var $ZodCheckLowerCase3 = /* @__PURE__ */ $constructor3("$ZodCheckLowerCase", (inst, def$30) => { + def$30.pattern ?? (def$30.pattern = lowercase3); + $ZodCheckStringFormat3.init(inst, def$30); +}); +var $ZodCheckUpperCase3 = /* @__PURE__ */ $constructor3("$ZodCheckUpperCase", (inst, def$30) => { + def$30.pattern ?? (def$30.pattern = uppercase3); + $ZodCheckStringFormat3.init(inst, def$30); +}); +var $ZodCheckIncludes3 = /* @__PURE__ */ $constructor3("$ZodCheckIncludes", (inst, def$30) => { + $ZodCheck3.init(inst, def$30); + const escapedRegex = escapeRegex3(def$30.includes); + const pattern = new RegExp(typeof def$30.position === "number" ? `^.{${def$30.position}}${escapedRegex}` : escapedRegex); + def$30.pattern = pattern; + inst._zod.onattach.push((inst$1) => { + const bag = inst$1._zod.bag; + bag.patterns ?? (bag.patterns = /* @__PURE__ */ new Set()); + bag.patterns.add(pattern); + }); + inst._zod.check = (payload) => { + if (payload.value.includes(def$30.includes, def$30.position)) return; + payload.issues.push({ + origin: "string", + code: "invalid_format", + format: "includes", + includes: def$30.includes, + input: payload.value, + inst, + continue: !def$30.abort + }); + }; +}); +var $ZodCheckStartsWith3 = /* @__PURE__ */ $constructor3("$ZodCheckStartsWith", (inst, def$30) => { + $ZodCheck3.init(inst, def$30); + const pattern = /* @__PURE__ */ new RegExp(`^${escapeRegex3(def$30.prefix)}.*`); + def$30.pattern ?? (def$30.pattern = pattern); + inst._zod.onattach.push((inst$1) => { + const bag = inst$1._zod.bag; + bag.patterns ?? (bag.patterns = /* @__PURE__ */ new Set()); + bag.patterns.add(pattern); + }); + inst._zod.check = (payload) => { + if (payload.value.startsWith(def$30.prefix)) return; + payload.issues.push({ + origin: "string", + code: "invalid_format", + format: "starts_with", + prefix: def$30.prefix, + input: payload.value, + inst, + continue: !def$30.abort + }); + }; +}); +var $ZodCheckEndsWith3 = /* @__PURE__ */ $constructor3("$ZodCheckEndsWith", (inst, def$30) => { + $ZodCheck3.init(inst, def$30); + const pattern = /* @__PURE__ */ new RegExp(`.*${escapeRegex3(def$30.suffix)}$`); + def$30.pattern ?? (def$30.pattern = pattern); + inst._zod.onattach.push((inst$1) => { + const bag = inst$1._zod.bag; + bag.patterns ?? (bag.patterns = /* @__PURE__ */ new Set()); + bag.patterns.add(pattern); + }); + inst._zod.check = (payload) => { + if (payload.value.endsWith(def$30.suffix)) return; + payload.issues.push({ + origin: "string", + code: "invalid_format", + format: "ends_with", + suffix: def$30.suffix, + input: payload.value, + inst, + continue: !def$30.abort + }); + }; +}); +var $ZodCheckOverwrite3 = /* @__PURE__ */ $constructor3("$ZodCheckOverwrite", (inst, def$30) => { + $ZodCheck3.init(inst, def$30); + inst._zod.check = (payload) => { + payload.value = def$30.tx(payload.value); + }; +}); +var Doc3 = class { + constructor(args3 = []) { + this.content = []; + this.indent = 0; + if (this) this.args = args3; + } + indented(fn2) { + this.indent += 1; + fn2(this); + this.indent -= 1; + } + write(arg) { + if (typeof arg === "function") { + arg(this, { execution: "sync" }); + arg(this, { execution: "async" }); + return; + } + const lines = arg.split("\n").filter((x) => x); + const minIndent = Math.min(...lines.map((x) => x.length - x.trimStart().length)); + const dedented = lines.map((x) => x.slice(minIndent)).map((x) => " ".repeat(this.indent * 2) + x); + for (const line$1 of dedented) this.content.push(line$1); + } + compile() { + const F = Function; + const args3 = this?.args; + const lines = [...(this?.content ?? [``]).map((x) => ` ${x}`)]; + return new F(...args3, lines.join("\n")); + } +}; +var version3 = { + major: 4, + minor: 0, + patch: 0 +}; +var $ZodType3 = /* @__PURE__ */ $constructor3("$ZodType", (inst, def$30) => { + var _a2; + inst ?? (inst = {}); + inst._zod.def = def$30; + inst._zod.bag = inst._zod.bag || {}; + inst._zod.version = version3; + const checks = [...inst._zod.def.checks ?? []]; + if (inst._zod.traits.has("$ZodCheck")) checks.unshift(inst); + for (const ch of checks) for (const fn2 of ch._zod.onattach) fn2(inst); + if (checks.length === 0) { + (_a2 = inst._zod).deferred ?? (_a2.deferred = []); + inst._zod.deferred?.push(() => { + inst._zod.run = inst._zod.parse; + }); + } else { + const runChecks = (payload, checks$1, ctx) => { + let isAborted3 = aborted3(payload); + let asyncResult; + for (const ch of checks$1) { + if (ch._zod.def.when) { + if (!ch._zod.def.when(payload)) continue; + } else if (isAborted3) continue; + const currLen = payload.issues.length; + const _$1 = ch._zod.check(payload); + if (_$1 instanceof Promise && ctx?.async === false) throw new $ZodAsyncError3(); + if (asyncResult || _$1 instanceof Promise) asyncResult = (asyncResult ?? Promise.resolve()).then(async () => { + await _$1; + if (payload.issues.length === currLen) return; + if (!isAborted3) isAborted3 = aborted3(payload, currLen); + }); + else { + if (payload.issues.length === currLen) continue; + if (!isAborted3) isAborted3 = aborted3(payload, currLen); + } + } + if (asyncResult) return asyncResult.then(() => { + return payload; + }); + return payload; + }; + inst._zod.run = (payload, ctx) => { + const result = inst._zod.parse(payload, ctx); + if (result instanceof Promise) { + if (ctx.async === false) throw new $ZodAsyncError3(); + return result.then((result$1) => runChecks(result$1, checks, ctx)); + } + return runChecks(result, checks, ctx); + }; + } + inst["~standard"] = { + validate: (value2) => { + try { + const r = safeParse$2(inst, value2); + return r.success ? { value: r.data } : { issues: r.error?.issues }; + } catch (_$1) { + return safeParseAsync$1(inst, value2).then((r) => r.success ? { value: r.data } : { issues: r.error?.issues }); + } + }, + vendor: "zod", + version: 1 + }; +}); +var $ZodString3 = /* @__PURE__ */ $constructor3("$ZodString", (inst, def$30) => { + $ZodType3.init(inst, def$30); + inst._zod.pattern = [...inst?._zod.bag?.patterns ?? []].pop() ?? string$1(inst._zod.bag); + inst._zod.parse = (payload, _$1) => { + if (def$30.coerce) try { + payload.value = String(payload.value); + } catch (_$2) { + } + if (typeof payload.value === "string") return payload; + payload.issues.push({ + expected: "string", + code: "invalid_type", + input: payload.value, + inst + }); + return payload; + }; +}); +var $ZodStringFormat3 = /* @__PURE__ */ $constructor3("$ZodStringFormat", (inst, def$30) => { + $ZodCheckStringFormat3.init(inst, def$30); + $ZodString3.init(inst, def$30); +}); +var $ZodGUID3 = /* @__PURE__ */ $constructor3("$ZodGUID", (inst, def$30) => { + def$30.pattern ?? (def$30.pattern = guid4); + $ZodStringFormat3.init(inst, def$30); +}); +var $ZodUUID3 = /* @__PURE__ */ $constructor3("$ZodUUID", (inst, def$30) => { + if (def$30.version) { + const v = { + v1: 1, + v2: 2, + v3: 3, + v4: 4, + v5: 5, + v6: 6, + v7: 7, + v8: 8 + }[def$30.version]; + if (v === void 0) throw new Error(`Invalid UUID version: "${def$30.version}"`); + def$30.pattern ?? (def$30.pattern = uuid8(v)); + } else def$30.pattern ?? (def$30.pattern = uuid8()); + $ZodStringFormat3.init(inst, def$30); +}); +var $ZodEmail3 = /* @__PURE__ */ $constructor3("$ZodEmail", (inst, def$30) => { + def$30.pattern ?? (def$30.pattern = email5); + $ZodStringFormat3.init(inst, def$30); +}); +var $ZodURL3 = /* @__PURE__ */ $constructor3("$ZodURL", (inst, def$30) => { + $ZodStringFormat3.init(inst, def$30); + inst._zod.check = (payload) => { + try { + const orig = payload.value; + const url$1 = new URL(orig); + const href = url$1.href; + if (def$30.hostname) { + def$30.hostname.lastIndex = 0; + if (!def$30.hostname.test(url$1.hostname)) payload.issues.push({ + code: "invalid_format", + format: "url", + note: "Invalid hostname", + pattern: hostname4.source, + input: payload.value, + inst, + continue: !def$30.abort + }); + } + if (def$30.protocol) { + def$30.protocol.lastIndex = 0; + if (!def$30.protocol.test(url$1.protocol.endsWith(":") ? url$1.protocol.slice(0, -1) : url$1.protocol)) payload.issues.push({ + code: "invalid_format", + format: "url", + note: "Invalid protocol", + pattern: def$30.protocol.source, + input: payload.value, + inst, + continue: !def$30.abort + }); + } + if (!orig.endsWith("/") && href.endsWith("/")) payload.value = href.slice(0, -1); + else payload.value = href; + return; + } catch (_$1) { + payload.issues.push({ + code: "invalid_format", + format: "url", + input: payload.value, + inst, + continue: !def$30.abort + }); + } + }; +}); +var $ZodEmoji3 = /* @__PURE__ */ $constructor3("$ZodEmoji", (inst, def$30) => { + def$30.pattern ?? (def$30.pattern = emoji4()); + $ZodStringFormat3.init(inst, def$30); +}); +var $ZodNanoID3 = /* @__PURE__ */ $constructor3("$ZodNanoID", (inst, def$30) => { + def$30.pattern ?? (def$30.pattern = nanoid4); + $ZodStringFormat3.init(inst, def$30); +}); +var $ZodCUID4 = /* @__PURE__ */ $constructor3("$ZodCUID", (inst, def$30) => { + def$30.pattern ?? (def$30.pattern = cuid5); + $ZodStringFormat3.init(inst, def$30); +}); +var $ZodCUID23 = /* @__PURE__ */ $constructor3("$ZodCUID2", (inst, def$30) => { + def$30.pattern ?? (def$30.pattern = cuid24); + $ZodStringFormat3.init(inst, def$30); +}); +var $ZodULID3 = /* @__PURE__ */ $constructor3("$ZodULID", (inst, def$30) => { + def$30.pattern ?? (def$30.pattern = ulid4); + $ZodStringFormat3.init(inst, def$30); +}); +var $ZodXID3 = /* @__PURE__ */ $constructor3("$ZodXID", (inst, def$30) => { + def$30.pattern ?? (def$30.pattern = xid4); + $ZodStringFormat3.init(inst, def$30); +}); +var $ZodKSUID3 = /* @__PURE__ */ $constructor3("$ZodKSUID", (inst, def$30) => { + def$30.pattern ?? (def$30.pattern = ksuid4); + $ZodStringFormat3.init(inst, def$30); +}); +var $ZodISODateTime3 = /* @__PURE__ */ $constructor3("$ZodISODateTime", (inst, def$30) => { + def$30.pattern ?? (def$30.pattern = datetime$1(def$30)); + $ZodStringFormat3.init(inst, def$30); +}); +var $ZodISODate3 = /* @__PURE__ */ $constructor3("$ZodISODate", (inst, def$30) => { + def$30.pattern ?? (def$30.pattern = date$2); + $ZodStringFormat3.init(inst, def$30); +}); +var $ZodISOTime3 = /* @__PURE__ */ $constructor3("$ZodISOTime", (inst, def$30) => { + def$30.pattern ?? (def$30.pattern = time$1(def$30)); + $ZodStringFormat3.init(inst, def$30); +}); +var $ZodISODuration3 = /* @__PURE__ */ $constructor3("$ZodISODuration", (inst, def$30) => { + def$30.pattern ?? (def$30.pattern = duration$1); + $ZodStringFormat3.init(inst, def$30); +}); +var $ZodIPv43 = /* @__PURE__ */ $constructor3("$ZodIPv4", (inst, def$30) => { + def$30.pattern ?? (def$30.pattern = ipv44); + $ZodStringFormat3.init(inst, def$30); + inst._zod.onattach.push((inst$1) => { + const bag = inst$1._zod.bag; + bag.format = `ipv4`; + }); +}); +var $ZodIPv63 = /* @__PURE__ */ $constructor3("$ZodIPv6", (inst, def$30) => { + def$30.pattern ?? (def$30.pattern = ipv64); + $ZodStringFormat3.init(inst, def$30); + inst._zod.onattach.push((inst$1) => { + const bag = inst$1._zod.bag; + bag.format = `ipv6`; + }); + inst._zod.check = (payload) => { + try { + new URL(`http://[${payload.value}]`); + } catch { + payload.issues.push({ + code: "invalid_format", + format: "ipv6", + input: payload.value, + inst, + continue: !def$30.abort + }); + } + }; +}); +var $ZodCIDRv43 = /* @__PURE__ */ $constructor3("$ZodCIDRv4", (inst, def$30) => { + def$30.pattern ?? (def$30.pattern = cidrv44); + $ZodStringFormat3.init(inst, def$30); +}); +var $ZodCIDRv63 = /* @__PURE__ */ $constructor3("$ZodCIDRv6", (inst, def$30) => { + def$30.pattern ?? (def$30.pattern = cidrv64); + $ZodStringFormat3.init(inst, def$30); + inst._zod.check = (payload) => { + const [address, prefix] = payload.value.split("/"); + try { + if (!prefix) throw new Error(); + const prefixNum = Number(prefix); + if (`${prefixNum}` !== prefix) throw new Error(); + if (prefixNum < 0 || prefixNum > 128) throw new Error(); + new URL(`http://[${address}]`); + } catch { + payload.issues.push({ + code: "invalid_format", + format: "cidrv6", + input: payload.value, + inst, + continue: !def$30.abort + }); + } + }; +}); +function isValidBase643(data) { + if (data === "") return true; + if (data.length % 4 !== 0) 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; + atob(data); return true; } catch { return false; } } -function isValidCidr3(ip2, version2) { - if ((version2 === "v4" || !version2) && ipv4CidrRegex3.test(ip2)) return true; - if ((version2 === "v6" || !version2) && ipv6CidrRegex3.test(ip2)) return true; - return false; +var $ZodBase643 = /* @__PURE__ */ $constructor3("$ZodBase64", (inst, def$30) => { + def$30.pattern ?? (def$30.pattern = base645); + $ZodStringFormat3.init(inst, def$30); + inst._zod.onattach.push((inst$1) => { + inst$1._zod.bag.contentEncoding = "base64"; + }); + inst._zod.check = (payload) => { + if (isValidBase643(payload.value)) return; + payload.issues.push({ + code: "invalid_format", + format: "base64", + input: payload.value, + inst, + continue: !def$30.abort + }); + }; +}); +function isValidBase64URL3(data) { + if (!base64url4.test(data)) return false; + const base64$1 = data.replace(/[-_]/g, (c) => c === "-" ? "+" : "/"); + return isValidBase643(base64$1.padEnd(Math.ceil(base64$1.length / 4) * 4, "=")); } -var ZodString3 = class ZodString4 extends ZodType3 { - _parse(input) { - if (this._def.coerce) input.data = String(input.data); - if (this._getType(input) !== ZodParsedType3.string) { - const ctx$1 = this._getOrReturnCtx(input); - addIssueToContext3(ctx$1, { - code: ZodIssueCode3.invalid_type, - expected: ZodParsedType3.string, - received: ctx$1.parsedType - }); - return INVALID3; - } - const status$1 = new ParseStatus3(); - 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); - addIssueToContext3(ctx, { - code: ZodIssueCode3.too_small, - minimum: check.value, - type: "string", - inclusive: true, - exact: false, - message: check.message - }); - status$1.dirty(); - } - } else if (check.kind === "max") { - if (input.data.length > check.value) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext3(ctx, { - code: ZodIssueCode3.too_big, - maximum: check.value, - type: "string", - inclusive: true, - exact: false, - message: check.message - }); - status$1.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) addIssueToContext3(ctx, { - code: ZodIssueCode3.too_big, - maximum: check.value, - type: "string", - inclusive: true, - exact: true, - message: check.message - }); - else if (tooSmall) addIssueToContext3(ctx, { - code: ZodIssueCode3.too_small, - minimum: check.value, - type: "string", - inclusive: true, - exact: true, - message: check.message - }); - status$1.dirty(); - } - } else if (check.kind === "email") { - if (!emailRegex3.test(input.data)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext3(ctx, { - validation: "email", - code: ZodIssueCode3.invalid_string, - message: check.message - }); - status$1.dirty(); - } - } else if (check.kind === "emoji") { - if (!emojiRegex3) emojiRegex3 = new RegExp(_emojiRegex3, "u"); - if (!emojiRegex3.test(input.data)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext3(ctx, { - validation: "emoji", - code: ZodIssueCode3.invalid_string, - message: check.message - }); - status$1.dirty(); - } - } else if (check.kind === "uuid") { - if (!uuidRegex3.test(input.data)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext3(ctx, { - validation: "uuid", - code: ZodIssueCode3.invalid_string, - message: check.message - }); - status$1.dirty(); - } - } else if (check.kind === "nanoid") { - if (!nanoidRegex3.test(input.data)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext3(ctx, { - validation: "nanoid", - code: ZodIssueCode3.invalid_string, - message: check.message - }); - status$1.dirty(); - } - } else if (check.kind === "cuid") { - if (!cuidRegex3.test(input.data)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext3(ctx, { - validation: "cuid", - code: ZodIssueCode3.invalid_string, - message: check.message - }); - status$1.dirty(); - } - } else if (check.kind === "cuid2") { - if (!cuid2Regex3.test(input.data)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext3(ctx, { - validation: "cuid2", - code: ZodIssueCode3.invalid_string, - message: check.message - }); - status$1.dirty(); - } - } else if (check.kind === "ulid") { - if (!ulidRegex3.test(input.data)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext3(ctx, { - validation: "ulid", - code: ZodIssueCode3.invalid_string, - message: check.message - }); - status$1.dirty(); - } - } else if (check.kind === "url") try { - new URL(input.data); - } catch { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext3(ctx, { - validation: "url", - code: ZodIssueCode3.invalid_string, - message: check.message - }); - status$1.dirty(); - } - else if (check.kind === "regex") { - check.regex.lastIndex = 0; - if (!check.regex.test(input.data)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext3(ctx, { - validation: "regex", - code: ZodIssueCode3.invalid_string, - message: check.message - }); - status$1.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); - addIssueToContext3(ctx, { - code: ZodIssueCode3.invalid_string, - validation: { - includes: check.value, - position: check.position - }, - message: check.message - }); - status$1.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); - addIssueToContext3(ctx, { - code: ZodIssueCode3.invalid_string, - validation: { startsWith: check.value }, - message: check.message - }); - status$1.dirty(); - } - } else if (check.kind === "endsWith") { - if (!input.data.endsWith(check.value)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext3(ctx, { - code: ZodIssueCode3.invalid_string, - validation: { endsWith: check.value }, - message: check.message - }); - status$1.dirty(); - } - } else if (check.kind === "datetime") { - if (!datetimeRegex3(check).test(input.data)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext3(ctx, { - code: ZodIssueCode3.invalid_string, - validation: "datetime", - message: check.message - }); - status$1.dirty(); - } - } else if (check.kind === "date") { - if (!dateRegex3.test(input.data)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext3(ctx, { - code: ZodIssueCode3.invalid_string, - validation: "date", - message: check.message - }); - status$1.dirty(); - } - } else if (check.kind === "time") { - if (!timeRegex3(check).test(input.data)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext3(ctx, { - code: ZodIssueCode3.invalid_string, - validation: "time", - message: check.message - }); - status$1.dirty(); - } - } else if (check.kind === "duration") { - if (!durationRegex3.test(input.data)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext3(ctx, { - validation: "duration", - code: ZodIssueCode3.invalid_string, - message: check.message - }); - status$1.dirty(); - } - } else if (check.kind === "ip") { - if (!isValidIP3(input.data, check.version)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext3(ctx, { - validation: "ip", - code: ZodIssueCode3.invalid_string, - message: check.message - }); - status$1.dirty(); - } - } else if (check.kind === "jwt") { - if (!isValidJWT3(input.data, check.alg)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext3(ctx, { - validation: "jwt", - code: ZodIssueCode3.invalid_string, - message: check.message - }); - status$1.dirty(); - } - } else if (check.kind === "cidr") { - if (!isValidCidr3(input.data, check.version)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext3(ctx, { - validation: "cidr", - code: ZodIssueCode3.invalid_string, - message: check.message - }); - status$1.dirty(); - } - } else if (check.kind === "base64") { - if (!base64Regex$1.test(input.data)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext3(ctx, { - validation: "base64", - code: ZodIssueCode3.invalid_string, - message: check.message - }); - status$1.dirty(); - } - } else if (check.kind === "base64url") { - if (!base64urlRegex3.test(input.data)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext3(ctx, { - validation: "base64url", - code: ZodIssueCode3.invalid_string, - message: check.message - }); - status$1.dirty(); - } - } else util$6.assertNever(check); - return { - status: status$1.value, - value: input.data - }; - } - _regex(regex$1, validation, message) { - return this.refinement((data) => regex$1.test(data), { - validation, - code: ZodIssueCode3.invalid_string, - ...errorUtil3.errToObj(message) - }); - } - _addCheck(check) { - return new ZodString4({ - ...this._def, - checks: [...this._def.checks, check] - }); - } - email(message) { - return this._addCheck({ - kind: "email", - ...errorUtil3.errToObj(message) - }); - } - url(message) { - return this._addCheck({ - kind: "url", - ...errorUtil3.errToObj(message) - }); - } - emoji(message) { - return this._addCheck({ - kind: "emoji", - ...errorUtil3.errToObj(message) - }); - } - uuid(message) { - return this._addCheck({ - kind: "uuid", - ...errorUtil3.errToObj(message) - }); - } - nanoid(message) { - return this._addCheck({ - kind: "nanoid", - ...errorUtil3.errToObj(message) - }); - } - cuid(message) { - return this._addCheck({ - kind: "cuid", - ...errorUtil3.errToObj(message) - }); - } - cuid2(message) { - return this._addCheck({ - kind: "cuid2", - ...errorUtil3.errToObj(message) - }); - } - ulid(message) { - return this._addCheck({ - kind: "ulid", - ...errorUtil3.errToObj(message) - }); - } - base64(message) { - return this._addCheck({ - kind: "base64", - ...errorUtil3.errToObj(message) - }); - } - base64url(message) { - return this._addCheck({ - kind: "base64url", - ...errorUtil3.errToObj(message) - }); - } - jwt(options) { - return this._addCheck({ - kind: "jwt", - ...errorUtil3.errToObj(options) - }); - } - ip(options) { - return this._addCheck({ - kind: "ip", - ...errorUtil3.errToObj(options) - }); - } - cidr(options) { - return this._addCheck({ - kind: "cidr", - ...errorUtil3.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, - ...errorUtil3.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, - ...errorUtil3.errToObj(options?.message) - }); - } - duration(message) { - return this._addCheck({ - kind: "duration", - ...errorUtil3.errToObj(message) - }); - } - regex(regex$1, message) { - return this._addCheck({ - kind: "regex", - regex: regex$1, - ...errorUtil3.errToObj(message) - }); - } - includes(value2, options) { - return this._addCheck({ - kind: "includes", - value: value2, - position: options?.position, - ...errorUtil3.errToObj(options?.message) - }); - } - startsWith(value2, message) { - return this._addCheck({ - kind: "startsWith", - value: value2, - ...errorUtil3.errToObj(message) - }); - } - endsWith(value2, message) { - return this._addCheck({ - kind: "endsWith", - value: value2, - ...errorUtil3.errToObj(message) - }); - } - min(minLength, message) { - return this._addCheck({ - kind: "min", - value: minLength, - ...errorUtil3.errToObj(message) - }); - } - max(maxLength, message) { - return this._addCheck({ - kind: "max", - value: maxLength, - ...errorUtil3.errToObj(message) - }); - } - length(len, message) { - return this._addCheck({ - kind: "length", - value: len, - ...errorUtil3.errToObj(message) - }); - } - /** - * Equivalent to `.min(1)` - */ - nonempty(message) { - return this.min(1, errorUtil3.errToObj(message)); - } - trim() { - return new ZodString4({ - ...this._def, - checks: [...this._def.checks, { kind: "trim" }] - }); - } - toLowerCase() { - return new ZodString4({ - ...this._def, - checks: [...this._def.checks, { kind: "toLowerCase" }] - }); - } - toUpperCase() { - return new ZodString4({ - ...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; - } -}; -ZodString3.create = (params) => { - return new ZodString3({ - checks: [], - typeName: ZodFirstPartyTypeKind3.ZodString, - coerce: params?.coerce ?? false, - ...processCreateParams4(params) +var $ZodBase64URL3 = /* @__PURE__ */ $constructor3("$ZodBase64URL", (inst, def$30) => { + def$30.pattern ?? (def$30.pattern = base64url4); + $ZodStringFormat3.init(inst, def$30); + inst._zod.onattach.push((inst$1) => { + inst$1._zod.bag.contentEncoding = "base64url"; }); -}; -function floatSafeRemainder3(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; + inst._zod.check = (payload) => { + if (isValidBase64URL3(payload.value)) return; + payload.issues.push({ + code: "invalid_format", + format: "base64url", + input: payload.value, + inst, + continue: !def$30.abort + }); + }; +}); +var $ZodE1643 = /* @__PURE__ */ $constructor3("$ZodE164", (inst, def$30) => { + def$30.pattern ?? (def$30.pattern = e1644); + $ZodStringFormat3.init(inst, def$30); +}); +function isValidJWT5(token, algorithm = null) { + try { + const tokensParts = token.split("."); + if (tokensParts.length !== 3) return false; + const [header] = tokensParts; + if (!header) return false; + const parsedHeader = JSON.parse(atob(header)); + if ("typ" in parsedHeader && parsedHeader?.typ !== "JWT") return false; + if (!parsedHeader.alg) return false; + if (algorithm && (!("alg" in parsedHeader) || parsedHeader.alg !== algorithm)) return false; + return true; + } catch { + return false; + } } -var ZodNumber3 = class ZodNumber4 extends ZodType3 { - 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); - if (this._getType(input) !== ZodParsedType3.number) { - const ctx$1 = this._getOrReturnCtx(input); - addIssueToContext3(ctx$1, { - code: ZodIssueCode3.invalid_type, - expected: ZodParsedType3.number, - received: ctx$1.parsedType - }); - return INVALID3; +var $ZodJWT3 = /* @__PURE__ */ $constructor3("$ZodJWT", (inst, def$30) => { + $ZodStringFormat3.init(inst, def$30); + inst._zod.check = (payload) => { + if (isValidJWT5(payload.value, def$30.alg)) return; + payload.issues.push({ + code: "invalid_format", + format: "jwt", + input: payload.value, + inst, + continue: !def$30.abort + }); + }; +}); +var $ZodNumber3 = /* @__PURE__ */ $constructor3("$ZodNumber", (inst, def$30) => { + $ZodType3.init(inst, def$30); + inst._zod.pattern = inst._zod.bag.pattern ?? number$1; + inst._zod.parse = (payload, _ctx) => { + if (def$30.coerce) try { + payload.value = Number(payload.value); + } catch (_$1) { } - let ctx = void 0; - const status$1 = new ParseStatus3(); - for (const check of this._def.checks) if (check.kind === "int") { - if (!util$6.isInteger(input.data)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext3(ctx, { - code: ZodIssueCode3.invalid_type, - expected: "integer", - received: "float", - message: check.message - }); - status$1.dirty(); - } - } else if (check.kind === "min") { - if (check.inclusive ? input.data < check.value : input.data <= check.value) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext3(ctx, { - code: ZodIssueCode3.too_small, - minimum: check.value, - type: "number", - inclusive: check.inclusive, - exact: false, - message: check.message - }); - status$1.dirty(); - } - } else if (check.kind === "max") { - if (check.inclusive ? input.data > check.value : input.data >= check.value) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext3(ctx, { - code: ZodIssueCode3.too_big, - maximum: check.value, - type: "number", - inclusive: check.inclusive, - exact: false, - message: check.message - }); - status$1.dirty(); - } - } else if (check.kind === "multipleOf") { - if (floatSafeRemainder3(input.data, check.value) !== 0) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext3(ctx, { - code: ZodIssueCode3.not_multiple_of, - multipleOf: check.value, - message: check.message - }); - status$1.dirty(); - } - } else if (check.kind === "finite") { - if (!Number.isFinite(input.data)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext3(ctx, { - code: ZodIssueCode3.not_finite, - message: check.message - }); - status$1.dirty(); - } - } else util$6.assertNever(check); - return { - status: status$1.value, - value: input.data - }; - } - gte(value2, message) { - return this.setLimit("min", value2, true, errorUtil3.toString(message)); - } - gt(value2, message) { - return this.setLimit("min", value2, false, errorUtil3.toString(message)); - } - lte(value2, message) { - return this.setLimit("max", value2, true, errorUtil3.toString(message)); - } - lt(value2, message) { - return this.setLimit("max", value2, false, errorUtil3.toString(message)); - } - setLimit(kind, value2, inclusive, message) { - return new ZodNumber4({ - ...this._def, - checks: [...this._def.checks, { - kind, - value: value2, - inclusive, - message: errorUtil3.toString(message) - }] + const input = payload.value; + if (typeof input === "number" && !Number.isNaN(input) && Number.isFinite(input)) return payload; + const received = typeof input === "number" ? Number.isNaN(input) ? "NaN" : !Number.isFinite(input) ? "Infinity" : void 0 : void 0; + payload.issues.push({ + expected: "number", + code: "invalid_type", + input, + inst, + ...received ? { received } : {} }); - } - _addCheck(check) { - return new ZodNumber4({ - ...this._def, - checks: [...this._def.checks, check] - }); - } - int(message) { - return this._addCheck({ - kind: "int", - message: errorUtil3.toString(message) - }); - } - positive(message) { - return this._addCheck({ - kind: "min", - value: 0, - inclusive: false, - message: errorUtil3.toString(message) - }); - } - negative(message) { - return this._addCheck({ - kind: "max", - value: 0, - inclusive: false, - message: errorUtil3.toString(message) - }); - } - nonpositive(message) { - return this._addCheck({ - kind: "max", - value: 0, - inclusive: true, - message: errorUtil3.toString(message) - }); - } - nonnegative(message) { - return this._addCheck({ - kind: "min", - value: 0, - inclusive: true, - message: errorUtil3.toString(message) - }); - } - multipleOf(value2, message) { - return this._addCheck({ - kind: "multipleOf", - value: value2, - message: errorUtil3.toString(message) - }); - } - finite(message) { - return this._addCheck({ - kind: "finite", - message: errorUtil3.toString(message) - }); - } - safe(message) { - return this._addCheck({ - kind: "min", - inclusive: true, - value: Number.MIN_SAFE_INTEGER, - message: errorUtil3.toString(message) - })._addCheck({ - kind: "max", - inclusive: true, - value: Number.MAX_SAFE_INTEGER, - message: errorUtil3.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 payload; + }; +}); +var $ZodNumberFormat3 = /* @__PURE__ */ $constructor3("$ZodNumber", (inst, def$30) => { + $ZodCheckNumberFormat3.init(inst, def$30); + $ZodNumber3.init(inst, def$30); +}); +var $ZodBoolean3 = /* @__PURE__ */ $constructor3("$ZodBoolean", (inst, def$30) => { + $ZodType3.init(inst, def$30); + inst._zod.pattern = boolean$1; + inst._zod.parse = (payload, _ctx) => { + if (def$30.coerce) try { + payload.value = Boolean(payload.value); + } catch (_$1) { } - 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" && util$6.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); - } -}; -ZodNumber3.create = (params) => { - return new ZodNumber3({ - checks: [], - typeName: ZodFirstPartyTypeKind3.ZodNumber, - coerce: params?.coerce || false, - ...processCreateParams4(params) - }); -}; -var ZodBigInt3 = class ZodBigInt4 extends ZodType3 { - 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); - } - if (this._getType(input) !== ZodParsedType3.bigint) return this._getInvalidInput(input); - let ctx = void 0; - const status$1 = new ParseStatus3(); - for (const check of this._def.checks) if (check.kind === "min") { - if (check.inclusive ? input.data < check.value : input.data <= check.value) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext3(ctx, { - code: ZodIssueCode3.too_small, - type: "bigint", - minimum: check.value, - inclusive: check.inclusive, - message: check.message - }); - status$1.dirty(); - } - } else if (check.kind === "max") { - if (check.inclusive ? input.data > check.value : input.data >= check.value) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext3(ctx, { - code: ZodIssueCode3.too_big, - type: "bigint", - maximum: check.value, - inclusive: check.inclusive, - message: check.message - }); - status$1.dirty(); - } - } else if (check.kind === "multipleOf") { - if (input.data % check.value !== BigInt(0)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext3(ctx, { - code: ZodIssueCode3.not_multiple_of, - multipleOf: check.value, - message: check.message - }); - status$1.dirty(); - } - } else util$6.assertNever(check); - return { - status: status$1.value, - value: input.data - }; - } - _getInvalidInput(input) { - const ctx = this._getOrReturnCtx(input); - addIssueToContext3(ctx, { - code: ZodIssueCode3.invalid_type, - expected: ZodParsedType3.bigint, - received: ctx.parsedType + const input = payload.value; + if (typeof input === "boolean") return payload; + payload.issues.push({ + expected: "boolean", + code: "invalid_type", + input, + inst }); - return INVALID3; - } - gte(value2, message) { - return this.setLimit("min", value2, true, errorUtil3.toString(message)); - } - gt(value2, message) { - return this.setLimit("min", value2, false, errorUtil3.toString(message)); - } - lte(value2, message) { - return this.setLimit("max", value2, true, errorUtil3.toString(message)); - } - lt(value2, message) { - return this.setLimit("max", value2, false, errorUtil3.toString(message)); - } - setLimit(kind, value2, inclusive, message) { - return new ZodBigInt4({ - ...this._def, - checks: [...this._def.checks, { - kind, - value: value2, - inclusive, - message: errorUtil3.toString(message) - }] + return payload; + }; +}); +var $ZodNull3 = /* @__PURE__ */ $constructor3("$ZodNull", (inst, def$30) => { + $ZodType3.init(inst, def$30); + inst._zod.pattern = _null$2; + inst._zod.values = /* @__PURE__ */ new Set([null]); + inst._zod.parse = (payload, _ctx) => { + const input = payload.value; + if (input === null) return payload; + payload.issues.push({ + expected: "null", + code: "invalid_type", + input, + inst }); - } - _addCheck(check) { - return new ZodBigInt4({ - ...this._def, - checks: [...this._def.checks, check] + return payload; + }; +}); +var $ZodAny2 = /* @__PURE__ */ $constructor3("$ZodAny", (inst, def$30) => { + $ZodType3.init(inst, def$30); + inst._zod.parse = (payload) => payload; +}); +var $ZodUnknown3 = /* @__PURE__ */ $constructor3("$ZodUnknown", (inst, def$30) => { + $ZodType3.init(inst, def$30); + inst._zod.parse = (payload) => payload; +}); +var $ZodNever3 = /* @__PURE__ */ $constructor3("$ZodNever", (inst, def$30) => { + $ZodType3.init(inst, def$30); + inst._zod.parse = (payload, _ctx) => { + payload.issues.push({ + expected: "never", + code: "invalid_type", + input: payload.value, + inst }); - } - positive(message) { - return this._addCheck({ - kind: "min", - value: BigInt(0), - inclusive: false, - message: errorUtil3.toString(message) - }); - } - negative(message) { - return this._addCheck({ - kind: "max", - value: BigInt(0), - inclusive: false, - message: errorUtil3.toString(message) - }); - } - nonpositive(message) { - return this._addCheck({ - kind: "max", - value: BigInt(0), - inclusive: true, - message: errorUtil3.toString(message) - }); - } - nonnegative(message) { - return this._addCheck({ - kind: "min", - value: BigInt(0), - inclusive: true, - message: errorUtil3.toString(message) - }); - } - multipleOf(value2, message) { - return this._addCheck({ - kind: "multipleOf", - value: value2, - message: errorUtil3.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; - } -}; -ZodBigInt3.create = (params) => { - return new ZodBigInt3({ - checks: [], - typeName: ZodFirstPartyTypeKind3.ZodBigInt, - coerce: params?.coerce ?? false, - ...processCreateParams4(params) - }); -}; -var ZodBoolean3 = class extends ZodType3 { - _parse(input) { - if (this._def.coerce) input.data = Boolean(input.data); - if (this._getType(input) !== ZodParsedType3.boolean) { - const ctx = this._getOrReturnCtx(input); - addIssueToContext3(ctx, { - code: ZodIssueCode3.invalid_type, - expected: ZodParsedType3.boolean, - received: ctx.parsedType - }); - return INVALID3; - } - return OK3(input.data); - } -}; -ZodBoolean3.create = (params) => { - return new ZodBoolean3({ - typeName: ZodFirstPartyTypeKind3.ZodBoolean, - coerce: params?.coerce || false, - ...processCreateParams4(params) - }); -}; -var ZodDate3 = class ZodDate4 extends ZodType3 { - _parse(input) { - if (this._def.coerce) input.data = new Date(input.data); - if (this._getType(input) !== ZodParsedType3.date) { - const ctx$1 = this._getOrReturnCtx(input); - addIssueToContext3(ctx$1, { - code: ZodIssueCode3.invalid_type, - expected: ZodParsedType3.date, - received: ctx$1.parsedType - }); - return INVALID3; - } - if (Number.isNaN(input.data.getTime())) { - const ctx$1 = this._getOrReturnCtx(input); - addIssueToContext3(ctx$1, { code: ZodIssueCode3.invalid_date }); - return INVALID3; - } - const status$1 = new ParseStatus3(); - 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); - addIssueToContext3(ctx, { - code: ZodIssueCode3.too_small, - message: check.message, - inclusive: true, - exact: false, - minimum: check.value, - type: "date" - }); - status$1.dirty(); - } - } else if (check.kind === "max") { - if (input.data.getTime() > check.value) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext3(ctx, { - code: ZodIssueCode3.too_big, - message: check.message, - inclusive: true, - exact: false, - maximum: check.value, - type: "date" - }); - status$1.dirty(); - } - } else util$6.assertNever(check); - return { - status: status$1.value, - value: new Date(input.data.getTime()) - }; - } - _addCheck(check) { - return new ZodDate4({ - ...this._def, - checks: [...this._def.checks, check] - }); - } - min(minDate, message) { - return this._addCheck({ - kind: "min", - value: minDate.getTime(), - message: errorUtil3.toString(message) - }); - } - max(maxDate, message) { - return this._addCheck({ - kind: "max", - value: maxDate.getTime(), - message: errorUtil3.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; - } -}; -ZodDate3.create = (params) => { - return new ZodDate3({ - checks: [], - coerce: params?.coerce || false, - typeName: ZodFirstPartyTypeKind3.ZodDate, - ...processCreateParams4(params) - }); -}; -var ZodSymbol3 = class extends ZodType3 { - _parse(input) { - if (this._getType(input) !== ZodParsedType3.symbol) { - const ctx = this._getOrReturnCtx(input); - addIssueToContext3(ctx, { - code: ZodIssueCode3.invalid_type, - expected: ZodParsedType3.symbol, - received: ctx.parsedType - }); - return INVALID3; - } - return OK3(input.data); - } -}; -ZodSymbol3.create = (params) => { - return new ZodSymbol3({ - typeName: ZodFirstPartyTypeKind3.ZodSymbol, - ...processCreateParams4(params) - }); -}; -var ZodUndefined3 = class extends ZodType3 { - _parse(input) { - if (this._getType(input) !== ZodParsedType3.undefined) { - const ctx = this._getOrReturnCtx(input); - addIssueToContext3(ctx, { - code: ZodIssueCode3.invalid_type, - expected: ZodParsedType3.undefined, - received: ctx.parsedType - }); - return INVALID3; - } - return OK3(input.data); - } -}; -ZodUndefined3.create = (params) => { - return new ZodUndefined3({ - typeName: ZodFirstPartyTypeKind3.ZodUndefined, - ...processCreateParams4(params) - }); -}; -var ZodNull3 = class extends ZodType3 { - _parse(input) { - if (this._getType(input) !== ZodParsedType3.null) { - const ctx = this._getOrReturnCtx(input); - addIssueToContext3(ctx, { - code: ZodIssueCode3.invalid_type, - expected: ZodParsedType3.null, - received: ctx.parsedType - }); - return INVALID3; - } - return OK3(input.data); - } -}; -ZodNull3.create = (params) => { - return new ZodNull3({ - typeName: ZodFirstPartyTypeKind3.ZodNull, - ...processCreateParams4(params) - }); -}; -var ZodAny3 = class extends ZodType3 { - constructor() { - super(...arguments); - this._any = true; - } - _parse(input) { - return OK3(input.data); - } -}; -ZodAny3.create = (params) => { - return new ZodAny3({ - typeName: ZodFirstPartyTypeKind3.ZodAny, - ...processCreateParams4(params) - }); -}; -var ZodUnknown3 = class extends ZodType3 { - constructor() { - super(...arguments); - this._unknown = true; - } - _parse(input) { - return OK3(input.data); - } -}; -ZodUnknown3.create = (params) => { - return new ZodUnknown3({ - typeName: ZodFirstPartyTypeKind3.ZodUnknown, - ...processCreateParams4(params) - }); -}; -var ZodNever3 = class extends ZodType3 { - _parse(input) { - const ctx = this._getOrReturnCtx(input); - addIssueToContext3(ctx, { - code: ZodIssueCode3.invalid_type, - expected: ZodParsedType3.never, - received: ctx.parsedType - }); - return INVALID3; - } -}; -ZodNever3.create = (params) => { - return new ZodNever3({ - typeName: ZodFirstPartyTypeKind3.ZodNever, - ...processCreateParams4(params) - }); -}; -var ZodVoid3 = class extends ZodType3 { - _parse(input) { - if (this._getType(input) !== ZodParsedType3.undefined) { - const ctx = this._getOrReturnCtx(input); - addIssueToContext3(ctx, { - code: ZodIssueCode3.invalid_type, - expected: ZodParsedType3.void, - received: ctx.parsedType - }); - return INVALID3; - } - return OK3(input.data); - } -}; -ZodVoid3.create = (params) => { - return new ZodVoid3({ - typeName: ZodFirstPartyTypeKind3.ZodVoid, - ...processCreateParams4(params) - }); -}; -var ZodArray3 = class ZodArray4 extends ZodType3 { - _parse(input) { - const { ctx, status: status$1 } = this._processInputParams(input); - const def = this._def; - if (ctx.parsedType !== ZodParsedType3.array) { - addIssueToContext3(ctx, { - code: ZodIssueCode3.invalid_type, - expected: ZodParsedType3.array, - received: ctx.parsedType - }); - return INVALID3; - } - if (def.exactLength !== null) { - const tooBig = ctx.data.length > def.exactLength.value; - const tooSmall = ctx.data.length < def.exactLength.value; - if (tooBig || tooSmall) { - addIssueToContext3(ctx, { - code: tooBig ? ZodIssueCode3.too_big : ZodIssueCode3.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$1.dirty(); - } - } - if (def.minLength !== null) { - if (ctx.data.length < def.minLength.value) { - addIssueToContext3(ctx, { - code: ZodIssueCode3.too_small, - minimum: def.minLength.value, - type: "array", - inclusive: true, - exact: false, - message: def.minLength.message - }); - status$1.dirty(); - } - } - if (def.maxLength !== null) { - if (ctx.data.length > def.maxLength.value) { - addIssueToContext3(ctx, { - code: ZodIssueCode3.too_big, - maximum: def.maxLength.value, - type: "array", - inclusive: true, - exact: false, - message: def.maxLength.message - }); - status$1.dirty(); - } - } - if (ctx.common.async) return Promise.all([...ctx.data].map((item, i$3) => { - return def.type._parseAsync(new ParseInputLazyPath3(ctx, item, ctx.path, i$3)); - })).then((result$1) => { - return ParseStatus3.mergeArray(status$1, result$1); - }); - const result = [...ctx.data].map((item, i$3) => { - return def.type._parseSync(new ParseInputLazyPath3(ctx, item, ctx.path, i$3)); - }); - return ParseStatus3.mergeArray(status$1, result); - } - get element() { - return this._def.type; - } - min(minLength, message) { - return new ZodArray4({ - ...this._def, - minLength: { - value: minLength, - message: errorUtil3.toString(message) - } - }); - } - max(maxLength, message) { - return new ZodArray4({ - ...this._def, - maxLength: { - value: maxLength, - message: errorUtil3.toString(message) - } - }); - } - length(len, message) { - return new ZodArray4({ - ...this._def, - exactLength: { - value: len, - message: errorUtil3.toString(message) - } - }); - } - nonempty(message) { - return this.min(1, message); - } -}; -ZodArray3.create = (schema2, params) => { - return new ZodArray3({ - type: schema2, - minLength: null, - maxLength: null, - exactLength: null, - typeName: ZodFirstPartyTypeKind3.ZodArray, - ...processCreateParams4(params) - }); -}; -function deepPartialify3(schema2) { - if (schema2 instanceof ZodObject3) { - const newShape = {}; - for (const key$1 in schema2.shape) { - const fieldSchema = schema2.shape[key$1]; - newShape[key$1] = ZodOptional3.create(deepPartialify3(fieldSchema)); - } - return new ZodObject3({ - ...schema2._def, - shape: () => newShape - }); - } else if (schema2 instanceof ZodArray3) return new ZodArray3({ - ...schema2._def, - type: deepPartialify3(schema2.element) - }); - else if (schema2 instanceof ZodOptional3) return ZodOptional3.create(deepPartialify3(schema2.unwrap())); - else if (schema2 instanceof ZodNullable3) return ZodNullable3.create(deepPartialify3(schema2.unwrap())); - else if (schema2 instanceof ZodTuple3) return ZodTuple3.create(schema2.items.map((item) => deepPartialify3(item))); - else return schema2; + return payload; + }; +}); +function handleArrayResult3(result, final, index) { + if (result.issues.length) final.issues.push(...prefixIssues3(index, result.issues)); + final.value[index] = result.value; } -var ZodObject3 = class ZodObject4 extends ZodType3 { - 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 = util$6.objectKeys(shape); - this._cached = { - shape, - keys +var $ZodArray3 = /* @__PURE__ */ $constructor3("$ZodArray", (inst, def$30) => { + $ZodType3.init(inst, def$30); + inst._zod.parse = (payload, ctx) => { + const input = payload.value; + if (!Array.isArray(input)) { + payload.issues.push({ + expected: "array", + code: "invalid_type", + input, + inst + }); + return payload; + } + payload.value = Array(input.length); + const proms = []; + for (let i$3 = 0; i$3 < input.length; i$3++) { + const item = input[i$3]; + const result = def$30.element._zod.run({ + value: item, + issues: [] + }, ctx); + if (result instanceof Promise) proms.push(result.then((result$1) => handleArrayResult3(result$1, payload, i$3))); + else handleArrayResult3(result, payload, i$3); + } + if (proms.length) return Promise.all(proms).then(() => payload); + return payload; + }; +}); +function handleObjectResult2(result, final, key$1) { + if (result.issues.length) final.issues.push(...prefixIssues3(key$1, result.issues)); + final.value[key$1] = result.value; +} +function handleOptionalObjectResult2(result, final, key$1, input) { + if (result.issues.length) if (input[key$1] === void 0) if (key$1 in input) final.value[key$1] = void 0; + else final.value[key$1] = result.value; + else final.issues.push(...prefixIssues3(key$1, result.issues)); + else if (result.value === void 0) { + if (key$1 in input) final.value[key$1] = void 0; + } else final.value[key$1] = result.value; +} +var $ZodObject3 = /* @__PURE__ */ $constructor3("$ZodObject", (inst, def$30) => { + $ZodType3.init(inst, def$30); + const _normalized = cached5(() => { + const keys = Object.keys(def$30.shape); + for (const k of keys) if (!(def$30.shape[k] instanceof $ZodType3)) throw new Error(`Invalid element at key "${k}": expected a Zod schema`); + const okeys = optionalKeys3(def$30.shape); + return { + shape: def$30.shape, + keys, + keySet: new Set(keys), + numKeys: keys.length, + optionalKeys: new Set(okeys) }; - return this._cached; - } - _parse(input) { - if (this._getType(input) !== ZodParsedType3.object) { - const ctx$1 = this._getOrReturnCtx(input); - addIssueToContext3(ctx$1, { - code: ZodIssueCode3.invalid_type, - expected: ZodParsedType3.object, - received: ctx$1.parsedType - }); - return INVALID3; + }); + defineLazy3(inst._zod, "propValues", () => { + const shape = def$30.shape; + const propValues = {}; + for (const key$1 in shape) { + const field = shape[key$1]._zod; + if (field.values) { + propValues[key$1] ?? (propValues[key$1] = /* @__PURE__ */ new Set()); + for (const v of field.values) propValues[key$1].add(v); + } } - const { status: status$1, ctx } = this._processInputParams(input); - const { shape, keys: shapeKeys } = this._getCached(); - const extraKeys = []; - if (!(this._def.catchall instanceof ZodNever3 && this._def.unknownKeys === "strip")) { - for (const key$1 in ctx.data) if (!shapeKeys.includes(key$1)) extraKeys.push(key$1); - } - const pairs = []; - for (const key$1 of shapeKeys) { - const keyValidator = shape[key$1]; - const value2 = ctx.data[key$1]; - pairs.push({ - key: { - status: "valid", - value: key$1 - }, - value: keyValidator._parse(new ParseInputLazyPath3(ctx, value2, ctx.path, key$1)), - alwaysSet: key$1 in ctx.data - }); - } - if (this._def.catchall instanceof ZodNever3) { - const unknownKeys = this._def.unknownKeys; - if (unknownKeys === "passthrough") for (const key$1 of extraKeys) pairs.push({ - key: { - status: "valid", - value: key$1 - }, - value: { - status: "valid", - value: ctx.data[key$1] + return propValues; + }); + const generateFastpass = (shape) => { + const doc = new Doc3([ + "shape", + "payload", + "ctx" + ]); + const normalized = _normalized.value; + const parseStr = (key$1) => { + const k = esc3(key$1); + return `shape[${k}]._zod.run({ value: input[${k}], issues: [] }, ctx)`; + }; + doc.write(`const input = payload.value;`); + const ids = /* @__PURE__ */ Object.create(null); + let counter = 0; + for (const key$1 of normalized.keys) ids[key$1] = `key_${counter++}`; + doc.write(`const newResult = {}`); + for (const key$1 of normalized.keys) if (normalized.optionalKeys.has(key$1)) { + const id = ids[key$1]; + doc.write(`const ${id} = ${parseStr(key$1)};`); + const k = esc3(key$1); + doc.write(` + if (${id}.issues.length) { + if (input[${k}] === undefined) { + if (${k} in input) { + newResult[${k}] = undefined; + } + } else { + payload.issues = payload.issues.concat( + ${id}.issues.map((iss) => ({ + ...iss, + path: iss.path ? [${k}, ...iss.path] : [${k}], + })) + ); + } + } else if (${id}.value === undefined) { + if (${k} in input) newResult[${k}] = undefined; + } else { + newResult[${k}] = ${id}.value; } - }); - else if (unknownKeys === "strict") { - if (extraKeys.length > 0) { - addIssueToContext3(ctx, { - code: ZodIssueCode3.unrecognized_keys, - keys: extraKeys - }); - status$1.dirty(); - } - } else if (unknownKeys === "strip") { - } else throw new Error(`Internal ZodObject error: invalid unknownKeys value.`); + `); } else { - const catchall = this._def.catchall; - for (const key$1 of extraKeys) { - const value2 = ctx.data[key$1]; - pairs.push({ - key: { - status: "valid", - value: key$1 - }, - value: catchall._parse(new ParseInputLazyPath3(ctx, value2, ctx.path, key$1)), - alwaysSet: key$1 in ctx.data - }); - } + const id = ids[key$1]; + doc.write(`const ${id} = ${parseStr(key$1)};`); + doc.write(` + if (${id}.issues.length) payload.issues = payload.issues.concat(${id}.issues.map(iss => ({ + ...iss, + path: iss.path ? [${esc3(key$1)}, ...iss.path] : [${esc3(key$1)}] + })));`); + doc.write(`newResult[${esc3(key$1)}] = ${id}.value`); } - if (ctx.common.async) return Promise.resolve().then(async () => { - const syncPairs = []; - for (const pair of pairs) { - const key$1 = await pair.key; - const value2 = await pair.value; - syncPairs.push({ - key: key$1, - value: value2, - alwaysSet: pair.alwaysSet - }); - } - return syncPairs; - }).then((syncPairs) => { - return ParseStatus3.mergeObjectSync(status$1, syncPairs); - }); - else return ParseStatus3.mergeObjectSync(status$1, pairs); - } - get shape() { - return this._def.shape(); - } - strict(message) { - errorUtil3.errToObj; - 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 }; - return { message: defaultError }; - } } : {} - }); - } - strip() { - return new ZodObject4({ - ...this._def, - unknownKeys: "strip" - }); - } - passthrough() { - return new ZodObject4({ - ...this._def, - unknownKeys: "passthrough" - }); - } - extend(augmentation) { - return new ZodObject4({ - ...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) { - return new ZodObject4({ - unknownKeys: merging._def.unknownKeys, - catchall: merging._def.catchall, - shape: () => ({ - ...this._def.shape(), - ...merging._def.shape() - }), - typeName: ZodFirstPartyTypeKind3.ZodObject - }); - } - setKey(key$1, schema2) { - return this.augment({ [key$1]: schema2 }); - } - catchall(index) { - return new ZodObject4({ - ...this._def, - catchall: index - }); - } - pick(mask) { - const shape = {}; - for (const key$1 of util$6.objectKeys(mask)) if (mask[key$1] && this.shape[key$1]) shape[key$1] = this.shape[key$1]; - return new ZodObject4({ - ...this._def, - shape: () => shape - }); - } - omit(mask) { - const shape = {}; - for (const key$1 of util$6.objectKeys(this.shape)) if (!mask[key$1]) shape[key$1] = this.shape[key$1]; - return new ZodObject4({ - ...this._def, - shape: () => shape - }); - } - /** - * @deprecated - */ - deepPartial() { - return deepPartialify3(this); - } - partial(mask) { - const newShape = {}; - for (const key$1 of util$6.objectKeys(this.shape)) { - const fieldSchema = this.shape[key$1]; - if (mask && !mask[key$1]) newShape[key$1] = fieldSchema; - else newShape[key$1] = fieldSchema.optional(); - } - return new ZodObject4({ - ...this._def, - shape: () => newShape - }); - } - required(mask) { - const newShape = {}; - for (const key$1 of util$6.objectKeys(this.shape)) if (mask && !mask[key$1]) newShape[key$1] = this.shape[key$1]; - else { - let newField = this.shape[key$1]; - while (newField instanceof ZodOptional3) newField = newField._def.innerType; - newShape[key$1] = newField; - } - return new ZodObject4({ - ...this._def, - shape: () => newShape - }); - } - keyof() { - return createZodEnum3(util$6.objectKeys(this.shape)); - } -}; -ZodObject3.create = (shape, params) => { - return new ZodObject3({ - shape: () => shape, - unknownKeys: "strip", - catchall: ZodNever3.create(), - typeName: ZodFirstPartyTypeKind3.ZodObject, - ...processCreateParams4(params) - }); -}; -ZodObject3.strictCreate = (shape, params) => { - return new ZodObject3({ - shape: () => shape, - unknownKeys: "strict", - catchall: ZodNever3.create(), - typeName: ZodFirstPartyTypeKind3.ZodObject, - ...processCreateParams4(params) - }); -}; -ZodObject3.lazycreate = (shape, params) => { - return new ZodObject3({ - shape, - unknownKeys: "strip", - catchall: ZodNever3.create(), - typeName: ZodFirstPartyTypeKind3.ZodObject, - ...processCreateParams4(params) - }); -}; -var ZodUnion3 = class extends ZodType3 { - _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 ZodError3(result.ctx.common.issues)); - addIssueToContext3(ctx, { - code: ZodIssueCode3.invalid_union, - unionErrors + doc.write(`payload.value = newResult;`); + doc.write(`return payload;`); + const fn2 = doc.compile(); + return (payload, ctx) => fn2(shape, payload, ctx); + }; + let fastpass; + const isObject$1 = isObject5; + const jit = !globalConfig3.jitless; + const allowsEval$1 = allowsEval3; + const fastEnabled = jit && allowsEval$1.value; + const catchall = def$30.catchall; + let value2; + inst._zod.parse = (payload, ctx) => { + value2 ?? (value2 = _normalized.value); + const input = payload.value; + if (!isObject$1(input)) { + payload.issues.push({ + expected: "object", + code: "invalid_type", + input, + inst }); - return INVALID3; + return payload; } - if (ctx.common.async) return Promise.all(options.map(async (option) => { - const childCtx = { - ...ctx, - common: { - ...ctx.common, + const proms = []; + if (jit && fastEnabled && ctx?.async === false && ctx.jitless !== true) { + if (!fastpass) fastpass = generateFastpass(def$30.shape); + payload = fastpass(payload, ctx); + } else { + payload.value = {}; + const shape = value2.shape; + for (const key$1 of value2.keys) { + const el = shape[key$1]; + const r = el._zod.run({ + value: input[key$1], 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); + }, ctx); + const isOptional = el._zod.optin === "optional" && el._zod.optout === "optional"; + if (r instanceof Promise) proms.push(r.then((r$1) => isOptional ? handleOptionalObjectResult2(r$1, payload, key$1, input) : handleObjectResult2(r$1, payload, key$1))); + else if (isOptional) handleOptionalObjectResult2(r, payload, key$1, input); + else handleObjectResult2(r, payload, key$1); } - if (dirty) { - ctx.common.issues.push(...dirty.ctx.common.issues); - return dirty.result; - } - const unionErrors = issues.map((issues$1) => new ZodError3(issues$1)); - addIssueToContext3(ctx, { - code: ZodIssueCode3.invalid_union, - unionErrors - }); - return INVALID3; } + if (!catchall) return proms.length ? Promise.all(proms).then(() => payload) : payload; + const unrecognized = []; + const keySet = value2.keySet; + const _catchall = catchall._zod; + const t = _catchall.def.type; + for (const key$1 of Object.keys(input)) { + if (keySet.has(key$1)) continue; + if (t === "never") { + unrecognized.push(key$1); + continue; + } + const r = _catchall.run({ + value: input[key$1], + issues: [] + }, ctx); + if (r instanceof Promise) proms.push(r.then((r$1) => handleObjectResult2(r$1, payload, key$1))); + else handleObjectResult2(r, payload, key$1); + } + if (unrecognized.length) payload.issues.push({ + code: "unrecognized_keys", + keys: unrecognized, + input, + inst + }); + if (!proms.length) return payload; + return Promise.all(proms).then(() => { + return payload; + }); + }; +}); +function handleUnionResults3(results, final, inst, ctx) { + for (const result of results) if (result.issues.length === 0) { + final.value = result.value; + return final; } - get options() { - return this._def.options; - } -}; -ZodUnion3.create = (types, params) => { - return new ZodUnion3({ - options: types, - typeName: ZodFirstPartyTypeKind3.ZodUnion, - ...processCreateParams4(params) + final.issues.push({ + code: "invalid_union", + input: final.value, + inst, + errors: results.map((result) => result.issues.map((iss) => finalizeIssue3(iss, ctx, config3()))) }); -}; -var getDiscriminator3 = (type2) => { - if (type2 instanceof ZodLazy3) return getDiscriminator3(type2.schema); - else if (type2 instanceof ZodEffects3) return getDiscriminator3(type2.innerType()); - else if (type2 instanceof ZodLiteral3) return [type2.value]; - else if (type2 instanceof ZodEnum3) return type2.options; - else if (type2 instanceof ZodNativeEnum3) return util$6.objectValues(type2.enum); - else if (type2 instanceof ZodDefault3) return getDiscriminator3(type2._def.innerType); - else if (type2 instanceof ZodUndefined3) return [void 0]; - else if (type2 instanceof ZodNull3) return [null]; - else if (type2 instanceof ZodOptional3) return [void 0, ...getDiscriminator3(type2.unwrap())]; - else if (type2 instanceof ZodNullable3) return [null, ...getDiscriminator3(type2.unwrap())]; - else if (type2 instanceof ZodBranded3) return getDiscriminator3(type2.unwrap()); - else if (type2 instanceof ZodReadonly3) return getDiscriminator3(type2.unwrap()); - else if (type2 instanceof ZodCatch3) return getDiscriminator3(type2._def.innerType); - else return []; -}; -var ZodDiscriminatedUnion3 = class ZodDiscriminatedUnion4 extends ZodType3 { - _parse(input) { - const { ctx } = this._processInputParams(input); - if (ctx.parsedType !== ZodParsedType3.object) { - addIssueToContext3(ctx, { - code: ZodIssueCode3.invalid_type, - expected: ZodParsedType3.object, - received: ctx.parsedType - }); - return INVALID3; + return final; +} +var $ZodUnion3 = /* @__PURE__ */ $constructor3("$ZodUnion", (inst, def$30) => { + $ZodType3.init(inst, def$30); + defineLazy3(inst._zod, "optin", () => def$30.options.some((o) => o._zod.optin === "optional") ? "optional" : void 0); + defineLazy3(inst._zod, "optout", () => def$30.options.some((o) => o._zod.optout === "optional") ? "optional" : void 0); + defineLazy3(inst._zod, "values", () => { + if (def$30.options.every((o) => o._zod.values)) return new Set(def$30.options.flatMap((option) => Array.from(option._zod.values))); + }); + defineLazy3(inst._zod, "pattern", () => { + if (def$30.options.every((o) => o._zod.pattern)) { + const patterns = def$30.options.map((o) => o._zod.pattern); + return /* @__PURE__ */ new RegExp(`^(${patterns.map((p) => cleanRegex3(p.source)).join("|")})$`); } - const discriminator = this.discriminator; - const discriminatorValue = ctx.data[discriminator]; - const option = this.optionsMap.get(discriminatorValue); - if (!option) { - addIssueToContext3(ctx, { - code: ZodIssueCode3.invalid_union_discriminator, - options: Array.from(this.optionsMap.keys()), - path: [discriminator] - }); - return INVALID3; - } - 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 = getDiscriminator3(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); + }); + inst._zod.parse = (payload, ctx) => { + let async = false; + const results = []; + for (const option of def$30.options) { + const result = option._zod.run({ + value: payload.value, + issues: [] + }, ctx); + if (result instanceof Promise) { + results.push(result); + async = true; + } else { + if (result.issues.length === 0) return result; + results.push(result); } } - return new ZodDiscriminatedUnion4({ - typeName: ZodFirstPartyTypeKind3.ZodDiscriminatedUnion, - discriminator, - options, - optionsMap, - ...processCreateParams4(params) + if (!async) return handleUnionResults3(results, payload, inst, ctx); + return Promise.all(results).then((results$1) => { + return handleUnionResults3(results$1, payload, inst, ctx); }); - } -}; -function mergeValues3(a, b) { - const aType = getParsedType3(a); - const bType = getParsedType3(b); + }; +}); +var $ZodDiscriminatedUnion3 = /* @__PURE__ */ $constructor3("$ZodDiscriminatedUnion", (inst, def$30) => { + $ZodUnion3.init(inst, def$30); + const _super = inst._zod.parse; + defineLazy3(inst._zod, "propValues", () => { + const propValues = {}; + for (const option of def$30.options) { + const pv = option._zod.propValues; + if (!pv || Object.keys(pv).length === 0) throw new Error(`Invalid discriminated union option at index "${def$30.options.indexOf(option)}"`); + for (const [k, v] of Object.entries(pv)) { + if (!propValues[k]) propValues[k] = /* @__PURE__ */ new Set(); + for (const val of v) propValues[k].add(val); + } + } + return propValues; + }); + const disc = cached5(() => { + const opts = def$30.options; + const map$1 = /* @__PURE__ */ new Map(); + for (const o of opts) { + const values = o._zod.propValues[def$30.discriminator]; + if (!values || values.size === 0) throw new Error(`Invalid discriminated union option at index "${def$30.options.indexOf(o)}"`); + for (const v of values) { + if (map$1.has(v)) throw new Error(`Duplicate discriminator value "${String(v)}"`); + map$1.set(v, o); + } + } + return map$1; + }); + inst._zod.parse = (payload, ctx) => { + const input = payload.value; + if (!isObject5(input)) { + payload.issues.push({ + code: "invalid_type", + expected: "object", + input, + inst + }); + return payload; + } + const opt = disc.value.get(input?.[def$30.discriminator]); + if (opt) return opt._zod.run(payload, ctx); + if (def$30.unionFallback) return _super(payload, ctx); + payload.issues.push({ + code: "invalid_union", + errors: [], + note: "No matching discriminator", + input, + path: [def$30.discriminator], + inst + }); + return payload; + }; +}); +var $ZodIntersection3 = /* @__PURE__ */ $constructor3("$ZodIntersection", (inst, def$30) => { + $ZodType3.init(inst, def$30); + inst._zod.parse = (payload, ctx) => { + const input = payload.value; + const left = def$30.left._zod.run({ + value: input, + issues: [] + }, ctx); + const right = def$30.right._zod.run({ + value: input, + issues: [] + }, ctx); + if (left instanceof Promise || right instanceof Promise) return Promise.all([left, right]).then(([left$1, right$1]) => { + return handleIntersectionResults3(payload, left$1, right$1); + }); + return handleIntersectionResults3(payload, left, right); + }; +}); +function mergeValues5(a, b) { if (a === b) return { valid: true, data: a }; - else if (aType === ZodParsedType3.object && bType === ZodParsedType3.object) { - const bKeys = util$6.objectKeys(b); - const sharedKeys = util$6.objectKeys(a).filter((key$1) => bKeys.indexOf(key$1) !== -1); + if (a instanceof Date && b instanceof Date && +a === +b) return { + valid: true, + data: a + }; + if (isPlainObject$1(a) && isPlainObject$1(b)) { + const bKeys = Object.keys(b); + const sharedKeys = Object.keys(a).filter((key$1) => bKeys.indexOf(key$1) !== -1); const newObj = { ...a, ...b }; for (const key$1 of sharedKeys) { - const sharedValue = mergeValues3(a[key$1], b[key$1]); - if (!sharedValue.valid) return { valid: false }; + const sharedValue = mergeValues5(a[key$1], b[key$1]); + if (!sharedValue.valid) return { + valid: false, + mergeErrorPath: [key$1, ...sharedValue.mergeErrorPath] + }; newObj[key$1] = sharedValue.data; } return { valid: true, data: newObj }; - } else if (aType === ZodParsedType3.array && bType === ZodParsedType3.array) { - if (a.length !== b.length) return { valid: false }; + } + if (Array.isArray(a) && Array.isArray(b)) { + if (a.length !== b.length) return { + valid: false, + mergeErrorPath: [] + }; const newArray = []; for (let index = 0; index < a.length; index++) { const itemA = a[index]; const itemB = b[index]; - const sharedValue = mergeValues3(itemA, itemB); - if (!sharedValue.valid) return { valid: false }; + const sharedValue = mergeValues5(itemA, itemB); + if (!sharedValue.valid) return { + valid: false, + mergeErrorPath: [index, ...sharedValue.mergeErrorPath] + }; newArray.push(sharedValue.data); } return { valid: true, data: newArray }; - } else if (aType === ZodParsedType3.date && bType === ZodParsedType3.date && +a === +b) return { - valid: true, - data: a + } + return { + valid: false, + mergeErrorPath: [] }; - else return { valid: false }; } -var ZodIntersection3 = class extends ZodType3 { - _parse(input) { - const { status: status$1, ctx } = this._processInputParams(input); - const handleParsed = (parsedLeft, parsedRight) => { - if (isAborted3(parsedLeft) || isAborted3(parsedRight)) return INVALID3; - const merged = mergeValues3(parsedLeft.value, parsedRight.value); - if (!merged.valid) { - addIssueToContext3(ctx, { code: ZodIssueCode3.invalid_intersection_types }); - return INVALID3; - } - if (isDirty3(parsedLeft) || isDirty3(parsedRight)) status$1.dirty(); - return { - status: status$1.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 - })); - } -}; -ZodIntersection3.create = (left, right, params) => { - return new ZodIntersection3({ - left, - right, - typeName: ZodFirstPartyTypeKind3.ZodIntersection, - ...processCreateParams4(params) - }); -}; -var ZodTuple3 = class ZodTuple4 extends ZodType3 { - _parse(input) { - const { status: status$1, ctx } = this._processInputParams(input); - if (ctx.parsedType !== ZodParsedType3.array) { - addIssueToContext3(ctx, { - code: ZodIssueCode3.invalid_type, - expected: ZodParsedType3.array, - received: ctx.parsedType +function handleIntersectionResults3(result, left, right) { + if (left.issues.length) result.issues.push(...left.issues); + if (right.issues.length) result.issues.push(...right.issues); + if (aborted3(result)) return result; + const merged = mergeValues5(left.value, right.value); + if (!merged.valid) throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(merged.mergeErrorPath)}`); + result.value = merged.data; + return result; +} +var $ZodRecord3 = /* @__PURE__ */ $constructor3("$ZodRecord", (inst, def$30) => { + $ZodType3.init(inst, def$30); + inst._zod.parse = (payload, ctx) => { + const input = payload.value; + if (!isPlainObject$1(input)) { + payload.issues.push({ + expected: "record", + code: "invalid_type", + input, + inst }); - return INVALID3; + return payload; } - if (ctx.data.length < this._def.items.length) { - addIssueToContext3(ctx, { - code: ZodIssueCode3.too_small, - minimum: this._def.items.length, - inclusive: true, - exact: false, - type: "array" - }); - return INVALID3; - } - if (!this._def.rest && ctx.data.length > this._def.items.length) { - addIssueToContext3(ctx, { - code: ZodIssueCode3.too_big, - maximum: this._def.items.length, - inclusive: true, - exact: false, - type: "array" - }); - status$1.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 ParseInputLazyPath3(ctx, item, ctx.path, itemIndex)); - }).filter((x) => !!x); - if (ctx.common.async) return Promise.all(items).then((results) => { - return ParseStatus3.mergeArray(status$1, results); - }); - else return ParseStatus3.mergeArray(status$1, items); - } - get items() { - return this._def.items; - } - rest(rest) { - return new ZodTuple4({ - ...this._def, - rest - }); - } -}; -ZodTuple3.create = (schemas, params) => { - if (!Array.isArray(schemas)) throw new Error("You must pass an array of schemas to z.tuple([ ... ])"); - return new ZodTuple3({ - items: schemas, - typeName: ZodFirstPartyTypeKind3.ZodTuple, - rest: null, - ...processCreateParams4(params) - }); -}; -var ZodRecord3 = class ZodRecord4 extends ZodType3 { - get keySchema() { - return this._def.keyType; - } - get valueSchema() { - return this._def.valueType; - } - _parse(input) { - const { status: status$1, ctx } = this._processInputParams(input); - if (ctx.parsedType !== ZodParsedType3.object) { - addIssueToContext3(ctx, { - code: ZodIssueCode3.invalid_type, - expected: ZodParsedType3.object, - received: ctx.parsedType - }); - return INVALID3; - } - const pairs = []; - const keyType = this._def.keyType; - const valueType = this._def.valueType; - for (const key$1 in ctx.data) pairs.push({ - key: keyType._parse(new ParseInputLazyPath3(ctx, key$1, ctx.path, key$1)), - value: valueType._parse(new ParseInputLazyPath3(ctx, ctx.data[key$1], ctx.path, key$1)), - alwaysSet: key$1 in ctx.data - }); - if (ctx.common.async) return ParseStatus3.mergeObjectAsync(status$1, pairs); - else return ParseStatus3.mergeObjectSync(status$1, pairs); - } - get element() { - return this._def.valueType; - } - static create(first, second, third) { - if (second instanceof ZodType3) return new ZodRecord4({ - keyType: first, - valueType: second, - typeName: ZodFirstPartyTypeKind3.ZodRecord, - ...processCreateParams4(third) - }); - return new ZodRecord4({ - keyType: ZodString3.create(), - valueType: first, - typeName: ZodFirstPartyTypeKind3.ZodRecord, - ...processCreateParams4(second) - }); - } -}; -var ZodMap3 = class extends ZodType3 { - get keySchema() { - return this._def.keyType; - } - get valueSchema() { - return this._def.valueType; - } - _parse(input) { - const { status: status$1, ctx } = this._processInputParams(input); - if (ctx.parsedType !== ZodParsedType3.map) { - addIssueToContext3(ctx, { - code: ZodIssueCode3.invalid_type, - expected: ZodParsedType3.map, - received: ctx.parsedType - }); - return INVALID3; - } - const keyType = this._def.keyType; - const valueType = this._def.valueType; - const pairs = [...ctx.data.entries()].map(([key$1, value2], index) => { - return { - key: keyType._parse(new ParseInputLazyPath3(ctx, key$1, ctx.path, [index, "key"])), - value: valueType._parse(new ParseInputLazyPath3(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$1 = await pair.key; - const value2 = await pair.value; - if (key$1.status === "aborted" || value2.status === "aborted") return INVALID3; - if (key$1.status === "dirty" || value2.status === "dirty") status$1.dirty(); - finalMap.set(key$1.value, value2.value); + const proms = []; + if (def$30.keyType._zod.values) { + const values = def$30.keyType._zod.values; + payload.value = {}; + for (const key$1 of values) if (typeof key$1 === "string" || typeof key$1 === "number" || typeof key$1 === "symbol") { + const result = def$30.valueType._zod.run({ + value: input[key$1], + issues: [] + }, ctx); + if (result instanceof Promise) proms.push(result.then((result$1) => { + if (result$1.issues.length) payload.issues.push(...prefixIssues3(key$1, result$1.issues)); + payload.value[key$1] = result$1.value; + })); + else { + if (result.issues.length) payload.issues.push(...prefixIssues3(key$1, result.issues)); + payload.value[key$1] = result.value; } - return { - status: status$1.value, - value: finalMap - }; + } + let unrecognized; + for (const key$1 in input) if (!values.has(key$1)) { + unrecognized = unrecognized ?? []; + unrecognized.push(key$1); + } + if (unrecognized && unrecognized.length > 0) payload.issues.push({ + code: "unrecognized_keys", + input, + inst, + keys: unrecognized }); } else { - const finalMap = /* @__PURE__ */ new Map(); - for (const pair of pairs) { - const key$1 = pair.key; - const value2 = pair.value; - if (key$1.status === "aborted" || value2.status === "aborted") return INVALID3; - if (key$1.status === "dirty" || value2.status === "dirty") status$1.dirty(); - finalMap.set(key$1.value, value2.value); + payload.value = {}; + for (const key$1 of Reflect.ownKeys(input)) { + if (key$1 === "__proto__") continue; + const keyResult = def$30.keyType._zod.run({ + value: key$1, + issues: [] + }, ctx); + if (keyResult instanceof Promise) throw new Error("Async schemas not supported in object keys currently"); + if (keyResult.issues.length) { + payload.issues.push({ + origin: "record", + code: "invalid_key", + issues: keyResult.issues.map((iss) => finalizeIssue3(iss, ctx, config3())), + input: key$1, + path: [key$1], + inst + }); + payload.value[keyResult.value] = keyResult.value; + continue; + } + const result = def$30.valueType._zod.run({ + value: input[key$1], + issues: [] + }, ctx); + if (result instanceof Promise) proms.push(result.then((result$1) => { + if (result$1.issues.length) payload.issues.push(...prefixIssues3(key$1, result$1.issues)); + payload.value[keyResult.value] = result$1.value; + })); + else { + if (result.issues.length) payload.issues.push(...prefixIssues3(key$1, result.issues)); + payload.value[keyResult.value] = result.value; + } } - return { - status: status$1.value, - value: finalMap - }; } - } -}; -ZodMap3.create = (keyType, valueType, params) => { - return new ZodMap3({ - valueType, - keyType, - typeName: ZodFirstPartyTypeKind3.ZodMap, - ...processCreateParams4(params) + if (proms.length) return Promise.all(proms).then(() => payload); + return payload; + }; +}); +var $ZodEnum3 = /* @__PURE__ */ $constructor3("$ZodEnum", (inst, def$30) => { + $ZodType3.init(inst, def$30); + const values = getEnumValues3(def$30.entries); + inst._zod.values = new Set(values); + inst._zod.pattern = /* @__PURE__ */ new RegExp(`^(${values.filter((k) => propertyKeyTypes3.has(typeof k)).map((o) => typeof o === "string" ? escapeRegex3(o) : o.toString()).join("|")})$`); + inst._zod.parse = (payload, _ctx) => { + const input = payload.value; + if (inst._zod.values.has(input)) return payload; + payload.issues.push({ + code: "invalid_value", + values, + input, + inst + }); + return payload; + }; +}); +var $ZodLiteral3 = /* @__PURE__ */ $constructor3("$ZodLiteral", (inst, def$30) => { + $ZodType3.init(inst, def$30); + inst._zod.values = new Set(def$30.values); + inst._zod.pattern = /* @__PURE__ */ new RegExp(`^(${def$30.values.map((o) => typeof o === "string" ? escapeRegex3(o) : o ? o.toString() : String(o)).join("|")})$`); + inst._zod.parse = (payload, _ctx) => { + const input = payload.value; + if (inst._zod.values.has(input)) return payload; + payload.issues.push({ + code: "invalid_value", + values: def$30.values, + input, + inst + }); + return payload; + }; +}); +var $ZodTransform3 = /* @__PURE__ */ $constructor3("$ZodTransform", (inst, def$30) => { + $ZodType3.init(inst, def$30); + inst._zod.parse = (payload, _ctx) => { + const _out = def$30.transform(payload.value, payload); + if (_ctx.async) return (_out instanceof Promise ? _out : Promise.resolve(_out)).then((output) => { + payload.value = output; + return payload; + }); + if (_out instanceof Promise) throw new $ZodAsyncError3(); + payload.value = _out; + return payload; + }; +}); +var $ZodOptional3 = /* @__PURE__ */ $constructor3("$ZodOptional", (inst, def$30) => { + $ZodType3.init(inst, def$30); + inst._zod.optin = "optional"; + inst._zod.optout = "optional"; + defineLazy3(inst._zod, "values", () => { + return def$30.innerType._zod.values ? /* @__PURE__ */ new Set([...def$30.innerType._zod.values, void 0]) : void 0; }); -}; -var ZodSet3 = class ZodSet4 extends ZodType3 { - _parse(input) { - const { status: status$1, ctx } = this._processInputParams(input); - if (ctx.parsedType !== ZodParsedType3.set) { - addIssueToContext3(ctx, { - code: ZodIssueCode3.invalid_type, - expected: ZodParsedType3.set, - received: ctx.parsedType + defineLazy3(inst._zod, "pattern", () => { + const pattern = def$30.innerType._zod.pattern; + return pattern ? /* @__PURE__ */ new RegExp(`^(${cleanRegex3(pattern.source)})?$`) : void 0; + }); + inst._zod.parse = (payload, ctx) => { + if (def$30.innerType._zod.optin === "optional") return def$30.innerType._zod.run(payload, ctx); + if (payload.value === void 0) return payload; + return def$30.innerType._zod.run(payload, ctx); + }; +}); +var $ZodNullable3 = /* @__PURE__ */ $constructor3("$ZodNullable", (inst, def$30) => { + $ZodType3.init(inst, def$30); + defineLazy3(inst._zod, "optin", () => def$30.innerType._zod.optin); + defineLazy3(inst._zod, "optout", () => def$30.innerType._zod.optout); + defineLazy3(inst._zod, "pattern", () => { + const pattern = def$30.innerType._zod.pattern; + return pattern ? /* @__PURE__ */ new RegExp(`^(${cleanRegex3(pattern.source)}|null)$`) : void 0; + }); + defineLazy3(inst._zod, "values", () => { + return def$30.innerType._zod.values ? /* @__PURE__ */ new Set([...def$30.innerType._zod.values, null]) : void 0; + }); + inst._zod.parse = (payload, ctx) => { + if (payload.value === null) return payload; + return def$30.innerType._zod.run(payload, ctx); + }; +}); +var $ZodDefault3 = /* @__PURE__ */ $constructor3("$ZodDefault", (inst, def$30) => { + $ZodType3.init(inst, def$30); + inst._zod.optin = "optional"; + defineLazy3(inst._zod, "values", () => def$30.innerType._zod.values); + inst._zod.parse = (payload, ctx) => { + if (payload.value === void 0) { + payload.value = def$30.defaultValue; + return payload; + } + const result = def$30.innerType._zod.run(payload, ctx); + if (result instanceof Promise) return result.then((result$1) => handleDefaultResult3(result$1, def$30)); + return handleDefaultResult3(result, def$30); + }; +}); +function handleDefaultResult3(payload, def$30) { + if (payload.value === void 0) payload.value = def$30.defaultValue; + return payload; +} +var $ZodPrefault3 = /* @__PURE__ */ $constructor3("$ZodPrefault", (inst, def$30) => { + $ZodType3.init(inst, def$30); + inst._zod.optin = "optional"; + defineLazy3(inst._zod, "values", () => def$30.innerType._zod.values); + inst._zod.parse = (payload, ctx) => { + if (payload.value === void 0) payload.value = def$30.defaultValue; + return def$30.innerType._zod.run(payload, ctx); + }; +}); +var $ZodNonOptional3 = /* @__PURE__ */ $constructor3("$ZodNonOptional", (inst, def$30) => { + $ZodType3.init(inst, def$30); + defineLazy3(inst._zod, "values", () => { + const v = def$30.innerType._zod.values; + return v ? new Set([...v].filter((x) => x !== void 0)) : void 0; + }); + inst._zod.parse = (payload, ctx) => { + const result = def$30.innerType._zod.run(payload, ctx); + if (result instanceof Promise) return result.then((result$1) => handleNonOptionalResult3(result$1, inst)); + return handleNonOptionalResult3(result, inst); + }; +}); +function handleNonOptionalResult3(payload, inst) { + if (!payload.issues.length && payload.value === void 0) payload.issues.push({ + code: "invalid_type", + expected: "nonoptional", + input: payload.value, + inst + }); + return payload; +} +var $ZodCatch3 = /* @__PURE__ */ $constructor3("$ZodCatch", (inst, def$30) => { + $ZodType3.init(inst, def$30); + inst._zod.optin = "optional"; + defineLazy3(inst._zod, "optout", () => def$30.innerType._zod.optout); + defineLazy3(inst._zod, "values", () => def$30.innerType._zod.values); + inst._zod.parse = (payload, ctx) => { + const result = def$30.innerType._zod.run(payload, ctx); + if (result instanceof Promise) return result.then((result$1) => { + payload.value = result$1.value; + if (result$1.issues.length) { + payload.value = def$30.catchValue({ + ...payload, + error: { issues: result$1.issues.map((iss) => finalizeIssue3(iss, ctx, config3())) }, + input: payload.value + }); + payload.issues = []; + } + return payload; + }); + payload.value = result.value; + if (result.issues.length) { + payload.value = def$30.catchValue({ + ...payload, + error: { issues: result.issues.map((iss) => finalizeIssue3(iss, ctx, config3())) }, + input: payload.value }); - return INVALID3; + payload.issues = []; } - const def = this._def; - if (def.minSize !== null) { - if (ctx.data.size < def.minSize.value) { - addIssueToContext3(ctx, { - code: ZodIssueCode3.too_small, - minimum: def.minSize.value, - type: "set", - inclusive: true, - exact: false, - message: def.minSize.message - }); - status$1.dirty(); - } - } - if (def.maxSize !== null) { - if (ctx.data.size > def.maxSize.value) { - addIssueToContext3(ctx, { - code: ZodIssueCode3.too_big, - maximum: def.maxSize.value, - type: "set", - inclusive: true, - exact: false, - message: def.maxSize.message - }); - status$1.dirty(); - } - } - const valueType = this._def.valueType; - function finalizeSet(elements$1) { - const parsedSet = /* @__PURE__ */ new Set(); - for (const element of elements$1) { - if (element.status === "aborted") return INVALID3; - if (element.status === "dirty") status$1.dirty(); - parsedSet.add(element.value); - } - return { - status: status$1.value, - value: parsedSet - }; - } - const elements = [...ctx.data.values()].map((item, i$3) => valueType._parse(new ParseInputLazyPath3(ctx, item, ctx.path, i$3))); - if (ctx.common.async) return Promise.all(elements).then((elements$1) => finalizeSet(elements$1)); - else return finalizeSet(elements); + return payload; + }; +}); +var $ZodPipe3 = /* @__PURE__ */ $constructor3("$ZodPipe", (inst, def$30) => { + $ZodType3.init(inst, def$30); + defineLazy3(inst._zod, "values", () => def$30.in._zod.values); + defineLazy3(inst._zod, "optin", () => def$30.in._zod.optin); + defineLazy3(inst._zod, "optout", () => def$30.out._zod.optout); + inst._zod.parse = (payload, ctx) => { + const left = def$30.in._zod.run(payload, ctx); + if (left instanceof Promise) return left.then((left$1) => handlePipeResult3(left$1, def$30, ctx)); + return handlePipeResult3(left, def$30, ctx); + }; +}); +function handlePipeResult3(left, def$30, ctx) { + if (aborted3(left)) return left; + return def$30.out._zod.run({ + value: left.value, + issues: left.issues + }, ctx); +} +var $ZodReadonly3 = /* @__PURE__ */ $constructor3("$ZodReadonly", (inst, def$30) => { + $ZodType3.init(inst, def$30); + defineLazy3(inst._zod, "propValues", () => def$30.innerType._zod.propValues); + defineLazy3(inst._zod, "values", () => def$30.innerType._zod.values); + defineLazy3(inst._zod, "optin", () => def$30.innerType._zod.optin); + defineLazy3(inst._zod, "optout", () => def$30.innerType._zod.optout); + inst._zod.parse = (payload, ctx) => { + const result = def$30.innerType._zod.run(payload, ctx); + if (result instanceof Promise) return result.then(handleReadonlyResult3); + return handleReadonlyResult3(result); + }; +}); +function handleReadonlyResult3(payload) { + payload.value = Object.freeze(payload.value); + return payload; +} +var $ZodCustom3 = /* @__PURE__ */ $constructor3("$ZodCustom", (inst, def$30) => { + $ZodCheck3.init(inst, def$30); + $ZodType3.init(inst, def$30); + inst._zod.parse = (payload, _$1) => { + return payload; + }; + inst._zod.check = (payload) => { + const input = payload.value; + const r = def$30.fn(input); + if (r instanceof Promise) return r.then((r$1) => handleRefineResult3(r$1, payload, input, inst)); + handleRefineResult3(r, payload, input, inst); + }; +}); +function handleRefineResult3(result, payload, input, inst) { + if (!result) { + const _iss = { + code: "custom", + input, + inst, + path: [...inst._zod.def.path ?? []], + continue: !inst._zod.def.abort + }; + if (inst._zod.def.params) _iss.params = inst._zod.def.params; + payload.issues.push(issue3(_iss)); } - min(minSize, message) { - return new ZodSet4({ - ...this._def, - minSize: { - value: minSize, - message: errorUtil3.toString(message) - } - }); - } - max(maxSize, message) { - return new ZodSet4({ - ...this._def, - maxSize: { - value: maxSize, - message: errorUtil3.toString(message) - } - }); - } - size(size, message) { - return this.min(size, message).max(size, message); - } - nonempty(message) { - return this.min(1, message); - } -}; -ZodSet3.create = (valueType, params) => { - return new ZodSet3({ - valueType, - minSize: null, - maxSize: null, - typeName: ZodFirstPartyTypeKind3.ZodSet, - ...processCreateParams4(params) - }); -}; -var ZodFunction3 = class ZodFunction4 extends ZodType3 { +} +var $ZodRegistry3 = class { constructor() { - super(...arguments); - this.validate = this.implement; + this._map = /* @__PURE__ */ new Map(); + this._idmap = /* @__PURE__ */ new Map(); } - _parse(input) { - const { ctx } = this._processInputParams(input); - if (ctx.parsedType !== ZodParsedType3.function) { - addIssueToContext3(ctx, { - code: ZodIssueCode3.invalid_type, - expected: ZodParsedType3.function, - received: ctx.parsedType - }); - return INVALID3; + add(schema2, ..._meta) { + const meta3 = _meta[0]; + this._map.set(schema2, meta3); + if (meta3 && typeof meta3 === "object" && "id" in meta3) { + if (this._idmap.has(meta3.id)) throw new Error(`ID ${meta3.id} already exists in the registry`); + this._idmap.set(meta3.id, schema2); } - function makeArgsIssue(args3, error41) { - return makeIssue3({ - data: args3, - path: ctx.path, - errorMaps: [ - ctx.common.contextualErrorMap, - ctx.schemaErrorMap, - getErrorMap3(), - en_default3 - ].filter((x) => !!x), - issueData: { - code: ZodIssueCode3.invalid_arguments, - argumentsError: error41 - } - }); - } - function makeReturnsIssue(returns, error41) { - return makeIssue3({ - data: returns, - path: ctx.path, - errorMaps: [ - ctx.common.contextualErrorMap, - ctx.schemaErrorMap, - getErrorMap3(), - en_default3 - ].filter((x) => !!x), - issueData: { - code: ZodIssueCode3.invalid_return_type, - returnTypeError: error41 - } - }); - } - const params = { errorMap: ctx.common.contextualErrorMap }; - const fn2 = ctx.data; - if (this._def.returns instanceof ZodPromise3) { - const me = this; - return OK3(async function(...args3) { - const error41 = new ZodError3([]); - 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); - return await me._def.returns._def.type.parseAsync(result, params).catch((e) => { - error41.addIssue(makeReturnsIssue(result, e)); - throw error41; - }); - }); - } else { - const me = this; - return OK3(function(...args3) { - const parsedArgs = me._def.args.safeParse(args3, params); - if (!parsedArgs.success) throw new ZodError3([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 ZodError3([makeReturnsIssue(result, parsedReturns.error)]); - return parsedReturns.data; - }); + return this; + } + clear() { + this._map = /* @__PURE__ */ new Map(); + this._idmap = /* @__PURE__ */ new Map(); + return this; + } + remove(schema2) { + const meta3 = this._map.get(schema2); + if (meta3 && typeof meta3 === "object" && "id" in meta3) this._idmap.delete(meta3.id); + this._map.delete(schema2); + return this; + } + get(schema2) { + const p = schema2._zod.parent; + if (p) { + const pm = { ...this.get(p) ?? {} }; + delete pm.id; + return { + ...pm, + ...this._map.get(schema2) + }; } + return this._map.get(schema2); } - parameters() { - return this._def.args; - } - returnType() { - return this._def.returns; - } - args(...items) { - return new ZodFunction4({ - ...this._def, - args: ZodTuple3.create(items).rest(ZodUnknown3.create()) - }); - } - returns(returnType) { - return new ZodFunction4({ - ...this._def, - returns: returnType - }); - } - implement(func) { - return this.parse(func); - } - strictImplement(func) { - return this.parse(func); - } - static create(args3, returns, params) { - return new ZodFunction4({ - args: args3 ? args3 : ZodTuple3.create([]).rest(ZodUnknown3.create()), - returns: returns || ZodUnknown3.create(), - typeName: ZodFirstPartyTypeKind3.ZodFunction, - ...processCreateParams4(params) - }); + has(schema2) { + return this._map.has(schema2); } }; -var ZodLazy3 = class extends ZodType3 { - get schema() { - return this._def.getter(); - } - _parse(input) { - const { ctx } = this._processInputParams(input); - return this._def.getter()._parse({ - data: ctx.data, - path: ctx.path, - parent: ctx - }); - } -}; -ZodLazy3.create = (getter, params) => { - return new ZodLazy3({ - getter, - typeName: ZodFirstPartyTypeKind3.ZodLazy, - ...processCreateParams4(params) - }); -}; -var ZodLiteral3 = class extends ZodType3 { - _parse(input) { - if (input.data !== this._def.value) { - const ctx = this._getOrReturnCtx(input); - addIssueToContext3(ctx, { - received: ctx.data, - code: ZodIssueCode3.invalid_literal, - expected: this._def.value - }); - return INVALID3; - } - return { - status: "valid", - value: input.data - }; - } - get value() { - return this._def.value; - } -}; -ZodLiteral3.create = (value2, params) => { - return new ZodLiteral3({ - value: value2, - typeName: ZodFirstPartyTypeKind3.ZodLiteral, - ...processCreateParams4(params) - }); -}; -function createZodEnum3(values, params) { - return new ZodEnum3({ - values, - typeName: ZodFirstPartyTypeKind3.ZodEnum, - ...processCreateParams4(params) +function registry4() { + return new $ZodRegistry3(); +} +var globalRegistry3 = /* @__PURE__ */ registry4(); +function _string3(Class3, params) { + return new Class3({ + type: "string", + ...normalizeParams3(params) }); } -var ZodEnum3 = class ZodEnum4 extends ZodType3 { - _parse(input) { - if (typeof input.data !== "string") { - const ctx = this._getOrReturnCtx(input); - const expectedValues = this._def.values; - addIssueToContext3(ctx, { - expected: util$6.joinValues(expectedValues), - received: ctx.parsedType, - code: ZodIssueCode3.invalid_type - }); - return INVALID3; - } - 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; - addIssueToContext3(ctx, { - received: ctx.data, - code: ZodIssueCode3.invalid_enum_value, - options: expectedValues - }); - return INVALID3; - } - return OK3(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 ZodEnum4.create(values, { - ...this._def, - ...newDef - }); - } - exclude(values, newDef = this._def) { - return ZodEnum4.create(this.options.filter((opt) => !values.includes(opt)), { - ...this._def, - ...newDef - }); - } -}; -ZodEnum3.create = createZodEnum3; -var ZodNativeEnum3 = class extends ZodType3 { - _parse(input) { - const nativeEnumValues = util$6.getValidEnumValues(this._def.values); - const ctx = this._getOrReturnCtx(input); - if (ctx.parsedType !== ZodParsedType3.string && ctx.parsedType !== ZodParsedType3.number) { - const expectedValues = util$6.objectValues(nativeEnumValues); - addIssueToContext3(ctx, { - expected: util$6.joinValues(expectedValues), - received: ctx.parsedType, - code: ZodIssueCode3.invalid_type - }); - return INVALID3; - } - if (!this._cache) this._cache = new Set(util$6.getValidEnumValues(this._def.values)); - if (!this._cache.has(input.data)) { - const expectedValues = util$6.objectValues(nativeEnumValues); - addIssueToContext3(ctx, { - received: ctx.data, - code: ZodIssueCode3.invalid_enum_value, - options: expectedValues - }); - return INVALID3; - } - return OK3(input.data); - } - get enum() { - return this._def.values; - } -}; -ZodNativeEnum3.create = (values, params) => { - return new ZodNativeEnum3({ - values, - typeName: ZodFirstPartyTypeKind3.ZodNativeEnum, - ...processCreateParams4(params) +function _email3(Class3, params) { + return new Class3({ + type: "string", + format: "email", + check: "string_format", + abort: false, + ...normalizeParams3(params) + }); +} +function _guid3(Class3, params) { + return new Class3({ + type: "string", + format: "guid", + check: "string_format", + abort: false, + ...normalizeParams3(params) + }); +} +function _uuid3(Class3, params) { + return new Class3({ + type: "string", + format: "uuid", + check: "string_format", + abort: false, + ...normalizeParams3(params) + }); +} +function _uuidv43(Class3, params) { + return new Class3({ + type: "string", + format: "uuid", + check: "string_format", + abort: false, + version: "v4", + ...normalizeParams3(params) + }); +} +function _uuidv63(Class3, params) { + return new Class3({ + type: "string", + format: "uuid", + check: "string_format", + abort: false, + version: "v6", + ...normalizeParams3(params) + }); +} +function _uuidv73(Class3, params) { + return new Class3({ + type: "string", + format: "uuid", + check: "string_format", + abort: false, + version: "v7", + ...normalizeParams3(params) + }); +} +function _url3(Class3, params) { + return new Class3({ + type: "string", + format: "url", + check: "string_format", + abort: false, + ...normalizeParams3(params) + }); +} +function _emoji5(Class3, params) { + return new Class3({ + type: "string", + format: "emoji", + check: "string_format", + abort: false, + ...normalizeParams3(params) + }); +} +function _nanoid3(Class3, params) { + return new Class3({ + type: "string", + format: "nanoid", + check: "string_format", + abort: false, + ...normalizeParams3(params) + }); +} +function _cuid4(Class3, params) { + return new Class3({ + type: "string", + format: "cuid", + check: "string_format", + abort: false, + ...normalizeParams3(params) + }); +} +function _cuid23(Class3, params) { + return new Class3({ + type: "string", + format: "cuid2", + check: "string_format", + abort: false, + ...normalizeParams3(params) + }); +} +function _ulid3(Class3, params) { + return new Class3({ + type: "string", + format: "ulid", + check: "string_format", + abort: false, + ...normalizeParams3(params) + }); +} +function _xid3(Class3, params) { + return new Class3({ + type: "string", + format: "xid", + check: "string_format", + abort: false, + ...normalizeParams3(params) + }); +} +function _ksuid3(Class3, params) { + return new Class3({ + type: "string", + format: "ksuid", + check: "string_format", + abort: false, + ...normalizeParams3(params) + }); +} +function _ipv43(Class3, params) { + return new Class3({ + type: "string", + format: "ipv4", + check: "string_format", + abort: false, + ...normalizeParams3(params) + }); +} +function _ipv63(Class3, params) { + return new Class3({ + type: "string", + format: "ipv6", + check: "string_format", + abort: false, + ...normalizeParams3(params) + }); +} +function _cidrv43(Class3, params) { + return new Class3({ + type: "string", + format: "cidrv4", + check: "string_format", + abort: false, + ...normalizeParams3(params) + }); +} +function _cidrv63(Class3, params) { + return new Class3({ + type: "string", + format: "cidrv6", + check: "string_format", + abort: false, + ...normalizeParams3(params) + }); +} +function _base643(Class3, params) { + return new Class3({ + type: "string", + format: "base64", + check: "string_format", + abort: false, + ...normalizeParams3(params) + }); +} +function _base64url3(Class3, params) { + return new Class3({ + type: "string", + format: "base64url", + check: "string_format", + abort: false, + ...normalizeParams3(params) + }); +} +function _e1643(Class3, params) { + return new Class3({ + type: "string", + format: "e164", + check: "string_format", + abort: false, + ...normalizeParams3(params) + }); +} +function _jwt3(Class3, params) { + return new Class3({ + type: "string", + format: "jwt", + check: "string_format", + abort: false, + ...normalizeParams3(params) + }); +} +function _isoDateTime3(Class3, params) { + return new Class3({ + type: "string", + format: "datetime", + check: "string_format", + offset: false, + local: false, + precision: null, + ...normalizeParams3(params) + }); +} +function _isoDate3(Class3, params) { + return new Class3({ + type: "string", + format: "date", + check: "string_format", + ...normalizeParams3(params) + }); +} +function _isoTime3(Class3, params) { + return new Class3({ + type: "string", + format: "time", + check: "string_format", + precision: null, + ...normalizeParams3(params) + }); +} +function _isoDuration3(Class3, params) { + return new Class3({ + type: "string", + format: "duration", + check: "string_format", + ...normalizeParams3(params) + }); +} +function _number3(Class3, params) { + return new Class3({ + type: "number", + checks: [], + ...normalizeParams3(params) + }); +} +function _coercedNumber2(Class3, params) { + return new Class3({ + type: "number", + coerce: true, + checks: [], + ...normalizeParams3(params) + }); +} +function _int3(Class3, params) { + return new Class3({ + type: "number", + check: "number_format", + abort: false, + format: "safeint", + ...normalizeParams3(params) + }); +} +function _boolean3(Class3, params) { + return new Class3({ + type: "boolean", + ...normalizeParams3(params) + }); +} +function _null$1(Class3, params) { + return new Class3({ + type: "null", + ...normalizeParams3(params) + }); +} +function _any2(Class3) { + return new Class3({ type: "any" }); +} +function _unknown3(Class3) { + return new Class3({ type: "unknown" }); +} +function _never3(Class3, params) { + return new Class3({ + type: "never", + ...normalizeParams3(params) + }); +} +function _lt3(value2, params) { + return new $ZodCheckLessThan3({ + check: "less_than", + ...normalizeParams3(params), + value: value2, + inclusive: false + }); +} +function _lte3(value2, params) { + return new $ZodCheckLessThan3({ + check: "less_than", + ...normalizeParams3(params), + value: value2, + inclusive: true + }); +} +function _gt3(value2, params) { + return new $ZodCheckGreaterThan3({ + check: "greater_than", + ...normalizeParams3(params), + value: value2, + inclusive: false + }); +} +function _gte3(value2, params) { + return new $ZodCheckGreaterThan3({ + check: "greater_than", + ...normalizeParams3(params), + value: value2, + inclusive: true + }); +} +function _multipleOf3(value2, params) { + return new $ZodCheckMultipleOf3({ + check: "multiple_of", + ...normalizeParams3(params), + value: value2 + }); +} +function _maxLength3(maximum, params) { + return new $ZodCheckMaxLength3({ + check: "max_length", + ...normalizeParams3(params), + maximum + }); +} +function _minLength3(minimum, params) { + return new $ZodCheckMinLength3({ + check: "min_length", + ...normalizeParams3(params), + minimum + }); +} +function _length3(length, params) { + return new $ZodCheckLengthEquals3({ + check: "length_equals", + ...normalizeParams3(params), + length + }); +} +function _regex3(pattern, params) { + return new $ZodCheckRegex3({ + check: "string_format", + format: "regex", + ...normalizeParams3(params), + pattern + }); +} +function _lowercase3(params) { + return new $ZodCheckLowerCase3({ + check: "string_format", + format: "lowercase", + ...normalizeParams3(params) + }); +} +function _uppercase3(params) { + return new $ZodCheckUpperCase3({ + check: "string_format", + format: "uppercase", + ...normalizeParams3(params) + }); +} +function _includes3(includes2, params) { + return new $ZodCheckIncludes3({ + check: "string_format", + format: "includes", + ...normalizeParams3(params), + includes: includes2 + }); +} +function _startsWith3(prefix, params) { + return new $ZodCheckStartsWith3({ + check: "string_format", + format: "starts_with", + ...normalizeParams3(params), + prefix + }); +} +function _endsWith3(suffix2, params) { + return new $ZodCheckEndsWith3({ + check: "string_format", + format: "ends_with", + ...normalizeParams3(params), + suffix: suffix2 + }); +} +function _overwrite3(tx) { + return new $ZodCheckOverwrite3({ + check: "overwrite", + tx + }); +} +function _normalize3(form) { + return _overwrite3((input) => input.normalize(form)); +} +function _trim3() { + return _overwrite3((input) => input.trim()); +} +function _toLowerCase3() { + return _overwrite3((input) => input.toLowerCase()); +} +function _toUpperCase3() { + return _overwrite3((input) => input.toUpperCase()); +} +function _array3(Class3, element, params) { + return new Class3({ + type: "array", + element, + ...normalizeParams3(params) + }); +} +function _custom3(Class3, fn2, _params) { + const norm2 = normalizeParams3(_params); + norm2.abort ?? (norm2.abort = true); + return new Class3({ + type: "custom", + check: "custom", + fn: fn2, + ...norm2 + }); +} +function _refine3(Class3, fn2, _params) { + return new Class3({ + type: "custom", + check: "custom", + fn: fn2, + ...normalizeParams3(_params) + }); +} +var ZodISODateTime3 = /* @__PURE__ */ $constructor3("ZodISODateTime", (inst, def$30) => { + $ZodISODateTime3.init(inst, def$30); + ZodStringFormat3.init(inst, def$30); +}); +function datetime5(params) { + return _isoDateTime3(ZodISODateTime3, params); +} +var ZodISODate3 = /* @__PURE__ */ $constructor3("ZodISODate", (inst, def$30) => { + $ZodISODate3.init(inst, def$30); + ZodStringFormat3.init(inst, def$30); +}); +function date$1(params) { + return _isoDate3(ZodISODate3, params); +} +var ZodISOTime3 = /* @__PURE__ */ $constructor3("ZodISOTime", (inst, def$30) => { + $ZodISOTime3.init(inst, def$30); + ZodStringFormat3.init(inst, def$30); +}); +function time5(params) { + return _isoTime3(ZodISOTime3, params); +} +var ZodISODuration3 = /* @__PURE__ */ $constructor3("ZodISODuration", (inst, def$30) => { + $ZodISODuration3.init(inst, def$30); + ZodStringFormat3.init(inst, def$30); +}); +function duration5(params) { + return _isoDuration3(ZodISODuration3, params); +} +var initializer5 = (inst, issues) => { + $ZodError3.init(inst, issues); + inst.name = "ZodError"; + Object.defineProperties(inst, { + format: { value: (mapper) => formatError3(inst, mapper) }, + flatten: { value: (mapper) => flattenError3(inst, mapper) }, + addIssue: { value: (issue$1) => inst.issues.push(issue$1) }, + addIssues: { value: (issues$1) => inst.issues.push(...issues$1) }, + isEmpty: { get() { + return inst.issues.length === 0; + } } }); }; -var ZodPromise3 = class extends ZodType3 { - unwrap() { - return this._def.type; - } - _parse(input) { - const { ctx } = this._processInputParams(input); - if (ctx.parsedType !== ZodParsedType3.promise && ctx.common.async === false) { - addIssueToContext3(ctx, { - code: ZodIssueCode3.invalid_type, - expected: ZodParsedType3.promise, - received: ctx.parsedType - }); - return INVALID3; - } - const promisified = ctx.parsedType === ZodParsedType3.promise ? ctx.data : Promise.resolve(ctx.data); - return OK3(promisified.then((data) => { - return this._def.type.parseAsync(data, { - path: ctx.path, - errorMap: ctx.common.contextualErrorMap - }); - })); - } -}; -ZodPromise3.create = (schema2, params) => { - return new ZodPromise3({ - type: schema2, - typeName: ZodFirstPartyTypeKind3.ZodPromise, - ...processCreateParams4(params) - }); -}; -var ZodEffects3 = class extends ZodType3 { - innerType() { - return this._def.schema; - } - sourceType() { - return this._def.schema._def.typeName === ZodFirstPartyTypeKind3.ZodEffects ? this._def.schema.sourceType() : this._def.schema; - } - _parse(input) { - const { status: status$1, ctx } = this._processInputParams(input); - const effect = this._def.effect || null; - const checkCtx = { - addIssue: (arg) => { - addIssueToContext3(ctx, arg); - if (arg.fatal) status$1.abort(); - else status$1.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 (processed$1) => { - if (status$1.value === "aborted") return INVALID3; - const result = await this._def.schema._parseAsync({ - data: processed$1, - path: ctx.path, - parent: ctx - }); - if (result.status === "aborted") return INVALID3; - if (result.status === "dirty") return DIRTY3(result.value); - if (status$1.value === "dirty") return DIRTY3(result.value); - return result; - }); - else { - if (status$1.value === "aborted") return INVALID3; - const result = this._def.schema._parseSync({ - data: processed, - path: ctx.path, - parent: ctx - }); - if (result.status === "aborted") return INVALID3; - if (result.status === "dirty") return DIRTY3(result.value); - if (status$1.value === "dirty") return DIRTY3(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 INVALID3; - if (inner.status === "dirty") status$1.dirty(); - executeRefinement(inner.value); - return { - status: status$1.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 INVALID3; - if (inner.status === "dirty") status$1.dirty(); - return executeRefinement(inner.value).then(() => { - return { - status: status$1.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 (!isValid3(base)) return INVALID3; - 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$1.value, - value: result - }; - } else return this._def.schema._parseAsync({ - data: ctx.data, - path: ctx.path, - parent: ctx - }).then((base) => { - if (!isValid3(base)) return INVALID3; - return Promise.resolve(effect.transform(base.value, checkCtx)).then((result) => ({ - status: status$1.value, - value: result - })); +var ZodError5 = $constructor3("ZodError", initializer5); +var ZodRealError3 = $constructor3("ZodError", initializer5, { Parent: Error }); +var parse$3 = /* @__PURE__ */ _parse3(ZodRealError3); +var parseAsync4 = /* @__PURE__ */ _parseAsync3(ZodRealError3); +var safeParse$1 = /* @__PURE__ */ _safeParse3(ZodRealError3); +var safeParseAsync5 = /* @__PURE__ */ _safeParseAsync3(ZodRealError3); +var ZodType5 = /* @__PURE__ */ $constructor3("ZodType", (inst, def$30) => { + $ZodType3.init(inst, def$30); + inst.def = def$30; + Object.defineProperty(inst, "_def", { value: def$30 }); + inst.check = (...checks) => { + return inst.clone({ + ...def$30, + checks: [...def$30.checks ?? [], ...checks.map((ch) => typeof ch === "function" ? { _zod: { + check: ch, + def: { check: "custom" }, + onattach: [] + } } : ch)] }); - util$6.assertNever(effect); - } -}; -ZodEffects3.create = (schema2, effect, params) => { - return new ZodEffects3({ - schema: schema2, - typeName: ZodFirstPartyTypeKind3.ZodEffects, - effect, - ...processCreateParams4(params) + }; + inst.clone = (def$31, params) => clone3(inst, def$31, params); + inst.brand = () => inst; + inst.register = ((reg, meta3) => { + reg.add(inst, meta3); + return inst; }); -}; -ZodEffects3.createWithPreprocess = (preprocess, schema2, params) => { - return new ZodEffects3({ - schema: schema2, - effect: { - type: "preprocess", - transform: preprocess + inst.parse = (data, params) => parse$3(inst, data, params, { callee: inst.parse }); + inst.safeParse = (data, params) => safeParse$1(inst, data, params); + inst.parseAsync = async (data, params) => parseAsync4(inst, data, params, { callee: inst.parseAsync }); + inst.safeParseAsync = async (data, params) => safeParseAsync5(inst, data, params); + inst.spa = inst.safeParseAsync; + inst.refine = (check$1, params) => inst.check(refine3(check$1, params)); + inst.superRefine = (refinement) => inst.check(superRefine3(refinement)); + inst.overwrite = (fn2) => inst.check(_overwrite3(fn2)); + inst.optional = () => optional3(inst); + inst.nullable = () => nullable3(inst); + inst.nullish = () => optional3(nullable3(inst)); + inst.nonoptional = (params) => nonoptional3(inst, params); + inst.array = () => array3(inst); + inst.or = (arg) => union3([inst, arg]); + inst.and = (arg) => intersection3(inst, arg); + inst.transform = (tx) => pipe3(inst, transform3(tx)); + inst.default = (def$31) => _default4(inst, def$31); + inst.prefault = (def$31) => prefault3(inst, def$31); + inst.catch = (params) => _catch4(inst, params); + inst.pipe = (target) => pipe3(inst, target); + inst.readonly = () => readonly3(inst); + inst.describe = (description) => { + const cl = inst.clone(); + globalRegistry3.add(cl, { description }); + return cl; + }; + Object.defineProperty(inst, "description", { + get() { + return globalRegistry3.get(inst)?.description; }, - typeName: ZodFirstPartyTypeKind3.ZodEffects, - ...processCreateParams4(params) + configurable: true }); -}; -var ZodOptional3 = class extends ZodType3 { - _parse(input) { - if (this._getType(input) === ZodParsedType3.undefined) return OK3(void 0); - return this._def.innerType._parse(input); - } - unwrap() { - return this._def.innerType; - } -}; -ZodOptional3.create = (type2, params) => { - return new ZodOptional3({ - innerType: type2, - typeName: ZodFirstPartyTypeKind3.ZodOptional, - ...processCreateParams4(params) + inst.meta = (...args3) => { + if (args3.length === 0) return globalRegistry3.get(inst); + const cl = inst.clone(); + globalRegistry3.add(cl, args3[0]); + return cl; + }; + inst.isOptional = () => inst.safeParse(void 0).success; + inst.isNullable = () => inst.safeParse(null).success; + return inst; +}); +var _ZodString3 = /* @__PURE__ */ $constructor3("_ZodString", (inst, def$30) => { + $ZodString3.init(inst, def$30); + ZodType5.init(inst, def$30); + const bag = inst._zod.bag; + inst.format = bag.format ?? null; + inst.minLength = bag.minimum ?? null; + inst.maxLength = bag.maximum ?? null; + inst.regex = (...args3) => inst.check(_regex3(...args3)); + inst.includes = (...args3) => inst.check(_includes3(...args3)); + inst.startsWith = (...args3) => inst.check(_startsWith3(...args3)); + inst.endsWith = (...args3) => inst.check(_endsWith3(...args3)); + inst.min = (...args3) => inst.check(_minLength3(...args3)); + inst.max = (...args3) => inst.check(_maxLength3(...args3)); + inst.length = (...args3) => inst.check(_length3(...args3)); + inst.nonempty = (...args3) => inst.check(_minLength3(1, ...args3)); + inst.lowercase = (params) => inst.check(_lowercase3(params)); + inst.uppercase = (params) => inst.check(_uppercase3(params)); + inst.trim = () => inst.check(_trim3()); + inst.normalize = (...args3) => inst.check(_normalize3(...args3)); + inst.toLowerCase = () => inst.check(_toLowerCase3()); + inst.toUpperCase = () => inst.check(_toUpperCase3()); +}); +var ZodString5 = /* @__PURE__ */ $constructor3("ZodString", (inst, def$30) => { + $ZodString3.init(inst, def$30); + _ZodString3.init(inst, def$30); + inst.email = (params) => inst.check(_email3(ZodEmail3, params)); + inst.url = (params) => inst.check(_url3(ZodURL3, params)); + inst.jwt = (params) => inst.check(_jwt3(ZodJWT3, params)); + inst.emoji = (params) => inst.check(_emoji5(ZodEmoji3, params)); + inst.guid = (params) => inst.check(_guid3(ZodGUID3, params)); + inst.uuid = (params) => inst.check(_uuid3(ZodUUID3, params)); + inst.uuidv4 = (params) => inst.check(_uuidv43(ZodUUID3, params)); + inst.uuidv6 = (params) => inst.check(_uuidv63(ZodUUID3, params)); + inst.uuidv7 = (params) => inst.check(_uuidv73(ZodUUID3, params)); + inst.nanoid = (params) => inst.check(_nanoid3(ZodNanoID3, params)); + inst.guid = (params) => inst.check(_guid3(ZodGUID3, params)); + inst.cuid = (params) => inst.check(_cuid4(ZodCUID4, params)); + inst.cuid2 = (params) => inst.check(_cuid23(ZodCUID23, params)); + inst.ulid = (params) => inst.check(_ulid3(ZodULID3, params)); + inst.base64 = (params) => inst.check(_base643(ZodBase643, params)); + inst.base64url = (params) => inst.check(_base64url3(ZodBase64URL3, params)); + inst.xid = (params) => inst.check(_xid3(ZodXID3, params)); + inst.ksuid = (params) => inst.check(_ksuid3(ZodKSUID3, params)); + inst.ipv4 = (params) => inst.check(_ipv43(ZodIPv43, params)); + inst.ipv6 = (params) => inst.check(_ipv63(ZodIPv63, params)); + inst.cidrv4 = (params) => inst.check(_cidrv43(ZodCIDRv43, params)); + inst.cidrv6 = (params) => inst.check(_cidrv63(ZodCIDRv63, params)); + inst.e164 = (params) => inst.check(_e1643(ZodE1643, params)); + inst.datetime = (params) => inst.check(datetime5(params)); + inst.date = (params) => inst.check(date$1(params)); + inst.time = (params) => inst.check(time5(params)); + inst.duration = (params) => inst.check(duration5(params)); +}); +function string7(params) { + return _string3(ZodString5, params); +} +var ZodStringFormat3 = /* @__PURE__ */ $constructor3("ZodStringFormat", (inst, def$30) => { + $ZodStringFormat3.init(inst, def$30); + _ZodString3.init(inst, def$30); +}); +var ZodEmail3 = /* @__PURE__ */ $constructor3("ZodEmail", (inst, def$30) => { + $ZodEmail3.init(inst, def$30); + ZodStringFormat3.init(inst, def$30); +}); +var ZodGUID3 = /* @__PURE__ */ $constructor3("ZodGUID", (inst, def$30) => { + $ZodGUID3.init(inst, def$30); + ZodStringFormat3.init(inst, def$30); +}); +var ZodUUID3 = /* @__PURE__ */ $constructor3("ZodUUID", (inst, def$30) => { + $ZodUUID3.init(inst, def$30); + ZodStringFormat3.init(inst, def$30); +}); +var ZodURL3 = /* @__PURE__ */ $constructor3("ZodURL", (inst, def$30) => { + $ZodURL3.init(inst, def$30); + ZodStringFormat3.init(inst, def$30); +}); +function url3(params) { + return _url3(ZodURL3, params); +} +var ZodEmoji3 = /* @__PURE__ */ $constructor3("ZodEmoji", (inst, def$30) => { + $ZodEmoji3.init(inst, def$30); + ZodStringFormat3.init(inst, def$30); +}); +var ZodNanoID3 = /* @__PURE__ */ $constructor3("ZodNanoID", (inst, def$30) => { + $ZodNanoID3.init(inst, def$30); + ZodStringFormat3.init(inst, def$30); +}); +var ZodCUID4 = /* @__PURE__ */ $constructor3("ZodCUID", (inst, def$30) => { + $ZodCUID4.init(inst, def$30); + ZodStringFormat3.init(inst, def$30); +}); +var ZodCUID23 = /* @__PURE__ */ $constructor3("ZodCUID2", (inst, def$30) => { + $ZodCUID23.init(inst, def$30); + ZodStringFormat3.init(inst, def$30); +}); +var ZodULID3 = /* @__PURE__ */ $constructor3("ZodULID", (inst, def$30) => { + $ZodULID3.init(inst, def$30); + ZodStringFormat3.init(inst, def$30); +}); +var ZodXID3 = /* @__PURE__ */ $constructor3("ZodXID", (inst, def$30) => { + $ZodXID3.init(inst, def$30); + ZodStringFormat3.init(inst, def$30); +}); +var ZodKSUID3 = /* @__PURE__ */ $constructor3("ZodKSUID", (inst, def$30) => { + $ZodKSUID3.init(inst, def$30); + ZodStringFormat3.init(inst, def$30); +}); +var ZodIPv43 = /* @__PURE__ */ $constructor3("ZodIPv4", (inst, def$30) => { + $ZodIPv43.init(inst, def$30); + ZodStringFormat3.init(inst, def$30); +}); +var ZodIPv63 = /* @__PURE__ */ $constructor3("ZodIPv6", (inst, def$30) => { + $ZodIPv63.init(inst, def$30); + ZodStringFormat3.init(inst, def$30); +}); +var ZodCIDRv43 = /* @__PURE__ */ $constructor3("ZodCIDRv4", (inst, def$30) => { + $ZodCIDRv43.init(inst, def$30); + ZodStringFormat3.init(inst, def$30); +}); +var ZodCIDRv63 = /* @__PURE__ */ $constructor3("ZodCIDRv6", (inst, def$30) => { + $ZodCIDRv63.init(inst, def$30); + ZodStringFormat3.init(inst, def$30); +}); +var ZodBase643 = /* @__PURE__ */ $constructor3("ZodBase64", (inst, def$30) => { + $ZodBase643.init(inst, def$30); + ZodStringFormat3.init(inst, def$30); +}); +var ZodBase64URL3 = /* @__PURE__ */ $constructor3("ZodBase64URL", (inst, def$30) => { + $ZodBase64URL3.init(inst, def$30); + ZodStringFormat3.init(inst, def$30); +}); +var ZodE1643 = /* @__PURE__ */ $constructor3("ZodE164", (inst, def$30) => { + $ZodE1643.init(inst, def$30); + ZodStringFormat3.init(inst, def$30); +}); +var ZodJWT3 = /* @__PURE__ */ $constructor3("ZodJWT", (inst, def$30) => { + $ZodJWT3.init(inst, def$30); + ZodStringFormat3.init(inst, def$30); +}); +var ZodNumber5 = /* @__PURE__ */ $constructor3("ZodNumber", (inst, def$30) => { + $ZodNumber3.init(inst, def$30); + ZodType5.init(inst, def$30); + inst.gt = (value2, params) => inst.check(_gt3(value2, params)); + inst.gte = (value2, params) => inst.check(_gte3(value2, params)); + inst.min = (value2, params) => inst.check(_gte3(value2, params)); + inst.lt = (value2, params) => inst.check(_lt3(value2, params)); + inst.lte = (value2, params) => inst.check(_lte3(value2, params)); + inst.max = (value2, params) => inst.check(_lte3(value2, params)); + inst.int = (params) => inst.check(int3(params)); + inst.safe = (params) => inst.check(int3(params)); + inst.positive = (params) => inst.check(_gt3(0, params)); + inst.nonnegative = (params) => inst.check(_gte3(0, params)); + inst.negative = (params) => inst.check(_lt3(0, params)); + inst.nonpositive = (params) => inst.check(_lte3(0, params)); + inst.multipleOf = (value2, params) => inst.check(_multipleOf3(value2, params)); + inst.step = (value2, params) => inst.check(_multipleOf3(value2, params)); + inst.finite = () => inst; + const bag = inst._zod.bag; + inst.minValue = Math.max(bag.minimum ?? Number.NEGATIVE_INFINITY, bag.exclusiveMinimum ?? Number.NEGATIVE_INFINITY) ?? null; + inst.maxValue = Math.min(bag.maximum ?? Number.POSITIVE_INFINITY, bag.exclusiveMaximum ?? Number.POSITIVE_INFINITY) ?? null; + inst.isInt = (bag.format ?? "").includes("int") || Number.isSafeInteger(bag.multipleOf ?? 0.5); + inst.isFinite = true; + inst.format = bag.format ?? null; +}); +function number7(params) { + return _number3(ZodNumber5, params); +} +var ZodNumberFormat3 = /* @__PURE__ */ $constructor3("ZodNumberFormat", (inst, def$30) => { + $ZodNumberFormat3.init(inst, def$30); + ZodNumber5.init(inst, def$30); +}); +function int3(params) { + return _int3(ZodNumberFormat3, params); +} +var ZodBoolean5 = /* @__PURE__ */ $constructor3("ZodBoolean", (inst, def$30) => { + $ZodBoolean3.init(inst, def$30); + ZodType5.init(inst, def$30); +}); +function boolean6(params) { + return _boolean3(ZodBoolean5, params); +} +var ZodNull5 = /* @__PURE__ */ $constructor3("ZodNull", (inst, def$30) => { + $ZodNull3.init(inst, def$30); + ZodType5.init(inst, def$30); +}); +function _null7(params) { + return _null$1(ZodNull5, params); +} +var ZodAny4 = /* @__PURE__ */ $constructor3("ZodAny", (inst, def$30) => { + $ZodAny2.init(inst, def$30); + ZodType5.init(inst, def$30); +}); +function any2() { + return _any2(ZodAny4); +} +var ZodUnknown5 = /* @__PURE__ */ $constructor3("ZodUnknown", (inst, def$30) => { + $ZodUnknown3.init(inst, def$30); + ZodType5.init(inst, def$30); +}); +function unknown4() { + return _unknown3(ZodUnknown5); +} +var ZodNever5 = /* @__PURE__ */ $constructor3("ZodNever", (inst, def$30) => { + $ZodNever3.init(inst, def$30); + ZodType5.init(inst, def$30); +}); +function never3(params) { + return _never3(ZodNever5, params); +} +var ZodArray5 = /* @__PURE__ */ $constructor3("ZodArray", (inst, def$30) => { + $ZodArray3.init(inst, def$30); + ZodType5.init(inst, def$30); + inst.element = def$30.element; + inst.min = (minLength, params) => inst.check(_minLength3(minLength, params)); + inst.nonempty = (params) => inst.check(_minLength3(1, params)); + inst.max = (maxLength, params) => inst.check(_maxLength3(maxLength, params)); + inst.length = (len, params) => inst.check(_length3(len, params)); + inst.unwrap = () => inst.element; +}); +function array3(element, params) { + return _array3(ZodArray5, element, params); +} +var ZodObject5 = /* @__PURE__ */ $constructor3("ZodObject", (inst, def$30) => { + $ZodObject3.init(inst, def$30); + ZodType5.init(inst, def$30); + defineLazy3(inst, "shape", () => def$30.shape); + inst.keyof = () => _enum4(Object.keys(inst._zod.def.shape)); + inst.catchall = (catchall) => inst.clone({ + ...inst._zod.def, + catchall }); -}; -var ZodNullable3 = class extends ZodType3 { - _parse(input) { - if (this._getType(input) === ZodParsedType3.null) return OK3(null); - return this._def.innerType._parse(input); - } - unwrap() { - return this._def.innerType; - } -}; -ZodNullable3.create = (type2, params) => { - return new ZodNullable3({ - innerType: type2, - typeName: ZodFirstPartyTypeKind3.ZodNullable, - ...processCreateParams4(params) + inst.passthrough = () => inst.clone({ + ...inst._zod.def, + catchall: unknown4() }); -}; -var ZodDefault3 = class extends ZodType3 { - _parse(input) { - const { ctx } = this._processInputParams(input); - let data = ctx.data; - if (ctx.parsedType === ZodParsedType3.undefined) data = this._def.defaultValue(); - return this._def.innerType._parse({ - data, - path: ctx.path, - parent: ctx + inst.loose = () => inst.clone({ + ...inst._zod.def, + catchall: unknown4() + }); + inst.strict = () => inst.clone({ + ...inst._zod.def, + catchall: never3() + }); + inst.strip = () => inst.clone({ + ...inst._zod.def, + catchall: void 0 + }); + inst.extend = (incoming) => { + return extend3(inst, incoming); + }; + inst.merge = (other) => merge4(inst, other); + inst.pick = (mask) => pick3(inst, mask); + inst.omit = (mask) => omit5(inst, mask); + inst.partial = (...args3) => partial3(ZodOptional5, inst, args3[0]); + inst.required = (...args3) => required3(ZodNonOptional3, inst, args3[0]); +}); +function object5(shape, params) { + return new ZodObject5({ + type: "object", + get shape() { + assignProp3(this, "shape", { ...shape }); + return this.shape; + }, + ...normalizeParams3(params) + }); +} +function looseObject3(shape, params) { + return new ZodObject5({ + type: "object", + get shape() { + assignProp3(this, "shape", { ...shape }); + return this.shape; + }, + catchall: unknown4(), + ...normalizeParams3(params) + }); +} +var ZodUnion5 = /* @__PURE__ */ $constructor3("ZodUnion", (inst, def$30) => { + $ZodUnion3.init(inst, def$30); + ZodType5.init(inst, def$30); + inst.options = def$30.options; +}); +function union3(options, params) { + return new ZodUnion5({ + type: "union", + options, + ...normalizeParams3(params) + }); +} +var ZodDiscriminatedUnion5 = /* @__PURE__ */ $constructor3("ZodDiscriminatedUnion", (inst, def$30) => { + ZodUnion5.init(inst, def$30); + $ZodDiscriminatedUnion3.init(inst, def$30); +}); +function discriminatedUnion3(discriminator, options, params) { + return new ZodDiscriminatedUnion5({ + type: "union", + options, + discriminator, + ...normalizeParams3(params) + }); +} +var ZodIntersection5 = /* @__PURE__ */ $constructor3("ZodIntersection", (inst, def$30) => { + $ZodIntersection3.init(inst, def$30); + ZodType5.init(inst, def$30); +}); +function intersection3(left, right) { + return new ZodIntersection5({ + type: "intersection", + left, + right + }); +} +var ZodRecord5 = /* @__PURE__ */ $constructor3("ZodRecord", (inst, def$30) => { + $ZodRecord3.init(inst, def$30); + ZodType5.init(inst, def$30); + inst.keyType = def$30.keyType; + inst.valueType = def$30.valueType; +}); +function record3(keyType, valueType, params) { + return new ZodRecord5({ + type: "record", + keyType, + valueType, + ...normalizeParams3(params) + }); +} +var ZodEnum5 = /* @__PURE__ */ $constructor3("ZodEnum", (inst, def$30) => { + $ZodEnum3.init(inst, def$30); + ZodType5.init(inst, def$30); + inst.enum = def$30.entries; + inst.options = Object.values(def$30.entries); + const keys = new Set(Object.keys(def$30.entries)); + inst.extract = (values, params) => { + const newEntries = {}; + for (const value2 of values) if (keys.has(value2)) newEntries[value2] = def$30.entries[value2]; + else throw new Error(`Key ${value2} not found in enum`); + return new ZodEnum5({ + ...def$30, + checks: [], + ...normalizeParams3(params), + entries: newEntries }); - } - removeDefault() { - return this._def.innerType; - } -}; -ZodDefault3.create = (type2, params) => { - return new ZodDefault3({ - innerType: type2, - typeName: ZodFirstPartyTypeKind3.ZodDefault, - defaultValue: typeof params.default === "function" ? params.default : () => params.default, - ...processCreateParams4(params) + }; + inst.exclude = (values, params) => { + const newEntries = { ...def$30.entries }; + for (const value2 of values) if (keys.has(value2)) delete newEntries[value2]; + else throw new Error(`Key ${value2} not found in enum`); + return new ZodEnum5({ + ...def$30, + checks: [], + ...normalizeParams3(params), + entries: newEntries + }); + }; +}); +function _enum4(values, params) { + return new ZodEnum5({ + type: "enum", + entries: Array.isArray(values) ? Object.fromEntries(values.map((v) => [v, v])) : values, + ...normalizeParams3(params) }); -}; -var ZodCatch3 = class extends ZodType3 { - _parse(input) { - const { ctx } = this._processInputParams(input); - const newCtx = { - ...ctx, - common: { - ...ctx.common, - issues: [] +} +var ZodLiteral5 = /* @__PURE__ */ $constructor3("ZodLiteral", (inst, def$30) => { + $ZodLiteral3.init(inst, def$30); + ZodType5.init(inst, def$30); + inst.values = new Set(def$30.values); + Object.defineProperty(inst, "value", { get() { + if (def$30.values.length > 1) throw new Error("This schema contains multiple valid literal values. Use `.values` instead."); + return def$30.values[0]; + } }); +}); +function literal3(value2, params) { + return new ZodLiteral5({ + type: "literal", + values: Array.isArray(value2) ? value2 : [value2], + ...normalizeParams3(params) + }); +} +var ZodTransform3 = /* @__PURE__ */ $constructor3("ZodTransform", (inst, def$30) => { + $ZodTransform3.init(inst, def$30); + ZodType5.init(inst, def$30); + inst._zod.parse = (payload, _ctx) => { + payload.addIssue = (issue$1) => { + if (typeof issue$1 === "string") payload.issues.push(issue3(issue$1, payload.value, def$30)); + else { + const _issue = issue$1; + if (_issue.fatal) _issue.continue = false; + _issue.code ?? (_issue.code = "custom"); + _issue.input ?? (_issue.input = payload.value); + _issue.inst ?? (_issue.inst = inst); + _issue.continue ?? (_issue.continue = true); + payload.issues.push(issue3(_issue)); } }; - const result = this._def.innerType._parse({ - data: newCtx.data, - path: newCtx.path, - parent: { ...newCtx } + const output = def$30.transform(payload.value, payload); + if (output instanceof Promise) return output.then((output$1) => { + payload.value = output$1; + return payload; }); - if (isAsync3(result)) return result.then((result$1) => { - return { - status: "valid", - value: result$1.status === "valid" ? result$1.value : this._def.catchValue({ - get error() { - return new ZodError3(newCtx.common.issues); - }, - input: newCtx.data - }) - }; - }); - else return { - status: "valid", - value: result.status === "valid" ? result.value : this._def.catchValue({ - get error() { - return new ZodError3(newCtx.common.issues); - }, - input: newCtx.data - }) - }; - } - removeCatch() { - return this._def.innerType; - } -}; -ZodCatch3.create = (type2, params) => { - return new ZodCatch3({ - innerType: type2, - typeName: ZodFirstPartyTypeKind3.ZodCatch, - catchValue: typeof params.catch === "function" ? params.catch : () => params.catch, - ...processCreateParams4(params) + payload.value = output; + return payload; + }; +}); +function transform3(fn2) { + return new ZodTransform3({ + type: "transform", + transform: fn2 }); -}; -var ZodNaN3 = class extends ZodType3 { - _parse(input) { - if (this._getType(input) !== ZodParsedType3.nan) { - const ctx = this._getOrReturnCtx(input); - addIssueToContext3(ctx, { - code: ZodIssueCode3.invalid_type, - expected: ZodParsedType3.nan, - received: ctx.parsedType - }); - return INVALID3; +} +var ZodOptional5 = /* @__PURE__ */ $constructor3("ZodOptional", (inst, def$30) => { + $ZodOptional3.init(inst, def$30); + ZodType5.init(inst, def$30); + inst.unwrap = () => inst._zod.def.innerType; +}); +function optional3(innerType) { + return new ZodOptional5({ + type: "optional", + innerType + }); +} +var ZodNullable5 = /* @__PURE__ */ $constructor3("ZodNullable", (inst, def$30) => { + $ZodNullable3.init(inst, def$30); + ZodType5.init(inst, def$30); + inst.unwrap = () => inst._zod.def.innerType; +}); +function nullable3(innerType) { + return new ZodNullable5({ + type: "nullable", + innerType + }); +} +var ZodDefault5 = /* @__PURE__ */ $constructor3("ZodDefault", (inst, def$30) => { + $ZodDefault3.init(inst, def$30); + ZodType5.init(inst, def$30); + inst.unwrap = () => inst._zod.def.innerType; + inst.removeDefault = inst.unwrap; +}); +function _default4(innerType, defaultValue) { + return new ZodDefault5({ + type: "default", + innerType, + get defaultValue() { + return typeof defaultValue === "function" ? defaultValue() : defaultValue; } - return { - status: "valid", - value: input.data - }; - } -}; -ZodNaN3.create = (params) => { - return new ZodNaN3({ - typeName: ZodFirstPartyTypeKind3.ZodNaN, - ...processCreateParams4(params) }); -}; -var BRAND3 = Symbol("zod_brand"); -var ZodBranded3 = class extends ZodType3 { - _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 ZodPipeline3 = class ZodPipeline4 extends ZodType3 { - _parse(input) { - const { status: status$1, 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 INVALID3; - if (inResult.status === "dirty") { - status$1.dirty(); - return DIRTY3(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 INVALID3; - if (inResult.status === "dirty") { - status$1.dirty(); - return { - status: "dirty", - value: inResult.value - }; - } else return this._def.out._parseSync({ - data: inResult.value, - path: ctx.path, - parent: ctx - }); +} +var ZodPrefault3 = /* @__PURE__ */ $constructor3("ZodPrefault", (inst, def$30) => { + $ZodPrefault3.init(inst, def$30); + ZodType5.init(inst, def$30); + inst.unwrap = () => inst._zod.def.innerType; +}); +function prefault3(innerType, defaultValue) { + return new ZodPrefault3({ + type: "prefault", + innerType, + get defaultValue() { + return typeof defaultValue === "function" ? defaultValue() : defaultValue; } - } - static create(a, b) { - return new ZodPipeline4({ - in: a, - out: b, - typeName: ZodFirstPartyTypeKind3.ZodPipeline - }); - } -}; -var ZodReadonly3 = class extends ZodType3 { - _parse(input) { - const result = this._def.innerType._parse(input); - const freeze = (data) => { - if (isValid3(data)) data.value = Object.freeze(data.value); - return data; - }; - return isAsync3(result) ? result.then((data) => freeze(data)) : freeze(result); - } - unwrap() { - return this._def.innerType; - } -}; -ZodReadonly3.create = (type2, params) => { - return new ZodReadonly3({ - innerType: type2, - typeName: ZodFirstPartyTypeKind3.ZodReadonly, - ...processCreateParams4(params) }); -}; -var late3 = { object: ZodObject3.lazycreate }; -var ZodFirstPartyTypeKind3; -(function(ZodFirstPartyTypeKind$1) { - ZodFirstPartyTypeKind$1["ZodString"] = "ZodString"; - ZodFirstPartyTypeKind$1["ZodNumber"] = "ZodNumber"; - ZodFirstPartyTypeKind$1["ZodNaN"] = "ZodNaN"; - ZodFirstPartyTypeKind$1["ZodBigInt"] = "ZodBigInt"; - ZodFirstPartyTypeKind$1["ZodBoolean"] = "ZodBoolean"; - ZodFirstPartyTypeKind$1["ZodDate"] = "ZodDate"; - ZodFirstPartyTypeKind$1["ZodSymbol"] = "ZodSymbol"; - ZodFirstPartyTypeKind$1["ZodUndefined"] = "ZodUndefined"; - ZodFirstPartyTypeKind$1["ZodNull"] = "ZodNull"; - ZodFirstPartyTypeKind$1["ZodAny"] = "ZodAny"; - ZodFirstPartyTypeKind$1["ZodUnknown"] = "ZodUnknown"; - ZodFirstPartyTypeKind$1["ZodNever"] = "ZodNever"; - ZodFirstPartyTypeKind$1["ZodVoid"] = "ZodVoid"; - ZodFirstPartyTypeKind$1["ZodArray"] = "ZodArray"; - ZodFirstPartyTypeKind$1["ZodObject"] = "ZodObject"; - ZodFirstPartyTypeKind$1["ZodUnion"] = "ZodUnion"; - ZodFirstPartyTypeKind$1["ZodDiscriminatedUnion"] = "ZodDiscriminatedUnion"; - ZodFirstPartyTypeKind$1["ZodIntersection"] = "ZodIntersection"; - ZodFirstPartyTypeKind$1["ZodTuple"] = "ZodTuple"; - ZodFirstPartyTypeKind$1["ZodRecord"] = "ZodRecord"; - ZodFirstPartyTypeKind$1["ZodMap"] = "ZodMap"; - ZodFirstPartyTypeKind$1["ZodSet"] = "ZodSet"; - ZodFirstPartyTypeKind$1["ZodFunction"] = "ZodFunction"; - ZodFirstPartyTypeKind$1["ZodLazy"] = "ZodLazy"; - ZodFirstPartyTypeKind$1["ZodLiteral"] = "ZodLiteral"; - ZodFirstPartyTypeKind$1["ZodEnum"] = "ZodEnum"; - ZodFirstPartyTypeKind$1["ZodEffects"] = "ZodEffects"; - ZodFirstPartyTypeKind$1["ZodNativeEnum"] = "ZodNativeEnum"; - ZodFirstPartyTypeKind$1["ZodOptional"] = "ZodOptional"; - ZodFirstPartyTypeKind$1["ZodNullable"] = "ZodNullable"; - ZodFirstPartyTypeKind$1["ZodDefault"] = "ZodDefault"; - ZodFirstPartyTypeKind$1["ZodCatch"] = "ZodCatch"; - ZodFirstPartyTypeKind$1["ZodPromise"] = "ZodPromise"; - ZodFirstPartyTypeKind$1["ZodBranded"] = "ZodBranded"; - ZodFirstPartyTypeKind$1["ZodPipeline"] = "ZodPipeline"; - ZodFirstPartyTypeKind$1["ZodReadonly"] = "ZodReadonly"; -})(ZodFirstPartyTypeKind3 || (ZodFirstPartyTypeKind3 = {})); -var stringType3 = ZodString3.create; -var numberType3 = ZodNumber3.create; -var nanType3 = ZodNaN3.create; -var bigIntType3 = ZodBigInt3.create; -var booleanType3 = ZodBoolean3.create; -var dateType3 = ZodDate3.create; -var symbolType3 = ZodSymbol3.create; -var undefinedType3 = ZodUndefined3.create; -var nullType3 = ZodNull3.create; -var anyType3 = ZodAny3.create; -var unknownType3 = ZodUnknown3.create; -var neverType3 = ZodNever3.create; -var voidType3 = ZodVoid3.create; -var arrayType3 = ZodArray3.create; -var objectType3 = ZodObject3.create; -var strictObjectType3 = ZodObject3.strictCreate; -var unionType3 = ZodUnion3.create; -var discriminatedUnionType3 = ZodDiscriminatedUnion3.create; -var intersectionType3 = ZodIntersection3.create; -var tupleType3 = ZodTuple3.create; -var recordType3 = ZodRecord3.create; -var mapType3 = ZodMap3.create; -var setType3 = ZodSet3.create; -var functionType3 = ZodFunction3.create; -var lazyType3 = ZodLazy3.create; -var literalType3 = ZodLiteral3.create; -var enumType3 = ZodEnum3.create; -var nativeEnumType3 = ZodNativeEnum3.create; -var promiseType3 = ZodPromise3.create; -var effectsType3 = ZodEffects3.create; -var optionalType3 = ZodOptional3.create; -var nullableType3 = ZodNullable3.create; -var preprocessType3 = ZodEffects3.createWithPreprocess; -var pipelineType3 = ZodPipeline3.create; -var NEVER3 = INVALID3; -var LATEST_PROTOCOL_VERSION2 = "2025-06-18"; +} +var ZodNonOptional3 = /* @__PURE__ */ $constructor3("ZodNonOptional", (inst, def$30) => { + $ZodNonOptional3.init(inst, def$30); + ZodType5.init(inst, def$30); + inst.unwrap = () => inst._zod.def.innerType; +}); +function nonoptional3(innerType, params) { + return new ZodNonOptional3({ + type: "nonoptional", + innerType, + ...normalizeParams3(params) + }); +} +var ZodCatch5 = /* @__PURE__ */ $constructor3("ZodCatch", (inst, def$30) => { + $ZodCatch3.init(inst, def$30); + ZodType5.init(inst, def$30); + inst.unwrap = () => inst._zod.def.innerType; + inst.removeCatch = inst.unwrap; +}); +function _catch4(innerType, catchValue) { + return new ZodCatch5({ + type: "catch", + innerType, + catchValue: typeof catchValue === "function" ? catchValue : () => catchValue + }); +} +var ZodPipe3 = /* @__PURE__ */ $constructor3("ZodPipe", (inst, def$30) => { + $ZodPipe3.init(inst, def$30); + ZodType5.init(inst, def$30); + inst.in = def$30.in; + inst.out = def$30.out; +}); +function pipe3(in_, out) { + return new ZodPipe3({ + type: "pipe", + in: in_, + out + }); +} +var ZodReadonly5 = /* @__PURE__ */ $constructor3("ZodReadonly", (inst, def$30) => { + $ZodReadonly3.init(inst, def$30); + ZodType5.init(inst, def$30); +}); +function readonly3(innerType) { + return new ZodReadonly5({ + type: "readonly", + innerType + }); +} +var ZodCustom3 = /* @__PURE__ */ $constructor3("ZodCustom", (inst, def$30) => { + $ZodCustom3.init(inst, def$30); + ZodType5.init(inst, def$30); +}); +function check3(fn2) { + const ch = new $ZodCheck3({ check: "custom" }); + ch._zod.check = fn2; + return ch; +} +function custom3(fn2, _params) { + return _custom3(ZodCustom3, fn2 ?? (() => true), _params); +} +function refine3(fn2, _params = {}) { + return _refine3(ZodCustom3, fn2, _params); +} +function superRefine3(fn2) { + const ch = check3((payload) => { + payload.addIssue = (issue$1) => { + if (typeof issue$1 === "string") payload.issues.push(issue3(issue$1, payload.value, ch._zod.def)); + else { + const _issue = issue$1; + if (_issue.fatal) _issue.continue = false; + _issue.code ?? (_issue.code = "custom"); + _issue.input ?? (_issue.input = payload.value); + _issue.inst ?? (_issue.inst = ch); + _issue.continue ?? (_issue.continue = !ch._zod.def.abort); + payload.issues.push(issue3(_issue)); + } + }; + return fn2(payload.value, payload); + }); + return ch; +} +function preprocess3(fn2, schema2) { + return pipe3(transform3(fn2), schema2); +} +var LATEST_PROTOCOL_VERSION2 = "2025-11-25"; var DEFAULT_NEGOTIATED_PROTOCOL_VERSION = "2025-03-26"; var SUPPORTED_PROTOCOL_VERSIONS2 = [ LATEST_PROTOCOL_VERSION2, + "2025-06-18", "2025-03-26", "2024-11-05", "2024-10-07" ]; +var RELATED_TASK_META_KEY3 = "io.modelcontextprotocol/related-task"; var JSONRPC_VERSION3 = "2.0"; -var ProgressTokenSchema3 = unionType3([stringType3(), numberType3().int()]); -var CursorSchema3 = stringType3(); -var RequestMetaSchema3 = objectType3({ progressToken: optionalType3(ProgressTokenSchema3) }).passthrough(); -var BaseRequestParamsSchema3 = objectType3({ _meta: optionalType3(RequestMetaSchema3) }).passthrough(); -var RequestSchema3 = objectType3({ - method: stringType3(), - params: optionalType3(BaseRequestParamsSchema3) +var AssertObjectSchema3 = custom3((v) => v !== null && (typeof v === "object" || typeof v === "function")); +var ProgressTokenSchema3 = union3([string7(), number7().int()]); +var CursorSchema3 = string7(); +var TaskCreationParamsSchema3 = looseObject3({ + ttl: union3([number7(), _null7()]).optional(), + pollInterval: number7().optional() }); -var BaseNotificationParamsSchema3 = objectType3({ _meta: optionalType3(objectType3({}).passthrough()) }).passthrough(); -var NotificationSchema3 = objectType3({ - method: stringType3(), - params: optionalType3(BaseNotificationParamsSchema3) +var RelatedTaskMetadataSchema3 = looseObject3({ taskId: string7() }); +var RequestMetaSchema3 = looseObject3({ + progressToken: ProgressTokenSchema3.optional(), + [RELATED_TASK_META_KEY3]: RelatedTaskMetadataSchema3.optional() }); -var ResultSchema3 = objectType3({ _meta: optionalType3(objectType3({}).passthrough()) }).passthrough(); -var RequestIdSchema3 = unionType3([stringType3(), numberType3().int()]); -var JSONRPCRequestSchema3 = objectType3({ - jsonrpc: literalType3(JSONRPC_VERSION3), - id: RequestIdSchema3 -}).merge(RequestSchema3).strict(); +var BaseRequestParamsSchema3 = looseObject3({ + task: TaskCreationParamsSchema3.optional(), + _meta: RequestMetaSchema3.optional() +}); +var RequestSchema3 = object5({ + method: string7(), + params: BaseRequestParamsSchema3.optional() +}); +var NotificationsParamsSchema3 = looseObject3({ _meta: object5({ [RELATED_TASK_META_KEY3]: optional3(RelatedTaskMetadataSchema3) }).passthrough().optional() }); +var NotificationSchema3 = object5({ + method: string7(), + params: NotificationsParamsSchema3.optional() +}); +var ResultSchema3 = looseObject3({ _meta: looseObject3({ [RELATED_TASK_META_KEY3]: RelatedTaskMetadataSchema3.optional() }).optional() }); +var RequestIdSchema3 = union3([string7(), number7().int()]); +var JSONRPCRequestSchema3 = object5({ + jsonrpc: literal3(JSONRPC_VERSION3), + id: RequestIdSchema3, + ...RequestSchema3.shape +}).strict(); var isJSONRPCRequest2 = (value2) => JSONRPCRequestSchema3.safeParse(value2).success; -var JSONRPCNotificationSchema3 = objectType3({ jsonrpc: literalType3(JSONRPC_VERSION3) }).merge(NotificationSchema3).strict(); -var JSONRPCResponseSchema3 = objectType3({ - jsonrpc: literalType3(JSONRPC_VERSION3), +var JSONRPCNotificationSchema3 = object5({ + jsonrpc: literal3(JSONRPC_VERSION3), + ...NotificationSchema3.shape +}).strict(); +var JSONRPCResponseSchema3 = object5({ + jsonrpc: literal3(JSONRPC_VERSION3), id: RequestIdSchema3, result: ResultSchema3 }).strict(); -var isJSONRPCResponse2 = (value2) => JSONRPCResponseSchema3.safeParse(value2).success; +var isJSONRPCResponse = (value2) => JSONRPCResponseSchema3.safeParse(value2).success; var ErrorCode3; (function(ErrorCode$1) { ErrorCode$1[ErrorCode$1["ConnectionClosed"] = -32e3] = "ConnectionClosed"; @@ -106984,239 +116765,351 @@ var ErrorCode3; ErrorCode$1[ErrorCode$1["MethodNotFound"] = -32601] = "MethodNotFound"; ErrorCode$1[ErrorCode$1["InvalidParams"] = -32602] = "InvalidParams"; ErrorCode$1[ErrorCode$1["InternalError"] = -32603] = "InternalError"; + ErrorCode$1[ErrorCode$1["UrlElicitationRequired"] = -32042] = "UrlElicitationRequired"; })(ErrorCode3 || (ErrorCode3 = {})); -var JSONRPCErrorSchema3 = objectType3({ - jsonrpc: literalType3(JSONRPC_VERSION3), +var JSONRPCErrorSchema2 = object5({ + jsonrpc: literal3(JSONRPC_VERSION3), id: RequestIdSchema3, - error: objectType3({ - code: numberType3().int(), - message: stringType3(), - data: optionalType3(unknownType3()) + error: object5({ + code: number7().int(), + message: string7(), + data: optional3(unknown4()) }) }).strict(); -var isJSONRPCError2 = (value2) => JSONRPCErrorSchema3.safeParse(value2).success; -var JSONRPCMessageSchema3 = unionType3([ +var isJSONRPCError = (value2) => JSONRPCErrorSchema2.safeParse(value2).success; +var JSONRPCMessageSchema3 = union3([ JSONRPCRequestSchema3, JSONRPCNotificationSchema3, JSONRPCResponseSchema3, - JSONRPCErrorSchema3 + JSONRPCErrorSchema2 ]); var EmptyResultSchema3 = ResultSchema3.strict(); +var CancelledNotificationParamsSchema3 = NotificationsParamsSchema3.extend({ + requestId: RequestIdSchema3, + reason: string7().optional() +}); var CancelledNotificationSchema3 = NotificationSchema3.extend({ - method: literalType3("notifications/cancelled"), - params: BaseNotificationParamsSchema3.extend({ - requestId: RequestIdSchema3, - reason: stringType3().optional() - }) + method: literal3("notifications/cancelled"), + params: CancelledNotificationParamsSchema3 +}); +var IconSchema3 = object5({ + src: string7(), + mimeType: string7().optional(), + sizes: array3(string7()).optional() +}); +var IconsSchema3 = object5({ icons: array3(IconSchema3).optional() }); +var BaseMetadataSchema3 = object5({ + name: string7(), + title: string7().optional() }); -var IconSchema2 = objectType3({ - src: stringType3(), - mimeType: optionalType3(stringType3()), - sizes: optionalType3(stringType3()) -}).passthrough(); -var BaseMetadataSchema3 = objectType3({ - name: stringType3(), - title: optionalType3(stringType3()) -}).passthrough(); var ImplementationSchema3 = BaseMetadataSchema3.extend({ - version: stringType3(), - websiteUrl: optionalType3(stringType3()), - icons: optionalType3(arrayType3(IconSchema2)) + ...BaseMetadataSchema3.shape, + ...IconsSchema3.shape, + version: string7(), + websiteUrl: string7().optional() }); -var ClientCapabilitiesSchema3 = objectType3({ - experimental: optionalType3(objectType3({}).passthrough()), - sampling: optionalType3(objectType3({}).passthrough()), - elicitation: optionalType3(objectType3({}).passthrough()), - roots: optionalType3(objectType3({ listChanged: optionalType3(booleanType3()) }).passthrough()) +var FormElicitationCapabilitySchema3 = intersection3(object5({ applyDefaults: boolean6().optional() }), record3(string7(), unknown4())); +var ElicitationCapabilitySchema3 = preprocess3((value2) => { + if (value2 && typeof value2 === "object" && !Array.isArray(value2)) { + if (Object.keys(value2).length === 0) return { form: {} }; + } + return value2; +}, intersection3(object5({ + form: FormElicitationCapabilitySchema3.optional(), + url: AssertObjectSchema3.optional() +}), record3(string7(), unknown4()).optional())); +var ClientTasksCapabilitySchema3 = object5({ + list: optional3(object5({}).passthrough()), + cancel: optional3(object5({}).passthrough()), + requests: optional3(object5({ + sampling: optional3(object5({ createMessage: optional3(object5({}).passthrough()) }).passthrough()), + elicitation: optional3(object5({ create: optional3(object5({}).passthrough()) }).passthrough()) + }).passthrough()) }).passthrough(); +var ServerTasksCapabilitySchema3 = object5({ + list: optional3(object5({}).passthrough()), + cancel: optional3(object5({}).passthrough()), + requests: optional3(object5({ tools: optional3(object5({ call: optional3(object5({}).passthrough()) }).passthrough()) }).passthrough()) +}).passthrough(); +var ClientCapabilitiesSchema3 = object5({ + experimental: record3(string7(), AssertObjectSchema3).optional(), + sampling: object5({ + context: AssertObjectSchema3.optional(), + tools: AssertObjectSchema3.optional() + }).optional(), + elicitation: ElicitationCapabilitySchema3.optional(), + roots: object5({ listChanged: boolean6().optional() }).optional(), + tasks: optional3(ClientTasksCapabilitySchema3) +}); +var InitializeRequestParamsSchema3 = BaseRequestParamsSchema3.extend({ + protocolVersion: string7(), + capabilities: ClientCapabilitiesSchema3, + clientInfo: ImplementationSchema3 +}); var InitializeRequestSchema3 = RequestSchema3.extend({ - method: literalType3("initialize"), - params: BaseRequestParamsSchema3.extend({ - protocolVersion: stringType3(), - capabilities: ClientCapabilitiesSchema3, - clientInfo: ImplementationSchema3 - }) + method: literal3("initialize"), + params: InitializeRequestParamsSchema3 }); var isInitializeRequest = (value2) => InitializeRequestSchema3.safeParse(value2).success; -var ServerCapabilitiesSchema3 = objectType3({ - experimental: optionalType3(objectType3({}).passthrough()), - logging: optionalType3(objectType3({}).passthrough()), - completions: optionalType3(objectType3({}).passthrough()), - prompts: optionalType3(objectType3({ listChanged: optionalType3(booleanType3()) }).passthrough()), - resources: optionalType3(objectType3({ - subscribe: optionalType3(booleanType3()), - listChanged: optionalType3(booleanType3()) - }).passthrough()), - tools: optionalType3(objectType3({ listChanged: optionalType3(booleanType3()) }).passthrough()) +var ServerCapabilitiesSchema3 = object5({ + experimental: record3(string7(), AssertObjectSchema3).optional(), + logging: AssertObjectSchema3.optional(), + completions: AssertObjectSchema3.optional(), + prompts: optional3(object5({ listChanged: optional3(boolean6()) })), + resources: object5({ + subscribe: boolean6().optional(), + listChanged: boolean6().optional() + }).optional(), + tools: object5({ listChanged: boolean6().optional() }).optional(), + tasks: optional3(ServerTasksCapabilitySchema3) }).passthrough(); var InitializeResultSchema3 = ResultSchema3.extend({ - protocolVersion: stringType3(), + protocolVersion: string7(), capabilities: ServerCapabilitiesSchema3, serverInfo: ImplementationSchema3, - instructions: optionalType3(stringType3()) + instructions: string7().optional() +}); +var InitializedNotificationSchema3 = NotificationSchema3.extend({ method: literal3("notifications/initialized") }); +var PingRequestSchema3 = RequestSchema3.extend({ method: literal3("ping") }); +var ProgressSchema3 = object5({ + progress: number7(), + total: optional3(number7()), + message: optional3(string7()) +}); +var ProgressNotificationParamsSchema3 = object5({ + ...NotificationsParamsSchema3.shape, + ...ProgressSchema3.shape, + progressToken: ProgressTokenSchema3 }); -var InitializedNotificationSchema3 = NotificationSchema3.extend({ method: literalType3("notifications/initialized") }); -var PingRequestSchema3 = RequestSchema3.extend({ method: literalType3("ping") }); -var ProgressSchema3 = objectType3({ - progress: numberType3(), - total: optionalType3(numberType3()), - message: optionalType3(stringType3()) -}).passthrough(); var ProgressNotificationSchema3 = NotificationSchema3.extend({ - method: literalType3("notifications/progress"), - params: BaseNotificationParamsSchema3.merge(ProgressSchema3).extend({ progressToken: ProgressTokenSchema3 }) + method: literal3("notifications/progress"), + params: ProgressNotificationParamsSchema3 }); -var PaginatedRequestSchema3 = RequestSchema3.extend({ params: BaseRequestParamsSchema3.extend({ cursor: optionalType3(CursorSchema3) }).optional() }); -var PaginatedResultSchema3 = ResultSchema3.extend({ nextCursor: optionalType3(CursorSchema3) }); -var ResourceContentsSchema3 = objectType3({ - uri: stringType3(), - mimeType: optionalType3(stringType3()), - _meta: optionalType3(objectType3({}).passthrough()) -}).passthrough(); -var TextResourceContentsSchema3 = ResourceContentsSchema3.extend({ text: stringType3() }); -var Base64Schema3 = stringType3().refine((val) => { +var PaginatedRequestParamsSchema3 = BaseRequestParamsSchema3.extend({ cursor: CursorSchema3.optional() }); +var PaginatedRequestSchema3 = RequestSchema3.extend({ params: PaginatedRequestParamsSchema3.optional() }); +var PaginatedResultSchema3 = ResultSchema3.extend({ nextCursor: optional3(CursorSchema3) }); +var TaskSchema3 = object5({ + taskId: string7(), + status: _enum4([ + "working", + "input_required", + "completed", + "failed", + "cancelled" + ]), + ttl: union3([number7(), _null7()]), + createdAt: string7(), + lastUpdatedAt: string7(), + pollInterval: optional3(number7()), + statusMessage: optional3(string7()) +}); +var CreateTaskResultSchema3 = ResultSchema3.extend({ task: TaskSchema3 }); +var TaskStatusNotificationParamsSchema3 = NotificationsParamsSchema3.merge(TaskSchema3); +var TaskStatusNotificationSchema3 = NotificationSchema3.extend({ + method: literal3("notifications/tasks/status"), + params: TaskStatusNotificationParamsSchema3 +}); +var GetTaskRequestSchema3 = RequestSchema3.extend({ + method: literal3("tasks/get"), + params: BaseRequestParamsSchema3.extend({ taskId: string7() }) +}); +var GetTaskResultSchema3 = ResultSchema3.merge(TaskSchema3); +var GetTaskPayloadRequestSchema3 = RequestSchema3.extend({ + method: literal3("tasks/result"), + params: BaseRequestParamsSchema3.extend({ taskId: string7() }) +}); +var ListTasksRequestSchema3 = PaginatedRequestSchema3.extend({ method: literal3("tasks/list") }); +var ListTasksResultSchema3 = PaginatedResultSchema3.extend({ tasks: array3(TaskSchema3) }); +var CancelTaskRequestSchema3 = RequestSchema3.extend({ + method: literal3("tasks/cancel"), + params: BaseRequestParamsSchema3.extend({ taskId: string7() }) +}); +var CancelTaskResultSchema3 = ResultSchema3.merge(TaskSchema3); +var ResourceContentsSchema3 = object5({ + uri: string7(), + mimeType: optional3(string7()), + _meta: record3(string7(), unknown4()).optional() +}); +var TextResourceContentsSchema3 = ResourceContentsSchema3.extend({ text: string7() }); +var Base64Schema3 = string7().refine((val) => { try { atob(val); return true; - } catch (_a) { + } catch (_a2) { return false; } }, { message: "Invalid Base64 string" }); var BlobResourceContentsSchema3 = ResourceContentsSchema3.extend({ blob: Base64Schema3 }); -var ResourceSchema3 = BaseMetadataSchema3.extend({ - uri: stringType3(), - description: optionalType3(stringType3()), - mimeType: optionalType3(stringType3()), - icons: optionalType3(arrayType3(IconSchema2)), - _meta: optionalType3(objectType3({}).passthrough()) +var AnnotationsSchema3 = object5({ + audience: array3(_enum4(["user", "assistant"])).optional(), + priority: number7().min(0).max(1).optional(), + lastModified: datetime5({ offset: true }).optional() }); -var ResourceTemplateSchema3 = BaseMetadataSchema3.extend({ - uriTemplate: stringType3(), - description: optionalType3(stringType3()), - mimeType: optionalType3(stringType3()), - _meta: optionalType3(objectType3({}).passthrough()) +var ResourceSchema3 = object5({ + ...BaseMetadataSchema3.shape, + ...IconsSchema3.shape, + uri: string7(), + description: optional3(string7()), + mimeType: optional3(string7()), + annotations: AnnotationsSchema3.optional(), + _meta: optional3(looseObject3({})) }); -var ListResourcesRequestSchema3 = PaginatedRequestSchema3.extend({ method: literalType3("resources/list") }); -var ListResourcesResultSchema3 = PaginatedResultSchema3.extend({ resources: arrayType3(ResourceSchema3) }); -var ListResourceTemplatesRequestSchema3 = PaginatedRequestSchema3.extend({ method: literalType3("resources/templates/list") }); -var ListResourceTemplatesResultSchema3 = PaginatedResultSchema3.extend({ resourceTemplates: arrayType3(ResourceTemplateSchema3) }); +var ResourceTemplateSchema3 = object5({ + ...BaseMetadataSchema3.shape, + ...IconsSchema3.shape, + uriTemplate: string7(), + description: optional3(string7()), + mimeType: optional3(string7()), + annotations: AnnotationsSchema3.optional(), + _meta: optional3(looseObject3({})) +}); +var ListResourcesRequestSchema3 = PaginatedRequestSchema3.extend({ method: literal3("resources/list") }); +var ListResourcesResultSchema3 = PaginatedResultSchema3.extend({ resources: array3(ResourceSchema3) }); +var ListResourceTemplatesRequestSchema3 = PaginatedRequestSchema3.extend({ method: literal3("resources/templates/list") }); +var ListResourceTemplatesResultSchema3 = PaginatedResultSchema3.extend({ resourceTemplates: array3(ResourceTemplateSchema3) }); +var ResourceRequestParamsSchema3 = BaseRequestParamsSchema3.extend({ uri: string7() }); +var ReadResourceRequestParamsSchema3 = ResourceRequestParamsSchema3; var ReadResourceRequestSchema3 = RequestSchema3.extend({ - method: literalType3("resources/read"), - params: BaseRequestParamsSchema3.extend({ uri: stringType3() }) + method: literal3("resources/read"), + params: ReadResourceRequestParamsSchema3 }); -var ReadResourceResultSchema3 = ResultSchema3.extend({ contents: arrayType3(unionType3([TextResourceContentsSchema3, BlobResourceContentsSchema3])) }); -var ResourceListChangedNotificationSchema3 = NotificationSchema3.extend({ method: literalType3("notifications/resources/list_changed") }); +var ReadResourceResultSchema3 = ResultSchema3.extend({ contents: array3(union3([TextResourceContentsSchema3, BlobResourceContentsSchema3])) }); +var ResourceListChangedNotificationSchema3 = NotificationSchema3.extend({ method: literal3("notifications/resources/list_changed") }); +var SubscribeRequestParamsSchema3 = ResourceRequestParamsSchema3; var SubscribeRequestSchema3 = RequestSchema3.extend({ - method: literalType3("resources/subscribe"), - params: BaseRequestParamsSchema3.extend({ uri: stringType3() }) + method: literal3("resources/subscribe"), + params: SubscribeRequestParamsSchema3 }); +var UnsubscribeRequestParamsSchema3 = ResourceRequestParamsSchema3; var UnsubscribeRequestSchema3 = RequestSchema3.extend({ - method: literalType3("resources/unsubscribe"), - params: BaseRequestParamsSchema3.extend({ uri: stringType3() }) + method: literal3("resources/unsubscribe"), + params: UnsubscribeRequestParamsSchema3 }); +var ResourceUpdatedNotificationParamsSchema3 = NotificationsParamsSchema3.extend({ uri: string7() }); var ResourceUpdatedNotificationSchema3 = NotificationSchema3.extend({ - method: literalType3("notifications/resources/updated"), - params: BaseNotificationParamsSchema3.extend({ uri: stringType3() }) + method: literal3("notifications/resources/updated"), + params: ResourceUpdatedNotificationParamsSchema3 }); -var PromptArgumentSchema3 = objectType3({ - name: stringType3(), - description: optionalType3(stringType3()), - required: optionalType3(booleanType3()) -}).passthrough(); -var PromptSchema3 = BaseMetadataSchema3.extend({ - description: optionalType3(stringType3()), - arguments: optionalType3(arrayType3(PromptArgumentSchema3)), - icons: optionalType3(arrayType3(IconSchema2)), - _meta: optionalType3(objectType3({}).passthrough()) +var PromptArgumentSchema3 = object5({ + name: string7(), + description: optional3(string7()), + required: optional3(boolean6()) +}); +var PromptSchema3 = object5({ + ...BaseMetadataSchema3.shape, + ...IconsSchema3.shape, + description: optional3(string7()), + arguments: optional3(array3(PromptArgumentSchema3)), + _meta: optional3(looseObject3({})) +}); +var ListPromptsRequestSchema3 = PaginatedRequestSchema3.extend({ method: literal3("prompts/list") }); +var ListPromptsResultSchema3 = PaginatedResultSchema3.extend({ prompts: array3(PromptSchema3) }); +var GetPromptRequestParamsSchema3 = BaseRequestParamsSchema3.extend({ + name: string7(), + arguments: record3(string7(), string7()).optional() }); -var ListPromptsRequestSchema3 = PaginatedRequestSchema3.extend({ method: literalType3("prompts/list") }); -var ListPromptsResultSchema3 = PaginatedResultSchema3.extend({ prompts: arrayType3(PromptSchema3) }); var GetPromptRequestSchema3 = RequestSchema3.extend({ - method: literalType3("prompts/get"), - params: BaseRequestParamsSchema3.extend({ - name: stringType3(), - arguments: optionalType3(recordType3(stringType3())) - }) + method: literal3("prompts/get"), + params: GetPromptRequestParamsSchema3 }); -var TextContentSchema3 = objectType3({ - type: literalType3("text"), - text: stringType3(), - _meta: optionalType3(objectType3({}).passthrough()) -}).passthrough(); -var ImageContentSchema3 = objectType3({ - type: literalType3("image"), +var TextContentSchema3 = object5({ + type: literal3("text"), + text: string7(), + annotations: AnnotationsSchema3.optional(), + _meta: record3(string7(), unknown4()).optional() +}); +var ImageContentSchema3 = object5({ + type: literal3("image"), data: Base64Schema3, - mimeType: stringType3(), - _meta: optionalType3(objectType3({}).passthrough()) -}).passthrough(); -var AudioContentSchema3 = objectType3({ - type: literalType3("audio"), + mimeType: string7(), + annotations: AnnotationsSchema3.optional(), + _meta: record3(string7(), unknown4()).optional() +}); +var AudioContentSchema3 = object5({ + type: literal3("audio"), data: Base64Schema3, - mimeType: stringType3(), - _meta: optionalType3(objectType3({}).passthrough()) + mimeType: string7(), + annotations: AnnotationsSchema3.optional(), + _meta: record3(string7(), unknown4()).optional() +}); +var ToolUseContentSchema3 = object5({ + type: literal3("tool_use"), + name: string7(), + id: string7(), + input: object5({}).passthrough(), + _meta: optional3(object5({}).passthrough()) }).passthrough(); -var EmbeddedResourceSchema3 = objectType3({ - type: literalType3("resource"), - resource: unionType3([TextResourceContentsSchema3, BlobResourceContentsSchema3]), - _meta: optionalType3(objectType3({}).passthrough()) -}).passthrough(); -var ResourceLinkSchema3 = ResourceSchema3.extend({ type: literalType3("resource_link") }); -var ContentBlockSchema3 = unionType3([ +var EmbeddedResourceSchema3 = object5({ + type: literal3("resource"), + resource: union3([TextResourceContentsSchema3, BlobResourceContentsSchema3]), + annotations: AnnotationsSchema3.optional(), + _meta: record3(string7(), unknown4()).optional() +}); +var ResourceLinkSchema3 = ResourceSchema3.extend({ type: literal3("resource_link") }); +var ContentBlockSchema3 = union3([ TextContentSchema3, ImageContentSchema3, AudioContentSchema3, ResourceLinkSchema3, EmbeddedResourceSchema3 ]); -var PromptMessageSchema3 = objectType3({ - role: enumType3(["user", "assistant"]), +var PromptMessageSchema3 = object5({ + role: _enum4(["user", "assistant"]), content: ContentBlockSchema3 -}).passthrough(); +}); var GetPromptResultSchema3 = ResultSchema3.extend({ - description: optionalType3(stringType3()), - messages: arrayType3(PromptMessageSchema3) + description: optional3(string7()), + messages: array3(PromptMessageSchema3) }); -var PromptListChangedNotificationSchema3 = NotificationSchema3.extend({ method: literalType3("notifications/prompts/list_changed") }); -var ToolAnnotationsSchema3 = objectType3({ - title: optionalType3(stringType3()), - readOnlyHint: optionalType3(booleanType3()), - destructiveHint: optionalType3(booleanType3()), - idempotentHint: optionalType3(booleanType3()), - openWorldHint: optionalType3(booleanType3()) -}).passthrough(); -var ToolSchema3 = BaseMetadataSchema3.extend({ - description: optionalType3(stringType3()), - inputSchema: objectType3({ - type: literalType3("object"), - properties: optionalType3(objectType3({}).passthrough()), - required: optionalType3(arrayType3(stringType3())) - }).passthrough(), - outputSchema: optionalType3(objectType3({ - type: literalType3("object"), - properties: optionalType3(objectType3({}).passthrough()), - required: optionalType3(arrayType3(stringType3())) - }).passthrough()), - annotations: optionalType3(ToolAnnotationsSchema3), - icons: optionalType3(arrayType3(IconSchema2)), - _meta: optionalType3(objectType3({}).passthrough()) +var PromptListChangedNotificationSchema3 = NotificationSchema3.extend({ method: literal3("notifications/prompts/list_changed") }); +var ToolAnnotationsSchema3 = object5({ + title: string7().optional(), + readOnlyHint: boolean6().optional(), + destructiveHint: boolean6().optional(), + idempotentHint: boolean6().optional(), + openWorldHint: boolean6().optional() }); -var ListToolsRequestSchema3 = PaginatedRequestSchema3.extend({ method: literalType3("tools/list") }); -var ListToolsResultSchema3 = PaginatedResultSchema3.extend({ tools: arrayType3(ToolSchema3) }); +var ToolExecutionSchema3 = object5({ taskSupport: _enum4([ + "required", + "optional", + "forbidden" +]).optional() }); +var ToolSchema3 = object5({ + ...BaseMetadataSchema3.shape, + ...IconsSchema3.shape, + description: string7().optional(), + inputSchema: object5({ + type: literal3("object"), + properties: record3(string7(), AssertObjectSchema3).optional(), + required: array3(string7()).optional() + }).catchall(unknown4()), + outputSchema: object5({ + type: literal3("object"), + properties: record3(string7(), AssertObjectSchema3).optional(), + required: array3(string7()).optional() + }).catchall(unknown4()).optional(), + annotations: optional3(ToolAnnotationsSchema3), + execution: optional3(ToolExecutionSchema3), + _meta: record3(string7(), unknown4()).optional() +}); +var ListToolsRequestSchema3 = PaginatedRequestSchema3.extend({ method: literal3("tools/list") }); +var ListToolsResultSchema3 = PaginatedResultSchema3.extend({ tools: array3(ToolSchema3) }); var CallToolResultSchema3 = ResultSchema3.extend({ - content: arrayType3(ContentBlockSchema3).default([]), - structuredContent: objectType3({}).passthrough().optional(), - isError: optionalType3(booleanType3()) + content: array3(ContentBlockSchema3).default([]), + structuredContent: record3(string7(), unknown4()).optional(), + isError: optional3(boolean6()) +}); +var CompatibilityCallToolResultSchema3 = CallToolResultSchema3.or(ResultSchema3.extend({ toolResult: unknown4() })); +var CallToolRequestParamsSchema3 = BaseRequestParamsSchema3.extend({ + name: string7(), + arguments: optional3(record3(string7(), unknown4())) }); -var CompatibilityCallToolResultSchema3 = CallToolResultSchema3.or(ResultSchema3.extend({ toolResult: unknownType3() })); var CallToolRequestSchema3 = RequestSchema3.extend({ - method: literalType3("tools/call"), - params: BaseRequestParamsSchema3.extend({ - name: stringType3(), - arguments: optionalType3(recordType3(unknownType3())) - }) + method: literal3("tools/call"), + params: CallToolRequestParamsSchema3 }); -var ToolListChangedNotificationSchema3 = NotificationSchema3.extend({ method: literalType3("notifications/tools/list_changed") }); -var LoggingLevelSchema3 = enumType3([ +var ToolListChangedNotificationSchema3 = NotificationSchema3.extend({ method: literal3("notifications/tools/list_changed") }); +var LoggingLevelSchema3 = _enum4([ "debug", "info", "notice", @@ -107226,155 +117119,260 @@ var LoggingLevelSchema3 = enumType3([ "alert", "emergency" ]); +var SetLevelRequestParamsSchema3 = BaseRequestParamsSchema3.extend({ level: LoggingLevelSchema3 }); var SetLevelRequestSchema3 = RequestSchema3.extend({ - method: literalType3("logging/setLevel"), - params: BaseRequestParamsSchema3.extend({ level: LoggingLevelSchema3 }) + method: literal3("logging/setLevel"), + params: SetLevelRequestParamsSchema3 +}); +var LoggingMessageNotificationParamsSchema3 = NotificationsParamsSchema3.extend({ + level: LoggingLevelSchema3, + logger: string7().optional(), + data: unknown4() }); var LoggingMessageNotificationSchema3 = NotificationSchema3.extend({ - method: literalType3("notifications/message"), - params: BaseNotificationParamsSchema3.extend({ - level: LoggingLevelSchema3, - logger: optionalType3(stringType3()), - data: unknownType3() - }) + method: literal3("notifications/message"), + params: LoggingMessageNotificationParamsSchema3 }); -var ModelHintSchema3 = objectType3({ name: stringType3().optional() }).passthrough(); -var ModelPreferencesSchema3 = objectType3({ - hints: optionalType3(arrayType3(ModelHintSchema3)), - costPriority: optionalType3(numberType3().min(0).max(1)), - speedPriority: optionalType3(numberType3().min(0).max(1)), - intelligencePriority: optionalType3(numberType3().min(0).max(1)) +var ModelHintSchema3 = object5({ name: string7().optional() }); +var ModelPreferencesSchema3 = object5({ + hints: optional3(array3(ModelHintSchema3)), + costPriority: optional3(number7().min(0).max(1)), + speedPriority: optional3(number7().min(0).max(1)), + intelligencePriority: optional3(number7().min(0).max(1)) +}); +var ToolChoiceSchema3 = object5({ mode: optional3(_enum4([ + "auto", + "required", + "none" +])) }); +var ToolResultContentSchema3 = object5({ + type: literal3("tool_result"), + toolUseId: string7().describe("The unique identifier for the corresponding tool call."), + content: array3(ContentBlockSchema3).default([]), + structuredContent: object5({}).passthrough().optional(), + isError: optional3(boolean6()), + _meta: optional3(object5({}).passthrough()) }).passthrough(); -var SamplingMessageSchema3 = objectType3({ - role: enumType3(["user", "assistant"]), - content: unionType3([ - TextContentSchema3, - ImageContentSchema3, - AudioContentSchema3 - ]) +var SamplingContentSchema3 = discriminatedUnion3("type", [ + TextContentSchema3, + ImageContentSchema3, + AudioContentSchema3 +]); +var SamplingMessageContentBlockSchema3 = discriminatedUnion3("type", [ + TextContentSchema3, + ImageContentSchema3, + AudioContentSchema3, + ToolUseContentSchema3, + ToolResultContentSchema3 +]); +var SamplingMessageSchema3 = object5({ + role: _enum4(["user", "assistant"]), + content: union3([SamplingMessageContentBlockSchema3, array3(SamplingMessageContentBlockSchema3)]), + _meta: optional3(object5({}).passthrough()) }).passthrough(); +var CreateMessageRequestParamsSchema3 = BaseRequestParamsSchema3.extend({ + messages: array3(SamplingMessageSchema3), + modelPreferences: ModelPreferencesSchema3.optional(), + systemPrompt: string7().optional(), + includeContext: _enum4([ + "none", + "thisServer", + "allServers" + ]).optional(), + temperature: number7().optional(), + maxTokens: number7().int(), + stopSequences: array3(string7()).optional(), + metadata: AssertObjectSchema3.optional(), + tools: optional3(array3(ToolSchema3)), + toolChoice: optional3(ToolChoiceSchema3) +}); var CreateMessageRequestSchema3 = RequestSchema3.extend({ - method: literalType3("sampling/createMessage"), - params: BaseRequestParamsSchema3.extend({ - messages: arrayType3(SamplingMessageSchema3), - systemPrompt: optionalType3(stringType3()), - includeContext: optionalType3(enumType3([ - "none", - "thisServer", - "allServers" - ])), - temperature: optionalType3(numberType3()), - maxTokens: numberType3().int(), - stopSequences: optionalType3(arrayType3(stringType3())), - metadata: optionalType3(objectType3({}).passthrough()), - modelPreferences: optionalType3(ModelPreferencesSchema3) - }) + method: literal3("sampling/createMessage"), + params: CreateMessageRequestParamsSchema3 }); var CreateMessageResultSchema3 = ResultSchema3.extend({ - model: stringType3(), - stopReason: optionalType3(enumType3([ + model: string7(), + stopReason: optional3(_enum4([ "endTurn", "stopSequence", "maxTokens" - ]).or(stringType3())), - role: enumType3(["user", "assistant"]), - content: discriminatedUnionType3("type", [ - TextContentSchema3, - ImageContentSchema3, - AudioContentSchema3 - ]) + ]).or(string7())), + role: _enum4(["user", "assistant"]), + content: SamplingContentSchema3 }); -var BooleanSchemaSchema3 = objectType3({ - type: literalType3("boolean"), - title: optionalType3(stringType3()), - description: optionalType3(stringType3()), - default: optionalType3(booleanType3()) -}).passthrough(); -var StringSchemaSchema3 = objectType3({ - type: literalType3("string"), - title: optionalType3(stringType3()), - description: optionalType3(stringType3()), - minLength: optionalType3(numberType3()), - maxLength: optionalType3(numberType3()), - format: optionalType3(enumType3([ +var CreateMessageResultWithToolsSchema3 = ResultSchema3.extend({ + model: string7(), + stopReason: optional3(_enum4([ + "endTurn", + "stopSequence", + "maxTokens", + "toolUse" + ]).or(string7())), + role: _enum4(["user", "assistant"]), + content: union3([SamplingMessageContentBlockSchema3, array3(SamplingMessageContentBlockSchema3)]) +}); +var BooleanSchemaSchema3 = object5({ + type: literal3("boolean"), + title: string7().optional(), + description: string7().optional(), + default: boolean6().optional() +}); +var StringSchemaSchema3 = object5({ + type: literal3("string"), + title: string7().optional(), + description: string7().optional(), + minLength: number7().optional(), + maxLength: number7().optional(), + format: _enum4([ "email", "uri", "date", "date-time" - ])) -}).passthrough(); -var NumberSchemaSchema3 = objectType3({ - type: enumType3(["number", "integer"]), - title: optionalType3(stringType3()), - description: optionalType3(stringType3()), - minimum: optionalType3(numberType3()), - maximum: optionalType3(numberType3()) -}).passthrough(); -var EnumSchemaSchema3 = objectType3({ - type: literalType3("string"), - title: optionalType3(stringType3()), - description: optionalType3(stringType3()), - enum: arrayType3(stringType3()), - enumNames: optionalType3(arrayType3(stringType3())) -}).passthrough(); -var PrimitiveSchemaDefinitionSchema3 = unionType3([ + ]).optional(), + default: string7().optional() +}); +var NumberSchemaSchema3 = object5({ + type: _enum4(["number", "integer"]), + title: string7().optional(), + description: string7().optional(), + minimum: number7().optional(), + maximum: number7().optional(), + default: number7().optional() +}); +var UntitledSingleSelectEnumSchemaSchema3 = object5({ + type: literal3("string"), + title: string7().optional(), + description: string7().optional(), + enum: array3(string7()), + default: string7().optional() +}); +var TitledSingleSelectEnumSchemaSchema3 = object5({ + type: literal3("string"), + title: string7().optional(), + description: string7().optional(), + oneOf: array3(object5({ + const: string7(), + title: string7() + })), + default: string7().optional() +}); +var LegacyTitledEnumSchemaSchema3 = object5({ + type: literal3("string"), + title: string7().optional(), + description: string7().optional(), + enum: array3(string7()), + enumNames: array3(string7()).optional(), + default: string7().optional() +}); +var SingleSelectEnumSchemaSchema3 = union3([UntitledSingleSelectEnumSchemaSchema3, TitledSingleSelectEnumSchemaSchema3]); +var UntitledMultiSelectEnumSchemaSchema3 = object5({ + type: literal3("array"), + title: string7().optional(), + description: string7().optional(), + minItems: number7().optional(), + maxItems: number7().optional(), + items: object5({ + type: literal3("string"), + enum: array3(string7()) + }), + default: array3(string7()).optional() +}); +var TitledMultiSelectEnumSchemaSchema3 = object5({ + type: literal3("array"), + title: string7().optional(), + description: string7().optional(), + minItems: number7().optional(), + maxItems: number7().optional(), + items: object5({ anyOf: array3(object5({ + const: string7(), + title: string7() + })) }), + default: array3(string7()).optional() +}); +var MultiSelectEnumSchemaSchema3 = union3([UntitledMultiSelectEnumSchemaSchema3, TitledMultiSelectEnumSchemaSchema3]); +var EnumSchemaSchema3 = union3([ + LegacyTitledEnumSchemaSchema3, + SingleSelectEnumSchemaSchema3, + MultiSelectEnumSchemaSchema3 +]); +var PrimitiveSchemaDefinitionSchema3 = union3([ + EnumSchemaSchema3, BooleanSchemaSchema3, StringSchemaSchema3, - NumberSchemaSchema3, - EnumSchemaSchema3 + NumberSchemaSchema3 ]); -var ElicitRequestSchema3 = RequestSchema3.extend({ - method: literalType3("elicitation/create"), - params: BaseRequestParamsSchema3.extend({ - message: stringType3(), - requestedSchema: objectType3({ - type: literalType3("object"), - properties: recordType3(stringType3(), PrimitiveSchemaDefinitionSchema3), - required: optionalType3(arrayType3(stringType3())) - }).passthrough() +var ElicitRequestFormParamsSchema3 = BaseRequestParamsSchema3.extend({ + mode: literal3("form").optional(), + message: string7(), + requestedSchema: object5({ + type: literal3("object"), + properties: record3(string7(), PrimitiveSchemaDefinitionSchema3), + required: array3(string7()).optional() }) }); +var ElicitRequestURLParamsSchema3 = BaseRequestParamsSchema3.extend({ + mode: literal3("url"), + message: string7(), + elicitationId: string7(), + url: string7().url() +}); +var ElicitRequestParamsSchema3 = union3([ElicitRequestFormParamsSchema3, ElicitRequestURLParamsSchema3]); +var ElicitRequestSchema3 = RequestSchema3.extend({ + method: literal3("elicitation/create"), + params: ElicitRequestParamsSchema3 +}); +var ElicitationCompleteNotificationParamsSchema3 = NotificationsParamsSchema3.extend({ elicitationId: string7() }); +var ElicitationCompleteNotificationSchema3 = NotificationSchema3.extend({ + method: literal3("notifications/elicitation/complete"), + params: ElicitationCompleteNotificationParamsSchema3 +}); var ElicitResultSchema3 = ResultSchema3.extend({ - action: enumType3([ + action: _enum4([ "accept", "decline", "cancel" ]), - content: optionalType3(recordType3(stringType3(), unknownType3())) + content: preprocess3((val) => val === null ? void 0 : val, record3(string7(), union3([ + string7(), + number7(), + boolean6(), + array3(string7()) + ])).optional()) +}); +var ResourceTemplateReferenceSchema3 = object5({ + type: literal3("ref/resource"), + uri: string7() +}); +var PromptReferenceSchema3 = object5({ + type: literal3("ref/prompt"), + name: string7() +}); +var CompleteRequestParamsSchema3 = BaseRequestParamsSchema3.extend({ + ref: union3([PromptReferenceSchema3, ResourceTemplateReferenceSchema3]), + argument: object5({ + name: string7(), + value: string7() + }), + context: object5({ arguments: record3(string7(), string7()).optional() }).optional() }); -var ResourceTemplateReferenceSchema3 = objectType3({ - type: literalType3("ref/resource"), - uri: stringType3() -}).passthrough(); -var PromptReferenceSchema3 = objectType3({ - type: literalType3("ref/prompt"), - name: stringType3() -}).passthrough(); var CompleteRequestSchema3 = RequestSchema3.extend({ - method: literalType3("completion/complete"), - params: BaseRequestParamsSchema3.extend({ - ref: unionType3([PromptReferenceSchema3, ResourceTemplateReferenceSchema3]), - argument: objectType3({ - name: stringType3(), - value: stringType3() - }).passthrough(), - context: optionalType3(objectType3({ arguments: optionalType3(recordType3(stringType3(), stringType3())) })) - }) + method: literal3("completion/complete"), + params: CompleteRequestParamsSchema3 }); -var CompleteResultSchema3 = ResultSchema3.extend({ completion: objectType3({ - values: arrayType3(stringType3()).max(100), - total: optionalType3(numberType3().int()), - hasMore: optionalType3(booleanType3()) -}).passthrough() }); -var RootSchema3 = objectType3({ - uri: stringType3().startsWith("file://"), - name: optionalType3(stringType3()), - _meta: optionalType3(objectType3({}).passthrough()) -}).passthrough(); -var ListRootsRequestSchema3 = RequestSchema3.extend({ method: literalType3("roots/list") }); -var ListRootsResultSchema3 = ResultSchema3.extend({ roots: arrayType3(RootSchema3) }); -var RootsListChangedNotificationSchema3 = NotificationSchema3.extend({ method: literalType3("notifications/roots/list_changed") }); -var ClientRequestSchema3 = unionType3([ +var CompleteResultSchema3 = ResultSchema3.extend({ completion: looseObject3({ + values: array3(string7()).max(100), + total: optional3(number7().int()), + hasMore: optional3(boolean6()) +}) }); +var RootSchema3 = object5({ + uri: string7().startsWith("file://"), + name: string7().optional(), + _meta: record3(string7(), unknown4()).optional() +}); +var ListRootsRequestSchema3 = RequestSchema3.extend({ method: literal3("roots/list") }); +var ListRootsResultSchema3 = ResultSchema3.extend({ roots: array3(RootSchema3) }); +var RootsListChangedNotificationSchema3 = NotificationSchema3.extend({ method: literal3("notifications/roots/list_changed") }); +var ClientRequestSchema3 = union3([ PingRequestSchema3, InitializeRequestSchema3, CompleteRequestSchema3, @@ -107387,36 +117385,49 @@ var ClientRequestSchema3 = unionType3([ SubscribeRequestSchema3, UnsubscribeRequestSchema3, CallToolRequestSchema3, - ListToolsRequestSchema3 + ListToolsRequestSchema3, + GetTaskRequestSchema3, + GetTaskPayloadRequestSchema3, + ListTasksRequestSchema3 ]); -var ClientNotificationSchema3 = unionType3([ +var ClientNotificationSchema3 = union3([ CancelledNotificationSchema3, ProgressNotificationSchema3, InitializedNotificationSchema3, - RootsListChangedNotificationSchema3 + RootsListChangedNotificationSchema3, + TaskStatusNotificationSchema3 ]); -var ClientResultSchema3 = unionType3([ +var ClientResultSchema3 = union3([ EmptyResultSchema3, CreateMessageResultSchema3, + CreateMessageResultWithToolsSchema3, ElicitResultSchema3, - ListRootsResultSchema3 + ListRootsResultSchema3, + GetTaskResultSchema3, + ListTasksResultSchema3, + CreateTaskResultSchema3 ]); -var ServerRequestSchema3 = unionType3([ +var ServerRequestSchema3 = union3([ PingRequestSchema3, CreateMessageRequestSchema3, ElicitRequestSchema3, - ListRootsRequestSchema3 + ListRootsRequestSchema3, + GetTaskRequestSchema3, + GetTaskPayloadRequestSchema3, + ListTasksRequestSchema3 ]); -var ServerNotificationSchema3 = unionType3([ +var ServerNotificationSchema3 = union3([ CancelledNotificationSchema3, ProgressNotificationSchema3, LoggingMessageNotificationSchema3, ResourceUpdatedNotificationSchema3, ResourceListChangedNotificationSchema3, ToolListChangedNotificationSchema3, - PromptListChangedNotificationSchema3 + PromptListChangedNotificationSchema3, + TaskStatusNotificationSchema3, + ElicitationCompleteNotificationSchema3 ]); -var ServerResultSchema3 = unionType3([ +var ServerResultSchema3 = union3([ EmptyResultSchema3, InitializeResultSchema3, CompleteResultSchema3, @@ -107426,15 +117437,18 @@ var ServerResultSchema3 = unionType3([ ListResourceTemplatesResultSchema3, ReadResourceResultSchema3, CallToolResultSchema3, - ListToolsResultSchema3 + ListToolsResultSchema3, + GetTaskResultSchema3, + ListTasksResultSchema3, + CreateTaskResultSchema3 ]); -var require_bytes = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/bytes@3.1.2/node_modules/bytes/index.js": ((exports, module) => { +var require_bytes = /* @__PURE__ */ __commonJSMin(((exports, module) => { module.exports = bytes$1; - module.exports.format = format2; - module.exports.parse = parse$1; + module.exports.format = format$1; + module.exports.parse = parse$2; var formatThousandsRegExp = /\B(?=(\d{3})+(?!\d))/g; var formatDecimalsRegExp = /(?:\.0*|(\.[^0]+)0+)$/; - var map = { + var map2 = { b: 1, kb: 1024, mb: 1 << 20, @@ -107444,11 +117458,11 @@ var require_bytes = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/bytes@3.1. }; var parseRegExp = /^((-|\+)?(\d+(?:\.\d+)?)) *(kb|mb|gb|tb|pb)$/i; function bytes$1(value2, options) { - if (typeof value2 === "string") return parse$1(value2); - if (typeof value2 === "number") return format2(value2, options); + if (typeof value2 === "string") return parse$2(value2); + if (typeof value2 === "number") return format$1(value2, options); return null; } - function format2(value2, options) { + function format$1(value2, options) { if (!Number.isFinite(value2)) return null; var mag = Math.abs(value2); var thousandsSeparator = options && options.thousandsSeparator || ""; @@ -107456,20 +117470,20 @@ var require_bytes = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/bytes@3.1. var decimalPlaces = options && options.decimalPlaces !== void 0 ? options.decimalPlaces : 2; var fixedDecimals = Boolean(options && options.fixedDecimals); var unit = options && options.unit || ""; - if (!unit || !map[unit.toLowerCase()]) if (mag >= map.pb) unit = "PB"; - else if (mag >= map.tb) unit = "TB"; - else if (mag >= map.gb) unit = "GB"; - else if (mag >= map.mb) unit = "MB"; - else if (mag >= map.kb) unit = "KB"; + if (!unit || !map2[unit.toLowerCase()]) if (mag >= map2.pb) unit = "PB"; + else if (mag >= map2.tb) unit = "TB"; + else if (mag >= map2.gb) unit = "GB"; + else if (mag >= map2.mb) unit = "MB"; + else if (mag >= map2.kb) unit = "KB"; else unit = "B"; - var str = (value2 / map[unit.toLowerCase()]).toFixed(decimalPlaces); - if (!fixedDecimals) str = str.replace(formatDecimalsRegExp, "$1"); - if (thousandsSeparator) str = str.split(".").map(function(s, i$3) { + var str$1 = (value2 / map2[unit.toLowerCase()]).toFixed(decimalPlaces); + if (!fixedDecimals) str$1 = str$1.replace(formatDecimalsRegExp, "$1"); + if (thousandsSeparator) str$1 = str$1.split(".").map(function(s, i$3) { return i$3 === 0 ? s.replace(formatThousandsRegExp, thousandsSeparator) : s; }).join("."); - return str + unitSeparator + unit; + return str$1 + unitSeparator + unit; } - function parse$1(val) { + function parse$2(val) { if (typeof val === "number" && !isNaN(val)) return val; if (typeof val !== "string") return null; var results = parseRegExp.exec(val); @@ -107483,15 +117497,15 @@ var require_bytes = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/bytes@3.1. unit = results[4].toLowerCase(); } if (isNaN(floatValue)) return null; - return Math.floor(map[unit] * floatValue); + return Math.floor(map2[unit] * floatValue); } -}) }); -var require_depd = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/depd@2.0.0/node_modules/depd/index.js": ((exports, module) => { +})); +var require_depd = /* @__PURE__ */ __commonJSMin(((exports, module) => { var relative = __require2("path").relative; module.exports = depd; var basePath = process.cwd(); - function containsNamespace(str, namespace) { - var vals = str.split(/[ ,]+/); + function containsNamespace(str$1, namespace) { + var vals = str$1.split(/[ ,]+/); var ns = String(namespace).toLowerCase(); for (var i$3 = 0; i$3 < vals.length; i$3++) { var val = vals[i$3]; @@ -107514,24 +117528,23 @@ var require_depd = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/depd@2.0.0/ return descriptor; } function createArgumentsString(arity) { - var str = ""; - for (var i$3 = 0; i$3 < arity; i$3++) str += ", arg" + i$3; - return str.substr(2); + var str$1 = ""; + for (var i$3 = 0; i$3 < arity; i$3++) str$1 += ", arg" + i$3; + return str$1.substr(2); } function createStackString(stack) { - var str = this.name + ": " + this.namespace; - if (this.message) str += " deprecated " + this.message; - for (var i$3 = 0; i$3 < stack.length; i$3++) str += "\n at " + stack[i$3].toString(); - return str; + var str$1 = this.name + ": " + this.namespace; + if (this.message) str$1 += " deprecated " + this.message; + for (var i$3 = 0; i$3 < stack.length; i$3++) str$1 += "\n at " + stack[i$3].toString(); + return str$1; } function depd(namespace) { if (!namespace) throw new TypeError("argument namespace is required"); - var stack = getStack(); - var file = callSiteLocation(stack[1])[0]; + var file2 = callSiteLocation(getStack()[1])[0]; function deprecate$1(message) { log2.call(deprecate$1, message); } - deprecate$1._file = file; + deprecate$1._file = file2; deprecate$1._ignored = isignored(namespace); deprecate$1._namespace = namespace; deprecate$1._traced = istraced(namespace); @@ -107545,13 +117558,11 @@ var require_depd = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/depd@2.0.0/ } function isignored(namespace) { if (process.noDeprecation) return true; - var str = process.env.NO_DEPRECATION || ""; - return containsNamespace(str, namespace); + return containsNamespace(process.env.NO_DEPRECATION || "", namespace); } function istraced(namespace) { if (process.traceDeprecation) return true; - var str = process.env.TRACE_DEPRECATION || ""; - return containsNamespace(str, namespace); + return containsNamespace(process.env.TRACE_DEPRECATION || "", namespace); } function log2(message, site) { var haslisteners = eehaslisteners(process, "deprecation"); @@ -107563,12 +117574,12 @@ var require_depd = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/depd@2.0.0/ var i$3 = 0; var seen = false; var stack = getStack(); - var file = this._file; + var file2 = this._file; if (site) { depSite = site; callSite = callSiteLocation(stack[1]); callSite.name = depSite.name; - file = callSite[0]; + file2 = callSite[0]; } else { i$3 = 2; depSite = callSiteLocation(stack[i$3]); @@ -107577,8 +117588,8 @@ var require_depd = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/depd@2.0.0/ for (; i$3 < stack.length; i$3++) { caller = callSiteLocation(stack[i$3]); callFile = caller[0]; - if (callFile === file) seen = true; - else if (callFile === this._file) file = this._file; + if (callFile === file2) seen = true; + else if (callFile === this._file) file2 = this._file; else if (seen) break; } var key$1 = caller ? depSite.join(":") + "__" + caller.join(":") : void 0; @@ -107595,13 +117606,13 @@ var require_depd = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/depd@2.0.0/ process.stderr.write(output + "\n", "utf8"); } function callSiteLocation(callSite) { - var file = callSite.getFileName() || ""; - var line = callSite.getLineNumber(); + var file2 = callSite.getFileName() || ""; + var line$1 = callSite.getLineNumber(); var colm = callSite.getColumnNumber(); - if (callSite.isEval()) file = callSite.getEvalOrigin() + ", " + file; + if (callSite.isEval()) file2 = callSite.getEvalOrigin() + ", " + file2; var site = [ - file, - line, + file2, + line$1, colm ]; site.callSite = callSite; @@ -107657,8 +117668,7 @@ var require_depd = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/depd@2.0.0/ function wrapfunction(fn2, message) { if (typeof fn2 !== "function") throw new TypeError("argument fn must be a function"); var args3 = createArgumentsString(fn2.length); - var stack = getStack(); - var site = callSiteLocation(stack[1]); + var site = callSiteLocation(getStack()[1]); site.name = fn2.name; return new Function("fn", "log", "deprecate", "message", "site", '"use strict"\nreturn function (' + args3 + ") {log.call(deprecate, message, site)\nreturn fn.apply(this, arguments)\n}")(fn2, log2, this, message, site); } @@ -107668,45 +117678,44 @@ var require_depd = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/depd@2.0.0/ if (!descriptor) throw new TypeError("must call property on owner object"); if (!descriptor.configurable) throw new TypeError("property must be configurable"); var deprecate$1 = this; - var stack = getStack(); - var site = callSiteLocation(stack[1]); + var site = callSiteLocation(getStack()[1]); site.name = prop; if ("value" in descriptor) descriptor = convertDataDescriptorToAccessor(obj, prop, message); var get2 = descriptor.get; - var set = descriptor.set; + var set2 = descriptor.set; if (typeof get2 === "function") descriptor.get = function getter() { log2.call(deprecate$1, message, site); return get2.apply(this, arguments); }; - if (typeof set === "function") descriptor.set = function setter() { + if (typeof set2 === "function") descriptor.set = function setter() { log2.call(deprecate$1, message, site); - return set.apply(this, arguments); + return set2.apply(this, arguments); }; Object.defineProperty(obj, prop, descriptor); } function DeprecationError(namespace, message, stack) { - var error41 = /* @__PURE__ */ new Error(); + var error$1 = /* @__PURE__ */ new Error(); var stackString; - Object.defineProperty(error41, "constructor", { value: DeprecationError }); - Object.defineProperty(error41, "message", { + Object.defineProperty(error$1, "constructor", { value: DeprecationError }); + Object.defineProperty(error$1, "message", { configurable: true, enumerable: false, value: message, writable: true }); - Object.defineProperty(error41, "name", { + Object.defineProperty(error$1, "name", { enumerable: false, configurable: true, value: "DeprecationError", writable: true }); - Object.defineProperty(error41, "namespace", { + Object.defineProperty(error$1, "namespace", { configurable: true, enumerable: false, value: namespace, writable: true }); - Object.defineProperty(error41, "stack", { + Object.defineProperty(error$1, "stack", { configurable: true, enumerable: false, get: function() { @@ -107717,10 +117726,10 @@ var require_depd = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/depd@2.0.0/ stackString = val; } }); - return error41; + return error$1; } -}) }); -var require_setprototypeof = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/setprototypeof@1.2.0/node_modules/setprototypeof/index.js": ((exports, module) => { +})); +var require_setprototypeof = /* @__PURE__ */ __commonJSMin(((exports, module) => { module.exports = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array ? setProtoOf : mixinProperties); function setProtoOf(obj, proto) { obj.__proto__ = proto; @@ -107730,8 +117739,8 @@ var require_setprototypeof = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/s for (var prop in proto) if (!Object.prototype.hasOwnProperty.call(obj, prop)) obj[prop] = proto[prop]; return obj; } -}) }); -var require_codes = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/statuses@2.0.1/node_modules/statuses/codes.json": ((exports, module) => { +})); +var require_codes = /* @__PURE__ */ __commonJSMin(((exports, module) => { module.exports = { "100": "Continue", "101": "Switching Protocols", @@ -107797,8 +117806,8 @@ var require_codes = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/statuses@2 "510": "Not Extended", "511": "Network Authentication Required" }; -}) }); -var require_statuses = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/statuses@2.0.1/node_modules/statuses/index.js": ((exports, module) => { +})); +var require_statuses = /* @__PURE__ */ __commonJSMin(((exports, module) => { var codes = require_codes(); module.exports = status; status.message = codes; @@ -107853,8 +117862,8 @@ var require_statuses = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/statuse if (!isNaN(n)) return getStatusMessage(n); return getStatusCode(code); } -}) }); -var require_inherits_browser = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits_browser.js": ((exports, module) => { +})); +var require_inherits_browser = /* @__PURE__ */ __commonJSMin(((exports, module) => { if (typeof Object.create === "function") module.exports = function inherits$1(ctor, superCtor) { if (superCtor) { ctor.super_ = superCtor; @@ -107876,25 +117885,25 @@ var require_inherits_browser = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm ctor.prototype.constructor = ctor; } }; -}) }); -var require_inherits = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits.js": ((exports, module) => { +})); +var require_inherits = /* @__PURE__ */ __commonJSMin(((exports, module) => { try { - var util$5 = __require2("util"); - if (typeof util$5.inherits !== "function") throw ""; - module.exports = util$5.inherits; + var util3 = __require2("util"); + if (typeof util3.inherits !== "function") throw ""; + module.exports = util3.inherits; } catch (e) { module.exports = require_inherits_browser(); } -}) }); -var require_toidentifier = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/toidentifier@1.0.1/node_modules/toidentifier/index.js": ((exports, module) => { +})); +var require_toidentifier = /* @__PURE__ */ __commonJSMin(((exports, module) => { module.exports = toIdentifier$1; - function toIdentifier$1(str) { - return str.split(" ").map(function(token) { + function toIdentifier$1(str$1) { + return str$1.split(" ").map(function(token) { return token.slice(0, 1).toUpperCase() + token.slice(1); }).join("").replace(/[^ _0-9a-z]/gi, ""); } -}) }); -var require_http_errors = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/http-errors@2.0.0/node_modules/http-errors/index.js": ((exports, module) => { +})); +var require_http_errors = /* @__PURE__ */ __commonJSMin(((exports, module) => { var deprecate = require_depd()("http-errors"); var setPrototypeOf = require_setprototypeof(); var statuses = require_statuses(); @@ -108035,8 +118044,8 @@ var require_http_errors = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/http function toClassName(name) { return name.substr(-5) !== "Error" ? name + "Error" : name; } -}) }); -var require_safer = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/safer-buffer@2.1.2/node_modules/safer-buffer/safer.js": ((exports, module) => { +})); +var require_safer = /* @__PURE__ */ __commonJSMin(((exports, module) => { var buffer = __require2("buffer"); var Buffer$9 = buffer.Buffer; var safer = {}; @@ -108076,20 +118085,20 @@ var require_safer = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/safer-buff if (safer.kStringMaxLength) safer.constants.MAX_STRING_LENGTH = safer.kStringMaxLength; } module.exports = safer; -}) }); -var require_bom_handling = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/iconv-lite@0.7.0/node_modules/iconv-lite/lib/bom-handling.js": ((exports) => { +})); +var require_bom_handling = /* @__PURE__ */ __commonJSMin(((exports) => { var BOMChar = "\uFEFF"; exports.PrependBOM = PrependBOMWrapper; function PrependBOMWrapper(encoder, options) { this.encoder = encoder; this.addBOM = true; } - PrependBOMWrapper.prototype.write = function(str) { + PrependBOMWrapper.prototype.write = function(str$1) { if (this.addBOM) { - str = BOMChar + str; + str$1 = BOMChar + str$1; this.addBOM = false; } - return this.encoder.write(str); + return this.encoder.write(str$1); }; PrependBOMWrapper.prototype.end = function() { return this.encoder.end(); @@ -108113,15 +118122,15 @@ var require_bom_handling = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/ico StripBOMWrapper.prototype.end = function() { return this.decoder.end(); }; -}) }); -var require_merge_exports = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/iconv-lite@0.7.0/node_modules/iconv-lite/lib/helpers/merge-exports.js": ((exports, module) => { +})); +var require_merge_exports = /* @__PURE__ */ __commonJSMin(((exports, module) => { var hasOwn2 = typeof Object.hasOwn === "undefined" ? Function.call.bind(Object.prototype.hasOwnProperty) : Object.hasOwn; function mergeModules$2(target, module$2) { for (var key$1 in module$2) if (hasOwn2(module$2, key$1)) target[key$1] = module$2[key$1]; } module.exports = mergeModules$2; -}) }); -var require_internal = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/iconv-lite@0.7.0/node_modules/iconv-lite/encodings/internal.js": ((exports, module) => { +})); +var require_internal = /* @__PURE__ */ __commonJSMin(((exports, module) => { var Buffer$8 = require_safer().Buffer; module.exports = { utf8: { @@ -108160,8 +118169,8 @@ var require_internal = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/iconv-l InternalCodec.prototype.encoder = InternalEncoder; InternalCodec.prototype.decoder = InternalDecoder; var StringDecoder = __require2("string_decoder").StringDecoder; - function InternalDecoder(options, codec) { - this.decoder = new StringDecoder(codec.enc); + function InternalDecoder(options, codec2) { + this.decoder = new StringDecoder(codec2.enc); } InternalDecoder.prototype.write = function(buf) { if (!Buffer$8.isBuffer(buf)) buf = Buffer$8.from(buf); @@ -108170,34 +118179,34 @@ var require_internal = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/iconv-l InternalDecoder.prototype.end = function() { return this.decoder.end(); }; - function InternalEncoder(options, codec) { - this.enc = codec.enc; + function InternalEncoder(options, codec2) { + this.enc = codec2.enc; } - InternalEncoder.prototype.write = function(str) { - return Buffer$8.from(str, this.enc); + InternalEncoder.prototype.write = function(str$1) { + return Buffer$8.from(str$1, this.enc); }; InternalEncoder.prototype.end = function() { }; - function InternalEncoderBase64(options, codec) { + function InternalEncoderBase64(options, codec2) { this.prevStr = ""; } - InternalEncoderBase64.prototype.write = function(str) { - str = this.prevStr + str; - var completeQuads = str.length - str.length % 4; - this.prevStr = str.slice(completeQuads); - str = str.slice(0, completeQuads); - return Buffer$8.from(str, "base64"); + InternalEncoderBase64.prototype.write = function(str$1) { + str$1 = this.prevStr + str$1; + var completeQuads = str$1.length - str$1.length % 4; + this.prevStr = str$1.slice(completeQuads); + str$1 = str$1.slice(0, completeQuads); + return Buffer$8.from(str$1, "base64"); }; InternalEncoderBase64.prototype.end = function() { return Buffer$8.from(this.prevStr, "base64"); }; - function InternalEncoderCesu8(options, codec) { + function InternalEncoderCesu8(options, codec2) { } - InternalEncoderCesu8.prototype.write = function(str) { - var buf = Buffer$8.alloc(str.length * 3); + InternalEncoderCesu8.prototype.write = function(str$1) { + var buf = Buffer$8.alloc(str$1.length * 3); var bufIdx = 0; - for (var i$3 = 0; i$3 < str.length; i$3++) { - var charCode = str.charCodeAt(i$3); + for (var i$3 = 0; i$3 < str$1.length; i$3++) { + var charCode = str$1.charCodeAt(i$3); if (charCode < 128) buf[bufIdx++] = charCode; else if (charCode < 2048) { buf[bufIdx++] = 192 + (charCode >>> 6); @@ -108212,11 +118221,11 @@ var require_internal = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/iconv-l }; InternalEncoderCesu8.prototype.end = function() { }; - function InternalDecoderCesu8(options, codec) { + function InternalDecoderCesu8(options, codec2) { this.acc = 0; this.contBytes = 0; this.accBytes = 0; - this.defaultCharUnicode = codec.defaultCharUnicode; + this.defaultCharUnicode = codec2.defaultCharUnicode; } InternalDecoderCesu8.prototype.write = function(buf) { var acc = this.acc; @@ -108259,32 +118268,32 @@ var require_internal = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/iconv-l if (this.contBytes > 0) res += this.defaultCharUnicode; return res; }; - function InternalEncoderUtf8(options, codec) { + function InternalEncoderUtf8(options, codec2) { this.highSurrogate = ""; } - InternalEncoderUtf8.prototype.write = function(str) { + InternalEncoderUtf8.prototype.write = function(str$1) { if (this.highSurrogate) { - str = this.highSurrogate + str; + str$1 = this.highSurrogate + str$1; this.highSurrogate = ""; } - if (str.length > 0) { - var charCode = str.charCodeAt(str.length - 1); + if (str$1.length > 0) { + var charCode = str$1.charCodeAt(str$1.length - 1); if (charCode >= 55296 && charCode < 56320) { - this.highSurrogate = str[str.length - 1]; - str = str.slice(0, str.length - 1); + this.highSurrogate = str$1[str$1.length - 1]; + str$1 = str$1.slice(0, str$1.length - 1); } } - return Buffer$8.from(str, this.enc); + return Buffer$8.from(str$1, this.enc); }; InternalEncoderUtf8.prototype.end = function() { if (this.highSurrogate) { - var str = this.highSurrogate; + var str$1 = this.highSurrogate; this.highSurrogate = ""; - return Buffer$8.from(str, this.enc); + return Buffer$8.from(str$1, this.enc); } }; -}) }); -var require_utf32 = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/iconv-lite@0.7.0/node_modules/iconv-lite/encodings/utf32.js": ((exports) => { +})); +var require_utf32 = /* @__PURE__ */ __commonJSMin(((exports) => { var Buffer$7 = require_safer().Buffer; exports._utf32 = Utf32Codec; function Utf32Codec(codecOptions, iconv$2) { @@ -108304,12 +118313,12 @@ var require_utf32 = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/iconv-lite exports.ucs4be = "utf32be"; Utf32Codec.prototype.encoder = Utf32Encoder; Utf32Codec.prototype.decoder = Utf32Decoder; - function Utf32Encoder(options, codec) { - this.isLE = codec.isLE; + function Utf32Encoder(options, codec2) { + this.isLE = codec2.isLE; this.highSurrogate = 0; } - Utf32Encoder.prototype.write = function(str) { - var src = Buffer$7.from(str, "ucs2"); + Utf32Encoder.prototype.write = function(str$1) { + var src = Buffer$7.from(str$1, "ucs2"); var dst = Buffer$7.alloc(src.length * 2); var write32 = this.isLE ? dst.writeUInt32LE : dst.writeUInt32BE; var offset = 0; @@ -108345,9 +118354,9 @@ var require_utf32 = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/iconv-lite this.highSurrogate = 0; return buf; }; - function Utf32Decoder(options, codec) { - this.isLE = codec.isLE; - this.badChar = codec.iconv.defaultCharUnicode.charCodeAt(0); + function Utf32Decoder(options, codec2) { + this.isLE = codec2.isLE; + this.badChar = codec2.iconv.defaultCharUnicode.charCodeAt(0); this.overflow = []; } Utf32Decoder.prototype.write = function(src) { @@ -108399,23 +118408,23 @@ var require_utf32 = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/iconv-lite } Utf32AutoCodec.prototype.encoder = Utf32AutoEncoder; Utf32AutoCodec.prototype.decoder = Utf32AutoDecoder; - function Utf32AutoEncoder(options, codec) { + function Utf32AutoEncoder(options, codec2) { options = options || {}; if (options.addBOM === void 0) options.addBOM = true; - this.encoder = codec.iconv.getEncoder(options.defaultEncoding || "utf-32le", options); + this.encoder = codec2.iconv.getEncoder(options.defaultEncoding || "utf-32le", options); } - Utf32AutoEncoder.prototype.write = function(str) { - return this.encoder.write(str); + Utf32AutoEncoder.prototype.write = function(str$1) { + return this.encoder.write(str$1); }; Utf32AutoEncoder.prototype.end = function() { return this.encoder.end(); }; - function Utf32AutoDecoder(options, codec) { + function Utf32AutoDecoder(options, codec2) { this.decoder = null; this.initialBufs = []; this.initialBufsLen = 0; this.options = options || {}; - this.iconv = codec.iconv; + this.iconv = codec2.iconv; } Utf32AutoDecoder.prototype.write = function(buf) { if (!this.decoder) { @@ -108474,8 +118483,8 @@ var require_utf32 = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/iconv-lite if (bmpCharsBE - invalidBE < bmpCharsLE - invalidLE) return "utf-32le"; return defaultEncoding || "utf-32le"; } -}) }); -var require_utf16 = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/iconv-lite@0.7.0/node_modules/iconv-lite/encodings/utf16.js": ((exports) => { +})); +var require_utf16 = /* @__PURE__ */ __commonJSMin(((exports) => { var Buffer$6 = require_safer().Buffer; exports.utf16be = Utf16BECodec; function Utf16BECodec() { @@ -108485,8 +118494,8 @@ var require_utf16 = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/iconv-lite Utf16BECodec.prototype.bomAware = true; function Utf16BEEncoder() { } - Utf16BEEncoder.prototype.write = function(str) { - var buf = Buffer$6.from(str, "ucs2"); + Utf16BEEncoder.prototype.write = function(str$1) { + var buf = Buffer$6.from(str$1, "ucs2"); for (var i$3 = 0; i$3 < buf.length; i$3 += 2) { var tmp = buf[i$3]; buf[i$3] = buf[i$3 + 1]; @@ -108526,23 +118535,23 @@ var require_utf16 = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/iconv-lite } Utf16Codec.prototype.encoder = Utf16Encoder; Utf16Codec.prototype.decoder = Utf16Decoder; - function Utf16Encoder(options, codec) { + function Utf16Encoder(options, codec2) { options = options || {}; if (options.addBOM === void 0) options.addBOM = true; - this.encoder = codec.iconv.getEncoder("utf-16le", options); + this.encoder = codec2.iconv.getEncoder("utf-16le", options); } - Utf16Encoder.prototype.write = function(str) { - return this.encoder.write(str); + Utf16Encoder.prototype.write = function(str$1) { + return this.encoder.write(str$1); }; Utf16Encoder.prototype.end = function() { return this.encoder.end(); }; - function Utf16Decoder(options, codec) { + function Utf16Decoder(options, codec2) { this.decoder = null; this.initialBufs = []; this.initialBufsLen = 0; this.options = options || {}; - this.iconv = codec.iconv; + this.iconv = codec2.iconv; } Utf16Decoder.prototype.write = function(buf) { if (!this.decoder) { @@ -108597,8 +118606,8 @@ var require_utf16 = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/iconv-lite if (asciiCharsBE < asciiCharsLE) return "utf-16le"; return defaultEncoding || "utf-16le"; } -}) }); -var require_utf7 = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/iconv-lite@0.7.0/node_modules/iconv-lite/encodings/utf7.js": ((exports) => { +})); +var require_utf7 = /* @__PURE__ */ __commonJSMin(((exports) => { var Buffer$5 = require_safer().Buffer; exports.utf7 = Utf7Codec; exports.unicode11utf7 = "utf7"; @@ -108609,18 +118618,18 @@ var require_utf7 = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/iconv-lite@ Utf7Codec.prototype.decoder = Utf7Decoder; Utf7Codec.prototype.bomAware = true; var nonDirectChars = /[^A-Za-z0-9'\(\),-\.\/:\? \n\r\t]+/g; - function Utf7Encoder(options, codec) { - this.iconv = codec.iconv; + function Utf7Encoder(options, codec2) { + this.iconv = codec2.iconv; } - Utf7Encoder.prototype.write = function(str) { - return Buffer$5.from(str.replace(nonDirectChars, function(chunk) { + Utf7Encoder.prototype.write = function(str$1) { + return Buffer$5.from(str$1.replace(nonDirectChars, function(chunk) { return "+" + (chunk === "+" ? "" : this.iconv.encode(chunk, "utf16-be").toString("base64").replace(/=+$/, "")) + "-"; }.bind(this))); }; Utf7Encoder.prototype.end = function() { }; - function Utf7Decoder(options, codec) { - this.iconv = codec.iconv; + function Utf7Decoder(options, codec2) { + this.iconv = codec2.iconv; this.inBase64 = false; this.base64Accum = ""; } @@ -108678,20 +118687,20 @@ var require_utf7 = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/iconv-lite@ Utf7IMAPCodec.prototype.encoder = Utf7IMAPEncoder; Utf7IMAPCodec.prototype.decoder = Utf7IMAPDecoder; Utf7IMAPCodec.prototype.bomAware = true; - function Utf7IMAPEncoder(options, codec) { - this.iconv = codec.iconv; + function Utf7IMAPEncoder(options, codec2) { + this.iconv = codec2.iconv; this.inBase64 = false; this.base64Accum = Buffer$5.alloc(6); this.base64AccumIdx = 0; } - Utf7IMAPEncoder.prototype.write = function(str) { + Utf7IMAPEncoder.prototype.write = function(str$1) { var inBase64 = this.inBase64; var base64Accum = this.base64Accum; var base64AccumIdx = this.base64AccumIdx; - var buf = Buffer$5.alloc(str.length * 5 + 10); + var buf = Buffer$5.alloc(str$1.length * 5 + 10); var bufIdx = 0; - for (var i$3 = 0; i$3 < str.length; i$3++) { - var uChar = str.charCodeAt(i$3); + for (var i$3 = 0; i$3 < str$1.length; i$3++) { + var uChar = str$1.charCodeAt(i$3); if (uChar >= 32 && uChar <= 126) { if (inBase64) { if (base64AccumIdx > 0) { @@ -108737,8 +118746,8 @@ var require_utf7 = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/iconv-lite@ } return buf.slice(0, bufIdx); }; - function Utf7IMAPDecoder(options, codec) { - this.iconv = codec.iconv; + function Utf7IMAPDecoder(options, codec2) { + this.iconv = codec2.iconv; this.inBase64 = false; this.base64Accum = ""; } @@ -108785,8 +118794,8 @@ var require_utf7 = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/iconv-lite@ this.base64Accum = ""; return res; }; -}) }); -var require_sbcs_codec = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/iconv-lite@0.7.0/node_modules/iconv-lite/encodings/sbcs-codec.js": ((exports) => { +})); +var require_sbcs_codec = /* @__PURE__ */ __commonJSMin(((exports) => { var Buffer$4 = require_safer().Buffer; exports._sbcs = SBCSCodec; function SBCSCodec(codecOptions, iconv$2) { @@ -108804,18 +118813,18 @@ var require_sbcs_codec = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/iconv } SBCSCodec.prototype.encoder = SBCSEncoder; SBCSCodec.prototype.decoder = SBCSDecoder; - function SBCSEncoder(options, codec) { - this.encodeBuf = codec.encodeBuf; + function SBCSEncoder(options, codec2) { + this.encodeBuf = codec2.encodeBuf; } - SBCSEncoder.prototype.write = function(str) { - var buf = Buffer$4.alloc(str.length); - for (var i$3 = 0; i$3 < str.length; i$3++) buf[i$3] = this.encodeBuf[str.charCodeAt(i$3)]; + SBCSEncoder.prototype.write = function(str$1) { + var buf = Buffer$4.alloc(str$1.length); + for (var i$3 = 0; i$3 < str$1.length; i$3++) buf[i$3] = this.encodeBuf[str$1.charCodeAt(i$3)]; return buf; }; SBCSEncoder.prototype.end = function() { }; - function SBCSDecoder(options, codec) { - this.decodeBuf = codec.decodeBuf; + function SBCSDecoder(options, codec2) { + this.decodeBuf = codec2.decodeBuf; } SBCSDecoder.prototype.write = function(buf) { var decodeBuf = this.decodeBuf; @@ -108832,8 +118841,8 @@ var require_sbcs_codec = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/iconv }; SBCSDecoder.prototype.end = function() { }; -}) }); -var require_sbcs_data = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/iconv-lite@0.7.0/node_modules/iconv-lite/encodings/sbcs-data.js": ((exports, module) => { +})); +var require_sbcs_data = /* @__PURE__ */ __commonJSMin(((exports, module) => { module.exports = { 10029: "maccenteuro", maccenteuro: { @@ -108978,8 +118987,8 @@ var require_sbcs_data = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/iconv- mac: "macintosh", csmacintosh: "macintosh" }; -}) }); -var require_sbcs_data_generated = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/iconv-lite@0.7.0/node_modules/iconv-lite/encodings/sbcs-data-generated.js": ((exports, module) => { +})); +var require_sbcs_data_generated = /* @__PURE__ */ __commonJSMin(((exports, module) => { module.exports = { "437": "cp437", "737": "cp737", @@ -109428,8 +119437,8 @@ var require_sbcs_data_generated = /* @__PURE__ */ __commonJS3({ "node_modules/.p "chars": "\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u0E01\u0E02\u0E03\u0E04\u0E05\u0E06\u0E07\u0E08\u0E09\u0E0A\u0E0B\u0E0C\u0E0D\u0E0E\u0E0F\u0E10\u0E11\u0E12\u0E13\u0E14\u0E15\u0E16\u0E17\u0E18\u0E19\u0E1A\u0E1B\u0E1C\u0E1D\u0E1E\u0E1F\u0E20\u0E21\u0E22\u0E23\u0E24\u0E25\u0E26\u0E27\u0E28\u0E29\u0E2A\u0E2B\u0E2C\u0E2D\u0E2E\u0E2F\u0E30\u0E31\u0E32\u0E33\u0E34\u0E35\u0E36\u0E37\u0E38\u0E39\u0E3A\uFFFD\uFFFD\uFFFD\uFFFD\u0E3F\u0E40\u0E41\u0E42\u0E43\u0E44\u0E45\u0E46\u0E47\u0E48\u0E49\u0E4A\u0E4B\u0E4C\u0E4D\u0E4E\u0E4F\u0E50\u0E51\u0E52\u0E53\u0E54\u0E55\u0E56\u0E57\u0E58\u0E59\u0E5A\u0E5B\uFFFD\uFFFD\uFFFD\uFFFD" } }; -}) }); -var require_dbcs_codec = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/iconv-lite@0.7.0/node_modules/iconv-lite/encodings/dbcs-codec.js": ((exports) => { +})); +var require_dbcs_codec = /* @__PURE__ */ __commonJSMin(((exports) => { var Buffer$3 = require_safer().Buffer; exports._dbcs = DBCSCodec; var UNASSIGNED = -1; @@ -109591,16 +119600,16 @@ var require_dbcs_codec = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/iconv } return hasValues; }; - function DBCSEncoder(options, codec) { + function DBCSEncoder(options, codec2) { this.leadSurrogate = -1; this.seqObj = void 0; - this.encodeTable = codec.encodeTable; - this.encodeTableSeq = codec.encodeTableSeq; - this.defaultCharSingleByte = codec.defCharSB; - this.gb18030 = codec.gb18030; + this.encodeTable = codec2.encodeTable; + this.encodeTableSeq = codec2.encodeTableSeq; + this.defaultCharSingleByte = codec2.defCharSB; + this.gb18030 = codec2.gb18030; } - DBCSEncoder.prototype.write = function(str) { - var newBuf = Buffer$3.alloc(str.length * (this.gb18030 ? 4 : 3)); + DBCSEncoder.prototype.write = function(str$1) { + var newBuf = Buffer$3.alloc(str$1.length * (this.gb18030 ? 4 : 3)); var leadSurrogate = this.leadSurrogate; var seqObj = this.seqObj; var nextChar = -1; @@ -109608,8 +119617,8 @@ var require_dbcs_codec = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/iconv var j = 0; while (true) { if (nextChar === -1) { - if (i$3 == str.length) break; - var uCode = str.charCodeAt(i$3++); + if (i$3 == str$1.length) break; + var uCode = str$1.charCodeAt(i$3++); } else { var uCode = nextChar; nextChar = -1; @@ -109707,13 +119716,13 @@ var require_dbcs_codec = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/iconv return newBuf.slice(0, j); }; DBCSEncoder.prototype.findIdx = findIdx; - function DBCSDecoder(options, codec) { + function DBCSDecoder(options, codec2) { this.nodeIdx = 0; this.prevBytes = []; - this.decodeTables = codec.decodeTables; - this.decodeTableSeq = codec.decodeTableSeq; - this.defaultCharUnicode = codec.defaultCharUnicode; - this.gb18030 = codec.gb18030; + this.decodeTables = codec2.decodeTables; + this.decodeTableSeq = codec2.decodeTableSeq; + this.defaultCharUnicode = codec2.defaultCharUnicode; + this.gb18030 = codec2.gb18030; } DBCSDecoder.prototype.write = function(buf) { var newBuf = Buffer$3.alloc(buf.length * 2); @@ -109786,8 +119795,8 @@ var require_dbcs_codec = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/iconv } return l; } -}) }); -var require_shiftjis = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/iconv-lite@0.7.0/node_modules/iconv-lite/encodings/tables/shiftjis.json": ((exports, module) => { +})); +var require_shiftjis = /* @__PURE__ */ __commonJSMin(((exports, module) => { module.exports = [ [ "0", @@ -110073,8 +120082,8 @@ var require_shiftjis = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/iconv-l ["fb80", "\uFA1A\u7994\uFA1B\u799B\u7AD1\u7AE7\uFA1C\u7AEB\u7B9E\uFA1D\u7D48\u7D5C\u7DB7\u7DA0\u7DD6\u7E52\u7F47\u7FA1\uFA1E\u8301\u8362\u837F\u83C7\u83F6\u8448\u84B4\u8553\u8559\u856B\uFA1F\u85B0\uFA20\uFA21\u8807\u88F5\u8A12\u8A37\u8A79\u8AA7\u8ABE\u8ADF\uFA22\u8AF6\u8B53\u8B7F\u8CF0\u8CF4\u8D12\u8D76\uFA23\u8ECF\uFA24\uFA25\u9067\u90DE\uFA26\u9115\u9127\u91DA\u91D7\u91DE\u91ED\u91EE\u91E4\u91E5\u9206\u9210\u920A\u923A\u9240\u923C\u924E\u9259\u9251\u9239\u9267\u92A7\u9277\u9278\u92E7\u92D7\u92D9\u92D0\uFA27\u92D5\u92E0\u92D3\u9325\u9321\u92FB\uFA28\u931E\u92FF\u931D\u9302\u9370\u9357\u93A4\u93C6\u93DE\u93F8\u9431\u9445\u9448\u9592\uF9DC\uFA29\u969D\u96AF\u9733\u973B\u9743\u974D\u974F\u9751\u9755\u9857\u9865\uFA2A\uFA2B\u9927\uFA2C\u999E\u9A4E\u9AD9"], ["fc40", "\u9ADC\u9B75\u9B72\u9B8F\u9BB1\u9BBB\u9C00\u9D70\u9D6B\uFA2D\u9E19\u9ED1"] ]; -}) }); -var require_eucjp = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/iconv-lite@0.7.0/node_modules/iconv-lite/encodings/tables/eucjp.json": ((exports, module) => { +})); +var require_eucjp = /* @__PURE__ */ __commonJSMin(((exports, module) => { module.exports = [ [ "0", @@ -110493,8 +120502,8 @@ var require_eucjp = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/iconv-lite "\u9F73\u9F75\u9F7A\u9F7D\u9F8F\u9F90\u9F91\u9F92\u9F94\u9F96\u9F97\u9F9E\u9FA1\u9FA2\u9FA3\u9FA5" ] ]; -}) }); -var require_cp936 = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/iconv-lite@0.7.0/node_modules/iconv-lite/encodings/tables/cp936.json": ((exports, module) => { +})); +var require_cp936 = /* @__PURE__ */ __commonJSMin(((exports, module) => { module.exports = [ [ "0", @@ -113072,8 +123081,8 @@ var require_cp936 = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/iconv-lite ], ["fe40", "\uFA0C\uFA0D\uFA0E\uFA0F\uFA11\uFA13\uFA14\uFA18\uFA1F\uFA20\uFA21\uFA23\uFA24\uFA27\uFA28\uFA29"] ]; -}) }); -var require_gbk_added = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/iconv-lite@0.7.0/node_modules/iconv-lite/encodings/tables/gbk-added.json": ((exports, module) => { +})); +var require_gbk_added = /* @__PURE__ */ __commonJSMin(((exports, module) => { module.exports = [ [ "a140", @@ -113297,8 +123306,8 @@ var require_gbk_added = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/iconv- ], ["8135f437", "\uE7C7"] ]; -}) }); -var require_gb18030_ranges = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/iconv-lite@0.7.0/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json": ((exports, module) => { +})); +var require_gb18030_ranges = /* @__PURE__ */ __commonJSMin(((exports, module) => { module.exports = { "uChars": [ 128, @@ -113719,8 +123728,8 @@ var require_gb18030_ranges = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/i 189e3 ] }; -}) }); -var require_cp949 = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/iconv-lite@0.7.0/node_modules/iconv-lite/encodings/tables/cp949.json": ((exports, module) => { +})); +var require_cp949 = /* @__PURE__ */ __commonJSMin(((exports, module) => { module.exports = [ [ "0", @@ -115934,8 +125943,8 @@ var require_cp949 = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/iconv-lite ["fca1", "\u798D\u79BE\u82B1\u83EF\u8A71\u8B41\u8CA8\u9774\uFA0B\u64F4\u652B\u78BA\u78BB\u7A6B\u4E38\u559A\u5950\u5BA6\u5E7B\u60A3\u63DB\u6B61\u6665\u6853\u6E19\u7165\u74B0\u7D08\u9084\u9A69\u9C25\u6D3B\u6ED1\u733E\u8C41\u95CA\u51F0\u5E4C\u5FA8\u604D\u60F6\u6130\u614C\u6643\u6644\u69A5\u6CC1\u6E5F\u6EC9\u6F62\u714C\u749C\u7687\u7BC1\u7C27\u8352\u8757\u9051\u968D\u9EC3\u532F\u56DE\u5EFB\u5F8A\u6062\u6094\u61F7\u6666\u6703\u6A9C\u6DEE\u6FAE\u7070\u736A\u7E6A\u81BE\u8334\u86D4\u8AA8\u8CC4\u5283\u7372\u5B96\u6A6B\u9404\u54EE\u5686\u5B5D\u6548\u6585\u66C9\u689F\u6D8D\u6DC6"], ["fda1", "\u723B\u80B4\u9175\u9A4D\u4FAF\u5019\u539A\u540E\u543C\u5589\u55C5\u5E3F\u5F8C\u673D\u7166\u73DD\u9005\u52DB\u52F3\u5864\u58CE\u7104\u718F\u71FB\u85B0\u8A13\u6688\u85A8\u55A7\u6684\u714A\u8431\u5349\u5599\u6BC1\u5F59\u5FBD\u63EE\u6689\u7147\u8AF1\u8F1D\u9EBE\u4F11\u643A\u70CB\u7566\u8667\u6064\u8B4E\u9DF8\u5147\u51F6\u5308\u6D36\u80F8\u9ED1\u6615\u6B23\u7098\u75D5\u5403\u5C79\u7D07\u8A16\u6B20\u6B3D\u6B46\u5438\u6070\u6D3D\u7FD5\u8208\u50D6\u51DE\u559C\u566B\u56CD\u59EC\u5B09\u5E0C\u6199\u6198\u6231\u665E\u66E6\u7199\u71B9\u71BA\u72A7\u79A7\u7A00\u7FB2\u8A70"] ]; -}) }); -var require_cp950 = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/iconv-lite@0.7.0/node_modules/iconv-lite/encodings/tables/cp950.json": ((exports, module) => { +})); +var require_cp950 = /* @__PURE__ */ __commonJSMin(((exports, module) => { module.exports = [ [ "0", @@ -116156,8 +126165,8 @@ var require_cp950 = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/iconv-lite ["f940", "\u7E98\u7E9B\u7E99\u81E0\u81E1\u8646\u8647\u8648\u8979\u897A\u897C\u897B\u89FF\u8B98\u8B99\u8EA5\u8EA4\u8EA3\u946E\u946D\u946F\u9471\u9473\u9749\u9872\u995F\u9C68\u9C6E\u9C6D\u9E0B\u9E0D\u9E10\u9E0F\u9E12\u9E11\u9EA1\u9EF5\u9F09\u9F47\u9F78\u9F7B\u9F7A\u9F79\u571E\u7066\u7C6F\u883C\u8DB2\u8EA6\u91C3\u9474\u9478\u9476\u9475\u9A60\u9C74\u9C73\u9C71\u9C75\u9E14\u9E13\u9EF6\u9F0A"], ["f9a1", "\u9FA4\u7068\u7065\u7CF7\u866A\u883E\u883D\u883F\u8B9E\u8C9C\u8EA9\u8EC9\u974B\u9873\u9874\u98CC\u9961\u99AB\u9A64\u9A66\u9A67\u9B24\u9E15\u9E17\u9F48\u6207\u6B1E\u7227\u864C\u8EA8\u9482\u9480\u9481\u9A69\u9A68\u9B2E\u9E19\u7229\u864B\u8B9F\u9483\u9C79\u9EB7\u7675\u9A6B\u9C7A\u9E1D\u7069\u706A\u9EA4\u9F7E\u9F49\u9F98\u7881\u92B9\u88CF\u58BB\u6052\u7CA7\u5AFA\u2554\u2566\u2557\u2560\u256C\u2563\u255A\u2569\u255D\u2552\u2564\u2555\u255E\u256A\u2561\u2558\u2567\u255B\u2553\u2565\u2556\u255F\u256B\u2562\u2559\u2568\u255C\u2551\u2550\u256D\u256E\u2570\u256F\u2593"] ]; -}) }); -var require_big5_added = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/iconv-lite@0.7.0/node_modules/iconv-lite/encodings/tables/big5-added.json": ((exports, module) => { +})); +var require_big5_added = /* @__PURE__ */ __commonJSMin(((exports, module) => { module.exports = [ ["8740", "\u43F0\u4C32\u4603\u45A6\u4578\u{27267}\u4D77\u45B3\u{27CB1}\u4CE2\u{27CC5}\u3B95\u4736\u4744\u4C47\u4C40\u{242BF}\u{23617}\u{27352}\u{26E8B}\u{270D2}\u4C57\u{2A351}\u474F\u45DA\u4C85\u{27C6C}\u4D07\u4AA4\u46A1\u{26B23}\u7225\u{25A54}\u{21A63}\u{23E06}\u{23F61}\u664D\u56FB"], ["8767", "\u7D95\u591D\u{28BB9}\u3DF4\u9734\u{27BEF}\u5BDB\u{21D5E}\u5AA4\u3625\u{29EB0}\u5AD1\u5BB7\u5CFC\u676E\u8593\u{29945}\u7461\u749D\u3875\u{21D53}\u{2369E}\u{26021}\u3EEC"], @@ -116320,8 +126329,8 @@ var require_big5_added = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/iconv ["fe40", "\u9442\u7215\u5911\u9443\u7224\u9341\u{25605}\u722E\u7240\u{24974}\u68BD\u7255\u7257\u3E55\u{23044}\u680D\u6F3D\u7282\u732A\u732B\u{24823}\u{2882B}\u48ED\u{28804}\u7328\u732E\u73CF\u73AA\u{20C3A}\u{26A2E}\u73C9\u7449\u{241E2}\u{216E7}\u{24A24}\u6623\u36C5\u{249B7}\u{2498D}\u{249FB}\u73F7\u7415\u6903\u{24A26}\u7439\u{205C3}\u3ED7\u745C\u{228AD}\u7460\u{28EB2}\u7447\u73E4\u7476\u83B9\u746C\u3730\u7474\u93F1\u6A2C\u7482\u4953\u{24A8C}"], ["fea1", "\u{2415F}\u{24A79}\u{28B8F}\u5B46\u{28C03}\u{2189E}\u74C8\u{21988}\u750E\u74E9\u751E\u{28ED9}\u{21A4B}\u5BD7\u{28EAC}\u9385\u754D\u754A\u7567\u756E\u{24F82}\u3F04\u{24D13}\u758E\u745D\u759E\u75B4\u7602\u762C\u7651\u764F\u766F\u7676\u{263F5}\u7690\u81EF\u37F8\u{26911}\u{2690E}\u76A1\u76A5\u76B7\u76CC\u{26F9F}\u8462\u{2509D}\u{2517D}\u{21E1C}\u771E\u7726\u7740\u64AF\u{25220}\u7758\u{232AC}\u77AF\u{28964}\u{28968}\u{216C1}\u77F4\u7809\u{21376}\u{24A12}\u68CA\u78AF\u78C7\u78D3\u96A5\u792E\u{255E0}\u78D7\u7934\u78B1\u{2760C}\u8FB8\u8884\u{28B2B}\u{26083}\u{2261C}\u7986\u8900\u6902\u7980\u{25857}\u799D\u{27B39}\u793C\u79A9\u6E2A\u{27126}\u3EA8\u79C6\u{2910D}\u79D4"] ]; -}) }); -var require_dbcs_data = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/iconv-lite@0.7.0/node_modules/iconv-lite/encodings/dbcs-data.js": ((exports, module) => { +})); +var require_dbcs_data = /* @__PURE__ */ __commonJSMin(((exports, module) => { module.exports = { shiftjis: { type: "_dbcs", @@ -116498,8 +126507,8 @@ var require_dbcs_data = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/iconv- csbig5: "big5hkscs", xxbig5: "big5hkscs" }; -}) }); -var require_encodings = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/iconv-lite@0.7.0/node_modules/iconv-lite/encodings/index.js": ((exports) => { +})); +var require_encodings = /* @__PURE__ */ __commonJSMin(((exports) => { var mergeModules$1 = require_merge_exports(); var modules = [ require_internal(), @@ -116516,8 +126525,8 @@ var require_encodings = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/iconv- var module$1 = modules[i]; mergeModules$1(exports, module$1); } -}) }); -var require_streams = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/iconv-lite@0.7.0/node_modules/iconv-lite/lib/streams.js": ((exports, module) => { +})); +var require_streams = /* @__PURE__ */ __commonJSMin(((exports, module) => { var Buffer$2 = require_safer().Buffer; module.exports = function(streamModule$1) { var Transform = streamModule$1.Transform; @@ -116600,8 +126609,8 @@ var require_streams = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/iconv-li IconvLiteDecoderStream }; }; -}) }); -var require_lib2 = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/iconv-lite@0.7.0/node_modules/iconv-lite/lib/index.js": ((exports, module) => { +})); +var require_lib2 = /* @__PURE__ */ __commonJSMin(((exports, module) => { var Buffer$1 = require_safer().Buffer; var bomHandling = require_bom_handling(); var mergeModules = require_merge_exports(); @@ -116609,14 +126618,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) { - str = "" + (str || ""); + iconv$1.encode = function encode4(str$1, encoding, options) { + str$1 = "" + (str$1 || ""); var encoder = iconv$1.getEncoder(encoding, options); - var res = encoder.write(str); + var res = encoder.write(str$1); 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 decode3(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"); @@ -116649,8 +126658,8 @@ var require_lib2 = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/iconv-lite@ var enc = iconv$1._canonicalizeEncoding(encoding); var codecOptions = {}; while (true) { - var codec = iconv$1._codecDataCache[enc]; - if (codec) return codec; + var codec2 = iconv$1._codecDataCache[enc]; + if (codec2) return codec2; var codecDef = iconv$1.encodings[enc]; switch (typeof codecDef) { case "string": @@ -116663,9 +126672,9 @@ var require_lib2 = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/iconv-lite@ break; case "function": if (!codecOptions.encodingName) codecOptions.encodingName = enc; - codec = new codecDef(codecOptions, iconv$1); - iconv$1._codecDataCache[codecOptions.encodingName] = codec; - return codec; + codec2 = new codecDef(codecOptions, iconv$1); + iconv$1._codecDataCache[codecOptions.encodingName] = codec2; + return codec2; default: throw new Error("Encoding not recognized: '" + encoding + "' (searched as: '" + enc + "')"); } @@ -116675,15 +126684,15 @@ var require_lib2 = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/iconv-lite@ return ("" + encoding).toLowerCase().replace(/:\d{4}$|[^0-9a-z]/g, ""); }; iconv$1.getEncoder = function getEncoder(encoding, options) { - var codec = iconv$1.getCodec(encoding); - var encoder = new codec.encoder(options, codec); - if (codec.bomAware && options && options.addBOM) encoder = new bomHandling.PrependBOM(encoder, options); + var codec2 = iconv$1.getCodec(encoding); + var encoder = new codec2.encoder(options, codec2); + if (codec2.bomAware && options && options.addBOM) encoder = new bomHandling.PrependBOM(encoder, options); return encoder; }; iconv$1.getDecoder = function getDecoder$1(encoding, options) { - var codec = iconv$1.getCodec(encoding); - var decoder = new codec.decoder(options, codec); - if (codec.bomAware && !(options && options.stripBOM === false)) decoder = new bomHandling.StripBOM(decoder, options); + var codec2 = iconv$1.getCodec(encoding); + var decoder = new codec2.decoder(options, codec2); + if (codec2.bomAware && !(options && options.stripBOM === false)) decoder = new bomHandling.StripBOM(decoder, options); return decoder; }; iconv$1.enableStreamingAPI = function enableStreamingAPI(streamModule$1) { @@ -116708,8 +126717,8 @@ var require_lib2 = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/iconv-lite@ else iconv$1.encodeStream = iconv$1.decodeStream = function() { throw new Error("iconv-lite Streaming API is not enabled. Use iconv.enableStreamingAPI(require('stream')); to enable it."); }; -}) }); -var require_unpipe = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/unpipe@1.0.0/node_modules/unpipe/index.js": ((exports, module) => { +})); +var require_unpipe = /* @__PURE__ */ __commonJSMin(((exports, module) => { module.exports = unpipe$1; function hasPipeDataListeners(stream) { var listeners = stream.listeners("data"); @@ -116731,8 +126740,8 @@ var require_unpipe = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/unpipe@1. listener.call(stream); } } -}) }); -var require_raw_body = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/raw-body@3.0.1/node_modules/raw-body/index.js": ((exports, module) => { +})); +var require_raw_body = /* @__PURE__ */ __commonJSMin(((exports, module) => { var asyncHooks = tryRequireAsyncHooks(); var bytes = require_bytes(); var createError = require_http_errors(); @@ -116768,10 +126777,10 @@ var require_raw_body = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/raw-bod var limit = bytes.parse(opts.limit); var length = opts.length != null && !isNaN(opts.length) ? parseInt(opts.length, 10) : null; if (done) return readStream(stream, encoding, length, limit, wrap(done)); - return new Promise(function executor(resolve$4, reject) { + return new Promise(function executor(resolve$2, reject) { readStream(stream, encoding, length, limit, function onRead(err, buf) { if (err) return reject(err); - resolve$4(buf); + resolve$2(buf); }); }); } @@ -116847,10 +126856,7 @@ var require_raw_body = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/raw-bod received, type: "request.size.invalid" })); - else { - var string3 = decoder ? buffer$1 + (decoder.end() || "") : Buffer.concat(buffer$1); - done(null, string3); - } + else done(null, decoder ? buffer$1 + (decoder.end() || "") : Buffer.concat(buffer$1)); } function cleanup() { buffer$1 = null; @@ -116874,15 +126880,15 @@ var require_raw_body = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/raw-bod if (!res || !res.runInAsyncScope) return fn2; return res.runInAsyncScope.bind(res, fn2, null); } -}) }); -var require_content_type = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/content-type@1.0.5/node_modules/content-type/index.js": ((exports) => { +})); +var require_content_type = /* @__PURE__ */ __commonJSMin(((exports) => { 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 = parse$1; + function parse$1(string$2) { + if (!string$2) throw new TypeError("argument string is required"); + var header = typeof string$2 === "object" ? getcontenttype(string$2) : string$2; 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(); @@ -116919,7 +126925,7 @@ var require_content_type = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/con this.parameters = /* @__PURE__ */ Object.create(null); this.type = type2; } -}) }); +})); var import_raw_body$1 = /* @__PURE__ */ __toESM3(require_raw_body(), 1); var import_content_type$1 = /* @__PURE__ */ __toESM3(require_content_type(), 1); var MAXIMUM_MESSAGE_SIZE$1 = "4mb"; @@ -116930,7 +126936,7 @@ var SSEServerTransport = class { constructor(_endpoint, res, options) { this._endpoint = _endpoint; this.res = res; - this._sessionId = randomUUID2(); + this._sessionId = randomUUID4(); this._options = options || { enableDnsRebindingProtection: false }; } /** @@ -116945,7 +126951,7 @@ var SSEServerTransport = class { } if (this._options.allowedOrigins && this._options.allowedOrigins.length > 0) { const originHeader = req.headers.origin; - if (!originHeader || !this._options.allowedOrigins.includes(originHeader)) return `Invalid Origin header: ${originHeader}`; + if (originHeader && !this._options.allowedOrigins.includes(originHeader)) return `Invalid Origin header: ${originHeader}`; } } /** @@ -116969,9 +126975,9 @@ data: ${relativeUrlWithSession} `); this._sseResponse = this.res; this.res.on("close", () => { - var _a; + var _a2; this._sseResponse = void 0; - (_a = this.onclose) === null || _a === void 0 || _a.call(this); + (_a2 = this.onclose) === null || _a2 === void 0 || _a2.call(this); }); } /** @@ -116980,7 +126986,7 @@ data: ${relativeUrlWithSession} * This should be called when a POST request is made to send a message to the server. */ async handlePostMessage(req, res, parsedBody) { - var _a, _b, _c, _d; + var _a2, _b, _c, _d; if (!this._sseResponse) { const message = "SSE connection not established"; res.writeHead(500).end(message); @@ -116989,7 +126995,7 @@ data: ${relativeUrlWithSession} const validationError = this.validateRequestHeaders(req); if (validationError) { res.writeHead(403).end(validationError); - (_a = this.onerror) === null || _a === void 0 || _a.call(this, new Error(validationError)); + (_a2 = this.onerror) === null || _a2 === void 0 || _a2.call(this, new Error(validationError)); return; } const authInfo = req.auth; @@ -117002,9 +127008,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 (error$1) { + res.writeHead(400).end(String(error$1)); + (_d = this.onerror) === null || _d === void 0 || _d.call(this, error$1); return; } try { @@ -117022,19 +127028,19 @@ data: ${relativeUrlWithSession} * Handle a client message, regardless of how it arrived. This can be used to inform the server of messages that arrive via a means different than HTTP POST. */ async handleMessage(message, extra) { - var _a, _b; + var _a2, _b; let parsedMessage; try { parsedMessage = JSONRPCMessageSchema3.parse(message); - } catch (error41) { - (_a = this.onerror) === null || _a === void 0 || _a.call(this, error41); - throw error41; + } catch (error$1) { + (_a2 = this.onerror) === null || _a2 === void 0 || _a2.call(this, error$1); + throw error$1; } (_b = this.onmessage) === null || _b === void 0 || _b.call(this, parsedMessage, extra); } async close() { - var _a, _b; - (_a = this._sseResponse) === null || _a === void 0 || _a.end(); + var _a2, _b; + (_a2 = this._sseResponse) === null || _a2 === void 0 || _a2.end(); this._sseResponse = void 0; (_b = this.onclose) === null || _b === void 0 || _b.call(this); } @@ -117059,7 +127065,7 @@ var import_content_type = /* @__PURE__ */ __toESM3(require_content_type(), 1); var MAXIMUM_MESSAGE_SIZE = "4mb"; var StreamableHTTPServerTransport = class { constructor(options) { - var _a, _b; + var _a2, _b; this._started = false; this._streamMapping = /* @__PURE__ */ new Map(); this._requestToStreamMapping = /* @__PURE__ */ new Map(); @@ -117068,13 +127074,14 @@ var StreamableHTTPServerTransport = class { this._enableJsonResponse = false; this._standaloneSseStreamId = "_GET_stream"; this.sessionIdGenerator = options.sessionIdGenerator; - this._enableJsonResponse = (_a = options.enableJsonResponse) !== null && _a !== void 0 ? _a : false; + this._enableJsonResponse = (_a2 = options.enableJsonResponse) !== null && _a2 !== void 0 ? _a2 : false; this._eventStore = options.eventStore; this._onsessioninitialized = options.onsessioninitialized; this._onsessionclosed = options.onsessionclosed; this._allowedHosts = options.allowedHosts; this._allowedOrigins = options.allowedOrigins; this._enableDnsRebindingProtection = (_b = options.enableDnsRebindingProtection) !== null && _b !== void 0 ? _b : false; + this._retryInterval = options.retryInterval; } /** * Starts the transport. This is required by the Transport interface but is a no-op @@ -117096,14 +127103,14 @@ var StreamableHTTPServerTransport = class { } if (this._allowedOrigins && this._allowedOrigins.length > 0) { const originHeader = req.headers.origin; - if (!originHeader || !this._allowedOrigins.includes(originHeader)) return `Invalid Origin header: ${originHeader}`; + if (originHeader && !this._allowedOrigins.includes(originHeader)) return `Invalid Origin header: ${originHeader}`; } } /** * Handles an incoming HTTP request, whether GET or POST */ async handleRequest(req, res, parsedBody) { - var _a; + var _a2; const validationError = this.validateRequestHeaders(req); if (validationError) { res.writeHead(403).end(JSON.stringify({ @@ -117114,7 +127121,7 @@ var StreamableHTTPServerTransport = class { }, id: null })); - (_a = this.onerror) === null || _a === void 0 || _a.call(this, new Error(validationError)); + (_a2 = this.onerror) === null || _a2 === void 0 || _a2.call(this, new Error(validationError)); return; } if (req.method === "POST") await this.handlePostRequest(req, res, parsedBody); @@ -117123,6 +127130,26 @@ var StreamableHTTPServerTransport = class { else await this.handleUnsupportedRequest(res); } /** + * Writes a priming event to establish resumption capability. + * Only sends if eventStore is configured (opt-in for resumability) and + * the client's protocol version supports empty SSE data (>= 2025-11-25). + */ + async _maybeWritePrimingEvent(res, streamId, protocolVersion) { + if (!this._eventStore) return; + if (protocolVersion < "2025-11-25") return; + const primingEventId = await this._eventStore.storeEvent(streamId, {}); + let primingEvent = `id: ${primingEventId} +data: + +`; + if (this._retryInterval !== void 0) primingEvent = `id: ${primingEventId} +retry: ${this._retryInterval} +data: + +`; + res.write(primingEvent); + } + /** * Handles GET requests for SSE stream */ async handleGetRequest(req, res) { @@ -117169,9 +127196,9 @@ var StreamableHTTPServerTransport = class { res.on("close", () => { this._streamMapping.delete(this._standaloneSseStreamId); }); - res.on("error", (error41) => { - var _a; - (_a = this.onerror) === null || _a === void 0 || _a.call(this, error41); + res.on("error", (error$1) => { + var _a2; + (_a2 = this.onerror) === null || _a2 === void 0 || _a2.call(this, error$1); }); } /** @@ -117179,9 +127206,35 @@ var StreamableHTTPServerTransport = class { * Only used when resumability is enabled */ async replayEvents(lastEventId, res) { - var _a, _b; + var _a2; if (!this._eventStore) return; try { + let streamId; + if (this._eventStore.getStreamIdForEventId) { + streamId = await this._eventStore.getStreamIdForEventId(lastEventId); + if (!streamId) { + res.writeHead(400).end(JSON.stringify({ + jsonrpc: "2.0", + error: { + code: -32e3, + message: "Invalid event ID format" + }, + id: null + })); + return; + } + if (this._streamMapping.get(streamId) !== void 0) { + res.writeHead(409).end(JSON.stringify({ + jsonrpc: "2.0", + error: { + code: -32e3, + message: "Conflict: Stream already has an active connection" + }, + id: null + })); + return; + } + } const headers = { "Content-Type": "text/event-stream", "Cache-Control": "no-cache, no-transform", @@ -117189,20 +127242,23 @@ var StreamableHTTPServerTransport = class { }; if (this.sessionId !== void 0) headers["mcp-session-id"] = this.sessionId; res.writeHead(200, headers).flushHeaders(); - const streamId = await ((_a = this._eventStore) === null || _a === void 0 ? void 0 : _a.replayEventsAfter(lastEventId, { send: async (eventId, message) => { + const replayedStreamId = await this._eventStore.replayEventsAfter(lastEventId, { send: async (eventId, message) => { var _a$1; if (!this.writeSSEEvent(res, message, eventId)) { (_a$1 = this.onerror) === null || _a$1 === void 0 || _a$1.call(this, /* @__PURE__ */ new Error("Failed replay events")); res.end(); } - } })); - this._streamMapping.set(streamId, res); - res.on("error", (error41) => { - var _a$1; - (_a$1 = this.onerror) === null || _a$1 === void 0 || _a$1.call(this, error41); + } }); + this._streamMapping.set(replayedStreamId, res); + res.on("close", () => { + this._streamMapping.delete(replayedStreamId); }); - } catch (error41) { - (_b = this.onerror) === null || _b === void 0 || _b.call(this, error41); + res.on("error", (error$1) => { + var _a$1; + (_a$1 = this.onerror) === null || _a$1 === void 0 || _a$1.call(this, error$1); + }); + } catch (error$1) { + (_a2 = this.onerror) === null || _a2 === void 0 || _a2.call(this, error$1); } } /** @@ -117222,7 +127278,7 @@ var StreamableHTTPServerTransport = class { * Handles unsupported requests (PUT, PATCH, etc.) */ async handleUnsupportedRequest(res) { - res.writeHead(405, { "Allow": "GET, POST, DELETE" }).end(JSON.stringify({ + res.writeHead(405, { Allow: "GET, POST, DELETE" }).end(JSON.stringify({ jsonrpc: "2.0", error: { code: -32e3, @@ -117235,7 +127291,7 @@ var StreamableHTTPServerTransport = class { * Handles POST requests containing JSON-RPC messages */ async handlePostRequest(req, res, parsedBody) { - var _a, _b, _c, _d, _e; + var _a2, _b, _c, _d, _e, _f; try { const acceptHeader = req.headers.accept; if (!(acceptHeader === null || acceptHeader === void 0 ? void 0 : acceptHeader.includes("application/json")) || !acceptHeader.includes("text/event-stream")) { @@ -117266,10 +127322,9 @@ var StreamableHTTPServerTransport = class { let rawMessage; if (parsedBody !== void 0) rawMessage = parsedBody; else { - const parsedCt = import_content_type.parse(ct); const body = await (0, import_raw_body.default)(req, { limit: MAXIMUM_MESSAGE_SIZE, - encoding: (_a = parsedCt.parameters.charset) !== null && _a !== void 0 ? _a : "utf-8" + encoding: (_a2 = import_content_type.parse(ct).parameters.charset) !== null && _a2 !== void 0 ? _a2 : "utf-8" }); rawMessage = JSON.parse(body.toString()); } @@ -117316,7 +127371,9 @@ var StreamableHTTPServerTransport = class { requestInfo }); } else if (hasRequests) { - const streamId = randomUUID2(); + const streamId = randomUUID4(); + const initRequest = messages.find((m) => isInitializeRequest(m)); + const clientProtocolVersion = initRequest ? initRequest.params.protocolVersion : (_d = req.headers["mcp-protocol-version"]) !== null && _d !== void 0 ? _d : DEFAULT_NEGOTIATED_PROTOCOL_VERSION; if (!this._enableJsonResponse) { const headers = { "Content-Type": "text/event-stream", @@ -117325,6 +127382,7 @@ var StreamableHTTPServerTransport = class { }; if (this.sessionId !== void 0) headers["mcp-session-id"] = this.sessionId; res.writeHead(200, headers); + await this._maybeWritePrimingEvent(res, streamId, clientProtocolVersion); } for (const message of messages) if (isJSONRPCRequest2(message)) { this._streamMapping.set(streamId, res); @@ -117333,36 +127391,50 @@ var StreamableHTTPServerTransport = class { res.on("close", () => { this._streamMapping.delete(streamId); }); - res.on("error", (error41) => { + res.on("error", (error$1) => { var _a$1; - (_a$1 = this.onerror) === null || _a$1 === void 0 || _a$1.call(this, error41); - }); - for (const message of messages) (_d = this.onmessage) === null || _d === void 0 || _d.call(this, message, { - authInfo, - requestInfo + (_a$1 = this.onerror) === null || _a$1 === void 0 || _a$1.call(this, error$1); }); + for (const message of messages) { + let closeSSEStream; + let closeStandaloneSSEStream; + if (isJSONRPCRequest2(message) && this._eventStore && clientProtocolVersion >= "2025-11-25") { + closeSSEStream = () => { + this.closeSSEStream(message.id); + }; + closeStandaloneSSEStream = () => { + this.closeStandaloneSSEStream(); + }; + } + (_e = this.onmessage) === null || _e === void 0 || _e.call(this, message, { + authInfo, + requestInfo, + closeSSEStream, + closeStandaloneSSEStream + }); + } } - } catch (error41) { + } catch (error$1) { res.writeHead(400).end(JSON.stringify({ jsonrpc: "2.0", error: { code: -32700, message: "Parse error", - data: String(error41) + data: String(error$1) }, id: null })); - (_e = this.onerror) === null || _e === void 0 || _e.call(this, error41); + (_f = this.onerror) === null || _f === void 0 || _f.call(this, error$1); } } /** * Handles DELETE requests to terminate sessions */ async handleDeleteRequest(req, res) { - var _a; + var _a2; if (!this.validateSession(req, res)) return; if (!this.validateProtocolVersion(req, res)) return; - await Promise.resolve((_a = this._onsessionclosed) === null || _a === void 0 ? void 0 : _a.call(this, this.sessionId)); + await Promise.resolve((_a2 = this._onsessionclosed) === null || _a2 === void 0 ? void 0 : _a2.call(this, this.sessionId)); await this.close(); res.writeHead(200).end(); } @@ -117418,8 +127490,8 @@ var StreamableHTTPServerTransport = class { return true; } validateProtocolVersion(req, res) { - var _a; - let protocolVersion = (_a = req.headers["mcp-protocol-version"]) !== null && _a !== void 0 ? _a : DEFAULT_NEGOTIATED_PROTOCOL_VERSION; + var _a2; + let protocolVersion = (_a2 = req.headers["mcp-protocol-version"]) !== null && _a2 !== void 0 ? _a2 : DEFAULT_NEGOTIATED_PROTOCOL_VERSION; if (Array.isArray(protocolVersion)) protocolVersion = protocolVersion[protocolVersion.length - 1]; if (!SUPPORTED_PROTOCOL_VERSIONS2.includes(protocolVersion)) { res.writeHead(400).end(JSON.stringify({ @@ -117435,23 +127507,48 @@ var StreamableHTTPServerTransport = class { return true; } async close() { - var _a; + var _a2; this._streamMapping.forEach((response) => { response.end(); }); this._streamMapping.clear(); this._requestResponseMap.clear(); - (_a = this.onclose) === null || _a === void 0 || _a.call(this); + (_a2 = this.onclose) === null || _a2 === void 0 || _a2.call(this); + } + /** + * Close an SSE stream for a specific request, triggering client reconnection. + * Use this to implement polling behavior during long-running operations - + * client will reconnect after the retry interval specified in the priming event. + */ + closeSSEStream(requestId) { + const streamId = this._requestToStreamMapping.get(requestId); + if (!streamId) return; + const stream = this._streamMapping.get(streamId); + if (stream) { + stream.end(); + this._streamMapping.delete(streamId); + } + } + /** + * Close the standalone GET SSE stream, triggering client reconnection. + * Use this to implement polling behavior for server-initiated notifications. + */ + closeStandaloneSSEStream() { + const stream = this._streamMapping.get(this._standaloneSseStreamId); + if (stream) { + stream.end(); + this._streamMapping.delete(this._standaloneSseStreamId); + } } async send(message, options) { let requestId = options === null || options === void 0 ? void 0 : options.relatedRequestId; - if (isJSONRPCResponse2(message) || isJSONRPCError2(message)) requestId = message.id; + if (isJSONRPCResponse(message) || isJSONRPCError(message)) requestId = message.id; if (requestId === void 0) { - if (isJSONRPCResponse2(message) || isJSONRPCError2(message)) throw new Error("Cannot send a response on a standalone SSE stream unless resuming a previous client request"); - const standaloneSse = this._streamMapping.get(this._standaloneSseStreamId); - if (standaloneSse === void 0) return; + if (isJSONRPCResponse(message) || isJSONRPCError(message)) throw new Error("Cannot send a response on a standalone SSE stream unless resuming a previous client request"); let eventId; if (this._eventStore) eventId = await this._eventStore.storeEvent(this._standaloneSseStreamId, message); + const standaloneSse = this._streamMapping.get(this._standaloneSseStreamId); + if (standaloneSse === void 0) return; this.writeSSEEvent(standaloneSse, message, eventId); return; } @@ -117463,9 +127560,9 @@ var StreamableHTTPServerTransport = class { if (this._eventStore) eventId = await this._eventStore.storeEvent(streamId, message); if (response) this.writeSSEEvent(response, message, eventId); } - if (isJSONRPCResponse2(message) || isJSONRPCError2(message)) { + if (isJSONRPCResponse(message) || isJSONRPCError(message)) { this._requestResponseMap.set(requestId, message); - const relatedIds = Array.from(this._requestToStreamMapping.entries()).filter(([_, streamId$1]) => this._streamMapping.get(streamId$1) === response).map(([id]) => id); + const relatedIds = Array.from(this._requestToStreamMapping.entries()).filter(([_$1, streamId$1]) => this._streamMapping.get(streamId$1) === response).map(([id]) => id); if (relatedIds.every((id) => this._requestResponseMap.has(id))) { if (!response) throw new Error(`No connection established for request ID: ${String(requestId)}`); if (this._enableJsonResponse) { @@ -117485,7 +127582,7 @@ var StreamableHTTPServerTransport = class { } }; var getBody = (request2) => { - return new Promise((resolve$4) => { + return new Promise((resolve$2) => { const bodyParts = []; let body; request2.on("data", (chunk) => { @@ -117493,10 +127590,10 @@ var getBody = (request2) => { }).on("end", () => { body = Buffer.concat(bodyParts).toString(); try { - resolve$4(JSON.parse(body)); - } catch (error41) { - console.error("[mcp-proxy] error parsing body", error41); - resolve$4(null); + resolve$2(JSON.parse(body)); + } catch (error$1) { + console.error("[mcp-proxy] error parsing body", error$1); + resolve$2(null); } }); }); @@ -117511,19 +127608,40 @@ var createJsonRpcErrorResponse = (code, message) => { jsonrpc: "2.0" }); }; -var getWWWAuthenticateHeader = (oauth) => { - if (!oauth?.protectedResource?.resource) return; - return `Bearer resource_metadata="${oauth.protectedResource.resource}/.well-known/oauth-protected-resource"`; +var getWWWAuthenticateHeader = (oauth, options) => { + if (!oauth) return; + const params = []; + if (oauth.realm) params.push(`realm="${oauth.realm}"`); + if (oauth.protectedResource?.resource) params.push(`resource_metadata="${oauth.protectedResource.resource}/.well-known/oauth-protected-resource"`); + const error$1 = options?.error || oauth.error; + if (error$1) params.push(`error="${error$1}"`); + const error_description = options?.error_description || oauth.error_description; + if (error_description) { + const escaped = error_description.replace(/"/g, '\\"'); + params.push(`error_description="${escaped}"`); + } + const error_uri = options?.error_uri || oauth.error_uri; + if (error_uri) params.push(`error_uri="${error_uri}"`); + const scope2 = options?.scope || oauth.scope; + if (scope2) params.push(`scope="${scope2}"`); + if (params.length === 0) return; + return `Bearer ${params.join(", ")}`; }; -var handleResponseError = (error41, res) => { - if (error41 instanceof Response) { +var isScopeChallengeError = (error$1) => { + return typeof error$1 === "object" && error$1 !== null && "name" in error$1 && error$1.name === "InsufficientScopeError" && "data" in error$1 && typeof error$1.data === "object" && error$1.data !== null && "error" in error$1.data && error$1.data.error === "insufficient_scope"; +}; +var handleResponseError = async (error$1, res) => { + if (error$1 && typeof error$1 === "object" && "status" in error$1 && "headers" in error$1 && "statusText" in error$1 || error$1 instanceof Response) { + const responseError = error$1; const fixedHeaders = {}; - error41.headers.forEach((value2, key$1) => { + responseError.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); + const body = await responseError.text(); + res.writeHead(responseError.status, responseError.statusText, fixedHeaders); + res.end(body); return true; } return false; @@ -117532,23 +127650,68 @@ 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 (error$1) { + console.error("[mcp-proxy] error closing server", error$1); } }; -var handleStreamRequest = async ({ activeTransports, authenticate, createServer: createServer2, enableJsonResponse, endpoint: endpoint2, eventStore, oauth, onClose, onConnect, req, res, stateless }) => { +var applyCorsHeaders = (req, res, corsOptions) => { + if (!req.headers.origin) return; + const defaultCorsOptions = { + allowedHeaders: "Content-Type, Authorization, Accept, Mcp-Session-Id, Last-Event-Id", + credentials: true, + exposedHeaders: ["Mcp-Session-Id"], + methods: [ + "GET", + "POST", + "OPTIONS" + ], + origin: "*" + }; + let finalCorsOptions; + if (corsOptions === false) return; + else if (corsOptions === true || corsOptions === void 0) finalCorsOptions = defaultCorsOptions; + else finalCorsOptions = { + ...defaultCorsOptions, + ...corsOptions + }; + try { + const origin = new URL(req.headers.origin); + let allowedOrigin = "*"; + if (finalCorsOptions.origin) { + if (typeof finalCorsOptions.origin === "string") allowedOrigin = finalCorsOptions.origin; + else if (Array.isArray(finalCorsOptions.origin)) allowedOrigin = finalCorsOptions.origin.includes(origin.origin) ? origin.origin : "false"; + else if (typeof finalCorsOptions.origin === "function") allowedOrigin = finalCorsOptions.origin(origin.origin) ? origin.origin : "false"; + } + if (allowedOrigin !== "false") res.setHeader("Access-Control-Allow-Origin", allowedOrigin); + if (finalCorsOptions.credentials !== void 0) res.setHeader("Access-Control-Allow-Credentials", finalCorsOptions.credentials.toString()); + if (finalCorsOptions.methods) res.setHeader("Access-Control-Allow-Methods", finalCorsOptions.methods.join(", ")); + if (finalCorsOptions.allowedHeaders) { + const allowedHeaders = typeof finalCorsOptions.allowedHeaders === "string" ? finalCorsOptions.allowedHeaders : finalCorsOptions.allowedHeaders.join(", "); + res.setHeader("Access-Control-Allow-Headers", allowedHeaders); + } + if (finalCorsOptions.exposedHeaders) res.setHeader("Access-Control-Expose-Headers", finalCorsOptions.exposedHeaders.join(", ")); + if (finalCorsOptions.maxAge !== void 0) res.setHeader("Access-Control-Max-Age", finalCorsOptions.maxAge.toString()); + } catch (error$1) { + console.error("[mcp-proxy] error parsing origin", error$1); + } +}; +var handleStreamRequest = async ({ activeTransports, authenticate, authMiddleware, createServer: createServer2, enableJsonResponse, endpoint: endpoint2, eventStore, oauth, onClose, onConnect, req, res, stateless }) => { if (req.method === "POST" && new URL(req.url, "http://localhost").pathname === endpoint2) { + let body; try { const sessionId = Array.isArray(req.headers["mcp-session-id"]) ? req.headers["mcp-session-id"][0] : req.headers["mcp-session-id"]; let transport; let server; - const body = await getBody(req); + body = await getBody(req); if (stateless && authenticate) try { const authResult = await authenticate(req); if (!authResult || typeof authResult === "object" && "authenticated" in authResult && !authResult.authenticated) { const errorMessage = authResult && typeof authResult === "object" && "error" in authResult && typeof authResult.error === "string" ? authResult.error : "Unauthorized: Authentication failed"; res.setHeader("Content-Type", "application/json"); - const wwwAuthHeader = getWWWAuthenticateHeader(oauth); + const wwwAuthHeader = getWWWAuthenticateHeader(oauth, { + error: "invalid_token", + error_description: errorMessage + }); if (wwwAuthHeader) res.setHeader("WWW-Authenticate", wwwAuthHeader); res.writeHead(401).end(JSON.stringify({ error: { @@ -117560,11 +127723,15 @@ 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 (error$1) { + if (await handleResponseError(error$1, res)) return true; + const errorMessage = error$1 instanceof Error ? error$1.message : "Unauthorized: Authentication error"; + console.error("Authentication error:", error$1); res.setHeader("Content-Type", "application/json"); - const wwwAuthHeader = getWWWAuthenticateHeader(oauth); + const wwwAuthHeader = getWWWAuthenticateHeader(oauth, { + error: "invalid_token", + error_description: errorMessage + }); if (wwwAuthHeader) res.setHeader("WWW-Authenticate", wwwAuthHeader); res.writeHead(401).end(JSON.stringify({ error: { @@ -117595,7 +127762,7 @@ var handleStreamRequest = async ({ activeTransports, authenticate, createServer: transport }; }, - sessionIdGenerator: stateless ? void 0 : randomUUID2 + sessionIdGenerator: stateless ? void 0 : randomUUID4 }); let isCleaningUp = false; transport.onclose = async () => { @@ -117609,11 +127776,15 @@ var handleStreamRequest = async ({ activeTransports, authenticate, createServer: }; try { server = await createServer2(req); - } catch (error41) { - const errorMessage = error41 instanceof Error ? error41.message : String(error41); + } catch (error$1) { + if (await handleResponseError(error$1, res)) return true; + const errorMessage = error$1 instanceof Error ? error$1.message : String(error$1); if (errorMessage.includes("Authentication") || errorMessage.includes("Invalid JWT") || errorMessage.includes("Token") || errorMessage.includes("Unauthorized")) { res.setHeader("Content-Type", "application/json"); - const wwwAuthHeader = getWWWAuthenticateHeader(oauth); + const wwwAuthHeader = getWWWAuthenticateHeader(oauth, { + error: "invalid_token", + error_description: errorMessage + }); if (wwwAuthHeader) res.setHeader("WWW-Authenticate", wwwAuthHeader); res.writeHead(401).end(JSON.stringify({ error: { @@ -117625,7 +127796,6 @@ var handleStreamRequest = async ({ activeTransports, authenticate, createServer: })); return true; } - if (handleResponseError(error41, res)) return true; res.writeHead(500).end("Error creating server"); return true; } @@ -117643,11 +127813,15 @@ var handleStreamRequest = async ({ activeTransports, authenticate, createServer: }); try { server = await createServer2(req); - } catch (error41) { - const errorMessage = error41 instanceof Error ? error41.message : String(error41); + } catch (error$1) { + if (await handleResponseError(error$1, res)) return true; + const errorMessage = error$1 instanceof Error ? error$1.message : String(error$1); if (errorMessage.includes("Authentication") || errorMessage.includes("Invalid JWT") || errorMessage.includes("Token") || errorMessage.includes("Unauthorized")) { res.setHeader("Content-Type", "application/json"); - const wwwAuthHeader = getWWWAuthenticateHeader(oauth); + const wwwAuthHeader = getWWWAuthenticateHeader(oauth, { + error: "invalid_token", + error_description: errorMessage + }); if (wwwAuthHeader) res.setHeader("WWW-Authenticate", wwwAuthHeader); res.writeHead(401).end(JSON.stringify({ error: { @@ -117659,7 +127833,6 @@ var handleStreamRequest = async ({ activeTransports, authenticate, createServer: })); return true; } - if (handleResponseError(error41, res)) return true; res.writeHead(500).end("Error creating server"); return true; } @@ -117674,8 +127847,14 @@ 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 (error$1) { + if (isScopeChallengeError(error$1)) { + const response = authMiddleware.getScopeChallengeResponse(error$1.data.requiredScopes, error$1.data.errorDescription, body?.id); + res.writeHead(response.statusCode, response.headers); + res.end(response.body); + return true; + } + console.error("[mcp-proxy] error handling request", error$1); res.setHeader("Content-Type", "application/json"); res.writeHead(500).end(createJsonRpcErrorResponse(-32603, "Internal Server Error")); } @@ -117714,8 +127893,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 (error$1) { + console.error("[mcp-proxy] error handling delete request", error$1); res.writeHead(500).end("Error handling delete request"); } return true; @@ -117728,8 +127907,8 @@ var handleSSERequest = async ({ activeTransports, createServer: createServer2, e let server; try { server = await createServer2(req); - } catch (error41) { - if (handleResponseError(error41, res)) return true; + } catch (error$1) { + if (await handleResponseError(error$1, res)) return true; res.writeHead(500).end("Error creating server"); return true; } @@ -117747,13 +127926,16 @@ var handleSSERequest = async ({ activeTransports, createServer: createServer2, e await server.connect(transport); await transport.send({ jsonrpc: "2.0", - method: "sse/connection", - params: { message: "SSE Connection established" } + method: "notifications/message", + params: { + data: "SSE Connection established", + level: "info" + } }); if (onConnect) await onConnect(server); - } catch (error41) { + } catch (error$1) { if (!closed) { - console.error("[mcp-proxy] error connecting to server", error41); + console.error("[mcp-proxy] error connecting to server", error$1); res.writeHead(500).end("Error connecting to server"); } } @@ -117775,7 +127957,7 @@ var handleSSERequest = async ({ activeTransports, createServer: createServer2, e } return false; }; -var startHTTPServer = async ({ apiKey, authenticate, createServer: createServer2, enableJsonResponse, eventStore, host = "::", oauth, onClose, onConnect, onUnhandledRequest, port, sseEndpoint = "/sse", stateless, streamEndpoint = "/mcp" }) => { +var startHTTPServer = async ({ apiKey, authenticate, cors, createServer: createServer2, enableJsonResponse, eventStore, host = "::", oauth, onClose, onConnect, onUnhandledRequest, port, sseEndpoint = "/sse", stateless, streamEndpoint = "/mcp" }) => { const activeSSETransports = {}; const activeStreamTransports = {}; const authMiddleware = new AuthenticationMiddleware({ @@ -117783,16 +127965,7 @@ var startHTTPServer = async ({ apiKey, authenticate, createServer: createServer2 oauth }); const httpServer = http.createServer(async (req, res) => { - if (req.headers.origin) try { - const origin = new URL(req.headers.origin); - res.setHeader("Access-Control-Allow-Origin", origin.origin); - res.setHeader("Access-Control-Allow-Credentials", "true"); - 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); - } + applyCorsHeaders(req, res, cors); if (req.method === "OPTIONS") { res.writeHead(204); res.end(); @@ -117820,6 +127993,7 @@ var startHTTPServer = async ({ apiKey, authenticate, createServer: createServer2 if (streamEndpoint && await handleStreamRequest({ activeTransports: activeStreamTransports, authenticate, + authMiddleware, createServer: createServer2, enableJsonResponse, endpoint: streamEndpoint, @@ -117834,863 +128008,1813 @@ var startHTTPServer = async ({ apiKey, authenticate, createServer: createServer2 if (onUnhandledRequest) await onUnhandledRequest(req, res); else res.writeHead(404).end(); }); - await new Promise((resolve$4) => { + await new Promise((resolve$2) => { httpServer.listen(port, host, () => { - resolve$4(void 0); + resolve$2(void 0); }); }); return { close: async () => { 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); + return new Promise((resolve$2, reject) => { + httpServer.close((error$1) => { + if (error$1) { + reject(error$1); return; } - resolve$4(); + resolve$2(); }); }); } }; }; -var require_uri_all3 = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/uri-js@4.4.1/node_modules/uri-js/dist/es5/uri.all.js": ((exports, module) => { - (function(global$1, factory) { - typeof exports === "object" && typeof module !== "undefined" ? factory(exports) : typeof define === "function" && define.amd ? define(["exports"], factory) : factory(global$1.URI = global$1.URI || {}); - })(exports, (function(exports$1) { - function merge3() { - for (var _len = arguments.length, sets = Array(_len), _key = 0; _key < _len; _key++) sets[_key] = arguments[_key]; - if (sets.length > 1) { - sets[0] = sets[0].slice(0, -1); - var xl = sets.length - 1; - for (var x = 1; x < xl; ++x) sets[x] = sets[x].slice(1, -1); - sets[xl] = sets[xl].slice(1); - return sets.join(""); - } else return sets[0]; +var require_code$1 = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.regexpCode = exports.getEsmExportName = exports.getProperty = exports.safeStringify = exports.stringify = exports.strConcat = exports.addCodeArg = exports.str = exports._ = exports.nil = exports._Code = exports.Name = exports.IDENTIFIER = exports._CodeOrName = void 0; + var _CodeOrName = class { + }; + exports._CodeOrName = _CodeOrName; + exports.IDENTIFIER = /^[a-z$_][a-z$_0-9]*$/i; + var Name = class extends _CodeOrName { + constructor(s) { + super(); + if (!exports.IDENTIFIER.test(s)) throw new Error("CodeGen: name must be a valid identifier"); + this.str = s; } - function subexp(str) { - return "(?:" + str + ")"; + toString() { + return this.str; } - function typeOf(o) { - return o === void 0 ? "undefined" : o === null ? "null" : Object.prototype.toString.call(o).split(" ").pop().split("]").shift().toLowerCase(); + emptyStr() { + return false; } - function toUpperCase(str) { - return str.toUpperCase(); + get names() { + return { [this.str]: 1 }; } - function toArray(obj) { - return obj !== void 0 && obj !== null ? obj instanceof Array ? obj : typeof obj.length !== "number" || obj.split || obj.setInterval || obj.call ? [obj] : Array.prototype.slice.call(obj) : []; + }; + exports.Name = Name; + var _Code = class extends _CodeOrName { + constructor(code) { + super(); + this._items = typeof code === "string" ? [code] : code; } - function assign(target, source) { - var obj = target; - if (source) for (var key$1 in source) obj[key$1] = source[key$1]; - return obj; + toString() { + return this.str; } - function buildExps(isIRI) { - var ALPHA$$ = "[A-Za-z]", DIGIT$$ = "[0-9]", HEXDIG$$$1 = merge3(DIGIT$$, "[A-Fa-f]"), PCT_ENCODED$$1 = subexp(subexp("%[EFef]" + HEXDIG$$$1 + "%" + HEXDIG$$$1 + HEXDIG$$$1 + "%" + HEXDIG$$$1 + HEXDIG$$$1) + "|" + subexp("%[89A-Fa-f]" + HEXDIG$$$1 + "%" + HEXDIG$$$1 + HEXDIG$$$1) + "|" + subexp("%" + HEXDIG$$$1 + HEXDIG$$$1)), GEN_DELIMS$$ = "[\\:\\/\\?\\#\\[\\]\\@]", SUB_DELIMS$$ = "[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]", RESERVED$$ = merge3(GEN_DELIMS$$, SUB_DELIMS$$), UCSCHAR$$ = isIRI ? "[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]" : "[]", IPRIVATE$$ = isIRI ? "[\\uE000-\\uF8FF]" : "[]", UNRESERVED$$$1 = merge3(ALPHA$$, DIGIT$$, "[\\-\\.\\_\\~]", UCSCHAR$$), SCHEME$ = subexp(ALPHA$$ + merge3(ALPHA$$, DIGIT$$, "[\\+\\-\\.]") + "*"), USERINFO$ = subexp(subexp(PCT_ENCODED$$1 + "|" + merge3(UNRESERVED$$$1, SUB_DELIMS$$, "[\\:]")) + "*"); - subexp(subexp("25[0-5]") + "|" + subexp("2[0-4]" + DIGIT$$) + "|" + subexp("1" + DIGIT$$ + DIGIT$$) + "|" + subexp("[1-9]" + DIGIT$$) + "|" + DIGIT$$); - var DEC_OCTET_RELAXED$ = subexp(subexp("25[0-5]") + "|" + subexp("2[0-4]" + DIGIT$$) + "|" + subexp("1" + DIGIT$$ + DIGIT$$) + "|" + subexp("0?[1-9]" + DIGIT$$) + "|0?0?" + DIGIT$$), IPV4ADDRESS$ = subexp(DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$), H16$ = subexp(HEXDIG$$$1 + "{1,4}"), LS32$ = subexp(subexp(H16$ + "\\:" + H16$) + "|" + IPV4ADDRESS$), IPV6ADDRESS1$ = subexp(subexp(H16$ + "\\:") + "{6}" + LS32$), IPV6ADDRESS2$ = subexp("\\:\\:" + subexp(H16$ + "\\:") + "{5}" + LS32$), IPV6ADDRESS3$ = subexp(subexp(H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{4}" + LS32$), IPV6ADDRESS4$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,1}" + H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{3}" + LS32$), IPV6ADDRESS5$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,2}" + H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{2}" + LS32$), IPV6ADDRESS6$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,3}" + H16$) + "?\\:\\:" + H16$ + "\\:" + LS32$), IPV6ADDRESS7$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,4}" + H16$) + "?\\:\\:" + LS32$), IPV6ADDRESS8$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,5}" + H16$) + "?\\:\\:" + H16$), IPV6ADDRESS9$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,6}" + H16$) + "?\\:\\:"), IPV6ADDRESS$ = subexp([ - IPV6ADDRESS1$, - IPV6ADDRESS2$, - IPV6ADDRESS3$, - IPV6ADDRESS4$, - IPV6ADDRESS5$, - IPV6ADDRESS6$, - IPV6ADDRESS7$, - IPV6ADDRESS8$, - IPV6ADDRESS9$ - ].join("|")), ZONEID$ = subexp(subexp(UNRESERVED$$$1 + "|" + PCT_ENCODED$$1) + "+"); - subexp(IPV6ADDRESS$ + "\\%25" + ZONEID$); - var IPV6ADDRZ_RELAXED$ = subexp(IPV6ADDRESS$ + subexp("\\%25|\\%(?!" + HEXDIG$$$1 + "{2})") + ZONEID$), IPVFUTURE$ = subexp("[vV]" + HEXDIG$$$1 + "+\\." + merge3(UNRESERVED$$$1, SUB_DELIMS$$, "[\\:]") + "+"), IP_LITERAL$ = subexp("\\[" + subexp(IPV6ADDRZ_RELAXED$ + "|" + IPV6ADDRESS$ + "|" + IPVFUTURE$) + "\\]"), REG_NAME$ = subexp(subexp(PCT_ENCODED$$1 + "|" + merge3(UNRESERVED$$$1, SUB_DELIMS$$)) + "*"), HOST$ = subexp(IP_LITERAL$ + "|" + IPV4ADDRESS$ + "(?!" + REG_NAME$ + ")|" + REG_NAME$), PORT$ = subexp(DIGIT$$ + "*"), AUTHORITY$ = subexp(subexp(USERINFO$ + "@") + "?" + HOST$ + subexp("\\:" + PORT$) + "?"), PCHAR$ = subexp(PCT_ENCODED$$1 + "|" + merge3(UNRESERVED$$$1, SUB_DELIMS$$, "[\\:\\@]")), SEGMENT$ = subexp(PCHAR$ + "*"), SEGMENT_NZ$ = subexp(PCHAR$ + "+"), SEGMENT_NZ_NC$ = subexp(subexp(PCT_ENCODED$$1 + "|" + merge3(UNRESERVED$$$1, SUB_DELIMS$$, "[\\@]")) + "+"), PATH_ABEMPTY$ = subexp(subexp("\\/" + SEGMENT$) + "*"), PATH_ABSOLUTE$ = subexp("\\/" + subexp(SEGMENT_NZ$ + PATH_ABEMPTY$) + "?"), PATH_NOSCHEME$ = subexp(SEGMENT_NZ_NC$ + PATH_ABEMPTY$), PATH_ROOTLESS$ = subexp(SEGMENT_NZ$ + PATH_ABEMPTY$), PATH_EMPTY$ = "(?!" + PCHAR$ + ")"; - subexp(PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$); - var QUERY$ = subexp(subexp(PCHAR$ + "|" + merge3("[\\/\\?]", IPRIVATE$$)) + "*"), FRAGMENT$ = subexp(subexp(PCHAR$ + "|[\\/\\?]") + "*"), HIER_PART$ = subexp(subexp("\\/\\/" + AUTHORITY$ + PATH_ABEMPTY$) + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$), URI$ = subexp(SCHEME$ + "\\:" + HIER_PART$ + subexp("\\?" + QUERY$) + "?" + subexp("\\#" + FRAGMENT$) + "?"), RELATIVE_PART$ = subexp(subexp("\\/\\/" + AUTHORITY$ + PATH_ABEMPTY$) + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_EMPTY$), RELATIVE$ = subexp(RELATIVE_PART$ + subexp("\\?" + QUERY$) + "?" + subexp("\\#" + FRAGMENT$) + "?"); - subexp(URI$ + "|" + RELATIVE$); - subexp(SCHEME$ + "\\:" + HIER_PART$ + subexp("\\?" + QUERY$) + "?"); - "" + SCHEME$ + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + subexp("\\#(" + FRAGMENT$ + ")"); - "" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + subexp("\\#(" + FRAGMENT$ + ")"); - "" + SCHEME$ + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")"); - "" + subexp("\\#(" + FRAGMENT$ + ")"); - "" + subexp("(" + USERINFO$ + ")@") + HOST$ + subexp("\\:(" + PORT$ + ")"); - return { - NOT_SCHEME: new RegExp(merge3("[^]", ALPHA$$, DIGIT$$, "[\\+\\-\\.]"), "g"), - NOT_USERINFO: new RegExp(merge3("[^\\%\\:]", UNRESERVED$$$1, SUB_DELIMS$$), "g"), - NOT_HOST: new RegExp(merge3("[^\\%\\[\\]\\:]", UNRESERVED$$$1, SUB_DELIMS$$), "g"), - NOT_PATH: new RegExp(merge3("[^\\%\\/\\:\\@]", UNRESERVED$$$1, SUB_DELIMS$$), "g"), - NOT_PATH_NOSCHEME: new RegExp(merge3("[^\\%\\/\\@]", UNRESERVED$$$1, SUB_DELIMS$$), "g"), - NOT_QUERY: new RegExp(merge3("[^\\%]", UNRESERVED$$$1, SUB_DELIMS$$, "[\\:\\@\\/\\?]", IPRIVATE$$), "g"), - NOT_FRAGMENT: new RegExp(merge3("[^\\%]", UNRESERVED$$$1, SUB_DELIMS$$, "[\\:\\@\\/\\?]"), "g"), - ESCAPE: new RegExp(merge3("[^]", UNRESERVED$$$1, SUB_DELIMS$$), "g"), - UNRESERVED: new RegExp(UNRESERVED$$$1, "g"), - OTHER_CHARS: new RegExp(merge3("[^\\%]", UNRESERVED$$$1, RESERVED$$), "g"), - PCT_ENCODED: new RegExp(PCT_ENCODED$$1, "g"), - IPV4ADDRESS: /* @__PURE__ */ new RegExp("^(" + IPV4ADDRESS$ + ")$"), - IPV6ADDRESS: /* @__PURE__ */ new RegExp("^\\[?(" + IPV6ADDRESS$ + ")" + subexp(subexp("\\%25|\\%(?!" + HEXDIG$$$1 + "{2})") + "(" + ZONEID$ + ")") + "?\\]?$") + emptyStr() { + if (this._items.length > 1) return false; + const item = this._items[0]; + return item === "" || item === '""'; + } + get str() { + var _a2; + return (_a2 = this._str) !== null && _a2 !== void 0 ? _a2 : this._str = this._items.reduce((s, c) => `${s}${c}`, ""); + } + get names() { + var _a2; + return (_a2 = this._names) !== null && _a2 !== void 0 ? _a2 : this._names = this._items.reduce((names$1, c) => { + if (c instanceof Name) names$1[c.str] = (names$1[c.str] || 0) + 1; + return names$1; + }, {}); + } + }; + exports._Code = _Code; + exports.nil = new _Code(""); + function _(strs, ...args3) { + const code = [strs[0]]; + let i$3 = 0; + while (i$3 < args3.length) { + addCodeArg(code, args3[i$3]); + code.push(strs[++i$3]); + } + return new _Code(code); + } + exports._ = _; + const plus = new _Code("+"); + function str(strs, ...args3) { + const expr = [safeStringify(strs[0])]; + let i$3 = 0; + while (i$3 < args3.length) { + expr.push(plus); + addCodeArg(expr, args3[i$3]); + expr.push(plus, safeStringify(strs[++i$3])); + } + optimize(expr); + return new _Code(expr); + } + exports.str = str; + function addCodeArg(code, arg) { + if (arg instanceof _Code) code.push(...arg._items); + else if (arg instanceof Name) code.push(arg); + else code.push(interpolate(arg)); + } + exports.addCodeArg = addCodeArg; + function optimize(expr) { + let i$3 = 1; + while (i$3 < expr.length - 1) { + if (expr[i$3] === plus) { + const res = mergeExprItems(expr[i$3 - 1], expr[i$3 + 1]); + if (res !== void 0) { + expr.splice(i$3 - 1, 3, res); + continue; + } + expr[i$3++] = "+"; + } + i$3++; + } + } + function mergeExprItems(a, b) { + if (b === '""') return a; + if (a === '""') return b; + if (typeof a == "string") { + if (b instanceof Name || a[a.length - 1] !== '"') return; + if (typeof b != "string") return `${a.slice(0, -1)}${b}"`; + if (b[0] === '"') return a.slice(0, -1) + b.slice(1); + return; + } + if (typeof b == "string" && b[0] === '"' && !(a instanceof Name)) return `"${a}${b.slice(1)}`; + } + function strConcat(c1, c2) { + return c2.emptyStr() ? c1 : c1.emptyStr() ? c2 : str`${c1}${c2}`; + } + exports.strConcat = strConcat; + function interpolate(x) { + return typeof x == "number" || typeof x == "boolean" || x === null ? x : safeStringify(Array.isArray(x) ? x.join(",") : x); + } + function stringify(x) { + return new _Code(safeStringify(x)); + } + exports.stringify = stringify; + function safeStringify(x) { + return JSON.stringify(x).replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029"); + } + exports.safeStringify = safeStringify; + function getProperty(key$1) { + return typeof key$1 == "string" && exports.IDENTIFIER.test(key$1) ? new _Code(`.${key$1}`) : _`[${key$1}]`; + } + exports.getProperty = getProperty; + function getEsmExportName(key$1) { + if (typeof key$1 == "string" && exports.IDENTIFIER.test(key$1)) return new _Code(`${key$1}`); + throw new Error(`CodeGen: invalid export name: ${key$1}, use explicit $id name mapping`); + } + exports.getEsmExportName = getEsmExportName; + function regexpCode(rx) { + return new _Code(rx.toString()); + } + exports.regexpCode = regexpCode; +})); +var require_scope3 = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.ValueScope = exports.ValueScopeName = exports.Scope = exports.varKinds = exports.UsedValueState = void 0; + const code_1$12 = require_code$1(); + var ValueError = class extends Error { + constructor(name) { + super(`CodeGen: "code" for ${name} not defined`); + this.value = name.value; + } + }; + var UsedValueState; + (function(UsedValueState$1) { + UsedValueState$1[UsedValueState$1["Started"] = 0] = "Started"; + UsedValueState$1[UsedValueState$1["Completed"] = 1] = "Completed"; + })(UsedValueState || (exports.UsedValueState = UsedValueState = {})); + exports.varKinds = { + const: new code_1$12.Name("const"), + let: new code_1$12.Name("let"), + var: new code_1$12.Name("var") + }; + var Scope2 = class { + constructor({ prefixes, parent } = {}) { + this._names = {}; + this._prefixes = prefixes; + this._parent = parent; + } + toName(nameOrPrefix) { + return nameOrPrefix instanceof code_1$12.Name ? nameOrPrefix : this.name(nameOrPrefix); + } + name(prefix) { + return new code_1$12.Name(this._newName(prefix)); + } + _newName(prefix) { + const ng = this._names[prefix] || this._nameGroup(prefix); + return `${prefix}${ng.index++}`; + } + _nameGroup(prefix) { + var _a2, _b; + if (((_b = (_a2 = this._parent) === null || _a2 === void 0 ? void 0 : _a2._prefixes) === null || _b === void 0 ? void 0 : _b.has(prefix)) || this._prefixes && !this._prefixes.has(prefix)) throw new Error(`CodeGen: prefix "${prefix}" is not allowed in this scope`); + return this._names[prefix] = { + prefix, + index: 0 }; } - var URI_PROTOCOL = buildExps(false); - var IRI_PROTOCOL = buildExps(true); - var slicedToArray = /* @__PURE__ */ (function() { - function sliceIterator(arr, i$3) { - var _arr = []; - var _n = true; - var _d = false; - var _e = void 0; - try { - for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { - _arr.push(_s.value); - if (i$3 && _arr.length === i$3) break; - } - } catch (err) { - _d = true; - _e = err; - } finally { - try { - if (!_n && _i["return"]) _i["return"](); - } finally { - if (_d) throw _e; - } - } - return _arr; - } - return function(arr, i$3) { - if (Array.isArray(arr)) return arr; - else if (Symbol.iterator in Object(arr)) return sliceIterator(arr, i$3); - else throw new TypeError("Invalid attempt to destructure non-iterable instance"); + }; + exports.Scope = Scope2; + var ValueScopeName = class extends code_1$12.Name { + constructor(prefix, nameStr) { + super(nameStr); + this.prefix = prefix; + } + setValue(value2, { property, itemIndex }) { + this.value = value2; + this.scopePath = (0, code_1$12._)`.${new code_1$12.Name(property)}[${itemIndex}]`; + } + }; + exports.ValueScopeName = ValueScopeName; + const line = (0, code_1$12._)`\n`; + var ValueScope = class extends Scope2 { + constructor(opts) { + super(opts); + this._values = {}; + this._scope = opts.scope; + this.opts = { + ...opts, + _n: opts.lines ? line : code_1$12.nil }; - })(); - var toConsumableArray = function(arr) { - if (Array.isArray(arr)) { - for (var i$3 = 0, arr2 = Array(arr.length); i$3 < arr.length; i$3++) arr2[i$3] = arr[i$3]; - return arr2; - } else return Array.from(arr); - }; - var maxInt = 2147483647; - var base = 36; - var tMin = 1; - var tMax = 26; - var skew = 38; - var damp = 700; - var initialBias = 72; - var initialN = 128; - var delimiter = "-"; - var regexPunycode = /^xn--/; - var regexNonASCII = /[^\0-\x7E]/; - var regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g; - var errors = { - "overflow": "Overflow: input needs wider integers to process", - "not-basic": "Illegal input >= 0x80 (not a basic code point)", - "invalid-input": "Invalid input" - }; - var baseMinusTMin = base - tMin; - var floor = Math.floor; - var stringFromCharCode = String.fromCharCode; - function error$1(type2) { - throw new RangeError(errors[type2]); } - function map$1(array, fn2) { - var result = []; - var length = array.length; - while (length--) result[length] = fn2(array[length]); - return result; + get() { + return this._scope; } - function mapDomain(string3, fn2) { - var parts = string3.split("@"); - var result = ""; - if (parts.length > 1) { - result = parts[0] + "@"; - string3 = parts[1]; - } - string3 = string3.replace(regexSeparators, "."); - var labels = string3.split("."); - var encoded = map$1(labels, fn2).join("."); - return result + encoded; + name(prefix) { + return new ValueScopeName(prefix, this._newName(prefix)); } - function ucs2decode(string3) { - var output = []; - var counter = 0; - var length = string3.length; - while (counter < length) { - var value2 = string3.charCodeAt(counter++); - if (value2 >= 55296 && value2 <= 56319 && counter < length) { - var extra = string3.charCodeAt(counter++); - if ((extra & 64512) == 56320) output.push(((value2 & 1023) << 10) + (extra & 1023) + 65536); - else { - output.push(value2); - counter--; - } - } else output.push(value2); - } - return output; - } - var ucs2encode = function ucs2encode$1(array) { - return String.fromCodePoint.apply(String, toConsumableArray(array)); - }; - var basicToDigit = function basicToDigit$1(codePoint) { - if (codePoint - 48 < 10) return codePoint - 22; - if (codePoint - 65 < 26) return codePoint - 65; - if (codePoint - 97 < 26) return codePoint - 97; - return base; - }; - var digitToBasic = function digitToBasic$1(digit, flag) { - return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5); - }; - var adapt = function adapt$1(delta, numPoints, firstTime) { - var k = 0; - delta = firstTime ? floor(delta / damp) : delta >> 1; - delta += floor(delta / numPoints); - 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 output = []; - var inputLength = input.length; - var i$3 = 0; - var n = initialN; - var bias = initialBias; - var basic = input.lastIndexOf(delimiter); - if (basic < 0) basic = 0; - for (var j = 0; j < basic; ++j) { - if (input.charCodeAt(j) >= 128) error$1("not-basic"); - output.push(input.charCodeAt(j)); - } - for (var index = basic > 0 ? basic + 1 : 0; index < inputLength; ) { - var oldi = i$3; - for (var w = 1, k = base; ; k += base) { - if (index >= inputLength) error$1("invalid-input"); - var digit = basicToDigit(input.charCodeAt(index++)); - if (digit >= base || digit > floor((maxInt - i$3) / w)) error$1("overflow"); - i$3 += digit * w; - var t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias; - if (digit < t) break; - var baseMinusT = base - t; - if (w > floor(maxInt / baseMinusT)) error$1("overflow"); - w *= baseMinusT; - } - var out = output.length + 1; - bias = adapt(i$3 - oldi, out, oldi == 0); - if (floor(i$3 / out) > maxInt - n) error$1("overflow"); - n += floor(i$3 / out); - i$3 %= out; - output.splice(i$3++, 0, n); - } - return String.fromCodePoint.apply(String, output); - }; - var encode2 = function encode$1(input) { - var output = []; - input = ucs2decode(input); - var inputLength = input.length; - var n = initialN; - var delta = 0; - var bias = initialBias; - var _iteratorNormalCompletion = true; - var _didIteratorError = false; - var _iteratorError = void 0; - try { - for (var _iterator = input[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { - var _currentValue2 = _step.value; - if (_currentValue2 < 128) output.push(stringFromCharCode(_currentValue2)); - } - } catch (err) { - _didIteratorError = true; - _iteratorError = err; - } finally { - try { - if (!_iteratorNormalCompletion && _iterator.return) _iterator.return(); - } finally { - if (_didIteratorError) throw _iteratorError; - } - } - var basicLength = output.length; - var handledCPCount = basicLength; - if (basicLength) output.push(delimiter); - while (handledCPCount < inputLength) { - var m = maxInt; - var _iteratorNormalCompletion2 = true; - var _didIteratorError2 = false; - var _iteratorError2 = void 0; - try { - for (var _iterator2 = input[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) { - var currentValue = _step2.value; - if (currentValue >= n && currentValue < m) m = currentValue; - } - } catch (err) { - _didIteratorError2 = true; - _iteratorError2 = err; - } finally { - try { - if (!_iteratorNormalCompletion2 && _iterator2.return) _iterator2.return(); - } finally { - if (_didIteratorError2) throw _iteratorError2; - } - } - var handledCPCountPlusOne = handledCPCount + 1; - if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) error$1("overflow"); - delta += (m - n) * handledCPCountPlusOne; - n = m; - var _iteratorNormalCompletion3 = true; - var _didIteratorError3 = false; - var _iteratorError3 = void 0; - try { - for (var _iterator3 = input[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) { - var _currentValue = _step3.value; - if (_currentValue < n && ++delta > maxInt) error$1("overflow"); - if (_currentValue == n) { - var q = delta; - for (var k = base; ; k += base) { - var t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias; - if (q < t) break; - var qMinusT = q - t; - var baseMinusT = base - t; - output.push(stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))); - q = floor(qMinusT / baseMinusT); - } - output.push(stringFromCharCode(digitToBasic(q, 0))); - bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength); - delta = 0; - ++handledCPCount; - } - } - } catch (err) { - _didIteratorError3 = true; - _iteratorError3 = err; - } finally { - try { - if (!_iteratorNormalCompletion3 && _iterator3.return) _iterator3.return(); - } finally { - if (_didIteratorError3) throw _iteratorError3; - } - } - ++delta; - ++n; - } - return output.join(""); - }; - var toUnicode = function toUnicode$1(input) { - return mapDomain(input, function(string3) { - return regexPunycode.test(string3) ? decode(string3.slice(4).toLowerCase()) : string3; + value(nameOrPrefix, value2) { + var _a2; + if (value2.ref === void 0) throw new Error("CodeGen: ref must be passed in value"); + const name = this.toName(nameOrPrefix); + const { prefix } = name; + const valueKey = (_a2 = value2.key) !== null && _a2 !== void 0 ? _a2 : value2.ref; + let vs = this._values[prefix]; + if (vs) { + const _name = vs.get(valueKey); + if (_name) return _name; + } else vs = this._values[prefix] = /* @__PURE__ */ new Map(); + vs.set(valueKey, name); + const s = this._scope[prefix] || (this._scope[prefix] = []); + const itemIndex = s.length; + s[itemIndex] = value2.ref; + name.setValue(value2, { + property: prefix, + itemIndex }); - }; - var toASCII = function toASCII$1(input) { - return mapDomain(input, function(string3) { - return regexNonASCII.test(string3) ? "xn--" + encode2(string3) : string3; + return name; + } + getValue(prefix, keyOrRef) { + const vs = this._values[prefix]; + if (!vs) return; + return vs.get(keyOrRef); + } + scopeRefs(scopeName, values = this._values) { + return this._reduceValues(values, (name) => { + if (name.scopePath === void 0) throw new Error(`CodeGen: name "${name}" has no value`); + return (0, code_1$12._)`${scopeName}${name.scopePath}`; }); + } + scopeCode(values = this._values, usedValues, getCode) { + return this._reduceValues(values, (name) => { + if (name.value === void 0) throw new Error(`CodeGen: name "${name}" has no value`); + return name.value.code; + }, usedValues, getCode); + } + _reduceValues(values, valueCode, usedValues = {}, getCode) { + let code = code_1$12.nil; + for (const prefix in values) { + const vs = values[prefix]; + if (!vs) continue; + const nameSet = usedValues[prefix] = usedValues[prefix] || /* @__PURE__ */ new Map(); + vs.forEach((name) => { + if (nameSet.has(name)) return; + nameSet.set(name, UsedValueState.Started); + let c = valueCode(name); + if (c) { + const def$30 = this.opts.es5 ? exports.varKinds.var : exports.varKinds.const; + code = (0, code_1$12._)`${code}${def$30} ${name} = ${c};${this.opts._n}`; + } else if (c = getCode === null || getCode === void 0 ? void 0 : getCode(name)) code = (0, code_1$12._)`${code}${c}${this.opts._n}`; + else throw new ValueError(name); + nameSet.set(name, UsedValueState.Completed); + }); + } + return code; + } + }; + exports.ValueScope = ValueScope; +})); +var require_codegen3 = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.or = exports.and = exports.not = exports.CodeGen = exports.operators = exports.varKinds = exports.ValueScopeName = exports.ValueScope = exports.Scope = exports.Name = exports.regexpCode = exports.stringify = exports.getProperty = exports.nil = exports.strConcat = exports.str = exports._ = void 0; + const code_1$11 = require_code$1(); + const scope_1 = require_scope3(); + var code_2 = require_code$1(); + Object.defineProperty(exports, "_", { + enumerable: true, + get: function() { + return code_2._; + } + }); + Object.defineProperty(exports, "str", { + enumerable: true, + get: function() { + return code_2.str; + } + }); + Object.defineProperty(exports, "strConcat", { + enumerable: true, + get: function() { + return code_2.strConcat; + } + }); + Object.defineProperty(exports, "nil", { + enumerable: true, + get: function() { + return code_2.nil; + } + }); + Object.defineProperty(exports, "getProperty", { + enumerable: true, + get: function() { + return code_2.getProperty; + } + }); + Object.defineProperty(exports, "stringify", { + enumerable: true, + get: function() { + return code_2.stringify; + } + }); + Object.defineProperty(exports, "regexpCode", { + enumerable: true, + get: function() { + return code_2.regexpCode; + } + }); + Object.defineProperty(exports, "Name", { + enumerable: true, + get: function() { + return code_2.Name; + } + }); + var scope_2 = require_scope3(); + Object.defineProperty(exports, "Scope", { + enumerable: true, + get: function() { + return scope_2.Scope; + } + }); + Object.defineProperty(exports, "ValueScope", { + enumerable: true, + get: function() { + return scope_2.ValueScope; + } + }); + Object.defineProperty(exports, "ValueScopeName", { + enumerable: true, + get: function() { + return scope_2.ValueScopeName; + } + }); + Object.defineProperty(exports, "varKinds", { + enumerable: true, + get: function() { + return scope_2.varKinds; + } + }); + exports.operators = { + GT: new code_1$11._Code(">"), + GTE: new code_1$11._Code(">="), + LT: new code_1$11._Code("<"), + LTE: new code_1$11._Code("<="), + EQ: new code_1$11._Code("==="), + NEQ: new code_1$11._Code("!=="), + NOT: new code_1$11._Code("!"), + OR: new code_1$11._Code("||"), + AND: new code_1$11._Code("&&"), + ADD: new code_1$11._Code("+") + }; + var Node = class { + optimizeNodes() { + return this; + } + optimizeNames(_names, _constants) { + return this; + } + }; + var Def = class extends Node { + constructor(varKind, name, rhs) { + super(); + this.varKind = varKind; + this.name = name; + this.rhs = rhs; + } + render({ es5, _n }) { + const varKind = es5 ? scope_1.varKinds.var : this.varKind; + const rhs = this.rhs === void 0 ? "" : ` = ${this.rhs}`; + return `${varKind} ${this.name}${rhs};` + _n; + } + optimizeNames(names$1, constants) { + if (!names$1[this.name.str]) return; + if (this.rhs) this.rhs = optimizeExpr(this.rhs, names$1, constants); + return this; + } + get names() { + return this.rhs instanceof code_1$11._CodeOrName ? this.rhs.names : {}; + } + }; + var Assign = class extends Node { + constructor(lhs, rhs, sideEffects) { + super(); + this.lhs = lhs; + this.rhs = rhs; + this.sideEffects = sideEffects; + } + render({ _n }) { + return `${this.lhs} = ${this.rhs};` + _n; + } + optimizeNames(names$1, constants) { + if (this.lhs instanceof code_1$11.Name && !names$1[this.lhs.str] && !this.sideEffects) return; + this.rhs = optimizeExpr(this.rhs, names$1, constants); + return this; + } + get names() { + return addExprNames(this.lhs instanceof code_1$11.Name ? {} : { ...this.lhs.names }, this.rhs); + } + }; + var AssignOp = class extends Assign { + constructor(lhs, op, rhs, sideEffects) { + super(lhs, rhs, sideEffects); + this.op = op; + } + render({ _n }) { + return `${this.lhs} ${this.op}= ${this.rhs};` + _n; + } + }; + var Label = class extends Node { + constructor(label) { + super(); + this.label = label; + this.names = {}; + } + render({ _n }) { + return `${this.label}:` + _n; + } + }; + var Break = class extends Node { + constructor(label) { + super(); + this.label = label; + this.names = {}; + } + render({ _n }) { + return `break${this.label ? ` ${this.label}` : ""};` + _n; + } + }; + var Throw = class extends Node { + constructor(error$1) { + super(); + this.error = error$1; + } + render({ _n }) { + return `throw ${this.error};` + _n; + } + get names() { + return this.error.names; + } + }; + var AnyCode = class extends Node { + constructor(code) { + super(); + this.code = code; + } + render({ _n }) { + return `${this.code};` + _n; + } + optimizeNodes() { + return `${this.code}` ? this : void 0; + } + optimizeNames(names$1, constants) { + this.code = optimizeExpr(this.code, names$1, constants); + return this; + } + get names() { + return this.code instanceof code_1$11._CodeOrName ? this.code.names : {}; + } + }; + var ParentNode = class extends Node { + constructor(nodes = []) { + super(); + this.nodes = nodes; + } + render(opts) { + return this.nodes.reduce((code, n) => code + n.render(opts), ""); + } + optimizeNodes() { + const { nodes } = this; + let i$3 = nodes.length; + while (i$3--) { + const n = nodes[i$3].optimizeNodes(); + if (Array.isArray(n)) nodes.splice(i$3, 1, ...n); + else if (n) nodes[i$3] = n; + else nodes.splice(i$3, 1); + } + return nodes.length > 0 ? this : void 0; + } + optimizeNames(names$1, constants) { + const { nodes } = this; + let i$3 = nodes.length; + while (i$3--) { + const n = nodes[i$3]; + if (n.optimizeNames(names$1, constants)) continue; + subtractNames(names$1, n.names); + nodes.splice(i$3, 1); + } + return nodes.length > 0 ? this : void 0; + } + get names() { + return this.nodes.reduce((names$1, n) => addNames(names$1, n.names), {}); + } + }; + var BlockNode = class extends ParentNode { + render(opts) { + return "{" + opts._n + super.render(opts) + "}" + opts._n; + } + }; + var Root = class extends ParentNode { + }; + var Else = class extends BlockNode { + }; + Else.kind = "else"; + var If = class If2 extends BlockNode { + constructor(condition, nodes) { + super(nodes); + this.condition = condition; + } + render(opts) { + let code = `if(${this.condition})` + super.render(opts); + if (this.else) code += "else " + this.else.render(opts); + return code; + } + optimizeNodes() { + super.optimizeNodes(); + const cond = this.condition; + if (cond === true) return this.nodes; + let e = this.else; + if (e) { + const ns = e.optimizeNodes(); + e = this.else = Array.isArray(ns) ? new Else(ns) : ns; + } + if (e) { + if (cond === false) return e instanceof If2 ? e : e.nodes; + if (this.nodes.length) return this; + return new If2(not(cond), e instanceof If2 ? [e] : e.nodes); + } + if (cond === false || !this.nodes.length) return void 0; + return this; + } + optimizeNames(names$1, constants) { + var _a2; + this.else = (_a2 = this.else) === null || _a2 === void 0 ? void 0 : _a2.optimizeNames(names$1, constants); + if (!(super.optimizeNames(names$1, constants) || this.else)) return; + this.condition = optimizeExpr(this.condition, names$1, constants); + return this; + } + get names() { + const names$1 = super.names; + addExprNames(names$1, this.condition); + if (this.else) addNames(names$1, this.else.names); + return names$1; + } + }; + If.kind = "if"; + var For = class extends BlockNode { + }; + For.kind = "for"; + var ForLoop = class extends For { + constructor(iteration) { + super(); + this.iteration = iteration; + } + render(opts) { + return `for(${this.iteration})` + super.render(opts); + } + optimizeNames(names$1, constants) { + if (!super.optimizeNames(names$1, constants)) return; + this.iteration = optimizeExpr(this.iteration, names$1, constants); + return this; + } + get names() { + return addNames(super.names, this.iteration.names); + } + }; + var ForRange = class extends For { + constructor(varKind, name, from, to) { + super(); + this.varKind = varKind; + this.name = name; + this.from = from; + this.to = to; + } + render(opts) { + const varKind = opts.es5 ? scope_1.varKinds.var : this.varKind; + const { name, from, to } = this; + return `for(${varKind} ${name}=${from}; ${name}<${to}; ${name}++)` + super.render(opts); + } + get names() { + return addExprNames(addExprNames(super.names, this.from), this.to); + } + }; + var ForIter = class extends For { + constructor(loop, varKind, name, iterable) { + super(); + this.loop = loop; + this.varKind = varKind; + this.name = name; + this.iterable = iterable; + } + render(opts) { + return `for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})` + super.render(opts); + } + optimizeNames(names$1, constants) { + if (!super.optimizeNames(names$1, constants)) return; + this.iterable = optimizeExpr(this.iterable, names$1, constants); + return this; + } + get names() { + return addNames(super.names, this.iterable.names); + } + }; + var Func = class extends BlockNode { + constructor(name, args3, async) { + super(); + this.name = name; + this.args = args3; + this.async = async; + } + render(opts) { + return `${this.async ? "async " : ""}function ${this.name}(${this.args})` + super.render(opts); + } + }; + Func.kind = "func"; + var Return = class extends ParentNode { + render(opts) { + return "return " + super.render(opts); + } + }; + Return.kind = "return"; + var Try = class extends BlockNode { + render(opts) { + let code = "try" + super.render(opts); + if (this.catch) code += this.catch.render(opts); + if (this.finally) code += this.finally.render(opts); + return code; + } + optimizeNodes() { + var _a2, _b; + super.optimizeNodes(); + (_a2 = this.catch) === null || _a2 === void 0 || _a2.optimizeNodes(); + (_b = this.finally) === null || _b === void 0 || _b.optimizeNodes(); + return this; + } + optimizeNames(names$1, constants) { + var _a2, _b; + super.optimizeNames(names$1, constants); + (_a2 = this.catch) === null || _a2 === void 0 || _a2.optimizeNames(names$1, constants); + (_b = this.finally) === null || _b === void 0 || _b.optimizeNames(names$1, constants); + return this; + } + get names() { + const names$1 = super.names; + if (this.catch) addNames(names$1, this.catch.names); + if (this.finally) addNames(names$1, this.finally.names); + return names$1; + } + }; + var Catch = class extends BlockNode { + constructor(error$1) { + super(); + this.error = error$1; + } + render(opts) { + return `catch(${this.error})` + super.render(opts); + } + }; + Catch.kind = "catch"; + var Finally = class extends BlockNode { + render(opts) { + return "finally" + super.render(opts); + } + }; + Finally.kind = "finally"; + var CodeGen = class { + constructor(extScope, opts = {}) { + this._values = {}; + this._blockStarts = []; + this._constants = {}; + this.opts = { + ...opts, + _n: opts.lines ? "\n" : "" + }; + this._extScope = extScope; + this._scope = new scope_1.Scope({ parent: extScope }); + this._nodes = [new Root()]; + } + toString() { + return this._root.render(this.opts); + } + name(prefix) { + return this._scope.name(prefix); + } + scopeName(prefix) { + return this._extScope.name(prefix); + } + scopeValue(prefixOrName, value2) { + const name = this._extScope.value(prefixOrName, value2); + (this._values[name.prefix] || (this._values[name.prefix] = /* @__PURE__ */ new Set())).add(name); + return name; + } + getScopeValue(prefix, keyOrRef) { + return this._extScope.getValue(prefix, keyOrRef); + } + scopeRefs(scopeName) { + return this._extScope.scopeRefs(scopeName, this._values); + } + scopeCode() { + return this._extScope.scopeCode(this._values); + } + _def(varKind, nameOrPrefix, rhs, constant) { + const name = this._scope.toName(nameOrPrefix); + if (rhs !== void 0 && constant) this._constants[name.str] = rhs; + this._leafNode(new Def(varKind, name, rhs)); + return name; + } + const(nameOrPrefix, rhs, _constant) { + return this._def(scope_1.varKinds.const, nameOrPrefix, rhs, _constant); + } + let(nameOrPrefix, rhs, _constant) { + return this._def(scope_1.varKinds.let, nameOrPrefix, rhs, _constant); + } + var(nameOrPrefix, rhs, _constant) { + return this._def(scope_1.varKinds.var, nameOrPrefix, rhs, _constant); + } + assign(lhs, rhs, sideEffects) { + return this._leafNode(new Assign(lhs, rhs, sideEffects)); + } + add(lhs, rhs) { + return this._leafNode(new AssignOp(lhs, exports.operators.ADD, rhs)); + } + code(c) { + if (typeof c == "function") c(); + else if (c !== code_1$11.nil) this._leafNode(new AnyCode(c)); + return this; + } + object(...keyValues) { + const code = ["{"]; + for (const [key$1, value2] of keyValues) { + if (code.length > 1) code.push(","); + code.push(key$1); + if (key$1 !== value2 || this.opts.es5) { + code.push(":"); + (0, code_1$11.addCodeArg)(code, value2); + } + } + code.push("}"); + return new code_1$11._Code(code); + } + if(condition, thenBody, elseBody) { + this._blockNode(new If(condition)); + if (thenBody && elseBody) this.code(thenBody).else().code(elseBody).endIf(); + else if (thenBody) this.code(thenBody).endIf(); + else if (elseBody) throw new Error('CodeGen: "else" body without "then" body'); + return this; + } + elseIf(condition) { + return this._elseNode(new If(condition)); + } + else() { + return this._elseNode(new Else()); + } + endIf() { + return this._endBlockNode(If, Else); + } + _for(node2, forBody) { + this._blockNode(node2); + if (forBody) this.code(forBody).endFor(); + return this; + } + for(iteration, forBody) { + return this._for(new ForLoop(iteration), forBody); + } + forRange(nameOrPrefix, from, to, forBody, varKind = this.opts.es5 ? scope_1.varKinds.var : scope_1.varKinds.let) { + const name = this._scope.toName(nameOrPrefix); + return this._for(new ForRange(varKind, name, from, to), () => forBody(name)); + } + forOf(nameOrPrefix, iterable, forBody, varKind = scope_1.varKinds.const) { + const name = this._scope.toName(nameOrPrefix); + if (this.opts.es5) { + const arr = iterable instanceof code_1$11.Name ? iterable : this.var("_arr", iterable); + return this.forRange("_i", 0, (0, code_1$11._)`${arr}.length`, (i$3) => { + this.var(name, (0, code_1$11._)`${arr}[${i$3}]`); + forBody(name); + }); + } + return this._for(new ForIter("of", varKind, name, iterable), () => forBody(name)); + } + forIn(nameOrPrefix, obj, forBody, varKind = this.opts.es5 ? scope_1.varKinds.var : scope_1.varKinds.const) { + if (this.opts.ownProperties) return this.forOf(nameOrPrefix, (0, code_1$11._)`Object.keys(${obj})`, forBody); + const name = this._scope.toName(nameOrPrefix); + return this._for(new ForIter("in", varKind, name, obj), () => forBody(name)); + } + endFor() { + return this._endBlockNode(For); + } + label(label) { + return this._leafNode(new Label(label)); + } + break(label) { + return this._leafNode(new Break(label)); + } + return(value2) { + const node2 = new Return(); + this._blockNode(node2); + this.code(value2); + if (node2.nodes.length !== 1) throw new Error('CodeGen: "return" should have one node'); + return this._endBlockNode(Return); + } + try(tryBody, catchCode, finallyCode) { + if (!catchCode && !finallyCode) throw new Error('CodeGen: "try" without "catch" and "finally"'); + const node2 = new Try(); + this._blockNode(node2); + this.code(tryBody); + if (catchCode) { + const error$1 = this.name("e"); + this._currNode = node2.catch = new Catch(error$1); + catchCode(error$1); + } + if (finallyCode) { + this._currNode = node2.finally = new Finally(); + this.code(finallyCode); + } + return this._endBlockNode(Catch, Finally); + } + throw(error$1) { + return this._leafNode(new Throw(error$1)); + } + block(body, nodeCount) { + this._blockStarts.push(this._nodes.length); + if (body) this.code(body).endBlock(nodeCount); + return this; + } + endBlock(nodeCount) { + const len = this._blockStarts.pop(); + if (len === void 0) throw new Error("CodeGen: not in self-balancing block"); + const toClose = this._nodes.length - len; + if (toClose < 0 || nodeCount !== void 0 && toClose !== nodeCount) throw new Error(`CodeGen: wrong number of nodes: ${toClose} vs ${nodeCount} expected`); + this._nodes.length = len; + return this; + } + func(name, args3 = code_1$11.nil, async, funcBody) { + this._blockNode(new Func(name, args3, async)); + if (funcBody) this.code(funcBody).endFunc(); + return this; + } + endFunc() { + return this._endBlockNode(Func); + } + optimize(n = 1) { + while (n-- > 0) { + this._root.optimizeNodes(); + this._root.optimizeNames(this._root.names, this._constants); + } + } + _leafNode(node2) { + this._currNode.nodes.push(node2); + return this; + } + _blockNode(node2) { + this._currNode.nodes.push(node2); + this._nodes.push(node2); + } + _endBlockNode(N1, N2) { + const n = this._currNode; + if (n instanceof N1 || N2 && n instanceof N2) { + this._nodes.pop(); + return this; + } + throw new Error(`CodeGen: not in block "${N2 ? `${N1.kind}/${N2.kind}` : N1.kind}"`); + } + _elseNode(node2) { + const n = this._currNode; + if (!(n instanceof If)) throw new Error('CodeGen: "else" without "if"'); + this._currNode = n.else = node2; + return this; + } + get _root() { + return this._nodes[0]; + } + get _currNode() { + const ns = this._nodes; + return ns[ns.length - 1]; + } + set _currNode(node2) { + const ns = this._nodes; + ns[ns.length - 1] = node2; + } + }; + exports.CodeGen = CodeGen; + function addNames(names$1, from) { + for (const n in from) names$1[n] = (names$1[n] || 0) + (from[n] || 0); + return names$1; + } + function addExprNames(names$1, from) { + return from instanceof code_1$11._CodeOrName ? addNames(names$1, from.names) : names$1; + } + function optimizeExpr(expr, names$1, constants) { + if (expr instanceof code_1$11.Name) return replaceName(expr); + if (!canOptimize(expr)) return expr; + return new code_1$11._Code(expr._items.reduce((items, c) => { + if (c instanceof code_1$11.Name) c = replaceName(c); + if (c instanceof code_1$11._Code) items.push(...c._items); + else items.push(c); + return items; + }, [])); + function replaceName(n) { + const c = constants[n.str]; + if (c === void 0 || names$1[n.str] !== 1) return n; + delete names$1[n.str]; + return c; + } + function canOptimize(e) { + return e instanceof code_1$11._Code && e._items.some((c) => c instanceof code_1$11.Name && names$1[c.str] === 1 && constants[c.str] !== void 0); + } + } + function subtractNames(names$1, from) { + for (const n in from) names$1[n] = (names$1[n] || 0) - (from[n] || 0); + } + function not(x) { + return typeof x == "boolean" || typeof x == "number" || x === null ? !x : (0, code_1$11._)`!${par(x)}`; + } + exports.not = not; + const andCode = mappend(exports.operators.AND); + function and(...args3) { + return args3.reduce(andCode); + } + exports.and = and; + const orCode = mappend(exports.operators.OR); + function or(...args3) { + return args3.reduce(orCode); + } + exports.or = or; + function mappend(op) { + return (x, y) => x === code_1$11.nil ? y : y === code_1$11.nil ? x : (0, code_1$11._)`${par(x)} ${op} ${par(y)}`; + } + function par(x) { + return x instanceof code_1$11.Name ? x : (0, code_1$11._)`(${x})`; + } +})); +var require_util10 = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.checkStrictMode = exports.getErrorPath = exports.Type = exports.useFunc = exports.setEvaluated = exports.evaluatedPropsToName = exports.mergeEvaluated = exports.eachItem = exports.unescapeJsonPointer = exports.escapeJsonPointer = exports.escapeFragment = exports.unescapeFragment = exports.schemaRefOrVal = exports.schemaHasRulesButRef = exports.schemaHasRules = exports.checkUnknownRules = exports.alwaysValidSchema = exports.toHash = void 0; + const codegen_1$37 = require_codegen3(); + const code_1$10 = require_code$1(); + function toHash(arr) { + const hash2 = {}; + for (const item of arr) hash2[item] = true; + return hash2; + } + exports.toHash = toHash; + function alwaysValidSchema(it, schema2) { + if (typeof schema2 == "boolean") return schema2; + if (Object.keys(schema2).length === 0) return true; + checkUnknownRules(it, schema2); + return !schemaHasRules(schema2, it.self.RULES.all); + } + exports.alwaysValidSchema = alwaysValidSchema; + function checkUnknownRules(it, schema2 = it.schema) { + const { opts, self: self2 } = it; + if (!opts.strictSchema) return; + if (typeof schema2 === "boolean") return; + const rules = self2.RULES.keywords; + for (const key$1 in schema2) if (!rules[key$1]) checkStrictMode(it, `unknown keyword: "${key$1}"`); + } + exports.checkUnknownRules = checkUnknownRules; + function schemaHasRules(schema2, rules) { + if (typeof schema2 == "boolean") return !schema2; + for (const key$1 in schema2) if (rules[key$1]) return true; + return false; + } + exports.schemaHasRules = schemaHasRules; + function schemaHasRulesButRef(schema2, RULES) { + if (typeof schema2 == "boolean") return !schema2; + for (const key$1 in schema2) if (key$1 !== "$ref" && RULES.all[key$1]) return true; + return false; + } + exports.schemaHasRulesButRef = schemaHasRulesButRef; + function schemaRefOrVal({ topSchemaRef, schemaPath }, schema2, keyword, $data) { + if (!$data) { + if (typeof schema2 == "number" || typeof schema2 == "boolean") return schema2; + if (typeof schema2 == "string") return (0, codegen_1$37._)`${schema2}`; + } + return (0, codegen_1$37._)`${topSchemaRef}${schemaPath}${(0, codegen_1$37.getProperty)(keyword)}`; + } + exports.schemaRefOrVal = schemaRefOrVal; + function unescapeFragment(str$1) { + return unescapeJsonPointer(decodeURIComponent(str$1)); + } + exports.unescapeFragment = unescapeFragment; + function escapeFragment(str$1) { + return encodeURIComponent(escapeJsonPointer(str$1)); + } + exports.escapeFragment = escapeFragment; + function escapeJsonPointer(str$1) { + if (typeof str$1 == "number") return `${str$1}`; + return str$1.replace(/~/g, "~0").replace(/\//g, "~1"); + } + exports.escapeJsonPointer = escapeJsonPointer; + function unescapeJsonPointer(str$1) { + return str$1.replace(/~1/g, "/").replace(/~0/g, "~"); + } + exports.unescapeJsonPointer = unescapeJsonPointer; + function eachItem(xs, f) { + if (Array.isArray(xs)) for (const x of xs) f(x); + else f(xs); + } + exports.eachItem = eachItem; + function makeMergeEvaluated({ mergeNames, mergeToName, mergeValues: mergeValues$1, resultToName }) { + return (gen, from, to, toName) => { + const res = to === void 0 ? from : to instanceof codegen_1$37.Name ? (from instanceof codegen_1$37.Name ? mergeNames(gen, from, to) : mergeToName(gen, from, to), to) : from instanceof codegen_1$37.Name ? (mergeToName(gen, to, from), from) : mergeValues$1(from, to); + return toName === codegen_1$37.Name && !(res instanceof codegen_1$37.Name) ? resultToName(gen, res) : res; }; - var punycode = { - "version": "2.1.0", - "ucs2": { - "decode": ucs2decode, - "encode": ucs2encode + } + exports.mergeEvaluated = { + props: makeMergeEvaluated({ + mergeNames: (gen, from, to) => gen.if((0, codegen_1$37._)`${to} !== true && ${from} !== undefined`, () => { + gen.if((0, codegen_1$37._)`${from} === true`, () => gen.assign(to, true), () => gen.assign(to, (0, codegen_1$37._)`${to} || {}`).code((0, codegen_1$37._)`Object.assign(${to}, ${from})`)); + }), + mergeToName: (gen, from, to) => gen.if((0, codegen_1$37._)`${to} !== true`, () => { + if (from === true) gen.assign(to, true); + else { + gen.assign(to, (0, codegen_1$37._)`${to} || {}`); + setEvaluated(gen, to, from); + } + }), + mergeValues: (from, to) => from === true ? true : { + ...from, + ...to }, - "decode": decode, - "encode": encode2, - "toASCII": toASCII, - "toUnicode": toUnicode + resultToName: evaluatedPropsToName + }), + items: makeMergeEvaluated({ + mergeNames: (gen, from, to) => gen.if((0, codegen_1$37._)`${to} !== true && ${from} !== undefined`, () => gen.assign(to, (0, codegen_1$37._)`${from} === true ? true : ${to} > ${from} ? ${to} : ${from}`)), + mergeToName: (gen, from, to) => gen.if((0, codegen_1$37._)`${to} !== true`, () => gen.assign(to, from === true ? true : (0, codegen_1$37._)`${to} > ${from} ? ${to} : ${from}`)), + mergeValues: (from, to) => from === true ? true : Math.max(from, to), + resultToName: (gen, items) => gen.var("items", items) + }) + }; + function evaluatedPropsToName(gen, ps) { + if (ps === true) return gen.var("props", true); + const props = gen.var("props", (0, codegen_1$37._)`{}`); + if (ps !== void 0) setEvaluated(gen, props, ps); + return props; + } + exports.evaluatedPropsToName = evaluatedPropsToName; + function setEvaluated(gen, props, ps) { + Object.keys(ps).forEach((p) => gen.assign((0, codegen_1$37._)`${props}${(0, codegen_1$37.getProperty)(p)}`, true)); + } + exports.setEvaluated = setEvaluated; + const snippets = {}; + function useFunc(gen, f) { + return gen.scopeValue("func", { + ref: f, + code: snippets[f.code] || (snippets[f.code] = new code_1$10._Code(f.code)) + }); + } + exports.useFunc = useFunc; + var Type2; + (function(Type$1) { + Type$1[Type$1["Num"] = 0] = "Num"; + Type$1[Type$1["Str"] = 1] = "Str"; + })(Type2 || (exports.Type = Type2 = {})); + function getErrorPath(dataProp, dataPropType, jsPropertySyntax) { + if (dataProp instanceof codegen_1$37.Name) { + const isNumber2 = dataPropType === Type2.Num; + return jsPropertySyntax ? isNumber2 ? (0, codegen_1$37._)`"[" + ${dataProp} + "]"` : (0, codegen_1$37._)`"['" + ${dataProp} + "']"` : isNumber2 ? (0, codegen_1$37._)`"/" + ${dataProp}` : (0, codegen_1$37._)`"/" + ${dataProp}.replace(/~/g, "~0").replace(/\\//g, "~1")`; + } + return jsPropertySyntax ? (0, codegen_1$37.getProperty)(dataProp).toString() : "/" + escapeJsonPointer(dataProp); + } + exports.getErrorPath = getErrorPath; + function checkStrictMode(it, msg, mode = it.opts.strictSchema) { + if (!mode) return; + msg = `strict mode: ${msg}`; + if (mode === true) throw new Error(msg); + it.self.logger.warn(msg); + } + exports.checkStrictMode = checkStrictMode; +})); +var require_names3 = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + const codegen_1$36 = require_codegen3(); + const names = { + data: new codegen_1$36.Name("data"), + valCxt: new codegen_1$36.Name("valCxt"), + instancePath: new codegen_1$36.Name("instancePath"), + parentData: new codegen_1$36.Name("parentData"), + parentDataProperty: new codegen_1$36.Name("parentDataProperty"), + rootData: new codegen_1$36.Name("rootData"), + dynamicAnchors: new codegen_1$36.Name("dynamicAnchors"), + vErrors: new codegen_1$36.Name("vErrors"), + errors: new codegen_1$36.Name("errors"), + this: new codegen_1$36.Name("this"), + self: new codegen_1$36.Name("self"), + scope: new codegen_1$36.Name("scope"), + json: new codegen_1$36.Name("json"), + jsonPos: new codegen_1$36.Name("jsonPos"), + jsonLen: new codegen_1$36.Name("jsonLen"), + jsonPart: new codegen_1$36.Name("jsonPart") + }; + exports.default = names; +})); +var require_errors4 = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.extendErrors = exports.resetErrorsCount = exports.reportExtraError = exports.reportError = exports.keyword$DataError = exports.keywordError = void 0; + const codegen_1$35 = require_codegen3(); + const util_1$29 = require_util10(); + const names_1$7 = require_names3(); + exports.keywordError = { message: ({ keyword }) => (0, codegen_1$35.str)`must pass "${keyword}" keyword validation` }; + exports.keyword$DataError = { message: ({ keyword, schemaType }) => schemaType ? (0, codegen_1$35.str)`"${keyword}" keyword must be ${schemaType} ($data)` : (0, codegen_1$35.str)`"${keyword}" keyword is invalid ($data)` }; + function reportError(cxt, error$1 = exports.keywordError, errorPaths, overrideAllErrors) { + const { it } = cxt; + const { gen, compositeRule, allErrors } = it; + const errObj = errorObjectCode(cxt, error$1, errorPaths); + if (overrideAllErrors !== null && overrideAllErrors !== void 0 ? overrideAllErrors : compositeRule || allErrors) addError(gen, errObj); + else returnErrors(it, (0, codegen_1$35._)`[${errObj}]`); + } + exports.reportError = reportError; + function reportExtraError(cxt, error$1 = exports.keywordError, errorPaths) { + const { it } = cxt; + const { gen, compositeRule, allErrors } = it; + addError(gen, errorObjectCode(cxt, error$1, errorPaths)); + if (!(compositeRule || allErrors)) returnErrors(it, names_1$7.default.vErrors); + } + exports.reportExtraError = reportExtraError; + function resetErrorsCount(gen, errsCount) { + gen.assign(names_1$7.default.errors, errsCount); + gen.if((0, codegen_1$35._)`${names_1$7.default.vErrors} !== null`, () => gen.if(errsCount, () => gen.assign((0, codegen_1$35._)`${names_1$7.default.vErrors}.length`, errsCount), () => gen.assign(names_1$7.default.vErrors, null))); + } + exports.resetErrorsCount = resetErrorsCount; + function extendErrors({ gen, keyword, schemaValue, data, errsCount, it }) { + if (errsCount === void 0) throw new Error("ajv implementation error"); + const err = gen.name("err"); + gen.forRange("i", errsCount, names_1$7.default.errors, (i$3) => { + gen.const(err, (0, codegen_1$35._)`${names_1$7.default.vErrors}[${i$3}]`); + gen.if((0, codegen_1$35._)`${err}.instancePath === undefined`, () => gen.assign((0, codegen_1$35._)`${err}.instancePath`, (0, codegen_1$35.strConcat)(names_1$7.default.instancePath, it.errorPath))); + gen.assign((0, codegen_1$35._)`${err}.schemaPath`, (0, codegen_1$35.str)`${it.errSchemaPath}/${keyword}`); + if (it.opts.verbose) { + gen.assign((0, codegen_1$35._)`${err}.schema`, schemaValue); + gen.assign((0, codegen_1$35._)`${err}.data`, data); + } + }); + } + exports.extendErrors = extendErrors; + function addError(gen, errObj) { + const err = gen.const("err", errObj); + gen.if((0, codegen_1$35._)`${names_1$7.default.vErrors} === null`, () => gen.assign(names_1$7.default.vErrors, (0, codegen_1$35._)`[${err}]`), (0, codegen_1$35._)`${names_1$7.default.vErrors}.push(${err})`); + gen.code((0, codegen_1$35._)`${names_1$7.default.errors}++`); + } + function returnErrors(it, errs) { + const { gen, validateName, schemaEnv } = it; + if (schemaEnv.$async) gen.throw((0, codegen_1$35._)`new ${it.ValidationError}(${errs})`); + else { + gen.assign((0, codegen_1$35._)`${validateName}.errors`, errs); + gen.return(false); + } + } + const E = { + keyword: new codegen_1$35.Name("keyword"), + schemaPath: new codegen_1$35.Name("schemaPath"), + params: new codegen_1$35.Name("params"), + propertyName: new codegen_1$35.Name("propertyName"), + message: new codegen_1$35.Name("message"), + schema: new codegen_1$35.Name("schema"), + parentSchema: new codegen_1$35.Name("parentSchema") + }; + function errorObjectCode(cxt, error$1, errorPaths) { + const { createErrors } = cxt.it; + if (createErrors === false) return (0, codegen_1$35._)`{}`; + return errorObject(cxt, error$1, errorPaths); + } + function errorObject(cxt, error$1, errorPaths = {}) { + const { gen, it } = cxt; + const keyValues = [errorInstancePath(it, errorPaths), errorSchemaPath(cxt, errorPaths)]; + extraErrorProps(cxt, error$1, keyValues); + return gen.object(...keyValues); + } + function errorInstancePath({ errorPath }, { instancePath }) { + const instPath = instancePath ? (0, codegen_1$35.str)`${errorPath}${(0, util_1$29.getErrorPath)(instancePath, util_1$29.Type.Str)}` : errorPath; + return [names_1$7.default.instancePath, (0, codegen_1$35.strConcat)(names_1$7.default.instancePath, instPath)]; + } + function errorSchemaPath({ keyword, it: { errSchemaPath } }, { schemaPath, parentSchema }) { + let schPath = parentSchema ? errSchemaPath : (0, codegen_1$35.str)`${errSchemaPath}/${keyword}`; + if (schemaPath) schPath = (0, codegen_1$35.str)`${schPath}${(0, util_1$29.getErrorPath)(schemaPath, util_1$29.Type.Str)}`; + return [E.schemaPath, schPath]; + } + function extraErrorProps(cxt, { params, message }, keyValues) { + const { keyword, data, schemaValue, it } = cxt; + const { opts, propertyName, topSchemaRef, schemaPath } = it; + keyValues.push([E.keyword, keyword], [E.params, typeof params == "function" ? params(cxt) : params || (0, codegen_1$35._)`{}`]); + if (opts.messages) keyValues.push([E.message, typeof message == "function" ? message(cxt) : message]); + if (opts.verbose) keyValues.push([E.schema, schemaValue], [E.parentSchema, (0, codegen_1$35._)`${topSchemaRef}${schemaPath}`], [names_1$7.default.data, data]); + if (propertyName) keyValues.push([E.propertyName, propertyName]); + } +})); +var require_boolSchema3 = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.boolOrEmptySchema = exports.topBoolOrEmptySchema = void 0; + const errors_1$3 = require_errors4(); + const codegen_1$34 = require_codegen3(); + const names_1$6 = require_names3(); + const boolError = { message: "boolean schema is false" }; + function topBoolOrEmptySchema(it) { + const { gen, schema: schema2, validateName } = it; + if (schema2 === false) falseSchemaError(it, false); + else if (typeof schema2 == "object" && schema2.$async === true) gen.return(names_1$6.default.data); + else { + gen.assign((0, codegen_1$34._)`${validateName}.errors`, null); + gen.return(true); + } + } + exports.topBoolOrEmptySchema = topBoolOrEmptySchema; + function boolOrEmptySchema(it, valid) { + const { gen, schema: schema2 } = it; + if (schema2 === false) { + gen.var(valid, false); + falseSchemaError(it); + } else gen.var(valid, true); + } + exports.boolOrEmptySchema = boolOrEmptySchema; + function falseSchemaError(it, overrideAllErrors) { + const { gen, data } = it; + const cxt = { + gen, + keyword: "false schema", + data, + schema: false, + schemaCode: false, + schemaValue: false, + params: {}, + it }; - var SCHEMES = {}; - function pctEncChar(chr) { - var c = chr.charCodeAt(0); - var e = void 0; - if (c < 16) e = "%0" + c.toString(16).toUpperCase(); - else if (c < 128) e = "%" + c.toString(16).toUpperCase(); - else if (c < 2048) e = "%" + (c >> 6 | 192).toString(16).toUpperCase() + "%" + (c & 63 | 128).toString(16).toUpperCase(); - else e = "%" + (c >> 12 | 224).toString(16).toUpperCase() + "%" + (c >> 6 & 63 | 128).toString(16).toUpperCase() + "%" + (c & 63 | 128).toString(16).toUpperCase(); - return e; + (0, errors_1$3.reportError)(cxt, boolError, void 0, overrideAllErrors); + } +})); +var require_rules3 = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.getRules = exports.isJSONType = void 0; + const jsonTypes = /* @__PURE__ */ new Set([ + "string", + "number", + "integer", + "boolean", + "null", + "object", + "array" + ]); + function isJSONType(x) { + return typeof x == "string" && jsonTypes.has(x); + } + exports.isJSONType = isJSONType; + function getRules() { + const groups2 = { + number: { + type: "number", + rules: [] + }, + string: { + type: "string", + rules: [] + }, + array: { + type: "array", + rules: [] + }, + object: { + type: "object", + rules: [] + } + }; + return { + types: { + ...groups2, + integer: true, + boolean: true, + null: true + }, + rules: [ + { rules: [] }, + groups2.number, + groups2.string, + groups2.array, + groups2.object + ], + post: { rules: [] }, + all: {}, + keywords: {} + }; + } + exports.getRules = getRules; +})); +var require_applicability3 = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.shouldUseRule = exports.shouldUseGroup = exports.schemaHasRulesForType = void 0; + function schemaHasRulesForType({ schema: schema2, self: self2 }, type2) { + const group2 = self2.RULES.types[type2]; + return group2 && group2 !== true && shouldUseGroup(schema2, group2); + } + exports.schemaHasRulesForType = schemaHasRulesForType; + function shouldUseGroup(schema2, group2) { + return group2.rules.some((rule) => shouldUseRule(schema2, rule)); + } + exports.shouldUseGroup = shouldUseGroup; + function shouldUseRule(schema2, rule) { + var _a2; + return schema2[rule.keyword] !== void 0 || ((_a2 = rule.definition.implements) === null || _a2 === void 0 ? void 0 : _a2.some((kwd) => schema2[kwd] !== void 0)); + } + exports.shouldUseRule = shouldUseRule; +})); +var require_dataType3 = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.reportTypeError = exports.checkDataTypes = exports.checkDataType = exports.coerceAndCheckDataType = exports.getJSONTypes = exports.getSchemaTypes = exports.DataType = void 0; + const rules_1$1 = require_rules3(); + const applicability_1$1 = require_applicability3(); + const errors_1$2 = require_errors4(); + const codegen_1$33 = require_codegen3(); + const util_1$28 = require_util10(); + var DataType; + (function(DataType$1) { + DataType$1[DataType$1["Correct"] = 0] = "Correct"; + DataType$1[DataType$1["Wrong"] = 1] = "Wrong"; + })(DataType || (exports.DataType = DataType = {})); + function getSchemaTypes(schema2) { + const types = getJSONTypes(schema2.type); + if (types.includes("null")) { + if (schema2.nullable === false) throw new Error("type: null contradicts nullable: false"); + } else { + if (!types.length && schema2.nullable !== void 0) throw new Error('"nullable" cannot be used without "type"'); + if (schema2.nullable === true) types.push("null"); } - function pctDecChars(str) { - var newStr = ""; - var i$3 = 0; - var il = str.length; - while (i$3 < il) { - var c = parseInt(str.substr(i$3 + 1, 2), 16); - if (c < 128) { - newStr += String.fromCharCode(c); - i$3 += 3; - } else if (c >= 194 && c < 224) { - if (il - i$3 >= 6) { - var c2 = parseInt(str.substr(i$3 + 4, 2), 16); - newStr += String.fromCharCode((c & 31) << 6 | c2 & 63); - } else newStr += str.substr(i$3, 6); - i$3 += 6; - } else if (c >= 224) { - if (il - i$3 >= 9) { - var _c = parseInt(str.substr(i$3 + 4, 2), 16); - var c3 = parseInt(str.substr(i$3 + 7, 2), 16); - newStr += String.fromCharCode((c & 15) << 12 | (_c & 63) << 6 | c3 & 63); - } else newStr += str.substr(i$3, 9); - i$3 += 9; - } else { - newStr += str.substr(i$3, 3); - i$3 += 3; - } - } - return newStr; + return types; + } + exports.getSchemaTypes = getSchemaTypes; + function getJSONTypes(ts) { + const types = Array.isArray(ts) ? ts : ts ? [ts] : []; + if (types.every(rules_1$1.isJSONType)) return types; + throw new Error("type must be JSONType or JSONType[]: " + types.join(",")); + } + exports.getJSONTypes = getJSONTypes; + function coerceAndCheckDataType(it, types) { + const { gen, data, opts } = it; + const coerceTo = coerceToTypes(types, opts.coerceTypes); + const checkTypes = types.length > 0 && !(coerceTo.length === 0 && types.length === 1 && (0, applicability_1$1.schemaHasRulesForType)(it, types[0])); + if (checkTypes) { + const wrongType = checkDataTypes(types, data, opts.strictNumbers, DataType.Wrong); + gen.if(wrongType, () => { + if (coerceTo.length) coerceData(it, types, coerceTo); + else reportTypeError(it); + }); } - function _normalizeComponentEncoding(components, protocol) { - function decodeUnreserved$1(str) { - var decStr = pctDecChars(str); - return !decStr.match(protocol.UNRESERVED) ? str : decStr; + return checkTypes; + } + exports.coerceAndCheckDataType = coerceAndCheckDataType; + const COERCIBLE = /* @__PURE__ */ new Set([ + "string", + "number", + "integer", + "boolean", + "null" + ]); + function coerceToTypes(types, coerceTypes) { + return coerceTypes ? types.filter((t) => COERCIBLE.has(t) || coerceTypes === "array" && t === "array") : []; + } + function coerceData(it, types, coerceTo) { + const { gen, data, opts } = it; + const dataType = gen.let("dataType", (0, codegen_1$33._)`typeof ${data}`); + const coerced = gen.let("coerced", (0, codegen_1$33._)`undefined`); + if (opts.coerceTypes === "array") gen.if((0, codegen_1$33._)`${dataType} == 'object' && Array.isArray(${data}) && ${data}.length == 1`, () => gen.assign(data, (0, codegen_1$33._)`${data}[0]`).assign(dataType, (0, codegen_1$33._)`typeof ${data}`).if(checkDataTypes(types, data, opts.strictNumbers), () => gen.assign(coerced, data))); + gen.if((0, codegen_1$33._)`${coerced} !== undefined`); + for (const t of coerceTo) if (COERCIBLE.has(t) || t === "array" && opts.coerceTypes === "array") coerceSpecificType(t); + gen.else(); + reportTypeError(it); + gen.endIf(); + gen.if((0, codegen_1$33._)`${coerced} !== undefined`, () => { + gen.assign(data, coerced); + assignParentData(it, coerced); + }); + function coerceSpecificType(t) { + switch (t) { + case "string": + gen.elseIf((0, codegen_1$33._)`${dataType} == "number" || ${dataType} == "boolean"`).assign(coerced, (0, codegen_1$33._)`"" + ${data}`).elseIf((0, codegen_1$33._)`${data} === null`).assign(coerced, (0, codegen_1$33._)`""`); + return; + case "number": + gen.elseIf((0, codegen_1$33._)`${dataType} == "boolean" || ${data} === null + || (${dataType} == "string" && ${data} && ${data} == +${data})`).assign(coerced, (0, codegen_1$33._)`+${data}`); + return; + case "integer": + gen.elseIf((0, codegen_1$33._)`${dataType} === "boolean" || ${data} === null + || (${dataType} === "string" && ${data} && ${data} == +${data} && !(${data} % 1))`).assign(coerced, (0, codegen_1$33._)`+${data}`); + return; + case "boolean": + gen.elseIf((0, codegen_1$33._)`${data} === "false" || ${data} === 0 || ${data} === null`).assign(coerced, false).elseIf((0, codegen_1$33._)`${data} === "true" || ${data} === 1`).assign(coerced, true); + return; + case "null": + gen.elseIf((0, codegen_1$33._)`${data} === "" || ${data} === 0 || ${data} === false`); + gen.assign(coerced, null); + return; + case "array": + gen.elseIf((0, codegen_1$33._)`${dataType} === "string" || ${dataType} === "number" + || ${dataType} === "boolean" || ${data} === null`).assign(coerced, (0, codegen_1$33._)`[${data}]`); } - if (components.scheme) components.scheme = String(components.scheme).replace(protocol.PCT_ENCODED, decodeUnreserved$1).toLowerCase().replace(protocol.NOT_SCHEME, ""); - if (components.userinfo !== void 0) components.userinfo = String(components.userinfo).replace(protocol.PCT_ENCODED, decodeUnreserved$1).replace(protocol.NOT_USERINFO, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); - if (components.host !== void 0) components.host = String(components.host).replace(protocol.PCT_ENCODED, decodeUnreserved$1).toLowerCase().replace(protocol.NOT_HOST, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); - if (components.path !== void 0) components.path = String(components.path).replace(protocol.PCT_ENCODED, decodeUnreserved$1).replace(components.scheme ? protocol.NOT_PATH : protocol.NOT_PATH_NOSCHEME, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); - if (components.query !== void 0) components.query = String(components.query).replace(protocol.PCT_ENCODED, decodeUnreserved$1).replace(protocol.NOT_QUERY, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); - if (components.fragment !== void 0) components.fragment = String(components.fragment).replace(protocol.PCT_ENCODED, decodeUnreserved$1).replace(protocol.NOT_FRAGMENT, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); - return components; } - function _stripLeadingZeros(str) { - return str.replace(/^0*(.*)/, "$1") || "0"; + } + function assignParentData({ gen, parentData, parentDataProperty }, expr) { + gen.if((0, codegen_1$33._)`${parentData} !== undefined`, () => gen.assign((0, codegen_1$33._)`${parentData}[${parentDataProperty}]`, expr)); + } + function checkDataType(dataType, data, strictNums, correct = DataType.Correct) { + const EQ = correct === DataType.Correct ? codegen_1$33.operators.EQ : codegen_1$33.operators.NEQ; + let cond; + switch (dataType) { + case "null": + return (0, codegen_1$33._)`${data} ${EQ} null`; + case "array": + cond = (0, codegen_1$33._)`Array.isArray(${data})`; + break; + case "object": + cond = (0, codegen_1$33._)`${data} && typeof ${data} == "object" && !Array.isArray(${data})`; + break; + case "integer": + cond = numCond((0, codegen_1$33._)`!(${data} % 1) && !isNaN(${data})`); + break; + case "number": + cond = numCond(); + break; + default: + return (0, codegen_1$33._)`typeof ${data} ${EQ} ${dataType}`; } - function _normalizeIPv4(host, protocol) { - var matches = host.match(protocol.IPV4ADDRESS) || []; - var _matches = slicedToArray(matches, 2), address = _matches[1]; - if (address) return address.split(".").map(_stripLeadingZeros).join("."); - else return host; + return correct === DataType.Correct ? cond : (0, codegen_1$33.not)(cond); + function numCond(_cond = codegen_1$33.nil) { + return (0, codegen_1$33.and)((0, codegen_1$33._)`typeof ${data} == "number"`, _cond, strictNums ? (0, codegen_1$33._)`isFinite(${data})` : codegen_1$33.nil); } - function _normalizeIPv6(host, protocol) { - var matches = host.match(protocol.IPV6ADDRESS) || []; - var _matches2 = slicedToArray(matches, 3), address = _matches2[1], zone = _matches2[2]; - if (address) { - var _address$toLowerCase$ = address.toLowerCase().split("::").reverse(), _address$toLowerCase$2 = slicedToArray(_address$toLowerCase$, 2), last = _address$toLowerCase$2[0], first = _address$toLowerCase$2[1]; - var firstFields = first ? first.split(":").map(_stripLeadingZeros) : []; - var lastFields = last.split(":").map(_stripLeadingZeros); - var isLastFieldIPv4Address = protocol.IPV4ADDRESS.test(lastFields[lastFields.length - 1]); - var fieldCount = isLastFieldIPv4Address ? 7 : 8; - var lastFieldsStart = lastFields.length - fieldCount; - var fields = Array(fieldCount); - for (var x = 0; x < fieldCount; ++x) fields[x] = firstFields[x] || lastFields[lastFieldsStart + x] || ""; - if (isLastFieldIPv4Address) fields[fieldCount - 1] = _normalizeIPv4(fields[fieldCount - 1], protocol); - var longestZeroFields = fields.reduce(function(acc, field, index) { - if (!field || field === "0") { - var lastLongest = acc[acc.length - 1]; - if (lastLongest && lastLongest.index + lastLongest.length === index) lastLongest.length++; - else acc.push({ - index, - length: 1 - }); - } - return acc; - }, []).sort(function(a, b) { - return b.length - a.length; - })[0]; - var newHost = void 0; - if (longestZeroFields && longestZeroFields.length > 1) { - var newFirst = fields.slice(0, longestZeroFields.index); - var newLast = fields.slice(longestZeroFields.index + longestZeroFields.length); - newHost = newFirst.join(":") + "::" + newLast.join(":"); - } else newHost = fields.join(":"); - if (zone) newHost += "%" + zone; - return newHost; - } else return host; + } + exports.checkDataType = checkDataType; + function checkDataTypes(dataTypes, data, strictNums, correct) { + if (dataTypes.length === 1) return checkDataType(dataTypes[0], data, strictNums, correct); + let cond; + const types = (0, util_1$28.toHash)(dataTypes); + if (types.array && types.object) { + const notObj = (0, codegen_1$33._)`typeof ${data} != "object"`; + cond = types.null ? notObj : (0, codegen_1$33._)`!${data} || ${notObj}`; + delete types.null; + delete types.array; + delete types.object; + } else cond = codegen_1$33.nil; + if (types.number) delete types.integer; + for (const t in types) cond = (0, codegen_1$33.and)(cond, checkDataType(t, data, strictNums, correct)); + return cond; + } + exports.checkDataTypes = checkDataTypes; + const typeError = { + message: ({ schema: schema2 }) => `must be ${schema2}`, + params: ({ schema: schema2, schemaValue }) => typeof schema2 == "string" ? (0, codegen_1$33._)`{type: ${schema2}}` : (0, codegen_1$33._)`{type: ${schemaValue}}` + }; + function reportTypeError(it) { + const cxt = getTypeErrorContext(it); + (0, errors_1$2.reportError)(cxt, typeError); + } + exports.reportTypeError = reportTypeError; + function getTypeErrorContext(it) { + const { gen, data, schema: schema2 } = it; + const schemaCode = (0, util_1$28.schemaRefOrVal)(it, schema2, "type"); + return { + gen, + keyword: "type", + data, + schema: schema2.type, + schemaCode, + schemaValue: schemaCode, + parentSchema: schema2, + params: {}, + it + }; + } +})); +var require_defaults3 = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.assignDefaults = void 0; + const codegen_1$32 = require_codegen3(); + const util_1$27 = require_util10(); + function assignDefaults(it, ty) { + const { properties, items } = it.schema; + if (ty === "object" && properties) for (const key$1 in properties) assignDefault(it, key$1, properties[key$1].default); + else if (ty === "array" && Array.isArray(items)) items.forEach((sch, i$3) => assignDefault(it, i$3, sch.default)); + } + exports.assignDefaults = assignDefaults; + function assignDefault(it, prop, defaultValue) { + const { gen, compositeRule, data, opts } = it; + if (defaultValue === void 0) return; + const childData = (0, codegen_1$32._)`${data}${(0, codegen_1$32.getProperty)(prop)}`; + if (compositeRule) { + (0, util_1$27.checkStrictMode)(it, `default is ignored for: ${childData}`); + return; } - var URI_PARSE = /^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i; - var NO_MATCH_IS_UNDEFINED = "".match(/(){0}/)[1] === void 0; - function parse$2(uriString) { - var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; - var components = {}; - var protocol = options.iri !== false ? IRI_PROTOCOL : URI_PROTOCOL; - if (options.reference === "suffix") uriString = (options.scheme ? options.scheme + ":" : "") + "//" + uriString; - var matches = uriString.match(URI_PARSE); - if (matches) { - if (NO_MATCH_IS_UNDEFINED) { - components.scheme = matches[1]; - components.userinfo = matches[3]; - components.host = matches[4]; - components.port = parseInt(matches[5], 10); - components.path = matches[6] || ""; - components.query = matches[7]; - components.fragment = matches[8]; - if (isNaN(components.port)) components.port = matches[5]; - } else { - components.scheme = matches[1] || void 0; - components.userinfo = uriString.indexOf("@") !== -1 ? matches[3] : void 0; - components.host = uriString.indexOf("//") !== -1 ? matches[4] : void 0; - components.port = parseInt(matches[5], 10); - components.path = matches[6] || ""; - components.query = uriString.indexOf("?") !== -1 ? matches[7] : void 0; - components.fragment = uriString.indexOf("#") !== -1 ? matches[8] : void 0; - if (isNaN(components.port)) components.port = uriString.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/) ? matches[4] : void 0; - } - if (components.host) components.host = _normalizeIPv6(_normalizeIPv4(components.host, protocol), protocol); - if (components.scheme === void 0 && components.userinfo === void 0 && components.host === void 0 && components.port === void 0 && !components.path && components.query === void 0) components.reference = "same-document"; - else if (components.scheme === void 0) components.reference = "relative"; - else if (components.fragment === void 0) components.reference = "absolute"; - else components.reference = "uri"; - if (options.reference && options.reference !== "suffix" && options.reference !== components.reference) components.error = components.error || "URI is not a " + options.reference + " reference."; - var schemeHandler = SCHEMES[(options.scheme || components.scheme || "").toLowerCase()]; - if (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport)) { - if (components.host && (options.domainHost || schemeHandler && schemeHandler.domainHost)) try { - components.host = punycode.toASCII(components.host.replace(protocol.PCT_ENCODED, pctDecChars).toLowerCase()); - } catch (e) { - components.error = components.error || "Host's domain name can not be converted to ASCII via punycode: " + e; - } - _normalizeComponentEncoding(components, URI_PROTOCOL); - } else _normalizeComponentEncoding(components, protocol); - if (schemeHandler && schemeHandler.parse) schemeHandler.parse(components, options); - } else components.error = components.error || "URI can not be parsed."; - return components; + let condition = (0, codegen_1$32._)`${childData} === undefined`; + if (opts.useDefaults === "empty") condition = (0, codegen_1$32._)`${condition} || ${childData} === null || ${childData} === ""`; + gen.if(condition, (0, codegen_1$32._)`${childData} = ${(0, codegen_1$32.stringify)(defaultValue)}`); + } +})); +var require_code5 = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.validateUnion = exports.validateArray = exports.usePattern = exports.callValidateCode = exports.schemaProperties = exports.allSchemaProperties = exports.noPropertyInData = exports.propertyInData = exports.isOwnProperty = exports.hasPropFunc = exports.reportMissingProp = exports.checkMissingProp = exports.checkReportMissingProp = void 0; + const codegen_1$31 = require_codegen3(); + const util_1$26 = require_util10(); + const names_1$5 = require_names3(); + const util_2$1 = require_util10(); + function checkReportMissingProp(cxt, prop) { + const { gen, data, it } = cxt; + gen.if(noPropertyInData(gen, data, prop, it.opts.ownProperties), () => { + cxt.setParams({ missingProperty: (0, codegen_1$31._)`${prop}` }, true); + cxt.error(); + }); + } + exports.checkReportMissingProp = checkReportMissingProp; + function checkMissingProp({ gen, data, it: { opts } }, properties, missing) { + return (0, codegen_1$31.or)(...properties.map((prop) => (0, codegen_1$31.and)(noPropertyInData(gen, data, prop, opts.ownProperties), (0, codegen_1$31._)`${missing} = ${prop}`))); + } + exports.checkMissingProp = checkMissingProp; + function reportMissingProp(cxt, missing) { + cxt.setParams({ missingProperty: missing }, true); + cxt.error(); + } + exports.reportMissingProp = reportMissingProp; + function hasPropFunc(gen) { + return gen.scopeValue("func", { + ref: Object.prototype.hasOwnProperty, + code: (0, codegen_1$31._)`Object.prototype.hasOwnProperty` + }); + } + exports.hasPropFunc = hasPropFunc; + function isOwnProperty(gen, data, property) { + return (0, codegen_1$31._)`${hasPropFunc(gen)}.call(${data}, ${property})`; + } + exports.isOwnProperty = isOwnProperty; + function propertyInData(gen, data, property, ownProperties) { + const cond = (0, codegen_1$31._)`${data}${(0, codegen_1$31.getProperty)(property)} !== undefined`; + return ownProperties ? (0, codegen_1$31._)`${cond} && ${isOwnProperty(gen, data, property)}` : cond; + } + exports.propertyInData = propertyInData; + function noPropertyInData(gen, data, property, ownProperties) { + const cond = (0, codegen_1$31._)`${data}${(0, codegen_1$31.getProperty)(property)} === undefined`; + return ownProperties ? (0, codegen_1$31.or)(cond, (0, codegen_1$31.not)(isOwnProperty(gen, data, property))) : cond; + } + exports.noPropertyInData = noPropertyInData; + function allSchemaProperties(schemaMap) { + return schemaMap ? Object.keys(schemaMap).filter((p) => p !== "__proto__") : []; + } + exports.allSchemaProperties = allSchemaProperties; + function schemaProperties(it, schemaMap) { + return allSchemaProperties(schemaMap).filter((p) => !(0, util_1$26.alwaysValidSchema)(it, schemaMap[p])); + } + exports.schemaProperties = schemaProperties; + function callValidateCode({ schemaCode, data, it: { gen, topSchemaRef, schemaPath, errorPath }, it }, func, context, passSchema) { + const dataAndSchema = passSchema ? (0, codegen_1$31._)`${schemaCode}, ${data}, ${topSchemaRef}${schemaPath}` : data; + const valCxt = [ + [names_1$5.default.instancePath, (0, codegen_1$31.strConcat)(names_1$5.default.instancePath, errorPath)], + [names_1$5.default.parentData, it.parentData], + [names_1$5.default.parentDataProperty, it.parentDataProperty], + [names_1$5.default.rootData, names_1$5.default.rootData] + ]; + if (it.opts.dynamicRef) valCxt.push([names_1$5.default.dynamicAnchors, names_1$5.default.dynamicAnchors]); + const args3 = (0, codegen_1$31._)`${dataAndSchema}, ${gen.object(...valCxt)}`; + return context !== codegen_1$31.nil ? (0, codegen_1$31._)`${func}.call(${context}, ${args3})` : (0, codegen_1$31._)`${func}(${args3})`; + } + exports.callValidateCode = callValidateCode; + const newRegExp = (0, codegen_1$31._)`new RegExp`; + function usePattern({ gen, it: { opts } }, pattern) { + const u = opts.unicodeRegExp ? "u" : ""; + const { regExp } = opts.code; + const rx = regExp(pattern, u); + return gen.scopeValue("pattern", { + key: rx.toString(), + ref: rx, + code: (0, codegen_1$31._)`${regExp.code === "new RegExp" ? newRegExp : (0, util_2$1.useFunc)(gen, regExp)}(${pattern}, ${u})` + }); + } + exports.usePattern = usePattern; + function validateArray(cxt) { + const { gen, data, keyword, it } = cxt; + const valid = gen.name("valid"); + if (it.allErrors) { + const validArr = gen.let("valid", true); + validateItems(() => gen.assign(validArr, false)); + return validArr; } - function _recomposeAuthority(components, options) { - var protocol = options.iri !== false ? IRI_PROTOCOL : URI_PROTOCOL; - var uriTokens = []; - if (components.userinfo !== void 0) { - uriTokens.push(components.userinfo); - uriTokens.push("@"); - } - if (components.host !== void 0) uriTokens.push(_normalizeIPv6(_normalizeIPv4(String(components.host), protocol), protocol).replace(protocol.IPV6ADDRESS, function(_, $1, $2) { - return "[" + $1 + ($2 ? "%25" + $2 : "") + "]"; - })); - if (typeof components.port === "number" || typeof components.port === "string") { - uriTokens.push(":"); - uriTokens.push(String(components.port)); - } - return uriTokens.length ? uriTokens.join("") : void 0; + gen.var(valid, true); + validateItems(() => gen.break()); + return valid; + function validateItems(notValid) { + const len = gen.const("len", (0, codegen_1$31._)`${data}.length`); + gen.forRange("i", 0, len, (i$3) => { + cxt.subschema({ + keyword, + dataProp: i$3, + dataPropType: util_1$26.Type.Num + }, valid); + gen.if((0, codegen_1$31.not)(valid), notValid); + }); } - var RDS1 = /^\.\.?\//; - var RDS2 = /^\/\.(\/|$)/; - var RDS3 = /^\/\.\.(\/|$)/; - var RDS5 = /^\/?(?:.|\n)*?(?=\/|$)/; - function removeDotSegments(input) { - var output = []; - while (input.length) if (input.match(RDS1)) input = input.replace(RDS1, ""); - else if (input.match(RDS2)) input = input.replace(RDS2, "/"); - else if (input.match(RDS3)) { - input = input.replace(RDS3, "/"); - output.pop(); - } else if (input === "." || input === "..") input = ""; - else { - var im = input.match(RDS5); - if (im) { - var s = im[0]; - input = input.slice(s.length); - output.push(s); - } else throw new Error("Unexpected dot segment condition"); - } - return output.join(""); - } - function serialize(components) { - var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; - var protocol = options.iri ? IRI_PROTOCOL : URI_PROTOCOL; - var uriTokens = []; - var schemeHandler = SCHEMES[(options.scheme || components.scheme || "").toLowerCase()]; - if (schemeHandler && schemeHandler.serialize) schemeHandler.serialize(components, options); - if (components.host) { - if (protocol.IPV6ADDRESS.test(components.host)) { - } else if (options.domainHost || schemeHandler && schemeHandler.domainHost) try { - components.host = !options.iri ? punycode.toASCII(components.host.replace(protocol.PCT_ENCODED, pctDecChars).toLowerCase()) : punycode.toUnicode(components.host); - } catch (e) { - components.error = components.error || "Host's domain name can not be converted to " + (!options.iri ? "ASCII" : "Unicode") + " via punycode: " + e; - } - } - _normalizeComponentEncoding(components, protocol); - if (options.reference !== "suffix" && components.scheme) { - uriTokens.push(components.scheme); - uriTokens.push(":"); - } - var authority = _recomposeAuthority(components, options); - if (authority !== void 0) { - if (options.reference !== "suffix") uriTokens.push("//"); - uriTokens.push(authority); - if (components.path && components.path.charAt(0) !== "/") uriTokens.push("/"); - } - if (components.path !== void 0) { - var s = components.path; - if (!options.absolutePath && (!schemeHandler || !schemeHandler.absolutePath)) s = removeDotSegments(s); - if (authority === void 0) s = s.replace(/^\/\//, "/%2F"); - uriTokens.push(s); - } - if (components.query !== void 0) { - uriTokens.push("?"); - uriTokens.push(components.query); - } - if (components.fragment !== void 0) { - uriTokens.push("#"); - uriTokens.push(components.fragment); - } - return uriTokens.join(""); - } - function resolveComponents(base$1, relative$1) { - var options = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}; - var skipNormalization = arguments[3]; - var target = {}; - if (!skipNormalization) { - base$1 = parse$2(serialize(base$1, options), options); - relative$1 = parse$2(serialize(relative$1, options), options); - } - options = options || {}; - if (!options.tolerant && relative$1.scheme) { - target.scheme = relative$1.scheme; - target.userinfo = relative$1.userinfo; - target.host = relative$1.host; - target.port = relative$1.port; - target.path = removeDotSegments(relative$1.path || ""); - target.query = relative$1.query; + } + exports.validateArray = validateArray; + function validateUnion(cxt) { + const { gen, schema: schema2, keyword, it } = cxt; + if (!Array.isArray(schema2)) throw new Error("ajv implementation error"); + if (schema2.some((sch) => (0, util_1$26.alwaysValidSchema)(it, sch)) && !it.opts.unevaluated) return; + const valid = gen.let("valid", false); + const schValid = gen.name("_valid"); + gen.block(() => schema2.forEach((_sch, i$3) => { + const schCxt = cxt.subschema({ + keyword, + schemaProp: i$3, + compositeRule: true + }, schValid); + gen.assign(valid, (0, codegen_1$31._)`${valid} || ${schValid}`); + if (!cxt.mergeValidEvaluated(schCxt, schValid)) gen.if((0, codegen_1$31.not)(valid)); + })); + cxt.result(valid, () => cxt.reset(), () => cxt.error(true)); + } + exports.validateUnion = validateUnion; +})); +var require_keyword3 = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.validateKeywordUsage = exports.validSchemaType = exports.funcKeywordCode = exports.macroKeywordCode = void 0; + const codegen_1$30 = require_codegen3(); + const names_1$4 = require_names3(); + const code_1$9 = require_code5(); + const errors_1$1 = require_errors4(); + function macroKeywordCode(cxt, def$30) { + const { gen, keyword, schema: schema2, parentSchema, it } = cxt; + const macroSchema = def$30.macro.call(it.self, schema2, parentSchema, it); + const schemaRef = useKeyword(gen, keyword, macroSchema); + if (it.opts.validateSchema !== false) it.self.validateSchema(macroSchema, true); + const valid = gen.name("valid"); + cxt.subschema({ + schema: macroSchema, + schemaPath: codegen_1$30.nil, + errSchemaPath: `${it.errSchemaPath}/${keyword}`, + topSchemaRef: schemaRef, + compositeRule: true + }, valid); + cxt.pass(valid, () => cxt.error(true)); + } + exports.macroKeywordCode = macroKeywordCode; + function funcKeywordCode(cxt, def$30) { + var _a2; + const { gen, keyword, schema: schema2, parentSchema, $data, it } = cxt; + checkAsyncKeyword(it, def$30); + const validateRef = useKeyword(gen, keyword, !$data && def$30.compile ? def$30.compile.call(it.self, schema2, parentSchema, it) : def$30.validate); + const valid = gen.let("valid"); + cxt.block$data(valid, validateKeyword); + cxt.ok((_a2 = def$30.valid) !== null && _a2 !== void 0 ? _a2 : valid); + function validateKeyword() { + if (def$30.errors === false) { + assignValid(); + if (def$30.modifying) modifyData(cxt); + reportErrs(() => cxt.error()); } else { - if (relative$1.userinfo !== void 0 || relative$1.host !== void 0 || relative$1.port !== void 0) { - target.userinfo = relative$1.userinfo; - target.host = relative$1.host; - target.port = relative$1.port; - target.path = removeDotSegments(relative$1.path || ""); - target.query = relative$1.query; - } else { - if (!relative$1.path) { - target.path = base$1.path; - if (relative$1.query !== void 0) target.query = relative$1.query; - else target.query = base$1.query; - } else { - if (relative$1.path.charAt(0) === "/") target.path = removeDotSegments(relative$1.path); - else { - if ((base$1.userinfo !== void 0 || base$1.host !== void 0 || base$1.port !== void 0) && !base$1.path) target.path = "/" + relative$1.path; - else if (!base$1.path) target.path = relative$1.path; - else target.path = base$1.path.slice(0, base$1.path.lastIndexOf("/") + 1) + relative$1.path; - target.path = removeDotSegments(target.path); - } - target.query = relative$1.query; - } - target.userinfo = base$1.userinfo; - target.host = base$1.host; - target.port = base$1.port; - } - target.scheme = base$1.scheme; + const ruleErrs = def$30.async ? validateAsync() : validateSync(); + if (def$30.modifying) modifyData(cxt); + reportErrs(() => addErrs(cxt, ruleErrs)); } - target.fragment = relative$1.fragment; - return target; } - function resolve$4(baseURI, relativeURI, options) { - var schemelessOptions = assign({ scheme: "null" }, options); - return serialize(resolveComponents(parse$2(baseURI, schemelessOptions), parse$2(relativeURI, schemelessOptions), schemelessOptions, true), schemelessOptions); + function validateAsync() { + const ruleErrs = gen.let("ruleErrs", null); + gen.try(() => assignValid((0, codegen_1$30._)`await `), (e) => gen.assign(valid, false).if((0, codegen_1$30._)`${e} instanceof ${it.ValidationError}`, () => gen.assign(ruleErrs, (0, codegen_1$30._)`${e}.errors`), () => gen.throw(e))); + return ruleErrs; } - function normalize2(uri$1, options) { - if (typeof uri$1 === "string") uri$1 = serialize(parse$2(uri$1, options), options); - else if (typeOf(uri$1) === "object") uri$1 = parse$2(serialize(uri$1, options), options); - return uri$1; + function validateSync() { + const validateErrs = (0, codegen_1$30._)`${validateRef}.errors`; + gen.assign(validateErrs, null); + assignValid(codegen_1$30.nil); + return validateErrs; } - function equal$2(uriA, uriB, options) { - if (typeof uriA === "string") uriA = serialize(parse$2(uriA, options), options); - else if (typeOf(uriA) === "object") uriA = serialize(uriA, options); - if (typeof uriB === "string") uriB = serialize(parse$2(uriB, options), options); - else if (typeOf(uriB) === "object") uriB = serialize(uriB, options); - return uriA === uriB; + function assignValid(_await = def$30.async ? (0, codegen_1$30._)`await ` : codegen_1$30.nil) { + const passCxt = it.opts.passContext ? names_1$4.default.this : names_1$4.default.self; + const passSchema = !("compile" in def$30 && !$data || def$30.schema === false); + gen.assign(valid, (0, codegen_1$30._)`${_await}${(0, code_1$9.callValidateCode)(cxt, validateRef, passCxt, passSchema)}`, def$30.modifying); } - function escapeComponent(str, options) { - return str && str.toString().replace(!options || !options.iri ? URI_PROTOCOL.ESCAPE : IRI_PROTOCOL.ESCAPE, pctEncChar); + function reportErrs(errors) { + var _a$1; + gen.if((0, codegen_1$30.not)((_a$1 = def$30.valid) !== null && _a$1 !== void 0 ? _a$1 : valid), errors); } - function unescapeComponent(str, options) { - return str && str.toString().replace(!options || !options.iri ? URI_PROTOCOL.PCT_ENCODED : IRI_PROTOCOL.PCT_ENCODED, pctDecChars); - } - var handler2 = { - scheme: "http", - domainHost: true, - parse: function parse$3(components, options) { - if (!components.host) components.error = components.error || "HTTP URIs must have a host."; - return components; - }, - serialize: function serialize$1(components, options) { - var secure = String(components.scheme).toLowerCase() === "https"; - if (components.port === (secure ? 443 : 80) || components.port === "") components.port = void 0; - if (!components.path) components.path = "/"; - return components; + } + exports.funcKeywordCode = funcKeywordCode; + function modifyData(cxt) { + const { gen, data, it } = cxt; + gen.if(it.parentData, () => gen.assign(data, (0, codegen_1$30._)`${it.parentData}[${it.parentDataProperty}]`)); + } + function addErrs(cxt, errs) { + const { gen } = cxt; + gen.if((0, codegen_1$30._)`Array.isArray(${errs})`, () => { + gen.assign(names_1$4.default.vErrors, (0, codegen_1$30._)`${names_1$4.default.vErrors} === null ? ${errs} : ${names_1$4.default.vErrors}.concat(${errs})`).assign(names_1$4.default.errors, (0, codegen_1$30._)`${names_1$4.default.vErrors}.length`); + (0, errors_1$1.extendErrors)(cxt); + }, () => cxt.error()); + } + function checkAsyncKeyword({ schemaEnv }, def$30) { + if (def$30.async && !schemaEnv.$async) throw new Error("async keyword in sync schema"); + } + function useKeyword(gen, keyword, result) { + if (result === void 0) throw new Error(`keyword "${keyword}" failed to compile`); + return gen.scopeValue("keyword", typeof result == "function" ? { ref: result } : { + ref: result, + code: (0, codegen_1$30.stringify)(result) + }); + } + function validSchemaType(schema2, schemaType, allowUndefined = false) { + return !schemaType.length || schemaType.some((st) => st === "array" ? Array.isArray(schema2) : st === "object" ? schema2 && typeof schema2 == "object" && !Array.isArray(schema2) : typeof schema2 == st || allowUndefined && typeof schema2 == "undefined"); + } + exports.validSchemaType = validSchemaType; + function validateKeywordUsage({ schema: schema2, opts, self: self2, errSchemaPath }, def$30, keyword) { + if (Array.isArray(def$30.keyword) ? !def$30.keyword.includes(keyword) : def$30.keyword !== keyword) throw new Error("ajv implementation error"); + const deps = def$30.dependencies; + if (deps === null || deps === void 0 ? void 0 : deps.some((kwd) => !Object.prototype.hasOwnProperty.call(schema2, kwd))) throw new Error(`parent schema must have dependencies of ${keyword}: ${deps.join(",")}`); + if (def$30.validateSchema) { + if (!def$30.validateSchema(schema2[keyword])) { + const msg = `keyword "${keyword}" value is invalid at path "${errSchemaPath}": ` + self2.errorsText(def$30.validateSchema.errors); + if (opts.validateSchema === "log") self2.logger.error(msg); + else throw new Error(msg); } - }; - var handler$1 = { - scheme: "https", - domainHost: handler2.domainHost, - parse: handler2.parse, - serialize: handler2.serialize - }; - function isSecure(wsComponents) { - return typeof wsComponents.secure === "boolean" ? wsComponents.secure : String(wsComponents.scheme).toLowerCase() === "wss"; } - var handler$2 = { - scheme: "ws", - domainHost: true, - parse: function parse$3(components, options) { - var wsComponents = components; - wsComponents.secure = isSecure(wsComponents); - wsComponents.resourceName = (wsComponents.path || "/") + (wsComponents.query ? "?" + wsComponents.query : ""); - wsComponents.path = void 0; - wsComponents.query = void 0; - return wsComponents; - }, - serialize: function serialize$1(wsComponents, options) { - if (wsComponents.port === (isSecure(wsComponents) ? 443 : 80) || wsComponents.port === "") wsComponents.port = void 0; - if (typeof wsComponents.secure === "boolean") { - wsComponents.scheme = wsComponents.secure ? "wss" : "ws"; - wsComponents.secure = void 0; - } - if (wsComponents.resourceName) { - var _wsComponents$resourc = wsComponents.resourceName.split("?"), _wsComponents$resourc2 = slicedToArray(_wsComponents$resourc, 2), path4 = _wsComponents$resourc2[0], query2 = _wsComponents$resourc2[1]; - wsComponents.path = path4 && path4 !== "/" ? path4 : void 0; - wsComponents.query = query2; - wsComponents.resourceName = void 0; - } - wsComponents.fragment = void 0; - return wsComponents; - } - }; - var handler$3 = { - scheme: "wss", - domainHost: handler$2.domainHost, - parse: handler$2.parse, - serialize: handler$2.serialize - }; - var O = {}; - var UNRESERVED$$ = "[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]"; - var HEXDIG$$ = "[0-9A-Fa-f]"; - var PCT_ENCODED$ = subexp(subexp("%[EFef]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%[89A-Fa-f]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%" + HEXDIG$$ + HEXDIG$$)); - var ATEXT$$ = "[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]"; - var VCHAR$$ = merge3("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]", '[\\"\\\\]'); - var SOME_DELIMS$$ = "[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"; - var UNRESERVED = new RegExp(UNRESERVED$$, "g"); - var PCT_ENCODED = new RegExp(PCT_ENCODED$, "g"); - var NOT_LOCAL_PART = new RegExp(merge3("[^]", ATEXT$$, "[\\.]", '[\\"]', VCHAR$$), "g"); - var NOT_HFNAME = new RegExp(merge3("[^]", UNRESERVED$$, SOME_DELIMS$$), "g"); - var NOT_HFVALUE = NOT_HFNAME; - function decodeUnreserved(str) { - var decStr = pctDecChars(str); - return !decStr.match(UNRESERVED) ? str : decStr; + } + exports.validateKeywordUsage = validateKeywordUsage; +})); +var require_subschema3 = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.extendSubschemaMode = exports.extendSubschemaData = exports.getSubschema = void 0; + const codegen_1$29 = require_codegen3(); + const util_1$25 = require_util10(); + function getSubschema(it, { keyword, schemaProp, schema: schema2, schemaPath, errSchemaPath, topSchemaRef }) { + if (keyword !== void 0 && schema2 !== void 0) throw new Error('both "keyword" and "schema" passed, only one allowed'); + if (keyword !== void 0) { + const sch = it.schema[keyword]; + return schemaProp === void 0 ? { + schema: sch, + schemaPath: (0, codegen_1$29._)`${it.schemaPath}${(0, codegen_1$29.getProperty)(keyword)}`, + errSchemaPath: `${it.errSchemaPath}/${keyword}` + } : { + schema: sch[schemaProp], + schemaPath: (0, codegen_1$29._)`${it.schemaPath}${(0, codegen_1$29.getProperty)(keyword)}${(0, codegen_1$29.getProperty)(schemaProp)}`, + errSchemaPath: `${it.errSchemaPath}/${keyword}/${(0, util_1$25.escapeFragment)(schemaProp)}` + }; } - var handler$4 = { - scheme: "mailto", - parse: function parse$$1(components, options) { - var mailtoComponents = components; - var to = mailtoComponents.to = mailtoComponents.path ? mailtoComponents.path.split(",") : []; - mailtoComponents.path = void 0; - if (mailtoComponents.query) { - var unknownHeaders = false; - var headers = {}; - var hfields = mailtoComponents.query.split("&"); - for (var x = 0, xl = hfields.length; x < xl; ++x) { - var hfield = hfields[x].split("="); - switch (hfield[0]) { - case "to": - var toAddrs = hfield[1].split(","); - for (var _x = 0, _xl = toAddrs.length; _x < _xl; ++_x) to.push(toAddrs[_x]); - break; - case "subject": - mailtoComponents.subject = unescapeComponent(hfield[1], options); - break; - case "body": - mailtoComponents.body = unescapeComponent(hfield[1], options); - break; - default: - unknownHeaders = true; - headers[unescapeComponent(hfield[0], options)] = unescapeComponent(hfield[1], options); - break; - } - } - if (unknownHeaders) mailtoComponents.headers = headers; - } - mailtoComponents.query = void 0; - for (var _x2 = 0, _xl2 = to.length; _x2 < _xl2; ++_x2) { - var addr = to[_x2].split("@"); - addr[0] = unescapeComponent(addr[0]); - if (!options.unicodeSupport) try { - addr[1] = punycode.toASCII(unescapeComponent(addr[1], options).toLowerCase()); - } catch (e) { - mailtoComponents.error = mailtoComponents.error || "Email address's domain name can not be converted to ASCII via punycode: " + e; - } - else addr[1] = unescapeComponent(addr[1], options).toLowerCase(); - to[_x2] = addr.join("@"); - } - return mailtoComponents; - }, - serialize: function serialize$$1(mailtoComponents, options) { - var components = mailtoComponents; - var to = toArray(mailtoComponents.to); - if (to) { - for (var x = 0, xl = to.length; x < xl; ++x) { - var toAddr = String(to[x]); - var atIdx = toAddr.lastIndexOf("@"); - var localPart = toAddr.slice(0, atIdx).replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_LOCAL_PART, pctEncChar); - var domain2 = toAddr.slice(atIdx + 1); - try { - domain2 = !options.iri ? punycode.toASCII(unescapeComponent(domain2, options).toLowerCase()) : punycode.toUnicode(domain2); - } catch (e) { - components.error = components.error || "Email address's domain name can not be converted to " + (!options.iri ? "ASCII" : "Unicode") + " via punycode: " + e; - } - to[x] = localPart + "@" + domain2; - } - components.path = to.join(","); - } - var headers = mailtoComponents.headers = mailtoComponents.headers || {}; - if (mailtoComponents.subject) headers["subject"] = mailtoComponents.subject; - if (mailtoComponents.body) headers["body"] = mailtoComponents.body; - var fields = []; - for (var name in headers) if (headers[name] !== O[name]) fields.push(name.replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_HFNAME, pctEncChar) + "=" + headers[name].replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_HFVALUE, pctEncChar)); - if (fields.length) components.query = fields.join("&"); - return components; - } - }; - var URN_PARSE = /^([^\:]+)\:(.*)/; - var handler$5 = { - scheme: "urn", - parse: function parse$$1(components, options) { - var matches = components.path && components.path.match(URN_PARSE); - var urnComponents = components; - if (matches) { - var scheme = options.scheme || urnComponents.scheme || "urn"; - var nid = matches[1].toLowerCase(); - var nss = matches[2]; - var urnScheme = scheme + ":" + (options.nid || nid); - var schemeHandler = SCHEMES[urnScheme]; - urnComponents.nid = nid; - urnComponents.nss = nss; - urnComponents.path = void 0; - if (schemeHandler) urnComponents = schemeHandler.parse(urnComponents, options); - } else urnComponents.error = urnComponents.error || "URN can not be parsed."; - return urnComponents; - }, - serialize: function serialize$$1(urnComponents, options) { - var scheme = options.scheme || urnComponents.scheme || "urn"; - var nid = urnComponents.nid; - var urnScheme = scheme + ":" + (options.nid || nid); - var schemeHandler = SCHEMES[urnScheme]; - if (schemeHandler) urnComponents = schemeHandler.serialize(urnComponents, options); - var uriComponents = urnComponents; - var nss = urnComponents.nss; - uriComponents.path = (nid || options.nid) + ":" + nss; - return uriComponents; - } - }; - var UUID$1 = /^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/; - var handler$6 = { - scheme: "urn:uuid", - parse: function parse$3(urnComponents, options) { - var uuidComponents = urnComponents; - uuidComponents.uuid = uuidComponents.nss; - uuidComponents.nss = void 0; - if (!options.tolerant && (!uuidComponents.uuid || !uuidComponents.uuid.match(UUID$1))) uuidComponents.error = uuidComponents.error || "UUID is not valid."; - return uuidComponents; - }, - serialize: function serialize$1(uuidComponents, options) { - var urnComponents = uuidComponents; - urnComponents.nss = (uuidComponents.uuid || "").toLowerCase(); - return urnComponents; - } - }; - SCHEMES[handler2.scheme] = handler2; - SCHEMES[handler$1.scheme] = handler$1; - SCHEMES[handler$2.scheme] = handler$2; - SCHEMES[handler$3.scheme] = handler$3; - SCHEMES[handler$4.scheme] = handler$4; - SCHEMES[handler$5.scheme] = handler$5; - SCHEMES[handler$6.scheme] = handler$6; - exports$1.SCHEMES = SCHEMES; - exports$1.pctEncChar = pctEncChar; - exports$1.pctDecChars = pctDecChars; - exports$1.parse = parse$2; - exports$1.removeDotSegments = removeDotSegments; - exports$1.serialize = serialize; - exports$1.resolveComponents = resolveComponents; - exports$1.resolve = resolve$4; - exports$1.normalize = normalize2; - exports$1.equal = equal$2; - exports$1.escapeComponent = escapeComponent; - exports$1.unescapeComponent = unescapeComponent; - Object.defineProperty(exports$1, "__esModule", { value: true }); - })); -}) }); -var require_fast_deep_equal3 = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/fast-deep-equal@3.1.3/node_modules/fast-deep-equal/index.js": ((exports, module) => { - module.exports = function equal$2(a, b) { + if (schema2 !== void 0) { + if (schemaPath === void 0 || errSchemaPath === void 0 || topSchemaRef === void 0) throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"'); + return { + schema: schema2, + schemaPath, + topSchemaRef, + errSchemaPath + }; + } + throw new Error('either "keyword" or "schema" must be passed'); + } + exports.getSubschema = getSubschema; + function extendSubschemaData(subschema, it, { dataProp, dataPropType: dpType, data, dataTypes, propertyName }) { + if (data !== void 0 && dataProp !== void 0) throw new Error('both "data" and "dataProp" passed, only one allowed'); + const { gen } = it; + if (dataProp !== void 0) { + const { errorPath, dataPathArr, opts } = it; + dataContextProps(gen.let("data", (0, codegen_1$29._)`${it.data}${(0, codegen_1$29.getProperty)(dataProp)}`, true)); + subschema.errorPath = (0, codegen_1$29.str)`${errorPath}${(0, util_1$25.getErrorPath)(dataProp, dpType, opts.jsPropertySyntax)}`; + subschema.parentDataProperty = (0, codegen_1$29._)`${dataProp}`; + subschema.dataPathArr = [...dataPathArr, subschema.parentDataProperty]; + } + if (data !== void 0) { + dataContextProps(data instanceof codegen_1$29.Name ? data : gen.let("data", data, true)); + if (propertyName !== void 0) subschema.propertyName = propertyName; + } + if (dataTypes) subschema.dataTypes = dataTypes; + function dataContextProps(_nextData) { + subschema.data = _nextData; + subschema.dataLevel = it.dataLevel + 1; + subschema.dataTypes = []; + it.definedProperties = /* @__PURE__ */ new Set(); + subschema.parentData = it.data; + subschema.dataNames = [...it.dataNames, _nextData]; + } + } + exports.extendSubschemaData = extendSubschemaData; + function extendSubschemaMode(subschema, { jtdDiscriminator, jtdMetadata, compositeRule, createErrors, allErrors }) { + if (compositeRule !== void 0) subschema.compositeRule = compositeRule; + if (createErrors !== void 0) subschema.createErrors = createErrors; + if (allErrors !== void 0) subschema.allErrors = allErrors; + subschema.jtdDiscriminator = jtdDiscriminator; + subschema.jtdMetadata = jtdMetadata; + } + exports.extendSubschemaMode = extendSubschemaMode; +})); +var require_fast_deep_equal3 = /* @__PURE__ */ __commonJSMin(((exports, module) => { + module.exports = function equal$3(a, b) { if (a === b) return true; if (a && b && typeof a == "object" && typeof b == "object") { if (a.constructor !== b.constructor) return false; @@ -118698,7 +129822,7 @@ var require_fast_deep_equal3 = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm if (Array.isArray(a)) { length = a.length; if (length != b.length) return false; - for (i$3 = length; i$3-- !== 0; ) if (!equal$2(a[i$3], b[i$3])) return false; + for (i$3 = length; i$3-- !== 0; ) if (!equal$3(a[i$3], b[i$3])) return false; return true; } if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags; @@ -118710,216 +129834,14 @@ var require_fast_deep_equal3 = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm for (i$3 = length; i$3-- !== 0; ) if (!Object.prototype.hasOwnProperty.call(b, keys[i$3])) return false; for (i$3 = length; i$3-- !== 0; ) { var key$1 = keys[i$3]; - if (!equal$2(a[key$1], b[key$1])) return false; + if (!equal$3(a[key$1], b[key$1])) return false; } return true; } return a !== a && b !== b; }; -}) }); -var require_ucs2length3 = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/compile/ucs2length.js": ((exports, module) => { - module.exports = function ucs2length$1(str) { - var length = 0, len = str.length, pos = 0, value2; - while (pos < len) { - length++; - value2 = str.charCodeAt(pos++); - if (value2 >= 55296 && value2 <= 56319 && pos < len) { - value2 = str.charCodeAt(pos); - if ((value2 & 64512) == 56320) pos++; - } - } - return length; - }; -}) }); -var require_util10 = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/compile/util.js": ((exports, module) => { - module.exports = { - copy, - checkDataType, - checkDataTypes, - coerceToTypes, - toHash: toHash$1, - getProperty, - escapeQuotes, - equal: require_fast_deep_equal3(), - ucs2length: require_ucs2length3(), - varOccurences, - varReplace, - schemaHasRules, - schemaHasRulesExcept, - schemaUnknownRules, - toQuotedString, - getPathExpr, - getPath, - getData, - unescapeFragment, - unescapeJsonPointer, - escapeFragment, - escapeJsonPointer - }; - function copy(o, to) { - to = to || {}; - for (var key$1 in o) to[key$1] = o[key$1]; - return to; - } - function checkDataType(dataType, data, strictNumbers, negate) { - var EQUAL = negate ? " !== " : " === ", AND = negate ? " || " : " && ", OK$1 = negate ? "!" : "", NOT = negate ? "" : "!"; - switch (dataType) { - case "null": - return data + EQUAL + "null"; - case "array": - return OK$1 + "Array.isArray(" + data + ")"; - case "object": - return "(" + OK$1 + data + AND + "typeof " + data + EQUAL + '"object"' + AND + NOT + "Array.isArray(" + data + "))"; - case "integer": - return "(typeof " + data + EQUAL + '"number"' + AND + NOT + "(" + data + " % 1)" + AND + data + EQUAL + data + (strictNumbers ? AND + OK$1 + "isFinite(" + data + ")" : "") + ")"; - case "number": - return "(typeof " + data + EQUAL + '"' + dataType + '"' + (strictNumbers ? AND + OK$1 + "isFinite(" + data + ")" : "") + ")"; - default: - return "typeof " + data + EQUAL + '"' + dataType + '"'; - } - } - function checkDataTypes(dataTypes, data, strictNumbers) { - switch (dataTypes.length) { - case 1: - return checkDataType(dataTypes[0], data, strictNumbers, true); - default: - var code = ""; - var types = toHash$1(dataTypes); - if (types.array && types.object) { - code = types.null ? "(" : "(!" + data + " || "; - code += "typeof " + data + ' !== "object")'; - delete types.null; - delete types.array; - delete types.object; - } - if (types.number) delete types.integer; - for (var t in types) code += (code ? " && " : "") + checkDataType(t, data, strictNumbers, true); - return code; - } - } - var COERCE_TO_TYPES = toHash$1([ - "string", - "number", - "integer", - "boolean", - "null" - ]); - function coerceToTypes(optionCoerceTypes, dataTypes) { - if (Array.isArray(dataTypes)) { - var types = []; - for (var i$3 = 0; i$3 < dataTypes.length; i$3++) { - var t = dataTypes[i$3]; - if (COERCE_TO_TYPES[t]) types[types.length] = t; - else if (optionCoerceTypes === "array" && t === "array") types[types.length] = t; - } - if (types.length) return types; - } else if (COERCE_TO_TYPES[dataTypes]) return [dataTypes]; - else if (optionCoerceTypes === "array" && dataTypes === "array") return ["array"]; - } - function toHash$1(arr) { - var hash = {}; - for (var i$3 = 0; i$3 < arr.length; i$3++) hash[arr[i$3]] = true; - return hash; - } - var IDENTIFIER$1 = /^[a-z$_][a-z$_0-9]*$/i; - var SINGLE_QUOTE = /'|\\/g; - function getProperty(key$1) { - return typeof key$1 == "number" ? "[" + key$1 + "]" : IDENTIFIER$1.test(key$1) ? "." + key$1 : "['" + escapeQuotes(key$1) + "']"; - } - function escapeQuotes(str) { - return str.replace(SINGLE_QUOTE, "\\$&").replace(/\n/g, "\\n").replace(/\r/g, "\\r").replace(/\f/g, "\\f").replace(/\t/g, "\\t"); - } - function varOccurences(str, dataVar) { - dataVar += "[^0-9]"; - var matches = str.match(new RegExp(dataVar, "g")); - return matches ? matches.length : 0; - } - function varReplace(str, dataVar, expr) { - dataVar += "([^0-9])"; - expr = expr.replace(/\$/g, "$$$$"); - return str.replace(new RegExp(dataVar, "g"), expr + "$1"); - } - function schemaHasRules(schema2, rules$1) { - if (typeof schema2 == "boolean") return !schema2; - for (var key$1 in schema2) if (rules$1[key$1]) return true; - } - function schemaHasRulesExcept(schema2, rules$1, exceptKeyword) { - if (typeof schema2 == "boolean") return !schema2 && exceptKeyword != "not"; - for (var key$1 in schema2) if (key$1 != exceptKeyword && rules$1[key$1]) return true; - } - function schemaUnknownRules(schema2, rules$1) { - if (typeof schema2 == "boolean") return; - for (var key$1 in schema2) if (!rules$1[key$1]) return key$1; - } - function toQuotedString(str) { - return "'" + escapeQuotes(str) + "'"; - } - function getPathExpr(currentPath, expr, jsonPointers, isNumber2) { - var path4 = jsonPointers ? "'/' + " + expr + (isNumber2 ? "" : ".replace(/~/g, '~0').replace(/\\//g, '~1')") : isNumber2 ? "'[' + " + expr + " + ']'" : "'[\\'' + " + expr + " + '\\']'"; - return joinPaths(currentPath, path4); - } - function getPath(currentPath, prop, jsonPointers) { - var path4 = jsonPointers ? toQuotedString("/" + escapeJsonPointer(prop)) : toQuotedString(getProperty(prop)); - return joinPaths(currentPath, path4); - } - var JSON_POINTER$1 = /^\/(?:[^~]|~0|~1)*$/; - var RELATIVE_JSON_POINTER$1 = /^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/; - function getData($data, lvl, paths) { - var up, jsonPointer, data, matches; - if ($data === "") return "rootData"; - if ($data[0] == "/") { - if (!JSON_POINTER$1.test($data)) throw new Error("Invalid JSON-pointer: " + $data); - jsonPointer = $data; - data = "rootData"; - } else { - matches = $data.match(RELATIVE_JSON_POINTER$1); - if (!matches) throw new Error("Invalid JSON-pointer: " + $data); - up = +matches[1]; - jsonPointer = matches[2]; - if (jsonPointer == "#") { - if (up >= lvl) throw new Error("Cannot access property/index " + up + " levels up, current level is " + lvl); - return paths[lvl - up]; - } - if (up > lvl) throw new Error("Cannot access data " + up + " levels up, current level is " + lvl); - data = "data" + (lvl - up || ""); - if (!jsonPointer) return data; - } - var expr = data; - var segments = jsonPointer.split("/"); - for (var i$3 = 0; i$3 < segments.length; i$3++) { - var segment = segments[i$3]; - if (segment) { - data += getProperty(unescapeJsonPointer(segment)); - expr += " && " + data; - } - } - return expr; - } - function joinPaths(a, b) { - if (a == '""') return b; - return (a + " + " + b).replace(/([^\\])' \+ '/g, "$1"); - } - function unescapeFragment(str) { - return unescapeJsonPointer(decodeURIComponent(str)); - } - function escapeFragment(str) { - return encodeURIComponent(escapeJsonPointer(str)); - } - function escapeJsonPointer(str) { - return str.replace(/~/g, "~0").replace(/\//g, "~1"); - } - function unescapeJsonPointer(str) { - return str.replace(/~1/g, "/").replace(/~0/g, "~"); - } -}) }); -var require_schema_obj3 = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/compile/schema_obj.js": ((exports, module) => { - var util$4 = require_util10(); - module.exports = SchemaObject$2; - function SchemaObject$2(obj) { - util$4.copy(obj, this); - } -}) }); -var require_json_schema_traverse3 = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/json-schema-traverse@0.4.1/node_modules/json-schema-traverse/index.js": ((exports, module) => { +})); +var require_json_schema_traverse3 = /* @__PURE__ */ __commonJSMin(((exports, module) => { var traverse$1 = module.exports = function(schema2, opts, cb) { if (typeof opts == "function") { cb = opts; @@ -118938,7 +129860,10 @@ var require_json_schema_traverse3 = /* @__PURE__ */ __commonJS3({ "node_modules/ contains: true, additionalProperties: true, propertyNames: true, - not: true + not: true, + if: true, + then: true, + else: true }; traverse$1.arrayKeywords = { items: true, @@ -118947,6 +129872,7 @@ var require_json_schema_traverse3 = /* @__PURE__ */ __commonJS3({ "node_modules/ oneOf: true }; traverse$1.propsKeywords = { + $defs: true, definitions: true, properties: true, patternProperties: true, @@ -118986,113 +129912,17 @@ var require_json_schema_traverse3 = /* @__PURE__ */ __commonJS3({ "node_modules/ post(schema2, jsonPtr, rootSchema2, parentJsonPtr, parentKeyword, parentSchema, keyIndex); } } - function escapeJsonPtr(str) { - return str.replace(/~/g, "~0").replace(/\//g, "~1"); + function escapeJsonPtr(str$1) { + return str$1.replace(/~/g, "~0").replace(/\//g, "~1"); } -}) }); -var require_resolve3 = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/compile/resolve.js": ((exports, module) => { - var URI$1 = require_uri_all3(), equal$1 = require_fast_deep_equal3(), util$3 = require_util10(), SchemaObject$1 = require_schema_obj3(), traverse = require_json_schema_traverse3(); - module.exports = resolve$3; - resolve$3.normalizeId = normalizeId; - resolve$3.fullPath = getFullPath; - resolve$3.url = resolveUrl; - resolve$3.ids = resolveIds; - resolve$3.inlineRef = inlineRef; - resolve$3.schema = resolveSchema; - function resolve$3(compile$2, root2, ref) { - var refVal = this._refs[ref]; - if (typeof refVal == "string") if (this._refs[refVal]) refVal = this._refs[refVal]; - else return resolve$3.call(this, compile$2, root2, refVal); - refVal = refVal || this._schemas[ref]; - if (refVal instanceof SchemaObject$1) return inlineRef(refVal.schema, this._opts.inlineRefs) ? refVal.schema : refVal.validate || this._compile(refVal); - var res = resolveSchema.call(this, root2, ref); - var schema2, v, baseId; - if (res) { - schema2 = res.schema; - root2 = res.root; - baseId = res.baseId; - } - if (schema2 instanceof SchemaObject$1) v = schema2.validate || compile$2.call(this, schema2.schema, root2, void 0, baseId); - else if (schema2 !== void 0) v = inlineRef(schema2, this._opts.inlineRefs) ? schema2 : compile$2.call(this, schema2, root2, void 0, baseId); - return v; - } - function resolveSchema(root2, ref) { - var p = URI$1.parse(ref), refPath = _getFullPath(p), baseId = getFullPath(this._getId(root2.schema)); - if (Object.keys(root2.schema).length === 0 || refPath !== baseId) { - var id = normalizeId(refPath); - var refVal = this._refs[id]; - if (typeof refVal == "string") return resolveRecursive.call(this, root2, refVal, p); - else if (refVal instanceof SchemaObject$1) { - if (!refVal.validate) this._compile(refVal); - root2 = refVal; - } else { - refVal = this._schemas[id]; - if (refVal instanceof SchemaObject$1) { - if (!refVal.validate) this._compile(refVal); - if (id == normalizeId(ref)) return { - schema: refVal, - root: root2, - baseId - }; - root2 = refVal; - } else return; - } - if (!root2.schema) return; - baseId = getFullPath(this._getId(root2.schema)); - } - return getJsonPointer.call(this, p, baseId, root2.schema, root2); - } - function resolveRecursive(root2, ref, parsedRef) { - var res = resolveSchema.call(this, root2, ref); - if (res) { - var schema2 = res.schema; - var baseId = res.baseId; - root2 = res.root; - var id = this._getId(schema2); - if (id) baseId = resolveUrl(baseId, id); - return getJsonPointer.call(this, parsedRef, baseId, schema2, root2); - } - } - var PREVENT_SCOPE_CHANGE = util$3.toHash([ - "properties", - "patternProperties", - "enum", - "dependencies", - "definitions" - ]); - function getJsonPointer(parsedRef, baseId, schema2, root2) { - parsedRef.fragment = parsedRef.fragment || ""; - if (parsedRef.fragment.slice(0, 1) != "/") return; - var parts = parsedRef.fragment.split("/"); - for (var i$3 = 1; i$3 < parts.length; i$3++) { - var part = parts[i$3]; - if (part) { - part = util$3.unescapeFragment(part); - schema2 = schema2[part]; - if (schema2 === void 0) break; - var id; - if (!PREVENT_SCOPE_CHANGE[part]) { - id = this._getId(schema2); - if (id) baseId = resolveUrl(baseId, id); - if (schema2.$ref) { - var $ref = resolveUrl(baseId, schema2.$ref); - var res = resolveSchema.call(this, root2, $ref); - if (res) { - schema2 = res.schema; - root2 = res.root; - baseId = res.baseId; - } - } - } - } - } - if (schema2 !== void 0 && schema2 !== root2.schema) return { - schema: schema2, - root: root2, - baseId - }; - } - var SIMPLE_INLINED = util$3.toHash([ +})); +var require_resolve3 = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.getSchemaRefs = exports.resolveUrl = exports.normalizeId = exports._getFullPath = exports.getFullPath = exports.inlineRef = void 0; + const util_1$24 = require_util10(); + const equal$2 = require_fast_deep_equal3(); + const traverse = require_json_schema_traverse3(); + const SIMPLE_INLINED = /* @__PURE__ */ new Set([ "type", "format", "pattern", @@ -119107,3032 +129937,3397 @@ var require_resolve3 = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/ajv@6.1 "uniqueItems", "multipleOf", "required", - "enum" + "enum", + "const" ]); - function inlineRef(schema2, limit) { - if (limit === false) return false; - if (limit === void 0 || limit === true) return checkNoRef(schema2); - else if (limit) return countKeys(schema2) <= limit; + function inlineRef(schema2, limit = true) { + if (typeof schema2 == "boolean") return true; + if (limit === true) return !hasRef(schema2); + if (!limit) return false; + return countKeys(schema2) <= limit; } - function checkNoRef(schema2) { - var item; - if (Array.isArray(schema2)) for (var i$3 = 0; i$3 < schema2.length; i$3++) { - item = schema2[i$3]; - if (typeof item == "object" && !checkNoRef(item)) return false; + exports.inlineRef = inlineRef; + const REF_KEYWORDS = /* @__PURE__ */ new Set([ + "$ref", + "$recursiveRef", + "$recursiveAnchor", + "$dynamicRef", + "$dynamicAnchor" + ]); + function hasRef(schema2) { + for (const key$1 in schema2) { + if (REF_KEYWORDS.has(key$1)) return true; + const sch = schema2[key$1]; + if (Array.isArray(sch) && sch.some(hasRef)) return true; + if (typeof sch == "object" && hasRef(sch)) return true; } - else for (var key$1 in schema2) { - if (key$1 == "$ref") return false; - item = schema2[key$1]; - if (typeof item == "object" && !checkNoRef(item)) return false; - } - return true; + return false; } function countKeys(schema2) { - var count = 0, item; - if (Array.isArray(schema2)) for (var i$3 = 0; i$3 < schema2.length; i$3++) { - item = schema2[i$3]; - if (typeof item == "object") count += countKeys(item); - if (count == Infinity) return Infinity; - } - else for (var key$1 in schema2) { - if (key$1 == "$ref") return Infinity; - if (SIMPLE_INLINED[key$1]) count++; - else { - item = schema2[key$1]; - if (typeof item == "object") count += countKeys(item) + 1; - if (count == Infinity) return Infinity; - } + let count = 0; + for (const key$1 in schema2) { + if (key$1 === "$ref") return Infinity; + count++; + if (SIMPLE_INLINED.has(key$1)) continue; + if (typeof schema2[key$1] == "object") (0, util_1$24.eachItem)(schema2[key$1], (sch) => count += countKeys(sch)); + if (count === Infinity) return Infinity; } return count; } - function getFullPath(id, normalize2) { - if (normalize2 !== false) id = normalizeId(id); - var p = URI$1.parse(id); - return _getFullPath(p); + function getFullPath(resolver, id = "", normalize$1) { + if (normalize$1 !== false) id = normalizeId(id); + return _getFullPath(resolver, resolver.parse(id)); } - function _getFullPath(p) { - return URI$1.serialize(p).split("#")[0] + "#"; + exports.getFullPath = getFullPath; + function _getFullPath(resolver, p) { + return resolver.serialize(p).split("#")[0] + "#"; } - var TRAILING_SLASH_HASH = /#\/?$/; + exports._getFullPath = _getFullPath; + const TRAILING_SLASH_HASH = /#\/?$/; function normalizeId(id) { return id ? id.replace(TRAILING_SLASH_HASH, "") : ""; } - function resolveUrl(baseId, id) { + exports.normalizeId = normalizeId; + function resolveUrl(resolver, baseId, id) { id = normalizeId(id); - return URI$1.resolve(baseId, id); + return resolver.resolve(baseId, id); } - function resolveIds(schema2) { - var schemaId = normalizeId(this._getId(schema2)); - var baseIds = { "": schemaId }; - var fullPaths = { "": getFullPath(schemaId, false) }; - var localRefs = {}; - var self2 = this; - traverse(schema2, { allKeys: true }, function(sch, jsonPtr, rootSchema2, parentJsonPtr, parentKeyword, parentSchema, keyIndex) { - if (jsonPtr === "") return; - var id = self2._getId(sch); - var baseId = baseIds[parentJsonPtr]; - var fullPath = fullPaths[parentJsonPtr] + "/" + parentKeyword; - if (keyIndex !== void 0) fullPath += "/" + (typeof keyIndex == "number" ? keyIndex : util$3.escapeFragment(keyIndex)); - if (typeof id == "string") { - id = baseId = normalizeId(baseId ? URI$1.resolve(baseId, id) : id); - var refVal = self2._refs[id]; - if (typeof refVal == "string") refVal = self2._refs[refVal]; - if (refVal && refVal.schema) { - if (!equal$1(sch, refVal.schema)) throw new Error('id "' + id + '" resolves to more than one schema'); - } else if (id != normalizeId(fullPath)) if (id[0] == "#") { - if (localRefs[id] && !equal$1(sch, localRefs[id])) throw new Error('id "' + id + '" resolves to more than one schema'); - localRefs[id] = sch; - } else self2._refs[id] = fullPath; + exports.resolveUrl = resolveUrl; + const ANCHOR = /^[a-z_][-a-z0-9._]*$/i; + function getSchemaRefs(schema2, baseId) { + if (typeof schema2 == "boolean") return {}; + const { schemaId, uriResolver } = this.opts; + const schId = normalizeId(schema2[schemaId] || baseId); + const baseIds = { "": schId }; + const pathPrefix = getFullPath(uriResolver, schId, false); + const localRefs = {}; + const schemaRefs = /* @__PURE__ */ new Set(); + traverse(schema2, { allKeys: true }, (sch, jsonPtr, _$1, parentJsonPtr) => { + if (parentJsonPtr === void 0) return; + const fullPath = pathPrefix + jsonPtr; + let innerBaseId = baseIds[parentJsonPtr]; + if (typeof sch[schemaId] == "string") innerBaseId = addRef.call(this, sch[schemaId]); + addAnchor.call(this, sch.$anchor); + addAnchor.call(this, sch.$dynamicAnchor); + baseIds[jsonPtr] = innerBaseId; + function addRef(ref) { + const _resolve = this.opts.uriResolver.resolve; + ref = normalizeId(innerBaseId ? _resolve(innerBaseId, ref) : ref); + if (schemaRefs.has(ref)) throw ambiguos(ref); + schemaRefs.add(ref); + let schOrRef = this.refs[ref]; + if (typeof schOrRef == "string") schOrRef = this.refs[schOrRef]; + if (typeof schOrRef == "object") checkAmbiguosRef(sch, schOrRef.schema, ref); + else if (ref !== normalizeId(fullPath)) if (ref[0] === "#") { + checkAmbiguosRef(sch, localRefs[ref], ref); + localRefs[ref] = sch; + } else this.refs[ref] = fullPath; + return ref; + } + function addAnchor(anchor) { + if (typeof anchor == "string") { + if (!ANCHOR.test(anchor)) throw new Error(`invalid anchor "${anchor}"`); + addRef.call(this, `#${anchor}`); + } } - baseIds[jsonPtr] = baseId; - fullPaths[jsonPtr] = fullPath; }); return localRefs; + function checkAmbiguosRef(sch1, sch2, ref) { + if (sch2 !== void 0 && !equal$2(sch1, sch2)) throw ambiguos(ref); + } + function ambiguos(ref) { + return /* @__PURE__ */ new Error(`reference "${ref}" resolves to more than one schema`); + } } -}) }); -var require_error_classes3 = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/compile/error_classes.js": ((exports, module) => { - var resolve$2 = require_resolve3(); - module.exports = { - Validation: errorSubclass(ValidationError$1), - MissingRef: errorSubclass(MissingRefError$1) - }; - function ValidationError$1(errors) { - this.message = "validation failed"; - this.errors = errors; - this.ajv = this.validation = true; + exports.getSchemaRefs = getSchemaRefs; +})); +var require_validate3 = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.getData = exports.KeywordCxt = exports.validateFunctionCode = void 0; + const boolSchema_1 = require_boolSchema3(); + const dataType_1$2 = require_dataType3(); + const applicability_1 = require_applicability3(); + const dataType_2 = require_dataType3(); + const defaults_1 = require_defaults3(); + const keyword_1 = require_keyword3(); + const subschema_1 = require_subschema3(); + const codegen_1$28 = require_codegen3(); + const names_1$3 = require_names3(); + const resolve_1$3 = require_resolve3(); + const util_1$23 = require_util10(); + const errors_1 = require_errors4(); + function validateFunctionCode(it) { + if (isSchemaObj(it)) { + checkKeywords(it); + if (schemaCxtHasRules(it)) { + topSchemaObjCode(it); + return; + } + } + validateFunction(it, () => (0, boolSchema_1.topBoolOrEmptySchema)(it)); } - MissingRefError$1.message = function(baseId, ref) { - return "can't resolve reference " + ref + " from id " + baseId; - }; - function MissingRefError$1(baseId, ref, message) { - this.message = message || MissingRefError$1.message(baseId, ref); - this.missingRef = resolve$2.url(baseId, ref); - this.missingSchema = resolve$2.normalizeId(resolve$2.fullPath(this.missingRef)); + exports.validateFunctionCode = validateFunctionCode; + function validateFunction({ gen, validateName, schema: schema2, schemaEnv, opts }, body) { + if (opts.code.es5) gen.func(validateName, (0, codegen_1$28._)`${names_1$3.default.data}, ${names_1$3.default.valCxt}`, schemaEnv.$async, () => { + gen.code((0, codegen_1$28._)`"use strict"; ${funcSourceUrl(schema2, opts)}`); + destructureValCxtES5(gen, opts); + gen.code(body); + }); + else gen.func(validateName, (0, codegen_1$28._)`${names_1$3.default.data}, ${destructureValCxt(opts)}`, schemaEnv.$async, () => gen.code(funcSourceUrl(schema2, opts)).code(body)); } - function errorSubclass(Subclass) { - Subclass.prototype = Object.create(Error.prototype); - Subclass.prototype.constructor = Subclass; - return Subclass; + function destructureValCxt(opts) { + return (0, codegen_1$28._)`{${names_1$3.default.instancePath}="", ${names_1$3.default.parentData}, ${names_1$3.default.parentDataProperty}, ${names_1$3.default.rootData}=${names_1$3.default.data}${opts.dynamicRef ? (0, codegen_1$28._)`, ${names_1$3.default.dynamicAnchors}={}` : codegen_1$28.nil}}={}`; } -}) }); -var require_fast_json_stable_stringify3 = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/fast-json-stable-stringify@2.1.0/node_modules/fast-json-stable-stringify/index.js": ((exports, module) => { - module.exports = function(data, opts) { - if (!opts) opts = {}; - if (typeof opts === "function") opts = { cmp: opts }; - var cycles = typeof opts.cycles === "boolean" ? opts.cycles : false; - var cmp = opts.cmp && /* @__PURE__ */ (function(f) { - return function(node2) { - return function(a, b) { - var aobj = { - key: a, - value: node2[a] - }; - var bobj = { - key: b, - value: node2[b] - }; - return f(aobj, bobj); - }; - }; - })(opts.cmp); - var seen = []; - return (function stringify(node2) { - if (node2 && node2.toJSON && typeof node2.toJSON === "function") node2 = node2.toJSON(); - if (node2 === void 0) return; - if (typeof node2 == "number") return isFinite(node2) ? "" + node2 : "null"; - if (typeof node2 !== "object") return JSON.stringify(node2); - var i$3, out; - if (Array.isArray(node2)) { - out = "["; - for (i$3 = 0; i$3 < node2.length; i$3++) { - if (i$3) out += ","; - out += stringify(node2[i$3]) || "null"; + function destructureValCxtES5(gen, opts) { + gen.if(names_1$3.default.valCxt, () => { + gen.var(names_1$3.default.instancePath, (0, codegen_1$28._)`${names_1$3.default.valCxt}.${names_1$3.default.instancePath}`); + gen.var(names_1$3.default.parentData, (0, codegen_1$28._)`${names_1$3.default.valCxt}.${names_1$3.default.parentData}`); + gen.var(names_1$3.default.parentDataProperty, (0, codegen_1$28._)`${names_1$3.default.valCxt}.${names_1$3.default.parentDataProperty}`); + gen.var(names_1$3.default.rootData, (0, codegen_1$28._)`${names_1$3.default.valCxt}.${names_1$3.default.rootData}`); + if (opts.dynamicRef) gen.var(names_1$3.default.dynamicAnchors, (0, codegen_1$28._)`${names_1$3.default.valCxt}.${names_1$3.default.dynamicAnchors}`); + }, () => { + gen.var(names_1$3.default.instancePath, (0, codegen_1$28._)`""`); + gen.var(names_1$3.default.parentData, (0, codegen_1$28._)`undefined`); + gen.var(names_1$3.default.parentDataProperty, (0, codegen_1$28._)`undefined`); + gen.var(names_1$3.default.rootData, names_1$3.default.data); + if (opts.dynamicRef) gen.var(names_1$3.default.dynamicAnchors, (0, codegen_1$28._)`{}`); + }); + } + function topSchemaObjCode(it) { + const { schema: schema2, opts, gen } = it; + validateFunction(it, () => { + if (opts.$comment && schema2.$comment) commentKeyword(it); + checkNoDefault(it); + gen.let(names_1$3.default.vErrors, null); + gen.let(names_1$3.default.errors, 0); + if (opts.unevaluated) resetEvaluated(it); + typeAndKeywords(it); + returnResults(it); + }); + } + function resetEvaluated(it) { + const { gen, validateName } = it; + it.evaluated = gen.const("evaluated", (0, codegen_1$28._)`${validateName}.evaluated`); + gen.if((0, codegen_1$28._)`${it.evaluated}.dynamicProps`, () => gen.assign((0, codegen_1$28._)`${it.evaluated}.props`, (0, codegen_1$28._)`undefined`)); + gen.if((0, codegen_1$28._)`${it.evaluated}.dynamicItems`, () => gen.assign((0, codegen_1$28._)`${it.evaluated}.items`, (0, codegen_1$28._)`undefined`)); + } + function funcSourceUrl(schema2, opts) { + const schId = typeof schema2 == "object" && schema2[opts.schemaId]; + return schId && (opts.code.source || opts.code.process) ? (0, codegen_1$28._)`/*# sourceURL=${schId} */` : codegen_1$28.nil; + } + function subschemaCode(it, valid) { + if (isSchemaObj(it)) { + checkKeywords(it); + if (schemaCxtHasRules(it)) { + subSchemaObjCode(it, valid); + return; + } + } + (0, boolSchema_1.boolOrEmptySchema)(it, valid); + } + function schemaCxtHasRules({ schema: schema2, self: self2 }) { + if (typeof schema2 == "boolean") return !schema2; + for (const key$1 in schema2) if (self2.RULES.all[key$1]) return true; + return false; + } + function isSchemaObj(it) { + return typeof it.schema != "boolean"; + } + function subSchemaObjCode(it, valid) { + const { schema: schema2, gen, opts } = it; + if (opts.$comment && schema2.$comment) commentKeyword(it); + updateContext(it); + checkAsyncSchema(it); + const errsCount = gen.const("_errs", names_1$3.default.errors); + typeAndKeywords(it, errsCount); + gen.var(valid, (0, codegen_1$28._)`${errsCount} === ${names_1$3.default.errors}`); + } + function checkKeywords(it) { + (0, util_1$23.checkUnknownRules)(it); + checkRefsAndKeywords(it); + } + function typeAndKeywords(it, errsCount) { + if (it.opts.jtd) return schemaKeywords(it, [], false, errsCount); + const types = (0, dataType_1$2.getSchemaTypes)(it.schema); + schemaKeywords(it, types, !(0, dataType_1$2.coerceAndCheckDataType)(it, types), errsCount); + } + function checkRefsAndKeywords(it) { + const { schema: schema2, errSchemaPath, opts, self: self2 } = it; + if (schema2.$ref && opts.ignoreKeywordsWithRef && (0, util_1$23.schemaHasRulesButRef)(schema2, self2.RULES)) self2.logger.warn(`$ref: keywords ignored in schema at path "${errSchemaPath}"`); + } + function checkNoDefault(it) { + const { schema: schema2, opts } = it; + if (schema2.default !== void 0 && opts.useDefaults && opts.strictSchema) (0, util_1$23.checkStrictMode)(it, "default is ignored in the schema root"); + } + function updateContext(it) { + const schId = it.schema[it.opts.schemaId]; + if (schId) it.baseId = (0, resolve_1$3.resolveUrl)(it.opts.uriResolver, it.baseId, schId); + } + function checkAsyncSchema(it) { + if (it.schema.$async && !it.schemaEnv.$async) throw new Error("async schema in sync schema"); + } + function commentKeyword({ gen, schemaEnv, schema: schema2, errSchemaPath, opts }) { + const msg = schema2.$comment; + if (opts.$comment === true) gen.code((0, codegen_1$28._)`${names_1$3.default.self}.logger.log(${msg})`); + else if (typeof opts.$comment == "function") { + const schemaPath = (0, codegen_1$28.str)`${errSchemaPath}/$comment`; + const rootName = gen.scopeValue("root", { ref: schemaEnv.root }); + gen.code((0, codegen_1$28._)`${names_1$3.default.self}.opts.$comment(${msg}, ${schemaPath}, ${rootName}.schema)`); + } + } + function returnResults(it) { + const { gen, schemaEnv, validateName, ValidationError: ValidationError$1, opts } = it; + if (schemaEnv.$async) gen.if((0, codegen_1$28._)`${names_1$3.default.errors} === 0`, () => gen.return(names_1$3.default.data), () => gen.throw((0, codegen_1$28._)`new ${ValidationError$1}(${names_1$3.default.vErrors})`)); + else { + gen.assign((0, codegen_1$28._)`${validateName}.errors`, names_1$3.default.vErrors); + if (opts.unevaluated) assignEvaluated(it); + gen.return((0, codegen_1$28._)`${names_1$3.default.errors} === 0`); + } + } + function assignEvaluated({ gen, evaluated, props, items }) { + if (props instanceof codegen_1$28.Name) gen.assign((0, codegen_1$28._)`${evaluated}.props`, props); + if (items instanceof codegen_1$28.Name) gen.assign((0, codegen_1$28._)`${evaluated}.items`, items); + } + function schemaKeywords(it, types, typeErrors, errsCount) { + const { gen, schema: schema2, data, allErrors, opts, self: self2 } = it; + const { RULES } = self2; + if (schema2.$ref && (opts.ignoreKeywordsWithRef || !(0, util_1$23.schemaHasRulesButRef)(schema2, RULES))) { + gen.block(() => keywordCode(it, "$ref", RULES.all.$ref.definition)); + return; + } + if (!opts.jtd) checkStrictTypes(it, types); + gen.block(() => { + for (const group2 of RULES.rules) groupKeywords(group2); + groupKeywords(RULES.post); + }); + function groupKeywords(group2) { + if (!(0, applicability_1.shouldUseGroup)(schema2, group2)) return; + if (group2.type) { + gen.if((0, dataType_2.checkDataType)(group2.type, data, opts.strictNumbers)); + iterateKeywords(it, group2); + if (types.length === 1 && types[0] === group2.type && typeErrors) { + gen.else(); + (0, dataType_2.reportTypeError)(it); } - return out + "]"; - } - if (node2 === null) return "null"; - if (seen.indexOf(node2) !== -1) { - if (cycles) return JSON.stringify("__cycle__"); - throw new TypeError("Converting circular structure to JSON"); - } - var seenIndex = seen.push(node2) - 1; - var keys = Object.keys(node2).sort(cmp && cmp(node2)); - out = ""; - for (i$3 = 0; i$3 < keys.length; i$3++) { - var key$1 = keys[i$3]; - var value2 = stringify(node2[key$1]); - if (!value2) continue; - if (out) out += ","; - out += JSON.stringify(key$1) + ":" + value2; - } - seen.splice(seenIndex, 1); - return "{" + out + "}"; - })(data); - }; -}) }); -var require_validate3 = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/dotjs/validate.js": ((exports, module) => { - module.exports = function generate_validate(it, $keyword, $ruleType) { - var out = ""; - var $async = it.schema.$async === true, $refKeywords = it.util.schemaHasRulesExcept(it.schema, it.RULES.all, "$ref"), $id = it.self._getId(it.schema); - if (it.opts.strictKeywords) { - var $unknownKwd = it.util.schemaUnknownRules(it.schema, it.RULES.keywords); - if ($unknownKwd) { - var $keywordsMsg = "unknown keyword: " + $unknownKwd; - if (it.opts.strictKeywords === "log") it.logger.warn($keywordsMsg); - else throw new Error($keywordsMsg); + gen.endIf(); + } else iterateKeywords(it, group2); + if (!allErrors) gen.if((0, codegen_1$28._)`${names_1$3.default.errors} === ${errsCount || 0}`); + } + } + function iterateKeywords(it, group2) { + const { gen, schema: schema2, opts: { useDefaults } } = it; + if (useDefaults) (0, defaults_1.assignDefaults)(it, group2.type); + gen.block(() => { + for (const rule of group2.rules) if ((0, applicability_1.shouldUseRule)(schema2, rule)) keywordCode(it, rule.keyword, rule.definition, group2.type); + }); + } + function checkStrictTypes(it, types) { + if (it.schemaEnv.meta || !it.opts.strictTypes) return; + checkContextTypes(it, types); + if (!it.opts.allowUnionTypes) checkMultipleTypes(it, types); + checkKeywordTypes(it, it.dataTypes); + } + function checkContextTypes(it, types) { + if (!types.length) return; + if (!it.dataTypes.length) { + it.dataTypes = types; + return; + } + types.forEach((t) => { + if (!includesType(it.dataTypes, t)) strictTypesError(it, `type "${t}" not allowed by context "${it.dataTypes.join(",")}"`); + }); + narrowSchemaTypes(it, types); + } + function checkMultipleTypes(it, ts) { + if (ts.length > 1 && !(ts.length === 2 && ts.includes("null"))) strictTypesError(it, "use allowUnionTypes to allow union type keyword"); + } + function checkKeywordTypes(it, ts) { + const rules = it.self.RULES.all; + for (const keyword in rules) { + const rule = rules[keyword]; + if (typeof rule == "object" && (0, applicability_1.shouldUseRule)(it.schema, rule)) { + const { type: type2 } = rule.definition; + if (type2.length && !type2.some((t) => hasApplicableType(ts, t))) strictTypesError(it, `missing type "${type2.join(",")}" for keyword "${keyword}"`); } } - if (it.isTop) { - out += " var validate = "; - if ($async) { - it.async = true; - out += "async "; + } + function hasApplicableType(schTs, kwdT) { + return schTs.includes(kwdT) || kwdT === "number" && schTs.includes("integer"); + } + function includesType(ts, t) { + return ts.includes(t) || t === "integer" && ts.includes("number"); + } + function narrowSchemaTypes(it, withTypes) { + const ts = []; + for (const t of it.dataTypes) if (includesType(withTypes, t)) ts.push(t); + else if (withTypes.includes("integer") && t === "number") ts.push("integer"); + it.dataTypes = ts; + } + function strictTypesError(it, msg) { + const schemaPath = it.schemaEnv.baseId + it.errSchemaPath; + msg += ` at "${schemaPath}" (strictTypes)`; + (0, util_1$23.checkStrictMode)(it, msg, it.opts.strictTypes); + } + var KeywordCxt = class { + constructor(it, def$30, keyword) { + (0, keyword_1.validateKeywordUsage)(it, def$30, keyword); + this.gen = it.gen; + this.allErrors = it.allErrors; + this.keyword = keyword; + this.data = it.data; + this.schema = it.schema[keyword]; + this.$data = def$30.$data && it.opts.$data && this.schema && this.schema.$data; + this.schemaValue = (0, util_1$23.schemaRefOrVal)(it, this.schema, keyword, this.$data); + this.schemaType = def$30.schemaType; + this.parentSchema = it.schema; + this.params = {}; + this.it = it; + this.def = def$30; + if (this.$data) this.schemaCode = it.gen.const("vSchema", getData(this.$data, it)); + else { + this.schemaCode = this.schemaValue; + if (!(0, keyword_1.validSchemaType)(this.schema, def$30.schemaType, def$30.allowUndefined)) throw new Error(`${keyword} value must be ${JSON.stringify(def$30.schemaType)}`); } - out += "function(data, dataPath, parentData, parentDataProperty, rootData) { 'use strict'; "; - if ($id && (it.opts.sourceCode || it.opts.processCode)) out += " " + ("/*# sourceURL=" + $id + " */") + " "; + if ("code" in def$30 ? def$30.trackErrors : def$30.errors !== false) this.errsCount = it.gen.const("_errs", names_1$3.default.errors); } - if (typeof it.schema == "boolean" || !($refKeywords || it.schema.$ref)) { - var $keyword = "false schema"; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + "/" + $keyword; - var $breakOnError = !it.opts.allErrors; - var $errorKeyword; - var $data = "data" + ($dataLvl || ""); - var $valid = "valid" + $lvl; - if (it.schema === false) { - if (it.isTop) $breakOnError = true; - else out += " var " + $valid + " = false; "; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ""; - if (it.createErrors !== false) { - out += " { keyword: '" + ($errorKeyword || "false schema") + "' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: {} "; - if (it.opts.messages !== false) out += " , message: 'boolean schema is false' "; - if (it.opts.verbose) out += " , schema: false , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; - out += " } "; - } else out += " {} "; - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) - if (it.async) out += " throw new ValidationError([" + __err + "]); "; - else out += " validate.errors = [" + __err + "]; return false; "; - else out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; - } else if (it.isTop) if ($async) out += " return data; "; - else out += " validate.errors = null; return true; "; - else out += " var " + $valid + " = true; "; - if (it.isTop) out += " }; return validate; "; - return out; + result(condition, successAction, failAction) { + this.failResult((0, codegen_1$28.not)(condition), successAction, failAction); } - if (it.isTop) { - var $top = it.isTop, $lvl = it.level = 0, $dataLvl = it.dataLevel = 0, $data = "data"; - it.rootId = it.resolve.fullPath(it.self._getId(it.root.schema)); - it.baseId = it.baseId || it.rootId; - delete it.isTop; - it.dataPathArr = [""]; - if (it.schema.default !== void 0 && it.opts.useDefaults && it.opts.strictDefaults) { - var $defaultMsg = "default is ignored in the schema root"; - if (it.opts.strictDefaults === "log") it.logger.warn($defaultMsg); - else throw new Error($defaultMsg); + failResult(condition, successAction, failAction) { + this.gen.if(condition); + if (failAction) failAction(); + else this.error(); + if (successAction) { + this.gen.else(); + successAction(); + if (this.allErrors) this.gen.endIf(); + } else if (this.allErrors) this.gen.endIf(); + else this.gen.else(); + } + pass(condition, failAction) { + this.failResult((0, codegen_1$28.not)(condition), void 0, failAction); + } + fail(condition) { + if (condition === void 0) { + this.error(); + if (!this.allErrors) this.gen.if(false); + return; } - out += " var vErrors = null; "; - out += " var errors = 0; "; - out += " if (rootData === undefined) rootData = data; "; - } else { - var $lvl = it.level, $dataLvl = it.dataLevel, $data = "data" + ($dataLvl || ""); - if ($id) it.baseId = it.resolve.url(it.baseId, $id); - if ($async && !it.async) throw new Error("async schema in sync schema"); - out += " var errs_" + $lvl + " = errors;"; + this.gen.if(condition); + this.error(); + if (this.allErrors) this.gen.endIf(); + else this.gen.else(); } - var $valid = "valid" + $lvl, $breakOnError = !it.opts.allErrors, $closingBraces1 = "", $closingBraces2 = ""; - var $errorKeyword; - var $typeSchema = it.schema.type, $typeIsArray = Array.isArray($typeSchema); - if ($typeSchema && it.opts.nullable && it.schema.nullable === true) { - if ($typeIsArray) { - if ($typeSchema.indexOf("null") == -1) $typeSchema = $typeSchema.concat("null"); - } else if ($typeSchema != "null") { - $typeSchema = [$typeSchema, "null"]; - $typeIsArray = true; + fail$data(condition) { + if (!this.$data) return this.fail(condition); + const { schemaCode } = this; + this.fail((0, codegen_1$28._)`${schemaCode} !== undefined && (${(0, codegen_1$28.or)(this.invalid$data(), condition)})`); + } + error(append3, errorParams, errorPaths) { + if (errorParams) { + this.setParams(errorParams); + this._error(append3, errorPaths); + this.setParams({}); + return; } + this._error(append3, errorPaths); } - if ($typeIsArray && $typeSchema.length == 1) { - $typeSchema = $typeSchema[0]; - $typeIsArray = false; + _error(append3, errorPaths) { + (append3 ? errors_1.reportExtraError : errors_1.reportError)(this, this.def.error, errorPaths); } - if (it.schema.$ref && $refKeywords) { - if (it.opts.extendRefs == "fail") throw new Error('$ref: validation keywords used in schema at path "' + it.errSchemaPath + '" (see option extendRefs)'); - else if (it.opts.extendRefs !== true) { - $refKeywords = false; - it.logger.warn('$ref: keywords ignored in schema at path "' + it.errSchemaPath + '"'); - } + $dataError() { + (0, errors_1.reportError)(this, this.def.$dataError || errors_1.keyword$DataError); } - if (it.schema.$comment && it.opts.$comment) out += " " + it.RULES.all.$comment.code(it, "$comment"); - if ($typeSchema) { - if (it.opts.coerceTypes) var $coerceToTypes = it.util.coerceToTypes(it.opts.coerceTypes, $typeSchema); - var $rulesGroup = it.RULES.types[$typeSchema]; - if ($coerceToTypes || $typeIsArray || $rulesGroup === true || $rulesGroup && !$shouldUseGroup($rulesGroup)) { - var $schemaPath = it.schemaPath + ".type", $errSchemaPath = it.errSchemaPath + "/type"; - var $schemaPath = it.schemaPath + ".type", $errSchemaPath = it.errSchemaPath + "/type", $method = $typeIsArray ? "checkDataTypes" : "checkDataType"; - out += " if (" + it.util[$method]($typeSchema, $data, it.opts.strictNumbers, true) + ") { "; - if ($coerceToTypes) { - var $dataType = "dataType" + $lvl, $coerced = "coerced" + $lvl; - out += " var " + $dataType + " = typeof " + $data + "; var " + $coerced + " = undefined; "; - if (it.opts.coerceTypes == "array") out += " if (" + $dataType + " == 'object' && Array.isArray(" + $data + ") && " + $data + ".length == 1) { " + $data + " = " + $data + "[0]; " + $dataType + " = typeof " + $data + "; if (" + it.util.checkDataType(it.schema.type, $data, it.opts.strictNumbers) + ") " + $coerced + " = " + $data + "; } "; - out += " if (" + $coerced + " !== undefined) ; "; - var arr1 = $coerceToTypes; - if (arr1) { - var $type, $i = -1, l1 = arr1.length - 1; - while ($i < l1) { - $type = arr1[$i += 1]; - if ($type == "string") out += " else if (" + $dataType + " == 'number' || " + $dataType + " == 'boolean') " + $coerced + " = '' + " + $data + "; else if (" + $data + " === null) " + $coerced + " = ''; "; - else if ($type == "number" || $type == "integer") { - out += " else if (" + $dataType + " == 'boolean' || " + $data + " === null || (" + $dataType + " == 'string' && " + $data + " && " + $data + " == +" + $data + " "; - if ($type == "integer") out += " && !(" + $data + " % 1)"; - out += ")) " + $coerced + " = +" + $data + "; "; - } else if ($type == "boolean") out += " else if (" + $data + " === 'false' || " + $data + " === 0 || " + $data + " === null) " + $coerced + " = false; else if (" + $data + " === 'true' || " + $data + " === 1) " + $coerced + " = true; "; - else if ($type == "null") out += " else if (" + $data + " === '' || " + $data + " === 0 || " + $data + " === false) " + $coerced + " = null; "; - else if (it.opts.coerceTypes == "array" && $type == "array") out += " else if (" + $dataType + " == 'string' || " + $dataType + " == 'number' || " + $dataType + " == 'boolean' || " + $data + " == null) " + $coerced + " = [" + $data + "]; "; - } - } - out += " else { "; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ""; - if (it.createErrors !== false) { - out += " { keyword: '" + ($errorKeyword || "type") + "' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { type: '"; - if ($typeIsArray) out += "" + $typeSchema.join(","); - else out += "" + $typeSchema; - out += "' } "; - if (it.opts.messages !== false) { - out += " , message: 'should be "; - if ($typeIsArray) out += "" + $typeSchema.join(","); - else out += "" + $typeSchema; - out += "' "; - } - if (it.opts.verbose) out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; - out += " } "; - } else out += " {} "; - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) - if (it.async) out += " throw new ValidationError([" + __err + "]); "; - else out += " validate.errors = [" + __err + "]; return false; "; - else out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; - out += " } if (" + $coerced + " !== undefined) { "; - var $parentData = $dataLvl ? "data" + ($dataLvl - 1 || "") : "parentData", $parentDataProperty = $dataLvl ? it.dataPathArr[$dataLvl] : "parentDataProperty"; - out += " " + $data + " = " + $coerced + "; "; - if (!$dataLvl) out += "if (" + $parentData + " !== undefined)"; - out += " " + $parentData + "[" + $parentDataProperty + "] = " + $coerced + "; } "; - } else { - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ""; - if (it.createErrors !== false) { - out += " { keyword: '" + ($errorKeyword || "type") + "' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { type: '"; - if ($typeIsArray) out += "" + $typeSchema.join(","); - else out += "" + $typeSchema; - out += "' } "; - if (it.opts.messages !== false) { - out += " , message: 'should be "; - if ($typeIsArray) out += "" + $typeSchema.join(","); - else out += "" + $typeSchema; - out += "' "; - } - if (it.opts.verbose) out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; - out += " } "; - } else out += " {} "; - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) - if (it.async) out += " throw new ValidationError([" + __err + "]); "; - else out += " validate.errors = [" + __err + "]; return false; "; - else out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; - } - out += " } "; - } + reset() { + if (this.errsCount === void 0) throw new Error('add "trackErrors" to keyword definition'); + (0, errors_1.resetErrorsCount)(this.gen, this.errsCount); } - if (it.schema.$ref && !$refKeywords) { - out += " " + it.RULES.all.$ref.code(it, "$ref") + " "; - if ($breakOnError) { - out += " } if (errors === "; - if ($top) out += "0"; - else out += "errs_" + $lvl; - out += ") { "; - $closingBraces2 += "}"; - } - } else { - var arr2 = it.RULES; - if (arr2) { - var $rulesGroup, i2 = -1, l2 = arr2.length - 1; - while (i2 < l2) { - $rulesGroup = arr2[i2 += 1]; - if ($shouldUseGroup($rulesGroup)) { - if ($rulesGroup.type) out += " if (" + it.util.checkDataType($rulesGroup.type, $data, it.opts.strictNumbers) + ") { "; - if (it.opts.useDefaults) { - if ($rulesGroup.type == "object" && it.schema.properties) { - var $schema = it.schema.properties; - var arr3 = Object.keys($schema); - if (arr3) { - var $propertyKey, i3 = -1, l3 = arr3.length - 1; - while (i3 < l3) { - $propertyKey = arr3[i3 += 1]; - var $sch = $schema[$propertyKey]; - if ($sch.default !== void 0) { - var $passData = $data + it.util.getProperty($propertyKey); - if (it.compositeRule) { - if (it.opts.strictDefaults) { - var $defaultMsg = "default is ignored for: " + $passData; - if (it.opts.strictDefaults === "log") it.logger.warn($defaultMsg); - else throw new Error($defaultMsg); - } - } else { - out += " if (" + $passData + " === undefined "; - if (it.opts.useDefaults == "empty") out += " || " + $passData + " === null || " + $passData + " === '' "; - out += " ) " + $passData + " = "; - if (it.opts.useDefaults == "shared") out += " " + it.useDefault($sch.default) + " "; - else out += " " + JSON.stringify($sch.default) + " "; - out += "; "; - } - } - } - } - } else if ($rulesGroup.type == "array" && Array.isArray(it.schema.items)) { - var arr4 = it.schema.items; - if (arr4) { - var $sch, $i = -1, l4 = arr4.length - 1; - while ($i < l4) { - $sch = arr4[$i += 1]; - if ($sch.default !== void 0) { - var $passData = $data + "[" + $i + "]"; - if (it.compositeRule) { - if (it.opts.strictDefaults) { - var $defaultMsg = "default is ignored for: " + $passData; - if (it.opts.strictDefaults === "log") it.logger.warn($defaultMsg); - else throw new Error($defaultMsg); - } - } else { - out += " if (" + $passData + " === undefined "; - if (it.opts.useDefaults == "empty") out += " || " + $passData + " === null || " + $passData + " === '' "; - out += " ) " + $passData + " = "; - if (it.opts.useDefaults == "shared") out += " " + it.useDefault($sch.default) + " "; - else out += " " + JSON.stringify($sch.default) + " "; - out += "; "; - } - } - } - } - } - } - var arr5 = $rulesGroup.rules; - if (arr5) { - var $rule, i5 = -1, l5 = arr5.length - 1; - while (i5 < l5) { - $rule = arr5[i5 += 1]; - if ($shouldUseRule($rule)) { - var $code = $rule.code(it, $rule.keyword, $rulesGroup.type); - if ($code) { - out += " " + $code + " "; - if ($breakOnError) $closingBraces1 += "}"; - } - } - } - } - if ($breakOnError) { - out += " " + $closingBraces1 + " "; - $closingBraces1 = ""; - } - if ($rulesGroup.type) { - out += " } "; - if ($typeSchema && $typeSchema === $rulesGroup.type && !$coerceToTypes) { - out += " else { "; - var $schemaPath = it.schemaPath + ".type", $errSchemaPath = it.errSchemaPath + "/type"; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ""; - if (it.createErrors !== false) { - out += " { keyword: '" + ($errorKeyword || "type") + "' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { type: '"; - if ($typeIsArray) out += "" + $typeSchema.join(","); - else out += "" + $typeSchema; - out += "' } "; - if (it.opts.messages !== false) { - out += " , message: 'should be "; - if ($typeIsArray) out += "" + $typeSchema.join(","); - else out += "" + $typeSchema; - out += "' "; - } - if (it.opts.verbose) out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; - out += " } "; - } else out += " {} "; - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) - if (it.async) out += " throw new ValidationError([" + __err + "]); "; - else out += " validate.errors = [" + __err + "]; return false; "; - else out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; - out += " } "; - } - } - if ($breakOnError) { - out += " if (errors === "; - if ($top) out += "0"; - else out += "errs_" + $lvl; - out += ") { "; - $closingBraces2 += "}"; - } - } - } - } + ok(cond) { + if (!this.allErrors) this.gen.if(cond); } - if ($breakOnError) out += " " + $closingBraces2 + " "; - if ($top) { - if ($async) { - out += " if (errors === 0) return data; "; - out += " else throw new ValidationError(vErrors); "; - } else { - out += " validate.errors = vErrors; "; - out += " return errors === 0; "; - } - out += " }; return validate;"; - } else out += " var " + $valid + " = errors === errs_" + $lvl + ";"; - function $shouldUseGroup($rulesGroup$1) { - var rules$1 = $rulesGroup$1.rules; - for (var i$3 = 0; i$3 < rules$1.length; i$3++) if ($shouldUseRule(rules$1[i$3])) return true; + setParams(obj, assign) { + if (assign) Object.assign(this.params, obj); + else this.params = obj; } - function $shouldUseRule($rule$1) { - return it.schema[$rule$1.keyword] !== void 0 || $rule$1.implements && $ruleImplementsSomeKeyword($rule$1); - } - function $ruleImplementsSomeKeyword($rule$1) { - var impl = $rule$1.implements; - for (var i$3 = 0; i$3 < impl.length; i$3++) if (it.schema[impl[i$3]] !== void 0) return true; - } - return out; - }; -}) }); -var require_compile3 = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/compile/index.js": ((exports, module) => { - var resolve$1 = require_resolve3(), util$2 = require_util10(), errorClasses$1 = require_error_classes3(), stableStringify$1 = require_fast_json_stable_stringify3(); - var validateGenerator = require_validate3(); - var ucs2length = util$2.ucs2length; - var equal = require_fast_deep_equal3(); - var ValidationError = errorClasses$1.Validation; - module.exports = compile$1; - function compile$1(schema2, root2, localRefs, baseId) { - var self2 = this, opts = this._opts, refVal = [void 0], refs = {}, patterns = [], patternsHash = {}, defaults = [], defaultsHash = {}, customRules = []; - root2 = root2 || { - schema: schema2, - refVal, - refs - }; - var c = checkCompiling.call(this, schema2, root2, baseId); - var compilation = this._compilations[c.index]; - if (c.compiling) return compilation.callValidate = callValidate; - var formats$2 = this._formats; - var RULES = this.RULES; - try { - var v = localCompile(schema2, root2, localRefs, baseId); - compilation.validate = v; - var cv = compilation.callValidate; - if (cv) { - cv.schema = v.schema; - cv.errors = null; - cv.refs = v.refs; - cv.refVal = v.refVal; - cv.root = v.root; - cv.$async = v.$async; - if (opts.sourceCode) cv.source = v.source; - } - return v; - } finally { - endCompiling.call(this, schema2, root2, baseId); - } - function callValidate() { - var validate$1 = compilation.validate; - var result = validate$1.apply(this, arguments); - callValidate.errors = validate$1.errors; - return result; - } - function localCompile(_schema, _root, localRefs$1, baseId$1) { - var isRoot = !_root || _root && _root.schema == _schema; - if (_root.schema != root2.schema) return compile$1.call(self2, _schema, _root, localRefs$1, baseId$1); - var $async = _schema.$async === true; - var sourceCode = validateGenerator({ - isTop: true, - schema: _schema, - isRoot, - baseId: baseId$1, - root: _root, - schemaPath: "", - errSchemaPath: "#", - errorPath: '""', - MissingRefError: errorClasses$1.MissingRef, - RULES, - validate: validateGenerator, - util: util$2, - resolve: resolve$1, - resolveRef, - usePattern, - useDefault, - useCustomRule, - opts, - formats: formats$2, - logger: self2.logger, - self: self2 + block$data(valid, codeBlock, $dataValid = codegen_1$28.nil) { + this.gen.block(() => { + this.check$data(valid, $dataValid); + codeBlock(); }); - sourceCode = vars(refVal, refValCode) + vars(patterns, patternCode) + vars(defaults, defaultCode) + vars(customRules, customRuleCode$1) + sourceCode; - if (opts.processCode) sourceCode = opts.processCode(sourceCode, _schema); - var validate$1; - try { - validate$1 = new Function("self", "RULES", "formats", "root", "refVal", "defaults", "customRules", "equal", "ucs2length", "ValidationError", sourceCode)(self2, RULES, formats$2, root2, refVal, defaults, customRules, equal, ucs2length, ValidationError); - refVal[0] = validate$1; - } catch (e) { - self2.logger.error("Error compiling schema, function code:", sourceCode); - throw e; - } - validate$1.schema = _schema; - validate$1.errors = null; - validate$1.refs = refs; - validate$1.refVal = refVal; - validate$1.root = isRoot ? validate$1 : _root; - if ($async) validate$1.$async = true; - if (opts.sourceCode === true) validate$1.source = { - code: sourceCode, - patterns, - defaults - }; - return validate$1; } - function resolveRef(baseId$1, ref, isRoot) { - ref = resolve$1.url(baseId$1, ref); - var refIndex = refs[ref]; - var _refVal, refCode; - if (refIndex !== void 0) { - _refVal = refVal[refIndex]; - refCode = "refVal[" + refIndex + "]"; - return resolvedRef(_refVal, refCode); + check$data(valid = codegen_1$28.nil, $dataValid = codegen_1$28.nil) { + if (!this.$data) return; + const { gen, schemaCode, schemaType, def: def$30 } = this; + gen.if((0, codegen_1$28.or)((0, codegen_1$28._)`${schemaCode} === undefined`, $dataValid)); + if (valid !== codegen_1$28.nil) gen.assign(valid, true); + if (schemaType.length || def$30.validateSchema) { + gen.elseIf(this.invalid$data()); + this.$dataError(); + if (valid !== codegen_1$28.nil) gen.assign(valid, false); } - if (!isRoot && root2.refs) { - var rootRefId = root2.refs[ref]; - if (rootRefId !== void 0) { - _refVal = root2.refVal[rootRefId]; - refCode = addLocalRef(ref, _refVal); - return resolvedRef(_refVal, refCode); + gen.else(); + } + invalid$data() { + const { gen, schemaCode, schemaType, def: def$30, it } = this; + return (0, codegen_1$28.or)(wrong$DataType(), invalid$DataSchema()); + function wrong$DataType() { + if (schemaType.length) { + if (!(schemaCode instanceof codegen_1$28.Name)) throw new Error("ajv implementation error"); + const st = Array.isArray(schemaType) ? schemaType : [schemaType]; + return (0, codegen_1$28._)`${(0, dataType_2.checkDataTypes)(st, schemaCode, it.opts.strictNumbers, dataType_2.DataType.Wrong)}`; } + return codegen_1$28.nil; } - refCode = addLocalRef(ref); - var v$1 = resolve$1.call(self2, localCompile, root2, ref); - if (v$1 === void 0) { - var localSchema = localRefs && localRefs[ref]; - if (localSchema) v$1 = resolve$1.inlineRef(localSchema, opts.inlineRefs) ? localSchema : compile$1.call(self2, localSchema, root2, localRefs, baseId$1); - } - if (v$1 === void 0) removeLocalRef(ref); - else { - replaceLocalRef(ref, v$1); - return resolvedRef(v$1, refCode); - } - } - function addLocalRef(ref, v$1) { - var refId = refVal.length; - refVal[refId] = v$1; - refs[ref] = refId; - return "refVal" + refId; - } - function removeLocalRef(ref) { - delete refs[ref]; - } - function replaceLocalRef(ref, v$1) { - var refId = refs[ref]; - refVal[refId] = v$1; - } - function resolvedRef(refVal$1, code) { - return typeof refVal$1 == "object" || typeof refVal$1 == "boolean" ? { - code, - schema: refVal$1, - inline: true - } : { - code, - $async: refVal$1 && !!refVal$1.$async - }; - } - function usePattern(regexStr) { - var index = patternsHash[regexStr]; - if (index === void 0) { - index = patternsHash[regexStr] = patterns.length; - patterns[index] = regexStr; - } - return "pattern" + index; - } - function useDefault(value2) { - switch (typeof value2) { - case "boolean": - case "number": - return "" + value2; - case "string": - return util$2.toQuotedString(value2); - case "object": - if (value2 === null) return "null"; - var valueStr = stableStringify$1(value2); - var index = defaultsHash[valueStr]; - if (index === void 0) { - index = defaultsHash[valueStr] = defaults.length; - defaults[index] = value2; - } - return "default" + index; - } - } - function useCustomRule(rule, schema$1, parentSchema, it) { - if (self2._opts.validateSchema !== false) { - var deps = rule.definition.dependencies; - if (deps && !deps.every(function(keyword) { - return Object.prototype.hasOwnProperty.call(parentSchema, keyword); - })) throw new Error("parent schema must have all required keywords: " + deps.join(",")); - var validateSchema$1 = rule.definition.validateSchema; - if (validateSchema$1) { - if (!validateSchema$1(schema$1)) { - var message = "keyword schema is invalid: " + self2.errorsText(validateSchema$1.errors); - if (self2._opts.validateSchema == "log") self2.logger.error(message); - else throw new Error(message); - } + function invalid$DataSchema() { + if (def$30.validateSchema) { + const validateSchemaRef = gen.scopeValue("validate$data", { ref: def$30.validateSchema }); + return (0, codegen_1$28._)`!${validateSchemaRef}(${schemaCode})`; } + return codegen_1$28.nil; } - var compile$2 = rule.definition.compile, inline = rule.definition.inline, macro = rule.definition.macro; - var validate$1; - if (compile$2) validate$1 = compile$2.call(self2, schema$1, parentSchema, it); - else if (macro) { - validate$1 = macro.call(self2, schema$1, parentSchema, it); - if (opts.validateSchema !== false) self2.validateSchema(validate$1, true); - } else if (inline) validate$1 = inline.call(self2, it, rule.keyword, schema$1, parentSchema); - else { - validate$1 = rule.definition.validate; - if (!validate$1) return; - } - if (validate$1 === void 0) throw new Error('custom keyword "' + rule.keyword + '"failed to compile'); - var index = customRules.length; - customRules[index] = validate$1; - return { - code: "customRule" + index, - validate: validate$1 + } + subschema(appl, valid) { + const subschema = (0, subschema_1.getSubschema)(this.it, appl); + (0, subschema_1.extendSubschemaData)(subschema, this.it, appl); + (0, subschema_1.extendSubschemaMode)(subschema, appl); + const nextContext = { + ...this.it, + ...subschema, + items: void 0, + props: void 0 }; + subschemaCode(nextContext, valid); + return nextContext; + } + mergeEvaluated(schemaCxt, toName) { + const { it, gen } = this; + if (!it.opts.unevaluated) return; + if (it.props !== true && schemaCxt.props !== void 0) it.props = util_1$23.mergeEvaluated.props(gen, schemaCxt.props, it.props, toName); + if (it.items !== true && schemaCxt.items !== void 0) it.items = util_1$23.mergeEvaluated.items(gen, schemaCxt.items, it.items, toName); + } + mergeValidEvaluated(schemaCxt, valid) { + const { it, gen } = this; + if (it.opts.unevaluated && (it.props !== true || it.items !== true)) { + gen.if(valid, () => this.mergeEvaluated(schemaCxt, codegen_1$28.Name)); + return true; + } + } + }; + exports.KeywordCxt = KeywordCxt; + function keywordCode(it, keyword, def$30, ruleType) { + const cxt = new KeywordCxt(it, def$30, keyword); + if ("code" in def$30) def$30.code(cxt, ruleType); + else if (cxt.$data && def$30.validate) (0, keyword_1.funcKeywordCode)(cxt, def$30); + else if ("macro" in def$30) (0, keyword_1.macroKeywordCode)(cxt, def$30); + else if (def$30.compile || def$30.validate) (0, keyword_1.funcKeywordCode)(cxt, def$30); + } + const JSON_POINTER = /^\/(?:[^~]|~0|~1)*$/; + const RELATIVE_JSON_POINTER = /^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/; + function getData($data, { dataLevel, dataNames, dataPathArr }) { + let jsonPointer; + let data; + if ($data === "") return names_1$3.default.rootData; + if ($data[0] === "/") { + if (!JSON_POINTER.test($data)) throw new Error(`Invalid JSON-pointer: ${$data}`); + jsonPointer = $data; + data = names_1$3.default.rootData; + } else { + const matches = RELATIVE_JSON_POINTER.exec($data); + if (!matches) throw new Error(`Invalid JSON-pointer: ${$data}`); + const up = +matches[1]; + jsonPointer = matches[2]; + if (jsonPointer === "#") { + if (up >= dataLevel) throw new Error(errorMsg("property/index", up)); + return dataPathArr[dataLevel - up]; + } + if (up > dataLevel) throw new Error(errorMsg("data", up)); + data = dataNames[dataLevel - up]; + if (!jsonPointer) return data; + } + let expr = data; + const segments = jsonPointer.split("/"); + for (const segment of segments) if (segment) { + data = (0, codegen_1$28._)`${data}${(0, codegen_1$28.getProperty)((0, util_1$23.unescapeJsonPointer)(segment))}`; + expr = (0, codegen_1$28._)`${expr} && ${data}`; + } + return expr; + function errorMsg(pointerType, up) { + return `Cannot access ${pointerType} ${up} levels up, current level is ${dataLevel}`; } } - function checkCompiling(schema2, root2, baseId) { - var index = compIndex.call(this, schema2, root2, baseId); - if (index >= 0) return { - index, - compiling: true + exports.getData = getData; +})); +var require_validation_error3 = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + var ValidationError = class extends Error { + constructor(errors) { + super("validation failed"); + this.errors = errors; + this.ajv = this.validation = true; + } + }; + exports.default = ValidationError; +})); +var require_ref_error3 = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + const resolve_1$2 = require_resolve3(); + var MissingRefError = class extends Error { + constructor(resolver, baseId, ref, msg) { + super(msg || `can't resolve reference ${ref} from id ${baseId}`); + this.missingRef = (0, resolve_1$2.resolveUrl)(resolver, baseId, ref); + this.missingSchema = (0, resolve_1$2.normalizeId)((0, resolve_1$2.getFullPath)(resolver, this.missingRef)); + } + }; + exports.default = MissingRefError; +})); +var require_compile3 = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.resolveSchema = exports.getCompilingSchema = exports.resolveRef = exports.compileSchema = exports.SchemaEnv = void 0; + const codegen_1$27 = require_codegen3(); + const validation_error_1$2 = require_validation_error3(); + const names_1$2 = require_names3(); + const resolve_1$1 = require_resolve3(); + const util_1$22 = require_util10(); + const validate_1$3 = require_validate3(); + var SchemaEnv = class { + constructor(env3) { + var _a2; + this.refs = {}; + this.dynamicAnchors = {}; + let schema2; + if (typeof env3.schema == "object") schema2 = env3.schema; + this.schema = env3.schema; + this.schemaId = env3.schemaId; + this.root = env3.root || this; + this.baseId = (_a2 = env3.baseId) !== null && _a2 !== void 0 ? _a2 : (0, resolve_1$1.normalizeId)(schema2 === null || schema2 === void 0 ? void 0 : schema2[env3.schemaId || "$id"]); + this.schemaPath = env3.schemaPath; + this.localRefs = env3.localRefs; + this.meta = env3.meta; + this.$async = schema2 === null || schema2 === void 0 ? void 0 : schema2.$async; + this.refs = {}; + } + }; + exports.SchemaEnv = SchemaEnv; + function compileSchema(sch) { + const _sch = getCompilingSchema.call(this, sch); + if (_sch) return _sch; + const rootId = (0, resolve_1$1.getFullPath)(this.opts.uriResolver, sch.root.baseId); + const { es5, lines } = this.opts.code; + const { ownProperties } = this.opts; + const gen = new codegen_1$27.CodeGen(this.scope, { + es5, + lines, + ownProperties + }); + let _ValidationError; + if (sch.$async) _ValidationError = gen.scopeValue("Error", { + ref: validation_error_1$2.default, + code: (0, codegen_1$27._)`require("ajv/dist/runtime/validation_error").default` + }); + const validateName = gen.scopeName("validate"); + sch.validateName = validateName; + const schemaCxt = { + gen, + allErrors: this.opts.allErrors, + data: names_1$2.default.data, + parentData: names_1$2.default.parentData, + parentDataProperty: names_1$2.default.parentDataProperty, + dataNames: [names_1$2.default.data], + dataPathArr: [codegen_1$27.nil], + dataLevel: 0, + dataTypes: [], + definedProperties: /* @__PURE__ */ new Set(), + topSchemaRef: gen.scopeValue("schema", this.opts.code.source === true ? { + ref: sch.schema, + code: (0, codegen_1$27.stringify)(sch.schema) + } : { ref: sch.schema }), + validateName, + ValidationError: _ValidationError, + schema: sch.schema, + schemaEnv: sch, + rootId, + baseId: sch.baseId || rootId, + schemaPath: codegen_1$27.nil, + errSchemaPath: sch.schemaPath || (this.opts.jtd ? "" : "#"), + errorPath: (0, codegen_1$27._)`""`, + opts: this.opts, + self: this }; - index = this._compilations.length; - this._compilations[index] = { + let sourceCode; + try { + this._compilations.add(sch); + (0, validate_1$3.validateFunctionCode)(schemaCxt); + gen.optimize(this.opts.code.optimize); + const validateCode = gen.toString(); + sourceCode = `${gen.scopeRefs(names_1$2.default.scope)}return ${validateCode}`; + if (this.opts.code.process) sourceCode = this.opts.code.process(sourceCode, sch); + const validate2 = new Function(`${names_1$2.default.self}`, `${names_1$2.default.scope}`, sourceCode)(this, this.scope.get()); + this.scope.value(validateName, { ref: validate2 }); + validate2.errors = null; + validate2.schema = sch.schema; + validate2.schemaEnv = sch; + if (sch.$async) validate2.$async = true; + if (this.opts.code.source === true) validate2.source = { + validateName, + validateCode, + scopeValues: gen._values + }; + if (this.opts.unevaluated) { + const { props, items } = schemaCxt; + validate2.evaluated = { + props: props instanceof codegen_1$27.Name ? void 0 : props, + items: items instanceof codegen_1$27.Name ? void 0 : items, + dynamicProps: props instanceof codegen_1$27.Name, + dynamicItems: items instanceof codegen_1$27.Name + }; + if (validate2.source) validate2.source.evaluated = (0, codegen_1$27.stringify)(validate2.evaluated); + } + sch.validate = validate2; + return sch; + } catch (e) { + delete sch.validate; + delete sch.validateName; + if (sourceCode) this.logger.error("Error compiling schema, function code:", sourceCode); + throw e; + } finally { + this._compilations.delete(sch); + } + } + exports.compileSchema = compileSchema; + function resolveRef2(root2, baseId, ref) { + var _a2; + ref = (0, resolve_1$1.resolveUrl)(this.opts.uriResolver, baseId, ref); + const schOrFunc = root2.refs[ref]; + if (schOrFunc) return schOrFunc; + let _sch = resolve$1.call(this, root2, ref); + if (_sch === void 0) { + const schema2 = (_a2 = root2.localRefs) === null || _a2 === void 0 ? void 0 : _a2[ref]; + const { schemaId } = this.opts; + if (schema2) _sch = new SchemaEnv({ + schema: schema2, + schemaId, + root: root2, + baseId + }); + } + if (_sch === void 0) return; + return root2.refs[ref] = inlineOrCompile.call(this, _sch); + } + exports.resolveRef = resolveRef2; + function inlineOrCompile(sch) { + if ((0, resolve_1$1.inlineRef)(sch.schema, this.opts.inlineRefs)) return sch.schema; + return sch.validate ? sch : compileSchema.call(this, sch); + } + function getCompilingSchema(schEnv) { + for (const sch of this._compilations) if (sameSchemaEnv(sch, schEnv)) return sch; + } + exports.getCompilingSchema = getCompilingSchema; + function sameSchemaEnv(s1, s2) { + return s1.schema === s2.schema && s1.root === s2.root && s1.baseId === s2.baseId; + } + function resolve$1(root2, ref) { + let sch; + while (typeof (sch = this.refs[ref]) == "string") ref = sch; + return sch || this.schemas[ref] || resolveSchema.call(this, root2, ref); + } + function resolveSchema(root2, ref) { + const p = this.opts.uriResolver.parse(ref); + const refPath = (0, resolve_1$1._getFullPath)(this.opts.uriResolver, p); + let baseId = (0, resolve_1$1.getFullPath)(this.opts.uriResolver, root2.baseId, void 0); + if (Object.keys(root2.schema).length > 0 && refPath === baseId) return getJsonPointer.call(this, p, root2); + const id = (0, resolve_1$1.normalizeId)(refPath); + const schOrRef = this.refs[id] || this.schemas[id]; + if (typeof schOrRef == "string") { + const sch = resolveSchema.call(this, root2, schOrRef); + if (typeof (sch === null || sch === void 0 ? void 0 : sch.schema) !== "object") return; + return getJsonPointer.call(this, p, sch); + } + if (typeof (schOrRef === null || schOrRef === void 0 ? void 0 : schOrRef.schema) !== "object") return; + if (!schOrRef.validate) compileSchema.call(this, schOrRef); + if (id === (0, resolve_1$1.normalizeId)(ref)) { + const { schema: schema2 } = schOrRef; + const { schemaId } = this.opts; + const schId = schema2[schemaId]; + if (schId) baseId = (0, resolve_1$1.resolveUrl)(this.opts.uriResolver, baseId, schId); + return new SchemaEnv({ + schema: schema2, + schemaId, + root: root2, + baseId + }); + } + return getJsonPointer.call(this, p, schOrRef); + } + exports.resolveSchema = resolveSchema; + const PREVENT_SCOPE_CHANGE = /* @__PURE__ */ new Set([ + "properties", + "patternProperties", + "enum", + "dependencies", + "definitions" + ]); + function getJsonPointer(parsedRef, { baseId, schema: schema2, root: root2 }) { + var _a2; + if (((_a2 = parsedRef.fragment) === null || _a2 === void 0 ? void 0 : _a2[0]) !== "/") return; + for (const part of parsedRef.fragment.slice(1).split("/")) { + if (typeof schema2 === "boolean") return; + const partSchema = schema2[(0, util_1$22.unescapeFragment)(part)]; + if (partSchema === void 0) return; + schema2 = partSchema; + const schId = typeof schema2 === "object" && schema2[this.opts.schemaId]; + if (!PREVENT_SCOPE_CHANGE.has(part) && schId) baseId = (0, resolve_1$1.resolveUrl)(this.opts.uriResolver, baseId, schId); + } + let env3; + if (typeof schema2 != "boolean" && schema2.$ref && !(0, util_1$22.schemaHasRulesButRef)(schema2, this.RULES)) { + const $ref = (0, resolve_1$1.resolveUrl)(this.opts.uriResolver, baseId, schema2.$ref); + env3 = resolveSchema.call(this, root2, $ref); + } + const { schemaId } = this.opts; + env3 = env3 || new SchemaEnv({ schema: schema2, + schemaId, root: root2, baseId - }; - return { - index, - compiling: false - }; + }); + if (env3.schema !== env3.root.schema) return env3; } - function endCompiling(schema2, root2, baseId) { - var i$3 = compIndex.call(this, schema2, root2, baseId); - if (i$3 >= 0) this._compilations.splice(i$3, 1); - } - function compIndex(schema2, root2, baseId) { - for (var i$3 = 0; i$3 < this._compilations.length; i$3++) { - var c = this._compilations[i$3]; - if (c.schema == schema2 && c.root == root2 && c.baseId == baseId) return i$3; - } - return -1; - } - function patternCode(i$3, patterns) { - return "var pattern" + i$3 + " = new RegExp(" + util$2.toQuotedString(patterns[i$3]) + ");"; - } - function defaultCode(i$3) { - return "var default" + i$3 + " = defaults[" + i$3 + "];"; - } - function refValCode(i$3, refVal) { - return refVal[i$3] === void 0 ? "" : "var refVal" + i$3 + " = refVal[" + i$3 + "];"; - } - function customRuleCode$1(i$3) { - return "var customRule" + i$3 + " = customRules[" + i$3 + "];"; - } - function vars(arr, statement) { - if (!arr.length) return ""; - var code = ""; - for (var i$3 = 0; i$3 < arr.length; i$3++) code += statement(i$3, arr); - return code; - } -}) }); -var require_cache4 = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/cache.js": ((exports, module) => { - var Cache$1 = module.exports = function Cache$2() { - this._cache = {}; - }; - Cache$1.prototype.put = function Cache_put(key$1, value2) { - this._cache[key$1] = value2; - }; - Cache$1.prototype.get = function Cache_get(key$1) { - return this._cache[key$1]; - }; - Cache$1.prototype.del = function Cache_del(key$1) { - delete this._cache[key$1]; - }; - Cache$1.prototype.clear = function Cache_clear() { - this._cache = {}; - }; -}) }); -var require_formats3 = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/compile/formats.js": ((exports, module) => { - var util$1 = require_util10(); - var DATE = /^(\d\d\d\d)-(\d\d)-(\d\d)$/; - var DAYS = [ - 0, - 31, - 28, - 31, - 30, - 31, - 30, - 31, - 31, - 30, - 31, - 30, - 31 - ]; - var TIME = /^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i; - var HOSTNAME = /^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i; - var URI = /^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?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-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i; - var URL$2 = /^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i; - var UUID = /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i; - var JSON_POINTER = /^(?:\/(?:[^~/]|~0|~1)*)*$/; - var JSON_POINTER_URI_FRAGMENT = /^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i; - var RELATIVE_JSON_POINTER = /^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/; - module.exports = formats$1; - function formats$1(mode) { - mode = mode == "full" ? "full" : "fast"; - return util$1.copy(formats$1[mode]); - } - formats$1.fast = { - date: /^\d\d\d\d-[0-1]\d-[0-3]\d$/, - time: /^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i, - "date-time": /^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i, - uri: /^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i, - "uri-reference": /^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i, - "uri-template": URITEMPLATE, - url: URL$2, - email: /^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i, - hostname: HOSTNAME, - ipv4: /^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/, - ipv6: /^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i, - regex: regex4, - uuid: UUID, - "json-pointer": JSON_POINTER, - "json-pointer-uri-fragment": JSON_POINTER_URI_FRAGMENT, - "relative-json-pointer": RELATIVE_JSON_POINTER - }; - formats$1.full = { - date: date2, - time: time2, - "date-time": date_time, - uri, - "uri-reference": URIREF, - "uri-template": URITEMPLATE, - url: URL$2, - email: /^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i, - hostname: HOSTNAME, - ipv4: /^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/, - ipv6: /^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i, - regex: regex4, - uuid: UUID, - "json-pointer": JSON_POINTER, - "json-pointer-uri-fragment": JSON_POINTER_URI_FRAGMENT, - "relative-json-pointer": RELATIVE_JSON_POINTER - }; - function isLeapYear(year) { - return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0); - } - function date2(str) { - var matches = str.match(DATE); - if (!matches) return false; - var year = +matches[1]; - var month = +matches[2]; - var day = +matches[3]; - return month >= 1 && month <= 12 && day >= 1 && day <= (month == 2 && isLeapYear(year) ? 29 : DAYS[month]); - } - function time2(str, full) { - var matches = str.match(TIME); - if (!matches) return false; - var hour = matches[1]; - var minute = matches[2]; - var second = matches[3]; - var timeZone = matches[5]; - return (hour <= 23 && minute <= 59 && second <= 59 || hour == 23 && minute == 59 && second == 60) && (!full || timeZone); - } - 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); - } - var NOT_URI_FRAGMENT = /\/|:/; - function uri(str) { - return NOT_URI_FRAGMENT.test(str) && URI.test(str); - } - var Z_ANCHOR = /[^\\]\\Z/; - function regex4(str) { - if (Z_ANCHOR.test(str)) return false; - try { - new RegExp(str); - return true; - } catch (e) { - return false; - } - } -}) }); -var require_ref3 = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/dotjs/ref.js": ((exports, module) => { - module.exports = function generate_ref(it, $keyword, $ruleType) { - var out = " "; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $errSchemaPath = it.errSchemaPath + "/" + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = "data" + ($dataLvl || ""); - var $valid = "valid" + $lvl; - var $async, $refCode; - if ($schema == "#" || $schema == "#/") if (it.isRoot) { - $async = it.async; - $refCode = "validate"; - } else { - $async = it.root.schema.$async === true; - $refCode = "root.refVal[0]"; - } - else { - var $refVal = it.resolveRef(it.baseId, $schema, it.isRoot); - if ($refVal === void 0) { - var $message = it.MissingRefError.message(it.baseId, $schema); - if (it.opts.missingRefs == "fail") { - it.logger.error($message); - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ""; - if (it.createErrors !== false) { - out += " { keyword: '$ref' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { ref: '" + it.util.escapeQuotes($schema) + "' } "; - if (it.opts.messages !== false) out += " , message: 'can\\'t resolve reference " + it.util.escapeQuotes($schema) + "' "; - if (it.opts.verbose) out += " , schema: " + it.util.toQuotedString($schema) + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; - out += " } "; - } else out += " {} "; - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) - if (it.async) out += " throw new ValidationError([" + __err + "]); "; - else out += " validate.errors = [" + __err + "]; return false; "; - else out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; - if ($breakOnError) out += " if (false) { "; - } else if (it.opts.missingRefs == "ignore") { - it.logger.warn($message); - if ($breakOnError) out += " if (true) { "; - } else throw new it.MissingRefError(it.baseId, $schema, $message); - } else if ($refVal.inline) { - var $it = it.util.copy(it); - $it.level++; - var $nextValid = "valid" + $it.level; - $it.schema = $refVal.schema; - $it.schemaPath = ""; - $it.errSchemaPath = $schema; - var $code = it.validate($it).replace(/validate\.schema/g, $refVal.code); - out += " " + $code + " "; - if ($breakOnError) out += " if (" + $nextValid + ") { "; - } else { - $async = $refVal.$async === true || it.async && $refVal.$async !== false; - $refCode = $refVal.code; - } - } - if ($refCode) { - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ""; - if (it.opts.passContext) out += " " + $refCode + ".call(this, "; - else out += " " + $refCode + "( "; - out += " " + $data + ", (dataPath || '')"; - if (it.errorPath != '""') out += " + " + it.errorPath; - var $parentData = $dataLvl ? "data" + ($dataLvl - 1 || "") : "parentData", $parentDataProperty = $dataLvl ? it.dataPathArr[$dataLvl] : "parentDataProperty"; - out += " , " + $parentData + " , " + $parentDataProperty + ", rootData) "; - var __callValidate = out; - out = $$outStack.pop(); - if ($async) { - if (!it.async) throw new Error("async schema referenced by sync schema"); - if ($breakOnError) out += " var " + $valid + "; "; - out += " try { await " + __callValidate + "; "; - if ($breakOnError) out += " " + $valid + " = true; "; - out += " } catch (e) { if (!(e instanceof ValidationError)) throw e; if (vErrors === null) vErrors = e.errors; else vErrors = vErrors.concat(e.errors); errors = vErrors.length; "; - if ($breakOnError) out += " " + $valid + " = false; "; - out += " } "; - if ($breakOnError) out += " if (" + $valid + ") { "; - } else { - out += " if (!" + __callValidate + ") { if (vErrors === null) vErrors = " + $refCode + ".errors; else vErrors = vErrors.concat(" + $refCode + ".errors); errors = vErrors.length; } "; - if ($breakOnError) out += " else { "; - } - } - return out; - }; -}) }); -var require_allOf3 = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/dotjs/allOf.js": ((exports, module) => { - module.exports = function generate_allOf(it, $keyword, $ruleType) { - var out = " "; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + "/" + $keyword; - var $breakOnError = !it.opts.allErrors; - var $it = it.util.copy(it); - var $closingBraces = ""; - $it.level++; - var $nextValid = "valid" + $it.level; - var $currentBaseId = $it.baseId, $allSchemasEmpty = true; - var arr1 = $schema; - if (arr1) { - var $sch, $i = -1, l1 = arr1.length - 1; - while ($i < l1) { - $sch = arr1[$i += 1]; - if (it.opts.strictKeywords ? typeof $sch == "object" && Object.keys($sch).length > 0 || $sch === false : it.util.schemaHasRules($sch, it.RULES.all)) { - $allSchemasEmpty = false; - $it.schema = $sch; - $it.schemaPath = $schemaPath + "[" + $i + "]"; - $it.errSchemaPath = $errSchemaPath + "/" + $i; - out += " " + it.validate($it) + " "; - $it.baseId = $currentBaseId; - if ($breakOnError) { - out += " if (" + $nextValid + ") { "; - $closingBraces += "}"; - } - } - } - } - if ($breakOnError) if ($allSchemasEmpty) out += " if (true) { "; - else out += " " + $closingBraces.slice(0, -1) + " "; - return out; - }; -}) }); -var require_anyOf3 = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/dotjs/anyOf.js": ((exports, module) => { - module.exports = function generate_anyOf(it, $keyword, $ruleType) { - var out = " "; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + "/" + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = "data" + ($dataLvl || ""); - var $valid = "valid" + $lvl; - var $errs = "errs__" + $lvl; - var $it = it.util.copy(it); - var $closingBraces = ""; - $it.level++; - var $nextValid = "valid" + $it.level; - if ($schema.every(function($sch$1) { - return it.opts.strictKeywords ? typeof $sch$1 == "object" && Object.keys($sch$1).length > 0 || $sch$1 === false : it.util.schemaHasRules($sch$1, it.RULES.all); - })) { - var $currentBaseId = $it.baseId; - out += " var " + $errs + " = errors; var " + $valid + " = false; "; - var $wasComposite = it.compositeRule; - it.compositeRule = $it.compositeRule = true; - var arr1 = $schema; - if (arr1) { - var $sch, $i = -1, l1 = arr1.length - 1; - while ($i < l1) { - $sch = arr1[$i += 1]; - $it.schema = $sch; - $it.schemaPath = $schemaPath + "[" + $i + "]"; - $it.errSchemaPath = $errSchemaPath + "/" + $i; - out += " " + it.validate($it) + " "; - $it.baseId = $currentBaseId; - out += " " + $valid + " = " + $valid + " || " + $nextValid + "; if (!" + $valid + ") { "; - $closingBraces += "}"; - } - } - it.compositeRule = $it.compositeRule = $wasComposite; - out += " " + $closingBraces + " if (!" + $valid + ") { var err = "; - if (it.createErrors !== false) { - out += " { keyword: 'anyOf' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: {} "; - if (it.opts.messages !== false) out += " , message: 'should match some schema in anyOf' "; - if (it.opts.verbose) out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; - out += " } "; - } else out += " {} "; - out += "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; - if (!it.compositeRule && $breakOnError) - if (it.async) out += " throw new ValidationError(vErrors); "; - else out += " validate.errors = vErrors; return false; "; - out += " } else { errors = " + $errs + "; if (vErrors !== null) { if (" + $errs + ") vErrors.length = " + $errs + "; else vErrors = null; } "; - if (it.opts.allErrors) out += " } "; - } else if ($breakOnError) out += " if (true) { "; - return out; - }; -}) }); -var require_comment3 = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/dotjs/comment.js": ((exports, module) => { - module.exports = function generate_comment(it, $keyword, $ruleType) { - var out = " "; - var $schema = it.schema[$keyword]; - var $errSchemaPath = it.errSchemaPath + "/" + $keyword; - it.opts.allErrors; - var $comment = it.util.toQuotedString($schema); - if (it.opts.$comment === true) out += " console.log(" + $comment + ");"; - else if (typeof it.opts.$comment == "function") out += " self._opts.$comment(" + $comment + ", " + it.util.toQuotedString($errSchemaPath) + ", validate.root.schema);"; - return out; - }; -}) }); -var require_const3 = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/dotjs/const.js": ((exports, module) => { - module.exports = function generate_const(it, $keyword, $ruleType) { - var out = " "; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + "/" + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = "data" + ($dataLvl || ""); - var $valid = "valid" + $lvl, $isData = it.opts.$data && $schema && $schema.$data; - if ($isData) { - out += " var schema" + $lvl + " = " + it.util.getData($schema.$data, $dataLvl, it.dataPathArr) + "; "; - "" + $lvl; - } - if (!$isData) out += " var schema" + $lvl + " = validate.schema" + $schemaPath + ";"; - out += "var " + $valid + " = equal(" + $data + ", schema" + $lvl + "); if (!" + $valid + ") { "; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ""; - if (it.createErrors !== false) { - out += " { keyword: 'const' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { allowedValue: schema" + $lvl + " } "; - if (it.opts.messages !== false) out += " , message: 'should be equal to constant' "; - if (it.opts.verbose) out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; - out += " } "; - } else out += " {} "; - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) - if (it.async) out += " throw new ValidationError([" + __err + "]); "; - else out += " validate.errors = [" + __err + "]; return false; "; - else out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; - out += " }"; - if ($breakOnError) out += " else { "; - return out; - }; -}) }); -var require_contains3 = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/dotjs/contains.js": ((exports, module) => { - module.exports = function generate_contains(it, $keyword, $ruleType) { - var out = " "; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + "/" + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = "data" + ($dataLvl || ""); - var $valid = "valid" + $lvl; - var $errs = "errs__" + $lvl; - var $it = it.util.copy(it); - var $closingBraces = ""; - $it.level++; - var $nextValid = "valid" + $it.level; - var $idx = "i" + $lvl, $dataNxt = $it.dataLevel = it.dataLevel + 1, $nextData = "data" + $dataNxt, $currentBaseId = it.baseId, $nonEmptySchema = it.opts.strictKeywords ? typeof $schema == "object" && Object.keys($schema).length > 0 || $schema === false : it.util.schemaHasRules($schema, it.RULES.all); - out += "var " + $errs + " = errors;var " + $valid + ";"; - if ($nonEmptySchema) { - var $wasComposite = it.compositeRule; - it.compositeRule = $it.compositeRule = true; - $it.schema = $schema; - $it.schemaPath = $schemaPath; - $it.errSchemaPath = $errSchemaPath; - out += " var " + $nextValid + " = false; for (var " + $idx + " = 0; " + $idx + " < " + $data + ".length; " + $idx + "++) { "; - $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true); - var $passData = $data + "[" + $idx + "]"; - $it.dataPathArr[$dataNxt] = $idx; - var $code = it.validate($it); - $it.baseId = $currentBaseId; - if (it.util.varOccurences($code, $nextData) < 2) out += " " + it.util.varReplace($code, $nextData, $passData) + " "; - else out += " var " + $nextData + " = " + $passData + "; " + $code + " "; - out += " if (" + $nextValid + ") break; } "; - it.compositeRule = $it.compositeRule = $wasComposite; - out += " " + $closingBraces + " if (!" + $nextValid + ") {"; - } else out += " if (" + $data + ".length == 0) {"; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ""; - if (it.createErrors !== false) { - out += " { keyword: 'contains' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: {} "; - if (it.opts.messages !== false) out += " , message: 'should contain a valid item' "; - if (it.opts.verbose) out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; - out += " } "; - } else out += " {} "; - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) - if (it.async) out += " throw new ValidationError([" + __err + "]); "; - else out += " validate.errors = [" + __err + "]; return false; "; - else out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; - out += " } else { "; - if ($nonEmptySchema) out += " errors = " + $errs + "; if (vErrors !== null) { if (" + $errs + ") vErrors.length = " + $errs + "; else vErrors = null; } "; - if (it.opts.allErrors) out += " } "; - return out; - }; -}) }); -var require_dependencies3 = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/dotjs/dependencies.js": ((exports, module) => { - module.exports = function generate_dependencies(it, $keyword, $ruleType) { - var out = " "; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + "/" + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = "data" + ($dataLvl || ""); - var $errs = "errs__" + $lvl; - var $it = it.util.copy(it); - var $closingBraces = ""; - $it.level++; - var $nextValid = "valid" + $it.level; - var $schemaDeps = {}, $propertyDeps = {}, $ownProperties = it.opts.ownProperties; - for ($property in $schema) { - if ($property == "__proto__") continue; - var $sch = $schema[$property]; - var $deps = Array.isArray($sch) ? $propertyDeps : $schemaDeps; - $deps[$property] = $sch; - } - out += "var " + $errs + " = errors;"; - var $currentErrorPath = it.errorPath; - out += "var missing" + $lvl + ";"; - for (var $property in $propertyDeps) { - $deps = $propertyDeps[$property]; - if ($deps.length) { - out += " if ( " + $data + it.util.getProperty($property) + " !== undefined "; - if ($ownProperties) out += " && Object.prototype.hasOwnProperty.call(" + $data + ", '" + it.util.escapeQuotes($property) + "') "; - if ($breakOnError) { - out += " && ( "; - var arr1 = $deps; - if (arr1) { - var $propertyKey, $i = -1, l1 = arr1.length - 1; - while ($i < l1) { - $propertyKey = arr1[$i += 1]; - if ($i) out += " || "; - var $prop = it.util.getProperty($propertyKey), $useData = $data + $prop; - out += " ( ( " + $useData + " === undefined "; - if ($ownProperties) out += " || ! Object.prototype.hasOwnProperty.call(" + $data + ", '" + it.util.escapeQuotes($propertyKey) + "') "; - out += ") && (missing" + $lvl + " = " + it.util.toQuotedString(it.opts.jsonPointers ? $propertyKey : $prop) + ") ) "; - } - } - out += ")) { "; - var $propertyPath = "missing" + $lvl, $missingProperty = "' + " + $propertyPath + " + '"; - if (it.opts._errorDataPathProperty) it.errorPath = it.opts.jsonPointers ? it.util.getPathExpr($currentErrorPath, $propertyPath, true) : $currentErrorPath + " + " + $propertyPath; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ""; - if (it.createErrors !== false) { - out += " { keyword: 'dependencies' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { property: '" + it.util.escapeQuotes($property) + "', missingProperty: '" + $missingProperty + "', depsCount: " + $deps.length + ", deps: '" + it.util.escapeQuotes($deps.length == 1 ? $deps[0] : $deps.join(", ")) + "' } "; - if (it.opts.messages !== false) { - out += " , message: 'should have "; - if ($deps.length == 1) out += "property " + it.util.escapeQuotes($deps[0]); - else out += "properties " + it.util.escapeQuotes($deps.join(", ")); - out += " when property " + it.util.escapeQuotes($property) + " is present' "; - } - if (it.opts.verbose) out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; - out += " } "; - } else out += " {} "; - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) - if (it.async) out += " throw new ValidationError([" + __err + "]); "; - else out += " validate.errors = [" + __err + "]; return false; "; - else out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; - } else { - out += " ) { "; - var arr2 = $deps; - if (arr2) { - var $propertyKey, i2 = -1, l2 = arr2.length - 1; - while (i2 < l2) { - $propertyKey = arr2[i2 += 1]; - var $prop = it.util.getProperty($propertyKey), $missingProperty = it.util.escapeQuotes($propertyKey), $useData = $data + $prop; - if (it.opts._errorDataPathProperty) it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers); - out += " if ( " + $useData + " === undefined "; - if ($ownProperties) out += " || ! Object.prototype.hasOwnProperty.call(" + $data + ", '" + it.util.escapeQuotes($propertyKey) + "') "; - out += ") { var err = "; - if (it.createErrors !== false) { - out += " { keyword: 'dependencies' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { property: '" + it.util.escapeQuotes($property) + "', missingProperty: '" + $missingProperty + "', depsCount: " + $deps.length + ", deps: '" + it.util.escapeQuotes($deps.length == 1 ? $deps[0] : $deps.join(", ")) + "' } "; - if (it.opts.messages !== false) { - out += " , message: 'should have "; - if ($deps.length == 1) out += "property " + it.util.escapeQuotes($deps[0]); - else out += "properties " + it.util.escapeQuotes($deps.join(", ")); - out += " when property " + it.util.escapeQuotes($property) + " is present' "; - } - if (it.opts.verbose) out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; - out += " } "; - } else out += " {} "; - out += "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "; - } - } - } - out += " } "; - if ($breakOnError) { - $closingBraces += "}"; - out += " else { "; - } - } - } - it.errorPath = $currentErrorPath; - var $currentBaseId = $it.baseId; - for (var $property in $schemaDeps) { - var $sch = $schemaDeps[$property]; - if (it.opts.strictKeywords ? typeof $sch == "object" && Object.keys($sch).length > 0 || $sch === false : it.util.schemaHasRules($sch, it.RULES.all)) { - out += " " + $nextValid + " = true; if ( " + $data + it.util.getProperty($property) + " !== undefined "; - if ($ownProperties) out += " && Object.prototype.hasOwnProperty.call(" + $data + ", '" + it.util.escapeQuotes($property) + "') "; - out += ") { "; - $it.schema = $sch; - $it.schemaPath = $schemaPath + it.util.getProperty($property); - $it.errSchemaPath = $errSchemaPath + "/" + it.util.escapeFragment($property); - out += " " + it.validate($it) + " "; - $it.baseId = $currentBaseId; - out += " } "; - if ($breakOnError) { - out += " if (" + $nextValid + ") { "; - $closingBraces += "}"; - } - } - } - if ($breakOnError) out += " " + $closingBraces + " if (" + $errs + " == errors) {"; - return out; - }; -}) }); -var require_enum3 = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/dotjs/enum.js": ((exports, module) => { - module.exports = function generate_enum(it, $keyword, $ruleType) { - var out = " "; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + "/" + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = "data" + ($dataLvl || ""); - var $valid = "valid" + $lvl, $isData = it.opts.$data && $schema && $schema.$data; - if ($isData) { - out += " var schema" + $lvl + " = " + it.util.getData($schema.$data, $dataLvl, it.dataPathArr) + "; "; - "" + $lvl; - } - var $i = "i" + $lvl, $vSchema = "schema" + $lvl; - if (!$isData) out += " var " + $vSchema + " = validate.schema" + $schemaPath + ";"; - out += "var " + $valid + ";"; - if ($isData) out += " if (schema" + $lvl + " === undefined) " + $valid + " = true; else if (!Array.isArray(schema" + $lvl + ")) " + $valid + " = false; else {"; - out += "" + $valid + " = false;for (var " + $i + "=0; " + $i + "<" + $vSchema + ".length; " + $i + "++) if (equal(" + $data + ", " + $vSchema + "[" + $i + "])) { " + $valid + " = true; break; }"; - if ($isData) out += " } "; - out += " if (!" + $valid + ") { "; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ""; - if (it.createErrors !== false) { - out += " { keyword: 'enum' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { allowedValues: schema" + $lvl + " } "; - if (it.opts.messages !== false) out += " , message: 'should be equal to one of the allowed values' "; - if (it.opts.verbose) out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; - out += " } "; - } else out += " {} "; - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) - if (it.async) out += " throw new ValidationError([" + __err + "]); "; - else out += " validate.errors = [" + __err + "]; return false; "; - else out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; - out += " }"; - if ($breakOnError) out += " else { "; - return out; - }; -}) }); -var require_format3 = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/dotjs/format.js": ((exports, module) => { - module.exports = function generate_format(it, $keyword, $ruleType) { - var out = " "; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + "/" + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = "data" + ($dataLvl || ""); - if (it.opts.format === false) { - if ($breakOnError) out += " if (true) { "; - return out; - } - var $isData = it.opts.$data && $schema && $schema.$data, $schemaValue; - if ($isData) { - out += " var schema" + $lvl + " = " + it.util.getData($schema.$data, $dataLvl, it.dataPathArr) + "; "; - $schemaValue = "schema" + $lvl; - } else $schemaValue = $schema; - var $unknownFormats = it.opts.unknownFormats, $allowUnknown = Array.isArray($unknownFormats); - if ($isData) { - var $format = "format" + $lvl, $isObject = "isObject" + $lvl, $formatType = "formatType" + $lvl; - out += " var " + $format + " = formats[" + $schemaValue + "]; var " + $isObject + " = typeof " + $format + " == 'object' && !(" + $format + " instanceof RegExp) && " + $format + ".validate; var " + $formatType + " = " + $isObject + " && " + $format + ".type || 'string'; if (" + $isObject + ") { "; - if (it.async) out += " var async" + $lvl + " = " + $format + ".async; "; - out += " " + $format + " = " + $format + ".validate; } if ( "; - if ($isData) out += " (" + $schemaValue + " !== undefined && typeof " + $schemaValue + " != 'string') || "; - out += " ("; - if ($unknownFormats != "ignore") { - out += " (" + $schemaValue + " && !" + $format + " "; - if ($allowUnknown) out += " && self._opts.unknownFormats.indexOf(" + $schemaValue + ") == -1 "; - out += ") || "; - } - out += " (" + $format + " && " + $formatType + " == '" + $ruleType + "' && !(typeof " + $format + " == 'function' ? "; - if (it.async) out += " (async" + $lvl + " ? await " + $format + "(" + $data + ") : " + $format + "(" + $data + ")) "; - else out += " " + $format + "(" + $data + ") "; - out += " : " + $format + ".test(" + $data + "))))) {"; - } else { - var $format = it.formats[$schema]; - if (!$format) if ($unknownFormats == "ignore") { - it.logger.warn('unknown format "' + $schema + '" ignored in schema at path "' + it.errSchemaPath + '"'); - if ($breakOnError) out += " if (true) { "; - return out; - } else if ($allowUnknown && $unknownFormats.indexOf($schema) >= 0) { - if ($breakOnError) out += " if (true) { "; - return out; - } else throw new Error('unknown format "' + $schema + '" is used in schema at path "' + it.errSchemaPath + '"'); - var $isObject = typeof $format == "object" && !($format instanceof RegExp) && $format.validate; - var $formatType = $isObject && $format.type || "string"; - if ($isObject) { - var $async = $format.async === true; - $format = $format.validate; - } - if ($formatType != $ruleType) { - if ($breakOnError) out += " if (true) { "; - return out; - } - if ($async) { - if (!it.async) throw new Error("async format in sync schema"); - var $formatRef = "formats" + it.util.getProperty($schema) + ".validate"; - out += " if (!(await " + $formatRef + "(" + $data + "))) { "; - } else { - out += " if (! "; - var $formatRef = "formats" + it.util.getProperty($schema); - if ($isObject) $formatRef += ".validate"; - if (typeof $format == "function") out += " " + $formatRef + "(" + $data + ") "; - else out += " " + $formatRef + ".test(" + $data + ") "; - out += ") { "; - } - } - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ""; - if (it.createErrors !== false) { - out += " { keyword: 'format' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { format: "; - if ($isData) out += "" + $schemaValue; - else out += "" + it.util.toQuotedString($schema); - out += " } "; - if (it.opts.messages !== false) { - out += ` , message: 'should match format "`; - if ($isData) out += "' + " + $schemaValue + " + '"; - else out += "" + it.util.escapeQuotes($schema); - out += `"' `; - } - if (it.opts.verbose) { - out += " , schema: "; - if ($isData) out += "validate.schema" + $schemaPath; - else out += "" + it.util.toQuotedString($schema); - out += " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; - } - out += " } "; - } else out += " {} "; - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) - if (it.async) out += " throw new ValidationError([" + __err + "]); "; - else out += " validate.errors = [" + __err + "]; return false; "; - else out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; - out += " } "; - if ($breakOnError) out += " else { "; - return out; - }; -}) }); -var require_if3 = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/dotjs/if.js": ((exports, module) => { - module.exports = function generate_if(it, $keyword, $ruleType) { - var out = " "; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + "/" + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = "data" + ($dataLvl || ""); - var $valid = "valid" + $lvl; - var $errs = "errs__" + $lvl; - var $it = it.util.copy(it); - $it.level++; - var $nextValid = "valid" + $it.level; - var $thenSch = it.schema["then"], $elseSch = it.schema["else"], $thenPresent = $thenSch !== void 0 && (it.opts.strictKeywords ? typeof $thenSch == "object" && Object.keys($thenSch).length > 0 || $thenSch === false : it.util.schemaHasRules($thenSch, it.RULES.all)), $elsePresent = $elseSch !== void 0 && (it.opts.strictKeywords ? typeof $elseSch == "object" && Object.keys($elseSch).length > 0 || $elseSch === false : it.util.schemaHasRules($elseSch, it.RULES.all)), $currentBaseId = $it.baseId; - if ($thenPresent || $elsePresent) { - var $ifClause; - $it.createErrors = false; - $it.schema = $schema; - $it.schemaPath = $schemaPath; - $it.errSchemaPath = $errSchemaPath; - out += " var " + $errs + " = errors; var " + $valid + " = true; "; - var $wasComposite = it.compositeRule; - it.compositeRule = $it.compositeRule = true; - out += " " + it.validate($it) + " "; - $it.baseId = $currentBaseId; - $it.createErrors = true; - out += " errors = " + $errs + "; if (vErrors !== null) { if (" + $errs + ") vErrors.length = " + $errs + "; else vErrors = null; } "; - it.compositeRule = $it.compositeRule = $wasComposite; - if ($thenPresent) { - out += " if (" + $nextValid + ") { "; - $it.schema = it.schema["then"]; - $it.schemaPath = it.schemaPath + ".then"; - $it.errSchemaPath = it.errSchemaPath + "/then"; - out += " " + it.validate($it) + " "; - $it.baseId = $currentBaseId; - out += " " + $valid + " = " + $nextValid + "; "; - if ($thenPresent && $elsePresent) { - $ifClause = "ifClause" + $lvl; - out += " var " + $ifClause + " = 'then'; "; - } else $ifClause = "'then'"; - out += " } "; - if ($elsePresent) out += " else { "; - } else out += " if (!" + $nextValid + ") { "; - if ($elsePresent) { - $it.schema = it.schema["else"]; - $it.schemaPath = it.schemaPath + ".else"; - $it.errSchemaPath = it.errSchemaPath + "/else"; - out += " " + it.validate($it) + " "; - $it.baseId = $currentBaseId; - out += " " + $valid + " = " + $nextValid + "; "; - if ($thenPresent && $elsePresent) { - $ifClause = "ifClause" + $lvl; - out += " var " + $ifClause + " = 'else'; "; - } else $ifClause = "'else'"; - out += " } "; - } - out += " if (!" + $valid + ") { var err = "; - if (it.createErrors !== false) { - out += " { keyword: 'if' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { failingKeyword: " + $ifClause + " } "; - if (it.opts.messages !== false) out += ` , message: 'should match "' + ` + $ifClause + ` + '" schema' `; - if (it.opts.verbose) out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; - out += " } "; - } else out += " {} "; - out += "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; - if (!it.compositeRule && $breakOnError) - if (it.async) out += " throw new ValidationError(vErrors); "; - else out += " validate.errors = vErrors; return false; "; - out += " } "; - if ($breakOnError) out += " else { "; - } else if ($breakOnError) out += " if (true) { "; - return out; - }; -}) }); -var require_items3 = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/dotjs/items.js": ((exports, module) => { - module.exports = function generate_items(it, $keyword, $ruleType) { - var out = " "; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + "/" + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = "data" + ($dataLvl || ""); - var $valid = "valid" + $lvl; - var $errs = "errs__" + $lvl; - var $it = it.util.copy(it); - var $closingBraces = ""; - $it.level++; - var $nextValid = "valid" + $it.level; - var $idx = "i" + $lvl, $dataNxt = $it.dataLevel = it.dataLevel + 1, $nextData = "data" + $dataNxt, $currentBaseId = it.baseId; - out += "var " + $errs + " = errors;var " + $valid + ";"; - if (Array.isArray($schema)) { - var $additionalItems = it.schema.additionalItems; - if ($additionalItems === false) { - out += " " + $valid + " = " + $data + ".length <= " + $schema.length + "; "; - var $currErrSchemaPath = $errSchemaPath; - $errSchemaPath = it.errSchemaPath + "/additionalItems"; - out += " if (!" + $valid + ") { "; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ""; - if (it.createErrors !== false) { - out += " { keyword: 'additionalItems' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { limit: " + $schema.length + " } "; - if (it.opts.messages !== false) out += " , message: 'should NOT have more than " + $schema.length + " items' "; - if (it.opts.verbose) out += " , schema: false , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; - out += " } "; - } else out += " {} "; - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) - if (it.async) out += " throw new ValidationError([" + __err + "]); "; - else out += " validate.errors = [" + __err + "]; return false; "; - else out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; - out += " } "; - $errSchemaPath = $currErrSchemaPath; - if ($breakOnError) { - $closingBraces += "}"; - out += " else { "; - } - } - var arr1 = $schema; - if (arr1) { - var $sch, $i = -1, l1 = arr1.length - 1; - while ($i < l1) { - $sch = arr1[$i += 1]; - if (it.opts.strictKeywords ? typeof $sch == "object" && Object.keys($sch).length > 0 || $sch === false : it.util.schemaHasRules($sch, it.RULES.all)) { - out += " " + $nextValid + " = true; if (" + $data + ".length > " + $i + ") { "; - var $passData = $data + "[" + $i + "]"; - $it.schema = $sch; - $it.schemaPath = $schemaPath + "[" + $i + "]"; - $it.errSchemaPath = $errSchemaPath + "/" + $i; - $it.errorPath = it.util.getPathExpr(it.errorPath, $i, it.opts.jsonPointers, true); - $it.dataPathArr[$dataNxt] = $i; - var $code = it.validate($it); - $it.baseId = $currentBaseId; - if (it.util.varOccurences($code, $nextData) < 2) out += " " + it.util.varReplace($code, $nextData, $passData) + " "; - else out += " var " + $nextData + " = " + $passData + "; " + $code + " "; - out += " } "; - if ($breakOnError) { - out += " if (" + $nextValid + ") { "; - $closingBraces += "}"; - } - } - } - } - if (typeof $additionalItems == "object" && (it.opts.strictKeywords ? typeof $additionalItems == "object" && Object.keys($additionalItems).length > 0 || $additionalItems === false : it.util.schemaHasRules($additionalItems, it.RULES.all))) { - $it.schema = $additionalItems; - $it.schemaPath = it.schemaPath + ".additionalItems"; - $it.errSchemaPath = it.errSchemaPath + "/additionalItems"; - out += " " + $nextValid + " = true; if (" + $data + ".length > " + $schema.length + ") { for (var " + $idx + " = " + $schema.length + "; " + $idx + " < " + $data + ".length; " + $idx + "++) { "; - $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true); - var $passData = $data + "[" + $idx + "]"; - $it.dataPathArr[$dataNxt] = $idx; - var $code = it.validate($it); - $it.baseId = $currentBaseId; - if (it.util.varOccurences($code, $nextData) < 2) out += " " + it.util.varReplace($code, $nextData, $passData) + " "; - else out += " var " + $nextData + " = " + $passData + "; " + $code + " "; - if ($breakOnError) out += " if (!" + $nextValid + ") break; "; - out += " } } "; - if ($breakOnError) { - out += " if (" + $nextValid + ") { "; - $closingBraces += "}"; - } - } - } else if (it.opts.strictKeywords ? typeof $schema == "object" && Object.keys($schema).length > 0 || $schema === false : it.util.schemaHasRules($schema, it.RULES.all)) { - $it.schema = $schema; - $it.schemaPath = $schemaPath; - $it.errSchemaPath = $errSchemaPath; - out += " for (var " + $idx + " = 0; " + $idx + " < " + $data + ".length; " + $idx + "++) { "; - $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true); - var $passData = $data + "[" + $idx + "]"; - $it.dataPathArr[$dataNxt] = $idx; - var $code = it.validate($it); - $it.baseId = $currentBaseId; - if (it.util.varOccurences($code, $nextData) < 2) out += " " + it.util.varReplace($code, $nextData, $passData) + " "; - else out += " var " + $nextData + " = " + $passData + "; " + $code + " "; - if ($breakOnError) out += " if (!" + $nextValid + ") break; "; - out += " }"; - } - if ($breakOnError) out += " " + $closingBraces + " if (" + $errs + " == errors) {"; - return out; - }; -}) }); -var require__limit2 = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/dotjs/_limit.js": ((exports, module) => { - module.exports = function generate__limit(it, $keyword, $ruleType) { - var out = " "; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + "/" + $keyword; - var $breakOnError = !it.opts.allErrors; - var $errorKeyword; - var $data = "data" + ($dataLvl || ""); - var $isData = it.opts.$data && $schema && $schema.$data, $schemaValue; - if ($isData) { - out += " var schema" + $lvl + " = " + it.util.getData($schema.$data, $dataLvl, it.dataPathArr) + "; "; - $schemaValue = "schema" + $lvl; - } else $schemaValue = $schema; - var $isMax = $keyword == "maximum", $exclusiveKeyword = $isMax ? "exclusiveMaximum" : "exclusiveMinimum", $schemaExcl = it.schema[$exclusiveKeyword], $isDataExcl = it.opts.$data && $schemaExcl && $schemaExcl.$data, $op = $isMax ? "<" : ">", $notOp = $isMax ? ">" : "<", $errorKeyword = void 0; - if (!($isData || typeof $schema == "number" || $schema === void 0)) throw new Error($keyword + " must be number"); - if (!($isDataExcl || $schemaExcl === void 0 || typeof $schemaExcl == "number" || typeof $schemaExcl == "boolean")) throw new Error($exclusiveKeyword + " must be number or boolean"); - if ($isDataExcl) { - var $schemaValueExcl = it.util.getData($schemaExcl.$data, $dataLvl, it.dataPathArr), $exclusive = "exclusive" + $lvl, $exclType = "exclType" + $lvl, $exclIsNumber = "exclIsNumber" + $lvl, $opExpr = "op" + $lvl, $opStr = "' + " + $opExpr + " + '"; - out += " var schemaExcl" + $lvl + " = " + $schemaValueExcl + "; "; - $schemaValueExcl = "schemaExcl" + $lvl; - out += " var " + $exclusive + "; var " + $exclType + " = typeof " + $schemaValueExcl + "; if (" + $exclType + " != 'boolean' && " + $exclType + " != 'undefined' && " + $exclType + " != 'number') { "; - var $errorKeyword = $exclusiveKeyword; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ""; - if (it.createErrors !== false) { - out += " { keyword: '" + ($errorKeyword || "_exclusiveLimit") + "' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: {} "; - if (it.opts.messages !== false) out += " , message: '" + $exclusiveKeyword + " should be boolean' "; - if (it.opts.verbose) out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; - out += " } "; - } else out += " {} "; - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) - if (it.async) out += " throw new ValidationError([" + __err + "]); "; - else out += " validate.errors = [" + __err + "]; return false; "; - else out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; - out += " } else if ( "; - if ($isData) out += " (" + $schemaValue + " !== undefined && typeof " + $schemaValue + " != 'number') || "; - out += " " + $exclType + " == 'number' ? ( (" + $exclusive + " = " + $schemaValue + " === undefined || " + $schemaValueExcl + " " + $op + "= " + $schemaValue + ") ? " + $data + " " + $notOp + "= " + $schemaValueExcl + " : " + $data + " " + $notOp + " " + $schemaValue + " ) : ( (" + $exclusive + " = " + $schemaValueExcl + " === true) ? " + $data + " " + $notOp + "= " + $schemaValue + " : " + $data + " " + $notOp + " " + $schemaValue + " ) || " + $data + " !== " + $data + ") { var op" + $lvl + " = " + $exclusive + " ? '" + $op + "' : '" + $op + "='; "; - if ($schema === void 0) { - $errorKeyword = $exclusiveKeyword; - $errSchemaPath = it.errSchemaPath + "/" + $exclusiveKeyword; - $schemaValue = $schemaValueExcl; - $isData = $isDataExcl; - } - } else { - var $exclIsNumber = typeof $schemaExcl == "number", $opStr = $op; - if ($exclIsNumber && $isData) { - var $opExpr = "'" + $opStr + "'"; - out += " if ( "; - if ($isData) out += " (" + $schemaValue + " !== undefined && typeof " + $schemaValue + " != 'number') || "; - out += " ( " + $schemaValue + " === undefined || " + $schemaExcl + " " + $op + "= " + $schemaValue + " ? " + $data + " " + $notOp + "= " + $schemaExcl + " : " + $data + " " + $notOp + " " + $schemaValue + " ) || " + $data + " !== " + $data + ") { "; - } else { - if ($exclIsNumber && $schema === void 0) { - $exclusive = true; - $errorKeyword = $exclusiveKeyword; - $errSchemaPath = it.errSchemaPath + "/" + $exclusiveKeyword; - $schemaValue = $schemaExcl; - $notOp += "="; - } else { - if ($exclIsNumber) $schemaValue = Math[$isMax ? "min" : "max"]($schemaExcl, $schema); - if ($schemaExcl === ($exclIsNumber ? $schemaValue : true)) { - $exclusive = true; - $errorKeyword = $exclusiveKeyword; - $errSchemaPath = it.errSchemaPath + "/" + $exclusiveKeyword; - $notOp += "="; - } else { - $exclusive = false; - $opStr += "="; - } - } - var $opExpr = "'" + $opStr + "'"; - out += " if ( "; - if ($isData) out += " (" + $schemaValue + " !== undefined && typeof " + $schemaValue + " != 'number') || "; - out += " " + $data + " " + $notOp + " " + $schemaValue + " || " + $data + " !== " + $data + ") { "; - } - } - $errorKeyword = $errorKeyword || $keyword; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ""; - if (it.createErrors !== false) { - out += " { keyword: '" + ($errorKeyword || "_limit") + "' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { comparison: " + $opExpr + ", limit: " + $schemaValue + ", exclusive: " + $exclusive + " } "; - if (it.opts.messages !== false) { - out += " , message: 'should be " + $opStr + " "; - if ($isData) out += "' + " + $schemaValue; - else out += "" + $schemaValue + "'"; - } - if (it.opts.verbose) { - out += " , schema: "; - if ($isData) out += "validate.schema" + $schemaPath; - else out += "" + $schema; - out += " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; - } - out += " } "; - } else out += " {} "; - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) - if (it.async) out += " throw new ValidationError([" + __err + "]); "; - else out += " validate.errors = [" + __err + "]; return false; "; - else out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; - out += " } "; - if ($breakOnError) out += " else { "; - return out; - }; -}) }); -var require__limitItems2 = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/dotjs/_limitItems.js": ((exports, module) => { - module.exports = function generate__limitItems(it, $keyword, $ruleType) { - var out = " "; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + "/" + $keyword; - var $breakOnError = !it.opts.allErrors; - var $errorKeyword; - var $data = "data" + ($dataLvl || ""); - var $isData = it.opts.$data && $schema && $schema.$data, $schemaValue; - if ($isData) { - out += " var schema" + $lvl + " = " + it.util.getData($schema.$data, $dataLvl, it.dataPathArr) + "; "; - $schemaValue = "schema" + $lvl; - } else $schemaValue = $schema; - if (!($isData || typeof $schema == "number")) throw new Error($keyword + " must be number"); - var $op = $keyword == "maxItems" ? ">" : "<"; - out += "if ( "; - if ($isData) out += " (" + $schemaValue + " !== undefined && typeof " + $schemaValue + " != 'number') || "; - out += " " + $data + ".length " + $op + " " + $schemaValue + ") { "; - var $errorKeyword = $keyword; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ""; - if (it.createErrors !== false) { - out += " { keyword: '" + ($errorKeyword || "_limitItems") + "' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { limit: " + $schemaValue + " } "; - if (it.opts.messages !== false) { - out += " , message: 'should NOT have "; - if ($keyword == "maxItems") out += "more"; - else out += "fewer"; - out += " than "; - if ($isData) out += "' + " + $schemaValue + " + '"; - else out += "" + $schema; - out += " items' "; - } - if (it.opts.verbose) { - out += " , schema: "; - if ($isData) out += "validate.schema" + $schemaPath; - else out += "" + $schema; - out += " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; - } - out += " } "; - } else out += " {} "; - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) - if (it.async) out += " throw new ValidationError([" + __err + "]); "; - else out += " validate.errors = [" + __err + "]; return false; "; - else out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; - out += "} "; - if ($breakOnError) out += " else { "; - return out; - }; -}) }); -var require__limitLength2 = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/dotjs/_limitLength.js": ((exports, module) => { - module.exports = function generate__limitLength(it, $keyword, $ruleType) { - var out = " "; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + "/" + $keyword; - var $breakOnError = !it.opts.allErrors; - var $errorKeyword; - var $data = "data" + ($dataLvl || ""); - var $isData = it.opts.$data && $schema && $schema.$data, $schemaValue; - if ($isData) { - out += " var schema" + $lvl + " = " + it.util.getData($schema.$data, $dataLvl, it.dataPathArr) + "; "; - $schemaValue = "schema" + $lvl; - } else $schemaValue = $schema; - if (!($isData || typeof $schema == "number")) throw new Error($keyword + " must be number"); - var $op = $keyword == "maxLength" ? ">" : "<"; - out += "if ( "; - if ($isData) out += " (" + $schemaValue + " !== undefined && typeof " + $schemaValue + " != 'number') || "; - if (it.opts.unicode === false) out += " " + $data + ".length "; - else out += " ucs2length(" + $data + ") "; - out += " " + $op + " " + $schemaValue + ") { "; - var $errorKeyword = $keyword; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ""; - if (it.createErrors !== false) { - out += " { keyword: '" + ($errorKeyword || "_limitLength") + "' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { limit: " + $schemaValue + " } "; - if (it.opts.messages !== false) { - out += " , message: 'should NOT be "; - if ($keyword == "maxLength") out += "longer"; - else out += "shorter"; - out += " than "; - if ($isData) out += "' + " + $schemaValue + " + '"; - else out += "" + $schema; - out += " characters' "; - } - if (it.opts.verbose) { - out += " , schema: "; - if ($isData) out += "validate.schema" + $schemaPath; - else out += "" + $schema; - out += " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; - } - out += " } "; - } else out += " {} "; - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) - if (it.async) out += " throw new ValidationError([" + __err + "]); "; - else out += " validate.errors = [" + __err + "]; return false; "; - else out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; - out += "} "; - if ($breakOnError) out += " else { "; - return out; - }; -}) }); -var require__limitProperties2 = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/dotjs/_limitProperties.js": ((exports, module) => { - module.exports = function generate__limitProperties(it, $keyword, $ruleType) { - var out = " "; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + "/" + $keyword; - var $breakOnError = !it.opts.allErrors; - var $errorKeyword; - var $data = "data" + ($dataLvl || ""); - var $isData = it.opts.$data && $schema && $schema.$data, $schemaValue; - if ($isData) { - out += " var schema" + $lvl + " = " + it.util.getData($schema.$data, $dataLvl, it.dataPathArr) + "; "; - $schemaValue = "schema" + $lvl; - } else $schemaValue = $schema; - if (!($isData || typeof $schema == "number")) throw new Error($keyword + " must be number"); - var $op = $keyword == "maxProperties" ? ">" : "<"; - out += "if ( "; - if ($isData) out += " (" + $schemaValue + " !== undefined && typeof " + $schemaValue + " != 'number') || "; - out += " Object.keys(" + $data + ").length " + $op + " " + $schemaValue + ") { "; - var $errorKeyword = $keyword; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ""; - if (it.createErrors !== false) { - out += " { keyword: '" + ($errorKeyword || "_limitProperties") + "' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { limit: " + $schemaValue + " } "; - if (it.opts.messages !== false) { - out += " , message: 'should NOT have "; - if ($keyword == "maxProperties") out += "more"; - else out += "fewer"; - out += " than "; - if ($isData) out += "' + " + $schemaValue + " + '"; - else out += "" + $schema; - out += " properties' "; - } - if (it.opts.verbose) { - out += " , schema: "; - if ($isData) out += "validate.schema" + $schemaPath; - else out += "" + $schema; - out += " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; - } - out += " } "; - } else out += " {} "; - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) - if (it.async) out += " throw new ValidationError([" + __err + "]); "; - else out += " validate.errors = [" + __err + "]; return false; "; - else out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; - out += "} "; - if ($breakOnError) out += " else { "; - return out; - }; -}) }); -var require_multipleOf3 = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/dotjs/multipleOf.js": ((exports, module) => { - module.exports = function generate_multipleOf(it, $keyword, $ruleType) { - var out = " "; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + "/" + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = "data" + ($dataLvl || ""); - var $isData = it.opts.$data && $schema && $schema.$data, $schemaValue; - if ($isData) { - out += " var schema" + $lvl + " = " + it.util.getData($schema.$data, $dataLvl, it.dataPathArr) + "; "; - $schemaValue = "schema" + $lvl; - } else $schemaValue = $schema; - if (!($isData || typeof $schema == "number")) throw new Error($keyword + " must be number"); - out += "var division" + $lvl + ";if ("; - if ($isData) out += " " + $schemaValue + " !== undefined && ( typeof " + $schemaValue + " != 'number' || "; - out += " (division" + $lvl + " = " + $data + " / " + $schemaValue + ", "; - if (it.opts.multipleOfPrecision) out += " Math.abs(Math.round(division" + $lvl + ") - division" + $lvl + ") > 1e-" + it.opts.multipleOfPrecision + " "; - else out += " division" + $lvl + " !== parseInt(division" + $lvl + ") "; - out += " ) "; - if ($isData) out += " ) "; - out += " ) { "; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ""; - if (it.createErrors !== false) { - out += " { keyword: 'multipleOf' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { multipleOf: " + $schemaValue + " } "; - if (it.opts.messages !== false) { - out += " , message: 'should be multiple of "; - if ($isData) out += "' + " + $schemaValue; - else out += "" + $schemaValue + "'"; - } - if (it.opts.verbose) { - out += " , schema: "; - if ($isData) out += "validate.schema" + $schemaPath; - else out += "" + $schema; - out += " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; - } - out += " } "; - } else out += " {} "; - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) - if (it.async) out += " throw new ValidationError([" + __err + "]); "; - else out += " validate.errors = [" + __err + "]; return false; "; - else out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; - out += "} "; - if ($breakOnError) out += " else { "; - return out; - }; -}) }); -var require_not3 = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/dotjs/not.js": ((exports, module) => { - module.exports = function generate_not(it, $keyword, $ruleType) { - var out = " "; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + "/" + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = "data" + ($dataLvl || ""); - var $errs = "errs__" + $lvl; - var $it = it.util.copy(it); - $it.level++; - var $nextValid = "valid" + $it.level; - if (it.opts.strictKeywords ? typeof $schema == "object" && Object.keys($schema).length > 0 || $schema === false : it.util.schemaHasRules($schema, it.RULES.all)) { - $it.schema = $schema; - $it.schemaPath = $schemaPath; - $it.errSchemaPath = $errSchemaPath; - out += " var " + $errs + " = errors; "; - var $wasComposite = it.compositeRule; - it.compositeRule = $it.compositeRule = true; - $it.createErrors = false; - var $allErrorsOption; - if ($it.opts.allErrors) { - $allErrorsOption = $it.opts.allErrors; - $it.opts.allErrors = false; - } - out += " " + it.validate($it) + " "; - $it.createErrors = true; - if ($allErrorsOption) $it.opts.allErrors = $allErrorsOption; - it.compositeRule = $it.compositeRule = $wasComposite; - out += " if (" + $nextValid + ") { "; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ""; - if (it.createErrors !== false) { - out += " { keyword: 'not' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: {} "; - if (it.opts.messages !== false) out += " , message: 'should NOT be valid' "; - if (it.opts.verbose) out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; - out += " } "; - } else out += " {} "; - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) - if (it.async) out += " throw new ValidationError([" + __err + "]); "; - else out += " validate.errors = [" + __err + "]; return false; "; - else out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; - out += " } else { errors = " + $errs + "; if (vErrors !== null) { if (" + $errs + ") vErrors.length = " + $errs + "; else vErrors = null; } "; - if (it.opts.allErrors) out += " } "; - } else { - out += " var err = "; - if (it.createErrors !== false) { - out += " { keyword: 'not' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: {} "; - if (it.opts.messages !== false) out += " , message: 'should NOT be valid' "; - if (it.opts.verbose) out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; - out += " } "; - } else out += " {} "; - out += "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; - if ($breakOnError) out += " if (false) { "; - } - return out; - }; -}) }); -var require_oneOf3 = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/dotjs/oneOf.js": ((exports, module) => { - module.exports = function generate_oneOf(it, $keyword, $ruleType) { - var out = " "; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + "/" + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = "data" + ($dataLvl || ""); - var $valid = "valid" + $lvl; - var $errs = "errs__" + $lvl; - var $it = it.util.copy(it); - var $closingBraces = ""; - $it.level++; - var $nextValid = "valid" + $it.level; - var $currentBaseId = $it.baseId, $prevValid = "prevValid" + $lvl, $passingSchemas = "passingSchemas" + $lvl; - out += "var " + $errs + " = errors , " + $prevValid + " = false , " + $valid + " = false , " + $passingSchemas + " = null; "; - var $wasComposite = it.compositeRule; - it.compositeRule = $it.compositeRule = true; - var arr1 = $schema; - if (arr1) { - var $sch, $i = -1, l1 = arr1.length - 1; - while ($i < l1) { - $sch = arr1[$i += 1]; - if (it.opts.strictKeywords ? typeof $sch == "object" && Object.keys($sch).length > 0 || $sch === false : it.util.schemaHasRules($sch, it.RULES.all)) { - $it.schema = $sch; - $it.schemaPath = $schemaPath + "[" + $i + "]"; - $it.errSchemaPath = $errSchemaPath + "/" + $i; - out += " " + it.validate($it) + " "; - $it.baseId = $currentBaseId; - } else out += " var " + $nextValid + " = true; "; - if ($i) { - out += " if (" + $nextValid + " && " + $prevValid + ") { " + $valid + " = false; " + $passingSchemas + " = [" + $passingSchemas + ", " + $i + "]; } else { "; - $closingBraces += "}"; - } - out += " if (" + $nextValid + ") { " + $valid + " = " + $prevValid + " = true; " + $passingSchemas + " = " + $i + "; }"; - } - } - it.compositeRule = $it.compositeRule = $wasComposite; - out += "" + $closingBraces + "if (!" + $valid + ") { var err = "; - if (it.createErrors !== false) { - out += " { keyword: 'oneOf' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { passingSchemas: " + $passingSchemas + " } "; - if (it.opts.messages !== false) out += " , message: 'should match exactly one schema in oneOf' "; - if (it.opts.verbose) out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; - out += " } "; - } else out += " {} "; - out += "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; - if (!it.compositeRule && $breakOnError) - if (it.async) out += " throw new ValidationError(vErrors); "; - else out += " validate.errors = vErrors; return false; "; - out += "} else { errors = " + $errs + "; if (vErrors !== null) { if (" + $errs + ") vErrors.length = " + $errs + "; else vErrors = null; }"; - if (it.opts.allErrors) out += " } "; - return out; - }; -}) }); -var require_pattern3 = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/dotjs/pattern.js": ((exports, module) => { - module.exports = function generate_pattern(it, $keyword, $ruleType) { - var out = " "; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + "/" + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = "data" + ($dataLvl || ""); - var $isData = it.opts.$data && $schema && $schema.$data, $schemaValue; - if ($isData) { - out += " var schema" + $lvl + " = " + it.util.getData($schema.$data, $dataLvl, it.dataPathArr) + "; "; - $schemaValue = "schema" + $lvl; - } else $schemaValue = $schema; - var $regexp = $isData ? "(new RegExp(" + $schemaValue + "))" : it.usePattern($schema); - out += "if ( "; - if ($isData) out += " (" + $schemaValue + " !== undefined && typeof " + $schemaValue + " != 'string') || "; - out += " !" + $regexp + ".test(" + $data + ") ) { "; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ""; - if (it.createErrors !== false) { - out += " { keyword: 'pattern' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { pattern: "; - if ($isData) out += "" + $schemaValue; - else out += "" + it.util.toQuotedString($schema); - out += " } "; - if (it.opts.messages !== false) { - out += ` , message: 'should match pattern "`; - if ($isData) out += "' + " + $schemaValue + " + '"; - else out += "" + it.util.escapeQuotes($schema); - out += `"' `; - } - if (it.opts.verbose) { - out += " , schema: "; - if ($isData) out += "validate.schema" + $schemaPath; - else out += "" + it.util.toQuotedString($schema); - out += " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; - } - out += " } "; - } else out += " {} "; - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) - if (it.async) out += " throw new ValidationError([" + __err + "]); "; - else out += " validate.errors = [" + __err + "]; return false; "; - else out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; - out += "} "; - if ($breakOnError) out += " else { "; - return out; - }; -}) }); -var require_properties3 = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/dotjs/properties.js": ((exports, module) => { - module.exports = function generate_properties(it, $keyword, $ruleType) { - var out = " "; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + "/" + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = "data" + ($dataLvl || ""); - var $errs = "errs__" + $lvl; - var $it = it.util.copy(it); - var $closingBraces = ""; - $it.level++; - var $nextValid = "valid" + $it.level; - var $key = "key" + $lvl, $idx = "idx" + $lvl, $dataNxt = $it.dataLevel = it.dataLevel + 1, $nextData = "data" + $dataNxt, $dataProperties = "dataProperties" + $lvl; - var $schemaKeys = Object.keys($schema || {}).filter(notProto), $pProperties = it.schema.patternProperties || {}, $pPropertyKeys = Object.keys($pProperties).filter(notProto), $aProperties = it.schema.additionalProperties, $someProperties = $schemaKeys.length || $pPropertyKeys.length, $noAdditional = $aProperties === false, $additionalIsSchema = typeof $aProperties == "object" && Object.keys($aProperties).length, $removeAdditional = it.opts.removeAdditional, $checkAdditional = $noAdditional || $additionalIsSchema || $removeAdditional, $ownProperties = it.opts.ownProperties, $currentBaseId = it.baseId; - var $required = it.schema.required; - if ($required && !(it.opts.$data && $required.$data) && $required.length < it.opts.loopRequired) var $requiredHash = it.util.toHash($required); - function notProto(p) { - return p !== "__proto__"; - } - out += "var " + $errs + " = errors;var " + $nextValid + " = true;"; - if ($ownProperties) out += " var " + $dataProperties + " = undefined;"; - if ($checkAdditional) { - if ($ownProperties) out += " " + $dataProperties + " = " + $dataProperties + " || Object.keys(" + $data + "); for (var " + $idx + "=0; " + $idx + "<" + $dataProperties + ".length; " + $idx + "++) { var " + $key + " = " + $dataProperties + "[" + $idx + "]; "; - else out += " for (var " + $key + " in " + $data + ") { "; - if ($someProperties) { - out += " var isAdditional" + $lvl + " = !(false "; - if ($schemaKeys.length) if ($schemaKeys.length > 8) out += " || validate.schema" + $schemaPath + ".hasOwnProperty(" + $key + ") "; - else { - var arr1 = $schemaKeys; - if (arr1) { - var $propertyKey, i1 = -1, l1 = arr1.length - 1; - while (i1 < l1) { - $propertyKey = arr1[i1 += 1]; - out += " || " + $key + " == " + it.util.toQuotedString($propertyKey) + " "; - } - } - } - if ($pPropertyKeys.length) { - var arr2 = $pPropertyKeys; - if (arr2) { - var $pProperty, $i = -1, l2 = arr2.length - 1; - while ($i < l2) { - $pProperty = arr2[$i += 1]; - out += " || " + it.usePattern($pProperty) + ".test(" + $key + ") "; - } - } - } - out += " ); if (isAdditional" + $lvl + ") { "; - } - if ($removeAdditional == "all") out += " delete " + $data + "[" + $key + "]; "; - else { - var $currentErrorPath = it.errorPath; - var $additionalProperty = "' + " + $key + " + '"; - if (it.opts._errorDataPathProperty) it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); - if ($noAdditional) if ($removeAdditional) out += " delete " + $data + "[" + $key + "]; "; - else { - out += " " + $nextValid + " = false; "; - var $currErrSchemaPath = $errSchemaPath; - $errSchemaPath = it.errSchemaPath + "/additionalProperties"; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ""; - if (it.createErrors !== false) { - out += " { keyword: 'additionalProperties' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { additionalProperty: '" + $additionalProperty + "' } "; - if (it.opts.messages !== false) { - out += " , message: '"; - if (it.opts._errorDataPathProperty) out += "is an invalid additional property"; - else out += "should NOT have additional properties"; - out += "' "; - } - if (it.opts.verbose) out += " , schema: false , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; - out += " } "; - } else out += " {} "; - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) - if (it.async) out += " throw new ValidationError([" + __err + "]); "; - else out += " validate.errors = [" + __err + "]; return false; "; - else out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; - $errSchemaPath = $currErrSchemaPath; - if ($breakOnError) out += " break; "; - } - else if ($additionalIsSchema) if ($removeAdditional == "failing") { - out += " var " + $errs + " = errors; "; - var $wasComposite = it.compositeRule; - it.compositeRule = $it.compositeRule = true; - $it.schema = $aProperties; - $it.schemaPath = it.schemaPath + ".additionalProperties"; - $it.errSchemaPath = it.errSchemaPath + "/additionalProperties"; - $it.errorPath = it.opts._errorDataPathProperty ? it.errorPath : it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); - var $passData = $data + "[" + $key + "]"; - $it.dataPathArr[$dataNxt] = $key; - var $code = it.validate($it); - $it.baseId = $currentBaseId; - if (it.util.varOccurences($code, $nextData) < 2) out += " " + it.util.varReplace($code, $nextData, $passData) + " "; - else out += " var " + $nextData + " = " + $passData + "; " + $code + " "; - out += " if (!" + $nextValid + ") { errors = " + $errs + "; if (validate.errors !== null) { if (errors) validate.errors.length = errors; else validate.errors = null; } delete " + $data + "[" + $key + "]; } "; - it.compositeRule = $it.compositeRule = $wasComposite; - } else { - $it.schema = $aProperties; - $it.schemaPath = it.schemaPath + ".additionalProperties"; - $it.errSchemaPath = it.errSchemaPath + "/additionalProperties"; - $it.errorPath = it.opts._errorDataPathProperty ? it.errorPath : it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); - var $passData = $data + "[" + $key + "]"; - $it.dataPathArr[$dataNxt] = $key; - var $code = it.validate($it); - $it.baseId = $currentBaseId; - if (it.util.varOccurences($code, $nextData) < 2) out += " " + it.util.varReplace($code, $nextData, $passData) + " "; - else out += " var " + $nextData + " = " + $passData + "; " + $code + " "; - if ($breakOnError) out += " if (!" + $nextValid + ") break; "; - } - it.errorPath = $currentErrorPath; - } - if ($someProperties) out += " } "; - out += " } "; - if ($breakOnError) { - out += " if (" + $nextValid + ") { "; - $closingBraces += "}"; - } - } - var $useDefaults = it.opts.useDefaults && !it.compositeRule; - if ($schemaKeys.length) { - var arr3 = $schemaKeys; - if (arr3) { - var $propertyKey, i3 = -1, l3 = arr3.length - 1; - while (i3 < l3) { - $propertyKey = arr3[i3 += 1]; - var $sch = $schema[$propertyKey]; - if (it.opts.strictKeywords ? typeof $sch == "object" && Object.keys($sch).length > 0 || $sch === false : it.util.schemaHasRules($sch, it.RULES.all)) { - var $prop = it.util.getProperty($propertyKey), $passData = $data + $prop, $hasDefault = $useDefaults && $sch.default !== void 0; - $it.schema = $sch; - $it.schemaPath = $schemaPath + $prop; - $it.errSchemaPath = $errSchemaPath + "/" + it.util.escapeFragment($propertyKey); - $it.errorPath = it.util.getPath(it.errorPath, $propertyKey, it.opts.jsonPointers); - $it.dataPathArr[$dataNxt] = it.util.toQuotedString($propertyKey); - var $code = it.validate($it); - $it.baseId = $currentBaseId; - if (it.util.varOccurences($code, $nextData) < 2) { - $code = it.util.varReplace($code, $nextData, $passData); - var $useData = $passData; - } else { - var $useData = $nextData; - out += " var " + $nextData + " = " + $passData + "; "; - } - if ($hasDefault) out += " " + $code + " "; - else { - if ($requiredHash && $requiredHash[$propertyKey]) { - out += " if ( " + $useData + " === undefined "; - if ($ownProperties) out += " || ! Object.prototype.hasOwnProperty.call(" + $data + ", '" + it.util.escapeQuotes($propertyKey) + "') "; - out += ") { " + $nextValid + " = false; "; - var $currentErrorPath = it.errorPath, $currErrSchemaPath = $errSchemaPath, $missingProperty = it.util.escapeQuotes($propertyKey); - if (it.opts._errorDataPathProperty) it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers); - $errSchemaPath = it.errSchemaPath + "/required"; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ""; - if (it.createErrors !== false) { - out += " { keyword: 'required' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { missingProperty: '" + $missingProperty + "' } "; - if (it.opts.messages !== false) { - out += " , message: '"; - if (it.opts._errorDataPathProperty) out += "is a required property"; - else out += "should have required property \\'" + $missingProperty + "\\'"; - out += "' "; - } - if (it.opts.verbose) out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; - out += " } "; - } else out += " {} "; - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) - if (it.async) out += " throw new ValidationError([" + __err + "]); "; - else out += " validate.errors = [" + __err + "]; return false; "; - else out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; - $errSchemaPath = $currErrSchemaPath; - it.errorPath = $currentErrorPath; - out += " } else { "; - } else if ($breakOnError) { - out += " if ( " + $useData + " === undefined "; - if ($ownProperties) out += " || ! Object.prototype.hasOwnProperty.call(" + $data + ", '" + it.util.escapeQuotes($propertyKey) + "') "; - out += ") { " + $nextValid + " = true; } else { "; - } else { - out += " if (" + $useData + " !== undefined "; - if ($ownProperties) out += " && Object.prototype.hasOwnProperty.call(" + $data + ", '" + it.util.escapeQuotes($propertyKey) + "') "; - out += " ) { "; - } - out += " " + $code + " } "; - } - } - if ($breakOnError) { - out += " if (" + $nextValid + ") { "; - $closingBraces += "}"; - } - } - } - } - if ($pPropertyKeys.length) { - var arr4 = $pPropertyKeys; - if (arr4) { - var $pProperty, i4 = -1, l4 = arr4.length - 1; - while (i4 < l4) { - $pProperty = arr4[i4 += 1]; - var $sch = $pProperties[$pProperty]; - if (it.opts.strictKeywords ? typeof $sch == "object" && Object.keys($sch).length > 0 || $sch === false : it.util.schemaHasRules($sch, it.RULES.all)) { - $it.schema = $sch; - $it.schemaPath = it.schemaPath + ".patternProperties" + it.util.getProperty($pProperty); - $it.errSchemaPath = it.errSchemaPath + "/patternProperties/" + it.util.escapeFragment($pProperty); - if ($ownProperties) out += " " + $dataProperties + " = " + $dataProperties + " || Object.keys(" + $data + "); for (var " + $idx + "=0; " + $idx + "<" + $dataProperties + ".length; " + $idx + "++) { var " + $key + " = " + $dataProperties + "[" + $idx + "]; "; - else out += " for (var " + $key + " in " + $data + ") { "; - out += " if (" + it.usePattern($pProperty) + ".test(" + $key + ")) { "; - $it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); - var $passData = $data + "[" + $key + "]"; - $it.dataPathArr[$dataNxt] = $key; - var $code = it.validate($it); - $it.baseId = $currentBaseId; - if (it.util.varOccurences($code, $nextData) < 2) out += " " + it.util.varReplace($code, $nextData, $passData) + " "; - else out += " var " + $nextData + " = " + $passData + "; " + $code + " "; - if ($breakOnError) out += " if (!" + $nextValid + ") break; "; - out += " } "; - if ($breakOnError) out += " else " + $nextValid + " = true; "; - out += " } "; - if ($breakOnError) { - out += " if (" + $nextValid + ") { "; - $closingBraces += "}"; - } - } - } - } - } - if ($breakOnError) out += " " + $closingBraces + " if (" + $errs + " == errors) {"; - return out; - }; -}) }); -var require_propertyNames3 = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/dotjs/propertyNames.js": ((exports, module) => { - module.exports = function generate_propertyNames(it, $keyword, $ruleType) { - var out = " "; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + "/" + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = "data" + ($dataLvl || ""); - var $errs = "errs__" + $lvl; - var $it = it.util.copy(it); - var $closingBraces = ""; - $it.level++; - var $nextValid = "valid" + $it.level; - out += "var " + $errs + " = errors;"; - if (it.opts.strictKeywords ? typeof $schema == "object" && Object.keys($schema).length > 0 || $schema === false : it.util.schemaHasRules($schema, it.RULES.all)) { - $it.schema = $schema; - $it.schemaPath = $schemaPath; - $it.errSchemaPath = $errSchemaPath; - var $key = "key" + $lvl, $idx = "idx" + $lvl, $i = "i" + $lvl, $invalidName = "' + " + $key + " + '", $dataNxt = $it.dataLevel = it.dataLevel + 1, $nextData = "data" + $dataNxt, $dataProperties = "dataProperties" + $lvl, $ownProperties = it.opts.ownProperties, $currentBaseId = it.baseId; - if ($ownProperties) out += " var " + $dataProperties + " = undefined; "; - if ($ownProperties) out += " " + $dataProperties + " = " + $dataProperties + " || Object.keys(" + $data + "); for (var " + $idx + "=0; " + $idx + "<" + $dataProperties + ".length; " + $idx + "++) { var " + $key + " = " + $dataProperties + "[" + $idx + "]; "; - else out += " for (var " + $key + " in " + $data + ") { "; - out += " var startErrs" + $lvl + " = errors; "; - var $passData = $key; - var $wasComposite = it.compositeRule; - it.compositeRule = $it.compositeRule = true; - var $code = it.validate($it); - $it.baseId = $currentBaseId; - if (it.util.varOccurences($code, $nextData) < 2) out += " " + it.util.varReplace($code, $nextData, $passData) + " "; - else out += " var " + $nextData + " = " + $passData + "; " + $code + " "; - it.compositeRule = $it.compositeRule = $wasComposite; - out += " if (!" + $nextValid + ") { for (var " + $i + "=startErrs" + $lvl + "; " + $i + " { - module.exports = function generate_required(it, $keyword, $ruleType) { - var out = " "; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + "/" + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = "data" + ($dataLvl || ""); - var $valid = "valid" + $lvl, $isData = it.opts.$data && $schema && $schema.$data; - if ($isData) { - out += " var schema" + $lvl + " = " + it.util.getData($schema.$data, $dataLvl, it.dataPathArr) + "; "; - "" + $lvl; - } - var $vSchema = "schema" + $lvl; - if (!$isData) if ($schema.length < it.opts.loopRequired && it.schema.properties && Object.keys(it.schema.properties).length) { - var $required = []; - var arr1 = $schema; - if (arr1) { - var $property, i1 = -1, l1 = arr1.length - 1; - while (i1 < l1) { - $property = arr1[i1 += 1]; - var $propertySch = it.schema.properties[$property]; - if (!($propertySch && (it.opts.strictKeywords ? typeof $propertySch == "object" && Object.keys($propertySch).length > 0 || $propertySch === false : it.util.schemaHasRules($propertySch, it.RULES.all)))) $required[$required.length] = $property; - } - } - } else var $required = $schema; - if ($isData || $required.length) { - var $currentErrorPath = it.errorPath, $loopRequired = $isData || $required.length >= it.opts.loopRequired, $ownProperties = it.opts.ownProperties; - if ($breakOnError) { - out += " var missing" + $lvl + "; "; - if ($loopRequired) { - if (!$isData) out += " var " + $vSchema + " = validate.schema" + $schemaPath + "; "; - var $i = "i" + $lvl, $propertyPath = "schema" + $lvl + "[" + $i + "]", $missingProperty = "' + " + $propertyPath + " + '"; - if (it.opts._errorDataPathProperty) it.errorPath = it.util.getPathExpr($currentErrorPath, $propertyPath, it.opts.jsonPointers); - out += " var " + $valid + " = true; "; - if ($isData) out += " if (schema" + $lvl + " === undefined) " + $valid + " = true; else if (!Array.isArray(schema" + $lvl + ")) " + $valid + " = false; else {"; - out += " for (var " + $i + " = 0; " + $i + " < " + $vSchema + ".length; " + $i + "++) { " + $valid + " = " + $data + "[" + $vSchema + "[" + $i + "]] !== undefined "; - if ($ownProperties) out += " && Object.prototype.hasOwnProperty.call(" + $data + ", " + $vSchema + "[" + $i + "]) "; - out += "; if (!" + $valid + ") break; } "; - if ($isData) out += " } "; - out += " if (!" + $valid + ") { "; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ""; - if (it.createErrors !== false) { - out += " { keyword: 'required' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { missingProperty: '" + $missingProperty + "' } "; - if (it.opts.messages !== false) { - out += " , message: '"; - if (it.opts._errorDataPathProperty) out += "is a required property"; - else out += "should have required property \\'" + $missingProperty + "\\'"; - out += "' "; - } - if (it.opts.verbose) out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; - out += " } "; - } else out += " {} "; - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) - if (it.async) out += " throw new ValidationError([" + __err + "]); "; - else out += " validate.errors = [" + __err + "]; return false; "; - else out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; - out += " } else { "; - } else { - out += " if ( "; - var arr2 = $required; - if (arr2) { - var $propertyKey, $i = -1, l2 = arr2.length - 1; - while ($i < l2) { - $propertyKey = arr2[$i += 1]; - if ($i) out += " || "; - var $prop = it.util.getProperty($propertyKey), $useData = $data + $prop; - out += " ( ( " + $useData + " === undefined "; - if ($ownProperties) out += " || ! Object.prototype.hasOwnProperty.call(" + $data + ", '" + it.util.escapeQuotes($propertyKey) + "') "; - out += ") && (missing" + $lvl + " = " + it.util.toQuotedString(it.opts.jsonPointers ? $propertyKey : $prop) + ") ) "; - } - } - out += ") { "; - var $propertyPath = "missing" + $lvl, $missingProperty = "' + " + $propertyPath + " + '"; - if (it.opts._errorDataPathProperty) it.errorPath = it.opts.jsonPointers ? it.util.getPathExpr($currentErrorPath, $propertyPath, true) : $currentErrorPath + " + " + $propertyPath; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ""; - if (it.createErrors !== false) { - out += " { keyword: 'required' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { missingProperty: '" + $missingProperty + "' } "; - if (it.opts.messages !== false) { - out += " , message: '"; - if (it.opts._errorDataPathProperty) out += "is a required property"; - else out += "should have required property \\'" + $missingProperty + "\\'"; - out += "' "; - } - if (it.opts.verbose) out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; - out += " } "; - } else out += " {} "; - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) - if (it.async) out += " throw new ValidationError([" + __err + "]); "; - else out += " validate.errors = [" + __err + "]; return false; "; - else out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; - out += " } else { "; - } - } else if ($loopRequired) { - if (!$isData) out += " var " + $vSchema + " = validate.schema" + $schemaPath + "; "; - var $i = "i" + $lvl, $propertyPath = "schema" + $lvl + "[" + $i + "]", $missingProperty = "' + " + $propertyPath + " + '"; - if (it.opts._errorDataPathProperty) it.errorPath = it.util.getPathExpr($currentErrorPath, $propertyPath, it.opts.jsonPointers); - if ($isData) { - out += " if (" + $vSchema + " && !Array.isArray(" + $vSchema + ")) { var err = "; - if (it.createErrors !== false) { - out += " { keyword: 'required' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { missingProperty: '" + $missingProperty + "' } "; - if (it.opts.messages !== false) { - out += " , message: '"; - if (it.opts._errorDataPathProperty) out += "is a required property"; - else out += "should have required property \\'" + $missingProperty + "\\'"; - out += "' "; - } - if (it.opts.verbose) out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; - out += " } "; - } else out += " {} "; - out += "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else if (" + $vSchema + " !== undefined) { "; - } - out += " for (var " + $i + " = 0; " + $i + " < " + $vSchema + ".length; " + $i + "++) { if (" + $data + "[" + $vSchema + "[" + $i + "]] === undefined "; - if ($ownProperties) out += " || ! Object.prototype.hasOwnProperty.call(" + $data + ", " + $vSchema + "[" + $i + "]) "; - out += ") { var err = "; - if (it.createErrors !== false) { - out += " { keyword: 'required' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { missingProperty: '" + $missingProperty + "' } "; - if (it.opts.messages !== false) { - out += " , message: '"; - if (it.opts._errorDataPathProperty) out += "is a required property"; - else out += "should have required property \\'" + $missingProperty + "\\'"; - out += "' "; - } - if (it.opts.verbose) out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; - out += " } "; - } else out += " {} "; - out += "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } } "; - if ($isData) out += " } "; - } else { - var arr3 = $required; - if (arr3) { - var $propertyKey, i3 = -1, l3 = arr3.length - 1; - while (i3 < l3) { - $propertyKey = arr3[i3 += 1]; - var $prop = it.util.getProperty($propertyKey), $missingProperty = it.util.escapeQuotes($propertyKey), $useData = $data + $prop; - if (it.opts._errorDataPathProperty) it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers); - out += " if ( " + $useData + " === undefined "; - if ($ownProperties) out += " || ! Object.prototype.hasOwnProperty.call(" + $data + ", '" + it.util.escapeQuotes($propertyKey) + "') "; - out += ") { var err = "; - if (it.createErrors !== false) { - out += " { keyword: 'required' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { missingProperty: '" + $missingProperty + "' } "; - if (it.opts.messages !== false) { - out += " , message: '"; - if (it.opts._errorDataPathProperty) out += "is a required property"; - else out += "should have required property \\'" + $missingProperty + "\\'"; - out += "' "; - } - if (it.opts.verbose) out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; - out += " } "; - } else out += " {} "; - out += "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "; - } - } - } - it.errorPath = $currentErrorPath; - } else if ($breakOnError) out += " if (true) {"; - return out; - }; -}) }); -var require_uniqueItems3 = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/dotjs/uniqueItems.js": ((exports, module) => { - module.exports = function generate_uniqueItems(it, $keyword, $ruleType) { - var out = " "; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + "/" + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = "data" + ($dataLvl || ""); - var $valid = "valid" + $lvl; - var $isData = it.opts.$data && $schema && $schema.$data, $schemaValue; - if ($isData) { - out += " var schema" + $lvl + " = " + it.util.getData($schema.$data, $dataLvl, it.dataPathArr) + "; "; - $schemaValue = "schema" + $lvl; - } else $schemaValue = $schema; - if (($schema || $isData) && it.opts.uniqueItems !== false) { - if ($isData) out += " var " + $valid + "; if (" + $schemaValue + " === false || " + $schemaValue + " === undefined) " + $valid + " = true; else if (typeof " + $schemaValue + " != 'boolean') " + $valid + " = false; else { "; - out += " var i = " + $data + ".length , " + $valid + " = true , j; if (i > 1) { "; - var $itemType = it.schema.items && it.schema.items.type, $typeIsArray = Array.isArray($itemType); - if (!$itemType || $itemType == "object" || $itemType == "array" || $typeIsArray && ($itemType.indexOf("object") >= 0 || $itemType.indexOf("array") >= 0)) out += " outer: for (;i--;) { for (j = i; j--;) { if (equal(" + $data + "[i], " + $data + "[j])) { " + $valid + " = false; break outer; } } } "; - else { - out += " var itemIndices = {}, item; for (;i--;) { var item = " + $data + "[i]; "; - var $method = "checkDataType" + ($typeIsArray ? "s" : ""); - out += " if (" + it.util[$method]($itemType, "item", it.opts.strictNumbers, true) + ") continue; "; - if ($typeIsArray) out += ` if (typeof item == 'string') item = '"' + item; `; - out += " if (typeof itemIndices[item] == 'number') { " + $valid + " = false; j = itemIndices[item]; break; } itemIndices[item] = i; } "; - } - out += " } "; - if ($isData) out += " } "; - out += " if (!" + $valid + ") { "; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ""; - if (it.createErrors !== false) { - out += " { keyword: 'uniqueItems' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { i: i, j: j } "; - if (it.opts.messages !== false) out += " , message: 'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)' "; - if (it.opts.verbose) { - out += " , schema: "; - if ($isData) out += "validate.schema" + $schemaPath; - else out += "" + $schema; - out += " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; - } - out += " } "; - } else out += " {} "; - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) - if (it.async) out += " throw new ValidationError([" + __err + "]); "; - else out += " validate.errors = [" + __err + "]; return false; "; - else out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; - out += " } "; - if ($breakOnError) out += " else { "; - } else if ($breakOnError) out += " if (true) { "; - return out; - }; -}) }); -var require_dotjs3 = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/dotjs/index.js": ((exports, module) => { +})); +var require_data3 = /* @__PURE__ */ __commonJSMin(((exports, module) => { module.exports = { - "$ref": require_ref3(), - allOf: require_allOf3(), - anyOf: require_anyOf3(), - "$comment": require_comment3(), - const: require_const3(), - contains: require_contains3(), - dependencies: require_dependencies3(), - "enum": require_enum3(), - format: require_format3(), - "if": require_if3(), - items: require_items3(), - maximum: require__limit2(), - minimum: require__limit2(), - maxItems: require__limitItems2(), - minItems: require__limitItems2(), - maxLength: require__limitLength2(), - minLength: require__limitLength2(), - maxProperties: require__limitProperties2(), - minProperties: require__limitProperties2(), - multipleOf: require_multipleOf3(), - not: require_not3(), - oneOf: require_oneOf3(), - pattern: require_pattern3(), - properties: require_properties3(), - propertyNames: require_propertyNames3(), - required: require_required3(), - uniqueItems: require_uniqueItems3(), - validate: require_validate3() + "$id": "https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#", + "description": "Meta-schema for $data reference (JSON AnySchema extension proposal)", + "type": "object", + "required": ["$data"], + "properties": { "$data": { + "type": "string", + "anyOf": [{ "format": "relative-json-pointer" }, { "format": "json-pointer" }] + } }, + "additionalProperties": false }; -}) }); -var require_rules3 = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/compile/rules.js": ((exports, module) => { - var ruleModules = require_dotjs3(), toHash = require_util10().toHash; - module.exports = function rules$1() { - var RULES = [ - { - type: "number", - rules: [ - { "maximum": ["exclusiveMaximum"] }, - { "minimum": ["exclusiveMinimum"] }, - "multipleOf", - "format" - ] - }, - { - type: "string", - rules: [ - "maxLength", - "minLength", - "pattern", - "format" - ] - }, - { - type: "array", - rules: [ - "maxItems", - "minItems", - "items", - "contains", - "uniqueItems" - ] - }, - { - type: "object", - rules: [ - "maxProperties", - "minProperties", - "required", - "dependencies", - "propertyNames", - { "properties": ["additionalProperties", "patternProperties"] } - ] - }, - { rules: [ - "$ref", - "const", - "enum", - "not", - "anyOf", - "oneOf", - "allOf", - "if" - ] } - ]; - var ALL = ["type", "$comment"]; - var KEYWORDS$1 = [ - "$schema", - "$id", - "id", - "$data", - "$async", - "title", - "description", - "default", - "definitions", - "examples", - "readOnly", - "writeOnly", - "contentMediaType", - "contentEncoding", - "additionalItems", - "then", - "else" - ]; - var TYPES = [ - "number", - "integer", - "string", - "array", - "object", - "boolean", - "null" - ]; - RULES.all = toHash(ALL); - RULES.types = toHash(TYPES); - RULES.forEach(function(group2) { - group2.rules = group2.rules.map(function(keyword) { - var implKeywords; - if (typeof keyword == "object") { - var key$1 = Object.keys(keyword)[0]; - implKeywords = keyword[key$1]; - keyword = key$1; - implKeywords.forEach(function(k) { - ALL.push(k); - RULES.all[k] = true; - }); +})); +var require_utils6 = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const isUUID$1 = RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu); + const isIPv4$1 = RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u); + function stringArrayToHexStripped(input) { + let acc = ""; + let code = 0; + let i$3 = 0; + for (i$3 = 0; i$3 < input.length; i$3++) { + code = input[i$3].charCodeAt(0); + if (code === 48) continue; + if (!(code >= 48 && code <= 57 || code >= 65 && code <= 70 || code >= 97 && code <= 102)) return ""; + acc += input[i$3]; + break; + } + for (i$3 += 1; i$3 < input.length; i$3++) { + code = input[i$3].charCodeAt(0); + if (!(code >= 48 && code <= 57 || code >= 65 && code <= 70 || code >= 97 && code <= 102)) return ""; + acc += input[i$3]; + } + return acc; + } + const nonSimpleDomain$1 = RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u); + function consumeIsZone(buffer$1) { + buffer$1.length = 0; + return true; + } + function consumeHextets(buffer$1, address, output) { + if (buffer$1.length) { + const hex4 = stringArrayToHexStripped(buffer$1); + if (hex4 !== "") address.push(hex4); + else { + output.error = true; + return false; + } + buffer$1.length = 0; + } + return true; + } + function getIPV6(input) { + let tokenCount = 0; + const output = { + error: false, + address: "", + zone: "" + }; + const address = []; + const buffer$1 = []; + let endipv6Encountered = false; + let endIpv6 = false; + let consume = consumeHextets; + for (let i$3 = 0; i$3 < input.length; i$3++) { + const cursor2 = input[i$3]; + if (cursor2 === "[" || cursor2 === "]") continue; + if (cursor2 === ":") { + if (endipv6Encountered === true) endIpv6 = true; + if (!consume(buffer$1, address, output)) break; + if (++tokenCount > 7) { + output.error = true; + break; } - ALL.push(keyword); - return RULES.all[keyword] = { - keyword, - code: ruleModules[keyword], - implements: implKeywords - }; - }); - RULES.all.$comment = { - keyword: "$comment", - code: ruleModules.$comment + if (i$3 > 0 && input[i$3 - 1] === ":") endipv6Encountered = true; + address.push(":"); + continue; + } else if (cursor2 === "%") { + if (!consume(buffer$1, address, output)) break; + consume = consumeIsZone; + } else { + buffer$1.push(cursor2); + continue; + } + } + if (buffer$1.length) if (consume === consumeIsZone) output.zone = buffer$1.join(""); + else if (endIpv6) address.push(buffer$1.join("")); + else address.push(stringArrayToHexStripped(buffer$1)); + output.address = address.join(""); + return output; + } + function normalizeIPv6$1(host) { + if (findToken(host, ":") < 2) return { + host, + isIPV6: false + }; + const ipv6$1 = getIPV6(host); + if (!ipv6$1.error) { + let newHost = ipv6$1.address; + let escapedHost = ipv6$1.address; + if (ipv6$1.zone) { + newHost += "%" + ipv6$1.zone; + escapedHost += "%25" + ipv6$1.zone; + } + return { + host: newHost, + isIPV6: true, + escapedHost }; - if (group2.type) RULES.types[group2.type] = group2; - }); - RULES.keywords = toHash(ALL.concat(KEYWORDS$1)); - RULES.custom = {}; - return RULES; + } else return { + host, + isIPV6: false + }; + } + function findToken(str$1, token) { + let ind = 0; + for (let i$3 = 0; i$3 < str$1.length; i$3++) if (str$1[i$3] === token) ind++; + return ind; + } + function removeDotSegments$1(path4) { + let input = path4; + const output = []; + let nextSlash = -1; + let len = 0; + while (len = input.length) { + if (len === 1) if (input === ".") break; + else if (input === "/") { + output.push("/"); + break; + } else { + output.push(input); + break; + } + else if (len === 2) { + if (input[0] === ".") { + if (input[1] === ".") break; + else if (input[1] === "/") { + input = input.slice(2); + continue; + } + } else if (input[0] === "/") { + if (input[1] === "." || input[1] === "/") { + output.push("/"); + break; + } + } + } else if (len === 3) { + if (input === "/..") { + if (output.length !== 0) output.pop(); + output.push("/"); + break; + } + } + if (input[0] === ".") { + if (input[1] === ".") { + if (input[2] === "/") { + input = input.slice(3); + continue; + } + } else if (input[1] === "/") { + input = input.slice(2); + continue; + } + } else if (input[0] === "/") { + if (input[1] === ".") { + if (input[2] === "/") { + input = input.slice(2); + continue; + } else if (input[2] === ".") { + if (input[3] === "/") { + input = input.slice(3); + if (output.length !== 0) output.pop(); + continue; + } + } + } + } + if ((nextSlash = input.indexOf("/", 1)) === -1) { + output.push(input); + break; + } else { + output.push(input.slice(0, nextSlash)); + input = input.slice(nextSlash); + } + } + return output.join(""); + } + function normalizeComponentEncoding$1(component, esc$1) { + const func = esc$1 !== true ? escape : unescape; + if (component.scheme !== void 0) component.scheme = func(component.scheme); + if (component.userinfo !== void 0) component.userinfo = func(component.userinfo); + if (component.host !== void 0) component.host = func(component.host); + if (component.path !== void 0) component.path = func(component.path); + if (component.query !== void 0) component.query = func(component.query); + if (component.fragment !== void 0) component.fragment = func(component.fragment); + return component; + } + function recomposeAuthority$1(component) { + const uriTokens = []; + if (component.userinfo !== void 0) { + uriTokens.push(component.userinfo); + uriTokens.push("@"); + } + if (component.host !== void 0) { + let host = unescape(component.host); + if (!isIPv4$1(host)) { + const ipV6res = normalizeIPv6$1(host); + if (ipV6res.isIPV6 === true) host = `[${ipV6res.escapedHost}]`; + else host = component.host; + } + uriTokens.push(host); + } + if (typeof component.port === "number" || typeof component.port === "string") { + uriTokens.push(":"); + uriTokens.push(String(component.port)); + } + return uriTokens.length ? uriTokens.join("") : void 0; + } + module.exports = { + nonSimpleDomain: nonSimpleDomain$1, + recomposeAuthority: recomposeAuthority$1, + normalizeComponentEncoding: normalizeComponentEncoding$1, + removeDotSegments: removeDotSegments$1, + isIPv4: isIPv4$1, + isUUID: isUUID$1, + normalizeIPv6: normalizeIPv6$1, + stringArrayToHexStripped }; -}) }); -var require_data$1 = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/data.js": ((exports, module) => { - var KEYWORDS = [ - "multipleOf", - "maximum", - "exclusiveMaximum", - "minimum", - "exclusiveMinimum", - "maxLength", - "minLength", - "pattern", - "additionalItems", - "maxItems", - "minItems", - "uniqueItems", - "maxProperties", - "minProperties", - "required", - "additionalProperties", - "enum", - "format", - "const" +})); +var require_schemes3 = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { isUUID } = require_utils6(); + const URN_REG = /([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu; + const supportedSchemeNames = [ + "http", + "https", + "ws", + "wss", + "urn", + "urn:uuid" ]; - module.exports = function(metaSchema$1, keywordsJsonPointers) { - for (var i$3 = 0; i$3 < keywordsJsonPointers.length; i$3++) { - metaSchema$1 = JSON.parse(JSON.stringify(metaSchema$1)); - var segments = keywordsJsonPointers[i$3].split("/"); - var keywords2 = metaSchema$1; - var j; - for (j = 1; j < segments.length; j++) keywords2 = keywords2[segments[j]]; - for (j = 0; j < KEYWORDS.length; j++) { - var key$1 = KEYWORDS[j]; - var schema2 = keywords2[key$1]; - if (schema2) keywords2[key$1] = { anyOf: [schema2, { $ref: "https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#" }] }; - } + function isValidSchemeName(name) { + return supportedSchemeNames.indexOf(name) !== -1; + } + function wsIsSecure(wsComponent) { + if (wsComponent.secure === true) return true; + else if (wsComponent.secure === false) return false; + else if (wsComponent.scheme) return wsComponent.scheme.length === 3 && (wsComponent.scheme[0] === "w" || wsComponent.scheme[0] === "W") && (wsComponent.scheme[1] === "s" || wsComponent.scheme[1] === "S") && (wsComponent.scheme[2] === "s" || wsComponent.scheme[2] === "S"); + else return false; + } + function httpParse(component) { + if (!component.host) component.error = component.error || "HTTP URIs must have a host."; + return component; + } + function httpSerialize(component) { + const secure = String(component.scheme).toLowerCase() === "https"; + if (component.port === (secure ? 443 : 80) || component.port === "") component.port = void 0; + if (!component.path) component.path = "/"; + return component; + } + function wsParse(wsComponent) { + wsComponent.secure = wsIsSecure(wsComponent); + wsComponent.resourceName = (wsComponent.path || "/") + (wsComponent.query ? "?" + wsComponent.query : ""); + wsComponent.path = void 0; + wsComponent.query = void 0; + return wsComponent; + } + function wsSerialize(wsComponent) { + if (wsComponent.port === (wsIsSecure(wsComponent) ? 443 : 80) || wsComponent.port === "") wsComponent.port = void 0; + if (typeof wsComponent.secure === "boolean") { + wsComponent.scheme = wsComponent.secure ? "wss" : "ws"; + wsComponent.secure = void 0; } - return metaSchema$1; + if (wsComponent.resourceName) { + const [path4, query2] = wsComponent.resourceName.split("?"); + wsComponent.path = path4 && path4 !== "/" ? path4 : void 0; + wsComponent.query = query2; + wsComponent.resourceName = void 0; + } + wsComponent.fragment = void 0; + return wsComponent; + } + function urnParse(urnComponent, options) { + if (!urnComponent.path) { + urnComponent.error = "URN can not be parsed"; + return urnComponent; + } + const matches = urnComponent.path.match(URN_REG); + if (matches) { + const scheme = options.scheme || urnComponent.scheme || "urn"; + urnComponent.nid = matches[1].toLowerCase(); + urnComponent.nss = matches[2]; + const schemeHandler = getSchemeHandler$1(`${scheme}:${options.nid || urnComponent.nid}`); + urnComponent.path = void 0; + if (schemeHandler) urnComponent = schemeHandler.parse(urnComponent, options); + } else urnComponent.error = urnComponent.error || "URN can not be parsed."; + return urnComponent; + } + function urnSerialize(urnComponent, options) { + if (urnComponent.nid === void 0) throw new Error("URN without nid cannot be serialized"); + const scheme = options.scheme || urnComponent.scheme || "urn"; + const nid = urnComponent.nid.toLowerCase(); + const schemeHandler = getSchemeHandler$1(`${scheme}:${options.nid || nid}`); + if (schemeHandler) urnComponent = schemeHandler.serialize(urnComponent, options); + const uriComponent = urnComponent; + const nss = urnComponent.nss; + uriComponent.path = `${nid || options.nid}:${nss}`; + options.skipEscape = true; + return uriComponent; + } + function urnuuidParse(urnComponent, options) { + const uuidComponent = urnComponent; + uuidComponent.uuid = uuidComponent.nss; + uuidComponent.nss = void 0; + if (!options.tolerant && (!uuidComponent.uuid || !isUUID(uuidComponent.uuid))) uuidComponent.error = uuidComponent.error || "UUID is not valid."; + return uuidComponent; + } + function urnuuidSerialize(uuidComponent) { + const urnComponent = uuidComponent; + urnComponent.nss = (uuidComponent.uuid || "").toLowerCase(); + return urnComponent; + } + const http$1 = { + scheme: "http", + domainHost: true, + parse: httpParse, + serialize: httpSerialize }; -}) }); -var require_async3 = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/compile/async.js": ((exports, module) => { - var MissingRefError = require_error_classes3().MissingRef; - module.exports = compileAsync; - function compileAsync(schema2, meta, callback) { - var self2 = this; - if (typeof this._opts.loadSchema != "function") throw new Error("options.loadSchema should be a function"); - if (typeof meta == "function") { - callback = meta; - meta = void 0; + const https = { + scheme: "https", + domainHost: http$1.domainHost, + parse: httpParse, + serialize: httpSerialize + }; + const ws = { + scheme: "ws", + domainHost: true, + parse: wsParse, + serialize: wsSerialize + }; + const wss = { + scheme: "wss", + domainHost: ws.domainHost, + parse: ws.parse, + serialize: ws.serialize + }; + const urn = { + scheme: "urn", + parse: urnParse, + serialize: urnSerialize, + skipNormalize: true + }; + const urnuuid = { + scheme: "urn:uuid", + parse: urnuuidParse, + serialize: urnuuidSerialize, + skipNormalize: true + }; + const SCHEMES$1 = { + http: http$1, + https, + ws, + wss, + urn, + "urn:uuid": urnuuid + }; + Object.setPrototypeOf(SCHEMES$1, null); + function getSchemeHandler$1(scheme) { + return scheme && (SCHEMES$1[scheme] || SCHEMES$1[scheme.toLowerCase()]) || void 0; + } + module.exports = { + wsIsSecure, + SCHEMES: SCHEMES$1, + isValidSchemeName, + getSchemeHandler: getSchemeHandler$1 + }; +})); +var require_fast_uri3 = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizeComponentEncoding, isIPv4, nonSimpleDomain } = require_utils6(); + const { SCHEMES, getSchemeHandler } = require_schemes3(); + function normalize2(uri$2, options) { + if (typeof uri$2 === "string") uri$2 = serialize(parse6(uri$2, options), options); + else if (typeof uri$2 === "object") uri$2 = parse6(serialize(uri$2, options), options); + return uri$2; + } + function resolve(baseURI, relativeURI, options) { + const schemelessOptions = options ? Object.assign({ scheme: "null" }, options) : { scheme: "null" }; + const resolved = resolveComponent(parse6(baseURI, schemelessOptions), parse6(relativeURI, schemelessOptions), schemelessOptions, true); + schemelessOptions.skipEscape = true; + return serialize(resolved, schemelessOptions); + } + function resolveComponent(base, relative$1, options, skipNormalization) { + const target = {}; + if (!skipNormalization) { + base = parse6(serialize(base, options), options); + relative$1 = parse6(serialize(relative$1, options), options); } - var p = loadMetaSchemaOf(schema2).then(function() { - var schemaObj = self2._addSchema(schema2, void 0, meta); - return schemaObj.validate || _compileAsync(schemaObj); - }); - if (callback) p.then(function(v) { - callback(null, v); - }, callback); - return p; - function loadMetaSchemaOf(sch) { - var $schema = sch.$schema; - return $schema && !self2.getSchema($schema) ? compileAsync.call(self2, { $ref: $schema }, true) : Promise.resolve(); - } - function _compileAsync(schemaObj) { - try { - return self2._compile(schemaObj); - } catch (e) { - if (e instanceof MissingRefError) return loadMissingSchema(e); - throw e; + options = options || {}; + if (!options.tolerant && relative$1.scheme) { + target.scheme = relative$1.scheme; + target.userinfo = relative$1.userinfo; + target.host = relative$1.host; + target.port = relative$1.port; + target.path = removeDotSegments(relative$1.path || ""); + target.query = relative$1.query; + } else { + if (relative$1.userinfo !== void 0 || relative$1.host !== void 0 || relative$1.port !== void 0) { + target.userinfo = relative$1.userinfo; + target.host = relative$1.host; + target.port = relative$1.port; + target.path = removeDotSegments(relative$1.path || ""); + target.query = relative$1.query; + } else { + if (!relative$1.path) { + target.path = base.path; + if (relative$1.query !== void 0) target.query = relative$1.query; + else target.query = base.query; + } else { + if (relative$1.path[0] === "/") target.path = removeDotSegments(relative$1.path); + else { + if ((base.userinfo !== void 0 || base.host !== void 0 || base.port !== void 0) && !base.path) target.path = "/" + relative$1.path; + else if (!base.path) target.path = relative$1.path; + else target.path = base.path.slice(0, base.path.lastIndexOf("/") + 1) + relative$1.path; + target.path = removeDotSegments(target.path); + } + target.query = relative$1.query; + } + target.userinfo = base.userinfo; + target.host = base.host; + target.port = base.port; } - function loadMissingSchema(e) { - var ref = e.missingSchema; - if (added(ref)) throw new Error("Schema " + ref + " is loaded but " + e.missingRef + " cannot be resolved"); - var schemaPromise = self2._loadingSchemas[ref]; - if (!schemaPromise) { - schemaPromise = self2._loadingSchemas[ref] = self2._opts.loadSchema(ref); - schemaPromise.then(removePromise, removePromise); + target.scheme = base.scheme; + } + target.fragment = relative$1.fragment; + return target; + } + function equal$1(uriA, uriB, options) { + if (typeof uriA === "string") { + uriA = unescape(uriA); + uriA = serialize(normalizeComponentEncoding(parse6(uriA, options), true), { + ...options, + skipEscape: true + }); + } else if (typeof uriA === "object") uriA = serialize(normalizeComponentEncoding(uriA, true), { + ...options, + skipEscape: true + }); + if (typeof uriB === "string") { + uriB = unescape(uriB); + uriB = serialize(normalizeComponentEncoding(parse6(uriB, options), true), { + ...options, + skipEscape: true + }); + } else if (typeof uriB === "object") uriB = serialize(normalizeComponentEncoding(uriB, true), { + ...options, + skipEscape: true + }); + return uriA.toLowerCase() === uriB.toLowerCase(); + } + function serialize(cmpts, opts) { + const component = { + host: cmpts.host, + scheme: cmpts.scheme, + userinfo: cmpts.userinfo, + port: cmpts.port, + path: cmpts.path, + query: cmpts.query, + nid: cmpts.nid, + nss: cmpts.nss, + uuid: cmpts.uuid, + fragment: cmpts.fragment, + reference: cmpts.reference, + resourceName: cmpts.resourceName, + secure: cmpts.secure, + error: "" + }; + const options = Object.assign({}, opts); + const uriTokens = []; + const schemeHandler = getSchemeHandler(options.scheme || component.scheme); + if (schemeHandler && schemeHandler.serialize) schemeHandler.serialize(component, options); + if (component.path !== void 0) if (!options.skipEscape) { + component.path = escape(component.path); + if (component.scheme !== void 0) component.path = component.path.split("%3A").join(":"); + } else component.path = unescape(component.path); + if (options.reference !== "suffix" && component.scheme) uriTokens.push(component.scheme, ":"); + const authority = recomposeAuthority(component); + if (authority !== void 0) { + if (options.reference !== "suffix") uriTokens.push("//"); + uriTokens.push(authority); + if (component.path && component.path[0] !== "/") uriTokens.push("/"); + } + if (component.path !== void 0) { + let s = component.path; + if (!options.absolutePath && (!schemeHandler || !schemeHandler.absolutePath)) s = removeDotSegments(s); + if (authority === void 0 && s[0] === "/" && s[1] === "/") s = "/%2F" + s.slice(2); + uriTokens.push(s); + } + if (component.query !== void 0) uriTokens.push("?", component.query); + if (component.fragment !== void 0) uriTokens.push("#", component.fragment); + return uriTokens.join(""); + } + const URI_PARSE = /^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u; + function parse6(uri$2, opts) { + const options = Object.assign({}, opts); + const parsed2 = { + scheme: void 0, + userinfo: void 0, + host: "", + port: void 0, + path: "", + query: void 0, + fragment: void 0 + }; + let isIP = false; + if (options.reference === "suffix") if (options.scheme) uri$2 = options.scheme + ":" + uri$2; + else uri$2 = "//" + uri$2; + const matches = uri$2.match(URI_PARSE); + if (matches) { + parsed2.scheme = matches[1]; + parsed2.userinfo = matches[3]; + parsed2.host = matches[4]; + parsed2.port = parseInt(matches[5], 10); + parsed2.path = matches[6] || ""; + parsed2.query = matches[7]; + parsed2.fragment = matches[8]; + if (isNaN(parsed2.port)) parsed2.port = matches[5]; + if (parsed2.host) if (isIPv4(parsed2.host) === false) { + const ipv6result = normalizeIPv6(parsed2.host); + parsed2.host = ipv6result.host.toLowerCase(); + isIP = ipv6result.isIPV6; + } else isIP = true; + if (parsed2.scheme === void 0 && parsed2.userinfo === void 0 && parsed2.host === void 0 && parsed2.port === void 0 && parsed2.query === void 0 && !parsed2.path) parsed2.reference = "same-document"; + else if (parsed2.scheme === void 0) parsed2.reference = "relative"; + else if (parsed2.fragment === void 0) parsed2.reference = "absolute"; + else parsed2.reference = "uri"; + if (options.reference && options.reference !== "suffix" && options.reference !== parsed2.reference) parsed2.error = parsed2.error || "URI is not a " + options.reference + " reference."; + const schemeHandler = getSchemeHandler(options.scheme || parsed2.scheme); + if (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport)) { + if (parsed2.host && (options.domainHost || schemeHandler && schemeHandler.domainHost) && isIP === false && nonSimpleDomain(parsed2.host)) try { + parsed2.host = URL.domainToASCII(parsed2.host.toLowerCase()); + } catch (e) { + parsed2.error = parsed2.error || "Host's domain name can not be converted to ASCII: " + e; } - return schemaPromise.then(function(sch) { - if (!added(ref)) return loadMetaSchemaOf(sch).then(function() { - if (!added(ref)) self2.addSchema(sch, ref, void 0, meta); - }); - }).then(function() { - return _compileAsync(schemaObj); + } + if (!schemeHandler || schemeHandler && !schemeHandler.skipNormalize) { + if (uri$2.indexOf("%") !== -1) { + if (parsed2.scheme !== void 0) parsed2.scheme = unescape(parsed2.scheme); + if (parsed2.host !== void 0) parsed2.host = unescape(parsed2.host); + } + if (parsed2.path) parsed2.path = escape(unescape(parsed2.path)); + if (parsed2.fragment) parsed2.fragment = encodeURI(decodeURIComponent(parsed2.fragment)); + } + if (schemeHandler && schemeHandler.parse) schemeHandler.parse(parsed2, options); + } else parsed2.error = parsed2.error || "URI can not be parsed."; + return parsed2; + } + const fastUri = { + SCHEMES, + normalize: normalize2, + resolve, + resolveComponent, + equal: equal$1, + serialize, + parse: parse6 + }; + module.exports = fastUri; + module.exports.default = fastUri; + module.exports.fastUri = fastUri; +})); +var require_uri3 = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + const uri$1 = require_fast_uri3(); + uri$1.code = 'require("ajv/dist/runtime/uri").default'; + exports.default = uri$1; +})); +var require_core$1 = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.CodeGen = exports.Name = exports.nil = exports.stringify = exports.str = exports._ = exports.KeywordCxt = void 0; + var validate_1$2 = require_validate3(); + Object.defineProperty(exports, "KeywordCxt", { + enumerable: true, + get: function() { + return validate_1$2.KeywordCxt; + } + }); + var codegen_1$26 = require_codegen3(); + Object.defineProperty(exports, "_", { + enumerable: true, + get: function() { + return codegen_1$26._; + } + }); + Object.defineProperty(exports, "str", { + enumerable: true, + get: function() { + return codegen_1$26.str; + } + }); + Object.defineProperty(exports, "stringify", { + enumerable: true, + get: function() { + return codegen_1$26.stringify; + } + }); + Object.defineProperty(exports, "nil", { + enumerable: true, + get: function() { + return codegen_1$26.nil; + } + }); + Object.defineProperty(exports, "Name", { + enumerable: true, + get: function() { + return codegen_1$26.Name; + } + }); + Object.defineProperty(exports, "CodeGen", { + enumerable: true, + get: function() { + return codegen_1$26.CodeGen; + } + }); + const validation_error_1$1 = require_validation_error3(); + const ref_error_1$3 = require_ref_error3(); + const rules_1 = require_rules3(); + const compile_1$2 = require_compile3(); + const codegen_2 = require_codegen3(); + const resolve_1 = require_resolve3(); + const dataType_1$1 = require_dataType3(); + const util_1$21 = require_util10(); + const $dataRefSchema = require_data3(); + const uri_1 = require_uri3(); + const defaultRegExp = (str$1, flags) => new RegExp(str$1, flags); + defaultRegExp.code = "new RegExp"; + const META_IGNORE_OPTIONS = [ + "removeAdditional", + "useDefaults", + "coerceTypes" + ]; + const EXT_SCOPE_NAMES = /* @__PURE__ */ new Set([ + "validate", + "serialize", + "parse", + "wrapper", + "root", + "schema", + "keyword", + "pattern", + "formats", + "validate$data", + "func", + "obj", + "Error" + ]); + const removedOptions = { + errorDataPath: "", + format: "`validateFormats: false` can be used instead.", + nullable: '"nullable" keyword is supported by default.', + jsonPointers: "Deprecated jsPropertySyntax can be used instead.", + extendRefs: "Deprecated ignoreKeywordsWithRef can be used instead.", + missingRefs: "Pass empty schema with $id that should be ignored to ajv.addSchema.", + processCode: "Use option `code: {process: (code, schemaEnv: object) => string}`", + sourceCode: "Use option `code: {source: true}`", + strictDefaults: "It is default now, see option `strict`.", + strictKeywords: "It is default now, see option `strict`.", + uniqueItems: '"uniqueItems" keyword is always validated.', + unknownFormats: "Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).", + cache: "Map is used as cache, schema object as key.", + serialize: "Map is used as cache, schema object as key.", + ajvErrors: "It is default now." + }; + const deprecatedOptions = { + ignoreKeywordsWithRef: "", + jsPropertySyntax: "", + unicode: '"minLength"/"maxLength" account for unicode characters by default.' + }; + const MAX_EXPRESSION = 200; + function requiredOptions(o) { + var _a2, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0; + const s = o.strict; + const _optz = (_a2 = o.code) === null || _a2 === void 0 ? void 0 : _a2.optimize; + const optimize$1 = _optz === true || _optz === void 0 ? 1 : _optz || 0; + const regExp = (_c = (_b = o.code) === null || _b === void 0 ? void 0 : _b.regExp) !== null && _c !== void 0 ? _c : defaultRegExp; + const uriResolver = (_d = o.uriResolver) !== null && _d !== void 0 ? _d : uri_1.default; + return { + strictSchema: (_f = (_e = o.strictSchema) !== null && _e !== void 0 ? _e : s) !== null && _f !== void 0 ? _f : true, + strictNumbers: (_h = (_g = o.strictNumbers) !== null && _g !== void 0 ? _g : s) !== null && _h !== void 0 ? _h : true, + strictTypes: (_k = (_j = o.strictTypes) !== null && _j !== void 0 ? _j : s) !== null && _k !== void 0 ? _k : "log", + strictTuples: (_m = (_l = o.strictTuples) !== null && _l !== void 0 ? _l : s) !== null && _m !== void 0 ? _m : "log", + strictRequired: (_p = (_o = o.strictRequired) !== null && _o !== void 0 ? _o : s) !== null && _p !== void 0 ? _p : false, + code: o.code ? { + ...o.code, + optimize: optimize$1, + regExp + } : { + optimize: optimize$1, + regExp + }, + loopRequired: (_q = o.loopRequired) !== null && _q !== void 0 ? _q : MAX_EXPRESSION, + loopEnum: (_r = o.loopEnum) !== null && _r !== void 0 ? _r : MAX_EXPRESSION, + meta: (_s = o.meta) !== null && _s !== void 0 ? _s : true, + messages: (_t = o.messages) !== null && _t !== void 0 ? _t : true, + inlineRefs: (_u = o.inlineRefs) !== null && _u !== void 0 ? _u : true, + schemaId: (_v = o.schemaId) !== null && _v !== void 0 ? _v : "$id", + addUsedSchema: (_w = o.addUsedSchema) !== null && _w !== void 0 ? _w : true, + validateSchema: (_x = o.validateSchema) !== null && _x !== void 0 ? _x : true, + validateFormats: (_y = o.validateFormats) !== null && _y !== void 0 ? _y : true, + unicodeRegExp: (_z = o.unicodeRegExp) !== null && _z !== void 0 ? _z : true, + int32range: (_0 = o.int32range) !== null && _0 !== void 0 ? _0 : true, + uriResolver + }; + } + var Ajv$2 = class { + constructor(opts = {}) { + this.schemas = {}; + this.refs = {}; + this.formats = {}; + this._compilations = /* @__PURE__ */ new Set(); + this._loading = {}; + this._cache = /* @__PURE__ */ new Map(); + opts = this.opts = { + ...opts, + ...requiredOptions(opts) + }; + const { es5, lines } = this.opts.code; + this.scope = new codegen_2.ValueScope({ + scope: {}, + prefixes: EXT_SCOPE_NAMES, + es5, + lines + }); + this.logger = getLogger(opts.logger); + const formatOpt = opts.validateFormats; + opts.validateFormats = false; + this.RULES = (0, rules_1.getRules)(); + checkOptions.call(this, removedOptions, opts, "NOT SUPPORTED"); + checkOptions.call(this, deprecatedOptions, opts, "DEPRECATED", "warn"); + this._metaOpts = getMetaSchemaOptions.call(this); + if (opts.formats) addInitialFormats.call(this); + this._addVocabularies(); + this._addDefaultMetaSchema(); + if (opts.keywords) addInitialKeywords.call(this, opts.keywords); + if (typeof opts.meta == "object") this.addMetaSchema(opts.meta); + addInitialSchemas.call(this); + opts.validateFormats = formatOpt; + } + _addVocabularies() { + this.addKeyword("$async"); + } + _addDefaultMetaSchema() { + const { $data, meta: meta3, schemaId } = this.opts; + let _dataRefSchema = $dataRefSchema; + if (schemaId === "id") { + _dataRefSchema = { ...$dataRefSchema }; + _dataRefSchema.id = _dataRefSchema.$id; + delete _dataRefSchema.$id; + } + if (meta3 && $data) this.addMetaSchema(_dataRefSchema, _dataRefSchema[schemaId], false); + } + defaultMeta() { + const { meta: meta3, schemaId } = this.opts; + return this.opts.defaultMeta = typeof meta3 == "object" ? meta3[schemaId] || meta3 : void 0; + } + validate(schemaKeyRef, data) { + let v; + if (typeof schemaKeyRef == "string") { + v = this.getSchema(schemaKeyRef); + if (!v) throw new Error(`no schema with key or ref "${schemaKeyRef}"`); + } else v = this.compile(schemaKeyRef); + const valid = v(data); + if (!("$async" in v)) this.errors = v.errors; + return valid; + } + compile(schema2, _meta) { + const sch = this._addSchema(schema2, _meta); + return sch.validate || this._compileSchemaEnv(sch); + } + compileAsync(schema2, meta3) { + if (typeof this.opts.loadSchema != "function") throw new Error("options.loadSchema should be a function"); + const { loadSchema } = this.opts; + return runCompileAsync.call(this, schema2, meta3); + async function runCompileAsync(_schema, _meta) { + await loadMetaSchema.call(this, _schema.$schema); + const sch = this._addSchema(_schema, _meta); + return sch.validate || _compileAsync.call(this, sch); + } + async function loadMetaSchema($ref) { + if ($ref && !this.getSchema($ref)) await runCompileAsync.call(this, { $ref }, true); + } + async function _compileAsync(sch) { + try { + return this._compileSchemaEnv(sch); + } catch (e) { + if (!(e instanceof ref_error_1$3.default)) throw e; + checkLoaded.call(this, e); + await loadMissingSchema.call(this, e.missingSchema); + return _compileAsync.call(this, sch); + } + } + function checkLoaded({ missingSchema: ref, missingRef }) { + if (this.refs[ref]) throw new Error(`AnySchema ${ref} is loaded but ${missingRef} cannot be resolved`); + } + async function loadMissingSchema(ref) { + const _schema = await _loadSchema.call(this, ref); + if (!this.refs[ref]) await loadMetaSchema.call(this, _schema.$schema); + if (!this.refs[ref]) this.addSchema(_schema, ref, meta3); + } + async function _loadSchema(ref) { + const p = this._loading[ref]; + if (p) return p; + try { + return await (this._loading[ref] = loadSchema(ref)); + } finally { + delete this._loading[ref]; + } + } + } + addSchema(schema2, key$1, _meta, _validateSchema = this.opts.validateSchema) { + if (Array.isArray(schema2)) { + for (const sch of schema2) this.addSchema(sch, void 0, _meta, _validateSchema); + return this; + } + let id; + if (typeof schema2 === "object") { + const { schemaId } = this.opts; + id = schema2[schemaId]; + if (id !== void 0 && typeof id != "string") throw new Error(`schema ${schemaId} must be string`); + } + key$1 = (0, resolve_1.normalizeId)(key$1 || id); + this._checkUnique(key$1); + this.schemas[key$1] = this._addSchema(schema2, _meta, key$1, _validateSchema, true); + return this; + } + addMetaSchema(schema2, key$1, _validateSchema = this.opts.validateSchema) { + this.addSchema(schema2, key$1, true, _validateSchema); + return this; + } + validateSchema(schema2, throwOrLogError) { + if (typeof schema2 == "boolean") return true; + let $schema; + $schema = schema2.$schema; + if ($schema !== void 0 && typeof $schema != "string") throw new Error("$schema must be a string"); + $schema = $schema || this.opts.defaultMeta || this.defaultMeta(); + if (!$schema) { + this.logger.warn("meta-schema not available"); + this.errors = null; + return true; + } + const valid = this.validate($schema, schema2); + if (!valid && throwOrLogError) { + const message = "schema is invalid: " + this.errorsText(); + if (this.opts.validateSchema === "log") this.logger.error(message); + else throw new Error(message); + } + return valid; + } + getSchema(keyRef) { + let sch; + while (typeof (sch = getSchEnv.call(this, keyRef)) == "string") keyRef = sch; + if (sch === void 0) { + const { schemaId } = this.opts; + const root2 = new compile_1$2.SchemaEnv({ + schema: {}, + schemaId }); - function removePromise() { - delete self2._loadingSchemas[ref]; + sch = compile_1$2.resolveSchema.call(this, root2, keyRef); + if (!sch) return; + this.refs[keyRef] = sch; + } + return sch.validate || this._compileSchemaEnv(sch); + } + removeSchema(schemaKeyRef) { + if (schemaKeyRef instanceof RegExp) { + this._removeAllSchemas(this.schemas, schemaKeyRef); + this._removeAllSchemas(this.refs, schemaKeyRef); + return this; + } + switch (typeof schemaKeyRef) { + case "undefined": + this._removeAllSchemas(this.schemas); + this._removeAllSchemas(this.refs); + this._cache.clear(); + return this; + case "string": { + const sch = getSchEnv.call(this, schemaKeyRef); + if (typeof sch == "object") this._cache.delete(sch.schema); + delete this.schemas[schemaKeyRef]; + delete this.refs[schemaKeyRef]; + return this; } - function added(ref$1) { - return self2._refs[ref$1] || self2._schemas[ref$1]; + case "object": { + const cacheKey = schemaKeyRef; + this._cache.delete(cacheKey); + let id = schemaKeyRef[this.opts.schemaId]; + if (id) { + id = (0, resolve_1.normalizeId)(id); + delete this.schemas[id]; + delete this.refs[id]; + } + return this; } + default: + throw new Error("ajv.removeSchema: invalid parameter"); + } + } + addVocabulary(definitions) { + for (const def$30 of definitions) this.addKeyword(def$30); + return this; + } + addKeyword(kwdOrDef, def$30) { + let keyword; + if (typeof kwdOrDef == "string") { + keyword = kwdOrDef; + if (typeof def$30 == "object") { + this.logger.warn("these parameters are deprecated, see docs for addKeyword"); + def$30.keyword = keyword; + } + } else if (typeof kwdOrDef == "object" && def$30 === void 0) { + def$30 = kwdOrDef; + keyword = def$30.keyword; + if (Array.isArray(keyword) && !keyword.length) throw new Error("addKeywords: keyword must be string or non-empty array"); + } else throw new Error("invalid addKeywords parameters"); + checkKeyword.call(this, keyword, def$30); + if (!def$30) { + (0, util_1$21.eachItem)(keyword, (kwd) => addRule.call(this, kwd)); + return this; + } + keywordMetaschema.call(this, def$30); + const definition = { + ...def$30, + type: (0, dataType_1$1.getJSONTypes)(def$30.type), + schemaType: (0, dataType_1$1.getJSONTypes)(def$30.schemaType) + }; + (0, util_1$21.eachItem)(keyword, definition.type.length === 0 ? (k) => addRule.call(this, k, definition) : (k) => definition.type.forEach((t) => addRule.call(this, k, definition, t))); + return this; + } + getKeyword(keyword) { + const rule = this.RULES.all[keyword]; + return typeof rule == "object" ? rule.definition : !!rule; + } + removeKeyword(keyword) { + const { RULES } = this; + delete RULES.keywords[keyword]; + delete RULES.all[keyword]; + for (const group2 of RULES.rules) { + const i$3 = group2.rules.findIndex((rule) => rule.keyword === keyword); + if (i$3 >= 0) group2.rules.splice(i$3, 1); + } + return this; + } + addFormat(name, format$2) { + if (typeof format$2 == "string") format$2 = new RegExp(format$2); + this.formats[name] = format$2; + return this; + } + errorsText(errors = this.errors, { separator: separator2 = ", ", dataVar = "data" } = {}) { + if (!errors || errors.length === 0) return "No errors"; + return errors.map((e) => `${dataVar}${e.instancePath} ${e.message}`).reduce((text, msg) => text + separator2 + msg); + } + $dataMetaSchema(metaSchema, keywordsJsonPointers) { + const rules = this.RULES.all; + metaSchema = JSON.parse(JSON.stringify(metaSchema)); + for (const jsonPointer of keywordsJsonPointers) { + const segments = jsonPointer.split("/").slice(1); + let keywords2 = metaSchema; + for (const seg of segments) keywords2 = keywords2[seg]; + for (const key$1 in rules) { + const rule = rules[key$1]; + if (typeof rule != "object") continue; + const { $data } = rule.definition; + const schema2 = keywords2[key$1]; + if ($data && schema2) keywords2[key$1] = schemaOrData(schema2); + } + } + return metaSchema; + } + _removeAllSchemas(schemas, regex$1) { + for (const keyRef in schemas) { + const sch = schemas[keyRef]; + if (!regex$1 || regex$1.test(keyRef)) { + if (typeof sch == "string") delete schemas[keyRef]; + else if (sch && !sch.meta) { + this._cache.delete(sch.schema); + delete schemas[keyRef]; + } + } + } + } + _addSchema(schema2, meta3, baseId, validateSchema = this.opts.validateSchema, addSchema = this.opts.addUsedSchema) { + let id; + const { schemaId } = this.opts; + if (typeof schema2 == "object") id = schema2[schemaId]; + else if (this.opts.jtd) throw new Error("schema must be object"); + else if (typeof schema2 != "boolean") throw new Error("schema must be object or boolean"); + let sch = this._cache.get(schema2); + if (sch !== void 0) return sch; + baseId = (0, resolve_1.normalizeId)(id || baseId); + const localRefs = resolve_1.getSchemaRefs.call(this, schema2, baseId); + sch = new compile_1$2.SchemaEnv({ + schema: schema2, + schemaId, + meta: meta3, + baseId, + localRefs + }); + this._cache.set(sch.schema, sch); + if (addSchema && !baseId.startsWith("#")) { + if (baseId) this._checkUnique(baseId); + this.refs[baseId] = sch; + } + if (validateSchema) this.validateSchema(schema2, true); + return sch; + } + _checkUnique(id) { + if (this.schemas[id] || this.refs[id]) throw new Error(`schema with key or id "${id}" already exists`); + } + _compileSchemaEnv(sch) { + if (sch.meta) this._compileMetaSchema(sch); + else compile_1$2.compileSchema.call(this, sch); + if (!sch.validate) throw new Error("ajv implementation error"); + return sch.validate; + } + _compileMetaSchema(sch) { + const currentOpts = this.opts; + this.opts = this._metaOpts; + try { + compile_1$2.compileSchema.call(this, sch); + } finally { + this.opts = currentOpts; + } + } + }; + Ajv$2.ValidationError = validation_error_1$1.default; + Ajv$2.MissingRefError = ref_error_1$3.default; + exports.default = Ajv$2; + function checkOptions(checkOpts, options, msg, log$1 = "error") { + for (const key$1 in checkOpts) { + const opt = key$1; + if (opt in options) this.logger[log$1](`${msg}: option ${key$1}. ${checkOpts[opt]}`); + } + } + function getSchEnv(keyRef) { + keyRef = (0, resolve_1.normalizeId)(keyRef); + return this.schemas[keyRef] || this.refs[keyRef]; + } + function addInitialSchemas() { + const optsSchemas = this.opts.schemas; + if (!optsSchemas) return; + if (Array.isArray(optsSchemas)) this.addSchema(optsSchemas); + else for (const key$1 in optsSchemas) this.addSchema(optsSchemas[key$1], key$1); + } + function addInitialFormats() { + for (const name in this.opts.formats) { + const format$2 = this.opts.formats[name]; + if (format$2) this.addFormat(name, format$2); + } + } + function addInitialKeywords(defs) { + if (Array.isArray(defs)) { + this.addVocabulary(defs); + return; + } + this.logger.warn("keywords option as map is deprecated, pass array"); + for (const keyword in defs) { + const def$30 = defs[keyword]; + if (!def$30.keyword) def$30.keyword = keyword; + this.addKeyword(def$30); + } + } + function getMetaSchemaOptions() { + const metaOpts = { ...this.opts }; + for (const opt of META_IGNORE_OPTIONS) delete metaOpts[opt]; + return metaOpts; + } + const noLogs = { + log() { + }, + warn() { + }, + error() { + } + }; + function getLogger(logger) { + if (logger === false) return noLogs; + if (logger === void 0) return console; + if (logger.log && logger.warn && logger.error) return logger; + throw new Error("logger must implement log, warn and error methods"); + } + const KEYWORD_NAME = /^[a-z_$][a-z0-9_$:-]*$/i; + function checkKeyword(keyword, def$30) { + const { RULES } = this; + (0, util_1$21.eachItem)(keyword, (kwd) => { + if (RULES.keywords[kwd]) throw new Error(`Keyword ${kwd} is already defined`); + if (!KEYWORD_NAME.test(kwd)) throw new Error(`Keyword ${kwd} has invalid name`); + }); + if (!def$30) return; + if (def$30.$data && !("code" in def$30 || "validate" in def$30)) throw new Error('$data keyword must have "code" or "validate" function'); + } + function addRule(keyword, definition, dataType) { + var _a2; + const post = definition === null || definition === void 0 ? void 0 : definition.post; + if (dataType && post) throw new Error('keyword with "post" flag cannot have "type"'); + const { RULES } = this; + let ruleGroup = post ? RULES.post : RULES.rules.find(({ type: t }) => t === dataType); + if (!ruleGroup) { + ruleGroup = { + type: dataType, + rules: [] + }; + RULES.rules.push(ruleGroup); + } + RULES.keywords[keyword] = true; + if (!definition) return; + const rule = { + keyword, + definition: { + ...definition, + type: (0, dataType_1$1.getJSONTypes)(definition.type), + schemaType: (0, dataType_1$1.getJSONTypes)(definition.schemaType) + } + }; + if (definition.before) addBeforeRule.call(this, ruleGroup, rule, definition.before); + else ruleGroup.rules.push(rule); + RULES.all[keyword] = rule; + (_a2 = definition.implements) === null || _a2 === void 0 || _a2.forEach((kwd) => this.addKeyword(kwd)); + } + function addBeforeRule(ruleGroup, rule, before) { + const i$3 = ruleGroup.rules.findIndex((_rule) => _rule.keyword === before); + if (i$3 >= 0) ruleGroup.rules.splice(i$3, 0, rule); + else { + ruleGroup.rules.push(rule); + this.logger.warn(`rule ${before} is not defined`); + } + } + function keywordMetaschema(def$30) { + let { metaSchema } = def$30; + if (metaSchema === void 0) return; + if (def$30.$data && this.opts.$data) metaSchema = schemaOrData(metaSchema); + def$30.validateSchema = this.compile(metaSchema, true); + } + const $dataRef = { $ref: "https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#" }; + function schemaOrData(schema2) { + return { anyOf: [schema2, $dataRef] }; + } +})); +var require_id3 = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + const def$29 = { + keyword: "id", + code() { + throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID'); + } + }; + exports.default = def$29; +})); +var require_ref3 = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.callRef = exports.getValidate = void 0; + const ref_error_1$2 = require_ref_error3(); + const code_1$8 = require_code5(); + const codegen_1$25 = require_codegen3(); + const names_1$1 = require_names3(); + const compile_1$1 = require_compile3(); + const util_1$20 = require_util10(); + const def$28 = { + keyword: "$ref", + schemaType: "string", + code(cxt) { + const { gen, schema: $ref, it } = cxt; + const { baseId, schemaEnv: env3, validateName, opts, self: self2 } = it; + const { root: root2 } = env3; + if (($ref === "#" || $ref === "#/") && baseId === root2.baseId) return callRootRef(); + const schOrEnv = compile_1$1.resolveRef.call(self2, root2, baseId, $ref); + if (schOrEnv === void 0) throw new ref_error_1$2.default(it.opts.uriResolver, baseId, $ref); + if (schOrEnv instanceof compile_1$1.SchemaEnv) return callValidate(schOrEnv); + return inlineRefSchema(schOrEnv); + function callRootRef() { + if (env3 === root2) return callRef(cxt, validateName, env3, env3.$async); + const rootName = gen.scopeValue("root", { ref: root2 }); + return callRef(cxt, (0, codegen_1$25._)`${rootName}.validate`, root2, root2.$async); + } + function callValidate(sch) { + callRef(cxt, getValidate(cxt, sch), sch, sch.$async); + } + function inlineRefSchema(sch) { + const schName = gen.scopeValue("schema", opts.code.source === true ? { + ref: sch, + code: (0, codegen_1$25.stringify)(sch) + } : { ref: sch }); + const valid = gen.name("valid"); + const schCxt = cxt.subschema({ + schema: sch, + dataTypes: [], + schemaPath: codegen_1$25.nil, + topSchemaRef: schName, + errSchemaPath: $ref + }, valid); + cxt.mergeEvaluated(schCxt); + cxt.ok(valid); + } + } + }; + function getValidate(cxt, sch) { + const { gen } = cxt; + return sch.validate ? gen.scopeValue("validate", { ref: sch.validate }) : (0, codegen_1$25._)`${gen.scopeValue("wrapper", { ref: sch })}.validate`; + } + exports.getValidate = getValidate; + function callRef(cxt, v, sch, $async) { + const { gen, it } = cxt; + const { allErrors, schemaEnv: env3, opts } = it; + const passCxt = opts.passContext ? names_1$1.default.this : codegen_1$25.nil; + if ($async) callAsyncRef(); + else callSyncRef(); + function callAsyncRef() { + if (!env3.$async) throw new Error("async schema referenced by sync schema"); + const valid = gen.let("valid"); + gen.try(() => { + gen.code((0, codegen_1$25._)`await ${(0, code_1$8.callValidateCode)(cxt, v, passCxt)}`); + addEvaluatedFrom(v); + if (!allErrors) gen.assign(valid, true); + }, (e) => { + gen.if((0, codegen_1$25._)`!(${e} instanceof ${it.ValidationError})`, () => gen.throw(e)); + addErrorsFrom(e); + if (!allErrors) gen.assign(valid, false); + }); + cxt.ok(valid); + } + function callSyncRef() { + cxt.result((0, code_1$8.callValidateCode)(cxt, v, passCxt), () => addEvaluatedFrom(v), () => addErrorsFrom(v)); + } + function addErrorsFrom(source) { + const errs = (0, codegen_1$25._)`${source}.errors`; + gen.assign(names_1$1.default.vErrors, (0, codegen_1$25._)`${names_1$1.default.vErrors} === null ? ${errs} : ${names_1$1.default.vErrors}.concat(${errs})`); + gen.assign(names_1$1.default.errors, (0, codegen_1$25._)`${names_1$1.default.vErrors}.length`); + } + function addEvaluatedFrom(source) { + var _a2; + if (!it.opts.unevaluated) return; + const schEvaluated = (_a2 = sch === null || sch === void 0 ? void 0 : sch.validate) === null || _a2 === void 0 ? void 0 : _a2.evaluated; + if (it.props !== true) if (schEvaluated && !schEvaluated.dynamicProps) { + if (schEvaluated.props !== void 0) it.props = util_1$20.mergeEvaluated.props(gen, schEvaluated.props, it.props); + } else { + const props = gen.var("props", (0, codegen_1$25._)`${source}.evaluated.props`); + it.props = util_1$20.mergeEvaluated.props(gen, props, it.props, codegen_1$25.Name); + } + if (it.items !== true) if (schEvaluated && !schEvaluated.dynamicItems) { + if (schEvaluated.items !== void 0) it.items = util_1$20.mergeEvaluated.items(gen, schEvaluated.items, it.items); + } else { + const items = gen.var("items", (0, codegen_1$25._)`${source}.evaluated.items`); + it.items = util_1$20.mergeEvaluated.items(gen, items, it.items, codegen_1$25.Name); } } } -}) }); -var require_custom3 = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/dotjs/custom.js": ((exports, module) => { - module.exports = function generate_custom(it, $keyword, $ruleType) { - var out = " "; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + "/" + $keyword; - var $breakOnError = !it.opts.allErrors; - var $errorKeyword; - var $data = "data" + ($dataLvl || ""); - var $valid = "valid" + $lvl; - var $errs = "errs__" + $lvl; - var $isData = it.opts.$data && $schema && $schema.$data, $schemaValue; - if ($isData) { - out += " var schema" + $lvl + " = " + it.util.getData($schema.$data, $dataLvl, it.dataPathArr) + "; "; - $schemaValue = "schema" + $lvl; - } else $schemaValue = $schema; - var $rule = this, $definition = "definition" + $lvl, $rDef = $rule.definition, $closingBraces = ""; - var $compile, $inline, $macro, $ruleValidate, $validateCode; - if ($isData && $rDef.$data) { - $validateCode = "keywordValidate" + $lvl; - var $validateSchema = $rDef.validateSchema; - out += " var " + $definition + " = RULES.custom['" + $keyword + "'].definition; var " + $validateCode + " = " + $definition + ".validate;"; - } else { - $ruleValidate = it.useCustomRule($rule, $schema, it.schema, it); - if (!$ruleValidate) return; - $schemaValue = "validate.schema" + $schemaPath; - $validateCode = $ruleValidate.code; - $compile = $rDef.compile; - $inline = $rDef.inline; - $macro = $rDef.macro; + exports.callRef = callRef; + exports.default = def$28; +})); +var require_core5 = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + const id_1 = require_id3(); + const ref_1 = require_ref3(); + const core4 = [ + "$schema", + "$id", + "$defs", + "$vocabulary", + { keyword: "$comment" }, + "definitions", + id_1.default, + ref_1.default + ]; + exports.default = core4; +})); +var require_limitNumber3 = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + const codegen_1$24 = require_codegen3(); + const ops$1 = codegen_1$24.operators; + const KWDs$1 = { + maximum: { + okStr: "<=", + ok: ops$1.LTE, + fail: ops$1.GT + }, + minimum: { + okStr: ">=", + ok: ops$1.GTE, + fail: ops$1.LT + }, + exclusiveMaximum: { + okStr: "<", + ok: ops$1.LT, + fail: ops$1.GTE + }, + exclusiveMinimum: { + okStr: ">", + ok: ops$1.GT, + fail: ops$1.LTE } - var $ruleErrs = $validateCode + ".errors", $i = "i" + $lvl, $ruleErr = "ruleErr" + $lvl, $asyncKeyword = $rDef.async; - if ($asyncKeyword && !it.async) throw new Error("async keyword in sync schema"); - if (!($inline || $macro)) out += "" + $ruleErrs + " = null;"; - out += "var " + $errs + " = errors;var " + $valid + ";"; - if ($isData && $rDef.$data) { - $closingBraces += "}"; - out += " if (" + $schemaValue + " === undefined) { " + $valid + " = true; } else { "; - if ($validateSchema) { - $closingBraces += "}"; - out += " " + $valid + " = " + $definition + ".validateSchema(" + $schemaValue + "); if (" + $valid + ") { "; - } - } - if ($inline) if ($rDef.statements) out += " " + $ruleValidate.validate + " "; - else out += " " + $valid + " = " + $ruleValidate.validate + "; "; - else if ($macro) { - var $it = it.util.copy(it); - var $closingBraces = ""; - $it.level++; - var $nextValid = "valid" + $it.level; - $it.schema = $ruleValidate.validate; - $it.schemaPath = ""; - var $wasComposite = it.compositeRule; - it.compositeRule = $it.compositeRule = true; - var $code = it.validate($it).replace(/validate\.schema/g, $validateCode); - it.compositeRule = $it.compositeRule = $wasComposite; - out += " " + $code; - } else { - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ""; - out += " " + $validateCode + ".call( "; - if (it.opts.passContext) out += "this"; - else out += "self"; - if ($compile || $rDef.schema === false) out += " , " + $data + " "; - else out += " , " + $schemaValue + " , " + $data + " , validate.schema" + it.schemaPath + " "; - out += " , (dataPath || '')"; - if (it.errorPath != '""') out += " + " + it.errorPath; - var $parentData = $dataLvl ? "data" + ($dataLvl - 1 || "") : "parentData", $parentDataProperty = $dataLvl ? it.dataPathArr[$dataLvl] : "parentDataProperty"; - out += " , " + $parentData + " , " + $parentDataProperty + " , rootData ) "; - var def_callRuleValidate = out; - out = $$outStack.pop(); - if ($rDef.errors === false) { - out += " " + $valid + " = "; - if ($asyncKeyword) out += "await "; - out += "" + def_callRuleValidate + "; "; - } else if ($asyncKeyword) { - $ruleErrs = "customErrors" + $lvl; - out += " var " + $ruleErrs + " = null; try { " + $valid + " = await " + def_callRuleValidate + "; } catch (e) { " + $valid + " = false; if (e instanceof ValidationError) " + $ruleErrs + " = e.errors; else throw e; } "; - } else out += " " + $ruleErrs + " = null; " + $valid + " = " + def_callRuleValidate + "; "; - } - if ($rDef.modifying) out += " if (" + $parentData + ") " + $data + " = " + $parentData + "[" + $parentDataProperty + "];"; - out += "" + $closingBraces; - if ($rDef.valid) { - if ($breakOnError) out += " if (true) { "; - } else { - out += " if ( "; - if ($rDef.valid === void 0) { - out += " !"; - if ($macro) out += "" + $nextValid; - else out += "" + $valid; - } else out += " " + !$rDef.valid + " "; - out += ") { "; - $errorKeyword = $rule.keyword; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ""; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ""; - if (it.createErrors !== false) { - out += " { keyword: '" + ($errorKeyword || "custom") + "' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { keyword: '" + $rule.keyword + "' } "; - if (it.opts.messages !== false) out += ` , message: 'should pass "` + $rule.keyword + `" keyword validation' `; - if (it.opts.verbose) out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; - out += " } "; - } else out += " {} "; - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) - if (it.async) out += " throw new ValidationError([" + __err + "]); "; - else out += " validate.errors = [" + __err + "]; return false; "; - else out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; - var def_customError = out; - out = $$outStack.pop(); - if ($inline) if ($rDef.errors) { - if ($rDef.errors != "full") { - out += " for (var " + $i + "=" + $errs + "; " + $i + " { + const def$27 = { + keyword: Object.keys(KWDs$1), + type: "number", + schemaType: "number", + $data: true, + error: { + message: ({ keyword, schemaCode }) => (0, codegen_1$24.str)`must be ${KWDs$1[keyword].okStr} ${schemaCode}`, + params: ({ keyword, schemaCode }) => (0, codegen_1$24._)`{comparison: ${KWDs$1[keyword].okStr}, limit: ${schemaCode}}` + }, + code(cxt) { + const { keyword, data, schemaCode } = cxt; + cxt.fail$data((0, codegen_1$24._)`${data} ${KWDs$1[keyword].fail} ${schemaCode} || isNaN(${data})`); + } + }; + exports.default = def$27; +})); +var require_multipleOf3 = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + const codegen_1$23 = require_codegen3(); + const def$26 = { + keyword: "multipleOf", + type: "number", + schemaType: "number", + $data: true, + error: { + message: ({ schemaCode }) => (0, codegen_1$23.str)`must be multiple of ${schemaCode}`, + params: ({ schemaCode }) => (0, codegen_1$23._)`{multipleOf: ${schemaCode}}` + }, + code(cxt) { + const { gen, data, schemaCode, it } = cxt; + const prec = it.opts.multipleOfPrecision; + const res = gen.let("res"); + const invalid = prec ? (0, codegen_1$23._)`Math.abs(Math.round(${res}) - ${res}) > 1e-${prec}` : (0, codegen_1$23._)`${res} !== parseInt(${res})`; + cxt.fail$data((0, codegen_1$23._)`(${schemaCode} === 0 || (${res} = ${data}/${schemaCode}, ${invalid}))`); + } + }; + exports.default = def$26; +})); +var require_ucs2length3 = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + function ucs2length(str$1) { + const len = str$1.length; + let length = 0; + let pos = 0; + let value2; + while (pos < len) { + length++; + value2 = str$1.charCodeAt(pos++); + if (value2 >= 55296 && value2 <= 56319 && pos < len) { + value2 = str$1.charCodeAt(pos); + if ((value2 & 64512) === 56320) pos++; + } + } + return length; + } + exports.default = ucs2length; + ucs2length.code = 'require("ajv/dist/runtime/ucs2length").default'; +})); +var require_limitLength3 = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + const codegen_1$22 = require_codegen3(); + const util_1$19 = require_util10(); + const ucs2length_1 = require_ucs2length3(); + const def$25 = { + keyword: ["maxLength", "minLength"], + type: "string", + schemaType: "number", + $data: true, + error: { + message({ keyword, schemaCode }) { + const comp = keyword === "maxLength" ? "more" : "fewer"; + return (0, codegen_1$22.str)`must NOT have ${comp} than ${schemaCode} characters`; + }, + params: ({ schemaCode }) => (0, codegen_1$22._)`{limit: ${schemaCode}}` + }, + code(cxt) { + const { keyword, data, schemaCode, it } = cxt; + const op = keyword === "maxLength" ? codegen_1$22.operators.GT : codegen_1$22.operators.LT; + const len = it.opts.unicode === false ? (0, codegen_1$22._)`${data}.length` : (0, codegen_1$22._)`${(0, util_1$19.useFunc)(cxt.gen, ucs2length_1.default)}(${data})`; + cxt.fail$data((0, codegen_1$22._)`${len} ${op} ${schemaCode}`); + } + }; + exports.default = def$25; +})); +var require_pattern3 = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + const code_1$7 = require_code5(); + const codegen_1$21 = require_codegen3(); + const def$24 = { + keyword: "pattern", + type: "string", + schemaType: "string", + $data: true, + error: { + message: ({ schemaCode }) => (0, codegen_1$21.str)`must match pattern "${schemaCode}"`, + params: ({ schemaCode }) => (0, codegen_1$21._)`{pattern: ${schemaCode}}` + }, + code(cxt) { + const { data, $data, schema: schema2, schemaCode, it } = cxt; + const u = it.opts.unicodeRegExp ? "u" : ""; + const regExp = $data ? (0, codegen_1$21._)`(new RegExp(${schemaCode}, ${u}))` : (0, code_1$7.usePattern)(cxt, schema2); + cxt.fail$data((0, codegen_1$21._)`!${regExp}.test(${data})`); + } + }; + exports.default = def$24; +})); +var require_limitProperties3 = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + const codegen_1$20 = require_codegen3(); + const def$23 = { + keyword: ["maxProperties", "minProperties"], + type: "object", + schemaType: "number", + $data: true, + error: { + message({ keyword, schemaCode }) { + const comp = keyword === "maxProperties" ? "more" : "fewer"; + return (0, codegen_1$20.str)`must NOT have ${comp} than ${schemaCode} properties`; + }, + params: ({ schemaCode }) => (0, codegen_1$20._)`{limit: ${schemaCode}}` + }, + code(cxt) { + const { keyword, data, schemaCode } = cxt; + const op = keyword === "maxProperties" ? codegen_1$20.operators.GT : codegen_1$20.operators.LT; + cxt.fail$data((0, codegen_1$20._)`Object.keys(${data}).length ${op} ${schemaCode}`); + } + }; + exports.default = def$23; +})); +var require_required3 = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + const code_1$6 = require_code5(); + const codegen_1$19 = require_codegen3(); + const util_1$18 = require_util10(); + const def$22 = { + keyword: "required", + type: "object", + schemaType: "array", + $data: true, + error: { + message: ({ params: { missingProperty } }) => (0, codegen_1$19.str)`must have required property '${missingProperty}'`, + params: ({ params: { missingProperty } }) => (0, codegen_1$19._)`{missingProperty: ${missingProperty}}` + }, + code(cxt) { + const { gen, schema: schema2, schemaCode, data, $data, it } = cxt; + const { opts } = it; + if (!$data && schema2.length === 0) return; + const useLoop = schema2.length >= opts.loopRequired; + if (it.allErrors) allErrorsMode(); + else exitOnErrorMode(); + if (opts.strictRequired) { + const props = cxt.parentSchema.properties; + const { definedProperties } = cxt.it; + for (const requiredKey of schema2) if ((props === null || props === void 0 ? void 0 : props[requiredKey]) === void 0 && !definedProperties.has(requiredKey)) { + const msg = `required property "${requiredKey}" is not defined at "${it.schemaEnv.baseId + it.errSchemaPath}" (strictRequired)`; + (0, util_1$18.checkStrictMode)(it, msg, it.opts.strictRequired); + } + } + function allErrorsMode() { + if (useLoop || $data) cxt.block$data(codegen_1$19.nil, loopAllRequired); + else for (const prop of schema2) (0, code_1$6.checkReportMissingProp)(cxt, prop); + } + function exitOnErrorMode() { + const missing = gen.let("missing"); + if (useLoop || $data) { + const valid = gen.let("valid", true); + cxt.block$data(valid, () => loopUntilMissing(missing, valid)); + cxt.ok(valid); + } else { + gen.if((0, code_1$6.checkMissingProp)(cxt, schema2, missing)); + (0, code_1$6.reportMissingProp)(cxt, missing); + gen.else(); + } + } + function loopAllRequired() { + gen.forOf("prop", schemaCode, (prop) => { + cxt.setParams({ missingProperty: prop }); + gen.if((0, code_1$6.noPropertyInData)(gen, data, prop, opts.ownProperties), () => cxt.error()); + }); + } + function loopUntilMissing(missing, valid) { + cxt.setParams({ missingProperty: missing }); + gen.forOf(missing, schemaCode, () => { + gen.assign(valid, (0, code_1$6.propertyInData)(gen, data, missing, opts.ownProperties)); + gen.if((0, codegen_1$19.not)(valid), () => { + cxt.error(); + gen.break(); + }); + }, codegen_1$19.nil); + } + } + }; + exports.default = def$22; +})); +var require_limitItems3 = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + const codegen_1$18 = require_codegen3(); + const def$21 = { + keyword: ["maxItems", "minItems"], + type: "array", + schemaType: "number", + $data: true, + error: { + message({ keyword, schemaCode }) { + const comp = keyword === "maxItems" ? "more" : "fewer"; + return (0, codegen_1$18.str)`must NOT have ${comp} than ${schemaCode} items`; + }, + params: ({ schemaCode }) => (0, codegen_1$18._)`{limit: ${schemaCode}}` + }, + code(cxt) { + const { keyword, data, schemaCode } = cxt; + const op = keyword === "maxItems" ? codegen_1$18.operators.GT : codegen_1$18.operators.LT; + cxt.fail$data((0, codegen_1$18._)`${data}.length ${op} ${schemaCode}`); + } + }; + exports.default = def$21; +})); +var require_equal3 = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + const equal = require_fast_deep_equal3(); + equal.code = 'require("ajv/dist/runtime/equal").default'; + exports.default = equal; +})); +var require_uniqueItems3 = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + const dataType_1 = require_dataType3(); + const codegen_1$17 = require_codegen3(); + const util_1$17 = require_util10(); + const equal_1$2 = require_equal3(); + const def$20 = { + keyword: "uniqueItems", + type: "array", + schemaType: "boolean", + $data: true, + error: { + message: ({ params: { i: i$3, j } }) => (0, codegen_1$17.str)`must NOT have duplicate items (items ## ${j} and ${i$3} are identical)`, + params: ({ params: { i: i$3, j } }) => (0, codegen_1$17._)`{i: ${i$3}, j: ${j}}` + }, + code(cxt) { + const { gen, data, $data, schema: schema2, parentSchema, schemaCode, it } = cxt; + if (!$data && !schema2) return; + const valid = gen.let("valid"); + const itemTypes = parentSchema.items ? (0, dataType_1.getSchemaTypes)(parentSchema.items) : []; + cxt.block$data(valid, validateUniqueItems, (0, codegen_1$17._)`${schemaCode} === false`); + cxt.ok(valid); + function validateUniqueItems() { + const i$3 = gen.let("i", (0, codegen_1$17._)`${data}.length`); + const j = gen.let("j"); + cxt.setParams({ + i: i$3, + j + }); + gen.assign(valid, true); + gen.if((0, codegen_1$17._)`${i$3} > 1`, () => (canOptimize() ? loopN : loopN2)(i$3, j)); + } + function canOptimize() { + return itemTypes.length > 0 && !itemTypes.some((t) => t === "object" || t === "array"); + } + function loopN(i$3, j) { + const item = gen.name("item"); + const wrongType = (0, dataType_1.checkDataTypes)(itemTypes, item, it.opts.strictNumbers, dataType_1.DataType.Wrong); + const indices = gen.const("indices", (0, codegen_1$17._)`{}`); + gen.for((0, codegen_1$17._)`;${i$3}--;`, () => { + gen.let(item, (0, codegen_1$17._)`${data}[${i$3}]`); + gen.if(wrongType, (0, codegen_1$17._)`continue`); + if (itemTypes.length > 1) gen.if((0, codegen_1$17._)`typeof ${item} == "string"`, (0, codegen_1$17._)`${item} += "_"`); + gen.if((0, codegen_1$17._)`typeof ${indices}[${item}] == "number"`, () => { + gen.assign(j, (0, codegen_1$17._)`${indices}[${item}]`); + cxt.error(); + gen.assign(valid, false).break(); + }).code((0, codegen_1$17._)`${indices}[${item}] = ${i$3}`); + }); + } + function loopN2(i$3, j) { + const eql = (0, util_1$17.useFunc)(gen, equal_1$2.default); + const outer = gen.name("outer"); + gen.label(outer).for((0, codegen_1$17._)`;${i$3}--;`, () => gen.for((0, codegen_1$17._)`${j} = ${i$3}; ${j}--;`, () => gen.if((0, codegen_1$17._)`${eql}(${data}[${i$3}], ${data}[${j}])`, () => { + cxt.error(); + gen.assign(valid, false).break(outer); + }))); + } + } + }; + exports.default = def$20; +})); +var require_const3 = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + const codegen_1$16 = require_codegen3(); + const util_1$16 = require_util10(); + const equal_1$1 = require_equal3(); + const def$19 = { + keyword: "const", + $data: true, + error: { + message: "must be equal to constant", + params: ({ schemaCode }) => (0, codegen_1$16._)`{allowedValue: ${schemaCode}}` + }, + code(cxt) { + const { gen, data, $data, schemaCode, schema: schema2 } = cxt; + if ($data || schema2 && typeof schema2 == "object") cxt.fail$data((0, codegen_1$16._)`!${(0, util_1$16.useFunc)(gen, equal_1$1.default)}(${data}, ${schemaCode})`); + else cxt.fail((0, codegen_1$16._)`${schema2} !== ${data}`); + } + }; + exports.default = def$19; +})); +var require_enum3 = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + const codegen_1$15 = require_codegen3(); + const util_1$15 = require_util10(); + const equal_1 = require_equal3(); + const def$18 = { + keyword: "enum", + schemaType: "array", + $data: true, + error: { + message: "must be equal to one of the allowed values", + params: ({ schemaCode }) => (0, codegen_1$15._)`{allowedValues: ${schemaCode}}` + }, + code(cxt) { + const { gen, data, $data, schema: schema2, schemaCode, it } = cxt; + if (!$data && schema2.length === 0) throw new Error("enum must have non-empty array"); + const useLoop = schema2.length >= it.opts.loopEnum; + let eql; + const getEql = () => eql !== null && eql !== void 0 ? eql : eql = (0, util_1$15.useFunc)(gen, equal_1.default); + let valid; + if (useLoop || $data) { + valid = gen.let("valid"); + cxt.block$data(valid, loopEnum); + } else { + if (!Array.isArray(schema2)) throw new Error("ajv implementation error"); + const vSchema = gen.const("vSchema", schemaCode); + valid = (0, codegen_1$15.or)(...schema2.map((_x, i$3) => equalCode(vSchema, i$3))); + } + cxt.pass(valid); + function loopEnum() { + gen.assign(valid, false); + gen.forOf("v", schemaCode, (v) => gen.if((0, codegen_1$15._)`${getEql()}(${data}, ${v})`, () => gen.assign(valid, true).break())); + } + function equalCode(vSchema, i$3) { + const sch = schema2[i$3]; + return typeof sch === "object" && sch !== null ? (0, codegen_1$15._)`${getEql()}(${data}, ${vSchema}[${i$3}])` : (0, codegen_1$15._)`${data} === ${sch}`; + } + } + }; + exports.default = def$18; +})); +var require_validation3 = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + const limitNumber_1 = require_limitNumber3(); + const multipleOf_1 = require_multipleOf3(); + const limitLength_1 = require_limitLength3(); + const pattern_1 = require_pattern3(); + const limitProperties_1 = require_limitProperties3(); + const required_1 = require_required3(); + const limitItems_1 = require_limitItems3(); + const uniqueItems_1 = require_uniqueItems3(); + const const_1 = require_const3(); + const enum_1 = require_enum3(); + const validation = [ + limitNumber_1.default, + multipleOf_1.default, + limitLength_1.default, + pattern_1.default, + limitProperties_1.default, + required_1.default, + limitItems_1.default, + uniqueItems_1.default, + { + keyword: "type", + schemaType: ["string", "array"] + }, + { + keyword: "nullable", + schemaType: "boolean" + }, + const_1.default, + enum_1.default + ]; + exports.default = validation; +})); +var require_additionalItems3 = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.validateAdditionalItems = void 0; + const codegen_1$14 = require_codegen3(); + const util_1$14 = require_util10(); + const def$17 = { + keyword: "additionalItems", + type: "array", + schemaType: ["boolean", "object"], + before: "uniqueItems", + error: { + message: ({ params: { len } }) => (0, codegen_1$14.str)`must NOT have more than ${len} items`, + params: ({ params: { len } }) => (0, codegen_1$14._)`{limit: ${len}}` + }, + code(cxt) { + const { parentSchema, it } = cxt; + const { items } = parentSchema; + if (!Array.isArray(items)) { + (0, util_1$14.checkStrictMode)(it, '"additionalItems" is ignored when "items" is not an array of schemas'); + return; + } + validateAdditionalItems(cxt, items); + } + }; + function validateAdditionalItems(cxt, items) { + const { gen, schema: schema2, data, keyword, it } = cxt; + it.items = true; + const len = gen.const("len", (0, codegen_1$14._)`${data}.length`); + if (schema2 === false) { + cxt.setParams({ len: items.length }); + cxt.pass((0, codegen_1$14._)`${len} <= ${items.length}`); + } else if (typeof schema2 == "object" && !(0, util_1$14.alwaysValidSchema)(it, schema2)) { + const valid = gen.var("valid", (0, codegen_1$14._)`${len} <= ${items.length}`); + gen.if((0, codegen_1$14.not)(valid), () => validateItems(valid)); + cxt.ok(valid); + } + function validateItems(valid) { + gen.forRange("i", items.length, len, (i$3) => { + cxt.subschema({ + keyword, + dataProp: i$3, + dataPropType: util_1$14.Type.Num + }, valid); + if (!it.allErrors) gen.if((0, codegen_1$14.not)(valid), () => gen.break()); + }); + } + } + exports.validateAdditionalItems = validateAdditionalItems; + exports.default = def$17; +})); +var require_items3 = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.validateTuple = void 0; + const codegen_1$13 = require_codegen3(); + const util_1$13 = require_util10(); + const code_1$5 = require_code5(); + const def$16 = { + keyword: "items", + type: "array", + schemaType: [ + "object", + "array", + "boolean" + ], + before: "uniqueItems", + code(cxt) { + const { schema: schema2, it } = cxt; + if (Array.isArray(schema2)) return validateTuple(cxt, "additionalItems", schema2); + it.items = true; + if ((0, util_1$13.alwaysValidSchema)(it, schema2)) return; + cxt.ok((0, code_1$5.validateArray)(cxt)); + } + }; + function validateTuple(cxt, extraItems, schArr = cxt.schema) { + const { gen, parentSchema, data, keyword, it } = cxt; + checkStrictTuple(parentSchema); + if (it.opts.unevaluated && schArr.length && it.items !== true) it.items = util_1$13.mergeEvaluated.items(gen, schArr.length, it.items); + const valid = gen.name("valid"); + const len = gen.const("len", (0, codegen_1$13._)`${data}.length`); + schArr.forEach((sch, i$3) => { + if ((0, util_1$13.alwaysValidSchema)(it, sch)) return; + gen.if((0, codegen_1$13._)`${len} > ${i$3}`, () => cxt.subschema({ + keyword, + schemaProp: i$3, + dataProp: i$3 + }, valid)); + cxt.ok(valid); + }); + function checkStrictTuple(sch) { + const { opts, errSchemaPath } = it; + const l = schArr.length; + const fullTuple = l === sch.minItems && (l === sch.maxItems || sch[extraItems] === false); + if (opts.strictTuples && !fullTuple) { + const msg = `"${keyword}" is ${l}-tuple, but minItems or maxItems/${extraItems} are not specified or different at path "${errSchemaPath}"`; + (0, util_1$13.checkStrictMode)(it, msg, opts.strictTuples); + } + } + } + exports.validateTuple = validateTuple; + exports.default = def$16; +})); +var require_prefixItems3 = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + const items_1$1 = require_items3(); + const def$15 = { + keyword: "prefixItems", + type: "array", + schemaType: ["array"], + before: "uniqueItems", + code: (cxt) => (0, items_1$1.validateTuple)(cxt, "items") + }; + exports.default = def$15; +})); +var require_items20203 = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + const codegen_1$12 = require_codegen3(); + const util_1$12 = require_util10(); + const code_1$4 = require_code5(); + const additionalItems_1$1 = require_additionalItems3(); + const def$14 = { + keyword: "items", + type: "array", + schemaType: ["object", "boolean"], + before: "uniqueItems", + error: { + message: ({ params: { len } }) => (0, codegen_1$12.str)`must NOT have more than ${len} items`, + params: ({ params: { len } }) => (0, codegen_1$12._)`{limit: ${len}}` + }, + code(cxt) { + const { schema: schema2, parentSchema, it } = cxt; + const { prefixItems } = parentSchema; + it.items = true; + if ((0, util_1$12.alwaysValidSchema)(it, schema2)) return; + if (prefixItems) (0, additionalItems_1$1.validateAdditionalItems)(cxt, prefixItems); + else cxt.ok((0, code_1$4.validateArray)(cxt)); + } + }; + exports.default = def$14; +})); +var require_contains3 = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + const codegen_1$11 = require_codegen3(); + const util_1$11 = require_util10(); + const def$13 = { + keyword: "contains", + type: "array", + schemaType: ["object", "boolean"], + before: "uniqueItems", + trackErrors: true, + error: { + message: ({ params: { min, max } }) => max === void 0 ? (0, codegen_1$11.str)`must contain at least ${min} valid item(s)` : (0, codegen_1$11.str)`must contain at least ${min} and no more than ${max} valid item(s)`, + params: ({ params: { min, max } }) => max === void 0 ? (0, codegen_1$11._)`{minContains: ${min}}` : (0, codegen_1$11._)`{minContains: ${min}, maxContains: ${max}}` + }, + code(cxt) { + const { gen, schema: schema2, parentSchema, data, it } = cxt; + let min; + let max; + const { minContains, maxContains } = parentSchema; + if (it.opts.next) { + min = minContains === void 0 ? 1 : minContains; + max = maxContains; + } else min = 1; + const len = gen.const("len", (0, codegen_1$11._)`${data}.length`); + cxt.setParams({ + min, + max + }); + if (max === void 0 && min === 0) { + (0, util_1$11.checkStrictMode)(it, `"minContains" == 0 without "maxContains": "contains" keyword ignored`); + return; + } + if (max !== void 0 && min > max) { + (0, util_1$11.checkStrictMode)(it, `"minContains" > "maxContains" is always invalid`); + cxt.fail(); + return; + } + if ((0, util_1$11.alwaysValidSchema)(it, schema2)) { + let cond = (0, codegen_1$11._)`${len} >= ${min}`; + if (max !== void 0) cond = (0, codegen_1$11._)`${cond} && ${len} <= ${max}`; + cxt.pass(cond); + return; + } + it.items = true; + const valid = gen.name("valid"); + if (max === void 0 && min === 1) validateItems(valid, () => gen.if(valid, () => gen.break())); + else if (min === 0) { + gen.let(valid, true); + if (max !== void 0) gen.if((0, codegen_1$11._)`${data}.length > 0`, validateItemsWithCount); + } else { + gen.let(valid, false); + validateItemsWithCount(); + } + cxt.result(valid, () => cxt.reset()); + function validateItemsWithCount() { + const schValid = gen.name("_valid"); + const count = gen.let("count", 0); + validateItems(schValid, () => gen.if(schValid, () => checkLimits(count))); + } + function validateItems(_valid, block) { + gen.forRange("i", 0, len, (i$3) => { + cxt.subschema({ + keyword: "contains", + dataProp: i$3, + dataPropType: util_1$11.Type.Num, + compositeRule: true + }, _valid); + block(); + }); + } + function checkLimits(count) { + gen.code((0, codegen_1$11._)`${count}++`); + if (max === void 0) gen.if((0, codegen_1$11._)`${count} >= ${min}`, () => gen.assign(valid, true).break()); + else { + gen.if((0, codegen_1$11._)`${count} > ${max}`, () => gen.assign(valid, false).break()); + if (min === 1) gen.assign(valid, true); + else gen.if((0, codegen_1$11._)`${count} >= ${min}`, () => gen.assign(valid, true)); + } + } + } + }; + exports.default = def$13; +})); +var require_dependencies3 = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.validateSchemaDeps = exports.validatePropertyDeps = exports.error = void 0; + const codegen_1$10 = require_codegen3(); + const util_1$10 = require_util10(); + const code_1$3 = require_code5(); + exports.error = { + message: ({ params: { property, depsCount, deps } }) => { + const property_ies = depsCount === 1 ? "property" : "properties"; + return (0, codegen_1$10.str)`must have ${property_ies} ${deps} when property ${property} is present`; + }, + params: ({ params: { property, depsCount, deps, missingProperty } }) => (0, codegen_1$10._)`{property: ${property}, + missingProperty: ${missingProperty}, + depsCount: ${depsCount}, + deps: ${deps}}` + }; + const def$12 = { + keyword: "dependencies", + type: "object", + schemaType: "object", + error: exports.error, + code(cxt) { + const [propDeps, schDeps] = splitDependencies(cxt); + validatePropertyDeps(cxt, propDeps); + validateSchemaDeps(cxt, schDeps); + } + }; + function splitDependencies({ schema: schema2 }) { + const propertyDeps = {}; + const schemaDeps = {}; + for (const key$1 in schema2) { + if (key$1 === "__proto__") continue; + const deps = Array.isArray(schema2[key$1]) ? propertyDeps : schemaDeps; + deps[key$1] = schema2[key$1]; + } + return [propertyDeps, schemaDeps]; + } + function validatePropertyDeps(cxt, propertyDeps = cxt.schema) { + const { gen, data, it } = cxt; + if (Object.keys(propertyDeps).length === 0) return; + const missing = gen.let("missing"); + for (const prop in propertyDeps) { + const deps = propertyDeps[prop]; + if (deps.length === 0) continue; + const hasProperty = (0, code_1$3.propertyInData)(gen, data, prop, it.opts.ownProperties); + cxt.setParams({ + property: prop, + depsCount: deps.length, + deps: deps.join(", ") + }); + if (it.allErrors) gen.if(hasProperty, () => { + for (const depProp of deps) (0, code_1$3.checkReportMissingProp)(cxt, depProp); + }); + else { + gen.if((0, codegen_1$10._)`${hasProperty} && (${(0, code_1$3.checkMissingProp)(cxt, deps, missing)})`); + (0, code_1$3.reportMissingProp)(cxt, missing); + gen.else(); + } + } + } + exports.validatePropertyDeps = validatePropertyDeps; + function validateSchemaDeps(cxt, schemaDeps = cxt.schema) { + const { gen, data, keyword, it } = cxt; + const valid = gen.name("valid"); + for (const prop in schemaDeps) { + if ((0, util_1$10.alwaysValidSchema)(it, schemaDeps[prop])) continue; + gen.if((0, code_1$3.propertyInData)(gen, data, prop, it.opts.ownProperties), () => { + const schCxt = cxt.subschema({ + keyword, + schemaProp: prop + }, valid); + cxt.mergeValidEvaluated(schCxt, valid); + }, () => gen.var(valid, true)); + cxt.ok(valid); + } + } + exports.validateSchemaDeps = validateSchemaDeps; + exports.default = def$12; +})); +var require_propertyNames3 = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + const codegen_1$9 = require_codegen3(); + const util_1$9 = require_util10(); + const def$11 = { + keyword: "propertyNames", + type: "object", + schemaType: ["object", "boolean"], + error: { + message: "property name must be valid", + params: ({ params }) => (0, codegen_1$9._)`{propertyName: ${params.propertyName}}` + }, + code(cxt) { + const { gen, schema: schema2, data, it } = cxt; + if ((0, util_1$9.alwaysValidSchema)(it, schema2)) return; + const valid = gen.name("valid"); + gen.forIn("key", data, (key$1) => { + cxt.setParams({ propertyName: key$1 }); + cxt.subschema({ + keyword: "propertyNames", + data: key$1, + dataTypes: ["string"], + propertyName: key$1, + compositeRule: true + }, valid); + gen.if((0, codegen_1$9.not)(valid), () => { + cxt.error(true); + if (!it.allErrors) gen.break(); + }); + }); + cxt.ok(valid); + } + }; + exports.default = def$11; +})); +var require_additionalProperties3 = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + const code_1$2 = require_code5(); + const codegen_1$8 = require_codegen3(); + const names_1 = require_names3(); + const util_1$8 = require_util10(); + const def$10 = { + keyword: "additionalProperties", + type: ["object"], + schemaType: ["boolean", "object"], + allowUndefined: true, + trackErrors: true, + error: { + message: "must NOT have additional properties", + params: ({ params }) => (0, codegen_1$8._)`{additionalProperty: ${params.additionalProperty}}` + }, + code(cxt) { + const { gen, schema: schema2, parentSchema, data, errsCount, it } = cxt; + if (!errsCount) throw new Error("ajv implementation error"); + const { allErrors, opts } = it; + it.props = true; + if (opts.removeAdditional !== "all" && (0, util_1$8.alwaysValidSchema)(it, schema2)) return; + const props = (0, code_1$2.allSchemaProperties)(parentSchema.properties); + const patProps = (0, code_1$2.allSchemaProperties)(parentSchema.patternProperties); + checkAdditionalProperties(); + cxt.ok((0, codegen_1$8._)`${errsCount} === ${names_1.default.errors}`); + function checkAdditionalProperties() { + gen.forIn("key", data, (key$1) => { + if (!props.length && !patProps.length) additionalPropertyCode(key$1); + else gen.if(isAdditional(key$1), () => additionalPropertyCode(key$1)); + }); + } + function isAdditional(key$1) { + let definedProp; + if (props.length > 8) { + const propsSchema = (0, util_1$8.schemaRefOrVal)(it, parentSchema.properties, "properties"); + definedProp = (0, code_1$2.isOwnProperty)(gen, propsSchema, key$1); + } else if (props.length) definedProp = (0, codegen_1$8.or)(...props.map((p) => (0, codegen_1$8._)`${key$1} === ${p}`)); + else definedProp = codegen_1$8.nil; + if (patProps.length) definedProp = (0, codegen_1$8.or)(definedProp, ...patProps.map((p) => (0, codegen_1$8._)`${(0, code_1$2.usePattern)(cxt, p)}.test(${key$1})`)); + return (0, codegen_1$8.not)(definedProp); + } + function deleteAdditional(key$1) { + gen.code((0, codegen_1$8._)`delete ${data}[${key$1}]`); + } + function additionalPropertyCode(key$1) { + if (opts.removeAdditional === "all" || opts.removeAdditional && schema2 === false) { + deleteAdditional(key$1); + return; + } + if (schema2 === false) { + cxt.setParams({ additionalProperty: key$1 }); + cxt.error(); + if (!allErrors) gen.break(); + return; + } + if (typeof schema2 == "object" && !(0, util_1$8.alwaysValidSchema)(it, schema2)) { + const valid = gen.name("valid"); + if (opts.removeAdditional === "failing") { + applyAdditionalSchema(key$1, valid, false); + gen.if((0, codegen_1$8.not)(valid), () => { + cxt.reset(); + deleteAdditional(key$1); + }); + } else { + applyAdditionalSchema(key$1, valid); + if (!allErrors) gen.if((0, codegen_1$8.not)(valid), () => gen.break()); + } + } + } + function applyAdditionalSchema(key$1, valid, errors) { + const subschema = { + keyword: "additionalProperties", + dataProp: key$1, + dataPropType: util_1$8.Type.Str + }; + if (errors === false) Object.assign(subschema, { + compositeRule: true, + createErrors: false, + allErrors: false + }); + cxt.subschema(subschema, valid); + } + } + }; + exports.default = def$10; +})); +var require_properties3 = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + const validate_1$1 = require_validate3(); + const code_1$1 = require_code5(); + const util_1$7 = require_util10(); + const additionalProperties_1$1 = require_additionalProperties3(); + const def$9 = { + keyword: "properties", + type: "object", + schemaType: "object", + code(cxt) { + const { gen, schema: schema2, parentSchema, data, it } = cxt; + if (it.opts.removeAdditional === "all" && parentSchema.additionalProperties === void 0) additionalProperties_1$1.default.code(new validate_1$1.KeywordCxt(it, additionalProperties_1$1.default, "additionalProperties")); + const allProps = (0, code_1$1.allSchemaProperties)(schema2); + for (const prop of allProps) it.definedProperties.add(prop); + if (it.opts.unevaluated && allProps.length && it.props !== true) it.props = util_1$7.mergeEvaluated.props(gen, (0, util_1$7.toHash)(allProps), it.props); + const properties = allProps.filter((p) => !(0, util_1$7.alwaysValidSchema)(it, schema2[p])); + if (properties.length === 0) return; + const valid = gen.name("valid"); + for (const prop of properties) { + if (hasDefault(prop)) applyPropertySchema(prop); + else { + gen.if((0, code_1$1.propertyInData)(gen, data, prop, it.opts.ownProperties)); + applyPropertySchema(prop); + if (!it.allErrors) gen.else().var(valid, true); + gen.endIf(); + } + cxt.it.definedProperties.add(prop); + cxt.ok(valid); + } + function hasDefault(prop) { + return it.opts.useDefaults && !it.compositeRule && schema2[prop].default !== void 0; + } + function applyPropertySchema(prop) { + cxt.subschema({ + keyword: "properties", + schemaProp: prop, + dataProp: prop + }, valid); + } + } + }; + exports.default = def$9; +})); +var require_patternProperties3 = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + const code_1 = require_code5(); + const codegen_1$7 = require_codegen3(); + const util_1$6 = require_util10(); + const util_2 = require_util10(); + const def$8 = { + keyword: "patternProperties", + type: "object", + schemaType: "object", + code(cxt) { + const { gen, schema: schema2, data, parentSchema, it } = cxt; + const { opts } = it; + const patterns = (0, code_1.allSchemaProperties)(schema2); + const alwaysValidPatterns = patterns.filter((p) => (0, util_1$6.alwaysValidSchema)(it, schema2[p])); + if (patterns.length === 0 || alwaysValidPatterns.length === patterns.length && (!it.opts.unevaluated || it.props === true)) return; + const checkProperties = opts.strictSchema && !opts.allowMatchingProperties && parentSchema.properties; + const valid = gen.name("valid"); + if (it.props !== true && !(it.props instanceof codegen_1$7.Name)) it.props = (0, util_2.evaluatedPropsToName)(gen, it.props); + const { props } = it; + validatePatternProperties(); + function validatePatternProperties() { + for (const pat of patterns) { + if (checkProperties) checkMatchingProperties(pat); + if (it.allErrors) validateProperties(pat); + else { + gen.var(valid, true); + validateProperties(pat); + gen.if(valid); + } + } + } + function checkMatchingProperties(pat) { + for (const prop in checkProperties) if (new RegExp(pat).test(prop)) (0, util_1$6.checkStrictMode)(it, `property ${prop} matches pattern ${pat} (use allowMatchingProperties)`); + } + function validateProperties(pat) { + gen.forIn("key", data, (key$1) => { + gen.if((0, codegen_1$7._)`${(0, code_1.usePattern)(cxt, pat)}.test(${key$1})`, () => { + const alwaysValid = alwaysValidPatterns.includes(pat); + if (!alwaysValid) cxt.subschema({ + keyword: "patternProperties", + schemaProp: pat, + dataProp: key$1, + dataPropType: util_2.Type.Str + }, valid); + if (it.opts.unevaluated && props !== true) gen.assign((0, codegen_1$7._)`${props}[${key$1}]`, true); + else if (!alwaysValid && !it.allErrors) gen.if((0, codegen_1$7.not)(valid), () => gen.break()); + }); + }); + } + } + }; + exports.default = def$8; +})); +var require_not3 = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + const util_1$5 = require_util10(); + const def$7 = { + keyword: "not", + schemaType: ["object", "boolean"], + trackErrors: true, + code(cxt) { + const { gen, schema: schema2, it } = cxt; + if ((0, util_1$5.alwaysValidSchema)(it, schema2)) { + cxt.fail(); + return; + } + const valid = gen.name("valid"); + cxt.subschema({ + keyword: "not", + compositeRule: true, + createErrors: false, + allErrors: false + }, valid); + cxt.failResult(valid, () => cxt.reset(), () => cxt.error()); + }, + error: { message: "must NOT be valid" } + }; + exports.default = def$7; +})); +var require_anyOf3 = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + const def$6 = { + keyword: "anyOf", + schemaType: "array", + trackErrors: true, + code: require_code5().validateUnion, + error: { message: "must match a schema in anyOf" } + }; + exports.default = def$6; +})); +var require_oneOf3 = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + const codegen_1$6 = require_codegen3(); + const util_1$4 = require_util10(); + const def$5 = { + keyword: "oneOf", + schemaType: "array", + trackErrors: true, + error: { + message: "must match exactly one schema in oneOf", + params: ({ params }) => (0, codegen_1$6._)`{passingSchemas: ${params.passing}}` + }, + code(cxt) { + const { gen, schema: schema2, parentSchema, it } = cxt; + if (!Array.isArray(schema2)) throw new Error("ajv implementation error"); + if (it.opts.discriminator && parentSchema.discriminator) return; + const schArr = schema2; + const valid = gen.let("valid", false); + const passing = gen.let("passing", null); + const schValid = gen.name("_valid"); + cxt.setParams({ passing }); + gen.block(validateOneOf); + cxt.result(valid, () => cxt.reset(), () => cxt.error(true)); + function validateOneOf() { + schArr.forEach((sch, i$3) => { + let schCxt; + if ((0, util_1$4.alwaysValidSchema)(it, sch)) gen.var(schValid, true); + else schCxt = cxt.subschema({ + keyword: "oneOf", + schemaProp: i$3, + compositeRule: true + }, schValid); + if (i$3 > 0) gen.if((0, codegen_1$6._)`${schValid} && ${valid}`).assign(valid, false).assign(passing, (0, codegen_1$6._)`[${passing}, ${i$3}]`).else(); + gen.if(schValid, () => { + gen.assign(valid, true); + gen.assign(passing, i$3); + if (schCxt) cxt.mergeEvaluated(schCxt, codegen_1$6.Name); + }); + }); + } + } + }; + exports.default = def$5; +})); +var require_allOf3 = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + const util_1$3 = require_util10(); + const def$4 = { + keyword: "allOf", + schemaType: "array", + code(cxt) { + const { gen, schema: schema2, it } = cxt; + if (!Array.isArray(schema2)) throw new Error("ajv implementation error"); + const valid = gen.name("valid"); + schema2.forEach((sch, i$3) => { + if ((0, util_1$3.alwaysValidSchema)(it, sch)) return; + const schCxt = cxt.subschema({ + keyword: "allOf", + schemaProp: i$3 + }, valid); + cxt.ok(valid); + cxt.mergeEvaluated(schCxt); + }); + } + }; + exports.default = def$4; +})); +var require_if3 = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + const codegen_1$5 = require_codegen3(); + const util_1$2 = require_util10(); + const def$3 = { + keyword: "if", + schemaType: ["object", "boolean"], + trackErrors: true, + error: { + message: ({ params }) => (0, codegen_1$5.str)`must match "${params.ifClause}" schema`, + params: ({ params }) => (0, codegen_1$5._)`{failingKeyword: ${params.ifClause}}` + }, + code(cxt) { + const { gen, parentSchema, it } = cxt; + if (parentSchema.then === void 0 && parentSchema.else === void 0) (0, util_1$2.checkStrictMode)(it, '"if" without "then" and "else" is ignored'); + const hasThen = hasSchema(it, "then"); + const hasElse = hasSchema(it, "else"); + if (!hasThen && !hasElse) return; + const valid = gen.let("valid", true); + const schValid = gen.name("_valid"); + validateIf(); + cxt.reset(); + if (hasThen && hasElse) { + const ifClause = gen.let("ifClause"); + cxt.setParams({ ifClause }); + gen.if(schValid, validateClause("then", ifClause), validateClause("else", ifClause)); + } else if (hasThen) gen.if(schValid, validateClause("then")); + else gen.if((0, codegen_1$5.not)(schValid), validateClause("else")); + cxt.pass(valid, () => cxt.error(true)); + function validateIf() { + const schCxt = cxt.subschema({ + keyword: "if", + compositeRule: true, + createErrors: false, + allErrors: false + }, schValid); + cxt.mergeEvaluated(schCxt); + } + function validateClause(keyword, ifClause) { + return () => { + const schCxt = cxt.subschema({ keyword }, schValid); + gen.assign(valid, schValid); + cxt.mergeValidEvaluated(schCxt, valid); + if (ifClause) gen.assign(ifClause, (0, codegen_1$5._)`${keyword}`); + else cxt.setParams({ ifClause: keyword }); + }; + } + } + }; + function hasSchema(it, keyword) { + const schema2 = it.schema[keyword]; + return schema2 !== void 0 && !(0, util_1$2.alwaysValidSchema)(it, schema2); + } + exports.default = def$3; +})); +var require_thenElse3 = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + const util_1$1 = require_util10(); + const def$2 = { + keyword: ["then", "else"], + schemaType: ["object", "boolean"], + code({ keyword, parentSchema, it }) { + if (parentSchema.if === void 0) (0, util_1$1.checkStrictMode)(it, `"${keyword}" without "if" is ignored`); + } + }; + exports.default = def$2; +})); +var require_applicator3 = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + const additionalItems_1 = require_additionalItems3(); + const prefixItems_1 = require_prefixItems3(); + const items_1 = require_items3(); + const items2020_1 = require_items20203(); + const contains_1 = require_contains3(); + const dependencies_1 = require_dependencies3(); + const propertyNames_1 = require_propertyNames3(); + const additionalProperties_1 = require_additionalProperties3(); + const properties_1 = require_properties3(); + const patternProperties_1 = require_patternProperties3(); + const not_1 = require_not3(); + const anyOf_1 = require_anyOf3(); + const oneOf_1 = require_oneOf3(); + const allOf_1 = require_allOf3(); + const if_1 = require_if3(); + const thenElse_1 = require_thenElse3(); + function getApplicator(draft2020 = false) { + const applicator = [ + not_1.default, + anyOf_1.default, + oneOf_1.default, + allOf_1.default, + if_1.default, + thenElse_1.default, + propertyNames_1.default, + additionalProperties_1.default, + dependencies_1.default, + properties_1.default, + patternProperties_1.default + ]; + if (draft2020) applicator.push(prefixItems_1.default, items2020_1.default); + else applicator.push(additionalItems_1.default, items_1.default); + applicator.push(contains_1.default); + return applicator; + } + exports.default = getApplicator; +})); +var require_format$1 = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + const codegen_1$4 = require_codegen3(); + const def$1 = { + keyword: "format", + type: ["number", "string"], + schemaType: "string", + $data: true, + error: { + message: ({ schemaCode }) => (0, codegen_1$4.str)`must match format "${schemaCode}"`, + params: ({ schemaCode }) => (0, codegen_1$4._)`{format: ${schemaCode}}` + }, + code(cxt, ruleType) { + const { gen, data, $data, schema: schema2, schemaCode, it } = cxt; + const { opts, errSchemaPath, schemaEnv, self: self2 } = it; + if (!opts.validateFormats) return; + if ($data) validate$DataFormat(); + else validateFormat(); + function validate$DataFormat() { + const fmts = gen.scopeValue("formats", { + ref: self2.formats, + code: opts.code.formats + }); + const fDef = gen.const("fDef", (0, codegen_1$4._)`${fmts}[${schemaCode}]`); + const fType = gen.let("fType"); + const format$2 = gen.let("format"); + gen.if((0, codegen_1$4._)`typeof ${fDef} == "object" && !(${fDef} instanceof RegExp)`, () => gen.assign(fType, (0, codegen_1$4._)`${fDef}.type || "string"`).assign(format$2, (0, codegen_1$4._)`${fDef}.validate`), () => gen.assign(fType, (0, codegen_1$4._)`"string"`).assign(format$2, fDef)); + cxt.fail$data((0, codegen_1$4.or)(unknownFmt(), invalidFmt())); + function unknownFmt() { + if (opts.strictSchema === false) return codegen_1$4.nil; + return (0, codegen_1$4._)`${schemaCode} && !${format$2}`; + } + function invalidFmt() { + const callFormat = schemaEnv.$async ? (0, codegen_1$4._)`(${fDef}.async ? await ${format$2}(${data}) : ${format$2}(${data}))` : (0, codegen_1$4._)`${format$2}(${data})`; + const validData = (0, codegen_1$4._)`(typeof ${format$2} == "function" ? ${callFormat} : ${format$2}.test(${data}))`; + return (0, codegen_1$4._)`${format$2} && ${format$2} !== true && ${fType} === ${ruleType} && !${validData}`; + } + } + function validateFormat() { + const formatDef = self2.formats[schema2]; + if (!formatDef) { + unknownFormat(); + return; + } + if (formatDef === true) return; + const [fmtType, format$2, fmtRef] = getFormat(formatDef); + if (fmtType === ruleType) cxt.pass(validCondition()); + function unknownFormat() { + if (opts.strictSchema === false) { + self2.logger.warn(unknownMsg()); + return; + } + throw new Error(unknownMsg()); + function unknownMsg() { + return `unknown format "${schema2}" ignored in schema at path "${errSchemaPath}"`; + } + } + function getFormat(fmtDef$1) { + const code = fmtDef$1 instanceof RegExp ? (0, codegen_1$4.regexpCode)(fmtDef$1) : opts.code.formats ? (0, codegen_1$4._)`${opts.code.formats}${(0, codegen_1$4.getProperty)(schema2)}` : void 0; + const fmt = gen.scopeValue("formats", { + key: schema2, + ref: fmtDef$1, + code + }); + if (typeof fmtDef$1 == "object" && !(fmtDef$1 instanceof RegExp)) return [ + fmtDef$1.type || "string", + fmtDef$1.validate, + (0, codegen_1$4._)`${fmt}.validate` + ]; + return [ + "string", + fmtDef$1, + fmt + ]; + } + function validCondition() { + if (typeof formatDef == "object" && !(formatDef instanceof RegExp) && formatDef.async) { + if (!schemaEnv.$async) throw new Error("async format in sync schema"); + return (0, codegen_1$4._)`await ${fmtRef}(${data})`; + } + return typeof format$2 == "function" ? (0, codegen_1$4._)`${fmtRef}(${data})` : (0, codegen_1$4._)`${fmtRef}.test(${data})`; + } + } + } + }; + exports.default = def$1; +})); +var require_format5 = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + const format2 = [require_format$1().default]; + exports.default = format2; +})); +var require_metadata3 = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.contentVocabulary = exports.metadataVocabulary = void 0; + exports.metadataVocabulary = [ + "title", + "description", + "default", + "deprecated", + "readOnly", + "writeOnly", + "examples" + ]; + exports.contentVocabulary = [ + "contentMediaType", + "contentEncoding", + "contentSchema" + ]; +})); +var require_draft73 = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + const core_1$1 = require_core5(); + const validation_1 = require_validation3(); + const applicator_1 = require_applicator3(); + const format_1 = require_format5(); + const metadata_1 = require_metadata3(); + const draft7Vocabularies = [ + core_1$1.default, + validation_1.default, + (0, applicator_1.default)(), + format_1.default, + metadata_1.metadataVocabulary, + metadata_1.contentVocabulary + ]; + exports.default = draft7Vocabularies; +})); +var require_types3 = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.DiscrError = void 0; + var DiscrError; + (function(DiscrError$1) { + DiscrError$1["Tag"] = "tag"; + DiscrError$1["Mapping"] = "mapping"; + })(DiscrError || (exports.DiscrError = DiscrError = {})); +})); +var require_discriminator3 = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + const codegen_1$3 = require_codegen3(); + const types_1 = require_types3(); + const compile_1 = require_compile3(); + const ref_error_1$1 = require_ref_error3(); + const util_1 = require_util10(); + const def = { + keyword: "discriminator", + type: "object", + schemaType: "object", + error: { + message: ({ params: { discrError, tagName } }) => discrError === types_1.DiscrError.Tag ? `tag "${tagName}" must be string` : `value of tag "${tagName}" must be in oneOf`, + params: ({ params: { discrError, tag, tagName } }) => (0, codegen_1$3._)`{error: ${discrError}, tag: ${tagName}, tagValue: ${tag}}` + }, + code(cxt) { + const { gen, data, schema: schema2, parentSchema, it } = cxt; + const { oneOf } = parentSchema; + if (!it.opts.discriminator) throw new Error("discriminator: requires discriminator option"); + const tagName = schema2.propertyName; + if (typeof tagName != "string") throw new Error("discriminator: requires propertyName"); + if (schema2.mapping) throw new Error("discriminator: mapping is not supported"); + if (!oneOf) throw new Error("discriminator: requires oneOf keyword"); + const valid = gen.let("valid", false); + const tag = gen.const("tag", (0, codegen_1$3._)`${data}${(0, codegen_1$3.getProperty)(tagName)}`); + gen.if((0, codegen_1$3._)`typeof ${tag} == "string"`, () => validateMapping(), () => cxt.error(false, { + discrError: types_1.DiscrError.Tag, + tag, + tagName + })); + cxt.ok(valid); + function validateMapping() { + const mapping = getMapping(); + gen.if(false); + for (const tagValue in mapping) { + gen.elseIf((0, codegen_1$3._)`${tag} === ${tagValue}`); + gen.assign(valid, applyTagSchema(mapping[tagValue])); + } + gen.else(); + cxt.error(false, { + discrError: types_1.DiscrError.Mapping, + tag, + tagName + }); + gen.endIf(); + } + function applyTagSchema(schemaProp) { + const _valid = gen.name("valid"); + const schCxt = cxt.subschema({ + keyword: "oneOf", + schemaProp + }, _valid); + cxt.mergeEvaluated(schCxt, codegen_1$3.Name); + return _valid; + } + function getMapping() { + var _a2; + const oneOfMapping = {}; + const topRequired = hasRequired(parentSchema); + let tagRequired = true; + for (let i$3 = 0; i$3 < oneOf.length; i$3++) { + let sch = oneOf[i$3]; + if ((sch === null || sch === void 0 ? void 0 : sch.$ref) && !(0, util_1.schemaHasRulesButRef)(sch, it.self.RULES)) { + const ref = sch.$ref; + sch = compile_1.resolveRef.call(it.self, it.schemaEnv.root, it.baseId, ref); + if (sch instanceof compile_1.SchemaEnv) sch = sch.schema; + if (sch === void 0) throw new ref_error_1$1.default(it.opts.uriResolver, it.baseId, ref); + } + const propSch = (_a2 = sch === null || sch === void 0 ? void 0 : sch.properties) === null || _a2 === void 0 ? void 0 : _a2[tagName]; + if (typeof propSch != "object") throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${tagName}"`); + tagRequired = tagRequired && (topRequired || hasRequired(sch)); + addMappings(propSch, i$3); + } + if (!tagRequired) throw new Error(`discriminator: "${tagName}" must be required`); + return oneOfMapping; + function hasRequired({ required: required$1 }) { + return Array.isArray(required$1) && required$1.includes(tagName); + } + function addMappings(sch, i$3) { + if (sch.const) addMapping(sch.const, i$3); + else if (sch.enum) for (const tagValue of sch.enum) addMapping(tagValue, i$3); + else throw new Error(`discriminator: "properties/${tagName}" must have "const" or "enum"`); + } + function addMapping(tagValue, i$3) { + if (typeof tagValue != "string" || tagValue in oneOfMapping) throw new Error(`discriminator: "${tagName}" values must be unique strings`); + oneOfMapping[tagValue] = i$3; + } + } + } + }; + exports.default = def; +})); +var require_json_schema_draft_073 = /* @__PURE__ */ __commonJSMin(((exports, module) => { module.exports = { "$schema": "http://json-schema.org/draft-07/schema#", "$id": "http://json-schema.org/draft-07/schema#", @@ -122267,473 +133462,412 @@ var require_json_schema_draft_073 = /* @__PURE__ */ __commonJS3({ "node_modules/ }, "default": true }; -}) }); -var require_definition_schema3 = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/definition_schema.js": ((exports, module) => { - var metaSchema = require_json_schema_draft_073(); - module.exports = { - $id: "https://github.com/ajv-validator/ajv/blob/master/lib/definition_schema.js", - definitions: { simpleTypes: metaSchema.definitions.simpleTypes }, - type: "object", - dependencies: { - schema: ["validate"], - $data: ["validate"], - statements: ["inline"], - valid: { not: { required: ["macro"] } } - }, - properties: { - type: metaSchema.properties.type, - schema: { type: "boolean" }, - statements: { type: "boolean" }, - dependencies: { - type: "array", - items: { type: "string" } - }, - metaSchema: { type: "object" }, - modifying: { type: "boolean" }, - valid: { type: "boolean" }, - $data: { type: "boolean" }, - async: { type: "boolean" }, - errors: { anyOf: [{ type: "boolean" }, { const: "full" }] } +})); +var require_ajv3 = /* @__PURE__ */ __commonJSMin(((exports, module) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.MissingRefError = exports.ValidationError = exports.CodeGen = exports.Name = exports.nil = exports.stringify = exports.str = exports._ = exports.KeywordCxt = exports.Ajv = void 0; + const core_1 = require_core$1(); + const draft7_1 = require_draft73(); + const discriminator_1 = require_discriminator3(); + const draft7MetaSchema = require_json_schema_draft_073(); + const META_SUPPORT_DATA = ["/properties"]; + const META_SCHEMA_ID = "http://json-schema.org/draft-07/schema"; + var Ajv$1 = class extends core_1.default { + _addVocabularies() { + super._addVocabularies(); + draft7_1.default.forEach((v) => this.addVocabulary(v)); + if (this.opts.discriminator) this.addKeyword(discriminator_1.default); + } + _addDefaultMetaSchema() { + super._addDefaultMetaSchema(); + if (!this.opts.meta) return; + const metaSchema = this.opts.$data ? this.$dataMetaSchema(draft7MetaSchema, META_SUPPORT_DATA) : draft7MetaSchema; + this.addMetaSchema(metaSchema, META_SCHEMA_ID, false); + this.refs["http://json-schema.org/schema"] = META_SCHEMA_ID; + } + defaultMeta() { + return this.opts.defaultMeta = super.defaultMeta() || (this.getSchema(META_SCHEMA_ID) ? META_SCHEMA_ID : void 0); } }; -}) }); -var require_keyword3 = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/keyword.js": ((exports, module) => { - var IDENTIFIER = /^[a-z_$][a-z0-9_$-]*$/i; - var customRuleCode = require_custom3(); - var definitionSchema = require_definition_schema3(); - module.exports = { - add: addKeyword, - get: getKeyword, - remove: removeKeyword, - validate: validateKeyword - }; - function addKeyword(keyword, definition) { - var RULES = this.RULES; - if (RULES.keywords[keyword]) throw new Error("Keyword " + keyword + " is already defined"); - if (!IDENTIFIER.test(keyword)) throw new Error("Keyword " + keyword + " is not a valid identifier"); - if (definition) { - this.validateKeyword(definition, true); - var dataType = definition.type; - if (Array.isArray(dataType)) for (var i$3 = 0; i$3 < dataType.length; i$3++) _addRule(keyword, dataType[i$3], definition); - else _addRule(keyword, dataType, definition); - var metaSchema$1 = definition.metaSchema; - if (metaSchema$1) { - if (definition.$data && this._opts.$data) metaSchema$1 = { anyOf: [metaSchema$1, { "$ref": "https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#" }] }; - definition.validateSchema = this.compile(metaSchema$1, true); - } + exports.Ajv = Ajv$1; + module.exports = exports = Ajv$1; + module.exports.Ajv = Ajv$1; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.default = Ajv$1; + var validate_1 = require_validate3(); + Object.defineProperty(exports, "KeywordCxt", { + enumerable: true, + get: function() { + return validate_1.KeywordCxt; } - RULES.keywords[keyword] = RULES.all[keyword] = true; - function _addRule(keyword$1, dataType$1, definition$1) { - var ruleGroup; - for (var i$4 = 0; i$4 < RULES.length; i$4++) { - var rg = RULES[i$4]; - if (rg.type == dataType$1) { - ruleGroup = rg; - break; - } - } - if (!ruleGroup) { - ruleGroup = { - type: dataType$1, - rules: [] - }; - RULES.push(ruleGroup); - } - var rule = { - keyword: keyword$1, - definition: definition$1, - custom: true, - code: customRuleCode, - implements: definition$1.implements - }; - ruleGroup.rules.push(rule); - RULES.custom[keyword$1] = rule; + }); + var codegen_1$2 = require_codegen3(); + Object.defineProperty(exports, "_", { + enumerable: true, + get: function() { + return codegen_1$2._; } - return this; - } - function getKeyword(keyword) { - var rule = this.RULES.custom[keyword]; - return rule ? rule.definition : this.RULES.keywords[keyword] || false; - } - function removeKeyword(keyword) { - var RULES = this.RULES; - delete RULES.keywords[keyword]; - delete RULES.all[keyword]; - delete RULES.custom[keyword]; - for (var i$3 = 0; i$3 < RULES.length; i$3++) { - var rules$1 = RULES[i$3].rules; - for (var j = 0; j < rules$1.length; j++) if (rules$1[j].keyword == keyword) { - rules$1.splice(j, 1); - break; - } + }); + Object.defineProperty(exports, "str", { + enumerable: true, + get: function() { + return codegen_1$2.str; } - return this; - } - function validateKeyword(definition, throwError2) { - validateKeyword.errors = null; - var v = this._validateKeyword = this._validateKeyword || this.compile(definitionSchema, true); - if (v(definition)) return true; - validateKeyword.errors = v.errors; - if (throwError2) throw new Error("custom keyword definition is invalid: " + this.errorsText(v.errors)); - else return false; - } -}) }); -var require_data5 = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/refs/data.json": ((exports, module) => { - module.exports = { - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#", - "description": "Meta-schema for $data reference (JSON Schema extension proposal)", - "type": "object", - "required": ["$data"], - "properties": { "$data": { - "type": "string", - "anyOf": [{ "format": "relative-json-pointer" }, { "format": "json-pointer" }] - } }, - "additionalProperties": false - }; -}) }); -var require_ajv3 = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/ajv.js": ((exports, module) => { - var compileSchema = require_compile3(), resolve = require_resolve3(), Cache = require_cache4(), SchemaObject = require_schema_obj3(), stableStringify = require_fast_json_stable_stringify3(), formats = require_formats3(), rules = require_rules3(), $dataMetaSchema = require_data$1(), util3 = require_util10(); - module.exports = Ajv$2; - Ajv$2.prototype.validate = validate2; - Ajv$2.prototype.compile = compile; - Ajv$2.prototype.addSchema = addSchema; - Ajv$2.prototype.addMetaSchema = addMetaSchema; - Ajv$2.prototype.validateSchema = validateSchema; - Ajv$2.prototype.getSchema = getSchema; - Ajv$2.prototype.removeSchema = removeSchema; - Ajv$2.prototype.addFormat = addFormat2; - Ajv$2.prototype.errorsText = errorsText; - Ajv$2.prototype._addSchema = _addSchema; - Ajv$2.prototype._compile = _compile; - Ajv$2.prototype.compileAsync = require_async3(); - var customKeyword = require_keyword3(); - Ajv$2.prototype.addKeyword = customKeyword.add; - Ajv$2.prototype.getKeyword = customKeyword.get; - Ajv$2.prototype.removeKeyword = customKeyword.remove; - Ajv$2.prototype.validateKeyword = customKeyword.validate; - var errorClasses = require_error_classes3(); - Ajv$2.ValidationError = errorClasses.Validation; - Ajv$2.MissingRefError = errorClasses.MissingRef; - Ajv$2.$dataMetaSchema = $dataMetaSchema; - var META_SCHEMA_ID = "http://json-schema.org/draft-07/schema"; - var META_IGNORE_OPTIONS = [ - "removeAdditional", - "useDefaults", - "coerceTypes", - "strictDefaults" - ]; - var META_SUPPORT_DATA = ["/properties"]; - function Ajv$2(opts) { - if (!(this instanceof Ajv$2)) return new Ajv$2(opts); - opts = this._opts = util3.copy(opts) || {}; - setLogger(this); - this._schemas = {}; - this._refs = {}; - this._fragments = {}; - this._formats = formats(opts.format); - this._cache = opts.cache || new Cache(); - this._loadingSchemas = {}; - this._compilations = []; - this.RULES = rules(); - this._getId = chooseGetId(opts); - opts.loopRequired = opts.loopRequired || Infinity; - if (opts.errorDataPath == "property") opts._errorDataPathProperty = true; - if (opts.serialize === void 0) opts.serialize = stableStringify; - this._metaOpts = getMetaSchemaOptions(this); - if (opts.formats) addInitialFormats(this); - if (opts.keywords) addInitialKeywords(this); - addDefaultMetaSchema(this); - if (typeof opts.meta == "object") this.addMetaSchema(opts.meta); - if (opts.nullable) this.addKeyword("nullable", { metaSchema: { type: "boolean" } }); - addInitialSchemas(this); - } - function validate2(schemaKeyRef, data) { - var v; - if (typeof schemaKeyRef == "string") { - v = this.getSchema(schemaKeyRef); - if (!v) throw new Error('no schema with key or ref "' + schemaKeyRef + '"'); - } else { - var schemaObj = this._addSchema(schemaKeyRef); - v = schemaObj.validate || this._compile(schemaObj); + }); + Object.defineProperty(exports, "stringify", { + enumerable: true, + get: function() { + return codegen_1$2.stringify; } - var valid = v(data); - if (v.$async !== true) this.errors = v.errors; - return valid; - } - function compile(schema2, _meta) { - var schemaObj = this._addSchema(schema2, void 0, _meta); - return schemaObj.validate || this._compile(schemaObj); - } - function addSchema(schema2, key$1, _skipValidation, _meta) { - if (Array.isArray(schema2)) { - for (var i$3 = 0; i$3 < schema2.length; i$3++) this.addSchema(schema2[i$3], void 0, _skipValidation, _meta); - return this; + }); + Object.defineProperty(exports, "nil", { + enumerable: true, + get: function() { + return codegen_1$2.nil; } - var id = this._getId(schema2); - if (id !== void 0 && typeof id != "string") throw new Error("schema id must be string"); - key$1 = resolve.normalizeId(key$1 || id); - checkUnique(this, key$1); - this._schemas[key$1] = this._addSchema(schema2, _skipValidation, _meta, true); - return this; - } - function addMetaSchema(schema2, key$1, skipValidation) { - this.addSchema(schema2, key$1, skipValidation, true); - return this; - } - function validateSchema(schema2, throwOrLogError) { - var $schema = schema2.$schema; - if ($schema !== void 0 && typeof $schema != "string") throw new Error("$schema must be a string"); - $schema = $schema || this._opts.defaultMeta || defaultMeta(this); - if (!$schema) { - this.logger.warn("meta-schema not available"); - this.errors = null; - return true; + }); + Object.defineProperty(exports, "Name", { + enumerable: true, + get: function() { + return codegen_1$2.Name; } - var valid = this.validate($schema, schema2); - if (!valid && throwOrLogError) { - var message = "schema is invalid: " + this.errorsText(); - if (this._opts.validateSchema == "log") this.logger.error(message); - else throw new Error(message); + }); + Object.defineProperty(exports, "CodeGen", { + enumerable: true, + get: function() { + return codegen_1$2.CodeGen; } - return valid; - } - function defaultMeta(self2) { - var meta = self2._opts.meta; - self2._opts.defaultMeta = typeof meta == "object" ? self2._getId(meta) || meta : self2.getSchema(META_SCHEMA_ID) ? META_SCHEMA_ID : void 0; - return self2._opts.defaultMeta; - } - function getSchema(keyRef) { - var schemaObj = _getSchemaObj(this, keyRef); - switch (typeof schemaObj) { - case "object": - return schemaObj.validate || this._compile(schemaObj); - case "string": - return this.getSchema(schemaObj); - case "undefined": - return _getSchemaFragment(this, keyRef); + }); + var validation_error_1 = require_validation_error3(); + Object.defineProperty(exports, "ValidationError", { + enumerable: true, + get: function() { + return validation_error_1.default; } - } - function _getSchemaFragment(self2, ref) { - var res = resolve.schema.call(self2, { schema: {} }, ref); - if (res) { - var schema2 = res.schema, root2 = res.root, baseId = res.baseId; - var v = compileSchema.call(self2, schema2, root2, void 0, baseId); - self2._fragments[ref] = new SchemaObject({ - ref, - fragment: true, - schema: schema2, - root: root2, - baseId, - validate: v - }); - return v; + }); + var ref_error_1 = require_ref_error3(); + Object.defineProperty(exports, "MissingRefError", { + enumerable: true, + get: function() { + return ref_error_1.default; } - } - function _getSchemaObj(self2, keyRef) { - keyRef = resolve.normalizeId(keyRef); - return self2._schemas[keyRef] || self2._refs[keyRef] || self2._fragments[keyRef]; - } - function removeSchema(schemaKeyRef) { - if (schemaKeyRef instanceof RegExp) { - _removeAllSchemas(this, this._schemas, schemaKeyRef); - _removeAllSchemas(this, this._refs, schemaKeyRef); - return this; - } - switch (typeof schemaKeyRef) { - case "undefined": - _removeAllSchemas(this, this._schemas); - _removeAllSchemas(this, this._refs); - this._cache.clear(); - return this; - case "string": - var schemaObj = _getSchemaObj(this, schemaKeyRef); - if (schemaObj) this._cache.del(schemaObj.cacheKey); - delete this._schemas[schemaKeyRef]; - delete this._refs[schemaKeyRef]; - return this; - case "object": - var serialize = this._opts.serialize; - var cacheKey = serialize ? serialize(schemaKeyRef) : schemaKeyRef; - this._cache.del(cacheKey); - var id = this._getId(schemaKeyRef); - if (id) { - id = resolve.normalizeId(id); - delete this._schemas[id]; - delete this._refs[id]; - } - } - return this; - } - function _removeAllSchemas(self2, schemas, regex$1) { - for (var keyRef in schemas) { - var schemaObj = schemas[keyRef]; - if (!schemaObj.meta && (!regex$1 || regex$1.test(keyRef))) { - self2._cache.del(schemaObj.cacheKey); - delete schemas[keyRef]; - } - } - } - function _addSchema(schema2, skipValidation, meta, shouldAddSchema) { - 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; - shouldAddSchema = shouldAddSchema || this._opts.addUsedSchema !== false; - var id = resolve.normalizeId(this._getId(schema2)); - if (id && shouldAddSchema) checkUnique(this, id); - var willValidate = this._opts.validateSchema !== false && !skipValidation; - var recursiveMeta; - if (willValidate && !(recursiveMeta = id && id == resolve.normalizeId(schema2.$schema))) this.validateSchema(schema2, true); - var localRefs = resolve.ids.call(this, schema2); - var schemaObj = new SchemaObject({ - id, - schema: schema2, - localRefs, - cacheKey, - meta - }); - if (id[0] != "#" && shouldAddSchema) this._refs[id] = schemaObj; - this._cache.put(cacheKey, schemaObj); - if (willValidate && recursiveMeta) this.validateSchema(schema2, true); - return schemaObj; - } - function _compile(schemaObj, root2) { - if (schemaObj.compiling) { - schemaObj.validate = callValidate; - callValidate.schema = schemaObj.schema; - callValidate.errors = null; - callValidate.root = root2 ? root2 : callValidate; - if (schemaObj.schema.$async === true) callValidate.$async = true; - return callValidate; - } - schemaObj.compiling = true; - var currentOpts; - if (schemaObj.meta) { - currentOpts = this._opts; - this._opts = this._metaOpts; - } - var v; - try { - v = compileSchema.call(this, schemaObj.schema, root2, schemaObj.localRefs); - } catch (e) { - delete schemaObj.validate; - throw e; - } finally { - schemaObj.compiling = false; - if (schemaObj.meta) this._opts = currentOpts; - } - schemaObj.validate = v; - schemaObj.refs = v.refs; - schemaObj.refVal = v.refVal; - schemaObj.root = v.root; - return v; - function callValidate() { - var _validate = schemaObj.validate; - var result = _validate.apply(this, arguments); - callValidate.errors = _validate.errors; - return result; - } - } - function chooseGetId(opts) { - switch (opts.schemaId) { - case "auto": - return _get$IdOrId; - case "id": - return _getId; - default: - return _get$Id; - } - } - function _getId(schema2) { - if (schema2.$id) this.logger.warn("schema $id ignored", schema2.$id); - return schema2.id; - } - function _get$Id(schema2) { - if (schema2.id) this.logger.warn("schema id ignored", schema2.id); - return schema2.$id; - } - function _get$IdOrId(schema2) { - if (schema2.$id && schema2.id && schema2.$id != schema2.id) throw new Error("schema $id is different from id"); - return schema2.$id || schema2.id; - } - function errorsText(errors, options) { - errors = errors || this.errors; - if (!errors) return "No errors"; - options = options || {}; - var separator2 = options.separator === void 0 ? ", " : options.separator; - var dataVar = options.dataVar === void 0 ? "data" : options.dataVar; - var text = ""; - for (var i$3 = 0; i$3 < errors.length; i$3++) { - var e = errors[i$3]; - if (e) text += dataVar + e.dataPath + " " + e.message + separator2; - } - return text.slice(0, -separator2.length); - } - function addFormat2(name, format$1) { - if (typeof format$1 == "string") format$1 = new RegExp(format$1); - this._formats[name] = format$1; - return this; - } - function addDefaultMetaSchema(self2) { - var $dataSchema; - if (self2._opts.$data) { - $dataSchema = require_data5(); - self2.addMetaSchema($dataSchema, $dataSchema.$id, true); - } - if (self2._opts.meta === false) return; - var metaSchema$1 = require_json_schema_draft_073(); - if (self2._opts.$data) metaSchema$1 = $dataMetaSchema(metaSchema$1, META_SUPPORT_DATA); - self2.addMetaSchema(metaSchema$1, META_SCHEMA_ID, true); - self2._refs["http://json-schema.org/schema"] = META_SCHEMA_ID; - } - function addInitialSchemas(self2) { - var optsSchemas = self2._opts.schemas; - if (!optsSchemas) return; - if (Array.isArray(optsSchemas)) self2.addSchema(optsSchemas); - else for (var key$1 in optsSchemas) self2.addSchema(optsSchemas[key$1], key$1); - } - function addInitialFormats(self2) { - for (var name in self2._opts.formats) { - var format$1 = self2._opts.formats[name]; - self2.addFormat(name, format$1); - } - } - function addInitialKeywords(self2) { - for (var name in self2._opts.keywords) { - var keyword = self2._opts.keywords[name]; - self2.addKeyword(name, keyword); - } - } - function checkUnique(self2, id) { - if (self2._schemas[id] || self2._refs[id]) throw new Error('schema with key or id "' + id + '" already exists'); - } - function getMetaSchemaOptions(self2) { - var metaOpts = util3.copy(self2._opts); - for (var i$3 = 0; i$3 < META_IGNORE_OPTIONS.length; i$3++) delete metaOpts[META_IGNORE_OPTIONS[i$3]]; - return metaOpts; - } - function setLogger(self2) { - var logger = self2._opts.logger; - if (logger === false) self2.logger = { - log: noop4, - warn: noop4, - error: noop4 + }); +})); +var require_formats3 = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.formatNames = exports.fastFormats = exports.fullFormats = void 0; + function fmtDef(validate2, compare) { + return { + validate: validate2, + compare }; - else { - if (logger === void 0) logger = console; - if (!(typeof logger == "object" && logger.log && logger.warn && logger.error)) throw new Error("logger must implement log, warn and error methods"); - self2.logger = logger; + } + exports.fullFormats = { + date: fmtDef(date7, compareDate), + time: fmtDef(getTime(true), compareTime), + "date-time": fmtDef(getDateTime(true), compareDateTime), + "iso-time": fmtDef(getTime(), compareIsoTime), + "iso-date-time": fmtDef(getDateTime(), compareIsoDateTime), + duration: /^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/, + uri, + "uri-reference": /^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-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(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu, + email: /^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i, + hostname: /^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i, + ipv4: /^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/, + ipv6: /^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i, + regex: regex4, + uuid: /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i, + "json-pointer": /^(?:\/(?:[^~/]|~0|~1)*)*$/, + "json-pointer-uri-fragment": /^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i, + "relative-json-pointer": /^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/, + byte, + int32: { + type: "number", + validate: validateInt32 + }, + int64: { + type: "number", + validate: validateInt64 + }, + float: { + type: "number", + validate: validateNumber + }, + double: { + type: "number", + validate: validateNumber + }, + password: true, + binary: true + }; + exports.fastFormats = { + ...exports.fullFormats, + date: fmtDef(/^\d\d\d\d-[0-1]\d-[0-3]\d$/, compareDate), + time: fmtDef(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i, compareTime), + "date-time": fmtDef(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i, compareDateTime), + "iso-time": fmtDef(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i, compareIsoTime), + "iso-date-time": fmtDef(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i, compareIsoDateTime), + uri: /^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i, + "uri-reference": /^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i, + email: /^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i + }; + exports.formatNames = Object.keys(exports.fullFormats); + function isLeapYear(year) { + return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0); + } + const DATE = /^(\d\d\d\d)-(\d\d)-(\d\d)$/; + const DAYS = [ + 0, + 31, + 28, + 31, + 30, + 31, + 30, + 31, + 31, + 30, + 31, + 30, + 31 + ]; + function date7(str$1) { + const matches = DATE.exec(str$1); + if (!matches) return false; + const year = +matches[1]; + const month = +matches[2]; + const day = +matches[3]; + return month >= 1 && month <= 12 && day >= 1 && day <= (month === 2 && isLeapYear(year) ? 29 : DAYS[month]); + } + function compareDate(d1, d2) { + if (!(d1 && d2)) return void 0; + if (d1 > d2) return 1; + if (d1 < d2) return -1; + return 0; + } + const TIME = /^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i; + function getTime(strictTimeZone) { + return function time$2(str$1) { + const matches = TIME.exec(str$1); + if (!matches) return false; + const hr = +matches[1]; + const min = +matches[2]; + const sec = +matches[3]; + const tz = matches[4]; + const tzSign = matches[5] === "-" ? -1 : 1; + const tzH = +(matches[6] || 0); + const tzM = +(matches[7] || 0); + if (tzH > 23 || tzM > 59 || strictTimeZone && !tz) return false; + if (hr <= 23 && min <= 59 && sec < 60) return true; + const utcMin = min - tzM * tzSign; + const utcHr = hr - tzH * tzSign - (utcMin < 0 ? 1 : 0); + return (utcHr === 23 || utcHr === -1) && (utcMin === 59 || utcMin === -1) && sec < 61; + }; + } + function compareTime(s1, s2) { + if (!(s1 && s2)) return void 0; + const t1 = (/* @__PURE__ */ new Date("2020-01-01T" + s1)).valueOf(); + const t2 = (/* @__PURE__ */ new Date("2020-01-01T" + s2)).valueOf(); + if (!(t1 && t2)) return void 0; + return t1 - t2; + } + function compareIsoTime(t1, t2) { + if (!(t1 && t2)) return void 0; + const a1 = TIME.exec(t1); + const a2 = TIME.exec(t2); + if (!(a1 && a2)) return void 0; + t1 = a1[1] + a1[2] + a1[3]; + t2 = a2[1] + a2[2] + a2[3]; + if (t1 > t2) return 1; + if (t1 < t2) return -1; + return 0; + } + const DATE_TIME_SEPARATOR = /t|\s/i; + function getDateTime(strictTimeZone) { + const time$2 = getTime(strictTimeZone); + return function date_time(str$1) { + const dateTime = str$1.split(DATE_TIME_SEPARATOR); + return dateTime.length === 2 && date7(dateTime[0]) && time$2(dateTime[1]); + }; + } + function compareDateTime(dt1, dt2) { + if (!(dt1 && dt2)) return void 0; + const d1 = new Date(dt1).valueOf(); + const d2 = new Date(dt2).valueOf(); + if (!(d1 && d2)) return void 0; + return d1 - d2; + } + function compareIsoDateTime(dt1, dt2) { + if (!(dt1 && dt2)) return void 0; + const [d1, t1] = dt1.split(DATE_TIME_SEPARATOR); + const [d2, t2] = dt2.split(DATE_TIME_SEPARATOR); + const res = compareDate(d1, d2); + if (res === void 0) return void 0; + return res || compareTime(t1, t2); + } + const NOT_URI_FRAGMENT = /\/|:/; + const URI = /^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i; + function uri(str$1) { + return NOT_URI_FRAGMENT.test(str$1) && URI.test(str$1); + } + const BYTE = /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm; + function byte(str$1) { + BYTE.lastIndex = 0; + return BYTE.test(str$1); + } + const MIN_INT32 = -(2 ** 31); + const MAX_INT32 = 2 ** 31 - 1; + function validateInt32(value2) { + return Number.isInteger(value2) && value2 <= MAX_INT32 && value2 >= MIN_INT32; + } + function validateInt64(value2) { + return Number.isInteger(value2); + } + function validateNumber() { + return true; + } + const Z_ANCHOR = /[^\\]\\Z/; + function regex4(str$1) { + if (Z_ANCHOR.test(str$1)) return false; + try { + new RegExp(str$1); + return true; + } catch (e) { + return false; } } - function noop4() { +})); +var require_limit3 = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.formatLimitDefinition = void 0; + const ajv_1 = require_ajv3(); + const codegen_1$1 = require_codegen3(); + const ops = codegen_1$1.operators; + const KWDs = { + formatMaximum: { + okStr: "<=", + ok: ops.LTE, + fail: ops.GT + }, + formatMinimum: { + okStr: ">=", + ok: ops.GTE, + fail: ops.LT + }, + formatExclusiveMaximum: { + okStr: "<", + ok: ops.LT, + fail: ops.GTE + }, + formatExclusiveMinimum: { + okStr: ">", + ok: ops.GT, + fail: ops.LTE + } + }; + const error50 = { + message: ({ keyword, schemaCode }) => (0, codegen_1$1.str)`should be ${KWDs[keyword].okStr} ${schemaCode}`, + params: ({ keyword, schemaCode }) => (0, codegen_1$1._)`{comparison: ${KWDs[keyword].okStr}, limit: ${schemaCode}}` + }; + exports.formatLimitDefinition = { + keyword: Object.keys(KWDs), + type: "string", + schemaType: "string", + $data: true, + error: error50, + code(cxt) { + const { gen, data, schemaCode, keyword, it } = cxt; + const { opts, self: self2 } = it; + if (!opts.validateFormats) return; + const fCxt = new ajv_1.KeywordCxt(it, self2.RULES.all.format.definition, "format"); + if (fCxt.$data) validate$DataFormat(); + else validateFormat(); + function validate$DataFormat() { + const fmts = gen.scopeValue("formats", { + ref: self2.formats, + code: opts.code.formats + }); + const fmt = gen.const("fmt", (0, codegen_1$1._)`${fmts}[${fCxt.schemaCode}]`); + cxt.fail$data((0, codegen_1$1.or)((0, codegen_1$1._)`typeof ${fmt} != "object"`, (0, codegen_1$1._)`${fmt} instanceof RegExp`, (0, codegen_1$1._)`typeof ${fmt}.compare != "function"`, compareCode(fmt))); + } + function validateFormat() { + const format$2 = fCxt.schema; + const fmtDef$1 = self2.formats[format$2]; + if (!fmtDef$1 || fmtDef$1 === true) return; + if (typeof fmtDef$1 != "object" || fmtDef$1 instanceof RegExp || typeof fmtDef$1.compare != "function") throw new Error(`"${keyword}": format "${format$2}" does not define "compare" function`); + const fmt = gen.scopeValue("formats", { + key: format$2, + ref: fmtDef$1, + code: opts.code.formats ? (0, codegen_1$1._)`${opts.code.formats}${(0, codegen_1$1.getProperty)(format$2)}` : void 0 + }); + cxt.fail$data(compareCode(fmt)); + } + function compareCode(fmt) { + return (0, codegen_1$1._)`${fmt}.compare(${data}, ${schemaCode}) ${KWDs[keyword].fail} 0`; + } + }, + dependencies: ["format"] + }; + const formatLimitPlugin = (ajv) => { + ajv.addKeyword(exports.formatLimitDefinition); + return ajv; + }; + exports.default = formatLimitPlugin; +})); +var require_dist3 = /* @__PURE__ */ __commonJSMin(((exports, module) => { + Object.defineProperty(exports, "__esModule", { value: true }); + const formats_1 = require_formats3(); + const limit_1 = require_limit3(); + const codegen_1 = require_codegen3(); + const fullName = new codegen_1.Name("fullFormats"); + const fastName = new codegen_1.Name("fastFormats"); + const formatsPlugin = (ajv, opts = { keywords: true }) => { + if (Array.isArray(opts)) { + addFormats(ajv, opts, formats_1.fullFormats, fullName); + return ajv; + } + const [formats, exportName] = opts.mode === "fast" ? [formats_1.fastFormats, fastName] : [formats_1.fullFormats, fullName]; + addFormats(ajv, opts.formats || formats_1.formatNames, formats, exportName); + if (opts.keywords) (0, limit_1.default)(ajv); + return ajv; + }; + formatsPlugin.get = (name, mode = "full") => { + const f = (mode === "fast" ? formats_1.fastFormats : formats_1.fullFormats)[name]; + if (!f) throw new Error(`Unknown format "${name}"`); + return f; + }; + function addFormats(ajv, list, fs4, exportName) { + var _a2; + var _b; + (_a2 = (_b = ajv.opts.code).formats) !== null && _a2 !== void 0 || (_b.formats = (0, codegen_1._)`require("ajv-formats/dist/formats").${exportName}`); + for (const f of list) ajv.addFormat(f, fs4[f]); } -}) }); -var import_ajv$1 = /* @__PURE__ */ __toESM3(require_ajv3(), 1); -var import_ajv3 = /* @__PURE__ */ __toESM3(require_ajv3(), 1); + module.exports = exports = formatsPlugin; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.default = formatsPlugin; +})); +var import_ajv3 = require_ajv3(); +var import_dist = /* @__PURE__ */ __toESM3(require_dist3(), 1); -// node_modules/.pnpm/mcp-proxy@5.9.0/node_modules/mcp-proxy/dist/index.js +// ../node_modules/.pnpm/mcp-proxy@5.12.5/node_modules/mcp-proxy/dist/index.mjs +var ZodIssueCode4 = { + invalid_type: "invalid_type", + too_big: "too_big", + too_small: "too_small", + invalid_format: "invalid_format", + not_multiple_of: "not_multiple_of", + unrecognized_keys: "unrecognized_keys", + invalid_union: "invalid_union", + invalid_key: "invalid_key", + invalid_element: "invalid_element", + invalid_value: "invalid_value", + custom: "custom" +}; +function number8(params) { + return _coercedNumber2(ZodNumber5, params); +} var ParseError2 = class extends Error { constructor(message, options) { super(message), this.name = "ParseError", this.type = options.type, this.field = options.field, this.value = options.value, this.line = options.line; @@ -122761,8 +133895,8 @@ function createParser(callbacks) { } const fieldSeparatorIndex = line.indexOf(":"); if (fieldSeparatorIndex !== -1) { - const field = line.slice(0, fieldSeparatorIndex), offset = line[fieldSeparatorIndex + 1] === " " ? 2 : 1, value2 = line.slice(fieldSeparatorIndex + offset); - processField(field, value2, line); + const field = line.slice(0, fieldSeparatorIndex), offset = line[fieldSeparatorIndex + 1] === " " ? 2 : 1; + processField(field, line.slice(fieldSeparatorIndex + offset), line); return; } processField(line, "", line); @@ -122839,8 +133973,8 @@ var ErrorEvent = class extends Event { * @param errorEventInitDict - Optional properties to include in the error event */ constructor(type2, errorEventInitDict) { - var _a, _b; - super(type2), this.code = (_a = errorEventInitDict == null ? void 0 : errorEventInitDict.code) != null ? _a : void 0, this.message = (_b = errorEventInitDict == null ? void 0 : errorEventInitDict.message) != null ? _b : void 0; + var _a2, _b; + super(type2), this.code = (_a2 = errorEventInitDict == null ? void 0 : errorEventInitDict.code) != null ? _a2 : void 0, this.message = (_b = errorEventInitDict == null ? void 0 : errorEventInitDict.message) != null ? _b : void 0; } /** * Node.js "hides" the `message` and `code` properties of the `ErrorEvent` instance, @@ -122876,8 +134010,8 @@ function syntaxError(message) { const DomException = globalThis.DOMException; return typeof DomException == "function" ? new DomException(message, "SyntaxError") : new SyntaxError(message); } -function flattenError(err) { - return err instanceof Error ? "errors" in err && Array.isArray(err.errors) ? err.errors.map(flattenError).join(", ") : "cause" in err && err.cause instanceof Error ? `${err}: ${flattenError(err.cause)}` : err.message : `${err}`; +function flattenError4(err) { + return err instanceof Error ? "errors" in err && Array.isArray(err.errors) ? err.errors.map(flattenError4).join(", ") : "cause" in err && err.cause instanceof Error ? `${err}: ${flattenError4(err.cause)}` : err.message : `${err}`; } function inspectableError(err) { return { @@ -122898,7 +134032,7 @@ var __privateAdd = (obj, member, value2) => member.has(obj) ? __typeError2("Cann var __privateSet = (obj, member, value2, setter) => (__accessCheck(obj, member, "write to private field"), member.set(obj, value2), value2); var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method); var _readyState; -var _url; +var _url4; var _redirectUrl; var _withCredentials; var _fetch; @@ -122921,10 +134055,10 @@ var failConnection_fn; var scheduleReconnect_fn; var _reconnect; var EventSource = class extends EventTarget { - constructor(url2, eventSourceInitDict) { - var _a, _b; - super(), __privateAdd(this, _EventSource_instances), this.CONNECTING = 0, this.OPEN = 1, this.CLOSED = 2, __privateAdd(this, _readyState), __privateAdd(this, _url), __privateAdd(this, _redirectUrl), __privateAdd(this, _withCredentials), __privateAdd(this, _fetch), __privateAdd(this, _reconnectInterval), __privateAdd(this, _reconnectTimer), __privateAdd(this, _lastEventId, null), __privateAdd(this, _controller), __privateAdd(this, _parser), __privateAdd(this, _onError, null), __privateAdd(this, _onMessage, null), __privateAdd(this, _onOpen, null), __privateAdd(this, _onFetchResponse, async (response) => { - var _a2; + constructor(url$1, eventSourceInitDict) { + var _a2, _b; + super(), __privateAdd(this, _EventSource_instances), this.CONNECTING = 0, this.OPEN = 1, this.CLOSED = 2, __privateAdd(this, _readyState), __privateAdd(this, _url4), __privateAdd(this, _redirectUrl), __privateAdd(this, _withCredentials), __privateAdd(this, _fetch), __privateAdd(this, _reconnectInterval), __privateAdd(this, _reconnectTimer), __privateAdd(this, _lastEventId, null), __privateAdd(this, _controller), __privateAdd(this, _parser), __privateAdd(this, _onError, null), __privateAdd(this, _onMessage, null), __privateAdd(this, _onOpen, null), __privateAdd(this, _onFetchResponse, async (response) => { + var _a22; __privateGet(this, _parser).reset(); const { body, redirected, status, headers } = response; if (status === 204) { @@ -122942,7 +134076,7 @@ var EventSource = class extends EventTarget { if (__privateGet(this, _readyState) === this.CLOSED) return; __privateSet(this, _readyState, this.OPEN); const openEvent = new Event("open"); - if ((_a2 = __privateGet(this, _onOpen)) == null || _a2.call(this, openEvent), this.dispatchEvent(openEvent), typeof body != "object" || !body || !("getReader" in body)) { + if ((_a22 = __privateGet(this, _onOpen)) == null || _a22.call(this, openEvent), this.dispatchEvent(openEvent), typeof body != "object" || !body || !("getReader" in body)) { __privateMethod(this, _EventSource_instances, failConnection_fn).call(this, "Invalid response body, expected a web ReadableStream", status), this.close(); return; } @@ -122953,12 +134087,12 @@ var EventSource = class extends EventTarget { value2 && __privateGet(this, _parser).feed(decoder.decode(value2, { stream: !done })), done && (open2 = false, __privateGet(this, _parser).reset(), __privateMethod(this, _EventSource_instances, scheduleReconnect_fn).call(this)); } while (open2); }), __privateAdd(this, _onFetchError, (err) => { - __privateSet(this, _controller, void 0), !(err.name === "AbortError" || err.type === "aborted") && __privateMethod(this, _EventSource_instances, scheduleReconnect_fn).call(this, flattenError(err)); + __privateSet(this, _controller, void 0), !(err.name === "AbortError" || err.type === "aborted") && __privateMethod(this, _EventSource_instances, scheduleReconnect_fn).call(this, flattenError4(err)); }), __privateAdd(this, _onEvent, (event) => { typeof event.id == "string" && __privateSet(this, _lastEventId, event.id); const messageEvent = new MessageEvent(event.event || "message", { data: event.data, - origin: __privateGet(this, _redirectUrl) ? __privateGet(this, _redirectUrl).origin : __privateGet(this, _url).origin, + origin: __privateGet(this, _redirectUrl) ? __privateGet(this, _redirectUrl).origin : __privateGet(this, _url4).origin, lastEventId: event.id || "" }); __privateGet(this, _onMessage) && (!event.event || event.event === "message") && __privateGet(this, _onMessage).call(this, messageEvent), this.dispatchEvent(messageEvent); @@ -122968,8 +134102,8 @@ var EventSource = class extends EventTarget { __privateSet(this, _reconnectTimer, void 0), __privateGet(this, _readyState) === this.CONNECTING && __privateMethod(this, _EventSource_instances, connect_fn).call(this); }); try { - if (url2 instanceof URL) __privateSet(this, _url, url2); - else if (typeof url2 == "string") __privateSet(this, _url, new URL(url2, getBaseURL())); + if (url$1 instanceof URL) __privateSet(this, _url4, url$1); + else if (typeof url$1 == "string") __privateSet(this, _url4, new URL(url$1, getBaseURL())); else throw new Error("Invalid URL"); } catch { throw syntaxError("An invalid or illegal string was specified"); @@ -122977,7 +134111,7 @@ var EventSource = class extends EventTarget { __privateSet(this, _parser, createParser({ onEvent: __privateGet(this, _onEvent), onRetry: __privateGet(this, _onRetryChange) - })), __privateSet(this, _readyState, this.CONNECTING), __privateSet(this, _reconnectInterval, 3e3), __privateSet(this, _fetch, (_a = eventSourceInitDict == null ? void 0 : eventSourceInitDict.fetch) != null ? _a : globalThis.fetch), __privateSet(this, _withCredentials, (_b = eventSourceInitDict == null ? void 0 : eventSourceInitDict.withCredentials) != null ? _b : false), __privateMethod(this, _EventSource_instances, connect_fn).call(this); + })), __privateSet(this, _readyState, this.CONNECTING), __privateSet(this, _reconnectInterval, 3e3), __privateSet(this, _fetch, (_a2 = eventSourceInitDict == null ? void 0 : eventSourceInitDict.fetch) != null ? _a2 : globalThis.fetch), __privateSet(this, _withCredentials, (_b = eventSourceInitDict == null ? void 0 : eventSourceInitDict.withCredentials) != null ? _b : false), __privateMethod(this, _EventSource_instances, connect_fn).call(this); } /** * Returns the state of this EventSource object's connection. It can have the values described below. @@ -123000,7 +134134,7 @@ var EventSource = class extends EventTarget { * @public */ get url() { - return __privateGet(this, _url).href; + return __privateGet(this, _url4).href; } /** * Returns true if the credentials mode for connection requests to the URL providing the event stream is set to "include", and false otherwise. @@ -123050,10 +134184,10 @@ var EventSource = class extends EventTarget { __privateGet(this, _reconnectTimer) && clearTimeout(__privateGet(this, _reconnectTimer)), __privateGet(this, _readyState) !== this.CLOSED && (__privateGet(this, _controller) && __privateGet(this, _controller).abort(), __privateSet(this, _readyState, this.CLOSED), __privateSet(this, _controller, void 0)); } }; -_readyState = /* @__PURE__ */ new WeakMap(), _url = /* @__PURE__ */ new WeakMap(), _redirectUrl = /* @__PURE__ */ new WeakMap(), _withCredentials = /* @__PURE__ */ new WeakMap(), _fetch = /* @__PURE__ */ new WeakMap(), _reconnectInterval = /* @__PURE__ */ new WeakMap(), _reconnectTimer = /* @__PURE__ */ new WeakMap(), _lastEventId = /* @__PURE__ */ new WeakMap(), _controller = /* @__PURE__ */ new WeakMap(), _parser = /* @__PURE__ */ new WeakMap(), _onError = /* @__PURE__ */ new WeakMap(), _onMessage = /* @__PURE__ */ new WeakMap(), _onOpen = /* @__PURE__ */ new WeakMap(), _EventSource_instances = /* @__PURE__ */ new WeakSet(), connect_fn = function() { - __privateSet(this, _readyState, this.CONNECTING), __privateSet(this, _controller, new AbortController()), __privateGet(this, _fetch)(__privateGet(this, _url), __privateMethod(this, _EventSource_instances, getRequestOptions_fn).call(this)).then(__privateGet(this, _onFetchResponse)).catch(__privateGet(this, _onFetchError)); +_readyState = /* @__PURE__ */ new WeakMap(), _url4 = /* @__PURE__ */ new WeakMap(), _redirectUrl = /* @__PURE__ */ new WeakMap(), _withCredentials = /* @__PURE__ */ new WeakMap(), _fetch = /* @__PURE__ */ new WeakMap(), _reconnectInterval = /* @__PURE__ */ new WeakMap(), _reconnectTimer = /* @__PURE__ */ new WeakMap(), _lastEventId = /* @__PURE__ */ new WeakMap(), _controller = /* @__PURE__ */ new WeakMap(), _parser = /* @__PURE__ */ new WeakMap(), _onError = /* @__PURE__ */ new WeakMap(), _onMessage = /* @__PURE__ */ new WeakMap(), _onOpen = /* @__PURE__ */ new WeakMap(), _EventSource_instances = /* @__PURE__ */ new WeakSet(), connect_fn = function() { + __privateSet(this, _readyState, this.CONNECTING), __privateSet(this, _controller, new AbortController()), __privateGet(this, _fetch)(__privateGet(this, _url4), __privateMethod(this, _EventSource_instances, getRequestOptions_fn).call(this)).then(__privateGet(this, _onFetchResponse)).catch(__privateGet(this, _onFetchError)); }, _onFetchResponse = /* @__PURE__ */ new WeakMap(), _onFetchError = /* @__PURE__ */ new WeakMap(), getRequestOptions_fn = function() { - var _a; + var _a2; const init = { mode: "cors", redirect: "follow", @@ -123062,26 +134196,26 @@ _readyState = /* @__PURE__ */ new WeakMap(), _url = /* @__PURE__ */ new WeakMap( ...__privateGet(this, _lastEventId) ? { "Last-Event-ID": __privateGet(this, _lastEventId) } : void 0 }, cache: "no-store", - signal: (_a = __privateGet(this, _controller)) == null ? void 0 : _a.signal + signal: (_a2 = __privateGet(this, _controller)) == null ? void 0 : _a2.signal }; return "window" in globalThis && (init.credentials = this.withCredentials ? "include" : "same-origin"), init; }, _onEvent = /* @__PURE__ */ new WeakMap(), _onRetryChange = /* @__PURE__ */ new WeakMap(), failConnection_fn = function(message, code) { - var _a; + var _a2; __privateGet(this, _readyState) !== this.CLOSED && __privateSet(this, _readyState, this.CLOSED); const errorEvent = new ErrorEvent("error", { code, message }); - (_a = __privateGet(this, _onError)) == null || _a.call(this, errorEvent), this.dispatchEvent(errorEvent); + (_a2 = __privateGet(this, _onError)) == null || _a2.call(this, errorEvent), this.dispatchEvent(errorEvent); }, scheduleReconnect_fn = function(message, code) { - var _a; + var _a2; if (__privateGet(this, _readyState) === this.CLOSED) return; __privateSet(this, _readyState, this.CONNECTING); const errorEvent = new ErrorEvent("error", { code, message }); - (_a = __privateGet(this, _onError)) == null || _a.call(this, errorEvent), this.dispatchEvent(errorEvent), __privateSet(this, _reconnectTimer, setTimeout(__privateGet(this, _reconnect), __privateGet(this, _reconnectInterval))); + (_a2 = __privateGet(this, _onError)) == null || _a2.call(this, errorEvent), this.dispatchEvent(errorEvent), __privateSet(this, _reconnectTimer, setTimeout(__privateGet(this, _reconnect), __privateGet(this, _reconnectInterval))); }, _reconnect = /* @__PURE__ */ new WeakMap(), EventSource.CONNECTING = 0, EventSource.OPEN = 1, EventSource.CLOSED = 2; function getBaseURL() { const doc = "document" in globalThis ? globalThis.document : void 0; @@ -123089,138 +134223,144 @@ function getBaseURL() { } var crypto; crypto = globalThis.crypto?.webcrypto ?? globalThis.crypto ?? import("node:crypto").then((m) => m.webcrypto); -var SafeUrlSchema = stringType3().url().superRefine((val, ctx) => { +var SafeUrlSchema = url3().superRefine((val, ctx) => { if (!URL.canParse(val)) { ctx.addIssue({ - code: ZodIssueCode3.custom, + code: ZodIssueCode4.custom, message: "URL must be parseable", fatal: true }); return NEVER3; } -}).refine((url2) => { - const u = new URL(url2); +}).refine((url$1) => { + const u = new URL(url$1); return u.protocol !== "javascript:" && u.protocol !== "data:" && u.protocol !== "vbscript:"; }, { message: "URL cannot use javascript:, data:, or vbscript: scheme" }); -var OAuthProtectedResourceMetadataSchema = objectType3({ - resource: stringType3().url(), - authorization_servers: arrayType3(SafeUrlSchema).optional(), - jwks_uri: stringType3().url().optional(), - scopes_supported: arrayType3(stringType3()).optional(), - bearer_methods_supported: arrayType3(stringType3()).optional(), - resource_signing_alg_values_supported: arrayType3(stringType3()).optional(), - resource_name: stringType3().optional(), - resource_documentation: stringType3().optional(), - resource_policy_uri: stringType3().url().optional(), - resource_tos_uri: stringType3().url().optional(), - tls_client_certificate_bound_access_tokens: booleanType3().optional(), - authorization_details_types_supported: arrayType3(stringType3()).optional(), - dpop_signing_alg_values_supported: arrayType3(stringType3()).optional(), - dpop_bound_access_tokens_required: booleanType3().optional() -}).passthrough(); -var OAuthMetadataSchema = objectType3({ - issuer: stringType3(), +var OAuthProtectedResourceMetadataSchema = looseObject3({ + resource: string7().url(), + authorization_servers: array3(SafeUrlSchema).optional(), + jwks_uri: string7().url().optional(), + scopes_supported: array3(string7()).optional(), + bearer_methods_supported: array3(string7()).optional(), + resource_signing_alg_values_supported: array3(string7()).optional(), + resource_name: string7().optional(), + resource_documentation: string7().optional(), + resource_policy_uri: string7().url().optional(), + resource_tos_uri: string7().url().optional(), + tls_client_certificate_bound_access_tokens: boolean6().optional(), + authorization_details_types_supported: array3(string7()).optional(), + dpop_signing_alg_values_supported: array3(string7()).optional(), + dpop_bound_access_tokens_required: boolean6().optional() +}); +var OAuthMetadataSchema = looseObject3({ + issuer: string7(), authorization_endpoint: SafeUrlSchema, token_endpoint: SafeUrlSchema, registration_endpoint: SafeUrlSchema.optional(), - scopes_supported: arrayType3(stringType3()).optional(), - response_types_supported: arrayType3(stringType3()), - response_modes_supported: arrayType3(stringType3()).optional(), - grant_types_supported: arrayType3(stringType3()).optional(), - token_endpoint_auth_methods_supported: arrayType3(stringType3()).optional(), - token_endpoint_auth_signing_alg_values_supported: arrayType3(stringType3()).optional(), + scopes_supported: array3(string7()).optional(), + response_types_supported: array3(string7()), + response_modes_supported: array3(string7()).optional(), + grant_types_supported: array3(string7()).optional(), + token_endpoint_auth_methods_supported: array3(string7()).optional(), + token_endpoint_auth_signing_alg_values_supported: array3(string7()).optional(), service_documentation: SafeUrlSchema.optional(), revocation_endpoint: SafeUrlSchema.optional(), - revocation_endpoint_auth_methods_supported: arrayType3(stringType3()).optional(), - revocation_endpoint_auth_signing_alg_values_supported: arrayType3(stringType3()).optional(), - introspection_endpoint: stringType3().optional(), - introspection_endpoint_auth_methods_supported: arrayType3(stringType3()).optional(), - introspection_endpoint_auth_signing_alg_values_supported: arrayType3(stringType3()).optional(), - code_challenge_methods_supported: arrayType3(stringType3()).optional() -}).passthrough(); -var OpenIdProviderMetadataSchema = objectType3({ - issuer: stringType3(), + revocation_endpoint_auth_methods_supported: array3(string7()).optional(), + revocation_endpoint_auth_signing_alg_values_supported: array3(string7()).optional(), + introspection_endpoint: string7().optional(), + introspection_endpoint_auth_methods_supported: array3(string7()).optional(), + introspection_endpoint_auth_signing_alg_values_supported: array3(string7()).optional(), + code_challenge_methods_supported: array3(string7()).optional(), + client_id_metadata_document_supported: boolean6().optional() +}); +var OpenIdProviderMetadataSchema = looseObject3({ + issuer: string7(), authorization_endpoint: SafeUrlSchema, token_endpoint: SafeUrlSchema, userinfo_endpoint: SafeUrlSchema.optional(), jwks_uri: SafeUrlSchema, registration_endpoint: SafeUrlSchema.optional(), - scopes_supported: arrayType3(stringType3()).optional(), - response_types_supported: arrayType3(stringType3()), - response_modes_supported: arrayType3(stringType3()).optional(), - grant_types_supported: arrayType3(stringType3()).optional(), - acr_values_supported: arrayType3(stringType3()).optional(), - subject_types_supported: arrayType3(stringType3()), - id_token_signing_alg_values_supported: arrayType3(stringType3()), - id_token_encryption_alg_values_supported: arrayType3(stringType3()).optional(), - id_token_encryption_enc_values_supported: arrayType3(stringType3()).optional(), - userinfo_signing_alg_values_supported: arrayType3(stringType3()).optional(), - userinfo_encryption_alg_values_supported: arrayType3(stringType3()).optional(), - userinfo_encryption_enc_values_supported: arrayType3(stringType3()).optional(), - request_object_signing_alg_values_supported: arrayType3(stringType3()).optional(), - request_object_encryption_alg_values_supported: arrayType3(stringType3()).optional(), - request_object_encryption_enc_values_supported: arrayType3(stringType3()).optional(), - token_endpoint_auth_methods_supported: arrayType3(stringType3()).optional(), - token_endpoint_auth_signing_alg_values_supported: arrayType3(stringType3()).optional(), - display_values_supported: arrayType3(stringType3()).optional(), - claim_types_supported: arrayType3(stringType3()).optional(), - claims_supported: arrayType3(stringType3()).optional(), - service_documentation: stringType3().optional(), - claims_locales_supported: arrayType3(stringType3()).optional(), - ui_locales_supported: arrayType3(stringType3()).optional(), - claims_parameter_supported: booleanType3().optional(), - request_parameter_supported: booleanType3().optional(), - request_uri_parameter_supported: booleanType3().optional(), - require_request_uri_registration: booleanType3().optional(), + scopes_supported: array3(string7()).optional(), + response_types_supported: array3(string7()), + response_modes_supported: array3(string7()).optional(), + grant_types_supported: array3(string7()).optional(), + acr_values_supported: array3(string7()).optional(), + subject_types_supported: array3(string7()), + id_token_signing_alg_values_supported: array3(string7()), + id_token_encryption_alg_values_supported: array3(string7()).optional(), + id_token_encryption_enc_values_supported: array3(string7()).optional(), + userinfo_signing_alg_values_supported: array3(string7()).optional(), + userinfo_encryption_alg_values_supported: array3(string7()).optional(), + userinfo_encryption_enc_values_supported: array3(string7()).optional(), + request_object_signing_alg_values_supported: array3(string7()).optional(), + request_object_encryption_alg_values_supported: array3(string7()).optional(), + request_object_encryption_enc_values_supported: array3(string7()).optional(), + token_endpoint_auth_methods_supported: array3(string7()).optional(), + token_endpoint_auth_signing_alg_values_supported: array3(string7()).optional(), + display_values_supported: array3(string7()).optional(), + claim_types_supported: array3(string7()).optional(), + claims_supported: array3(string7()).optional(), + service_documentation: string7().optional(), + claims_locales_supported: array3(string7()).optional(), + ui_locales_supported: array3(string7()).optional(), + claims_parameter_supported: boolean6().optional(), + request_parameter_supported: boolean6().optional(), + request_uri_parameter_supported: boolean6().optional(), + require_request_uri_registration: boolean6().optional(), op_policy_uri: SafeUrlSchema.optional(), - op_tos_uri: SafeUrlSchema.optional() -}).passthrough(); -var OpenIdProviderDiscoveryMetadataSchema = OpenIdProviderMetadataSchema.merge(OAuthMetadataSchema.pick({ code_challenge_methods_supported: true })); -var OAuthTokensSchema = objectType3({ - access_token: stringType3(), - id_token: stringType3().optional(), - token_type: stringType3(), - expires_in: numberType3().optional(), - scope: stringType3().optional(), - refresh_token: stringType3().optional() -}).strip(); -var OAuthErrorResponseSchema = objectType3({ - error: stringType3(), - error_description: stringType3().optional(), - error_uri: stringType3().optional() + op_tos_uri: SafeUrlSchema.optional(), + client_id_metadata_document_supported: boolean6().optional() }); -var OAuthClientMetadataSchema = objectType3({ - redirect_uris: arrayType3(SafeUrlSchema), - token_endpoint_auth_method: stringType3().optional(), - grant_types: arrayType3(stringType3()).optional(), - response_types: arrayType3(stringType3()).optional(), - client_name: stringType3().optional(), - client_uri: SafeUrlSchema.optional(), - logo_uri: SafeUrlSchema.optional(), - scope: stringType3().optional(), - contacts: arrayType3(stringType3()).optional(), - tos_uri: SafeUrlSchema.optional(), - policy_uri: stringType3().optional(), - jwks_uri: SafeUrlSchema.optional(), - jwks: anyType3().optional(), - software_id: stringType3().optional(), - software_version: stringType3().optional(), - software_statement: stringType3().optional() +var OpenIdProviderDiscoveryMetadataSchema = object5({ + ...OpenIdProviderMetadataSchema.shape, + ...OAuthMetadataSchema.pick({ code_challenge_methods_supported: true }).shape +}); +var OAuthTokensSchema = object5({ + access_token: string7(), + id_token: string7().optional(), + token_type: string7(), + expires_in: number8().optional(), + scope: string7().optional(), + refresh_token: string7().optional() }).strip(); -var OAuthClientInformationSchema = objectType3({ - client_id: stringType3(), - client_secret: stringType3().optional(), - client_id_issued_at: numberType3().optional(), - client_secret_expires_at: numberType3().optional() +var OAuthErrorResponseSchema = object5({ + error: string7(), + error_description: string7().optional(), + error_uri: string7().optional() +}); +var OptionalSafeUrlSchema = SafeUrlSchema.optional().or(literal3("").transform(() => void 0)); +var OAuthClientMetadataSchema = object5({ + redirect_uris: array3(SafeUrlSchema), + token_endpoint_auth_method: string7().optional(), + grant_types: array3(string7()).optional(), + response_types: array3(string7()).optional(), + client_name: string7().optional(), + client_uri: SafeUrlSchema.optional(), + logo_uri: OptionalSafeUrlSchema, + scope: string7().optional(), + contacts: array3(string7()).optional(), + tos_uri: OptionalSafeUrlSchema, + policy_uri: string7().optional(), + jwks_uri: SafeUrlSchema.optional(), + jwks: any2().optional(), + software_id: string7().optional(), + software_version: string7().optional(), + software_statement: string7().optional() +}).strip(); +var OAuthClientInformationSchema = object5({ + client_id: string7(), + client_secret: string7().optional(), + client_id_issued_at: number7().optional(), + client_secret_expires_at: number7().optional() }).strip(); var OAuthClientInformationFullSchema = OAuthClientMetadataSchema.merge(OAuthClientInformationSchema); -var OAuthClientRegistrationErrorSchema = objectType3({ - error: stringType3(), - error_description: stringType3().optional() +var OAuthClientRegistrationErrorSchema = object5({ + error: string7(), + error_description: string7().optional() }).strip(); -var OAuthTokenRevocationRequestSchema = objectType3({ - token: stringType3(), - token_type_hint: stringType3().optional() +var OAuthTokenRevocationRequestSchema = object5({ + token: string7(), + token_type_hint: string7().optional() }).strip(); var OAuthError = class extends Error { constructor(message, errorUri) { @@ -123291,6 +134431,9 @@ InvalidClientMetadataError.errorCode = "invalid_client_metadata"; var InsufficientScopeError = class extends OAuthError { }; InsufficientScopeError.errorCode = "insufficient_scope"; +var InvalidTargetError = class extends OAuthError { +}; +InvalidTargetError.errorCode = "invalid_target"; var OAUTH_ERRORS = { [InvalidRequestError.errorCode]: InvalidRequestError, [InvalidClientError.errorCode]: InvalidClientError, @@ -123307,7 +134450,8 @@ var OAUTH_ERRORS = { [MethodNotAllowedError.errorCode]: MethodNotAllowedError, [TooManyRequestsError.errorCode]: TooManyRequestsError, [InvalidClientMetadataError.errorCode]: InvalidClientMetadataError, - [InsufficientScopeError.errorCode]: InsufficientScopeError + [InsufficientScopeError.errorCode]: InsufficientScopeError, + [InvalidTargetError.errorCode]: InvalidTargetError }; var EventSourceParserStream = class extends TransformStream { constructor({ onError, onRetry, onComment } = {}) { @@ -123318,8 +134462,8 @@ var EventSourceParserStream = class extends TransformStream { onEvent: (event) => { controller.enqueue(event); }, - onError(error41) { - onError === "terminate" ? controller.error(error41) : typeof onError == "function" && onError(error41); + onError(error50) { + onError === "terminate" ? controller.error(error50) : typeof onError == "function" && onError(error50); }, onRetry, onComment @@ -123332,16 +134476,15 @@ var EventSourceParserStream = class extends TransformStream { } }; -// node_modules/.pnpm/fastmcp@3.20.0_arktype@2.1.28/node_modules/fastmcp/dist/FastMCP.js +// ../node_modules/.pnpm/fastmcp@3.26.8_arktype@2.1.28_effect@3.18.4_hono@4.10.6_jose@6.1.0/node_modules/fastmcp/dist/FastMCP.js var import_undici = __toESM(require_undici2(), 1); var import_uri_templates = __toESM(require_uri_templates(), 1); import { setTimeout as delay } from "timers/promises"; -// node_modules/.pnpm/xsschema@0.3.5_arktype@2.1.28_zod-to-json-schema@3.24.6_zod@3.25.76__zod@3.25.76/node_modules/xsschema/dist/index.js -init_index_CAcLDIRJ(); +// ../node_modules/.pnpm/xsschema@0.4.0-beta.5_arktype@2.1.28_effect@3.18.4_zod-to-json-schema@3.25.1_zod@4.3.5__zod@4.3.5/node_modules/xsschema/dist/index.js +init_index_CLFto6T2(); -// node_modules/.pnpm/fastmcp@3.20.0_arktype@2.1.28/node_modules/fastmcp/dist/FastMCP.js -init_zod(); +// ../node_modules/.pnpm/fastmcp@3.26.8_arktype@2.1.28_effect@3.18.4_hono@4.10.6_jose@6.1.0/node_modules/fastmcp/dist/FastMCP.js var FastMCPError = class extends Error { constructor(message) { super(message); @@ -123358,73 +134501,73 @@ var UnexpectedStateError = class extends FastMCPError { }; var UserError = class extends UnexpectedStateError { }; -var TextContentZodSchema = external_exports.object({ +var TextContentZodSchema = external_exports3.object({ /** * The text content of the message. */ - text: external_exports.string(), - type: external_exports.literal("text") + text: external_exports3.string(), + type: external_exports3.literal("text") }).strict(); -var ImageContentZodSchema = external_exports.object({ +var ImageContentZodSchema = external_exports3.object({ /** * The base64-encoded image data. */ - data: external_exports.string().base64(), + data: external_exports3.string().base64(), /** * The MIME type of the image. Different providers may support different image types. */ - mimeType: external_exports.string(), - type: external_exports.literal("image") + mimeType: external_exports3.string(), + type: external_exports3.literal("image") }).strict(); -var AudioContentZodSchema = external_exports.object({ +var AudioContentZodSchema = external_exports3.object({ /** * The base64-encoded audio data. */ - data: external_exports.string().base64(), - mimeType: external_exports.string(), - type: external_exports.literal("audio") + data: external_exports3.string().base64(), + mimeType: external_exports3.string(), + type: external_exports3.literal("audio") }).strict(); -var ResourceContentZodSchema = external_exports.object({ - resource: external_exports.object({ - blob: external_exports.string().optional(), - mimeType: external_exports.string().optional(), - text: external_exports.string().optional(), - uri: external_exports.string() +var ResourceContentZodSchema = external_exports3.object({ + resource: external_exports3.object({ + blob: external_exports3.string().optional(), + mimeType: external_exports3.string().optional(), + text: external_exports3.string().optional(), + uri: external_exports3.string() }), - type: external_exports.literal("resource") + type: external_exports3.literal("resource") }).strict(); -var ResourceLinkZodSchema = external_exports.object({ - description: external_exports.string().optional(), - mimeType: external_exports.string().optional(), - name: external_exports.string(), - title: external_exports.string().optional(), - type: external_exports.literal("resource_link"), - uri: external_exports.string() +var ResourceLinkZodSchema = external_exports3.object({ + description: external_exports3.string().optional(), + mimeType: external_exports3.string().optional(), + name: external_exports3.string(), + title: external_exports3.string().optional(), + type: external_exports3.literal("resource_link"), + uri: external_exports3.string() }); -var ContentZodSchema = external_exports.discriminatedUnion("type", [ +var ContentZodSchema = external_exports3.discriminatedUnion("type", [ TextContentZodSchema, ImageContentZodSchema, AudioContentZodSchema, ResourceContentZodSchema, ResourceLinkZodSchema ]); -var ContentResultZodSchema = external_exports.object({ +var ContentResultZodSchema = external_exports3.object({ content: ContentZodSchema.array(), - isError: external_exports.boolean().optional() + isError: external_exports3.boolean().optional() }).strict(); -var CompletionZodSchema = external_exports.object({ +var CompletionZodSchema = external_exports3.object({ /** * Indicates whether there are additional completion options beyond those provided in the current response, even if the exact total is unknown. */ - hasMore: external_exports.optional(external_exports.boolean()), + hasMore: external_exports3.optional(external_exports3.boolean()), /** * The total number of completion options available. This can exceed the number of values actually sent in the response. */ - total: external_exports.optional(external_exports.number().int()), + total: external_exports3.optional(external_exports3.number().int()), /** * An array of completion values. Must not exceed 100 items. */ - values: external_exports.array(external_exports.string()).max(100) + values: external_exports3.array(external_exports3.string()).max(100) }); var FastMCPSessionEventEmitterBase = EventEmitter; var FastMCPSessionEventEmitter = class extends FastMCPSessionEventEmitterBase { @@ -123486,7 +134629,7 @@ var FastMCPSession = class extends FastMCPSessionEventEmitter { tools, transportType, utils, - version: version2 + version: version4 }) { super(); this.#auth = auth2; @@ -123508,8 +134651,9 @@ var FastMCPSession = class extends FastMCPSessionEventEmitter { this.#capabilities.prompts = {}; } this.#capabilities.logging = {}; + this.#capabilities.completions = {}; this.#server = new Server( - { name, version: version2 }, + { name, version: version4 }, { capabilities: this.#capabilities, instructions } ); this.#utils = utils; @@ -123543,8 +134687,8 @@ var FastMCPSession = class extends FastMCPSessionEventEmitter { } try { await this.#server.close(); - } catch (error41) { - this.#logger.error("[FastMCP error]", "could not close server", error41); + } catch (error50) { + this.#logger.error("[FastMCP error]", "could not close server", error50); } } async connect(transport) { @@ -123621,18 +134765,62 @@ ${e instanceof Error ? e.stack : JSON.stringify(e)}` } this.#connectionState = "ready"; this.emit("ready"); - } catch (error41) { + } catch (error50) { this.#connectionState = "error"; const errorEvent = { - error: error41 instanceof Error ? error41 : new Error(String(error41)) + error: error50 instanceof Error ? error50 : new Error(String(error50)) }; this.emit("error", errorEvent); - throw error41; + throw error50; } } + promptsListChanged(prompts) { + this.#prompts = []; + for (const prompt of prompts) { + this.addPrompt(prompt); + } + this.setupPromptHandlers(prompts); + this.triggerListChangedNotification("notifications/prompts/list_changed"); + } async requestSampling(message, options) { return this.#server.createMessage(message, options); } + resourcesListChanged(resources) { + this.#resources = []; + for (const resource of resources) { + this.addResource(resource); + } + this.setupResourceHandlers(resources); + this.triggerListChangedNotification("notifications/resources/list_changed"); + } + resourceTemplatesListChanged(resourceTemplates) { + this.#resourceTemplates = []; + for (const resourceTemplate of resourceTemplates) { + this.addResourceTemplate(resourceTemplate); + } + this.setupResourceTemplateHandlers(resourceTemplates); + this.triggerListChangedNotification("notifications/resources/list_changed"); + } + toolsListChanged(tools) { + const allowedTools = tools.filter( + (tool2) => tool2.canAccess ? tool2.canAccess(this.#auth) : true + ); + this.setupToolHandlers(allowedTools); + this.triggerListChangedNotification("notifications/tools/list_changed"); + } + async triggerListChangedNotification(method) { + try { + await this.#server.notification({ + method + }); + } catch (error50) { + this.#logger.error( + `[FastMCP error] failed to send ${method} notification. + +${error50 instanceof Error ? error50.stack : JSON.stringify(error50)}` + ); + } + } waitForReady() { if (this.isReady) { return Promise.resolve(); @@ -123697,6 +134885,9 @@ ${e instanceof Error ? e.stack : JSON.stringify(e)}` if (completers[name]) { return await completers[name](value2, auth2); } + if (inputPrompt.complete) { + return await inputPrompt.complete(name, value2, auth2); + } if (fuseInstances[name]) { const result = fuseInstances[name].search(value2); return { @@ -123727,6 +134918,9 @@ ${e instanceof Error ? e.stack : JSON.stringify(e)}` if (completers[name]) { return await completers[name](value2, auth2); } + if (inputResourceTemplate.complete) { + return await inputResourceTemplate.complete(name, value2, auth2); + } return { values: [] }; @@ -123737,9 +134931,8 @@ ${e instanceof Error ? e.stack : JSON.stringify(e)}` setupCompleteHandlers() { this.#server.setRequestHandler(CompleteRequestSchema2, async (request2) => { if (request2.params.ref.type === "ref/prompt") { - const prompt = this.#prompts.find( - (prompt2) => prompt2.name === request2.params.ref.name - ); + const ref = request2.params.ref; + const prompt = "name" in ref && this.#prompts.find((prompt2) => prompt2.name === ref.name); if (!prompt) { throw new UnexpectedStateError("Unknown prompt", { request: request2 @@ -123762,8 +134955,9 @@ ${e instanceof Error ? e.stack : JSON.stringify(e)}` }; } if (request2.params.ref.type === "ref/resource") { - const resource = this.#resourceTemplates.find( - (resource2) => resource2.uriTemplate === request2.params.ref.uri + const ref = request2.params.ref; + const resource = "uri" in ref && this.#resourceTemplates.find( + (resource2) => resource2.uriTemplate === ref.uri ); if (!resource) { throw new UnexpectedStateError("Unknown resource", { @@ -123798,8 +134992,8 @@ ${e instanceof Error ? e.stack : JSON.stringify(e)}` }); } setupErrorHandling() { - this.#server.onerror = (error41) => { - this.#logger.error("[FastMCP error]", error41); + this.#server.onerror = (error50) => { + this.#logger.error("[FastMCP error]", error50); }; } setupLoggingHandlers() { @@ -123809,16 +135003,23 @@ ${e instanceof Error ? e.stack : JSON.stringify(e)}` }); } setupPromptHandlers(prompts) { + let cachedPromptsList = null; this.#server.setRequestHandler(ListPromptsRequestSchema2, async () => { + if (cachedPromptsList) { + return { + prompts: cachedPromptsList + }; + } + cachedPromptsList = prompts.map((prompt) => { + return { + arguments: prompt.arguments, + complete: prompt.complete, + description: prompt.description, + name: prompt.name + }; + }); return { - prompts: prompts.map((prompt) => { - return { - arguments: prompt.arguments, - complete: prompt.complete, - description: prompt.description, - name: prompt.name - }; - }) + prompts: cachedPromptsList }; }); this.#server.setRequestHandler(GetPromptRequestSchema2, async (request2) => { @@ -123846,8 +135047,8 @@ ${e instanceof Error ? e.stack : JSON.stringify(e)}` args3, this.#auth ); - } catch (error41) { - const errorMessage = error41 instanceof Error ? error41.message : String(error41); + } catch (error50) { + const errorMessage = error50 instanceof Error ? error50.message : String(error50); throw new McpError( ErrorCode2.InternalError, `Failed to load prompt '${request2.params.name}': ${errorMessage}` @@ -123872,14 +135073,21 @@ ${e instanceof Error ? e.stack : JSON.stringify(e)}` }); } setupResourceHandlers(resources) { + let cachedResourcesList = null; this.#server.setRequestHandler(ListResourcesRequestSchema2, async () => { + if (cachedResourcesList) { + return { + resources: cachedResourcesList + }; + } + cachedResourcesList = resources.map((resource) => ({ + description: resource.description, + mimeType: resource.mimeType, + name: resource.name, + uri: resource.uri + })); return { - resources: resources.map((resource) => ({ - description: resource.description, - mimeType: resource.mimeType, - name: resource.name, - uri: resource.uri - })) + resources: cachedResourcesList }; }); this.#server.setRequestHandler( @@ -123922,8 +135130,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 (error50) { + const errorMessage = error50 instanceof Error ? error50.message : String(error50); throw new McpError( ErrorCode2.InternalError, `Failed to load resource '${resource.name}' (${resource.uri}): ${errorMessage}`, @@ -123949,16 +135157,25 @@ ${e instanceof Error ? e.stack : JSON.stringify(e)}` ); } setupResourceTemplateHandlers(resourceTemplates) { + let cachedResourceTemplatesList = null; this.#server.setRequestHandler( ListResourceTemplatesRequestSchema2, async () => { - return { - resourceTemplates: resourceTemplates.map((resourceTemplate) => ({ + if (cachedResourceTemplatesList) { + return { + resourceTemplates: cachedResourceTemplatesList + }; + } + cachedResourceTemplatesList = resourceTemplates.map( + (resourceTemplate) => ({ description: resourceTemplate.description, mimeType: resourceTemplate.mimeType, name: resourceTemplate.name, uriTemplate: resourceTemplate.uriTemplate - })) + }) + ); + return { + resourceTemplates: cachedResourceTemplatesList }; } ); @@ -123979,8 +135196,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((error50) => { + if (error50 instanceof McpError && error50.code === ErrorCode2.MethodNotFound) { this.#logger.debug( "[FastMCP debug] listRoots method not supported by client" ); @@ -123988,7 +135205,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)}` +${error50 instanceof Error ? error50.stack : JSON.stringify(error50)}` ); } }); @@ -124001,23 +135218,29 @@ ${error41 instanceof Error ? error41.stack : JSON.stringify(error41)}` } } setupToolHandlers(tools) { + let cachedToolsList = null; this.#server.setRequestHandler(ListToolsRequestSchema2, async () => { + if (cachedToolsList) { + return { + tools: cachedToolsList + }; + } + cachedToolsList = await Promise.all( + tools.map(async (tool2) => { + return { + annotations: tool2.annotations, + description: tool2.description, + inputSchema: tool2.parameters ? await toJsonSchema(tool2.parameters) : { + additionalProperties: false, + properties: {}, + type: "object" + }, + name: tool2.name + }; + }) + ); return { - tools: await Promise.all( - tools.map(async (tool2) => { - return { - annotations: tool2.annotations, - description: tool2.description, - inputSchema: tool2.parameters ? await toJsonSchema(tool2.parameters) : { - additionalProperties: false, - properties: {}, - type: "object" - }, - // More complete schema for Cursor compatibility - name: tool2.name - }; - }) - ) + tools: cachedToolsList }; }); this.#server.setRequestHandler(CallToolRequestSchema2, async (request2) => { @@ -124034,9 +135257,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((issue4) => { + const path4 = issue4.path?.join(".") || "root"; + return `${path4}: ${issue4.message}`; }).join(", "); throw new McpError( ErrorCode2.InvalidParams, @@ -124165,15 +135388,15 @@ ${error41 instanceof Error ? error41.stack : JSON.stringify(error41)}` } else { result = ContentResultZodSchema.parse(maybeStringResult); } - } catch (error41) { - if (error41 instanceof UserError) { + } catch (error50) { + if (error50 instanceof UserError) { return { - content: [{ text: error41.message, type: "text" }], + content: [{ text: error50.message, type: "text" }], isError: true, - ...error41.extras ? { structuredContent: error41.extras } : {} + ...error50.extras ? { structuredContent: error50.extras } : {} }; } - const errorMessage = error41 instanceof Error ? error41.message : String(error41); + const errorMessage = error50 instanceof Error ? error50.message : String(error50); return { content: [ { @@ -124199,6 +135422,18 @@ function convertObjectToSnakeCase(obj) { } return result; } +function parseBasicAuthHeader(authHeader) { + const basicMatch = authHeader?.match(/^Basic\s+(.+)$/); + if (!basicMatch) return null; + try { + const credentials = Buffer.from(basicMatch[1], "base64").toString("utf-8"); + const credMatch = credentials.match(/^([^:]+):(.*)$/); + if (!credMatch) return null; + return { clientId: credMatch[1], clientSecret: credMatch[2] }; + } catch { + return null; + } +} var FastMCPEventEmitterBase = EventEmitter; var FastMCPEventEmitter = class extends FastMCPEventEmitterBase { }; @@ -124210,6 +135445,9 @@ var FastMCP = class extends FastMCPEventEmitter { this.#authenticate = options.authenticate; this.#logger = options.logger || console; } + get serverState() { + return this.#serverState; + } get sessions() { return this.#sessions; } @@ -124220,31 +135458,102 @@ var FastMCP = class extends FastMCPEventEmitter { #prompts = []; #resources = []; #resourcesTemplates = []; + #serverState = "stopped"; #sessions = []; #tools = []; /** * Adds a prompt to the server. */ addPrompt(prompt) { + this.#prompts = this.#prompts.filter((p) => p.name !== prompt.name); this.#prompts.push(prompt); + if (this.#serverState === "running") { + this.#promptsListChanged(this.#prompts); + } + } + /** + * Adds prompts to the server. + */ + addPrompts(prompts) { + const newPromptNames = new Set(prompts.map((prompt) => prompt.name)); + this.#prompts = this.#prompts.filter((p) => !newPromptNames.has(p.name)); + this.#prompts.push(...prompts); + if (this.#serverState === "running") { + this.#promptsListChanged(this.#prompts); + } } /** * Adds a resource to the server. */ addResource(resource) { + this.#resources = this.#resources.filter((r) => r.name !== resource.name); this.#resources.push(resource); + if (this.#serverState === "running") { + this.#resourcesListChanged(this.#resources); + } + } + /** + * Adds resources to the server. + */ + addResources(resources) { + const newResourceNames = new Set( + resources.map((resource) => resource.name) + ); + this.#resources = this.#resources.filter( + (r) => !newResourceNames.has(r.name) + ); + this.#resources.push(...resources); + if (this.#serverState === "running") { + this.#resourcesListChanged(this.#resources); + } } /** * Adds a resource template to the server. */ addResourceTemplate(resource) { + this.#resourcesTemplates = this.#resourcesTemplates.filter( + (t) => t.name !== resource.name + ); this.#resourcesTemplates.push(resource); + if (this.#serverState === "running") { + this.#resourceTemplatesListChanged(this.#resourcesTemplates); + } + } + /** + * Adds resource templates to the server. + */ + addResourceTemplates(resources) { + const newResourceTemplateNames = new Set( + resources.map((resource) => resource.name) + ); + this.#resourcesTemplates = this.#resourcesTemplates.filter( + (t) => !newResourceTemplateNames.has(t.name) + ); + this.#resourcesTemplates.push(...resources); + if (this.#serverState === "running") { + this.#resourceTemplatesListChanged(this.#resourcesTemplates); + } } /** * Adds a tool to the server. */ addTool(tool2) { + this.#tools = this.#tools.filter((t) => t.name !== tool2.name); this.#tools.push(tool2); + if (this.#serverState === "running") { + this.#toolsListChanged(this.#tools); + } + } + /** + * Adds tools to the server. + */ + addTools(tools) { + const newToolNames = new Set(tools.map((tool2) => tool2.name)); + this.#tools = this.#tools.filter((t) => !newToolNames.has(t.name)); + this.#tools.push(...tools); + if (this.#serverState === "running") { + this.#toolsListChanged(this.#tools); + } } /** * Embeds a resource by URI, making it easy to include resources in tool responses. @@ -124295,12 +135604,96 @@ var FastMCP = class extends FastMCPEventEmitter { } throw new UnexpectedStateError(`Resource not found: ${uri}`, { uri }); } + /** + * Removes a prompt from the server. + */ + removePrompt(name) { + this.#prompts = this.#prompts.filter((p) => p.name !== name); + if (this.#serverState === "running") { + this.#promptsListChanged(this.#prompts); + } + } + /** + * Removes prompts from the server. + */ + removePrompts(names) { + for (const name of names) { + this.#prompts = this.#prompts.filter((p) => p.name !== name); + } + if (this.#serverState === "running") { + this.#promptsListChanged(this.#prompts); + } + } + /** + * Removes a resource from the server. + */ + removeResource(name) { + this.#resources = this.#resources.filter((r) => r.name !== name); + if (this.#serverState === "running") { + this.#resourcesListChanged(this.#resources); + } + } + /** + * Removes resources from the server. + */ + removeResources(names) { + for (const name of names) { + this.#resources = this.#resources.filter((r) => r.name !== name); + } + if (this.#serverState === "running") { + this.#resourcesListChanged(this.#resources); + } + } + /** + * Removes a resource template from the server. + */ + removeResourceTemplate(name) { + this.#resourcesTemplates = this.#resourcesTemplates.filter( + (t) => t.name !== name + ); + if (this.#serverState === "running") { + this.#resourceTemplatesListChanged(this.#resourcesTemplates); + } + } + /** + * Removes resource templates from the server. + */ + removeResourceTemplates(names) { + for (const name of names) { + this.#resourcesTemplates = this.#resourcesTemplates.filter( + (t) => t.name !== name + ); + } + if (this.#serverState === "running") { + this.#resourceTemplatesListChanged(this.#resourcesTemplates); + } + } + /** + * Removes a tool from the server. + */ + removeTool(name) { + this.#tools = this.#tools.filter((t) => t.name !== name); + if (this.#serverState === "running") { + this.#toolsListChanged(this.#tools); + } + } + /** + * Removes tools from the server. + */ + removeTools(names) { + for (const name of names) { + this.#tools = this.#tools.filter((t) => t.name !== name); + } + if (this.#serverState === "running") { + this.#toolsListChanged(this.#tools); + } + } /** * Starts the server. */ async start(options) { - const config2 = this.#parseRuntimeConfig(options); - if (config2.transportType === "stdio") { + const config4 = this.#parseRuntimeConfig(options); + if (config4.transportType === "stdio") { const transport = new StdioServerTransport(); let auth2; if (this.#authenticate) { @@ -124308,10 +135701,10 @@ var FastMCP = class extends FastMCPEventEmitter { auth2 = await this.#authenticate( void 0 ); - } catch (error41) { + } catch (error50) { this.#logger.error( "[FastMCP error] Authentication failed for stdio transport:", - error41 instanceof Error ? error41.message : String(error41) + error50 instanceof Error ? error50.message : String(error50) ); } } @@ -124351,8 +135744,9 @@ var FastMCP = class extends FastMCPEventEmitter { this.emit("connect", { session }); - } else if (config2.transportType === "httpStream") { - const httpConfig = config2.httpStream; + this.#serverState = "running"; + } else if (config4.transportType === "httpStream") { + const httpConfig = config4.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}` @@ -124373,6 +135767,13 @@ var FastMCP = class extends FastMCPEventEmitter { enableJsonResponse: httpConfig.enableJsonResponse, eventStore: httpConfig.eventStore, host: httpConfig.host, + ...this.#options.oauth?.enabled && this.#options.oauth.protectedResource?.resource ? { + oauth: { + protectedResource: { + resource: this.#options.oauth.protectedResource.resource + } + } + } : {}, // In stateless mode, we don't track sessions onClose: async () => { }, @@ -124382,7 +135783,13 @@ var FastMCP = class extends FastMCPEventEmitter { ); }, onUnhandledRequest: async (req, res) => { - await this.#handleUnhandledRequest(req, res, true, httpConfig.host); + await this.#handleUnhandledRequest( + req, + res, + true, + httpConfig.host, + httpConfig.endpoint + ); }, port: httpConfig.port, stateless: true, @@ -124402,6 +135809,13 @@ var FastMCP = class extends FastMCPEventEmitter { enableJsonResponse: httpConfig.enableJsonResponse, eventStore: httpConfig.eventStore, host: httpConfig.host, + ...this.#options.oauth?.enabled && this.#options.oauth.protectedResource?.resource ? { + oauth: { + protectedResource: { + resource: this.#options.oauth.protectedResource.resource + } + } + } : {}, onClose: async (session) => { const sessionIndex = this.#sessions.indexOf(session); if (sessionIndex !== -1) this.#sessions.splice(sessionIndex, 1); @@ -124421,7 +135835,8 @@ var FastMCP = class extends FastMCPEventEmitter { req, res, false, - httpConfig.host + httpConfig.host, + httpConfig.endpoint ); }, port: httpConfig.port, @@ -124432,6 +135847,7 @@ var FastMCP = class extends FastMCPEventEmitter { `[FastMCP info] server is running on HTTP Stream at http://${httpConfig.host}:${httpConfig.port}${httpConfig.endpoint}` ); } + this.#serverState = "running"; } else { throw new Error("Invalid transport type"); } @@ -124443,6 +135859,7 @@ var FastMCP = class extends FastMCPEventEmitter { if (this.#httpStreamServer) { await this.#httpStreamServer.close(); } + this.#serverState = "stopped"; } /** * Creates a new FastMCPSession instance with the current configuration. @@ -124476,20 +135893,20 @@ var FastMCP = class extends FastMCPEventEmitter { /** * Handles unhandled HTTP requests with health, readiness, and OAuth endpoints */ - #handleUnhandledRequest = async (req, res, isStateless = false, host) => { + #handleUnhandledRequest = async (req, res, isStateless = false, host, streamEndpoint) => { const healthConfig = this.#options.health ?? {}; const enabled = healthConfig.enabled === void 0 ? true : healthConfig.enabled; if (enabled) { const path4 = healthConfig.path ?? "/health"; - const url2 = new URL(req.url || "", `http://${host}`); + const url4 = new URL(req.url || "", `http://${host}`); try { - if (req.method === "GET" && url2.pathname === path4) { + if (req.method === "GET" && url4.pathname === path4) { res.writeHead(healthConfig.status ?? 200, { "Content-Type": "text/plain" }).end(healthConfig.message ?? "\u2713 Ok"); return; } - if (req.method === "GET" && url2.pathname === "/ready") { + if (req.method === "GET" && url4.pathname === "/ready") { if (isStateless) { const response = { mode: "stateless", @@ -124517,14 +135934,14 @@ var FastMCP = class extends FastMCPEventEmitter { } return; } - } catch (error41) { - this.#logger.error("[FastMCP error] health endpoint error", error41); + } catch (error50) { + this.#logger.error("[FastMCP error] health endpoint error", error50); } } const oauthConfig = this.#options.oauth; if (oauthConfig?.enabled && req.method === "GET") { - const url2 = new URL(req.url || "", `http://${host}`); - if (url2.pathname === "/.well-known/oauth-authorization-server" && oauthConfig.authorizationServer) { + const url4 = new URL(req.url || "", `http://${host}`); + if (url4.pathname === "/.well-known/oauth-authorization-server" && oauthConfig.authorizationServer) { const metadata = convertObjectToSnakeCase( oauthConfig.authorizationServer ); @@ -124533,13 +135950,179 @@ var FastMCP = class extends FastMCPEventEmitter { }).end(JSON.stringify(metadata)); return; } - if (url2.pathname === "/.well-known/oauth-protected-resource" && oauthConfig.protectedResource) { - const metadata = convertObjectToSnakeCase( - oauthConfig.protectedResource - ); - res.writeHead(200, { - "Content-Type": "application/json" - }).end(JSON.stringify(metadata)); + if (oauthConfig.protectedResource) { + const wellKnownBase = "/.well-known/oauth-protected-resource"; + let shouldServeMetadata = false; + if (streamEndpoint && url4.pathname === `${wellKnownBase}${streamEndpoint}`) { + shouldServeMetadata = true; + } else if (url4.pathname === wellKnownBase) { + shouldServeMetadata = true; + } + if (shouldServeMetadata) { + const metadata = convertObjectToSnakeCase( + oauthConfig.protectedResource + ); + res.writeHead(200, { + "Content-Type": "application/json" + }).end(JSON.stringify(metadata)); + return; + } + } + } + const oauthProxy = oauthConfig?.proxy; + if (oauthProxy && oauthConfig?.enabled) { + const url4 = new URL(req.url || "", `http://${host}`); + try { + if (req.method === "POST" && url4.pathname === "/oauth/register") { + let body = ""; + req.on("data", (chunk) => body += chunk); + req.on("end", async () => { + try { + const request2 = JSON.parse(body); + const response = await oauthProxy.registerClient(request2); + res.writeHead(201, { "Content-Type": "application/json" }).end(JSON.stringify(response)); + } catch (error50) { + const statusCode = error50.statusCode || 400; + res.writeHead(statusCode, { "Content-Type": "application/json" }).end( + JSON.stringify( + error50.toJSON?.() || { + error: "invalid_request" + } + ) + ); + } + }); + return; + } + if (req.method === "GET" && url4.pathname === "/oauth/authorize") { + try { + const params = Object.fromEntries(url4.searchParams.entries()); + const response = await oauthProxy.authorize( + params + ); + const location = response.headers.get("Location"); + if (location) { + res.writeHead(response.status, { Location: location }).end(); + } else { + const html = await response.text(); + res.writeHead(response.status, { "Content-Type": "text/html" }).end(html); + } + } catch (error50) { + res.writeHead(400, { "Content-Type": "application/json" }).end( + JSON.stringify( + error50.toJSON?.() || { + error: "invalid_request" + } + ) + ); + } + return; + } + if (req.method === "GET" && url4.pathname === "/oauth/callback") { + try { + const mockRequest = new Request(`http://${host}${req.url}`); + const response = await oauthProxy.handleCallback(mockRequest); + const location = response.headers.get("Location"); + if (location) { + res.writeHead(response.status, { Location: location }).end(); + } else { + const text = await response.text(); + res.writeHead(response.status).end(text); + } + } catch (error50) { + res.writeHead(400, { "Content-Type": "application/json" }).end( + JSON.stringify( + error50.toJSON?.() || { + error: "server_error" + } + ) + ); + } + return; + } + if (req.method === "POST" && url4.pathname === "/oauth/consent") { + let body = ""; + req.on("data", (chunk) => body += chunk); + req.on("end", async () => { + try { + const mockRequest = new Request(`http://${host}/oauth/consent`, { + body, + headers: { + "Content-Type": "application/x-www-form-urlencoded" + }, + method: "POST" + }); + const response = await oauthProxy.handleConsent(mockRequest); + const location = response.headers.get("Location"); + if (location) { + res.writeHead(response.status, { Location: location }).end(); + } else { + const text = await response.text(); + res.writeHead(response.status).end(text); + } + } catch (error50) { + res.writeHead(400, { "Content-Type": "application/json" }).end( + JSON.stringify( + error50.toJSON?.() || { + error: "server_error" + } + ) + ); + } + }); + return; + } + if (req.method === "POST" && url4.pathname === "/oauth/token") { + let body = ""; + req.on("data", (chunk) => body += chunk); + req.on("end", async () => { + try { + const params = new URLSearchParams(body); + const grantType = params.get("grant_type"); + const basicAuth = parseBasicAuthHeader(req.headers.authorization); + const clientId = basicAuth?.clientId || params.get("client_id") || ""; + const clientSecret = basicAuth?.clientSecret ?? params.get("client_secret") ?? void 0; + let response; + if (grantType === "authorization_code") { + response = await oauthProxy.exchangeAuthorizationCode({ + client_id: clientId, + client_secret: clientSecret, + code: params.get("code") || "", + code_verifier: params.get("code_verifier") || void 0, + grant_type: "authorization_code", + redirect_uri: params.get("redirect_uri") || "" + }); + } else if (grantType === "refresh_token") { + response = await oauthProxy.exchangeRefreshToken({ + client_id: clientId, + client_secret: clientSecret, + grant_type: "refresh_token", + refresh_token: params.get("refresh_token") || "", + scope: params.get("scope") || void 0 + }); + } else { + throw { + statusCode: 400, + toJSON: () => ({ error: "unsupported_grant_type" }) + }; + } + res.writeHead(200, { "Content-Type": "application/json" }).end(JSON.stringify(response)); + } catch (error50) { + const statusCode = error50.statusCode || 400; + res.writeHead(statusCode, { "Content-Type": "application/json" }).end( + JSON.stringify( + error50.toJSON?.() || { + error: "invalid_request" + } + ) + ); + } + }); + return; + } + } catch (error50) { + this.#logger.error("[FastMCP error] OAuth Proxy endpoint error", error50); + res.writeHead(500).end(); return; } } @@ -124583,6 +136166,14 @@ var FastMCP = class extends FastMCPEventEmitter { } return { transportType: "stdio" }; } + /** + * Notifies all sessions that the prompts list has changed. + */ + #promptsListChanged(prompts) { + for (const session of this.#sessions) { + session.promptsListChanged(prompts); + } + } #removeSession(session) { const sessionIndex = this.#sessions.indexOf(session); if (sessionIndex !== -1) { @@ -124592,11 +136183,35 @@ var FastMCP = class extends FastMCPEventEmitter { }); } } + /** + * Notifies all sessions that the resources list has changed. + */ + #resourcesListChanged(resources) { + for (const session of this.#sessions) { + session.resourcesListChanged(resources); + } + } + /** + * Notifies all sessions that the resource templates list has changed. + */ + #resourceTemplatesListChanged(templates) { + for (const session of this.#sessions) { + session.resourceTemplatesListChanged(templates); + } + } + /** + * Notifies all sessions that the tools list has changed. + */ + #toolsListChanged(tools) { + for (const session of this.#sessions) { + session.toolsListChanged(tools); + } + } }; // mcp/checkout.ts -import { writeFileSync as writeFileSync5 } from "node:fs"; -import { join as join9 } from "node:path"; +import { writeFileSync as writeFileSync4 } from "node:fs"; +import { join as join10 } from "node:path"; // utils/shell.ts import { spawnSync as spawnSync3 } from "node:child_process"; @@ -124643,16 +136258,16 @@ function $(cmd, args3, options) { // mcp/checkout.ts function formatFilesWithLineNumbers(files) { const output = []; - for (const file of files) { - output.push(`diff --git a/${file.filename} b/${file.filename}`); - output.push(`--- a/${file.filename}`); - output.push(`+++ b/${file.filename}`); - if (!file.patch) { + for (const file2 of files) { + output.push(`diff --git a/${file2.filename} b/${file2.filename}`); + output.push(`--- a/${file2.filename}`); + output.push(`+++ b/${file2.filename}`); + if (!file2.patch) { output.push("(binary file or no changes)"); output.push(""); continue; } - const lines = file.patch.split("\n"); + const lines = file2.patch.split("\n"); let oldLine = 0; let newLine = 0; for (const line of lines) { @@ -124789,8 +136404,8 @@ ${diffPreview}`); "PULLFROG_TEMP_DIR not set - checkout_pr must run in pullfrog action context" ); } - const diffPath = join9(tempDir, `pr-${pull_number}.diff`); - writeFileSync5(diffPath, diffContent); + const diffPath = join10(tempDir, `pr-${pull_number}.diff`); + writeFileSync4(diffPath, diffContent); log.debug(`wrote diff to ${diffPath} (${diffContent.length} bytes)`); return { success: true, @@ -124861,7 +136476,7 @@ function GetCheckSuiteLogsTool(ctx) { completed_at: job.completed_at, logs: logsText }; - } catch (error41) { + } catch (error50) { return { job_id: job.id, job_name: job.name, @@ -124869,7 +136484,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: ${error50}` }; } }) @@ -124910,10 +136525,10 @@ function DebugShellCommandTool(_ctx) { } // prep/installNodeDependencies.ts -import { existsSync as existsSync3, readFileSync as readFileSync3 } from "node:fs"; -import { join as join10 } from "node:path"; +import { existsSync as existsSync4, readFileSync as readFileSync3 } from "node:fs"; +import { join as join11 } from "node:path"; -// node_modules/.pnpm/package-manager-detector@1.6.0/node_modules/package-manager-detector/dist/commands.mjs +// ../node_modules/.pnpm/package-manager-detector@1.6.0/node_modules/package-manager-detector/dist/commands.mjs function dashDashArg(agent2, agentCommand) { return (args3) => { if (args3.length > 1) { @@ -125046,7 +136661,7 @@ function constructCommand(value2, args3) { }; } -// node_modules/.pnpm/package-manager-detector@1.6.0/node_modules/package-manager-detector/dist/constants.mjs +// ../node_modules/.pnpm/package-manager-detector@1.6.0/node_modules/package-manager-detector/dist/constants.mjs var AGENTS = [ "npm", "yarn", @@ -125082,10 +136697,10 @@ var INSTALL_METADATA = { "bun.lockb": "bun" }; -// node_modules/.pnpm/package-manager-detector@1.6.0/node_modules/package-manager-detector/dist/detect.mjs +// ../node_modules/.pnpm/package-manager-detector@1.6.0/node_modules/package-manager-detector/dist/detect.mjs import fs3 from "node:fs/promises"; import path3 from "node:path"; -import process3 from "node:process"; +import process4 from "node:process"; async function pathExists(path22, type2) { try { const stat = await fs3.stat(path22); @@ -125094,7 +136709,7 @@ async function pathExists(path22, type2) { return false; } } -function* lookup(cwd2 = process3.cwd()) { +function* lookup(cwd2 = process4.cwd()) { let directory = path3.resolve(cwd2); const { root: root2 } = path3.parse(directory); while (directory && directory !== root2) { @@ -125161,7 +136776,7 @@ async function detect(options = {}) { return null; } function getNameAndVer(pkg) { - const handelVer = (version2) => version2?.match(/\d+(\.\d+){0,2}/)?.[0] ?? version2; + const handelVer = (version4) => version4?.match(/\d+(\.\d+){0,2}/)?.[0] ?? version4; if (typeof pkg.packageManager === "string") { const [name, ver] = pkg.packageManager.replace(/^\^/, "").split("@"); return { name, ver: handelVer(ver) }; @@ -125183,17 +136798,17 @@ async function handlePackageManager(filepath, options) { if (nameAndVer) { const name = nameAndVer.name; const ver = nameAndVer.ver; - let version2 = ver; + let version4 = ver; if (name === "yarn" && ver && Number.parseInt(ver) > 1) { agent2 = "yarn@berry"; - version2 = "berry"; - return { name, agent: agent2, version: version2 }; + version4 = "berry"; + return { name, agent: agent2, version: version4 }; } else if (name === "pnpm" && ver && Number.parseInt(ver) < 7) { agent2 = "pnpm@6"; - return { name, agent: agent2, version: version2 }; + return { name, agent: agent2, version: version4 }; } else if (AGENTS.includes(name)) { agent2 = name; - return { name, agent: agent2, version: version2 }; + return { name, agent: agent2, version: version4 }; } else { return options.onUnknown?.(pkg.packageManager) ?? null; } @@ -125223,7 +136838,7 @@ async function isCommandAvailable(command) { return result.exitCode === 0; } function getPackageManagerFromPackageJson() { - const packageJsonPath = join10(process.cwd(), "package.json"); + const packageJsonPath = join11(process.cwd(), "package.json"); try { const content = readFileSync3(packageJsonPath, "utf-8"); const pkg = JSON.parse(content); @@ -125254,7 +136869,7 @@ async function installPackageManager(name, installSpec) { return result.stderr || `failed to install ${name}`; } if (name === "deno") { - const denoPath = join10(process.env.HOME || "", ".deno", "bin"); + const denoPath = join11(process.env.HOME || "", ".deno", "bin"); process.env.PATH = `${denoPath}:${process.env.PATH}`; } log.info(`\u2705 installed ${name}`); @@ -125263,8 +136878,8 @@ async function installPackageManager(name, installSpec) { var installNodeDependencies = { name: "installNodeDependencies", shouldRun: () => { - const packageJsonPath = join10(process.cwd(), "package.json"); - return existsSync3(packageJsonPath); + const packageJsonPath = join11(process.cwd(), "package.json"); + return existsSync4(packageJsonPath); }, run: async () => { const fromPackageJson = getPackageManagerFromPackageJson(); @@ -125325,8 +136940,8 @@ var installNodeDependencies = { }; // prep/installPythonDependencies.ts -import { existsSync as existsSync4 } from "node:fs"; -import { join as join11 } from "node:path"; +import { existsSync as existsSync5 } from "node:fs"; +import { join as join12 } from "node:path"; var PYTHON_CONFIGS = [ { file: "requirements.txt", @@ -125398,12 +137013,12 @@ var installPythonDependencies = { return false; } const cwd2 = process.cwd(); - return PYTHON_CONFIGS.some((config2) => existsSync4(join11(cwd2, config2.file))); + return PYTHON_CONFIGS.some((config4) => existsSync5(join12(cwd2, config4.file))); }, run: async () => { const cwd2 = process.cwd(); - const config2 = PYTHON_CONFIGS.find((c) => existsSync4(join11(cwd2, c.file))); - if (!config2) { + const config4 = PYTHON_CONFIGS.find((c) => existsSync5(join12(cwd2, c.file))); + if (!config4) { return { language: "python", packageManager: "pip", @@ -125412,22 +137027,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: ${config4.file} (using ${config4.tool})`); + const isAvailable = await isCommandAvailable2(config4.tool); if (!isAvailable) { - log.info(`${config2.tool} not found, attempting to install...`); - const installError = await installTool(config2.tool); + log.info(`${config4.tool} not found, attempting to install...`); + const installError = await installTool(config4.tool); if (installError) { return { language: "python", - packageManager: config2.tool, - configFile: config2.file, + packageManager: config4.tool, + configFile: config4.file, dependenciesInstalled: false, issues: [installError] }; } } - const [cmd, ...args3] = config2.installCmd; + const [cmd, ...args3] = config4.installCmd; log.info(`running: ${cmd} ${args3.join(" ")}`); const result = await spawn4({ cmd, @@ -125438,16 +137053,16 @@ var installPythonDependencies = { if (result.exitCode !== 0) { return { language: "python", - packageManager: config2.tool, - configFile: config2.file, + packageManager: config4.tool, + configFile: config4.file, dependenciesInstalled: false, issues: [result.stderr || `${cmd} exited with code ${result.exitCode}`] }; } return { language: "python", - packageManager: config2.tool, - configFile: config2.file, + packageManager: config4.tool, + configFile: config4.file, dependenciesInstalled: true, issues: [] }; @@ -125534,13 +137149,13 @@ function startInstallation(ctx) { if (ctx.toolState.dependencyInstallation) { return; } - const promise = runPrepPhase(); + const promise2 = runPrepPhase(); ctx.toolState.dependencyInstallation = { status: "in_progress", - promise, + promise: promise2, results: void 0 }; - promise.then( + promise2.then( (results) => { if (ctx.toolState.dependencyInstallation) { const hasFailure = results.some((r) => !r.dependenciesInstalled && r.issues.length > 0); @@ -125701,17 +137316,17 @@ function CommitFilesTool(_ctx) { ); } if (files.length > 0) { - for (const file of files) { + for (const file2 of files) { try { - const content = $("cat", [file], { log: false }); + const content = $("cat", [file2], { log: false }); if (containsSecrets(content)) { throw new Error( - `Commit blocked: secrets detected in file ${file}. Please remove any sensitive information (API keys, tokens, passwords) before committing.` + `Commit blocked: secrets detected in file ${file2}. 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 (error50) { + if (error50 instanceof Error && error50.message.includes("Commit blocked")) { + throw error50; } } } @@ -125925,12 +137540,12 @@ function IssueInfoTool(ctx) { description: "Retrieve GitHub issue information by issue number", parameters: IssueInfo, execute: execute(async ({ issue_number }) => { - const issue2 = await ctx.octokit.rest.issues.get({ + const issue4 = await ctx.octokit.rest.issues.get({ owner: ctx.owner, repo: ctx.name, issue_number }); - const data = issue2.data; + const data = issue4.data; ctx.toolState.issueNumber = issue_number; const hints = []; if (data.comments > 0) { @@ -126344,6 +137959,108 @@ function SelectModeTool(ctx) { }); } +// mcp/bash.ts +import { spawn as spawn5 } from "node:child_process"; +var BashParams = type({ + command: "string", + description: "string", + "timeout?": "number", + "working_directory?": "string" +}); +var SENSITIVE_PATTERNS = [ + /_KEY$/i, + /_SECRET$/i, + /_TOKEN$/i, + /PASSWORD/i, + /CREDENTIAL/i, + /AUTH/i, + /^ANTHROPIC/i, + /^OPENAI/i, + /^GEMINI/i, + /^GOOGLE/i, + /^CLAUDE/i, + /^CODEX/i, + /^CURSOR/i, + /^AWS/i, + /^GITHUB_TOKEN$/i, + /^GH_TOKEN$/i +]; +function isSensitive(key) { + return SENSITIVE_PATTERNS.some((p) => p.test(key)); +} +function filterEnv() { + const filtered = {}; + for (const [key, value2] of Object.entries(process.env)) { + if (value2 !== void 0 && !isSensitive(key)) filtered[key] = value2; + } + return filtered; +} +function spawnSandboxed(command, options) { + const stdio = ["ignore", "pipe", "pipe"]; + const spawnOpts = { env: options.env, cwd: options.cwd, stdio, detached: true }; + return process.env.GITHUB_ACTIONS === "true" ? spawn5("unshare", ["--pid", "--fork", "--mount-proc", "bash", "-c", command], spawnOpts) : spawn5("bash", ["-c", command], spawnOpts); +} +async function killProcessGroup(proc) { + if (!proc.pid) return; + try { + process.kill(-proc.pid, "SIGTERM"); + await new Promise((r) => setTimeout(r, 200)); + process.kill(-proc.pid, "SIGKILL"); + } catch { + try { + proc.kill("SIGKILL"); + } catch { + } + } +} +function BashTool(_ctx) { + return tool({ + name: "bash", + description: `Execute shell commands securely. Environment is filtered to remove API keys and secrets. + +Use this tool to: +- Run shell commands (ls, cat, grep, find, etc.) +- Execute build tools (npm, pnpm, cargo, make, etc.) +- Run tests and linters +- Perform git operations + +The command runs in a bash shell with a filtered environment that excludes sensitive variables like API keys and tokens.`, + parameters: BashParams, + execute: execute(async (params) => { + const timeout = Math.min(params.timeout ?? 12e4, 6e5); + const cwd2 = params.working_directory ?? process.cwd(); + const proc = spawnSandboxed(params.command, { env: filterEnv(), cwd: cwd2 }); + let stdout = "", stderr = "", timedOut = false, exited = false; + proc.stdout?.on("data", (chunk) => { + stdout += chunk.toString(); + }); + proc.stderr?.on("data", (chunk) => { + stderr += chunk.toString(); + }); + const timeoutId = setTimeout(async () => { + if (!exited) { + timedOut = true; + await killProcessGroup(proc); + } + }, timeout); + const exitCode = await new Promise((resolve) => { + const done = (code) => { + exited = true; + clearTimeout(timeoutId); + resolve(code); + }; + proc.on("exit", done); + proc.on("error", () => done(null)); + }); + let output = stderr ? stdout ? `${stdout} +${stderr}` : stderr : stdout; + if (timedOut) output = output ? `${output} +[timed out after ${timeout}ms]` : `[timed out after ${timeout}ms]`; + return { output: output.trim(), exit_code: exitCode ?? (timedOut ? 124 : -1), timed_out: timedOut }; + }) + }); +} + // mcp/server.ts async function findAvailablePort(startPort) { const checkPort = (port2) => { @@ -126396,7 +138113,8 @@ async function startMcpHttpServer(ctx) { AddLabelsTool(ctx), CreateBranchTool(ctx), CommitFilesTool(ctx), - PushBranchTool(ctx) + PushBranchTool(ctx), + BashTool(ctx) ]; if (!ctx.payload.disableProgressComment) { tools.push(ReportProgressTool(ctx)); @@ -126413,9 +138131,9 @@ async function startMcpHttpServer(ctx) { endpoint: endpoint2 } }); - const url2 = `http://${host}:${port}${endpoint2}`; + const url4 = `http://${host}:${port}${endpoint2}`; return { - url: url2, + url: url4, [Symbol.asyncDispose]: async () => { await server.stop(); } @@ -126434,12 +138152,12 @@ function getProgressCommentIdFromEnv2() { return null; } async function reportErrorToComment({ - error: error41, + error: error50, title }) { const formattedError = title ? `${title} -${error41}` : `\u274C ${error41}`; +${error50}` : `\u274C ${error50}`; let commentId = getProgressCommentIdFromEnv2(); if (!commentId) { const runId = process.env.GITHUB_RUN_ID; @@ -126491,9 +138209,9 @@ function setupGitConfig() { }); } log.debug("\xBB git configuration set successfully (scoped to repo)"); - } catch (error41) { + } catch (error50) { log.warning( - `Failed to set git config: ${error41 instanceof Error ? error41.message : String(error41)}` + `Failed to set git config: ${error50 instanceof Error ? error50.message : String(error50)}` ); } } @@ -126537,8 +138255,8 @@ var Timer = class { } checkpoint(name) { const now = Date.now(); - const duration2 = this.lastCheckpointTimestamp ? now - this.lastCheckpointTimestamp : now - this.initialTimestamp; - log.debug(`\xBB ${name}: ${duration2}ms`); + const duration6 = this.lastCheckpointTimestamp ? now - this.lastCheckpointTimestamp : now - this.initialTimestamp; + log.debug(`\xBB ${name}: ${duration6}ms`); this.lastCheckpointTimestamp = now; } }; @@ -126675,8 +138393,8 @@ To use "Fix \u{1F44D}s", add a \u{1F44D} reaction to one or more inline review c var _promise2 = __callDispose(_stack, _error, _hasError); _promise2 && await _promise2; } - } catch (error41) { - const errorMessage = error41 instanceof Error ? error41.message : "Unknown error occurred"; + } catch (error50) { + const errorMessage = error50 instanceof Error ? error50.message : "Unknown error occurred"; log.error(errorMessage); try { await reportErrorToComment({ error: errorMessage }); @@ -126797,7 +138515,7 @@ function resolveAgent({ return agent2; } async function createTempDirectory() { - const sharedTempDir = await mkdtemp2(join12(tmpdir2(), "pullfrog-")); + const sharedTempDir = await mkdtemp2(join13(tmpdir2(), "pullfrog-")); process.env.PULLFROG_TEMP_DIR = sharedTempDir; log.info(`\u{1F4C2} PULLFROG_TEMP_DIR has been created at ${sharedTempDir}`); return sharedTempDir; @@ -126918,8 +138636,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 (error50) { + const errorMessage = error50 instanceof Error ? error50.message : "Unknown error occurred"; core3.setFailed(`Action failed: ${errorMessage}`); } } @@ -126934,14 +138652,49 @@ undici/lib/websocket/frame.js: undici/lib/web/websocket/frame.js: (*! ws. MIT License. Einar Otto Stangvik *) -uri-js/dist/es5/uri.all.js: -mcp-proxy/dist/stdio-CsjPjeWC.js: - (** @license URI.js v4.4.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js *) - -mcp-proxy/dist/stdio-CsjPjeWC.js: +mcp-proxy/dist/stdio-DBuYn6eo.mjs: + (*! + * bytes + * Copyright(c) 2012-2014 TJ Holowaychuk + * Copyright(c) 2015 Jed Watson + * MIT Licensed + *) (*! * depd * Copyright(c) 2014-2018 Douglas Christopher Wilson * MIT Licensed *) + (*! + * statuses + * Copyright(c) 2014 Jonathan Ong + * Copyright(c) 2016 Douglas Christopher Wilson + * MIT Licensed + *) + (*! + * toidentifier + * Copyright(c) 2016 Douglas Christopher Wilson + * MIT Licensed + *) + (*! + * http-errors + * Copyright(c) 2014 Jonathan Ong + * Copyright(c) 2016 Douglas Christopher Wilson + * MIT Licensed + *) + (*! + * unpipe + * Copyright(c) 2015 Douglas Christopher Wilson + * MIT Licensed + *) + (*! + * raw-body + * Copyright(c) 2013-2014 Jonathan Ong + * Copyright(c) 2014-2022 Douglas Christopher Wilson + * MIT Licensed + *) + (*! + * content-type + * Copyright(c) 2015 Douglas Christopher Wilson + * MIT Licensed + *) */ diff --git a/fixtures/bash-test.ts b/fixtures/bash-test.ts new file mode 100644 index 0000000..34f1d15 --- /dev/null +++ b/fixtures/bash-test.ts @@ -0,0 +1,35 @@ +import type { Payload } from "../external.ts"; + +/** + * test fixture: verifies agents use MCP bash tool for shell commands. + * creates a simple test file and runs it with node. + * + * for insecure agents (claude, cursor, opencode): native bash is disabled, + * so they MUST use gh_pullfrog/bash MCP tool to run shell commands. + * + * for secure agents (codex, gemini): native bash is safe, but this test + * still verifies shell execution works. + * + * run with: AGENT_OVERRIDE= pnpm play bash-test.ts + */ +export default { + "~pullfrog": true, + agent: null, + prompt: `Create a file called test-runner.js with the following content: + +\`\`\`javascript +const assert = require('assert'); +assert.strictEqual(2 + 2, 4, 'math should work'); +console.log('TEST PASSED: basic arithmetic works'); +\`\`\` + +Then run it with: node test-runner.js + +Finally, delete the test file. + +This tests that you can execute shell commands properly.`, + event: { + trigger: "workflow_dispatch", + }, + modes: [], +} satisfies Payload; diff --git a/fixtures/basic.ts b/fixtures/basic.ts index 6479ced..890b745 100644 --- a/fixtures/basic.ts +++ b/fixtures/basic.ts @@ -1,9 +1,12 @@ -import type { Inputs } from "../main.ts"; +import type { Payload } from "../external.ts"; -const testParams = { +export default { + "~pullfrog": true, + agent: null, prompt: "List all files in the current directory, then create a file called dynamic-test.txt with the content 'This was loaded from a TypeScript file!', then delete it.", - anthropic_api_key: "sk-test-key", -} satisfies Inputs; - -export default testParams; + event: { + trigger: "workflow_dispatch", + }, + modes: [], +} satisfies Payload; diff --git a/fixtures/sandbox.ts b/fixtures/sandbox.ts index fd61c4b..8c821ef 100644 --- a/fixtures/sandbox.ts +++ b/fixtures/sandbox.ts @@ -6,9 +6,9 @@ import type { Payload } from "../external.ts"; * * run with: AGENT_OVERRIDE=claude pnpm play sandbox.ts */ -const payload: Payload = { +export default { "~pullfrog": true, - agent: null, // let AGENT_OVERRIDE control this for testing different agents + agent: null, prompt: `Please do the following three things: 1. Fetch the content from https://httpbin.org/json and tell me what it says @@ -24,6 +24,4 @@ All three of these actions should fail because you are running in sandbox mode w }, modes: [], sandbox: true, -}; - -export default JSON.stringify(payload); +} satisfies Payload; diff --git a/mcp/bash.ts b/mcp/bash.ts new file mode 100644 index 0000000..5c93b2b --- /dev/null +++ b/mcp/bash.ts @@ -0,0 +1,111 @@ +import { type ChildProcess, spawn } from "node:child_process"; +import { type } from "arktype"; +import type { ToolContext } from "../main.ts"; +import { execute, tool } from "./shared.ts"; + +export const BashParams = type({ + command: "string", + description: "string", + "timeout?": "number", + "working_directory?": "string", +}); + +// patterns for sensitive env vars: suffixes (_KEY, _SECRET, _TOKEN) plus AI provider prefixes +const SENSITIVE_PATTERNS = [ + /_KEY$/i, + /_SECRET$/i, + /_TOKEN$/i, + /PASSWORD/i, + /CREDENTIAL/i, + /AUTH/i, + /^ANTHROPIC/i, + /^OPENAI/i, + /^GEMINI/i, + /^GOOGLE/i, + /^CLAUDE/i, + /^CODEX/i, + /^CURSOR/i, + /^AWS/i, + /^GITHUB_TOKEN$/i, + /^GH_TOKEN$/i, +]; + +function isSensitive(key: string): boolean { + return SENSITIVE_PATTERNS.some((p) => p.test(key)); +} + +/** filter env vars, removing sensitive values */ +function filterEnv(): Record { + const filtered: Record = {}; + for (const [key, value] of Object.entries(process.env)) { + if (value !== undefined && !isSensitive(key)) filtered[key] = value; + } + return filtered; +} + +/** + * spawn command with filtered env. in CI, also use PID namespace isolation + * to prevent child from reading /proc/$PPID/environ + */ +function spawnSandboxed( + command: string, + options: { env: Record; cwd: string }, +): ChildProcess { + const stdio: ["ignore", "pipe", "pipe"] = ["ignore", "pipe", "pipe"]; + const spawnOpts = { env: options.env, cwd: options.cwd, stdio, detached: true }; + return process.env.GITHUB_ACTIONS === "true" + ? spawn("unshare", ["--pid", "--fork", "--mount-proc", "bash", "-c", command], spawnOpts) + : spawn("bash", ["-c", command], spawnOpts); +} + +/** kill process and its entire process group */ +async function killProcessGroup(proc: ChildProcess): Promise { + if (!proc.pid) return; + try { + process.kill(-proc.pid, "SIGTERM"); + await new Promise((r) => setTimeout(r, 200)); + process.kill(-proc.pid, "SIGKILL"); + } catch { + try { proc.kill("SIGKILL"); } catch { /* already dead */ } + } +} + +export function BashTool(_ctx: ToolContext) { + return tool({ + name: "bash", + description: `Execute shell commands securely. Environment is filtered to remove API keys and secrets. + +Use this tool to: +- Run shell commands (ls, cat, grep, find, etc.) +- Execute build tools (npm, pnpm, cargo, make, etc.) +- Run tests and linters +- Perform git operations + +The command runs in a bash shell with a filtered environment that excludes sensitive variables like API keys and tokens.`, + parameters: BashParams, + execute: execute(async (params) => { + const timeout = Math.min(params.timeout ?? 120000, 600000); + const cwd = params.working_directory ?? process.cwd(); + const proc = spawnSandboxed(params.command, { env: filterEnv(), cwd }); + + let stdout = "", stderr = "", timedOut = false, exited = false; + proc.stdout?.on("data", (chunk: Buffer) => { stdout += chunk.toString(); }); + proc.stderr?.on("data", (chunk: Buffer) => { stderr += chunk.toString(); }); + + const timeoutId = setTimeout(async () => { + if (!exited) { timedOut = true; await killProcessGroup(proc); } + }, timeout); + + const exitCode = await new Promise((resolve) => { + const done = (code: number | null) => { exited = true; clearTimeout(timeoutId); resolve(code); }; + proc.on("exit", done); + proc.on("error", () => done(null)); + }); + + let output = stderr ? (stdout ? `${stdout}\n${stderr}` : stderr) : stdout; + if (timedOut) output = output ? `${output}\n[timed out after ${timeout}ms]` : `[timed out after ${timeout}ms]`; + + return { output: output.trim(), exit_code: exitCode ?? (timedOut ? 124 : -1), timed_out: timedOut }; + }), + }); +} diff --git a/mcp/server.ts b/mcp/server.ts index 2ac445f..4398aef 100644 --- a/mcp/server.ts +++ b/mcp/server.ts @@ -29,6 +29,7 @@ import { CreatePullRequestReviewTool } from "./review.ts"; import { GetReviewCommentsTool, ListPullRequestReviewsTool } from "./reviewComments.ts"; import { SelectModeTool } from "./selectMode.ts"; import { addTools } from "./shared.ts"; +import { BashTool } from "./bash.ts"; /** * Find an available port starting from the given port @@ -94,6 +95,7 @@ export async function startMcpHttpServer( CreateBranchTool(ctx), CommitFilesTool(ctx), PushBranchTool(ctx), + BashTool(ctx), ]; if (!ctx.payload.disableProgressComment) { diff --git a/package.json b/package.json index 50bf4cc..9ed51cb 100644 --- a/package.json +++ b/package.json @@ -36,10 +36,10 @@ "@standard-schema/spec": "1.0.0", "@toon-format/toon": "^1.0.0", "arktype": "2.1.28", - "package-manager-detector": "^1.6.0", "dotenv": "^17.2.3", "execa": "^9.6.0", "fastmcp": "^3.26.8", + "package-manager-detector": "^1.6.0", "table": "^6.9.0" }, "devDependencies": { diff --git a/play.ts b/play.ts index e0b7fb4..ebc4d77 100644 --- a/play.ts +++ b/play.ts @@ -1,3 +1,4 @@ +import { spawnSync } from "node:child_process"; import { existsSync, readFileSync } from "node:fs"; import { extname, join, resolve } from "node:path"; import { pathToFileURL } from "node:url"; @@ -67,7 +68,9 @@ if (import.meta.url === `file://${process.argv[1]}`) { const args = arg({ "--help": Boolean, "--raw": String, + "--local": Boolean, "-h": "--help", + "-l": "--local", }); if (args["--help"]) { @@ -81,18 +84,79 @@ Arguments: Options: --raw [prompt] Use raw string as prompt instead of loading from file + --local, -l Run locally on macOS (default: runs in Docker) -h, --help Show this help message +Environment: + PLAY_LOCAL=1 Same as --local + Examples: - tsx play.ts # Use default fixture - tsx play.ts fixtures/basic.txt # Use specific text file - tsx play.ts custom.json # Use JSON file - tsx play.ts fixtures/test.ts # Use TypeScript file + tsx play.ts bash-test.ts # Run in Docker (default) + tsx play.ts --local bash-test.ts # Run locally on macOS tsx play.ts --raw "Hello world" # Use raw string as prompt `); process.exit(0); } + // default: run in Docker (unless --local or PLAY_LOCAL=1 or already inside Docker) + const isInsideDocker = existsSync("/.dockerenv"); + const useLocal = args["--local"] || process.env.PLAY_LOCAL === "1" || isInsideDocker; + + if (!useLocal) { + log.info("Β» running in Docker container..."); + + const passArgs = process.argv.slice(2); + const nodeCmd = `node play.ts ${passArgs.join(" ")}`; + + // collect env vars to pass through + const envFlags: string[] = []; + for (const [key, value] of Object.entries(process.env)) { + const shouldPass = + key.includes("API_KEY") || + key.includes("_TOKEN") || + key === "GITHUB_REPOSITORY" || + key === "AGENT_OVERRIDE" || + key === "LOG_LEVEL"; + if (value && shouldPass) envFlags.push("-e", `${key}=${value}`); + } + + // SSH agent forwarding for git (macOS Docker Desktop magic path) + const sshFlags: string[] = []; + if (process.env.SSH_AUTH_SOCK) { + sshFlags.push( + "-v", "/run/host-services/ssh-auth.sock:/run/host-services/ssh-auth.sock", + "-e", "SSH_AUTH_SOCK=/run/host-services/ssh-auth.sock", + ); + } + const home = process.env.HOME; + if (home && existsSync(join(home, ".ssh", "known_hosts"))) { + sshFlags.push("-v", `${home}/.ssh/known_hosts:/root/.ssh/known_hosts:ro`); + } + + const ttyFlags = process.stdin.isTTY ? ["-it"] : []; + + const result = spawnSync( + "docker", + [ + "run", "--rm", ...ttyFlags, + "-v", `${process.cwd()}:/app/action:cached`, + "-v", "pullfrog-action-node-modules:/app/action/node_modules", + "-w", "/app/action", + "-e", "GITHUB_ACTIONS=true", + "-e", "CI=true", + ...envFlags, ...sshFlags, + "--cap-add", "SYS_ADMIN", + "--security-opt", "seccomp:unconfined", + "node:22", + "bash", "-c", + `corepack enable pnpm >/dev/null 2>&1 && pnpm install --frozen-lockfile && ${nodeCmd}`, + ], + { stdio: "inherit" }, + ); + + process.exit(result.status ?? 1); + } + let prompt: string; if (args["--raw"]) { @@ -135,10 +199,11 @@ Examples: if (typeof module.default === "string") { prompt = module.default; - } else if (typeof module.default === "object" && module.default.prompt) { - prompt = module.default.prompt; - } else { + } else if (typeof module.default === "object") { + // Payload objects (with ~pullfrog) should be stringified prompt = JSON.stringify(module.default, null, 2); + } else { + throw new Error(`Unsupported default export type: ${typeof module.default}`); } break; }