diff --git a/examples/cjs-consumer/pnpm-lock.yaml b/examples/cjs-consumer/pnpm-lock.yaml index 306bab0f..3da5bdb3 100644 --- a/examples/cjs-consumer/pnpm-lock.yaml +++ b/examples/cjs-consumer/pnpm-lock.yaml @@ -57,6 +57,10 @@ packages: dev: false optional: true + /@standard-schema/spec@1.1.0: + resolution: {integrity: sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w==} + dev: false + /@tokenizer/inflate@0.4.1: resolution: {integrity: sha512-2mAv+8pkG6GIZiF1kNg1jAjh27IDxEPKwdGul3snfztFerfPGI1LjDezZp3i7BElXompqEtPmoPx6c2wgtWsOA==} engines: {node: '>=18'} @@ -174,6 +178,13 @@ packages: engines: {node: '>=0.3.1'} dev: false + /effect@3.21.0: + resolution: {integrity: sha512-PPN80qRokCd1f015IANNhrwOnLO7GrrMQfk4/lnZRE/8j7UPWrNNjPV0uBrZutI/nHzernbW+J0hdqQysHiSnQ==} + dependencies: + '@standard-schema/spec': 1.1.0 + fast-check: 3.23.2 + dev: false + /end-of-stream@1.4.5: resolution: {integrity: sha512-ooEGc6HP26xXq/N+GCGOT0JKCLDGrq2bQUZrQ7gyrJiZANJ/8YDTxTpQBXGMn+WbIQXNVpyWymm7KYVICQnyOg==} requiresBuild: true @@ -189,6 +200,13 @@ packages: dev: false optional: true + /fast-check@3.23.2: + resolution: {integrity: sha512-h5+1OzzfCC3Ef7VbtKdcv7zsstUQwUDlYpUTvjeUsJAssPgLn7QzbboPtL5ro04Mq0rPOsMzl7q5hIbRs2wD1A==} + engines: {node: '>=8.0.0'} + dependencies: + pure-rand: 6.1.0 + dev: false + /fast-xml-builder@1.0.0: resolution: {integrity: sha512-fpZuDogrAgnyt9oDDz+5DBz0zgPdPZz6D4IR7iESxRXElrlGTRkHJ9eEt+SACRJwT0FNFrt71DFQIUFBJfX/uQ==} dev: false @@ -368,6 +386,10 @@ packages: dev: false optional: true + /pure-rand@6.1.0: + resolution: {integrity: sha512-bVWawvoZoBYpp6yIoQtQXHZjmz35RSVHnUOTefl8Vcjr8snTPY1wnpSPMWekcFwbxI6gtmT7rSYPFvz71ldiOA==} + dev: false + /pyodide@0.27.7: resolution: {integrity: sha512-RUSVJlhQdfWfgO9hVHCiXoG+nVZQRS5D9FzgpLJ/VcgGBLSAKoPL8kTiOikxbHQm1kRISeWUBdulEgO26qpSRA==} engines: {node: '>=18.0.0'} @@ -581,6 +603,7 @@ packages: dependencies: compressjs: 1.0.3 diff: 8.0.3 + effect: 3.21.0 fast-xml-parser: 5.4.2 file-type: 21.3.0 ini: 6.0.0 diff --git a/examples/executor-tools/README.md b/examples/executor-tools/README.md new file mode 100644 index 00000000..a8231d78 --- /dev/null +++ b/examples/executor-tools/README.md @@ -0,0 +1,24 @@ +# Executor Tools Example + +Demonstrates executor tool invocation in just-bash. Sandboxed JavaScript code running in `js-exec` calls tools that fetch from real public APIs — no API keys needed. + +## Run + +```bash +cd examples/executor-tools +pnpm install +pnpm start +``` + +## What it shows + +**Part 1 — Inline tools** (no `@executor/sdk` required): +1. **GraphQL tools** — Countries API queries exposed as `tools.countries.*` +2. **Utility tools** — `tools.util.timestamp()`, `tools.util.random()` +3. **Cross-tool scripts** — one js-exec script calling tools from multiple namespaces +4. **Tools + filesystem** — fetch data via tools, write to virtual fs, read with bash commands +5. **Error handling** — tool errors propagate as catchable exceptions + +**Part 2 — Native SDK source discovery** (requires `@executor/sdk`): +- Shows the `executor.setup` callback pattern for auto-discovering tools from OpenAPI specs, GraphQL schemas, and MCP servers +- Includes `onToolApproval` for controlling which operations are allowed diff --git a/examples/executor-tools/main.ts b/examples/executor-tools/main.ts new file mode 100644 index 00000000..0601fcf6 --- /dev/null +++ b/examples/executor-tools/main.ts @@ -0,0 +1,183 @@ +/** + * Executor Tools Example + * + * Demonstrates executor tool invocation in just-bash: + * 1. Inline tools — defined in the Bash constructor + * 2. Native SDK source discovery — OpenAPI and GraphQL auto-discovered tools + * + * No API keys required. Uses: + * - httpbin.org (OpenAPI) — echo/utility API + * - countries.trevorblades.com (GraphQL) — country data + * + * Run with: npx tsx main.ts + */ + +import { Bash } from "just-bash"; + +// ── Part 1: Inline tools (no SDK) ───────────────────────────────── + +console.log("=== Part 1: Inline Tools ===\n"); + +const bash = new Bash({ + executionLimits: { maxJsTimeoutMs: 60000 }, + executor: { + tools: { + // GraphQL tool — queries countries.trevorblades.com + "countries.list": { + description: "List countries, optionally filtered by continent code", + execute: async (args?: { continent?: string }) => { + const filter = args?.continent + ? `(filter: { continent: { eq: "${args.continent}" } })` + : ""; + const query = `{ countries${filter} { code name capital emoji } }`; + const res = await fetch( + "https://countries.trevorblades.com/graphql", + { + method: "POST", + headers: { "Content-Type": "application/json" }, + body: JSON.stringify({ query }), + }, + ); + const json = (await res.json()) as { data: { countries: unknown[] } }; + return json.data.countries; + }, + }, + + "countries.get": { + description: "Get a single country by ISO code", + execute: async (args: { code: string }) => { + const query = `{ country(code: "${args.code}") { name capital currency emoji languages { name } continent { name } } }`; + const res = await fetch( + "https://countries.trevorblades.com/graphql", + { + method: "POST", + headers: { "Content-Type": "application/json" }, + body: JSON.stringify({ query }), + }, + ); + const json = (await res.json()) as { data: { country: unknown } }; + return json.data.country; + }, + }, + + // Simple sync tools + "util.timestamp": { + description: "Current Unix timestamp", + execute: () => ({ ts: Math.floor(Date.now() / 1000) }), + }, + "util.random": { + description: "Random number between min and max", + execute: (args: { min?: number; max?: number }) => ({ + value: Math.floor( + Math.random() * ((args.max ?? 100) - (args.min ?? 0)) + + (args.min ?? 0), + ), + }), + }, + }, + }, +}); + +// 1. List European countries +console.log("1. European countries:"); +let r = await bash.exec(`js-exec -c ' + const countries = await tools.countries.list({ continent: "EU" }); + console.log(countries.length + " countries in Europe"); + for (const c of countries.slice(0, 5)) { + console.log(" " + c.emoji + " " + c.name + " — " + c.capital); + } + console.log(" ..."); +'`); +console.log(r.stdout); + +// 2. Country detail +console.log("2. Country detail:"); +r = await bash.exec(`js-exec -c ' + const c = await tools.countries.get({ code: "JP" }); + console.log(c.emoji + " " + c.name); + console.log(" Capital: " + c.capital); + console.log(" Currency: " + c.currency); + console.log(" Continent: " + c.continent.name); + console.log(" Languages: " + c.languages.map(l => l.name).join(", ")); +'`); +console.log(r.stdout); + +// 3. Mix tools from different sources +console.log("3. Cross-tool script:"); +r = await bash.exec(`js-exec -c ' + const ts = await tools.util.timestamp(); + const rand = await tools.util.random({ min: 0, max: 249 }); + const all = await tools.countries.list(); + const pick = all[rand.value]; + + console.log("Report at " + ts.ts); + console.log("Random country #" + rand.value + ": " + pick.emoji + " " + pick.name); +'`); +console.log(r.stdout); + +// 4. Tools + virtual filesystem +console.log("4. Fetch → write to fs → read with bash:"); +r = await bash.exec(`js-exec -c ' + const fs = require("fs"); + const countries = await tools.countries.list({ continent: "SA" }); + const csv = "code,name,capital\\n" + + countries.map(c => c.code + "," + c.name + "," + c.capital).join("\\n"); + fs.writeFileSync("/tmp/south-america.csv", csv); + console.log("Wrote " + countries.length + " rows to /tmp/south-america.csv"); +'`); +console.log(r.stdout); + +r = await bash.exec("cat /tmp/south-america.csv | head -5"); +console.log(" " + r.stdout.split("\n").join("\n ")); + +// 5. Error handling +console.log("5. Error handling:"); +r = await bash.exec(`js-exec -c ' + try { + await tools.countries.get({ code: "NOPE" }); + } catch (e) { + console.error("Caught: " + e.message); + } + console.log("Script continued after error"); +'`); +console.log(r.stdout); +if (r.stderr) console.log(" stderr: " + r.stderr); + +// ── Part 2: Native SDK source discovery ─────────────────────────── + +console.log("=== Part 2: Native SDK Source Discovery ===\n"); +console.log( + "When @executor/sdk is configured via executor.setup, tools are\n" + + "auto-discovered from OpenAPI specs, GraphQL schemas, and MCP servers.\n", +); +console.log("Example Bash constructor:\n"); +console.log(` const bash = new Bash({ + executor: { + setup: async (sdk) => { + await sdk.sources.add({ + kind: "openapi", + endpoint: "https://petstore3.swagger.io/api/v3", + specUrl: "https://petstore3.swagger.io/api/v3/openapi.json", + name: "petstore", + }); + await sdk.sources.add({ + kind: "graphql", + endpoint: "https://countries.trevorblades.com/graphql", + name: "countries", + }); + }, + onToolApproval: async (req) => { + if (req.operationKind === "read") return { approved: true }; + return { approved: false, reason: "writes not allowed" }; + }, + }, + }); + + // Tools are auto-discovered from the specs: + await bash.exec(\`js-exec -c ' + const pets = await tools.petstore.findPetsByStatus({ status: "available" }); + const country = await tools.countries.country({ code: "US" }); + '\`); +`); + +console.log("Done!"); diff --git a/examples/executor-tools/package.json b/examples/executor-tools/package.json new file mode 100644 index 00000000..105c44d0 --- /dev/null +++ b/examples/executor-tools/package.json @@ -0,0 +1,12 @@ +{ + "name": "executor-tools-example", + "version": "1.0.0", + "description": "Example of executor tools in just-bash — inline tools + OpenAPI via fetch", + "type": "module", + "scripts": { + "start": "npx tsx main.ts" + }, + "dependencies": { + "just-bash": "link:../.." + } +} diff --git a/examples/executor-tools/pnpm-lock.yaml b/examples/executor-tools/pnpm-lock.yaml new file mode 100644 index 00000000..84e21c82 --- /dev/null +++ b/examples/executor-tools/pnpm-lock.yaml @@ -0,0 +1,10 @@ +lockfileVersion: '6.0' + +settings: + autoInstallPeers: true + excludeLinksFromLockfile: false + +dependencies: + just-bash: + specifier: link:../.. + version: link:../.. diff --git a/examples/executor-tools/tsconfig.json b/examples/executor-tools/tsconfig.json new file mode 100644 index 00000000..b564cd8d --- /dev/null +++ b/examples/executor-tools/tsconfig.json @@ -0,0 +1,12 @@ +{ + "compilerOptions": { + "target": "ES2022", + "module": "Node16", + "moduleResolution": "Node16", + "strict": true, + "esModuleInterop": true, + "skipLibCheck": true, + "noEmit": true + }, + "include": ["*.ts"] +} diff --git a/knip.json b/knip.json index 12659b7a..0f7811c2 100644 --- a/knip.json +++ b/knip.json @@ -1,6 +1,10 @@ { "$schema": "https://unpkg.com/knip@5/schema.json", - "entry": ["src/cli/just-bash.ts"], + "entry": [ + "src/cli/just-bash.ts", + "src/commands/js-exec/executor-adapter.ts", + "src/executor-init.ts" + ], "project": ["src/**/*.ts"], "ignore": [ "src/**/*.test.ts", diff --git a/package.json b/package.json index f234cb67..3b10d146 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "just-bash", - "version": "2.14.0", + "version": "2.15.1-executor.0", "description": "A simulated bash environment with virtual filesystem", "repository": { "type": "git", @@ -44,6 +44,7 @@ "dist/sandbox/*.d.ts", "dist/utils/*.d.ts", "vendor/cpython-emscripten/", + "vendor/executor/", "README.md", "dist/AGENTS.md" ], @@ -58,10 +59,10 @@ "build": "rm -rf dist && tsc && pnpm build:lib && pnpm build:lib:cjs && pnpm build:browser && pnpm build:cli && pnpm build:shell && pnpm build:worker && pnpm build:clean && cp dist/index.d.ts dist/index.d.cts && sed '1,/^-->/d' AGENTS.npm.md > dist/AGENTS.md", "build:clean": "find dist -name '*.test.js' -delete && find dist -name '*.test.d.ts' -delete", "build:worker": "esbuild src/commands/python3/worker.ts --bundle --platform=node --format=esm --outfile=src/commands/python3/worker.js --external:../../../vendor/cpython-emscripten/* && cp src/commands/python3/worker.js dist/commands/python3/worker.js && mkdir -p dist/bin/chunks && cp src/commands/python3/worker.js dist/bin/chunks/worker.js && mkdir -p dist/bundle/chunks && cp src/commands/python3/worker.js dist/bundle/chunks/worker.js && esbuild src/commands/js-exec/worker.ts --bundle --platform=node --format=esm --outfile=src/commands/js-exec/worker.js --external:quickjs-emscripten && cp src/commands/js-exec/worker.js dist/commands/js-exec/worker.js && cp src/commands/js-exec/worker.js dist/bin/chunks/js-exec-worker.js && cp src/commands/js-exec/worker.js dist/bundle/chunks/js-exec-worker.js", - "build:lib": "esbuild dist/index.js --bundle --splitting --platform=node --format=esm --minify --outdir=dist/bundle --chunk-names=chunks/[name]-[hash] --external:diff --external:minimatch --external:sprintf-js --external:turndown --external:sql.js --external:quickjs-emscripten --external:@mongodb-js/zstd --external:node-liblzma --external:compressjs", - "build:lib:cjs": "esbuild dist/index.js --bundle --platform=node --format=cjs --minify --outfile=dist/bundle/index.cjs --external:diff --external:minimatch --external:sprintf-js --external:turndown --external:sql.js --external:quickjs-emscripten --external:@mongodb-js/zstd --external:node-liblzma --external:compressjs", + "build:lib": "esbuild dist/index.js --bundle --splitting --platform=node --format=esm --minify --outdir=dist/bundle --chunk-names=chunks/[name]-[hash] --external:diff --external:minimatch --external:sprintf-js --external:turndown --external:sql.js --external:quickjs-emscripten --external:@mongodb-js/zstd --external:node-liblzma --external:compressjs --external:effect --external:@effect/platform --external:@effect/platform-node --external:../vendor/executor/*", + "build:lib:cjs": "esbuild dist/index.js --bundle --platform=node --format=cjs --minify --outfile=dist/bundle/index.cjs --external:diff --external:minimatch --external:sprintf-js --external:turndown --external:sql.js --external:quickjs-emscripten --external:@mongodb-js/zstd --external:node-liblzma --external:compressjs --external:effect --external:@effect/platform --external:@effect/platform-node --external:../vendor/executor/*", "build:browser": "esbuild dist/browser.js --bundle --platform=browser --format=esm --minify --outfile=dist/bundle/browser.js --external:diff --external:minimatch --external:sprintf-js --external:turndown --external:node:zlib --external:@mongodb-js/zstd --external:node-liblzma --external:compressjs --define:__BROWSER__=true --alias:node:dns=./src/shims/browser-unsupported.js", - "build:cli": "esbuild dist/cli/just-bash.js --bundle --splitting --platform=node --format=esm --minify --outdir=dist/bin --entry-names=[name] --chunk-names=chunks/[name]-[hash] --banner:js='#!/usr/bin/env node' --external:sql.js --external:quickjs-emscripten --external:@mongodb-js/zstd --external:node-liblzma --external:compressjs", + "build:cli": "esbuild dist/cli/just-bash.js --bundle --splitting --platform=node --format=esm --minify --outdir=dist/bin --entry-names=[name] --chunk-names=chunks/[name]-[hash] --banner:js='#!/usr/bin/env node' --external:sql.js --external:quickjs-emscripten --external:@mongodb-js/zstd --external:node-liblzma --external:compressjs --external:effect --external:@effect/platform --external:@effect/platform-node --external:../vendor/executor/*", "build:shell": "esbuild dist/cli/shell.js --bundle --splitting --platform=node --format=esm --minify --outdir=dist/bin/shell --entry-names=[name] --chunk-names=chunks/[name]-[hash] --banner:js='#!/usr/bin/env node' --external:sql.js --external:quickjs-emscripten --external:@mongodb-js/zstd --external:node-liblzma --external:compressjs", "prepublishOnly": "pnpm validate", "validate": "pnpm lint && pnpm knip && pnpm typecheck && pnpm build && pnpm check:worker-sync && pnpm test:run && pnpm test:wasm && pnpm test:dist && pnpm test:examples", @@ -107,6 +108,7 @@ "dependencies": { "compressjs": "^1.0.3", "diff": "^8.0.2", + "effect": "^3.21.0", "fast-xml-parser": "^5.3.3", "file-type": "^21.2.0", "ini": "^6.0.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 29be728d..7ab704bf 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -11,6 +11,9 @@ dependencies: diff: specifier: ^8.0.2 version: 8.0.2 + effect: + specifier: ^3.21.0 + version: 3.21.0 fast-xml-parser: specifier: ^5.3.3 version: 5.3.3 @@ -924,7 +927,6 @@ packages: /@standard-schema/spec@1.1.0: resolution: {integrity: sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w==} - dev: true /@tokenizer/inflate@0.4.1: resolution: {integrity: sha512-2mAv+8pkG6GIZiF1kNg1jAjh27IDxEPKwdGul3snfztFerfPGI1LjDezZp3i7BElXompqEtPmoPx6c2wgtWsOA==} @@ -1213,6 +1215,13 @@ packages: engines: {node: '>=0.3.1'} dev: false + /effect@3.21.0: + resolution: {integrity: sha512-PPN80qRokCd1f015IANNhrwOnLO7GrrMQfk4/lnZRE/8j7UPWrNNjPV0uBrZutI/nHzernbW+J0hdqQysHiSnQ==} + dependencies: + '@standard-schema/spec': 1.1.0 + fast-check: 3.23.2 + dev: false + /end-of-stream@1.4.5: resolution: {integrity: sha512-ooEGc6HP26xXq/N+GCGOT0JKCLDGrq2bQUZrQ7gyrJiZANJ/8YDTxTpQBXGMn+WbIQXNVpyWymm7KYVICQnyOg==} requiresBuild: true @@ -1282,7 +1291,6 @@ packages: engines: {node: '>=8.0.0'} dependencies: pure-rand: 6.1.0 - dev: true /fast-glob@3.3.3: resolution: {integrity: sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==} @@ -1704,7 +1712,6 @@ packages: /pure-rand@6.1.0: resolution: {integrity: sha512-bVWawvoZoBYpp6yIoQtQXHZjmz35RSVHnUOTefl8Vcjr8snTPY1wnpSPMWekcFwbxI6gtmT7rSYPFvz71ldiOA==} - dev: true /queue-microtask@1.2.3: resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} diff --git a/src/Bash.ts b/src/Bash.ts index b6983262..0538b2ae 100644 --- a/src/Bash.ts +++ b/src/Bash.ts @@ -92,6 +92,77 @@ export interface JavaScriptConfig { bootstrap?: string; } +/** Tool definition for the executor integration */ +export interface ExecutorToolDef { + description?: string; + // biome-ignore lint/suspicious/noExplicitAny: matches @executor/sdk SimpleTool signature + execute: (...args: any[]) => unknown; +} + +/** + * Executor SDK instance type (from @executor/sdk). + * Kept as an opaque type to avoid requiring the SDK at import time. + */ +export interface ExecutorSDKHandle { + execute: ( + code: string, + ) => Promise<{ result: unknown; error?: string; logs?: string[] }>; + sources: { + add: ( + input: Record, + options?: Record, + ) => Promise; + list: () => Promise; + [key: string]: unknown; + }; + close: () => Promise; + [key: string]: unknown; +} + +/** Executor configuration for js-exec tool invocation */ +export interface ExecutorConfig { + /** Tool map: keys are dot-separated paths (e.g. "math.add"), values are tool definitions */ + tools?: Record; + /** + * Async setup function that receives the @executor/sdk instance. + * Use this to add OpenAPI, GraphQL, or MCP sources that auto-discover tools. + * When provided, js-exec delegates execution to the SDK pipeline + * (which handles tool approval, auth flows, and interaction loops). + * + * Requires @executor/sdk as a dependency. + * + * @example + * ```ts + * const bash = new Bash({ + * executor: { + * setup: async (sdk) => { + * await sdk.sources.add({ kind: "openapi", endpoint: "https://api.example.com", specUrl: "https://api.example.com/openapi.json", name: "myapi" }); + * await sdk.sources.add({ kind: "mcp", endpoint: "https://mcp.example.com/sse", name: "tools" }); + * }, + * }, + * }); + * ``` + */ + setup?: (sdk: ExecutorSDKHandle) => Promise; + /** + * Tool approval callback for the @executor/sdk pipeline. + * Called when a tool invocation requires approval. + * Defaults to "allow-all" when not provided. + */ + onToolApproval?: + | "allow-all" + | "deny-all" + | ((request: { + toolPath: string; + sourceId: string; + sourceName: string; + operationKind: "read" | "write" | "delete" | "execute" | "unknown"; + args: unknown; + reason: string; + approvalLabel: string | null; + }) => Promise<{ approved: true } | { approved: false; reason?: string }>); +} + export interface BashOptions { files?: InitialFiles; env?: Record; @@ -137,6 +208,13 @@ export interface BashOptions { * Disabled by default. Can be a boolean or a config object with bootstrap code. */ javascript?: boolean | JavaScriptConfig; + /** + * Executor configuration for tool invocation in js-exec. + * When provided, code running in js-exec has access to a `tools` proxy + * (e.g. `tools.math.add({ a: 1, b: 2 })`). + * Implicitly enables JavaScript if not already enabled. + */ + executor?: ExecutorConfig; /** * Optional list of command names to register. * If not provided, all built-in commands are available. @@ -277,6 +355,18 @@ export class Bash { private defenseInDepthConfig?: DefenseInDepthConfig | boolean; private coverageWriter?: FeatureCoverageWriter; private jsBootstrapCode?: string; + private executorInvokeTool?: ( + path: string, + argsJson: string, + ) => Promise; + private executorSetup?: (sdk: ExecutorSDKHandle) => Promise; + private executorApproval?: ExecutorConfig["onToolApproval"]; + private executorSDK?: ExecutorSDKHandle; + private executorInitPromise?: Promise; + /** When SDK setup is configured, js-exec routes execution through this */ + private executorExecFn?: ( + code: string, + ) => Promise<{ result: unknown; error?: string; logs?: string[] }>; // biome-ignore lint/suspicious/noExplicitAny: type-erased plugin storage for untyped API private transformPlugins: TransformPlugin[] = []; @@ -450,7 +540,8 @@ export class Bash { } // Register javascript commands only when explicitly enabled - if (options.javascript) { + // (executor config implicitly enables javascript) + if (options.javascript || options.executor) { for (const cmd of createJavaScriptCommands()) { this.registerCommand(cmd); } @@ -464,6 +555,36 @@ export class Bash { } } + // Set up executor tool invoker when executor config is provided + if (options.executor?.tools) { + const tools = options.executor.tools; + this.executorInvokeTool = async ( + path: string, + argsJson: string, + ): Promise => { + if (!Object.hasOwn(tools, path)) { + throw new Error(`Unknown tool: ${path}`); + } + const tool = tools[path]; + let args: unknown; + try { + args = argsJson ? JSON.parse(argsJson) : undefined; + } catch { + args = undefined; + } + const result = await tool.execute(args); + return result !== undefined ? JSON.stringify(result) : ""; + }; + } + + // Store SDK setup function and approval callback for lazy initialization + if (options.executor?.setup) { + this.executorSetup = options.executor.setup; + } + if (options.executor?.onToolApproval) { + this.executorApproval = options.executor.onToolApproval; + } + // Register custom commands (after built-ins so they can override) if (options.customCommands) { for (const cmd of options.customCommands) { @@ -523,10 +644,50 @@ export class Bash { return result; } + /** + * Lazily initialize the @executor/sdk when setup is configured. + * Creates the SDK instance, runs the user's setup function, and wires + * the SDK's tool invocation into the executorInvokeTool callback. + */ + private async ensureExecutorReady(): Promise { + if (!this.executorSetup || this.executorSDK) return; + + if (this.executorInitPromise) { + await this.executorInitPromise; + return; + } + + this.executorInitPromise = (async () => { + // String concat prevents esbuild from statically resolving and + // inlining executor-init (and its effect/SDK deps) into the + // non-splitting browser bundle. + // @banned-pattern-ignore: path is a static concat to prevent esbuild inlining in browser bundle + const mod = "./executor-" + "init.js"; + const { initExecutorSDK } = await import(mod); + const setup = this.executorSetup; + if (!setup) return; + const { sdk, executeViaSdk } = await initExecutorSDK( + setup, + this.executorApproval, + this.fs, + () => this.state.cwd, + () => this.state.env, + () => this.limits, + ); + this.executorSDK = sdk; + this.executorExecFn = executeViaSdk; + })(); + + await this.executorInitPromise; + } + async exec( commandLine: string, options?: ExecOptions, ): Promise { + // Lazily initialize executor SDK if setup was provided + await this.ensureExecutorReady(); + if (this.state.callDepth === 0) { this.state.commandCount = 0; } @@ -666,6 +827,8 @@ export class Bash { coverage: this.coverageWriter, requireDefenseContext: defenseBox?.isEnabled() === true, jsBootstrapCode: this.jsBootstrapCode, + executorInvokeTool: this.executorInvokeTool, + executorExecFn: this.executorExecFn, }; const interpreter = new Interpreter(interpreterOptions, execState); diff --git a/src/commands/js-exec/README.md b/src/commands/js-exec/README.md index 5a637b9e..899f364d 100644 --- a/src/commands/js-exec/README.md +++ b/src/commands/js-exec/README.md @@ -236,6 +236,91 @@ js-exec app.ts js-exec --strip-types -c "const x: number = 5; console.log(x)" ``` +## Executor Tools + +When the `Bash` constructor is given an `executor` config, code running in js-exec gets access to a `tools` proxy. Tool calls are synchronous from the script's perspective — they block the QuickJS sandbox while the host resolves them asynchronously. + +### Setup + +```ts +import { Bash } from "just-bash"; + +const bash = new Bash({ + executor: { + tools: { + "math.add": { + description: "Add two numbers", + execute: (args) => ({ sum: args.a + args.b }), + }, + "db.query": { + description: "Run a SQL query", + execute: async (args) => { + const rows = await queryDatabase(args.sql); + return { rows }; + }, + }, + }, + }, +}); +``` + +Passing `executor` implicitly enables `javascript: true` — you don't need both. + +### Using tools in code + +Tools are accessed through a global `tools` proxy. Property access builds the tool path, and calling invokes it: + +```js +// tools.(args) — path matches the key in the tools map +const result = await tools.math.add({ a: 3, b: 4 }); +console.log(result.sum); // 7 + +const data = await tools.db.query({ sql: "SELECT * FROM users" }); +for (const row of data.rows) { + console.log(row.name); +} +``` + +`await` is recommended for consistency with `@executor/sdk` patterns. Tool calls are synchronous under the hood (the worker blocks via `Atomics.wait`), so `await` on the return value is a no-op — but it keeps code portable between just-bash and the SDK's own runtimes. + +Deeply nested paths work — `await tools.a.b.c.d()` invokes the tool registered as `"a.b.c.d"`. + +### Tool definition + +Each tool has an `execute` function and an optional `description`: + +```ts +{ + description?: string; + execute: (...args: unknown[]) => unknown; // sync or async +} +``` + +- `execute` receives the arguments object passed from the script +- Return value is JSON-serialized back to the script +- Returning `undefined` gives `undefined` in the script +- Throwing an error propagates to the script as a catchable exception +- `async` functions are awaited on the host before returning to the script + +### Compatibility with @executor/sdk + +The tool definition shape matches `@executor/sdk`'s `SimpleTool` type. You can pass the same tools map to both: + +```ts +const tools = { + "github.issues.list": { + description: "List GitHub issues", + execute: async (args) => { /* ... */ }, + }, +}; + +// Use with just-bash +const bash = new Bash({ executor: { tools } }); + +// Use with @executor/sdk +const executor = await createExecutor({ tools }); +``` + ## Limits - **Memory**: 64 MB per execution diff --git a/src/commands/js-exec/examples/11-executor-openapi-tools.js b/src/commands/js-exec/examples/11-executor-openapi-tools.js new file mode 100644 index 00000000..46e8d847 --- /dev/null +++ b/src/commands/js-exec/examples/11-executor-openapi-tools.js @@ -0,0 +1,73 @@ +/** + * Example: Native @executor/sdk integration via the Bash constructor + * + * The SDK discovers tools from OpenAPI, GraphQL, and MCP sources. + * js-exec runs user code in a QuickJS sandbox — tool calls are bridged + * back to the SDK, which handles HTTP, auth, and schema validation. + * + * Requires: @executor/sdk and effect as dependencies. + */ + +// @ts-check — this is a JS file with JSDoc types for illustration + +import { Bash } from "just-bash"; + +const bash = new Bash({ + executor: { + // Inline tools work alongside SDK-discovered tools + tools: { + "util.timestamp": { + description: "Get the current Unix timestamp", + execute: () => ({ ts: Math.floor(Date.now() / 1000) }), + }, + }, + + // Async setup receives the @executor/sdk instance. + // Add OpenAPI, GraphQL, or MCP sources here. + setup: async (sdk) => { + // OpenAPI: discovers all operations from the spec + await sdk.sources.add({ + kind: "openapi", + endpoint: "https://petstore3.swagger.io/api/v3", + specUrl: "https://petstore3.swagger.io/api/v3/openapi.json", + name: "petstore", + }); + + // GraphQL: introspects the schema for queries/mutations + await sdk.sources.add({ + kind: "graphql", + endpoint: "https://countries.trevorblades.com/graphql", + name: "countries", + }); + + // MCP: connects to a Model Context Protocol server + await sdk.sources.add({ + kind: "mcp", + endpoint: "https://mcp.example.com/sse", + name: "internal", + transport: "sse", + }); + }, + }, +}); + +// All tools — inline + SDK-discovered — are available as tools.* +const result = await bash.exec(`js-exec -c ' + // Inline tool + const now = await tools.util.timestamp(); + console.log("Timestamp:", now.ts); + + // OpenAPI-discovered tool (from petstore spec) + const pets = await tools.petstore.findPetsByStatus({ status: "available" }); + console.log("Available pets:", pets.length); + + // GraphQL-discovered tool (from introspection) + const country = await tools.countries.country({ code: "US" }); + console.log("Country:", country.name); + + // MCP-discovered tool (from server capabilities) + const docs = await tools.internal.searchDocs({ query: "deployment" }); + console.log("Docs found:", docs.hits.length); +'`); + +console.log(result.stdout); diff --git a/src/commands/js-exec/executor-adapter.ts b/src/commands/js-exec/executor-adapter.ts new file mode 100644 index 00000000..8ecf4d78 --- /dev/null +++ b/src/commands/js-exec/executor-adapter.ts @@ -0,0 +1,121 @@ +/** + * Adapter for using js-exec as a CodeExecutor runtime for @executor/sdk. + * + * This module exports a Promise-based executor that can be wrapped with + * Effect.tryPromise() to satisfy the CodeExecutor interface. + * + * Usage with @executor/sdk: + * + * ```ts + * import { createJustBashCodeExecutor } from 'just-bash/executor'; + * import { createExecutor } from '@executor/sdk'; + * import type { CodeExecutor } from '@executor/sdk'; + * import * as Effect from 'effect/Effect'; + * + * const jb = createJustBashCodeExecutor(); + * + * const codeExecutor: CodeExecutor = { + * execute: (code, toolInvoker) => + * Effect.tryPromise(() => + * jb.execute(code, (path, args) => + * Effect.runPromise(toolInvoker.invoke({ path, args })) + * ) + * ), + * }; + * + * const executor = await createExecutor({ + * runtime: codeExecutor, + * tools: { ... }, + * }); + * ``` + */ + +import { InMemoryFs } from "../../fs/in-memory-fs/in-memory-fs.js"; +import type { IFileSystem } from "../../fs/interface.js"; +import { resolveLimits } from "../../limits.js"; +import type { SecureFetch } from "../../network/index.js"; +import type { CommandContext } from "../../types.js"; +import { type ExecutorResult, executeForExecutor } from "./js-exec.js"; + +export interface JustBashExecutorOptions { + /** Virtual filesystem for code to access. Defaults to an empty InMemoryFs. */ + fs?: IFileSystem; + /** Working directory inside the sandbox. Defaults to /home/user. */ + cwd?: string; + /** Environment variables available to code. Defaults to empty. */ + env?: Record; + /** Network fetch function. Defaults to undefined (no network). */ + fetch?: SecureFetch; +} + +export interface JustBashCodeExecutor { + /** + * Execute code with tool invocation support. + * + * @param code - JavaScript code to execute. Can use `await` and `return`. + * Tools are available as `tools.namespace.method(args)`. + * @param invokeTool - Callback to handle tool invocations. + * Receives (path, args) and should return the tool result. + * @returns ExecutorResult with result, error, and captured logs. + */ + execute( + code: string, + invokeTool: (path: string, args: unknown) => Promise, + ): Promise; +} + +/** + * Create a js-exec based code executor for use with @executor/sdk. + * + * The executor runs JavaScript code in a QuickJS sandbox with: + * - A `tools` proxy for invoking registered tools + * - Console output captured to `logs` array + * - Return value captured in `result` + * - Full Node.js-compatible module system (fs, path, etc.) + */ +export function createJustBashCodeExecutor( + options?: JustBashExecutorOptions, +): JustBashCodeExecutor { + const fs = options?.fs ?? new InMemoryFs(); + const cwd = options?.cwd ?? "/home/user"; + const env = options?.env ?? (Object.create(null) as Record); + const fetch = options?.fetch; + + return { + async execute( + code: string, + invokeTool: (path: string, args: unknown) => Promise, + ): Promise { + const envMap = new Map(); + for (const [k, v] of Object.entries(env)) { + envMap.set(k, v); + } + + const ctx: CommandContext = { + fs, + cwd, + env: envMap, + stdin: "", + fetch, + limits: resolveLimits(), + }; + + // Bridge between the Promise-based invokeTool and the JSON-string protocol + const invokeToolBridge = async ( + path: string, + argsJson: string, + ): Promise => { + let args: unknown; + try { + args = argsJson ? JSON.parse(argsJson) : undefined; + } catch { + args = undefined; + } + const result = await invokeTool(path, args); + return result !== undefined ? JSON.stringify(result) : ""; + }; + + return executeForExecutor(code, ctx, invokeToolBridge); + }, + }; +} diff --git a/src/commands/js-exec/js-exec.executor.test.ts b/src/commands/js-exec/js-exec.executor.test.ts new file mode 100644 index 00000000..bfc0f993 --- /dev/null +++ b/src/commands/js-exec/js-exec.executor.test.ts @@ -0,0 +1,194 @@ +import { describe, expect, it } from "vitest"; +import { Bash } from "../../Bash.js"; + +describe("js-exec executor tools", () => { + function createBashWithTools() { + return new Bash({ + executor: { + tools: { + "math.add": { + description: "Add two numbers", + execute: (args: { a: number; b: number }) => ({ + sum: args.a + args.b, + }), + }, + "math.multiply": { + description: "Multiply two numbers", + execute: (args: { a: number; b: number }) => ({ + product: args.a * args.b, + }), + }, + "echo.back": { + execute: (args: unknown) => args, + }, + }, + }, + }); + } + + it("should call a tool and print the result", async () => { + const bash = createBashWithTools(); + const r = await bash.exec( + `js-exec -c 'const r = tools.math.add({a:3,b:4}); console.log(r.sum)'`, + ); + expect(r.stdout).toBe("7\n"); + expect(r.exitCode).toBe(0); + }); + + it("should chain multiple tool calls", async () => { + const bash = createBashWithTools(); + const r = await bash.exec( + `js-exec -c 'const s = tools.math.add({a:10,b:20}); const p = tools.math.multiply({a:s.sum,b:3}); console.log(p.product)'`, + ); + expect(r.stdout).toBe("90\n"); + expect(r.exitCode).toBe(0); + }); + + it("should return structured JSON from tool", async () => { + const bash = createBashWithTools(); + const r = await bash.exec( + `js-exec -c 'console.log(JSON.stringify(tools.math.add({a:1,b:2})))'`, + ); + expect(r.stdout).toBe('{"sum":3}\n'); + expect(r.exitCode).toBe(0); + }); + + it("should error on unknown tool", async () => { + const bash = createBashWithTools(); + const r = await bash.exec( + `js-exec -c 'try { tools.nope.missing(); } catch(e) { console.error(e.message); }'`, + ); + expect(r.stderr).toContain("Unknown tool: nope.missing"); + expect(r.exitCode).toBe(0); + }); + + it("should support deeply nested tool paths", async () => { + const bash = new Bash({ + executor: { + tools: { + "a.b.c.d": { execute: () => ({ deep: true }) }, + }, + }, + }); + const r = await bash.exec( + `js-exec -c 'console.log(JSON.stringify(tools.a.b.c.d()))'`, + ); + expect(r.stdout).toBe('{"deep":true}\n'); + expect(r.exitCode).toBe(0); + }); + + it("should pass through complex arguments", async () => { + const bash = createBashWithTools(); + const r = await bash.exec( + `js-exec -c 'const r = tools.echo.back({arr:[1,2,3],nested:{x:true}}); console.log(JSON.stringify(r))'`, + ); + expect(r.stdout).toBe('{"arr":[1,2,3],"nested":{"x":true}}\n'); + expect(r.exitCode).toBe(0); + }); + + it("should work with async tool execute functions", async () => { + const bash = new Bash({ + executor: { + tools: { + "async.fetch": { + execute: async (args: { id: number }) => { + return { id: args.id, name: `User ${args.id}` }; + }, + }, + }, + }, + }); + const r = await bash.exec( + `js-exec -c 'const u = tools.async.fetch({id:42}); console.log(u.name)'`, + ); + expect(r.stdout).toBe("User 42\n"); + expect(r.exitCode).toBe(0); + }); + + it("should implicitly enable javascript", async () => { + const bash = new Bash({ + executor: { tools: { "noop.test": { execute: () => ({}) } } }, + }); + // js-exec should be available even without javascript: true + const r = await bash.exec(`js-exec -c 'console.log("works")'`); + expect(r.stdout).toBe("works\n"); + expect(r.exitCode).toBe(0); + }); + + it("should keep console.log going to stdout", async () => { + const bash = createBashWithTools(); + const r = await bash.exec( + `js-exec -c 'console.log("out"); console.error("err")'`, + ); + expect(r.stdout).toBe("out\n"); + expect(r.stderr).toBe("err\n"); + expect(r.exitCode).toBe(0); + }); + + it("should handle tool that returns undefined", async () => { + const bash = new Bash({ + executor: { + tools: { + "void.action": { execute: () => undefined }, + }, + }, + }); + const r = await bash.exec( + `js-exec -c 'const r = tools.void.action(); console.log(typeof r)'`, + ); + expect(r.stdout).toBe("undefined\n"); + expect(r.exitCode).toBe(0); + }); + + it("should handle tool that throws", async () => { + const bash = new Bash({ + executor: { + tools: { + "fail.hard": { + execute: () => { + throw new Error("tool exploded"); + }, + }, + }, + }, + }); + const r = await bash.exec( + `js-exec -c 'try { tools.fail.hard(); } catch(e) { console.error(e.message); }'`, + ); + expect(r.stderr).toContain("tool exploded"); + expect(r.exitCode).toBe(0); + }); + + it("should call tool with no arguments", async () => { + const bash = new Bash({ + executor: { + tools: { + "time.now": { execute: () => ({ ts: 1234567890 }) }, + }, + }, + }); + const r = await bash.exec(`js-exec -c 'console.log(tools.time.now().ts)'`); + expect(r.stdout).toBe("1234567890\n"); + expect(r.exitCode).toBe(0); + }); + + it("should work alongside normal js-exec features", async () => { + const bash = new Bash({ + files: { "/data/test.txt": "hello from file" }, + executor: { + tools: { + "str.upper": { + execute: (args: { s: string }) => ({ + result: args.s.toUpperCase(), + }), + }, + }, + }, + }); + const r = await bash.exec( + `js-exec -c 'const fs = require("fs"); const content = fs.readFileSync("/data/test.txt", "utf8"); const r = tools.str.upper({s: content}); console.log(r.result)'`, + ); + expect(r.stdout).toBe("HELLO FROM FILE\n"); + expect(r.exitCode).toBe(0); + }); +}); diff --git a/src/commands/js-exec/js-exec.ts b/src/commands/js-exec/js-exec.ts index 66dbd974..803d7383 100644 --- a/src/commands/js-exec/js-exec.ts +++ b/src/commands/js-exec/js-exec.ts @@ -280,7 +280,15 @@ function normalizeJsWorkerMessage( } if (raw.success) { - return { success: true }; + const result: JsExecWorkerOutput = { success: true }; + const full = msg as Record; + if (typeof full.executorResult === "string") { + result.executorResult = full.executorResult; + } + if (Array.isArray(full.executorLogs)) { + result.executorLogs = full.executorLogs as string[]; + } + return result; } return { @@ -435,6 +443,7 @@ async function executeJSInner( ctx.fetch, ctx.limits?.maxOutputSize ?? 0, wrappedExec, + ctx.executorInvokeTool, ); // Network operations need a longer timeout. resolveLimits() always populates @@ -458,6 +467,7 @@ async function executeJSInner( isModule, stripTypes, timeoutMs, + hasExecutorTools: ctx.executorInvokeTool !== undefined, }; // Use deferred pattern to keep queue management outside the Promise constructor @@ -526,6 +536,143 @@ async function executeJSInner( return bridgeOutput; } +/** + * Result from executing code in executor mode. + * Compatible with @executor/sdk's ExecuteResult shape. + */ +export interface ExecutorResult { + result: unknown; + error?: string; + logs?: string[]; +} + +/** + * Execute JavaScript code in executor mode with tool invocation support. + * Used as the runtime for @executor/sdk's CodeExecutor interface. + * + * - Console output is captured to `logs` instead of stdout/stderr + * - Tool calls via `tools.x.y(args)` are routed through `invokeTool` + * - The return value of the code is captured in `result` + */ +export async function executeForExecutor( + code: string, + ctx: CommandContext, + invokeTool: (path: string, argsJson: string) => Promise, +): Promise { + if (jsExecAsyncContext.getStore()) { + return { + result: null, + error: "js-exec: recursive invocation is not supported", + }; + } + + const sharedBuffer = createSharedBuffer(); + + const bridgeHandler = new BridgeHandler( + sharedBuffer, + ctx.fs, + ctx.cwd, + "js-exec", + ctx.fetch, + ctx.limits?.maxOutputSize ?? 0, + undefined, // no exec in executor mode + invokeTool, + ); + + const userTimeout = ctx.limits?.maxJsTimeoutMs ?? DEFAULT_JS_TIMEOUT_MS; + const timeoutMs = ctx.fetch + ? Math.max(userTimeout, DEFAULT_JS_NETWORK_TIMEOUT_MS) + : userTimeout; + + const protocolToken = randomBytes(16).toString("hex"); + + const workerInput: JsExecWorkerInput = { + protocolToken, + sharedBuffer, + jsCode: code, + cwd: ctx.cwd, + env: mapToRecord(ctx.env), + args: [], + executorMode: true, + timeoutMs, + }; + + let resolveWorker!: (result: JsExecWorkerOutput) => void; + const workerPromise = new Promise((resolve) => { + resolveWorker = resolve; + }); + + const queueEntry: QueuedExecution = { + input: workerInput, + resolve: () => {}, + }; + + const timeoutHandle = _setTimeout(() => { + if (currentExecution === queueEntry) { + const workerToTerminate = sharedWorker; + if (workerToTerminate) { + sharedWorker = null; + void workerToTerminate.terminate(); + } + currentExecution = null; + processNextExecution(); + } else { + queueEntry.canceled = true; + if (!currentExecution) { + processNextExecution(); + } + } + queueEntry.resolve({ + success: false, + error: `Execution timeout: exceeded ${timeoutMs}ms limit`, + }); + }, timeoutMs); + + queueEntry.resolve = (result: JsExecWorkerOutput) => { + _clearTimeout(timeoutHandle); + resolveWorker(result); + }; + + executionQueue.push(queueEntry); + processNextExecution(); + + const [, workerResult] = await Promise.all([ + bridgeHandler.run(timeoutMs), + workerPromise.catch((e) => ({ + success: false as const, + error: sanitizeHostErrorMessage(getErrorMessage(e)), + })), + ]); + + // Executor mode: check for executor fields (executorResult or executorLogs) + if ("executorLogs" in workerResult || "executorResult" in workerResult) { + if (workerResult.error) { + return { + result: null, + error: workerResult.error, + logs: workerResult.executorLogs, + }; + } + let parsed: unknown; + if (workerResult.executorResult !== undefined) { + try { + parsed = JSON.parse(workerResult.executorResult); + } catch { + parsed = workerResult.executorResult; + } + } + return { + result: parsed ?? null, + logs: workerResult.executorLogs, + }; + } + + return { + result: null, + error: workerResult.error || "Unknown execution error", + }; +} + export const jsExecCommand: Command = { name: "js-exec", @@ -607,6 +754,27 @@ export const jsExecCommand: Command = { isModule = true; } + // When the SDK execution function is present, route through it. + // The SDK creates the toolInvoker (with all discovered sources) and + // calls our CodeExecutor which runs the code in QuickJS. + if (ctx.executorExecFn) { + const execResult = await ctx.executorExecFn(jsCode); + const logs = execResult.logs ?? []; + return { + stdout: logs + .filter((l) => !l.startsWith("[error]") && !l.startsWith("[warn]")) + .map((l) => `${l.replace(/^\[(log|info|debug)\] /, "")}\n`) + .join(""), + stderr: execResult.error + ? `${execResult.error}\n` + : logs + .filter((l) => l.startsWith("[error]") || l.startsWith("[warn]")) + .map((l) => `${l.replace(/^\[(error|warn)\] /, "")}\n`) + .join(""), + exitCode: execResult.error ? 1 : 0, + }; + } + // Get bootstrap code from context (threaded via CommandContext, not env) const bootstrapCode = ctx.jsBootstrapCode; diff --git a/src/commands/js-exec/worker.ts b/src/commands/js-exec/worker.ts index 6749e868..bfc2bcfd 100644 --- a/src/commands/js-exec/worker.ts +++ b/src/commands/js-exec/worker.ts @@ -50,6 +50,10 @@ export interface JsExecWorkerInput { isModule?: boolean; stripTypes?: boolean; timeoutMs?: number; + /** When true, tools proxy is available (console still goes to stdout/stderr) */ + hasExecutorTools?: boolean; + /** When true, runs in full executor mode: tools proxy, log capture, result capture */ + executorMode?: boolean; } export interface JsExecWorkerOutput { @@ -57,6 +61,10 @@ export interface JsExecWorkerOutput { success: boolean; error?: string; defenseStats?: WorkerDefenseStats; + /** JSON-serialized return value (executor mode only) */ + executorResult?: string; + /** Captured console logs (executor mode only) */ + executorLogs?: string[]; } let quickjsModule: QuickJSWASMModule | null = null; @@ -771,6 +779,28 @@ function setupContext( context.setProp(context.global, "__execArgs", execArgsFn); execArgsFn.dispose(); + // --- tool invocation (executor tools or executor mode) --- + if (input.hasExecutorTools || input.executorMode) { + const invokeToolFn = context.newFunction( + "__invokeTool", + (pathHandle: QuickJSHandle, argsHandle: QuickJSHandle) => { + const path = context.getString(pathHandle); + const argsJson = context.getString(argsHandle); + try { + const resultJson = backend.invokeTool(path, argsJson); + return context.newString(resultJson); + } catch (e) { + return throwError( + context, + (e as Error).message || "tool invocation failed", + ); + } + }, + ); + context.setProp(context.global, "__invokeTool", invokeToolFn); + invokeToolFn.dispose(); + } + // --- env --- const envObj = jsToHandle(context, input.env); context.setProp(context.global, "env", envObj); @@ -1065,6 +1095,103 @@ async function initializeWithDefense(): Promise { }); } +/** + * JavaScript source that sets up just the tools proxy (no console override). + * Used when hasExecutorTools is true but executorMode is false. + * Console output still goes to stdout/stderr normally. + */ +const TOOLS_ONLY_SETUP_SOURCE = `(function() { + globalThis.tools = (function makeProxy(path) { + return new Proxy(function(){}, { + get: function(_t, prop) { + if (prop === 'then' || typeof prop === 'symbol') return undefined; + return makeProxy(path.concat([String(prop)])); + }, + apply: function(_t, _this, args) { + var toolPath = path.join('.'); + if (!toolPath) throw new Error('Tool path missing in invocation'); + var argsJson = args[0] !== undefined ? JSON.stringify(args[0]) : '{}'; + var resultJson = globalThis.__invokeTool(toolPath, argsJson); + return resultJson !== undefined && resultJson !== '' ? JSON.parse(resultJson) : undefined; + } + }); + })([]); +})();`; + +/** + * JavaScript source that sets up the full executor environment inside QuickJS. + * - Overrides console to capture logs to an array + * - Creates a tools proxy that calls __invokeTool via the SAB bridge + * Runs after sandbox hardening so Proxy/object literals still work. + */ +const EXECUTOR_SETUP_SOURCE = `(function() { + var __logs = []; + globalThis[Symbol.for('jb:executorLogs')] = __logs; + + var _fmt = function(v) { + if (typeof v === 'string') return v; + try { return JSON.stringify(v); } + catch(e) { return String(v); } + }; + + globalThis.console = { + log: function() { var a = []; for(var i=0;i", + ); + if (logsResult.error) { + logsResult.error.dispose(); + return []; + } + const logs = context.dump(logsResult.value) as string[]; + logsResult.value.dispose(); + return Array.isArray(logs) ? logs : []; +} + +/** + * Read a property from a QuickJS handle and dump its value. + */ +function readPropDump( + context: QuickJSContext, + handle: QuickJSHandle, + key: string, +): unknown { + const prop = context.getProp(handle, key); + try { + return context.dump(prop); + } finally { + prop.dispose(); + } +} + async function executeCode( input: JsExecWorkerInput, ): Promise { @@ -1304,6 +1431,157 @@ async function executeCode( bootstrapResult.value.dispose(); } + // --- Tools-only setup: tools proxy without console/result capture --- + if (input.hasExecutorTools && !input.executorMode) { + const toolsSetupResult = context.evalCode( + TOOLS_ONLY_SETUP_SOURCE, + "", + ); + if (toolsSetupResult.error) { + toolsSetupResult.error.dispose(); + } else { + toolsSetupResult.value.dispose(); + } + } + + // --- Executor mode: tools proxy, log capture, result capture --- + if (input.executorMode) { + const executorSetupResult = context.evalCode( + EXECUTOR_SETUP_SOURCE, + "", + ); + if (executorSetupResult.error) { + const errVal = context.dump(executorSetupResult.error); + executorSetupResult.error.dispose(); + backend.exit(1); + return { + success: true, + error: formatError(errVal), + executorLogs: [], + }; + } + executorSetupResult.value.dispose(); + + // Wrap user code in async IIFE to support await and return values + const wrappedCode = `(async () => {\n${input.jsCode}\n})()`; + const evalResult = context.evalCode(wrappedCode, ""); + + if (evalResult.error) { + const errorVal = context.dump(evalResult.error); + evalResult.error.dispose(); + const errorMsg = formatError(errorVal); + backend.exit(1); + return { + success: true, + executorLogs: readExecutorLogs(context), + error: errorMsg, + }; + } + + // Track promise resolution via state object + context.setProp(context.global, "__executorPromise", evalResult.value); + evalResult.value.dispose(); + + const stateResult = context.evalCode( + [ + "(function(p){", + " var s = { v: void 0, e: void 0, settled: false };", + " var fmtErr = function(e) {", + " if (e && typeof e === 'object') {", + " var m = typeof e.message === 'string' ? e.message : '';", + " var st = typeof e.stack === 'string' ? e.stack : '';", + " if (m && st) return st.indexOf(m) === -1 ? m + '\\n' + st : st;", + " if (m) return m; if (st) return st;", + " }", + " return String(e);", + " };", + " p.then(", + " function(v){ s.v = v; s.settled = true; },", + " function(e){ s.e = fmtErr(e); s.settled = true; }", + " );", + " return s;", + "})(__executorPromise)", + ].join("\n"), + "", + ); + + if (stateResult.error) { + const errorVal = context.dump(stateResult.error); + stateResult.error.dispose(); + backend.exit(1); + return { + success: true, + executorLogs: readExecutorLogs(context), + error: formatError(errorVal), + }; + } + + const stateHandle = stateResult.value; + + // Drain pending jobs (may block on tool calls via SAB bridge) + const pendingResult = runtime.executePendingJobs(); + if ("error" in pendingResult && pendingResult.error) { + const errorVal = context.dump(pendingResult.error); + pendingResult.error.dispose(); + const rawMsg = + typeof errorVal === "object" && + errorVal !== null && + "message" in errorVal + ? (errorVal as { message: string }).message + : String(errorVal); + if (rawMsg !== "__EXIT__") { + stateHandle.dispose(); + backend.exit(1); + return { + success: true, + executorLogs: readExecutorLogs(context), + error: formatError(errorVal), + }; + } + } + + // Read resolved state + const settled = readPropDump(context, stateHandle, "settled"); + const value = readPropDump(context, stateHandle, "v"); + const stateError = readPropDump(context, stateHandle, "e"); + stateHandle.dispose(); + + const logs = readExecutorLogs(context); + + if (!settled) { + backend.exit(0); + return { + success: true, + executorLogs: logs, + error: "Execution did not settle", + }; + } + + if (typeof stateError !== "undefined") { + backend.exit(0); + return { + success: true, + executorLogs: logs, + error: String(stateError), + }; + } + + // Serialize result + let resultJson: string | undefined; + try { + resultJson = value !== undefined ? JSON.stringify(value) : undefined; + } catch { + resultJson = undefined; + } + + backend.exit(0); + return { + success: true, + executorResult: resultJson, + executorLogs: logs, + }; + } + // Run user code const filename = input.scriptPath || ""; let jsCode = input.jsCode; diff --git a/src/commands/worker-bridge/bridge-handler.ts b/src/commands/worker-bridge/bridge-handler.ts index 9a2020a3..d97de265 100644 --- a/src/commands/worker-bridge/bridge-handler.ts +++ b/src/commands/worker-bridge/bridge-handler.ts @@ -48,6 +48,9 @@ export class BridgeHandler { private exec: | ((command: string, options: CommandExecOptions) => Promise) | undefined = undefined, + private invokeTool: + | ((path: string, argsJson: string) => Promise) + | undefined = undefined, ) { this.protocol = new ProtocolBuffer(sharedBuffer); } @@ -195,6 +198,9 @@ export class BridgeHandler { case OpCode.EXEC_COMMAND: await this.handleExecCommand(); break; + case OpCode.INVOKE_TOOL: + await this.handleInvokeTool(); + break; default: this.protocol.setErrorCode(ErrorCode.IO_ERROR); this.protocol.setStatus(Status.ERROR); @@ -584,6 +590,34 @@ export class BridgeHandler { } } + private async handleInvokeTool(): Promise { + const invokeToolFn = this.invokeTool; + if (!invokeToolFn) { + this.protocol.setErrorCode(ErrorCode.IO_ERROR); + this.protocol.setResultFromString( + "Tool invocation not available in this context.", + ); + this.protocol.setStatus(Status.ERROR); + return; + } + + const path = this.protocol.getPath(); + const argsJson = this.protocol.getDataAsString(); + + try { + const resultJson = await this.raceDeadline(() => + invokeToolFn(path, argsJson), + ); + this.protocol.setResultFromString(resultJson); + this.protocol.setStatus(Status.SUCCESS); + } catch (e) { + const message = e instanceof Error ? e.message : String(e); + this.protocol.setErrorCode(ErrorCode.IO_ERROR); + this.protocol.setResultFromString(message); + this.protocol.setStatus(Status.ERROR); + } + } + private setErrorFromException(e: unknown): void { const rawMessage = e instanceof Error ? e.message : String(e); const message = sanitizeErrorMessage(rawMessage); diff --git a/src/commands/worker-bridge/protocol.ts b/src/commands/worker-bridge/protocol.ts index 74e9325a..31a536fd 100644 --- a/src/commands/worker-bridge/protocol.ts +++ b/src/commands/worker-bridge/protocol.ts @@ -45,6 +45,8 @@ export const OpCode = { HTTP_REQUEST: 200, // Sub-shell execution EXEC_COMMAND: 300, + // Tool invocation (executor mode) + INVOKE_TOOL: 400, } as const; export type OpCodeType = (typeof OpCode)[keyof typeof OpCode]; @@ -94,11 +96,11 @@ const Offset = { const Size = { CONTROL_REGION: 32, PATH_BUFFER: 4096, - // 1MB limit applies to all FS read/write operations through the bridge. - // Files larger than this will be truncated. This is tight — consider - // increasing if real workloads hit the cap. Reduced from 16MB for faster tests. - DATA_BUFFER: 1048576, - TOTAL: 1052704, // 32 + 4096 + 1MB + // 8MB limit for FS read/write, HTTP responses, and tool invocation results. + // Sized to handle typical OpenAPI/GraphQL responses (paginated lists, batch queries). + // Still well under the 64MB QuickJS memory limit per execution. + DATA_BUFFER: 8388608, + TOTAL: 8392736, // 32 + 4096 + 8MB } as const; /** Flags for operations */ diff --git a/src/commands/worker-bridge/sync-backend.ts b/src/commands/worker-bridge/sync-backend.ts index 5e8d4fe0..100dbd3a 100644 --- a/src/commands/worker-bridge/sync-backend.ts +++ b/src/commands/worker-bridge/sync-backend.ts @@ -287,4 +287,19 @@ export class SyncBackend { const responseJson = new TextDecoder().decode(result.result); return JSON.parse(responseJson); } + + /** + * Invoke a tool through the main thread's tool invoker (executor mode). + * Returns the JSON-serialized result. + */ + invokeTool(path: string, argsJson: string): string { + const requestData = argsJson + ? new TextEncoder().encode(argsJson) + : undefined; + const result = this.execSync(OpCode.INVOKE_TOOL, path, requestData); + if (!result.success) { + throw new Error(result.error || "Tool invocation failed"); + } + return new TextDecoder().decode(result.result); + } } diff --git a/src/executor-init.ts b/src/executor-init.ts new file mode 100644 index 00000000..e35e1d41 --- /dev/null +++ b/src/executor-init.ts @@ -0,0 +1,112 @@ +/** + * Executor SDK lazy initialization. + * Separated from Bash.ts so the browser bundle never sees these imports. + * Only loaded at runtime behind a dynamic import. + */ + +import type { ExecutorConfig, ExecutorSDKHandle } from "./Bash.js"; +import { resolveLimits } from "./limits.js"; + +export async function initExecutorSDK( + setup: (sdk: ExecutorSDKHandle) => Promise, + approval: ExecutorConfig["onToolApproval"] | undefined, + fs: import("./fs/interface.js").IFileSystem, + getCwd: () => string, + getEnv: () => Map, + getLimits: () => import("./limits.js").ExecutionLimits | undefined, +): Promise<{ + sdk: ExecutorSDKHandle; + /** + * Execute code through the SDK pipeline. + * The SDK creates the toolInvoker per-execution and passes it to our + * CodeExecutor, which runs the code in QuickJS with the tools proxy. + */ + executeViaSdk: (code: string) => Promise<{ + result: unknown; + error?: string; + logs?: string[]; + }>; +}> { + // @banned-pattern-ignore: static literal path to vendored SDK bundle + const { createExecutor, createFsBackend } = await import( + "../vendor/executor/executor-sdk-bundle.mjs" + ); + const { executeForExecutor } = await import("./commands/js-exec/js-exec.js"); + const EffectMod = await import("effect/Effect"); + + // biome-ignore lint/suspicious/noExplicitAny: CodeExecutor + ToolInvoker types cross package boundaries; validated at runtime by the SDK + const runtime: any = { + // biome-ignore lint/suspicious/noExplicitAny: ToolInvoker type from @executor/sdk + execute(code: string, toolInvoker: any) { + return EffectMod.tryPromise(async () => { + const ctx = { + fs, + cwd: getCwd(), + env: getEnv(), + stdin: "", + limits: resolveLimits(getLimits()), + }; + // Bridge: convert the SDK's Effect-based toolInvoker to the + // JSON string protocol used by the SharedArrayBuffer bridge. + const invokeTool = async ( + path: string, + argsJson: string, + ): Promise => { + let args: unknown; + try { + args = argsJson ? JSON.parse(argsJson) : undefined; + } catch { + args = undefined; + } + const result = await EffectMod.runPromise( + toolInvoker.invoke({ path, args }), + ); + return result !== undefined ? JSON.stringify(result) : ""; + }; + return executeForExecutor(code, ctx, invokeTool); + }); + }, + }; + + // Use the Bash instance's virtual filesystem for executor state. + // This makes all executor state serializable (serialize the fs = serialize everything) + // and inspectable via bash commands (cat /.executor/config.json). + const fsBackend = createFsBackend({ + fs: { + writeFileSync: (path: string, content: string | Uint8Array) => { + const str = typeof content === "string" ? content : new TextDecoder().decode(content); + // InMemoryFs has writeFileSync + (fs as any).writeFileSync(path, str); + }, + mkdirSync: (path: string, opts?: { recursive?: boolean }) => { + try { (fs as any).mkdirSync(path, opts); } catch { /* ignore */ } + }, + readFile: (path: string) => fs.readFile(path), + exists: (path: string) => fs.exists(path), + }, + root: "/.executor", + }); + + const sdk = await createExecutor({ + runtime, + storage: fsBackend, + onToolApproval: approval ?? "allow-all", + }); + + if (setup) { + await setup(sdk as unknown as ExecutorSDKHandle); + } + + const sdkRef = sdk as unknown as ExecutorSDKHandle; + + // executeViaSdk routes code through the SDK's execute() which creates + // the toolInvoker (with all discovered sources) and calls our CodeExecutor. + // Our CodeExecutor runs the code in QuickJS with tools bridged via SAB. + const executeViaSdk = async ( + code: string, + ): Promise<{ result: unknown; error?: string; logs?: string[] }> => { + return sdkRef.execute(code); + }; + + return { sdk: sdkRef, executeViaSdk }; +} diff --git a/src/interpreter/builtin-dispatch.ts b/src/interpreter/builtin-dispatch.ts index 00207174..9ec157d5 100644 --- a/src/interpreter/builtin-dispatch.ts +++ b/src/interpreter/builtin-dispatch.ts @@ -437,6 +437,8 @@ export async function executeExternalCommand( signal: ctx.state.signal, requireDefenseContext: ctx.requireDefenseContext, jsBootstrapCode: ctx.jsBootstrapCode, + executorInvokeTool: ctx.executorInvokeTool, + executorExecFn: ctx.executorExecFn, }; const guardedCmdCtx = createDefenseAwareCommandContext(cmdCtx, commandName); diff --git a/src/interpreter/interpreter.ts b/src/interpreter/interpreter.ts index 3703a185..4552b721 100644 --- a/src/interpreter/interpreter.ts +++ b/src/interpreter/interpreter.ts @@ -134,6 +134,11 @@ export interface InterpreterOptions { requireDefenseContext?: boolean; /** Bootstrap JavaScript code for js-exec */ jsBootstrapCode?: string; + /** Tool invoker for executor mode (js-exec) */ + executorInvokeTool?: (path: string, argsJson: string) => Promise; + executorExecFn?: ( + code: string, + ) => Promise<{ result: unknown; error?: string; logs?: string[] }>; } export class Interpreter { @@ -155,6 +160,8 @@ export class Interpreter { coverage: options.coverage, requireDefenseContext: options.requireDefenseContext ?? false, jsBootstrapCode: options.jsBootstrapCode, + executorInvokeTool: options.executorInvokeTool, + executorExecFn: options.executorExecFn, }; } diff --git a/src/interpreter/types.ts b/src/interpreter/types.ts index 74106ccf..692fae91 100644 --- a/src/interpreter/types.ts +++ b/src/interpreter/types.ts @@ -444,4 +444,12 @@ export interface InterpreterContext { * Threaded through the context chain instead of shell env. */ jsBootstrapCode?: string; + /** + * Tool invoker for executor mode (js-exec). + * When present, js-exec sets up a `tools` proxy. + */ + executorInvokeTool?: (path: string, argsJson: string) => Promise; + executorExecFn?: ( + code: string, + ) => Promise<{ result: unknown; error?: string; logs?: string[] }>; } diff --git a/src/types.ts b/src/types.ts index 83dbb186..0172e126 100644 --- a/src/types.ts +++ b/src/types.ts @@ -189,6 +189,21 @@ export interface CommandContext { * user access/injection via environment variables. */ jsBootstrapCode?: string; + /** + * Tool invoker for executor mode (js-exec). + * When present, js-exec sets up a `tools` proxy that routes calls through this. + * The function receives (path, argsJson) and returns a JSON result string. + */ + executorInvokeTool?: (path: string, argsJson: string) => Promise; + /** + * When set, js-exec routes execution through this function instead of + * running code directly. Used by the @executor/sdk integration — the + * SDK creates the toolInvoker (with all discovered sources) and calls + * our CodeExecutor which runs the code in QuickJS. + */ + executorExecFn?: ( + code: string, + ) => Promise<{ result: unknown; error?: string; logs?: string[] }>; } export interface Command { diff --git a/vendor/executor/executor-sdk-bundle.d.mts b/vendor/executor/executor-sdk-bundle.d.mts new file mode 100644 index 00000000..ca37a6d4 --- /dev/null +++ b/vendor/executor/executor-sdk-bundle.d.mts @@ -0,0 +1,34 @@ +/** Vendored @executor/sdk bundle — re-exports createExecutor, createFsBackend, and types */ + +export interface SyncableFS { + writeFileSync(path: string, content: string | Uint8Array): void; + mkdirSync?(path: string, options?: { recursive?: boolean }): void; + readFile(path: string): Promise; + exists(path: string): Promise; +} + +export interface FsStorageOptions { + fs: SyncableFS; + root?: string; + resolveSecret?: (input: { secretId: string; context?: Record }) => Promise | string | null; +} + +export declare function createFsBackend(options: FsStorageOptions): unknown; + +export declare function createExecutor(options: { + runtime?: unknown; + storage?: unknown; + tools?: Record unknown }>; + onToolApproval?: unknown; + onInteraction?: unknown; + resolveSecret?: unknown; +}): Promise<{ + execute: (code: string) => Promise<{ result: unknown; error?: string; logs?: string[] }>; + sources: { + add: (input: Record, options?: Record) => Promise; + list: () => Promise; + [key: string]: unknown; + }; + close: () => Promise; + [key: string]: unknown; +}>; diff --git a/vendor/executor/executor-sdk-bundle.mjs b/vendor/executor/executor-sdk-bundle.mjs new file mode 100644 index 00000000..e8eeb5d0 --- /dev/null +++ b/vendor/executor/executor-sdk-bundle.mjs @@ -0,0 +1,512 @@ +import{createRequire as __cr}from"module";const require=__cr(import.meta.url); +var awe=Object.create;var W8=Object.defineProperty;var swe=Object.getOwnPropertyDescriptor;var cwe=Object.getOwnPropertyNames;var lwe=Object.getPrototypeOf,uwe=Object.prototype.hasOwnProperty;var fl=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof require<"u"?require:t)[r]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var L=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),r0=(e,t)=>{for(var r in t)W8(e,r,{get:t[r],enumerable:!0})},pwe=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of cwe(t))!uwe.call(e,o)&&o!==r&&W8(e,o,{get:()=>t[o],enumerable:!(n=swe(t,o))||n.enumerable});return e};var n0=(e,t,r)=>(r=e!=null?awe(lwe(e)):{},pwe(t||!e||!e.__esModule?W8(r,"default",{value:e,enumerable:!0}):r,e));var xx=L(Un=>{"use strict";Object.defineProperty(Un,"__esModule",{value:!0});Un.regexpCode=Un.getEsmExportName=Un.getProperty=Un.safeStringify=Un.stringify=Un.strConcat=Un.addCodeArg=Un.str=Un._=Un.nil=Un._Code=Un.Name=Un.IDENTIFIER=Un._CodeOrName=void 0;var vx=class{};Un._CodeOrName=vx;Un.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var Ay=class extends vx{constructor(t){if(super(),!Un.IDENTIFIER.test(t))throw new Error("CodeGen: name must be a valid identifier");this.str=t}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};Un.Name=Ay;var ml=class extends vx{constructor(t){super(),this._items=typeof t=="string"?[t]:t}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let t=this._items[0];return t===""||t==='""'}get str(){var t;return(t=this._str)!==null&&t!==void 0?t:this._str=this._items.reduce((r,n)=>`${r}${n}`,"")}get names(){var t;return(t=this._names)!==null&&t!==void 0?t:this._names=this._items.reduce((r,n)=>(n instanceof Ay&&(r[n.str]=(r[n.str]||0)+1),r),{})}};Un._Code=ml;Un.nil=new ml("");function UX(e,...t){let r=[e[0]],n=0;for(;n{"use strict";Object.defineProperty(Ks,"__esModule",{value:!0});Ks.ValueScope=Ks.ValueScopeName=Ks.Scope=Ks.varKinds=Ks.UsedValueState=void 0;var Vs=xx(),Y8=class extends Error{constructor(t){super(`CodeGen: "code" for ${t} not defined`),this.value=t.value}},lC;(function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"})(lC||(Ks.UsedValueState=lC={}));Ks.varKinds={const:new Vs.Name("const"),let:new Vs.Name("let"),var:new Vs.Name("var")};var uC=class{constructor({prefixes:t,parent:r}={}){this._names={},this._prefixes=t,this._parent=r}toName(t){return t instanceof Vs.Name?t:this.name(t)}name(t){return new Vs.Name(this._newName(t))}_newName(t){let r=this._names[t]||this._nameGroup(t);return`${t}${r.index++}`}_nameGroup(t){var r,n;if(!((n=(r=this._parent)===null||r===void 0?void 0:r._prefixes)===null||n===void 0)&&n.has(t)||this._prefixes&&!this._prefixes.has(t))throw new Error(`CodeGen: prefix "${t}" is not allowed in this scope`);return this._names[t]={prefix:t,index:0}}};Ks.Scope=uC;var pC=class extends Vs.Name{constructor(t,r){super(r),this.prefix=t}setValue(t,{property:r,itemIndex:n}){this.value=t,this.scopePath=(0,Vs._)`.${new Vs.Name(r)}[${n}]`}};Ks.ValueScopeName=pC;var bwe=(0,Vs._)`\n`,e9=class extends uC{constructor(t){super(t),this._values={},this._scope=t.scope,this.opts={...t,_n:t.lines?bwe:Vs.nil}}get(){return this._scope}name(t){return new pC(t,this._newName(t))}value(t,r){var n;if(r.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let o=this.toName(t),{prefix:i}=o,a=(n=r.key)!==null&&n!==void 0?n:r.ref,s=this._values[i];if(s){let d=s.get(a);if(d)return d}else s=this._values[i]=new Map;s.set(a,o);let c=this._scope[i]||(this._scope[i]=[]),p=c.length;return c[p]=r.ref,o.setValue(r,{property:i,itemIndex:p}),o}getValue(t,r){let n=this._values[t];if(n)return n.get(r)}scopeRefs(t,r=this._values){return this._reduceValues(r,n=>{if(n.scopePath===void 0)throw new Error(`CodeGen: name "${n}" has no value`);return(0,Vs._)`${t}${n.scopePath}`})}scopeCode(t=this._values,r,n){return this._reduceValues(t,o=>{if(o.value===void 0)throw new Error(`CodeGen: name "${o}" has no value`);return o.value.code},r,n)}_reduceValues(t,r,n={},o){let i=Vs.nil;for(let a in t){let s=t[a];if(!s)continue;let c=n[a]=n[a]||new Map;s.forEach(p=>{if(c.has(p))return;c.set(p,lC.Started);let d=r(p);if(d){let f=this.opts.es5?Ks.varKinds.var:Ks.varKinds.const;i=(0,Vs._)`${i}${f} ${p} = ${d};${this.opts._n}`}else if(d=o?.(p))i=(0,Vs._)`${i}${d}${this.opts._n}`;else throw new Y8(p);c.set(p,lC.Completed)})}return i}};Ks.ValueScope=e9});var kr=L(an=>{"use strict";Object.defineProperty(an,"__esModule",{value:!0});an.or=an.and=an.not=an.CodeGen=an.operators=an.varKinds=an.ValueScopeName=an.ValueScope=an.Scope=an.Name=an.regexpCode=an.stringify=an.getProperty=an.nil=an.strConcat=an.str=an._=void 0;var An=xx(),_u=t9(),Jf=xx();Object.defineProperty(an,"_",{enumerable:!0,get:function(){return Jf._}});Object.defineProperty(an,"str",{enumerable:!0,get:function(){return Jf.str}});Object.defineProperty(an,"strConcat",{enumerable:!0,get:function(){return Jf.strConcat}});Object.defineProperty(an,"nil",{enumerable:!0,get:function(){return Jf.nil}});Object.defineProperty(an,"getProperty",{enumerable:!0,get:function(){return Jf.getProperty}});Object.defineProperty(an,"stringify",{enumerable:!0,get:function(){return Jf.stringify}});Object.defineProperty(an,"regexpCode",{enumerable:!0,get:function(){return Jf.regexpCode}});Object.defineProperty(an,"Name",{enumerable:!0,get:function(){return Jf.Name}});var mC=t9();Object.defineProperty(an,"Scope",{enumerable:!0,get:function(){return mC.Scope}});Object.defineProperty(an,"ValueScope",{enumerable:!0,get:function(){return mC.ValueScope}});Object.defineProperty(an,"ValueScopeName",{enumerable:!0,get:function(){return mC.ValueScopeName}});Object.defineProperty(an,"varKinds",{enumerable:!0,get:function(){return mC.varKinds}});an.operators={GT:new An._Code(">"),GTE:new An._Code(">="),LT:new An._Code("<"),LTE:new An._Code("<="),EQ:new An._Code("==="),NEQ:new An._Code("!=="),NOT:new An._Code("!"),OR:new An._Code("||"),AND:new An._Code("&&"),ADD:new An._Code("+")};var Qd=class{optimizeNodes(){return this}optimizeNames(t,r){return this}},r9=class extends Qd{constructor(t,r,n){super(),this.varKind=t,this.name=r,this.rhs=n}render({es5:t,_n:r}){let n=t?_u.varKinds.var:this.varKind,o=this.rhs===void 0?"":` = ${this.rhs}`;return`${n} ${this.name}${o};`+r}optimizeNames(t,r){if(t[this.name.str])return this.rhs&&(this.rhs=i0(this.rhs,t,r)),this}get names(){return this.rhs instanceof An._CodeOrName?this.rhs.names:{}}},dC=class extends Qd{constructor(t,r,n){super(),this.lhs=t,this.rhs=r,this.sideEffects=n}render({_n:t}){return`${this.lhs} = ${this.rhs};`+t}optimizeNames(t,r){if(!(this.lhs instanceof An.Name&&!t[this.lhs.str]&&!this.sideEffects))return this.rhs=i0(this.rhs,t,r),this}get names(){let t=this.lhs instanceof An.Name?{}:{...this.lhs.names};return fC(t,this.rhs)}},n9=class extends dC{constructor(t,r,n,o){super(t,n,o),this.op=r}render({_n:t}){return`${this.lhs} ${this.op}= ${this.rhs};`+t}},o9=class extends Qd{constructor(t){super(),this.label=t,this.names={}}render({_n:t}){return`${this.label}:`+t}},i9=class extends Qd{constructor(t){super(),this.label=t,this.names={}}render({_n:t}){return`break${this.label?` ${this.label}`:""};`+t}},a9=class extends Qd{constructor(t){super(),this.error=t}render({_n:t}){return`throw ${this.error};`+t}get names(){return this.error.names}},s9=class extends Qd{constructor(t){super(),this.code=t}render({_n:t}){return`${this.code};`+t}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(t,r){return this.code=i0(this.code,t,r),this}get names(){return this.code instanceof An._CodeOrName?this.code.names:{}}},Ex=class extends Qd{constructor(t=[]){super(),this.nodes=t}render(t){return this.nodes.reduce((r,n)=>r+n.render(t),"")}optimizeNodes(){let{nodes:t}=this,r=t.length;for(;r--;){let n=t[r].optimizeNodes();Array.isArray(n)?t.splice(r,1,...n):n?t[r]=n:t.splice(r,1)}return t.length>0?this:void 0}optimizeNames(t,r){let{nodes:n}=this,o=n.length;for(;o--;){let i=n[o];i.optimizeNames(t,r)||(xwe(t,i.names),n.splice(o,1))}return n.length>0?this:void 0}get names(){return this.nodes.reduce((t,r)=>ky(t,r.names),{})}},Xd=class extends Ex{render(t){return"{"+t._n+super.render(t)+"}"+t._n}},c9=class extends Ex{},o0=class extends Xd{};o0.kind="else";var Iy=class e extends Xd{constructor(t,r){super(r),this.condition=t}render(t){let r=`if(${this.condition})`+super.render(t);return this.else&&(r+="else "+this.else.render(t)),r}optimizeNodes(){super.optimizeNodes();let t=this.condition;if(t===!0)return this.nodes;let r=this.else;if(r){let n=r.optimizeNodes();r=this.else=Array.isArray(n)?new o0(n):n}if(r)return t===!1?r instanceof e?r:r.nodes:this.nodes.length?this:new e(JX(t),r instanceof e?[r]:r.nodes);if(!(t===!1||!this.nodes.length))return this}optimizeNames(t,r){var n;if(this.else=(n=this.else)===null||n===void 0?void 0:n.optimizeNames(t,r),!!(super.optimizeNames(t,r)||this.else))return this.condition=i0(this.condition,t,r),this}get names(){let t=super.names;return fC(t,this.condition),this.else&&ky(t,this.else.names),t}};Iy.kind="if";var wy=class extends Xd{};wy.kind="for";var l9=class extends wy{constructor(t){super(),this.iteration=t}render(t){return`for(${this.iteration})`+super.render(t)}optimizeNames(t,r){if(super.optimizeNames(t,r))return this.iteration=i0(this.iteration,t,r),this}get names(){return ky(super.names,this.iteration.names)}},u9=class extends wy{constructor(t,r,n,o){super(),this.varKind=t,this.name=r,this.from=n,this.to=o}render(t){let r=t.es5?_u.varKinds.var:this.varKind,{name:n,from:o,to:i}=this;return`for(${r} ${n}=${o}; ${n}<${i}; ${n}++)`+super.render(t)}get names(){let t=fC(super.names,this.from);return fC(t,this.to)}},_C=class extends wy{constructor(t,r,n,o){super(),this.loop=t,this.varKind=r,this.name=n,this.iterable=o}render(t){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(t)}optimizeNames(t,r){if(super.optimizeNames(t,r))return this.iterable=i0(this.iterable,t,r),this}get names(){return ky(super.names,this.iterable.names)}},Tx=class extends Xd{constructor(t,r,n){super(),this.name=t,this.args=r,this.async=n}render(t){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(t)}};Tx.kind="func";var Dx=class extends Ex{render(t){return"return "+super.render(t)}};Dx.kind="return";var p9=class extends Xd{render(t){let r="try"+super.render(t);return this.catch&&(r+=this.catch.render(t)),this.finally&&(r+=this.finally.render(t)),r}optimizeNodes(){var t,r;return super.optimizeNodes(),(t=this.catch)===null||t===void 0||t.optimizeNodes(),(r=this.finally)===null||r===void 0||r.optimizeNodes(),this}optimizeNames(t,r){var n,o;return super.optimizeNames(t,r),(n=this.catch)===null||n===void 0||n.optimizeNames(t,r),(o=this.finally)===null||o===void 0||o.optimizeNames(t,r),this}get names(){let t=super.names;return this.catch&&ky(t,this.catch.names),this.finally&&ky(t,this.finally.names),t}},Ax=class extends Xd{constructor(t){super(),this.error=t}render(t){return`catch(${this.error})`+super.render(t)}};Ax.kind="catch";var Ix=class extends Xd{render(t){return"finally"+super.render(t)}};Ix.kind="finally";var d9=class{constructor(t,r={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...r,_n:r.lines?` +`:""},this._extScope=t,this._scope=new _u.Scope({parent:t}),this._nodes=[new c9]}toString(){return this._root.render(this.opts)}name(t){return this._scope.name(t)}scopeName(t){return this._extScope.name(t)}scopeValue(t,r){let n=this._extScope.value(t,r);return(this._values[n.prefix]||(this._values[n.prefix]=new Set)).add(n),n}getScopeValue(t,r){return this._extScope.getValue(t,r)}scopeRefs(t){return this._extScope.scopeRefs(t,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(t,r,n,o){let i=this._scope.toName(r);return n!==void 0&&o&&(this._constants[i.str]=n),this._leafNode(new r9(t,i,n)),i}const(t,r,n){return this._def(_u.varKinds.const,t,r,n)}let(t,r,n){return this._def(_u.varKinds.let,t,r,n)}var(t,r,n){return this._def(_u.varKinds.var,t,r,n)}assign(t,r,n){return this._leafNode(new dC(t,r,n))}add(t,r){return this._leafNode(new n9(t,an.operators.ADD,r))}code(t){return typeof t=="function"?t():t!==An.nil&&this._leafNode(new s9(t)),this}object(...t){let r=["{"];for(let[n,o]of t)r.length>1&&r.push(","),r.push(n),(n!==o||this.opts.es5)&&(r.push(":"),(0,An.addCodeArg)(r,o));return r.push("}"),new An._Code(r)}if(t,r,n){if(this._blockNode(new Iy(t)),r&&n)this.code(r).else().code(n).endIf();else if(r)this.code(r).endIf();else if(n)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(t){return this._elseNode(new Iy(t))}else(){return this._elseNode(new o0)}endIf(){return this._endBlockNode(Iy,o0)}_for(t,r){return this._blockNode(t),r&&this.code(r).endFor(),this}for(t,r){return this._for(new l9(t),r)}forRange(t,r,n,o,i=this.opts.es5?_u.varKinds.var:_u.varKinds.let){let a=this._scope.toName(t);return this._for(new u9(i,a,r,n),()=>o(a))}forOf(t,r,n,o=_u.varKinds.const){let i=this._scope.toName(t);if(this.opts.es5){let a=r instanceof An.Name?r:this.var("_arr",r);return this.forRange("_i",0,(0,An._)`${a}.length`,s=>{this.var(i,(0,An._)`${a}[${s}]`),n(i)})}return this._for(new _C("of",o,i,r),()=>n(i))}forIn(t,r,n,o=this.opts.es5?_u.varKinds.var:_u.varKinds.const){if(this.opts.ownProperties)return this.forOf(t,(0,An._)`Object.keys(${r})`,n);let i=this._scope.toName(t);return this._for(new _C("in",o,i,r),()=>n(i))}endFor(){return this._endBlockNode(wy)}label(t){return this._leafNode(new o9(t))}break(t){return this._leafNode(new i9(t))}return(t){let r=new Dx;if(this._blockNode(r),this.code(t),r.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(Dx)}try(t,r,n){if(!r&&!n)throw new Error('CodeGen: "try" without "catch" and "finally"');let o=new p9;if(this._blockNode(o),this.code(t),r){let i=this.name("e");this._currNode=o.catch=new Ax(i),r(i)}return n&&(this._currNode=o.finally=new Ix,this.code(n)),this._endBlockNode(Ax,Ix)}throw(t){return this._leafNode(new a9(t))}block(t,r){return this._blockStarts.push(this._nodes.length),t&&this.code(t).endBlock(r),this}endBlock(t){let r=this._blockStarts.pop();if(r===void 0)throw new Error("CodeGen: not in self-balancing block");let n=this._nodes.length-r;if(n<0||t!==void 0&&n!==t)throw new Error(`CodeGen: wrong number of nodes: ${n} vs ${t} expected`);return this._nodes.length=r,this}func(t,r=An.nil,n,o){return this._blockNode(new Tx(t,r,n)),o&&this.code(o).endFunc(),this}endFunc(){return this._endBlockNode(Tx)}optimize(t=1){for(;t-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(t){return this._currNode.nodes.push(t),this}_blockNode(t){this._currNode.nodes.push(t),this._nodes.push(t)}_endBlockNode(t,r){let n=this._currNode;if(n instanceof t||r&&n instanceof r)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${r?`${t.kind}/${r.kind}`:t.kind}"`)}_elseNode(t){let r=this._currNode;if(!(r instanceof Iy))throw new Error('CodeGen: "else" without "if"');return this._currNode=r.else=t,this}get _root(){return this._nodes[0]}get _currNode(){let t=this._nodes;return t[t.length-1]}set _currNode(t){let r=this._nodes;r[r.length-1]=t}};an.CodeGen=d9;function ky(e,t){for(let r in t)e[r]=(e[r]||0)+(t[r]||0);return e}function fC(e,t){return t instanceof An._CodeOrName?ky(e,t.names):e}function i0(e,t,r){if(e instanceof An.Name)return n(e);if(!o(e))return e;return new An._Code(e._items.reduce((i,a)=>(a instanceof An.Name&&(a=n(a)),a instanceof An._Code?i.push(...a._items):i.push(a),i),[]));function n(i){let a=r[i.str];return a===void 0||t[i.str]!==1?i:(delete t[i.str],a)}function o(i){return i instanceof An._Code&&i._items.some(a=>a instanceof An.Name&&t[a.str]===1&&r[a.str]!==void 0)}}function xwe(e,t){for(let r in t)e[r]=(e[r]||0)-(t[r]||0)}function JX(e){return typeof e=="boolean"||typeof e=="number"||e===null?!e:(0,An._)`!${_9(e)}`}an.not=JX;var Ewe=VX(an.operators.AND);function Twe(...e){return e.reduce(Ewe)}an.and=Twe;var Dwe=VX(an.operators.OR);function Awe(...e){return e.reduce(Dwe)}an.or=Awe;function VX(e){return(t,r)=>t===An.nil?r:r===An.nil?t:(0,An._)`${_9(t)} ${e} ${_9(r)}`}function _9(e){return e instanceof An.Name?e:(0,An._)`(${e})`}});var un=L(ln=>{"use strict";Object.defineProperty(ln,"__esModule",{value:!0});ln.checkStrictMode=ln.getErrorPath=ln.Type=ln.useFunc=ln.setEvaluated=ln.evaluatedPropsToName=ln.mergeEvaluated=ln.eachItem=ln.unescapeJsonPointer=ln.escapeJsonPointer=ln.escapeFragment=ln.unescapeFragment=ln.schemaRefOrVal=ln.schemaHasRulesButRef=ln.schemaHasRules=ln.checkUnknownRules=ln.alwaysValidSchema=ln.toHash=void 0;var Do=kr(),Iwe=xx();function wwe(e){let t={};for(let r of e)t[r]=!0;return t}ln.toHash=wwe;function kwe(e,t){return typeof t=="boolean"?t:Object.keys(t).length===0?!0:(HX(e,t),!ZX(t,e.self.RULES.all))}ln.alwaysValidSchema=kwe;function HX(e,t=e.schema){let{opts:r,self:n}=e;if(!r.strictSchema||typeof t=="boolean")return;let o=n.RULES.keywords;for(let i in t)o[i]||XX(e,`unknown keyword: "${i}"`)}ln.checkUnknownRules=HX;function ZX(e,t){if(typeof e=="boolean")return!e;for(let r in e)if(t[r])return!0;return!1}ln.schemaHasRules=ZX;function Cwe(e,t){if(typeof e=="boolean")return!e;for(let r in e)if(r!=="$ref"&&t.all[r])return!0;return!1}ln.schemaHasRulesButRef=Cwe;function Pwe({topSchemaRef:e,schemaPath:t},r,n,o){if(!o){if(typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="string")return(0,Do._)`${r}`}return(0,Do._)`${e}${t}${(0,Do.getProperty)(n)}`}ln.schemaRefOrVal=Pwe;function Owe(e){return WX(decodeURIComponent(e))}ln.unescapeFragment=Owe;function Nwe(e){return encodeURIComponent(m9(e))}ln.escapeFragment=Nwe;function m9(e){return typeof e=="number"?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}ln.escapeJsonPointer=m9;function WX(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}ln.unescapeJsonPointer=WX;function Fwe(e,t){if(Array.isArray(e))for(let r of e)t(r);else t(e)}ln.eachItem=Fwe;function KX({mergeNames:e,mergeToName:t,mergeValues:r,resultToName:n}){return(o,i,a,s)=>{let c=a===void 0?i:a instanceof Do.Name?(i instanceof Do.Name?e(o,i,a):t(o,i,a),a):i instanceof Do.Name?(t(o,a,i),i):r(i,a);return s===Do.Name&&!(c instanceof Do.Name)?n(o,c):c}}ln.mergeEvaluated={props:KX({mergeNames:(e,t,r)=>e.if((0,Do._)`${r} !== true && ${t} !== undefined`,()=>{e.if((0,Do._)`${t} === true`,()=>e.assign(r,!0),()=>e.assign(r,(0,Do._)`${r} || {}`).code((0,Do._)`Object.assign(${r}, ${t})`))}),mergeToName:(e,t,r)=>e.if((0,Do._)`${r} !== true`,()=>{t===!0?e.assign(r,!0):(e.assign(r,(0,Do._)`${r} || {}`),h9(e,r,t))}),mergeValues:(e,t)=>e===!0?!0:{...e,...t},resultToName:QX}),items:KX({mergeNames:(e,t,r)=>e.if((0,Do._)`${r} !== true && ${t} !== undefined`,()=>e.assign(r,(0,Do._)`${t} === true ? true : ${r} > ${t} ? ${r} : ${t}`)),mergeToName:(e,t,r)=>e.if((0,Do._)`${r} !== true`,()=>e.assign(r,t===!0?!0:(0,Do._)`${r} > ${t} ? ${r} : ${t}`)),mergeValues:(e,t)=>e===!0?!0:Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})};function QX(e,t){if(t===!0)return e.var("props",!0);let r=e.var("props",(0,Do._)`{}`);return t!==void 0&&h9(e,r,t),r}ln.evaluatedPropsToName=QX;function h9(e,t,r){Object.keys(r).forEach(n=>e.assign((0,Do._)`${t}${(0,Do.getProperty)(n)}`,!0))}ln.setEvaluated=h9;var GX={};function Rwe(e,t){return e.scopeValue("func",{ref:t,code:GX[t.code]||(GX[t.code]=new Iwe._Code(t.code))})}ln.useFunc=Rwe;var f9;(function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"})(f9||(ln.Type=f9={}));function Lwe(e,t,r){if(e instanceof Do.Name){let n=t===f9.Num;return r?n?(0,Do._)`"[" + ${e} + "]"`:(0,Do._)`"['" + ${e} + "']"`:n?(0,Do._)`"/" + ${e}`:(0,Do._)`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,Do.getProperty)(e).toString():"/"+m9(e)}ln.getErrorPath=Lwe;function XX(e,t,r=e.opts.strictSchema){if(r){if(t=`strict mode: ${t}`,r===!0)throw new Error(t);e.self.logger.warn(t)}}ln.checkStrictMode=XX});var hl=L(y9=>{"use strict";Object.defineProperty(y9,"__esModule",{value:!0});var Xa=kr(),$we={data:new Xa.Name("data"),valCxt:new Xa.Name("valCxt"),instancePath:new Xa.Name("instancePath"),parentData:new Xa.Name("parentData"),parentDataProperty:new Xa.Name("parentDataProperty"),rootData:new Xa.Name("rootData"),dynamicAnchors:new Xa.Name("dynamicAnchors"),vErrors:new Xa.Name("vErrors"),errors:new Xa.Name("errors"),this:new Xa.Name("this"),self:new Xa.Name("self"),scope:new Xa.Name("scope"),json:new Xa.Name("json"),jsonPos:new Xa.Name("jsonPos"),jsonLen:new Xa.Name("jsonLen"),jsonPart:new Xa.Name("jsonPart")};y9.default=$we});var wx=L(Ya=>{"use strict";Object.defineProperty(Ya,"__esModule",{value:!0});Ya.extendErrors=Ya.resetErrorsCount=Ya.reportExtraError=Ya.reportError=Ya.keyword$DataError=Ya.keywordError=void 0;var Ln=kr(),hC=un(),Ss=hl();Ya.keywordError={message:({keyword:e})=>(0,Ln.str)`must pass "${e}" keyword validation`};Ya.keyword$DataError={message:({keyword:e,schemaType:t})=>t?(0,Ln.str)`"${e}" keyword must be ${t} ($data)`:(0,Ln.str)`"${e}" keyword is invalid ($data)`};function Mwe(e,t=Ya.keywordError,r,n){let{it:o}=e,{gen:i,compositeRule:a,allErrors:s}=o,c=tY(e,t,r);n??(a||s)?YX(i,c):eY(o,(0,Ln._)`[${c}]`)}Ya.reportError=Mwe;function jwe(e,t=Ya.keywordError,r){let{it:n}=e,{gen:o,compositeRule:i,allErrors:a}=n,s=tY(e,t,r);YX(o,s),i||a||eY(n,Ss.default.vErrors)}Ya.reportExtraError=jwe;function Bwe(e,t){e.assign(Ss.default.errors,t),e.if((0,Ln._)`${Ss.default.vErrors} !== null`,()=>e.if(t,()=>e.assign((0,Ln._)`${Ss.default.vErrors}.length`,t),()=>e.assign(Ss.default.vErrors,null)))}Ya.resetErrorsCount=Bwe;function qwe({gen:e,keyword:t,schemaValue:r,data:n,errsCount:o,it:i}){if(o===void 0)throw new Error("ajv implementation error");let a=e.name("err");e.forRange("i",o,Ss.default.errors,s=>{e.const(a,(0,Ln._)`${Ss.default.vErrors}[${s}]`),e.if((0,Ln._)`${a}.instancePath === undefined`,()=>e.assign((0,Ln._)`${a}.instancePath`,(0,Ln.strConcat)(Ss.default.instancePath,i.errorPath))),e.assign((0,Ln._)`${a}.schemaPath`,(0,Ln.str)`${i.errSchemaPath}/${t}`),i.opts.verbose&&(e.assign((0,Ln._)`${a}.schema`,r),e.assign((0,Ln._)`${a}.data`,n))})}Ya.extendErrors=qwe;function YX(e,t){let r=e.const("err",t);e.if((0,Ln._)`${Ss.default.vErrors} === null`,()=>e.assign(Ss.default.vErrors,(0,Ln._)`[${r}]`),(0,Ln._)`${Ss.default.vErrors}.push(${r})`),e.code((0,Ln._)`${Ss.default.errors}++`)}function eY(e,t){let{gen:r,validateName:n,schemaEnv:o}=e;o.$async?r.throw((0,Ln._)`new ${e.ValidationError}(${t})`):(r.assign((0,Ln._)`${n}.errors`,t),r.return(!1))}var Cy={keyword:new Ln.Name("keyword"),schemaPath:new Ln.Name("schemaPath"),params:new Ln.Name("params"),propertyName:new Ln.Name("propertyName"),message:new Ln.Name("message"),schema:new Ln.Name("schema"),parentSchema:new Ln.Name("parentSchema")};function tY(e,t,r){let{createErrors:n}=e.it;return n===!1?(0,Ln._)`{}`:Uwe(e,t,r)}function Uwe(e,t,r={}){let{gen:n,it:o}=e,i=[zwe(o,r),Jwe(e,r)];return Vwe(e,t,i),n.object(...i)}function zwe({errorPath:e},{instancePath:t}){let r=t?(0,Ln.str)`${e}${(0,hC.getErrorPath)(t,hC.Type.Str)}`:e;return[Ss.default.instancePath,(0,Ln.strConcat)(Ss.default.instancePath,r)]}function Jwe({keyword:e,it:{errSchemaPath:t}},{schemaPath:r,parentSchema:n}){let o=n?t:(0,Ln.str)`${t}/${e}`;return r&&(o=(0,Ln.str)`${o}${(0,hC.getErrorPath)(r,hC.Type.Str)}`),[Cy.schemaPath,o]}function Vwe(e,{params:t,message:r},n){let{keyword:o,data:i,schemaValue:a,it:s}=e,{opts:c,propertyName:p,topSchemaRef:d,schemaPath:f}=s;n.push([Cy.keyword,o],[Cy.params,typeof t=="function"?t(e):t||(0,Ln._)`{}`]),c.messages&&n.push([Cy.message,typeof r=="function"?r(e):r]),c.verbose&&n.push([Cy.schema,a],[Cy.parentSchema,(0,Ln._)`${d}${f}`],[Ss.default.data,i]),p&&n.push([Cy.propertyName,p])}});var nY=L(a0=>{"use strict";Object.defineProperty(a0,"__esModule",{value:!0});a0.boolOrEmptySchema=a0.topBoolOrEmptySchema=void 0;var Kwe=wx(),Gwe=kr(),Hwe=hl(),Zwe={message:"boolean schema is false"};function Wwe(e){let{gen:t,schema:r,validateName:n}=e;r===!1?rY(e,!1):typeof r=="object"&&r.$async===!0?t.return(Hwe.default.data):(t.assign((0,Gwe._)`${n}.errors`,null),t.return(!0))}a0.topBoolOrEmptySchema=Wwe;function Qwe(e,t){let{gen:r,schema:n}=e;n===!1?(r.var(t,!1),rY(e)):r.var(t,!0)}a0.boolOrEmptySchema=Qwe;function rY(e,t){let{gen:r,data:n}=e,o={gen:r,keyword:"false schema",data:n,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,Kwe.reportError)(o,Zwe,void 0,t)}});var g9=L(s0=>{"use strict";Object.defineProperty(s0,"__esModule",{value:!0});s0.getRules=s0.isJSONType=void 0;var Xwe=["string","number","integer","boolean","null","object","array"],Ywe=new Set(Xwe);function eke(e){return typeof e=="string"&&Ywe.has(e)}s0.isJSONType=eke;function tke(){let e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}s0.getRules=tke});var S9=L(Vf=>{"use strict";Object.defineProperty(Vf,"__esModule",{value:!0});Vf.shouldUseRule=Vf.shouldUseGroup=Vf.schemaHasRulesForType=void 0;function rke({schema:e,self:t},r){let n=t.RULES.types[r];return n&&n!==!0&&oY(e,n)}Vf.schemaHasRulesForType=rke;function oY(e,t){return t.rules.some(r=>iY(e,r))}Vf.shouldUseGroup=oY;function iY(e,t){var r;return e[t.keyword]!==void 0||((r=t.definition.implements)===null||r===void 0?void 0:r.some(n=>e[n]!==void 0))}Vf.shouldUseRule=iY});var kx=L(es=>{"use strict";Object.defineProperty(es,"__esModule",{value:!0});es.reportTypeError=es.checkDataTypes=es.checkDataType=es.coerceAndCheckDataType=es.getJSONTypes=es.getSchemaTypes=es.DataType=void 0;var nke=g9(),oke=S9(),ike=wx(),Ur=kr(),aY=un(),c0;(function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"})(c0||(es.DataType=c0={}));function ake(e){let t=sY(e.type);if(t.includes("null")){if(e.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!t.length&&e.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');e.nullable===!0&&t.push("null")}return t}es.getSchemaTypes=ake;function sY(e){let t=Array.isArray(e)?e:e?[e]:[];if(t.every(nke.isJSONType))return t;throw new Error("type must be JSONType or JSONType[]: "+t.join(","))}es.getJSONTypes=sY;function ske(e,t){let{gen:r,data:n,opts:o}=e,i=cke(t,o.coerceTypes),a=t.length>0&&!(i.length===0&&t.length===1&&(0,oke.schemaHasRulesForType)(e,t[0]));if(a){let s=b9(t,n,o.strictNumbers,c0.Wrong);r.if(s,()=>{i.length?lke(e,t,i):x9(e)})}return a}es.coerceAndCheckDataType=ske;var cY=new Set(["string","number","integer","boolean","null"]);function cke(e,t){return t?e.filter(r=>cY.has(r)||t==="array"&&r==="array"):[]}function lke(e,t,r){let{gen:n,data:o,opts:i}=e,a=n.let("dataType",(0,Ur._)`typeof ${o}`),s=n.let("coerced",(0,Ur._)`undefined`);i.coerceTypes==="array"&&n.if((0,Ur._)`${a} == 'object' && Array.isArray(${o}) && ${o}.length == 1`,()=>n.assign(o,(0,Ur._)`${o}[0]`).assign(a,(0,Ur._)`typeof ${o}`).if(b9(t,o,i.strictNumbers),()=>n.assign(s,o))),n.if((0,Ur._)`${s} !== undefined`);for(let p of r)(cY.has(p)||p==="array"&&i.coerceTypes==="array")&&c(p);n.else(),x9(e),n.endIf(),n.if((0,Ur._)`${s} !== undefined`,()=>{n.assign(o,s),uke(e,s)});function c(p){switch(p){case"string":n.elseIf((0,Ur._)`${a} == "number" || ${a} == "boolean"`).assign(s,(0,Ur._)`"" + ${o}`).elseIf((0,Ur._)`${o} === null`).assign(s,(0,Ur._)`""`);return;case"number":n.elseIf((0,Ur._)`${a} == "boolean" || ${o} === null + || (${a} == "string" && ${o} && ${o} == +${o})`).assign(s,(0,Ur._)`+${o}`);return;case"integer":n.elseIf((0,Ur._)`${a} === "boolean" || ${o} === null + || (${a} === "string" && ${o} && ${o} == +${o} && !(${o} % 1))`).assign(s,(0,Ur._)`+${o}`);return;case"boolean":n.elseIf((0,Ur._)`${o} === "false" || ${o} === 0 || ${o} === null`).assign(s,!1).elseIf((0,Ur._)`${o} === "true" || ${o} === 1`).assign(s,!0);return;case"null":n.elseIf((0,Ur._)`${o} === "" || ${o} === 0 || ${o} === false`),n.assign(s,null);return;case"array":n.elseIf((0,Ur._)`${a} === "string" || ${a} === "number" + || ${a} === "boolean" || ${o} === null`).assign(s,(0,Ur._)`[${o}]`)}}}function uke({gen:e,parentData:t,parentDataProperty:r},n){e.if((0,Ur._)`${t} !== undefined`,()=>e.assign((0,Ur._)`${t}[${r}]`,n))}function v9(e,t,r,n=c0.Correct){let o=n===c0.Correct?Ur.operators.EQ:Ur.operators.NEQ,i;switch(e){case"null":return(0,Ur._)`${t} ${o} null`;case"array":i=(0,Ur._)`Array.isArray(${t})`;break;case"object":i=(0,Ur._)`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":i=a((0,Ur._)`!(${t} % 1) && !isNaN(${t})`);break;case"number":i=a();break;default:return(0,Ur._)`typeof ${t} ${o} ${e}`}return n===c0.Correct?i:(0,Ur.not)(i);function a(s=Ur.nil){return(0,Ur.and)((0,Ur._)`typeof ${t} == "number"`,s,r?(0,Ur._)`isFinite(${t})`:Ur.nil)}}es.checkDataType=v9;function b9(e,t,r,n){if(e.length===1)return v9(e[0],t,r,n);let o,i=(0,aY.toHash)(e);if(i.array&&i.object){let a=(0,Ur._)`typeof ${t} != "object"`;o=i.null?a:(0,Ur._)`!${t} || ${a}`,delete i.null,delete i.array,delete i.object}else o=Ur.nil;i.number&&delete i.integer;for(let a in i)o=(0,Ur.and)(o,v9(a,t,r,n));return o}es.checkDataTypes=b9;var pke={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>typeof e=="string"?(0,Ur._)`{type: ${e}}`:(0,Ur._)`{type: ${t}}`};function x9(e){let t=dke(e);(0,ike.reportError)(t,pke)}es.reportTypeError=x9;function dke(e){let{gen:t,data:r,schema:n}=e,o=(0,aY.schemaRefOrVal)(e,n,"type");return{gen:t,keyword:"type",data:r,schema:n.type,schemaCode:o,schemaValue:o,parentSchema:n,params:{},it:e}}});var uY=L(yC=>{"use strict";Object.defineProperty(yC,"__esModule",{value:!0});yC.assignDefaults=void 0;var l0=kr(),_ke=un();function fke(e,t){let{properties:r,items:n}=e.schema;if(t==="object"&&r)for(let o in r)lY(e,o,r[o].default);else t==="array"&&Array.isArray(n)&&n.forEach((o,i)=>lY(e,i,o.default))}yC.assignDefaults=fke;function lY(e,t,r){let{gen:n,compositeRule:o,data:i,opts:a}=e;if(r===void 0)return;let s=(0,l0._)`${i}${(0,l0.getProperty)(t)}`;if(o){(0,_ke.checkStrictMode)(e,`default is ignored for: ${s}`);return}let c=(0,l0._)`${s} === undefined`;a.useDefaults==="empty"&&(c=(0,l0._)`${c} || ${s} === null || ${s} === ""`),n.if(c,(0,l0._)`${s} = ${(0,l0.stringify)(r)}`)}});var yl=L(ho=>{"use strict";Object.defineProperty(ho,"__esModule",{value:!0});ho.validateUnion=ho.validateArray=ho.usePattern=ho.callValidateCode=ho.schemaProperties=ho.allSchemaProperties=ho.noPropertyInData=ho.propertyInData=ho.isOwnProperty=ho.hasPropFunc=ho.reportMissingProp=ho.checkMissingProp=ho.checkReportMissingProp=void 0;var Jo=kr(),E9=un(),Kf=hl(),mke=un();function hke(e,t){let{gen:r,data:n,it:o}=e;r.if(D9(r,n,t,o.opts.ownProperties),()=>{e.setParams({missingProperty:(0,Jo._)`${t}`},!0),e.error()})}ho.checkReportMissingProp=hke;function yke({gen:e,data:t,it:{opts:r}},n,o){return(0,Jo.or)(...n.map(i=>(0,Jo.and)(D9(e,t,i,r.ownProperties),(0,Jo._)`${o} = ${i}`)))}ho.checkMissingProp=yke;function gke(e,t){e.setParams({missingProperty:t},!0),e.error()}ho.reportMissingProp=gke;function pY(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,Jo._)`Object.prototype.hasOwnProperty`})}ho.hasPropFunc=pY;function T9(e,t,r){return(0,Jo._)`${pY(e)}.call(${t}, ${r})`}ho.isOwnProperty=T9;function Ske(e,t,r,n){let o=(0,Jo._)`${t}${(0,Jo.getProperty)(r)} !== undefined`;return n?(0,Jo._)`${o} && ${T9(e,t,r)}`:o}ho.propertyInData=Ske;function D9(e,t,r,n){let o=(0,Jo._)`${t}${(0,Jo.getProperty)(r)} === undefined`;return n?(0,Jo.or)(o,(0,Jo.not)(T9(e,t,r))):o}ho.noPropertyInData=D9;function dY(e){return e?Object.keys(e).filter(t=>t!=="__proto__"):[]}ho.allSchemaProperties=dY;function vke(e,t){return dY(t).filter(r=>!(0,E9.alwaysValidSchema)(e,t[r]))}ho.schemaProperties=vke;function bke({schemaCode:e,data:t,it:{gen:r,topSchemaRef:n,schemaPath:o,errorPath:i},it:a},s,c,p){let d=p?(0,Jo._)`${e}, ${t}, ${n}${o}`:t,f=[[Kf.default.instancePath,(0,Jo.strConcat)(Kf.default.instancePath,i)],[Kf.default.parentData,a.parentData],[Kf.default.parentDataProperty,a.parentDataProperty],[Kf.default.rootData,Kf.default.rootData]];a.opts.dynamicRef&&f.push([Kf.default.dynamicAnchors,Kf.default.dynamicAnchors]);let m=(0,Jo._)`${d}, ${r.object(...f)}`;return c!==Jo.nil?(0,Jo._)`${s}.call(${c}, ${m})`:(0,Jo._)`${s}(${m})`}ho.callValidateCode=bke;var xke=(0,Jo._)`new RegExp`;function Eke({gen:e,it:{opts:t}},r){let n=t.unicodeRegExp?"u":"",{regExp:o}=t.code,i=o(r,n);return e.scopeValue("pattern",{key:i.toString(),ref:i,code:(0,Jo._)`${o.code==="new RegExp"?xke:(0,mke.useFunc)(e,o)}(${r}, ${n})`})}ho.usePattern=Eke;function Tke(e){let{gen:t,data:r,keyword:n,it:o}=e,i=t.name("valid");if(o.allErrors){let s=t.let("valid",!0);return a(()=>t.assign(s,!1)),s}return t.var(i,!0),a(()=>t.break()),i;function a(s){let c=t.const("len",(0,Jo._)`${r}.length`);t.forRange("i",0,c,p=>{e.subschema({keyword:n,dataProp:p,dataPropType:E9.Type.Num},i),t.if((0,Jo.not)(i),s)})}}ho.validateArray=Tke;function Dke(e){let{gen:t,schema:r,keyword:n,it:o}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some(c=>(0,E9.alwaysValidSchema)(o,c))&&!o.opts.unevaluated)return;let a=t.let("valid",!1),s=t.name("_valid");t.block(()=>r.forEach((c,p)=>{let d=e.subschema({keyword:n,schemaProp:p,compositeRule:!0},s);t.assign(a,(0,Jo._)`${a} || ${s}`),e.mergeValidEvaluated(d,s)||t.if((0,Jo.not)(a))})),e.result(a,()=>e.reset(),()=>e.error(!0))}ho.validateUnion=Dke});var mY=L(yp=>{"use strict";Object.defineProperty(yp,"__esModule",{value:!0});yp.validateKeywordUsage=yp.validSchemaType=yp.funcKeywordCode=yp.macroKeywordCode=void 0;var vs=kr(),Py=hl(),Ake=yl(),Ike=wx();function wke(e,t){let{gen:r,keyword:n,schema:o,parentSchema:i,it:a}=e,s=t.macro.call(a.self,o,i,a),c=fY(r,n,s);a.opts.validateSchema!==!1&&a.self.validateSchema(s,!0);let p=r.name("valid");e.subschema({schema:s,schemaPath:vs.nil,errSchemaPath:`${a.errSchemaPath}/${n}`,topSchemaRef:c,compositeRule:!0},p),e.pass(p,()=>e.error(!0))}yp.macroKeywordCode=wke;function kke(e,t){var r;let{gen:n,keyword:o,schema:i,parentSchema:a,$data:s,it:c}=e;Pke(c,t);let p=!s&&t.compile?t.compile.call(c.self,i,a,c):t.validate,d=fY(n,o,p),f=n.let("valid");e.block$data(f,m),e.ok((r=t.valid)!==null&&r!==void 0?r:f);function m(){if(t.errors===!1)S(),t.modifying&&_Y(e),b(()=>e.error());else{let E=t.async?y():g();t.modifying&&_Y(e),b(()=>Cke(e,E))}}function y(){let E=n.let("ruleErrs",null);return n.try(()=>S((0,vs._)`await `),I=>n.assign(f,!1).if((0,vs._)`${I} instanceof ${c.ValidationError}`,()=>n.assign(E,(0,vs._)`${I}.errors`),()=>n.throw(I))),E}function g(){let E=(0,vs._)`${d}.errors`;return n.assign(E,null),S(vs.nil),E}function S(E=t.async?(0,vs._)`await `:vs.nil){let I=c.opts.passContext?Py.default.this:Py.default.self,T=!("compile"in t&&!s||t.schema===!1);n.assign(f,(0,vs._)`${E}${(0,Ake.callValidateCode)(e,d,I,T)}`,t.modifying)}function b(E){var I;n.if((0,vs.not)((I=t.valid)!==null&&I!==void 0?I:f),E)}}yp.funcKeywordCode=kke;function _Y(e){let{gen:t,data:r,it:n}=e;t.if(n.parentData,()=>t.assign(r,(0,vs._)`${n.parentData}[${n.parentDataProperty}]`))}function Cke(e,t){let{gen:r}=e;r.if((0,vs._)`Array.isArray(${t})`,()=>{r.assign(Py.default.vErrors,(0,vs._)`${Py.default.vErrors} === null ? ${t} : ${Py.default.vErrors}.concat(${t})`).assign(Py.default.errors,(0,vs._)`${Py.default.vErrors}.length`),(0,Ike.extendErrors)(e)},()=>e.error())}function Pke({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}function fY(e,t,r){if(r===void 0)throw new Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword",typeof r=="function"?{ref:r}:{ref:r,code:(0,vs.stringify)(r)})}function Oke(e,t,r=!1){return!t.length||t.some(n=>n==="array"?Array.isArray(e):n==="object"?e&&typeof e=="object"&&!Array.isArray(e):typeof e==n||r&&typeof e>"u")}yp.validSchemaType=Oke;function Nke({schema:e,opts:t,self:r,errSchemaPath:n},o,i){if(Array.isArray(o.keyword)?!o.keyword.includes(i):o.keyword!==i)throw new Error("ajv implementation error");let a=o.dependencies;if(a?.some(s=>!Object.prototype.hasOwnProperty.call(e,s)))throw new Error(`parent schema must have dependencies of ${i}: ${a.join(",")}`);if(o.validateSchema&&!o.validateSchema(e[i])){let c=`keyword "${i}" value is invalid at path "${n}": `+r.errorsText(o.validateSchema.errors);if(t.validateSchema==="log")r.logger.error(c);else throw new Error(c)}}yp.validateKeywordUsage=Nke});var yY=L(Gf=>{"use strict";Object.defineProperty(Gf,"__esModule",{value:!0});Gf.extendSubschemaMode=Gf.extendSubschemaData=Gf.getSubschema=void 0;var gp=kr(),hY=un();function Fke(e,{keyword:t,schemaProp:r,schema:n,schemaPath:o,errSchemaPath:i,topSchemaRef:a}){if(t!==void 0&&n!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(t!==void 0){let s=e.schema[t];return r===void 0?{schema:s,schemaPath:(0,gp._)`${e.schemaPath}${(0,gp.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:s[r],schemaPath:(0,gp._)`${e.schemaPath}${(0,gp.getProperty)(t)}${(0,gp.getProperty)(r)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0,hY.escapeFragment)(r)}`}}if(n!==void 0){if(o===void 0||i===void 0||a===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:n,schemaPath:o,topSchemaRef:a,errSchemaPath:i}}throw new Error('either "keyword" or "schema" must be passed')}Gf.getSubschema=Fke;function Rke(e,t,{dataProp:r,dataPropType:n,data:o,dataTypes:i,propertyName:a}){if(o!==void 0&&r!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');let{gen:s}=t;if(r!==void 0){let{errorPath:p,dataPathArr:d,opts:f}=t,m=s.let("data",(0,gp._)`${t.data}${(0,gp.getProperty)(r)}`,!0);c(m),e.errorPath=(0,gp.str)`${p}${(0,hY.getErrorPath)(r,n,f.jsPropertySyntax)}`,e.parentDataProperty=(0,gp._)`${r}`,e.dataPathArr=[...d,e.parentDataProperty]}if(o!==void 0){let p=o instanceof gp.Name?o:s.let("data",o,!0);c(p),a!==void 0&&(e.propertyName=a)}i&&(e.dataTypes=i);function c(p){e.data=p,e.dataLevel=t.dataLevel+1,e.dataTypes=[],t.definedProperties=new Set,e.parentData=t.data,e.dataNames=[...t.dataNames,p]}}Gf.extendSubschemaData=Rke;function Lke(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:n,createErrors:o,allErrors:i}){n!==void 0&&(e.compositeRule=n),o!==void 0&&(e.createErrors=o),i!==void 0&&(e.allErrors=i),e.jtdDiscriminator=t,e.jtdMetadata=r}Gf.extendSubschemaMode=Lke});var A9=L((VIt,gY)=>{"use strict";gY.exports=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var n,o,i;if(Array.isArray(t)){if(n=t.length,n!=r.length)return!1;for(o=n;o--!==0;)if(!e(t[o],r[o]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(i=Object.keys(t),n=i.length,n!==Object.keys(r).length)return!1;for(o=n;o--!==0;)if(!Object.prototype.hasOwnProperty.call(r,i[o]))return!1;for(o=n;o--!==0;){var a=i[o];if(!e(t[a],r[a]))return!1}return!0}return t!==t&&r!==r}});var vY=L((KIt,SY)=>{"use strict";var Hf=SY.exports=function(e,t,r){typeof t=="function"&&(r=t,t={}),r=t.cb||r;var n=typeof r=="function"?r:r.pre||function(){},o=r.post||function(){};gC(t,n,o,e,"",e)};Hf.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};Hf.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};Hf.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};Hf.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function gC(e,t,r,n,o,i,a,s,c,p){if(n&&typeof n=="object"&&!Array.isArray(n)){t(n,o,i,a,s,c,p);for(var d in n){var f=n[d];if(Array.isArray(f)){if(d in Hf.arrayKeywords)for(var m=0;m{"use strict";Object.defineProperty(Gs,"__esModule",{value:!0});Gs.getSchemaRefs=Gs.resolveUrl=Gs.normalizeId=Gs._getFullPath=Gs.getFullPath=Gs.inlineRef=void 0;var Mke=un(),jke=A9(),Bke=vY(),qke=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function Uke(e,t=!0){return typeof e=="boolean"?!0:t===!0?!I9(e):t?bY(e)<=t:!1}Gs.inlineRef=Uke;var zke=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function I9(e){for(let t in e){if(zke.has(t))return!0;let r=e[t];if(Array.isArray(r)&&r.some(I9)||typeof r=="object"&&I9(r))return!0}return!1}function bY(e){let t=0;for(let r in e){if(r==="$ref")return 1/0;if(t++,!qke.has(r)&&(typeof e[r]=="object"&&(0,Mke.eachItem)(e[r],n=>t+=bY(n)),t===1/0))return 1/0}return t}function xY(e,t="",r){r!==!1&&(t=u0(t));let n=e.parse(t);return EY(e,n)}Gs.getFullPath=xY;function EY(e,t){return e.serialize(t).split("#")[0]+"#"}Gs._getFullPath=EY;var Jke=/#\/?$/;function u0(e){return e?e.replace(Jke,""):""}Gs.normalizeId=u0;function Vke(e,t,r){return r=u0(r),e.resolve(t,r)}Gs.resolveUrl=Vke;var Kke=/^[a-z_][-a-z0-9._]*$/i;function Gke(e,t){if(typeof e=="boolean")return{};let{schemaId:r,uriResolver:n}=this.opts,o=u0(e[r]||t),i={"":o},a=xY(n,o,!1),s={},c=new Set;return Bke(e,{allKeys:!0},(f,m,y,g)=>{if(g===void 0)return;let S=a+m,b=i[g];typeof f[r]=="string"&&(b=E.call(this,f[r])),I.call(this,f.$anchor),I.call(this,f.$dynamicAnchor),i[m]=b;function E(T){let k=this.opts.uriResolver.resolve;if(T=u0(b?k(b,T):T),c.has(T))throw d(T);c.add(T);let F=this.refs[T];return typeof F=="string"&&(F=this.refs[F]),typeof F=="object"?p(f,F.schema,T):T!==u0(S)&&(T[0]==="#"?(p(f,s[T],T),s[T]=f):this.refs[T]=S),T}function I(T){if(typeof T=="string"){if(!Kke.test(T))throw new Error(`invalid anchor "${T}"`);E.call(this,`#${T}`)}}}),s;function p(f,m,y){if(m!==void 0&&!jke(f,m))throw d(y)}function d(f){return new Error(`reference "${f}" resolves to more than one schema`)}}Gs.getSchemaRefs=Gke});var p0=L(Zf=>{"use strict";Object.defineProperty(Zf,"__esModule",{value:!0});Zf.getData=Zf.KeywordCxt=Zf.validateFunctionCode=void 0;var wY=nY(),TY=kx(),k9=S9(),SC=kx(),Hke=uY(),Ox=mY(),w9=yY(),Zt=kr(),Ar=hl(),Zke=Cx(),Yd=un(),Px=wx();function Wke(e){if(PY(e)&&(OY(e),CY(e))){Yke(e);return}kY(e,()=>(0,wY.topBoolOrEmptySchema)(e))}Zf.validateFunctionCode=Wke;function kY({gen:e,validateName:t,schema:r,schemaEnv:n,opts:o},i){o.code.es5?e.func(t,(0,Zt._)`${Ar.default.data}, ${Ar.default.valCxt}`,n.$async,()=>{e.code((0,Zt._)`"use strict"; ${DY(r,o)}`),Xke(e,o),e.code(i)}):e.func(t,(0,Zt._)`${Ar.default.data}, ${Qke(o)}`,n.$async,()=>e.code(DY(r,o)).code(i))}function Qke(e){return(0,Zt._)`{${Ar.default.instancePath}="", ${Ar.default.parentData}, ${Ar.default.parentDataProperty}, ${Ar.default.rootData}=${Ar.default.data}${e.dynamicRef?(0,Zt._)`, ${Ar.default.dynamicAnchors}={}`:Zt.nil}}={}`}function Xke(e,t){e.if(Ar.default.valCxt,()=>{e.var(Ar.default.instancePath,(0,Zt._)`${Ar.default.valCxt}.${Ar.default.instancePath}`),e.var(Ar.default.parentData,(0,Zt._)`${Ar.default.valCxt}.${Ar.default.parentData}`),e.var(Ar.default.parentDataProperty,(0,Zt._)`${Ar.default.valCxt}.${Ar.default.parentDataProperty}`),e.var(Ar.default.rootData,(0,Zt._)`${Ar.default.valCxt}.${Ar.default.rootData}`),t.dynamicRef&&e.var(Ar.default.dynamicAnchors,(0,Zt._)`${Ar.default.valCxt}.${Ar.default.dynamicAnchors}`)},()=>{e.var(Ar.default.instancePath,(0,Zt._)`""`),e.var(Ar.default.parentData,(0,Zt._)`undefined`),e.var(Ar.default.parentDataProperty,(0,Zt._)`undefined`),e.var(Ar.default.rootData,Ar.default.data),t.dynamicRef&&e.var(Ar.default.dynamicAnchors,(0,Zt._)`{}`)})}function Yke(e){let{schema:t,opts:r,gen:n}=e;kY(e,()=>{r.$comment&&t.$comment&&FY(e),oCe(e),n.let(Ar.default.vErrors,null),n.let(Ar.default.errors,0),r.unevaluated&&eCe(e),NY(e),sCe(e)})}function eCe(e){let{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",(0,Zt._)`${r}.evaluated`),t.if((0,Zt._)`${e.evaluated}.dynamicProps`,()=>t.assign((0,Zt._)`${e.evaluated}.props`,(0,Zt._)`undefined`)),t.if((0,Zt._)`${e.evaluated}.dynamicItems`,()=>t.assign((0,Zt._)`${e.evaluated}.items`,(0,Zt._)`undefined`))}function DY(e,t){let r=typeof e=="object"&&e[t.schemaId];return r&&(t.code.source||t.code.process)?(0,Zt._)`/*# sourceURL=${r} */`:Zt.nil}function tCe(e,t){if(PY(e)&&(OY(e),CY(e))){rCe(e,t);return}(0,wY.boolOrEmptySchema)(e,t)}function CY({schema:e,self:t}){if(typeof e=="boolean")return!e;for(let r in e)if(t.RULES.all[r])return!0;return!1}function PY(e){return typeof e.schema!="boolean"}function rCe(e,t){let{schema:r,gen:n,opts:o}=e;o.$comment&&r.$comment&&FY(e),iCe(e),aCe(e);let i=n.const("_errs",Ar.default.errors);NY(e,i),n.var(t,(0,Zt._)`${i} === ${Ar.default.errors}`)}function OY(e){(0,Yd.checkUnknownRules)(e),nCe(e)}function NY(e,t){if(e.opts.jtd)return AY(e,[],!1,t);let r=(0,TY.getSchemaTypes)(e.schema),n=(0,TY.coerceAndCheckDataType)(e,r);AY(e,r,!n,t)}function nCe(e){let{schema:t,errSchemaPath:r,opts:n,self:o}=e;t.$ref&&n.ignoreKeywordsWithRef&&(0,Yd.schemaHasRulesButRef)(t,o.RULES)&&o.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}function oCe(e){let{schema:t,opts:r}=e;t.default!==void 0&&r.useDefaults&&r.strictSchema&&(0,Yd.checkStrictMode)(e,"default is ignored in the schema root")}function iCe(e){let t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,Zke.resolveUrl)(e.opts.uriResolver,e.baseId,t))}function aCe(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}function FY({gen:e,schemaEnv:t,schema:r,errSchemaPath:n,opts:o}){let i=r.$comment;if(o.$comment===!0)e.code((0,Zt._)`${Ar.default.self}.logger.log(${i})`);else if(typeof o.$comment=="function"){let a=(0,Zt.str)`${n}/$comment`,s=e.scopeValue("root",{ref:t.root});e.code((0,Zt._)`${Ar.default.self}.opts.$comment(${i}, ${a}, ${s}.schema)`)}}function sCe(e){let{gen:t,schemaEnv:r,validateName:n,ValidationError:o,opts:i}=e;r.$async?t.if((0,Zt._)`${Ar.default.errors} === 0`,()=>t.return(Ar.default.data),()=>t.throw((0,Zt._)`new ${o}(${Ar.default.vErrors})`)):(t.assign((0,Zt._)`${n}.errors`,Ar.default.vErrors),i.unevaluated&&cCe(e),t.return((0,Zt._)`${Ar.default.errors} === 0`))}function cCe({gen:e,evaluated:t,props:r,items:n}){r instanceof Zt.Name&&e.assign((0,Zt._)`${t}.props`,r),n instanceof Zt.Name&&e.assign((0,Zt._)`${t}.items`,n)}function AY(e,t,r,n){let{gen:o,schema:i,data:a,allErrors:s,opts:c,self:p}=e,{RULES:d}=p;if(i.$ref&&(c.ignoreKeywordsWithRef||!(0,Yd.schemaHasRulesButRef)(i,d))){o.block(()=>LY(e,"$ref",d.all.$ref.definition));return}c.jtd||lCe(e,t),o.block(()=>{for(let m of d.rules)f(m);f(d.post)});function f(m){(0,k9.shouldUseGroup)(i,m)&&(m.type?(o.if((0,SC.checkDataType)(m.type,a,c.strictNumbers)),IY(e,m),t.length===1&&t[0]===m.type&&r&&(o.else(),(0,SC.reportTypeError)(e)),o.endIf()):IY(e,m),s||o.if((0,Zt._)`${Ar.default.errors} === ${n||0}`))}}function IY(e,t){let{gen:r,schema:n,opts:{useDefaults:o}}=e;o&&(0,Hke.assignDefaults)(e,t.type),r.block(()=>{for(let i of t.rules)(0,k9.shouldUseRule)(n,i)&&LY(e,i.keyword,i.definition,t.type)})}function lCe(e,t){e.schemaEnv.meta||!e.opts.strictTypes||(uCe(e,t),e.opts.allowUnionTypes||pCe(e,t),dCe(e,e.dataTypes))}function uCe(e,t){if(t.length){if(!e.dataTypes.length){e.dataTypes=t;return}t.forEach(r=>{RY(e.dataTypes,r)||C9(e,`type "${r}" not allowed by context "${e.dataTypes.join(",")}"`)}),fCe(e,t)}}function pCe(e,t){t.length>1&&!(t.length===2&&t.includes("null"))&&C9(e,"use allowUnionTypes to allow union type keyword")}function dCe(e,t){let r=e.self.RULES.all;for(let n in r){let o=r[n];if(typeof o=="object"&&(0,k9.shouldUseRule)(e.schema,o)){let{type:i}=o.definition;i.length&&!i.some(a=>_Ce(t,a))&&C9(e,`missing type "${i.join(",")}" for keyword "${n}"`)}}}function _Ce(e,t){return e.includes(t)||t==="number"&&e.includes("integer")}function RY(e,t){return e.includes(t)||t==="integer"&&e.includes("number")}function fCe(e,t){let r=[];for(let n of e.dataTypes)RY(t,n)?r.push(n):t.includes("integer")&&n==="number"&&r.push("integer");e.dataTypes=r}function C9(e,t){let r=e.schemaEnv.baseId+e.errSchemaPath;t+=` at "${r}" (strictTypes)`,(0,Yd.checkStrictMode)(e,t,e.opts.strictTypes)}var vC=class{constructor(t,r,n){if((0,Ox.validateKeywordUsage)(t,r,n),this.gen=t.gen,this.allErrors=t.allErrors,this.keyword=n,this.data=t.data,this.schema=t.schema[n],this.$data=r.$data&&t.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,Yd.schemaRefOrVal)(t,this.schema,n,this.$data),this.schemaType=r.schemaType,this.parentSchema=t.schema,this.params={},this.it=t,this.def=r,this.$data)this.schemaCode=t.gen.const("vSchema",$Y(this.$data,t));else if(this.schemaCode=this.schemaValue,!(0,Ox.validSchemaType)(this.schema,r.schemaType,r.allowUndefined))throw new Error(`${n} value must be ${JSON.stringify(r.schemaType)}`);("code"in r?r.trackErrors:r.errors!==!1)&&(this.errsCount=t.gen.const("_errs",Ar.default.errors))}result(t,r,n){this.failResult((0,Zt.not)(t),r,n)}failResult(t,r,n){this.gen.if(t),n?n():this.error(),r?(this.gen.else(),r(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(t,r){this.failResult((0,Zt.not)(t),void 0,r)}fail(t){if(t===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(t),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(t){if(!this.$data)return this.fail(t);let{schemaCode:r}=this;this.fail((0,Zt._)`${r} !== undefined && (${(0,Zt.or)(this.invalid$data(),t)})`)}error(t,r,n){if(r){this.setParams(r),this._error(t,n),this.setParams({});return}this._error(t,n)}_error(t,r){(t?Px.reportExtraError:Px.reportError)(this,this.def.error,r)}$dataError(){(0,Px.reportError)(this,this.def.$dataError||Px.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,Px.resetErrorsCount)(this.gen,this.errsCount)}ok(t){this.allErrors||this.gen.if(t)}setParams(t,r){r?Object.assign(this.params,t):this.params=t}block$data(t,r,n=Zt.nil){this.gen.block(()=>{this.check$data(t,n),r()})}check$data(t=Zt.nil,r=Zt.nil){if(!this.$data)return;let{gen:n,schemaCode:o,schemaType:i,def:a}=this;n.if((0,Zt.or)((0,Zt._)`${o} === undefined`,r)),t!==Zt.nil&&n.assign(t,!0),(i.length||a.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),t!==Zt.nil&&n.assign(t,!1)),n.else()}invalid$data(){let{gen:t,schemaCode:r,schemaType:n,def:o,it:i}=this;return(0,Zt.or)(a(),s());function a(){if(n.length){if(!(r instanceof Zt.Name))throw new Error("ajv implementation error");let c=Array.isArray(n)?n:[n];return(0,Zt._)`${(0,SC.checkDataTypes)(c,r,i.opts.strictNumbers,SC.DataType.Wrong)}`}return Zt.nil}function s(){if(o.validateSchema){let c=t.scopeValue("validate$data",{ref:o.validateSchema});return(0,Zt._)`!${c}(${r})`}return Zt.nil}}subschema(t,r){let n=(0,w9.getSubschema)(this.it,t);(0,w9.extendSubschemaData)(n,this.it,t),(0,w9.extendSubschemaMode)(n,t);let o={...this.it,...n,items:void 0,props:void 0};return tCe(o,r),o}mergeEvaluated(t,r){let{it:n,gen:o}=this;n.opts.unevaluated&&(n.props!==!0&&t.props!==void 0&&(n.props=Yd.mergeEvaluated.props(o,t.props,n.props,r)),n.items!==!0&&t.items!==void 0&&(n.items=Yd.mergeEvaluated.items(o,t.items,n.items,r)))}mergeValidEvaluated(t,r){let{it:n,gen:o}=this;if(n.opts.unevaluated&&(n.props!==!0||n.items!==!0))return o.if(r,()=>this.mergeEvaluated(t,Zt.Name)),!0}};Zf.KeywordCxt=vC;function LY(e,t,r,n){let o=new vC(e,r,t);"code"in r?r.code(o,n):o.$data&&r.validate?(0,Ox.funcKeywordCode)(o,r):"macro"in r?(0,Ox.macroKeywordCode)(o,r):(r.compile||r.validate)&&(0,Ox.funcKeywordCode)(o,r)}var mCe=/^\/(?:[^~]|~0|~1)*$/,hCe=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function $Y(e,{dataLevel:t,dataNames:r,dataPathArr:n}){let o,i;if(e==="")return Ar.default.rootData;if(e[0]==="/"){if(!mCe.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);o=e,i=Ar.default.rootData}else{let p=hCe.exec(e);if(!p)throw new Error(`Invalid JSON-pointer: ${e}`);let d=+p[1];if(o=p[2],o==="#"){if(d>=t)throw new Error(c("property/index",d));return n[t-d]}if(d>t)throw new Error(c("data",d));if(i=r[t-d],!o)return i}let a=i,s=o.split("/");for(let p of s)p&&(i=(0,Zt._)`${i}${(0,Zt.getProperty)((0,Yd.unescapeJsonPointer)(p))}`,a=(0,Zt._)`${a} && ${i}`);return a;function c(p,d){return`Cannot access ${p} ${d} levels up, current level is ${t}`}}Zf.getData=$Y});var Nx=L(O9=>{"use strict";Object.defineProperty(O9,"__esModule",{value:!0});var P9=class extends Error{constructor(t){super("validation failed"),this.errors=t,this.ajv=this.validation=!0}};O9.default=P9});var d0=L(R9=>{"use strict";Object.defineProperty(R9,"__esModule",{value:!0});var N9=Cx(),F9=class extends Error{constructor(t,r,n,o){super(o||`can't resolve reference ${n} from id ${r}`),this.missingRef=(0,N9.resolveUrl)(t,r,n),this.missingSchema=(0,N9.normalizeId)((0,N9.getFullPath)(t,this.missingRef))}};R9.default=F9});var Fx=L(gl=>{"use strict";Object.defineProperty(gl,"__esModule",{value:!0});gl.resolveSchema=gl.getCompilingSchema=gl.resolveRef=gl.compileSchema=gl.SchemaEnv=void 0;var fu=kr(),yCe=Nx(),Oy=hl(),mu=Cx(),MY=un(),gCe=p0(),_0=class{constructor(t){var r;this.refs={},this.dynamicAnchors={};let n;typeof t.schema=="object"&&(n=t.schema),this.schema=t.schema,this.schemaId=t.schemaId,this.root=t.root||this,this.baseId=(r=t.baseId)!==null&&r!==void 0?r:(0,mu.normalizeId)(n?.[t.schemaId||"$id"]),this.schemaPath=t.schemaPath,this.localRefs=t.localRefs,this.meta=t.meta,this.$async=n?.$async,this.refs={}}};gl.SchemaEnv=_0;function $9(e){let t=jY.call(this,e);if(t)return t;let r=(0,mu.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:n,lines:o}=this.opts.code,{ownProperties:i}=this.opts,a=new fu.CodeGen(this.scope,{es5:n,lines:o,ownProperties:i}),s;e.$async&&(s=a.scopeValue("Error",{ref:yCe.default,code:(0,fu._)`require("ajv/dist/runtime/validation_error").default`}));let c=a.scopeName("validate");e.validateName=c;let p={gen:a,allErrors:this.opts.allErrors,data:Oy.default.data,parentData:Oy.default.parentData,parentDataProperty:Oy.default.parentDataProperty,dataNames:[Oy.default.data],dataPathArr:[fu.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:a.scopeValue("schema",this.opts.code.source===!0?{ref:e.schema,code:(0,fu.stringify)(e.schema)}:{ref:e.schema}),validateName:c,ValidationError:s,schema:e.schema,schemaEnv:e,rootId:r,baseId:e.baseId||r,schemaPath:fu.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,fu._)`""`,opts:this.opts,self:this},d;try{this._compilations.add(e),(0,gCe.validateFunctionCode)(p),a.optimize(this.opts.code.optimize);let f=a.toString();d=`${a.scopeRefs(Oy.default.scope)}return ${f}`,this.opts.code.process&&(d=this.opts.code.process(d,e));let y=new Function(`${Oy.default.self}`,`${Oy.default.scope}`,d)(this,this.scope.get());if(this.scope.value(c,{ref:y}),y.errors=null,y.schema=e.schema,y.schemaEnv=e,e.$async&&(y.$async=!0),this.opts.code.source===!0&&(y.source={validateName:c,validateCode:f,scopeValues:a._values}),this.opts.unevaluated){let{props:g,items:S}=p;y.evaluated={props:g instanceof fu.Name?void 0:g,items:S instanceof fu.Name?void 0:S,dynamicProps:g instanceof fu.Name,dynamicItems:S instanceof fu.Name},y.source&&(y.source.evaluated=(0,fu.stringify)(y.evaluated))}return e.validate=y,e}catch(f){throw delete e.validate,delete e.validateName,d&&this.logger.error("Error compiling schema, function code:",d),f}finally{this._compilations.delete(e)}}gl.compileSchema=$9;function SCe(e,t,r){var n;r=(0,mu.resolveUrl)(this.opts.uriResolver,t,r);let o=e.refs[r];if(o)return o;let i=xCe.call(this,e,r);if(i===void 0){let a=(n=e.localRefs)===null||n===void 0?void 0:n[r],{schemaId:s}=this.opts;a&&(i=new _0({schema:a,schemaId:s,root:e,baseId:t}))}if(i!==void 0)return e.refs[r]=vCe.call(this,i)}gl.resolveRef=SCe;function vCe(e){return(0,mu.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:$9.call(this,e)}function jY(e){for(let t of this._compilations)if(bCe(t,e))return t}gl.getCompilingSchema=jY;function bCe(e,t){return e.schema===t.schema&&e.root===t.root&&e.baseId===t.baseId}function xCe(e,t){let r;for(;typeof(r=this.refs[t])=="string";)t=r;return r||this.schemas[t]||bC.call(this,e,t)}function bC(e,t){let r=this.opts.uriResolver.parse(t),n=(0,mu._getFullPath)(this.opts.uriResolver,r),o=(0,mu.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&n===o)return L9.call(this,r,e);let i=(0,mu.normalizeId)(n),a=this.refs[i]||this.schemas[i];if(typeof a=="string"){let s=bC.call(this,e,a);return typeof s?.schema!="object"?void 0:L9.call(this,r,s)}if(typeof a?.schema=="object"){if(a.validate||$9.call(this,a),i===(0,mu.normalizeId)(t)){let{schema:s}=a,{schemaId:c}=this.opts,p=s[c];return p&&(o=(0,mu.resolveUrl)(this.opts.uriResolver,o,p)),new _0({schema:s,schemaId:c,root:e,baseId:o})}return L9.call(this,r,a)}}gl.resolveSchema=bC;var ECe=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function L9(e,{baseId:t,schema:r,root:n}){var o;if(((o=e.fragment)===null||o===void 0?void 0:o[0])!=="/")return;for(let s of e.fragment.slice(1).split("/")){if(typeof r=="boolean")return;let c=r[(0,MY.unescapeFragment)(s)];if(c===void 0)return;r=c;let p=typeof r=="object"&&r[this.opts.schemaId];!ECe.has(s)&&p&&(t=(0,mu.resolveUrl)(this.opts.uriResolver,t,p))}let i;if(typeof r!="boolean"&&r.$ref&&!(0,MY.schemaHasRulesButRef)(r,this.RULES)){let s=(0,mu.resolveUrl)(this.opts.uriResolver,t,r.$ref);i=bC.call(this,n,s)}let{schemaId:a}=this.opts;if(i=i||new _0({schema:r,schemaId:a,root:n,baseId:t}),i.schema!==i.root.schema)return i}});var BY=L((XIt,TCe)=>{TCe.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:!1}});var j9=L((YIt,JY)=>{"use strict";var DCe=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),UY=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 M9(e){let t="",r=0,n=0;for(n=0;n=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";t+=e[n];break}for(n+=1;n=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";t+=e[n]}return t}var ACe=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function qY(e){return e.length=0,!0}function ICe(e,t,r){if(e.length){let n=M9(e);if(n!=="")t.push(n);else return r.error=!0,!1;e.length=0}return!0}function wCe(e){let t=0,r={error:!1,address:"",zone:""},n=[],o=[],i=!1,a=!1,s=ICe;for(let c=0;c7){r.error=!0;break}c>0&&e[c-1]===":"&&(i=!0),n.push(":");continue}else if(p==="%"){if(!s(o,n,r))break;s=qY}else{o.push(p);continue}}return o.length&&(s===qY?r.zone=o.join(""):a?n.push(o.join("")):n.push(M9(o))),r.address=n.join(""),r}function zY(e){if(kCe(e,":")<2)return{host:e,isIPV6:!1};let t=wCe(e);if(t.error)return{host:e,isIPV6:!1};{let r=t.address,n=t.address;return t.zone&&(r+="%"+t.zone,n+="%25"+t.zone),{host:r,isIPV6:!0,escapedHost:n}}}function kCe(e,t){let r=0;for(let n=0;n{"use strict";var{isUUID:NCe}=j9(),FCe=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,RCe=["http","https","ws","wss","urn","urn:uuid"];function LCe(e){return RCe.indexOf(e)!==-1}function B9(e){return e.secure===!0?!0:e.secure===!1?!1:e.scheme?e.scheme.length===3&&(e.scheme[0]==="w"||e.scheme[0]==="W")&&(e.scheme[1]==="s"||e.scheme[1]==="S")&&(e.scheme[2]==="s"||e.scheme[2]==="S"):!1}function VY(e){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e}function KY(e){let t=String(e.scheme).toLowerCase()==="https";return(e.port===(t?443:80)||e.port==="")&&(e.port=void 0),e.path||(e.path="/"),e}function $Ce(e){return e.secure=B9(e),e.resourceName=(e.path||"/")+(e.query?"?"+e.query:""),e.path=void 0,e.query=void 0,e}function MCe(e){if((e.port===(B9(e)?443:80)||e.port==="")&&(e.port=void 0),typeof e.secure=="boolean"&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){let[t,r]=e.resourceName.split("?");e.path=t&&t!=="/"?t:void 0,e.query=r,e.resourceName=void 0}return e.fragment=void 0,e}function jCe(e,t){if(!e.path)return e.error="URN can not be parsed",e;let r=e.path.match(FCe);if(r){let n=t.scheme||e.scheme||"urn";e.nid=r[1].toLowerCase(),e.nss=r[2];let o=`${n}:${t.nid||e.nid}`,i=q9(o);e.path=void 0,i&&(e=i.parse(e,t))}else e.error=e.error||"URN can not be parsed.";return e}function BCe(e,t){if(e.nid===void 0)throw new Error("URN without nid cannot be serialized");let r=t.scheme||e.scheme||"urn",n=e.nid.toLowerCase(),o=`${r}:${t.nid||n}`,i=q9(o);i&&(e=i.serialize(e,t));let a=e,s=e.nss;return a.path=`${n||t.nid}:${s}`,t.skipEscape=!0,a}function qCe(e,t){let r=e;return r.uuid=r.nss,r.nss=void 0,!t.tolerant&&(!r.uuid||!NCe(r.uuid))&&(r.error=r.error||"UUID is not valid."),r}function UCe(e){let t=e;return t.nss=(e.uuid||"").toLowerCase(),t}var GY={scheme:"http",domainHost:!0,parse:VY,serialize:KY},zCe={scheme:"https",domainHost:GY.domainHost,parse:VY,serialize:KY},xC={scheme:"ws",domainHost:!0,parse:$Ce,serialize:MCe},JCe={scheme:"wss",domainHost:xC.domainHost,parse:xC.parse,serialize:xC.serialize},VCe={scheme:"urn",parse:jCe,serialize:BCe,skipNormalize:!0},KCe={scheme:"urn:uuid",parse:qCe,serialize:UCe,skipNormalize:!0},EC={http:GY,https:zCe,ws:xC,wss:JCe,urn:VCe,"urn:uuid":KCe};Object.setPrototypeOf(EC,null);function q9(e){return e&&(EC[e]||EC[e.toLowerCase()])||void 0}HY.exports={wsIsSecure:B9,SCHEMES:EC,isValidSchemeName:LCe,getSchemeHandler:q9}});var XY=L((twt,DC)=>{"use strict";var{normalizeIPv6:GCe,removeDotSegments:Rx,recomposeAuthority:HCe,normalizeComponentEncoding:TC,isIPv4:ZCe,nonSimpleDomain:WCe}=j9(),{SCHEMES:QCe,getSchemeHandler:WY}=ZY();function XCe(e,t){return typeof e=="string"?e=Sp(e_(e,t),t):typeof e=="object"&&(e=e_(Sp(e,t),t)),e}function YCe(e,t,r){let n=r?Object.assign({scheme:"null"},r):{scheme:"null"},o=QY(e_(e,n),e_(t,n),n,!0);return n.skipEscape=!0,Sp(o,n)}function QY(e,t,r,n){let o={};return n||(e=e_(Sp(e,r),r),t=e_(Sp(t,r),r)),r=r||{},!r.tolerant&&t.scheme?(o.scheme=t.scheme,o.userinfo=t.userinfo,o.host=t.host,o.port=t.port,o.path=Rx(t.path||""),o.query=t.query):(t.userinfo!==void 0||t.host!==void 0||t.port!==void 0?(o.userinfo=t.userinfo,o.host=t.host,o.port=t.port,o.path=Rx(t.path||""),o.query=t.query):(t.path?(t.path[0]==="/"?o.path=Rx(t.path):((e.userinfo!==void 0||e.host!==void 0||e.port!==void 0)&&!e.path?o.path="/"+t.path:e.path?o.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:o.path=t.path,o.path=Rx(o.path)),o.query=t.query):(o.path=e.path,t.query!==void 0?o.query=t.query:o.query=e.query),o.userinfo=e.userinfo,o.host=e.host,o.port=e.port),o.scheme=e.scheme),o.fragment=t.fragment,o}function ePe(e,t,r){return typeof e=="string"?(e=unescape(e),e=Sp(TC(e_(e,r),!0),{...r,skipEscape:!0})):typeof e=="object"&&(e=Sp(TC(e,!0),{...r,skipEscape:!0})),typeof t=="string"?(t=unescape(t),t=Sp(TC(e_(t,r),!0),{...r,skipEscape:!0})):typeof t=="object"&&(t=Sp(TC(t,!0),{...r,skipEscape:!0})),e.toLowerCase()===t.toLowerCase()}function Sp(e,t){let r={host:e.host,scheme:e.scheme,userinfo:e.userinfo,port:e.port,path:e.path,query:e.query,nid:e.nid,nss:e.nss,uuid:e.uuid,fragment:e.fragment,reference:e.reference,resourceName:e.resourceName,secure:e.secure,error:""},n=Object.assign({},t),o=[],i=WY(n.scheme||r.scheme);i&&i.serialize&&i.serialize(r,n),r.path!==void 0&&(n.skipEscape?r.path=unescape(r.path):(r.path=escape(r.path),r.scheme!==void 0&&(r.path=r.path.split("%3A").join(":")))),n.reference!=="suffix"&&r.scheme&&o.push(r.scheme,":");let a=HCe(r);if(a!==void 0&&(n.reference!=="suffix"&&o.push("//"),o.push(a),r.path&&r.path[0]!=="/"&&o.push("/")),r.path!==void 0){let s=r.path;!n.absolutePath&&(!i||!i.absolutePath)&&(s=Rx(s)),a===void 0&&s[0]==="/"&&s[1]==="/"&&(s="/%2F"+s.slice(2)),o.push(s)}return r.query!==void 0&&o.push("?",r.query),r.fragment!==void 0&&o.push("#",r.fragment),o.join("")}var tPe=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function e_(e,t){let r=Object.assign({},t),n={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},o=!1;r.reference==="suffix"&&(r.scheme?e=r.scheme+":"+e:e="//"+e);let i=e.match(tPe);if(i){if(n.scheme=i[1],n.userinfo=i[3],n.host=i[4],n.port=parseInt(i[5],10),n.path=i[6]||"",n.query=i[7],n.fragment=i[8],isNaN(n.port)&&(n.port=i[5]),n.host)if(ZCe(n.host)===!1){let c=GCe(n.host);n.host=c.host.toLowerCase(),o=c.isIPV6}else o=!0;n.scheme===void 0&&n.userinfo===void 0&&n.host===void 0&&n.port===void 0&&n.query===void 0&&!n.path?n.reference="same-document":n.scheme===void 0?n.reference="relative":n.fragment===void 0?n.reference="absolute":n.reference="uri",r.reference&&r.reference!=="suffix"&&r.reference!==n.reference&&(n.error=n.error||"URI is not a "+r.reference+" reference.");let a=WY(r.scheme||n.scheme);if(!r.unicodeSupport&&(!a||!a.unicodeSupport)&&n.host&&(r.domainHost||a&&a.domainHost)&&o===!1&&WCe(n.host))try{n.host=URL.domainToASCII(n.host.toLowerCase())}catch(s){n.error=n.error||"Host's domain name can not be converted to ASCII: "+s}(!a||a&&!a.skipNormalize)&&(e.indexOf("%")!==-1&&(n.scheme!==void 0&&(n.scheme=unescape(n.scheme)),n.host!==void 0&&(n.host=unescape(n.host))),n.path&&(n.path=escape(unescape(n.path))),n.fragment&&(n.fragment=encodeURI(decodeURIComponent(n.fragment)))),a&&a.parse&&a.parse(n,r)}else n.error=n.error||"URI can not be parsed.";return n}var U9={SCHEMES:QCe,normalize:XCe,resolve:YCe,resolveComponent:QY,equal:ePe,serialize:Sp,parse:e_};DC.exports=U9;DC.exports.default=U9;DC.exports.fastUri=U9});var eee=L(z9=>{"use strict";Object.defineProperty(z9,"__esModule",{value:!0});var YY=XY();YY.code='require("ajv/dist/runtime/uri").default';z9.default=YY});var K9=L(Ea=>{"use strict";Object.defineProperty(Ea,"__esModule",{value:!0});Ea.CodeGen=Ea.Name=Ea.nil=Ea.stringify=Ea.str=Ea._=Ea.KeywordCxt=void 0;var rPe=p0();Object.defineProperty(Ea,"KeywordCxt",{enumerable:!0,get:function(){return rPe.KeywordCxt}});var f0=kr();Object.defineProperty(Ea,"_",{enumerable:!0,get:function(){return f0._}});Object.defineProperty(Ea,"str",{enumerable:!0,get:function(){return f0.str}});Object.defineProperty(Ea,"stringify",{enumerable:!0,get:function(){return f0.stringify}});Object.defineProperty(Ea,"nil",{enumerable:!0,get:function(){return f0.nil}});Object.defineProperty(Ea,"Name",{enumerable:!0,get:function(){return f0.Name}});Object.defineProperty(Ea,"CodeGen",{enumerable:!0,get:function(){return f0.CodeGen}});var nPe=Nx(),iee=d0(),oPe=g9(),Lx=Fx(),iPe=kr(),$x=Cx(),AC=kx(),V9=un(),tee=BY(),aPe=eee(),aee=(e,t)=>new RegExp(e,t);aee.code="new RegExp";var sPe=["removeAdditional","useDefaults","coerceTypes"],cPe=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),lPe={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."},uPe={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},ree=200;function pPe(e){var t,r,n,o,i,a,s,c,p,d,f,m,y,g,S,b,E,I,T,k,F,O,$,N,U;let ge=e.strict,Te=(t=e.code)===null||t===void 0?void 0:t.optimize,ke=Te===!0||Te===void 0?1:Te||0,Je=(n=(r=e.code)===null||r===void 0?void 0:r.regExp)!==null&&n!==void 0?n:aee,me=(o=e.uriResolver)!==null&&o!==void 0?o:aPe.default;return{strictSchema:(a=(i=e.strictSchema)!==null&&i!==void 0?i:ge)!==null&&a!==void 0?a:!0,strictNumbers:(c=(s=e.strictNumbers)!==null&&s!==void 0?s:ge)!==null&&c!==void 0?c:!0,strictTypes:(d=(p=e.strictTypes)!==null&&p!==void 0?p:ge)!==null&&d!==void 0?d:"log",strictTuples:(m=(f=e.strictTuples)!==null&&f!==void 0?f:ge)!==null&&m!==void 0?m:"log",strictRequired:(g=(y=e.strictRequired)!==null&&y!==void 0?y:ge)!==null&&g!==void 0?g:!1,code:e.code?{...e.code,optimize:ke,regExp:Je}:{optimize:ke,regExp:Je},loopRequired:(S=e.loopRequired)!==null&&S!==void 0?S:ree,loopEnum:(b=e.loopEnum)!==null&&b!==void 0?b:ree,meta:(E=e.meta)!==null&&E!==void 0?E:!0,messages:(I=e.messages)!==null&&I!==void 0?I:!0,inlineRefs:(T=e.inlineRefs)!==null&&T!==void 0?T:!0,schemaId:(k=e.schemaId)!==null&&k!==void 0?k:"$id",addUsedSchema:(F=e.addUsedSchema)!==null&&F!==void 0?F:!0,validateSchema:(O=e.validateSchema)!==null&&O!==void 0?O:!0,validateFormats:($=e.validateFormats)!==null&&$!==void 0?$:!0,unicodeRegExp:(N=e.unicodeRegExp)!==null&&N!==void 0?N:!0,int32range:(U=e.int32range)!==null&&U!==void 0?U:!0,uriResolver:me}}var Mx=class{constructor(t={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,t=this.opts={...t,...pPe(t)};let{es5:r,lines:n}=this.opts.code;this.scope=new iPe.ValueScope({scope:{},prefixes:cPe,es5:r,lines:n}),this.logger=yPe(t.logger);let o=t.validateFormats;t.validateFormats=!1,this.RULES=(0,oPe.getRules)(),nee.call(this,lPe,t,"NOT SUPPORTED"),nee.call(this,uPe,t,"DEPRECATED","warn"),this._metaOpts=mPe.call(this),t.formats&&_Pe.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),t.keywords&&fPe.call(this,t.keywords),typeof t.meta=="object"&&this.addMetaSchema(t.meta),dPe.call(this),t.validateFormats=o}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:t,meta:r,schemaId:n}=this.opts,o=tee;n==="id"&&(o={...tee},o.id=o.$id,delete o.$id),r&&t&&this.addMetaSchema(o,o[n],!1)}defaultMeta(){let{meta:t,schemaId:r}=this.opts;return this.opts.defaultMeta=typeof t=="object"?t[r]||t:void 0}validate(t,r){let n;if(typeof t=="string"){if(n=this.getSchema(t),!n)throw new Error(`no schema with key or ref "${t}"`)}else n=this.compile(t);let o=n(r);return"$async"in n||(this.errors=n.errors),o}compile(t,r){let n=this._addSchema(t,r);return n.validate||this._compileSchemaEnv(n)}compileAsync(t,r){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");let{loadSchema:n}=this.opts;return o.call(this,t,r);async function o(d,f){await i.call(this,d.$schema);let m=this._addSchema(d,f);return m.validate||a.call(this,m)}async function i(d){d&&!this.getSchema(d)&&await o.call(this,{$ref:d},!0)}async function a(d){try{return this._compileSchemaEnv(d)}catch(f){if(!(f instanceof iee.default))throw f;return s.call(this,f),await c.call(this,f.missingSchema),a.call(this,d)}}function s({missingSchema:d,missingRef:f}){if(this.refs[d])throw new Error(`AnySchema ${d} is loaded but ${f} cannot be resolved`)}async function c(d){let f=await p.call(this,d);this.refs[d]||await i.call(this,f.$schema),this.refs[d]||this.addSchema(f,d,r)}async function p(d){let f=this._loading[d];if(f)return f;try{return await(this._loading[d]=n(d))}finally{delete this._loading[d]}}}addSchema(t,r,n,o=this.opts.validateSchema){if(Array.isArray(t)){for(let a of t)this.addSchema(a,void 0,n,o);return this}let i;if(typeof t=="object"){let{schemaId:a}=this.opts;if(i=t[a],i!==void 0&&typeof i!="string")throw new Error(`schema ${a} must be string`)}return r=(0,$x.normalizeId)(r||i),this._checkUnique(r),this.schemas[r]=this._addSchema(t,n,r,o,!0),this}addMetaSchema(t,r,n=this.opts.validateSchema){return this.addSchema(t,r,!0,n),this}validateSchema(t,r){if(typeof t=="boolean")return!0;let n;if(n=t.$schema,n!==void 0&&typeof n!="string")throw new Error("$schema must be a string");if(n=n||this.opts.defaultMeta||this.defaultMeta(),!n)return this.logger.warn("meta-schema not available"),this.errors=null,!0;let o=this.validate(n,t);if(!o&&r){let i="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(i);else throw new Error(i)}return o}getSchema(t){let r;for(;typeof(r=oee.call(this,t))=="string";)t=r;if(r===void 0){let{schemaId:n}=this.opts,o=new Lx.SchemaEnv({schema:{},schemaId:n});if(r=Lx.resolveSchema.call(this,o,t),!r)return;this.refs[t]=r}return r.validate||this._compileSchemaEnv(r)}removeSchema(t){if(t instanceof RegExp)return this._removeAllSchemas(this.schemas,t),this._removeAllSchemas(this.refs,t),this;switch(typeof t){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let r=oee.call(this,t);return typeof r=="object"&&this._cache.delete(r.schema),delete this.schemas[t],delete this.refs[t],this}case"object":{let r=t;this._cache.delete(r);let n=t[this.opts.schemaId];return n&&(n=(0,$x.normalizeId)(n),delete this.schemas[n],delete this.refs[n]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(t){for(let r of t)this.addKeyword(r);return this}addKeyword(t,r){let n;if(typeof t=="string")n=t,typeof r=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),r.keyword=n);else if(typeof t=="object"&&r===void 0){if(r=t,n=r.keyword,Array.isArray(n)&&!n.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(SPe.call(this,n,r),!r)return(0,V9.eachItem)(n,i=>J9.call(this,i)),this;bPe.call(this,r);let o={...r,type:(0,AC.getJSONTypes)(r.type),schemaType:(0,AC.getJSONTypes)(r.schemaType)};return(0,V9.eachItem)(n,o.type.length===0?i=>J9.call(this,i,o):i=>o.type.forEach(a=>J9.call(this,i,o,a))),this}getKeyword(t){let r=this.RULES.all[t];return typeof r=="object"?r.definition:!!r}removeKeyword(t){let{RULES:r}=this;delete r.keywords[t],delete r.all[t];for(let n of r.rules){let o=n.rules.findIndex(i=>i.keyword===t);o>=0&&n.rules.splice(o,1)}return this}addFormat(t,r){return typeof r=="string"&&(r=new RegExp(r)),this.formats[t]=r,this}errorsText(t=this.errors,{separator:r=", ",dataVar:n="data"}={}){return!t||t.length===0?"No errors":t.map(o=>`${n}${o.instancePath} ${o.message}`).reduce((o,i)=>o+r+i)}$dataMetaSchema(t,r){let n=this.RULES.all;t=JSON.parse(JSON.stringify(t));for(let o of r){let i=o.split("/").slice(1),a=t;for(let s of i)a=a[s];for(let s in n){let c=n[s];if(typeof c!="object")continue;let{$data:p}=c.definition,d=a[s];p&&d&&(a[s]=see(d))}}return t}_removeAllSchemas(t,r){for(let n in t){let o=t[n];(!r||r.test(n))&&(typeof o=="string"?delete t[n]:o&&!o.meta&&(this._cache.delete(o.schema),delete t[n]))}}_addSchema(t,r,n,o=this.opts.validateSchema,i=this.opts.addUsedSchema){let a,{schemaId:s}=this.opts;if(typeof t=="object")a=t[s];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof t!="boolean")throw new Error("schema must be object or boolean")}let c=this._cache.get(t);if(c!==void 0)return c;n=(0,$x.normalizeId)(a||n);let p=$x.getSchemaRefs.call(this,t,n);return c=new Lx.SchemaEnv({schema:t,schemaId:s,meta:r,baseId:n,localRefs:p}),this._cache.set(c.schema,c),i&&!n.startsWith("#")&&(n&&this._checkUnique(n),this.refs[n]=c),o&&this.validateSchema(t,!0),c}_checkUnique(t){if(this.schemas[t]||this.refs[t])throw new Error(`schema with key or id "${t}" already exists`)}_compileSchemaEnv(t){if(t.meta?this._compileMetaSchema(t):Lx.compileSchema.call(this,t),!t.validate)throw new Error("ajv implementation error");return t.validate}_compileMetaSchema(t){let r=this.opts;this.opts=this._metaOpts;try{Lx.compileSchema.call(this,t)}finally{this.opts=r}}};Mx.ValidationError=nPe.default;Mx.MissingRefError=iee.default;Ea.default=Mx;function nee(e,t,r,n="error"){for(let o in e){let i=o;i in t&&this.logger[n](`${r}: option ${o}. ${e[i]}`)}}function oee(e){return e=(0,$x.normalizeId)(e),this.schemas[e]||this.refs[e]}function dPe(){let e=this.opts.schemas;if(e)if(Array.isArray(e))this.addSchema(e);else for(let t in e)this.addSchema(e[t],t)}function _Pe(){for(let e in this.opts.formats){let t=this.opts.formats[e];t&&this.addFormat(e,t)}}function fPe(e){if(Array.isArray(e)){this.addVocabulary(e);return}this.logger.warn("keywords option as map is deprecated, pass array");for(let t in e){let r=e[t];r.keyword||(r.keyword=t),this.addKeyword(r)}}function mPe(){let e={...this.opts};for(let t of sPe)delete e[t];return e}var hPe={log(){},warn(){},error(){}};function yPe(e){if(e===!1)return hPe;if(e===void 0)return console;if(e.log&&e.warn&&e.error)return e;throw new Error("logger must implement log, warn and error methods")}var gPe=/^[a-z_$][a-z0-9_$:-]*$/i;function SPe(e,t){let{RULES:r}=this;if((0,V9.eachItem)(e,n=>{if(r.keywords[n])throw new Error(`Keyword ${n} is already defined`);if(!gPe.test(n))throw new Error(`Keyword ${n} has invalid name`)}),!!t&&t.$data&&!("code"in t||"validate"in t))throw new Error('$data keyword must have "code" or "validate" function')}function J9(e,t,r){var n;let o=t?.post;if(r&&o)throw new Error('keyword with "post" flag cannot have "type"');let{RULES:i}=this,a=o?i.post:i.rules.find(({type:c})=>c===r);if(a||(a={type:r,rules:[]},i.rules.push(a)),i.keywords[e]=!0,!t)return;let s={keyword:e,definition:{...t,type:(0,AC.getJSONTypes)(t.type),schemaType:(0,AC.getJSONTypes)(t.schemaType)}};t.before?vPe.call(this,a,s,t.before):a.rules.push(s),i.all[e]=s,(n=t.implements)===null||n===void 0||n.forEach(c=>this.addKeyword(c))}function vPe(e,t,r){let n=e.rules.findIndex(o=>o.keyword===r);n>=0?e.rules.splice(n,0,t):(e.rules.push(t),this.logger.warn(`rule ${r} is not defined`))}function bPe(e){let{metaSchema:t}=e;t!==void 0&&(e.$data&&this.opts.$data&&(t=see(t)),e.validateSchema=this.compile(t,!0))}var xPe={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function see(e){return{anyOf:[e,xPe]}}});var cee=L(G9=>{"use strict";Object.defineProperty(G9,"__esModule",{value:!0});var EPe={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};G9.default=EPe});var kC=L(Ny=>{"use strict";Object.defineProperty(Ny,"__esModule",{value:!0});Ny.callRef=Ny.getValidate=void 0;var TPe=d0(),lee=yl(),Hs=kr(),m0=hl(),uee=Fx(),IC=un(),DPe={keyword:"$ref",schemaType:"string",code(e){let{gen:t,schema:r,it:n}=e,{baseId:o,schemaEnv:i,validateName:a,opts:s,self:c}=n,{root:p}=i;if((r==="#"||r==="#/")&&o===p.baseId)return f();let d=uee.resolveRef.call(c,p,o,r);if(d===void 0)throw new TPe.default(n.opts.uriResolver,o,r);if(d instanceof uee.SchemaEnv)return m(d);return y(d);function f(){if(i===p)return wC(e,a,i,i.$async);let g=t.scopeValue("root",{ref:p});return wC(e,(0,Hs._)`${g}.validate`,p,p.$async)}function m(g){let S=pee(e,g);wC(e,S,g,g.$async)}function y(g){let S=t.scopeValue("schema",s.code.source===!0?{ref:g,code:(0,Hs.stringify)(g)}:{ref:g}),b=t.name("valid"),E=e.subschema({schema:g,dataTypes:[],schemaPath:Hs.nil,topSchemaRef:S,errSchemaPath:r},b);e.mergeEvaluated(E),e.ok(b)}}};function pee(e,t){let{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):(0,Hs._)`${r.scopeValue("wrapper",{ref:t})}.validate`}Ny.getValidate=pee;function wC(e,t,r,n){let{gen:o,it:i}=e,{allErrors:a,schemaEnv:s,opts:c}=i,p=c.passContext?m0.default.this:Hs.nil;n?d():f();function d(){if(!s.$async)throw new Error("async schema referenced by sync schema");let g=o.let("valid");o.try(()=>{o.code((0,Hs._)`await ${(0,lee.callValidateCode)(e,t,p)}`),y(t),a||o.assign(g,!0)},S=>{o.if((0,Hs._)`!(${S} instanceof ${i.ValidationError})`,()=>o.throw(S)),m(S),a||o.assign(g,!1)}),e.ok(g)}function f(){e.result((0,lee.callValidateCode)(e,t,p),()=>y(t),()=>m(t))}function m(g){let S=(0,Hs._)`${g}.errors`;o.assign(m0.default.vErrors,(0,Hs._)`${m0.default.vErrors} === null ? ${S} : ${m0.default.vErrors}.concat(${S})`),o.assign(m0.default.errors,(0,Hs._)`${m0.default.vErrors}.length`)}function y(g){var S;if(!i.opts.unevaluated)return;let b=(S=r?.validate)===null||S===void 0?void 0:S.evaluated;if(i.props!==!0)if(b&&!b.dynamicProps)b.props!==void 0&&(i.props=IC.mergeEvaluated.props(o,b.props,i.props));else{let E=o.var("props",(0,Hs._)`${g}.evaluated.props`);i.props=IC.mergeEvaluated.props(o,E,i.props,Hs.Name)}if(i.items!==!0)if(b&&!b.dynamicItems)b.items!==void 0&&(i.items=IC.mergeEvaluated.items(o,b.items,i.items));else{let E=o.var("items",(0,Hs._)`${g}.evaluated.items`);i.items=IC.mergeEvaluated.items(o,E,i.items,Hs.Name)}}}Ny.callRef=wC;Ny.default=DPe});var Z9=L(H9=>{"use strict";Object.defineProperty(H9,"__esModule",{value:!0});var APe=cee(),IPe=kC(),wPe=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",APe.default,IPe.default];H9.default=wPe});var dee=L(W9=>{"use strict";Object.defineProperty(W9,"__esModule",{value:!0});var CC=kr(),Wf=CC.operators,PC={maximum:{okStr:"<=",ok:Wf.LTE,fail:Wf.GT},minimum:{okStr:">=",ok:Wf.GTE,fail:Wf.LT},exclusiveMaximum:{okStr:"<",ok:Wf.LT,fail:Wf.GTE},exclusiveMinimum:{okStr:">",ok:Wf.GT,fail:Wf.LTE}},kPe={message:({keyword:e,schemaCode:t})=>(0,CC.str)`must be ${PC[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,CC._)`{comparison: ${PC[e].okStr}, limit: ${t}}`},CPe={keyword:Object.keys(PC),type:"number",schemaType:"number",$data:!0,error:kPe,code(e){let{keyword:t,data:r,schemaCode:n}=e;e.fail$data((0,CC._)`${r} ${PC[t].fail} ${n} || isNaN(${r})`)}};W9.default=CPe});var _ee=L(Q9=>{"use strict";Object.defineProperty(Q9,"__esModule",{value:!0});var jx=kr(),PPe={message:({schemaCode:e})=>(0,jx.str)`must be multiple of ${e}`,params:({schemaCode:e})=>(0,jx._)`{multipleOf: ${e}}`},OPe={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:PPe,code(e){let{gen:t,data:r,schemaCode:n,it:o}=e,i=o.opts.multipleOfPrecision,a=t.let("res"),s=i?(0,jx._)`Math.abs(Math.round(${a}) - ${a}) > 1e-${i}`:(0,jx._)`${a} !== parseInt(${a})`;e.fail$data((0,jx._)`(${n} === 0 || (${a} = ${r}/${n}, ${s}))`)}};Q9.default=OPe});var mee=L(X9=>{"use strict";Object.defineProperty(X9,"__esModule",{value:!0});function fee(e){let t=e.length,r=0,n=0,o;for(;n=55296&&o<=56319&&n{"use strict";Object.defineProperty(Y9,"__esModule",{value:!0});var Fy=kr(),NPe=un(),FPe=mee(),RPe={message({keyword:e,schemaCode:t}){let r=e==="maxLength"?"more":"fewer";return(0,Fy.str)`must NOT have ${r} than ${t} characters`},params:({schemaCode:e})=>(0,Fy._)`{limit: ${e}}`},LPe={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:RPe,code(e){let{keyword:t,data:r,schemaCode:n,it:o}=e,i=t==="maxLength"?Fy.operators.GT:Fy.operators.LT,a=o.opts.unicode===!1?(0,Fy._)`${r}.length`:(0,Fy._)`${(0,NPe.useFunc)(e.gen,FPe.default)}(${r})`;e.fail$data((0,Fy._)`${a} ${i} ${n}`)}};Y9.default=LPe});var yee=L(e5=>{"use strict";Object.defineProperty(e5,"__esModule",{value:!0});var $Pe=yl(),MPe=un(),h0=kr(),jPe={message:({schemaCode:e})=>(0,h0.str)`must match pattern "${e}"`,params:({schemaCode:e})=>(0,h0._)`{pattern: ${e}}`},BPe={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:jPe,code(e){let{gen:t,data:r,$data:n,schema:o,schemaCode:i,it:a}=e,s=a.opts.unicodeRegExp?"u":"";if(n){let{regExp:c}=a.opts.code,p=c.code==="new RegExp"?(0,h0._)`new RegExp`:(0,MPe.useFunc)(t,c),d=t.let("valid");t.try(()=>t.assign(d,(0,h0._)`${p}(${i}, ${s}).test(${r})`),()=>t.assign(d,!1)),e.fail$data((0,h0._)`!${d}`)}else{let c=(0,$Pe.usePattern)(e,o);e.fail$data((0,h0._)`!${c}.test(${r})`)}}};e5.default=BPe});var gee=L(t5=>{"use strict";Object.defineProperty(t5,"__esModule",{value:!0});var Bx=kr(),qPe={message({keyword:e,schemaCode:t}){let r=e==="maxProperties"?"more":"fewer";return(0,Bx.str)`must NOT have ${r} than ${t} properties`},params:({schemaCode:e})=>(0,Bx._)`{limit: ${e}}`},UPe={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:qPe,code(e){let{keyword:t,data:r,schemaCode:n}=e,o=t==="maxProperties"?Bx.operators.GT:Bx.operators.LT;e.fail$data((0,Bx._)`Object.keys(${r}).length ${o} ${n}`)}};t5.default=UPe});var See=L(r5=>{"use strict";Object.defineProperty(r5,"__esModule",{value:!0});var qx=yl(),Ux=kr(),zPe=un(),JPe={message:({params:{missingProperty:e}})=>(0,Ux.str)`must have required property '${e}'`,params:({params:{missingProperty:e}})=>(0,Ux._)`{missingProperty: ${e}}`},VPe={keyword:"required",type:"object",schemaType:"array",$data:!0,error:JPe,code(e){let{gen:t,schema:r,schemaCode:n,data:o,$data:i,it:a}=e,{opts:s}=a;if(!i&&r.length===0)return;let c=r.length>=s.loopRequired;if(a.allErrors?p():d(),s.strictRequired){let y=e.parentSchema.properties,{definedProperties:g}=e.it;for(let S of r)if(y?.[S]===void 0&&!g.has(S)){let b=a.schemaEnv.baseId+a.errSchemaPath,E=`required property "${S}" is not defined at "${b}" (strictRequired)`;(0,zPe.checkStrictMode)(a,E,a.opts.strictRequired)}}function p(){if(c||i)e.block$data(Ux.nil,f);else for(let y of r)(0,qx.checkReportMissingProp)(e,y)}function d(){let y=t.let("missing");if(c||i){let g=t.let("valid",!0);e.block$data(g,()=>m(y,g)),e.ok(g)}else t.if((0,qx.checkMissingProp)(e,r,y)),(0,qx.reportMissingProp)(e,y),t.else()}function f(){t.forOf("prop",n,y=>{e.setParams({missingProperty:y}),t.if((0,qx.noPropertyInData)(t,o,y,s.ownProperties),()=>e.error())})}function m(y,g){e.setParams({missingProperty:y}),t.forOf(y,n,()=>{t.assign(g,(0,qx.propertyInData)(t,o,y,s.ownProperties)),t.if((0,Ux.not)(g),()=>{e.error(),t.break()})},Ux.nil)}}};r5.default=VPe});var vee=L(n5=>{"use strict";Object.defineProperty(n5,"__esModule",{value:!0});var zx=kr(),KPe={message({keyword:e,schemaCode:t}){let r=e==="maxItems"?"more":"fewer";return(0,zx.str)`must NOT have ${r} than ${t} items`},params:({schemaCode:e})=>(0,zx._)`{limit: ${e}}`},GPe={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:KPe,code(e){let{keyword:t,data:r,schemaCode:n}=e,o=t==="maxItems"?zx.operators.GT:zx.operators.LT;e.fail$data((0,zx._)`${r}.length ${o} ${n}`)}};n5.default=GPe});var OC=L(o5=>{"use strict";Object.defineProperty(o5,"__esModule",{value:!0});var bee=A9();bee.code='require("ajv/dist/runtime/equal").default';o5.default=bee});var xee=L(a5=>{"use strict";Object.defineProperty(a5,"__esModule",{value:!0});var i5=kx(),Ta=kr(),HPe=un(),ZPe=OC(),WPe={message:({params:{i:e,j:t}})=>(0,Ta.str)`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>(0,Ta._)`{i: ${e}, j: ${t}}`},QPe={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:WPe,code(e){let{gen:t,data:r,$data:n,schema:o,parentSchema:i,schemaCode:a,it:s}=e;if(!n&&!o)return;let c=t.let("valid"),p=i.items?(0,i5.getSchemaTypes)(i.items):[];e.block$data(c,d,(0,Ta._)`${a} === false`),e.ok(c);function d(){let g=t.let("i",(0,Ta._)`${r}.length`),S=t.let("j");e.setParams({i:g,j:S}),t.assign(c,!0),t.if((0,Ta._)`${g} > 1`,()=>(f()?m:y)(g,S))}function f(){return p.length>0&&!p.some(g=>g==="object"||g==="array")}function m(g,S){let b=t.name("item"),E=(0,i5.checkDataTypes)(p,b,s.opts.strictNumbers,i5.DataType.Wrong),I=t.const("indices",(0,Ta._)`{}`);t.for((0,Ta._)`;${g}--;`,()=>{t.let(b,(0,Ta._)`${r}[${g}]`),t.if(E,(0,Ta._)`continue`),p.length>1&&t.if((0,Ta._)`typeof ${b} == "string"`,(0,Ta._)`${b} += "_"`),t.if((0,Ta._)`typeof ${I}[${b}] == "number"`,()=>{t.assign(S,(0,Ta._)`${I}[${b}]`),e.error(),t.assign(c,!1).break()}).code((0,Ta._)`${I}[${b}] = ${g}`)})}function y(g,S){let b=(0,HPe.useFunc)(t,ZPe.default),E=t.name("outer");t.label(E).for((0,Ta._)`;${g}--;`,()=>t.for((0,Ta._)`${S} = ${g}; ${S}--;`,()=>t.if((0,Ta._)`${b}(${r}[${g}], ${r}[${S}])`,()=>{e.error(),t.assign(c,!1).break(E)})))}}};a5.default=QPe});var Eee=L(c5=>{"use strict";Object.defineProperty(c5,"__esModule",{value:!0});var s5=kr(),XPe=un(),YPe=OC(),e6e={message:"must be equal to constant",params:({schemaCode:e})=>(0,s5._)`{allowedValue: ${e}}`},t6e={keyword:"const",$data:!0,error:e6e,code(e){let{gen:t,data:r,$data:n,schemaCode:o,schema:i}=e;n||i&&typeof i=="object"?e.fail$data((0,s5._)`!${(0,XPe.useFunc)(t,YPe.default)}(${r}, ${o})`):e.fail((0,s5._)`${i} !== ${r}`)}};c5.default=t6e});var Tee=L(l5=>{"use strict";Object.defineProperty(l5,"__esModule",{value:!0});var Jx=kr(),r6e=un(),n6e=OC(),o6e={message:"must be equal to one of the allowed values",params:({schemaCode:e})=>(0,Jx._)`{allowedValues: ${e}}`},i6e={keyword:"enum",schemaType:"array",$data:!0,error:o6e,code(e){let{gen:t,data:r,$data:n,schema:o,schemaCode:i,it:a}=e;if(!n&&o.length===0)throw new Error("enum must have non-empty array");let s=o.length>=a.opts.loopEnum,c,p=()=>c??(c=(0,r6e.useFunc)(t,n6e.default)),d;if(s||n)d=t.let("valid"),e.block$data(d,f);else{if(!Array.isArray(o))throw new Error("ajv implementation error");let y=t.const("vSchema",i);d=(0,Jx.or)(...o.map((g,S)=>m(y,S)))}e.pass(d);function f(){t.assign(d,!1),t.forOf("v",i,y=>t.if((0,Jx._)`${p()}(${r}, ${y})`,()=>t.assign(d,!0).break()))}function m(y,g){let S=o[g];return typeof S=="object"&&S!==null?(0,Jx._)`${p()}(${r}, ${y}[${g}])`:(0,Jx._)`${r} === ${S}`}}};l5.default=i6e});var p5=L(u5=>{"use strict";Object.defineProperty(u5,"__esModule",{value:!0});var a6e=dee(),s6e=_ee(),c6e=hee(),l6e=yee(),u6e=gee(),p6e=See(),d6e=vee(),_6e=xee(),f6e=Eee(),m6e=Tee(),h6e=[a6e.default,s6e.default,c6e.default,l6e.default,u6e.default,p6e.default,d6e.default,_6e.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},f6e.default,m6e.default];u5.default=h6e});var _5=L(Vx=>{"use strict";Object.defineProperty(Vx,"__esModule",{value:!0});Vx.validateAdditionalItems=void 0;var Ry=kr(),d5=un(),y6e={message:({params:{len:e}})=>(0,Ry.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,Ry._)`{limit: ${e}}`},g6e={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:y6e,code(e){let{parentSchema:t,it:r}=e,{items:n}=t;if(!Array.isArray(n)){(0,d5.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}Dee(e,n)}};function Dee(e,t){let{gen:r,schema:n,data:o,keyword:i,it:a}=e;a.items=!0;let s=r.const("len",(0,Ry._)`${o}.length`);if(n===!1)e.setParams({len:t.length}),e.pass((0,Ry._)`${s} <= ${t.length}`);else if(typeof n=="object"&&!(0,d5.alwaysValidSchema)(a,n)){let p=r.var("valid",(0,Ry._)`${s} <= ${t.length}`);r.if((0,Ry.not)(p),()=>c(p)),e.ok(p)}function c(p){r.forRange("i",t.length,s,d=>{e.subschema({keyword:i,dataProp:d,dataPropType:d5.Type.Num},p),a.allErrors||r.if((0,Ry.not)(p),()=>r.break())})}}Vx.validateAdditionalItems=Dee;Vx.default=g6e});var f5=L(Kx=>{"use strict";Object.defineProperty(Kx,"__esModule",{value:!0});Kx.validateTuple=void 0;var Aee=kr(),NC=un(),S6e=yl(),v6e={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){let{schema:t,it:r}=e;if(Array.isArray(t))return Iee(e,"additionalItems",t);r.items=!0,!(0,NC.alwaysValidSchema)(r,t)&&e.ok((0,S6e.validateArray)(e))}};function Iee(e,t,r=e.schema){let{gen:n,parentSchema:o,data:i,keyword:a,it:s}=e;d(o),s.opts.unevaluated&&r.length&&s.items!==!0&&(s.items=NC.mergeEvaluated.items(n,r.length,s.items));let c=n.name("valid"),p=n.const("len",(0,Aee._)`${i}.length`);r.forEach((f,m)=>{(0,NC.alwaysValidSchema)(s,f)||(n.if((0,Aee._)`${p} > ${m}`,()=>e.subschema({keyword:a,schemaProp:m,dataProp:m},c)),e.ok(c))});function d(f){let{opts:m,errSchemaPath:y}=s,g=r.length,S=g===f.minItems&&(g===f.maxItems||f[t]===!1);if(m.strictTuples&&!S){let b=`"${a}" is ${g}-tuple, but minItems or maxItems/${t} are not specified or different at path "${y}"`;(0,NC.checkStrictMode)(s,b,m.strictTuples)}}}Kx.validateTuple=Iee;Kx.default=v6e});var wee=L(m5=>{"use strict";Object.defineProperty(m5,"__esModule",{value:!0});var b6e=f5(),x6e={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,b6e.validateTuple)(e,"items")};m5.default=x6e});var Cee=L(h5=>{"use strict";Object.defineProperty(h5,"__esModule",{value:!0});var kee=kr(),E6e=un(),T6e=yl(),D6e=_5(),A6e={message:({params:{len:e}})=>(0,kee.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,kee._)`{limit: ${e}}`},I6e={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:A6e,code(e){let{schema:t,parentSchema:r,it:n}=e,{prefixItems:o}=r;n.items=!0,!(0,E6e.alwaysValidSchema)(n,t)&&(o?(0,D6e.validateAdditionalItems)(e,o):e.ok((0,T6e.validateArray)(e)))}};h5.default=I6e});var Pee=L(y5=>{"use strict";Object.defineProperty(y5,"__esModule",{value:!0});var Sl=kr(),FC=un(),w6e={message:({params:{min:e,max:t}})=>t===void 0?(0,Sl.str)`must contain at least ${e} valid item(s)`:(0,Sl.str)`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>t===void 0?(0,Sl._)`{minContains: ${e}}`:(0,Sl._)`{minContains: ${e}, maxContains: ${t}}`},k6e={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:w6e,code(e){let{gen:t,schema:r,parentSchema:n,data:o,it:i}=e,a,s,{minContains:c,maxContains:p}=n;i.opts.next?(a=c===void 0?1:c,s=p):a=1;let d=t.const("len",(0,Sl._)`${o}.length`);if(e.setParams({min:a,max:s}),s===void 0&&a===0){(0,FC.checkStrictMode)(i,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(s!==void 0&&a>s){(0,FC.checkStrictMode)(i,'"minContains" > "maxContains" is always invalid'),e.fail();return}if((0,FC.alwaysValidSchema)(i,r)){let S=(0,Sl._)`${d} >= ${a}`;s!==void 0&&(S=(0,Sl._)`${S} && ${d} <= ${s}`),e.pass(S);return}i.items=!0;let f=t.name("valid");s===void 0&&a===1?y(f,()=>t.if(f,()=>t.break())):a===0?(t.let(f,!0),s!==void 0&&t.if((0,Sl._)`${o}.length > 0`,m)):(t.let(f,!1),m()),e.result(f,()=>e.reset());function m(){let S=t.name("_valid"),b=t.let("count",0);y(S,()=>t.if(S,()=>g(b)))}function y(S,b){t.forRange("i",0,d,E=>{e.subschema({keyword:"contains",dataProp:E,dataPropType:FC.Type.Num,compositeRule:!0},S),b()})}function g(S){t.code((0,Sl._)`${S}++`),s===void 0?t.if((0,Sl._)`${S} >= ${a}`,()=>t.assign(f,!0).break()):(t.if((0,Sl._)`${S} > ${s}`,()=>t.assign(f,!1).break()),a===1?t.assign(f,!0):t.if((0,Sl._)`${S} >= ${a}`,()=>t.assign(f,!0)))}}};y5.default=k6e});var RC=L(vp=>{"use strict";Object.defineProperty(vp,"__esModule",{value:!0});vp.validateSchemaDeps=vp.validatePropertyDeps=vp.error=void 0;var g5=kr(),C6e=un(),Gx=yl();vp.error={message:({params:{property:e,depsCount:t,deps:r}})=>{let n=t===1?"property":"properties";return(0,g5.str)`must have ${n} ${r} when property ${e} is present`},params:({params:{property:e,depsCount:t,deps:r,missingProperty:n}})=>(0,g5._)`{property: ${e}, + missingProperty: ${n}, + depsCount: ${t}, + deps: ${r}}`};var P6e={keyword:"dependencies",type:"object",schemaType:"object",error:vp.error,code(e){let[t,r]=O6e(e);Oee(e,t),Nee(e,r)}};function O6e({schema:e}){let t={},r={};for(let n in e){if(n==="__proto__")continue;let o=Array.isArray(e[n])?t:r;o[n]=e[n]}return[t,r]}function Oee(e,t=e.schema){let{gen:r,data:n,it:o}=e;if(Object.keys(t).length===0)return;let i=r.let("missing");for(let a in t){let s=t[a];if(s.length===0)continue;let c=(0,Gx.propertyInData)(r,n,a,o.opts.ownProperties);e.setParams({property:a,depsCount:s.length,deps:s.join(", ")}),o.allErrors?r.if(c,()=>{for(let p of s)(0,Gx.checkReportMissingProp)(e,p)}):(r.if((0,g5._)`${c} && (${(0,Gx.checkMissingProp)(e,s,i)})`),(0,Gx.reportMissingProp)(e,i),r.else())}}vp.validatePropertyDeps=Oee;function Nee(e,t=e.schema){let{gen:r,data:n,keyword:o,it:i}=e,a=r.name("valid");for(let s in t)(0,C6e.alwaysValidSchema)(i,t[s])||(r.if((0,Gx.propertyInData)(r,n,s,i.opts.ownProperties),()=>{let c=e.subschema({keyword:o,schemaProp:s},a);e.mergeValidEvaluated(c,a)},()=>r.var(a,!0)),e.ok(a))}vp.validateSchemaDeps=Nee;vp.default=P6e});var Ree=L(S5=>{"use strict";Object.defineProperty(S5,"__esModule",{value:!0});var Fee=kr(),N6e=un(),F6e={message:"property name must be valid",params:({params:e})=>(0,Fee._)`{propertyName: ${e.propertyName}}`},R6e={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:F6e,code(e){let{gen:t,schema:r,data:n,it:o}=e;if((0,N6e.alwaysValidSchema)(o,r))return;let i=t.name("valid");t.forIn("key",n,a=>{e.setParams({propertyName:a}),e.subschema({keyword:"propertyNames",data:a,dataTypes:["string"],propertyName:a,compositeRule:!0},i),t.if((0,Fee.not)(i),()=>{e.error(!0),o.allErrors||t.break()})}),e.ok(i)}};S5.default=R6e});var b5=L(v5=>{"use strict";Object.defineProperty(v5,"__esModule",{value:!0});var LC=yl(),hu=kr(),L6e=hl(),$C=un(),$6e={message:"must NOT have additional properties",params:({params:e})=>(0,hu._)`{additionalProperty: ${e.additionalProperty}}`},M6e={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:$6e,code(e){let{gen:t,schema:r,parentSchema:n,data:o,errsCount:i,it:a}=e;if(!i)throw new Error("ajv implementation error");let{allErrors:s,opts:c}=a;if(a.props=!0,c.removeAdditional!=="all"&&(0,$C.alwaysValidSchema)(a,r))return;let p=(0,LC.allSchemaProperties)(n.properties),d=(0,LC.allSchemaProperties)(n.patternProperties);f(),e.ok((0,hu._)`${i} === ${L6e.default.errors}`);function f(){t.forIn("key",o,b=>{!p.length&&!d.length?g(b):t.if(m(b),()=>g(b))})}function m(b){let E;if(p.length>8){let I=(0,$C.schemaRefOrVal)(a,n.properties,"properties");E=(0,LC.isOwnProperty)(t,I,b)}else p.length?E=(0,hu.or)(...p.map(I=>(0,hu._)`${b} === ${I}`)):E=hu.nil;return d.length&&(E=(0,hu.or)(E,...d.map(I=>(0,hu._)`${(0,LC.usePattern)(e,I)}.test(${b})`))),(0,hu.not)(E)}function y(b){t.code((0,hu._)`delete ${o}[${b}]`)}function g(b){if(c.removeAdditional==="all"||c.removeAdditional&&r===!1){y(b);return}if(r===!1){e.setParams({additionalProperty:b}),e.error(),s||t.break();return}if(typeof r=="object"&&!(0,$C.alwaysValidSchema)(a,r)){let E=t.name("valid");c.removeAdditional==="failing"?(S(b,E,!1),t.if((0,hu.not)(E),()=>{e.reset(),y(b)})):(S(b,E),s||t.if((0,hu.not)(E),()=>t.break()))}}function S(b,E,I){let T={keyword:"additionalProperties",dataProp:b,dataPropType:$C.Type.Str};I===!1&&Object.assign(T,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(T,E)}}};v5.default=M6e});var Mee=L(E5=>{"use strict";Object.defineProperty(E5,"__esModule",{value:!0});var j6e=p0(),Lee=yl(),x5=un(),$ee=b5(),B6e={keyword:"properties",type:"object",schemaType:"object",code(e){let{gen:t,schema:r,parentSchema:n,data:o,it:i}=e;i.opts.removeAdditional==="all"&&n.additionalProperties===void 0&&$ee.default.code(new j6e.KeywordCxt(i,$ee.default,"additionalProperties"));let a=(0,Lee.allSchemaProperties)(r);for(let f of a)i.definedProperties.add(f);i.opts.unevaluated&&a.length&&i.props!==!0&&(i.props=x5.mergeEvaluated.props(t,(0,x5.toHash)(a),i.props));let s=a.filter(f=>!(0,x5.alwaysValidSchema)(i,r[f]));if(s.length===0)return;let c=t.name("valid");for(let f of s)p(f)?d(f):(t.if((0,Lee.propertyInData)(t,o,f,i.opts.ownProperties)),d(f),i.allErrors||t.else().var(c,!0),t.endIf()),e.it.definedProperties.add(f),e.ok(c);function p(f){return i.opts.useDefaults&&!i.compositeRule&&r[f].default!==void 0}function d(f){e.subschema({keyword:"properties",schemaProp:f,dataProp:f},c)}}};E5.default=B6e});var Uee=L(T5=>{"use strict";Object.defineProperty(T5,"__esModule",{value:!0});var jee=yl(),MC=kr(),Bee=un(),qee=un(),q6e={keyword:"patternProperties",type:"object",schemaType:"object",code(e){let{gen:t,schema:r,data:n,parentSchema:o,it:i}=e,{opts:a}=i,s=(0,jee.allSchemaProperties)(r),c=s.filter(S=>(0,Bee.alwaysValidSchema)(i,r[S]));if(s.length===0||c.length===s.length&&(!i.opts.unevaluated||i.props===!0))return;let p=a.strictSchema&&!a.allowMatchingProperties&&o.properties,d=t.name("valid");i.props!==!0&&!(i.props instanceof MC.Name)&&(i.props=(0,qee.evaluatedPropsToName)(t,i.props));let{props:f}=i;m();function m(){for(let S of s)p&&y(S),i.allErrors?g(S):(t.var(d,!0),g(S),t.if(d))}function y(S){for(let b in p)new RegExp(S).test(b)&&(0,Bee.checkStrictMode)(i,`property ${b} matches pattern ${S} (use allowMatchingProperties)`)}function g(S){t.forIn("key",n,b=>{t.if((0,MC._)`${(0,jee.usePattern)(e,S)}.test(${b})`,()=>{let E=c.includes(S);E||e.subschema({keyword:"patternProperties",schemaProp:S,dataProp:b,dataPropType:qee.Type.Str},d),i.opts.unevaluated&&f!==!0?t.assign((0,MC._)`${f}[${b}]`,!0):!E&&!i.allErrors&&t.if((0,MC.not)(d),()=>t.break())})})}}};T5.default=q6e});var zee=L(D5=>{"use strict";Object.defineProperty(D5,"__esModule",{value:!0});var U6e=un(),z6e={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){let{gen:t,schema:r,it:n}=e;if((0,U6e.alwaysValidSchema)(n,r)){e.fail();return}let o=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},o),e.failResult(o,()=>e.reset(),()=>e.error())},error:{message:"must NOT be valid"}};D5.default=z6e});var Jee=L(A5=>{"use strict";Object.defineProperty(A5,"__esModule",{value:!0});var J6e=yl(),V6e={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:J6e.validateUnion,error:{message:"must match a schema in anyOf"}};A5.default=V6e});var Vee=L(I5=>{"use strict";Object.defineProperty(I5,"__esModule",{value:!0});var jC=kr(),K6e=un(),G6e={message:"must match exactly one schema in oneOf",params:({params:e})=>(0,jC._)`{passingSchemas: ${e.passing}}`},H6e={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:G6e,code(e){let{gen:t,schema:r,parentSchema:n,it:o}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(o.opts.discriminator&&n.discriminator)return;let i=r,a=t.let("valid",!1),s=t.let("passing",null),c=t.name("_valid");e.setParams({passing:s}),t.block(p),e.result(a,()=>e.reset(),()=>e.error(!0));function p(){i.forEach((d,f)=>{let m;(0,K6e.alwaysValidSchema)(o,d)?t.var(c,!0):m=e.subschema({keyword:"oneOf",schemaProp:f,compositeRule:!0},c),f>0&&t.if((0,jC._)`${c} && ${a}`).assign(a,!1).assign(s,(0,jC._)`[${s}, ${f}]`).else(),t.if(c,()=>{t.assign(a,!0),t.assign(s,f),m&&e.mergeEvaluated(m,jC.Name)})})}}};I5.default=H6e});var Kee=L(w5=>{"use strict";Object.defineProperty(w5,"__esModule",{value:!0});var Z6e=un(),W6e={keyword:"allOf",schemaType:"array",code(e){let{gen:t,schema:r,it:n}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");let o=t.name("valid");r.forEach((i,a)=>{if((0,Z6e.alwaysValidSchema)(n,i))return;let s=e.subschema({keyword:"allOf",schemaProp:a},o);e.ok(o),e.mergeEvaluated(s)})}};w5.default=W6e});var Zee=L(k5=>{"use strict";Object.defineProperty(k5,"__esModule",{value:!0});var BC=kr(),Hee=un(),Q6e={message:({params:e})=>(0,BC.str)`must match "${e.ifClause}" schema`,params:({params:e})=>(0,BC._)`{failingKeyword: ${e.ifClause}}`},X6e={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:Q6e,code(e){let{gen:t,parentSchema:r,it:n}=e;r.then===void 0&&r.else===void 0&&(0,Hee.checkStrictMode)(n,'"if" without "then" and "else" is ignored');let o=Gee(n,"then"),i=Gee(n,"else");if(!o&&!i)return;let a=t.let("valid",!0),s=t.name("_valid");if(c(),e.reset(),o&&i){let d=t.let("ifClause");e.setParams({ifClause:d}),t.if(s,p("then",d),p("else",d))}else o?t.if(s,p("then")):t.if((0,BC.not)(s),p("else"));e.pass(a,()=>e.error(!0));function c(){let d=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},s);e.mergeEvaluated(d)}function p(d,f){return()=>{let m=e.subschema({keyword:d},s);t.assign(a,s),e.mergeValidEvaluated(m,a),f?t.assign(f,(0,BC._)`${d}`):e.setParams({ifClause:d})}}}};function Gee(e,t){let r=e.schema[t];return r!==void 0&&!(0,Hee.alwaysValidSchema)(e,r)}k5.default=X6e});var Wee=L(C5=>{"use strict";Object.defineProperty(C5,"__esModule",{value:!0});var Y6e=un(),e3e={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){t.if===void 0&&(0,Y6e.checkStrictMode)(r,`"${e}" without "if" is ignored`)}};C5.default=e3e});var O5=L(P5=>{"use strict";Object.defineProperty(P5,"__esModule",{value:!0});var t3e=_5(),r3e=wee(),n3e=f5(),o3e=Cee(),i3e=Pee(),a3e=RC(),s3e=Ree(),c3e=b5(),l3e=Mee(),u3e=Uee(),p3e=zee(),d3e=Jee(),_3e=Vee(),f3e=Kee(),m3e=Zee(),h3e=Wee();function y3e(e=!1){let t=[p3e.default,d3e.default,_3e.default,f3e.default,m3e.default,h3e.default,s3e.default,c3e.default,a3e.default,l3e.default,u3e.default];return e?t.push(r3e.default,o3e.default):t.push(t3e.default,n3e.default),t.push(i3e.default),t}P5.default=y3e});var F5=L(Hx=>{"use strict";Object.defineProperty(Hx,"__esModule",{value:!0});Hx.dynamicAnchor=void 0;var N5=kr(),g3e=hl(),Qee=Fx(),S3e=kC(),v3e={keyword:"$dynamicAnchor",schemaType:"string",code:e=>Xee(e,e.schema)};function Xee(e,t){let{gen:r,it:n}=e;n.schemaEnv.root.dynamicAnchors[t]=!0;let o=(0,N5._)`${g3e.default.dynamicAnchors}${(0,N5.getProperty)(t)}`,i=n.errSchemaPath==="#"?n.validateName:b3e(e);r.if((0,N5._)`!${o}`,()=>r.assign(o,i))}Hx.dynamicAnchor=Xee;function b3e(e){let{schemaEnv:t,schema:r,self:n}=e.it,{root:o,baseId:i,localRefs:a,meta:s}=t.root,{schemaId:c}=n.opts,p=new Qee.SchemaEnv({schema:r,schemaId:c,root:o,baseId:i,localRefs:a,meta:s});return Qee.compileSchema.call(n,p),(0,S3e.getValidate)(e,p)}Hx.default=v3e});var R5=L(Zx=>{"use strict";Object.defineProperty(Zx,"__esModule",{value:!0});Zx.dynamicRef=void 0;var Yee=kr(),x3e=hl(),ete=kC(),E3e={keyword:"$dynamicRef",schemaType:"string",code:e=>tte(e,e.schema)};function tte(e,t){let{gen:r,keyword:n,it:o}=e;if(t[0]!=="#")throw new Error(`"${n}" only supports hash fragment reference`);let i=t.slice(1);if(o.allErrors)a();else{let c=r.let("valid",!1);a(c),e.ok(c)}function a(c){if(o.schemaEnv.root.dynamicAnchors[i]){let p=r.let("_v",(0,Yee._)`${x3e.default.dynamicAnchors}${(0,Yee.getProperty)(i)}`);r.if(p,s(p,c),s(o.validateName,c))}else s(o.validateName,c)()}function s(c,p){return p?()=>r.block(()=>{(0,ete.callRef)(e,c),r.let(p,!0)}):()=>(0,ete.callRef)(e,c)}}Zx.dynamicRef=tte;Zx.default=E3e});var rte=L(L5=>{"use strict";Object.defineProperty(L5,"__esModule",{value:!0});var T3e=F5(),D3e=un(),A3e={keyword:"$recursiveAnchor",schemaType:"boolean",code(e){e.schema?(0,T3e.dynamicAnchor)(e,""):(0,D3e.checkStrictMode)(e.it,"$recursiveAnchor: false is ignored")}};L5.default=A3e});var nte=L($5=>{"use strict";Object.defineProperty($5,"__esModule",{value:!0});var I3e=R5(),w3e={keyword:"$recursiveRef",schemaType:"string",code:e=>(0,I3e.dynamicRef)(e,e.schema)};$5.default=w3e});var ote=L(M5=>{"use strict";Object.defineProperty(M5,"__esModule",{value:!0});var k3e=F5(),C3e=R5(),P3e=rte(),O3e=nte(),N3e=[k3e.default,C3e.default,P3e.default,O3e.default];M5.default=N3e});var ate=L(j5=>{"use strict";Object.defineProperty(j5,"__esModule",{value:!0});var ite=RC(),F3e={keyword:"dependentRequired",type:"object",schemaType:"object",error:ite.error,code:e=>(0,ite.validatePropertyDeps)(e)};j5.default=F3e});var ste=L(B5=>{"use strict";Object.defineProperty(B5,"__esModule",{value:!0});var R3e=RC(),L3e={keyword:"dependentSchemas",type:"object",schemaType:"object",code:e=>(0,R3e.validateSchemaDeps)(e)};B5.default=L3e});var cte=L(q5=>{"use strict";Object.defineProperty(q5,"__esModule",{value:!0});var $3e=un(),M3e={keyword:["maxContains","minContains"],type:"array",schemaType:"number",code({keyword:e,parentSchema:t,it:r}){t.contains===void 0&&(0,$3e.checkStrictMode)(r,`"${e}" without "contains" is ignored`)}};q5.default=M3e});var lte=L(U5=>{"use strict";Object.defineProperty(U5,"__esModule",{value:!0});var j3e=ate(),B3e=ste(),q3e=cte(),U3e=[j3e.default,B3e.default,q3e.default];U5.default=U3e});var pte=L(z5=>{"use strict";Object.defineProperty(z5,"__esModule",{value:!0});var Qf=kr(),ute=un(),z3e=hl(),J3e={message:"must NOT have unevaluated properties",params:({params:e})=>(0,Qf._)`{unevaluatedProperty: ${e.unevaluatedProperty}}`},V3e={keyword:"unevaluatedProperties",type:"object",schemaType:["boolean","object"],trackErrors:!0,error:J3e,code(e){let{gen:t,schema:r,data:n,errsCount:o,it:i}=e;if(!o)throw new Error("ajv implementation error");let{allErrors:a,props:s}=i;s instanceof Qf.Name?t.if((0,Qf._)`${s} !== true`,()=>t.forIn("key",n,f=>t.if(p(s,f),()=>c(f)))):s!==!0&&t.forIn("key",n,f=>s===void 0?c(f):t.if(d(s,f),()=>c(f))),i.props=!0,e.ok((0,Qf._)`${o} === ${z3e.default.errors}`);function c(f){if(r===!1){e.setParams({unevaluatedProperty:f}),e.error(),a||t.break();return}if(!(0,ute.alwaysValidSchema)(i,r)){let m=t.name("valid");e.subschema({keyword:"unevaluatedProperties",dataProp:f,dataPropType:ute.Type.Str},m),a||t.if((0,Qf.not)(m),()=>t.break())}}function p(f,m){return(0,Qf._)`!${f} || !${f}[${m}]`}function d(f,m){let y=[];for(let g in f)f[g]===!0&&y.push((0,Qf._)`${m} !== ${g}`);return(0,Qf.and)(...y)}}};z5.default=V3e});var _te=L(J5=>{"use strict";Object.defineProperty(J5,"__esModule",{value:!0});var Ly=kr(),dte=un(),K3e={message:({params:{len:e}})=>(0,Ly.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,Ly._)`{limit: ${e}}`},G3e={keyword:"unevaluatedItems",type:"array",schemaType:["boolean","object"],error:K3e,code(e){let{gen:t,schema:r,data:n,it:o}=e,i=o.items||0;if(i===!0)return;let a=t.const("len",(0,Ly._)`${n}.length`);if(r===!1)e.setParams({len:i}),e.fail((0,Ly._)`${a} > ${i}`);else if(typeof r=="object"&&!(0,dte.alwaysValidSchema)(o,r)){let c=t.var("valid",(0,Ly._)`${a} <= ${i}`);t.if((0,Ly.not)(c),()=>s(c,i)),e.ok(c)}o.items=!0;function s(c,p){t.forRange("i",p,a,d=>{e.subschema({keyword:"unevaluatedItems",dataProp:d,dataPropType:dte.Type.Num},c),o.allErrors||t.if((0,Ly.not)(c),()=>t.break())})}}};J5.default=G3e});var fte=L(V5=>{"use strict";Object.defineProperty(V5,"__esModule",{value:!0});var H3e=pte(),Z3e=_te(),W3e=[H3e.default,Z3e.default];V5.default=W3e});var mte=L(K5=>{"use strict";Object.defineProperty(K5,"__esModule",{value:!0});var wi=kr(),Q3e={message:({schemaCode:e})=>(0,wi.str)`must match format "${e}"`,params:({schemaCode:e})=>(0,wi._)`{format: ${e}}`},X3e={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:Q3e,code(e,t){let{gen:r,data:n,$data:o,schema:i,schemaCode:a,it:s}=e,{opts:c,errSchemaPath:p,schemaEnv:d,self:f}=s;if(!c.validateFormats)return;o?m():y();function m(){let g=r.scopeValue("formats",{ref:f.formats,code:c.code.formats}),S=r.const("fDef",(0,wi._)`${g}[${a}]`),b=r.let("fType"),E=r.let("format");r.if((0,wi._)`typeof ${S} == "object" && !(${S} instanceof RegExp)`,()=>r.assign(b,(0,wi._)`${S}.type || "string"`).assign(E,(0,wi._)`${S}.validate`),()=>r.assign(b,(0,wi._)`"string"`).assign(E,S)),e.fail$data((0,wi.or)(I(),T()));function I(){return c.strictSchema===!1?wi.nil:(0,wi._)`${a} && !${E}`}function T(){let k=d.$async?(0,wi._)`(${S}.async ? await ${E}(${n}) : ${E}(${n}))`:(0,wi._)`${E}(${n})`,F=(0,wi._)`(typeof ${E} == "function" ? ${k} : ${E}.test(${n}))`;return(0,wi._)`${E} && ${E} !== true && ${b} === ${t} && !${F}`}}function y(){let g=f.formats[i];if(!g){I();return}if(g===!0)return;let[S,b,E]=T(g);S===t&&e.pass(k());function I(){if(c.strictSchema===!1){f.logger.warn(F());return}throw new Error(F());function F(){return`unknown format "${i}" ignored in schema at path "${p}"`}}function T(F){let O=F instanceof RegExp?(0,wi.regexpCode)(F):c.code.formats?(0,wi._)`${c.code.formats}${(0,wi.getProperty)(i)}`:void 0,$=r.scopeValue("formats",{key:i,ref:F,code:O});return typeof F=="object"&&!(F instanceof RegExp)?[F.type||"string",F.validate,(0,wi._)`${$}.validate`]:["string",F,$]}function k(){if(typeof g=="object"&&!(g instanceof RegExp)&&g.async){if(!d.$async)throw new Error("async format in sync schema");return(0,wi._)`await ${E}(${n})`}return typeof b=="function"?(0,wi._)`${E}(${n})`:(0,wi._)`${E}.test(${n})`}}}};K5.default=X3e});var H5=L(G5=>{"use strict";Object.defineProperty(G5,"__esModule",{value:!0});var Y3e=mte(),eOe=[Y3e.default];G5.default=eOe});var Z5=L(y0=>{"use strict";Object.defineProperty(y0,"__esModule",{value:!0});y0.contentVocabulary=y0.metadataVocabulary=void 0;y0.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];y0.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var yte=L(W5=>{"use strict";Object.defineProperty(W5,"__esModule",{value:!0});var tOe=Z9(),rOe=p5(),nOe=O5(),oOe=ote(),iOe=lte(),aOe=fte(),sOe=H5(),hte=Z5(),cOe=[oOe.default,tOe.default,rOe.default,(0,nOe.default)(!0),sOe.default,hte.metadataVocabulary,hte.contentVocabulary,iOe.default,aOe.default];W5.default=cOe});var Ste=L(qC=>{"use strict";Object.defineProperty(qC,"__esModule",{value:!0});qC.DiscrError=void 0;var gte;(function(e){e.Tag="tag",e.Mapping="mapping"})(gte||(qC.DiscrError=gte={}))});var Y5=L(X5=>{"use strict";Object.defineProperty(X5,"__esModule",{value:!0});var g0=kr(),Q5=Ste(),vte=Fx(),lOe=d0(),uOe=un(),pOe={message:({params:{discrError:e,tagName:t}})=>e===Q5.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:r}})=>(0,g0._)`{error: ${e}, tag: ${r}, tagValue: ${t}}`},dOe={keyword:"discriminator",type:"object",schemaType:"object",error:pOe,code(e){let{gen:t,data:r,schema:n,parentSchema:o,it:i}=e,{oneOf:a}=o;if(!i.opts.discriminator)throw new Error("discriminator: requires discriminator option");let s=n.propertyName;if(typeof s!="string")throw new Error("discriminator: requires propertyName");if(n.mapping)throw new Error("discriminator: mapping is not supported");if(!a)throw new Error("discriminator: requires oneOf keyword");let c=t.let("valid",!1),p=t.const("tag",(0,g0._)`${r}${(0,g0.getProperty)(s)}`);t.if((0,g0._)`typeof ${p} == "string"`,()=>d(),()=>e.error(!1,{discrError:Q5.DiscrError.Tag,tag:p,tagName:s})),e.ok(c);function d(){let y=m();t.if(!1);for(let g in y)t.elseIf((0,g0._)`${p} === ${g}`),t.assign(c,f(y[g]));t.else(),e.error(!1,{discrError:Q5.DiscrError.Mapping,tag:p,tagName:s}),t.endIf()}function f(y){let g=t.name("valid"),S=e.subschema({keyword:"oneOf",schemaProp:y},g);return e.mergeEvaluated(S,g0.Name),g}function m(){var y;let g={},S=E(o),b=!0;for(let k=0;k{_Oe.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/schema",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/core":!0,"https://json-schema.org/draft/2020-12/vocab/applicator":!0,"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0,"https://json-schema.org/draft/2020-12/vocab/validation":!0,"https://json-schema.org/draft/2020-12/vocab/meta-data":!0,"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0,"https://json-schema.org/draft/2020-12/vocab/content":!0},$dynamicAnchor:"meta",title:"Core and Validation specifications meta-schema",allOf:[{$ref:"meta/core"},{$ref:"meta/applicator"},{$ref:"meta/unevaluated"},{$ref:"meta/validation"},{$ref:"meta/meta-data"},{$ref:"meta/format-annotation"},{$ref:"meta/content"}],type:["object","boolean"],$comment:"This meta-schema also defines keywords that have appeared in previous drafts in order to prevent incompatible extensions as they remain in common use.",properties:{definitions:{$comment:'"definitions" has been replaced by "$defs".',type:"object",additionalProperties:{$dynamicRef:"#meta"},deprecated:!0,default:{}},dependencies:{$comment:'"dependencies" has been split and replaced by "dependentSchemas" and "dependentRequired" in order to serve their differing semantics.',type:"object",additionalProperties:{anyOf:[{$dynamicRef:"#meta"},{$ref:"meta/validation#/$defs/stringArray"}]},deprecated:!0,default:{}},$recursiveAnchor:{$comment:'"$recursiveAnchor" has been replaced by "$dynamicAnchor".',$ref:"meta/core#/$defs/anchorString",deprecated:!0},$recursiveRef:{$comment:'"$recursiveRef" has been replaced by "$dynamicRef".',$ref:"meta/core#/$defs/uriReferenceString",deprecated:!0}}}});var xte=L((rkt,fOe)=>{fOe.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/applicator",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/applicator":!0},$dynamicAnchor:"meta",title:"Applicator vocabulary meta-schema",type:["object","boolean"],properties:{prefixItems:{$ref:"#/$defs/schemaArray"},items:{$dynamicRef:"#meta"},contains:{$dynamicRef:"#meta"},additionalProperties:{$dynamicRef:"#meta"},properties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},patternProperties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},propertyNames:{format:"regex"},default:{}},dependentSchemas:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},propertyNames:{$dynamicRef:"#meta"},if:{$dynamicRef:"#meta"},then:{$dynamicRef:"#meta"},else:{$dynamicRef:"#meta"},allOf:{$ref:"#/$defs/schemaArray"},anyOf:{$ref:"#/$defs/schemaArray"},oneOf:{$ref:"#/$defs/schemaArray"},not:{$dynamicRef:"#meta"}},$defs:{schemaArray:{type:"array",minItems:1,items:{$dynamicRef:"#meta"}}}}});var Ete=L((nkt,mOe)=>{mOe.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/unevaluated",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0},$dynamicAnchor:"meta",title:"Unevaluated applicator vocabulary meta-schema",type:["object","boolean"],properties:{unevaluatedItems:{$dynamicRef:"#meta"},unevaluatedProperties:{$dynamicRef:"#meta"}}}});var Tte=L((okt,hOe)=>{hOe.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/content",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/content":!0},$dynamicAnchor:"meta",title:"Content vocabulary meta-schema",type:["object","boolean"],properties:{contentEncoding:{type:"string"},contentMediaType:{type:"string"},contentSchema:{$dynamicRef:"#meta"}}}});var Dte=L((ikt,yOe)=>{yOe.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/core",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/core":!0},$dynamicAnchor:"meta",title:"Core vocabulary meta-schema",type:["object","boolean"],properties:{$id:{$ref:"#/$defs/uriReferenceString",$comment:"Non-empty fragments not allowed.",pattern:"^[^#]*#?$"},$schema:{$ref:"#/$defs/uriString"},$ref:{$ref:"#/$defs/uriReferenceString"},$anchor:{$ref:"#/$defs/anchorString"},$dynamicRef:{$ref:"#/$defs/uriReferenceString"},$dynamicAnchor:{$ref:"#/$defs/anchorString"},$vocabulary:{type:"object",propertyNames:{$ref:"#/$defs/uriString"},additionalProperties:{type:"boolean"}},$comment:{type:"string"},$defs:{type:"object",additionalProperties:{$dynamicRef:"#meta"}}},$defs:{anchorString:{type:"string",pattern:"^[A-Za-z_][-A-Za-z0-9._]*$"},uriString:{type:"string",format:"uri"},uriReferenceString:{type:"string",format:"uri-reference"}}}});var Ate=L((akt,gOe)=>{gOe.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/format-annotation",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0},$dynamicAnchor:"meta",title:"Format vocabulary meta-schema for annotation results",type:["object","boolean"],properties:{format:{type:"string"}}}});var Ite=L((skt,SOe)=>{SOe.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/meta-data",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/meta-data":!0},$dynamicAnchor:"meta",title:"Meta-data vocabulary meta-schema",type:["object","boolean"],properties:{title:{type:"string"},description:{type:"string"},default:!0,deprecated:{type:"boolean",default:!1},readOnly:{type:"boolean",default:!1},writeOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0}}}});var wte=L((ckt,vOe)=>{vOe.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/validation",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/validation":!0},$dynamicAnchor:"meta",title:"Validation vocabulary meta-schema",type:["object","boolean"],properties:{type:{anyOf:[{$ref:"#/$defs/simpleTypes"},{type:"array",items:{$ref:"#/$defs/simpleTypes"},minItems:1,uniqueItems:!0}]},const:!0,enum:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/$defs/nonNegativeInteger"},minLength:{$ref:"#/$defs/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},maxItems:{$ref:"#/$defs/nonNegativeInteger"},minItems:{$ref:"#/$defs/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxContains:{$ref:"#/$defs/nonNegativeInteger"},minContains:{$ref:"#/$defs/nonNegativeInteger",default:1},maxProperties:{$ref:"#/$defs/nonNegativeInteger"},minProperties:{$ref:"#/$defs/nonNegativeIntegerDefault0"},required:{$ref:"#/$defs/stringArray"},dependentRequired:{type:"object",additionalProperties:{$ref:"#/$defs/stringArray"}}},$defs:{nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{$ref:"#/$defs/nonNegativeInteger",default:0},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}}}});var kte=L(eL=>{"use strict";Object.defineProperty(eL,"__esModule",{value:!0});var bOe=bte(),xOe=xte(),EOe=Ete(),TOe=Tte(),DOe=Dte(),AOe=Ate(),IOe=Ite(),wOe=wte(),kOe=["/properties"];function COe(e){return[bOe,xOe,EOe,TOe,DOe,t(this,AOe),IOe,t(this,wOe)].forEach(r=>this.addMetaSchema(r,void 0,!1)),this;function t(r,n){return e?r.$dataMetaSchema(n,kOe):n}}eL.default=COe});var Cte=L((Vo,rL)=>{"use strict";Object.defineProperty(Vo,"__esModule",{value:!0});Vo.MissingRefError=Vo.ValidationError=Vo.CodeGen=Vo.Name=Vo.nil=Vo.stringify=Vo.str=Vo._=Vo.KeywordCxt=Vo.Ajv2020=void 0;var POe=K9(),OOe=yte(),NOe=Y5(),FOe=kte(),tL="https://json-schema.org/draft/2020-12/schema",S0=class extends POe.default{constructor(t={}){super({...t,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),OOe.default.forEach(t=>this.addVocabulary(t)),this.opts.discriminator&&this.addKeyword(NOe.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();let{$data:t,meta:r}=this.opts;r&&(FOe.default.call(this,t),this.refs["http://json-schema.org/schema"]=tL)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(tL)?tL:void 0)}};Vo.Ajv2020=S0;rL.exports=Vo=S0;rL.exports.Ajv2020=S0;Object.defineProperty(Vo,"__esModule",{value:!0});Vo.default=S0;var ROe=p0();Object.defineProperty(Vo,"KeywordCxt",{enumerable:!0,get:function(){return ROe.KeywordCxt}});var v0=kr();Object.defineProperty(Vo,"_",{enumerable:!0,get:function(){return v0._}});Object.defineProperty(Vo,"str",{enumerable:!0,get:function(){return v0.str}});Object.defineProperty(Vo,"stringify",{enumerable:!0,get:function(){return v0.stringify}});Object.defineProperty(Vo,"nil",{enumerable:!0,get:function(){return v0.nil}});Object.defineProperty(Vo,"Name",{enumerable:!0,get:function(){return v0.Name}});Object.defineProperty(Vo,"CodeGen",{enumerable:!0,get:function(){return v0.CodeGen}});var LOe=Nx();Object.defineProperty(Vo,"ValidationError",{enumerable:!0,get:function(){return LOe.default}});var $Oe=d0();Object.defineProperty(Vo,"MissingRefError",{enumerable:!0,get:function(){return $Oe.default}})});var bie=L(Sj=>{"use strict";Object.defineProperty(Sj,"__esModule",{value:!0});var f9e=Z9(),m9e=p5(),h9e=O5(),y9e=H5(),vie=Z5(),g9e=[f9e.default,m9e.default,(0,h9e.default)(),y9e.default,vie.metadataVocabulary,vie.contentVocabulary];Sj.default=g9e});var xie=L((QRt,S9e)=>{S9e.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}});var bj=L((Go,vj)=>{"use strict";Object.defineProperty(Go,"__esModule",{value:!0});Go.MissingRefError=Go.ValidationError=Go.CodeGen=Go.Name=Go.nil=Go.stringify=Go.str=Go._=Go.KeywordCxt=Go.Ajv=void 0;var v9e=K9(),b9e=bie(),x9e=Y5(),Eie=xie(),E9e=["/properties"],p6="http://json-schema.org/draft-07/schema",Q0=class extends v9e.default{_addVocabularies(){super._addVocabularies(),b9e.default.forEach(t=>this.addVocabulary(t)),this.opts.discriminator&&this.addKeyword(x9e.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let t=this.opts.$data?this.$dataMetaSchema(Eie,E9e):Eie;this.addMetaSchema(t,p6,!1),this.refs["http://json-schema.org/schema"]=p6}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(p6)?p6:void 0)}};Go.Ajv=Q0;vj.exports=Go=Q0;vj.exports.Ajv=Q0;Object.defineProperty(Go,"__esModule",{value:!0});Go.default=Q0;var T9e=p0();Object.defineProperty(Go,"KeywordCxt",{enumerable:!0,get:function(){return T9e.KeywordCxt}});var X0=kr();Object.defineProperty(Go,"_",{enumerable:!0,get:function(){return X0._}});Object.defineProperty(Go,"str",{enumerable:!0,get:function(){return X0.str}});Object.defineProperty(Go,"stringify",{enumerable:!0,get:function(){return X0.stringify}});Object.defineProperty(Go,"nil",{enumerable:!0,get:function(){return X0.nil}});Object.defineProperty(Go,"Name",{enumerable:!0,get:function(){return X0.Name}});Object.defineProperty(Go,"CodeGen",{enumerable:!0,get:function(){return X0.CodeGen}});var D9e=Nx();Object.defineProperty(Go,"ValidationError",{enumerable:!0,get:function(){return D9e.default}});var A9e=d0();Object.defineProperty(Go,"MissingRefError",{enumerable:!0,get:function(){return A9e.default}})});var Pie=L(Ap=>{"use strict";Object.defineProperty(Ap,"__esModule",{value:!0});Ap.formatNames=Ap.fastFormats=Ap.fullFormats=void 0;function Dp(e,t){return{validate:e,compare:t}}Ap.fullFormats={date:Dp(Iie,Dj),time:Dp(Ej(!0),Aj),"date-time":Dp(Tie(!0),kie),"iso-time":Dp(Ej(),wie),"iso-date-time":Dp(Tie(),Cie),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:O9e,"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":/^(?:(?:[^\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,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:j9e,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:N9e,int32:{type:"number",validate:L9e},int64:{type:"number",validate:$9e},float:{type:"number",validate:Aie},double:{type:"number",validate:Aie},password:!0,binary:!0};Ap.fastFormats={...Ap.fullFormats,date:Dp(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,Dj),time:Dp(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,Aj),"date-time":Dp(/^\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,kie),"iso-time":Dp(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,wie),"iso-date-time":Dp(/^\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,Cie),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};Ap.formatNames=Object.keys(Ap.fullFormats);function I9e(e){return e%4===0&&(e%100!==0||e%400===0)}var w9e=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,k9e=[0,31,28,31,30,31,30,31,31,30,31,30,31];function Iie(e){let t=w9e.exec(e);if(!t)return!1;let r=+t[1],n=+t[2],o=+t[3];return n>=1&&n<=12&&o>=1&&o<=(n===2&&I9e(r)?29:k9e[n])}function Dj(e,t){if(e&&t)return e>t?1:e23||d>59||e&&!s)return!1;if(o<=23&&i<=59&&a<60)return!0;let f=i-d*c,m=o-p*c-(f<0?1:0);return(m===23||m===-1)&&(f===59||f===-1)&&a<61}}function Aj(e,t){if(!(e&&t))return;let r=new Date("2020-01-01T"+e).valueOf(),n=new Date("2020-01-01T"+t).valueOf();if(r&&n)return r-n}function wie(e,t){if(!(e&&t))return;let r=xj.exec(e),n=xj.exec(t);if(r&&n)return e=r[1]+r[2]+r[3],t=n[1]+n[2]+n[3],e>t?1:e=F9e}function $9e(e){return Number.isInteger(e)}function Aie(){return!0}var M9e=/[^\\]\\Z/;function j9e(e){if(M9e.test(e))return!1;try{return new RegExp(e),!0}catch{return!1}}});var Oie=L(Y0=>{"use strict";Object.defineProperty(Y0,"__esModule",{value:!0});Y0.formatLimitDefinition=void 0;var B9e=bj(),Eu=kr(),lm=Eu.operators,d6={formatMaximum:{okStr:"<=",ok:lm.LTE,fail:lm.GT},formatMinimum:{okStr:">=",ok:lm.GTE,fail:lm.LT},formatExclusiveMaximum:{okStr:"<",ok:lm.LT,fail:lm.GTE},formatExclusiveMinimum:{okStr:">",ok:lm.GT,fail:lm.LTE}},q9e={message:({keyword:e,schemaCode:t})=>(0,Eu.str)`should be ${d6[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,Eu._)`{comparison: ${d6[e].okStr}, limit: ${t}}`};Y0.formatLimitDefinition={keyword:Object.keys(d6),type:"string",schemaType:"string",$data:!0,error:q9e,code(e){let{gen:t,data:r,schemaCode:n,keyword:o,it:i}=e,{opts:a,self:s}=i;if(!a.validateFormats)return;let c=new B9e.KeywordCxt(i,s.RULES.all.format.definition,"format");c.$data?p():d();function p(){let m=t.scopeValue("formats",{ref:s.formats,code:a.code.formats}),y=t.const("fmt",(0,Eu._)`${m}[${c.schemaCode}]`);e.fail$data((0,Eu.or)((0,Eu._)`typeof ${y} != "object"`,(0,Eu._)`${y} instanceof RegExp`,(0,Eu._)`typeof ${y}.compare != "function"`,f(y)))}function d(){let m=c.schema,y=s.formats[m];if(!y||y===!0)return;if(typeof y!="object"||y instanceof RegExp||typeof y.compare!="function")throw new Error(`"${o}": format "${m}" does not define "compare" function`);let g=t.scopeValue("formats",{key:m,ref:y,code:a.code.formats?(0,Eu._)`${a.code.formats}${(0,Eu.getProperty)(m)}`:void 0});e.fail$data(f(g))}function f(m){return(0,Eu._)`${m}.compare(${r}, ${n}) ${d6[o].fail} 0`}},dependencies:["format"]};var U9e=e=>(e.addKeyword(Y0.formatLimitDefinition),e);Y0.default=U9e});var Lie=L((dT,Rie)=>{"use strict";Object.defineProperty(dT,"__esModule",{value:!0});var ev=Pie(),z9e=Oie(),Ij=kr(),Nie=new Ij.Name("fullFormats"),J9e=new Ij.Name("fastFormats"),wj=(e,t={keywords:!0})=>{if(Array.isArray(t))return Fie(e,t,ev.fullFormats,Nie),e;let[r,n]=t.mode==="fast"?[ev.fastFormats,J9e]:[ev.fullFormats,Nie],o=t.formats||ev.formatNames;return Fie(e,o,r,n),t.keywords&&(0,z9e.default)(e),e};wj.get=(e,t="full")=>{let n=(t==="fast"?ev.fastFormats:ev.fullFormats)[e];if(!n)throw new Error(`Unknown format "${e}"`);return n};function Fie(e,t,r,n){var o,i;(o=(i=e.opts.code).formats)!==null&&o!==void 0||(i.formats=(0,Ij._)`require("ajv-formats/dist/formats").${n}`);for(let a of t)e.addFormat(a,r[a])}Rie.exports=dT=wj;Object.defineProperty(dT,"__esModule",{value:!0});dT.default=wj});var cae=L((N8t,sae)=>{sae.exports=aae;aae.sync=x5e;var oae=fl("fs");function b5e(e,t){var r=t.pathExt!==void 0?t.pathExt:process.env.PATHEXT;if(!r||(r=r.split(";"),r.indexOf("")!==-1))return!0;for(var n=0;n{dae.exports=uae;uae.sync=E5e;var lae=fl("fs");function uae(e,t,r){lae.stat(e,function(n,o){r(n,n?!1:pae(o,t))})}function E5e(e,t){return pae(lae.statSync(e),t)}function pae(e,t){return e.isFile()&&T5e(e,t)}function T5e(e,t){var r=e.mode,n=e.uid,o=e.gid,i=t.uid!==void 0?t.uid:process.getuid&&process.getuid(),a=t.gid!==void 0?t.gid:process.getgid&&process.getgid(),s=parseInt("100",8),c=parseInt("010",8),p=parseInt("001",8),d=s|c,f=r&p||r&c&&o===a||r&s&&n===i||r&d&&i===0;return f}});var mae=L((L8t,fae)=>{var R8t=fl("fs"),T6;process.platform==="win32"||global.TESTING_WINDOWS?T6=cae():T6=_ae();fae.exports=Hj;Hj.sync=D5e;function Hj(e,t,r){if(typeof t=="function"&&(r=t,t={}),!r){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(n,o){Hj(e,t||{},function(i,a){i?o(i):n(a)})})}T6(e,t||{},function(n,o){n&&(n.code==="EACCES"||t&&t.ignoreErrors)&&(n=null,o=!1),r(n,o)})}function D5e(e,t){try{return T6.sync(e,t||{})}catch(r){if(t&&t.ignoreErrors||r.code==="EACCES")return!1;throw r}}});var xae=L(($8t,bae)=>{var cv=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",hae=fl("path"),A5e=cv?";":":",yae=mae(),gae=e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"}),Sae=(e,t)=>{let r=t.colon||A5e,n=e.match(/\//)||cv&&e.match(/\\/)?[""]:[...cv?[process.cwd()]:[],...(t.path||process.env.PATH||"").split(r)],o=cv?t.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",i=cv?o.split(r):[""];return cv&&e.indexOf(".")!==-1&&i[0]!==""&&i.unshift(""),{pathEnv:n,pathExt:i,pathExtExe:o}},vae=(e,t,r)=>{typeof t=="function"&&(r=t,t={}),t||(t={});let{pathEnv:n,pathExt:o,pathExtExe:i}=Sae(e,t),a=[],s=p=>new Promise((d,f)=>{if(p===n.length)return t.all&&a.length?d(a):f(gae(e));let m=n[p],y=/^".*"$/.test(m)?m.slice(1,-1):m,g=hae.join(y,e),S=!y&&/^\.[\\\/]/.test(e)?e.slice(0,2)+g:g;d(c(S,p,0))}),c=(p,d,f)=>new Promise((m,y)=>{if(f===o.length)return m(s(d+1));let g=o[f];yae(p+g,{pathExt:i},(S,b)=>{if(!S&&b)if(t.all)a.push(p+g);else return m(p+g);return m(c(p,d,f+1))})});return r?s(0).then(p=>r(null,p),r):s(0)},I5e=(e,t)=>{t=t||{};let{pathEnv:r,pathExt:n,pathExtExe:o}=Sae(e,t),i=[];for(let a=0;a{"use strict";var Eae=(e={})=>{let t=e.env||process.env;return(e.platform||process.platform)!=="win32"?"PATH":Object.keys(t).reverse().find(n=>n.toUpperCase()==="PATH")||"Path"};Zj.exports=Eae;Zj.exports.default=Eae});var wae=L((j8t,Iae)=>{"use strict";var Dae=fl("path"),w5e=xae(),k5e=Tae();function Aae(e,t){let r=e.options.env||process.env,n=process.cwd(),o=e.options.cwd!=null,i=o&&process.chdir!==void 0&&!process.chdir.disabled;if(i)try{process.chdir(e.options.cwd)}catch{}let a;try{a=w5e.sync(e.command,{path:r[k5e({env:r})],pathExt:t?Dae.delimiter:void 0})}catch{}finally{i&&process.chdir(n)}return a&&(a=Dae.resolve(o?e.options.cwd:"",a)),a}function C5e(e){return Aae(e)||Aae(e,!0)}Iae.exports=C5e});var kae=L((B8t,Qj)=>{"use strict";var Wj=/([()\][%!^"`<>&|;, *?])/g;function P5e(e){return e=e.replace(Wj,"^$1"),e}function O5e(e,t){return e=`${e}`,e=e.replace(/(?=(\\+?)?)\1"/g,'$1$1\\"'),e=e.replace(/(?=(\\+?)?)\1$/,"$1$1"),e=`"${e}"`,e=e.replace(Wj,"^$1"),t&&(e=e.replace(Wj,"^$1")),e}Qj.exports.command=P5e;Qj.exports.argument=O5e});var Pae=L((q8t,Cae)=>{"use strict";Cae.exports=/^#!(.*)/});var Nae=L((U8t,Oae)=>{"use strict";var N5e=Pae();Oae.exports=(e="")=>{let t=e.match(N5e);if(!t)return null;let[r,n]=t[0].replace(/#! ?/,"").split(" "),o=r.split("/").pop();return o==="env"?n:n?`${o} ${n}`:o}});var Rae=L((z8t,Fae)=>{"use strict";var Xj=fl("fs"),F5e=Nae();function R5e(e){let r=Buffer.alloc(150),n;try{n=Xj.openSync(e,"r"),Xj.readSync(n,r,0,150,0),Xj.closeSync(n)}catch{}return F5e(r.toString())}Fae.exports=R5e});var jae=L((J8t,Mae)=>{"use strict";var L5e=fl("path"),Lae=wae(),$ae=kae(),$5e=Rae(),M5e=process.platform==="win32",j5e=/\.(?:com|exe)$/i,B5e=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function q5e(e){e.file=Lae(e);let t=e.file&&$5e(e.file);return t?(e.args.unshift(e.file),e.command=t,Lae(e)):e.file}function U5e(e){if(!M5e)return e;let t=q5e(e),r=!j5e.test(t);if(e.options.forceShell||r){let n=B5e.test(t);e.command=L5e.normalize(e.command),e.command=$ae.command(e.command),e.args=e.args.map(i=>$ae.argument(i,n));let o=[e.command].concat(e.args).join(" ");e.args=["/d","/s","/c",`"${o}"`],e.command=process.env.comspec||"cmd.exe",e.options.windowsVerbatimArguments=!0}return e}function z5e(e,t,r){t&&!Array.isArray(t)&&(r=t,t=null),t=t?t.slice(0):[],r=Object.assign({},r);let n={command:e,args:t,options:r,file:void 0,original:{command:e,args:t}};return r.shell?n:U5e(n)}Mae.exports=z5e});var Uae=L((V8t,qae)=>{"use strict";var Yj=process.platform==="win32";function eB(e,t){return Object.assign(new Error(`${t} ${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${t} ${e.command}`,path:e.command,spawnargs:e.args})}function J5e(e,t){if(!Yj)return;let r=e.emit;e.emit=function(n,o){if(n==="exit"){let i=Bae(o,t);if(i)return r.call(e,"error",i)}return r.apply(e,arguments)}}function Bae(e,t){return Yj&&e===1&&!t.file?eB(t.original,"spawn"):null}function V5e(e,t){return Yj&&e===1&&!t.file?eB(t.original,"spawnSync"):null}qae.exports={hookChildProcess:J5e,verifyENOENT:Bae,verifyENOENTSync:V5e,notFoundError:eB}});var Vae=L((K8t,lv)=>{"use strict";var zae=fl("child_process"),tB=jae(),rB=Uae();function Jae(e,t,r){let n=tB(e,t,r),o=zae.spawn(n.command,n.args,n.options);return rB.hookChildProcess(o,n),o}function K5e(e,t,r){let n=tB(e,t,r),o=zae.spawnSync(n.command,n.args,n.options);return o.error=o.error||rB.verifyENOENTSync(o.status,n),o}lv.exports=Jae;lv.exports.spawn=Jae;lv.exports.sync=K5e;lv.exports._parse=tB;lv.exports._enoent=rB});var yge=L(I1=>{"use strict";Object.defineProperty(I1,"__esModule",{value:!0});I1.versionInfo=I1.version=void 0;var dct="16.13.1";I1.version=dct;var _ct=Object.freeze({major:16,minor:13,patch:1,preReleaseTag:null});I1.versionInfo=_ct});var Ls=L(sV=>{"use strict";Object.defineProperty(sV,"__esModule",{value:!0});sV.devAssert=fct;function fct(e,t){if(!!!e)throw new Error(t)}});var OO=L(cV=>{"use strict";Object.defineProperty(cV,"__esModule",{value:!0});cV.isPromise=mct;function mct(e){return typeof e?.then=="function"}});var yd=L(lV=>{"use strict";Object.defineProperty(lV,"__esModule",{value:!0});lV.isObjectLike=hct;function hct(e){return typeof e=="object"&&e!==null}});var us=L(uV=>{"use strict";Object.defineProperty(uV,"__esModule",{value:!0});uV.invariant=yct;function yct(e,t){if(!!!e)throw new Error(t??"Unexpected invariant triggered.")}});var NO=L(pV=>{"use strict";Object.defineProperty(pV,"__esModule",{value:!0});pV.getLocation=vct;var gct=us(),Sct=/\r\n|[\n\r]/g;function vct(e,t){let r=0,n=1;for(let o of e.body.matchAll(Sct)){if(typeof o.index=="number"||(0,gct.invariant)(!1),o.index>=t)break;r=o.index+o[0].length,n+=1}return{line:n,column:t+1-r}}});var dV=L(FO=>{"use strict";Object.defineProperty(FO,"__esModule",{value:!0});FO.printLocation=xct;FO.printSourceLocation=Sge;var bct=NO();function xct(e){return Sge(e.source,(0,bct.getLocation)(e.source,e.start))}function Sge(e,t){let r=e.locationOffset.column-1,n="".padStart(r)+e.body,o=t.line-1,i=e.locationOffset.line-1,a=t.line+i,s=t.line===1?r:0,c=t.column+s,p=`${e.name}:${a}:${c} +`,d=n.split(/\r\n|[\n\r]/g),f=d[o];if(f.length>120){let m=Math.floor(c/80),y=c%80,g=[];for(let S=0;S["|",S]),["|","^".padStart(y)],["|",g[m+1]]])}return p+gge([[`${a-1} |`,d[o-1]],[`${a} |`,f],["|","^".padStart(c)],[`${a+1} |`,d[o+1]]])}function gge(e){let t=e.filter(([n,o])=>o!==void 0),r=Math.max(...t.map(([n])=>n.length));return t.map(([n,o])=>n.padStart(r)+(o?" "+o:"")).join(` +`)}});var ar=L(w1=>{"use strict";Object.defineProperty(w1,"__esModule",{value:!0});w1.GraphQLError=void 0;w1.formatError=Act;w1.printError=Dct;var Ect=yd(),vge=NO(),bge=dV();function Tct(e){let t=e[0];return t==null||"kind"in t||"length"in t?{nodes:t,source:e[1],positions:e[2],path:e[3],originalError:e[4],extensions:e[5]}:t}var _V=class e extends Error{constructor(t,...r){var n,o,i;let{nodes:a,source:s,positions:c,path:p,originalError:d,extensions:f}=Tct(r);super(t),this.name="GraphQLError",this.path=p??void 0,this.originalError=d??void 0,this.nodes=xge(Array.isArray(a)?a:a?[a]:void 0);let m=xge((n=this.nodes)===null||n===void 0?void 0:n.map(g=>g.loc).filter(g=>g!=null));this.source=s??(m==null||(o=m[0])===null||o===void 0?void 0:o.source),this.positions=c??m?.map(g=>g.start),this.locations=c&&s?c.map(g=>(0,vge.getLocation)(s,g)):m?.map(g=>(0,vge.getLocation)(g.source,g.start));let y=(0,Ect.isObjectLike)(d?.extensions)?d?.extensions:void 0;this.extensions=(i=f??y)!==null&&i!==void 0?i:Object.create(null),Object.defineProperties(this,{message:{writable:!0,enumerable:!0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),d!=null&&d.stack?Object.defineProperty(this,"stack",{value:d.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,e):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let t=this.message;if(this.nodes)for(let r of this.nodes)r.loc&&(t+=` + +`+(0,bge.printLocation)(r.loc));else if(this.source&&this.locations)for(let r of this.locations)t+=` + +`+(0,bge.printSourceLocation)(this.source,r);return t}toJSON(){let t={message:this.message};return this.locations!=null&&(t.locations=this.locations),this.path!=null&&(t.path=this.path),this.extensions!=null&&Object.keys(this.extensions).length>0&&(t.extensions=this.extensions),t}};w1.GraphQLError=_V;function xge(e){return e===void 0||e.length===0?void 0:e}function Dct(e){return e.toString()}function Act(e){return e.toJSON()}});var lA=L(fV=>{"use strict";Object.defineProperty(fV,"__esModule",{value:!0});fV.syntaxError=wct;var Ict=ar();function wct(e,t,r){return new Ict.GraphQLError(`Syntax Error: ${r}`,{source:e,positions:[t]})}});var ql=L(Bl=>{"use strict";Object.defineProperty(Bl,"__esModule",{value:!0});Bl.Token=Bl.QueryDocumentKeys=Bl.OperationTypeNode=Bl.Location=void 0;Bl.isNode=Cct;var mV=class{constructor(t,r,n){this.start=t.start,this.end=r.end,this.startToken=t,this.endToken=r,this.source=n}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}};Bl.Location=mV;var hV=class{constructor(t,r,n,o,i,a){this.kind=t,this.start=r,this.end=n,this.line=o,this.column=i,this.value=a,this.prev=null,this.next=null}get[Symbol.toStringTag](){return"Token"}toJSON(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}};Bl.Token=hV;var Ege={Name:[],Document:["definitions"],OperationDefinition:["description","name","variableDefinitions","directives","selectionSet"],VariableDefinition:["description","variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["description","name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"],TypeCoordinate:["name"],MemberCoordinate:["name","memberName"],ArgumentCoordinate:["name","fieldName","argumentName"],DirectiveCoordinate:["name"],DirectiveArgumentCoordinate:["name","argumentName"]};Bl.QueryDocumentKeys=Ege;var kct=new Set(Object.keys(Ege));function Cct(e){let t=e?.kind;return typeof t=="string"&&kct.has(t)}var yV;Bl.OperationTypeNode=yV;(function(e){e.QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription"})(yV||(Bl.OperationTypeNode=yV={}))});var k1=L(uA=>{"use strict";Object.defineProperty(uA,"__esModule",{value:!0});uA.DirectiveLocation=void 0;var gV;uA.DirectiveLocation=gV;(function(e){e.QUERY="QUERY",e.MUTATION="MUTATION",e.SUBSCRIPTION="SUBSCRIPTION",e.FIELD="FIELD",e.FRAGMENT_DEFINITION="FRAGMENT_DEFINITION",e.FRAGMENT_SPREAD="FRAGMENT_SPREAD",e.INLINE_FRAGMENT="INLINE_FRAGMENT",e.VARIABLE_DEFINITION="VARIABLE_DEFINITION",e.SCHEMA="SCHEMA",e.SCALAR="SCALAR",e.OBJECT="OBJECT",e.FIELD_DEFINITION="FIELD_DEFINITION",e.ARGUMENT_DEFINITION="ARGUMENT_DEFINITION",e.INTERFACE="INTERFACE",e.UNION="UNION",e.ENUM="ENUM",e.ENUM_VALUE="ENUM_VALUE",e.INPUT_OBJECT="INPUT_OBJECT",e.INPUT_FIELD_DEFINITION="INPUT_FIELD_DEFINITION"})(gV||(uA.DirectiveLocation=gV={}))});var Sn=L(pA=>{"use strict";Object.defineProperty(pA,"__esModule",{value:!0});pA.Kind=void 0;var SV;pA.Kind=SV;(function(e){e.NAME="Name",e.DOCUMENT="Document",e.OPERATION_DEFINITION="OperationDefinition",e.VARIABLE_DEFINITION="VariableDefinition",e.SELECTION_SET="SelectionSet",e.FIELD="Field",e.ARGUMENT="Argument",e.FRAGMENT_SPREAD="FragmentSpread",e.INLINE_FRAGMENT="InlineFragment",e.FRAGMENT_DEFINITION="FragmentDefinition",e.VARIABLE="Variable",e.INT="IntValue",e.FLOAT="FloatValue",e.STRING="StringValue",e.BOOLEAN="BooleanValue",e.NULL="NullValue",e.ENUM="EnumValue",e.LIST="ListValue",e.OBJECT="ObjectValue",e.OBJECT_FIELD="ObjectField",e.DIRECTIVE="Directive",e.NAMED_TYPE="NamedType",e.LIST_TYPE="ListType",e.NON_NULL_TYPE="NonNullType",e.SCHEMA_DEFINITION="SchemaDefinition",e.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",e.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",e.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",e.FIELD_DEFINITION="FieldDefinition",e.INPUT_VALUE_DEFINITION="InputValueDefinition",e.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",e.UNION_TYPE_DEFINITION="UnionTypeDefinition",e.ENUM_TYPE_DEFINITION="EnumTypeDefinition",e.ENUM_VALUE_DEFINITION="EnumValueDefinition",e.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",e.DIRECTIVE_DEFINITION="DirectiveDefinition",e.SCHEMA_EXTENSION="SchemaExtension",e.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",e.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",e.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",e.UNION_TYPE_EXTENSION="UnionTypeExtension",e.ENUM_TYPE_EXTENSION="EnumTypeExtension",e.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension",e.TYPE_COORDINATE="TypeCoordinate",e.MEMBER_COORDINATE="MemberCoordinate",e.ARGUMENT_COORDINATE="ArgumentCoordinate",e.DIRECTIVE_COORDINATE="DirectiveCoordinate",e.DIRECTIVE_ARGUMENT_COORDINATE="DirectiveArgumentCoordinate"})(SV||(pA.Kind=SV={}))});var dA=L(Hg=>{"use strict";Object.defineProperty(Hg,"__esModule",{value:!0});Hg.isDigit=Tge;Hg.isLetter=vV;Hg.isNameContinue=Nct;Hg.isNameStart=Oct;Hg.isWhiteSpace=Pct;function Pct(e){return e===9||e===32}function Tge(e){return e>=48&&e<=57}function vV(e){return e>=97&&e<=122||e>=65&&e<=90}function Oct(e){return vV(e)||e===95}function Nct(e){return vV(e)||Tge(e)||e===95}});var fA=L(_A=>{"use strict";Object.defineProperty(_A,"__esModule",{value:!0});_A.dedentBlockStringLines=Fct;_A.isPrintableAsBlockString=Lct;_A.printBlockString=$ct;var bV=dA();function Fct(e){var t;let r=Number.MAX_SAFE_INTEGER,n=null,o=-1;for(let a=0;as===0?a:a.slice(r)).slice((t=n)!==null&&t!==void 0?t:0,o+1)}function Rct(e){let t=0;for(;t1&&n.slice(1).every(y=>y.length===0||(0,bV.isWhiteSpace)(y.charCodeAt(0))),a=r.endsWith('\\"""'),s=e.endsWith('"')&&!a,c=e.endsWith("\\"),p=s||c,d=!(t!=null&&t.minimize)&&(!o||e.length>70||p||i||a),f="",m=o&&(0,bV.isWhiteSpace)(e.charCodeAt(0));return(d&&!m||i)&&(f+=` +`),f+=r,(d||p)&&(f+=` +`),'"""'+f+'"""'}});var C1=L(mA=>{"use strict";Object.defineProperty(mA,"__esModule",{value:!0});mA.TokenKind=void 0;var xV;mA.TokenKind=xV;(function(e){e.SOF="",e.EOF="",e.BANG="!",e.DOLLAR="$",e.AMP="&",e.PAREN_L="(",e.PAREN_R=")",e.DOT=".",e.SPREAD="...",e.COLON=":",e.EQUALS="=",e.AT="@",e.BRACKET_L="[",e.BRACKET_R="]",e.BRACE_L="{",e.PIPE="|",e.BRACE_R="}",e.NAME="Name",e.INT="Int",e.FLOAT="Float",e.STRING="String",e.BLOCK_STRING="BlockString",e.COMMENT="Comment"})(xV||(mA.TokenKind=xV={}))});var yA=L(hh=>{"use strict";Object.defineProperty(hh,"__esModule",{value:!0});hh.Lexer=void 0;hh.createToken=Fi;hh.isPunctuatorTokenKind=jct;hh.printCodePointAt=mh;hh.readName=kge;var zu=lA(),Age=ql(),Mct=fA(),Zg=dA(),en=C1(),TV=class{constructor(t){let r=new Age.Token(en.TokenKind.SOF,0,0,0,0);this.source=t,this.lastToken=r,this.token=r,this.line=1,this.lineStart=0}get[Symbol.toStringTag](){return"Lexer"}advance(){return this.lastToken=this.token,this.token=this.lookahead()}lookahead(){let t=this.token;if(t.kind!==en.TokenKind.EOF)do if(t.next)t=t.next;else{let r=Bct(this,t.end);t.next=r,r.prev=t,t=r}while(t.kind===en.TokenKind.COMMENT);return t}};hh.Lexer=TV;function jct(e){return e===en.TokenKind.BANG||e===en.TokenKind.DOLLAR||e===en.TokenKind.AMP||e===en.TokenKind.PAREN_L||e===en.TokenKind.PAREN_R||e===en.TokenKind.DOT||e===en.TokenKind.SPREAD||e===en.TokenKind.COLON||e===en.TokenKind.EQUALS||e===en.TokenKind.AT||e===en.TokenKind.BRACKET_L||e===en.TokenKind.BRACKET_R||e===en.TokenKind.BRACE_L||e===en.TokenKind.PIPE||e===en.TokenKind.BRACE_R}function P1(e){return e>=0&&e<=55295||e>=57344&&e<=1114111}function RO(e,t){return Ige(e.charCodeAt(t))&&wge(e.charCodeAt(t+1))}function Ige(e){return e>=55296&&e<=56319}function wge(e){return e>=56320&&e<=57343}function mh(e,t){let r=e.source.body.codePointAt(t);if(r===void 0)return en.TokenKind.EOF;if(r>=32&&r<=126){let n=String.fromCodePoint(r);return n==='"'?`'"'`:`"${n}"`}return"U+"+r.toString(16).toUpperCase().padStart(4,"0")}function Fi(e,t,r,n,o){let i=e.line,a=1+r-e.lineStart;return new Age.Token(t,r,n,i,a,o)}function Bct(e,t){let r=e.source.body,n=r.length,o=t;for(;o=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function Kct(e,t){let r=e.source.body;switch(r.charCodeAt(t+1)){case 34:return{value:'"',size:2};case 92:return{value:"\\",size:2};case 47:return{value:"/",size:2};case 98:return{value:"\b",size:2};case 102:return{value:"\f",size:2};case 110:return{value:` +`,size:2};case 114:return{value:"\r",size:2};case 116:return{value:" ",size:2}}throw(0,zu.syntaxError)(e.source,t,`Invalid character escape sequence: "${r.slice(t,t+2)}".`)}function Gct(e,t){let r=e.source.body,n=r.length,o=e.lineStart,i=t+3,a=i,s="",c=[];for(;i{"use strict";Object.defineProperty(LO,"__esModule",{value:!0});LO.SchemaCoordinateLexer=void 0;var Hct=lA(),Zct=ql(),Wct=dA(),yh=yA(),gh=C1(),DV=class{line=1;lineStart=0;constructor(t){let r=new Zct.Token(gh.TokenKind.SOF,0,0,0,0);this.source=t,this.lastToken=r,this.token=r}get[Symbol.toStringTag](){return"SchemaCoordinateLexer"}advance(){return this.lastToken=this.token,this.token=this.lookahead()}lookahead(){let t=this.token;if(t.kind!==gh.TokenKind.EOF){let r=Qct(this,t.end);t.next=r,r.prev=t,t=r}return t}};LO.SchemaCoordinateLexer=DV;function Qct(e,t){let r=e.source.body,n=r.length,o=t;if(o{"use strict";Object.defineProperty(AV,"__esModule",{value:!0});AV.inspect=Yct;var Xct=10,Pge=2;function Yct(e){return $O(e,[])}function $O(e,t){switch(typeof e){case"string":return JSON.stringify(e);case"function":return e.name?`[function ${e.name}]`:"[function]";case"object":return elt(e,t);default:return String(e)}}function elt(e,t){if(e===null)return"null";if(t.includes(e))return"[Circular]";let r=[...t,e];if(tlt(e)){let n=e.toJSON();if(n!==e)return typeof n=="string"?n:$O(n,r)}else if(Array.isArray(e))return nlt(e,r);return rlt(e,r)}function tlt(e){return typeof e.toJSON=="function"}function rlt(e,t){let r=Object.entries(e);return r.length===0?"{}":t.length>Pge?"["+olt(e)+"]":"{ "+r.map(([o,i])=>o+": "+$O(i,t)).join(", ")+" }"}function nlt(e,t){if(e.length===0)return"[]";if(t.length>Pge)return"[Array]";let r=Math.min(Xct,e.length),n=e.length-r,o=[];for(let i=0;i1&&o.push(`... ${n} more items`),"["+o.join(", ")+"]"}function olt(e){let t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if(t==="Object"&&typeof e.constructor=="function"){let r=e.constructor.name;if(typeof r=="string"&&r!=="")return r}return t}});var gA=L(MO=>{"use strict";Object.defineProperty(MO,"__esModule",{value:!0});MO.instanceOf=void 0;var ilt=eo(),alt=globalThis.process&&process.env.NODE_ENV==="production",slt=alt?function(t,r){return t instanceof r}:function(t,r){if(t instanceof r)return!0;if(typeof t=="object"&&t!==null){var n;let o=r.prototype[Symbol.toStringTag],i=Symbol.toStringTag in t?t[Symbol.toStringTag]:(n=t.constructor)===null||n===void 0?void 0:n.name;if(o===i){let a=(0,ilt.inspect)(t);throw new Error(`Cannot use ${o} "${a}" from another module or realm. + +Ensure that there is only one instance of "graphql" in the node_modules +directory. If different versions of "graphql" are the dependencies of other +relied on modules, use "resolutions" to ensure only one version is installed. + +https://yarnpkg.com/en/docs/selective-version-resolutions + +Duplicate "graphql" modules cannot be used at the same time since different +versions may have different capabilities and behavior. The data from one +version used in the function from another could produce confusing and +spurious results.`)}}return!1};MO.instanceOf=slt});var BO=L(SA=>{"use strict";Object.defineProperty(SA,"__esModule",{value:!0});SA.Source=void 0;SA.isSource=ult;var IV=Ls(),clt=eo(),llt=gA(),jO=class{constructor(t,r="GraphQL request",n={line:1,column:1}){typeof t=="string"||(0,IV.devAssert)(!1,`Body must be a string. Received: ${(0,clt.inspect)(t)}.`),this.body=t,this.name=r,this.locationOffset=n,this.locationOffset.line>0||(0,IV.devAssert)(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||(0,IV.devAssert)(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}};SA.Source=jO;function ult(e){return(0,llt.instanceOf)(e,jO)}});var Wg=L(af=>{"use strict";Object.defineProperty(af,"__esModule",{value:!0});af.Parser=void 0;af.parse=_lt;af.parseConstValue=mlt;af.parseSchemaCoordinate=ylt;af.parseType=hlt;af.parseValue=flt;var Sh=lA(),vA=ql(),plt=k1(),cr=Sn(),Oge=yA(),dlt=Cge(),UO=BO(),nt=C1();function _lt(e,t){let r=new vh(e,t),n=r.parseDocument();return Object.defineProperty(n,"tokenCount",{enumerable:!1,value:r.tokenCount}),n}function flt(e,t){let r=new vh(e,t);r.expectToken(nt.TokenKind.SOF);let n=r.parseValueLiteral(!1);return r.expectToken(nt.TokenKind.EOF),n}function mlt(e,t){let r=new vh(e,t);r.expectToken(nt.TokenKind.SOF);let n=r.parseConstValueLiteral();return r.expectToken(nt.TokenKind.EOF),n}function hlt(e,t){let r=new vh(e,t);r.expectToken(nt.TokenKind.SOF);let n=r.parseTypeReference();return r.expectToken(nt.TokenKind.EOF),n}function ylt(e){let t=(0,UO.isSource)(e)?e:new UO.Source(e),r=new dlt.SchemaCoordinateLexer(t),n=new vh(e,{lexer:r});n.expectToken(nt.TokenKind.SOF);let o=n.parseSchemaCoordinate();return n.expectToken(nt.TokenKind.EOF),o}var vh=class{constructor(t,r={}){let{lexer:n,...o}=r;if(n)this._lexer=n;else{let i=(0,UO.isSource)(t)?t:new UO.Source(t);this._lexer=new Oge.Lexer(i)}this._options=o,this._tokenCounter=0}get tokenCount(){return this._tokenCounter}parseName(){let t=this.expectToken(nt.TokenKind.NAME);return this.node(t,{kind:cr.Kind.NAME,value:t.value})}parseDocument(){return this.node(this._lexer.token,{kind:cr.Kind.DOCUMENT,definitions:this.many(nt.TokenKind.SOF,this.parseDefinition,nt.TokenKind.EOF)})}parseDefinition(){if(this.peek(nt.TokenKind.BRACE_L))return this.parseOperationDefinition();let t=this.peekDescription(),r=t?this._lexer.lookahead():this._lexer.token;if(t&&r.kind===nt.TokenKind.BRACE_L)throw(0,Sh.syntaxError)(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are not supported on shorthand queries.");if(r.kind===nt.TokenKind.NAME){switch(r.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}switch(r.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition()}if(t)throw(0,Sh.syntaxError)(this._lexer.source,this._lexer.token.start,"Unexpected description, only GraphQL definitions support descriptions.");if(r.value==="extend")return this.parseTypeSystemExtension()}throw this.unexpected(r)}parseOperationDefinition(){let t=this._lexer.token;if(this.peek(nt.TokenKind.BRACE_L))return this.node(t,{kind:cr.Kind.OPERATION_DEFINITION,operation:vA.OperationTypeNode.QUERY,description:void 0,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});let r=this.parseDescription(),n=this.parseOperationType(),o;return this.peek(nt.TokenKind.NAME)&&(o=this.parseName()),this.node(t,{kind:cr.Kind.OPERATION_DEFINITION,operation:n,description:r,name:o,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){let t=this.expectToken(nt.TokenKind.NAME);switch(t.value){case"query":return vA.OperationTypeNode.QUERY;case"mutation":return vA.OperationTypeNode.MUTATION;case"subscription":return vA.OperationTypeNode.SUBSCRIPTION}throw this.unexpected(t)}parseVariableDefinitions(){return this.optionalMany(nt.TokenKind.PAREN_L,this.parseVariableDefinition,nt.TokenKind.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:cr.Kind.VARIABLE_DEFINITION,description:this.parseDescription(),variable:this.parseVariable(),type:(this.expectToken(nt.TokenKind.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(nt.TokenKind.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){let t=this._lexer.token;return this.expectToken(nt.TokenKind.DOLLAR),this.node(t,{kind:cr.Kind.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:cr.Kind.SELECTION_SET,selections:this.many(nt.TokenKind.BRACE_L,this.parseSelection,nt.TokenKind.BRACE_R)})}parseSelection(){return this.peek(nt.TokenKind.SPREAD)?this.parseFragment():this.parseField()}parseField(){let t=this._lexer.token,r=this.parseName(),n,o;return this.expectOptionalToken(nt.TokenKind.COLON)?(n=r,o=this.parseName()):o=r,this.node(t,{kind:cr.Kind.FIELD,alias:n,name:o,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(nt.TokenKind.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(t){let r=t?this.parseConstArgument:this.parseArgument;return this.optionalMany(nt.TokenKind.PAREN_L,r,nt.TokenKind.PAREN_R)}parseArgument(t=!1){let r=this._lexer.token,n=this.parseName();return this.expectToken(nt.TokenKind.COLON),this.node(r,{kind:cr.Kind.ARGUMENT,name:n,value:this.parseValueLiteral(t)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){let t=this._lexer.token;this.expectToken(nt.TokenKind.SPREAD);let r=this.expectOptionalKeyword("on");return!r&&this.peek(nt.TokenKind.NAME)?this.node(t,{kind:cr.Kind.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(t,{kind:cr.Kind.INLINE_FRAGMENT,typeCondition:r?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){let t=this._lexer.token,r=this.parseDescription();return this.expectKeyword("fragment"),this._options.allowLegacyFragmentVariables===!0?this.node(t,{kind:cr.Kind.FRAGMENT_DEFINITION,description:r,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(t,{kind:cr.Kind.FRAGMENT_DEFINITION,description:r,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if(this._lexer.token.value==="on")throw this.unexpected();return this.parseName()}parseValueLiteral(t){let r=this._lexer.token;switch(r.kind){case nt.TokenKind.BRACKET_L:return this.parseList(t);case nt.TokenKind.BRACE_L:return this.parseObject(t);case nt.TokenKind.INT:return this.advanceLexer(),this.node(r,{kind:cr.Kind.INT,value:r.value});case nt.TokenKind.FLOAT:return this.advanceLexer(),this.node(r,{kind:cr.Kind.FLOAT,value:r.value});case nt.TokenKind.STRING:case nt.TokenKind.BLOCK_STRING:return this.parseStringLiteral();case nt.TokenKind.NAME:switch(this.advanceLexer(),r.value){case"true":return this.node(r,{kind:cr.Kind.BOOLEAN,value:!0});case"false":return this.node(r,{kind:cr.Kind.BOOLEAN,value:!1});case"null":return this.node(r,{kind:cr.Kind.NULL});default:return this.node(r,{kind:cr.Kind.ENUM,value:r.value})}case nt.TokenKind.DOLLAR:if(t)if(this.expectToken(nt.TokenKind.DOLLAR),this._lexer.token.kind===nt.TokenKind.NAME){let n=this._lexer.token.value;throw(0,Sh.syntaxError)(this._lexer.source,r.start,`Unexpected variable "$${n}" in constant value.`)}else throw this.unexpected(r);return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){let t=this._lexer.token;return this.advanceLexer(),this.node(t,{kind:cr.Kind.STRING,value:t.value,block:t.kind===nt.TokenKind.BLOCK_STRING})}parseList(t){let r=()=>this.parseValueLiteral(t);return this.node(this._lexer.token,{kind:cr.Kind.LIST,values:this.any(nt.TokenKind.BRACKET_L,r,nt.TokenKind.BRACKET_R)})}parseObject(t){let r=()=>this.parseObjectField(t);return this.node(this._lexer.token,{kind:cr.Kind.OBJECT,fields:this.any(nt.TokenKind.BRACE_L,r,nt.TokenKind.BRACE_R)})}parseObjectField(t){let r=this._lexer.token,n=this.parseName();return this.expectToken(nt.TokenKind.COLON),this.node(r,{kind:cr.Kind.OBJECT_FIELD,name:n,value:this.parseValueLiteral(t)})}parseDirectives(t){let r=[];for(;this.peek(nt.TokenKind.AT);)r.push(this.parseDirective(t));return r}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(t){let r=this._lexer.token;return this.expectToken(nt.TokenKind.AT),this.node(r,{kind:cr.Kind.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(t)})}parseTypeReference(){let t=this._lexer.token,r;if(this.expectOptionalToken(nt.TokenKind.BRACKET_L)){let n=this.parseTypeReference();this.expectToken(nt.TokenKind.BRACKET_R),r=this.node(t,{kind:cr.Kind.LIST_TYPE,type:n})}else r=this.parseNamedType();return this.expectOptionalToken(nt.TokenKind.BANG)?this.node(t,{kind:cr.Kind.NON_NULL_TYPE,type:r}):r}parseNamedType(){return this.node(this._lexer.token,{kind:cr.Kind.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(nt.TokenKind.STRING)||this.peek(nt.TokenKind.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){let t=this._lexer.token,r=this.parseDescription();this.expectKeyword("schema");let n=this.parseConstDirectives(),o=this.many(nt.TokenKind.BRACE_L,this.parseOperationTypeDefinition,nt.TokenKind.BRACE_R);return this.node(t,{kind:cr.Kind.SCHEMA_DEFINITION,description:r,directives:n,operationTypes:o})}parseOperationTypeDefinition(){let t=this._lexer.token,r=this.parseOperationType();this.expectToken(nt.TokenKind.COLON);let n=this.parseNamedType();return this.node(t,{kind:cr.Kind.OPERATION_TYPE_DEFINITION,operation:r,type:n})}parseScalarTypeDefinition(){let t=this._lexer.token,r=this.parseDescription();this.expectKeyword("scalar");let n=this.parseName(),o=this.parseConstDirectives();return this.node(t,{kind:cr.Kind.SCALAR_TYPE_DEFINITION,description:r,name:n,directives:o})}parseObjectTypeDefinition(){let t=this._lexer.token,r=this.parseDescription();this.expectKeyword("type");let n=this.parseName(),o=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),a=this.parseFieldsDefinition();return this.node(t,{kind:cr.Kind.OBJECT_TYPE_DEFINITION,description:r,name:n,interfaces:o,directives:i,fields:a})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(nt.TokenKind.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(nt.TokenKind.BRACE_L,this.parseFieldDefinition,nt.TokenKind.BRACE_R)}parseFieldDefinition(){let t=this._lexer.token,r=this.parseDescription(),n=this.parseName(),o=this.parseArgumentDefs();this.expectToken(nt.TokenKind.COLON);let i=this.parseTypeReference(),a=this.parseConstDirectives();return this.node(t,{kind:cr.Kind.FIELD_DEFINITION,description:r,name:n,arguments:o,type:i,directives:a})}parseArgumentDefs(){return this.optionalMany(nt.TokenKind.PAREN_L,this.parseInputValueDef,nt.TokenKind.PAREN_R)}parseInputValueDef(){let t=this._lexer.token,r=this.parseDescription(),n=this.parseName();this.expectToken(nt.TokenKind.COLON);let o=this.parseTypeReference(),i;this.expectOptionalToken(nt.TokenKind.EQUALS)&&(i=this.parseConstValueLiteral());let a=this.parseConstDirectives();return this.node(t,{kind:cr.Kind.INPUT_VALUE_DEFINITION,description:r,name:n,type:o,defaultValue:i,directives:a})}parseInterfaceTypeDefinition(){let t=this._lexer.token,r=this.parseDescription();this.expectKeyword("interface");let n=this.parseName(),o=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),a=this.parseFieldsDefinition();return this.node(t,{kind:cr.Kind.INTERFACE_TYPE_DEFINITION,description:r,name:n,interfaces:o,directives:i,fields:a})}parseUnionTypeDefinition(){let t=this._lexer.token,r=this.parseDescription();this.expectKeyword("union");let n=this.parseName(),o=this.parseConstDirectives(),i=this.parseUnionMemberTypes();return this.node(t,{kind:cr.Kind.UNION_TYPE_DEFINITION,description:r,name:n,directives:o,types:i})}parseUnionMemberTypes(){return this.expectOptionalToken(nt.TokenKind.EQUALS)?this.delimitedMany(nt.TokenKind.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){let t=this._lexer.token,r=this.parseDescription();this.expectKeyword("enum");let n=this.parseName(),o=this.parseConstDirectives(),i=this.parseEnumValuesDefinition();return this.node(t,{kind:cr.Kind.ENUM_TYPE_DEFINITION,description:r,name:n,directives:o,values:i})}parseEnumValuesDefinition(){return this.optionalMany(nt.TokenKind.BRACE_L,this.parseEnumValueDefinition,nt.TokenKind.BRACE_R)}parseEnumValueDefinition(){let t=this._lexer.token,r=this.parseDescription(),n=this.parseEnumValueName(),o=this.parseConstDirectives();return this.node(t,{kind:cr.Kind.ENUM_VALUE_DEFINITION,description:r,name:n,directives:o})}parseEnumValueName(){if(this._lexer.token.value==="true"||this._lexer.token.value==="false"||this._lexer.token.value==="null")throw(0,Sh.syntaxError)(this._lexer.source,this._lexer.token.start,`${qO(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){let t=this._lexer.token,r=this.parseDescription();this.expectKeyword("input");let n=this.parseName(),o=this.parseConstDirectives(),i=this.parseInputFieldsDefinition();return this.node(t,{kind:cr.Kind.INPUT_OBJECT_TYPE_DEFINITION,description:r,name:n,directives:o,fields:i})}parseInputFieldsDefinition(){return this.optionalMany(nt.TokenKind.BRACE_L,this.parseInputValueDef,nt.TokenKind.BRACE_R)}parseTypeSystemExtension(){let t=this._lexer.lookahead();if(t.kind===nt.TokenKind.NAME)switch(t.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension()}throw this.unexpected(t)}parseSchemaExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");let r=this.parseConstDirectives(),n=this.optionalMany(nt.TokenKind.BRACE_L,this.parseOperationTypeDefinition,nt.TokenKind.BRACE_R);if(r.length===0&&n.length===0)throw this.unexpected();return this.node(t,{kind:cr.Kind.SCHEMA_EXTENSION,directives:r,operationTypes:n})}parseScalarTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");let r=this.parseName(),n=this.parseConstDirectives();if(n.length===0)throw this.unexpected();return this.node(t,{kind:cr.Kind.SCALAR_TYPE_EXTENSION,name:r,directives:n})}parseObjectTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");let r=this.parseName(),n=this.parseImplementsInterfaces(),o=this.parseConstDirectives(),i=this.parseFieldsDefinition();if(n.length===0&&o.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:cr.Kind.OBJECT_TYPE_EXTENSION,name:r,interfaces:n,directives:o,fields:i})}parseInterfaceTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");let r=this.parseName(),n=this.parseImplementsInterfaces(),o=this.parseConstDirectives(),i=this.parseFieldsDefinition();if(n.length===0&&o.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:cr.Kind.INTERFACE_TYPE_EXTENSION,name:r,interfaces:n,directives:o,fields:i})}parseUnionTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");let r=this.parseName(),n=this.parseConstDirectives(),o=this.parseUnionMemberTypes();if(n.length===0&&o.length===0)throw this.unexpected();return this.node(t,{kind:cr.Kind.UNION_TYPE_EXTENSION,name:r,directives:n,types:o})}parseEnumTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");let r=this.parseName(),n=this.parseConstDirectives(),o=this.parseEnumValuesDefinition();if(n.length===0&&o.length===0)throw this.unexpected();return this.node(t,{kind:cr.Kind.ENUM_TYPE_EXTENSION,name:r,directives:n,values:o})}parseInputObjectTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");let r=this.parseName(),n=this.parseConstDirectives(),o=this.parseInputFieldsDefinition();if(n.length===0&&o.length===0)throw this.unexpected();return this.node(t,{kind:cr.Kind.INPUT_OBJECT_TYPE_EXTENSION,name:r,directives:n,fields:o})}parseDirectiveDefinition(){let t=this._lexer.token,r=this.parseDescription();this.expectKeyword("directive"),this.expectToken(nt.TokenKind.AT);let n=this.parseName(),o=this.parseArgumentDefs(),i=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");let a=this.parseDirectiveLocations();return this.node(t,{kind:cr.Kind.DIRECTIVE_DEFINITION,description:r,name:n,arguments:o,repeatable:i,locations:a})}parseDirectiveLocations(){return this.delimitedMany(nt.TokenKind.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){let t=this._lexer.token,r=this.parseName();if(Object.prototype.hasOwnProperty.call(plt.DirectiveLocation,r.value))return r;throw this.unexpected(t)}parseSchemaCoordinate(){let t=this._lexer.token,r=this.expectOptionalToken(nt.TokenKind.AT),n=this.parseName(),o;!r&&this.expectOptionalToken(nt.TokenKind.DOT)&&(o=this.parseName());let i;return(r||o)&&this.expectOptionalToken(nt.TokenKind.PAREN_L)&&(i=this.parseName(),this.expectToken(nt.TokenKind.COLON),this.expectToken(nt.TokenKind.PAREN_R)),r?i?this.node(t,{kind:cr.Kind.DIRECTIVE_ARGUMENT_COORDINATE,name:n,argumentName:i}):this.node(t,{kind:cr.Kind.DIRECTIVE_COORDINATE,name:n}):o?i?this.node(t,{kind:cr.Kind.ARGUMENT_COORDINATE,name:n,fieldName:o,argumentName:i}):this.node(t,{kind:cr.Kind.MEMBER_COORDINATE,name:n,memberName:o}):this.node(t,{kind:cr.Kind.TYPE_COORDINATE,name:n})}node(t,r){return this._options.noLocation!==!0&&(r.loc=new vA.Location(t,this._lexer.lastToken,this._lexer.source)),r}peek(t){return this._lexer.token.kind===t}expectToken(t){let r=this._lexer.token;if(r.kind===t)return this.advanceLexer(),r;throw(0,Sh.syntaxError)(this._lexer.source,r.start,`Expected ${Nge(t)}, found ${qO(r)}.`)}expectOptionalToken(t){return this._lexer.token.kind===t?(this.advanceLexer(),!0):!1}expectKeyword(t){let r=this._lexer.token;if(r.kind===nt.TokenKind.NAME&&r.value===t)this.advanceLexer();else throw(0,Sh.syntaxError)(this._lexer.source,r.start,`Expected "${t}", found ${qO(r)}.`)}expectOptionalKeyword(t){let r=this._lexer.token;return r.kind===nt.TokenKind.NAME&&r.value===t?(this.advanceLexer(),!0):!1}unexpected(t){let r=t??this._lexer.token;return(0,Sh.syntaxError)(this._lexer.source,r.start,`Unexpected ${qO(r)}.`)}any(t,r,n){this.expectToken(t);let o=[];for(;!this.expectOptionalToken(n);)o.push(r.call(this));return o}optionalMany(t,r,n){if(this.expectOptionalToken(t)){let o=[];do o.push(r.call(this));while(!this.expectOptionalToken(n));return o}return[]}many(t,r,n){this.expectToken(t);let o=[];do o.push(r.call(this));while(!this.expectOptionalToken(n));return o}delimitedMany(t,r){this.expectOptionalToken(t);let n=[];do n.push(r.call(this));while(this.expectOptionalToken(t));return n}advanceLexer(){let{maxTokens:t}=this._options,r=this._lexer.advance();if(r.kind!==nt.TokenKind.EOF&&(++this._tokenCounter,t!==void 0&&this._tokenCounter>t))throw(0,Sh.syntaxError)(this._lexer.source,r.start,`Document contains more that ${t} tokens. Parsing aborted.`)}};af.Parser=vh;function qO(e){let t=e.value;return Nge(e.kind)+(t!=null?` "${t}"`:"")}function Nge(e){return(0,Oge.isPunctuatorTokenKind)(e)?`"${e}"`:e}});var bh=L(wV=>{"use strict";Object.defineProperty(wV,"__esModule",{value:!0});wV.didYouMean=Slt;var glt=5;function Slt(e,t){let[r,n]=t?[e,t]:[void 0,e],o=" Did you mean ";r&&(o+=r+" ");let i=n.map(c=>`"${c}"`);switch(i.length){case 0:return"";case 1:return o+i[0]+"?";case 2:return o+i[0]+" or "+i[1]+"?"}let a=i.slice(0,glt),s=a.pop();return o+a.join(", ")+", or "+s+"?"}});var Fge=L(kV=>{"use strict";Object.defineProperty(kV,"__esModule",{value:!0});kV.identityFunc=vlt;function vlt(e){return e}});var xh=L(CV=>{"use strict";Object.defineProperty(CV,"__esModule",{value:!0});CV.keyMap=blt;function blt(e,t){let r=Object.create(null);for(let n of e)r[t(n)]=n;return r}});var bA=L(PV=>{"use strict";Object.defineProperty(PV,"__esModule",{value:!0});PV.keyValMap=xlt;function xlt(e,t,r){let n=Object.create(null);for(let o of e)n[t(o)]=r(o);return n}});var zO=L(OV=>{"use strict";Object.defineProperty(OV,"__esModule",{value:!0});OV.mapValue=Elt;function Elt(e,t){let r=Object.create(null);for(let n of Object.keys(e))r[n]=t(e[n],n);return r}});var xA=L(FV=>{"use strict";Object.defineProperty(FV,"__esModule",{value:!0});FV.naturalCompare=Tlt;function Tlt(e,t){let r=0,n=0;for(;r0);let s=0;do++n,s=s*10+i-NV,i=t.charCodeAt(n);while(JO(i)&&s>0);if(as)return 1}else{if(oi)return 1;++r,++n}}return e.length-t.length}var NV=48,Dlt=57;function JO(e){return!isNaN(e)&&NV<=e&&e<=Dlt}});var Eh=L(LV=>{"use strict";Object.defineProperty(LV,"__esModule",{value:!0});LV.suggestionList=Ilt;var Alt=xA();function Ilt(e,t){let r=Object.create(null),n=new RV(e),o=Math.floor(e.length*.4)+1;for(let i of t){let a=n.measure(i,o);a!==void 0&&(r[i]=a)}return Object.keys(r).sort((i,a)=>{let s=r[i]-r[a];return s!==0?s:(0,Alt.naturalCompare)(i,a)})}var RV=class{constructor(t){this._input=t,this._inputLowerCase=t.toLowerCase(),this._inputArray=Rge(this._inputLowerCase),this._rows=[new Array(t.length+1).fill(0),new Array(t.length+1).fill(0),new Array(t.length+1).fill(0)]}measure(t,r){if(this._input===t)return 0;let n=t.toLowerCase();if(this._inputLowerCase===n)return 1;let o=Rge(n),i=this._inputArray;if(o.lengthr)return;let c=this._rows;for(let d=0;d<=s;d++)c[0][d]=d;for(let d=1;d<=a;d++){let f=c[(d-1)%3],m=c[d%3],y=m[0]=d;for(let g=1;g<=s;g++){let S=o[d-1]===i[g-1]?0:1,b=Math.min(f[g]+1,m[g-1]+1,f[g-1]+S);if(d>1&&g>1&&o[d-1]===i[g-2]&&o[d-2]===i[g-1]){let E=c[(d-2)%3][g-2];b=Math.min(b,E+1)}br)return}let p=c[a%3][s];return p<=r?p:void 0}};function Rge(e){let t=e.length,r=new Array(t);for(let n=0;n{"use strict";Object.defineProperty($V,"__esModule",{value:!0});$V.toObjMap=wlt;function wlt(e){if(e==null)return Object.create(null);if(Object.getPrototypeOf(e)===null)return e;let t=Object.create(null);for(let[r,n]of Object.entries(e))t[r]=n;return t}});var Lge=L(MV=>{"use strict";Object.defineProperty(MV,"__esModule",{value:!0});MV.printString=klt;function klt(e){return`"${e.replace(Clt,Plt)}"`}var Clt=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;function Plt(e){return Olt[e.charCodeAt(0)]}var Olt=["\\u0000","\\u0001","\\u0002","\\u0003","\\u0004","\\u0005","\\u0006","\\u0007","\\b","\\t","\\n","\\u000B","\\f","\\r","\\u000E","\\u000F","\\u0010","\\u0011","\\u0012","\\u0013","\\u0014","\\u0015","\\u0016","\\u0017","\\u0018","\\u0019","\\u001A","\\u001B","\\u001C","\\u001D","\\u001E","\\u001F","","",'\\"',"","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\\\","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\u007F","\\u0080","\\u0081","\\u0082","\\u0083","\\u0084","\\u0085","\\u0086","\\u0087","\\u0088","\\u0089","\\u008A","\\u008B","\\u008C","\\u008D","\\u008E","\\u008F","\\u0090","\\u0091","\\u0092","\\u0093","\\u0094","\\u0095","\\u0096","\\u0097","\\u0098","\\u0099","\\u009A","\\u009B","\\u009C","\\u009D","\\u009E","\\u009F"]});var Qg=L(Th=>{"use strict";Object.defineProperty(Th,"__esModule",{value:!0});Th.BREAK=void 0;Th.getEnterLeaveForKind=KO;Th.getVisitFn=$lt;Th.visit=Rlt;Th.visitInParallel=Llt;var Nlt=Ls(),Flt=eo(),jV=ql(),$ge=Sn(),O1=Object.freeze({});Th.BREAK=O1;function Rlt(e,t,r=jV.QueryDocumentKeys){let n=new Map;for(let E of Object.values($ge.Kind))n.set(E,KO(t,E));let o,i=Array.isArray(e),a=[e],s=-1,c=[],p=e,d,f,m=[],y=[];do{s++;let E=s===a.length,I=E&&c.length!==0;if(E){if(d=y.length===0?void 0:m[m.length-1],p=f,f=y.pop(),I)if(i){p=p.slice();let k=0;for(let[F,O]of c){let $=F-k;O===null?(p.splice($,1),k++):p[$]=O}}else{p={...p};for(let[k,F]of c)p[k]=F}s=o.index,a=o.keys,c=o.edits,i=o.inArray,o=o.prev}else if(f){if(d=i?s:a[s],p=f[d],p==null)continue;m.push(d)}let T;if(!Array.isArray(p)){var g,S;(0,jV.isNode)(p)||(0,Nlt.devAssert)(!1,`Invalid AST Node: ${(0,Flt.inspect)(p)}.`);let k=E?(g=n.get(p.kind))===null||g===void 0?void 0:g.leave:(S=n.get(p.kind))===null||S===void 0?void 0:S.enter;if(T=k?.call(t,p,d,f,m,y),T===O1)break;if(T===!1){if(!E){m.pop();continue}}else if(T!==void 0&&(c.push([d,T]),!E))if((0,jV.isNode)(T))p=T;else{m.pop();continue}}if(T===void 0&&I&&c.push([d,p]),E)m.pop();else{var b;o={inArray:i,index:s,keys:a,edits:c,prev:o},i=Array.isArray(p),a=i?p:(b=r[p.kind])!==null&&b!==void 0?b:[],s=-1,c=[],f&&y.push(f),f=p}}while(o!==void 0);return c.length!==0?c[c.length-1][1]:e}function Llt(e){let t=new Array(e.length).fill(null),r=Object.create(null);for(let n of Object.values($ge.Kind)){let o=!1,i=new Array(e.length).fill(void 0),a=new Array(e.length).fill(void 0);for(let c=0;c{"use strict";Object.defineProperty(qV,"__esModule",{value:!0});qV.print=qlt;var Mlt=fA(),jlt=Lge(),Blt=Qg();function qlt(e){return(0,Blt.visit)(e,zlt)}var Ult=80,zlt={Name:{leave:e=>e.value},Variable:{leave:e=>"$"+e.name},Document:{leave:e=>Dt(e.definitions,` + +`)},OperationDefinition:{leave(e){let t=BV(e.variableDefinitions)?Nr(`( +`,Dt(e.variableDefinitions,` +`),` +)`):Nr("(",Dt(e.variableDefinitions,", "),")"),r=Nr("",e.description,` +`)+Dt([e.operation,Dt([e.name,t]),Dt(e.directives," ")]," ");return(r==="query"?"":r+" ")+e.selectionSet}},VariableDefinition:{leave:({variable:e,type:t,defaultValue:r,directives:n,description:o})=>Nr("",o,` +`)+e+": "+t+Nr(" = ",r)+Nr(" ",Dt(n," "))},SelectionSet:{leave:({selections:e})=>Ju(e)},Field:{leave({alias:e,name:t,arguments:r,directives:n,selectionSet:o}){let i=Nr("",e,": ")+t,a=i+Nr("(",Dt(r,", "),")");return a.length>Ult&&(a=i+Nr(`( +`,GO(Dt(r,` +`)),` +)`)),Dt([a,Dt(n," "),o]," ")}},Argument:{leave:({name:e,value:t})=>e+": "+t},FragmentSpread:{leave:({name:e,directives:t})=>"..."+e+Nr(" ",Dt(t," "))},InlineFragment:{leave:({typeCondition:e,directives:t,selectionSet:r})=>Dt(["...",Nr("on ",e),Dt(t," "),r]," ")},FragmentDefinition:{leave:({name:e,typeCondition:t,variableDefinitions:r,directives:n,selectionSet:o,description:i})=>Nr("",i,` +`)+`fragment ${e}${Nr("(",Dt(r,", "),")")} on ${t} ${Nr("",Dt(n," ")," ")}`+o},IntValue:{leave:({value:e})=>e},FloatValue:{leave:({value:e})=>e},StringValue:{leave:({value:e,block:t})=>t?(0,Mlt.printBlockString)(e):(0,jlt.printString)(e)},BooleanValue:{leave:({value:e})=>e?"true":"false"},NullValue:{leave:()=>"null"},EnumValue:{leave:({value:e})=>e},ListValue:{leave:({values:e})=>"["+Dt(e,", ")+"]"},ObjectValue:{leave:({fields:e})=>"{"+Dt(e,", ")+"}"},ObjectField:{leave:({name:e,value:t})=>e+": "+t},Directive:{leave:({name:e,arguments:t})=>"@"+e+Nr("(",Dt(t,", "),")")},NamedType:{leave:({name:e})=>e},ListType:{leave:({type:e})=>"["+e+"]"},NonNullType:{leave:({type:e})=>e+"!"},SchemaDefinition:{leave:({description:e,directives:t,operationTypes:r})=>Nr("",e,` +`)+Dt(["schema",Dt(t," "),Ju(r)]," ")},OperationTypeDefinition:{leave:({operation:e,type:t})=>e+": "+t},ScalarTypeDefinition:{leave:({description:e,name:t,directives:r})=>Nr("",e,` +`)+Dt(["scalar",t,Dt(r," ")]," ")},ObjectTypeDefinition:{leave:({description:e,name:t,interfaces:r,directives:n,fields:o})=>Nr("",e,` +`)+Dt(["type",t,Nr("implements ",Dt(r," & ")),Dt(n," "),Ju(o)]," ")},FieldDefinition:{leave:({description:e,name:t,arguments:r,type:n,directives:o})=>Nr("",e,` +`)+t+(BV(r)?Nr(`( +`,GO(Dt(r,` +`)),` +)`):Nr("(",Dt(r,", "),")"))+": "+n+Nr(" ",Dt(o," "))},InputValueDefinition:{leave:({description:e,name:t,type:r,defaultValue:n,directives:o})=>Nr("",e,` +`)+Dt([t+": "+r,Nr("= ",n),Dt(o," ")]," ")},InterfaceTypeDefinition:{leave:({description:e,name:t,interfaces:r,directives:n,fields:o})=>Nr("",e,` +`)+Dt(["interface",t,Nr("implements ",Dt(r," & ")),Dt(n," "),Ju(o)]," ")},UnionTypeDefinition:{leave:({description:e,name:t,directives:r,types:n})=>Nr("",e,` +`)+Dt(["union",t,Dt(r," "),Nr("= ",Dt(n," | "))]," ")},EnumTypeDefinition:{leave:({description:e,name:t,directives:r,values:n})=>Nr("",e,` +`)+Dt(["enum",t,Dt(r," "),Ju(n)]," ")},EnumValueDefinition:{leave:({description:e,name:t,directives:r})=>Nr("",e,` +`)+Dt([t,Dt(r," ")]," ")},InputObjectTypeDefinition:{leave:({description:e,name:t,directives:r,fields:n})=>Nr("",e,` +`)+Dt(["input",t,Dt(r," "),Ju(n)]," ")},DirectiveDefinition:{leave:({description:e,name:t,arguments:r,repeatable:n,locations:o})=>Nr("",e,` +`)+"directive @"+t+(BV(r)?Nr(`( +`,GO(Dt(r,` +`)),` +)`):Nr("(",Dt(r,", "),")"))+(n?" repeatable":"")+" on "+Dt(o," | ")},SchemaExtension:{leave:({directives:e,operationTypes:t})=>Dt(["extend schema",Dt(e," "),Ju(t)]," ")},ScalarTypeExtension:{leave:({name:e,directives:t})=>Dt(["extend scalar",e,Dt(t," ")]," ")},ObjectTypeExtension:{leave:({name:e,interfaces:t,directives:r,fields:n})=>Dt(["extend type",e,Nr("implements ",Dt(t," & ")),Dt(r," "),Ju(n)]," ")},InterfaceTypeExtension:{leave:({name:e,interfaces:t,directives:r,fields:n})=>Dt(["extend interface",e,Nr("implements ",Dt(t," & ")),Dt(r," "),Ju(n)]," ")},UnionTypeExtension:{leave:({name:e,directives:t,types:r})=>Dt(["extend union",e,Dt(t," "),Nr("= ",Dt(r," | "))]," ")},EnumTypeExtension:{leave:({name:e,directives:t,values:r})=>Dt(["extend enum",e,Dt(t," "),Ju(r)]," ")},InputObjectTypeExtension:{leave:({name:e,directives:t,fields:r})=>Dt(["extend input",e,Dt(t," "),Ju(r)]," ")},TypeCoordinate:{leave:({name:e})=>e},MemberCoordinate:{leave:({name:e,memberName:t})=>Dt([e,Nr(".",t)])},ArgumentCoordinate:{leave:({name:e,fieldName:t,argumentName:r})=>Dt([e,Nr(".",t),Nr("(",r,":)")])},DirectiveCoordinate:{leave:({name:e})=>Dt(["@",e])},DirectiveArgumentCoordinate:{leave:({name:e,argumentName:t})=>Dt(["@",e,Nr("(",t,":)")])}};function Dt(e,t=""){var r;return(r=e?.filter(n=>n).join(t))!==null&&r!==void 0?r:""}function Ju(e){return Nr(`{ +`,GO(Dt(e,` +`)),` +}`)}function Nr(e,t,r=""){return t!=null&&t!==""?e+t+r:""}function GO(e){return Nr(" ",e.replace(/\n/g,` + `))}function BV(e){var t;return(t=e?.some(r=>r.includes(` +`)))!==null&&t!==void 0?t:!1}});var JV=L(zV=>{"use strict";Object.defineProperty(zV,"__esModule",{value:!0});zV.valueFromASTUntyped=UV;var Jlt=bA(),sf=Sn();function UV(e,t){switch(e.kind){case sf.Kind.NULL:return null;case sf.Kind.INT:return parseInt(e.value,10);case sf.Kind.FLOAT:return parseFloat(e.value);case sf.Kind.STRING:case sf.Kind.ENUM:case sf.Kind.BOOLEAN:return e.value;case sf.Kind.LIST:return e.values.map(r=>UV(r,t));case sf.Kind.OBJECT:return(0,Jlt.keyValMap)(e.fields,r=>r.name.value,r=>UV(r.value,t));case sf.Kind.VARIABLE:return t?.[e.name.value]}}});var EA=L(ZO=>{"use strict";Object.defineProperty(ZO,"__esModule",{value:!0});ZO.assertEnumValueName=Vlt;ZO.assertName=Bge;var Mge=Ls(),HO=ar(),jge=dA();function Bge(e){if(e!=null||(0,Mge.devAssert)(!1,"Must provide name."),typeof e=="string"||(0,Mge.devAssert)(!1,"Expected name to be a string."),e.length===0)throw new HO.GraphQLError("Expected name to be a non-empty string.");for(let t=1;t{"use strict";Object.defineProperty(zt,"__esModule",{value:!0});zt.GraphQLUnionType=zt.GraphQLScalarType=zt.GraphQLObjectType=zt.GraphQLNonNull=zt.GraphQLList=zt.GraphQLInterfaceType=zt.GraphQLInputObjectType=zt.GraphQLEnumType=void 0;zt.argsToArgsConfig=Yge;zt.assertAbstractType=put;zt.assertCompositeType=uut;zt.assertEnumType=nut;zt.assertInputObjectType=out;zt.assertInputType=sut;zt.assertInterfaceType=tut;zt.assertLeafType=lut;zt.assertListType=iut;zt.assertNamedType=mut;zt.assertNonNullType=aut;zt.assertNullableType=_ut;zt.assertObjectType=eut;zt.assertOutputType=cut;zt.assertScalarType=Ylt;zt.assertType=Xlt;zt.assertUnionType=rut;zt.assertWrappingType=dut;zt.defineArguments=Qge;zt.getNamedType=hut;zt.getNullableType=fut;zt.isAbstractType=Gge;zt.isCompositeType=Kge;zt.isEnumType=tS;zt.isInputObjectType=DA;zt.isInputType=VV;zt.isInterfaceType=Yg;zt.isLeafType=Vge;zt.isListType=s4;zt.isNamedType=Hge;zt.isNonNullType=Ah;zt.isNullableType=GV;zt.isObjectType=F1;zt.isOutputType=KV;zt.isRequiredArgument=yut;zt.isRequiredInputField=vut;zt.isScalarType=Xg;zt.isType=a4;zt.isUnionType=eS;zt.isWrappingType=AA;zt.resolveObjMapThunk=ZV;zt.resolveReadonlyArrayThunk=HV;var ha=Ls(),Klt=bh(),qge=Fge(),Po=eo(),Dh=gA(),Glt=yd(),Hlt=xh(),Jge=bA(),i4=zO(),Zlt=Eh(),gd=VO(),TA=ar(),Wlt=Sn(),Uge=Gc(),Qlt=JV(),Sd=EA();function a4(e){return Xg(e)||F1(e)||Yg(e)||eS(e)||tS(e)||DA(e)||s4(e)||Ah(e)}function Xlt(e){if(!a4(e))throw new Error(`Expected ${(0,Po.inspect)(e)} to be a GraphQL type.`);return e}function Xg(e){return(0,Dh.instanceOf)(e,YO)}function Ylt(e){if(!Xg(e))throw new Error(`Expected ${(0,Po.inspect)(e)} to be a GraphQL Scalar type.`);return e}function F1(e){return(0,Dh.instanceOf)(e,e4)}function eut(e){if(!F1(e))throw new Error(`Expected ${(0,Po.inspect)(e)} to be a GraphQL Object type.`);return e}function Yg(e){return(0,Dh.instanceOf)(e,t4)}function tut(e){if(!Yg(e))throw new Error(`Expected ${(0,Po.inspect)(e)} to be a GraphQL Interface type.`);return e}function eS(e){return(0,Dh.instanceOf)(e,r4)}function rut(e){if(!eS(e))throw new Error(`Expected ${(0,Po.inspect)(e)} to be a GraphQL Union type.`);return e}function tS(e){return(0,Dh.instanceOf)(e,n4)}function nut(e){if(!tS(e))throw new Error(`Expected ${(0,Po.inspect)(e)} to be a GraphQL Enum type.`);return e}function DA(e){return(0,Dh.instanceOf)(e,o4)}function out(e){if(!DA(e))throw new Error(`Expected ${(0,Po.inspect)(e)} to be a GraphQL Input Object type.`);return e}function s4(e){return(0,Dh.instanceOf)(e,QO)}function iut(e){if(!s4(e))throw new Error(`Expected ${(0,Po.inspect)(e)} to be a GraphQL List type.`);return e}function Ah(e){return(0,Dh.instanceOf)(e,XO)}function aut(e){if(!Ah(e))throw new Error(`Expected ${(0,Po.inspect)(e)} to be a GraphQL Non-Null type.`);return e}function VV(e){return Xg(e)||tS(e)||DA(e)||AA(e)&&VV(e.ofType)}function sut(e){if(!VV(e))throw new Error(`Expected ${(0,Po.inspect)(e)} to be a GraphQL input type.`);return e}function KV(e){return Xg(e)||F1(e)||Yg(e)||eS(e)||tS(e)||AA(e)&&KV(e.ofType)}function cut(e){if(!KV(e))throw new Error(`Expected ${(0,Po.inspect)(e)} to be a GraphQL output type.`);return e}function Vge(e){return Xg(e)||tS(e)}function lut(e){if(!Vge(e))throw new Error(`Expected ${(0,Po.inspect)(e)} to be a GraphQL leaf type.`);return e}function Kge(e){return F1(e)||Yg(e)||eS(e)}function uut(e){if(!Kge(e))throw new Error(`Expected ${(0,Po.inspect)(e)} to be a GraphQL composite type.`);return e}function Gge(e){return Yg(e)||eS(e)}function put(e){if(!Gge(e))throw new Error(`Expected ${(0,Po.inspect)(e)} to be a GraphQL abstract type.`);return e}var QO=class{constructor(t){a4(t)||(0,ha.devAssert)(!1,`Expected ${(0,Po.inspect)(t)} to be a GraphQL type.`),this.ofType=t}get[Symbol.toStringTag](){return"GraphQLList"}toString(){return"["+String(this.ofType)+"]"}toJSON(){return this.toString()}};zt.GraphQLList=QO;var XO=class{constructor(t){GV(t)||(0,ha.devAssert)(!1,`Expected ${(0,Po.inspect)(t)} to be a GraphQL nullable type.`),this.ofType=t}get[Symbol.toStringTag](){return"GraphQLNonNull"}toString(){return String(this.ofType)+"!"}toJSON(){return this.toString()}};zt.GraphQLNonNull=XO;function AA(e){return s4(e)||Ah(e)}function dut(e){if(!AA(e))throw new Error(`Expected ${(0,Po.inspect)(e)} to be a GraphQL wrapping type.`);return e}function GV(e){return a4(e)&&!Ah(e)}function _ut(e){if(!GV(e))throw new Error(`Expected ${(0,Po.inspect)(e)} to be a GraphQL nullable type.`);return e}function fut(e){if(e)return Ah(e)?e.ofType:e}function Hge(e){return Xg(e)||F1(e)||Yg(e)||eS(e)||tS(e)||DA(e)}function mut(e){if(!Hge(e))throw new Error(`Expected ${(0,Po.inspect)(e)} to be a GraphQL named type.`);return e}function hut(e){if(e){let t=e;for(;AA(t);)t=t.ofType;return t}}function HV(e){return typeof e=="function"?e():e}function ZV(e){return typeof e=="function"?e():e}var YO=class{constructor(t){var r,n,o,i;let a=(r=t.parseValue)!==null&&r!==void 0?r:qge.identityFunc;this.name=(0,Sd.assertName)(t.name),this.description=t.description,this.specifiedByURL=t.specifiedByURL,this.serialize=(n=t.serialize)!==null&&n!==void 0?n:qge.identityFunc,this.parseValue=a,this.parseLiteral=(o=t.parseLiteral)!==null&&o!==void 0?o:(s,c)=>a((0,Qlt.valueFromASTUntyped)(s,c)),this.extensions=(0,gd.toObjMap)(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(i=t.extensionASTNodes)!==null&&i!==void 0?i:[],t.specifiedByURL==null||typeof t.specifiedByURL=="string"||(0,ha.devAssert)(!1,`${this.name} must provide "specifiedByURL" as a string, but got: ${(0,Po.inspect)(t.specifiedByURL)}.`),t.serialize==null||typeof t.serialize=="function"||(0,ha.devAssert)(!1,`${this.name} must provide "serialize" function. If this custom Scalar is also used as an input type, ensure "parseValue" and "parseLiteral" functions are also provided.`),t.parseLiteral&&(typeof t.parseValue=="function"&&typeof t.parseLiteral=="function"||(0,ha.devAssert)(!1,`${this.name} must provide both "parseValue" and "parseLiteral" functions.`))}get[Symbol.toStringTag](){return"GraphQLScalarType"}toConfig(){return{name:this.name,description:this.description,specifiedByURL:this.specifiedByURL,serialize:this.serialize,parseValue:this.parseValue,parseLiteral:this.parseLiteral,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}};zt.GraphQLScalarType=YO;var e4=class{constructor(t){var r;this.name=(0,Sd.assertName)(t.name),this.description=t.description,this.isTypeOf=t.isTypeOf,this.extensions=(0,gd.toObjMap)(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(r=t.extensionASTNodes)!==null&&r!==void 0?r:[],this._fields=()=>Wge(t),this._interfaces=()=>Zge(t),t.isTypeOf==null||typeof t.isTypeOf=="function"||(0,ha.devAssert)(!1,`${this.name} must provide "isTypeOf" as a function, but got: ${(0,Po.inspect)(t.isTypeOf)}.`)}get[Symbol.toStringTag](){return"GraphQLObjectType"}getFields(){return typeof this._fields=="function"&&(this._fields=this._fields()),this._fields}getInterfaces(){return typeof this._interfaces=="function"&&(this._interfaces=this._interfaces()),this._interfaces}toConfig(){return{name:this.name,description:this.description,interfaces:this.getInterfaces(),fields:Xge(this.getFields()),isTypeOf:this.isTypeOf,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}};zt.GraphQLObjectType=e4;function Zge(e){var t;let r=HV((t=e.interfaces)!==null&&t!==void 0?t:[]);return Array.isArray(r)||(0,ha.devAssert)(!1,`${e.name} interfaces must be an Array or a function which returns an Array.`),r}function Wge(e){let t=ZV(e.fields);return N1(t)||(0,ha.devAssert)(!1,`${e.name} fields must be an object with field names as keys or a function which returns such an object.`),(0,i4.mapValue)(t,(r,n)=>{var o;N1(r)||(0,ha.devAssert)(!1,`${e.name}.${n} field config must be an object.`),r.resolve==null||typeof r.resolve=="function"||(0,ha.devAssert)(!1,`${e.name}.${n} field resolver must be a function if provided, but got: ${(0,Po.inspect)(r.resolve)}.`);let i=(o=r.args)!==null&&o!==void 0?o:{};return N1(i)||(0,ha.devAssert)(!1,`${e.name}.${n} args must be an object with argument names as keys.`),{name:(0,Sd.assertName)(n),description:r.description,type:r.type,args:Qge(i),resolve:r.resolve,subscribe:r.subscribe,deprecationReason:r.deprecationReason,extensions:(0,gd.toObjMap)(r.extensions),astNode:r.astNode}})}function Qge(e){return Object.entries(e).map(([t,r])=>({name:(0,Sd.assertName)(t),description:r.description,type:r.type,defaultValue:r.defaultValue,deprecationReason:r.deprecationReason,extensions:(0,gd.toObjMap)(r.extensions),astNode:r.astNode}))}function N1(e){return(0,Glt.isObjectLike)(e)&&!Array.isArray(e)}function Xge(e){return(0,i4.mapValue)(e,t=>({description:t.description,type:t.type,args:Yge(t.args),resolve:t.resolve,subscribe:t.subscribe,deprecationReason:t.deprecationReason,extensions:t.extensions,astNode:t.astNode}))}function Yge(e){return(0,Jge.keyValMap)(e,t=>t.name,t=>({description:t.description,type:t.type,defaultValue:t.defaultValue,deprecationReason:t.deprecationReason,extensions:t.extensions,astNode:t.astNode}))}function yut(e){return Ah(e.type)&&e.defaultValue===void 0}var t4=class{constructor(t){var r;this.name=(0,Sd.assertName)(t.name),this.description=t.description,this.resolveType=t.resolveType,this.extensions=(0,gd.toObjMap)(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(r=t.extensionASTNodes)!==null&&r!==void 0?r:[],this._fields=Wge.bind(void 0,t),this._interfaces=Zge.bind(void 0,t),t.resolveType==null||typeof t.resolveType=="function"||(0,ha.devAssert)(!1,`${this.name} must provide "resolveType" as a function, but got: ${(0,Po.inspect)(t.resolveType)}.`)}get[Symbol.toStringTag](){return"GraphQLInterfaceType"}getFields(){return typeof this._fields=="function"&&(this._fields=this._fields()),this._fields}getInterfaces(){return typeof this._interfaces=="function"&&(this._interfaces=this._interfaces()),this._interfaces}toConfig(){return{name:this.name,description:this.description,interfaces:this.getInterfaces(),fields:Xge(this.getFields()),resolveType:this.resolveType,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}};zt.GraphQLInterfaceType=t4;var r4=class{constructor(t){var r;this.name=(0,Sd.assertName)(t.name),this.description=t.description,this.resolveType=t.resolveType,this.extensions=(0,gd.toObjMap)(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(r=t.extensionASTNodes)!==null&&r!==void 0?r:[],this._types=gut.bind(void 0,t),t.resolveType==null||typeof t.resolveType=="function"||(0,ha.devAssert)(!1,`${this.name} must provide "resolveType" as a function, but got: ${(0,Po.inspect)(t.resolveType)}.`)}get[Symbol.toStringTag](){return"GraphQLUnionType"}getTypes(){return typeof this._types=="function"&&(this._types=this._types()),this._types}toConfig(){return{name:this.name,description:this.description,types:this.getTypes(),resolveType:this.resolveType,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}};zt.GraphQLUnionType=r4;function gut(e){let t=HV(e.types);return Array.isArray(t)||(0,ha.devAssert)(!1,`Must provide Array of types or a function which returns such an array for Union ${e.name}.`),t}var n4=class{constructor(t){var r;this.name=(0,Sd.assertName)(t.name),this.description=t.description,this.extensions=(0,gd.toObjMap)(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(r=t.extensionASTNodes)!==null&&r!==void 0?r:[],this._values=typeof t.values=="function"?t.values:zge(this.name,t.values),this._valueLookup=null,this._nameLookup=null}get[Symbol.toStringTag](){return"GraphQLEnumType"}getValues(){return typeof this._values=="function"&&(this._values=zge(this.name,this._values())),this._values}getValue(t){return this._nameLookup===null&&(this._nameLookup=(0,Hlt.keyMap)(this.getValues(),r=>r.name)),this._nameLookup[t]}serialize(t){this._valueLookup===null&&(this._valueLookup=new Map(this.getValues().map(n=>[n.value,n])));let r=this._valueLookup.get(t);if(r===void 0)throw new TA.GraphQLError(`Enum "${this.name}" cannot represent value: ${(0,Po.inspect)(t)}`);return r.name}parseValue(t){if(typeof t!="string"){let n=(0,Po.inspect)(t);throw new TA.GraphQLError(`Enum "${this.name}" cannot represent non-string value: ${n}.`+WO(this,n))}let r=this.getValue(t);if(r==null)throw new TA.GraphQLError(`Value "${t}" does not exist in "${this.name}" enum.`+WO(this,t));return r.value}parseLiteral(t,r){if(t.kind!==Wlt.Kind.ENUM){let o=(0,Uge.print)(t);throw new TA.GraphQLError(`Enum "${this.name}" cannot represent non-enum value: ${o}.`+WO(this,o),{nodes:t})}let n=this.getValue(t.value);if(n==null){let o=(0,Uge.print)(t);throw new TA.GraphQLError(`Value "${o}" does not exist in "${this.name}" enum.`+WO(this,o),{nodes:t})}return n.value}toConfig(){let t=(0,Jge.keyValMap)(this.getValues(),r=>r.name,r=>({description:r.description,value:r.value,deprecationReason:r.deprecationReason,extensions:r.extensions,astNode:r.astNode}));return{name:this.name,description:this.description,values:t,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}};zt.GraphQLEnumType=n4;function WO(e,t){let r=e.getValues().map(o=>o.name),n=(0,Zlt.suggestionList)(t,r);return(0,Klt.didYouMean)("the enum value",n)}function zge(e,t){return N1(t)||(0,ha.devAssert)(!1,`${e} values must be an object with value names as keys.`),Object.entries(t).map(([r,n])=>(N1(n)||(0,ha.devAssert)(!1,`${e}.${r} must refer to an object with a "value" key representing an internal value but got: ${(0,Po.inspect)(n)}.`),{name:(0,Sd.assertEnumValueName)(r),description:n.description,value:n.value!==void 0?n.value:r,deprecationReason:n.deprecationReason,extensions:(0,gd.toObjMap)(n.extensions),astNode:n.astNode}))}var o4=class{constructor(t){var r,n;this.name=(0,Sd.assertName)(t.name),this.description=t.description,this.extensions=(0,gd.toObjMap)(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(r=t.extensionASTNodes)!==null&&r!==void 0?r:[],this.isOneOf=(n=t.isOneOf)!==null&&n!==void 0?n:!1,this._fields=Sut.bind(void 0,t)}get[Symbol.toStringTag](){return"GraphQLInputObjectType"}getFields(){return typeof this._fields=="function"&&(this._fields=this._fields()),this._fields}toConfig(){let t=(0,i4.mapValue)(this.getFields(),r=>({description:r.description,type:r.type,defaultValue:r.defaultValue,deprecationReason:r.deprecationReason,extensions:r.extensions,astNode:r.astNode}));return{name:this.name,description:this.description,fields:t,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes,isOneOf:this.isOneOf}}toString(){return this.name}toJSON(){return this.toString()}};zt.GraphQLInputObjectType=o4;function Sut(e){let t=ZV(e.fields);return N1(t)||(0,ha.devAssert)(!1,`${e.name} fields must be an object with field names as keys or a function which returns such an object.`),(0,i4.mapValue)(t,(r,n)=>(!("resolve"in r)||(0,ha.devAssert)(!1,`${e.name}.${n} field has a resolve property, but Input Types cannot define resolvers.`),{name:(0,Sd.assertName)(n),description:r.description,type:r.type,defaultValue:r.defaultValue,deprecationReason:r.deprecationReason,extensions:(0,gd.toObjMap)(r.extensions),astNode:r.astNode}))}function vut(e){return Ah(e.type)&&e.defaultValue===void 0}});var wA=L(IA=>{"use strict";Object.defineProperty(IA,"__esModule",{value:!0});IA.doTypesOverlap=but;IA.isEqualType=WV;IA.isTypeSubTypeOf=c4;var ps=vn();function WV(e,t){return e===t?!0:(0,ps.isNonNullType)(e)&&(0,ps.isNonNullType)(t)||(0,ps.isListType)(e)&&(0,ps.isListType)(t)?WV(e.ofType,t.ofType):!1}function c4(e,t,r){return t===r?!0:(0,ps.isNonNullType)(r)?(0,ps.isNonNullType)(t)?c4(e,t.ofType,r.ofType):!1:(0,ps.isNonNullType)(t)?c4(e,t.ofType,r):(0,ps.isListType)(r)?(0,ps.isListType)(t)?c4(e,t.ofType,r.ofType):!1:(0,ps.isListType)(t)?!1:(0,ps.isAbstractType)(r)&&((0,ps.isInterfaceType)(t)||(0,ps.isObjectType)(t))&&e.isSubType(r,t)}function but(e,t,r){return t===r?!0:(0,ps.isAbstractType)(t)?(0,ps.isAbstractType)(r)?e.getPossibleTypes(t).some(n=>e.isSubType(r,n)):e.isSubType(t,r):(0,ps.isAbstractType)(r)?e.isSubType(r,t):!1}});var vd=L(ea=>{"use strict";Object.defineProperty(ea,"__esModule",{value:!0});ea.GraphQLString=ea.GraphQLInt=ea.GraphQLID=ea.GraphQLFloat=ea.GraphQLBoolean=ea.GRAPHQL_MIN_INT=ea.GRAPHQL_MAX_INT=void 0;ea.isSpecifiedScalarType=xut;ea.specifiedScalarTypes=void 0;var Vu=eo(),eSe=yd(),ya=ar(),rS=Sn(),kA=Gc(),CA=vn(),l4=2147483647;ea.GRAPHQL_MAX_INT=l4;var u4=-2147483648;ea.GRAPHQL_MIN_INT=u4;var tSe=new CA.GraphQLScalarType({name:"Int",description:"The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.",serialize(e){let t=PA(e);if(typeof t=="boolean")return t?1:0;let r=t;if(typeof t=="string"&&t!==""&&(r=Number(t)),typeof r!="number"||!Number.isInteger(r))throw new ya.GraphQLError(`Int cannot represent non-integer value: ${(0,Vu.inspect)(t)}`);if(r>l4||rl4||el4||te.name===t)}function PA(e){if((0,eSe.isObjectLike)(e)){if(typeof e.valueOf=="function"){let t=e.valueOf();if(!(0,eSe.isObjectLike)(t))return t}if(typeof e.toJSON=="function")return e.toJSON()}return e}});var pc=L(Ri=>{"use strict";Object.defineProperty(Ri,"__esModule",{value:!0});Ri.GraphQLSpecifiedByDirective=Ri.GraphQLSkipDirective=Ri.GraphQLOneOfDirective=Ri.GraphQLIncludeDirective=Ri.GraphQLDirective=Ri.GraphQLDeprecatedDirective=Ri.DEFAULT_DEPRECATION_REASON=void 0;Ri.assertDirective=wut;Ri.isDirective=cSe;Ri.isSpecifiedDirective=kut;Ri.specifiedDirectives=void 0;var sSe=Ls(),Eut=eo(),Tut=gA(),Dut=yd(),Aut=VO(),Ul=k1(),Iut=EA(),OA=vn(),p4=vd();function cSe(e){return(0,Tut.instanceOf)(e,cf)}function wut(e){if(!cSe(e))throw new Error(`Expected ${(0,Eut.inspect)(e)} to be a GraphQL directive.`);return e}var cf=class{constructor(t){var r,n;this.name=(0,Iut.assertName)(t.name),this.description=t.description,this.locations=t.locations,this.isRepeatable=(r=t.isRepeatable)!==null&&r!==void 0?r:!1,this.extensions=(0,Aut.toObjMap)(t.extensions),this.astNode=t.astNode,Array.isArray(t.locations)||(0,sSe.devAssert)(!1,`@${t.name} locations must be an Array.`);let o=(n=t.args)!==null&&n!==void 0?n:{};(0,Dut.isObjectLike)(o)&&!Array.isArray(o)||(0,sSe.devAssert)(!1,`@${t.name} args must be an object with argument names as keys.`),this.args=(0,OA.defineArguments)(o)}get[Symbol.toStringTag](){return"GraphQLDirective"}toConfig(){return{name:this.name,description:this.description,locations:this.locations,args:(0,OA.argsToArgsConfig)(this.args),isRepeatable:this.isRepeatable,extensions:this.extensions,astNode:this.astNode}}toString(){return"@"+this.name}toJSON(){return this.toString()}};Ri.GraphQLDirective=cf;var lSe=new cf({name:"include",description:"Directs the executor to include this field or fragment only when the `if` argument is true.",locations:[Ul.DirectiveLocation.FIELD,Ul.DirectiveLocation.FRAGMENT_SPREAD,Ul.DirectiveLocation.INLINE_FRAGMENT],args:{if:{type:new OA.GraphQLNonNull(p4.GraphQLBoolean),description:"Included when true."}}});Ri.GraphQLIncludeDirective=lSe;var uSe=new cf({name:"skip",description:"Directs the executor to skip this field or fragment when the `if` argument is true.",locations:[Ul.DirectiveLocation.FIELD,Ul.DirectiveLocation.FRAGMENT_SPREAD,Ul.DirectiveLocation.INLINE_FRAGMENT],args:{if:{type:new OA.GraphQLNonNull(p4.GraphQLBoolean),description:"Skipped when true."}}});Ri.GraphQLSkipDirective=uSe;var pSe="No longer supported";Ri.DEFAULT_DEPRECATION_REASON=pSe;var dSe=new cf({name:"deprecated",description:"Marks an element of a GraphQL schema as no longer supported.",locations:[Ul.DirectiveLocation.FIELD_DEFINITION,Ul.DirectiveLocation.ARGUMENT_DEFINITION,Ul.DirectiveLocation.INPUT_FIELD_DEFINITION,Ul.DirectiveLocation.ENUM_VALUE],args:{reason:{type:p4.GraphQLString,description:"Explains why this element was deprecated, usually also including a suggestion for how to access supported similar data. Formatted using the Markdown syntax, as specified by [CommonMark](https://commonmark.org/).",defaultValue:pSe}}});Ri.GraphQLDeprecatedDirective=dSe;var _Se=new cf({name:"specifiedBy",description:"Exposes a URL that specifies the behavior of this scalar.",locations:[Ul.DirectiveLocation.SCALAR],args:{url:{type:new OA.GraphQLNonNull(p4.GraphQLString),description:"The URL that specifies the behavior of this scalar."}}});Ri.GraphQLSpecifiedByDirective=_Se;var fSe=new cf({name:"oneOf",description:"Indicates exactly one field must be supplied and this field must not be `null`.",locations:[Ul.DirectiveLocation.INPUT_OBJECT],args:{}});Ri.GraphQLOneOfDirective=fSe;var mSe=Object.freeze([lSe,uSe,dSe,_Se,fSe]);Ri.specifiedDirectives=mSe;function kut(e){return mSe.some(({name:t})=>t===e.name)}});var d4=L(QV=>{"use strict";Object.defineProperty(QV,"__esModule",{value:!0});QV.isIterableObject=Cut;function Cut(e){return typeof e=="object"&&typeof e?.[Symbol.iterator]=="function"}});var RA=L(XV=>{"use strict";Object.defineProperty(XV,"__esModule",{value:!0});XV.astFromValue=FA;var hSe=eo(),Put=us(),Out=d4(),Nut=yd(),zl=Sn(),NA=vn(),Fut=vd();function FA(e,t){if((0,NA.isNonNullType)(t)){let r=FA(e,t.ofType);return r?.kind===zl.Kind.NULL?null:r}if(e===null)return{kind:zl.Kind.NULL};if(e===void 0)return null;if((0,NA.isListType)(t)){let r=t.ofType;if((0,Out.isIterableObject)(e)){let n=[];for(let o of e){let i=FA(o,r);i!=null&&n.push(i)}return{kind:zl.Kind.LIST,values:n}}return FA(e,r)}if((0,NA.isInputObjectType)(t)){if(!(0,Nut.isObjectLike)(e))return null;let r=[];for(let n of Object.values(t.getFields())){let o=FA(e[n.name],n.type);o&&r.push({kind:zl.Kind.OBJECT_FIELD,name:{kind:zl.Kind.NAME,value:n.name},value:o})}return{kind:zl.Kind.OBJECT,fields:r}}if((0,NA.isLeafType)(t)){let r=t.serialize(e);if(r==null)return null;if(typeof r=="boolean")return{kind:zl.Kind.BOOLEAN,value:r};if(typeof r=="number"&&Number.isFinite(r)){let n=String(r);return ySe.test(n)?{kind:zl.Kind.INT,value:n}:{kind:zl.Kind.FLOAT,value:n}}if(typeof r=="string")return(0,NA.isEnumType)(t)?{kind:zl.Kind.ENUM,value:r}:t===Fut.GraphQLID&&ySe.test(r)?{kind:zl.Kind.INT,value:r}:{kind:zl.Kind.STRING,value:r};throw new TypeError(`Cannot convert value to AST: ${(0,hSe.inspect)(r)}.`)}(0,Put.invariant)(!1,"Unexpected input type: "+(0,hSe.inspect)(t))}var ySe=/^-?(?:0|[1-9][0-9]*)$/});var Vl=L(ao=>{"use strict";Object.defineProperty(ao,"__esModule",{value:!0});ao.introspectionTypes=ao.__TypeKind=ao.__Type=ao.__Schema=ao.__InputValue=ao.__Field=ao.__EnumValue=ao.__DirectiveLocation=ao.__Directive=ao.TypeNameMetaFieldDef=ao.TypeMetaFieldDef=ao.TypeKind=ao.SchemaMetaFieldDef=void 0;ao.isIntrospectionType=Uut;var Rut=eo(),Lut=us(),ta=k1(),$ut=Gc(),Mut=RA(),Ot=vn(),xo=vd(),YV=new Ot.GraphQLObjectType({name:"__Schema",description:"A GraphQL Schema defines the capabilities of a GraphQL server. It exposes all available types and directives on the server, as well as the entry points for query, mutation, and subscription operations.",fields:()=>({description:{type:xo.GraphQLString,resolve:e=>e.description},types:{description:"A list of all types supported by this server.",type:new Ot.GraphQLNonNull(new Ot.GraphQLList(new Ot.GraphQLNonNull(Jl))),resolve(e){return Object.values(e.getTypeMap())}},queryType:{description:"The type that query operations will be rooted at.",type:new Ot.GraphQLNonNull(Jl),resolve:e=>e.getQueryType()},mutationType:{description:"If this server supports mutation, the type that mutation operations will be rooted at.",type:Jl,resolve:e=>e.getMutationType()},subscriptionType:{description:"If this server support subscription, the type that subscription operations will be rooted at.",type:Jl,resolve:e=>e.getSubscriptionType()},directives:{description:"A list of all directives supported by this server.",type:new Ot.GraphQLNonNull(new Ot.GraphQLList(new Ot.GraphQLNonNull(eK))),resolve:e=>e.getDirectives()}})});ao.__Schema=YV;var eK=new Ot.GraphQLObjectType({name:"__Directive",description:`A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document. + +In some cases, you need to provide options to alter GraphQL's execution behavior in ways field arguments will not suffice, such as conditionally including or skipping a field. Directives provide this by describing additional information to the executor.`,fields:()=>({name:{type:new Ot.GraphQLNonNull(xo.GraphQLString),resolve:e=>e.name},description:{type:xo.GraphQLString,resolve:e=>e.description},isRepeatable:{type:new Ot.GraphQLNonNull(xo.GraphQLBoolean),resolve:e=>e.isRepeatable},locations:{type:new Ot.GraphQLNonNull(new Ot.GraphQLList(new Ot.GraphQLNonNull(tK))),resolve:e=>e.locations},args:{type:new Ot.GraphQLNonNull(new Ot.GraphQLList(new Ot.GraphQLNonNull(LA))),args:{includeDeprecated:{type:xo.GraphQLBoolean,defaultValue:!1}},resolve(e,{includeDeprecated:t}){return t?e.args:e.args.filter(r=>r.deprecationReason==null)}}})});ao.__Directive=eK;var tK=new Ot.GraphQLEnumType({name:"__DirectiveLocation",description:"A Directive can be adjacent to many parts of the GraphQL language, a __DirectiveLocation describes one such possible adjacencies.",values:{QUERY:{value:ta.DirectiveLocation.QUERY,description:"Location adjacent to a query operation."},MUTATION:{value:ta.DirectiveLocation.MUTATION,description:"Location adjacent to a mutation operation."},SUBSCRIPTION:{value:ta.DirectiveLocation.SUBSCRIPTION,description:"Location adjacent to a subscription operation."},FIELD:{value:ta.DirectiveLocation.FIELD,description:"Location adjacent to a field."},FRAGMENT_DEFINITION:{value:ta.DirectiveLocation.FRAGMENT_DEFINITION,description:"Location adjacent to a fragment definition."},FRAGMENT_SPREAD:{value:ta.DirectiveLocation.FRAGMENT_SPREAD,description:"Location adjacent to a fragment spread."},INLINE_FRAGMENT:{value:ta.DirectiveLocation.INLINE_FRAGMENT,description:"Location adjacent to an inline fragment."},VARIABLE_DEFINITION:{value:ta.DirectiveLocation.VARIABLE_DEFINITION,description:"Location adjacent to a variable definition."},SCHEMA:{value:ta.DirectiveLocation.SCHEMA,description:"Location adjacent to a schema definition."},SCALAR:{value:ta.DirectiveLocation.SCALAR,description:"Location adjacent to a scalar definition."},OBJECT:{value:ta.DirectiveLocation.OBJECT,description:"Location adjacent to an object type definition."},FIELD_DEFINITION:{value:ta.DirectiveLocation.FIELD_DEFINITION,description:"Location adjacent to a field definition."},ARGUMENT_DEFINITION:{value:ta.DirectiveLocation.ARGUMENT_DEFINITION,description:"Location adjacent to an argument definition."},INTERFACE:{value:ta.DirectiveLocation.INTERFACE,description:"Location adjacent to an interface definition."},UNION:{value:ta.DirectiveLocation.UNION,description:"Location adjacent to a union definition."},ENUM:{value:ta.DirectiveLocation.ENUM,description:"Location adjacent to an enum definition."},ENUM_VALUE:{value:ta.DirectiveLocation.ENUM_VALUE,description:"Location adjacent to an enum value definition."},INPUT_OBJECT:{value:ta.DirectiveLocation.INPUT_OBJECT,description:"Location adjacent to an input object type definition."},INPUT_FIELD_DEFINITION:{value:ta.DirectiveLocation.INPUT_FIELD_DEFINITION,description:"Location adjacent to an input object field definition."}}});ao.__DirectiveLocation=tK;var Jl=new Ot.GraphQLObjectType({name:"__Type",description:"The fundamental unit of any GraphQL Schema is the type. There are many kinds of types in GraphQL as represented by the `__TypeKind` enum.\n\nDepending on the kind of a type, certain fields describe information about that type. Scalar types provide no information beyond a name, description and optional `specifiedByURL`, while Enum types provide their values. Object and Interface types provide the fields they describe. Abstract types, Union and Interface, provide the Object types possible at runtime. List and NonNull types compose other types.",fields:()=>({kind:{type:new Ot.GraphQLNonNull(oK),resolve(e){if((0,Ot.isScalarType)(e))return ra.SCALAR;if((0,Ot.isObjectType)(e))return ra.OBJECT;if((0,Ot.isInterfaceType)(e))return ra.INTERFACE;if((0,Ot.isUnionType)(e))return ra.UNION;if((0,Ot.isEnumType)(e))return ra.ENUM;if((0,Ot.isInputObjectType)(e))return ra.INPUT_OBJECT;if((0,Ot.isListType)(e))return ra.LIST;if((0,Ot.isNonNullType)(e))return ra.NON_NULL;(0,Lut.invariant)(!1,`Unexpected type: "${(0,Rut.inspect)(e)}".`)}},name:{type:xo.GraphQLString,resolve:e=>"name"in e?e.name:void 0},description:{type:xo.GraphQLString,resolve:e=>"description"in e?e.description:void 0},specifiedByURL:{type:xo.GraphQLString,resolve:e=>"specifiedByURL"in e?e.specifiedByURL:void 0},fields:{type:new Ot.GraphQLList(new Ot.GraphQLNonNull(rK)),args:{includeDeprecated:{type:xo.GraphQLBoolean,defaultValue:!1}},resolve(e,{includeDeprecated:t}){if((0,Ot.isObjectType)(e)||(0,Ot.isInterfaceType)(e)){let r=Object.values(e.getFields());return t?r:r.filter(n=>n.deprecationReason==null)}}},interfaces:{type:new Ot.GraphQLList(new Ot.GraphQLNonNull(Jl)),resolve(e){if((0,Ot.isObjectType)(e)||(0,Ot.isInterfaceType)(e))return e.getInterfaces()}},possibleTypes:{type:new Ot.GraphQLList(new Ot.GraphQLNonNull(Jl)),resolve(e,t,r,{schema:n}){if((0,Ot.isAbstractType)(e))return n.getPossibleTypes(e)}},enumValues:{type:new Ot.GraphQLList(new Ot.GraphQLNonNull(nK)),args:{includeDeprecated:{type:xo.GraphQLBoolean,defaultValue:!1}},resolve(e,{includeDeprecated:t}){if((0,Ot.isEnumType)(e)){let r=e.getValues();return t?r:r.filter(n=>n.deprecationReason==null)}}},inputFields:{type:new Ot.GraphQLList(new Ot.GraphQLNonNull(LA)),args:{includeDeprecated:{type:xo.GraphQLBoolean,defaultValue:!1}},resolve(e,{includeDeprecated:t}){if((0,Ot.isInputObjectType)(e)){let r=Object.values(e.getFields());return t?r:r.filter(n=>n.deprecationReason==null)}}},ofType:{type:Jl,resolve:e=>"ofType"in e?e.ofType:void 0},isOneOf:{type:xo.GraphQLBoolean,resolve:e=>{if((0,Ot.isInputObjectType)(e))return e.isOneOf}}})});ao.__Type=Jl;var rK=new Ot.GraphQLObjectType({name:"__Field",description:"Object and Interface types are described by a list of Fields, each of which has a name, potentially a list of arguments, and a return type.",fields:()=>({name:{type:new Ot.GraphQLNonNull(xo.GraphQLString),resolve:e=>e.name},description:{type:xo.GraphQLString,resolve:e=>e.description},args:{type:new Ot.GraphQLNonNull(new Ot.GraphQLList(new Ot.GraphQLNonNull(LA))),args:{includeDeprecated:{type:xo.GraphQLBoolean,defaultValue:!1}},resolve(e,{includeDeprecated:t}){return t?e.args:e.args.filter(r=>r.deprecationReason==null)}},type:{type:new Ot.GraphQLNonNull(Jl),resolve:e=>e.type},isDeprecated:{type:new Ot.GraphQLNonNull(xo.GraphQLBoolean),resolve:e=>e.deprecationReason!=null},deprecationReason:{type:xo.GraphQLString,resolve:e=>e.deprecationReason}})});ao.__Field=rK;var LA=new Ot.GraphQLObjectType({name:"__InputValue",description:"Arguments provided to Fields or Directives and the input fields of an InputObject are represented as Input Values which describe their type and optionally a default value.",fields:()=>({name:{type:new Ot.GraphQLNonNull(xo.GraphQLString),resolve:e=>e.name},description:{type:xo.GraphQLString,resolve:e=>e.description},type:{type:new Ot.GraphQLNonNull(Jl),resolve:e=>e.type},defaultValue:{type:xo.GraphQLString,description:"A GraphQL-formatted string representing the default value for this input value.",resolve(e){let{type:t,defaultValue:r}=e,n=(0,Mut.astFromValue)(r,t);return n?(0,$ut.print)(n):null}},isDeprecated:{type:new Ot.GraphQLNonNull(xo.GraphQLBoolean),resolve:e=>e.deprecationReason!=null},deprecationReason:{type:xo.GraphQLString,resolve:e=>e.deprecationReason}})});ao.__InputValue=LA;var nK=new Ot.GraphQLObjectType({name:"__EnumValue",description:"One possible value for a given Enum. Enum values are unique values, not a placeholder for a string or numeric value. However an Enum value is returned in a JSON response as a string.",fields:()=>({name:{type:new Ot.GraphQLNonNull(xo.GraphQLString),resolve:e=>e.name},description:{type:xo.GraphQLString,resolve:e=>e.description},isDeprecated:{type:new Ot.GraphQLNonNull(xo.GraphQLBoolean),resolve:e=>e.deprecationReason!=null},deprecationReason:{type:xo.GraphQLString,resolve:e=>e.deprecationReason}})});ao.__EnumValue=nK;var ra;ao.TypeKind=ra;(function(e){e.SCALAR="SCALAR",e.OBJECT="OBJECT",e.INTERFACE="INTERFACE",e.UNION="UNION",e.ENUM="ENUM",e.INPUT_OBJECT="INPUT_OBJECT",e.LIST="LIST",e.NON_NULL="NON_NULL"})(ra||(ao.TypeKind=ra={}));var oK=new Ot.GraphQLEnumType({name:"__TypeKind",description:"An enum describing what kind of type a given `__Type` is.",values:{SCALAR:{value:ra.SCALAR,description:"Indicates this type is a scalar."},OBJECT:{value:ra.OBJECT,description:"Indicates this type is an object. `fields` and `interfaces` are valid fields."},INTERFACE:{value:ra.INTERFACE,description:"Indicates this type is an interface. `fields`, `interfaces`, and `possibleTypes` are valid fields."},UNION:{value:ra.UNION,description:"Indicates this type is a union. `possibleTypes` is a valid field."},ENUM:{value:ra.ENUM,description:"Indicates this type is an enum. `enumValues` is a valid field."},INPUT_OBJECT:{value:ra.INPUT_OBJECT,description:"Indicates this type is an input object. `inputFields` is a valid field."},LIST:{value:ra.LIST,description:"Indicates this type is a list. `ofType` is a valid field."},NON_NULL:{value:ra.NON_NULL,description:"Indicates this type is a non-null. `ofType` is a valid field."}}});ao.__TypeKind=oK;var jut={name:"__schema",type:new Ot.GraphQLNonNull(YV),description:"Access the current type schema of this server.",args:[],resolve:(e,t,r,{schema:n})=>n,deprecationReason:void 0,extensions:Object.create(null),astNode:void 0};ao.SchemaMetaFieldDef=jut;var But={name:"__type",type:Jl,description:"Request the type information of a single type.",args:[{name:"name",description:void 0,type:new Ot.GraphQLNonNull(xo.GraphQLString),defaultValue:void 0,deprecationReason:void 0,extensions:Object.create(null),astNode:void 0}],resolve:(e,{name:t},r,{schema:n})=>n.getType(t),deprecationReason:void 0,extensions:Object.create(null),astNode:void 0};ao.TypeMetaFieldDef=But;var qut={name:"__typename",type:new Ot.GraphQLNonNull(xo.GraphQLString),description:"The name of the current Object type at runtime.",args:[],resolve:(e,t,r,{parentType:n})=>n.name,deprecationReason:void 0,extensions:Object.create(null),astNode:void 0};ao.TypeNameMetaFieldDef=qut;var gSe=Object.freeze([YV,eK,tK,Jl,rK,LA,nK,oK]);ao.introspectionTypes=gSe;function Uut(e){return gSe.some(({name:t})=>e.name===t)}});var nS=L(R1=>{"use strict";Object.defineProperty(R1,"__esModule",{value:!0});R1.GraphQLSchema=void 0;R1.assertSchema=Gut;R1.isSchema=vSe;var _4=Ls(),aK=eo(),zut=gA(),Jut=yd(),Vut=VO(),iK=ql(),Ku=vn(),SSe=pc(),Kut=Vl();function vSe(e){return(0,zut.instanceOf)(e,f4)}function Gut(e){if(!vSe(e))throw new Error(`Expected ${(0,aK.inspect)(e)} to be a GraphQL schema.`);return e}var f4=class{constructor(t){var r,n;this.__validationErrors=t.assumeValid===!0?[]:void 0,(0,Jut.isObjectLike)(t)||(0,_4.devAssert)(!1,"Must provide configuration object."),!t.types||Array.isArray(t.types)||(0,_4.devAssert)(!1,`"types" must be Array if provided but got: ${(0,aK.inspect)(t.types)}.`),!t.directives||Array.isArray(t.directives)||(0,_4.devAssert)(!1,`"directives" must be Array if provided but got: ${(0,aK.inspect)(t.directives)}.`),this.description=t.description,this.extensions=(0,Vut.toObjMap)(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(r=t.extensionASTNodes)!==null&&r!==void 0?r:[],this._queryType=t.query,this._mutationType=t.mutation,this._subscriptionType=t.subscription,this._directives=(n=t.directives)!==null&&n!==void 0?n:SSe.specifiedDirectives;let o=new Set(t.types);if(t.types!=null)for(let i of t.types)o.delete(i),Gu(i,o);this._queryType!=null&&Gu(this._queryType,o),this._mutationType!=null&&Gu(this._mutationType,o),this._subscriptionType!=null&&Gu(this._subscriptionType,o);for(let i of this._directives)if((0,SSe.isDirective)(i))for(let a of i.args)Gu(a.type,o);Gu(Kut.__Schema,o),this._typeMap=Object.create(null),this._subTypeMap=Object.create(null),this._implementationsMap=Object.create(null);for(let i of o){if(i==null)continue;let a=i.name;if(a||(0,_4.devAssert)(!1,"One of the provided types for building the Schema is missing a name."),this._typeMap[a]!==void 0)throw new Error(`Schema must contain uniquely named types but contains multiple types named "${a}".`);if(this._typeMap[a]=i,(0,Ku.isInterfaceType)(i)){for(let s of i.getInterfaces())if((0,Ku.isInterfaceType)(s)){let c=this._implementationsMap[s.name];c===void 0&&(c=this._implementationsMap[s.name]={objects:[],interfaces:[]}),c.interfaces.push(i)}}else if((0,Ku.isObjectType)(i)){for(let s of i.getInterfaces())if((0,Ku.isInterfaceType)(s)){let c=this._implementationsMap[s.name];c===void 0&&(c=this._implementationsMap[s.name]={objects:[],interfaces:[]}),c.objects.push(i)}}}}get[Symbol.toStringTag](){return"GraphQLSchema"}getQueryType(){return this._queryType}getMutationType(){return this._mutationType}getSubscriptionType(){return this._subscriptionType}getRootType(t){switch(t){case iK.OperationTypeNode.QUERY:return this.getQueryType();case iK.OperationTypeNode.MUTATION:return this.getMutationType();case iK.OperationTypeNode.SUBSCRIPTION:return this.getSubscriptionType()}}getTypeMap(){return this._typeMap}getType(t){return this.getTypeMap()[t]}getPossibleTypes(t){return(0,Ku.isUnionType)(t)?t.getTypes():this.getImplementations(t).objects}getImplementations(t){let r=this._implementationsMap[t.name];return r??{objects:[],interfaces:[]}}isSubType(t,r){let n=this._subTypeMap[t.name];if(n===void 0){if(n=Object.create(null),(0,Ku.isUnionType)(t))for(let o of t.getTypes())n[o.name]=!0;else{let o=this.getImplementations(t);for(let i of o.objects)n[i.name]=!0;for(let i of o.interfaces)n[i.name]=!0}this._subTypeMap[t.name]=n}return n[r.name]!==void 0}getDirectives(){return this._directives}getDirective(t){return this.getDirectives().find(r=>r.name===t)}toConfig(){return{description:this.description,query:this.getQueryType(),mutation:this.getMutationType(),subscription:this.getSubscriptionType(),types:Object.values(this.getTypeMap()),directives:this.getDirectives(),extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes,assumeValid:this.__validationErrors!==void 0}}};R1.GraphQLSchema=f4;function Gu(e,t){let r=(0,Ku.getNamedType)(e);if(!t.has(r)){if(t.add(r),(0,Ku.isUnionType)(r))for(let n of r.getTypes())Gu(n,t);else if((0,Ku.isObjectType)(r)||(0,Ku.isInterfaceType)(r)){for(let n of r.getInterfaces())Gu(n,t);for(let n of Object.values(r.getFields())){Gu(n.type,t);for(let o of n.args)Gu(o.type,t)}}else if((0,Ku.isInputObjectType)(r))for(let n of Object.values(r.getFields()))Gu(n.type,t)}return t}});var MA=L(m4=>{"use strict";Object.defineProperty(m4,"__esModule",{value:!0});m4.assertValidSchema=Qut;m4.validateSchema=ASe;var ds=eo(),Hut=ar(),sK=ql(),bSe=wA(),gi=vn(),DSe=pc(),Zut=Vl(),Wut=nS();function ASe(e){if((0,Wut.assertSchema)(e),e.__validationErrors)return e.__validationErrors;let t=new lK(e);Xut(t),Yut(t),ept(t);let r=t.getErrors();return e.__validationErrors=r,r}function Qut(e){let t=ASe(e);if(t.length!==0)throw new Error(t.map(r=>r.message).join(` + +`))}var lK=class{constructor(t){this._errors=[],this.schema=t}reportError(t,r){let n=Array.isArray(r)?r.filter(Boolean):r;this._errors.push(new Hut.GraphQLError(t,{nodes:n}))}getErrors(){return this._errors}};function Xut(e){let t=e.schema,r=t.getQueryType();if(!r)e.reportError("Query root type must be provided.",t.astNode);else if(!(0,gi.isObjectType)(r)){var n;e.reportError(`Query root type must be Object type, it cannot be ${(0,ds.inspect)(r)}.`,(n=cK(t,sK.OperationTypeNode.QUERY))!==null&&n!==void 0?n:r.astNode)}let o=t.getMutationType();if(o&&!(0,gi.isObjectType)(o)){var i;e.reportError(`Mutation root type must be Object type if provided, it cannot be ${(0,ds.inspect)(o)}.`,(i=cK(t,sK.OperationTypeNode.MUTATION))!==null&&i!==void 0?i:o.astNode)}let a=t.getSubscriptionType();if(a&&!(0,gi.isObjectType)(a)){var s;e.reportError(`Subscription root type must be Object type if provided, it cannot be ${(0,ds.inspect)(a)}.`,(s=cK(t,sK.OperationTypeNode.SUBSCRIPTION))!==null&&s!==void 0?s:a.astNode)}}function cK(e,t){var r;return(r=[e.astNode,...e.extensionASTNodes].flatMap(n=>{var o;return(o=n?.operationTypes)!==null&&o!==void 0?o:[]}).find(n=>n.operation===t))===null||r===void 0?void 0:r.type}function Yut(e){for(let r of e.schema.getDirectives()){if(!(0,DSe.isDirective)(r)){e.reportError(`Expected directive but got: ${(0,ds.inspect)(r)}.`,r?.astNode);continue}oS(e,r),r.locations.length===0&&e.reportError(`Directive @${r.name} must include 1 or more locations.`,r.astNode);for(let n of r.args)if(oS(e,n),(0,gi.isInputType)(n.type)||e.reportError(`The type of @${r.name}(${n.name}:) must be Input Type but got: ${(0,ds.inspect)(n.type)}.`,n.astNode),(0,gi.isRequiredArgument)(n)&&n.deprecationReason!=null){var t;e.reportError(`Required argument @${r.name}(${n.name}:) cannot be deprecated.`,[uK(n.astNode),(t=n.astNode)===null||t===void 0?void 0:t.type])}}}function oS(e,t){t.name.startsWith("__")&&e.reportError(`Name "${t.name}" must not begin with "__", which is reserved by GraphQL introspection.`,t.astNode)}function ept(e){let t=spt(e),r=e.schema.getTypeMap();for(let n of Object.values(r)){if(!(0,gi.isNamedType)(n)){e.reportError(`Expected GraphQL named type but got: ${(0,ds.inspect)(n)}.`,n.astNode);continue}(0,Zut.isIntrospectionType)(n)||oS(e,n),(0,gi.isObjectType)(n)||(0,gi.isInterfaceType)(n)?(xSe(e,n),ESe(e,n)):(0,gi.isUnionType)(n)?npt(e,n):(0,gi.isEnumType)(n)?opt(e,n):(0,gi.isInputObjectType)(n)&&(ipt(e,n),t(n))}}function xSe(e,t){let r=Object.values(t.getFields());r.length===0&&e.reportError(`Type ${t.name} must define one or more fields.`,[t.astNode,...t.extensionASTNodes]);for(let a of r){if(oS(e,a),!(0,gi.isOutputType)(a.type)){var n;e.reportError(`The type of ${t.name}.${a.name} must be Output Type but got: ${(0,ds.inspect)(a.type)}.`,(n=a.astNode)===null||n===void 0?void 0:n.type)}for(let s of a.args){let c=s.name;if(oS(e,s),!(0,gi.isInputType)(s.type)){var o;e.reportError(`The type of ${t.name}.${a.name}(${c}:) must be Input Type but got: ${(0,ds.inspect)(s.type)}.`,(o=s.astNode)===null||o===void 0?void 0:o.type)}if((0,gi.isRequiredArgument)(s)&&s.deprecationReason!=null){var i;e.reportError(`Required argument ${t.name}.${a.name}(${c}:) cannot be deprecated.`,[uK(s.astNode),(i=s.astNode)===null||i===void 0?void 0:i.type])}}}}function ESe(e,t){let r=Object.create(null);for(let n of t.getInterfaces()){if(!(0,gi.isInterfaceType)(n)){e.reportError(`Type ${(0,ds.inspect)(t)} must only implement Interface types, it cannot implement ${(0,ds.inspect)(n)}.`,$A(t,n));continue}if(t===n){e.reportError(`Type ${t.name} cannot implement itself because it would create a circular reference.`,$A(t,n));continue}if(r[n.name]){e.reportError(`Type ${t.name} can only implement ${n.name} once.`,$A(t,n));continue}r[n.name]=!0,rpt(e,t,n),tpt(e,t,n)}}function tpt(e,t,r){let n=t.getFields();for(let c of Object.values(r.getFields())){let p=c.name,d=n[p];if(!d){e.reportError(`Interface field ${r.name}.${p} expected but ${t.name} does not provide it.`,[c.astNode,t.astNode,...t.extensionASTNodes]);continue}if(!(0,bSe.isTypeSubTypeOf)(e.schema,d.type,c.type)){var o,i;e.reportError(`Interface field ${r.name}.${p} expects type ${(0,ds.inspect)(c.type)} but ${t.name}.${p} is type ${(0,ds.inspect)(d.type)}.`,[(o=c.astNode)===null||o===void 0?void 0:o.type,(i=d.astNode)===null||i===void 0?void 0:i.type])}for(let f of c.args){let m=f.name,y=d.args.find(g=>g.name===m);if(!y){e.reportError(`Interface field argument ${r.name}.${p}(${m}:) expected but ${t.name}.${p} does not provide it.`,[f.astNode,d.astNode]);continue}if(!(0,bSe.isEqualType)(f.type,y.type)){var a,s;e.reportError(`Interface field argument ${r.name}.${p}(${m}:) expects type ${(0,ds.inspect)(f.type)} but ${t.name}.${p}(${m}:) is type ${(0,ds.inspect)(y.type)}.`,[(a=f.astNode)===null||a===void 0?void 0:a.type,(s=y.astNode)===null||s===void 0?void 0:s.type])}}for(let f of d.args){let m=f.name;!c.args.find(g=>g.name===m)&&(0,gi.isRequiredArgument)(f)&&e.reportError(`Object field ${t.name}.${p} includes required argument ${m} that is missing from the Interface field ${r.name}.${p}.`,[f.astNode,c.astNode])}}}function rpt(e,t,r){let n=t.getInterfaces();for(let o of r.getInterfaces())n.includes(o)||e.reportError(o===t?`Type ${t.name} cannot implement ${r.name} because it would create a circular reference.`:`Type ${t.name} must implement ${o.name} because it is implemented by ${r.name}.`,[...$A(r,o),...$A(t,r)])}function npt(e,t){let r=t.getTypes();r.length===0&&e.reportError(`Union type ${t.name} must define one or more member types.`,[t.astNode,...t.extensionASTNodes]);let n=Object.create(null);for(let o of r){if(n[o.name]){e.reportError(`Union type ${t.name} can only include type ${o.name} once.`,TSe(t,o.name));continue}n[o.name]=!0,(0,gi.isObjectType)(o)||e.reportError(`Union type ${t.name} can only include Object types, it cannot include ${(0,ds.inspect)(o)}.`,TSe(t,String(o)))}}function opt(e,t){let r=t.getValues();r.length===0&&e.reportError(`Enum type ${t.name} must define one or more values.`,[t.astNode,...t.extensionASTNodes]);for(let n of r)oS(e,n)}function ipt(e,t){let r=Object.values(t.getFields());r.length===0&&e.reportError(`Input Object type ${t.name} must define one or more fields.`,[t.astNode,...t.extensionASTNodes]);for(let i of r){if(oS(e,i),!(0,gi.isInputType)(i.type)){var n;e.reportError(`The type of ${t.name}.${i.name} must be Input Type but got: ${(0,ds.inspect)(i.type)}.`,(n=i.astNode)===null||n===void 0?void 0:n.type)}if((0,gi.isRequiredInputField)(i)&&i.deprecationReason!=null){var o;e.reportError(`Required input field ${t.name}.${i.name} cannot be deprecated.`,[uK(i.astNode),(o=i.astNode)===null||o===void 0?void 0:o.type])}t.isOneOf&&apt(t,i,e)}}function apt(e,t,r){if((0,gi.isNonNullType)(t.type)){var n;r.reportError(`OneOf input field ${e.name}.${t.name} must be nullable.`,(n=t.astNode)===null||n===void 0?void 0:n.type)}t.defaultValue!==void 0&&r.reportError(`OneOf input field ${e.name}.${t.name} cannot have a default value.`,t.astNode)}function spt(e){let t=Object.create(null),r=[],n=Object.create(null);return o;function o(i){if(t[i.name])return;t[i.name]=!0,n[i.name]=r.length;let a=Object.values(i.getFields());for(let s of a)if((0,gi.isNonNullType)(s.type)&&(0,gi.isInputObjectType)(s.type.ofType)){let c=s.type.ofType,p=n[c.name];if(r.push(s),p===void 0)o(c);else{let d=r.slice(p),f=d.map(m=>m.name).join(".");e.reportError(`Cannot reference Input Object "${c.name}" within itself through a series of non-null fields: "${f}".`,d.map(m=>m.astNode))}r.pop()}n[i.name]=void 0}}function $A(e,t){let{astNode:r,extensionASTNodes:n}=e;return(r!=null?[r,...n]:n).flatMap(i=>{var a;return(a=i.interfaces)!==null&&a!==void 0?a:[]}).filter(i=>i.name.value===t.name)}function TSe(e,t){let{astNode:r,extensionASTNodes:n}=e;return(r!=null?[r,...n]:n).flatMap(i=>{var a;return(a=i.types)!==null&&a!==void 0?a:[]}).filter(i=>i.name.value===t)}function uK(e){var t;return e==null||(t=e.directives)===null||t===void 0?void 0:t.find(r=>r.name.value===DSe.GraphQLDeprecatedDirective.name)}});var bd=L(_K=>{"use strict";Object.defineProperty(_K,"__esModule",{value:!0});_K.typeFromAST=dK;var pK=Sn(),ISe=vn();function dK(e,t){switch(t.kind){case pK.Kind.LIST_TYPE:{let r=dK(e,t.type);return r&&new ISe.GraphQLList(r)}case pK.Kind.NON_NULL_TYPE:{let r=dK(e,t.type);return r&&new ISe.GraphQLNonNull(r)}case pK.Kind.NAMED_TYPE:return e.getType(t.name.value)}}});var h4=L(jA=>{"use strict";Object.defineProperty(jA,"__esModule",{value:!0});jA.TypeInfo=void 0;jA.visitWithTypeInfo=upt;var cpt=ql(),Si=Sn(),wSe=Qg(),vi=vn(),L1=Vl(),kSe=bd(),fK=class{constructor(t,r,n){this._schema=t,this._typeStack=[],this._parentTypeStack=[],this._inputTypeStack=[],this._fieldDefStack=[],this._defaultValueStack=[],this._directive=null,this._argument=null,this._enumValue=null,this._getFieldDef=n??lpt,r&&((0,vi.isInputType)(r)&&this._inputTypeStack.push(r),(0,vi.isCompositeType)(r)&&this._parentTypeStack.push(r),(0,vi.isOutputType)(r)&&this._typeStack.push(r))}get[Symbol.toStringTag](){return"TypeInfo"}getType(){if(this._typeStack.length>0)return this._typeStack[this._typeStack.length-1]}getParentType(){if(this._parentTypeStack.length>0)return this._parentTypeStack[this._parentTypeStack.length-1]}getInputType(){if(this._inputTypeStack.length>0)return this._inputTypeStack[this._inputTypeStack.length-1]}getParentInputType(){if(this._inputTypeStack.length>1)return this._inputTypeStack[this._inputTypeStack.length-2]}getFieldDef(){if(this._fieldDefStack.length>0)return this._fieldDefStack[this._fieldDefStack.length-1]}getDefaultValue(){if(this._defaultValueStack.length>0)return this._defaultValueStack[this._defaultValueStack.length-1]}getDirective(){return this._directive}getArgument(){return this._argument}getEnumValue(){return this._enumValue}enter(t){let r=this._schema;switch(t.kind){case Si.Kind.SELECTION_SET:{let o=(0,vi.getNamedType)(this.getType());this._parentTypeStack.push((0,vi.isCompositeType)(o)?o:void 0);break}case Si.Kind.FIELD:{let o=this.getParentType(),i,a;o&&(i=this._getFieldDef(r,o,t),i&&(a=i.type)),this._fieldDefStack.push(i),this._typeStack.push((0,vi.isOutputType)(a)?a:void 0);break}case Si.Kind.DIRECTIVE:this._directive=r.getDirective(t.name.value);break;case Si.Kind.OPERATION_DEFINITION:{let o=r.getRootType(t.operation);this._typeStack.push((0,vi.isObjectType)(o)?o:void 0);break}case Si.Kind.INLINE_FRAGMENT:case Si.Kind.FRAGMENT_DEFINITION:{let o=t.typeCondition,i=o?(0,kSe.typeFromAST)(r,o):(0,vi.getNamedType)(this.getType());this._typeStack.push((0,vi.isOutputType)(i)?i:void 0);break}case Si.Kind.VARIABLE_DEFINITION:{let o=(0,kSe.typeFromAST)(r,t.type);this._inputTypeStack.push((0,vi.isInputType)(o)?o:void 0);break}case Si.Kind.ARGUMENT:{var n;let o,i,a=(n=this.getDirective())!==null&&n!==void 0?n:this.getFieldDef();a&&(o=a.args.find(s=>s.name===t.name.value),o&&(i=o.type)),this._argument=o,this._defaultValueStack.push(o?o.defaultValue:void 0),this._inputTypeStack.push((0,vi.isInputType)(i)?i:void 0);break}case Si.Kind.LIST:{let o=(0,vi.getNullableType)(this.getInputType()),i=(0,vi.isListType)(o)?o.ofType:o;this._defaultValueStack.push(void 0),this._inputTypeStack.push((0,vi.isInputType)(i)?i:void 0);break}case Si.Kind.OBJECT_FIELD:{let o=(0,vi.getNamedType)(this.getInputType()),i,a;(0,vi.isInputObjectType)(o)&&(a=o.getFields()[t.name.value],a&&(i=a.type)),this._defaultValueStack.push(a?a.defaultValue:void 0),this._inputTypeStack.push((0,vi.isInputType)(i)?i:void 0);break}case Si.Kind.ENUM:{let o=(0,vi.getNamedType)(this.getInputType()),i;(0,vi.isEnumType)(o)&&(i=o.getValue(t.value)),this._enumValue=i;break}default:}}leave(t){switch(t.kind){case Si.Kind.SELECTION_SET:this._parentTypeStack.pop();break;case Si.Kind.FIELD:this._fieldDefStack.pop(),this._typeStack.pop();break;case Si.Kind.DIRECTIVE:this._directive=null;break;case Si.Kind.OPERATION_DEFINITION:case Si.Kind.INLINE_FRAGMENT:case Si.Kind.FRAGMENT_DEFINITION:this._typeStack.pop();break;case Si.Kind.VARIABLE_DEFINITION:this._inputTypeStack.pop();break;case Si.Kind.ARGUMENT:this._argument=null,this._defaultValueStack.pop(),this._inputTypeStack.pop();break;case Si.Kind.LIST:case Si.Kind.OBJECT_FIELD:this._defaultValueStack.pop(),this._inputTypeStack.pop();break;case Si.Kind.ENUM:this._enumValue=null;break;default:}}};jA.TypeInfo=fK;function lpt(e,t,r){let n=r.name.value;if(n===L1.SchemaMetaFieldDef.name&&e.getQueryType()===t)return L1.SchemaMetaFieldDef;if(n===L1.TypeMetaFieldDef.name&&e.getQueryType()===t)return L1.TypeMetaFieldDef;if(n===L1.TypeNameMetaFieldDef.name&&(0,vi.isCompositeType)(t))return L1.TypeNameMetaFieldDef;if((0,vi.isObjectType)(t)||(0,vi.isInterfaceType)(t))return t.getFields()[n]}function upt(e,t){return{enter(...r){let n=r[0];e.enter(n);let o=(0,wSe.getEnterLeaveForKind)(t,n.kind).enter;if(o){let i=o.apply(t,r);return i!==void 0&&(e.leave(n),(0,cpt.isNode)(i)&&e.enter(i)),i}},leave(...r){let n=r[0],o=(0,wSe.getEnterLeaveForKind)(t,n.kind).leave,i;return o&&(i=o.apply(t,r)),e.leave(n),i}}}});var iS=L(Hc=>{"use strict";Object.defineProperty(Hc,"__esModule",{value:!0});Hc.isConstValueNode=mK;Hc.isDefinitionNode=ppt;Hc.isExecutableDefinitionNode=CSe;Hc.isSchemaCoordinateNode=fpt;Hc.isSelectionNode=dpt;Hc.isTypeDefinitionNode=NSe;Hc.isTypeExtensionNode=RSe;Hc.isTypeNode=_pt;Hc.isTypeSystemDefinitionNode=OSe;Hc.isTypeSystemExtensionNode=FSe;Hc.isValueNode=PSe;var tn=Sn();function ppt(e){return CSe(e)||OSe(e)||FSe(e)}function CSe(e){return e.kind===tn.Kind.OPERATION_DEFINITION||e.kind===tn.Kind.FRAGMENT_DEFINITION}function dpt(e){return e.kind===tn.Kind.FIELD||e.kind===tn.Kind.FRAGMENT_SPREAD||e.kind===tn.Kind.INLINE_FRAGMENT}function PSe(e){return e.kind===tn.Kind.VARIABLE||e.kind===tn.Kind.INT||e.kind===tn.Kind.FLOAT||e.kind===tn.Kind.STRING||e.kind===tn.Kind.BOOLEAN||e.kind===tn.Kind.NULL||e.kind===tn.Kind.ENUM||e.kind===tn.Kind.LIST||e.kind===tn.Kind.OBJECT}function mK(e){return PSe(e)&&(e.kind===tn.Kind.LIST?e.values.some(mK):e.kind===tn.Kind.OBJECT?e.fields.some(t=>mK(t.value)):e.kind!==tn.Kind.VARIABLE)}function _pt(e){return e.kind===tn.Kind.NAMED_TYPE||e.kind===tn.Kind.LIST_TYPE||e.kind===tn.Kind.NON_NULL_TYPE}function OSe(e){return e.kind===tn.Kind.SCHEMA_DEFINITION||NSe(e)||e.kind===tn.Kind.DIRECTIVE_DEFINITION}function NSe(e){return e.kind===tn.Kind.SCALAR_TYPE_DEFINITION||e.kind===tn.Kind.OBJECT_TYPE_DEFINITION||e.kind===tn.Kind.INTERFACE_TYPE_DEFINITION||e.kind===tn.Kind.UNION_TYPE_DEFINITION||e.kind===tn.Kind.ENUM_TYPE_DEFINITION||e.kind===tn.Kind.INPUT_OBJECT_TYPE_DEFINITION}function FSe(e){return e.kind===tn.Kind.SCHEMA_EXTENSION||RSe(e)}function RSe(e){return e.kind===tn.Kind.SCALAR_TYPE_EXTENSION||e.kind===tn.Kind.OBJECT_TYPE_EXTENSION||e.kind===tn.Kind.INTERFACE_TYPE_EXTENSION||e.kind===tn.Kind.UNION_TYPE_EXTENSION||e.kind===tn.Kind.ENUM_TYPE_EXTENSION||e.kind===tn.Kind.INPUT_OBJECT_TYPE_EXTENSION}function fpt(e){return e.kind===tn.Kind.TYPE_COORDINATE||e.kind===tn.Kind.MEMBER_COORDINATE||e.kind===tn.Kind.ARGUMENT_COORDINATE||e.kind===tn.Kind.DIRECTIVE_COORDINATE||e.kind===tn.Kind.DIRECTIVE_ARGUMENT_COORDINATE}});var yK=L(hK=>{"use strict";Object.defineProperty(hK,"__esModule",{value:!0});hK.ExecutableDefinitionsRule=ypt;var mpt=ar(),LSe=Sn(),hpt=iS();function ypt(e){return{Document(t){for(let r of t.definitions)if(!(0,hpt.isExecutableDefinitionNode)(r)){let n=r.kind===LSe.Kind.SCHEMA_DEFINITION||r.kind===LSe.Kind.SCHEMA_EXTENSION?"schema":'"'+r.name.value+'"';e.reportError(new mpt.GraphQLError(`The ${n} definition is not executable.`,{nodes:r}))}return!1}}}});var SK=L(gK=>{"use strict";Object.defineProperty(gK,"__esModule",{value:!0});gK.FieldsOnCorrectTypeRule=bpt;var $Se=bh(),gpt=xA(),Spt=Eh(),vpt=ar(),BA=vn();function bpt(e){return{Field(t){let r=e.getParentType();if(r&&!e.getFieldDef()){let o=e.getSchema(),i=t.name.value,a=(0,$Se.didYouMean)("to use an inline fragment on",xpt(o,r,i));a===""&&(a=(0,$Se.didYouMean)(Ept(r,i))),e.reportError(new vpt.GraphQLError(`Cannot query field "${i}" on type "${r.name}".`+a,{nodes:t}))}}}}function xpt(e,t,r){if(!(0,BA.isAbstractType)(t))return[];let n=new Set,o=Object.create(null);for(let a of e.getPossibleTypes(t))if(a.getFields()[r]){n.add(a),o[a.name]=1;for(let s of a.getInterfaces()){var i;s.getFields()[r]&&(n.add(s),o[s.name]=((i=o[s.name])!==null&&i!==void 0?i:0)+1)}}return[...n].sort((a,s)=>{let c=o[s.name]-o[a.name];return c!==0?c:(0,BA.isInterfaceType)(a)&&e.isSubType(a,s)?-1:(0,BA.isInterfaceType)(s)&&e.isSubType(s,a)?1:(0,gpt.naturalCompare)(a.name,s.name)}).map(a=>a.name)}function Ept(e,t){if((0,BA.isObjectType)(e)||(0,BA.isInterfaceType)(e)){let r=Object.keys(e.getFields());return(0,Spt.suggestionList)(t,r)}return[]}});var bK=L(vK=>{"use strict";Object.defineProperty(vK,"__esModule",{value:!0});vK.FragmentsOnCompositeTypesRule=Tpt;var MSe=ar(),jSe=Gc(),BSe=vn(),qSe=bd();function Tpt(e){return{InlineFragment(t){let r=t.typeCondition;if(r){let n=(0,qSe.typeFromAST)(e.getSchema(),r);if(n&&!(0,BSe.isCompositeType)(n)){let o=(0,jSe.print)(r);e.reportError(new MSe.GraphQLError(`Fragment cannot condition on non composite type "${o}".`,{nodes:r}))}}},FragmentDefinition(t){let r=(0,qSe.typeFromAST)(e.getSchema(),t.typeCondition);if(r&&!(0,BSe.isCompositeType)(r)){let n=(0,jSe.print)(t.typeCondition);e.reportError(new MSe.GraphQLError(`Fragment "${t.name.value}" cannot condition on non composite type "${n}".`,{nodes:t.typeCondition}))}}}}});var xK=L(y4=>{"use strict";Object.defineProperty(y4,"__esModule",{value:!0});y4.KnownArgumentNamesOnDirectivesRule=VSe;y4.KnownArgumentNamesRule=Ipt;var USe=bh(),zSe=Eh(),JSe=ar(),Dpt=Sn(),Apt=pc();function Ipt(e){return{...VSe(e),Argument(t){let r=e.getArgument(),n=e.getFieldDef(),o=e.getParentType();if(!r&&n&&o){let i=t.name.value,a=n.args.map(c=>c.name),s=(0,zSe.suggestionList)(i,a);e.reportError(new JSe.GraphQLError(`Unknown argument "${i}" on field "${o.name}.${n.name}".`+(0,USe.didYouMean)(s),{nodes:t}))}}}}function VSe(e){let t=Object.create(null),r=e.getSchema(),n=r?r.getDirectives():Apt.specifiedDirectives;for(let a of n)t[a.name]=a.args.map(s=>s.name);let o=e.getDocument().definitions;for(let a of o)if(a.kind===Dpt.Kind.DIRECTIVE_DEFINITION){var i;let s=(i=a.arguments)!==null&&i!==void 0?i:[];t[a.name.value]=s.map(c=>c.name.value)}return{Directive(a){let s=a.name.value,c=t[s];if(a.arguments&&c)for(let p of a.arguments){let d=p.name.value;if(!c.includes(d)){let f=(0,zSe.suggestionList)(d,c);e.reportError(new JSe.GraphQLError(`Unknown argument "${d}" on directive "@${s}".`+(0,USe.didYouMean)(f),{nodes:p}))}}return!1}}}});var AK=L(DK=>{"use strict";Object.defineProperty(DK,"__esModule",{value:!0});DK.KnownDirectivesRule=Cpt;var wpt=eo(),EK=us(),KSe=ar(),TK=ql(),na=k1(),Wo=Sn(),kpt=pc();function Cpt(e){let t=Object.create(null),r=e.getSchema(),n=r?r.getDirectives():kpt.specifiedDirectives;for(let i of n)t[i.name]=i.locations;let o=e.getDocument().definitions;for(let i of o)i.kind===Wo.Kind.DIRECTIVE_DEFINITION&&(t[i.name.value]=i.locations.map(a=>a.value));return{Directive(i,a,s,c,p){let d=i.name.value,f=t[d];if(!f){e.reportError(new KSe.GraphQLError(`Unknown directive "@${d}".`,{nodes:i}));return}let m=Ppt(p);m&&!f.includes(m)&&e.reportError(new KSe.GraphQLError(`Directive "@${d}" may not be used on ${m}.`,{nodes:i}))}}}function Ppt(e){let t=e[e.length-1];switch("kind"in t||(0,EK.invariant)(!1),t.kind){case Wo.Kind.OPERATION_DEFINITION:return Opt(t.operation);case Wo.Kind.FIELD:return na.DirectiveLocation.FIELD;case Wo.Kind.FRAGMENT_SPREAD:return na.DirectiveLocation.FRAGMENT_SPREAD;case Wo.Kind.INLINE_FRAGMENT:return na.DirectiveLocation.INLINE_FRAGMENT;case Wo.Kind.FRAGMENT_DEFINITION:return na.DirectiveLocation.FRAGMENT_DEFINITION;case Wo.Kind.VARIABLE_DEFINITION:return na.DirectiveLocation.VARIABLE_DEFINITION;case Wo.Kind.SCHEMA_DEFINITION:case Wo.Kind.SCHEMA_EXTENSION:return na.DirectiveLocation.SCHEMA;case Wo.Kind.SCALAR_TYPE_DEFINITION:case Wo.Kind.SCALAR_TYPE_EXTENSION:return na.DirectiveLocation.SCALAR;case Wo.Kind.OBJECT_TYPE_DEFINITION:case Wo.Kind.OBJECT_TYPE_EXTENSION:return na.DirectiveLocation.OBJECT;case Wo.Kind.FIELD_DEFINITION:return na.DirectiveLocation.FIELD_DEFINITION;case Wo.Kind.INTERFACE_TYPE_DEFINITION:case Wo.Kind.INTERFACE_TYPE_EXTENSION:return na.DirectiveLocation.INTERFACE;case Wo.Kind.UNION_TYPE_DEFINITION:case Wo.Kind.UNION_TYPE_EXTENSION:return na.DirectiveLocation.UNION;case Wo.Kind.ENUM_TYPE_DEFINITION:case Wo.Kind.ENUM_TYPE_EXTENSION:return na.DirectiveLocation.ENUM;case Wo.Kind.ENUM_VALUE_DEFINITION:return na.DirectiveLocation.ENUM_VALUE;case Wo.Kind.INPUT_OBJECT_TYPE_DEFINITION:case Wo.Kind.INPUT_OBJECT_TYPE_EXTENSION:return na.DirectiveLocation.INPUT_OBJECT;case Wo.Kind.INPUT_VALUE_DEFINITION:{let r=e[e.length-3];return"kind"in r||(0,EK.invariant)(!1),r.kind===Wo.Kind.INPUT_OBJECT_TYPE_DEFINITION?na.DirectiveLocation.INPUT_FIELD_DEFINITION:na.DirectiveLocation.ARGUMENT_DEFINITION}default:(0,EK.invariant)(!1,"Unexpected kind: "+(0,wpt.inspect)(t.kind))}}function Opt(e){switch(e){case TK.OperationTypeNode.QUERY:return na.DirectiveLocation.QUERY;case TK.OperationTypeNode.MUTATION:return na.DirectiveLocation.MUTATION;case TK.OperationTypeNode.SUBSCRIPTION:return na.DirectiveLocation.SUBSCRIPTION}}});var wK=L(IK=>{"use strict";Object.defineProperty(IK,"__esModule",{value:!0});IK.KnownFragmentNamesRule=Fpt;var Npt=ar();function Fpt(e){return{FragmentSpread(t){let r=t.name.value;e.getFragment(r)||e.reportError(new Npt.GraphQLError(`Unknown fragment "${r}".`,{nodes:t.name}))}}}});var PK=L(CK=>{"use strict";Object.defineProperty(CK,"__esModule",{value:!0});CK.KnownTypeNamesRule=Bpt;var Rpt=bh(),Lpt=Eh(),$pt=ar(),kK=iS(),Mpt=Vl(),jpt=vd();function Bpt(e){let t=e.getSchema(),r=t?t.getTypeMap():Object.create(null),n=Object.create(null);for(let i of e.getDocument().definitions)(0,kK.isTypeDefinitionNode)(i)&&(n[i.name.value]=!0);let o=[...Object.keys(r),...Object.keys(n)];return{NamedType(i,a,s,c,p){let d=i.name.value;if(!r[d]&&!n[d]){var f;let m=(f=p[2])!==null&&f!==void 0?f:s,y=m!=null&&qpt(m);if(y&&GSe.includes(d))return;let g=(0,Lpt.suggestionList)(d,y?GSe.concat(o):o);e.reportError(new $pt.GraphQLError(`Unknown type "${d}".`+(0,Rpt.didYouMean)(g),{nodes:i}))}}}}var GSe=[...jpt.specifiedScalarTypes,...Mpt.introspectionTypes].map(e=>e.name);function qpt(e){return"kind"in e&&((0,kK.isTypeSystemDefinitionNode)(e)||(0,kK.isTypeSystemExtensionNode)(e))}});var NK=L(OK=>{"use strict";Object.defineProperty(OK,"__esModule",{value:!0});OK.LoneAnonymousOperationRule=Jpt;var Upt=ar(),zpt=Sn();function Jpt(e){let t=0;return{Document(r){t=r.definitions.filter(n=>n.kind===zpt.Kind.OPERATION_DEFINITION).length},OperationDefinition(r){!r.name&&t>1&&e.reportError(new Upt.GraphQLError("This anonymous operation must be the only defined operation.",{nodes:r}))}}}});var RK=L(FK=>{"use strict";Object.defineProperty(FK,"__esModule",{value:!0});FK.LoneSchemaDefinitionRule=Vpt;var HSe=ar();function Vpt(e){var t,r,n;let o=e.getSchema(),i=(t=(r=(n=o?.astNode)!==null&&n!==void 0?n:o?.getQueryType())!==null&&r!==void 0?r:o?.getMutationType())!==null&&t!==void 0?t:o?.getSubscriptionType(),a=0;return{SchemaDefinition(s){if(i){e.reportError(new HSe.GraphQLError("Cannot define a new schema within a schema extension.",{nodes:s}));return}a>0&&e.reportError(new HSe.GraphQLError("Must provide only one schema definition.",{nodes:s})),++a}}}});var $K=L(LK=>{"use strict";Object.defineProperty(LK,"__esModule",{value:!0});LK.MaxIntrospectionDepthRule=Hpt;var Kpt=ar(),ZSe=Sn(),Gpt=3;function Hpt(e){function t(r,n=Object.create(null),o=0){if(r.kind===ZSe.Kind.FRAGMENT_SPREAD){let i=r.name.value;if(n[i]===!0)return!1;let a=e.getFragment(i);if(!a)return!1;try{return n[i]=!0,t(a,n,o)}finally{n[i]=void 0}}if(r.kind===ZSe.Kind.FIELD&&(r.name.value==="fields"||r.name.value==="interfaces"||r.name.value==="possibleTypes"||r.name.value==="inputFields")&&(o++,o>=Gpt))return!0;if("selectionSet"in r&&r.selectionSet){for(let i of r.selectionSet.selections)if(t(i,n,o))return!0}return!1}return{Field(r){if((r.name.value==="__schema"||r.name.value==="__type")&&t(r))return e.reportError(new Kpt.GraphQLError("Maximum introspection depth exceeded",{nodes:[r]})),!1}}}});var jK=L(MK=>{"use strict";Object.defineProperty(MK,"__esModule",{value:!0});MK.NoFragmentCyclesRule=Wpt;var Zpt=ar();function Wpt(e){let t=Object.create(null),r=[],n=Object.create(null);return{OperationDefinition:()=>!1,FragmentDefinition(i){return o(i),!1}};function o(i){if(t[i.name.value])return;let a=i.name.value;t[a]=!0;let s=e.getFragmentSpreads(i.selectionSet);if(s.length!==0){n[a]=r.length;for(let c of s){let p=c.name.value,d=n[p];if(r.push(c),d===void 0){let f=e.getFragment(p);f&&o(f)}else{let f=r.slice(d),m=f.slice(0,-1).map(y=>'"'+y.name.value+'"').join(", ");e.reportError(new Zpt.GraphQLError(`Cannot spread fragment "${p}" within itself`+(m!==""?` via ${m}.`:"."),{nodes:f}))}r.pop()}n[a]=void 0}}}});var qK=L(BK=>{"use strict";Object.defineProperty(BK,"__esModule",{value:!0});BK.NoUndefinedVariablesRule=Xpt;var Qpt=ar();function Xpt(e){let t=Object.create(null);return{OperationDefinition:{enter(){t=Object.create(null)},leave(r){let n=e.getRecursiveVariableUsages(r);for(let{node:o}of n){let i=o.name.value;t[i]!==!0&&e.reportError(new Qpt.GraphQLError(r.name?`Variable "$${i}" is not defined by operation "${r.name.value}".`:`Variable "$${i}" is not defined.`,{nodes:[o,r]}))}}},VariableDefinition(r){t[r.variable.name.value]=!0}}}});var zK=L(UK=>{"use strict";Object.defineProperty(UK,"__esModule",{value:!0});UK.NoUnusedFragmentsRule=edt;var Ypt=ar();function edt(e){let t=[],r=[];return{OperationDefinition(n){return t.push(n),!1},FragmentDefinition(n){return r.push(n),!1},Document:{leave(){let n=Object.create(null);for(let o of t)for(let i of e.getRecursivelyReferencedFragments(o))n[i.name.value]=!0;for(let o of r){let i=o.name.value;n[i]!==!0&&e.reportError(new Ypt.GraphQLError(`Fragment "${i}" is never used.`,{nodes:o}))}}}}}});var VK=L(JK=>{"use strict";Object.defineProperty(JK,"__esModule",{value:!0});JK.NoUnusedVariablesRule=rdt;var tdt=ar();function rdt(e){let t=[];return{OperationDefinition:{enter(){t=[]},leave(r){let n=Object.create(null),o=e.getRecursiveVariableUsages(r);for(let{node:i}of o)n[i.name.value]=!0;for(let i of t){let a=i.variable.name.value;n[a]!==!0&&e.reportError(new tdt.GraphQLError(r.name?`Variable "$${a}" is never used in operation "${r.name.value}".`:`Variable "$${a}" is never used.`,{nodes:i}))}}},VariableDefinition(r){t.push(r)}}}});var HK=L(GK=>{"use strict";Object.defineProperty(GK,"__esModule",{value:!0});GK.sortValueNode=KK;var ndt=xA(),lf=Sn();function KK(e){switch(e.kind){case lf.Kind.OBJECT:return{...e,fields:odt(e.fields)};case lf.Kind.LIST:return{...e,values:e.values.map(KK)};case lf.Kind.INT:case lf.Kind.FLOAT:case lf.Kind.STRING:case lf.Kind.BOOLEAN:case lf.Kind.NULL:case lf.Kind.ENUM:case lf.Kind.VARIABLE:return e}}function odt(e){return e.map(t=>({...t,value:KK(t.value)})).sort((t,r)=>(0,ndt.naturalCompare)(t.name.value,r.name.value))}});var tG=L(eG=>{"use strict";Object.defineProperty(eG,"__esModule",{value:!0});eG.OverlappingFieldsCanBeMergedRule=cdt;var WSe=eo(),idt=ar(),ZK=Sn(),adt=Gc(),dc=vn(),sdt=HK(),XSe=bd();function YSe(e){return Array.isArray(e)?e.map(([t,r])=>`subfields "${t}" conflict because `+YSe(r)).join(" and "):e}function cdt(e){let t=new b4,r=new XK,n=new Map;return{SelectionSet(o){let i=ldt(e,n,t,r,e.getParentType(),o);for(let[[a,s],c,p]of i){let d=YSe(s);e.reportError(new idt.GraphQLError(`Fields "${a}" conflict because ${d}. Use different aliases on the fields to fetch both if this was intentional.`,{nodes:c.concat(p)}))}}}}function ldt(e,t,r,n,o,i){let a=[],[s,c]=v4(e,t,o,i);if(pdt(e,a,t,r,n,s),c.length!==0)for(let p=0;p1)for(let c=0;c[i.value,a]));return r.every(i=>{let a=i.value,s=o.get(i.name.value);return s===void 0?!1:QSe(a)===QSe(s)})}function QSe(e){return(0,adt.print)((0,sdt.sortValueNode)(e))}function WK(e,t){return(0,dc.isListType)(e)?(0,dc.isListType)(t)?WK(e.ofType,t.ofType):!0:(0,dc.isListType)(t)?!0:(0,dc.isNonNullType)(e)?(0,dc.isNonNullType)(t)?WK(e.ofType,t.ofType):!0:(0,dc.isNonNullType)(t)?!0:(0,dc.isLeafType)(e)||(0,dc.isLeafType)(t)?e!==t:!1}function v4(e,t,r,n){let o=t.get(n);if(o)return o;let i=Object.create(null),a=Object.create(null);t0e(e,r,n,i,a);let s=[i,Object.keys(a)];return t.set(n,s),s}function QK(e,t,r){let n=t.get(r.selectionSet);if(n)return n;let o=(0,XSe.typeFromAST)(e.getSchema(),r.typeCondition);return v4(e,t,o,r.selectionSet)}function t0e(e,t,r,n,o){for(let i of r.selections)switch(i.kind){case ZK.Kind.FIELD:{let a=i.name.value,s;((0,dc.isObjectType)(t)||(0,dc.isInterfaceType)(t))&&(s=t.getFields()[a]);let c=i.alias?i.alias.value:a;n[c]||(n[c]=[]),n[c].push([t,i,s]);break}case ZK.Kind.FRAGMENT_SPREAD:o[i.name.value]=!0;break;case ZK.Kind.INLINE_FRAGMENT:{let a=i.typeCondition,s=a?(0,XSe.typeFromAST)(e.getSchema(),a):t;t0e(e,s,i.selectionSet,n,o);break}}}function _dt(e,t,r,n){if(e.length>0)return[[t,e.map(([o])=>o)],[r,...e.map(([,o])=>o).flat()],[n,...e.map(([,,o])=>o).flat()]]}var b4=class{constructor(){this._data=new Map}has(t,r,n){var o;let i=(o=this._data.get(t))===null||o===void 0?void 0:o.get(r);return i===void 0?!1:n?!0:n===i}add(t,r,n){let o=this._data.get(t);o===void 0?this._data.set(t,new Map([[r,n]])):o.set(r,n)}},XK=class{constructor(){this._orderedPairSet=new b4}has(t,r,n){return t{"use strict";Object.defineProperty(nG,"__esModule",{value:!0});nG.PossibleFragmentSpreadsRule=mdt;var x4=eo(),r0e=ar(),rG=vn(),n0e=wA(),fdt=bd();function mdt(e){return{InlineFragment(t){let r=e.getType(),n=e.getParentType();if((0,rG.isCompositeType)(r)&&(0,rG.isCompositeType)(n)&&!(0,n0e.doTypesOverlap)(e.getSchema(),r,n)){let o=(0,x4.inspect)(n),i=(0,x4.inspect)(r);e.reportError(new r0e.GraphQLError(`Fragment cannot be spread here as objects of type "${o}" can never be of type "${i}".`,{nodes:t}))}},FragmentSpread(t){let r=t.name.value,n=hdt(e,r),o=e.getParentType();if(n&&o&&!(0,n0e.doTypesOverlap)(e.getSchema(),n,o)){let i=(0,x4.inspect)(o),a=(0,x4.inspect)(n);e.reportError(new r0e.GraphQLError(`Fragment "${r}" cannot be spread here as objects of type "${i}" can never be of type "${a}".`,{nodes:t}))}}}}function hdt(e,t){let r=e.getFragment(t);if(r){let n=(0,fdt.typeFromAST)(e.getSchema(),r.typeCondition);if((0,rG.isCompositeType)(n))return n}}});var aG=L(iG=>{"use strict";Object.defineProperty(iG,"__esModule",{value:!0});iG.PossibleTypeExtensionsRule=vdt;var ydt=bh(),i0e=eo(),a0e=us(),gdt=Eh(),o0e=ar(),ai=Sn(),Sdt=iS(),$1=vn();function vdt(e){let t=e.getSchema(),r=Object.create(null);for(let o of e.getDocument().definitions)(0,Sdt.isTypeDefinitionNode)(o)&&(r[o.name.value]=o);return{ScalarTypeExtension:n,ObjectTypeExtension:n,InterfaceTypeExtension:n,UnionTypeExtension:n,EnumTypeExtension:n,InputObjectTypeExtension:n};function n(o){let i=o.name.value,a=r[i],s=t?.getType(i),c;if(a?c=bdt[a.kind]:s&&(c=xdt(s)),c){if(c!==o.kind){let p=Edt(o.kind);e.reportError(new o0e.GraphQLError(`Cannot extend non-${p} type "${i}".`,{nodes:a?[a,o]:o}))}}else{let p=Object.keys({...r,...t?.getTypeMap()}),d=(0,gdt.suggestionList)(i,p);e.reportError(new o0e.GraphQLError(`Cannot extend type "${i}" because it is not defined.`+(0,ydt.didYouMean)(d),{nodes:o.name}))}}}var bdt={[ai.Kind.SCALAR_TYPE_DEFINITION]:ai.Kind.SCALAR_TYPE_EXTENSION,[ai.Kind.OBJECT_TYPE_DEFINITION]:ai.Kind.OBJECT_TYPE_EXTENSION,[ai.Kind.INTERFACE_TYPE_DEFINITION]:ai.Kind.INTERFACE_TYPE_EXTENSION,[ai.Kind.UNION_TYPE_DEFINITION]:ai.Kind.UNION_TYPE_EXTENSION,[ai.Kind.ENUM_TYPE_DEFINITION]:ai.Kind.ENUM_TYPE_EXTENSION,[ai.Kind.INPUT_OBJECT_TYPE_DEFINITION]:ai.Kind.INPUT_OBJECT_TYPE_EXTENSION};function xdt(e){if((0,$1.isScalarType)(e))return ai.Kind.SCALAR_TYPE_EXTENSION;if((0,$1.isObjectType)(e))return ai.Kind.OBJECT_TYPE_EXTENSION;if((0,$1.isInterfaceType)(e))return ai.Kind.INTERFACE_TYPE_EXTENSION;if((0,$1.isUnionType)(e))return ai.Kind.UNION_TYPE_EXTENSION;if((0,$1.isEnumType)(e))return ai.Kind.ENUM_TYPE_EXTENSION;if((0,$1.isInputObjectType)(e))return ai.Kind.INPUT_OBJECT_TYPE_EXTENSION;(0,a0e.invariant)(!1,"Unexpected type: "+(0,i0e.inspect)(e))}function Edt(e){switch(e){case ai.Kind.SCALAR_TYPE_EXTENSION:return"scalar";case ai.Kind.OBJECT_TYPE_EXTENSION:return"object";case ai.Kind.INTERFACE_TYPE_EXTENSION:return"interface";case ai.Kind.UNION_TYPE_EXTENSION:return"union";case ai.Kind.ENUM_TYPE_EXTENSION:return"enum";case ai.Kind.INPUT_OBJECT_TYPE_EXTENSION:return"input object";default:(0,a0e.invariant)(!1,"Unexpected kind: "+(0,i0e.inspect)(e))}}});var cG=L(E4=>{"use strict";Object.defineProperty(E4,"__esModule",{value:!0});E4.ProvidedRequiredArgumentsOnDirectivesRule=p0e;E4.ProvidedRequiredArgumentsRule=Adt;var c0e=eo(),s0e=xh(),l0e=ar(),u0e=Sn(),Tdt=Gc(),sG=vn(),Ddt=pc();function Adt(e){return{...p0e(e),Field:{leave(t){var r;let n=e.getFieldDef();if(!n)return!1;let o=new Set((r=t.arguments)===null||r===void 0?void 0:r.map(i=>i.name.value));for(let i of n.args)if(!o.has(i.name)&&(0,sG.isRequiredArgument)(i)){let a=(0,c0e.inspect)(i.type);e.reportError(new l0e.GraphQLError(`Field "${n.name}" argument "${i.name}" of type "${a}" is required, but it was not provided.`,{nodes:t}))}}}}}function p0e(e){var t;let r=Object.create(null),n=e.getSchema(),o=(t=n?.getDirectives())!==null&&t!==void 0?t:Ddt.specifiedDirectives;for(let s of o)r[s.name]=(0,s0e.keyMap)(s.args.filter(sG.isRequiredArgument),c=>c.name);let i=e.getDocument().definitions;for(let s of i)if(s.kind===u0e.Kind.DIRECTIVE_DEFINITION){var a;let c=(a=s.arguments)!==null&&a!==void 0?a:[];r[s.name.value]=(0,s0e.keyMap)(c.filter(Idt),p=>p.name.value)}return{Directive:{leave(s){let c=s.name.value,p=r[c];if(p){var d;let f=(d=s.arguments)!==null&&d!==void 0?d:[],m=new Set(f.map(y=>y.name.value));for(let[y,g]of Object.entries(p))if(!m.has(y)){let S=(0,sG.isType)(g.type)?(0,c0e.inspect)(g.type):(0,Tdt.print)(g.type);e.reportError(new l0e.GraphQLError(`Directive "@${c}" argument "${y}" of type "${S}" is required, but it was not provided.`,{nodes:s}))}}}}}}function Idt(e){return e.type.kind===u0e.Kind.NON_NULL_TYPE&&e.defaultValue==null}});var dG=L(pG=>{"use strict";Object.defineProperty(pG,"__esModule",{value:!0});pG.ScalarLeafsRule=wdt;var lG=eo(),uG=ar(),d0e=vn();function wdt(e){return{Field(t){let r=e.getType(),n=t.selectionSet;if(r)if((0,d0e.isLeafType)((0,d0e.getNamedType)(r))){if(n){let o=t.name.value,i=(0,lG.inspect)(r);e.reportError(new uG.GraphQLError(`Field "${o}" must not have a selection since type "${i}" has no subfields.`,{nodes:n}))}}else if(n){if(n.selections.length===0){let o=t.name.value,i=(0,lG.inspect)(r);e.reportError(new uG.GraphQLError(`Field "${o}" of type "${i}" must have at least one field selected.`,{nodes:t}))}}else{let o=t.name.value,i=(0,lG.inspect)(r);e.reportError(new uG.GraphQLError(`Field "${o}" of type "${i}" must have a selection of subfields. Did you mean "${o} { ... }"?`,{nodes:t}))}}}}});var fG=L(_G=>{"use strict";Object.defineProperty(_G,"__esModule",{value:!0});_G.printPathArray=kdt;function kdt(e){return e.map(t=>typeof t=="number"?"["+t.toString()+"]":"."+t).join("")}});var qA=L(T4=>{"use strict";Object.defineProperty(T4,"__esModule",{value:!0});T4.addPath=Cdt;T4.pathToArray=Pdt;function Cdt(e,t,r){return{prev:e,key:t,typename:r}}function Pdt(e){let t=[],r=e;for(;r;)t.push(r.key),r=r.prev;return t.reverse()}});var hG=L(mG=>{"use strict";Object.defineProperty(mG,"__esModule",{value:!0});mG.coerceInputValue=Mdt;var Odt=bh(),D4=eo(),Ndt=us(),Fdt=d4(),Rdt=yd(),Hu=qA(),Ldt=fG(),$dt=Eh(),uf=ar(),UA=vn();function Mdt(e,t,r=jdt){return zA(e,t,r,void 0)}function jdt(e,t,r){let n="Invalid value "+(0,D4.inspect)(t);throw e.length>0&&(n+=` at "value${(0,Ldt.printPathArray)(e)}"`),r.message=n+": "+r.message,r}function zA(e,t,r,n){if((0,UA.isNonNullType)(t)){if(e!=null)return zA(e,t.ofType,r,n);r((0,Hu.pathToArray)(n),e,new uf.GraphQLError(`Expected non-nullable type "${(0,D4.inspect)(t)}" not to be null.`));return}if(e==null)return null;if((0,UA.isListType)(t)){let o=t.ofType;return(0,Fdt.isIterableObject)(e)?Array.from(e,(i,a)=>{let s=(0,Hu.addPath)(n,a,void 0);return zA(i,o,r,s)}):[zA(e,o,r,n)]}if((0,UA.isInputObjectType)(t)){if(!(0,Rdt.isObjectLike)(e)||Array.isArray(e)){r((0,Hu.pathToArray)(n),e,new uf.GraphQLError(`Expected type "${t.name}" to be an object.`));return}let o={},i=t.getFields();for(let a of Object.values(i)){let s=e[a.name];if(s===void 0){if(a.defaultValue!==void 0)o[a.name]=a.defaultValue;else if((0,UA.isNonNullType)(a.type)){let c=(0,D4.inspect)(a.type);r((0,Hu.pathToArray)(n),e,new uf.GraphQLError(`Field "${a.name}" of required type "${c}" was not provided.`))}continue}o[a.name]=zA(s,a.type,r,(0,Hu.addPath)(n,a.name,t.name))}for(let a of Object.keys(e))if(!i[a]){let s=(0,$dt.suggestionList)(a,Object.keys(t.getFields()));r((0,Hu.pathToArray)(n),e,new uf.GraphQLError(`Field "${a}" is not defined by type "${t.name}".`+(0,Odt.didYouMean)(s)))}if(t.isOneOf){let a=Object.keys(o);a.length!==1&&r((0,Hu.pathToArray)(n),e,new uf.GraphQLError(`Exactly one key must be specified for OneOf type "${t.name}".`));let s=a[0],c=o[s];c===null&&r((0,Hu.pathToArray)(n).concat(s),c,new uf.GraphQLError(`Field "${s}" must be non-null.`))}return o}if((0,UA.isLeafType)(t)){let o;try{o=t.parseValue(e)}catch(i){i instanceof uf.GraphQLError?r((0,Hu.pathToArray)(n),e,i):r((0,Hu.pathToArray)(n),e,new uf.GraphQLError(`Expected type "${t.name}". `+i.message,{originalError:i}));return}return o===void 0&&r((0,Hu.pathToArray)(n),e,new uf.GraphQLError(`Expected type "${t.name}".`)),o}(0,Ndt.invariant)(!1,"Unexpected input type: "+(0,D4.inspect)(t))}});var VA=L(yG=>{"use strict";Object.defineProperty(yG,"__esModule",{value:!0});yG.valueFromAST=JA;var Bdt=eo(),qdt=us(),Udt=xh(),M1=Sn(),aS=vn();function JA(e,t,r){if(e){if(e.kind===M1.Kind.VARIABLE){let n=e.name.value;if(r==null||r[n]===void 0)return;let o=r[n];return o===null&&(0,aS.isNonNullType)(t)?void 0:o}if((0,aS.isNonNullType)(t))return e.kind===M1.Kind.NULL?void 0:JA(e,t.ofType,r);if(e.kind===M1.Kind.NULL)return null;if((0,aS.isListType)(t)){let n=t.ofType;if(e.kind===M1.Kind.LIST){let i=[];for(let a of e.values)if(_0e(a,r)){if((0,aS.isNonNullType)(n))return;i.push(null)}else{let s=JA(a,n,r);if(s===void 0)return;i.push(s)}return i}let o=JA(e,n,r);return o===void 0?void 0:[o]}if((0,aS.isInputObjectType)(t)){if(e.kind!==M1.Kind.OBJECT)return;let n=Object.create(null),o=(0,Udt.keyMap)(e.fields,i=>i.name.value);for(let i of Object.values(t.getFields())){let a=o[i.name];if(!a||_0e(a.value,r)){if(i.defaultValue!==void 0)n[i.name]=i.defaultValue;else if((0,aS.isNonNullType)(i.type))return;continue}let s=JA(a.value,i.type,r);if(s===void 0)return;n[i.name]=s}if(t.isOneOf){let i=Object.keys(n);if(i.length!==1||n[i[0]]===null)return}return n}if((0,aS.isLeafType)(t)){let n;try{n=t.parseLiteral(e,r)}catch{return}return n===void 0?void 0:n}(0,qdt.invariant)(!1,"Unexpected input type: "+(0,Bdt.inspect)(t))}}function _0e(e,t){return e.kind===M1.Kind.VARIABLE&&(t==null||t[e.name.value]===void 0)}});var q1=L(KA=>{"use strict";Object.defineProperty(KA,"__esModule",{value:!0});KA.getArgumentValues=y0e;KA.getDirectiveValues=Zdt;KA.getVariableValues=Gdt;var j1=eo(),zdt=xh(),Jdt=fG(),pf=ar(),f0e=Sn(),m0e=Gc(),B1=vn(),Vdt=hG(),Kdt=bd(),h0e=VA();function Gdt(e,t,r,n){let o=[],i=n?.maxErrors;try{let a=Hdt(e,t,r,s=>{if(i!=null&&o.length>=i)throw new pf.GraphQLError("Too many errors processing variables, error limit reached. Execution aborted.");o.push(s)});if(o.length===0)return{coerced:a}}catch(a){o.push(a)}return{errors:o}}function Hdt(e,t,r,n){let o={};for(let i of t){let a=i.variable.name.value,s=(0,Kdt.typeFromAST)(e,i.type);if(!(0,B1.isInputType)(s)){let p=(0,m0e.print)(i.type);n(new pf.GraphQLError(`Variable "$${a}" expected value of type "${p}" which cannot be used as an input type.`,{nodes:i.type}));continue}if(!g0e(r,a)){if(i.defaultValue)o[a]=(0,h0e.valueFromAST)(i.defaultValue,s);else if((0,B1.isNonNullType)(s)){let p=(0,j1.inspect)(s);n(new pf.GraphQLError(`Variable "$${a}" of required type "${p}" was not provided.`,{nodes:i}))}continue}let c=r[a];if(c===null&&(0,B1.isNonNullType)(s)){let p=(0,j1.inspect)(s);n(new pf.GraphQLError(`Variable "$${a}" of non-null type "${p}" must not be null.`,{nodes:i}));continue}o[a]=(0,Vdt.coerceInputValue)(c,s,(p,d,f)=>{let m=`Variable "$${a}" got invalid value `+(0,j1.inspect)(d);p.length>0&&(m+=` at "${a}${(0,Jdt.printPathArray)(p)}"`),n(new pf.GraphQLError(m+"; "+f.message,{nodes:i,originalError:f}))})}return o}function y0e(e,t,r){var n;let o={},i=(n=t.arguments)!==null&&n!==void 0?n:[],a=(0,zdt.keyMap)(i,s=>s.name.value);for(let s of e.args){let c=s.name,p=s.type,d=a[c];if(!d){if(s.defaultValue!==void 0)o[c]=s.defaultValue;else if((0,B1.isNonNullType)(p))throw new pf.GraphQLError(`Argument "${c}" of required type "${(0,j1.inspect)(p)}" was not provided.`,{nodes:t});continue}let f=d.value,m=f.kind===f0e.Kind.NULL;if(f.kind===f0e.Kind.VARIABLE){let g=f.name.value;if(r==null||!g0e(r,g)){if(s.defaultValue!==void 0)o[c]=s.defaultValue;else if((0,B1.isNonNullType)(p))throw new pf.GraphQLError(`Argument "${c}" of required type "${(0,j1.inspect)(p)}" was provided the variable "$${g}" which was not provided a runtime value.`,{nodes:f});continue}m=r[g]==null}if(m&&(0,B1.isNonNullType)(p))throw new pf.GraphQLError(`Argument "${c}" of non-null type "${(0,j1.inspect)(p)}" must not be null.`,{nodes:f});let y=(0,h0e.valueFromAST)(f,p,r);if(y===void 0)throw new pf.GraphQLError(`Argument "${c}" has invalid value ${(0,m0e.print)(f)}.`,{nodes:f});o[c]=y}return o}function Zdt(e,t,r){var n;let o=(n=t.directives)===null||n===void 0?void 0:n.find(i=>i.name.value===e.name);if(o)return y0e(e,o,r)}function g0e(e,t){return Object.prototype.hasOwnProperty.call(e,t)}});var w4=L(I4=>{"use strict";Object.defineProperty(I4,"__esModule",{value:!0});I4.collectFields=Xdt;I4.collectSubfields=Ydt;var gG=Sn(),Wdt=vn(),S0e=pc(),Qdt=bd(),v0e=q1();function Xdt(e,t,r,n,o){let i=new Map;return A4(e,t,r,n,o,i,new Set),i}function Ydt(e,t,r,n,o){let i=new Map,a=new Set;for(let s of o)s.selectionSet&&A4(e,t,r,n,s.selectionSet,i,a);return i}function A4(e,t,r,n,o,i,a){for(let s of o.selections)switch(s.kind){case gG.Kind.FIELD:{if(!SG(r,s))continue;let c=e_t(s),p=i.get(c);p!==void 0?p.push(s):i.set(c,[s]);break}case gG.Kind.INLINE_FRAGMENT:{if(!SG(r,s)||!b0e(e,s,n))continue;A4(e,t,r,n,s.selectionSet,i,a);break}case gG.Kind.FRAGMENT_SPREAD:{let c=s.name.value;if(a.has(c)||!SG(r,s))continue;a.add(c);let p=t[c];if(!p||!b0e(e,p,n))continue;A4(e,t,r,n,p.selectionSet,i,a);break}}}function SG(e,t){let r=(0,v0e.getDirectiveValues)(S0e.GraphQLSkipDirective,t,e);if(r?.if===!0)return!1;let n=(0,v0e.getDirectiveValues)(S0e.GraphQLIncludeDirective,t,e);return n?.if!==!1}function b0e(e,t,r){let n=t.typeCondition;if(!n)return!0;let o=(0,Qdt.typeFromAST)(e,n);return o===r?!0:(0,Wdt.isAbstractType)(o)?e.isSubType(o,r):!1}function e_t(e){return e.alias?e.alias.value:e.name.value}});var bG=L(vG=>{"use strict";Object.defineProperty(vG,"__esModule",{value:!0});vG.SingleFieldSubscriptionsRule=n_t;var x0e=ar(),t_t=Sn(),r_t=w4();function n_t(e){return{OperationDefinition(t){if(t.operation==="subscription"){let r=e.getSchema(),n=r.getSubscriptionType();if(n){let o=t.name?t.name.value:null,i=Object.create(null),a=e.getDocument(),s=Object.create(null);for(let p of a.definitions)p.kind===t_t.Kind.FRAGMENT_DEFINITION&&(s[p.name.value]=p);let c=(0,r_t.collectFields)(r,s,i,n,t.selectionSet);if(c.size>1){let f=[...c.values()].slice(1).flat();e.reportError(new x0e.GraphQLError(o!=null?`Subscription "${o}" must select only one top level field.`:"Anonymous Subscription must select only one top level field.",{nodes:f}))}for(let p of c.values())p[0].name.value.startsWith("__")&&e.reportError(new x0e.GraphQLError(o!=null?`Subscription "${o}" must not select an introspection top level field.`:"Anonymous Subscription must not select an introspection top level field.",{nodes:p}))}}}}}});var k4=L(xG=>{"use strict";Object.defineProperty(xG,"__esModule",{value:!0});xG.groupBy=o_t;function o_t(e,t){let r=new Map;for(let n of e){let o=t(n),i=r.get(o);i===void 0?r.set(o,[n]):i.push(n)}return r}});var TG=L(EG=>{"use strict";Object.defineProperty(EG,"__esModule",{value:!0});EG.UniqueArgumentDefinitionNamesRule=s_t;var i_t=k4(),a_t=ar();function s_t(e){return{DirectiveDefinition(n){var o;let i=(o=n.arguments)!==null&&o!==void 0?o:[];return r(`@${n.name.value}`,i)},InterfaceTypeDefinition:t,InterfaceTypeExtension:t,ObjectTypeDefinition:t,ObjectTypeExtension:t};function t(n){var o;let i=n.name.value,a=(o=n.fields)!==null&&o!==void 0?o:[];for(let c of a){var s;let p=c.name.value,d=(s=c.arguments)!==null&&s!==void 0?s:[];r(`${i}.${p}`,d)}return!1}function r(n,o){let i=(0,i_t.groupBy)(o,a=>a.name.value);for(let[a,s]of i)s.length>1&&e.reportError(new a_t.GraphQLError(`Argument "${n}(${a}:)" can only be defined once.`,{nodes:s.map(c=>c.name)}));return!1}}});var AG=L(DG=>{"use strict";Object.defineProperty(DG,"__esModule",{value:!0});DG.UniqueArgumentNamesRule=u_t;var c_t=k4(),l_t=ar();function u_t(e){return{Field:t,Directive:t};function t(r){var n;let o=(n=r.arguments)!==null&&n!==void 0?n:[],i=(0,c_t.groupBy)(o,a=>a.name.value);for(let[a,s]of i)s.length>1&&e.reportError(new l_t.GraphQLError(`There can be only one argument named "${a}".`,{nodes:s.map(c=>c.name)}))}}});var wG=L(IG=>{"use strict";Object.defineProperty(IG,"__esModule",{value:!0});IG.UniqueDirectiveNamesRule=p_t;var E0e=ar();function p_t(e){let t=Object.create(null),r=e.getSchema();return{DirectiveDefinition(n){let o=n.name.value;if(r!=null&&r.getDirective(o)){e.reportError(new E0e.GraphQLError(`Directive "@${o}" already exists in the schema. It cannot be redefined.`,{nodes:n.name}));return}return t[o]?e.reportError(new E0e.GraphQLError(`There can be only one directive named "@${o}".`,{nodes:[t[o],n.name]})):t[o]=n.name,!1}}}});var PG=L(CG=>{"use strict";Object.defineProperty(CG,"__esModule",{value:!0});CG.UniqueDirectivesPerLocationRule=f_t;var d_t=ar(),kG=Sn(),T0e=iS(),__t=pc();function f_t(e){let t=Object.create(null),r=e.getSchema(),n=r?r.getDirectives():__t.specifiedDirectives;for(let s of n)t[s.name]=!s.isRepeatable;let o=e.getDocument().definitions;for(let s of o)s.kind===kG.Kind.DIRECTIVE_DEFINITION&&(t[s.name.value]=!s.repeatable);let i=Object.create(null),a=Object.create(null);return{enter(s){if(!("directives"in s)||!s.directives)return;let c;if(s.kind===kG.Kind.SCHEMA_DEFINITION||s.kind===kG.Kind.SCHEMA_EXTENSION)c=i;else if((0,T0e.isTypeDefinitionNode)(s)||(0,T0e.isTypeExtensionNode)(s)){let p=s.name.value;c=a[p],c===void 0&&(a[p]=c=Object.create(null))}else c=Object.create(null);for(let p of s.directives){let d=p.name.value;t[d]&&(c[d]?e.reportError(new d_t.GraphQLError(`The directive "@${d}" can only be used once at this location.`,{nodes:[c[d],p]})):c[d]=p)}}}}});var NG=L(OG=>{"use strict";Object.defineProperty(OG,"__esModule",{value:!0});OG.UniqueEnumValueNamesRule=h_t;var D0e=ar(),m_t=vn();function h_t(e){let t=e.getSchema(),r=t?t.getTypeMap():Object.create(null),n=Object.create(null);return{EnumTypeDefinition:o,EnumTypeExtension:o};function o(i){var a;let s=i.name.value;n[s]||(n[s]=Object.create(null));let c=(a=i.values)!==null&&a!==void 0?a:[],p=n[s];for(let d of c){let f=d.name.value,m=r[s];(0,m_t.isEnumType)(m)&&m.getValue(f)?e.reportError(new D0e.GraphQLError(`Enum value "${s}.${f}" already exists in the schema. It cannot also be defined in this type extension.`,{nodes:d.name})):p[f]?e.reportError(new D0e.GraphQLError(`Enum value "${s}.${f}" can only be defined once.`,{nodes:[p[f],d.name]})):p[f]=d.name}return!1}}});var LG=L(RG=>{"use strict";Object.defineProperty(RG,"__esModule",{value:!0});RG.UniqueFieldDefinitionNamesRule=y_t;var A0e=ar(),FG=vn();function y_t(e){let t=e.getSchema(),r=t?t.getTypeMap():Object.create(null),n=Object.create(null);return{InputObjectTypeDefinition:o,InputObjectTypeExtension:o,InterfaceTypeDefinition:o,InterfaceTypeExtension:o,ObjectTypeDefinition:o,ObjectTypeExtension:o};function o(i){var a;let s=i.name.value;n[s]||(n[s]=Object.create(null));let c=(a=i.fields)!==null&&a!==void 0?a:[],p=n[s];for(let d of c){let f=d.name.value;g_t(r[s],f)?e.reportError(new A0e.GraphQLError(`Field "${s}.${f}" already exists in the schema. It cannot also be defined in this type extension.`,{nodes:d.name})):p[f]?e.reportError(new A0e.GraphQLError(`Field "${s}.${f}" can only be defined once.`,{nodes:[p[f],d.name]})):p[f]=d.name}return!1}}function g_t(e,t){return(0,FG.isObjectType)(e)||(0,FG.isInterfaceType)(e)||(0,FG.isInputObjectType)(e)?e.getFields()[t]!=null:!1}});var MG=L($G=>{"use strict";Object.defineProperty($G,"__esModule",{value:!0});$G.UniqueFragmentNamesRule=v_t;var S_t=ar();function v_t(e){let t=Object.create(null);return{OperationDefinition:()=>!1,FragmentDefinition(r){let n=r.name.value;return t[n]?e.reportError(new S_t.GraphQLError(`There can be only one fragment named "${n}".`,{nodes:[t[n],r.name]})):t[n]=r.name,!1}}}});var BG=L(jG=>{"use strict";Object.defineProperty(jG,"__esModule",{value:!0});jG.UniqueInputFieldNamesRule=E_t;var b_t=us(),x_t=ar();function E_t(e){let t=[],r=Object.create(null);return{ObjectValue:{enter(){t.push(r),r=Object.create(null)},leave(){let n=t.pop();n||(0,b_t.invariant)(!1),r=n}},ObjectField(n){let o=n.name.value;r[o]?e.reportError(new x_t.GraphQLError(`There can be only one input field named "${o}".`,{nodes:[r[o],n.name]})):r[o]=n.name}}}});var UG=L(qG=>{"use strict";Object.defineProperty(qG,"__esModule",{value:!0});qG.UniqueOperationNamesRule=D_t;var T_t=ar();function D_t(e){let t=Object.create(null);return{OperationDefinition(r){let n=r.name;return n&&(t[n.value]?e.reportError(new T_t.GraphQLError(`There can be only one operation named "${n.value}".`,{nodes:[t[n.value],n]})):t[n.value]=n),!1},FragmentDefinition:()=>!1}}});var JG=L(zG=>{"use strict";Object.defineProperty(zG,"__esModule",{value:!0});zG.UniqueOperationTypesRule=A_t;var I0e=ar();function A_t(e){let t=e.getSchema(),r=Object.create(null),n=t?{query:t.getQueryType(),mutation:t.getMutationType(),subscription:t.getSubscriptionType()}:{};return{SchemaDefinition:o,SchemaExtension:o};function o(i){var a;let s=(a=i.operationTypes)!==null&&a!==void 0?a:[];for(let c of s){let p=c.operation,d=r[p];n[p]?e.reportError(new I0e.GraphQLError(`Type for ${p} already defined in the schema. It cannot be redefined.`,{nodes:c})):d?e.reportError(new I0e.GraphQLError(`There can be only one ${p} type in schema.`,{nodes:[d,c]})):r[p]=c}return!1}}});var KG=L(VG=>{"use strict";Object.defineProperty(VG,"__esModule",{value:!0});VG.UniqueTypeNamesRule=I_t;var w0e=ar();function I_t(e){let t=Object.create(null),r=e.getSchema();return{ScalarTypeDefinition:n,ObjectTypeDefinition:n,InterfaceTypeDefinition:n,UnionTypeDefinition:n,EnumTypeDefinition:n,InputObjectTypeDefinition:n};function n(o){let i=o.name.value;if(r!=null&&r.getType(i)){e.reportError(new w0e.GraphQLError(`Type "${i}" already exists in the schema. It cannot also be defined in this type definition.`,{nodes:o.name}));return}return t[i]?e.reportError(new w0e.GraphQLError(`There can be only one type named "${i}".`,{nodes:[t[i],o.name]})):t[i]=o.name,!1}}});var HG=L(GG=>{"use strict";Object.defineProperty(GG,"__esModule",{value:!0});GG.UniqueVariableNamesRule=C_t;var w_t=k4(),k_t=ar();function C_t(e){return{OperationDefinition(t){var r;let n=(r=t.variableDefinitions)!==null&&r!==void 0?r:[],o=(0,w_t.groupBy)(n,i=>i.variable.name.value);for(let[i,a]of o)a.length>1&&e.reportError(new k_t.GraphQLError(`There can be only one variable named "$${i}".`,{nodes:a.map(s=>s.variable.name)}))}}}});var WG=L(ZG=>{"use strict";Object.defineProperty(ZG,"__esModule",{value:!0});ZG.ValuesOfCorrectTypeRule=R_t;var P_t=bh(),GA=eo(),O_t=xh(),N_t=Eh(),df=ar(),F_t=Sn(),C4=Gc(),xd=vn();function R_t(e){let t={};return{OperationDefinition:{enter(){t={}}},VariableDefinition(r){t[r.variable.name.value]=r},ListValue(r){let n=(0,xd.getNullableType)(e.getParentInputType());if(!(0,xd.isListType)(n))return sS(e,r),!1},ObjectValue(r){let n=(0,xd.getNamedType)(e.getInputType());if(!(0,xd.isInputObjectType)(n))return sS(e,r),!1;let o=(0,O_t.keyMap)(r.fields,i=>i.name.value);for(let i of Object.values(n.getFields()))if(!o[i.name]&&(0,xd.isRequiredInputField)(i)){let s=(0,GA.inspect)(i.type);e.reportError(new df.GraphQLError(`Field "${n.name}.${i.name}" of required type "${s}" was not provided.`,{nodes:r}))}n.isOneOf&&L_t(e,r,n,o)},ObjectField(r){let n=(0,xd.getNamedType)(e.getParentInputType());if(!e.getInputType()&&(0,xd.isInputObjectType)(n)){let i=(0,N_t.suggestionList)(r.name.value,Object.keys(n.getFields()));e.reportError(new df.GraphQLError(`Field "${r.name.value}" is not defined by type "${n.name}".`+(0,P_t.didYouMean)(i),{nodes:r}))}},NullValue(r){let n=e.getInputType();(0,xd.isNonNullType)(n)&&e.reportError(new df.GraphQLError(`Expected value of type "${(0,GA.inspect)(n)}", found ${(0,C4.print)(r)}.`,{nodes:r}))},EnumValue:r=>sS(e,r),IntValue:r=>sS(e,r),FloatValue:r=>sS(e,r),StringValue:r=>sS(e,r),BooleanValue:r=>sS(e,r)}}function sS(e,t){let r=e.getInputType();if(!r)return;let n=(0,xd.getNamedType)(r);if(!(0,xd.isLeafType)(n)){let o=(0,GA.inspect)(r);e.reportError(new df.GraphQLError(`Expected value of type "${o}", found ${(0,C4.print)(t)}.`,{nodes:t}));return}try{if(n.parseLiteral(t,void 0)===void 0){let i=(0,GA.inspect)(r);e.reportError(new df.GraphQLError(`Expected value of type "${i}", found ${(0,C4.print)(t)}.`,{nodes:t}))}}catch(o){let i=(0,GA.inspect)(r);o instanceof df.GraphQLError?e.reportError(o):e.reportError(new df.GraphQLError(`Expected value of type "${i}", found ${(0,C4.print)(t)}; `+o.message,{nodes:t,originalError:o}))}}function L_t(e,t,r,n){var o;let i=Object.keys(n);if(i.length!==1){e.reportError(new df.GraphQLError(`OneOf Input Object "${r.name}" must specify exactly one key.`,{nodes:[t]}));return}let s=(o=n[i[0]])===null||o===void 0?void 0:o.value;(!s||s.kind===F_t.Kind.NULL)&&e.reportError(new df.GraphQLError(`Field "${r.name}.${i[0]}" must be non-null.`,{nodes:[t]}))}});var XG=L(QG=>{"use strict";Object.defineProperty(QG,"__esModule",{value:!0});QG.VariablesAreInputTypesRule=q_t;var $_t=ar(),M_t=Gc(),j_t=vn(),B_t=bd();function q_t(e){return{VariableDefinition(t){let r=(0,B_t.typeFromAST)(e.getSchema(),t.type);if(r!==void 0&&!(0,j_t.isInputType)(r)){let n=t.variable.name.value,o=(0,M_t.print)(t.type);e.reportError(new $_t.GraphQLError(`Variable "$${n}" cannot be non-input type "${o}".`,{nodes:t.type}))}}}}});var eH=L(YG=>{"use strict";Object.defineProperty(YG,"__esModule",{value:!0});YG.VariablesInAllowedPositionRule=J_t;var k0e=eo(),C0e=ar(),U_t=Sn(),P4=vn(),P0e=wA(),z_t=bd();function J_t(e){let t=Object.create(null);return{OperationDefinition:{enter(){t=Object.create(null)},leave(r){let n=e.getRecursiveVariableUsages(r);for(let{node:o,type:i,defaultValue:a,parentType:s}of n){let c=o.name.value,p=t[c];if(p&&i){let d=e.getSchema(),f=(0,z_t.typeFromAST)(d,p.type);if(f&&!V_t(d,f,p.defaultValue,i,a)){let m=(0,k0e.inspect)(f),y=(0,k0e.inspect)(i);e.reportError(new C0e.GraphQLError(`Variable "$${c}" of type "${m}" used in position expecting type "${y}".`,{nodes:[p,o]}))}(0,P4.isInputObjectType)(s)&&s.isOneOf&&(0,P4.isNullableType)(f)&&e.reportError(new C0e.GraphQLError(`Variable "$${c}" is of type "${f}" but must be non-nullable to be used for OneOf Input Object "${s}".`,{nodes:[p,o]}))}}}},VariableDefinition(r){t[r.variable.name.value]=r}}}function V_t(e,t,r,n,o){if((0,P4.isNonNullType)(n)&&!(0,P4.isNonNullType)(t)){if(!(r!=null&&r.kind!==U_t.Kind.NULL)&&!(o!==void 0))return!1;let s=n.ofType;return(0,P0e.isTypeSubTypeOf)(e,t,s)}return(0,P0e.isTypeSubTypeOf)(e,t,n)}});var tH=L(Ih=>{"use strict";Object.defineProperty(Ih,"__esModule",{value:!0});Ih.specifiedSDLRules=Ih.specifiedRules=Ih.recommendedRules=void 0;var K_t=yK(),G_t=SK(),H_t=bK(),O0e=xK(),N0e=AK(),Z_t=wK(),F0e=PK(),W_t=NK(),Q_t=RK(),X_t=$K(),Y_t=jK(),eft=qK(),tft=zK(),rft=VK(),nft=tG(),oft=oG(),ift=aG(),R0e=cG(),aft=dG(),sft=bG(),cft=TG(),L0e=AG(),lft=wG(),$0e=PG(),uft=NG(),pft=LG(),dft=MG(),M0e=BG(),_ft=UG(),fft=JG(),mft=KG(),hft=HG(),yft=WG(),gft=XG(),Sft=eH(),j0e=Object.freeze([X_t.MaxIntrospectionDepthRule]);Ih.recommendedRules=j0e;var vft=Object.freeze([K_t.ExecutableDefinitionsRule,_ft.UniqueOperationNamesRule,W_t.LoneAnonymousOperationRule,sft.SingleFieldSubscriptionsRule,F0e.KnownTypeNamesRule,H_t.FragmentsOnCompositeTypesRule,gft.VariablesAreInputTypesRule,aft.ScalarLeafsRule,G_t.FieldsOnCorrectTypeRule,dft.UniqueFragmentNamesRule,Z_t.KnownFragmentNamesRule,tft.NoUnusedFragmentsRule,oft.PossibleFragmentSpreadsRule,Y_t.NoFragmentCyclesRule,hft.UniqueVariableNamesRule,eft.NoUndefinedVariablesRule,rft.NoUnusedVariablesRule,N0e.KnownDirectivesRule,$0e.UniqueDirectivesPerLocationRule,O0e.KnownArgumentNamesRule,L0e.UniqueArgumentNamesRule,yft.ValuesOfCorrectTypeRule,R0e.ProvidedRequiredArgumentsRule,Sft.VariablesInAllowedPositionRule,nft.OverlappingFieldsCanBeMergedRule,M0e.UniqueInputFieldNamesRule,...j0e]);Ih.specifiedRules=vft;var bft=Object.freeze([Q_t.LoneSchemaDefinitionRule,fft.UniqueOperationTypesRule,mft.UniqueTypeNamesRule,uft.UniqueEnumValueNamesRule,pft.UniqueFieldDefinitionNamesRule,cft.UniqueArgumentDefinitionNamesRule,lft.UniqueDirectiveNamesRule,F0e.KnownTypeNamesRule,N0e.KnownDirectivesRule,$0e.UniqueDirectivesPerLocationRule,ift.PossibleTypeExtensionsRule,O0e.KnownArgumentNamesOnDirectivesRule,L0e.UniqueArgumentNamesRule,M0e.UniqueInputFieldNamesRule,R0e.ProvidedRequiredArgumentsOnDirectivesRule]);Ih.specifiedSDLRules=bft});var oH=L(wh=>{"use strict";Object.defineProperty(wh,"__esModule",{value:!0});wh.ValidationContext=wh.SDLValidationContext=wh.ASTValidationContext=void 0;var B0e=Sn(),xft=Qg(),q0e=h4(),HA=class{constructor(t,r){this._ast=t,this._fragments=void 0,this._fragmentSpreads=new Map,this._recursivelyReferencedFragments=new Map,this._onError=r}get[Symbol.toStringTag](){return"ASTValidationContext"}reportError(t){this._onError(t)}getDocument(){return this._ast}getFragment(t){let r;if(this._fragments)r=this._fragments;else{r=Object.create(null);for(let n of this.getDocument().definitions)n.kind===B0e.Kind.FRAGMENT_DEFINITION&&(r[n.name.value]=n);this._fragments=r}return r[t]}getFragmentSpreads(t){let r=this._fragmentSpreads.get(t);if(!r){r=[];let n=[t],o;for(;o=n.pop();)for(let i of o.selections)i.kind===B0e.Kind.FRAGMENT_SPREAD?r.push(i):i.selectionSet&&n.push(i.selectionSet);this._fragmentSpreads.set(t,r)}return r}getRecursivelyReferencedFragments(t){let r=this._recursivelyReferencedFragments.get(t);if(!r){r=[];let n=Object.create(null),o=[t.selectionSet],i;for(;i=o.pop();)for(let a of this.getFragmentSpreads(i)){let s=a.name.value;if(n[s]!==!0){n[s]=!0;let c=this.getFragment(s);c&&(r.push(c),o.push(c.selectionSet))}}this._recursivelyReferencedFragments.set(t,r)}return r}};wh.ASTValidationContext=HA;var rH=class extends HA{constructor(t,r,n){super(t,n),this._schema=r}get[Symbol.toStringTag](){return"SDLValidationContext"}getSchema(){return this._schema}};wh.SDLValidationContext=rH;var nH=class extends HA{constructor(t,r,n,o){super(r,o),this._schema=t,this._typeInfo=n,this._variableUsages=new Map,this._recursiveVariableUsages=new Map}get[Symbol.toStringTag](){return"ValidationContext"}getSchema(){return this._schema}getVariableUsages(t){let r=this._variableUsages.get(t);if(!r){let n=[],o=new q0e.TypeInfo(this._schema);(0,xft.visit)(t,(0,q0e.visitWithTypeInfo)(o,{VariableDefinition:()=>!1,Variable(i){n.push({node:i,type:o.getInputType(),defaultValue:o.getDefaultValue(),parentType:o.getParentInputType()})}})),r=n,this._variableUsages.set(t,r)}return r}getRecursiveVariableUsages(t){let r=this._recursiveVariableUsages.get(t);if(!r){r=this.getVariableUsages(t);for(let n of this.getRecursivelyReferencedFragments(t))r=r.concat(this.getVariableUsages(n));this._recursiveVariableUsages.set(t,r)}return r}getType(){return this._typeInfo.getType()}getParentType(){return this._typeInfo.getParentType()}getInputType(){return this._typeInfo.getInputType()}getParentInputType(){return this._typeInfo.getParentInputType()}getFieldDef(){return this._typeInfo.getFieldDef()}getDirective(){return this._typeInfo.getDirective()}getArgument(){return this._typeInfo.getArgument()}getEnumValue(){return this._typeInfo.getEnumValue()}};wh.ValidationContext=nH});var ZA=L(U1=>{"use strict";Object.defineProperty(U1,"__esModule",{value:!0});U1.assertValidSDL=Cft;U1.assertValidSDLExtension=Pft;U1.validate=kft;U1.validateSDL=iH;var Eft=Ls(),Tft=zO(),Dft=ar(),Aft=ql(),O4=Qg(),Ift=MA(),U0e=h4(),z0e=tH(),J0e=oH(),wft=(0,Tft.mapValue)(Aft.QueryDocumentKeys,e=>e.filter(t=>t!=="description"));function kft(e,t,r=z0e.specifiedRules,n,o=new U0e.TypeInfo(e)){var i;let a=(i=n?.maxErrors)!==null&&i!==void 0?i:100;t||(0,Eft.devAssert)(!1,"Must provide document."),(0,Ift.assertValidSchema)(e);let s=Object.freeze({}),c=[],p=new J0e.ValidationContext(e,t,o,f=>{if(c.length>=a)throw c.push(new Dft.GraphQLError("Too many validation errors, error limit reached. Validation aborted.")),s;c.push(f)}),d=(0,O4.visitInParallel)(r.map(f=>f(p)));try{(0,O4.visit)(t,(0,U0e.visitWithTypeInfo)(o,d),wft)}catch(f){if(f!==s)throw f}return c}function iH(e,t,r=z0e.specifiedSDLRules){let n=[],o=new J0e.SDLValidationContext(e,t,a=>{n.push(a)}),i=r.map(a=>a(o));return(0,O4.visit)(e,(0,O4.visitInParallel)(i)),n}function Cft(e){let t=iH(e);if(t.length!==0)throw new Error(t.map(r=>r.message).join(` + +`))}function Pft(e,t){let r=iH(e,t);if(r.length!==0)throw new Error(r.map(n=>n.message).join(` + +`))}});var V0e=L(aH=>{"use strict";Object.defineProperty(aH,"__esModule",{value:!0});aH.memoize3=Oft;function Oft(e){let t;return function(n,o,i){t===void 0&&(t=new WeakMap);let a=t.get(n);a===void 0&&(a=new WeakMap,t.set(n,a));let s=a.get(o);s===void 0&&(s=new WeakMap,a.set(o,s));let c=s.get(i);return c===void 0&&(c=e(n,o,i),s.set(i,c)),c}}});var K0e=L(sH=>{"use strict";Object.defineProperty(sH,"__esModule",{value:!0});sH.promiseForObject=Nft;function Nft(e){return Promise.all(Object.values(e)).then(t=>{let r=Object.create(null);for(let[n,o]of Object.keys(e).entries())r[o]=t[n];return r})}});var G0e=L(cH=>{"use strict";Object.defineProperty(cH,"__esModule",{value:!0});cH.promiseReduce=Rft;var Fft=OO();function Rft(e,t,r){let n=r;for(let o of e)n=(0,Fft.isPromise)(n)?n.then(i=>t(i,o)):t(n,o);return n}});var H0e=L(uH=>{"use strict";Object.defineProperty(uH,"__esModule",{value:!0});uH.toError=$ft;var Lft=eo();function $ft(e){return e instanceof Error?e:new lH(e)}var lH=class extends Error{constructor(t){super("Unexpected error value: "+(0,Lft.inspect)(t)),this.name="NonErrorThrown",this.thrownValue=t}}});var N4=L(pH=>{"use strict";Object.defineProperty(pH,"__esModule",{value:!0});pH.locatedError=Bft;var Mft=H0e(),jft=ar();function Bft(e,t,r){var n;let o=(0,Mft.toError)(e);return qft(o)?o:new jft.GraphQLError(o.message,{nodes:(n=o.nodes)!==null&&n!==void 0?n:t,source:o.source,positions:o.positions,path:r,originalError:o})}function qft(e){return Array.isArray(e.path)}});var QA=L(Gl=>{"use strict";Object.defineProperty(Gl,"__esModule",{value:!0});Gl.assertValidExecutionArguments=rve;Gl.buildExecutionContext=nve;Gl.buildResolveInfo=ive;Gl.defaultTypeResolver=Gl.defaultFieldResolver=void 0;Gl.execute=tve;Gl.executeSync=Hft;Gl.getFieldDef=sve;var _H=Ls(),cS=eo(),Uft=us(),zft=d4(),yH=yd(),Zu=OO(),Jft=V0e(),lS=qA(),Z0e=K0e(),Vft=G0e(),Kl=ar(),R4=N4(),dH=ql(),W0e=Sn(),kh=vn(),z1=Vl(),Kft=MA(),Y0e=w4(),eve=q1(),Gft=(0,Jft.memoize3)((e,t,r)=>(0,Y0e.collectSubfields)(e.schema,e.fragments,e.variableValues,t,r)),fH=class{constructor(){this._errorPositions=new Set,this._errors=[]}get errors(){return this._errors}add(t,r){this._hasNulledPosition(r)||(this._errorPositions.add(r),this._errors.push(t))}_hasNulledPosition(t){let r=t;for(;r!==void 0;){if(this._errorPositions.has(r))return!0;r=r.prev}return this._errorPositions.has(void 0)}};function tve(e){arguments.length<2||(0,_H.devAssert)(!1,"graphql@16 dropped long-deprecated support for positional arguments, please pass an object instead.");let{schema:t,document:r,variableValues:n,rootValue:o}=e;rve(t,r,n);let i=nve(e);if(!("schema"in i))return{errors:i};try{let{operation:a}=i,s=Zft(i,a,o);return(0,Zu.isPromise)(s)?s.then(c=>F4(c,i.collectedErrors.errors),c=>(i.collectedErrors.add(c,void 0),F4(null,i.collectedErrors.errors))):F4(s,i.collectedErrors.errors)}catch(a){return i.collectedErrors.add(a,void 0),F4(null,i.collectedErrors.errors)}}function Hft(e){let t=tve(e);if((0,Zu.isPromise)(t))throw new Error("GraphQL execution failed to complete synchronously.");return t}function F4(e,t){return t.length===0?{data:e}:{errors:t,data:e}}function rve(e,t,r){t||(0,_H.devAssert)(!1,"Must provide document."),(0,Kft.assertValidSchema)(e),r==null||(0,yH.isObjectLike)(r)||(0,_H.devAssert)(!1,"Variables must be provided as an Object where each property is a variable value. Perhaps look to see if an unparsed JSON string was provided.")}function nve(e){var t,r,n;let{schema:o,document:i,rootValue:a,contextValue:s,variableValues:c,operationName:p,fieldResolver:d,typeResolver:f,subscribeFieldResolver:m,options:y}=e,g,S=Object.create(null);for(let I of i.definitions)switch(I.kind){case W0e.Kind.OPERATION_DEFINITION:if(p==null){if(g!==void 0)return[new Kl.GraphQLError("Must provide operation name if query contains multiple operations.")];g=I}else((t=I.name)===null||t===void 0?void 0:t.value)===p&&(g=I);break;case W0e.Kind.FRAGMENT_DEFINITION:S[I.name.value]=I;break;default:}if(!g)return p!=null?[new Kl.GraphQLError(`Unknown operation named "${p}".`)]:[new Kl.GraphQLError("Must provide an operation.")];let b=(r=g.variableDefinitions)!==null&&r!==void 0?r:[],E=(0,eve.getVariableValues)(o,b,c??{},{maxErrors:(n=y?.maxCoercionErrors)!==null&&n!==void 0?n:50});return E.errors?E.errors:{schema:o,fragments:S,rootValue:a,contextValue:s,operation:g,variableValues:E.coerced,fieldResolver:d??hH,typeResolver:f??ave,subscribeFieldResolver:m??hH,collectedErrors:new fH}}function Zft(e,t,r){let n=e.schema.getRootType(t.operation);if(n==null)throw new Kl.GraphQLError(`Schema is not configured to execute ${t.operation} operation.`,{nodes:t});let o=(0,Y0e.collectFields)(e.schema,e.fragments,e.variableValues,n,t.selectionSet),i=void 0;switch(t.operation){case dH.OperationTypeNode.QUERY:return L4(e,n,r,i,o);case dH.OperationTypeNode.MUTATION:return Wft(e,n,r,i,o);case dH.OperationTypeNode.SUBSCRIPTION:return L4(e,n,r,i,o)}}function Wft(e,t,r,n,o){return(0,Vft.promiseReduce)(o.entries(),(i,[a,s])=>{let c=(0,lS.addPath)(n,a,t.name),p=ove(e,t,r,s,c);return p===void 0?i:(0,Zu.isPromise)(p)?p.then(d=>(i[a]=d,i)):(i[a]=p,i)},Object.create(null))}function L4(e,t,r,n,o){let i=Object.create(null),a=!1;try{for(let[s,c]of o.entries()){let p=(0,lS.addPath)(n,s,t.name),d=ove(e,t,r,c,p);d!==void 0&&(i[s]=d,(0,Zu.isPromise)(d)&&(a=!0))}}catch(s){if(a)return(0,Z0e.promiseForObject)(i).finally(()=>{throw s});throw s}return a?(0,Z0e.promiseForObject)(i):i}function ove(e,t,r,n,o){var i;let a=sve(e.schema,t,n[0]);if(!a)return;let s=a.type,c=(i=a.resolve)!==null&&i!==void 0?i:e.fieldResolver,p=ive(e,a,n,t,o);try{let d=(0,eve.getArgumentValues)(a,n[0],e.variableValues),f=e.contextValue,m=c(r,d,f,p),y;return(0,Zu.isPromise)(m)?y=m.then(g=>WA(e,s,n,p,o,g)):y=WA(e,s,n,p,o,m),(0,Zu.isPromise)(y)?y.then(void 0,g=>{let S=(0,R4.locatedError)(g,n,(0,lS.pathToArray)(o));return $4(S,s,o,e)}):y}catch(d){let f=(0,R4.locatedError)(d,n,(0,lS.pathToArray)(o));return $4(f,s,o,e)}}function ive(e,t,r,n,o){return{fieldName:t.name,fieldNodes:r,returnType:t.type,parentType:n,path:o,schema:e.schema,fragments:e.fragments,rootValue:e.rootValue,operation:e.operation,variableValues:e.variableValues}}function $4(e,t,r,n){if((0,kh.isNonNullType)(t))throw e;return n.collectedErrors.add(e,r),null}function WA(e,t,r,n,o,i){if(i instanceof Error)throw i;if((0,kh.isNonNullType)(t)){let a=WA(e,t.ofType,r,n,o,i);if(a===null)throw new Error(`Cannot return null for non-nullable field ${n.parentType.name}.${n.fieldName}.`);return a}if(i==null)return null;if((0,kh.isListType)(t))return Qft(e,t,r,n,o,i);if((0,kh.isLeafType)(t))return Xft(t,i);if((0,kh.isAbstractType)(t))return Yft(e,t,r,n,o,i);if((0,kh.isObjectType)(t))return mH(e,t,r,n,o,i);(0,Uft.invariant)(!1,"Cannot complete value of unexpected output type: "+(0,cS.inspect)(t))}function Qft(e,t,r,n,o,i){if(!(0,zft.isIterableObject)(i))throw new Kl.GraphQLError(`Expected Iterable, but did not find one for field "${n.parentType.name}.${n.fieldName}".`);let a=t.ofType,s=!1,c=Array.from(i,(p,d)=>{let f=(0,lS.addPath)(o,d,void 0);try{let m;return(0,Zu.isPromise)(p)?m=p.then(y=>WA(e,a,r,n,f,y)):m=WA(e,a,r,n,f,p),(0,Zu.isPromise)(m)?(s=!0,m.then(void 0,y=>{let g=(0,R4.locatedError)(y,r,(0,lS.pathToArray)(f));return $4(g,a,f,e)})):m}catch(m){let y=(0,R4.locatedError)(m,r,(0,lS.pathToArray)(f));return $4(y,a,f,e)}});return s?Promise.all(c):c}function Xft(e,t){let r=e.serialize(t);if(r==null)throw new Error(`Expected \`${(0,cS.inspect)(e)}.serialize(${(0,cS.inspect)(t)})\` to return non-nullable value, returned: ${(0,cS.inspect)(r)}`);return r}function Yft(e,t,r,n,o,i){var a;let s=(a=t.resolveType)!==null&&a!==void 0?a:e.typeResolver,c=e.contextValue,p=s(i,c,n,t);return(0,Zu.isPromise)(p)?p.then(d=>mH(e,Q0e(d,e,t,r,n,i),r,n,o,i)):mH(e,Q0e(p,e,t,r,n,i),r,n,o,i)}function Q0e(e,t,r,n,o,i){if(e==null)throw new Kl.GraphQLError(`Abstract type "${r.name}" must resolve to an Object type at runtime for field "${o.parentType.name}.${o.fieldName}". Either the "${r.name}" type should provide a "resolveType" function or each possible type should provide an "isTypeOf" function.`,n);if((0,kh.isObjectType)(e))throw new Kl.GraphQLError("Support for returning GraphQLObjectType from resolveType was removed in graphql-js@16.0.0 please return type name instead.");if(typeof e!="string")throw new Kl.GraphQLError(`Abstract type "${r.name}" must resolve to an Object type at runtime for field "${o.parentType.name}.${o.fieldName}" with value ${(0,cS.inspect)(i)}, received "${(0,cS.inspect)(e)}".`);let a=t.schema.getType(e);if(a==null)throw new Kl.GraphQLError(`Abstract type "${r.name}" was resolved to a type "${e}" that does not exist inside the schema.`,{nodes:n});if(!(0,kh.isObjectType)(a))throw new Kl.GraphQLError(`Abstract type "${r.name}" was resolved to a non-object type "${e}".`,{nodes:n});if(!t.schema.isSubType(r,a))throw new Kl.GraphQLError(`Runtime Object type "${a.name}" is not a possible type for "${r.name}".`,{nodes:n});return a}function mH(e,t,r,n,o,i){let a=Gft(e,t,r);if(t.isTypeOf){let s=t.isTypeOf(i,e.contextValue,n);if((0,Zu.isPromise)(s))return s.then(c=>{if(!c)throw X0e(t,i,r);return L4(e,t,i,o,a)});if(!s)throw X0e(t,i,r)}return L4(e,t,i,o,a)}function X0e(e,t,r){return new Kl.GraphQLError(`Expected value of type "${e.name}" but got: ${(0,cS.inspect)(t)}.`,{nodes:r})}var ave=function(e,t,r,n){if((0,yH.isObjectLike)(e)&&typeof e.__typename=="string")return e.__typename;let o=r.schema.getPossibleTypes(n),i=[];for(let a=0;a{}),s.name}}if(i.length)return Promise.all(i).then(a=>{for(let s=0;s{"use strict";Object.defineProperty(M4,"__esModule",{value:!0});M4.graphql=amt;M4.graphqlSync=smt;var emt=Ls(),tmt=OO(),rmt=Wg(),nmt=MA(),omt=ZA(),imt=QA();function amt(e){return new Promise(t=>t(cve(e)))}function smt(e){let t=cve(e);if((0,tmt.isPromise)(t))throw new Error("GraphQL execution failed to complete synchronously.");return t}function cve(e){arguments.length<2||(0,emt.devAssert)(!1,"graphql@16 dropped long-deprecated support for positional arguments, please pass an object instead.");let{schema:t,source:r,rootValue:n,contextValue:o,variableValues:i,operationName:a,fieldResolver:s,typeResolver:c}=e,p=(0,nmt.validateSchema)(t);if(p.length>0)return{errors:p};let d;try{d=(0,rmt.parse)(r)}catch(m){return{errors:[m]}}let f=(0,omt.validate)(t,d);return f.length>0?{errors:f}:(0,imt.execute)({schema:t,document:d,rootValue:n,contextValue:o,variableValues:i,operationName:a,fieldResolver:s,typeResolver:c})}});var dve=L(Ze=>{"use strict";Object.defineProperty(Ze,"__esModule",{value:!0});Object.defineProperty(Ze,"DEFAULT_DEPRECATION_REASON",{enumerable:!0,get:function(){return Wu.DEFAULT_DEPRECATION_REASON}});Object.defineProperty(Ze,"GRAPHQL_MAX_INT",{enumerable:!0,get:function(){return _f.GRAPHQL_MAX_INT}});Object.defineProperty(Ze,"GRAPHQL_MIN_INT",{enumerable:!0,get:function(){return _f.GRAPHQL_MIN_INT}});Object.defineProperty(Ze,"GraphQLBoolean",{enumerable:!0,get:function(){return _f.GraphQLBoolean}});Object.defineProperty(Ze,"GraphQLDeprecatedDirective",{enumerable:!0,get:function(){return Wu.GraphQLDeprecatedDirective}});Object.defineProperty(Ze,"GraphQLDirective",{enumerable:!0,get:function(){return Wu.GraphQLDirective}});Object.defineProperty(Ze,"GraphQLEnumType",{enumerable:!0,get:function(){return Er.GraphQLEnumType}});Object.defineProperty(Ze,"GraphQLFloat",{enumerable:!0,get:function(){return _f.GraphQLFloat}});Object.defineProperty(Ze,"GraphQLID",{enumerable:!0,get:function(){return _f.GraphQLID}});Object.defineProperty(Ze,"GraphQLIncludeDirective",{enumerable:!0,get:function(){return Wu.GraphQLIncludeDirective}});Object.defineProperty(Ze,"GraphQLInputObjectType",{enumerable:!0,get:function(){return Er.GraphQLInputObjectType}});Object.defineProperty(Ze,"GraphQLInt",{enumerable:!0,get:function(){return _f.GraphQLInt}});Object.defineProperty(Ze,"GraphQLInterfaceType",{enumerable:!0,get:function(){return Er.GraphQLInterfaceType}});Object.defineProperty(Ze,"GraphQLList",{enumerable:!0,get:function(){return Er.GraphQLList}});Object.defineProperty(Ze,"GraphQLNonNull",{enumerable:!0,get:function(){return Er.GraphQLNonNull}});Object.defineProperty(Ze,"GraphQLObjectType",{enumerable:!0,get:function(){return Er.GraphQLObjectType}});Object.defineProperty(Ze,"GraphQLOneOfDirective",{enumerable:!0,get:function(){return Wu.GraphQLOneOfDirective}});Object.defineProperty(Ze,"GraphQLScalarType",{enumerable:!0,get:function(){return Er.GraphQLScalarType}});Object.defineProperty(Ze,"GraphQLSchema",{enumerable:!0,get:function(){return gH.GraphQLSchema}});Object.defineProperty(Ze,"GraphQLSkipDirective",{enumerable:!0,get:function(){return Wu.GraphQLSkipDirective}});Object.defineProperty(Ze,"GraphQLSpecifiedByDirective",{enumerable:!0,get:function(){return Wu.GraphQLSpecifiedByDirective}});Object.defineProperty(Ze,"GraphQLString",{enumerable:!0,get:function(){return _f.GraphQLString}});Object.defineProperty(Ze,"GraphQLUnionType",{enumerable:!0,get:function(){return Er.GraphQLUnionType}});Object.defineProperty(Ze,"SchemaMetaFieldDef",{enumerable:!0,get:function(){return _c.SchemaMetaFieldDef}});Object.defineProperty(Ze,"TypeKind",{enumerable:!0,get:function(){return _c.TypeKind}});Object.defineProperty(Ze,"TypeMetaFieldDef",{enumerable:!0,get:function(){return _c.TypeMetaFieldDef}});Object.defineProperty(Ze,"TypeNameMetaFieldDef",{enumerable:!0,get:function(){return _c.TypeNameMetaFieldDef}});Object.defineProperty(Ze,"__Directive",{enumerable:!0,get:function(){return _c.__Directive}});Object.defineProperty(Ze,"__DirectiveLocation",{enumerable:!0,get:function(){return _c.__DirectiveLocation}});Object.defineProperty(Ze,"__EnumValue",{enumerable:!0,get:function(){return _c.__EnumValue}});Object.defineProperty(Ze,"__Field",{enumerable:!0,get:function(){return _c.__Field}});Object.defineProperty(Ze,"__InputValue",{enumerable:!0,get:function(){return _c.__InputValue}});Object.defineProperty(Ze,"__Schema",{enumerable:!0,get:function(){return _c.__Schema}});Object.defineProperty(Ze,"__Type",{enumerable:!0,get:function(){return _c.__Type}});Object.defineProperty(Ze,"__TypeKind",{enumerable:!0,get:function(){return _c.__TypeKind}});Object.defineProperty(Ze,"assertAbstractType",{enumerable:!0,get:function(){return Er.assertAbstractType}});Object.defineProperty(Ze,"assertCompositeType",{enumerable:!0,get:function(){return Er.assertCompositeType}});Object.defineProperty(Ze,"assertDirective",{enumerable:!0,get:function(){return Wu.assertDirective}});Object.defineProperty(Ze,"assertEnumType",{enumerable:!0,get:function(){return Er.assertEnumType}});Object.defineProperty(Ze,"assertEnumValueName",{enumerable:!0,get:function(){return pve.assertEnumValueName}});Object.defineProperty(Ze,"assertInputObjectType",{enumerable:!0,get:function(){return Er.assertInputObjectType}});Object.defineProperty(Ze,"assertInputType",{enumerable:!0,get:function(){return Er.assertInputType}});Object.defineProperty(Ze,"assertInterfaceType",{enumerable:!0,get:function(){return Er.assertInterfaceType}});Object.defineProperty(Ze,"assertLeafType",{enumerable:!0,get:function(){return Er.assertLeafType}});Object.defineProperty(Ze,"assertListType",{enumerable:!0,get:function(){return Er.assertListType}});Object.defineProperty(Ze,"assertName",{enumerable:!0,get:function(){return pve.assertName}});Object.defineProperty(Ze,"assertNamedType",{enumerable:!0,get:function(){return Er.assertNamedType}});Object.defineProperty(Ze,"assertNonNullType",{enumerable:!0,get:function(){return Er.assertNonNullType}});Object.defineProperty(Ze,"assertNullableType",{enumerable:!0,get:function(){return Er.assertNullableType}});Object.defineProperty(Ze,"assertObjectType",{enumerable:!0,get:function(){return Er.assertObjectType}});Object.defineProperty(Ze,"assertOutputType",{enumerable:!0,get:function(){return Er.assertOutputType}});Object.defineProperty(Ze,"assertScalarType",{enumerable:!0,get:function(){return Er.assertScalarType}});Object.defineProperty(Ze,"assertSchema",{enumerable:!0,get:function(){return gH.assertSchema}});Object.defineProperty(Ze,"assertType",{enumerable:!0,get:function(){return Er.assertType}});Object.defineProperty(Ze,"assertUnionType",{enumerable:!0,get:function(){return Er.assertUnionType}});Object.defineProperty(Ze,"assertValidSchema",{enumerable:!0,get:function(){return uve.assertValidSchema}});Object.defineProperty(Ze,"assertWrappingType",{enumerable:!0,get:function(){return Er.assertWrappingType}});Object.defineProperty(Ze,"getNamedType",{enumerable:!0,get:function(){return Er.getNamedType}});Object.defineProperty(Ze,"getNullableType",{enumerable:!0,get:function(){return Er.getNullableType}});Object.defineProperty(Ze,"introspectionTypes",{enumerable:!0,get:function(){return _c.introspectionTypes}});Object.defineProperty(Ze,"isAbstractType",{enumerable:!0,get:function(){return Er.isAbstractType}});Object.defineProperty(Ze,"isCompositeType",{enumerable:!0,get:function(){return Er.isCompositeType}});Object.defineProperty(Ze,"isDirective",{enumerable:!0,get:function(){return Wu.isDirective}});Object.defineProperty(Ze,"isEnumType",{enumerable:!0,get:function(){return Er.isEnumType}});Object.defineProperty(Ze,"isInputObjectType",{enumerable:!0,get:function(){return Er.isInputObjectType}});Object.defineProperty(Ze,"isInputType",{enumerable:!0,get:function(){return Er.isInputType}});Object.defineProperty(Ze,"isInterfaceType",{enumerable:!0,get:function(){return Er.isInterfaceType}});Object.defineProperty(Ze,"isIntrospectionType",{enumerable:!0,get:function(){return _c.isIntrospectionType}});Object.defineProperty(Ze,"isLeafType",{enumerable:!0,get:function(){return Er.isLeafType}});Object.defineProperty(Ze,"isListType",{enumerable:!0,get:function(){return Er.isListType}});Object.defineProperty(Ze,"isNamedType",{enumerable:!0,get:function(){return Er.isNamedType}});Object.defineProperty(Ze,"isNonNullType",{enumerable:!0,get:function(){return Er.isNonNullType}});Object.defineProperty(Ze,"isNullableType",{enumerable:!0,get:function(){return Er.isNullableType}});Object.defineProperty(Ze,"isObjectType",{enumerable:!0,get:function(){return Er.isObjectType}});Object.defineProperty(Ze,"isOutputType",{enumerable:!0,get:function(){return Er.isOutputType}});Object.defineProperty(Ze,"isRequiredArgument",{enumerable:!0,get:function(){return Er.isRequiredArgument}});Object.defineProperty(Ze,"isRequiredInputField",{enumerable:!0,get:function(){return Er.isRequiredInputField}});Object.defineProperty(Ze,"isScalarType",{enumerable:!0,get:function(){return Er.isScalarType}});Object.defineProperty(Ze,"isSchema",{enumerable:!0,get:function(){return gH.isSchema}});Object.defineProperty(Ze,"isSpecifiedDirective",{enumerable:!0,get:function(){return Wu.isSpecifiedDirective}});Object.defineProperty(Ze,"isSpecifiedScalarType",{enumerable:!0,get:function(){return _f.isSpecifiedScalarType}});Object.defineProperty(Ze,"isType",{enumerable:!0,get:function(){return Er.isType}});Object.defineProperty(Ze,"isUnionType",{enumerable:!0,get:function(){return Er.isUnionType}});Object.defineProperty(Ze,"isWrappingType",{enumerable:!0,get:function(){return Er.isWrappingType}});Object.defineProperty(Ze,"resolveObjMapThunk",{enumerable:!0,get:function(){return Er.resolveObjMapThunk}});Object.defineProperty(Ze,"resolveReadonlyArrayThunk",{enumerable:!0,get:function(){return Er.resolveReadonlyArrayThunk}});Object.defineProperty(Ze,"specifiedDirectives",{enumerable:!0,get:function(){return Wu.specifiedDirectives}});Object.defineProperty(Ze,"specifiedScalarTypes",{enumerable:!0,get:function(){return _f.specifiedScalarTypes}});Object.defineProperty(Ze,"validateSchema",{enumerable:!0,get:function(){return uve.validateSchema}});var gH=nS(),Er=vn(),Wu=pc(),_f=vd(),_c=Vl(),uve=MA(),pve=EA()});var fve=L(Cn=>{"use strict";Object.defineProperty(Cn,"__esModule",{value:!0});Object.defineProperty(Cn,"BREAK",{enumerable:!0,get:function(){return YA.BREAK}});Object.defineProperty(Cn,"DirectiveLocation",{enumerable:!0,get:function(){return fmt.DirectiveLocation}});Object.defineProperty(Cn,"Kind",{enumerable:!0,get:function(){return umt.Kind}});Object.defineProperty(Cn,"Lexer",{enumerable:!0,get:function(){return dmt.Lexer}});Object.defineProperty(Cn,"Location",{enumerable:!0,get:function(){return SH.Location}});Object.defineProperty(Cn,"OperationTypeNode",{enumerable:!0,get:function(){return SH.OperationTypeNode}});Object.defineProperty(Cn,"Source",{enumerable:!0,get:function(){return cmt.Source}});Object.defineProperty(Cn,"Token",{enumerable:!0,get:function(){return SH.Token}});Object.defineProperty(Cn,"TokenKind",{enumerable:!0,get:function(){return pmt.TokenKind}});Object.defineProperty(Cn,"getEnterLeaveForKind",{enumerable:!0,get:function(){return YA.getEnterLeaveForKind}});Object.defineProperty(Cn,"getLocation",{enumerable:!0,get:function(){return lmt.getLocation}});Object.defineProperty(Cn,"getVisitFn",{enumerable:!0,get:function(){return YA.getVisitFn}});Object.defineProperty(Cn,"isConstValueNode",{enumerable:!0,get:function(){return Qu.isConstValueNode}});Object.defineProperty(Cn,"isDefinitionNode",{enumerable:!0,get:function(){return Qu.isDefinitionNode}});Object.defineProperty(Cn,"isExecutableDefinitionNode",{enumerable:!0,get:function(){return Qu.isExecutableDefinitionNode}});Object.defineProperty(Cn,"isSchemaCoordinateNode",{enumerable:!0,get:function(){return Qu.isSchemaCoordinateNode}});Object.defineProperty(Cn,"isSelectionNode",{enumerable:!0,get:function(){return Qu.isSelectionNode}});Object.defineProperty(Cn,"isTypeDefinitionNode",{enumerable:!0,get:function(){return Qu.isTypeDefinitionNode}});Object.defineProperty(Cn,"isTypeExtensionNode",{enumerable:!0,get:function(){return Qu.isTypeExtensionNode}});Object.defineProperty(Cn,"isTypeNode",{enumerable:!0,get:function(){return Qu.isTypeNode}});Object.defineProperty(Cn,"isTypeSystemDefinitionNode",{enumerable:!0,get:function(){return Qu.isTypeSystemDefinitionNode}});Object.defineProperty(Cn,"isTypeSystemExtensionNode",{enumerable:!0,get:function(){return Qu.isTypeSystemExtensionNode}});Object.defineProperty(Cn,"isValueNode",{enumerable:!0,get:function(){return Qu.isValueNode}});Object.defineProperty(Cn,"parse",{enumerable:!0,get:function(){return XA.parse}});Object.defineProperty(Cn,"parseConstValue",{enumerable:!0,get:function(){return XA.parseConstValue}});Object.defineProperty(Cn,"parseSchemaCoordinate",{enumerable:!0,get:function(){return XA.parseSchemaCoordinate}});Object.defineProperty(Cn,"parseType",{enumerable:!0,get:function(){return XA.parseType}});Object.defineProperty(Cn,"parseValue",{enumerable:!0,get:function(){return XA.parseValue}});Object.defineProperty(Cn,"print",{enumerable:!0,get:function(){return _mt.print}});Object.defineProperty(Cn,"printLocation",{enumerable:!0,get:function(){return _ve.printLocation}});Object.defineProperty(Cn,"printSourceLocation",{enumerable:!0,get:function(){return _ve.printSourceLocation}});Object.defineProperty(Cn,"visit",{enumerable:!0,get:function(){return YA.visit}});Object.defineProperty(Cn,"visitInParallel",{enumerable:!0,get:function(){return YA.visitInParallel}});var cmt=BO(),lmt=NO(),_ve=dV(),umt=Sn(),pmt=C1(),dmt=yA(),XA=Wg(),_mt=Gc(),YA=Qg(),SH=ql(),Qu=iS(),fmt=k1()});var mve=L(vH=>{"use strict";Object.defineProperty(vH,"__esModule",{value:!0});vH.isAsyncIterable=mmt;function mmt(e){return typeof e?.[Symbol.asyncIterator]=="function"}});var hve=L(bH=>{"use strict";Object.defineProperty(bH,"__esModule",{value:!0});bH.mapAsyncIterator=hmt;function hmt(e,t){let r=e[Symbol.asyncIterator]();async function n(o){if(o.done)return o;try{return{value:await t(o.value),done:!1}}catch(i){if(typeof r.return=="function")try{await r.return()}catch{}throw i}}return{async next(){return n(await r.next())},async return(){return typeof r.return=="function"?n(await r.return()):{value:void 0,done:!0}},async throw(o){if(typeof r.throw=="function")return n(await r.throw(o));throw o},[Symbol.asyncIterator](){return this}}}});var vve=L(j4=>{"use strict";Object.defineProperty(j4,"__esModule",{value:!0});j4.createSourceEventStream=Sve;j4.subscribe=Emt;var ymt=Ls(),gmt=eo(),gve=mve(),yve=qA(),xH=ar(),Smt=N4(),vmt=w4(),e2=QA(),bmt=hve(),xmt=q1();async function Emt(e){arguments.length<2||(0,ymt.devAssert)(!1,"graphql@16 dropped long-deprecated support for positional arguments, please pass an object instead.");let t=await Sve(e);if(!(0,gve.isAsyncIterable)(t))return t;let r=n=>(0,e2.execute)({...e,rootValue:n});return(0,bmt.mapAsyncIterator)(t,r)}function Tmt(e){let t=e[0];return t&&"document"in t?t:{schema:t,document:e[1],rootValue:e[2],contextValue:e[3],variableValues:e[4],operationName:e[5],subscribeFieldResolver:e[6]}}async function Sve(...e){let t=Tmt(e),{schema:r,document:n,variableValues:o}=t;(0,e2.assertValidExecutionArguments)(r,n,o);let i=(0,e2.buildExecutionContext)(t);if(!("schema"in i))return{errors:i};try{let a=await Dmt(i);if(!(0,gve.isAsyncIterable)(a))throw new Error(`Subscription field must return Async Iterable. Received: ${(0,gmt.inspect)(a)}.`);return a}catch(a){if(a instanceof xH.GraphQLError)return{errors:[a]};throw a}}async function Dmt(e){let{schema:t,fragments:r,operation:n,variableValues:o,rootValue:i}=e,a=t.getSubscriptionType();if(a==null)throw new xH.GraphQLError("Schema is not configured to execute subscription operation.",{nodes:n});let s=(0,vmt.collectFields)(t,r,o,a,n.selectionSet),[c,p]=[...s.entries()][0],d=(0,e2.getFieldDef)(t,a,p[0]);if(!d){let g=p[0].name.value;throw new xH.GraphQLError(`The subscription field "${g}" is not defined.`,{nodes:p})}let f=(0,yve.addPath)(void 0,c,a.name),m=(0,e2.buildResolveInfo)(e,d,p,a,f);try{var y;let g=(0,xmt.getArgumentValues)(d,p[0],o),S=e.contextValue,E=await((y=d.subscribe)!==null&&y!==void 0?y:e.subscribeFieldResolver)(i,g,S,m);if(E instanceof Error)throw E;return E}catch(g){throw(0,Smt.locatedError)(g,p,(0,yve.pathToArray)(f))}}});var xve=L(Hl=>{"use strict";Object.defineProperty(Hl,"__esModule",{value:!0});Object.defineProperty(Hl,"createSourceEventStream",{enumerable:!0,get:function(){return bve.createSourceEventStream}});Object.defineProperty(Hl,"defaultFieldResolver",{enumerable:!0,get:function(){return B4.defaultFieldResolver}});Object.defineProperty(Hl,"defaultTypeResolver",{enumerable:!0,get:function(){return B4.defaultTypeResolver}});Object.defineProperty(Hl,"execute",{enumerable:!0,get:function(){return B4.execute}});Object.defineProperty(Hl,"executeSync",{enumerable:!0,get:function(){return B4.executeSync}});Object.defineProperty(Hl,"getArgumentValues",{enumerable:!0,get:function(){return EH.getArgumentValues}});Object.defineProperty(Hl,"getDirectiveValues",{enumerable:!0,get:function(){return EH.getDirectiveValues}});Object.defineProperty(Hl,"getVariableValues",{enumerable:!0,get:function(){return EH.getVariableValues}});Object.defineProperty(Hl,"responsePathAsArray",{enumerable:!0,get:function(){return Amt.pathToArray}});Object.defineProperty(Hl,"subscribe",{enumerable:!0,get:function(){return bve.subscribe}});var Amt=qA(),B4=QA(),bve=vve(),EH=q1()});var Eve=L(AH=>{"use strict";Object.defineProperty(AH,"__esModule",{value:!0});AH.NoDeprecatedCustomRule=Imt;var TH=us(),t2=ar(),DH=vn();function Imt(e){return{Field(t){let r=e.getFieldDef(),n=r?.deprecationReason;if(r&&n!=null){let o=e.getParentType();o!=null||(0,TH.invariant)(!1),e.reportError(new t2.GraphQLError(`The field ${o.name}.${r.name} is deprecated. ${n}`,{nodes:t}))}},Argument(t){let r=e.getArgument(),n=r?.deprecationReason;if(r&&n!=null){let o=e.getDirective();if(o!=null)e.reportError(new t2.GraphQLError(`Directive "@${o.name}" argument "${r.name}" is deprecated. ${n}`,{nodes:t}));else{let i=e.getParentType(),a=e.getFieldDef();i!=null&&a!=null||(0,TH.invariant)(!1),e.reportError(new t2.GraphQLError(`Field "${i.name}.${a.name}" argument "${r.name}" is deprecated. ${n}`,{nodes:t}))}}},ObjectField(t){let r=(0,DH.getNamedType)(e.getParentInputType());if((0,DH.isInputObjectType)(r)){let n=r.getFields()[t.name.value],o=n?.deprecationReason;o!=null&&e.reportError(new t2.GraphQLError(`The input field ${r.name}.${n.name} is deprecated. ${o}`,{nodes:t}))}},EnumValue(t){let r=e.getEnumValue(),n=r?.deprecationReason;if(r&&n!=null){let o=(0,DH.getNamedType)(e.getInputType());o!=null||(0,TH.invariant)(!1),e.reportError(new t2.GraphQLError(`The enum value "${o.name}.${r.name}" is deprecated. ${n}`,{nodes:t}))}}}}});var Tve=L(IH=>{"use strict";Object.defineProperty(IH,"__esModule",{value:!0});IH.NoSchemaIntrospectionCustomRule=Pmt;var wmt=ar(),kmt=vn(),Cmt=Vl();function Pmt(e){return{Field(t){let r=(0,kmt.getNamedType)(e.getType());r&&(0,Cmt.isIntrospectionType)(r)&&e.reportError(new wmt.GraphQLError(`GraphQL introspection has been disabled, but the requested query contained the field "${t.name.value}".`,{nodes:t}))}}}});var Ave=L(Rr=>{"use strict";Object.defineProperty(Rr,"__esModule",{value:!0});Object.defineProperty(Rr,"ExecutableDefinitionsRule",{enumerable:!0,get:function(){return Fmt.ExecutableDefinitionsRule}});Object.defineProperty(Rr,"FieldsOnCorrectTypeRule",{enumerable:!0,get:function(){return Rmt.FieldsOnCorrectTypeRule}});Object.defineProperty(Rr,"FragmentsOnCompositeTypesRule",{enumerable:!0,get:function(){return Lmt.FragmentsOnCompositeTypesRule}});Object.defineProperty(Rr,"KnownArgumentNamesRule",{enumerable:!0,get:function(){return $mt.KnownArgumentNamesRule}});Object.defineProperty(Rr,"KnownDirectivesRule",{enumerable:!0,get:function(){return Mmt.KnownDirectivesRule}});Object.defineProperty(Rr,"KnownFragmentNamesRule",{enumerable:!0,get:function(){return jmt.KnownFragmentNamesRule}});Object.defineProperty(Rr,"KnownTypeNamesRule",{enumerable:!0,get:function(){return Bmt.KnownTypeNamesRule}});Object.defineProperty(Rr,"LoneAnonymousOperationRule",{enumerable:!0,get:function(){return qmt.LoneAnonymousOperationRule}});Object.defineProperty(Rr,"LoneSchemaDefinitionRule",{enumerable:!0,get:function(){return sht.LoneSchemaDefinitionRule}});Object.defineProperty(Rr,"MaxIntrospectionDepthRule",{enumerable:!0,get:function(){return aht.MaxIntrospectionDepthRule}});Object.defineProperty(Rr,"NoDeprecatedCustomRule",{enumerable:!0,get:function(){return mht.NoDeprecatedCustomRule}});Object.defineProperty(Rr,"NoFragmentCyclesRule",{enumerable:!0,get:function(){return Umt.NoFragmentCyclesRule}});Object.defineProperty(Rr,"NoSchemaIntrospectionCustomRule",{enumerable:!0,get:function(){return hht.NoSchemaIntrospectionCustomRule}});Object.defineProperty(Rr,"NoUndefinedVariablesRule",{enumerable:!0,get:function(){return zmt.NoUndefinedVariablesRule}});Object.defineProperty(Rr,"NoUnusedFragmentsRule",{enumerable:!0,get:function(){return Jmt.NoUnusedFragmentsRule}});Object.defineProperty(Rr,"NoUnusedVariablesRule",{enumerable:!0,get:function(){return Vmt.NoUnusedVariablesRule}});Object.defineProperty(Rr,"OverlappingFieldsCanBeMergedRule",{enumerable:!0,get:function(){return Kmt.OverlappingFieldsCanBeMergedRule}});Object.defineProperty(Rr,"PossibleFragmentSpreadsRule",{enumerable:!0,get:function(){return Gmt.PossibleFragmentSpreadsRule}});Object.defineProperty(Rr,"PossibleTypeExtensionsRule",{enumerable:!0,get:function(){return fht.PossibleTypeExtensionsRule}});Object.defineProperty(Rr,"ProvidedRequiredArgumentsRule",{enumerable:!0,get:function(){return Hmt.ProvidedRequiredArgumentsRule}});Object.defineProperty(Rr,"ScalarLeafsRule",{enumerable:!0,get:function(){return Zmt.ScalarLeafsRule}});Object.defineProperty(Rr,"SingleFieldSubscriptionsRule",{enumerable:!0,get:function(){return Wmt.SingleFieldSubscriptionsRule}});Object.defineProperty(Rr,"UniqueArgumentDefinitionNamesRule",{enumerable:!0,get:function(){return dht.UniqueArgumentDefinitionNamesRule}});Object.defineProperty(Rr,"UniqueArgumentNamesRule",{enumerable:!0,get:function(){return Qmt.UniqueArgumentNamesRule}});Object.defineProperty(Rr,"UniqueDirectiveNamesRule",{enumerable:!0,get:function(){return _ht.UniqueDirectiveNamesRule}});Object.defineProperty(Rr,"UniqueDirectivesPerLocationRule",{enumerable:!0,get:function(){return Xmt.UniqueDirectivesPerLocationRule}});Object.defineProperty(Rr,"UniqueEnumValueNamesRule",{enumerable:!0,get:function(){return uht.UniqueEnumValueNamesRule}});Object.defineProperty(Rr,"UniqueFieldDefinitionNamesRule",{enumerable:!0,get:function(){return pht.UniqueFieldDefinitionNamesRule}});Object.defineProperty(Rr,"UniqueFragmentNamesRule",{enumerable:!0,get:function(){return Ymt.UniqueFragmentNamesRule}});Object.defineProperty(Rr,"UniqueInputFieldNamesRule",{enumerable:!0,get:function(){return eht.UniqueInputFieldNamesRule}});Object.defineProperty(Rr,"UniqueOperationNamesRule",{enumerable:!0,get:function(){return tht.UniqueOperationNamesRule}});Object.defineProperty(Rr,"UniqueOperationTypesRule",{enumerable:!0,get:function(){return cht.UniqueOperationTypesRule}});Object.defineProperty(Rr,"UniqueTypeNamesRule",{enumerable:!0,get:function(){return lht.UniqueTypeNamesRule}});Object.defineProperty(Rr,"UniqueVariableNamesRule",{enumerable:!0,get:function(){return rht.UniqueVariableNamesRule}});Object.defineProperty(Rr,"ValidationContext",{enumerable:!0,get:function(){return Nmt.ValidationContext}});Object.defineProperty(Rr,"ValuesOfCorrectTypeRule",{enumerable:!0,get:function(){return nht.ValuesOfCorrectTypeRule}});Object.defineProperty(Rr,"VariablesAreInputTypesRule",{enumerable:!0,get:function(){return oht.VariablesAreInputTypesRule}});Object.defineProperty(Rr,"VariablesInAllowedPositionRule",{enumerable:!0,get:function(){return iht.VariablesInAllowedPositionRule}});Object.defineProperty(Rr,"recommendedRules",{enumerable:!0,get:function(){return Dve.recommendedRules}});Object.defineProperty(Rr,"specifiedRules",{enumerable:!0,get:function(){return Dve.specifiedRules}});Object.defineProperty(Rr,"validate",{enumerable:!0,get:function(){return Omt.validate}});var Omt=ZA(),Nmt=oH(),Dve=tH(),Fmt=yK(),Rmt=SK(),Lmt=bK(),$mt=xK(),Mmt=AK(),jmt=wK(),Bmt=PK(),qmt=NK(),Umt=jK(),zmt=qK(),Jmt=zK(),Vmt=VK(),Kmt=tG(),Gmt=oG(),Hmt=cG(),Zmt=dG(),Wmt=bG(),Qmt=AG(),Xmt=PG(),Ymt=MG(),eht=BG(),tht=UG(),rht=HG(),nht=WG(),oht=XG(),iht=eH(),aht=$K(),sht=RK(),cht=JG(),lht=KG(),uht=NG(),pht=LG(),dht=TG(),_ht=wG(),fht=aG(),mht=Eve(),hht=Tve()});var Ive=L(uS=>{"use strict";Object.defineProperty(uS,"__esModule",{value:!0});Object.defineProperty(uS,"GraphQLError",{enumerable:!0,get:function(){return wH.GraphQLError}});Object.defineProperty(uS,"formatError",{enumerable:!0,get:function(){return wH.formatError}});Object.defineProperty(uS,"locatedError",{enumerable:!0,get:function(){return ght.locatedError}});Object.defineProperty(uS,"printError",{enumerable:!0,get:function(){return wH.printError}});Object.defineProperty(uS,"syntaxError",{enumerable:!0,get:function(){return yht.syntaxError}});var wH=ar(),yht=lA(),ght=N4()});var CH=L(kH=>{"use strict";Object.defineProperty(kH,"__esModule",{value:!0});kH.getIntrospectionQuery=Sht;function Sht(e){let t={descriptions:!0,specifiedByUrl:!1,directiveIsRepeatable:!1,schemaDescription:!1,inputValueDeprecation:!1,oneOf:!1,...e},r=t.descriptions?"description":"",n=t.specifiedByUrl?"specifiedByURL":"",o=t.directiveIsRepeatable?"isRepeatable":"",i=t.schemaDescription?r:"";function a(c){return t.inputValueDeprecation?c:""}let s=t.oneOf?"isOneOf":"";return` + query IntrospectionQuery { + __schema { + ${i} + queryType { name kind } + mutationType { name kind } + subscriptionType { name kind } + types { + ...FullType + } + directives { + name + ${r} + ${o} + locations + args${a("(includeDeprecated: true)")} { + ...InputValue + } + } + } + } + + fragment FullType on __Type { + kind + name + ${r} + ${n} + ${s} + fields(includeDeprecated: true) { + name + ${r} + args${a("(includeDeprecated: true)")} { + ...InputValue + } + type { + ...TypeRef + } + isDeprecated + deprecationReason + } + inputFields${a("(includeDeprecated: true)")} { + ...InputValue + } + interfaces { + ...TypeRef + } + enumValues(includeDeprecated: true) { + name + ${r} + isDeprecated + deprecationReason + } + possibleTypes { + ...TypeRef + } + } + + fragment InputValue on __InputValue { + name + ${r} + type { ...TypeRef } + defaultValue + ${a("isDeprecated")} + ${a("deprecationReason")} + } + + fragment TypeRef on __Type { + kind + name + ofType { + kind + name + ofType { + kind + name + ofType { + kind + name + ofType { + kind + name + ofType { + kind + name + ofType { + kind + name + ofType { + kind + name + ofType { + kind + name + ofType { + kind + name + } + } + } + } + } + } + } + } + } + } + `}});var wve=L(PH=>{"use strict";Object.defineProperty(PH,"__esModule",{value:!0});PH.getOperationAST=bht;var vht=Sn();function bht(e,t){let r=null;for(let o of e.definitions)if(o.kind===vht.Kind.OPERATION_DEFINITION){var n;if(t==null){if(r)return null;r=o}else if(((n=o.name)===null||n===void 0?void 0:n.value)===t)return o}return r}});var kve=L(OH=>{"use strict";Object.defineProperty(OH,"__esModule",{value:!0});OH.getOperationRootType=xht;var q4=ar();function xht(e,t){if(t.operation==="query"){let r=e.getQueryType();if(!r)throw new q4.GraphQLError("Schema does not define the required query root type.",{nodes:t});return r}if(t.operation==="mutation"){let r=e.getMutationType();if(!r)throw new q4.GraphQLError("Schema is not configured for mutations.",{nodes:t});return r}if(t.operation==="subscription"){let r=e.getSubscriptionType();if(!r)throw new q4.GraphQLError("Schema is not configured for subscriptions.",{nodes:t});return r}throw new q4.GraphQLError("Can only have query, mutation and subscription operations.",{nodes:t})}});var Cve=L(NH=>{"use strict";Object.defineProperty(NH,"__esModule",{value:!0});NH.introspectionFromSchema=Iht;var Eht=us(),Tht=Wg(),Dht=QA(),Aht=CH();function Iht(e,t){let r={specifiedByUrl:!0,directiveIsRepeatable:!0,schemaDescription:!0,inputValueDeprecation:!0,oneOf:!0,...t},n=(0,Tht.parse)((0,Aht.getIntrospectionQuery)(r)),o=(0,Dht.executeSync)({schema:e,document:n});return!o.errors&&o.data||(0,Eht.invariant)(!1),o.data}});var Ove=L(FH=>{"use strict";Object.defineProperty(FH,"__esModule",{value:!0});FH.buildClientSchema=Fht;var wht=Ls(),Zc=eo(),Pve=yd(),U4=bA(),kht=Wg(),Wc=vn(),Cht=pc(),Ed=Vl(),Pht=vd(),Oht=nS(),Nht=VA();function Fht(e,t){(0,Pve.isObjectLike)(e)&&(0,Pve.isObjectLike)(e.__schema)||(0,wht.devAssert)(!1,`Invalid or incomplete introspection result. Ensure that you are passing "data" property of introspection response and no "errors" was returned alongside: ${(0,Zc.inspect)(e)}.`);let r=e.__schema,n=(0,U4.keyValMap)(r.types,U=>U.name,U=>m(U));for(let U of[...Pht.specifiedScalarTypes,...Ed.introspectionTypes])n[U.name]&&(n[U.name]=U);let o=r.queryType?d(r.queryType):null,i=r.mutationType?d(r.mutationType):null,a=r.subscriptionType?d(r.subscriptionType):null,s=r.directives?r.directives.map(N):[];return new Oht.GraphQLSchema({description:r.description,query:o,mutation:i,subscription:a,types:Object.values(n),directives:s,assumeValid:t?.assumeValid});function c(U){if(U.kind===Ed.TypeKind.LIST){let ge=U.ofType;if(!ge)throw new Error("Decorated type deeper than introspection query.");return new Wc.GraphQLList(c(ge))}if(U.kind===Ed.TypeKind.NON_NULL){let ge=U.ofType;if(!ge)throw new Error("Decorated type deeper than introspection query.");let Te=c(ge);return new Wc.GraphQLNonNull((0,Wc.assertNullableType)(Te))}return p(U)}function p(U){let ge=U.name;if(!ge)throw new Error(`Unknown type reference: ${(0,Zc.inspect)(U)}.`);let Te=n[ge];if(!Te)throw new Error(`Invalid or incomplete schema, unknown type: ${ge}. Ensure that a full introspection query is used in order to build a client schema.`);return Te}function d(U){return(0,Wc.assertObjectType)(p(U))}function f(U){return(0,Wc.assertInterfaceType)(p(U))}function m(U){if(U!=null&&U.name!=null&&U.kind!=null)switch(U.kind){case Ed.TypeKind.SCALAR:return y(U);case Ed.TypeKind.OBJECT:return S(U);case Ed.TypeKind.INTERFACE:return b(U);case Ed.TypeKind.UNION:return E(U);case Ed.TypeKind.ENUM:return I(U);case Ed.TypeKind.INPUT_OBJECT:return T(U)}let ge=(0,Zc.inspect)(U);throw new Error(`Invalid or incomplete introspection result. Ensure that a full introspection query is used in order to build a client schema: ${ge}.`)}function y(U){return new Wc.GraphQLScalarType({name:U.name,description:U.description,specifiedByURL:U.specifiedByURL})}function g(U){if(U.interfaces===null&&U.kind===Ed.TypeKind.INTERFACE)return[];if(!U.interfaces){let ge=(0,Zc.inspect)(U);throw new Error(`Introspection result missing interfaces: ${ge}.`)}return U.interfaces.map(f)}function S(U){return new Wc.GraphQLObjectType({name:U.name,description:U.description,interfaces:()=>g(U),fields:()=>k(U)})}function b(U){return new Wc.GraphQLInterfaceType({name:U.name,description:U.description,interfaces:()=>g(U),fields:()=>k(U)})}function E(U){if(!U.possibleTypes){let ge=(0,Zc.inspect)(U);throw new Error(`Introspection result missing possibleTypes: ${ge}.`)}return new Wc.GraphQLUnionType({name:U.name,description:U.description,types:()=>U.possibleTypes.map(d)})}function I(U){if(!U.enumValues){let ge=(0,Zc.inspect)(U);throw new Error(`Introspection result missing enumValues: ${ge}.`)}return new Wc.GraphQLEnumType({name:U.name,description:U.description,values:(0,U4.keyValMap)(U.enumValues,ge=>ge.name,ge=>({description:ge.description,deprecationReason:ge.deprecationReason}))})}function T(U){if(!U.inputFields){let ge=(0,Zc.inspect)(U);throw new Error(`Introspection result missing inputFields: ${ge}.`)}return new Wc.GraphQLInputObjectType({name:U.name,description:U.description,fields:()=>O(U.inputFields),isOneOf:U.isOneOf})}function k(U){if(!U.fields)throw new Error(`Introspection result missing fields: ${(0,Zc.inspect)(U)}.`);return(0,U4.keyValMap)(U.fields,ge=>ge.name,F)}function F(U){let ge=c(U.type);if(!(0,Wc.isOutputType)(ge)){let Te=(0,Zc.inspect)(ge);throw new Error(`Introspection must provide output type for fields, but received: ${Te}.`)}if(!U.args){let Te=(0,Zc.inspect)(U);throw new Error(`Introspection result missing field args: ${Te}.`)}return{description:U.description,deprecationReason:U.deprecationReason,type:ge,args:O(U.args)}}function O(U){return(0,U4.keyValMap)(U,ge=>ge.name,$)}function $(U){let ge=c(U.type);if(!(0,Wc.isInputType)(ge)){let ke=(0,Zc.inspect)(ge);throw new Error(`Introspection must provide input type for arguments, but received: ${ke}.`)}let Te=U.defaultValue!=null?(0,Nht.valueFromAST)((0,kht.parseValue)(U.defaultValue),ge):void 0;return{description:U.description,type:ge,defaultValue:Te,deprecationReason:U.deprecationReason}}function N(U){if(!U.args){let ge=(0,Zc.inspect)(U);throw new Error(`Introspection result missing directive args: ${ge}.`)}if(!U.locations){let ge=(0,Zc.inspect)(U);throw new Error(`Introspection result missing directive locations: ${ge}.`)}return new Cht.GraphQLDirective({name:U.name,description:U.description,isRepeatable:U.isRepeatable,locations:U.locations.slice(),args:O(U.args)})}}});var LH=L(J4=>{"use strict";Object.defineProperty(J4,"__esModule",{value:!0});J4.extendSchema=Bht;J4.extendSchemaImpl=Bve;var Rht=Ls(),Lht=eo(),$ht=us(),Mht=xh(),r2=zO(),Zl=Sn(),Nve=iS(),si=vn(),n2=pc(),Mve=Vl(),jve=vd(),Fve=nS(),jht=ZA(),RH=q1(),Rve=VA();function Bht(e,t,r){(0,Fve.assertSchema)(e),t!=null&&t.kind===Zl.Kind.DOCUMENT||(0,Rht.devAssert)(!1,"Must provide valid Document AST."),r?.assumeValid!==!0&&r?.assumeValidSDL!==!0&&(0,jht.assertValidSDLExtension)(t,e);let n=e.toConfig(),o=Bve(n,t,r);return n===o?e:new Fve.GraphQLSchema(o)}function Bve(e,t,r){var n,o,i,a;let s=[],c=Object.create(null),p=[],d,f=[];for(let K of t.definitions)if(K.kind===Zl.Kind.SCHEMA_DEFINITION)d=K;else if(K.kind===Zl.Kind.SCHEMA_EXTENSION)f.push(K);else if((0,Nve.isTypeDefinitionNode)(K))s.push(K);else if((0,Nve.isTypeExtensionNode)(K)){let ae=K.name.value,he=c[ae];c[ae]=he?he.concat([K]):[K]}else K.kind===Zl.Kind.DIRECTIVE_DEFINITION&&p.push(K);if(Object.keys(c).length===0&&s.length===0&&p.length===0&&f.length===0&&d==null)return e;let m=Object.create(null);for(let K of e.types)m[K.name]=I(K);for(let K of s){var y;let ae=K.name.value;m[ae]=(y=Lve[ae])!==null&&y!==void 0?y:le(K)}let g={query:e.query&&b(e.query),mutation:e.mutation&&b(e.mutation),subscription:e.subscription&&b(e.subscription),...d&&Te([d]),...Te(f)};return{description:(n=d)===null||n===void 0||(o=n.description)===null||o===void 0?void 0:o.value,...g,types:Object.values(m),directives:[...e.directives.map(E),...p.map(me)],extensions:Object.create(null),astNode:(i=d)!==null&&i!==void 0?i:e.astNode,extensionASTNodes:e.extensionASTNodes.concat(f),assumeValid:(a=r?.assumeValid)!==null&&a!==void 0?a:!1};function S(K){return(0,si.isListType)(K)?new si.GraphQLList(S(K.ofType)):(0,si.isNonNullType)(K)?new si.GraphQLNonNull(S(K.ofType)):b(K)}function b(K){return m[K.name]}function E(K){let ae=K.toConfig();return new n2.GraphQLDirective({...ae,args:(0,r2.mapValue)(ae.args,ge)})}function I(K){if((0,Mve.isIntrospectionType)(K)||(0,jve.isSpecifiedScalarType)(K))return K;if((0,si.isScalarType)(K))return F(K);if((0,si.isObjectType)(K))return O(K);if((0,si.isInterfaceType)(K))return $(K);if((0,si.isUnionType)(K))return N(K);if((0,si.isEnumType)(K))return k(K);if((0,si.isInputObjectType)(K))return T(K);(0,$ht.invariant)(!1,"Unexpected type: "+(0,Lht.inspect)(K))}function T(K){var ae;let he=K.toConfig(),Oe=(ae=c[he.name])!==null&&ae!==void 0?ae:[];return new si.GraphQLInputObjectType({...he,fields:()=>({...(0,r2.mapValue)(he.fields,pt=>({...pt,type:S(pt.type)})),...Jt(Oe)}),extensionASTNodes:he.extensionASTNodes.concat(Oe)})}function k(K){var ae;let he=K.toConfig(),Oe=(ae=c[K.name])!==null&&ae!==void 0?ae:[];return new si.GraphQLEnumType({...he,values:{...he.values,...Yt(Oe)},extensionASTNodes:he.extensionASTNodes.concat(Oe)})}function F(K){var ae;let he=K.toConfig(),Oe=(ae=c[he.name])!==null&&ae!==void 0?ae:[],pt=he.specifiedByURL;for(let lt of Oe){var Ye;pt=(Ye=$ve(lt))!==null&&Ye!==void 0?Ye:pt}return new si.GraphQLScalarType({...he,specifiedByURL:pt,extensionASTNodes:he.extensionASTNodes.concat(Oe)})}function O(K){var ae;let he=K.toConfig(),Oe=(ae=c[he.name])!==null&&ae!==void 0?ae:[];return new si.GraphQLObjectType({...he,interfaces:()=>[...K.getInterfaces().map(b),...vt(Oe)],fields:()=>({...(0,r2.mapValue)(he.fields,U),...xe(Oe)}),extensionASTNodes:he.extensionASTNodes.concat(Oe)})}function $(K){var ae;let he=K.toConfig(),Oe=(ae=c[he.name])!==null&&ae!==void 0?ae:[];return new si.GraphQLInterfaceType({...he,interfaces:()=>[...K.getInterfaces().map(b),...vt(Oe)],fields:()=>({...(0,r2.mapValue)(he.fields,U),...xe(Oe)}),extensionASTNodes:he.extensionASTNodes.concat(Oe)})}function N(K){var ae;let he=K.toConfig(),Oe=(ae=c[he.name])!==null&&ae!==void 0?ae:[];return new si.GraphQLUnionType({...he,types:()=>[...K.getTypes().map(b),...Fr(Oe)],extensionASTNodes:he.extensionASTNodes.concat(Oe)})}function U(K){return{...K,type:S(K.type),args:K.args&&(0,r2.mapValue)(K.args,ge)}}function ge(K){return{...K,type:S(K.type)}}function Te(K){let ae={};for(let Oe of K){var he;let pt=(he=Oe.operationTypes)!==null&&he!==void 0?he:[];for(let Ye of pt)ae[Ye.operation]=ke(Ye.type)}return ae}function ke(K){var ae;let he=K.name.value,Oe=(ae=Lve[he])!==null&&ae!==void 0?ae:m[he];if(Oe===void 0)throw new Error(`Unknown type: "${he}".`);return Oe}function Je(K){return K.kind===Zl.Kind.LIST_TYPE?new si.GraphQLList(Je(K.type)):K.kind===Zl.Kind.NON_NULL_TYPE?new si.GraphQLNonNull(Je(K.type)):ke(K)}function me(K){var ae;return new n2.GraphQLDirective({name:K.name.value,description:(ae=K.description)===null||ae===void 0?void 0:ae.value,locations:K.locations.map(({value:he})=>he),isRepeatable:K.repeatable,args:Rt(K.arguments),astNode:K})}function xe(K){let ae=Object.create(null);for(let pt of K){var he;let Ye=(he=pt.fields)!==null&&he!==void 0?he:[];for(let lt of Ye){var Oe;ae[lt.name.value]={type:Je(lt.type),description:(Oe=lt.description)===null||Oe===void 0?void 0:Oe.value,args:Rt(lt.arguments),deprecationReason:z4(lt),astNode:lt}}}return ae}function Rt(K){let ae=K??[],he=Object.create(null);for(let pt of ae){var Oe;let Ye=Je(pt.type);he[pt.name.value]={type:Ye,description:(Oe=pt.description)===null||Oe===void 0?void 0:Oe.value,defaultValue:(0,Rve.valueFromAST)(pt.defaultValue,Ye),deprecationReason:z4(pt),astNode:pt}}return he}function Jt(K){let ae=Object.create(null);for(let pt of K){var he;let Ye=(he=pt.fields)!==null&&he!==void 0?he:[];for(let lt of Ye){var Oe;let Nt=Je(lt.type);ae[lt.name.value]={type:Nt,description:(Oe=lt.description)===null||Oe===void 0?void 0:Oe.value,defaultValue:(0,Rve.valueFromAST)(lt.defaultValue,Nt),deprecationReason:z4(lt),astNode:lt}}}return ae}function Yt(K){let ae=Object.create(null);for(let pt of K){var he;let Ye=(he=pt.values)!==null&&he!==void 0?he:[];for(let lt of Ye){var Oe;ae[lt.name.value]={description:(Oe=lt.description)===null||Oe===void 0?void 0:Oe.value,deprecationReason:z4(lt),astNode:lt}}}return ae}function vt(K){return K.flatMap(ae=>{var he,Oe;return(he=(Oe=ae.interfaces)===null||Oe===void 0?void 0:Oe.map(ke))!==null&&he!==void 0?he:[]})}function Fr(K){return K.flatMap(ae=>{var he,Oe;return(he=(Oe=ae.types)===null||Oe===void 0?void 0:Oe.map(ke))!==null&&he!==void 0?he:[]})}function le(K){var ae;let he=K.name.value,Oe=(ae=c[he])!==null&&ae!==void 0?ae:[];switch(K.kind){case Zl.Kind.OBJECT_TYPE_DEFINITION:{var pt;let wt=[K,...Oe];return new si.GraphQLObjectType({name:he,description:(pt=K.description)===null||pt===void 0?void 0:pt.value,interfaces:()=>vt(wt),fields:()=>xe(wt),astNode:K,extensionASTNodes:Oe})}case Zl.Kind.INTERFACE_TYPE_DEFINITION:{var Ye;let wt=[K,...Oe];return new si.GraphQLInterfaceType({name:he,description:(Ye=K.description)===null||Ye===void 0?void 0:Ye.value,interfaces:()=>vt(wt),fields:()=>xe(wt),astNode:K,extensionASTNodes:Oe})}case Zl.Kind.ENUM_TYPE_DEFINITION:{var lt;let wt=[K,...Oe];return new si.GraphQLEnumType({name:he,description:(lt=K.description)===null||lt===void 0?void 0:lt.value,values:Yt(wt),astNode:K,extensionASTNodes:Oe})}case Zl.Kind.UNION_TYPE_DEFINITION:{var Nt;let wt=[K,...Oe];return new si.GraphQLUnionType({name:he,description:(Nt=K.description)===null||Nt===void 0?void 0:Nt.value,types:()=>Fr(wt),astNode:K,extensionASTNodes:Oe})}case Zl.Kind.SCALAR_TYPE_DEFINITION:{var Ct;return new si.GraphQLScalarType({name:he,description:(Ct=K.description)===null||Ct===void 0?void 0:Ct.value,specifiedByURL:$ve(K),astNode:K,extensionASTNodes:Oe})}case Zl.Kind.INPUT_OBJECT_TYPE_DEFINITION:{var Zr;let wt=[K,...Oe];return new si.GraphQLInputObjectType({name:he,description:(Zr=K.description)===null||Zr===void 0?void 0:Zr.value,fields:()=>Jt(wt),astNode:K,extensionASTNodes:Oe,isOneOf:qht(K)})}}}}var Lve=(0,Mht.keyMap)([...jve.specifiedScalarTypes,...Mve.introspectionTypes],e=>e.name);function z4(e){let t=(0,RH.getDirectiveValues)(n2.GraphQLDeprecatedDirective,e);return t?.reason}function $ve(e){let t=(0,RH.getDirectiveValues)(n2.GraphQLSpecifiedByDirective,e);return t?.url}function qht(e){return!!(0,RH.getDirectiveValues)(n2.GraphQLOneOfDirective,e)}});var Uve=L(V4=>{"use strict";Object.defineProperty(V4,"__esModule",{value:!0});V4.buildASTSchema=qve;V4.buildSchema=Zht;var Uht=Ls(),zht=Sn(),Jht=Wg(),Vht=pc(),Kht=nS(),Ght=ZA(),Hht=LH();function qve(e,t){e!=null&&e.kind===zht.Kind.DOCUMENT||(0,Uht.devAssert)(!1,"Must provide valid Document AST."),t?.assumeValid!==!0&&t?.assumeValidSDL!==!0&&(0,Ght.assertValidSDL)(e);let r={description:void 0,types:[],directives:[],extensions:Object.create(null),extensionASTNodes:[],assumeValid:!1},n=(0,Hht.extendSchemaImpl)(r,e,t);if(n.astNode==null)for(let i of n.types)switch(i.name){case"Query":n.query=i;break;case"Mutation":n.mutation=i;break;case"Subscription":n.subscription=i;break}let o=[...n.directives,...Vht.specifiedDirectives.filter(i=>n.directives.every(a=>a.name!==i.name))];return new Kht.GraphQLSchema({...n,directives:o})}function Zht(e,t){let r=(0,Jht.parse)(e,{noLocation:t?.noLocation,allowLegacyFragmentVariables:t?.allowLegacyFragmentVariables});return qve(r,{assumeValidSDL:t?.assumeValidSDL,assumeValid:t?.assumeValid})}});var Vve=L(MH=>{"use strict";Object.defineProperty(MH,"__esModule",{value:!0});MH.lexicographicSortSchema=ryt;var Wht=eo(),Qht=us(),Xht=bA(),zve=xA(),$s=vn(),Yht=pc(),eyt=Vl(),tyt=nS();function ryt(e){let t=e.toConfig(),r=(0,Xht.keyValMap)($H(t.types),m=>m.name,f);return new tyt.GraphQLSchema({...t,types:Object.values(r),directives:$H(t.directives).map(a),query:i(t.query),mutation:i(t.mutation),subscription:i(t.subscription)});function n(m){return(0,$s.isListType)(m)?new $s.GraphQLList(n(m.ofType)):(0,$s.isNonNullType)(m)?new $s.GraphQLNonNull(n(m.ofType)):o(m)}function o(m){return r[m.name]}function i(m){return m&&o(m)}function a(m){let y=m.toConfig();return new Yht.GraphQLDirective({...y,locations:Jve(y.locations,g=>g),args:s(y.args)})}function s(m){return K4(m,y=>({...y,type:n(y.type)}))}function c(m){return K4(m,y=>({...y,type:n(y.type),args:y.args&&s(y.args)}))}function p(m){return K4(m,y=>({...y,type:n(y.type)}))}function d(m){return $H(m).map(o)}function f(m){if((0,$s.isScalarType)(m)||(0,eyt.isIntrospectionType)(m))return m;if((0,$s.isObjectType)(m)){let y=m.toConfig();return new $s.GraphQLObjectType({...y,interfaces:()=>d(y.interfaces),fields:()=>c(y.fields)})}if((0,$s.isInterfaceType)(m)){let y=m.toConfig();return new $s.GraphQLInterfaceType({...y,interfaces:()=>d(y.interfaces),fields:()=>c(y.fields)})}if((0,$s.isUnionType)(m)){let y=m.toConfig();return new $s.GraphQLUnionType({...y,types:()=>d(y.types)})}if((0,$s.isEnumType)(m)){let y=m.toConfig();return new $s.GraphQLEnumType({...y,values:K4(y.values,g=>g)})}if((0,$s.isInputObjectType)(m)){let y=m.toConfig();return new $s.GraphQLInputObjectType({...y,fields:()=>p(y.fields)})}(0,Qht.invariant)(!1,"Unexpected type: "+(0,Wht.inspect)(m))}}function K4(e,t){let r=Object.create(null);for(let n of Object.keys(e).sort(zve.naturalCompare))r[n]=t(e[n]);return r}function $H(e){return Jve(e,t=>t.name)}function Jve(e,t){return e.slice().sort((r,n)=>{let o=t(r),i=t(n);return(0,zve.naturalCompare)(o,i)})}});var Xve=L(o2=>{"use strict";Object.defineProperty(o2,"__esModule",{value:!0});o2.printIntrospectionSchema=lyt;o2.printSchema=cyt;o2.printType=Hve;var nyt=eo(),oyt=us(),iyt=fA(),BH=Sn(),G4=Gc(),J1=vn(),qH=pc(),Kve=Vl(),ayt=vd(),syt=RA();function cyt(e){return Gve(e,t=>!(0,qH.isSpecifiedDirective)(t),uyt)}function lyt(e){return Gve(e,qH.isSpecifiedDirective,Kve.isIntrospectionType)}function uyt(e){return!(0,ayt.isSpecifiedScalarType)(e)&&!(0,Kve.isIntrospectionType)(e)}function Gve(e,t,r){let n=e.getDirectives().filter(t),o=Object.values(e.getTypeMap()).filter(r);return[pyt(e),...n.map(i=>Syt(i)),...o.map(i=>Hve(i))].filter(Boolean).join(` + +`)}function pyt(e){if(e.description==null&&dyt(e))return;let t=[],r=e.getQueryType();r&&t.push(` query: ${r.name}`);let n=e.getMutationType();n&&t.push(` mutation: ${n.name}`);let o=e.getSubscriptionType();return o&&t.push(` subscription: ${o.name}`),Wl(e)+`schema { +${t.join(` +`)} +}`}function dyt(e){let t=e.getQueryType();if(t&&t.name!=="Query")return!1;let r=e.getMutationType();if(r&&r.name!=="Mutation")return!1;let n=e.getSubscriptionType();return!(n&&n.name!=="Subscription")}function Hve(e){if((0,J1.isScalarType)(e))return _yt(e);if((0,J1.isObjectType)(e))return fyt(e);if((0,J1.isInterfaceType)(e))return myt(e);if((0,J1.isUnionType)(e))return hyt(e);if((0,J1.isEnumType)(e))return yyt(e);if((0,J1.isInputObjectType)(e))return gyt(e);(0,oyt.invariant)(!1,"Unexpected type: "+(0,nyt.inspect)(e))}function _yt(e){return Wl(e)+`scalar ${e.name}`+vyt(e)}function Zve(e){let t=e.getInterfaces();return t.length?" implements "+t.map(r=>r.name).join(" & "):""}function fyt(e){return Wl(e)+`type ${e.name}`+Zve(e)+Wve(e)}function myt(e){return Wl(e)+`interface ${e.name}`+Zve(e)+Wve(e)}function hyt(e){let t=e.getTypes(),r=t.length?" = "+t.join(" | "):"";return Wl(e)+"union "+e.name+r}function yyt(e){let t=e.getValues().map((r,n)=>Wl(r," ",!n)+" "+r.name+zH(r.deprecationReason));return Wl(e)+`enum ${e.name}`+UH(t)}function gyt(e){let t=Object.values(e.getFields()).map((r,n)=>Wl(r," ",!n)+" "+jH(r));return Wl(e)+`input ${e.name}`+(e.isOneOf?" @oneOf":"")+UH(t)}function Wve(e){let t=Object.values(e.getFields()).map((r,n)=>Wl(r," ",!n)+" "+r.name+Qve(r.args," ")+": "+String(r.type)+zH(r.deprecationReason));return UH(t)}function UH(e){return e.length!==0?` { +`+e.join(` +`)+` +}`:""}function Qve(e,t=""){return e.length===0?"":e.every(r=>!r.description)?"("+e.map(jH).join(", ")+")":`( +`+e.map((r,n)=>Wl(r," "+t,!n)+" "+t+jH(r)).join(` +`)+` +`+t+")"}function jH(e){let t=(0,syt.astFromValue)(e.defaultValue,e.type),r=e.name+": "+String(e.type);return t&&(r+=` = ${(0,G4.print)(t)}`),r+zH(e.deprecationReason)}function Syt(e){return Wl(e)+"directive @"+e.name+Qve(e.args)+(e.isRepeatable?" repeatable":"")+" on "+e.locations.join(" | ")}function zH(e){return e==null?"":e!==qH.DEFAULT_DEPRECATION_REASON?` @deprecated(reason: ${(0,G4.print)({kind:BH.Kind.STRING,value:e})})`:" @deprecated"}function vyt(e){return e.specifiedByURL==null?"":` @specifiedBy(url: ${(0,G4.print)({kind:BH.Kind.STRING,value:e.specifiedByURL})})`}function Wl(e,t="",r=!0){let{description:n}=e;if(n==null)return"";let o=(0,G4.print)({kind:BH.Kind.STRING,value:n,block:(0,iyt.isPrintableAsBlockString)(n)});return(t&&!r?` +`+t:t)+o.replace(/\n/g,` +`+t)+` +`}});var Yve=L(JH=>{"use strict";Object.defineProperty(JH,"__esModule",{value:!0});JH.concatAST=xyt;var byt=Sn();function xyt(e){let t=[];for(let r of e)t.push(...r.definitions);return{kind:byt.Kind.DOCUMENT,definitions:t}}});var r1e=L(VH=>{"use strict";Object.defineProperty(VH,"__esModule",{value:!0});VH.separateOperations=Tyt;var H4=Sn(),Eyt=Qg();function Tyt(e){let t=[],r=Object.create(null);for(let o of e.definitions)switch(o.kind){case H4.Kind.OPERATION_DEFINITION:t.push(o);break;case H4.Kind.FRAGMENT_DEFINITION:r[o.name.value]=e1e(o.selectionSet);break;default:}let n=Object.create(null);for(let o of t){let i=new Set;for(let s of e1e(o.selectionSet))t1e(i,r,s);let a=o.name?o.name.value:"";n[a]={kind:H4.Kind.DOCUMENT,definitions:e.definitions.filter(s=>s===o||s.kind===H4.Kind.FRAGMENT_DEFINITION&&i.has(s.name.value))}}return n}function t1e(e,t,r){if(!e.has(r)){e.add(r);let n=t[r];if(n!==void 0)for(let o of n)t1e(e,t,o)}}function e1e(e){let t=[];return(0,Eyt.visit)(e,{FragmentSpread(r){t.push(r.name.value)}}),t}});var i1e=L(GH=>{"use strict";Object.defineProperty(GH,"__esModule",{value:!0});GH.stripIgnoredCharacters=Ayt;var Dyt=fA(),n1e=yA(),o1e=BO(),KH=C1();function Ayt(e){let t=(0,o1e.isSource)(e)?e:new o1e.Source(e),r=t.body,n=new n1e.Lexer(t),o="",i=!1;for(;n.advance().kind!==KH.TokenKind.EOF;){let a=n.token,s=a.kind,c=!(0,n1e.isPunctuatorTokenKind)(a.kind);i&&(c||a.kind===KH.TokenKind.SPREAD)&&(o+=" ");let p=r.slice(a.start,a.end);s===KH.TokenKind.BLOCK_STRING?o+=(0,Dyt.printBlockString)(a.value,{minimize:!0}):o+=p,i=c}return o}});var s1e=L(Z4=>{"use strict";Object.defineProperty(Z4,"__esModule",{value:!0});Z4.assertValidName=Cyt;Z4.isValidNameError=a1e;var Iyt=Ls(),wyt=ar(),kyt=EA();function Cyt(e){let t=a1e(e);if(t)throw t;return e}function a1e(e){if(typeof e=="string"||(0,Iyt.devAssert)(!1,"Expected name to be a string."),e.startsWith("__"))return new wyt.GraphQLError(`Name "${e}" must not begin with "__", which is reserved by GraphQL introspection.`);try{(0,kyt.assertName)(e)}catch(t){return t}}});var m1e=L(Td=>{"use strict";Object.defineProperty(Td,"__esModule",{value:!0});Td.DangerousChangeType=Td.BreakingChangeType=void 0;Td.findBreakingChanges=Lyt;Td.findDangerousChanges=$yt;var Pyt=eo(),_1e=us(),c1e=xh(),Oyt=Gc(),Kn=vn(),Nyt=vd(),Fyt=RA(),Ryt=HK(),bi;Td.BreakingChangeType=bi;(function(e){e.TYPE_REMOVED="TYPE_REMOVED",e.TYPE_CHANGED_KIND="TYPE_CHANGED_KIND",e.TYPE_REMOVED_FROM_UNION="TYPE_REMOVED_FROM_UNION",e.VALUE_REMOVED_FROM_ENUM="VALUE_REMOVED_FROM_ENUM",e.REQUIRED_INPUT_FIELD_ADDED="REQUIRED_INPUT_FIELD_ADDED",e.IMPLEMENTED_INTERFACE_REMOVED="IMPLEMENTED_INTERFACE_REMOVED",e.FIELD_REMOVED="FIELD_REMOVED",e.FIELD_CHANGED_KIND="FIELD_CHANGED_KIND",e.REQUIRED_ARG_ADDED="REQUIRED_ARG_ADDED",e.ARG_REMOVED="ARG_REMOVED",e.ARG_CHANGED_KIND="ARG_CHANGED_KIND",e.DIRECTIVE_REMOVED="DIRECTIVE_REMOVED",e.DIRECTIVE_ARG_REMOVED="DIRECTIVE_ARG_REMOVED",e.REQUIRED_DIRECTIVE_ARG_ADDED="REQUIRED_DIRECTIVE_ARG_ADDED",e.DIRECTIVE_REPEATABLE_REMOVED="DIRECTIVE_REPEATABLE_REMOVED",e.DIRECTIVE_LOCATION_REMOVED="DIRECTIVE_LOCATION_REMOVED"})(bi||(Td.BreakingChangeType=bi={}));var Xu;Td.DangerousChangeType=Xu;(function(e){e.VALUE_ADDED_TO_ENUM="VALUE_ADDED_TO_ENUM",e.TYPE_ADDED_TO_UNION="TYPE_ADDED_TO_UNION",e.OPTIONAL_INPUT_FIELD_ADDED="OPTIONAL_INPUT_FIELD_ADDED",e.OPTIONAL_ARG_ADDED="OPTIONAL_ARG_ADDED",e.IMPLEMENTED_INTERFACE_ADDED="IMPLEMENTED_INTERFACE_ADDED",e.ARG_DEFAULT_VALUE_CHANGE="ARG_DEFAULT_VALUE_CHANGE"})(Xu||(Td.DangerousChangeType=Xu={}));function Lyt(e,t){return f1e(e,t).filter(r=>r.type in bi)}function $yt(e,t){return f1e(e,t).filter(r=>r.type in Xu)}function f1e(e,t){return[...jyt(e,t),...Myt(e,t)]}function Myt(e,t){let r=[],n=ff(e.getDirectives(),t.getDirectives());for(let o of n.removed)r.push({type:bi.DIRECTIVE_REMOVED,description:`${o.name} was removed.`});for(let[o,i]of n.persisted){let a=ff(o.args,i.args);for(let s of a.added)(0,Kn.isRequiredArgument)(s)&&r.push({type:bi.REQUIRED_DIRECTIVE_ARG_ADDED,description:`A required arg ${s.name} on directive ${o.name} was added.`});for(let s of a.removed)r.push({type:bi.DIRECTIVE_ARG_REMOVED,description:`${s.name} was removed from ${o.name}.`});o.isRepeatable&&!i.isRepeatable&&r.push({type:bi.DIRECTIVE_REPEATABLE_REMOVED,description:`Repeatable flag was removed from ${o.name}.`});for(let s of o.locations)i.locations.includes(s)||r.push({type:bi.DIRECTIVE_LOCATION_REMOVED,description:`${s} was removed from ${o.name}.`})}return r}function jyt(e,t){let r=[],n=ff(Object.values(e.getTypeMap()),Object.values(t.getTypeMap()));for(let o of n.removed)r.push({type:bi.TYPE_REMOVED,description:(0,Nyt.isSpecifiedScalarType)(o)?`Standard scalar ${o.name} was removed because it is not referenced anymore.`:`${o.name} was removed.`});for(let[o,i]of n.persisted)(0,Kn.isEnumType)(o)&&(0,Kn.isEnumType)(i)?r.push(...Uyt(o,i)):(0,Kn.isUnionType)(o)&&(0,Kn.isUnionType)(i)?r.push(...qyt(o,i)):(0,Kn.isInputObjectType)(o)&&(0,Kn.isInputObjectType)(i)?r.push(...Byt(o,i)):(0,Kn.isObjectType)(o)&&(0,Kn.isObjectType)(i)?r.push(...u1e(o,i),...l1e(o,i)):(0,Kn.isInterfaceType)(o)&&(0,Kn.isInterfaceType)(i)?r.push(...u1e(o,i),...l1e(o,i)):o.constructor!==i.constructor&&r.push({type:bi.TYPE_CHANGED_KIND,description:`${o.name} changed from ${p1e(o)} to ${p1e(i)}.`});return r}function Byt(e,t){let r=[],n=ff(Object.values(e.getFields()),Object.values(t.getFields()));for(let o of n.added)(0,Kn.isRequiredInputField)(o)?r.push({type:bi.REQUIRED_INPUT_FIELD_ADDED,description:`A required field ${o.name} on input type ${e.name} was added.`}):r.push({type:Xu.OPTIONAL_INPUT_FIELD_ADDED,description:`An optional field ${o.name} on input type ${e.name} was added.`});for(let o of n.removed)r.push({type:bi.FIELD_REMOVED,description:`${e.name}.${o.name} was removed.`});for(let[o,i]of n.persisted)a2(o.type,i.type)||r.push({type:bi.FIELD_CHANGED_KIND,description:`${e.name}.${o.name} changed type from ${String(o.type)} to ${String(i.type)}.`});return r}function qyt(e,t){let r=[],n=ff(e.getTypes(),t.getTypes());for(let o of n.added)r.push({type:Xu.TYPE_ADDED_TO_UNION,description:`${o.name} was added to union type ${e.name}.`});for(let o of n.removed)r.push({type:bi.TYPE_REMOVED_FROM_UNION,description:`${o.name} was removed from union type ${e.name}.`});return r}function Uyt(e,t){let r=[],n=ff(e.getValues(),t.getValues());for(let o of n.added)r.push({type:Xu.VALUE_ADDED_TO_ENUM,description:`${o.name} was added to enum type ${e.name}.`});for(let o of n.removed)r.push({type:bi.VALUE_REMOVED_FROM_ENUM,description:`${o.name} was removed from enum type ${e.name}.`});return r}function l1e(e,t){let r=[],n=ff(e.getInterfaces(),t.getInterfaces());for(let o of n.added)r.push({type:Xu.IMPLEMENTED_INTERFACE_ADDED,description:`${o.name} added to interfaces implemented by ${e.name}.`});for(let o of n.removed)r.push({type:bi.IMPLEMENTED_INTERFACE_REMOVED,description:`${e.name} no longer implements interface ${o.name}.`});return r}function u1e(e,t){let r=[],n=ff(Object.values(e.getFields()),Object.values(t.getFields()));for(let o of n.removed)r.push({type:bi.FIELD_REMOVED,description:`${e.name}.${o.name} was removed.`});for(let[o,i]of n.persisted)r.push(...zyt(e,o,i)),i2(o.type,i.type)||r.push({type:bi.FIELD_CHANGED_KIND,description:`${e.name}.${o.name} changed type from ${String(o.type)} to ${String(i.type)}.`});return r}function zyt(e,t,r){let n=[],o=ff(t.args,r.args);for(let i of o.removed)n.push({type:bi.ARG_REMOVED,description:`${e.name}.${t.name} arg ${i.name} was removed.`});for(let[i,a]of o.persisted)if(!a2(i.type,a.type))n.push({type:bi.ARG_CHANGED_KIND,description:`${e.name}.${t.name} arg ${i.name} has changed type from ${String(i.type)} to ${String(a.type)}.`});else if(i.defaultValue!==void 0)if(a.defaultValue===void 0)n.push({type:Xu.ARG_DEFAULT_VALUE_CHANGE,description:`${e.name}.${t.name} arg ${i.name} defaultValue was removed.`});else{let c=d1e(i.defaultValue,i.type),p=d1e(a.defaultValue,a.type);c!==p&&n.push({type:Xu.ARG_DEFAULT_VALUE_CHANGE,description:`${e.name}.${t.name} arg ${i.name} has changed defaultValue from ${c} to ${p}.`})}for(let i of o.added)(0,Kn.isRequiredArgument)(i)?n.push({type:bi.REQUIRED_ARG_ADDED,description:`A required arg ${i.name} on ${e.name}.${t.name} was added.`}):n.push({type:Xu.OPTIONAL_ARG_ADDED,description:`An optional arg ${i.name} on ${e.name}.${t.name} was added.`});return n}function i2(e,t){return(0,Kn.isListType)(e)?(0,Kn.isListType)(t)&&i2(e.ofType,t.ofType)||(0,Kn.isNonNullType)(t)&&i2(e,t.ofType):(0,Kn.isNonNullType)(e)?(0,Kn.isNonNullType)(t)&&i2(e.ofType,t.ofType):(0,Kn.isNamedType)(t)&&e.name===t.name||(0,Kn.isNonNullType)(t)&&i2(e,t.ofType)}function a2(e,t){return(0,Kn.isListType)(e)?(0,Kn.isListType)(t)&&a2(e.ofType,t.ofType):(0,Kn.isNonNullType)(e)?(0,Kn.isNonNullType)(t)&&a2(e.ofType,t.ofType)||!(0,Kn.isNonNullType)(t)&&a2(e.ofType,t):(0,Kn.isNamedType)(t)&&e.name===t.name}function p1e(e){if((0,Kn.isScalarType)(e))return"a Scalar type";if((0,Kn.isObjectType)(e))return"an Object type";if((0,Kn.isInterfaceType)(e))return"an Interface type";if((0,Kn.isUnionType)(e))return"a Union type";if((0,Kn.isEnumType)(e))return"an Enum type";if((0,Kn.isInputObjectType)(e))return"an Input type";(0,_1e.invariant)(!1,"Unexpected type: "+(0,Pyt.inspect)(e))}function d1e(e,t){let r=(0,Fyt.astFromValue)(e,t);return r!=null||(0,_1e.invariant)(!1),(0,Oyt.print)((0,Ryt.sortValueNode)(r))}function ff(e,t){let r=[],n=[],o=[],i=(0,c1e.keyMap)(e,({name:s})=>s),a=(0,c1e.keyMap)(t,({name:s})=>s);for(let s of e){let c=a[s.name];c===void 0?n.push(s):o.push([s,c])}for(let s of t)i[s.name]===void 0&&r.push(s);return{added:r,persisted:o,removed:n}}});var y1e=L(W4=>{"use strict";Object.defineProperty(W4,"__esModule",{value:!0});W4.resolveASTSchemaCoordinate=h1e;W4.resolveSchemaCoordinate=Vyt;var pS=eo(),s2=Sn(),Jyt=Wg(),Ch=vn();function Vyt(e,t){return h1e(e,(0,Jyt.parseSchemaCoordinate)(t))}function Kyt(e,t){let r=t.name.value,n=e.getType(r);if(n!=null)return{kind:"NamedType",type:n}}function Gyt(e,t){let r=t.name.value,n=e.getType(r);if(!n)throw new Error(`Expected ${(0,pS.inspect)(r)} to be defined as a type in the schema.`);if(!(0,Ch.isEnumType)(n)&&!(0,Ch.isInputObjectType)(n)&&!(0,Ch.isObjectType)(n)&&!(0,Ch.isInterfaceType)(n))throw new Error(`Expected ${(0,pS.inspect)(r)} to be an Enum, Input Object, Object or Interface type.`);if((0,Ch.isEnumType)(n)){let a=t.memberName.value,s=n.getValue(a);return s==null?void 0:{kind:"EnumValue",type:n,enumValue:s}}if((0,Ch.isInputObjectType)(n)){let a=t.memberName.value,s=n.getFields()[a];return s==null?void 0:{kind:"InputField",type:n,inputField:s}}let o=t.memberName.value,i=n.getFields()[o];if(i!=null)return{kind:"Field",type:n,field:i}}function Hyt(e,t){let r=t.name.value,n=e.getType(r);if(n==null)throw new Error(`Expected ${(0,pS.inspect)(r)} to be defined as a type in the schema.`);if(!(0,Ch.isObjectType)(n)&&!(0,Ch.isInterfaceType)(n))throw new Error(`Expected ${(0,pS.inspect)(r)} to be an object type or interface type.`);let o=t.fieldName.value,i=n.getFields()[o];if(i==null)throw new Error(`Expected ${(0,pS.inspect)(o)} to exist as a field of type ${(0,pS.inspect)(r)} in the schema.`);let a=t.argumentName.value,s=i.args.find(c=>c.name===a);if(s!=null)return{kind:"FieldArgument",type:n,field:i,fieldArgument:s}}function Zyt(e,t){let r=t.name.value,n=e.getDirective(r);if(n)return{kind:"Directive",directive:n}}function Wyt(e,t){let r=t.name.value,n=e.getDirective(r);if(!n)throw new Error(`Expected ${(0,pS.inspect)(r)} to be defined as a directive in the schema.`);let{argumentName:{value:o}}=t,i=n.args.find(a=>a.name===o);if(i)return{kind:"DirectiveArgument",directive:n,directiveArgument:i}}function h1e(e,t){switch(t.kind){case s2.Kind.TYPE_COORDINATE:return Kyt(e,t);case s2.Kind.MEMBER_COORDINATE:return Gyt(e,t);case s2.Kind.ARGUMENT_COORDINATE:return Hyt(e,t);case s2.Kind.DIRECTIVE_COORDINATE:return Zyt(e,t);case s2.Kind.DIRECTIVE_ARGUMENT_COORDINATE:return Wyt(e,t)}}});var x1e=L(Pn=>{"use strict";Object.defineProperty(Pn,"__esModule",{value:!0});Object.defineProperty(Pn,"BreakingChangeType",{enumerable:!0,get:function(){return Q4.BreakingChangeType}});Object.defineProperty(Pn,"DangerousChangeType",{enumerable:!0,get:function(){return Q4.DangerousChangeType}});Object.defineProperty(Pn,"TypeInfo",{enumerable:!0,get:function(){return S1e.TypeInfo}});Object.defineProperty(Pn,"assertValidName",{enumerable:!0,get:function(){return v1e.assertValidName}});Object.defineProperty(Pn,"astFromValue",{enumerable:!0,get:function(){return sgt.astFromValue}});Object.defineProperty(Pn,"buildASTSchema",{enumerable:!0,get:function(){return g1e.buildASTSchema}});Object.defineProperty(Pn,"buildClientSchema",{enumerable:!0,get:function(){return tgt.buildClientSchema}});Object.defineProperty(Pn,"buildSchema",{enumerable:!0,get:function(){return g1e.buildSchema}});Object.defineProperty(Pn,"coerceInputValue",{enumerable:!0,get:function(){return cgt.coerceInputValue}});Object.defineProperty(Pn,"concatAST",{enumerable:!0,get:function(){return lgt.concatAST}});Object.defineProperty(Pn,"doTypesOverlap",{enumerable:!0,get:function(){return ZH.doTypesOverlap}});Object.defineProperty(Pn,"extendSchema",{enumerable:!0,get:function(){return rgt.extendSchema}});Object.defineProperty(Pn,"findBreakingChanges",{enumerable:!0,get:function(){return Q4.findBreakingChanges}});Object.defineProperty(Pn,"findDangerousChanges",{enumerable:!0,get:function(){return Q4.findDangerousChanges}});Object.defineProperty(Pn,"getIntrospectionQuery",{enumerable:!0,get:function(){return Qyt.getIntrospectionQuery}});Object.defineProperty(Pn,"getOperationAST",{enumerable:!0,get:function(){return Xyt.getOperationAST}});Object.defineProperty(Pn,"getOperationRootType",{enumerable:!0,get:function(){return Yyt.getOperationRootType}});Object.defineProperty(Pn,"introspectionFromSchema",{enumerable:!0,get:function(){return egt.introspectionFromSchema}});Object.defineProperty(Pn,"isEqualType",{enumerable:!0,get:function(){return ZH.isEqualType}});Object.defineProperty(Pn,"isTypeSubTypeOf",{enumerable:!0,get:function(){return ZH.isTypeSubTypeOf}});Object.defineProperty(Pn,"isValidNameError",{enumerable:!0,get:function(){return v1e.isValidNameError}});Object.defineProperty(Pn,"lexicographicSortSchema",{enumerable:!0,get:function(){return ngt.lexicographicSortSchema}});Object.defineProperty(Pn,"printIntrospectionSchema",{enumerable:!0,get:function(){return HH.printIntrospectionSchema}});Object.defineProperty(Pn,"printSchema",{enumerable:!0,get:function(){return HH.printSchema}});Object.defineProperty(Pn,"printType",{enumerable:!0,get:function(){return HH.printType}});Object.defineProperty(Pn,"resolveASTSchemaCoordinate",{enumerable:!0,get:function(){return b1e.resolveASTSchemaCoordinate}});Object.defineProperty(Pn,"resolveSchemaCoordinate",{enumerable:!0,get:function(){return b1e.resolveSchemaCoordinate}});Object.defineProperty(Pn,"separateOperations",{enumerable:!0,get:function(){return ugt.separateOperations}});Object.defineProperty(Pn,"stripIgnoredCharacters",{enumerable:!0,get:function(){return pgt.stripIgnoredCharacters}});Object.defineProperty(Pn,"typeFromAST",{enumerable:!0,get:function(){return ogt.typeFromAST}});Object.defineProperty(Pn,"valueFromAST",{enumerable:!0,get:function(){return igt.valueFromAST}});Object.defineProperty(Pn,"valueFromASTUntyped",{enumerable:!0,get:function(){return agt.valueFromASTUntyped}});Object.defineProperty(Pn,"visitWithTypeInfo",{enumerable:!0,get:function(){return S1e.visitWithTypeInfo}});var Qyt=CH(),Xyt=wve(),Yyt=kve(),egt=Cve(),tgt=Ove(),g1e=Uve(),rgt=LH(),ngt=Vve(),HH=Xve(),ogt=bd(),igt=VA(),agt=JV(),sgt=RA(),S1e=h4(),cgt=hG(),lgt=Yve(),ugt=r1e(),pgt=i1e(),ZH=wA(),v1e=s1e(),Q4=m1e(),b1e=y1e()});var D1e=L(Q=>{"use strict";Object.defineProperty(Q,"__esModule",{value:!0});Object.defineProperty(Q,"BREAK",{enumerable:!0,get:function(){return zn.BREAK}});Object.defineProperty(Q,"BreakingChangeType",{enumerable:!0,get:function(){return Jn.BreakingChangeType}});Object.defineProperty(Q,"DEFAULT_DEPRECATION_REASON",{enumerable:!0,get:function(){return Xe.DEFAULT_DEPRECATION_REASON}});Object.defineProperty(Q,"DangerousChangeType",{enumerable:!0,get:function(){return Jn.DangerousChangeType}});Object.defineProperty(Q,"DirectiveLocation",{enumerable:!0,get:function(){return zn.DirectiveLocation}});Object.defineProperty(Q,"ExecutableDefinitionsRule",{enumerable:!0,get:function(){return Hr.ExecutableDefinitionsRule}});Object.defineProperty(Q,"FieldsOnCorrectTypeRule",{enumerable:!0,get:function(){return Hr.FieldsOnCorrectTypeRule}});Object.defineProperty(Q,"FragmentsOnCompositeTypesRule",{enumerable:!0,get:function(){return Hr.FragmentsOnCompositeTypesRule}});Object.defineProperty(Q,"GRAPHQL_MAX_INT",{enumerable:!0,get:function(){return Xe.GRAPHQL_MAX_INT}});Object.defineProperty(Q,"GRAPHQL_MIN_INT",{enumerable:!0,get:function(){return Xe.GRAPHQL_MIN_INT}});Object.defineProperty(Q,"GraphQLBoolean",{enumerable:!0,get:function(){return Xe.GraphQLBoolean}});Object.defineProperty(Q,"GraphQLDeprecatedDirective",{enumerable:!0,get:function(){return Xe.GraphQLDeprecatedDirective}});Object.defineProperty(Q,"GraphQLDirective",{enumerable:!0,get:function(){return Xe.GraphQLDirective}});Object.defineProperty(Q,"GraphQLEnumType",{enumerable:!0,get:function(){return Xe.GraphQLEnumType}});Object.defineProperty(Q,"GraphQLError",{enumerable:!0,get:function(){return c2.GraphQLError}});Object.defineProperty(Q,"GraphQLFloat",{enumerable:!0,get:function(){return Xe.GraphQLFloat}});Object.defineProperty(Q,"GraphQLID",{enumerable:!0,get:function(){return Xe.GraphQLID}});Object.defineProperty(Q,"GraphQLIncludeDirective",{enumerable:!0,get:function(){return Xe.GraphQLIncludeDirective}});Object.defineProperty(Q,"GraphQLInputObjectType",{enumerable:!0,get:function(){return Xe.GraphQLInputObjectType}});Object.defineProperty(Q,"GraphQLInt",{enumerable:!0,get:function(){return Xe.GraphQLInt}});Object.defineProperty(Q,"GraphQLInterfaceType",{enumerable:!0,get:function(){return Xe.GraphQLInterfaceType}});Object.defineProperty(Q,"GraphQLList",{enumerable:!0,get:function(){return Xe.GraphQLList}});Object.defineProperty(Q,"GraphQLNonNull",{enumerable:!0,get:function(){return Xe.GraphQLNonNull}});Object.defineProperty(Q,"GraphQLObjectType",{enumerable:!0,get:function(){return Xe.GraphQLObjectType}});Object.defineProperty(Q,"GraphQLOneOfDirective",{enumerable:!0,get:function(){return Xe.GraphQLOneOfDirective}});Object.defineProperty(Q,"GraphQLScalarType",{enumerable:!0,get:function(){return Xe.GraphQLScalarType}});Object.defineProperty(Q,"GraphQLSchema",{enumerable:!0,get:function(){return Xe.GraphQLSchema}});Object.defineProperty(Q,"GraphQLSkipDirective",{enumerable:!0,get:function(){return Xe.GraphQLSkipDirective}});Object.defineProperty(Q,"GraphQLSpecifiedByDirective",{enumerable:!0,get:function(){return Xe.GraphQLSpecifiedByDirective}});Object.defineProperty(Q,"GraphQLString",{enumerable:!0,get:function(){return Xe.GraphQLString}});Object.defineProperty(Q,"GraphQLUnionType",{enumerable:!0,get:function(){return Xe.GraphQLUnionType}});Object.defineProperty(Q,"Kind",{enumerable:!0,get:function(){return zn.Kind}});Object.defineProperty(Q,"KnownArgumentNamesRule",{enumerable:!0,get:function(){return Hr.KnownArgumentNamesRule}});Object.defineProperty(Q,"KnownDirectivesRule",{enumerable:!0,get:function(){return Hr.KnownDirectivesRule}});Object.defineProperty(Q,"KnownFragmentNamesRule",{enumerable:!0,get:function(){return Hr.KnownFragmentNamesRule}});Object.defineProperty(Q,"KnownTypeNamesRule",{enumerable:!0,get:function(){return Hr.KnownTypeNamesRule}});Object.defineProperty(Q,"Lexer",{enumerable:!0,get:function(){return zn.Lexer}});Object.defineProperty(Q,"Location",{enumerable:!0,get:function(){return zn.Location}});Object.defineProperty(Q,"LoneAnonymousOperationRule",{enumerable:!0,get:function(){return Hr.LoneAnonymousOperationRule}});Object.defineProperty(Q,"LoneSchemaDefinitionRule",{enumerable:!0,get:function(){return Hr.LoneSchemaDefinitionRule}});Object.defineProperty(Q,"MaxIntrospectionDepthRule",{enumerable:!0,get:function(){return Hr.MaxIntrospectionDepthRule}});Object.defineProperty(Q,"NoDeprecatedCustomRule",{enumerable:!0,get:function(){return Hr.NoDeprecatedCustomRule}});Object.defineProperty(Q,"NoFragmentCyclesRule",{enumerable:!0,get:function(){return Hr.NoFragmentCyclesRule}});Object.defineProperty(Q,"NoSchemaIntrospectionCustomRule",{enumerable:!0,get:function(){return Hr.NoSchemaIntrospectionCustomRule}});Object.defineProperty(Q,"NoUndefinedVariablesRule",{enumerable:!0,get:function(){return Hr.NoUndefinedVariablesRule}});Object.defineProperty(Q,"NoUnusedFragmentsRule",{enumerable:!0,get:function(){return Hr.NoUnusedFragmentsRule}});Object.defineProperty(Q,"NoUnusedVariablesRule",{enumerable:!0,get:function(){return Hr.NoUnusedVariablesRule}});Object.defineProperty(Q,"OperationTypeNode",{enumerable:!0,get:function(){return zn.OperationTypeNode}});Object.defineProperty(Q,"OverlappingFieldsCanBeMergedRule",{enumerable:!0,get:function(){return Hr.OverlappingFieldsCanBeMergedRule}});Object.defineProperty(Q,"PossibleFragmentSpreadsRule",{enumerable:!0,get:function(){return Hr.PossibleFragmentSpreadsRule}});Object.defineProperty(Q,"PossibleTypeExtensionsRule",{enumerable:!0,get:function(){return Hr.PossibleTypeExtensionsRule}});Object.defineProperty(Q,"ProvidedRequiredArgumentsRule",{enumerable:!0,get:function(){return Hr.ProvidedRequiredArgumentsRule}});Object.defineProperty(Q,"ScalarLeafsRule",{enumerable:!0,get:function(){return Hr.ScalarLeafsRule}});Object.defineProperty(Q,"SchemaMetaFieldDef",{enumerable:!0,get:function(){return Xe.SchemaMetaFieldDef}});Object.defineProperty(Q,"SingleFieldSubscriptionsRule",{enumerable:!0,get:function(){return Hr.SingleFieldSubscriptionsRule}});Object.defineProperty(Q,"Source",{enumerable:!0,get:function(){return zn.Source}});Object.defineProperty(Q,"Token",{enumerable:!0,get:function(){return zn.Token}});Object.defineProperty(Q,"TokenKind",{enumerable:!0,get:function(){return zn.TokenKind}});Object.defineProperty(Q,"TypeInfo",{enumerable:!0,get:function(){return Jn.TypeInfo}});Object.defineProperty(Q,"TypeKind",{enumerable:!0,get:function(){return Xe.TypeKind}});Object.defineProperty(Q,"TypeMetaFieldDef",{enumerable:!0,get:function(){return Xe.TypeMetaFieldDef}});Object.defineProperty(Q,"TypeNameMetaFieldDef",{enumerable:!0,get:function(){return Xe.TypeNameMetaFieldDef}});Object.defineProperty(Q,"UniqueArgumentDefinitionNamesRule",{enumerable:!0,get:function(){return Hr.UniqueArgumentDefinitionNamesRule}});Object.defineProperty(Q,"UniqueArgumentNamesRule",{enumerable:!0,get:function(){return Hr.UniqueArgumentNamesRule}});Object.defineProperty(Q,"UniqueDirectiveNamesRule",{enumerable:!0,get:function(){return Hr.UniqueDirectiveNamesRule}});Object.defineProperty(Q,"UniqueDirectivesPerLocationRule",{enumerable:!0,get:function(){return Hr.UniqueDirectivesPerLocationRule}});Object.defineProperty(Q,"UniqueEnumValueNamesRule",{enumerable:!0,get:function(){return Hr.UniqueEnumValueNamesRule}});Object.defineProperty(Q,"UniqueFieldDefinitionNamesRule",{enumerable:!0,get:function(){return Hr.UniqueFieldDefinitionNamesRule}});Object.defineProperty(Q,"UniqueFragmentNamesRule",{enumerable:!0,get:function(){return Hr.UniqueFragmentNamesRule}});Object.defineProperty(Q,"UniqueInputFieldNamesRule",{enumerable:!0,get:function(){return Hr.UniqueInputFieldNamesRule}});Object.defineProperty(Q,"UniqueOperationNamesRule",{enumerable:!0,get:function(){return Hr.UniqueOperationNamesRule}});Object.defineProperty(Q,"UniqueOperationTypesRule",{enumerable:!0,get:function(){return Hr.UniqueOperationTypesRule}});Object.defineProperty(Q,"UniqueTypeNamesRule",{enumerable:!0,get:function(){return Hr.UniqueTypeNamesRule}});Object.defineProperty(Q,"UniqueVariableNamesRule",{enumerable:!0,get:function(){return Hr.UniqueVariableNamesRule}});Object.defineProperty(Q,"ValidationContext",{enumerable:!0,get:function(){return Hr.ValidationContext}});Object.defineProperty(Q,"ValuesOfCorrectTypeRule",{enumerable:!0,get:function(){return Hr.ValuesOfCorrectTypeRule}});Object.defineProperty(Q,"VariablesAreInputTypesRule",{enumerable:!0,get:function(){return Hr.VariablesAreInputTypesRule}});Object.defineProperty(Q,"VariablesInAllowedPositionRule",{enumerable:!0,get:function(){return Hr.VariablesInAllowedPositionRule}});Object.defineProperty(Q,"__Directive",{enumerable:!0,get:function(){return Xe.__Directive}});Object.defineProperty(Q,"__DirectiveLocation",{enumerable:!0,get:function(){return Xe.__DirectiveLocation}});Object.defineProperty(Q,"__EnumValue",{enumerable:!0,get:function(){return Xe.__EnumValue}});Object.defineProperty(Q,"__Field",{enumerable:!0,get:function(){return Xe.__Field}});Object.defineProperty(Q,"__InputValue",{enumerable:!0,get:function(){return Xe.__InputValue}});Object.defineProperty(Q,"__Schema",{enumerable:!0,get:function(){return Xe.__Schema}});Object.defineProperty(Q,"__Type",{enumerable:!0,get:function(){return Xe.__Type}});Object.defineProperty(Q,"__TypeKind",{enumerable:!0,get:function(){return Xe.__TypeKind}});Object.defineProperty(Q,"assertAbstractType",{enumerable:!0,get:function(){return Xe.assertAbstractType}});Object.defineProperty(Q,"assertCompositeType",{enumerable:!0,get:function(){return Xe.assertCompositeType}});Object.defineProperty(Q,"assertDirective",{enumerable:!0,get:function(){return Xe.assertDirective}});Object.defineProperty(Q,"assertEnumType",{enumerable:!0,get:function(){return Xe.assertEnumType}});Object.defineProperty(Q,"assertEnumValueName",{enumerable:!0,get:function(){return Xe.assertEnumValueName}});Object.defineProperty(Q,"assertInputObjectType",{enumerable:!0,get:function(){return Xe.assertInputObjectType}});Object.defineProperty(Q,"assertInputType",{enumerable:!0,get:function(){return Xe.assertInputType}});Object.defineProperty(Q,"assertInterfaceType",{enumerable:!0,get:function(){return Xe.assertInterfaceType}});Object.defineProperty(Q,"assertLeafType",{enumerable:!0,get:function(){return Xe.assertLeafType}});Object.defineProperty(Q,"assertListType",{enumerable:!0,get:function(){return Xe.assertListType}});Object.defineProperty(Q,"assertName",{enumerable:!0,get:function(){return Xe.assertName}});Object.defineProperty(Q,"assertNamedType",{enumerable:!0,get:function(){return Xe.assertNamedType}});Object.defineProperty(Q,"assertNonNullType",{enumerable:!0,get:function(){return Xe.assertNonNullType}});Object.defineProperty(Q,"assertNullableType",{enumerable:!0,get:function(){return Xe.assertNullableType}});Object.defineProperty(Q,"assertObjectType",{enumerable:!0,get:function(){return Xe.assertObjectType}});Object.defineProperty(Q,"assertOutputType",{enumerable:!0,get:function(){return Xe.assertOutputType}});Object.defineProperty(Q,"assertScalarType",{enumerable:!0,get:function(){return Xe.assertScalarType}});Object.defineProperty(Q,"assertSchema",{enumerable:!0,get:function(){return Xe.assertSchema}});Object.defineProperty(Q,"assertType",{enumerable:!0,get:function(){return Xe.assertType}});Object.defineProperty(Q,"assertUnionType",{enumerable:!0,get:function(){return Xe.assertUnionType}});Object.defineProperty(Q,"assertValidName",{enumerable:!0,get:function(){return Jn.assertValidName}});Object.defineProperty(Q,"assertValidSchema",{enumerable:!0,get:function(){return Xe.assertValidSchema}});Object.defineProperty(Q,"assertWrappingType",{enumerable:!0,get:function(){return Xe.assertWrappingType}});Object.defineProperty(Q,"astFromValue",{enumerable:!0,get:function(){return Jn.astFromValue}});Object.defineProperty(Q,"buildASTSchema",{enumerable:!0,get:function(){return Jn.buildASTSchema}});Object.defineProperty(Q,"buildClientSchema",{enumerable:!0,get:function(){return Jn.buildClientSchema}});Object.defineProperty(Q,"buildSchema",{enumerable:!0,get:function(){return Jn.buildSchema}});Object.defineProperty(Q,"coerceInputValue",{enumerable:!0,get:function(){return Jn.coerceInputValue}});Object.defineProperty(Q,"concatAST",{enumerable:!0,get:function(){return Jn.concatAST}});Object.defineProperty(Q,"createSourceEventStream",{enumerable:!0,get:function(){return Dd.createSourceEventStream}});Object.defineProperty(Q,"defaultFieldResolver",{enumerable:!0,get:function(){return Dd.defaultFieldResolver}});Object.defineProperty(Q,"defaultTypeResolver",{enumerable:!0,get:function(){return Dd.defaultTypeResolver}});Object.defineProperty(Q,"doTypesOverlap",{enumerable:!0,get:function(){return Jn.doTypesOverlap}});Object.defineProperty(Q,"execute",{enumerable:!0,get:function(){return Dd.execute}});Object.defineProperty(Q,"executeSync",{enumerable:!0,get:function(){return Dd.executeSync}});Object.defineProperty(Q,"extendSchema",{enumerable:!0,get:function(){return Jn.extendSchema}});Object.defineProperty(Q,"findBreakingChanges",{enumerable:!0,get:function(){return Jn.findBreakingChanges}});Object.defineProperty(Q,"findDangerousChanges",{enumerable:!0,get:function(){return Jn.findDangerousChanges}});Object.defineProperty(Q,"formatError",{enumerable:!0,get:function(){return c2.formatError}});Object.defineProperty(Q,"getArgumentValues",{enumerable:!0,get:function(){return Dd.getArgumentValues}});Object.defineProperty(Q,"getDirectiveValues",{enumerable:!0,get:function(){return Dd.getDirectiveValues}});Object.defineProperty(Q,"getEnterLeaveForKind",{enumerable:!0,get:function(){return zn.getEnterLeaveForKind}});Object.defineProperty(Q,"getIntrospectionQuery",{enumerable:!0,get:function(){return Jn.getIntrospectionQuery}});Object.defineProperty(Q,"getLocation",{enumerable:!0,get:function(){return zn.getLocation}});Object.defineProperty(Q,"getNamedType",{enumerable:!0,get:function(){return Xe.getNamedType}});Object.defineProperty(Q,"getNullableType",{enumerable:!0,get:function(){return Xe.getNullableType}});Object.defineProperty(Q,"getOperationAST",{enumerable:!0,get:function(){return Jn.getOperationAST}});Object.defineProperty(Q,"getOperationRootType",{enumerable:!0,get:function(){return Jn.getOperationRootType}});Object.defineProperty(Q,"getVariableValues",{enumerable:!0,get:function(){return Dd.getVariableValues}});Object.defineProperty(Q,"getVisitFn",{enumerable:!0,get:function(){return zn.getVisitFn}});Object.defineProperty(Q,"graphql",{enumerable:!0,get:function(){return T1e.graphql}});Object.defineProperty(Q,"graphqlSync",{enumerable:!0,get:function(){return T1e.graphqlSync}});Object.defineProperty(Q,"introspectionFromSchema",{enumerable:!0,get:function(){return Jn.introspectionFromSchema}});Object.defineProperty(Q,"introspectionTypes",{enumerable:!0,get:function(){return Xe.introspectionTypes}});Object.defineProperty(Q,"isAbstractType",{enumerable:!0,get:function(){return Xe.isAbstractType}});Object.defineProperty(Q,"isCompositeType",{enumerable:!0,get:function(){return Xe.isCompositeType}});Object.defineProperty(Q,"isConstValueNode",{enumerable:!0,get:function(){return zn.isConstValueNode}});Object.defineProperty(Q,"isDefinitionNode",{enumerable:!0,get:function(){return zn.isDefinitionNode}});Object.defineProperty(Q,"isDirective",{enumerable:!0,get:function(){return Xe.isDirective}});Object.defineProperty(Q,"isEnumType",{enumerable:!0,get:function(){return Xe.isEnumType}});Object.defineProperty(Q,"isEqualType",{enumerable:!0,get:function(){return Jn.isEqualType}});Object.defineProperty(Q,"isExecutableDefinitionNode",{enumerable:!0,get:function(){return zn.isExecutableDefinitionNode}});Object.defineProperty(Q,"isInputObjectType",{enumerable:!0,get:function(){return Xe.isInputObjectType}});Object.defineProperty(Q,"isInputType",{enumerable:!0,get:function(){return Xe.isInputType}});Object.defineProperty(Q,"isInterfaceType",{enumerable:!0,get:function(){return Xe.isInterfaceType}});Object.defineProperty(Q,"isIntrospectionType",{enumerable:!0,get:function(){return Xe.isIntrospectionType}});Object.defineProperty(Q,"isLeafType",{enumerable:!0,get:function(){return Xe.isLeafType}});Object.defineProperty(Q,"isListType",{enumerable:!0,get:function(){return Xe.isListType}});Object.defineProperty(Q,"isNamedType",{enumerable:!0,get:function(){return Xe.isNamedType}});Object.defineProperty(Q,"isNonNullType",{enumerable:!0,get:function(){return Xe.isNonNullType}});Object.defineProperty(Q,"isNullableType",{enumerable:!0,get:function(){return Xe.isNullableType}});Object.defineProperty(Q,"isObjectType",{enumerable:!0,get:function(){return Xe.isObjectType}});Object.defineProperty(Q,"isOutputType",{enumerable:!0,get:function(){return Xe.isOutputType}});Object.defineProperty(Q,"isRequiredArgument",{enumerable:!0,get:function(){return Xe.isRequiredArgument}});Object.defineProperty(Q,"isRequiredInputField",{enumerable:!0,get:function(){return Xe.isRequiredInputField}});Object.defineProperty(Q,"isScalarType",{enumerable:!0,get:function(){return Xe.isScalarType}});Object.defineProperty(Q,"isSchema",{enumerable:!0,get:function(){return Xe.isSchema}});Object.defineProperty(Q,"isSchemaCoordinateNode",{enumerable:!0,get:function(){return zn.isSchemaCoordinateNode}});Object.defineProperty(Q,"isSelectionNode",{enumerable:!0,get:function(){return zn.isSelectionNode}});Object.defineProperty(Q,"isSpecifiedDirective",{enumerable:!0,get:function(){return Xe.isSpecifiedDirective}});Object.defineProperty(Q,"isSpecifiedScalarType",{enumerable:!0,get:function(){return Xe.isSpecifiedScalarType}});Object.defineProperty(Q,"isType",{enumerable:!0,get:function(){return Xe.isType}});Object.defineProperty(Q,"isTypeDefinitionNode",{enumerable:!0,get:function(){return zn.isTypeDefinitionNode}});Object.defineProperty(Q,"isTypeExtensionNode",{enumerable:!0,get:function(){return zn.isTypeExtensionNode}});Object.defineProperty(Q,"isTypeNode",{enumerable:!0,get:function(){return zn.isTypeNode}});Object.defineProperty(Q,"isTypeSubTypeOf",{enumerable:!0,get:function(){return Jn.isTypeSubTypeOf}});Object.defineProperty(Q,"isTypeSystemDefinitionNode",{enumerable:!0,get:function(){return zn.isTypeSystemDefinitionNode}});Object.defineProperty(Q,"isTypeSystemExtensionNode",{enumerable:!0,get:function(){return zn.isTypeSystemExtensionNode}});Object.defineProperty(Q,"isUnionType",{enumerable:!0,get:function(){return Xe.isUnionType}});Object.defineProperty(Q,"isValidNameError",{enumerable:!0,get:function(){return Jn.isValidNameError}});Object.defineProperty(Q,"isValueNode",{enumerable:!0,get:function(){return zn.isValueNode}});Object.defineProperty(Q,"isWrappingType",{enumerable:!0,get:function(){return Xe.isWrappingType}});Object.defineProperty(Q,"lexicographicSortSchema",{enumerable:!0,get:function(){return Jn.lexicographicSortSchema}});Object.defineProperty(Q,"locatedError",{enumerable:!0,get:function(){return c2.locatedError}});Object.defineProperty(Q,"parse",{enumerable:!0,get:function(){return zn.parse}});Object.defineProperty(Q,"parseConstValue",{enumerable:!0,get:function(){return zn.parseConstValue}});Object.defineProperty(Q,"parseSchemaCoordinate",{enumerable:!0,get:function(){return zn.parseSchemaCoordinate}});Object.defineProperty(Q,"parseType",{enumerable:!0,get:function(){return zn.parseType}});Object.defineProperty(Q,"parseValue",{enumerable:!0,get:function(){return zn.parseValue}});Object.defineProperty(Q,"print",{enumerable:!0,get:function(){return zn.print}});Object.defineProperty(Q,"printError",{enumerable:!0,get:function(){return c2.printError}});Object.defineProperty(Q,"printIntrospectionSchema",{enumerable:!0,get:function(){return Jn.printIntrospectionSchema}});Object.defineProperty(Q,"printLocation",{enumerable:!0,get:function(){return zn.printLocation}});Object.defineProperty(Q,"printSchema",{enumerable:!0,get:function(){return Jn.printSchema}});Object.defineProperty(Q,"printSourceLocation",{enumerable:!0,get:function(){return zn.printSourceLocation}});Object.defineProperty(Q,"printType",{enumerable:!0,get:function(){return Jn.printType}});Object.defineProperty(Q,"recommendedRules",{enumerable:!0,get:function(){return Hr.recommendedRules}});Object.defineProperty(Q,"resolveASTSchemaCoordinate",{enumerable:!0,get:function(){return Jn.resolveASTSchemaCoordinate}});Object.defineProperty(Q,"resolveObjMapThunk",{enumerable:!0,get:function(){return Xe.resolveObjMapThunk}});Object.defineProperty(Q,"resolveReadonlyArrayThunk",{enumerable:!0,get:function(){return Xe.resolveReadonlyArrayThunk}});Object.defineProperty(Q,"resolveSchemaCoordinate",{enumerable:!0,get:function(){return Jn.resolveSchemaCoordinate}});Object.defineProperty(Q,"responsePathAsArray",{enumerable:!0,get:function(){return Dd.responsePathAsArray}});Object.defineProperty(Q,"separateOperations",{enumerable:!0,get:function(){return Jn.separateOperations}});Object.defineProperty(Q,"specifiedDirectives",{enumerable:!0,get:function(){return Xe.specifiedDirectives}});Object.defineProperty(Q,"specifiedRules",{enumerable:!0,get:function(){return Hr.specifiedRules}});Object.defineProperty(Q,"specifiedScalarTypes",{enumerable:!0,get:function(){return Xe.specifiedScalarTypes}});Object.defineProperty(Q,"stripIgnoredCharacters",{enumerable:!0,get:function(){return Jn.stripIgnoredCharacters}});Object.defineProperty(Q,"subscribe",{enumerable:!0,get:function(){return Dd.subscribe}});Object.defineProperty(Q,"syntaxError",{enumerable:!0,get:function(){return c2.syntaxError}});Object.defineProperty(Q,"typeFromAST",{enumerable:!0,get:function(){return Jn.typeFromAST}});Object.defineProperty(Q,"validate",{enumerable:!0,get:function(){return Hr.validate}});Object.defineProperty(Q,"validateSchema",{enumerable:!0,get:function(){return Xe.validateSchema}});Object.defineProperty(Q,"valueFromAST",{enumerable:!0,get:function(){return Jn.valueFromAST}});Object.defineProperty(Q,"valueFromASTUntyped",{enumerable:!0,get:function(){return Jn.valueFromASTUntyped}});Object.defineProperty(Q,"version",{enumerable:!0,get:function(){return E1e.version}});Object.defineProperty(Q,"versionInfo",{enumerable:!0,get:function(){return E1e.versionInfo}});Object.defineProperty(Q,"visit",{enumerable:!0,get:function(){return zn.visit}});Object.defineProperty(Q,"visitInParallel",{enumerable:!0,get:function(){return zn.visitInParallel}});Object.defineProperty(Q,"visitWithTypeInfo",{enumerable:!0,get:function(){return Jn.visitWithTypeInfo}});var E1e=yge(),T1e=lve(),Xe=dve(),zn=fve(),Dd=xve(),Hr=Ave(),c2=Ive(),Jn=x1e()});var qn=L(ja=>{"use strict";var rZ=Symbol.for("yaml.alias"),G1e=Symbol.for("yaml.document"),nN=Symbol.for("yaml.map"),H1e=Symbol.for("yaml.pair"),nZ=Symbol.for("yaml.scalar"),oN=Symbol.for("yaml.seq"),mf=Symbol.for("yaml.node.type"),Qgt=e=>!!e&&typeof e=="object"&&e[mf]===rZ,Xgt=e=>!!e&&typeof e=="object"&&e[mf]===G1e,Ygt=e=>!!e&&typeof e=="object"&&e[mf]===nN,eSt=e=>!!e&&typeof e=="object"&&e[mf]===H1e,Z1e=e=>!!e&&typeof e=="object"&&e[mf]===nZ,tSt=e=>!!e&&typeof e=="object"&&e[mf]===oN;function W1e(e){if(e&&typeof e=="object")switch(e[mf]){case nN:case oN:return!0}return!1}function rSt(e){if(e&&typeof e=="object")switch(e[mf]){case rZ:case nN:case nZ:case oN:return!0}return!1}var nSt=e=>(Z1e(e)||W1e(e))&&!!e.anchor;ja.ALIAS=rZ;ja.DOC=G1e;ja.MAP=nN;ja.NODE_TYPE=mf;ja.PAIR=H1e;ja.SCALAR=nZ;ja.SEQ=oN;ja.hasAnchor=nSt;ja.isAlias=Qgt;ja.isCollection=W1e;ja.isDocument=Xgt;ja.isMap=Ygt;ja.isNode=rSt;ja.isPair=eSt;ja.isScalar=Z1e;ja.isSeq=tSt});var f2=L(oZ=>{"use strict";var oa=qn(),fc=Symbol("break visit"),Q1e=Symbol("skip children"),Ad=Symbol("remove node");function iN(e,t){let r=X1e(t);oa.isDocument(e)?K1(null,e.contents,r,Object.freeze([e]))===Ad&&(e.contents=null):K1(null,e,r,Object.freeze([]))}iN.BREAK=fc;iN.SKIP=Q1e;iN.REMOVE=Ad;function K1(e,t,r,n){let o=Y1e(e,t,r,n);if(oa.isNode(o)||oa.isPair(o))return ebe(e,n,o),K1(e,o,r,n);if(typeof o!="symbol"){if(oa.isCollection(t)){n=Object.freeze(n.concat(t));for(let i=0;i{"use strict";var tbe=qn(),oSt=f2(),iSt={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},aSt=e=>e.replace(/[!,[\]{}]/g,t=>iSt[t]),m2=class e{constructor(t,r){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},e.defaultYaml,t),this.tags=Object.assign({},e.defaultTags,r)}clone(){let t=new e(this.yaml,this.tags);return t.docStart=this.docStart,t}atDocument(){let t=new e(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:e.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},e.defaultTags);break}return t}add(t,r){this.atNextDocument&&(this.yaml={explicit:e.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},e.defaultTags),this.atNextDocument=!1);let n=t.trim().split(/[ \t]+/),o=n.shift();switch(o){case"%TAG":{if(n.length!==2&&(r(0,"%TAG directive should contain exactly two parts"),n.length<2))return!1;let[i,a]=n;return this.tags[i]=a,!0}case"%YAML":{if(this.yaml.explicit=!0,n.length!==1)return r(0,"%YAML directive should contain exactly one part"),!1;let[i]=n;if(i==="1.1"||i==="1.2")return this.yaml.version=i,!0;{let a=/^\d+\.\d+$/.test(i);return r(6,`Unsupported YAML version ${i}`,a),!1}}default:return r(0,`Unknown directive ${o}`,!0),!1}}tagName(t,r){if(t==="!")return"!";if(t[0]!=="!")return r(`Not a valid tag: ${t}`),null;if(t[1]==="<"){let a=t.slice(2,-1);return a==="!"||a==="!!"?(r(`Verbatim tags aren't resolved, so ${t} is invalid.`),null):(t[t.length-1]!==">"&&r("Verbatim tags must end with a >"),a)}let[,n,o]=t.match(/^(.*!)([^!]*)$/s);o||r(`The ${t} tag has no suffix`);let i=this.tags[n];if(i)try{return i+decodeURIComponent(o)}catch(a){return r(String(a)),null}return n==="!"?t:(r(`Could not resolve tag: ${t}`),null)}tagString(t){for(let[r,n]of Object.entries(this.tags))if(t.startsWith(n))return r+aSt(t.substring(n.length));return t[0]==="!"?t:`!<${t}>`}toString(t){let r=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],n=Object.entries(this.tags),o;if(t&&n.length>0&&tbe.isNode(t.contents)){let i={};oSt.visit(t.contents,(a,s)=>{tbe.isNode(s)&&s.tag&&(i[s.tag]=!0)}),o=Object.keys(i)}else o=[];for(let[i,a]of n)i==="!!"&&a==="tag:yaml.org,2002:"||(!t||o.some(s=>s.startsWith(a)))&&r.push(`%TAG ${i} ${a}`);return r.join(` +`)}};m2.defaultYaml={explicit:!1,version:"1.2"};m2.defaultTags={"!!":"tag:yaml.org,2002:"};rbe.Directives=m2});var sN=L(h2=>{"use strict";var nbe=qn(),sSt=f2();function cSt(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){let r=`Anchor must not contain whitespace or control characters: ${JSON.stringify(e)}`;throw new Error(r)}return!0}function obe(e){let t=new Set;return sSt.visit(e,{Value(r,n){n.anchor&&t.add(n.anchor)}}),t}function ibe(e,t){for(let r=1;;++r){let n=`${e}${r}`;if(!t.has(n))return n}}function lSt(e,t){let r=[],n=new Map,o=null;return{onAnchor:i=>{r.push(i),o??(o=obe(e));let a=ibe(t,o);return o.add(a),a},setAnchors:()=>{for(let i of r){let a=n.get(i);if(typeof a=="object"&&a.anchor&&(nbe.isScalar(a.node)||nbe.isCollection(a.node)))a.node.anchor=a.anchor;else{let s=new Error("Failed to resolve repeated object (this should not happen)");throw s.source=i,s}}},sourceObjects:n}}h2.anchorIsValid=cSt;h2.anchorNames=obe;h2.createNodeAnchors=lSt;h2.findNewAnchor=ibe});var aZ=L(abe=>{"use strict";function y2(e,t,r,n){if(n&&typeof n=="object")if(Array.isArray(n))for(let o=0,i=n.length;o{"use strict";var uSt=qn();function sbe(e,t,r){if(Array.isArray(e))return e.map((n,o)=>sbe(n,String(o),r));if(e&&typeof e.toJSON=="function"){if(!r||!uSt.hasAnchor(e))return e.toJSON(t,r);let n={aliasCount:0,count:1,res:void 0};r.anchors.set(e,n),r.onCreate=i=>{n.res=i,delete r.onCreate};let o=e.toJSON(t,r);return r.onCreate&&r.onCreate(o),o}return typeof e=="bigint"&&!r?.keep?Number(e):e}cbe.toJS=sbe});var cN=L(ube=>{"use strict";var pSt=aZ(),lbe=qn(),dSt=Oh(),sZ=class{constructor(t){Object.defineProperty(this,lbe.NODE_TYPE,{value:t})}clone(){let t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(t.range=this.range.slice()),t}toJS(t,{mapAsMap:r,maxAliasCount:n,onAnchor:o,reviver:i}={}){if(!lbe.isDocument(t))throw new TypeError("A document argument is required");let a={anchors:new Map,doc:t,keep:!0,mapAsMap:r===!0,mapKeyWarned:!1,maxAliasCount:typeof n=="number"?n:100},s=dSt.toJS(this,"",a);if(typeof o=="function")for(let{count:c,res:p}of a.anchors.values())o(p,c);return typeof i=="function"?pSt.applyReviver(i,{"":s},"",s):s}};ube.NodeBase=sZ});var g2=L(pbe=>{"use strict";var _St=sN(),fSt=f2(),H1=qn(),mSt=cN(),hSt=Oh(),cZ=class extends mSt.NodeBase{constructor(t){super(H1.ALIAS),this.source=t,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(t,r){let n;r?.aliasResolveCache?n=r.aliasResolveCache:(n=[],fSt.visit(t,{Node:(i,a)=>{(H1.isAlias(a)||H1.hasAnchor(a))&&n.push(a)}}),r&&(r.aliasResolveCache=n));let o;for(let i of n){if(i===this)break;i.anchor===this.source&&(o=i)}return o}toJSON(t,r){if(!r)return{source:this.source};let{anchors:n,doc:o,maxAliasCount:i}=r,a=this.resolve(o,r);if(!a){let c=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(c)}let s=n.get(a);if(s||(hSt.toJS(a,null,r),s=n.get(a)),s?.res===void 0){let c="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(c)}if(i>=0&&(s.count+=1,s.aliasCount===0&&(s.aliasCount=lN(o,a,n)),s.count*s.aliasCount>i)){let c="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(c)}return s.res}toString(t,r,n){let o=`*${this.source}`;if(t){if(_St.anchorIsValid(this.source),t.options.verifyAliasOrder&&!t.anchors.has(this.source)){let i=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(i)}if(t.implicitKey)return`${o} `}return o}};function lN(e,t,r){if(H1.isAlias(t)){let n=t.resolve(e),o=r&&n&&r.get(n);return o?o.count*o.aliasCount:0}else if(H1.isCollection(t)){let n=0;for(let o of t.items){let i=lN(e,o,r);i>n&&(n=i)}return n}else if(H1.isPair(t)){let n=lN(e,t.key,r),o=lN(e,t.value,r);return Math.max(n,o)}return 1}pbe.Alias=cZ});var Ji=L(lZ=>{"use strict";var ySt=qn(),gSt=cN(),SSt=Oh(),vSt=e=>!e||typeof e!="function"&&typeof e!="object",Nh=class extends gSt.NodeBase{constructor(t){super(ySt.SCALAR),this.value=t}toJSON(t,r){return r?.keep?this.value:SSt.toJS(this.value,t,r)}toString(){return String(this.value)}};Nh.BLOCK_FOLDED="BLOCK_FOLDED";Nh.BLOCK_LITERAL="BLOCK_LITERAL";Nh.PLAIN="PLAIN";Nh.QUOTE_DOUBLE="QUOTE_DOUBLE";Nh.QUOTE_SINGLE="QUOTE_SINGLE";lZ.Scalar=Nh;lZ.isScalarValue=vSt});var S2=L(_be=>{"use strict";var bSt=g2(),_S=qn(),dbe=Ji(),xSt="tag:yaml.org,2002:";function ESt(e,t,r){if(t){let n=r.filter(i=>i.tag===t),o=n.find(i=>!i.format)??n[0];if(!o)throw new Error(`Tag ${t} not found`);return o}return r.find(n=>n.identify?.(e)&&!n.format)}function TSt(e,t,r){if(_S.isDocument(e)&&(e=e.contents),_S.isNode(e))return e;if(_S.isPair(e)){let f=r.schema[_S.MAP].createNode?.(r.schema,null,r);return f.items.push(e),f}(e instanceof String||e instanceof Number||e instanceof Boolean||typeof BigInt<"u"&&e instanceof BigInt)&&(e=e.valueOf());let{aliasDuplicateObjects:n,onAnchor:o,onTagObj:i,schema:a,sourceObjects:s}=r,c;if(n&&e&&typeof e=="object"){if(c=s.get(e),c)return c.anchor??(c.anchor=o(e)),new bSt.Alias(c.anchor);c={anchor:null,node:null},s.set(e,c)}t?.startsWith("!!")&&(t=xSt+t.slice(2));let p=ESt(e,t,a.tags);if(!p){if(e&&typeof e.toJSON=="function"&&(e=e.toJSON()),!e||typeof e!="object"){let f=new dbe.Scalar(e);return c&&(c.node=f),f}p=e instanceof Map?a[_S.MAP]:Symbol.iterator in Object(e)?a[_S.SEQ]:a[_S.MAP]}i&&(i(p),delete r.onTagObj);let d=p?.createNode?p.createNode(r.schema,e,r):typeof p?.nodeClass?.from=="function"?p.nodeClass.from(r.schema,e,r):new dbe.Scalar(e);return t?d.tag=t:p.default||(d.tag=p.tag),c&&(c.node=d),d}_be.createNode=TSt});var pN=L(uN=>{"use strict";var DSt=S2(),Id=qn(),ASt=cN();function uZ(e,t,r){let n=r;for(let o=t.length-1;o>=0;--o){let i=t[o];if(typeof i=="number"&&Number.isInteger(i)&&i>=0){let a=[];a[i]=n,n=a}else n=new Map([[i,n]])}return DSt.createNode(n,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:e,sourceObjects:new Map})}var fbe=e=>e==null||typeof e=="object"&&!!e[Symbol.iterator]().next().done,pZ=class extends ASt.NodeBase{constructor(t,r){super(t),Object.defineProperty(this,"schema",{value:r,configurable:!0,enumerable:!1,writable:!0})}clone(t){let r=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return t&&(r.schema=t),r.items=r.items.map(n=>Id.isNode(n)||Id.isPair(n)?n.clone(t):n),this.range&&(r.range=this.range.slice()),r}addIn(t,r){if(fbe(t))this.add(r);else{let[n,...o]=t,i=this.get(n,!0);if(Id.isCollection(i))i.addIn(o,r);else if(i===void 0&&this.schema)this.set(n,uZ(this.schema,o,r));else throw new Error(`Expected YAML collection at ${n}. Remaining path: ${o}`)}}deleteIn(t){let[r,...n]=t;if(n.length===0)return this.delete(r);let o=this.get(r,!0);if(Id.isCollection(o))return o.deleteIn(n);throw new Error(`Expected YAML collection at ${r}. Remaining path: ${n}`)}getIn(t,r){let[n,...o]=t,i=this.get(n,!0);return o.length===0?!r&&Id.isScalar(i)?i.value:i:Id.isCollection(i)?i.getIn(o,r):void 0}hasAllNullValues(t){return this.items.every(r=>{if(!Id.isPair(r))return!1;let n=r.value;return n==null||t&&Id.isScalar(n)&&n.value==null&&!n.commentBefore&&!n.comment&&!n.tag})}hasIn(t){let[r,...n]=t;if(n.length===0)return this.has(r);let o=this.get(r,!0);return Id.isCollection(o)?o.hasIn(n):!1}setIn(t,r){let[n,...o]=t;if(o.length===0)this.set(n,r);else{let i=this.get(n,!0);if(Id.isCollection(i))i.setIn(o,r);else if(i===void 0&&this.schema)this.set(n,uZ(this.schema,o,r));else throw new Error(`Expected YAML collection at ${n}. Remaining path: ${o}`)}}};uN.Collection=pZ;uN.collectionFromPath=uZ;uN.isEmptyPath=fbe});var v2=L(dN=>{"use strict";var ISt=e=>e.replace(/^(?!$)(?: $)?/gm,"#");function dZ(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}var wSt=(e,t,r)=>e.endsWith(` +`)?dZ(r,t):r.includes(` +`)?` +`+dZ(r,t):(e.endsWith(" ")?"":" ")+r;dN.indentComment=dZ;dN.lineComment=wSt;dN.stringifyComment=ISt});var hbe=L(b2=>{"use strict";var kSt="flow",_Z="block",_N="quoted";function CSt(e,t,r="flow",{indentAtStart:n,lineWidth:o=80,minContentWidth:i=20,onFold:a,onOverflow:s}={}){if(!o||o<0)return e;oo-Math.max(2,i)?p.push(0):f=o-n);let m,y,g=!1,S=-1,b=-1,E=-1;r===_Z&&(S=mbe(e,S,t.length),S!==-1&&(f=S+c));for(let T;T=e[S+=1];){if(r===_N&&T==="\\"){switch(b=S,e[S+1]){case"x":S+=3;break;case"u":S+=5;break;case"U":S+=9;break;default:S+=1}E=S}if(T===` +`)r===_Z&&(S=mbe(e,S,t.length)),f=S+t.length+c,m=void 0;else{if(T===" "&&y&&y!==" "&&y!==` +`&&y!==" "){let k=e[S+1];k&&k!==" "&&k!==` +`&&k!==" "&&(m=S)}if(S>=f)if(m)p.push(m),f=m+c,m=void 0;else if(r===_N){for(;y===" "||y===" ";)y=T,T=e[S+=1],g=!0;let k=S>E+1?S-2:b-1;if(d[k])return e;p.push(k),d[k]=!0,f=k+c,m=void 0}else g=!0}y=T}if(g&&s&&s(),p.length===0)return e;a&&a();let I=e.slice(0,p[0]);for(let T=0;T{"use strict";var ep=Ji(),Fh=hbe(),mN=(e,t)=>({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),hN=e=>/^(%|---|\.\.\.)/m.test(e);function PSt(e,t,r){if(!t||t<0)return!1;let n=t-r,o=e.length;if(o<=n)return!1;for(let i=0,a=0;in)return!0;if(a=i+1,o-a<=n)return!1}return!0}function x2(e,t){let r=JSON.stringify(e);if(t.options.doubleQuotedAsJSON)return r;let{implicitKey:n}=t,o=t.options.doubleQuotedMinMultiLineLength,i=t.indent||(hN(e)?" ":""),a="",s=0;for(let c=0,p=r[c];p;p=r[++c])if(p===" "&&r[c+1]==="\\"&&r[c+2]==="n"&&(a+=r.slice(s,c)+"\\ ",c+=1,s=c,p="\\"),p==="\\")switch(r[c+1]){case"u":{a+=r.slice(s,c);let d=r.substr(c+2,4);switch(d){case"0000":a+="\\0";break;case"0007":a+="\\a";break;case"000b":a+="\\v";break;case"001b":a+="\\e";break;case"0085":a+="\\N";break;case"00a0":a+="\\_";break;case"2028":a+="\\L";break;case"2029":a+="\\P";break;default:d.substr(0,2)==="00"?a+="\\x"+d.substr(2):a+=r.substr(c,6)}c+=5,s=c+1}break;case"n":if(n||r[c+2]==='"'||r.length +`;let f,m;for(m=r.length;m>0;--m){let F=r[m-1];if(F!==` +`&&F!==" "&&F!==" ")break}let y=r.substring(m),g=y.indexOf(` +`);g===-1?f="-":r===y||g!==y.length-1?(f="+",i&&i()):f="",y&&(r=r.slice(0,-y.length),y[y.length-1]===` +`&&(y=y.slice(0,-1)),y=y.replace(mZ,`$&${p}`));let S=!1,b,E=-1;for(b=0;b{O=!0});let N=Fh.foldFlowLines(`${I}${F}${y}`,p,Fh.FOLD_BLOCK,$);if(!O)return`>${k} +${p}${N}`}return r=r.replace(/\n+/g,`$&${p}`),`|${k} +${p}${I}${r}${y}`}function OSt(e,t,r,n){let{type:o,value:i}=e,{actualString:a,implicitKey:s,indent:c,indentStep:p,inFlow:d}=t;if(s&&i.includes(` +`)||d&&/[[\]{},]/.test(i))return Z1(i,t);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(i))return s||d||!i.includes(` +`)?Z1(i,t):fN(e,t,r,n);if(!s&&!d&&o!==ep.Scalar.PLAIN&&i.includes(` +`))return fN(e,t,r,n);if(hN(i)){if(c==="")return t.forceBlockIndent=!0,fN(e,t,r,n);if(s&&c===p)return Z1(i,t)}let f=i.replace(/\n+/g,`$& +${c}`);if(a){let m=S=>S.default&&S.tag!=="tag:yaml.org,2002:str"&&S.test?.test(f),{compat:y,tags:g}=t.doc.schema;if(g.some(m)||y?.some(m))return Z1(i,t)}return s?f:Fh.foldFlowLines(f,c,Fh.FOLD_FLOW,mN(t,!1))}function NSt(e,t,r,n){let{implicitKey:o,inFlow:i}=t,a=typeof e.value=="string"?e:Object.assign({},e,{value:String(e.value)}),{type:s}=e;s!==ep.Scalar.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(a.value)&&(s=ep.Scalar.QUOTE_DOUBLE);let c=d=>{switch(d){case ep.Scalar.BLOCK_FOLDED:case ep.Scalar.BLOCK_LITERAL:return o||i?Z1(a.value,t):fN(a,t,r,n);case ep.Scalar.QUOTE_DOUBLE:return x2(a.value,t);case ep.Scalar.QUOTE_SINGLE:return fZ(a.value,t);case ep.Scalar.PLAIN:return OSt(a,t,r,n);default:return null}},p=c(s);if(p===null){let{defaultKeyType:d,defaultStringType:f}=t.options,m=o&&d||f;if(p=c(m),p===null)throw new Error(`Unsupported default string type ${m}`)}return p}ybe.stringifyString=NSt});var T2=L(hZ=>{"use strict";var FSt=sN(),Rh=qn(),RSt=v2(),LSt=E2();function $St(e,t){let r=Object.assign({blockQuote:!0,commentString:RSt.stringifyComment,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trueStr:"true",verifyAliasOrder:!0},e.schema.toStringOptions,t),n;switch(r.collectionStyle){case"block":n=!1;break;case"flow":n=!0;break;default:n=null}return{anchors:new Set,doc:e,flowCollectionPadding:r.flowCollectionPadding?" ":"",indent:"",indentStep:typeof r.indent=="number"?" ".repeat(r.indent):" ",inFlow:n,options:r}}function MSt(e,t){if(t.tag){let o=e.filter(i=>i.tag===t.tag);if(o.length>0)return o.find(i=>i.format===t.format)??o[0]}let r,n;if(Rh.isScalar(t)){n=t.value;let o=e.filter(i=>i.identify?.(n));if(o.length>1){let i=o.filter(a=>a.test);i.length>0&&(o=i)}r=o.find(i=>i.format===t.format)??o.find(i=>!i.format)}else n=t,r=e.find(o=>o.nodeClass&&n instanceof o.nodeClass);if(!r){let o=n?.constructor?.name??(n===null?"null":typeof n);throw new Error(`Tag not resolved for ${o} value`)}return r}function jSt(e,t,{anchors:r,doc:n}){if(!n.directives)return"";let o=[],i=(Rh.isScalar(e)||Rh.isCollection(e))&&e.anchor;i&&FSt.anchorIsValid(i)&&(r.add(i),o.push(`&${i}`));let a=e.tag??(t.default?null:t.tag);return a&&o.push(n.directives.tagString(a)),o.join(" ")}function BSt(e,t,r,n){if(Rh.isPair(e))return e.toString(t,r,n);if(Rh.isAlias(e)){if(t.doc.directives)return e.toString(t);if(t.resolvedAliases?.has(e))throw new TypeError("Cannot stringify circular structure without alias nodes");t.resolvedAliases?t.resolvedAliases.add(e):t.resolvedAliases=new Set([e]),e=e.resolve(t.doc)}let o,i=Rh.isNode(e)?e:t.doc.createNode(e,{onTagObj:c=>o=c});o??(o=MSt(t.doc.schema.tags,i));let a=jSt(i,o,t);a.length>0&&(t.indentAtStart=(t.indentAtStart??0)+a.length+1);let s=typeof o.stringify=="function"?o.stringify(i,t,r,n):Rh.isScalar(i)?LSt.stringifyString(i,t,r,n):i.toString(t,r,n);return a?Rh.isScalar(i)||s[0]==="{"||s[0]==="["?`${a} ${s}`:`${a} +${t.indent}${s}`:s}hZ.createStringifyContext=$St;hZ.stringify=BSt});var bbe=L(vbe=>{"use strict";var hf=qn(),gbe=Ji(),Sbe=T2(),D2=v2();function qSt({key:e,value:t},r,n,o){let{allNullValues:i,doc:a,indent:s,indentStep:c,options:{commentString:p,indentSeq:d,simpleKeys:f}}=r,m=hf.isNode(e)&&e.comment||null;if(f){if(m)throw new Error("With simple keys, key nodes cannot have comments");if(hf.isCollection(e)||!hf.isNode(e)&&typeof e=="object"){let $="With simple keys, collection cannot be used as a key value";throw new Error($)}}let y=!f&&(!e||m&&t==null&&!r.inFlow||hf.isCollection(e)||(hf.isScalar(e)?e.type===gbe.Scalar.BLOCK_FOLDED||e.type===gbe.Scalar.BLOCK_LITERAL:typeof e=="object"));r=Object.assign({},r,{allNullValues:!1,implicitKey:!y&&(f||!i),indent:s+c});let g=!1,S=!1,b=Sbe.stringify(e,r,()=>g=!0,()=>S=!0);if(!y&&!r.inFlow&&b.length>1024){if(f)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");y=!0}if(r.inFlow){if(i||t==null)return g&&n&&n(),b===""?"?":y?`? ${b}`:b}else if(i&&!f||t==null&&y)return b=`? ${b}`,m&&!g?b+=D2.lineComment(b,r.indent,p(m)):S&&o&&o(),b;g&&(m=null),y?(m&&(b+=D2.lineComment(b,r.indent,p(m))),b=`? ${b} +${s}:`):(b=`${b}:`,m&&(b+=D2.lineComment(b,r.indent,p(m))));let E,I,T;hf.isNode(t)?(E=!!t.spaceBefore,I=t.commentBefore,T=t.comment):(E=!1,I=null,T=null,t&&typeof t=="object"&&(t=a.createNode(t))),r.implicitKey=!1,!y&&!m&&hf.isScalar(t)&&(r.indentAtStart=b.length+1),S=!1,!d&&c.length>=2&&!r.inFlow&&!y&&hf.isSeq(t)&&!t.flow&&!t.tag&&!t.anchor&&(r.indent=r.indent.substring(2));let k=!1,F=Sbe.stringify(t,r,()=>k=!0,()=>S=!0),O=" ";if(m||E||I){if(O=E?` +`:"",I){let $=p(I);O+=` +${D2.indentComment($,r.indent)}`}F===""&&!r.inFlow?O===` +`&&T&&(O=` + +`):O+=` +${r.indent}`}else if(!y&&hf.isCollection(t)){let $=F[0],N=F.indexOf(` +`),U=N!==-1,ge=r.inFlow??t.flow??t.items.length===0;if(U||!ge){let Te=!1;if(U&&($==="&"||$==="!")){let ke=F.indexOf(" ");$==="&"&&ke!==-1&&ke{"use strict";var xbe=fl("process");function USt(e,...t){e==="debug"&&console.log(...t)}function zSt(e,t){(e==="debug"||e==="warn")&&(typeof xbe.emitWarning=="function"?xbe.emitWarning(t):console.warn(t))}yZ.debug=USt;yZ.warn=zSt});var vN=L(SN=>{"use strict";var A2=qn(),Ebe=Ji(),yN="<<",gN={identify:e=>e===yN||typeof e=="symbol"&&e.description===yN,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new Ebe.Scalar(Symbol(yN)),{addToJSMap:Tbe}),stringify:()=>yN},JSt=(e,t)=>(gN.identify(t)||A2.isScalar(t)&&(!t.type||t.type===Ebe.Scalar.PLAIN)&&gN.identify(t.value))&&e?.doc.schema.tags.some(r=>r.tag===gN.tag&&r.default);function Tbe(e,t,r){if(r=e&&A2.isAlias(r)?r.resolve(e.doc):r,A2.isSeq(r))for(let n of r.items)SZ(e,t,n);else if(Array.isArray(r))for(let n of r)SZ(e,t,n);else SZ(e,t,r)}function SZ(e,t,r){let n=e&&A2.isAlias(r)?r.resolve(e.doc):r;if(!A2.isMap(n))throw new Error("Merge sources must be maps or map aliases");let o=n.toJSON(null,e,Map);for(let[i,a]of o)t instanceof Map?t.has(i)||t.set(i,a):t instanceof Set?t.add(i):Object.prototype.hasOwnProperty.call(t,i)||Object.defineProperty(t,i,{value:a,writable:!0,enumerable:!0,configurable:!0});return t}SN.addMergeToJSMap=Tbe;SN.isMergeKey=JSt;SN.merge=gN});var bZ=L(Ibe=>{"use strict";var VSt=gZ(),Dbe=vN(),KSt=T2(),Abe=qn(),vZ=Oh();function GSt(e,t,{key:r,value:n}){if(Abe.isNode(r)&&r.addToJSMap)r.addToJSMap(e,t,n);else if(Dbe.isMergeKey(e,r))Dbe.addMergeToJSMap(e,t,n);else{let o=vZ.toJS(r,"",e);if(t instanceof Map)t.set(o,vZ.toJS(n,o,e));else if(t instanceof Set)t.add(o);else{let i=HSt(r,o,e),a=vZ.toJS(n,i,e);i in t?Object.defineProperty(t,i,{value:a,writable:!0,enumerable:!0,configurable:!0}):t[i]=a}}return t}function HSt(e,t,r){if(t===null)return"";if(typeof t!="object")return String(t);if(Abe.isNode(e)&&r?.doc){let n=KSt.createStringifyContext(r.doc,{});n.anchors=new Set;for(let i of r.anchors.keys())n.anchors.add(i.anchor);n.inFlow=!0,n.inStringifyKey=!0;let o=e.toString(n);if(!r.mapKeyWarned){let i=JSON.stringify(o);i.length>40&&(i=i.substring(0,36)+'..."'),VSt.warn(r.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${i}. Set mapAsMap: true to use object keys.`),r.mapKeyWarned=!0}return o}return JSON.stringify(t)}Ibe.addPairToJSMap=GSt});var Lh=L(xZ=>{"use strict";var wbe=S2(),ZSt=bbe(),WSt=bZ(),bN=qn();function QSt(e,t,r){let n=wbe.createNode(e,void 0,r),o=wbe.createNode(t,void 0,r);return new xN(n,o)}var xN=class e{constructor(t,r=null){Object.defineProperty(this,bN.NODE_TYPE,{value:bN.PAIR}),this.key=t,this.value=r}clone(t){let{key:r,value:n}=this;return bN.isNode(r)&&(r=r.clone(t)),bN.isNode(n)&&(n=n.clone(t)),new e(r,n)}toJSON(t,r){let n=r?.mapAsMap?new Map:{};return WSt.addPairToJSMap(r,n,this)}toString(t,r,n){return t?.doc?ZSt.stringifyPair(this,t,r,n):JSON.stringify(this)}};xZ.Pair=xN;xZ.createPair=QSt});var EZ=L(Cbe=>{"use strict";var fS=qn(),kbe=T2(),EN=v2();function XSt(e,t,r){return(t.inFlow??e.flow?e0t:YSt)(e,t,r)}function YSt({comment:e,items:t},r,{blockItemPrefix:n,flowChars:o,itemIndent:i,onChompKeep:a,onComment:s}){let{indent:c,options:{commentString:p}}=r,d=Object.assign({},r,{indent:i,type:null}),f=!1,m=[];for(let g=0;gb=null,()=>f=!0);b&&(E+=EN.lineComment(E,i,p(b))),f&&b&&(f=!1),m.push(n+E)}let y;if(m.length===0)y=o.start+o.end;else{y=m[0];for(let g=1;gb=null);gd||E.includes(` +`))&&(p=!0),f.push(E),d=f.length}let{start:m,end:y}=r;if(f.length===0)return m+y;if(!p){let g=f.reduce((S,b)=>S+b.length+2,2);p=t.options.lineWidth>0&&g>t.options.lineWidth}if(p){let g=m;for(let S of f)g+=S?` +${i}${o}${S}`:` +`;return`${g} +${o}${y}`}else return`${m}${a}${f.join(" ")}${a}${y}`}function TN({indent:e,options:{commentString:t}},r,n,o){if(n&&o&&(n=n.replace(/^\n+/,"")),n){let i=EN.indentComment(t(n),e);r.push(i.trimStart())}}Cbe.stringifyCollection=XSt});var Mh=L(DZ=>{"use strict";var t0t=EZ(),r0t=bZ(),n0t=pN(),$h=qn(),DN=Lh(),o0t=Ji();function I2(e,t){let r=$h.isScalar(t)?t.value:t;for(let n of e)if($h.isPair(n)&&(n.key===t||n.key===r||$h.isScalar(n.key)&&n.key.value===r))return n}var TZ=class extends n0t.Collection{static get tagName(){return"tag:yaml.org,2002:map"}constructor(t){super($h.MAP,t),this.items=[]}static from(t,r,n){let{keepUndefined:o,replacer:i}=n,a=new this(t),s=(c,p)=>{if(typeof i=="function")p=i.call(r,c,p);else if(Array.isArray(i)&&!i.includes(c))return;(p!==void 0||o)&&a.items.push(DN.createPair(c,p,n))};if(r instanceof Map)for(let[c,p]of r)s(c,p);else if(r&&typeof r=="object")for(let c of Object.keys(r))s(c,r[c]);return typeof t.sortMapEntries=="function"&&a.items.sort(t.sortMapEntries),a}add(t,r){let n;$h.isPair(t)?n=t:!t||typeof t!="object"||!("key"in t)?n=new DN.Pair(t,t?.value):n=new DN.Pair(t.key,t.value);let o=I2(this.items,n.key),i=this.schema?.sortMapEntries;if(o){if(!r)throw new Error(`Key ${n.key} already set`);$h.isScalar(o.value)&&o0t.isScalarValue(n.value)?o.value.value=n.value:o.value=n.value}else if(i){let a=this.items.findIndex(s=>i(n,s)<0);a===-1?this.items.push(n):this.items.splice(a,0,n)}else this.items.push(n)}delete(t){let r=I2(this.items,t);return r?this.items.splice(this.items.indexOf(r),1).length>0:!1}get(t,r){let o=I2(this.items,t)?.value;return(!r&&$h.isScalar(o)?o.value:o)??void 0}has(t){return!!I2(this.items,t)}set(t,r){this.add(new DN.Pair(t,r),!0)}toJSON(t,r,n){let o=n?new n:r?.mapAsMap?new Map:{};r?.onCreate&&r.onCreate(o);for(let i of this.items)r0t.addPairToJSMap(r,o,i);return o}toString(t,r,n){if(!t)return JSON.stringify(this);for(let o of this.items)if(!$h.isPair(o))throw new Error(`Map items must all be pairs; found ${JSON.stringify(o)} instead`);return!t.allNullValues&&this.hasAllNullValues(!1)&&(t=Object.assign({},t,{allNullValues:!0})),t0t.stringifyCollection(this,t,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:t.indent||"",onChompKeep:n,onComment:r})}};DZ.YAMLMap=TZ;DZ.findPair=I2});var W1=L(Obe=>{"use strict";var i0t=qn(),Pbe=Mh(),a0t={collection:"map",default:!0,nodeClass:Pbe.YAMLMap,tag:"tag:yaml.org,2002:map",resolve(e,t){return i0t.isMap(e)||t("Expected a mapping for this tag"),e},createNode:(e,t,r)=>Pbe.YAMLMap.from(e,t,r)};Obe.map=a0t});var jh=L(Nbe=>{"use strict";var s0t=S2(),c0t=EZ(),l0t=pN(),IN=qn(),u0t=Ji(),p0t=Oh(),AZ=class extends l0t.Collection{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(t){super(IN.SEQ,t),this.items=[]}add(t){this.items.push(t)}delete(t){let r=AN(t);return typeof r!="number"?!1:this.items.splice(r,1).length>0}get(t,r){let n=AN(t);if(typeof n!="number")return;let o=this.items[n];return!r&&IN.isScalar(o)?o.value:o}has(t){let r=AN(t);return typeof r=="number"&&r=0?t:null}Nbe.YAMLSeq=AZ});var Q1=L(Rbe=>{"use strict";var d0t=qn(),Fbe=jh(),_0t={collection:"seq",default:!0,nodeClass:Fbe.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve(e,t){return d0t.isSeq(e)||t("Expected a sequence for this tag"),e},createNode:(e,t,r)=>Fbe.YAMLSeq.from(e,t,r)};Rbe.seq=_0t});var w2=L(Lbe=>{"use strict";var f0t=E2(),m0t={identify:e=>typeof e=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify(e,t,r,n){return t=Object.assign({actualString:!0},t),f0t.stringifyString(e,t,r,n)}};Lbe.string=m0t});var wN=L(jbe=>{"use strict";var $be=Ji(),Mbe={identify:e=>e==null,createNode:()=>new $be.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new $be.Scalar(null),stringify:({source:e},t)=>typeof e=="string"&&Mbe.test.test(e)?e:t.options.nullStr};jbe.nullTag=Mbe});var IZ=L(qbe=>{"use strict";var h0t=Ji(),Bbe={identify:e=>typeof e=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:e=>new h0t.Scalar(e[0]==="t"||e[0]==="T"),stringify({source:e,value:t},r){if(e&&Bbe.test.test(e)){let n=e[0]==="t"||e[0]==="T";if(t===n)return e}return t?r.options.trueStr:r.options.falseStr}};qbe.boolTag=Bbe});var X1=L(Ube=>{"use strict";function y0t({format:e,minFractionDigits:t,tag:r,value:n}){if(typeof n=="bigint")return String(n);let o=typeof n=="number"?n:Number(n);if(!isFinite(o))return isNaN(o)?".nan":o<0?"-.inf":".inf";let i=Object.is(n,-0)?"-0":JSON.stringify(n);if(!e&&t&&(!r||r==="tag:yaml.org,2002:float")&&/^\d/.test(i)){let a=i.indexOf(".");a<0&&(a=i.length,i+=".");let s=t-(i.length-a-1);for(;s-- >0;)i+="0"}return i}Ube.stringifyNumber=y0t});var kZ=L(kN=>{"use strict";var g0t=Ji(),wZ=X1(),S0t={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>e.slice(-3).toLowerCase()==="nan"?NaN:e[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:wZ.stringifyNumber},v0t={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e),stringify(e){let t=Number(e.value);return isFinite(t)?t.toExponential():wZ.stringifyNumber(e)}},b0t={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(e){let t=new g0t.Scalar(parseFloat(e)),r=e.indexOf(".");return r!==-1&&e[e.length-1]==="0"&&(t.minFractionDigits=e.length-r-1),t},stringify:wZ.stringifyNumber};kN.float=b0t;kN.floatExp=v0t;kN.floatNaN=S0t});var PZ=L(PN=>{"use strict";var zbe=X1(),CN=e=>typeof e=="bigint"||Number.isInteger(e),CZ=(e,t,r,{intAsBigInt:n})=>n?BigInt(e):parseInt(e.substring(t),r);function Jbe(e,t,r){let{value:n}=e;return CN(n)&&n>=0?r+n.toString(t):zbe.stringifyNumber(e)}var x0t={identify:e=>CN(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(e,t,r)=>CZ(e,2,8,r),stringify:e=>Jbe(e,8,"0o")},E0t={identify:CN,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(e,t,r)=>CZ(e,0,10,r),stringify:zbe.stringifyNumber},T0t={identify:e=>CN(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(e,t,r)=>CZ(e,2,16,r),stringify:e=>Jbe(e,16,"0x")};PN.int=E0t;PN.intHex=T0t;PN.intOct=x0t});var Kbe=L(Vbe=>{"use strict";var D0t=W1(),A0t=wN(),I0t=Q1(),w0t=w2(),k0t=IZ(),OZ=kZ(),NZ=PZ(),C0t=[D0t.map,I0t.seq,w0t.string,A0t.nullTag,k0t.boolTag,NZ.intOct,NZ.int,NZ.intHex,OZ.floatNaN,OZ.floatExp,OZ.float];Vbe.schema=C0t});var Zbe=L(Hbe=>{"use strict";var P0t=Ji(),O0t=W1(),N0t=Q1();function Gbe(e){return typeof e=="bigint"||Number.isInteger(e)}var ON=({value:e})=>JSON.stringify(e),F0t=[{identify:e=>typeof e=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:ON},{identify:e=>e==null,createNode:()=>new P0t.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:ON},{identify:e=>typeof e=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:e=>e==="true",stringify:ON},{identify:Gbe,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(e,t,{intAsBigInt:r})=>r?BigInt(e):parseInt(e,10),stringify:({value:e})=>Gbe(e)?e.toString():JSON.stringify(e)},{identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:e=>parseFloat(e),stringify:ON}],R0t={default:!0,tag:"",test:/^/,resolve(e,t){return t(`Unresolved plain scalar ${JSON.stringify(e)}`),e}},L0t=[O0t.map,N0t.seq].concat(F0t,R0t);Hbe.schema=L0t});var RZ=L(Wbe=>{"use strict";var k2=fl("buffer"),FZ=Ji(),$0t=E2(),M0t={identify:e=>e instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(e,t){if(typeof k2.Buffer=="function")return k2.Buffer.from(e,"base64");if(typeof atob=="function"){let r=atob(e.replace(/[\n\r]/g,"")),n=new Uint8Array(r.length);for(let o=0;o{"use strict";var NN=qn(),LZ=Lh(),j0t=Ji(),B0t=jh();function Qbe(e,t){if(NN.isSeq(e))for(let r=0;r1&&t("Each pair must have its own sequence indicator");let o=n.items[0]||new LZ.Pair(new j0t.Scalar(null));if(n.commentBefore&&(o.key.commentBefore=o.key.commentBefore?`${n.commentBefore} +${o.key.commentBefore}`:n.commentBefore),n.comment){let i=o.value??o.key;i.comment=i.comment?`${n.comment} +${i.comment}`:n.comment}n=o}e.items[r]=NN.isPair(n)?n:new LZ.Pair(n)}}else t("Expected a sequence for this tag");return e}function Xbe(e,t,r){let{replacer:n}=r,o=new B0t.YAMLSeq(e);o.tag="tag:yaml.org,2002:pairs";let i=0;if(t&&Symbol.iterator in Object(t))for(let a of t){typeof n=="function"&&(a=n.call(t,String(i++),a));let s,c;if(Array.isArray(a))if(a.length===2)s=a[0],c=a[1];else throw new TypeError(`Expected [key, value] tuple: ${a}`);else if(a&&a instanceof Object){let p=Object.keys(a);if(p.length===1)s=p[0],c=a[s];else throw new TypeError(`Expected tuple with one key, not ${p.length} keys`)}else s=a;o.items.push(LZ.createPair(s,c,r))}return o}var q0t={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:Qbe,createNode:Xbe};FN.createPairs=Xbe;FN.pairs=q0t;FN.resolvePairs=Qbe});var jZ=L(MZ=>{"use strict";var Ybe=qn(),$Z=Oh(),C2=Mh(),U0t=jh(),exe=RN(),mS=class e extends U0t.YAMLSeq{constructor(){super(),this.add=C2.YAMLMap.prototype.add.bind(this),this.delete=C2.YAMLMap.prototype.delete.bind(this),this.get=C2.YAMLMap.prototype.get.bind(this),this.has=C2.YAMLMap.prototype.has.bind(this),this.set=C2.YAMLMap.prototype.set.bind(this),this.tag=e.tag}toJSON(t,r){if(!r)return super.toJSON(t);let n=new Map;r?.onCreate&&r.onCreate(n);for(let o of this.items){let i,a;if(Ybe.isPair(o)?(i=$Z.toJS(o.key,"",r),a=$Z.toJS(o.value,i,r)):i=$Z.toJS(o,"",r),n.has(i))throw new Error("Ordered maps must not include duplicate keys");n.set(i,a)}return n}static from(t,r,n){let o=exe.createPairs(t,r,n),i=new this;return i.items=o.items,i}};mS.tag="tag:yaml.org,2002:omap";var z0t={collection:"seq",identify:e=>e instanceof Map,nodeClass:mS,default:!1,tag:"tag:yaml.org,2002:omap",resolve(e,t){let r=exe.resolvePairs(e,t),n=[];for(let{key:o}of r.items)Ybe.isScalar(o)&&(n.includes(o.value)?t(`Ordered maps must not include duplicate keys: ${o.value}`):n.push(o.value));return Object.assign(new mS,r)},createNode:(e,t,r)=>mS.from(e,t,r)};MZ.YAMLOMap=mS;MZ.omap=z0t});var ixe=L(BZ=>{"use strict";var txe=Ji();function rxe({value:e,source:t},r){return t&&(e?nxe:oxe).test.test(t)?t:e?r.options.trueStr:r.options.falseStr}var nxe={identify:e=>e===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new txe.Scalar(!0),stringify:rxe},oxe={identify:e=>e===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new txe.Scalar(!1),stringify:rxe};BZ.falseTag=oxe;BZ.trueTag=nxe});var axe=L(LN=>{"use strict";var J0t=Ji(),qZ=X1(),V0t={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>e.slice(-3).toLowerCase()==="nan"?NaN:e[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:qZ.stringifyNumber},K0t={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e.replace(/_/g,"")),stringify(e){let t=Number(e.value);return isFinite(t)?t.toExponential():qZ.stringifyNumber(e)}},G0t={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(e){let t=new J0t.Scalar(parseFloat(e.replace(/_/g,""))),r=e.indexOf(".");if(r!==-1){let n=e.substring(r+1).replace(/_/g,"");n[n.length-1]==="0"&&(t.minFractionDigits=n.length)}return t},stringify:qZ.stringifyNumber};LN.float=G0t;LN.floatExp=K0t;LN.floatNaN=V0t});var cxe=L(O2=>{"use strict";var sxe=X1(),P2=e=>typeof e=="bigint"||Number.isInteger(e);function $N(e,t,r,{intAsBigInt:n}){let o=e[0];if((o==="-"||o==="+")&&(t+=1),e=e.substring(t).replace(/_/g,""),n){switch(r){case 2:e=`0b${e}`;break;case 8:e=`0o${e}`;break;case 16:e=`0x${e}`;break}let a=BigInt(e);return o==="-"?BigInt(-1)*a:a}let i=parseInt(e,r);return o==="-"?-1*i:i}function UZ(e,t,r){let{value:n}=e;if(P2(n)){let o=n.toString(t);return n<0?"-"+r+o.substr(1):r+o}return sxe.stringifyNumber(e)}var H0t={identify:P2,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(e,t,r)=>$N(e,2,2,r),stringify:e=>UZ(e,2,"0b")},Z0t={identify:P2,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(e,t,r)=>$N(e,1,8,r),stringify:e=>UZ(e,8,"0")},W0t={identify:P2,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(e,t,r)=>$N(e,0,10,r),stringify:sxe.stringifyNumber},Q0t={identify:P2,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(e,t,r)=>$N(e,2,16,r),stringify:e=>UZ(e,16,"0x")};O2.int=W0t;O2.intBin=H0t;O2.intHex=Q0t;O2.intOct=Z0t});var JZ=L(zZ=>{"use strict";var BN=qn(),MN=Lh(),jN=Mh(),hS=class e extends jN.YAMLMap{constructor(t){super(t),this.tag=e.tag}add(t){let r;BN.isPair(t)?r=t:t&&typeof t=="object"&&"key"in t&&"value"in t&&t.value===null?r=new MN.Pair(t.key,null):r=new MN.Pair(t,null),jN.findPair(this.items,r.key)||this.items.push(r)}get(t,r){let n=jN.findPair(this.items,t);return!r&&BN.isPair(n)?BN.isScalar(n.key)?n.key.value:n.key:n}set(t,r){if(typeof r!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof r}`);let n=jN.findPair(this.items,t);n&&!r?this.items.splice(this.items.indexOf(n),1):!n&&r&&this.items.push(new MN.Pair(t))}toJSON(t,r){return super.toJSON(t,r,Set)}toString(t,r,n){if(!t)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},t,{allNullValues:!0}),r,n);throw new Error("Set items must all have null values")}static from(t,r,n){let{replacer:o}=n,i=new this(t);if(r&&Symbol.iterator in Object(r))for(let a of r)typeof o=="function"&&(a=o.call(r,a,a)),i.items.push(MN.createPair(a,null,n));return i}};hS.tag="tag:yaml.org,2002:set";var X0t={collection:"map",identify:e=>e instanceof Set,nodeClass:hS,default:!1,tag:"tag:yaml.org,2002:set",createNode:(e,t,r)=>hS.from(e,t,r),resolve(e,t){if(BN.isMap(e)){if(e.hasAllNullValues(!0))return Object.assign(new hS,e);t("Set items must all have null values")}else t("Expected a mapping for this tag");return e}};zZ.YAMLSet=hS;zZ.set=X0t});var KZ=L(qN=>{"use strict";var Y0t=X1();function VZ(e,t){let r=e[0],n=r==="-"||r==="+"?e.substring(1):e,o=a=>t?BigInt(a):Number(a),i=n.replace(/_/g,"").split(":").reduce((a,s)=>a*o(60)+o(s),o(0));return r==="-"?o(-1)*i:i}function lxe(e){let{value:t}=e,r=a=>a;if(typeof t=="bigint")r=a=>BigInt(a);else if(isNaN(t)||!isFinite(t))return Y0t.stringifyNumber(e);let n="";t<0&&(n="-",t*=r(-1));let o=r(60),i=[t%o];return t<60?i.unshift(0):(t=(t-i[0])/o,i.unshift(t%o),t>=60&&(t=(t-i[0])/o,i.unshift(t))),n+i.map(a=>String(a).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}var evt={identify:e=>typeof e=="bigint"||Number.isInteger(e),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(e,t,{intAsBigInt:r})=>VZ(e,r),stringify:lxe},tvt={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:e=>VZ(e,!1),stringify:lxe},uxe={identify:e=>e instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(e){let t=e.match(uxe.test);if(!t)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");let[,r,n,o,i,a,s]=t.map(Number),c=t[7]?Number((t[7]+"00").substr(1,3)):0,p=Date.UTC(r,n-1,o,i||0,a||0,s||0,c),d=t[8];if(d&&d!=="Z"){let f=VZ(d,!1);Math.abs(f)<30&&(f*=60),p-=6e4*f}return new Date(p)},stringify:({value:e})=>e?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""};qN.floatTime=tvt;qN.intTime=evt;qN.timestamp=uxe});var _xe=L(dxe=>{"use strict";var rvt=W1(),nvt=wN(),ovt=Q1(),ivt=w2(),avt=RZ(),pxe=ixe(),GZ=axe(),UN=cxe(),svt=vN(),cvt=jZ(),lvt=RN(),uvt=JZ(),HZ=KZ(),pvt=[rvt.map,ovt.seq,ivt.string,nvt.nullTag,pxe.trueTag,pxe.falseTag,UN.intBin,UN.intOct,UN.int,UN.intHex,GZ.floatNaN,GZ.floatExp,GZ.float,avt.binary,svt.merge,cvt.omap,lvt.pairs,uvt.set,HZ.intTime,HZ.floatTime,HZ.timestamp];dxe.schema=pvt});var Exe=L(QZ=>{"use strict";var yxe=W1(),dvt=wN(),gxe=Q1(),_vt=w2(),fvt=IZ(),ZZ=kZ(),WZ=PZ(),mvt=Kbe(),hvt=Zbe(),Sxe=RZ(),N2=vN(),vxe=jZ(),bxe=RN(),fxe=_xe(),xxe=JZ(),zN=KZ(),mxe=new Map([["core",mvt.schema],["failsafe",[yxe.map,gxe.seq,_vt.string]],["json",hvt.schema],["yaml11",fxe.schema],["yaml-1.1",fxe.schema]]),hxe={binary:Sxe.binary,bool:fvt.boolTag,float:ZZ.float,floatExp:ZZ.floatExp,floatNaN:ZZ.floatNaN,floatTime:zN.floatTime,int:WZ.int,intHex:WZ.intHex,intOct:WZ.intOct,intTime:zN.intTime,map:yxe.map,merge:N2.merge,null:dvt.nullTag,omap:vxe.omap,pairs:bxe.pairs,seq:gxe.seq,set:xxe.set,timestamp:zN.timestamp},yvt={"tag:yaml.org,2002:binary":Sxe.binary,"tag:yaml.org,2002:merge":N2.merge,"tag:yaml.org,2002:omap":vxe.omap,"tag:yaml.org,2002:pairs":bxe.pairs,"tag:yaml.org,2002:set":xxe.set,"tag:yaml.org,2002:timestamp":zN.timestamp};function gvt(e,t,r){let n=mxe.get(t);if(n&&!e)return r&&!n.includes(N2.merge)?n.concat(N2.merge):n.slice();let o=n;if(!o)if(Array.isArray(e))o=[];else{let i=Array.from(mxe.keys()).filter(a=>a!=="yaml11").map(a=>JSON.stringify(a)).join(", ");throw new Error(`Unknown schema "${t}"; use one of ${i} or define customTags array`)}if(Array.isArray(e))for(let i of e)o=o.concat(i);else typeof e=="function"&&(o=e(o.slice()));return r&&(o=o.concat(N2.merge)),o.reduce((i,a)=>{let s=typeof a=="string"?hxe[a]:a;if(!s){let c=JSON.stringify(a),p=Object.keys(hxe).map(d=>JSON.stringify(d)).join(", ");throw new Error(`Unknown custom tag ${c}; use one of ${p}`)}return i.includes(s)||i.push(s),i},[])}QZ.coreKnownTags=yvt;QZ.getTags=gvt});var eW=L(Txe=>{"use strict";var XZ=qn(),Svt=W1(),vvt=Q1(),bvt=w2(),JN=Exe(),xvt=(e,t)=>e.keyt.key?1:0,YZ=class e{constructor({compat:t,customTags:r,merge:n,resolveKnownTags:o,schema:i,sortMapEntries:a,toStringDefaults:s}){this.compat=Array.isArray(t)?JN.getTags(t,"compat"):t?JN.getTags(null,t):null,this.name=typeof i=="string"&&i||"core",this.knownTags=o?JN.coreKnownTags:{},this.tags=JN.getTags(r,this.name,n),this.toStringOptions=s??null,Object.defineProperty(this,XZ.MAP,{value:Svt.map}),Object.defineProperty(this,XZ.SCALAR,{value:bvt.string}),Object.defineProperty(this,XZ.SEQ,{value:vvt.seq}),this.sortMapEntries=typeof a=="function"?a:a===!0?xvt:null}clone(){let t=Object.create(e.prototype,Object.getOwnPropertyDescriptors(this));return t.tags=this.tags.slice(),t}};Txe.Schema=YZ});var Axe=L(Dxe=>{"use strict";var Evt=qn(),tW=T2(),F2=v2();function Tvt(e,t){let r=[],n=t.directives===!0;if(t.directives!==!1&&e.directives){let c=e.directives.toString(e);c?(r.push(c),n=!0):e.directives.docStart&&(n=!0)}n&&r.push("---");let o=tW.createStringifyContext(e,t),{commentString:i}=o.options;if(e.commentBefore){r.length!==1&&r.unshift("");let c=i(e.commentBefore);r.unshift(F2.indentComment(c,""))}let a=!1,s=null;if(e.contents){if(Evt.isNode(e.contents)){if(e.contents.spaceBefore&&n&&r.push(""),e.contents.commentBefore){let d=i(e.contents.commentBefore);r.push(F2.indentComment(d,""))}o.forceBlockIndent=!!e.comment,s=e.contents.comment}let c=s?void 0:()=>a=!0,p=tW.stringify(e.contents,o,()=>s=null,c);s&&(p+=F2.lineComment(p,"",i(s))),(p[0]==="|"||p[0]===">")&&r[r.length-1]==="---"?r[r.length-1]=`--- ${p}`:r.push(p)}else r.push(tW.stringify(e.contents,o));if(e.directives?.docEnd)if(e.comment){let c=i(e.comment);c.includes(` +`)?(r.push("..."),r.push(F2.indentComment(c,""))):r.push(`... ${c}`)}else r.push("...");else{let c=e.comment;c&&a&&(c=c.replace(/^\n+/,"")),c&&((!a||s)&&r[r.length-1]!==""&&r.push(""),r.push(F2.indentComment(i(c),"")))}return r.join(` +`)+` +`}Dxe.stringifyDocument=Tvt});var R2=L(Ixe=>{"use strict";var Dvt=g2(),Y1=pN(),Ql=qn(),Avt=Lh(),Ivt=Oh(),wvt=eW(),kvt=Axe(),rW=sN(),Cvt=aZ(),Pvt=S2(),nW=iZ(),oW=class e{constructor(t,r,n){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,Ql.NODE_TYPE,{value:Ql.DOC});let o=null;typeof r=="function"||Array.isArray(r)?o=r:n===void 0&&r&&(n=r,r=void 0);let i=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},n);this.options=i;let{version:a}=i;n?._directives?(this.directives=n._directives.atDocument(),this.directives.yaml.explicit&&(a=this.directives.yaml.version)):this.directives=new nW.Directives({version:a}),this.setSchema(a,n),this.contents=t===void 0?null:this.createNode(t,o,n)}clone(){let t=Object.create(e.prototype,{[Ql.NODE_TYPE]:{value:Ql.DOC}});return t.commentBefore=this.commentBefore,t.comment=this.comment,t.errors=this.errors.slice(),t.warnings=this.warnings.slice(),t.options=Object.assign({},this.options),this.directives&&(t.directives=this.directives.clone()),t.schema=this.schema.clone(),t.contents=Ql.isNode(this.contents)?this.contents.clone(t.schema):this.contents,this.range&&(t.range=this.range.slice()),t}add(t){eb(this.contents)&&this.contents.add(t)}addIn(t,r){eb(this.contents)&&this.contents.addIn(t,r)}createAlias(t,r){if(!t.anchor){let n=rW.anchorNames(this);t.anchor=!r||n.has(r)?rW.findNewAnchor(r||"a",n):r}return new Dvt.Alias(t.anchor)}createNode(t,r,n){let o;if(typeof r=="function")t=r.call({"":t},"",t),o=r;else if(Array.isArray(r)){let b=I=>typeof I=="number"||I instanceof String||I instanceof Number,E=r.filter(b).map(String);E.length>0&&(r=r.concat(E)),o=r}else n===void 0&&r&&(n=r,r=void 0);let{aliasDuplicateObjects:i,anchorPrefix:a,flow:s,keepUndefined:c,onTagObj:p,tag:d}=n??{},{onAnchor:f,setAnchors:m,sourceObjects:y}=rW.createNodeAnchors(this,a||"a"),g={aliasDuplicateObjects:i??!0,keepUndefined:c??!1,onAnchor:f,onTagObj:p,replacer:o,schema:this.schema,sourceObjects:y},S=Pvt.createNode(t,d,g);return s&&Ql.isCollection(S)&&(S.flow=!0),m(),S}createPair(t,r,n={}){let o=this.createNode(t,null,n),i=this.createNode(r,null,n);return new Avt.Pair(o,i)}delete(t){return eb(this.contents)?this.contents.delete(t):!1}deleteIn(t){return Y1.isEmptyPath(t)?this.contents==null?!1:(this.contents=null,!0):eb(this.contents)?this.contents.deleteIn(t):!1}get(t,r){return Ql.isCollection(this.contents)?this.contents.get(t,r):void 0}getIn(t,r){return Y1.isEmptyPath(t)?!r&&Ql.isScalar(this.contents)?this.contents.value:this.contents:Ql.isCollection(this.contents)?this.contents.getIn(t,r):void 0}has(t){return Ql.isCollection(this.contents)?this.contents.has(t):!1}hasIn(t){return Y1.isEmptyPath(t)?this.contents!==void 0:Ql.isCollection(this.contents)?this.contents.hasIn(t):!1}set(t,r){this.contents==null?this.contents=Y1.collectionFromPath(this.schema,[t],r):eb(this.contents)&&this.contents.set(t,r)}setIn(t,r){Y1.isEmptyPath(t)?this.contents=r:this.contents==null?this.contents=Y1.collectionFromPath(this.schema,Array.from(t),r):eb(this.contents)&&this.contents.setIn(t,r)}setSchema(t,r={}){typeof t=="number"&&(t=String(t));let n;switch(t){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new nW.Directives({version:"1.1"}),n={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=t:this.directives=new nW.Directives({version:t}),n={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,n=null;break;default:{let o=JSON.stringify(t);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${o}`)}}if(r.schema instanceof Object)this.schema=r.schema;else if(n)this.schema=new wvt.Schema(Object.assign(n,r));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:t,jsonArg:r,mapAsMap:n,maxAliasCount:o,onAnchor:i,reviver:a}={}){let s={anchors:new Map,doc:this,keep:!t,mapAsMap:n===!0,mapKeyWarned:!1,maxAliasCount:typeof o=="number"?o:100},c=Ivt.toJS(this.contents,r??"",s);if(typeof i=="function")for(let{count:p,res:d}of s.anchors.values())i(d,p);return typeof a=="function"?Cvt.applyReviver(a,{"":c},"",c):c}toJSON(t,r){return this.toJS({json:!0,jsonArg:t,mapAsMap:!1,onAnchor:r})}toString(t={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in t&&(!Number.isInteger(t.indent)||Number(t.indent)<=0)){let r=JSON.stringify(t.indent);throw new Error(`"indent" option must be a positive integer, not ${r}`)}return kvt.stringifyDocument(this,t)}};function eb(e){if(Ql.isCollection(e))return!0;throw new Error("Expected a YAML collection as document contents")}Ixe.Document=oW});var M2=L($2=>{"use strict";var L2=class extends Error{constructor(t,r,n,o){super(),this.name=t,this.code=n,this.message=o,this.pos=r}},iW=class extends L2{constructor(t,r,n){super("YAMLParseError",t,r,n)}},aW=class extends L2{constructor(t,r,n){super("YAMLWarning",t,r,n)}},Ovt=(e,t)=>r=>{if(r.pos[0]===-1)return;r.linePos=r.pos.map(s=>t.linePos(s));let{line:n,col:o}=r.linePos[0];r.message+=` at line ${n}, column ${o}`;let i=o-1,a=e.substring(t.lineStarts[n-1],t.lineStarts[n]).replace(/[\n\r]+$/,"");if(i>=60&&a.length>80){let s=Math.min(i-39,a.length-79);a="\u2026"+a.substring(s),i-=s-1}if(a.length>80&&(a=a.substring(0,79)+"\u2026"),n>1&&/^ *$/.test(a.substring(0,i))){let s=e.substring(t.lineStarts[n-2],t.lineStarts[n-1]);s.length>80&&(s=s.substring(0,79)+`\u2026 +`),a=s+a}if(/[^ ]/.test(a)){let s=1,c=r.linePos[1];c?.line===n&&c.col>o&&(s=Math.max(1,Math.min(c.col-o,80-i)));let p=" ".repeat(i)+"^".repeat(s);r.message+=`: + +${a} +${p} +`}};$2.YAMLError=L2;$2.YAMLParseError=iW;$2.YAMLWarning=aW;$2.prettifyError=Ovt});var j2=L(wxe=>{"use strict";function Nvt(e,{flow:t,indicator:r,next:n,offset:o,onError:i,parentIndent:a,startOnNewline:s}){let c=!1,p=s,d=s,f="",m="",y=!1,g=!1,S=null,b=null,E=null,I=null,T=null,k=null,F=null;for(let N of e)switch(g&&(N.type!=="space"&&N.type!=="newline"&&N.type!=="comma"&&i(N.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),g=!1),S&&(p&&N.type!=="comment"&&N.type!=="newline"&&i(S,"TAB_AS_INDENT","Tabs are not allowed as indentation"),S=null),N.type){case"space":!t&&(r!=="doc-start"||n?.type!=="flow-collection")&&N.source.includes(" ")&&(S=N),d=!0;break;case"comment":{d||i(N,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let U=N.source.substring(1)||" ";f?f+=m+U:f=U,m="",p=!1;break}case"newline":p?f?f+=N.source:(!k||r!=="seq-item-ind")&&(c=!0):m+=N.source,p=!0,y=!0,(b||E)&&(I=N),d=!0;break;case"anchor":b&&i(N,"MULTIPLE_ANCHORS","A node can have at most one anchor"),N.source.endsWith(":")&&i(N.offset+N.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),b=N,F??(F=N.offset),p=!1,d=!1,g=!0;break;case"tag":{E&&i(N,"MULTIPLE_TAGS","A node can have at most one tag"),E=N,F??(F=N.offset),p=!1,d=!1,g=!0;break}case r:(b||E)&&i(N,"BAD_PROP_ORDER",`Anchors and tags must be after the ${N.source} indicator`),k&&i(N,"UNEXPECTED_TOKEN",`Unexpected ${N.source} in ${t??"collection"}`),k=N,p=r==="seq-item-ind"||r==="explicit-key-ind",d=!1;break;case"comma":if(t){T&&i(N,"UNEXPECTED_TOKEN",`Unexpected , in ${t}`),T=N,p=!1,d=!1;break}default:i(N,"UNEXPECTED_TOKEN",`Unexpected ${N.type} token`),p=!1,d=!1}let O=e[e.length-1],$=O?O.offset+O.source.length:o;return g&&n&&n.type!=="space"&&n.type!=="newline"&&n.type!=="comma"&&(n.type!=="scalar"||n.source!=="")&&i(n.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),S&&(p&&S.indent<=a||n?.type==="block-map"||n?.type==="block-seq")&&i(S,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:T,found:k,spaceBefore:c,comment:f,hasNewline:y,anchor:b,tag:E,newlineAfterProp:I,end:$,start:F??$}}wxe.resolveProps=Nvt});var VN=L(kxe=>{"use strict";function sW(e){if(!e)return null;switch(e.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(e.source.includes(` +`))return!0;if(e.end){for(let t of e.end)if(t.type==="newline")return!0}return!1;case"flow-collection":for(let t of e.items){for(let r of t.start)if(r.type==="newline")return!0;if(t.sep){for(let r of t.sep)if(r.type==="newline")return!0}if(sW(t.key)||sW(t.value))return!0}return!1;default:return!0}}kxe.containsNewline=sW});var cW=L(Cxe=>{"use strict";var Fvt=VN();function Rvt(e,t,r){if(t?.type==="flow-collection"){let n=t.end[0];n.indent===e&&(n.source==="]"||n.source==="}")&&Fvt.containsNewline(t)&&r(n,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}Cxe.flowIndentCheck=Rvt});var lW=L(Oxe=>{"use strict";var Pxe=qn();function Lvt(e,t,r){let{uniqueKeys:n}=e.options;if(n===!1)return!1;let o=typeof n=="function"?n:(i,a)=>i===a||Pxe.isScalar(i)&&Pxe.isScalar(a)&&i.value===a.value;return t.some(i=>o(i.key,r))}Oxe.mapIncludes=Lvt});var Mxe=L($xe=>{"use strict";var Nxe=Lh(),$vt=Mh(),Fxe=j2(),Mvt=VN(),Rxe=cW(),jvt=lW(),Lxe="All mapping items must start at the same column";function Bvt({composeNode:e,composeEmptyNode:t},r,n,o,i){let a=i?.nodeClass??$vt.YAMLMap,s=new a(r.schema);r.atRoot&&(r.atRoot=!1);let c=n.offset,p=null;for(let d of n.items){let{start:f,key:m,sep:y,value:g}=d,S=Fxe.resolveProps(f,{indicator:"explicit-key-ind",next:m??y?.[0],offset:c,onError:o,parentIndent:n.indent,startOnNewline:!0}),b=!S.found;if(b){if(m&&(m.type==="block-seq"?o(c,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in m&&m.indent!==n.indent&&o(c,"BAD_INDENT",Lxe)),!S.anchor&&!S.tag&&!y){p=S.end,S.comment&&(s.comment?s.comment+=` +`+S.comment:s.comment=S.comment);continue}(S.newlineAfterProp||Mvt.containsNewline(m))&&o(m??f[f.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else S.found?.indent!==n.indent&&o(c,"BAD_INDENT",Lxe);r.atKey=!0;let E=S.end,I=m?e(r,m,S,o):t(r,E,f,null,S,o);r.schema.compat&&Rxe.flowIndentCheck(n.indent,m,o),r.atKey=!1,jvt.mapIncludes(r,s.items,I)&&o(E,"DUPLICATE_KEY","Map keys must be unique");let T=Fxe.resolveProps(y??[],{indicator:"map-value-ind",next:g,offset:I.range[2],onError:o,parentIndent:n.indent,startOnNewline:!m||m.type==="block-scalar"});if(c=T.end,T.found){b&&(g?.type==="block-map"&&!T.hasNewline&&o(c,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),r.options.strict&&S.start{"use strict";var qvt=jh(),Uvt=j2(),zvt=cW();function Jvt({composeNode:e,composeEmptyNode:t},r,n,o,i){let a=i?.nodeClass??qvt.YAMLSeq,s=new a(r.schema);r.atRoot&&(r.atRoot=!1),r.atKey&&(r.atKey=!1);let c=n.offset,p=null;for(let{start:d,value:f}of n.items){let m=Uvt.resolveProps(d,{indicator:"seq-item-ind",next:f,offset:c,onError:o,parentIndent:n.indent,startOnNewline:!0});if(!m.found)if(m.anchor||m.tag||f)f?.type==="block-seq"?o(m.end,"BAD_INDENT","All sequence items must start at the same column"):o(c,"MISSING_CHAR","Sequence item without - indicator");else{p=m.end,m.comment&&(s.comment=m.comment);continue}let y=f?e(r,f,m,o):t(r,m.end,d,null,m,o);r.schema.compat&&zvt.flowIndentCheck(n.indent,f,o),c=y.range[2],s.items.push(y)}return s.range=[n.offset,c,p??c],s}jxe.resolveBlockSeq=Jvt});var tb=L(qxe=>{"use strict";function Vvt(e,t,r,n){let o="";if(e){let i=!1,a="";for(let s of e){let{source:c,type:p}=s;switch(p){case"space":i=!0;break;case"comment":{r&&!i&&n(s,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let d=c.substring(1)||" ";o?o+=a+d:o=d,a="";break}case"newline":o&&(a+=c),i=!0;break;default:n(s,"UNEXPECTED_TOKEN",`Unexpected ${p} at node end`)}t+=c.length}}return{comment:o,offset:t}}qxe.resolveEnd=Vvt});var Vxe=L(Jxe=>{"use strict";var Kvt=qn(),Gvt=Lh(),Uxe=Mh(),Hvt=jh(),Zvt=tb(),zxe=j2(),Wvt=VN(),Qvt=lW(),uW="Block collections are not allowed within flow collections",pW=e=>e&&(e.type==="block-map"||e.type==="block-seq");function Xvt({composeNode:e,composeEmptyNode:t},r,n,o,i){let a=n.start.source==="{",s=a?"flow map":"flow sequence",c=i?.nodeClass??(a?Uxe.YAMLMap:Hvt.YAMLSeq),p=new c(r.schema);p.flow=!0;let d=r.atRoot;d&&(r.atRoot=!1),r.atKey&&(r.atKey=!1);let f=n.offset+n.start.source.length;for(let b=0;b0){let b=Zvt.resolveEnd(g,S,r.options.strict,o);b.comment&&(p.comment?p.comment+=` +`+b.comment:p.comment=b.comment),p.range=[n.offset,S,b.offset]}else p.range=[n.offset,S,S];return p}Jxe.resolveFlowCollection=Xvt});var Gxe=L(Kxe=>{"use strict";var Yvt=qn(),e1t=Ji(),t1t=Mh(),r1t=jh(),n1t=Mxe(),o1t=Bxe(),i1t=Vxe();function dW(e,t,r,n,o,i){let a=r.type==="block-map"?n1t.resolveBlockMap(e,t,r,n,i):r.type==="block-seq"?o1t.resolveBlockSeq(e,t,r,n,i):i1t.resolveFlowCollection(e,t,r,n,i),s=a.constructor;return o==="!"||o===s.tagName?(a.tag=s.tagName,a):(o&&(a.tag=o),a)}function a1t(e,t,r,n,o){let i=n.tag,a=i?t.directives.tagName(i.source,m=>o(i,"TAG_RESOLVE_FAILED",m)):null;if(r.type==="block-seq"){let{anchor:m,newlineAfterProp:y}=n,g=m&&i?m.offset>i.offset?m:i:m??i;g&&(!y||y.offsetm.tag===a&&m.collection===s);if(!c){let m=t.schema.knownTags[a];if(m?.collection===s)t.schema.tags.push(Object.assign({},m,{default:!1})),c=m;else return m?o(i,"BAD_COLLECTION_TYPE",`${m.tag} used for ${s} collection, but expects ${m.collection??"scalar"}`,!0):o(i,"TAG_RESOLVE_FAILED",`Unresolved tag: ${a}`,!0),dW(e,t,r,o,a)}let p=dW(e,t,r,o,a,c),d=c.resolve?.(p,m=>o(i,"TAG_RESOLVE_FAILED",m),t.options)??p,f=Yvt.isNode(d)?d:new e1t.Scalar(d);return f.range=p.range,f.tag=a,c?.format&&(f.format=c.format),f}Kxe.composeCollection=a1t});var fW=L(Hxe=>{"use strict";var _W=Ji();function s1t(e,t,r){let n=t.offset,o=c1t(t,e.options.strict,r);if(!o)return{value:"",type:null,comment:"",range:[n,n,n]};let i=o.mode===">"?_W.Scalar.BLOCK_FOLDED:_W.Scalar.BLOCK_LITERAL,a=t.source?l1t(t.source):[],s=a.length;for(let S=a.length-1;S>=0;--S){let b=a[S][1];if(b===""||b==="\r")s=S;else break}if(s===0){let S=o.chomp==="+"&&a.length>0?` +`.repeat(Math.max(1,a.length-1)):"",b=n+o.length;return t.source&&(b+=t.source.length),{value:S,type:i,comment:o.comment,range:[n,b,b]}}let c=t.indent+o.indent,p=t.offset+o.length,d=0;for(let S=0;Sc&&(c=b.length);else{b.length=s;--S)a[S][0].length>c&&(s=S+1);let f="",m="",y=!1;for(let S=0;Sc||E[0]===" "?(m===" "?m=` +`:!y&&m===` +`&&(m=` + +`),f+=m+b.slice(c)+E,m=` +`,y=!0):E===""?m===` +`?f+=` +`:m=` +`:(f+=m+E,m=" ",y=!1)}switch(o.chomp){case"-":break;case"+":for(let S=s;S{"use strict";var mW=Ji(),u1t=tb();function p1t(e,t,r){let{offset:n,type:o,source:i,end:a}=e,s,c,p=(m,y,g)=>r(n+m,y,g);switch(o){case"scalar":s=mW.Scalar.PLAIN,c=d1t(i,p);break;case"single-quoted-scalar":s=mW.Scalar.QUOTE_SINGLE,c=_1t(i,p);break;case"double-quoted-scalar":s=mW.Scalar.QUOTE_DOUBLE,c=f1t(i,p);break;default:return r(e,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${o}`),{value:"",type:null,comment:"",range:[n,n+i.length,n+i.length]}}let d=n+i.length,f=u1t.resolveEnd(a,d,t,r);return{value:c,type:s,comment:f.comment,range:[n,d,f.offset]}}function d1t(e,t){let r="";switch(e[0]){case" ":r="a tab character";break;case",":r="flow indicator character ,";break;case"%":r="directive indicator character %";break;case"|":case">":{r=`block scalar indicator ${e[0]}`;break}case"@":case"`":{r=`reserved character ${e[0]}`;break}}return r&&t(0,"BAD_SCALAR_START",`Plain value cannot start with ${r}`),Zxe(e)}function _1t(e,t){return(e[e.length-1]!=="'"||e.length===1)&&t(e.length,"MISSING_CHAR","Missing closing 'quote"),Zxe(e.slice(1,-1)).replace(/''/g,"'")}function Zxe(e){let t,r;try{t=new RegExp(`(.*?)(?i?e.slice(i,n+1):o)}else r+=o}return(e[e.length-1]!=='"'||e.length===1)&&t(e.length,"MISSING_CHAR",'Missing closing "quote'),r}function m1t(e,t){let r="",n=e[t+1];for(;(n===" "||n===" "||n===` +`||n==="\r")&&!(n==="\r"&&e[t+2]!==` +`);)n===` +`&&(r+=` +`),t+=1,n=e[t+1];return r||(r=" "),{fold:r,offset:t}}var h1t={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:` +`,r:"\r",t:" ",v:"\v",N:"\x85",_:"\xA0",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function y1t(e,t,r,n){let o=e.substr(t,r),a=o.length===r&&/^[0-9a-fA-F]+$/.test(o)?parseInt(o,16):NaN;if(isNaN(a)){let s=e.substr(t-2,r+2);return n(t-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${s}`),s}return String.fromCodePoint(a)}Wxe.resolveFlowScalar=p1t});var Yxe=L(Xxe=>{"use strict";var yS=qn(),Qxe=Ji(),g1t=fW(),S1t=hW();function v1t(e,t,r,n){let{value:o,type:i,comment:a,range:s}=t.type==="block-scalar"?g1t.resolveBlockScalar(e,t,n):S1t.resolveFlowScalar(t,e.options.strict,n),c=r?e.directives.tagName(r.source,f=>n(r,"TAG_RESOLVE_FAILED",f)):null,p;e.options.stringKeys&&e.atKey?p=e.schema[yS.SCALAR]:c?p=b1t(e.schema,o,c,r,n):t.type==="scalar"?p=x1t(e,o,t,n):p=e.schema[yS.SCALAR];let d;try{let f=p.resolve(o,m=>n(r??t,"TAG_RESOLVE_FAILED",m),e.options);d=yS.isScalar(f)?f:new Qxe.Scalar(f)}catch(f){let m=f instanceof Error?f.message:String(f);n(r??t,"TAG_RESOLVE_FAILED",m),d=new Qxe.Scalar(o)}return d.range=s,d.source=o,i&&(d.type=i),c&&(d.tag=c),p.format&&(d.format=p.format),a&&(d.comment=a),d}function b1t(e,t,r,n,o){if(r==="!")return e[yS.SCALAR];let i=[];for(let s of e.tags)if(!s.collection&&s.tag===r)if(s.default&&s.test)i.push(s);else return s;for(let s of i)if(s.test?.test(t))return s;let a=e.knownTags[r];return a&&!a.collection?(e.tags.push(Object.assign({},a,{default:!1,test:void 0})),a):(o(n,"TAG_RESOLVE_FAILED",`Unresolved tag: ${r}`,r!=="tag:yaml.org,2002:str"),e[yS.SCALAR])}function x1t({atKey:e,directives:t,schema:r},n,o,i){let a=r.tags.find(s=>(s.default===!0||e&&s.default==="key")&&s.test?.test(n))||r[yS.SCALAR];if(r.compat){let s=r.compat.find(c=>c.default&&c.test?.test(n))??r[yS.SCALAR];if(a.tag!==s.tag){let c=t.tagString(a.tag),p=t.tagString(s.tag),d=`Value may be parsed as either ${c} or ${p}`;i(o,"TAG_RESOLVE_FAILED",d,!0)}}return a}Xxe.composeScalar=v1t});var tEe=L(eEe=>{"use strict";function E1t(e,t,r){if(t){r??(r=t.length);for(let n=r-1;n>=0;--n){let o=t[n];switch(o.type){case"space":case"comment":case"newline":e-=o.source.length;continue}for(o=t[++n];o?.type==="space";)e+=o.source.length,o=t[++n];break}}return e}eEe.emptyScalarPosition=E1t});var oEe=L(gW=>{"use strict";var T1t=g2(),D1t=qn(),A1t=Gxe(),rEe=Yxe(),I1t=tb(),w1t=tEe(),k1t={composeNode:nEe,composeEmptyNode:yW};function nEe(e,t,r,n){let o=e.atKey,{spaceBefore:i,comment:a,anchor:s,tag:c}=r,p,d=!0;switch(t.type){case"alias":p=C1t(e,t,n),(s||c)&&n(t,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":p=rEe.composeScalar(e,t,c,n),s&&(p.anchor=s.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":p=A1t.composeCollection(k1t,e,t,r,n),s&&(p.anchor=s.source.substring(1));break;default:{let f=t.type==="error"?t.message:`Unsupported token (type: ${t.type})`;n(t,"UNEXPECTED_TOKEN",f),p=yW(e,t.offset,void 0,null,r,n),d=!1}}return s&&p.anchor===""&&n(s,"BAD_ALIAS","Anchor cannot be an empty string"),o&&e.options.stringKeys&&(!D1t.isScalar(p)||typeof p.value!="string"||p.tag&&p.tag!=="tag:yaml.org,2002:str")&&n(c??t,"NON_STRING_KEY","With stringKeys, all keys must be strings"),i&&(p.spaceBefore=!0),a&&(t.type==="scalar"&&t.source===""?p.comment=a:p.commentBefore=a),e.options.keepSourceTokens&&d&&(p.srcToken=t),p}function yW(e,t,r,n,{spaceBefore:o,comment:i,anchor:a,tag:s,end:c},p){let d={type:"scalar",offset:w1t.emptyScalarPosition(t,r,n),indent:-1,source:""},f=rEe.composeScalar(e,d,s,p);return a&&(f.anchor=a.source.substring(1),f.anchor===""&&p(a,"BAD_ALIAS","Anchor cannot be an empty string")),o&&(f.spaceBefore=!0),i&&(f.comment=i,f.range[2]=c),f}function C1t({options:e},{offset:t,source:r,end:n},o){let i=new T1t.Alias(r.substring(1));i.source===""&&o(t,"BAD_ALIAS","Alias cannot be an empty string"),i.source.endsWith(":")&&o(t+r.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);let a=t+r.length,s=I1t.resolveEnd(n,a,e.strict,o);return i.range=[t,a,s.offset],s.comment&&(i.comment=s.comment),i}gW.composeEmptyNode=yW;gW.composeNode=nEe});var sEe=L(aEe=>{"use strict";var P1t=R2(),iEe=oEe(),O1t=tb(),N1t=j2();function F1t(e,t,{offset:r,start:n,value:o,end:i},a){let s=Object.assign({_directives:t},e),c=new P1t.Document(void 0,s),p={atKey:!1,atRoot:!0,directives:c.directives,options:c.options,schema:c.schema},d=N1t.resolveProps(n,{indicator:"doc-start",next:o??i?.[0],offset:r,onError:a,parentIndent:0,startOnNewline:!0});d.found&&(c.directives.docStart=!0,o&&(o.type==="block-map"||o.type==="block-seq")&&!d.hasNewline&&a(d.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),c.contents=o?iEe.composeNode(p,o,d,a):iEe.composeEmptyNode(p,d.end,n,null,d,a);let f=c.contents.range[2],m=O1t.resolveEnd(i,f,!1,a);return m.comment&&(c.comment=m.comment),c.range=[r,f,m.offset],c}aEe.composeDoc=F1t});var vW=L(uEe=>{"use strict";var R1t=fl("process"),L1t=iZ(),$1t=R2(),B2=M2(),cEe=qn(),M1t=sEe(),j1t=tb();function q2(e){if(typeof e=="number")return[e,e+1];if(Array.isArray(e))return e.length===2?e:[e[0],e[1]];let{offset:t,source:r}=e;return[t,t+(typeof r=="string"?r.length:1)]}function lEe(e){let t="",r=!1,n=!1;for(let o=0;o{let a=q2(r);i?this.warnings.push(new B2.YAMLWarning(a,n,o)):this.errors.push(new B2.YAMLParseError(a,n,o))},this.directives=new L1t.Directives({version:t.version||"1.2"}),this.options=t}decorate(t,r){let{comment:n,afterEmptyLine:o}=lEe(this.prelude);if(n){let i=t.contents;if(r)t.comment=t.comment?`${t.comment} +${n}`:n;else if(o||t.directives.docStart||!i)t.commentBefore=n;else if(cEe.isCollection(i)&&!i.flow&&i.items.length>0){let a=i.items[0];cEe.isPair(a)&&(a=a.key);let s=a.commentBefore;a.commentBefore=s?`${n} +${s}`:n}else{let a=i.commentBefore;i.commentBefore=a?`${n} +${a}`:n}}r?(Array.prototype.push.apply(t.errors,this.errors),Array.prototype.push.apply(t.warnings,this.warnings)):(t.errors=this.errors,t.warnings=this.warnings),this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:lEe(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(t,r=!1,n=-1){for(let o of t)yield*this.next(o);yield*this.end(r,n)}*next(t){switch(R1t.env.LOG_STREAM&&console.dir(t,{depth:null}),t.type){case"directive":this.directives.add(t.source,(r,n,o)=>{let i=q2(t);i[0]+=r,this.onError(i,"BAD_DIRECTIVE",n,o)}),this.prelude.push(t.source),this.atDirectives=!0;break;case"document":{let r=M1t.composeDoc(this.options,this.directives,t,this.onError);this.atDirectives&&!r.directives.docStart&&this.onError(t,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(r,!1),this.doc&&(yield this.doc),this.doc=r,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(t.source);break;case"error":{let r=t.source?`${t.message}: ${JSON.stringify(t.source)}`:t.message,n=new B2.YAMLParseError(q2(t),"UNEXPECTED_TOKEN",r);this.atDirectives||!this.doc?this.errors.push(n):this.doc.errors.push(n);break}case"doc-end":{if(!this.doc){let n="Unexpected doc-end without preceding document";this.errors.push(new B2.YAMLParseError(q2(t),"UNEXPECTED_TOKEN",n));break}this.doc.directives.docEnd=!0;let r=j1t.resolveEnd(t.end,t.offset+t.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),r.comment){let n=this.doc.comment;this.doc.comment=n?`${n} +${r.comment}`:r.comment}this.doc.range[2]=r.offset;break}default:this.errors.push(new B2.YAMLParseError(q2(t),"UNEXPECTED_TOKEN",`Unsupported token ${t.type}`))}}*end(t=!1,r=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(t){let n=Object.assign({_directives:this.directives},this.options),o=new $1t.Document(void 0,n);this.atDirectives&&this.onError(r,"MISSING_CHAR","Missing directives-end indicator line"),o.range=[0,r,r],this.decorate(o,!1),yield o}}};uEe.Composer=SW});var _Ee=L(KN=>{"use strict";var B1t=fW(),q1t=hW(),U1t=M2(),pEe=E2();function z1t(e,t=!0,r){if(e){let n=(o,i,a)=>{let s=typeof o=="number"?o:Array.isArray(o)?o[0]:o.offset;if(r)r(s,i,a);else throw new U1t.YAMLParseError([s,s+1],i,a)};switch(e.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return q1t.resolveFlowScalar(e,t,n);case"block-scalar":return B1t.resolveBlockScalar({options:{strict:t}},e,n)}}return null}function J1t(e,t){let{implicitKey:r=!1,indent:n,inFlow:o=!1,offset:i=-1,type:a="PLAIN"}=t,s=pEe.stringifyString({type:a,value:e},{implicitKey:r,indent:n>0?" ".repeat(n):"",inFlow:o,options:{blockQuote:!0,lineWidth:-1}}),c=t.end??[{type:"newline",offset:-1,indent:n,source:` +`}];switch(s[0]){case"|":case">":{let p=s.indexOf(` +`),d=s.substring(0,p),f=s.substring(p+1)+` +`,m=[{type:"block-scalar-header",offset:i,indent:n,source:d}];return dEe(m,c)||m.push({type:"newline",offset:-1,indent:n,source:` +`}),{type:"block-scalar",offset:i,indent:n,props:m,source:f}}case'"':return{type:"double-quoted-scalar",offset:i,indent:n,source:s,end:c};case"'":return{type:"single-quoted-scalar",offset:i,indent:n,source:s,end:c};default:return{type:"scalar",offset:i,indent:n,source:s,end:c}}}function V1t(e,t,r={}){let{afterKey:n=!1,implicitKey:o=!1,inFlow:i=!1,type:a}=r,s="indent"in e?e.indent:null;if(n&&typeof s=="number"&&(s+=2),!a)switch(e.type){case"single-quoted-scalar":a="QUOTE_SINGLE";break;case"double-quoted-scalar":a="QUOTE_DOUBLE";break;case"block-scalar":{let p=e.props[0];if(p.type!=="block-scalar-header")throw new Error("Invalid block scalar header");a=p.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:a="PLAIN"}let c=pEe.stringifyString({type:a,value:t},{implicitKey:o||s===null,indent:s!==null&&s>0?" ".repeat(s):"",inFlow:i,options:{blockQuote:!0,lineWidth:-1}});switch(c[0]){case"|":case">":K1t(e,c);break;case'"':bW(e,c,"double-quoted-scalar");break;case"'":bW(e,c,"single-quoted-scalar");break;default:bW(e,c,"scalar")}}function K1t(e,t){let r=t.indexOf(` +`),n=t.substring(0,r),o=t.substring(r+1)+` +`;if(e.type==="block-scalar"){let i=e.props[0];if(i.type!=="block-scalar-header")throw new Error("Invalid block scalar header");i.source=n,e.source=o}else{let{offset:i}=e,a="indent"in e?e.indent:-1,s=[{type:"block-scalar-header",offset:i,indent:a,source:n}];dEe(s,"end"in e?e.end:void 0)||s.push({type:"newline",offset:-1,indent:a,source:` +`});for(let c of Object.keys(e))c!=="type"&&c!=="offset"&&delete e[c];Object.assign(e,{type:"block-scalar",indent:a,props:s,source:o})}}function dEe(e,t){if(t)for(let r of t)switch(r.type){case"space":case"comment":e.push(r);break;case"newline":return e.push(r),!0}return!1}function bW(e,t,r){switch(e.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":e.type=r,e.source=t;break;case"block-scalar":{let n=e.props.slice(1),o=t.length;e.props[0].type==="block-scalar-header"&&(o-=e.props[0].source.length);for(let i of n)i.offset+=o;delete e.props,Object.assign(e,{type:r,source:t,end:n});break}case"block-map":case"block-seq":{let o={type:"newline",offset:e.offset+t.length,indent:e.indent,source:` +`};delete e.items,Object.assign(e,{type:r,source:t,end:[o]});break}default:{let n="indent"in e?e.indent:-1,o="end"in e&&Array.isArray(e.end)?e.end.filter(i=>i.type==="space"||i.type==="comment"||i.type==="newline"):[];for(let i of Object.keys(e))i!=="type"&&i!=="offset"&&delete e[i];Object.assign(e,{type:r,indent:n,source:t,end:o})}}}KN.createScalarToken=J1t;KN.resolveAsScalar=z1t;KN.setScalarValue=V1t});var mEe=L(fEe=>{"use strict";var G1t=e=>"type"in e?HN(e):GN(e);function HN(e){switch(e.type){case"block-scalar":{let t="";for(let r of e.props)t+=HN(r);return t+e.source}case"block-map":case"block-seq":{let t="";for(let r of e.items)t+=GN(r);return t}case"flow-collection":{let t=e.start.source;for(let r of e.items)t+=GN(r);for(let r of e.end)t+=r.source;return t}case"document":{let t=GN(e);if(e.end)for(let r of e.end)t+=r.source;return t}default:{let t=e.source;if("end"in e&&e.end)for(let r of e.end)t+=r.source;return t}}}function GN({start:e,key:t,sep:r,value:n}){let o="";for(let i of e)o+=i.source;if(t&&(o+=HN(t)),r)for(let i of r)o+=i.source;return n&&(o+=HN(n)),o}fEe.stringify=G1t});var SEe=L(gEe=>{"use strict";var xW=Symbol("break visit"),H1t=Symbol("skip children"),hEe=Symbol("remove item");function gS(e,t){"type"in e&&e.type==="document"&&(e={start:e.start,value:e.value}),yEe(Object.freeze([]),e,t)}gS.BREAK=xW;gS.SKIP=H1t;gS.REMOVE=hEe;gS.itemAtPath=(e,t)=>{let r=e;for(let[n,o]of t){let i=r?.[n];if(i&&"items"in i)r=i.items[o];else return}return r};gS.parentCollection=(e,t)=>{let r=gS.itemAtPath(e,t.slice(0,-1)),n=t[t.length-1][0],o=r?.[n];if(o&&"items"in o)return o;throw new Error("Parent collection not found")};function yEe(e,t,r){let n=r(t,e);if(typeof n=="symbol")return n;for(let o of["key","value"]){let i=t[o];if(i&&"items"in i){for(let a=0;a{"use strict";var EW=_Ee(),Z1t=mEe(),W1t=SEe(),TW="\uFEFF",DW="",AW="",IW="",Q1t=e=>!!e&&"items"in e,X1t=e=>!!e&&(e.type==="scalar"||e.type==="single-quoted-scalar"||e.type==="double-quoted-scalar"||e.type==="block-scalar");function Y1t(e){switch(e){case TW:return"";case DW:return"";case AW:return"";case IW:return"";default:return JSON.stringify(e)}}function ebt(e){switch(e){case TW:return"byte-order-mark";case DW:return"doc-mode";case AW:return"flow-error-end";case IW:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case` +`:case`\r +`:return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(e[0]){case" ":case" ":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}mc.createScalarToken=EW.createScalarToken;mc.resolveAsScalar=EW.resolveAsScalar;mc.setScalarValue=EW.setScalarValue;mc.stringify=Z1t.stringify;mc.visit=W1t.visit;mc.BOM=TW;mc.DOCUMENT=DW;mc.FLOW_END=AW;mc.SCALAR=IW;mc.isCollection=Q1t;mc.isScalar=X1t;mc.prettyToken=Y1t;mc.tokenType=ebt});var CW=L(bEe=>{"use strict";var U2=ZN();function tp(e){switch(e){case void 0:case" ":case` +`:case"\r":case" ":return!0;default:return!1}}var vEe=new Set("0123456789ABCDEFabcdef"),tbt=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),WN=new Set(",[]{}"),rbt=new Set(` ,[]{} +\r `),wW=e=>!e||rbt.has(e),kW=class{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(t,r=!1){if(t){if(typeof t!="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+t:t,this.lineEndPos=null}this.atEnd=!r;let n=this.next??"stream";for(;n&&(r||this.hasChars(1));)n=yield*this.parseNext(n)}atLineEnd(){let t=this.pos,r=this.buffer[t];for(;r===" "||r===" ";)r=this.buffer[++t];return!r||r==="#"||r===` +`?!0:r==="\r"?this.buffer[t+1]===` +`:!1}charAt(t){return this.buffer[this.pos+t]}continueScalar(t){let r=this.buffer[t];if(this.indentNext>0){let n=0;for(;r===" ";)r=this.buffer[++n+t];if(r==="\r"){let o=this.buffer[n+t+1];if(o===` +`||!o&&!this.atEnd)return t+n+1}return r===` +`||n>=this.indentNext||!r&&!this.atEnd?t+n:-1}if(r==="-"||r==="."){let n=this.buffer.substr(t,3);if((n==="---"||n==="...")&&tp(this.buffer[t+3]))return-1}return t}getLine(){let t=this.lineEndPos;return(typeof t!="number"||t!==-1&&tthis.indentValue&&!tp(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){let[t,r]=this.peek(2);if(!r&&!this.atEnd)return this.setNext("block-start");if((t==="-"||t==="?"||t===":")&&tp(r)){let n=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=n,yield*this.parseBlockStart()}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);let t=this.getLine();if(t===null)return this.setNext("doc");let r=yield*this.pushIndicators();switch(t[r]){case"#":yield*this.pushCount(t.length-r);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(wW),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return r+=yield*this.parseBlockScalarHeader(),r+=yield*this.pushSpaces(!0),yield*this.pushCount(t.length-r),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let t,r,n=-1;do t=yield*this.pushNewline(),t>0?(r=yield*this.pushSpaces(!1),this.indentValue=n=r):r=0,r+=yield*this.pushSpaces(!0);while(t+r>0);let o=this.getLine();if(o===null)return this.setNext("flow");if((n!==-1&&n"0"&&r<="9")this.blockScalarIndent=Number(r)-1;else if(r!=="-")break}return yield*this.pushUntil(r=>tp(r)||r==="#")}*parseBlockScalar(){let t=this.pos-1,r=0,n;e:for(let i=this.pos;n=this.buffer[i];++i)switch(n){case" ":r+=1;break;case` +`:t=i,r=0;break;case"\r":{let a=this.buffer[i+1];if(!a&&!this.atEnd)return this.setNext("block-scalar");if(a===` +`)break}default:break e}if(!n&&!this.atEnd)return this.setNext("block-scalar");if(r>=this.indentNext){this.blockScalarIndent===-1?this.indentNext=r:this.indentNext=this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{let i=this.continueScalar(t+1);if(i===-1)break;t=this.buffer.indexOf(` +`,i)}while(t!==-1);if(t===-1){if(!this.atEnd)return this.setNext("block-scalar");t=this.buffer.length}}let o=t+1;for(n=this.buffer[o];n===" ";)n=this.buffer[++o];if(n===" "){for(;n===" "||n===" "||n==="\r"||n===` +`;)n=this.buffer[++o];t=o-1}else if(!this.blockScalarKeep)do{let i=t-1,a=this.buffer[i];a==="\r"&&(a=this.buffer[--i]);let s=i;for(;a===" ";)a=this.buffer[--i];if(a===` +`&&i>=this.pos&&i+1+r>s)t=i;else break}while(!0);return yield U2.SCALAR,yield*this.pushToIndex(t+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let t=this.flowLevel>0,r=this.pos-1,n=this.pos-1,o;for(;o=this.buffer[++n];)if(o===":"){let i=this.buffer[n+1];if(tp(i)||t&&WN.has(i))break;r=n}else if(tp(o)){let i=this.buffer[n+1];if(o==="\r"&&(i===` +`?(n+=1,o=` +`,i=this.buffer[n+1]):r=n),i==="#"||t&&WN.has(i))break;if(o===` +`){let a=this.continueScalar(n+1);if(a===-1)break;n=Math.max(n,a-2)}}else{if(t&&WN.has(o))break;r=n}return!o&&!this.atEnd?this.setNext("plain-scalar"):(yield U2.SCALAR,yield*this.pushToIndex(r+1,!0),t?"flow":"doc")}*pushCount(t){return t>0?(yield this.buffer.substr(this.pos,t),this.pos+=t,t):0}*pushToIndex(t,r){let n=this.buffer.slice(this.pos,t);return n?(yield n,this.pos+=n.length,n.length):(r&&(yield""),0)}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(wW))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{let t=this.flowLevel>0,r=this.charAt(1);if(tp(r)||t&&WN.has(r))return t?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,(yield*this.pushCount(1))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators())}}return 0}*pushTag(){if(this.charAt(1)==="<"){let t=this.pos+2,r=this.buffer[t];for(;!tp(r)&&r!==">";)r=this.buffer[++t];return yield*this.pushToIndex(r===">"?t+1:t,!1)}else{let t=this.pos+1,r=this.buffer[t];for(;r;)if(tbt.has(r))r=this.buffer[++t];else if(r==="%"&&vEe.has(this.buffer[t+1])&&vEe.has(this.buffer[t+2]))r=this.buffer[t+=3];else break;return yield*this.pushToIndex(t,!1)}}*pushNewline(){let t=this.buffer[this.pos];return t===` +`?yield*this.pushCount(1):t==="\r"&&this.charAt(1)===` +`?yield*this.pushCount(2):0}*pushSpaces(t){let r=this.pos-1,n;do n=this.buffer[++r];while(n===" "||t&&n===" ");let o=r-this.pos;return o>0&&(yield this.buffer.substr(this.pos,o),this.pos=r),o}*pushUntil(t){let r=this.pos,n=this.buffer[r];for(;!t(n);)n=this.buffer[++r];return yield*this.pushToIndex(r,!1)}};bEe.Lexer=kW});var OW=L(xEe=>{"use strict";var PW=class{constructor(){this.lineStarts=[],this.addNewLine=t=>this.lineStarts.push(t),this.linePos=t=>{let r=0,n=this.lineStarts.length;for(;r>1;this.lineStarts[i]{"use strict";var nbt=fl("process"),EEe=ZN(),obt=CW();function Bh(e,t){for(let r=0;r=0;)switch(e[t].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;e[++t]?.type==="space";);return e.splice(t,e.length)}function DEe(e){if(e.start.type==="flow-seq-start")for(let t of e.items)t.sep&&!t.value&&!Bh(t.start,"explicit-key-ind")&&!Bh(t.sep,"map-value-ind")&&(t.key&&(t.value=t.key),delete t.key,AEe(t.value)?t.value.end?Array.prototype.push.apply(t.value.end,t.sep):t.value.end=t.sep:Array.prototype.push.apply(t.start,t.sep),delete t.sep)}var NW=class{constructor(t){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new obt.Lexer,this.onNewLine=t}*parse(t,r=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(let n of this.lexer.lex(t,r))yield*this.next(n);r||(yield*this.end())}*next(t){if(this.source=t,nbt.env.LOG_TOKENS&&console.log("|",EEe.prettyToken(t)),this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=t.length;return}let r=EEe.tokenType(t);if(r)if(r==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=r,yield*this.step(),r){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+t.length);break;case"space":this.atNewLine&&t[0]===" "&&(this.indent+=t.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=t.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=t.length}else{let n=`Not a YAML token: ${t}`;yield*this.pop({type:"error",offset:this.offset,message:n,source:t}),this.offset+=t.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){let t=this.peek(1);if(this.type==="doc-end"&&t?.type!=="doc-end"){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!t)return yield*this.stream();switch(t.type){case"document":return yield*this.document(t);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(t);case"block-scalar":return yield*this.blockScalar(t);case"block-map":return yield*this.blockMap(t);case"block-seq":return yield*this.blockSequence(t);case"flow-collection":return yield*this.flowCollection(t);case"doc-end":return yield*this.documentEnd(t)}yield*this.pop()}peek(t){return this.stack[this.stack.length-t]}*pop(t){let r=t??this.stack.pop();if(!r)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield r;else{let n=this.peek(1);switch(r.type==="block-scalar"?r.indent="indent"in n?n.indent:0:r.type==="flow-collection"&&n.type==="document"&&(r.indent=0),r.type==="flow-collection"&&DEe(r),n.type){case"document":n.value=r;break;case"block-scalar":n.props.push(r);break;case"block-map":{let o=n.items[n.items.length-1];if(o.value){n.items.push({start:[],key:r,sep:[]}),this.onKeyLine=!0;return}else if(o.sep)o.value=r;else{Object.assign(o,{key:r,sep:[]}),this.onKeyLine=!o.explicitKey;return}break}case"block-seq":{let o=n.items[n.items.length-1];o.value?n.items.push({start:[],value:r}):o.value=r;break}case"flow-collection":{let o=n.items[n.items.length-1];!o||o.value?n.items.push({start:[],key:r,sep:[]}):o.sep?o.value=r:Object.assign(o,{key:r,sep:[]});return}default:yield*this.pop(),yield*this.pop(r)}if((n.type==="document"||n.type==="block-map"||n.type==="block-seq")&&(r.type==="block-map"||r.type==="block-seq")){let o=r.items[r.items.length-1];o&&!o.sep&&!o.value&&o.start.length>0&&TEe(o.start)===-1&&(r.indent===0||o.start.every(i=>i.type!=="comment"||i.indent=t.indent){let n=!this.onKeyLine&&this.indent===t.indent,o=n&&(r.sep||r.explicitKey)&&this.type!=="seq-item-ind",i=[];if(o&&r.sep&&!r.value){let a=[];for(let s=0;st.indent&&(a.length=0);break;default:a.length=0}}a.length>=2&&(i=r.sep.splice(a[1]))}switch(this.type){case"anchor":case"tag":o||r.value?(i.push(this.sourceToken),t.items.push({start:i}),this.onKeyLine=!0):r.sep?r.sep.push(this.sourceToken):r.start.push(this.sourceToken);return;case"explicit-key-ind":!r.sep&&!r.explicitKey?(r.start.push(this.sourceToken),r.explicitKey=!0):o||r.value?(i.push(this.sourceToken),t.items.push({start:i,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case"map-value-ind":if(r.explicitKey)if(r.sep)if(r.value)t.items.push({start:[],key:null,sep:[this.sourceToken]});else if(Bh(r.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:i,key:null,sep:[this.sourceToken]}]});else if(AEe(r.key)&&!Bh(r.sep,"newline")){let a=rb(r.start),s=r.key,c=r.sep;c.push(this.sourceToken),delete r.key,delete r.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:a,key:s,sep:c}]})}else i.length>0?r.sep=r.sep.concat(i,this.sourceToken):r.sep.push(this.sourceToken);else if(Bh(r.start,"newline"))Object.assign(r,{key:null,sep:[this.sourceToken]});else{let a=rb(r.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:a,key:null,sep:[this.sourceToken]}]})}else r.sep?r.value||o?t.items.push({start:i,key:null,sep:[this.sourceToken]}):Bh(r.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):r.sep.push(this.sourceToken):Object.assign(r,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let a=this.flowScalar(this.type);o||r.value?(t.items.push({start:i,key:a,sep:[]}),this.onKeyLine=!0):r.sep?this.stack.push(a):(Object.assign(r,{key:a,sep:[]}),this.onKeyLine=!0);return}default:{let a=this.startBlockValue(t);if(a){if(a.type==="block-seq"){if(!r.explicitKey&&r.sep&&!Bh(r.sep,"newline")){yield*this.pop({type:"error",offset:this.offset,message:"Unexpected block-seq-ind on same line with key",source:this.source});return}}else n&&t.items.push({start:i});this.stack.push(a);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(t){let r=t.items[t.items.length-1];switch(this.type){case"newline":if(r.value){let n="end"in r.value?r.value.end:void 0;(Array.isArray(n)?n[n.length-1]:void 0)?.type==="comment"?n?.push(this.sourceToken):t.items.push({start:[this.sourceToken]})}else r.start.push(this.sourceToken);return;case"space":case"comment":if(r.value)t.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(r.start,t.indent)){let o=t.items[t.items.length-2]?.value?.end;if(Array.isArray(o)){Array.prototype.push.apply(o,r.start),o.push(this.sourceToken),t.items.pop();return}}r.start.push(this.sourceToken)}return;case"anchor":case"tag":if(r.value||this.indent<=t.indent)break;r.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==t.indent)break;r.value||Bh(r.start,"seq-item-ind")?t.items.push({start:[this.sourceToken]}):r.start.push(this.sourceToken);return}if(this.indent>t.indent){let n=this.startBlockValue(t);if(n){this.stack.push(n);return}}yield*this.pop(),yield*this.step()}*flowCollection(t){let r=t.items[t.items.length-1];if(this.type==="flow-error-end"){let n;do yield*this.pop(),n=this.peek(1);while(n?.type==="flow-collection")}else if(t.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!r||r.sep?t.items.push({start:[this.sourceToken]}):r.start.push(this.sourceToken);return;case"map-value-ind":!r||r.value?t.items.push({start:[],key:null,sep:[this.sourceToken]}):r.sep?r.sep.push(this.sourceToken):Object.assign(r,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!r||r.value?t.items.push({start:[this.sourceToken]}):r.sep?r.sep.push(this.sourceToken):r.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let o=this.flowScalar(this.type);!r||r.value?t.items.push({start:[],key:o,sep:[]}):r.sep?this.stack.push(o):Object.assign(r,{key:o,sep:[]});return}case"flow-map-end":case"flow-seq-end":t.end.push(this.sourceToken);return}let n=this.startBlockValue(t);n?this.stack.push(n):(yield*this.pop(),yield*this.step())}else{let n=this.peek(2);if(n.type==="block-map"&&(this.type==="map-value-ind"&&n.indent===t.indent||this.type==="newline"&&!n.items[n.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&n.type!=="flow-collection"){let o=QN(n),i=rb(o);DEe(t);let a=t.end.splice(1,t.end.length);a.push(this.sourceToken);let s={type:"block-map",offset:t.offset,indent:t.indent,items:[{start:i,key:t,sep:a}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=s}else yield*this.lineEnd(t)}}flowScalar(t){if(this.onNewLine){let r=this.source.indexOf(` +`)+1;for(;r!==0;)this.onNewLine(this.offset+r),r=this.source.indexOf(` +`,r)+1}return{type:t,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(t){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;let r=QN(t),n=rb(r);return n.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:n,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;let r=QN(t),n=rb(r);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:n,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(t,r){return this.type!=="comment"||this.indent<=r?!1:t.every(n=>n.type==="newline"||n.type==="space")}*documentEnd(t){this.type!=="doc-mode"&&(t.end?t.end.push(this.sourceToken):t.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(t){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;default:t.end?t.end.push(this.sourceToken):t.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}};IEe.Parser=NW});var OEe=L(J2=>{"use strict";var wEe=vW(),ibt=R2(),z2=M2(),abt=gZ(),sbt=qn(),cbt=OW(),kEe=FW();function CEe(e){let t=e.prettyErrors!==!1;return{lineCounter:e.lineCounter||t&&new cbt.LineCounter||null,prettyErrors:t}}function lbt(e,t={}){let{lineCounter:r,prettyErrors:n}=CEe(t),o=new kEe.Parser(r?.addNewLine),i=new wEe.Composer(t),a=Array.from(i.compose(o.parse(e)));if(n&&r)for(let s of a)s.errors.forEach(z2.prettifyError(e,r)),s.warnings.forEach(z2.prettifyError(e,r));return a.length>0?a:Object.assign([],{empty:!0},i.streamInfo())}function PEe(e,t={}){let{lineCounter:r,prettyErrors:n}=CEe(t),o=new kEe.Parser(r?.addNewLine),i=new wEe.Composer(t),a=null;for(let s of i.compose(o.parse(e),!0,e.length))if(!a)a=s;else if(a.options.logLevel!=="silent"){a.errors.push(new z2.YAMLParseError(s.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return n&&r&&(a.errors.forEach(z2.prettifyError(e,r)),a.warnings.forEach(z2.prettifyError(e,r))),a}function ubt(e,t,r){let n;typeof t=="function"?n=t:r===void 0&&t&&typeof t=="object"&&(r=t);let o=PEe(e,r);if(!o)return null;if(o.warnings.forEach(i=>abt.warn(o.options.logLevel,i)),o.errors.length>0){if(o.options.logLevel!=="silent")throw o.errors[0];o.errors=[]}return o.toJS(Object.assign({reviver:n},r))}function pbt(e,t,r){let n=null;if(typeof t=="function"||Array.isArray(t)?n=t:r===void 0&&t&&(r=t),typeof r=="string"&&(r=r.length),typeof r=="number"){let o=Math.round(r);r=o<1?void 0:o>8?{indent:8}:{indent:o}}if(e===void 0){let{keepUndefined:o}=r??t??{};if(!o)return}return sbt.isDocument(e)&&!n?e.toString(r):new ibt.Document(e,n,r).toString(r)}J2.parse=ubt;J2.parseAllDocuments=lbt;J2.parseDocument=PEe;J2.stringify=pbt});var FEe=L(so=>{"use strict";var dbt=vW(),_bt=R2(),fbt=eW(),RW=M2(),mbt=g2(),qh=qn(),hbt=Lh(),ybt=Ji(),gbt=Mh(),Sbt=jh(),vbt=ZN(),bbt=CW(),xbt=OW(),Ebt=FW(),XN=OEe(),NEe=f2();so.Composer=dbt.Composer;so.Document=_bt.Document;so.Schema=fbt.Schema;so.YAMLError=RW.YAMLError;so.YAMLParseError=RW.YAMLParseError;so.YAMLWarning=RW.YAMLWarning;so.Alias=mbt.Alias;so.isAlias=qh.isAlias;so.isCollection=qh.isCollection;so.isDocument=qh.isDocument;so.isMap=qh.isMap;so.isNode=qh.isNode;so.isPair=qh.isPair;so.isScalar=qh.isScalar;so.isSeq=qh.isSeq;so.Pair=hbt.Pair;so.Scalar=ybt.Scalar;so.YAMLMap=gbt.YAMLMap;so.YAMLSeq=Sbt.YAMLSeq;so.CST=vbt;so.Lexer=bbt.Lexer;so.LineCounter=xbt.LineCounter;so.Parser=Ebt.Parser;so.parse=XN.parse;so.parseAllDocuments=XN.parseAllDocuments;so.parseDocument=XN.parseDocument;so.stringify=XN.stringify;so.visit=NEe.visit;so.visitAsync=NEe.visitAsync});import*as Mr from"effect/Schema";var dwe=Mr.Struct({inputTypePreview:Mr.optional(Mr.String),outputTypePreview:Mr.optional(Mr.String),inputSchema:Mr.optional(Mr.Unknown),outputSchema:Mr.optional(Mr.Unknown),exampleInput:Mr.optional(Mr.Unknown),exampleOutput:Mr.optional(Mr.Unknown)}),Wd={"~standard":{version:1,vendor:"@executor/codemode-core",validate:e=>({value:e})}},cC=Mr.Struct({path:Mr.String,sourceKey:Mr.String,description:Mr.optional(Mr.String),interaction:Mr.optional(Mr.Union(Mr.Literal("auto"),Mr.Literal("required"))),elicitation:Mr.optional(Mr.Unknown),contract:Mr.optional(dwe),providerKind:Mr.optional(Mr.String),providerData:Mr.optional(Mr.Unknown)}),qX=Mr.Struct({namespace:Mr.String,displayName:Mr.optional(Mr.String),toolCount:Mr.optional(Mr.Number)});var Pte=n0(Cte(),1);var MOe=new Pte.default({allErrors:!0,strict:!1,validateSchema:!1,allowUnionTypes:!0}),jOe=e=>{let t=e.replaceAll("~1","/").replaceAll("~0","~");return/^\d+$/.test(t)?Number(t):t},BOe=e=>{if(!(!e||e.length===0||e==="/"))return e.split("/").slice(1).filter(t=>t.length>0).map(jOe)},qOe=e=>{let t=e.keyword.trim(),r=(e.message??"Invalid value").trim();return t.length>0?`${t}: ${r}`:r},Wx=(e,t)=>{try{let r=MOe.compile(e);return{"~standard":{version:1,vendor:t?.vendor??"json-schema",validate:n=>{if(r(n))return{value:n};let i=(r.errors??[]).map(a=>({message:qOe(a),path:BOe(a.instancePath)}));return{issues:i.length>0?i:[{message:"Invalid value"}]}}}}}catch{return t?.fallback??Wd}};var b0=e=>typeof e=="object"&&e!==null&&!Array.isArray(e)?e:{},UOe=e=>Array.isArray(e)?e.filter(t=>typeof t=="string"):[],Qx=(e,t)=>e.length<=t?e:`${e.slice(0,Math.max(0,t-4))} ...`,zOe=/^[A-Za-z_$][A-Za-z0-9_$]*$/,JOe=e=>zOe.test(e)?e:JSON.stringify(e),nL=(e,t,r)=>{let n=Array.isArray(t[e])?t[e].map(b0):[];if(n.length===0)return null;let o=n.map(i=>r(i)).filter(i=>i.length>0);return o.length===0?null:o.join(e==="allOf"?" & ":" | ")},Nte=e=>e.startsWith("#/")?e.slice(2).split("/").map(t=>t.replace(/~1/g,"/").replace(/~0/g,"~")):null,VOe=(e,t)=>{let r=Nte(t);if(!r||r.length===0)return null;let n=e;for(let i of r){let a=b0(n);if(!(i in a))return null;n=a[i]}let o=b0(n);return Object.keys(o).length>0?o:null},Ote=e=>Nte(e)?.at(-1)??e,KOe=(e,t={})=>{let r=b0(e),n=t.maxLength??220,o=Number.isFinite(n),i=t.maxDepth??(o?4:Number.POSITIVE_INFINITY),a=t.maxProperties??(o?6:Number.POSITIVE_INFINITY),s=(c,p,d)=>{let f=b0(c);if(d<=0){if(typeof f.title=="string"&&f.title.length>0)return f.title;if(f.type==="array")return"unknown[]";if(f.type==="object"||f.properties)return f.additionalProperties?"Record":"object"}if(typeof f.$ref=="string"){let g=f.$ref.trim();if(g.length===0)return"unknown";if(p.has(g))return Ote(g);let S=VOe(r,g);return S?s(S,new Set([...p,g]),d-1):Ote(g)}if("const"in f)return JSON.stringify(f.const);let m=Array.isArray(f.enum)?f.enum:[];if(m.length>0)return Qx(m.map(g=>JSON.stringify(g)).join(" | "),n);let y=nL("oneOf",f,g=>s(g,p,d-1))??nL("anyOf",f,g=>s(g,p,d-1))??nL("allOf",f,g=>s(g,p,d-1));if(y)return Qx(y,n);if(f.type==="array"){let g=f.items?s(f.items,p,d-1):"unknown";return Qx(`${g}[]`,n)}if(f.type==="object"||f.properties){let g=b0(f.properties),S=Object.keys(g);if(S.length===0)return f.additionalProperties?"Record":"object";let b=new Set(UOe(f.required)),E=S.slice(0,a),I=E.map(T=>`${JOe(T)}${b.has(T)?"":"?"}: ${s(g[T],p,d-1)}`);return E.lengthKOe(e,{maxLength:t});var yu=(e,t,r=220)=>{if(e===void 0)return t;try{return GOe(e,r)}catch{return t}};import*as cL from"effect/Data";import*as yi from"effect/Effect";import*as Lte from"effect/JSONSchema";import*as Fte from"effect/Data";var oL=class extends Fte.TaggedError("KernelCoreEffectError"){},Xx=(e,t)=>new oL({module:e,message:t});var HOe=e=>e,lL=e=>e instanceof Error?e:new Error(String(e)),ZOe=e=>{if(!e||typeof e!="object"&&typeof e!="function")return null;let t=e["~standard"];if(!t||typeof t!="object")return null;let r=t.validate;return typeof r=="function"?r:null},WOe=e=>!e||e.length===0?"$":e.map(t=>typeof t=="object"&&t!==null&&"key"in t?String(t.key):String(t)).join("."),QOe=e=>e.map(t=>`${WOe(t.path)}: ${t.message}`).join("; "),$te=e=>{let t=ZOe(e.schema);return t?yi.tryPromise({try:()=>Promise.resolve(t(e.value)),catch:lL}).pipe(yi.flatMap(r=>"issues"in r&&r.issues?yi.fail(Xx("tool-map",`Input validation failed for ${e.path}: ${QOe(r.issues)}`)):yi.succeed(r.value))):yi.fail(Xx("tool-map",`Tool ${e.path} has no Standard Schema validator on inputSchema`))},XOe=e=>({mode:"form",message:`Approval required before invoking ${e}`,requestedSchema:{type:"object",properties:{},additionalProperties:!1}}),YOe={kind:"execute"},e4e=e=>e.metadata?.elicitation?{kind:"elicit",elicitation:e.metadata.elicitation}:e.metadata?.interaction==="required"?{kind:"elicit",elicitation:XOe(e.path)}:null,t4e=e=>e4e(e)??YOe,sL=class extends cL.TaggedError("ToolInteractionPendingError"){},UC=class extends cL.TaggedError("ToolInteractionDeniedError"){};var r4e=e=>{let t=t4e({metadata:e.metadata,path:e.path});if(!e.onToolInteraction)return yi.succeed(t);let r={path:e.path,sourceKey:e.sourceKey,args:e.args,metadata:e.metadata,context:e.context,defaultElicitation:t.kind==="elicit"?t.elicitation:null};return e.onToolInteraction(r)},n4e=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),o4e=e=>{if(!e.response.content)return yi.succeed(e.args);if(!n4e(e.args))return yi.fail(Xx("tool-map",`Tool ${e.path} cannot merge elicitation content into non-object arguments`));let t={...e.args,...e.response.content};return $te({schema:e.inputSchema,value:t,path:e.path})},i4e=e=>{let t=e.response.content&&typeof e.response.content.reason=="string"&&e.response.content.reason.trim().length>0?e.response.content.reason.trim():null;return t||(e.response.action==="cancel"?`Interaction cancelled for ${e.path}`:`Interaction declined for ${e.path}`)},a4e=e=>{if(e.decision.kind==="execute")return yi.succeed(e.args);if(e.decision.kind==="decline")return yi.fail(new UC({path:e.path,reason:e.decision.reason}));if(!e.onElicitation)return yi.fail(new sL({path:e.path,elicitation:e.decision.elicitation,interactionId:e.interactionId}));let t={interactionId:e.interactionId,path:e.path,sourceKey:e.sourceKey,args:e.args,metadata:e.metadata,context:e.context,elicitation:e.decision.elicitation};return e.onElicitation(t).pipe(yi.mapError(lL),yi.flatMap(r=>r.action!=="accept"?yi.fail(new UC({path:e.path,reason:i4e({path:e.path,response:r})})):o4e({path:e.path,args:e.args,response:r,inputSchema:e.inputSchema})))};function s4e(e){return{tool:e.tool,metadata:e.metadata}}var vl=s4e;var c4e=e=>typeof e=="object"&&e!==null&&"tool"in e,iL=e=>{if(e!=null)try{return(typeof e=="object"||typeof e=="function")&&e!==null&&"~standard"in e?Lte.make(e):e}catch{return}},Rte=(e,t,r=240)=>yu(e,t,r);var Mte=e=>{let t=e.sourceKey??"in_memory.tools";return Object.entries(e.tools).sort(([r],[n])=>r.localeCompare(n)).map(([r,n])=>{let o=c4e(n)?n:{tool:n},i=o.metadata?{sourceKey:t,...o.metadata}:{sourceKey:t};return{path:HOe(r),tool:o.tool,metadata:i}})};function jte(e){return Mte({tools:e.tools,sourceKey:e.sourceKey}).map(r=>{let n=r.metadata,o=r.tool,i=n?.contract?.inputSchema??iL(o.inputSchema)??iL(o.parameters),a=n?.contract?.outputSchema??iL(o.outputSchema),s={inputTypePreview:n?.contract?.inputTypePreview??Rte(i,"unknown"),outputTypePreview:n?.contract?.outputTypePreview??Rte(a,"unknown"),...i!==void 0?{inputSchema:i}:{},...a!==void 0?{outputSchema:a}:{},...n?.contract?.exampleInput!==void 0?{exampleInput:n.contract.exampleInput}:{},...n?.contract?.exampleOutput!==void 0?{exampleOutput:n.contract.exampleOutput}:{}};return{path:r.path,sourceKey:n?.sourceKey??"in_memory.tools",description:o.description,interaction:n?.interaction,elicitation:n?.elicitation,contract:s,...n?.providerKind?{providerKind:n.providerKind}:{},...n?.providerData!==void 0?{providerData:n.providerData}:{}}})}var aL=e=>e.replace(/[^a-zA-Z0-9._-]/g,"_"),l4e=()=>{let e=0;return t=>{e+=1;let r=typeof t.context?.runId=="string"&&t.context.runId.length>0?t.context.runId:"run",n=typeof t.context?.callId=="string"&&t.context.callId.length>0?t.context.callId:`call_${String(e)}`;return`${aL(r)}:${aL(n)}:${aL(String(t.path))}:${String(e)}`}},t_=e=>{let t=Mte({tools:e.tools,sourceKey:e.sourceKey}),r=new Map(t.map(o=>[o.path,o])),n=l4e();return{invoke:({path:o,args:i,context:a})=>yi.gen(function*(){let s=r.get(o);if(!s)return yield*Xx("tool-map",`Unknown tool path: ${o}`);let c=yield*$te({schema:s.tool.inputSchema,value:i,path:o}),p=yield*r4e({path:s.path,args:c,metadata:s.metadata,sourceKey:s.metadata?.sourceKey??"in_memory.tools",context:a,onToolInteraction:e.onToolInteraction}),d=p.kind==="elicit"&&p.interactionId?p.interactionId:n({path:s.path,context:a}),f=yield*a4e({path:s.path,args:c,inputSchema:s.tool.inputSchema,metadata:s.metadata,sourceKey:s.metadata?.sourceKey??"in_memory.tools",context:a,decision:p,interactionId:d,onElicitation:e.onElicitation});return yield*yi.tryPromise({try:()=>Promise.resolve(s.tool.execute(f,{path:s.path,sourceKey:s.metadata?.sourceKey??"in_memory.tools",metadata:s.metadata,invocation:a,onElicitation:e.onElicitation})),catch:lL})})}};import*as Zi from"effect/Effect";var Bte=e=>e.toLowerCase().split(/\W+/).map(t=>t.trim()).filter(Boolean),u4e=e=>[e.path,e.sourceKey,e.description??"",e.contract?.inputTypePreview??"",e.contract?.outputTypePreview??""].join(" ").toLowerCase(),zC=(e,t)=>{let r=e.contract;if(r)return t?r:{...r.inputTypePreview!==void 0?{inputTypePreview:r.inputTypePreview}:{},...r.outputTypePreview!==void 0?{outputTypePreview:r.outputTypePreview}:{},...r.exampleInput!==void 0?{exampleInput:r.exampleInput}:{},...r.exampleOutput!==void 0?{exampleOutput:r.exampleOutput}:{}}},qte=e=>{let{descriptor:t,includeSchemas:r}=e;return r?t:{...t,...zC(t,!1)?{contract:zC(t,!1)}:{}}};var p4e=e=>{let[t,r]=e.split(".");return r?`${t}.${r}`:t},uL=e=>e.namespace??p4e(e.descriptor.path),Ute=e=>e.searchText?.trim().toLowerCase()||u4e(e.descriptor),d4e=(e,t)=>{if(t.score)return t.score(e);let r=Ute(t);return e.reduce((n,o)=>n+(r.includes(o)?1:0),0)},_4e=e=>{let t=new Map;for(let r of e)for(let n of r){let o=t.get(n.namespace);t.set(n.namespace,{namespace:n.namespace,displayName:o?.displayName??n.displayName,...o?.toolCount!==void 0||n.toolCount!==void 0?{toolCount:(o?.toolCount??0)+(n.toolCount??0)}:{}})}return[...t.values()].sort((r,n)=>r.namespace.localeCompare(n.namespace))},f4e=e=>{let t=new Map;for(let r of e)for(let n of r)t.has(n.path)||t.set(n.path,n);return[...t.values()].sort((r,n)=>r.path.localeCompare(n.path))},m4e=e=>{let t=new Map;for(let r of e)for(let n of r)t.has(n.path)||t.set(n.path,n);return[...t.values()].sort((r,n)=>n.score-r.score||r.path.localeCompare(n.path))};function r_(e){return pL({entries:jte({tools:e.tools}).map(t=>({descriptor:t,...e.defaultNamespace!==void 0?{namespace:e.defaultNamespace}:{}}))})}function pL(e){let t=[...e.entries],r=new Map(t.map(o=>[o.descriptor.path,o])),n=new Map;for(let o of t){let i=uL(o);n.set(i,(n.get(i)??0)+1)}return{listNamespaces:({limit:o})=>Zi.succeed([...n.entries()].map(([i,a])=>({namespace:i,toolCount:a})).slice(0,o)),listTools:({namespace:o,query:i,limit:a,includeSchemas:s=!1})=>Zi.succeed(t.filter(c=>!o||uL(c)===o).filter(c=>{if(!i)return!0;let p=Ute(c);return Bte(i).every(d=>p.includes(d))}).slice(0,a).map(c=>qte({descriptor:c.descriptor,includeSchemas:s}))),getToolByPath:({path:o,includeSchemas:i})=>Zi.succeed(r.get(o)?qte({descriptor:r.get(o).descriptor,includeSchemas:i}):null),searchTools:({query:o,namespace:i,limit:a})=>{let s=Bte(o);return Zi.succeed(t.filter(c=>!i||uL(c)===i).map(c=>({path:c.descriptor.path,score:d4e(s,c)})).filter(c=>c.score>0).sort((c,p)=>p.score-c.score).slice(0,a))}}}function zte(e){let t=[...e.catalogs];return{listNamespaces:({limit:r})=>Zi.gen(function*(){let n=yield*Zi.forEach(t,o=>o.listNamespaces({limit:Math.max(r,r*t.length)}),{concurrency:"unbounded"});return _4e(n).slice(0,r)}),listTools:({namespace:r,query:n,limit:o,includeSchemas:i=!1})=>Zi.gen(function*(){let a=yield*Zi.forEach(t,s=>s.listTools({...r!==void 0?{namespace:r}:{},...n!==void 0?{query:n}:{},limit:Math.max(o,o*t.length),includeSchemas:i}),{concurrency:"unbounded"});return f4e(a).slice(0,o)}),getToolByPath:({path:r,includeSchemas:n})=>Zi.gen(function*(){for(let o of t){let i=yield*o.getToolByPath({path:r,includeSchemas:n});if(i)return i}return null}),searchTools:({query:r,namespace:n,limit:o})=>Zi.gen(function*(){let i=yield*Zi.forEach(t,a=>a.searchTools({query:r,...n!==void 0?{namespace:n}:{},limit:Math.max(o,o*t.length)}),{concurrency:"unbounded"});return m4e(i).slice(0,o)})}}function Jte(e){let{catalog:t}=e;return{catalog:{namespaces:({limit:i=200})=>t.listNamespaces({limit:i}).pipe(Zi.map(a=>({namespaces:a}))),tools:({namespace:i,query:a,limit:s=200,includeSchemas:c=!1})=>t.listTools({...i!==void 0?{namespace:i}:{},...a!==void 0?{query:a}:{},limit:s,includeSchemas:c}).pipe(Zi.map(p=>({results:p})))},describe:{tool:({path:i,includeSchemas:a=!1})=>t.getToolByPath({path:i,includeSchemas:a})},discover:({query:i,sourceKey:a,limit:s=12,includeSchemas:c=!1})=>Zi.gen(function*(){let p=yield*t.searchTools({query:i,limit:s});if(p.length===0)return{bestPath:null,results:[],total:0};let d=yield*Zi.forEach(p,m=>t.getToolByPath({path:m.path,includeSchemas:c}),{concurrency:"unbounded"}),f=p.map((m,y)=>{let g=d[y];return g?{path:g.path,score:m.score,description:g.description,interaction:g.interaction??"auto",...zC(g,c)?{contract:zC(g,c)}:{}}:null}).filter(Boolean);return{bestPath:f[0]?.path??null,results:f,total:f.length}})}}import*as Yx from"effect/Effect";import*as or from"effect/Schema";var h4e=e=>e,y4e=or.standardSchemaV1(or.Struct({limit:or.optional(or.Number)})),g4e=or.standardSchemaV1(or.Struct({namespaces:or.Array(qX)})),S4e=or.standardSchemaV1(or.Struct({namespace:or.optional(or.String),query:or.optional(or.String),limit:or.optional(or.Number),includeSchemas:or.optional(or.Boolean)})),v4e=or.standardSchemaV1(or.Struct({results:or.Array(cC)})),b4e=or.standardSchemaV1(or.Struct({path:or.String,includeSchemas:or.optional(or.Boolean)})),x4e=or.standardSchemaV1(or.NullOr(cC)),E4e=or.standardSchemaV1(or.Struct({query:or.String,limit:or.optional(or.Number),includeSchemas:or.optional(or.Boolean)})),T4e=or.extend(cC,or.Struct({score:or.Number})),D4e=or.standardSchemaV1(or.Struct({bestPath:or.NullOr(or.String),results:or.Array(T4e),total:or.Number})),Vte=e=>{let t=e.sourceKey??"system",r=()=>{if(e.catalog)return e.catalog;if(e.getCatalog)return e.getCatalog();throw new Error("createSystemToolMap requires a catalog or getCatalog")},n=()=>Jte({catalog:r()}),o={};return o["catalog.namespaces"]=vl({tool:{description:"List available namespaces with display names and tool counts",inputSchema:y4e,outputSchema:g4e,execute:({limit:i})=>Yx.runPromise(n().catalog.namespaces(i!==void 0?{limit:i}:{}))},metadata:{sourceKey:t,interaction:"auto"}}),o["catalog.tools"]=vl({tool:{description:"List tools with optional namespace and query filters",inputSchema:S4e,outputSchema:v4e,execute:i=>Yx.runPromise(n().catalog.tools({...i.namespace!==void 0?{namespace:i.namespace}:{},...i.query!==void 0?{query:i.query}:{},...i.limit!==void 0?{limit:i.limit}:{},...i.includeSchemas!==void 0?{includeSchemas:i.includeSchemas}:{}}))},metadata:{sourceKey:t,interaction:"auto"}}),o["describe.tool"]=vl({tool:{description:"Get metadata and optional schemas for a tool path",inputSchema:b4e,outputSchema:x4e,execute:({path:i,includeSchemas:a})=>Yx.runPromise(n().describe.tool({path:h4e(i),...a!==void 0?{includeSchemas:a}:{}}))},metadata:{sourceKey:t,interaction:"auto"}}),o.discover=vl({tool:{description:"Search tools by intent and return ranked matches",inputSchema:E4e,outputSchema:D4e,execute:i=>Yx.runPromise(n().discover({query:i.query,...i.limit!==void 0?{limit:i.limit}:{},...i.includeSchemas!==void 0?{includeSchemas:i.includeSchemas}:{}}))},metadata:{sourceKey:t,interaction:"auto"}}),o},Kte=(e,t={})=>{let r=t.conflictMode??"throw",n={};for(let o of e)for(let[i,a]of Object.entries(o)){if(r==="throw"&&i in n)throw new Error(`Tool path conflict: ${i}`);n[i]=a}return n};var Gte=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),A4e=e=>e.replaceAll("~1","/").replaceAll("~0","~"),I4e=e=>{let t=e.trim();return t.length===0?[]:t.startsWith("/")?t.split("/").slice(1).map(A4e).filter(r=>r.length>0):t.split(".").filter(r=>r.length>0)},w4e=(e,t)=>{let r=t.toLowerCase();for(let n of Object.keys(e))if(n.toLowerCase()===r)return n;return null},k4e=e=>{let t={};for(let r of e.split(";")){let n=r.trim();if(n.length===0)continue;let o=n.indexOf("=");if(o===-1){t[n]="";continue}let i=n.slice(0,o).trim(),a=n.slice(o+1).trim();i.length>0&&(t[i]=a)}return t},C4e=(e,t,r)=>{let n=e;for(let o=0;o{let t=e.url instanceof URL?new URL(e.url.toString()):new URL(e.url);for(let[r,n]of Object.entries(e.queryParams??{}))t.searchParams.set(r,n);return t},Tc=e=>{let t=e.cookies??{};if(Object.keys(t).length===0)return{...e.headers};let r=w4e(e.headers,"cookie"),n=r?e.headers[r]:null,o={...n?k4e(n):{},...t},i={...e.headers};return i[r??"cookie"]=Object.entries(o).map(([a,s])=>`${a}=${encodeURIComponent(s)}`).join("; "),i},n_=e=>{let t=e.bodyValues??{};if(Object.keys(t).length===0)return e.body;let r=e.body==null?{}:Gte(e.body)?structuredClone(e.body):null;if(r===null)throw new Error(`${e.label??"HTTP request"} auth body placements require an object JSON body`);for(let[n,o]of Object.entries(t)){let i=I4e(n);if(i.length===0)throw new Error(`${e.label??"HTTP request"} auth body placement path cannot be empty`);C4e(r,i,o)}return r};var P4e=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),bp=(e,t)=>e>>>t|e<<32-t,O4e=(e,t)=>{let r=new Uint32Array(64);for(let f=0;f<16;f++)r[f]=t[f];for(let f=16;f<64;f++){let m=bp(r[f-15],7)^bp(r[f-15],18)^r[f-15]>>>3,y=bp(r[f-2],17)^bp(r[f-2],19)^r[f-2]>>>10;r[f]=r[f-16]+m+r[f-7]+y|0}let n=e[0],o=e[1],i=e[2],a=e[3],s=e[4],c=e[5],p=e[6],d=e[7];for(let f=0;f<64;f++){let m=bp(s,6)^bp(s,11)^bp(s,25),y=s&c^~s&p,g=d+m+y+P4e[f]+r[f]|0,S=bp(n,2)^bp(n,13)^bp(n,22),b=n&o^n&i^o&i,E=S+b|0;d=p,p=c,c=s,s=a+g|0,a=i,i=o,o=n,n=g+E|0}e[0]=e[0]+n|0,e[1]=e[1]+o|0,e[2]=e[2]+i|0,e[3]=e[3]+a|0,e[4]=e[4]+s|0,e[5]=e[5]+c|0,e[6]=e[6]+p|0,e[7]=e[7]+d|0},N4e=e=>{if(typeof TextEncoder<"u")return new TextEncoder().encode(e);let t=[];for(let r=0;r>6,128|n&63);else if(n>=55296&&n<56320&&r+1>18,128|n>>12&63,128|n>>6&63,128|n&63)}else t.push(224|n>>12,128|n>>6&63,128|n&63)}return new Uint8Array(t)},F4e=e=>{let t=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),r=e.length*8,n=new Uint8Array(Math.ceil((e.length+9)/64)*64);n.set(e),n[e.length]=128;let o=new DataView(n.buffer);o.setUint32(n.length-4,r,!1),r>4294967295&&o.setUint32(n.length-8,Math.floor(r/4294967296),!1);let i=new Uint32Array(16);for(let c=0;c{let t="";for(let r=0;rR4e(F4e(N4e(e)));import*as Yc from"effect/Effect";import*as VF from"effect/Option";import*as Hte from"effect/Data";import*as Ao from"effect/Effect";import*as Zte from"effect/Exit";import*as x0 from"effect/Scope";var JC=class extends Hte.TaggedError("McpConnectionPoolError"){},o_=new Map,Wte=e=>new JC(e),L4e=(e,t,r)=>{let n=o_.get(e);!n||n.get(t)!==r||(n.delete(t),n.size===0&&o_.delete(e))},$4e=e=>Ao.tryPromise({try:()=>Promise.resolve(e.close?.()),catch:t=>Wte({operation:"close",message:"Failed closing pooled MCP connection",cause:t})}).pipe(Ao.ignore),M4e=e=>{let t=Ao.runSync(x0.make()),r=Ao.runSync(Ao.cached(Ao.acquireRelease(e.pipe(Ao.mapError(n=>Wte({operation:"connect",message:"Failed creating pooled MCP connection",cause:n}))),$4e).pipe(x0.extend(t))));return{scope:t,connection:r}},j4e=e=>{let t=o_.get(e.runId)?.get(e.sourceKey);if(t)return t;let r=o_.get(e.runId);r||(r=new Map,o_.set(e.runId,r));let n=M4e(e.connect);return n.connection=n.connection.pipe(Ao.tapError(()=>Ao.sync(()=>{L4e(e.runId,e.sourceKey,n)}).pipe(Ao.zipRight(dL(n))))),r.set(e.sourceKey,n),n},dL=e=>x0.close(e.scope,Zte.void).pipe(Ao.ignore),_L=e=>!e.runId||!e.sourceKey?e.connect:Ao.gen(function*(){return{client:(yield*j4e({runId:e.runId,sourceKey:e.sourceKey,connect:e.connect}).connection).client,close:async()=>{}}}),VC=e=>{let t=o_.get(e);return t?(o_.delete(e),Ao.forEach([...t.values()],dL,{discard:!0})):Ao.void},fL=()=>{let e=[...o_.values()].flatMap(t=>[...t.values()]);return o_.clear(),Ao.forEach(e,dL,{discard:!0})};var gn;(function(e){e.assertEqual=o=>{};function t(o){}e.assertIs=t;function r(o){throw new Error}e.assertNever=r,e.arrayToEnum=o=>{let i={};for(let a of o)i[a]=a;return i},e.getValidEnumValues=o=>{let i=e.objectKeys(o).filter(s=>typeof o[o[s]]!="number"),a={};for(let s of i)a[s]=o[s];return e.objectValues(a)},e.objectValues=o=>e.objectKeys(o).map(function(i){return o[i]}),e.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{let i=[];for(let a in o)Object.prototype.hasOwnProperty.call(o,a)&&i.push(a);return i},e.find=(o,i)=>{for(let a of o)if(i(a))return a},e.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&Number.isFinite(o)&&Math.floor(o)===o;function n(o,i=" | "){return o.map(a=>typeof a=="string"?`'${a}'`:a).join(i)}e.joinValues=n,e.jsonStringifyReplacer=(o,i)=>typeof i=="bigint"?i.toString():i})(gn||(gn={}));var Qte;(function(e){e.mergeShapes=(t,r)=>({...t,...r})})(Qte||(Qte={}));var gt=gn.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),i_=e=>{switch(typeof e){case"undefined":return gt.undefined;case"string":return gt.string;case"number":return Number.isNaN(e)?gt.nan:gt.number;case"boolean":return gt.boolean;case"function":return gt.function;case"bigint":return gt.bigint;case"symbol":return gt.symbol;case"object":return Array.isArray(e)?gt.array:e===null?gt.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?gt.promise:typeof Map<"u"&&e instanceof Map?gt.map:typeof Set<"u"&&e instanceof Set?gt.set:typeof Date<"u"&&e instanceof Date?gt.date:gt.object;default:return gt.unknown}};var Ve=gn.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 Ac=class e extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};let r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=t}format(t){let r=t||function(i){return i.message},n={_errors:[]},o=i=>{for(let a of i.issues)if(a.code==="invalid_union")a.unionErrors.map(o);else if(a.code==="invalid_return_type")o(a.returnTypeError);else if(a.code==="invalid_arguments")o(a.argumentsError);else if(a.path.length===0)n._errors.push(r(a));else{let s=n,c=0;for(;cr.message){let r=Object.create(null),n=[];for(let o of this.issues)if(o.path.length>0){let i=o.path[0];r[i]=r[i]||[],r[i].push(t(o))}else n.push(t(o));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}};Ac.create=e=>new Ac(e);var B4e=(e,t)=>{let r;switch(e.code){case Ve.invalid_type:e.received===gt.undefined?r="Required":r=`Expected ${e.expected}, received ${e.received}`;break;case Ve.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,gn.jsonStringifyReplacer)}`;break;case Ve.unrecognized_keys:r=`Unrecognized key(s) in object: ${gn.joinValues(e.keys,", ")}`;break;case Ve.invalid_union:r="Invalid input";break;case Ve.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${gn.joinValues(e.options)}`;break;case Ve.invalid_enum_value:r=`Invalid enum value. Expected ${gn.joinValues(e.options)}, received '${e.received}'`;break;case Ve.invalid_arguments:r="Invalid function arguments";break;case Ve.invalid_return_type:r="Invalid function return type";break;case Ve.invalid_date:r="Invalid date";break;case Ve.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(r=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?r=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?r=`Invalid input: must end with "${e.validation.endsWith}"`:gn.assertNever(e.validation):e.validation!=="regex"?r=`Invalid ${e.validation}`:r="Invalid";break;case Ve.too_small:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="bigint"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:r="Invalid input";break;case Ve.too_big:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?r=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:r="Invalid input";break;case Ve.custom:r="Invalid input";break;case Ve.invalid_intersection_types:r="Intersection results could not be merged";break;case Ve.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case Ve.not_finite:r="Number must be finite";break;default:r=t.defaultError,gn.assertNever(e)}return{message:r}},Xf=B4e;var q4e=Xf;function eE(){return q4e}var KC=e=>{let{data:t,path:r,errorMaps:n,issueData:o}=e,i=[...r,...o.path||[]],a={...o,path:i};if(o.message!==void 0)return{...o,path:i,message:o.message};let s="",c=n.filter(p=>!!p).slice().reverse();for(let p of c)s=p(a,{data:t,defaultError:s}).message;return{...o,path:i,message:s}};function ft(e,t){let r=eE(),n=KC({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,r,r===Xf?void 0:Xf].filter(o=>!!o)});e.common.issues.push(n)}var ts=class e{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,r){let n=[];for(let o of r){if(o.status==="aborted")return yr;o.status==="dirty"&&t.dirty(),n.push(o.value)}return{status:t.value,value:n}}static async mergeObjectAsync(t,r){let n=[];for(let o of r){let i=await o.key,a=await o.value;n.push({key:i,value:a})}return e.mergeObjectSync(t,n)}static mergeObjectSync(t,r){let n={};for(let o of r){let{key:i,value:a}=o;if(i.status==="aborted"||a.status==="aborted")return yr;i.status==="dirty"&&t.dirty(),a.status==="dirty"&&t.dirty(),i.value!=="__proto__"&&(typeof a.value<"u"||o.alwaysSet)&&(n[i.value]=a.value)}return{status:t.value,value:n}}},yr=Object.freeze({status:"aborted"}),E0=e=>({status:"dirty",value:e}),bs=e=>({status:"valid",value:e}),mL=e=>e.status==="aborted",hL=e=>e.status==="dirty",$y=e=>e.status==="valid",tE=e=>typeof Promise<"u"&&e instanceof Promise;var Lt;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(Lt||(Lt={}));var bl=class{constructor(t,r,n,o){this._cachedPath=[],this.parent=t,this.data=r,this._path=n,this._key=o}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},Xte=(e,t)=>{if($y(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let r=new Ac(e.common.issues);return this._error=r,this._error}}};function jr(e){if(!e)return{};let{errorMap:t,invalid_type_error:r,required_error:n,description:o}=e;if(t&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:o}:{errorMap:(a,s)=>{let{message:c}=e;return a.code==="invalid_enum_value"?{message:c??s.defaultError}:typeof s.data>"u"?{message:c??n??s.defaultError}:a.code!=="invalid_type"?{message:s.defaultError}:{message:c??r??s.defaultError}},description:o}}var sn=class{get description(){return this._def.description}_getType(t){return i_(t.data)}_getOrReturnCtx(t,r){return r||{common:t.parent.common,data:t.data,parsedType:i_(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new ts,ctx:{common:t.parent.common,data:t.data,parsedType:i_(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){let r=this._parse(t);if(tE(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(t){let r=this._parse(t);return Promise.resolve(r)}parse(t,r){let n=this.safeParse(t,r);if(n.success)return n.data;throw n.error}safeParse(t,r){let n={common:{issues:[],async:r?.async??!1,contextualErrorMap:r?.errorMap},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:i_(t)},o=this._parseSync({data:t,path:n.path,parent:n});return Xte(n,o)}"~validate"(t){let r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:i_(t)};if(!this["~standard"].async)try{let n=this._parseSync({data:t,path:[],parent:r});return $y(n)?{value:n.value}:{issues:r.common.issues}}catch(n){n?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),r.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:r}).then(n=>$y(n)?{value:n.value}:{issues:r.common.issues})}async parseAsync(t,r){let n=await this.safeParseAsync(t,r);if(n.success)return n.data;throw n.error}async safeParseAsync(t,r){let n={common:{issues:[],contextualErrorMap:r?.errorMap,async:!0},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:i_(t)},o=this._parse({data:t,path:n.path,parent:n}),i=await(tE(o)?o:Promise.resolve(o));return Xte(n,i)}refine(t,r){let n=o=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(o):r;return this._refinement((o,i)=>{let a=t(o),s=()=>i.addIssue({code:Ve.custom,...n(o)});return typeof Promise<"u"&&a instanceof Promise?a.then(c=>c?!0:(s(),!1)):a?!0:(s(),!1)})}refinement(t,r){return this._refinement((n,o)=>t(n)?!0:(o.addIssue(typeof r=="function"?r(n,o):r),!1))}_refinement(t){return new vu({schema:this,typeName:sr.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,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:r=>this["~validate"](r)}}optional(){return Su.create(this,this._def)}nullable(){return c_.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return em.create(this)}promise(){return My.create(this,this._def)}or(t){return w0.create([this,t],this._def)}and(t){return k0.create(this,t,this._def)}transform(t){return new vu({...jr(this._def),schema:this,typeName:sr.ZodEffects,effect:{type:"transform",transform:t}})}default(t){let r=typeof t=="function"?t:()=>t;return new F0({...jr(this._def),innerType:this,defaultValue:r,typeName:sr.ZodDefault})}brand(){return new GC({typeName:sr.ZodBranded,type:this,...jr(this._def)})}catch(t){let r=typeof t=="function"?t:()=>t;return new R0({...jr(this._def),innerType:this,catchValue:r,typeName:sr.ZodCatch})}describe(t){let r=this.constructor;return new r({...this._def,description:t})}pipe(t){return HC.create(this,t)}readonly(){return L0.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},U4e=/^c[^\s-]{8,}$/i,z4e=/^[0-9a-z]+$/,J4e=/^[0-9A-HJKMNP-TV-Z]{26}$/i,V4e=/^[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,K4e=/^[a-z0-9_-]{21}$/i,G4e=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,H4e=/^[-+]?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)?)??$/,Z4e=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,W4e="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",yL,Q4e=/^(?:(?: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])$/,X4e=/^(?:(?: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])$/,Y4e=/^(([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]))$/,eNe=/^(([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])$/,tNe=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,rNe=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Yte="((\\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])))",nNe=new RegExp(`^${Yte}$`);function ere(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);let r=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${r}`}function oNe(e){return new RegExp(`^${ere(e)}$`)}function iNe(e){let t=`${Yte}T${ere(e)}`,r=[];return r.push(e.local?"Z?":"Z"),e.offset&&r.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${r.join("|")})`,new RegExp(`^${t}$`)}function aNe(e,t){return!!((t==="v4"||!t)&&Q4e.test(e)||(t==="v6"||!t)&&Y4e.test(e))}function sNe(e,t){if(!G4e.test(e))return!1;try{let[r]=e.split(".");if(!r)return!1;let n=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),o=JSON.parse(atob(n));return!(typeof o!="object"||o===null||"typ"in o&&o?.typ!=="JWT"||!o.alg||t&&o.alg!==t)}catch{return!1}}function cNe(e,t){return!!((t==="v4"||!t)&&X4e.test(e)||(t==="v6"||!t)&&eNe.test(e))}var D0=class e extends sn{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==gt.string){let i=this._getOrReturnCtx(t);return ft(i,{code:Ve.invalid_type,expected:gt.string,received:i.parsedType}),yr}let n=new ts,o;for(let i of this._def.checks)if(i.kind==="min")t.data.lengthi.value&&(o=this._getOrReturnCtx(t,o),ft(o,{code:Ve.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),n.dirty());else if(i.kind==="length"){let a=t.data.length>i.value,s=t.data.lengtht.test(o),{validation:r,code:Ve.invalid_string,...Lt.errToObj(n)})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Lt.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Lt.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Lt.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Lt.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...Lt.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Lt.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Lt.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Lt.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...Lt.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...Lt.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...Lt.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Lt.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...Lt.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof t?.precision>"u"?null:t?.precision,offset:t?.offset??!1,local:t?.local??!1,...Lt.errToObj(t?.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof t?.precision>"u"?null:t?.precision,...Lt.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",...Lt.errToObj(t)})}regex(t,r){return this._addCheck({kind:"regex",regex:t,...Lt.errToObj(r)})}includes(t,r){return this._addCheck({kind:"includes",value:t,position:r?.position,...Lt.errToObj(r?.message)})}startsWith(t,r){return this._addCheck({kind:"startsWith",value:t,...Lt.errToObj(r)})}endsWith(t,r){return this._addCheck({kind:"endsWith",value:t,...Lt.errToObj(r)})}min(t,r){return this._addCheck({kind:"min",value:t,...Lt.errToObj(r)})}max(t,r){return this._addCheck({kind:"max",value:t,...Lt.errToObj(r)})}length(t,r){return this._addCheck({kind:"length",value:t,...Lt.errToObj(r)})}nonempty(t){return this.min(1,Lt.errToObj(t))}trim(){return new e({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxLength(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.valuenew D0({checks:[],typeName:sr.ZodString,coerce:e?.coerce??!1,...jr(e)});function lNe(e,t){let r=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,o=r>n?r:n,i=Number.parseInt(e.toFixed(o).replace(".","")),a=Number.parseInt(t.toFixed(o).replace(".",""));return i%a/10**o}var rE=class e extends sn{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==gt.number){let i=this._getOrReturnCtx(t);return ft(i,{code:Ve.invalid_type,expected:gt.number,received:i.parsedType}),yr}let n,o=new ts;for(let i of this._def.checks)i.kind==="int"?gn.isInteger(t.data)||(n=this._getOrReturnCtx(t,n),ft(n,{code:Ve.invalid_type,expected:"integer",received:"float",message:i.message}),o.dirty()):i.kind==="min"?(i.inclusive?t.datai.value:t.data>=i.value)&&(n=this._getOrReturnCtx(t,n),ft(n,{code:Ve.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="multipleOf"?lNe(t.data,i.value)!==0&&(n=this._getOrReturnCtx(t,n),ft(n,{code:Ve.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(n=this._getOrReturnCtx(t,n),ft(n,{code:Ve.not_finite,message:i.message}),o.dirty()):gn.assertNever(i);return{status:o.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,Lt.toString(r))}gt(t,r){return this.setLimit("min",t,!1,Lt.toString(r))}lte(t,r){return this.setLimit("max",t,!0,Lt.toString(r))}lt(t,r){return this.setLimit("max",t,!1,Lt.toString(r))}setLimit(t,r,n,o){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:Lt.toString(o)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Lt.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Lt.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Lt.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Lt.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Lt.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:Lt.toString(r)})}finite(t){return this._addCheck({kind:"finite",message:Lt.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Lt.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Lt.toString(t)})}get minValue(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.valuet.kind==="int"||t.kind==="multipleOf"&&gn.isInteger(t.value))}get isFinite(){let t=null,r=null;for(let n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(t===null||n.valuenew rE({checks:[],typeName:sr.ZodNumber,coerce:e?.coerce||!1,...jr(e)});var nE=class e extends sn{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==gt.bigint)return this._getInvalidInput(t);let n,o=new ts;for(let i of this._def.checks)i.kind==="min"?(i.inclusive?t.datai.value:t.data>=i.value)&&(n=this._getOrReturnCtx(t,n),ft(n,{code:Ve.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="multipleOf"?t.data%i.value!==BigInt(0)&&(n=this._getOrReturnCtx(t,n),ft(n,{code:Ve.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):gn.assertNever(i);return{status:o.value,value:t.data}}_getInvalidInput(t){let r=this._getOrReturnCtx(t);return ft(r,{code:Ve.invalid_type,expected:gt.bigint,received:r.parsedType}),yr}gte(t,r){return this.setLimit("min",t,!0,Lt.toString(r))}gt(t,r){return this.setLimit("min",t,!1,Lt.toString(r))}lte(t,r){return this.setLimit("max",t,!0,Lt.toString(r))}lt(t,r){return this.setLimit("max",t,!1,Lt.toString(r))}setLimit(t,r,n,o){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:Lt.toString(o)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Lt.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Lt.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Lt.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Lt.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:Lt.toString(r)})}get minValue(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.valuenew nE({checks:[],typeName:sr.ZodBigInt,coerce:e?.coerce??!1,...jr(e)});var oE=class extends sn{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==gt.boolean){let n=this._getOrReturnCtx(t);return ft(n,{code:Ve.invalid_type,expected:gt.boolean,received:n.parsedType}),yr}return bs(t.data)}};oE.create=e=>new oE({typeName:sr.ZodBoolean,coerce:e?.coerce||!1,...jr(e)});var iE=class e extends sn{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==gt.date){let i=this._getOrReturnCtx(t);return ft(i,{code:Ve.invalid_type,expected:gt.date,received:i.parsedType}),yr}if(Number.isNaN(t.data.getTime())){let i=this._getOrReturnCtx(t);return ft(i,{code:Ve.invalid_date}),yr}let n=new ts,o;for(let i of this._def.checks)i.kind==="min"?t.data.getTime()i.value&&(o=this._getOrReturnCtx(t,o),ft(o,{code:Ve.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),n.dirty()):gn.assertNever(i);return{status:n.value,value:new Date(t.data.getTime())}}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}min(t,r){return this._addCheck({kind:"min",value:t.getTime(),message:Lt.toString(r)})}max(t,r){return this._addCheck({kind:"max",value:t.getTime(),message:Lt.toString(r)})}get minDate(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.valuenew iE({checks:[],coerce:e?.coerce||!1,typeName:sr.ZodDate,...jr(e)});var aE=class extends sn{_parse(t){if(this._getType(t)!==gt.symbol){let n=this._getOrReturnCtx(t);return ft(n,{code:Ve.invalid_type,expected:gt.symbol,received:n.parsedType}),yr}return bs(t.data)}};aE.create=e=>new aE({typeName:sr.ZodSymbol,...jr(e)});var A0=class extends sn{_parse(t){if(this._getType(t)!==gt.undefined){let n=this._getOrReturnCtx(t);return ft(n,{code:Ve.invalid_type,expected:gt.undefined,received:n.parsedType}),yr}return bs(t.data)}};A0.create=e=>new A0({typeName:sr.ZodUndefined,...jr(e)});var I0=class extends sn{_parse(t){if(this._getType(t)!==gt.null){let n=this._getOrReturnCtx(t);return ft(n,{code:Ve.invalid_type,expected:gt.null,received:n.parsedType}),yr}return bs(t.data)}};I0.create=e=>new I0({typeName:sr.ZodNull,...jr(e)});var sE=class extends sn{constructor(){super(...arguments),this._any=!0}_parse(t){return bs(t.data)}};sE.create=e=>new sE({typeName:sr.ZodAny,...jr(e)});var Yf=class extends sn{constructor(){super(...arguments),this._unknown=!0}_parse(t){return bs(t.data)}};Yf.create=e=>new Yf({typeName:sr.ZodUnknown,...jr(e)});var xp=class extends sn{_parse(t){let r=this._getOrReturnCtx(t);return ft(r,{code:Ve.invalid_type,expected:gt.never,received:r.parsedType}),yr}};xp.create=e=>new xp({typeName:sr.ZodNever,...jr(e)});var cE=class extends sn{_parse(t){if(this._getType(t)!==gt.undefined){let n=this._getOrReturnCtx(t);return ft(n,{code:Ve.invalid_type,expected:gt.void,received:n.parsedType}),yr}return bs(t.data)}};cE.create=e=>new cE({typeName:sr.ZodVoid,...jr(e)});var em=class e extends sn{_parse(t){let{ctx:r,status:n}=this._processInputParams(t),o=this._def;if(r.parsedType!==gt.array)return ft(r,{code:Ve.invalid_type,expected:gt.array,received:r.parsedType}),yr;if(o.exactLength!==null){let a=r.data.length>o.exactLength.value,s=r.data.lengtho.maxLength.value&&(ft(r,{code:Ve.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((a,s)=>o.type._parseAsync(new bl(r,a,r.path,s)))).then(a=>ts.mergeArray(n,a));let i=[...r.data].map((a,s)=>o.type._parseSync(new bl(r,a,r.path,s)));return ts.mergeArray(n,i)}get element(){return this._def.type}min(t,r){return new e({...this._def,minLength:{value:t,message:Lt.toString(r)}})}max(t,r){return new e({...this._def,maxLength:{value:t,message:Lt.toString(r)}})}length(t,r){return new e({...this._def,exactLength:{value:t,message:Lt.toString(r)}})}nonempty(t){return this.min(1,t)}};em.create=(e,t)=>new em({type:e,minLength:null,maxLength:null,exactLength:null,typeName:sr.ZodArray,...jr(t)});function T0(e){if(e instanceof Ic){let t={};for(let r in e.shape){let n=e.shape[r];t[r]=Su.create(T0(n))}return new Ic({...e._def,shape:()=>t})}else return e instanceof em?new em({...e._def,type:T0(e.element)}):e instanceof Su?Su.create(T0(e.unwrap())):e instanceof c_?c_.create(T0(e.unwrap())):e instanceof s_?s_.create(e.items.map(t=>T0(t))):e}var Ic=class e extends sn{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let t=this._def.shape(),r=gn.objectKeys(t);return this._cached={shape:t,keys:r},this._cached}_parse(t){if(this._getType(t)!==gt.object){let p=this._getOrReturnCtx(t);return ft(p,{code:Ve.invalid_type,expected:gt.object,received:p.parsedType}),yr}let{status:n,ctx:o}=this._processInputParams(t),{shape:i,keys:a}=this._getCached(),s=[];if(!(this._def.catchall instanceof xp&&this._def.unknownKeys==="strip"))for(let p in o.data)a.includes(p)||s.push(p);let c=[];for(let p of a){let d=i[p],f=o.data[p];c.push({key:{status:"valid",value:p},value:d._parse(new bl(o,f,o.path,p)),alwaysSet:p in o.data})}if(this._def.catchall instanceof xp){let p=this._def.unknownKeys;if(p==="passthrough")for(let d of s)c.push({key:{status:"valid",value:d},value:{status:"valid",value:o.data[d]}});else if(p==="strict")s.length>0&&(ft(o,{code:Ve.unrecognized_keys,keys:s}),n.dirty());else if(p!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let p=this._def.catchall;for(let d of s){let f=o.data[d];c.push({key:{status:"valid",value:d},value:p._parse(new bl(o,f,o.path,d)),alwaysSet:d in o.data})}}return o.common.async?Promise.resolve().then(async()=>{let p=[];for(let d of c){let f=await d.key,m=await d.value;p.push({key:f,value:m,alwaysSet:d.alwaysSet})}return p}).then(p=>ts.mergeObjectSync(n,p)):ts.mergeObjectSync(n,c)}get shape(){return this._def.shape()}strict(t){return Lt.errToObj,new e({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(r,n)=>{let o=this._def.errorMap?.(r,n).message??n.defaultError;return r.code==="unrecognized_keys"?{message:Lt.errToObj(t).message??o}:{message:o}}}:{}})}strip(){return new e({...this._def,unknownKeys:"strip"})}passthrough(){return new e({...this._def,unknownKeys:"passthrough"})}extend(t){return new e({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new e({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:sr.ZodObject})}setKey(t,r){return this.augment({[t]:r})}catchall(t){return new e({...this._def,catchall:t})}pick(t){let r={};for(let n of gn.objectKeys(t))t[n]&&this.shape[n]&&(r[n]=this.shape[n]);return new e({...this._def,shape:()=>r})}omit(t){let r={};for(let n of gn.objectKeys(this.shape))t[n]||(r[n]=this.shape[n]);return new e({...this._def,shape:()=>r})}deepPartial(){return T0(this)}partial(t){let r={};for(let n of gn.objectKeys(this.shape)){let o=this.shape[n];t&&!t[n]?r[n]=o:r[n]=o.optional()}return new e({...this._def,shape:()=>r})}required(t){let r={};for(let n of gn.objectKeys(this.shape))if(t&&!t[n])r[n]=this.shape[n];else{let i=this.shape[n];for(;i instanceof Su;)i=i._def.innerType;r[n]=i}return new e({...this._def,shape:()=>r})}keyof(){return tre(gn.objectKeys(this.shape))}};Ic.create=(e,t)=>new Ic({shape:()=>e,unknownKeys:"strip",catchall:xp.create(),typeName:sr.ZodObject,...jr(t)});Ic.strictCreate=(e,t)=>new Ic({shape:()=>e,unknownKeys:"strict",catchall:xp.create(),typeName:sr.ZodObject,...jr(t)});Ic.lazycreate=(e,t)=>new Ic({shape:e,unknownKeys:"strip",catchall:xp.create(),typeName:sr.ZodObject,...jr(t)});var w0=class extends sn{_parse(t){let{ctx:r}=this._processInputParams(t),n=this._def.options;function o(i){for(let s of i)if(s.result.status==="valid")return s.result;for(let s of i)if(s.result.status==="dirty")return r.common.issues.push(...s.ctx.common.issues),s.result;let a=i.map(s=>new Ac(s.ctx.common.issues));return ft(r,{code:Ve.invalid_union,unionErrors:a}),yr}if(r.common.async)return Promise.all(n.map(async i=>{let a={...r,common:{...r.common,issues:[]},parent:null};return{result:await i._parseAsync({data:r.data,path:r.path,parent:a}),ctx:a}})).then(o);{let i,a=[];for(let c of n){let p={...r,common:{...r.common,issues:[]},parent:null},d=c._parseSync({data:r.data,path:r.path,parent:p});if(d.status==="valid")return d;d.status==="dirty"&&!i&&(i={result:d,ctx:p}),p.common.issues.length&&a.push(p.common.issues)}if(i)return r.common.issues.push(...i.ctx.common.issues),i.result;let s=a.map(c=>new Ac(c));return ft(r,{code:Ve.invalid_union,unionErrors:s}),yr}}get options(){return this._def.options}};w0.create=(e,t)=>new w0({options:e,typeName:sr.ZodUnion,...jr(t)});var a_=e=>e instanceof C0?a_(e.schema):e instanceof vu?a_(e.innerType()):e instanceof P0?[e.value]:e instanceof O0?e.options:e instanceof N0?gn.objectValues(e.enum):e instanceof F0?a_(e._def.innerType):e instanceof A0?[void 0]:e instanceof I0?[null]:e instanceof Su?[void 0,...a_(e.unwrap())]:e instanceof c_?[null,...a_(e.unwrap())]:e instanceof GC||e instanceof L0?a_(e.unwrap()):e instanceof R0?a_(e._def.innerType):[],gL=class e extends sn{_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==gt.object)return ft(r,{code:Ve.invalid_type,expected:gt.object,received:r.parsedType}),yr;let n=this.discriminator,o=r.data[n],i=this.optionsMap.get(o);return i?r.common.async?i._parseAsync({data:r.data,path:r.path,parent:r}):i._parseSync({data:r.data,path:r.path,parent:r}):(ft(r,{code:Ve.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),yr)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,r,n){let o=new Map;for(let i of r){let a=a_(i.shape[t]);if(!a.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(let s of a){if(o.has(s))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(s)}`);o.set(s,i)}}return new e({typeName:sr.ZodDiscriminatedUnion,discriminator:t,options:r,optionsMap:o,...jr(n)})}};function SL(e,t){let r=i_(e),n=i_(t);if(e===t)return{valid:!0,data:e};if(r===gt.object&&n===gt.object){let o=gn.objectKeys(t),i=gn.objectKeys(e).filter(s=>o.indexOf(s)!==-1),a={...e,...t};for(let s of i){let c=SL(e[s],t[s]);if(!c.valid)return{valid:!1};a[s]=c.data}return{valid:!0,data:a}}else if(r===gt.array&&n===gt.array){if(e.length!==t.length)return{valid:!1};let o=[];for(let i=0;i{if(mL(i)||mL(a))return yr;let s=SL(i.value,a.value);return s.valid?((hL(i)||hL(a))&&r.dirty(),{status:r.value,value:s.data}):(ft(n,{code:Ve.invalid_intersection_types}),yr)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([i,a])=>o(i,a)):o(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}};k0.create=(e,t,r)=>new k0({left:e,right:t,typeName:sr.ZodIntersection,...jr(r)});var s_=class e extends sn{_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==gt.array)return ft(n,{code:Ve.invalid_type,expected:gt.array,received:n.parsedType}),yr;if(n.data.lengththis._def.items.length&&(ft(n,{code:Ve.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());let i=[...n.data].map((a,s)=>{let c=this._def.items[s]||this._def.rest;return c?c._parse(new bl(n,a,n.path,s)):null}).filter(a=>!!a);return n.common.async?Promise.all(i).then(a=>ts.mergeArray(r,a)):ts.mergeArray(r,i)}get items(){return this._def.items}rest(t){return new e({...this._def,rest:t})}};s_.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new s_({items:e,typeName:sr.ZodTuple,rest:null,...jr(t)})};var vL=class e extends sn{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==gt.object)return ft(n,{code:Ve.invalid_type,expected:gt.object,received:n.parsedType}),yr;let o=[],i=this._def.keyType,a=this._def.valueType;for(let s in n.data)o.push({key:i._parse(new bl(n,s,n.path,s)),value:a._parse(new bl(n,n.data[s],n.path,s)),alwaysSet:s in n.data});return n.common.async?ts.mergeObjectAsync(r,o):ts.mergeObjectSync(r,o)}get element(){return this._def.valueType}static create(t,r,n){return r instanceof sn?new e({keyType:t,valueType:r,typeName:sr.ZodRecord,...jr(n)}):new e({keyType:D0.create(),valueType:t,typeName:sr.ZodRecord,...jr(r)})}},lE=class extends sn{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==gt.map)return ft(n,{code:Ve.invalid_type,expected:gt.map,received:n.parsedType}),yr;let o=this._def.keyType,i=this._def.valueType,a=[...n.data.entries()].map(([s,c],p)=>({key:o._parse(new bl(n,s,n.path,[p,"key"])),value:i._parse(new bl(n,c,n.path,[p,"value"]))}));if(n.common.async){let s=new Map;return Promise.resolve().then(async()=>{for(let c of a){let p=await c.key,d=await c.value;if(p.status==="aborted"||d.status==="aborted")return yr;(p.status==="dirty"||d.status==="dirty")&&r.dirty(),s.set(p.value,d.value)}return{status:r.value,value:s}})}else{let s=new Map;for(let c of a){let p=c.key,d=c.value;if(p.status==="aborted"||d.status==="aborted")return yr;(p.status==="dirty"||d.status==="dirty")&&r.dirty(),s.set(p.value,d.value)}return{status:r.value,value:s}}}};lE.create=(e,t,r)=>new lE({valueType:t,keyType:e,typeName:sr.ZodMap,...jr(r)});var uE=class e extends sn{_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==gt.set)return ft(n,{code:Ve.invalid_type,expected:gt.set,received:n.parsedType}),yr;let o=this._def;o.minSize!==null&&n.data.sizeo.maxSize.value&&(ft(n,{code:Ve.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),r.dirty());let i=this._def.valueType;function a(c){let p=new Set;for(let d of c){if(d.status==="aborted")return yr;d.status==="dirty"&&r.dirty(),p.add(d.value)}return{status:r.value,value:p}}let s=[...n.data.values()].map((c,p)=>i._parse(new bl(n,c,n.path,p)));return n.common.async?Promise.all(s).then(c=>a(c)):a(s)}min(t,r){return new e({...this._def,minSize:{value:t,message:Lt.toString(r)}})}max(t,r){return new e({...this._def,maxSize:{value:t,message:Lt.toString(r)}})}size(t,r){return this.min(t,r).max(t,r)}nonempty(t){return this.min(1,t)}};uE.create=(e,t)=>new uE({valueType:e,minSize:null,maxSize:null,typeName:sr.ZodSet,...jr(t)});var bL=class e extends sn{constructor(){super(...arguments),this.validate=this.implement}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==gt.function)return ft(r,{code:Ve.invalid_type,expected:gt.function,received:r.parsedType}),yr;function n(s,c){return KC({data:s,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,eE(),Xf].filter(p=>!!p),issueData:{code:Ve.invalid_arguments,argumentsError:c}})}function o(s,c){return KC({data:s,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,eE(),Xf].filter(p=>!!p),issueData:{code:Ve.invalid_return_type,returnTypeError:c}})}let i={errorMap:r.common.contextualErrorMap},a=r.data;if(this._def.returns instanceof My){let s=this;return bs(async function(...c){let p=new Ac([]),d=await s._def.args.parseAsync(c,i).catch(y=>{throw p.addIssue(n(c,y)),p}),f=await Reflect.apply(a,this,d);return await s._def.returns._def.type.parseAsync(f,i).catch(y=>{throw p.addIssue(o(f,y)),p})})}else{let s=this;return bs(function(...c){let p=s._def.args.safeParse(c,i);if(!p.success)throw new Ac([n(c,p.error)]);let d=Reflect.apply(a,this,p.data),f=s._def.returns.safeParse(d,i);if(!f.success)throw new Ac([o(d,f.error)]);return f.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new e({...this._def,args:s_.create(t).rest(Yf.create())})}returns(t){return new e({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,r,n){return new e({args:t||s_.create([]).rest(Yf.create()),returns:r||Yf.create(),typeName:sr.ZodFunction,...jr(n)})}},C0=class extends sn{get schema(){return this._def.getter()}_parse(t){let{ctx:r}=this._processInputParams(t);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}};C0.create=(e,t)=>new C0({getter:e,typeName:sr.ZodLazy,...jr(t)});var P0=class extends sn{_parse(t){if(t.data!==this._def.value){let r=this._getOrReturnCtx(t);return ft(r,{received:r.data,code:Ve.invalid_literal,expected:this._def.value}),yr}return{status:"valid",value:t.data}}get value(){return this._def.value}};P0.create=(e,t)=>new P0({value:e,typeName:sr.ZodLiteral,...jr(t)});function tre(e,t){return new O0({values:e,typeName:sr.ZodEnum,...jr(t)})}var O0=class e extends sn{_parse(t){if(typeof t.data!="string"){let r=this._getOrReturnCtx(t),n=this._def.values;return ft(r,{expected:gn.joinValues(n),received:r.parsedType,code:Ve.invalid_type}),yr}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){let r=this._getOrReturnCtx(t),n=this._def.values;return ft(r,{received:r.data,code:Ve.invalid_enum_value,options:n}),yr}return bs(t.data)}get options(){return this._def.values}get enum(){let t={};for(let r of this._def.values)t[r]=r;return t}get Values(){let t={};for(let r of this._def.values)t[r]=r;return t}get Enum(){let t={};for(let r of this._def.values)t[r]=r;return t}extract(t,r=this._def){return e.create(t,{...this._def,...r})}exclude(t,r=this._def){return e.create(this.options.filter(n=>!t.includes(n)),{...this._def,...r})}};O0.create=tre;var N0=class extends sn{_parse(t){let r=gn.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(t);if(n.parsedType!==gt.string&&n.parsedType!==gt.number){let o=gn.objectValues(r);return ft(n,{expected:gn.joinValues(o),received:n.parsedType,code:Ve.invalid_type}),yr}if(this._cache||(this._cache=new Set(gn.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){let o=gn.objectValues(r);return ft(n,{received:n.data,code:Ve.invalid_enum_value,options:o}),yr}return bs(t.data)}get enum(){return this._def.values}};N0.create=(e,t)=>new N0({values:e,typeName:sr.ZodNativeEnum,...jr(t)});var My=class extends sn{unwrap(){return this._def.type}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==gt.promise&&r.common.async===!1)return ft(r,{code:Ve.invalid_type,expected:gt.promise,received:r.parsedType}),yr;let n=r.parsedType===gt.promise?r.data:Promise.resolve(r.data);return bs(n.then(o=>this._def.type.parseAsync(o,{path:r.path,errorMap:r.common.contextualErrorMap})))}};My.create=(e,t)=>new My({type:e,typeName:sr.ZodPromise,...jr(t)});var vu=class extends sn{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===sr.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){let{status:r,ctx:n}=this._processInputParams(t),o=this._def.effect||null,i={addIssue:a=>{ft(n,a),a.fatal?r.abort():r.dirty()},get path(){return n.path}};if(i.addIssue=i.addIssue.bind(i),o.type==="preprocess"){let a=o.transform(n.data,i);if(n.common.async)return Promise.resolve(a).then(async s=>{if(r.value==="aborted")return yr;let c=await this._def.schema._parseAsync({data:s,path:n.path,parent:n});return c.status==="aborted"?yr:c.status==="dirty"?E0(c.value):r.value==="dirty"?E0(c.value):c});{if(r.value==="aborted")return yr;let s=this._def.schema._parseSync({data:a,path:n.path,parent:n});return s.status==="aborted"?yr:s.status==="dirty"?E0(s.value):r.value==="dirty"?E0(s.value):s}}if(o.type==="refinement"){let a=s=>{let c=o.refinement(s,i);if(n.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return s};if(n.common.async===!1){let s=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?yr:(s.status==="dirty"&&r.dirty(),a(s.value),{status:r.value,value:s.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(s=>s.status==="aborted"?yr:(s.status==="dirty"&&r.dirty(),a(s.value).then(()=>({status:r.value,value:s.value}))))}if(o.type==="transform")if(n.common.async===!1){let a=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!$y(a))return yr;let s=o.transform(a.value,i);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:s}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(a=>$y(a)?Promise.resolve(o.transform(a.value,i)).then(s=>({status:r.value,value:s})):yr);gn.assertNever(o)}};vu.create=(e,t,r)=>new vu({schema:e,typeName:sr.ZodEffects,effect:t,...jr(r)});vu.createWithPreprocess=(e,t,r)=>new vu({schema:t,effect:{type:"preprocess",transform:e},typeName:sr.ZodEffects,...jr(r)});var Su=class extends sn{_parse(t){return this._getType(t)===gt.undefined?bs(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};Su.create=(e,t)=>new Su({innerType:e,typeName:sr.ZodOptional,...jr(t)});var c_=class extends sn{_parse(t){return this._getType(t)===gt.null?bs(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};c_.create=(e,t)=>new c_({innerType:e,typeName:sr.ZodNullable,...jr(t)});var F0=class extends sn{_parse(t){let{ctx:r}=this._processInputParams(t),n=r.data;return r.parsedType===gt.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};F0.create=(e,t)=>new F0({innerType:e,typeName:sr.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...jr(t)});var R0=class extends sn{_parse(t){let{ctx:r}=this._processInputParams(t),n={...r,common:{...r.common,issues:[]}},o=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return tE(o)?o.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Ac(n.common.issues)},input:n.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Ac(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};R0.create=(e,t)=>new R0({innerType:e,typeName:sr.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...jr(t)});var pE=class extends sn{_parse(t){if(this._getType(t)!==gt.nan){let n=this._getOrReturnCtx(t);return ft(n,{code:Ve.invalid_type,expected:gt.nan,received:n.parsedType}),yr}return{status:"valid",value:t.data}}};pE.create=e=>new pE({typeName:sr.ZodNaN,...jr(e)});var GC=class extends sn{_parse(t){let{ctx:r}=this._processInputParams(t),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}},HC=class e extends sn{_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.common.async)return(async()=>{let i=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return i.status==="aborted"?yr:i.status==="dirty"?(r.dirty(),E0(i.value)):this._def.out._parseAsync({data:i.value,path:n.path,parent:n})})();{let o=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return o.status==="aborted"?yr:o.status==="dirty"?(r.dirty(),{status:"dirty",value:o.value}):this._def.out._parseSync({data:o.value,path:n.path,parent:n})}}static create(t,r){return new e({in:t,out:r,typeName:sr.ZodPipeline})}},L0=class extends sn{_parse(t){let r=this._def.innerType._parse(t),n=o=>($y(o)&&(o.value=Object.freeze(o.value)),o);return tE(r)?r.then(o=>n(o)):n(r)}unwrap(){return this._def.innerType}};L0.create=(e,t)=>new L0({innerType:e,typeName:sr.ZodReadonly,...jr(t)});var Xkt={object:Ic.lazycreate},sr;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(sr||(sr={}));var Ykt=D0.create,eCt=rE.create,tCt=pE.create,rCt=nE.create,nCt=oE.create,oCt=iE.create,iCt=aE.create,aCt=A0.create,sCt=I0.create,cCt=sE.create,lCt=Yf.create,uCt=xp.create,pCt=cE.create,dCt=em.create,uNe=Ic.create,_Ct=Ic.strictCreate,fCt=w0.create,mCt=gL.create,hCt=k0.create,yCt=s_.create,gCt=vL.create,SCt=lE.create,vCt=uE.create,bCt=bL.create,xCt=C0.create,ECt=P0.create,TCt=O0.create,DCt=N0.create,ACt=My.create,ICt=vu.create,wCt=Su.create,kCt=c_.create,CCt=vu.createWithPreprocess,PCt=HC.create;var WC=Object.freeze({status:"aborted"});function ne(e,t,r){function n(s,c){if(s._zod||Object.defineProperty(s,"_zod",{value:{def:c,constr:a,traits:new Set},enumerable:!1}),s._zod.traits.has(e))return;s._zod.traits.add(e),t(s,c);let p=a.prototype,d=Object.keys(p);for(let f=0;fr?.Parent&&s instanceof r.Parent?!0:s?._zod?.traits?.has(e)}),Object.defineProperty(a,"name",{value:e}),a}var Ep=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},jy=class extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}},ZC={};function Wi(e){return e&&Object.assign(ZC,e),ZC}var Ke={};r0(Ke,{BIGINT_FORMAT_RANGES:()=>PL,Class:()=>EL,NUMBER_FORMAT_RANGES:()=>CL,aborted:()=>om,allowsEval:()=>AL,assert:()=>yNe,assertEqual:()=>_Ne,assertIs:()=>mNe,assertNever:()=>hNe,assertNotEqual:()=>fNe,assignProp:()=>rm,base64ToUint8Array:()=>lre,base64urlToUint8Array:()=>wNe,cached:()=>M0,captureStackTrace:()=>XC,cleanEnum:()=>INe,cleanRegex:()=>fE,clone:()=>xs,cloneDef:()=>SNe,createTransparentProxy:()=>DNe,defineLazy:()=>zr,esc:()=>QC,escapeRegex:()=>xl,extend:()=>ire,finalizeIssue:()=>Zs,floatSafeRemainder:()=>TL,getElementAtPath:()=>vNe,getEnumValues:()=>_E,getLengthableOrigin:()=>yE,getParsedType:()=>TNe,getSizableOrigin:()=>hE,hexToUint8Array:()=>CNe,isObject:()=>By,isPlainObject:()=>nm,issue:()=>j0,joinValues:()=>ur,jsonStringifyReplacer:()=>$0,merge:()=>ANe,mergeDefs:()=>l_,normalizeParams:()=>st,nullish:()=>tm,numKeys:()=>ENe,objectClone:()=>gNe,omit:()=>ore,optionalKeys:()=>kL,parsedType:()=>gr,partial:()=>sre,pick:()=>nre,prefixIssues:()=>wc,primitiveTypes:()=>wL,promiseAllObject:()=>bNe,propertyKeyTypes:()=>mE,randomString:()=>xNe,required:()=>cre,safeExtend:()=>are,shallowClone:()=>IL,slugify:()=>DL,stringifyPrimitive:()=>pr,uint8ArrayToBase64:()=>ure,uint8ArrayToBase64url:()=>kNe,uint8ArrayToHex:()=>PNe,unwrapMessage:()=>dE});function _Ne(e){return e}function fNe(e){return e}function mNe(e){}function hNe(e){throw new Error("Unexpected value in exhaustive check")}function yNe(e){}function _E(e){let t=Object.values(e).filter(n=>typeof n=="number");return Object.entries(e).filter(([n,o])=>t.indexOf(+n)===-1).map(([n,o])=>o)}function ur(e,t="|"){return e.map(r=>pr(r)).join(t)}function $0(e,t){return typeof t=="bigint"?t.toString():t}function M0(e){return{get value(){{let r=e();return Object.defineProperty(this,"value",{value:r}),r}throw new Error("cached value already set")}}}function tm(e){return e==null}function fE(e){let t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function TL(e,t){let r=(e.toString().split(".")[1]||"").length,n=t.toString(),o=(n.split(".")[1]||"").length;if(o===0&&/\d?e-\d?/.test(n)){let c=n.match(/\d?e-(\d?)/);c?.[1]&&(o=Number.parseInt(c[1]))}let i=r>o?r:o,a=Number.parseInt(e.toFixed(i).replace(".","")),s=Number.parseInt(t.toFixed(i).replace(".",""));return a%s/10**i}var rre=Symbol("evaluating");function zr(e,t,r){let n;Object.defineProperty(e,t,{get(){if(n!==rre)return n===void 0&&(n=rre,n=r()),n},set(o){Object.defineProperty(e,t,{value:o})},configurable:!0})}function gNe(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function rm(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function l_(...e){let t={};for(let r of e){let n=Object.getOwnPropertyDescriptors(r);Object.assign(t,n)}return Object.defineProperties({},t)}function SNe(e){return l_(e._zod.def)}function vNe(e,t){return t?t.reduce((r,n)=>r?.[n],e):e}function bNe(e){let t=Object.keys(e),r=t.map(n=>e[n]);return Promise.all(r).then(n=>{let o={};for(let i=0;i{};function By(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}var AL=M0(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});function nm(e){if(By(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!="function")return!0;let r=t.prototype;return!(By(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function IL(e){return nm(e)?{...e}:Array.isArray(e)?[...e]:e}function ENe(e){let t=0;for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&t++;return t}var TNe=e=>{let t=typeof e;switch(t){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(e)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(e)?"array":e===null?"null":e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?"promise":typeof Map<"u"&&e instanceof Map?"map":typeof Set<"u"&&e instanceof Set?"set":typeof Date<"u"&&e instanceof Date?"date":typeof File<"u"&&e instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${t}`)}},mE=new Set(["string","number","symbol"]),wL=new Set(["string","number","bigint","boolean","symbol","undefined"]);function xl(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function xs(e,t,r){let n=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(n._zod.parent=e),n}function st(e){let t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function DNe(e){let t;return new Proxy({},{get(r,n,o){return t??(t=e()),Reflect.get(t,n,o)},set(r,n,o,i){return t??(t=e()),Reflect.set(t,n,o,i)},has(r,n){return t??(t=e()),Reflect.has(t,n)},deleteProperty(r,n){return t??(t=e()),Reflect.deleteProperty(t,n)},ownKeys(r){return t??(t=e()),Reflect.ownKeys(t)},getOwnPropertyDescriptor(r,n){return t??(t=e()),Reflect.getOwnPropertyDescriptor(t,n)},defineProperty(r,n,o){return t??(t=e()),Reflect.defineProperty(t,n,o)}})}function pr(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function kL(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}var CL={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]},PL={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function nre(e,t){let r=e._zod.def,n=r.checks;if(n&&n.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");let i=l_(e._zod.def,{get shape(){let a={};for(let s in t){if(!(s in r.shape))throw new Error(`Unrecognized key: "${s}"`);t[s]&&(a[s]=r.shape[s])}return rm(this,"shape",a),a},checks:[]});return xs(e,i)}function ore(e,t){let r=e._zod.def,n=r.checks;if(n&&n.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");let i=l_(e._zod.def,{get shape(){let a={...e._zod.def.shape};for(let s in t){if(!(s in r.shape))throw new Error(`Unrecognized key: "${s}"`);t[s]&&delete a[s]}return rm(this,"shape",a),a},checks:[]});return xs(e,i)}function ire(e,t){if(!nm(t))throw new Error("Invalid input to extend: expected a plain object");let r=e._zod.def.checks;if(r&&r.length>0){let i=e._zod.def.shape;for(let a in t)if(Object.getOwnPropertyDescriptor(i,a)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let o=l_(e._zod.def,{get shape(){let i={...e._zod.def.shape,...t};return rm(this,"shape",i),i}});return xs(e,o)}function are(e,t){if(!nm(t))throw new Error("Invalid input to safeExtend: expected a plain object");let r=l_(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return rm(this,"shape",n),n}});return xs(e,r)}function ANe(e,t){let r=l_(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return rm(this,"shape",n),n},get catchall(){return t._zod.def.catchall},checks:[]});return xs(e,r)}function sre(e,t,r){let o=t._zod.def.checks;if(o&&o.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");let a=l_(t._zod.def,{get shape(){let s=t._zod.def.shape,c={...s};if(r)for(let p in r){if(!(p in s))throw new Error(`Unrecognized key: "${p}"`);r[p]&&(c[p]=e?new e({type:"optional",innerType:s[p]}):s[p])}else for(let p in s)c[p]=e?new e({type:"optional",innerType:s[p]}):s[p];return rm(this,"shape",c),c},checks:[]});return xs(t,a)}function cre(e,t,r){let n=l_(t._zod.def,{get shape(){let o=t._zod.def.shape,i={...o};if(r)for(let a in r){if(!(a in i))throw new Error(`Unrecognized key: "${a}"`);r[a]&&(i[a]=new e({type:"nonoptional",innerType:o[a]}))}else for(let a in o)i[a]=new e({type:"nonoptional",innerType:o[a]});return rm(this,"shape",i),i}});return xs(t,n)}function om(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r{var n;return(n=r).path??(n.path=[]),r.path.unshift(e),r})}function dE(e){return typeof e=="string"?e:e?.message}function Zs(e,t,r){let n={...e,path:e.path??[]};if(!e.message){let o=dE(e.inst?._zod.def?.error?.(e))??dE(t?.error?.(e))??dE(r.customError?.(e))??dE(r.localeError?.(e))??"Invalid input";n.message=o}return delete n.inst,delete n.continue,t?.reportInput||delete n.input,n}function hE(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function yE(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function gr(e){let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"nan":"number";case"object":{if(e===null)return"null";if(Array.isArray(e))return"array";let r=e;if(r&&Object.getPrototypeOf(r)!==Object.prototype&&"constructor"in r&&r.constructor)return r.constructor.name}}return t}function j0(...e){let[t,r,n]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:n}:{...t}}function INe(e){return Object.entries(e).filter(([t,r])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}function lre(e){let t=atob(e),r=new Uint8Array(t.length);for(let n=0;nt.toString(16).padStart(2,"0")).join("")}var EL=class{constructor(...t){}};var pre=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,$0,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},YC=ne("$ZodError",pre),gE=ne("$ZodError",pre,{Parent:Error});function eP(e,t=r=>r.message){let r={},n=[];for(let o of e.issues)o.path.length>0?(r[o.path[0]]=r[o.path[0]]||[],r[o.path[0]].push(t(o))):n.push(t(o));return{formErrors:n,fieldErrors:r}}function tP(e,t=r=>r.message){let r={_errors:[]},n=o=>{for(let i of o.issues)if(i.code==="invalid_union"&&i.errors.length)i.errors.map(a=>n({issues:a}));else if(i.code==="invalid_key")n({issues:i.issues});else if(i.code==="invalid_element")n({issues:i.issues});else if(i.path.length===0)r._errors.push(t(i));else{let a=r,s=0;for(;s(t,r,n,o)=>{let i=n?Object.assign(n,{async:!1}):{async:!1},a=t._zod.run({value:r,issues:[]},i);if(a instanceof Promise)throw new Ep;if(a.issues.length){let s=new(o?.Err??e)(a.issues.map(c=>Zs(c,i,Wi())));throw XC(s,o?.callee),s}return a.value},vE=SE(gE),bE=e=>async(t,r,n,o)=>{let i=n?Object.assign(n,{async:!0}):{async:!0},a=t._zod.run({value:r,issues:[]},i);if(a instanceof Promise&&(a=await a),a.issues.length){let s=new(o?.Err??e)(a.issues.map(c=>Zs(c,i,Wi())));throw XC(s,o?.callee),s}return a.value},xE=bE(gE),EE=e=>(t,r,n)=>{let o=n?{...n,async:!1}:{async:!1},i=t._zod.run({value:r,issues:[]},o);if(i instanceof Promise)throw new Ep;return i.issues.length?{success:!1,error:new(e??YC)(i.issues.map(a=>Zs(a,o,Wi())))}:{success:!0,data:i.value}},B0=EE(gE),TE=e=>async(t,r,n)=>{let o=n?Object.assign(n,{async:!0}):{async:!0},i=t._zod.run({value:r,issues:[]},o);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new e(i.issues.map(a=>Zs(a,o,Wi())))}:{success:!0,data:i.value}},DE=TE(gE),dre=e=>(t,r,n)=>{let o=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return SE(e)(t,r,o)};var _re=e=>(t,r,n)=>SE(e)(t,r,n);var fre=e=>async(t,r,n)=>{let o=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return bE(e)(t,r,o)};var mre=e=>async(t,r,n)=>bE(e)(t,r,n);var hre=e=>(t,r,n)=>{let o=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return EE(e)(t,r,o)};var yre=e=>(t,r,n)=>EE(e)(t,r,n);var gre=e=>async(t,r,n)=>{let o=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return TE(e)(t,r,o)};var Sre=e=>async(t,r,n)=>TE(e)(t,r,n);var El={};r0(El,{base64:()=>GL,base64url:()=>rP,bigint:()=>YL,boolean:()=>t$,browserEmail:()=>BNe,cidrv4:()=>VL,cidrv6:()=>KL,cuid:()=>OL,cuid2:()=>NL,date:()=>ZL,datetime:()=>QL,domain:()=>zNe,duration:()=>ML,e164:()=>HL,email:()=>BL,emoji:()=>qL,extendedDuration:()=>NNe,guid:()=>jL,hex:()=>JNe,hostname:()=>UNe,html5Email:()=>$Ne,idnEmail:()=>jNe,integer:()=>e$,ipv4:()=>UL,ipv6:()=>zL,ksuid:()=>LL,lowercase:()=>o$,mac:()=>JL,md5_base64:()=>KNe,md5_base64url:()=>GNe,md5_hex:()=>VNe,nanoid:()=>$L,null:()=>r$,number:()=>nP,rfc5322Email:()=>MNe,sha1_base64:()=>ZNe,sha1_base64url:()=>WNe,sha1_hex:()=>HNe,sha256_base64:()=>XNe,sha256_base64url:()=>YNe,sha256_hex:()=>QNe,sha384_base64:()=>tFe,sha384_base64url:()=>rFe,sha384_hex:()=>eFe,sha512_base64:()=>oFe,sha512_base64url:()=>iFe,sha512_hex:()=>nFe,string:()=>XL,time:()=>WL,ulid:()=>FL,undefined:()=>n$,unicodeEmail:()=>vre,uppercase:()=>i$,uuid:()=>qy,uuid4:()=>FNe,uuid6:()=>RNe,uuid7:()=>LNe,xid:()=>RL});var OL=/^[cC][^\s-]{8,}$/,NL=/^[0-9a-z]+$/,FL=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,RL=/^[0-9a-vA-V]{20}$/,LL=/^[A-Za-z0-9]{27}$/,$L=/^[a-zA-Z0-9_-]{21}$/,ML=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,NNe=/^[-+]?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)?)??$/,jL=/^([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})$/,qy=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,FNe=qy(4),RNe=qy(6),LNe=qy(7),BL=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,$Ne=/^[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])?)*$/,MNe=/^(([^<>()\[\]\\.,;:\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,}))$/,vre=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,jNe=vre,BNe=/^[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])?)*$/,qNe="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function qL(){return new RegExp(qNe,"u")}var UL=/^(?:(?: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])$/,zL=/^(([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}|:))$/,JL=e=>{let t=xl(e??":");return new RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},VL=/^((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])$/,KL=/^(([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])$/,GL=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,rP=/^[A-Za-z0-9_-]*$/,UNe=/^(?=.{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])?)*\.?$/,zNe=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,HL=/^\+[1-9]\d{6,14}$/,bre="(?:(?:\\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])))",ZL=new RegExp(`^${bre}$`);function xre(e){let t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function WL(e){return new RegExp(`^${xre(e)}$`)}function QL(e){let t=xre({precision:e.precision}),r=["Z"];e.local&&r.push(""),e.offset&&r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let n=`${t}(?:${r.join("|")})`;return new RegExp(`^${bre}T(?:${n})$`)}var XL=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},YL=/^-?\d+n?$/,e$=/^-?\d+$/,nP=/^-?\d+(?:\.\d+)?$/,t$=/^(?:true|false)$/i,r$=/^null$/i;var n$=/^undefined$/i;var o$=/^[^A-Z]*$/,i$=/^[^a-z]*$/,JNe=/^[0-9a-fA-F]*$/;function AE(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function IE(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}var VNe=/^[0-9a-fA-F]{32}$/,KNe=AE(22,"=="),GNe=IE(22),HNe=/^[0-9a-fA-F]{40}$/,ZNe=AE(27,"="),WNe=IE(27),QNe=/^[0-9a-fA-F]{64}$/,XNe=AE(43,"="),YNe=IE(43),eFe=/^[0-9a-fA-F]{96}$/,tFe=AE(64,""),rFe=IE(64),nFe=/^[0-9a-fA-F]{128}$/,oFe=AE(86,"=="),iFe=IE(86);var Io=ne("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),Tre={number:"number",bigint:"bigint",object:"date"},a$=ne("$ZodCheckLessThan",(e,t)=>{Io.init(e,t);let r=Tre[typeof t.value];e._zod.onattach.push(n=>{let o=n._zod.bag,i=(t.inclusive?o.maximum:o.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value{(t.inclusive?n.value<=t.value:n.value{Io.init(e,t);let r=Tre[typeof t.value];e._zod.onattach.push(n=>{let o=n._zod.bag,i=(t.inclusive?o.minimum:o.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>i&&(t.inclusive?o.minimum=t.value:o.exclusiveMinimum=t.value)}),e._zod.check=n=>{(t.inclusive?n.value>=t.value:n.value>t.value)||n.issues.push({origin:r,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Dre=ne("$ZodCheckMultipleOf",(e,t)=>{Io.init(e,t),e._zod.onattach.push(r=>{var n;(n=r._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=r=>{if(typeof r.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?r.value%t.value===BigInt(0):TL(r.value,t.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:t.value,input:r.value,inst:e,continue:!t.abort})}}),Are=ne("$ZodCheckNumberFormat",(e,t)=>{Io.init(e,t),t.format=t.format||"float64";let r=t.format?.includes("int"),n=r?"int":"number",[o,i]=CL[t.format];e._zod.onattach.push(a=>{let s=a._zod.bag;s.format=t.format,s.minimum=o,s.maximum=i,r&&(s.pattern=e$)}),e._zod.check=a=>{let s=a.value;if(r){if(!Number.isInteger(s)){a.issues.push({expected:n,format:t.format,code:"invalid_type",continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?a.issues.push({input:s,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,inclusive:!0,continue:!t.abort}):a.issues.push({input:s,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,inclusive:!0,continue:!t.abort});return}}si&&a.issues.push({origin:"number",input:s,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),Ire=ne("$ZodCheckBigIntFormat",(e,t)=>{Io.init(e,t);let[r,n]=PL[t.format];e._zod.onattach.push(o=>{let i=o._zod.bag;i.format=t.format,i.minimum=r,i.maximum=n}),e._zod.check=o=>{let i=o.value;in&&o.issues.push({origin:"bigint",input:i,code:"too_big",maximum:n,inclusive:!0,inst:e,continue:!t.abort})}}),wre=ne("$ZodCheckMaxSize",(e,t)=>{var r;Io.init(e,t),(r=e._zod.def).when??(r.when=n=>{let o=n.value;return!tm(o)&&o.size!==void 0}),e._zod.onattach.push(n=>{let o=n._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum{let o=n.value;o.size<=t.maximum||n.issues.push({origin:hE(o),code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),kre=ne("$ZodCheckMinSize",(e,t)=>{var r;Io.init(e,t),(r=e._zod.def).when??(r.when=n=>{let o=n.value;return!tm(o)&&o.size!==void 0}),e._zod.onattach.push(n=>{let o=n._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>o&&(n._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let o=n.value;o.size>=t.minimum||n.issues.push({origin:hE(o),code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),Cre=ne("$ZodCheckSizeEquals",(e,t)=>{var r;Io.init(e,t),(r=e._zod.def).when??(r.when=n=>{let o=n.value;return!tm(o)&&o.size!==void 0}),e._zod.onattach.push(n=>{let o=n._zod.bag;o.minimum=t.size,o.maximum=t.size,o.size=t.size}),e._zod.check=n=>{let o=n.value,i=o.size;if(i===t.size)return;let a=i>t.size;n.issues.push({origin:hE(o),...a?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),Pre=ne("$ZodCheckMaxLength",(e,t)=>{var r;Io.init(e,t),(r=e._zod.def).when??(r.when=n=>{let o=n.value;return!tm(o)&&o.length!==void 0}),e._zod.onattach.push(n=>{let o=n._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum{let o=n.value;if(o.length<=t.maximum)return;let a=yE(o);n.issues.push({origin:a,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),Ore=ne("$ZodCheckMinLength",(e,t)=>{var r;Io.init(e,t),(r=e._zod.def).when??(r.when=n=>{let o=n.value;return!tm(o)&&o.length!==void 0}),e._zod.onattach.push(n=>{let o=n._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>o&&(n._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let o=n.value;if(o.length>=t.minimum)return;let a=yE(o);n.issues.push({origin:a,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),Nre=ne("$ZodCheckLengthEquals",(e,t)=>{var r;Io.init(e,t),(r=e._zod.def).when??(r.when=n=>{let o=n.value;return!tm(o)&&o.length!==void 0}),e._zod.onattach.push(n=>{let o=n._zod.bag;o.minimum=t.length,o.maximum=t.length,o.length=t.length}),e._zod.check=n=>{let o=n.value,i=o.length;if(i===t.length)return;let a=yE(o),s=i>t.length;n.issues.push({origin:a,...s?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),wE=ne("$ZodCheckStringFormat",(e,t)=>{var r,n;Io.init(e,t),e._zod.onattach.push(o=>{let i=o._zod.bag;i.format=t.format,t.pattern&&(i.patterns??(i.patterns=new Set),i.patterns.add(t.pattern))}),t.pattern?(r=e._zod).check??(r.check=o=>{t.pattern.lastIndex=0,!t.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:t.format,input:o.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(n=e._zod).check??(n.check=()=>{})}),Fre=ne("$ZodCheckRegex",(e,t)=>{wE.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Rre=ne("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=o$),wE.init(e,t)}),Lre=ne("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=i$),wE.init(e,t)}),$re=ne("$ZodCheckIncludes",(e,t)=>{Io.init(e,t);let r=xl(t.includes),n=new RegExp(typeof t.position=="number"?`^.{${t.position}}${r}`:r);t.pattern=n,e._zod.onattach.push(o=>{let i=o._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(n)}),e._zod.check=o=>{o.value.includes(t.includes,t.position)||o.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:o.value,inst:e,continue:!t.abort})}}),Mre=ne("$ZodCheckStartsWith",(e,t)=>{Io.init(e,t);let r=new RegExp(`^${xl(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.onattach.push(n=>{let o=n._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(r)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),jre=ne("$ZodCheckEndsWith",(e,t)=>{Io.init(e,t);let r=new RegExp(`.*${xl(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.onattach.push(n=>{let o=n._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(r)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}});function Ere(e,t,r){e.issues.length&&t.issues.push(...wc(r,e.issues))}var Bre=ne("$ZodCheckProperty",(e,t)=>{Io.init(e,t),e._zod.check=r=>{let n=t.schema._zod.run({value:r.value[t.property],issues:[]},{});if(n instanceof Promise)return n.then(o=>Ere(o,r,t.property));Ere(n,r,t.property)}}),qre=ne("$ZodCheckMimeType",(e,t)=>{Io.init(e,t);let r=new Set(t.mime);e._zod.onattach.push(n=>{n._zod.bag.mime=t.mime}),e._zod.check=n=>{r.has(n.value.type)||n.issues.push({code:"invalid_value",values:t.mime,input:n.value.type,inst:e,continue:!t.abort})}}),Ure=ne("$ZodCheckOverwrite",(e,t)=>{Io.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}});var oP=class{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}let n=t.split(` +`).filter(a=>a),o=Math.min(...n.map(a=>a.length-a.trimStart().length)),i=n.map(a=>a.slice(o)).map(a=>" ".repeat(this.indent*2)+a);for(let a of i)this.content.push(a)}compile(){let t=Function,r=this?.args,o=[...(this?.content??[""]).map(i=>` ${i}`)];return new t(...r,o.join(` +`))}};var Jre={major:4,minor:3,patch:6};var Cr=ne("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Jre;let n=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&n.unshift(e);for(let o of n)for(let i of o._zod.onattach)i(e);if(n.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let o=(a,s,c)=>{let p=om(a),d;for(let f of s){if(f._zod.def.when){if(!f._zod.def.when(a))continue}else if(p)continue;let m=a.issues.length,y=f._zod.check(a);if(y instanceof Promise&&c?.async===!1)throw new Ep;if(d||y instanceof Promise)d=(d??Promise.resolve()).then(async()=>{await y,a.issues.length!==m&&(p||(p=om(a,m)))});else{if(a.issues.length===m)continue;p||(p=om(a,m))}}return d?d.then(()=>a):a},i=(a,s,c)=>{if(om(a))return a.aborted=!0,a;let p=o(s,n,c);if(p instanceof Promise){if(c.async===!1)throw new Ep;return p.then(d=>e._zod.parse(d,c))}return e._zod.parse(p,c)};e._zod.run=(a,s)=>{if(s.skipChecks)return e._zod.parse(a,s);if(s.direction==="backward"){let p=e._zod.parse({value:a.value,issues:[]},{...s,skipChecks:!0});return p instanceof Promise?p.then(d=>i(d,a,s)):i(p,a,s)}let c=e._zod.parse(a,s);if(c instanceof Promise){if(s.async===!1)throw new Ep;return c.then(p=>o(p,n,s))}return o(c,n,s)}}zr(e,"~standard",()=>({validate:o=>{try{let i=B0(e,o);return i.success?{value:i.data}:{issues:i.error?.issues}}catch{return DE(e,o).then(a=>a.success?{value:a.data}:{issues:a.error?.issues})}},vendor:"zod",version:1}))}),Uy=ne("$ZodString",(e,t)=>{Cr.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??XL(e._zod.bag),e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),yo=ne("$ZodStringFormat",(e,t)=>{wE.init(e,t),Uy.init(e,t)}),l$=ne("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=jL),yo.init(e,t)}),u$=ne("$ZodUUID",(e,t)=>{if(t.version){let n={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(n===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=qy(n))}else t.pattern??(t.pattern=qy());yo.init(e,t)}),p$=ne("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=BL),yo.init(e,t)}),d$=ne("$ZodURL",(e,t)=>{yo.init(e,t),e._zod.check=r=>{try{let n=r.value.trim(),o=new URL(n);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(o.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:r.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(o.protocol.endsWith(":")?o.protocol.slice(0,-1):o.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort})),t.normalize?r.value=o.href:r.value=n;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}}),_$=ne("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=qL()),yo.init(e,t)}),f$=ne("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=$L),yo.init(e,t)}),m$=ne("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=OL),yo.init(e,t)}),h$=ne("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=NL),yo.init(e,t)}),y$=ne("$ZodULID",(e,t)=>{t.pattern??(t.pattern=FL),yo.init(e,t)}),g$=ne("$ZodXID",(e,t)=>{t.pattern??(t.pattern=RL),yo.init(e,t)}),S$=ne("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=LL),yo.init(e,t)}),v$=ne("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=QL(t)),yo.init(e,t)}),b$=ne("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=ZL),yo.init(e,t)}),x$=ne("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=WL(t)),yo.init(e,t)}),E$=ne("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=ML),yo.init(e,t)}),T$=ne("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=UL),yo.init(e,t),e._zod.bag.format="ipv4"}),D$=ne("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=zL),yo.init(e,t),e._zod.bag.format="ipv6",e._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!t.abort})}}}),A$=ne("$ZodMAC",(e,t)=>{t.pattern??(t.pattern=JL(t.delimiter)),yo.init(e,t),e._zod.bag.format="mac"}),I$=ne("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=VL),yo.init(e,t)}),w$=ne("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=KL),yo.init(e,t),e._zod.check=r=>{let n=r.value.split("/");try{if(n.length!==2)throw new Error;let[o,i]=n;if(!i)throw new Error;let a=Number(i);if(`${a}`!==i)throw new Error;if(a<0||a>128)throw new Error;new URL(`http://[${o}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!t.abort})}}});function rne(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}var k$=ne("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=GL),yo.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=r=>{rne(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}});function aFe(e){if(!rP.test(e))return!1;let t=e.replace(/[-_]/g,n=>n==="-"?"+":"/"),r=t.padEnd(Math.ceil(t.length/4)*4,"=");return rne(r)}var C$=ne("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=rP),yo.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=r=>{aFe(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),P$=ne("$ZodE164",(e,t)=>{t.pattern??(t.pattern=HL),yo.init(e,t)});function sFe(e,t=null){try{let r=e.split(".");if(r.length!==3)return!1;let[n]=r;if(!n)return!1;let o=JSON.parse(atob(n));return!("typ"in o&&o?.typ!=="JWT"||!o.alg||t&&(!("alg"in o)||o.alg!==t))}catch{return!1}}var O$=ne("$ZodJWT",(e,t)=>{yo.init(e,t),e._zod.check=r=>{sFe(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),N$=ne("$ZodCustomStringFormat",(e,t)=>{yo.init(e,t),e._zod.check=r=>{t.fn(r.value)||r.issues.push({code:"invalid_format",format:t.format,input:r.value,inst:e,continue:!t.abort})}}),uP=ne("$ZodNumber",(e,t)=>{Cr.init(e,t),e._zod.pattern=e._zod.bag.pattern??nP,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=Number(r.value)}catch{}let o=r.value;if(typeof o=="number"&&!Number.isNaN(o)&&Number.isFinite(o))return r;let i=typeof o=="number"?Number.isNaN(o)?"NaN":Number.isFinite(o)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:o,inst:e,...i?{received:i}:{}}),r}}),F$=ne("$ZodNumberFormat",(e,t)=>{Are.init(e,t),uP.init(e,t)}),kE=ne("$ZodBoolean",(e,t)=>{Cr.init(e,t),e._zod.pattern=t$,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=!!r.value}catch{}let o=r.value;return typeof o=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:o,inst:e}),r}}),pP=ne("$ZodBigInt",(e,t)=>{Cr.init(e,t),e._zod.pattern=YL,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=BigInt(r.value)}catch{}return typeof r.value=="bigint"||r.issues.push({expected:"bigint",code:"invalid_type",input:r.value,inst:e}),r}}),R$=ne("$ZodBigIntFormat",(e,t)=>{Ire.init(e,t),pP.init(e,t)}),L$=ne("$ZodSymbol",(e,t)=>{Cr.init(e,t),e._zod.parse=(r,n)=>{let o=r.value;return typeof o=="symbol"||r.issues.push({expected:"symbol",code:"invalid_type",input:o,inst:e}),r}}),$$=ne("$ZodUndefined",(e,t)=>{Cr.init(e,t),e._zod.pattern=n$,e._zod.values=new Set([void 0]),e._zod.optin="optional",e._zod.optout="optional",e._zod.parse=(r,n)=>{let o=r.value;return typeof o>"u"||r.issues.push({expected:"undefined",code:"invalid_type",input:o,inst:e}),r}}),M$=ne("$ZodNull",(e,t)=>{Cr.init(e,t),e._zod.pattern=r$,e._zod.values=new Set([null]),e._zod.parse=(r,n)=>{let o=r.value;return o===null||r.issues.push({expected:"null",code:"invalid_type",input:o,inst:e}),r}}),j$=ne("$ZodAny",(e,t)=>{Cr.init(e,t),e._zod.parse=r=>r}),B$=ne("$ZodUnknown",(e,t)=>{Cr.init(e,t),e._zod.parse=r=>r}),q$=ne("$ZodNever",(e,t)=>{Cr.init(e,t),e._zod.parse=(r,n)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r)}),U$=ne("$ZodVoid",(e,t)=>{Cr.init(e,t),e._zod.parse=(r,n)=>{let o=r.value;return typeof o>"u"||r.issues.push({expected:"void",code:"invalid_type",input:o,inst:e}),r}}),z$=ne("$ZodDate",(e,t)=>{Cr.init(e,t),e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=new Date(r.value)}catch{}let o=r.value,i=o instanceof Date;return i&&!Number.isNaN(o.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:o,...i?{received:"Invalid Date"}:{},inst:e}),r}});function Vre(e,t,r){e.issues.length&&t.issues.push(...wc(r,e.issues)),t.value[r]=e.value}var J$=ne("$ZodArray",(e,t)=>{Cr.init(e,t),e._zod.parse=(r,n)=>{let o=r.value;if(!Array.isArray(o))return r.issues.push({expected:"array",code:"invalid_type",input:o,inst:e}),r;r.value=Array(o.length);let i=[];for(let a=0;aVre(p,r,a))):Vre(c,r,a)}return i.length?Promise.all(i).then(()=>r):r}});function lP(e,t,r,n,o){if(e.issues.length){if(o&&!(r in n))return;t.issues.push(...wc(r,e.issues))}e.value===void 0?r in n&&(t.value[r]=void 0):t.value[r]=e.value}function nne(e){let t=Object.keys(e.shape);for(let n of t)if(!e.shape?.[n]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${n}": expected a Zod schema`);let r=kL(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}function one(e,t,r,n,o,i){let a=[],s=o.keySet,c=o.catchall._zod,p=c.def.type,d=c.optout==="optional";for(let f in t){if(s.has(f))continue;if(p==="never"){a.push(f);continue}let m=c.run({value:t[f],issues:[]},n);m instanceof Promise?e.push(m.then(y=>lP(y,r,f,t,d))):lP(m,r,f,t,d)}return a.length&&r.issues.push({code:"unrecognized_keys",keys:a,input:t,inst:i}),e.length?Promise.all(e).then(()=>r):r}var ine=ne("$ZodObject",(e,t)=>{if(Cr.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){let s=t.shape;Object.defineProperty(t,"shape",{get:()=>{let c={...s};return Object.defineProperty(t,"shape",{value:c}),c}})}let n=M0(()=>nne(t));zr(e._zod,"propValues",()=>{let s=t.shape,c={};for(let p in s){let d=s[p]._zod;if(d.values){c[p]??(c[p]=new Set);for(let f of d.values)c[p].add(f)}}return c});let o=By,i=t.catchall,a;e._zod.parse=(s,c)=>{a??(a=n.value);let p=s.value;if(!o(p))return s.issues.push({expected:"object",code:"invalid_type",input:p,inst:e}),s;s.value={};let d=[],f=a.shape;for(let m of a.keys){let y=f[m],g=y._zod.optout==="optional",S=y._zod.run({value:p[m],issues:[]},c);S instanceof Promise?d.push(S.then(b=>lP(b,s,m,p,g))):lP(S,s,m,p,g)}return i?one(d,p,s,c,n.value,e):d.length?Promise.all(d).then(()=>s):s}}),ane=ne("$ZodObjectJIT",(e,t)=>{ine.init(e,t);let r=e._zod.parse,n=M0(()=>nne(t)),o=m=>{let y=new oP(["shape","payload","ctx"]),g=n.value,S=T=>{let k=QC(T);return`shape[${k}]._zod.run({ value: input[${k}], issues: [] }, ctx)`};y.write("const input = payload.value;");let b=Object.create(null),E=0;for(let T of g.keys)b[T]=`key_${E++}`;y.write("const newResult = {};");for(let T of g.keys){let k=b[T],F=QC(T),$=m[T]?._zod?.optout==="optional";y.write(`const ${k} = ${S(T)};`),$?y.write(` + if (${k}.issues.length) { + if (${F} in input) { + payload.issues = payload.issues.concat(${k}.issues.map(iss => ({ + ...iss, + path: iss.path ? [${F}, ...iss.path] : [${F}] + }))); + } + } + + if (${k}.value === undefined) { + if (${F} in input) { + newResult[${F}] = undefined; + } + } else { + newResult[${F}] = ${k}.value; + } + + `):y.write(` + if (${k}.issues.length) { + payload.issues = payload.issues.concat(${k}.issues.map(iss => ({ + ...iss, + path: iss.path ? [${F}, ...iss.path] : [${F}] + }))); + } + + if (${k}.value === undefined) { + if (${F} in input) { + newResult[${F}] = undefined; + } + } else { + newResult[${F}] = ${k}.value; + } + + `)}y.write("payload.value = newResult;"),y.write("return payload;");let I=y.compile();return(T,k)=>I(m,T,k)},i,a=By,s=!ZC.jitless,p=s&&AL.value,d=t.catchall,f;e._zod.parse=(m,y)=>{f??(f=n.value);let g=m.value;return a(g)?s&&p&&y?.async===!1&&y.jitless!==!0?(i||(i=o(t.shape)),m=i(m,y),d?one([],g,m,y,f,e):m):r(m,y):(m.issues.push({expected:"object",code:"invalid_type",input:g,inst:e}),m)}});function Kre(e,t,r,n){for(let i of e)if(i.issues.length===0)return t.value=i.value,t;let o=e.filter(i=>!om(i));return o.length===1?(t.value=o[0].value,o[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(i=>i.issues.map(a=>Zs(a,n,Wi())))}),t)}var CE=ne("$ZodUnion",(e,t)=>{Cr.init(e,t),zr(e._zod,"optin",()=>t.options.some(o=>o._zod.optin==="optional")?"optional":void 0),zr(e._zod,"optout",()=>t.options.some(o=>o._zod.optout==="optional")?"optional":void 0),zr(e._zod,"values",()=>{if(t.options.every(o=>o._zod.values))return new Set(t.options.flatMap(o=>Array.from(o._zod.values)))}),zr(e._zod,"pattern",()=>{if(t.options.every(o=>o._zod.pattern)){let o=t.options.map(i=>i._zod.pattern);return new RegExp(`^(${o.map(i=>fE(i.source)).join("|")})$`)}});let r=t.options.length===1,n=t.options[0]._zod.run;e._zod.parse=(o,i)=>{if(r)return n(o,i);let a=!1,s=[];for(let c of t.options){let p=c._zod.run({value:o.value,issues:[]},i);if(p instanceof Promise)s.push(p),a=!0;else{if(p.issues.length===0)return p;s.push(p)}}return a?Promise.all(s).then(c=>Kre(c,o,e,i)):Kre(s,o,e,i)}});function Gre(e,t,r,n){let o=e.filter(i=>i.issues.length===0);return o.length===1?(t.value=o[0].value,t):(o.length===0?t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(i=>i.issues.map(a=>Zs(a,n,Wi())))}):t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:[],inclusive:!1}),t)}var V$=ne("$ZodXor",(e,t)=>{CE.init(e,t),t.inclusive=!1;let r=t.options.length===1,n=t.options[0]._zod.run;e._zod.parse=(o,i)=>{if(r)return n(o,i);let a=!1,s=[];for(let c of t.options){let p=c._zod.run({value:o.value,issues:[]},i);p instanceof Promise?(s.push(p),a=!0):s.push(p)}return a?Promise.all(s).then(c=>Gre(c,o,e,i)):Gre(s,o,e,i)}}),K$=ne("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,CE.init(e,t);let r=e._zod.parse;zr(e._zod,"propValues",()=>{let o={};for(let i of t.options){let a=i._zod.propValues;if(!a||Object.keys(a).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(i)}"`);for(let[s,c]of Object.entries(a)){o[s]||(o[s]=new Set);for(let p of c)o[s].add(p)}}return o});let n=M0(()=>{let o=t.options,i=new Map;for(let a of o){let s=a._zod.propValues?.[t.discriminator];if(!s||s.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(a)}"`);for(let c of s){if(i.has(c))throw new Error(`Duplicate discriminator value "${String(c)}"`);i.set(c,a)}}return i});e._zod.parse=(o,i)=>{let a=o.value;if(!By(a))return o.issues.push({code:"invalid_type",expected:"object",input:a,inst:e}),o;let s=n.value.get(a?.[t.discriminator]);return s?s._zod.run(o,i):t.unionFallback?r(o,i):(o.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:a,path:[t.discriminator],inst:e}),o)}}),G$=ne("$ZodIntersection",(e,t)=>{Cr.init(e,t),e._zod.parse=(r,n)=>{let o=r.value,i=t.left._zod.run({value:o,issues:[]},n),a=t.right._zod.run({value:o,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([c,p])=>Hre(r,c,p)):Hre(r,i,a)}});function c$(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(nm(e)&&nm(t)){let r=Object.keys(t),n=Object.keys(e).filter(i=>r.indexOf(i)!==-1),o={...e,...t};for(let i of n){let a=c$(e[i],t[i]);if(!a.valid)return{valid:!1,mergeErrorPath:[i,...a.mergeErrorPath]};o[i]=a.data}return{valid:!0,data:o}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let r=[];for(let n=0;ns.l&&s.r).map(([s])=>s);if(i.length&&o&&e.issues.push({...o,keys:i}),om(e))return e;let a=c$(t.value,r.value);if(!a.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(a.mergeErrorPath)}`);return e.value=a.data,e}var dP=ne("$ZodTuple",(e,t)=>{Cr.init(e,t);let r=t.items;e._zod.parse=(n,o)=>{let i=n.value;if(!Array.isArray(i))return n.issues.push({input:i,inst:e,expected:"tuple",code:"invalid_type"}),n;n.value=[];let a=[],s=[...r].reverse().findIndex(d=>d._zod.optin!=="optional"),c=s===-1?0:r.length-s;if(!t.rest){let d=i.length>r.length,f=i.length=i.length&&p>=c)continue;let f=d._zod.run({value:i[p],issues:[]},o);f instanceof Promise?a.push(f.then(m=>iP(m,n,p))):iP(f,n,p)}if(t.rest){let d=i.slice(r.length);for(let f of d){p++;let m=t.rest._zod.run({value:f,issues:[]},o);m instanceof Promise?a.push(m.then(y=>iP(y,n,p))):iP(m,n,p)}}return a.length?Promise.all(a).then(()=>n):n}});function iP(e,t,r){e.issues.length&&t.issues.push(...wc(r,e.issues)),t.value[r]=e.value}var H$=ne("$ZodRecord",(e,t)=>{Cr.init(e,t),e._zod.parse=(r,n)=>{let o=r.value;if(!nm(o))return r.issues.push({expected:"record",code:"invalid_type",input:o,inst:e}),r;let i=[],a=t.keyType._zod.values;if(a){r.value={};let s=new Set;for(let p of a)if(typeof p=="string"||typeof p=="number"||typeof p=="symbol"){s.add(typeof p=="number"?p.toString():p);let d=t.valueType._zod.run({value:o[p],issues:[]},n);d instanceof Promise?i.push(d.then(f=>{f.issues.length&&r.issues.push(...wc(p,f.issues)),r.value[p]=f.value})):(d.issues.length&&r.issues.push(...wc(p,d.issues)),r.value[p]=d.value)}let c;for(let p in o)s.has(p)||(c=c??[],c.push(p));c&&c.length>0&&r.issues.push({code:"unrecognized_keys",input:o,inst:e,keys:c})}else{r.value={};for(let s of Reflect.ownKeys(o)){if(s==="__proto__")continue;let c=t.keyType._zod.run({value:s,issues:[]},n);if(c instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof s=="string"&&nP.test(s)&&c.issues.length){let f=t.keyType._zod.run({value:Number(s),issues:[]},n);if(f instanceof Promise)throw new Error("Async schemas not supported in object keys currently");f.issues.length===0&&(c=f)}if(c.issues.length){t.mode==="loose"?r.value[s]=o[s]:r.issues.push({code:"invalid_key",origin:"record",issues:c.issues.map(f=>Zs(f,n,Wi())),input:s,path:[s],inst:e});continue}let d=t.valueType._zod.run({value:o[s],issues:[]},n);d instanceof Promise?i.push(d.then(f=>{f.issues.length&&r.issues.push(...wc(s,f.issues)),r.value[c.value]=f.value})):(d.issues.length&&r.issues.push(...wc(s,d.issues)),r.value[c.value]=d.value)}}return i.length?Promise.all(i).then(()=>r):r}}),Z$=ne("$ZodMap",(e,t)=>{Cr.init(e,t),e._zod.parse=(r,n)=>{let o=r.value;if(!(o instanceof Map))return r.issues.push({expected:"map",code:"invalid_type",input:o,inst:e}),r;let i=[];r.value=new Map;for(let[a,s]of o){let c=t.keyType._zod.run({value:a,issues:[]},n),p=t.valueType._zod.run({value:s,issues:[]},n);c instanceof Promise||p instanceof Promise?i.push(Promise.all([c,p]).then(([d,f])=>{Zre(d,f,r,a,o,e,n)})):Zre(c,p,r,a,o,e,n)}return i.length?Promise.all(i).then(()=>r):r}});function Zre(e,t,r,n,o,i,a){e.issues.length&&(mE.has(typeof n)?r.issues.push(...wc(n,e.issues)):r.issues.push({code:"invalid_key",origin:"map",input:o,inst:i,issues:e.issues.map(s=>Zs(s,a,Wi()))})),t.issues.length&&(mE.has(typeof n)?r.issues.push(...wc(n,t.issues)):r.issues.push({origin:"map",code:"invalid_element",input:o,inst:i,key:n,issues:t.issues.map(s=>Zs(s,a,Wi()))})),r.value.set(e.value,t.value)}var W$=ne("$ZodSet",(e,t)=>{Cr.init(e,t),e._zod.parse=(r,n)=>{let o=r.value;if(!(o instanceof Set))return r.issues.push({input:o,inst:e,expected:"set",code:"invalid_type"}),r;let i=[];r.value=new Set;for(let a of o){let s=t.valueType._zod.run({value:a,issues:[]},n);s instanceof Promise?i.push(s.then(c=>Wre(c,r))):Wre(s,r)}return i.length?Promise.all(i).then(()=>r):r}});function Wre(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}var Q$=ne("$ZodEnum",(e,t)=>{Cr.init(e,t);let r=_E(t.entries),n=new Set(r);e._zod.values=n,e._zod.pattern=new RegExp(`^(${r.filter(o=>mE.has(typeof o)).map(o=>typeof o=="string"?xl(o):o.toString()).join("|")})$`),e._zod.parse=(o,i)=>{let a=o.value;return n.has(a)||o.issues.push({code:"invalid_value",values:r,input:a,inst:e}),o}}),X$=ne("$ZodLiteral",(e,t)=>{if(Cr.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");let r=new Set(t.values);e._zod.values=r,e._zod.pattern=new RegExp(`^(${t.values.map(n=>typeof n=="string"?xl(n):n?xl(n.toString()):String(n)).join("|")})$`),e._zod.parse=(n,o)=>{let i=n.value;return r.has(i)||n.issues.push({code:"invalid_value",values:t.values,input:i,inst:e}),n}}),Y$=ne("$ZodFile",(e,t)=>{Cr.init(e,t),e._zod.parse=(r,n)=>{let o=r.value;return o instanceof File||r.issues.push({expected:"file",code:"invalid_type",input:o,inst:e}),r}}),eM=ne("$ZodTransform",(e,t)=>{Cr.init(e,t),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new jy(e.constructor.name);let o=t.transform(r.value,r);if(n.async)return(o instanceof Promise?o:Promise.resolve(o)).then(a=>(r.value=a,r));if(o instanceof Promise)throw new Ep;return r.value=o,r}});function Qre(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}var _P=ne("$ZodOptional",(e,t)=>{Cr.init(e,t),e._zod.optin="optional",e._zod.optout="optional",zr(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),zr(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${fE(r.source)})?$`):void 0}),e._zod.parse=(r,n)=>{if(t.innerType._zod.optin==="optional"){let o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(i=>Qre(i,r.value)):Qre(o,r.value)}return r.value===void 0?r:t.innerType._zod.run(r,n)}}),tM=ne("$ZodExactOptional",(e,t)=>{_P.init(e,t),zr(e._zod,"values",()=>t.innerType._zod.values),zr(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(r,n)=>t.innerType._zod.run(r,n)}),rM=ne("$ZodNullable",(e,t)=>{Cr.init(e,t),zr(e._zod,"optin",()=>t.innerType._zod.optin),zr(e._zod,"optout",()=>t.innerType._zod.optout),zr(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${fE(r.source)}|null)$`):void 0}),zr(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(r,n)=>r.value===null?r:t.innerType._zod.run(r,n)}),nM=ne("$ZodDefault",(e,t)=>{Cr.init(e,t),e._zod.optin="optional",zr(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);if(r.value===void 0)return r.value=t.defaultValue,r;let o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(i=>Xre(i,t)):Xre(o,t)}});function Xre(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var oM=ne("$ZodPrefault",(e,t)=>{Cr.init(e,t),e._zod.optin="optional",zr(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>(n.direction==="backward"||r.value===void 0&&(r.value=t.defaultValue),t.innerType._zod.run(r,n))}),iM=ne("$ZodNonOptional",(e,t)=>{Cr.init(e,t),zr(e._zod,"values",()=>{let r=t.innerType._zod.values;return r?new Set([...r].filter(n=>n!==void 0)):void 0}),e._zod.parse=(r,n)=>{let o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(i=>Yre(i,e)):Yre(o,e)}});function Yre(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}var aM=ne("$ZodSuccess",(e,t)=>{Cr.init(e,t),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new jy("ZodSuccess");let o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(i=>(r.value=i.issues.length===0,r)):(r.value=o.issues.length===0,r)}}),sM=ne("$ZodCatch",(e,t)=>{Cr.init(e,t),zr(e._zod,"optin",()=>t.innerType._zod.optin),zr(e._zod,"optout",()=>t.innerType._zod.optout),zr(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);let o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(i=>(r.value=i.value,i.issues.length&&(r.value=t.catchValue({...r,error:{issues:i.issues.map(a=>Zs(a,n,Wi()))},input:r.value}),r.issues=[]),r)):(r.value=o.value,o.issues.length&&(r.value=t.catchValue({...r,error:{issues:o.issues.map(i=>Zs(i,n,Wi()))},input:r.value}),r.issues=[]),r)}}),cM=ne("$ZodNaN",(e,t)=>{Cr.init(e,t),e._zod.parse=(r,n)=>((typeof r.value!="number"||!Number.isNaN(r.value))&&r.issues.push({input:r.value,inst:e,expected:"nan",code:"invalid_type"}),r)}),lM=ne("$ZodPipe",(e,t)=>{Cr.init(e,t),zr(e._zod,"values",()=>t.in._zod.values),zr(e._zod,"optin",()=>t.in._zod.optin),zr(e._zod,"optout",()=>t.out._zod.optout),zr(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,n)=>{if(n.direction==="backward"){let i=t.out._zod.run(r,n);return i instanceof Promise?i.then(a=>aP(a,t.in,n)):aP(i,t.in,n)}let o=t.in._zod.run(r,n);return o instanceof Promise?o.then(i=>aP(i,t.out,n)):aP(o,t.out,n)}});function aP(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},r)}var PE=ne("$ZodCodec",(e,t)=>{Cr.init(e,t),zr(e._zod,"values",()=>t.in._zod.values),zr(e._zod,"optin",()=>t.in._zod.optin),zr(e._zod,"optout",()=>t.out._zod.optout),zr(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,n)=>{if((n.direction||"forward")==="forward"){let i=t.in._zod.run(r,n);return i instanceof Promise?i.then(a=>sP(a,t,n)):sP(i,t,n)}else{let i=t.out._zod.run(r,n);return i instanceof Promise?i.then(a=>sP(a,t,n)):sP(i,t,n)}}});function sP(e,t,r){if(e.issues.length)return e.aborted=!0,e;if((r.direction||"forward")==="forward"){let o=t.transform(e.value,e);return o instanceof Promise?o.then(i=>cP(e,i,t.out,r)):cP(e,o,t.out,r)}else{let o=t.reverseTransform(e.value,e);return o instanceof Promise?o.then(i=>cP(e,i,t.in,r)):cP(e,o,t.in,r)}}function cP(e,t,r,n){return e.issues.length?(e.aborted=!0,e):r._zod.run({value:t,issues:e.issues},n)}var uM=ne("$ZodReadonly",(e,t)=>{Cr.init(e,t),zr(e._zod,"propValues",()=>t.innerType._zod.propValues),zr(e._zod,"values",()=>t.innerType._zod.values),zr(e._zod,"optin",()=>t.innerType?._zod?.optin),zr(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);let o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(ene):ene(o)}});function ene(e){return e.value=Object.freeze(e.value),e}var pM=ne("$ZodTemplateLiteral",(e,t)=>{Cr.init(e,t);let r=[];for(let n of t.parts)if(typeof n=="object"&&n!==null){if(!n._zod.pattern)throw new Error(`Invalid template literal part, no pattern found: ${[...n._zod.traits].shift()}`);let o=n._zod.pattern instanceof RegExp?n._zod.pattern.source:n._zod.pattern;if(!o)throw new Error(`Invalid template literal part: ${n._zod.traits}`);let i=o.startsWith("^")?1:0,a=o.endsWith("$")?o.length-1:o.length;r.push(o.slice(i,a))}else if(n===null||wL.has(typeof n))r.push(xl(`${n}`));else throw new Error(`Invalid template literal part: ${n}`);e._zod.pattern=new RegExp(`^${r.join("")}$`),e._zod.parse=(n,o)=>typeof n.value!="string"?(n.issues.push({input:n.value,inst:e,expected:"string",code:"invalid_type"}),n):(e._zod.pattern.lastIndex=0,e._zod.pattern.test(n.value)||n.issues.push({input:n.value,inst:e,code:"invalid_format",format:t.format??"template_literal",pattern:e._zod.pattern.source}),n)}),dM=ne("$ZodFunction",(e,t)=>(Cr.init(e,t),e._def=t,e._zod.def=t,e.implement=r=>{if(typeof r!="function")throw new Error("implement() must be called with a function");return function(...n){let o=e._def.input?vE(e._def.input,n):n,i=Reflect.apply(r,this,o);return e._def.output?vE(e._def.output,i):i}},e.implementAsync=r=>{if(typeof r!="function")throw new Error("implementAsync() must be called with a function");return async function(...n){let o=e._def.input?await xE(e._def.input,n):n,i=await Reflect.apply(r,this,o);return e._def.output?await xE(e._def.output,i):i}},e._zod.parse=(r,n)=>typeof r.value!="function"?(r.issues.push({code:"invalid_type",expected:"function",input:r.value,inst:e}),r):(e._def.output&&e._def.output._zod.def.type==="promise"?r.value=e.implementAsync(r.value):r.value=e.implement(r.value),r),e.input=(...r)=>{let n=e.constructor;return Array.isArray(r[0])?new n({type:"function",input:new dP({type:"tuple",items:r[0],rest:r[1]}),output:e._def.output}):new n({type:"function",input:r[0],output:e._def.output})},e.output=r=>{let n=e.constructor;return new n({type:"function",input:e._def.input,output:r})},e)),_M=ne("$ZodPromise",(e,t)=>{Cr.init(e,t),e._zod.parse=(r,n)=>Promise.resolve(r.value).then(o=>t.innerType._zod.run({value:o,issues:[]},n))}),fM=ne("$ZodLazy",(e,t)=>{Cr.init(e,t),zr(e._zod,"innerType",()=>t.getter()),zr(e._zod,"pattern",()=>e._zod.innerType?._zod?.pattern),zr(e._zod,"propValues",()=>e._zod.innerType?._zod?.propValues),zr(e._zod,"optin",()=>e._zod.innerType?._zod?.optin??void 0),zr(e._zod,"optout",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(r,n)=>e._zod.innerType._zod.run(r,n)}),mM=ne("$ZodCustom",(e,t)=>{Io.init(e,t),Cr.init(e,t),e._zod.parse=(r,n)=>r,e._zod.check=r=>{let n=r.value,o=t.fn(n);if(o instanceof Promise)return o.then(i=>tne(i,r,n,e));tne(o,r,n,e)}});function tne(e,t,r,n){if(!e){let o={code:"custom",input:r,inst:n,path:[...n._zod.def.path??[]],continue:!n._zod.def.abort};n._zod.def.params&&(o.params=n._zod.def.params),t.issues.push(j0(o))}}var lFe=()=>{let e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}};function t(o){return e[o]??null}let r={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"},n={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=gr(o.input),s=n[a]??a;return`Invalid input: expected ${i}, received ${s}`}case"invalid_value":return o.values.length===1?`Invalid input: expected ${pr(o.values[0])}`:`Invalid option: expected one of ${ur(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`Too big: expected ${o.origin??"value"} to have ${i}${o.maximum.toString()} ${a.unit??"elements"}`:`Too big: expected ${o.origin??"value"} to be ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`Too small: expected ${o.origin} to have ${i}${o.minimum.toString()} ${a.unit}`:`Too small: expected ${o.origin} to be ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Invalid string: must start with "${i.prefix}"`:i.format==="ends_with"?`Invalid string: must end with "${i.suffix}"`:i.format==="includes"?`Invalid string: must include "${i.includes}"`:i.format==="regex"?`Invalid string: must match pattern ${i.pattern}`:`Invalid ${r[i.format]??o.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${o.divisor}`;case"unrecognized_keys":return`Unrecognized key${o.keys.length>1?"s":""}: ${ur(o.keys,", ")}`;case"invalid_key":return`Invalid key in ${o.origin}`;case"invalid_union":return"Invalid input";case"invalid_element":return`Invalid value in ${o.origin}`;default:return"Invalid input"}}};function hM(){return{localeError:lFe()}}var sne;var gM=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...r){let n=r[0];return this._map.set(t,n),n&&typeof n=="object"&&"id"in n&&this._idmap.set(n.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){let r=this._map.get(t);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(t),this}get(t){let r=t._zod.parent;if(r){let n={...this.get(r)??{}};delete n.id;let o={...n,...this._map.get(t)};return Object.keys(o).length?o:void 0}return this._map.get(t)}has(t){return this._map.has(t)}};function SM(){return new gM}(sne=globalThis).__zod_globalRegistry??(sne.__zod_globalRegistry=SM());var Es=globalThis.__zod_globalRegistry;function vM(e,t){return new e({type:"string",...st(t)})}function bM(e,t){return new e({type:"string",coerce:!0,...st(t)})}function fP(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...st(t)})}function OE(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...st(t)})}function mP(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...st(t)})}function hP(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...st(t)})}function yP(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...st(t)})}function gP(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...st(t)})}function NE(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...st(t)})}function SP(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...st(t)})}function vP(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...st(t)})}function bP(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...st(t)})}function xP(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...st(t)})}function EP(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...st(t)})}function TP(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...st(t)})}function DP(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...st(t)})}function AP(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...st(t)})}function IP(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...st(t)})}function xM(e,t){return new e({type:"string",format:"mac",check:"string_format",abort:!1,...st(t)})}function wP(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...st(t)})}function kP(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...st(t)})}function CP(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...st(t)})}function PP(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...st(t)})}function OP(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...st(t)})}function NP(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...st(t)})}function EM(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...st(t)})}function TM(e,t){return new e({type:"string",format:"date",check:"string_format",...st(t)})}function DM(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...st(t)})}function AM(e,t){return new e({type:"string",format:"duration",check:"string_format",...st(t)})}function IM(e,t){return new e({type:"number",checks:[],...st(t)})}function wM(e,t){return new e({type:"number",coerce:!0,checks:[],...st(t)})}function kM(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...st(t)})}function CM(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...st(t)})}function PM(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...st(t)})}function OM(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...st(t)})}function NM(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...st(t)})}function FM(e,t){return new e({type:"boolean",...st(t)})}function RM(e,t){return new e({type:"boolean",coerce:!0,...st(t)})}function LM(e,t){return new e({type:"bigint",...st(t)})}function $M(e,t){return new e({type:"bigint",coerce:!0,...st(t)})}function MM(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...st(t)})}function jM(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...st(t)})}function BM(e,t){return new e({type:"symbol",...st(t)})}function qM(e,t){return new e({type:"undefined",...st(t)})}function UM(e,t){return new e({type:"null",...st(t)})}function zM(e){return new e({type:"any"})}function JM(e){return new e({type:"unknown"})}function VM(e,t){return new e({type:"never",...st(t)})}function KM(e,t){return new e({type:"void",...st(t)})}function GM(e,t){return new e({type:"date",...st(t)})}function HM(e,t){return new e({type:"date",coerce:!0,...st(t)})}function ZM(e,t){return new e({type:"nan",...st(t)})}function u_(e,t){return new a$({check:"less_than",...st(t),value:e,inclusive:!1})}function kc(e,t){return new a$({check:"less_than",...st(t),value:e,inclusive:!0})}function p_(e,t){return new s$({check:"greater_than",...st(t),value:e,inclusive:!1})}function Ts(e,t){return new s$({check:"greater_than",...st(t),value:e,inclusive:!0})}function WM(e){return p_(0,e)}function QM(e){return u_(0,e)}function XM(e){return kc(0,e)}function YM(e){return Ts(0,e)}function zy(e,t){return new Dre({check:"multiple_of",...st(t),value:e})}function Jy(e,t){return new wre({check:"max_size",...st(t),maximum:e})}function d_(e,t){return new kre({check:"min_size",...st(t),minimum:e})}function q0(e,t){return new Cre({check:"size_equals",...st(t),size:e})}function U0(e,t){return new Pre({check:"max_length",...st(t),maximum:e})}function im(e,t){return new Ore({check:"min_length",...st(t),minimum:e})}function z0(e,t){return new Nre({check:"length_equals",...st(t),length:e})}function FE(e,t){return new Fre({check:"string_format",format:"regex",...st(t),pattern:e})}function RE(e){return new Rre({check:"string_format",format:"lowercase",...st(e)})}function LE(e){return new Lre({check:"string_format",format:"uppercase",...st(e)})}function $E(e,t){return new $re({check:"string_format",format:"includes",...st(t),includes:e})}function ME(e,t){return new Mre({check:"string_format",format:"starts_with",...st(t),prefix:e})}function jE(e,t){return new jre({check:"string_format",format:"ends_with",...st(t),suffix:e})}function e7(e,t,r){return new Bre({check:"property",property:e,schema:t,...st(r)})}function BE(e,t){return new qre({check:"mime_type",mime:e,...st(t)})}function Tp(e){return new Ure({check:"overwrite",tx:e})}function qE(e){return Tp(t=>t.normalize(e))}function UE(){return Tp(e=>e.trim())}function zE(){return Tp(e=>e.toLowerCase())}function JE(){return Tp(e=>e.toUpperCase())}function FP(){return Tp(e=>DL(e))}function cne(e,t,r){return new e({type:"array",element:t,...st(r)})}function t7(e,t){return new e({type:"file",...st(t)})}function r7(e,t,r){let n=st(r);return n.abort??(n.abort=!0),new e({type:"custom",check:"custom",fn:t,...n})}function n7(e,t,r){return new e({type:"custom",check:"custom",fn:t,...st(r)})}function o7(e){let t=_Fe(r=>(r.addIssue=n=>{if(typeof n=="string")r.issues.push(j0(n,r.value,t._zod.def));else{let o=n;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=r.value),o.inst??(o.inst=t),o.continue??(o.continue=!t._zod.def.abort),r.issues.push(j0(o))}},e(r.value,r)));return t}function _Fe(e,t){let r=new Io({check:"custom",...st(t)});return r._zod.check=e,r}function i7(e){let t=new Io({check:"describe"});return t._zod.onattach=[r=>{let n=Es.get(r)??{};Es.add(r,{...n,description:e})}],t._zod.check=()=>{},t}function a7(e){let t=new Io({check:"meta"});return t._zod.onattach=[r=>{let n=Es.get(r)??{};Es.add(r,{...n,...e})}],t._zod.check=()=>{},t}function s7(e,t){let r=st(t),n=r.truthy??["true","1","yes","on","y","enabled"],o=r.falsy??["false","0","no","off","n","disabled"];r.case!=="sensitive"&&(n=n.map(y=>typeof y=="string"?y.toLowerCase():y),o=o.map(y=>typeof y=="string"?y.toLowerCase():y));let i=new Set(n),a=new Set(o),s=e.Codec??PE,c=e.Boolean??kE,p=e.String??Uy,d=new p({type:"string",error:r.error}),f=new c({type:"boolean",error:r.error}),m=new s({type:"pipe",in:d,out:f,transform:((y,g)=>{let S=y;return r.case!=="sensitive"&&(S=S.toLowerCase()),i.has(S)?!0:a.has(S)?!1:(g.issues.push({code:"invalid_value",expected:"stringbool",values:[...i,...a],input:g.value,inst:m,continue:!1}),{})}),reverseTransform:((y,g)=>y===!0?n[0]||"true":o[0]||"false"),error:r.error});return m}function J0(e,t,r,n={}){let o=st(n),i={...st(n),check:"string_format",type:"string",format:t,fn:typeof r=="function"?r:s=>r.test(s),...o};return r instanceof RegExp&&(i.pattern=r),new e(i)}function RP(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??Es,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function Fo(e,t,r={path:[],schemaPath:[]}){var n;let o=e._zod.def,i=t.seen.get(e);if(i)return i.count++,r.schemaPath.includes(e)&&(i.cycle=r.path),i.schema;let a={schema:{},count:1,cycle:void 0,path:r.path};t.seen.set(e,a);let s=e._zod.toJSONSchema?.();if(s)a.schema=s;else{let d={...r,schemaPath:[...r.schemaPath,e],path:r.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,a.schema,d);else{let m=a.schema,y=t.processors[o.type];if(!y)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);y(e,t,m,d)}let f=e._zod.parent;f&&(a.ref||(a.ref=f),Fo(f,t,d),t.seen.get(f).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&Object.assign(a.schema,c),t.io==="input"&&Ds(e)&&(delete a.schema.examples,delete a.schema.default),t.io==="input"&&a.schema._prefault&&((n=a.schema).default??(n.default=a.schema._prefault)),delete a.schema._prefault,t.seen.get(e).schema}function LP(e,t){let r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");let n=new Map;for(let a of e.seen.entries()){let s=e.metadataRegistry.get(a[0])?.id;if(s){let c=n.get(s);if(c&&c!==a[0])throw new Error(`Duplicate schema id "${s}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);n.set(s,a[0])}}let o=a=>{let s=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){let f=e.external.registry.get(a[0])?.id,m=e.external.uri??(g=>g);if(f)return{ref:m(f)};let y=a[1].defId??a[1].schema.id??`schema${e.counter++}`;return a[1].defId=y,{defId:y,ref:`${m("__shared")}#/${s}/${y}`}}if(a[1]===r)return{ref:"#"};let p=`#/${s}/`,d=a[1].schema.id??`__schema${e.counter++}`;return{defId:d,ref:p+d}},i=a=>{if(a[1].schema.$ref)return;let s=a[1],{ref:c,defId:p}=o(a);s.def={...s.schema},p&&(s.defId=p);let d=s.schema;for(let f in d)delete d[f];d.$ref=c};if(e.cycles==="throw")for(let a of e.seen.entries()){let s=a[1];if(s.cycle)throw new Error(`Cycle detected: #/${s.cycle?.join("/")}/ + +Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let a of e.seen.entries()){let s=a[1];if(t===a[0]){i(a);continue}if(e.external){let p=e.external.registry.get(a[0])?.id;if(t!==a[0]&&p){i(a);continue}}if(e.metadataRegistry.get(a[0])?.id){i(a);continue}if(s.cycle){i(a);continue}if(s.count>1&&e.reused==="ref"){i(a);continue}}}function $P(e,t){let r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");let n=a=>{let s=e.seen.get(a);if(s.ref===null)return;let c=s.def??s.schema,p={...c},d=s.ref;if(s.ref=null,d){n(d);let m=e.seen.get(d),y=m.schema;if(y.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(c.allOf=c.allOf??[],c.allOf.push(y)):Object.assign(c,y),Object.assign(c,p),a._zod.parent===d)for(let S in c)S==="$ref"||S==="allOf"||S in p||delete c[S];if(y.$ref&&m.def)for(let S in c)S==="$ref"||S==="allOf"||S in m.def&&JSON.stringify(c[S])===JSON.stringify(m.def[S])&&delete c[S]}let f=a._zod.parent;if(f&&f!==d){n(f);let m=e.seen.get(f);if(m?.schema.$ref&&(c.$ref=m.schema.$ref,m.def))for(let y in c)y==="$ref"||y==="allOf"||y in m.def&&JSON.stringify(c[y])===JSON.stringify(m.def[y])&&delete c[y]}e.override({zodSchema:a,jsonSchema:c,path:s.path??[]})};for(let a of[...e.seen.entries()].reverse())n(a[0]);let o={};if(e.target==="draft-2020-12"?o.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?o.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?o.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){let a=e.external.registry.get(t)?.id;if(!a)throw new Error("Schema is missing an `id` property");o.$id=e.external.uri(a)}Object.assign(o,r.def??r.schema);let i=e.external?.defs??{};for(let a of e.seen.entries()){let s=a[1];s.def&&s.defId&&(i[s.defId]=s.def)}e.external||Object.keys(i).length>0&&(e.target==="draft-2020-12"?o.$defs=i:o.definitions=i);try{let a=JSON.parse(JSON.stringify(o));return Object.defineProperty(a,"~standard",{value:{...t["~standard"],jsonSchema:{input:VE(t,"input",e.processors),output:VE(t,"output",e.processors)}},enumerable:!1,writable:!1}),a}catch{throw new Error("Error converting schema to JSON.")}}function Ds(e,t){let r=t??{seen:new Set};if(r.seen.has(e))return!1;r.seen.add(e);let n=e._zod.def;if(n.type==="transform")return!0;if(n.type==="array")return Ds(n.element,r);if(n.type==="set")return Ds(n.valueType,r);if(n.type==="lazy")return Ds(n.getter(),r);if(n.type==="promise"||n.type==="optional"||n.type==="nonoptional"||n.type==="nullable"||n.type==="readonly"||n.type==="default"||n.type==="prefault")return Ds(n.innerType,r);if(n.type==="intersection")return Ds(n.left,r)||Ds(n.right,r);if(n.type==="record"||n.type==="map")return Ds(n.keyType,r)||Ds(n.valueType,r);if(n.type==="pipe")return Ds(n.in,r)||Ds(n.out,r);if(n.type==="object"){for(let o in n.shape)if(Ds(n.shape[o],r))return!0;return!1}if(n.type==="union"){for(let o of n.options)if(Ds(o,r))return!0;return!1}if(n.type==="tuple"){for(let o of n.items)if(Ds(o,r))return!0;return!!(n.rest&&Ds(n.rest,r))}return!1}var lne=(e,t={})=>r=>{let n=RP({...r,processors:t});return Fo(e,n),LP(n,e),$P(n,e)},VE=(e,t,r={})=>n=>{let{libraryOptions:o,target:i}=n??{},a=RP({...o??{},target:i,io:t,processors:r});return Fo(e,a),LP(a,e),$P(a,e)};var fFe={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},une=(e,t,r,n)=>{let o=r;o.type="string";let{minimum:i,maximum:a,format:s,patterns:c,contentEncoding:p}=e._zod.bag;if(typeof i=="number"&&(o.minLength=i),typeof a=="number"&&(o.maxLength=a),s&&(o.format=fFe[s]??s,o.format===""&&delete o.format,s==="time"&&delete o.format),p&&(o.contentEncoding=p),c&&c.size>0){let d=[...c];d.length===1?o.pattern=d[0].source:d.length>1&&(o.allOf=[...d.map(f=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:f.source}))])}},pne=(e,t,r,n)=>{let o=r,{minimum:i,maximum:a,format:s,multipleOf:c,exclusiveMaximum:p,exclusiveMinimum:d}=e._zod.bag;typeof s=="string"&&s.includes("int")?o.type="integer":o.type="number",typeof d=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(o.minimum=d,o.exclusiveMinimum=!0):o.exclusiveMinimum=d),typeof i=="number"&&(o.minimum=i,typeof d=="number"&&t.target!=="draft-04"&&(d>=i?delete o.minimum:delete o.exclusiveMinimum)),typeof p=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(o.maximum=p,o.exclusiveMaximum=!0):o.exclusiveMaximum=p),typeof a=="number"&&(o.maximum=a,typeof p=="number"&&t.target!=="draft-04"&&(p<=a?delete o.maximum:delete o.exclusiveMaximum)),typeof c=="number"&&(o.multipleOf=c)},dne=(e,t,r,n)=>{r.type="boolean"},_ne=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},fne=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},mne=(e,t,r,n)=>{t.target==="openapi-3.0"?(r.type="string",r.nullable=!0,r.enum=[null]):r.type="null"},hne=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},yne=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},gne=(e,t,r,n)=>{r.not={}},Sne=(e,t,r,n)=>{},vne=(e,t,r,n)=>{},bne=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},xne=(e,t,r,n)=>{let o=e._zod.def,i=_E(o.entries);i.every(a=>typeof a=="number")&&(r.type="number"),i.every(a=>typeof a=="string")&&(r.type="string"),r.enum=i},Ene=(e,t,r,n)=>{let o=e._zod.def,i=[];for(let a of o.values)if(a===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof a=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");i.push(Number(a))}else i.push(a);if(i.length!==0)if(i.length===1){let a=i[0];r.type=a===null?"null":typeof a,t.target==="draft-04"||t.target==="openapi-3.0"?r.enum=[a]:r.const=a}else i.every(a=>typeof a=="number")&&(r.type="number"),i.every(a=>typeof a=="string")&&(r.type="string"),i.every(a=>typeof a=="boolean")&&(r.type="boolean"),i.every(a=>a===null)&&(r.type="null"),r.enum=i},Tne=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},Dne=(e,t,r,n)=>{let o=r,i=e._zod.pattern;if(!i)throw new Error("Pattern not found in template literal");o.type="string",o.pattern=i.source},Ane=(e,t,r,n)=>{let o=r,i={type:"string",format:"binary",contentEncoding:"binary"},{minimum:a,maximum:s,mime:c}=e._zod.bag;a!==void 0&&(i.minLength=a),s!==void 0&&(i.maxLength=s),c?c.length===1?(i.contentMediaType=c[0],Object.assign(o,i)):(Object.assign(o,i),o.anyOf=c.map(p=>({contentMediaType:p}))):Object.assign(o,i)},Ine=(e,t,r,n)=>{r.type="boolean"},wne=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},kne=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},Cne=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},Pne=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},One=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},Nne=(e,t,r,n)=>{let o=r,i=e._zod.def,{minimum:a,maximum:s}=e._zod.bag;typeof a=="number"&&(o.minItems=a),typeof s=="number"&&(o.maxItems=s),o.type="array",o.items=Fo(i.element,t,{...n,path:[...n.path,"items"]})},Fne=(e,t,r,n)=>{let o=r,i=e._zod.def;o.type="object",o.properties={};let a=i.shape;for(let p in a)o.properties[p]=Fo(a[p],t,{...n,path:[...n.path,"properties",p]});let s=new Set(Object.keys(a)),c=new Set([...s].filter(p=>{let d=i.shape[p]._zod;return t.io==="input"?d.optin===void 0:d.optout===void 0}));c.size>0&&(o.required=Array.from(c)),i.catchall?._zod.def.type==="never"?o.additionalProperties=!1:i.catchall?i.catchall&&(o.additionalProperties=Fo(i.catchall,t,{...n,path:[...n.path,"additionalProperties"]})):t.io==="output"&&(o.additionalProperties=!1)},c7=(e,t,r,n)=>{let o=e._zod.def,i=o.inclusive===!1,a=o.options.map((s,c)=>Fo(s,t,{...n,path:[...n.path,i?"oneOf":"anyOf",c]}));i?r.oneOf=a:r.anyOf=a},Rne=(e,t,r,n)=>{let o=e._zod.def,i=Fo(o.left,t,{...n,path:[...n.path,"allOf",0]}),a=Fo(o.right,t,{...n,path:[...n.path,"allOf",1]}),s=p=>"allOf"in p&&Object.keys(p).length===1,c=[...s(i)?i.allOf:[i],...s(a)?a.allOf:[a]];r.allOf=c},Lne=(e,t,r,n)=>{let o=r,i=e._zod.def;o.type="array";let a=t.target==="draft-2020-12"?"prefixItems":"items",s=t.target==="draft-2020-12"||t.target==="openapi-3.0"?"items":"additionalItems",c=i.items.map((m,y)=>Fo(m,t,{...n,path:[...n.path,a,y]})),p=i.rest?Fo(i.rest,t,{...n,path:[...n.path,s,...t.target==="openapi-3.0"?[i.items.length]:[]]}):null;t.target==="draft-2020-12"?(o.prefixItems=c,p&&(o.items=p)):t.target==="openapi-3.0"?(o.items={anyOf:c},p&&o.items.anyOf.push(p),o.minItems=c.length,p||(o.maxItems=c.length)):(o.items=c,p&&(o.additionalItems=p));let{minimum:d,maximum:f}=e._zod.bag;typeof d=="number"&&(o.minItems=d),typeof f=="number"&&(o.maxItems=f)},$ne=(e,t,r,n)=>{let o=r,i=e._zod.def;o.type="object";let a=i.keyType,c=a._zod.bag?.patterns;if(i.mode==="loose"&&c&&c.size>0){let d=Fo(i.valueType,t,{...n,path:[...n.path,"patternProperties","*"]});o.patternProperties={};for(let f of c)o.patternProperties[f.source]=d}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(o.propertyNames=Fo(i.keyType,t,{...n,path:[...n.path,"propertyNames"]})),o.additionalProperties=Fo(i.valueType,t,{...n,path:[...n.path,"additionalProperties"]});let p=a._zod.values;if(p){let d=[...p].filter(f=>typeof f=="string"||typeof f=="number");d.length>0&&(o.required=d)}},Mne=(e,t,r,n)=>{let o=e._zod.def,i=Fo(o.innerType,t,n),a=t.seen.get(e);t.target==="openapi-3.0"?(a.ref=o.innerType,r.nullable=!0):r.anyOf=[i,{type:"null"}]},jne=(e,t,r,n)=>{let o=e._zod.def;Fo(o.innerType,t,n);let i=t.seen.get(e);i.ref=o.innerType},Bne=(e,t,r,n)=>{let o=e._zod.def;Fo(o.innerType,t,n);let i=t.seen.get(e);i.ref=o.innerType,r.default=JSON.parse(JSON.stringify(o.defaultValue))},qne=(e,t,r,n)=>{let o=e._zod.def;Fo(o.innerType,t,n);let i=t.seen.get(e);i.ref=o.innerType,t.io==="input"&&(r._prefault=JSON.parse(JSON.stringify(o.defaultValue)))},Une=(e,t,r,n)=>{let o=e._zod.def;Fo(o.innerType,t,n);let i=t.seen.get(e);i.ref=o.innerType;let a;try{a=o.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}r.default=a},zne=(e,t,r,n)=>{let o=e._zod.def,i=t.io==="input"?o.in._zod.def.type==="transform"?o.out:o.in:o.out;Fo(i,t,n);let a=t.seen.get(e);a.ref=i},Jne=(e,t,r,n)=>{let o=e._zod.def;Fo(o.innerType,t,n);let i=t.seen.get(e);i.ref=o.innerType,r.readOnly=!0},Vne=(e,t,r,n)=>{let o=e._zod.def;Fo(o.innerType,t,n);let i=t.seen.get(e);i.ref=o.innerType},l7=(e,t,r,n)=>{let o=e._zod.def;Fo(o.innerType,t,n);let i=t.seen.get(e);i.ref=o.innerType},Kne=(e,t,r,n)=>{let o=e._zod.innerType;Fo(o,t,n);let i=t.seen.get(e);i.ref=o};function V0(e){return!!e._zod}function xu(e,t){return V0(e)?B0(e,t):e.safeParse(t)}function MP(e){if(!e)return;let t;if(V0(e)?t=e._zod?.def?.shape:t=e.shape,!!t){if(typeof t=="function")try{return t()}catch{return}return t}}function Wne(e){if(V0(e)){let i=e._zod?.def;if(i){if(i.value!==void 0)return i.value;if(Array.isArray(i.values)&&i.values.length>0)return i.values[0]}}let r=e._def;if(r){if(r.value!==void 0)return r.value;if(Array.isArray(r.values)&&r.values.length>0)return r.values[0]}let n=e.value;if(n!==void 0)return n}var KE={};r0(KE,{ZodAny:()=>foe,ZodArray:()=>goe,ZodBase64:()=>F7,ZodBase64URL:()=>R7,ZodBigInt:()=>XE,ZodBigIntFormat:()=>M7,ZodBoolean:()=>QE,ZodCIDRv4:()=>O7,ZodCIDRv6:()=>N7,ZodCUID:()=>D7,ZodCUID2:()=>A7,ZodCatch:()=>Moe,ZodCodec:()=>V7,ZodCustom:()=>ZP,ZodCustomStringFormat:()=>ZE,ZodDate:()=>JP,ZodDefault:()=>Ooe,ZodDiscriminatedUnion:()=>voe,ZodE164:()=>L7,ZodEmail:()=>b7,ZodEmoji:()=>E7,ZodEnum:()=>GE,ZodExactOptional:()=>koe,ZodFile:()=>Ioe,ZodFunction:()=>Goe,ZodGUID:()=>BP,ZodIPv4:()=>C7,ZodIPv6:()=>P7,ZodIntersection:()=>boe,ZodJWT:()=>$7,ZodKSUID:()=>k7,ZodLazy:()=>Joe,ZodLiteral:()=>Aoe,ZodMAC:()=>uoe,ZodMap:()=>Toe,ZodNaN:()=>Boe,ZodNanoID:()=>T7,ZodNever:()=>hoe,ZodNonOptional:()=>z7,ZodNull:()=>_oe,ZodNullable:()=>Poe,ZodNumber:()=>WE,ZodNumberFormat:()=>K0,ZodObject:()=>VP,ZodOptional:()=>U7,ZodPipe:()=>J7,ZodPrefault:()=>Foe,ZodPromise:()=>Koe,ZodReadonly:()=>qoe,ZodRecord:()=>HP,ZodSet:()=>Doe,ZodString:()=>HE,ZodStringFormat:()=>wo,ZodSuccess:()=>$oe,ZodSymbol:()=>poe,ZodTemplateLiteral:()=>zoe,ZodTransform:()=>woe,ZodTuple:()=>xoe,ZodType:()=>Jr,ZodULID:()=>I7,ZodURL:()=>zP,ZodUUID:()=>__,ZodUndefined:()=>doe,ZodUnion:()=>KP,ZodUnknown:()=>moe,ZodVoid:()=>yoe,ZodXID:()=>w7,ZodXor:()=>Soe,_ZodString:()=>v7,_default:()=>Noe,_function:()=>DRe,any:()=>j7,array:()=>ot,base64:()=>VFe,base64url:()=>KFe,bigint:()=>nRe,boolean:()=>uo,catch:()=>joe,check:()=>ARe,cidrv4:()=>zFe,cidrv6:()=>JFe,codec:()=>xRe,cuid:()=>RFe,cuid2:()=>LFe,custom:()=>K7,date:()=>lRe,describe:()=>IRe,discriminatedUnion:()=>GP,e164:()=>GFe,email:()=>AFe,emoji:()=>NFe,enum:()=>rs,exactOptional:()=>Coe,file:()=>gRe,float32:()=>YFe,float64:()=>eRe,function:()=>DRe,guid:()=>IFe,hash:()=>XFe,hex:()=>QFe,hostname:()=>WFe,httpUrl:()=>OFe,instanceof:()=>kRe,int:()=>S7,int32:()=>tRe,int64:()=>oRe,intersection:()=>eT,ipv4:()=>BFe,ipv6:()=>UFe,json:()=>PRe,jwt:()=>HFe,keyof:()=>uRe,ksuid:()=>jFe,lazy:()=>Voe,literal:()=>$t,looseObject:()=>Ui,looseRecord:()=>fRe,mac:()=>qFe,map:()=>mRe,meta:()=>wRe,nan:()=>bRe,nanoid:()=>FFe,nativeEnum:()=>yRe,never:()=>B7,nonoptional:()=>Loe,null:()=>YE,nullable:()=>qP,nullish:()=>SRe,number:()=>$n,object:()=>dt,optional:()=>Ko,partialRecord:()=>_Re,pipe:()=>UP,prefault:()=>Roe,preprocess:()=>WP,promise:()=>TRe,readonly:()=>Uoe,record:()=>Ro,refine:()=>Hoe,set:()=>hRe,strictObject:()=>pRe,string:()=>Y,stringFormat:()=>ZFe,stringbool:()=>CRe,success:()=>vRe,superRefine:()=>Zoe,symbol:()=>aRe,templateLiteral:()=>ERe,transform:()=>q7,tuple:()=>Eoe,uint32:()=>rRe,uint64:()=>iRe,ulid:()=>$Fe,undefined:()=>sRe,union:()=>go,unknown:()=>ko,url:()=>x7,uuid:()=>wFe,uuidv4:()=>kFe,uuidv6:()=>CFe,uuidv7:()=>PFe,void:()=>cRe,xid:()=>MFe,xor:()=>dRe});var jP={};r0(jP,{endsWith:()=>jE,gt:()=>p_,gte:()=>Ts,includes:()=>$E,length:()=>z0,lowercase:()=>RE,lt:()=>u_,lte:()=>kc,maxLength:()=>U0,maxSize:()=>Jy,mime:()=>BE,minLength:()=>im,minSize:()=>d_,multipleOf:()=>zy,negative:()=>QM,nonnegative:()=>YM,nonpositive:()=>XM,normalize:()=>qE,overwrite:()=>Tp,positive:()=>WM,property:()=>e7,regex:()=>FE,size:()=>q0,slugify:()=>FP,startsWith:()=>ME,toLowerCase:()=>zE,toUpperCase:()=>JE,trim:()=>UE,uppercase:()=>LE});var Vy={};r0(Vy,{ZodISODate:()=>_7,ZodISODateTime:()=>p7,ZodISODuration:()=>y7,ZodISOTime:()=>m7,date:()=>f7,datetime:()=>d7,duration:()=>g7,time:()=>h7});var p7=ne("ZodISODateTime",(e,t)=>{v$.init(e,t),wo.init(e,t)});function d7(e){return EM(p7,e)}var _7=ne("ZodISODate",(e,t)=>{b$.init(e,t),wo.init(e,t)});function f7(e){return TM(_7,e)}var m7=ne("ZodISOTime",(e,t)=>{x$.init(e,t),wo.init(e,t)});function h7(e){return DM(m7,e)}var y7=ne("ZodISODuration",(e,t)=>{E$.init(e,t),wo.init(e,t)});function g7(e){return AM(y7,e)}var Qne=(e,t)=>{YC.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>tP(e,r)},flatten:{value:r=>eP(e,r)},addIssue:{value:r=>{e.issues.push(r),e.message=JSON.stringify(e.issues,$0,2)}},addIssues:{value:r=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,$0,2)}},isEmpty:{get(){return e.issues.length===0}}})},NOt=ne("ZodError",Qne),Cc=ne("ZodError",Qne,{Parent:Error});var Xne=SE(Cc),Yne=bE(Cc),eoe=EE(Cc),toe=TE(Cc),roe=dre(Cc),noe=_re(Cc),ooe=fre(Cc),ioe=mre(Cc),aoe=hre(Cc),soe=yre(Cc),coe=gre(Cc),loe=Sre(Cc);var Jr=ne("ZodType",(e,t)=>(Cr.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:VE(e,"input"),output:VE(e,"output")}}),e.toJSONSchema=lne(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...r)=>e.clone(Ke.mergeDefs(t,{checks:[...t.checks??[],...r.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]}),{parent:!0}),e.with=e.check,e.clone=(r,n)=>xs(e,r,n),e.brand=()=>e,e.register=((r,n)=>(r.add(e,n),e)),e.parse=(r,n)=>Xne(e,r,n,{callee:e.parse}),e.safeParse=(r,n)=>eoe(e,r,n),e.parseAsync=async(r,n)=>Yne(e,r,n,{callee:e.parseAsync}),e.safeParseAsync=async(r,n)=>toe(e,r,n),e.spa=e.safeParseAsync,e.encode=(r,n)=>roe(e,r,n),e.decode=(r,n)=>noe(e,r,n),e.encodeAsync=async(r,n)=>ooe(e,r,n),e.decodeAsync=async(r,n)=>ioe(e,r,n),e.safeEncode=(r,n)=>aoe(e,r,n),e.safeDecode=(r,n)=>soe(e,r,n),e.safeEncodeAsync=async(r,n)=>coe(e,r,n),e.safeDecodeAsync=async(r,n)=>loe(e,r,n),e.refine=(r,n)=>e.check(Hoe(r,n)),e.superRefine=r=>e.check(Zoe(r)),e.overwrite=r=>e.check(Tp(r)),e.optional=()=>Ko(e),e.exactOptional=()=>Coe(e),e.nullable=()=>qP(e),e.nullish=()=>Ko(qP(e)),e.nonoptional=r=>Loe(e,r),e.array=()=>ot(e),e.or=r=>go([e,r]),e.and=r=>eT(e,r),e.transform=r=>UP(e,q7(r)),e.default=r=>Noe(e,r),e.prefault=r=>Roe(e,r),e.catch=r=>joe(e,r),e.pipe=r=>UP(e,r),e.readonly=()=>Uoe(e),e.describe=r=>{let n=e.clone();return Es.add(n,{description:r}),n},Object.defineProperty(e,"description",{get(){return Es.get(e)?.description},configurable:!0}),e.meta=(...r)=>{if(r.length===0)return Es.get(e);let n=e.clone();return Es.add(n,r[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=r=>r(e),e)),v7=ne("_ZodString",(e,t)=>{Uy.init(e,t),Jr.init(e,t),e._zod.processJSONSchema=(n,o,i)=>une(e,n,o,i);let r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,e.regex=(...n)=>e.check(FE(...n)),e.includes=(...n)=>e.check($E(...n)),e.startsWith=(...n)=>e.check(ME(...n)),e.endsWith=(...n)=>e.check(jE(...n)),e.min=(...n)=>e.check(im(...n)),e.max=(...n)=>e.check(U0(...n)),e.length=(...n)=>e.check(z0(...n)),e.nonempty=(...n)=>e.check(im(1,...n)),e.lowercase=n=>e.check(RE(n)),e.uppercase=n=>e.check(LE(n)),e.trim=()=>e.check(UE()),e.normalize=(...n)=>e.check(qE(...n)),e.toLowerCase=()=>e.check(zE()),e.toUpperCase=()=>e.check(JE()),e.slugify=()=>e.check(FP())}),HE=ne("ZodString",(e,t)=>{Uy.init(e,t),v7.init(e,t),e.email=r=>e.check(fP(b7,r)),e.url=r=>e.check(NE(zP,r)),e.jwt=r=>e.check(NP($7,r)),e.emoji=r=>e.check(SP(E7,r)),e.guid=r=>e.check(OE(BP,r)),e.uuid=r=>e.check(mP(__,r)),e.uuidv4=r=>e.check(hP(__,r)),e.uuidv6=r=>e.check(yP(__,r)),e.uuidv7=r=>e.check(gP(__,r)),e.nanoid=r=>e.check(vP(T7,r)),e.guid=r=>e.check(OE(BP,r)),e.cuid=r=>e.check(bP(D7,r)),e.cuid2=r=>e.check(xP(A7,r)),e.ulid=r=>e.check(EP(I7,r)),e.base64=r=>e.check(CP(F7,r)),e.base64url=r=>e.check(PP(R7,r)),e.xid=r=>e.check(TP(w7,r)),e.ksuid=r=>e.check(DP(k7,r)),e.ipv4=r=>e.check(AP(C7,r)),e.ipv6=r=>e.check(IP(P7,r)),e.cidrv4=r=>e.check(wP(O7,r)),e.cidrv6=r=>e.check(kP(N7,r)),e.e164=r=>e.check(OP(L7,r)),e.datetime=r=>e.check(d7(r)),e.date=r=>e.check(f7(r)),e.time=r=>e.check(h7(r)),e.duration=r=>e.check(g7(r))});function Y(e){return vM(HE,e)}var wo=ne("ZodStringFormat",(e,t)=>{yo.init(e,t),v7.init(e,t)}),b7=ne("ZodEmail",(e,t)=>{p$.init(e,t),wo.init(e,t)});function AFe(e){return fP(b7,e)}var BP=ne("ZodGUID",(e,t)=>{l$.init(e,t),wo.init(e,t)});function IFe(e){return OE(BP,e)}var __=ne("ZodUUID",(e,t)=>{u$.init(e,t),wo.init(e,t)});function wFe(e){return mP(__,e)}function kFe(e){return hP(__,e)}function CFe(e){return yP(__,e)}function PFe(e){return gP(__,e)}var zP=ne("ZodURL",(e,t)=>{d$.init(e,t),wo.init(e,t)});function x7(e){return NE(zP,e)}function OFe(e){return NE(zP,{protocol:/^https?$/,hostname:El.domain,...Ke.normalizeParams(e)})}var E7=ne("ZodEmoji",(e,t)=>{_$.init(e,t),wo.init(e,t)});function NFe(e){return SP(E7,e)}var T7=ne("ZodNanoID",(e,t)=>{f$.init(e,t),wo.init(e,t)});function FFe(e){return vP(T7,e)}var D7=ne("ZodCUID",(e,t)=>{m$.init(e,t),wo.init(e,t)});function RFe(e){return bP(D7,e)}var A7=ne("ZodCUID2",(e,t)=>{h$.init(e,t),wo.init(e,t)});function LFe(e){return xP(A7,e)}var I7=ne("ZodULID",(e,t)=>{y$.init(e,t),wo.init(e,t)});function $Fe(e){return EP(I7,e)}var w7=ne("ZodXID",(e,t)=>{g$.init(e,t),wo.init(e,t)});function MFe(e){return TP(w7,e)}var k7=ne("ZodKSUID",(e,t)=>{S$.init(e,t),wo.init(e,t)});function jFe(e){return DP(k7,e)}var C7=ne("ZodIPv4",(e,t)=>{T$.init(e,t),wo.init(e,t)});function BFe(e){return AP(C7,e)}var uoe=ne("ZodMAC",(e,t)=>{A$.init(e,t),wo.init(e,t)});function qFe(e){return xM(uoe,e)}var P7=ne("ZodIPv6",(e,t)=>{D$.init(e,t),wo.init(e,t)});function UFe(e){return IP(P7,e)}var O7=ne("ZodCIDRv4",(e,t)=>{I$.init(e,t),wo.init(e,t)});function zFe(e){return wP(O7,e)}var N7=ne("ZodCIDRv6",(e,t)=>{w$.init(e,t),wo.init(e,t)});function JFe(e){return kP(N7,e)}var F7=ne("ZodBase64",(e,t)=>{k$.init(e,t),wo.init(e,t)});function VFe(e){return CP(F7,e)}var R7=ne("ZodBase64URL",(e,t)=>{C$.init(e,t),wo.init(e,t)});function KFe(e){return PP(R7,e)}var L7=ne("ZodE164",(e,t)=>{P$.init(e,t),wo.init(e,t)});function GFe(e){return OP(L7,e)}var $7=ne("ZodJWT",(e,t)=>{O$.init(e,t),wo.init(e,t)});function HFe(e){return NP($7,e)}var ZE=ne("ZodCustomStringFormat",(e,t)=>{N$.init(e,t),wo.init(e,t)});function ZFe(e,t,r={}){return J0(ZE,e,t,r)}function WFe(e){return J0(ZE,"hostname",El.hostname,e)}function QFe(e){return J0(ZE,"hex",El.hex,e)}function XFe(e,t){let r=t?.enc??"hex",n=`${e}_${r}`,o=El[n];if(!o)throw new Error(`Unrecognized hash format: ${n}`);return J0(ZE,n,o,t)}var WE=ne("ZodNumber",(e,t)=>{uP.init(e,t),Jr.init(e,t),e._zod.processJSONSchema=(n,o,i)=>pne(e,n,o,i),e.gt=(n,o)=>e.check(p_(n,o)),e.gte=(n,o)=>e.check(Ts(n,o)),e.min=(n,o)=>e.check(Ts(n,o)),e.lt=(n,o)=>e.check(u_(n,o)),e.lte=(n,o)=>e.check(kc(n,o)),e.max=(n,o)=>e.check(kc(n,o)),e.int=n=>e.check(S7(n)),e.safe=n=>e.check(S7(n)),e.positive=n=>e.check(p_(0,n)),e.nonnegative=n=>e.check(Ts(0,n)),e.negative=n=>e.check(u_(0,n)),e.nonpositive=n=>e.check(kc(0,n)),e.multipleOf=(n,o)=>e.check(zy(n,o)),e.step=(n,o)=>e.check(zy(n,o)),e.finite=()=>e;let r=e._zod.bag;e.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),e.isFinite=!0,e.format=r.format??null});function $n(e){return IM(WE,e)}var K0=ne("ZodNumberFormat",(e,t)=>{F$.init(e,t),WE.init(e,t)});function S7(e){return kM(K0,e)}function YFe(e){return CM(K0,e)}function eRe(e){return PM(K0,e)}function tRe(e){return OM(K0,e)}function rRe(e){return NM(K0,e)}var QE=ne("ZodBoolean",(e,t)=>{kE.init(e,t),Jr.init(e,t),e._zod.processJSONSchema=(r,n,o)=>dne(e,r,n,o)});function uo(e){return FM(QE,e)}var XE=ne("ZodBigInt",(e,t)=>{pP.init(e,t),Jr.init(e,t),e._zod.processJSONSchema=(n,o,i)=>_ne(e,n,o,i),e.gte=(n,o)=>e.check(Ts(n,o)),e.min=(n,o)=>e.check(Ts(n,o)),e.gt=(n,o)=>e.check(p_(n,o)),e.gte=(n,o)=>e.check(Ts(n,o)),e.min=(n,o)=>e.check(Ts(n,o)),e.lt=(n,o)=>e.check(u_(n,o)),e.lte=(n,o)=>e.check(kc(n,o)),e.max=(n,o)=>e.check(kc(n,o)),e.positive=n=>e.check(p_(BigInt(0),n)),e.negative=n=>e.check(u_(BigInt(0),n)),e.nonpositive=n=>e.check(kc(BigInt(0),n)),e.nonnegative=n=>e.check(Ts(BigInt(0),n)),e.multipleOf=(n,o)=>e.check(zy(n,o));let r=e._zod.bag;e.minValue=r.minimum??null,e.maxValue=r.maximum??null,e.format=r.format??null});function nRe(e){return LM(XE,e)}var M7=ne("ZodBigIntFormat",(e,t)=>{R$.init(e,t),XE.init(e,t)});function oRe(e){return MM(M7,e)}function iRe(e){return jM(M7,e)}var poe=ne("ZodSymbol",(e,t)=>{L$.init(e,t),Jr.init(e,t),e._zod.processJSONSchema=(r,n,o)=>fne(e,r,n,o)});function aRe(e){return BM(poe,e)}var doe=ne("ZodUndefined",(e,t)=>{$$.init(e,t),Jr.init(e,t),e._zod.processJSONSchema=(r,n,o)=>hne(e,r,n,o)});function sRe(e){return qM(doe,e)}var _oe=ne("ZodNull",(e,t)=>{M$.init(e,t),Jr.init(e,t),e._zod.processJSONSchema=(r,n,o)=>mne(e,r,n,o)});function YE(e){return UM(_oe,e)}var foe=ne("ZodAny",(e,t)=>{j$.init(e,t),Jr.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Sne(e,r,n,o)});function j7(){return zM(foe)}var moe=ne("ZodUnknown",(e,t)=>{B$.init(e,t),Jr.init(e,t),e._zod.processJSONSchema=(r,n,o)=>vne(e,r,n,o)});function ko(){return JM(moe)}var hoe=ne("ZodNever",(e,t)=>{q$.init(e,t),Jr.init(e,t),e._zod.processJSONSchema=(r,n,o)=>gne(e,r,n,o)});function B7(e){return VM(hoe,e)}var yoe=ne("ZodVoid",(e,t)=>{U$.init(e,t),Jr.init(e,t),e._zod.processJSONSchema=(r,n,o)=>yne(e,r,n,o)});function cRe(e){return KM(yoe,e)}var JP=ne("ZodDate",(e,t)=>{z$.init(e,t),Jr.init(e,t),e._zod.processJSONSchema=(n,o,i)=>bne(e,n,o,i),e.min=(n,o)=>e.check(Ts(n,o)),e.max=(n,o)=>e.check(kc(n,o));let r=e._zod.bag;e.minDate=r.minimum?new Date(r.minimum):null,e.maxDate=r.maximum?new Date(r.maximum):null});function lRe(e){return GM(JP,e)}var goe=ne("ZodArray",(e,t)=>{J$.init(e,t),Jr.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Nne(e,r,n,o),e.element=t.element,e.min=(r,n)=>e.check(im(r,n)),e.nonempty=r=>e.check(im(1,r)),e.max=(r,n)=>e.check(U0(r,n)),e.length=(r,n)=>e.check(z0(r,n)),e.unwrap=()=>e.element});function ot(e,t){return cne(goe,e,t)}function uRe(e){let t=e._zod.def.shape;return rs(Object.keys(t))}var VP=ne("ZodObject",(e,t)=>{ane.init(e,t),Jr.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Fne(e,r,n,o),Ke.defineLazy(e,"shape",()=>t.shape),e.keyof=()=>rs(Object.keys(e._zod.def.shape)),e.catchall=r=>e.clone({...e._zod.def,catchall:r}),e.passthrough=()=>e.clone({...e._zod.def,catchall:ko()}),e.loose=()=>e.clone({...e._zod.def,catchall:ko()}),e.strict=()=>e.clone({...e._zod.def,catchall:B7()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=r=>Ke.extend(e,r),e.safeExtend=r=>Ke.safeExtend(e,r),e.merge=r=>Ke.merge(e,r),e.pick=r=>Ke.pick(e,r),e.omit=r=>Ke.omit(e,r),e.partial=(...r)=>Ke.partial(U7,e,r[0]),e.required=(...r)=>Ke.required(z7,e,r[0])});function dt(e,t){let r={type:"object",shape:e??{},...Ke.normalizeParams(t)};return new VP(r)}function pRe(e,t){return new VP({type:"object",shape:e,catchall:B7(),...Ke.normalizeParams(t)})}function Ui(e,t){return new VP({type:"object",shape:e,catchall:ko(),...Ke.normalizeParams(t)})}var KP=ne("ZodUnion",(e,t)=>{CE.init(e,t),Jr.init(e,t),e._zod.processJSONSchema=(r,n,o)=>c7(e,r,n,o),e.options=t.options});function go(e,t){return new KP({type:"union",options:e,...Ke.normalizeParams(t)})}var Soe=ne("ZodXor",(e,t)=>{KP.init(e,t),V$.init(e,t),e._zod.processJSONSchema=(r,n,o)=>c7(e,r,n,o),e.options=t.options});function dRe(e,t){return new Soe({type:"union",options:e,inclusive:!1,...Ke.normalizeParams(t)})}var voe=ne("ZodDiscriminatedUnion",(e,t)=>{KP.init(e,t),K$.init(e,t)});function GP(e,t,r){return new voe({type:"union",options:t,discriminator:e,...Ke.normalizeParams(r)})}var boe=ne("ZodIntersection",(e,t)=>{G$.init(e,t),Jr.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Rne(e,r,n,o)});function eT(e,t){return new boe({type:"intersection",left:e,right:t})}var xoe=ne("ZodTuple",(e,t)=>{dP.init(e,t),Jr.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Lne(e,r,n,o),e.rest=r=>e.clone({...e._zod.def,rest:r})});function Eoe(e,t,r){let n=t instanceof Cr,o=n?r:t,i=n?t:null;return new xoe({type:"tuple",items:e,rest:i,...Ke.normalizeParams(o)})}var HP=ne("ZodRecord",(e,t)=>{H$.init(e,t),Jr.init(e,t),e._zod.processJSONSchema=(r,n,o)=>$ne(e,r,n,o),e.keyType=t.keyType,e.valueType=t.valueType});function Ro(e,t,r){return new HP({type:"record",keyType:e,valueType:t,...Ke.normalizeParams(r)})}function _Re(e,t,r){let n=xs(e);return n._zod.values=void 0,new HP({type:"record",keyType:n,valueType:t,...Ke.normalizeParams(r)})}function fRe(e,t,r){return new HP({type:"record",keyType:e,valueType:t,mode:"loose",...Ke.normalizeParams(r)})}var Toe=ne("ZodMap",(e,t)=>{Z$.init(e,t),Jr.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Pne(e,r,n,o),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...r)=>e.check(d_(...r)),e.nonempty=r=>e.check(d_(1,r)),e.max=(...r)=>e.check(Jy(...r)),e.size=(...r)=>e.check(q0(...r))});function mRe(e,t,r){return new Toe({type:"map",keyType:e,valueType:t,...Ke.normalizeParams(r)})}var Doe=ne("ZodSet",(e,t)=>{W$.init(e,t),Jr.init(e,t),e._zod.processJSONSchema=(r,n,o)=>One(e,r,n,o),e.min=(...r)=>e.check(d_(...r)),e.nonempty=r=>e.check(d_(1,r)),e.max=(...r)=>e.check(Jy(...r)),e.size=(...r)=>e.check(q0(...r))});function hRe(e,t){return new Doe({type:"set",valueType:e,...Ke.normalizeParams(t)})}var GE=ne("ZodEnum",(e,t)=>{Q$.init(e,t),Jr.init(e,t),e._zod.processJSONSchema=(n,o,i)=>xne(e,n,o,i),e.enum=t.entries,e.options=Object.values(t.entries);let r=new Set(Object.keys(t.entries));e.extract=(n,o)=>{let i={};for(let a of n)if(r.has(a))i[a]=t.entries[a];else throw new Error(`Key ${a} not found in enum`);return new GE({...t,checks:[],...Ke.normalizeParams(o),entries:i})},e.exclude=(n,o)=>{let i={...t.entries};for(let a of n)if(r.has(a))delete i[a];else throw new Error(`Key ${a} not found in enum`);return new GE({...t,checks:[],...Ke.normalizeParams(o),entries:i})}});function rs(e,t){let r=Array.isArray(e)?Object.fromEntries(e.map(n=>[n,n])):e;return new GE({type:"enum",entries:r,...Ke.normalizeParams(t)})}function yRe(e,t){return new GE({type:"enum",entries:e,...Ke.normalizeParams(t)})}var Aoe=ne("ZodLiteral",(e,t)=>{X$.init(e,t),Jr.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Ene(e,r,n,o),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function $t(e,t){return new Aoe({type:"literal",values:Array.isArray(e)?e:[e],...Ke.normalizeParams(t)})}var Ioe=ne("ZodFile",(e,t)=>{Y$.init(e,t),Jr.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Ane(e,r,n,o),e.min=(r,n)=>e.check(d_(r,n)),e.max=(r,n)=>e.check(Jy(r,n)),e.mime=(r,n)=>e.check(BE(Array.isArray(r)?r:[r],n))});function gRe(e){return t7(Ioe,e)}var woe=ne("ZodTransform",(e,t)=>{eM.init(e,t),Jr.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Cne(e,r,n,o),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new jy(e.constructor.name);r.addIssue=i=>{if(typeof i=="string")r.issues.push(Ke.issue(i,r.value,t));else{let a=i;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),a.input??(a.input=r.value),a.inst??(a.inst=e),r.issues.push(Ke.issue(a))}};let o=t.transform(r.value,r);return o instanceof Promise?o.then(i=>(r.value=i,r)):(r.value=o,r)}});function q7(e){return new woe({type:"transform",transform:e})}var U7=ne("ZodOptional",(e,t)=>{_P.init(e,t),Jr.init(e,t),e._zod.processJSONSchema=(r,n,o)=>l7(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function Ko(e){return new U7({type:"optional",innerType:e})}var koe=ne("ZodExactOptional",(e,t)=>{tM.init(e,t),Jr.init(e,t),e._zod.processJSONSchema=(r,n,o)=>l7(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function Coe(e){return new koe({type:"optional",innerType:e})}var Poe=ne("ZodNullable",(e,t)=>{rM.init(e,t),Jr.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Mne(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function qP(e){return new Poe({type:"nullable",innerType:e})}function SRe(e){return Ko(qP(e))}var Ooe=ne("ZodDefault",(e,t)=>{nM.init(e,t),Jr.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Bne(e,r,n,o),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Noe(e,t){return new Ooe({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():Ke.shallowClone(t)}})}var Foe=ne("ZodPrefault",(e,t)=>{oM.init(e,t),Jr.init(e,t),e._zod.processJSONSchema=(r,n,o)=>qne(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function Roe(e,t){return new Foe({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():Ke.shallowClone(t)}})}var z7=ne("ZodNonOptional",(e,t)=>{iM.init(e,t),Jr.init(e,t),e._zod.processJSONSchema=(r,n,o)=>jne(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function Loe(e,t){return new z7({type:"nonoptional",innerType:e,...Ke.normalizeParams(t)})}var $oe=ne("ZodSuccess",(e,t)=>{aM.init(e,t),Jr.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Ine(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function vRe(e){return new $oe({type:"success",innerType:e})}var Moe=ne("ZodCatch",(e,t)=>{sM.init(e,t),Jr.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Une(e,r,n,o),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function joe(e,t){return new Moe({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}var Boe=ne("ZodNaN",(e,t)=>{cM.init(e,t),Jr.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Tne(e,r,n,o)});function bRe(e){return ZM(Boe,e)}var J7=ne("ZodPipe",(e,t)=>{lM.init(e,t),Jr.init(e,t),e._zod.processJSONSchema=(r,n,o)=>zne(e,r,n,o),e.in=t.in,e.out=t.out});function UP(e,t){return new J7({type:"pipe",in:e,out:t})}var V7=ne("ZodCodec",(e,t)=>{J7.init(e,t),PE.init(e,t)});function xRe(e,t,r){return new V7({type:"pipe",in:e,out:t,transform:r.decode,reverseTransform:r.encode})}var qoe=ne("ZodReadonly",(e,t)=>{uM.init(e,t),Jr.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Jne(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function Uoe(e){return new qoe({type:"readonly",innerType:e})}var zoe=ne("ZodTemplateLiteral",(e,t)=>{pM.init(e,t),Jr.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Dne(e,r,n,o)});function ERe(e,t){return new zoe({type:"template_literal",parts:e,...Ke.normalizeParams(t)})}var Joe=ne("ZodLazy",(e,t)=>{fM.init(e,t),Jr.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Kne(e,r,n,o),e.unwrap=()=>e._zod.def.getter()});function Voe(e){return new Joe({type:"lazy",getter:e})}var Koe=ne("ZodPromise",(e,t)=>{_M.init(e,t),Jr.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Vne(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function TRe(e){return new Koe({type:"promise",innerType:e})}var Goe=ne("ZodFunction",(e,t)=>{dM.init(e,t),Jr.init(e,t),e._zod.processJSONSchema=(r,n,o)=>kne(e,r,n,o)});function DRe(e){return new Goe({type:"function",input:Array.isArray(e?.input)?Eoe(e?.input):e?.input??ot(ko()),output:e?.output??ko()})}var ZP=ne("ZodCustom",(e,t)=>{mM.init(e,t),Jr.init(e,t),e._zod.processJSONSchema=(r,n,o)=>wne(e,r,n,o)});function ARe(e){let t=new Io({check:"custom"});return t._zod.check=e,t}function K7(e,t){return r7(ZP,e??(()=>!0),t)}function Hoe(e,t={}){return n7(ZP,e,t)}function Zoe(e){return o7(e)}var IRe=i7,wRe=a7;function kRe(e,t={}){let r=new ZP({type:"custom",check:"custom",fn:n=>n instanceof e,abort:!0,...Ke.normalizeParams(t)});return r._zod.bag.Class=e,r._zod.check=n=>{n.value instanceof e||n.issues.push({code:"invalid_type",expected:e.name,input:n.value,inst:r,path:[...r._zod.def.path??[]]})},r}var CRe=(...e)=>s7({Codec:V7,Boolean:QE,String:HE},...e);function PRe(e){let t=Voe(()=>go([Y(e),$n(),uo(),YE(),ot(t),Ro(Y(),t)]));return t}function WP(e,t){return UP(q7(e),t)}var Qoe={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};var Woe;Woe||(Woe={});var qOt={...KE,...jP,iso:Vy};var QP={};r0(QP,{bigint:()=>RRe,boolean:()=>FRe,date:()=>LRe,number:()=>NRe,string:()=>ORe});function ORe(e){return bM(HE,e)}function NRe(e){return wM(WE,e)}function FRe(e){return RM(QE,e)}function RRe(e){return $M(XE,e)}function LRe(e){return HM(JP,e)}Wi(hM());var H0="2025-11-25";var Yoe=[H0,"2025-06-18","2025-03-26","2024-11-05","2024-10-07"],am="io.modelcontextprotocol/related-task",YP="2.0",Da=K7(e=>e!==null&&(typeof e=="object"||typeof e=="function")),eie=go([Y(),$n().int()]),tie=Y(),a4t=Ui({ttl:go([$n(),YE()]).optional(),pollInterval:$n().optional()}),MRe=dt({ttl:$n().optional()}),jRe=dt({taskId:Y()}),G7=Ui({progressToken:eie.optional(),[am]:jRe.optional()}),Pc=dt({_meta:G7.optional()}),rT=Pc.extend({task:MRe.optional()}),rie=e=>rT.safeParse(e).success,Aa=dt({method:Y(),params:Pc.loose().optional()}),Tl=dt({_meta:G7.optional()}),Dl=dt({method:Y(),params:Tl.loose().optional()}),Ia=Ui({_meta:G7.optional()}),e6=go([Y(),$n().int()]),nie=dt({jsonrpc:$t(YP),id:e6,...Aa.shape}).strict(),nT=e=>nie.safeParse(e).success,oie=dt({jsonrpc:$t(YP),...Dl.shape}).strict(),iie=e=>oie.safeParse(e).success,H7=dt({jsonrpc:$t(YP),id:e6,result:Ia}).strict(),Ky=e=>H7.safeParse(e).success;var Tr;(function(e){e[e.ConnectionClosed=-32e3]="ConnectionClosed",e[e.RequestTimeout=-32001]="RequestTimeout",e[e.ParseError=-32700]="ParseError",e[e.InvalidRequest=-32600]="InvalidRequest",e[e.MethodNotFound=-32601]="MethodNotFound",e[e.InvalidParams=-32602]="InvalidParams",e[e.InternalError=-32603]="InternalError",e[e.UrlElicitationRequired=-32042]="UrlElicitationRequired"})(Tr||(Tr={}));var Z7=dt({jsonrpc:$t(YP),id:e6.optional(),error:dt({code:$n().int(),message:Y(),data:ko().optional()})}).strict();var aie=e=>Z7.safeParse(e).success;var sm=go([nie,oie,H7,Z7]),s4t=go([H7,Z7]),Gy=Ia.strict(),BRe=Tl.extend({requestId:e6.optional(),reason:Y().optional()}),t6=Dl.extend({method:$t("notifications/cancelled"),params:BRe}),qRe=dt({src:Y(),mimeType:Y().optional(),sizes:ot(Y()).optional(),theme:rs(["light","dark"]).optional()}),oT=dt({icons:ot(qRe).optional()}),G0=dt({name:Y(),title:Y().optional()}),sie=G0.extend({...G0.shape,...oT.shape,version:Y(),websiteUrl:Y().optional(),description:Y().optional()}),URe=eT(dt({applyDefaults:uo().optional()}),Ro(Y(),ko())),zRe=WP(e=>e&&typeof e=="object"&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,eT(dt({form:URe.optional(),url:Da.optional()}),Ro(Y(),ko()).optional())),JRe=Ui({list:Da.optional(),cancel:Da.optional(),requests:Ui({sampling:Ui({createMessage:Da.optional()}).optional(),elicitation:Ui({create:Da.optional()}).optional()}).optional()}),VRe=Ui({list:Da.optional(),cancel:Da.optional(),requests:Ui({tools:Ui({call:Da.optional()}).optional()}).optional()}),KRe=dt({experimental:Ro(Y(),Da).optional(),sampling:dt({context:Da.optional(),tools:Da.optional()}).optional(),elicitation:zRe.optional(),roots:dt({listChanged:uo().optional()}).optional(),tasks:JRe.optional()}),GRe=Pc.extend({protocolVersion:Y(),capabilities:KRe,clientInfo:sie}),HRe=Aa.extend({method:$t("initialize"),params:GRe});var ZRe=dt({experimental:Ro(Y(),Da).optional(),logging:Da.optional(),completions:Da.optional(),prompts:dt({listChanged:uo().optional()}).optional(),resources:dt({subscribe:uo().optional(),listChanged:uo().optional()}).optional(),tools:dt({listChanged:uo().optional()}).optional(),tasks:VRe.optional()}),W7=Ia.extend({protocolVersion:Y(),capabilities:ZRe,serverInfo:sie,instructions:Y().optional()}),cie=Dl.extend({method:$t("notifications/initialized"),params:Tl.optional()}),lie=e=>cie.safeParse(e).success,r6=Aa.extend({method:$t("ping"),params:Pc.optional()}),WRe=dt({progress:$n(),total:Ko($n()),message:Ko(Y())}),QRe=dt({...Tl.shape,...WRe.shape,progressToken:eie}),n6=Dl.extend({method:$t("notifications/progress"),params:QRe}),XRe=Pc.extend({cursor:tie.optional()}),iT=Aa.extend({params:XRe.optional()}),aT=Ia.extend({nextCursor:tie.optional()}),YRe=rs(["working","input_required","completed","failed","cancelled"]),sT=dt({taskId:Y(),status:YRe,ttl:go([$n(),YE()]),createdAt:Y(),lastUpdatedAt:Y(),pollInterval:Ko($n()),statusMessage:Ko(Y())}),Hy=Ia.extend({task:sT}),e8e=Tl.merge(sT),cT=Dl.extend({method:$t("notifications/tasks/status"),params:e8e}),o6=Aa.extend({method:$t("tasks/get"),params:Pc.extend({taskId:Y()})}),i6=Ia.merge(sT),a6=Aa.extend({method:$t("tasks/result"),params:Pc.extend({taskId:Y()})}),c4t=Ia.loose(),s6=iT.extend({method:$t("tasks/list")}),c6=aT.extend({tasks:ot(sT)}),l6=Aa.extend({method:$t("tasks/cancel"),params:Pc.extend({taskId:Y()})}),uie=Ia.merge(sT),pie=dt({uri:Y(),mimeType:Ko(Y()),_meta:Ro(Y(),ko()).optional()}),die=pie.extend({text:Y()}),Q7=Y().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:"Invalid Base64 string"}),_ie=pie.extend({blob:Q7}),lT=rs(["user","assistant"]),Z0=dt({audience:ot(lT).optional(),priority:$n().min(0).max(1).optional(),lastModified:Vy.datetime({offset:!0}).optional()}),fie=dt({...G0.shape,...oT.shape,uri:Y(),description:Ko(Y()),mimeType:Ko(Y()),annotations:Z0.optional(),_meta:Ko(Ui({}))}),t8e=dt({...G0.shape,...oT.shape,uriTemplate:Y(),description:Ko(Y()),mimeType:Ko(Y()),annotations:Z0.optional(),_meta:Ko(Ui({}))}),r8e=iT.extend({method:$t("resources/list")}),X7=aT.extend({resources:ot(fie)}),n8e=iT.extend({method:$t("resources/templates/list")}),Y7=aT.extend({resourceTemplates:ot(t8e)}),ej=Pc.extend({uri:Y()}),o8e=ej,i8e=Aa.extend({method:$t("resources/read"),params:o8e}),tj=Ia.extend({contents:ot(go([die,_ie]))}),rj=Dl.extend({method:$t("notifications/resources/list_changed"),params:Tl.optional()}),a8e=ej,s8e=Aa.extend({method:$t("resources/subscribe"),params:a8e}),c8e=ej,l8e=Aa.extend({method:$t("resources/unsubscribe"),params:c8e}),u8e=Tl.extend({uri:Y()}),p8e=Dl.extend({method:$t("notifications/resources/updated"),params:u8e}),d8e=dt({name:Y(),description:Ko(Y()),required:Ko(uo())}),_8e=dt({...G0.shape,...oT.shape,description:Ko(Y()),arguments:Ko(ot(d8e)),_meta:Ko(Ui({}))}),f8e=iT.extend({method:$t("prompts/list")}),nj=aT.extend({prompts:ot(_8e)}),m8e=Pc.extend({name:Y(),arguments:Ro(Y(),Y()).optional()}),h8e=Aa.extend({method:$t("prompts/get"),params:m8e}),oj=dt({type:$t("text"),text:Y(),annotations:Z0.optional(),_meta:Ro(Y(),ko()).optional()}),ij=dt({type:$t("image"),data:Q7,mimeType:Y(),annotations:Z0.optional(),_meta:Ro(Y(),ko()).optional()}),aj=dt({type:$t("audio"),data:Q7,mimeType:Y(),annotations:Z0.optional(),_meta:Ro(Y(),ko()).optional()}),y8e=dt({type:$t("tool_use"),name:Y(),id:Y(),input:Ro(Y(),ko()),_meta:Ro(Y(),ko()).optional()}),g8e=dt({type:$t("resource"),resource:go([die,_ie]),annotations:Z0.optional(),_meta:Ro(Y(),ko()).optional()}),S8e=fie.extend({type:$t("resource_link")}),sj=go([oj,ij,aj,S8e,g8e]),v8e=dt({role:lT,content:sj}),cj=Ia.extend({description:Y().optional(),messages:ot(v8e)}),lj=Dl.extend({method:$t("notifications/prompts/list_changed"),params:Tl.optional()}),b8e=dt({title:Y().optional(),readOnlyHint:uo().optional(),destructiveHint:uo().optional(),idempotentHint:uo().optional(),openWorldHint:uo().optional()}),x8e=dt({taskSupport:rs(["required","optional","forbidden"]).optional()}),mie=dt({...G0.shape,...oT.shape,description:Y().optional(),inputSchema:dt({type:$t("object"),properties:Ro(Y(),Da).optional(),required:ot(Y()).optional()}).catchall(ko()),outputSchema:dt({type:$t("object"),properties:Ro(Y(),Da).optional(),required:ot(Y()).optional()}).catchall(ko()).optional(),annotations:b8e.optional(),execution:x8e.optional(),_meta:Ro(Y(),ko()).optional()}),E8e=iT.extend({method:$t("tools/list")}),uj=aT.extend({tools:ot(mie)}),W0=Ia.extend({content:ot(sj).default([]),structuredContent:Ro(Y(),ko()).optional(),isError:uo().optional()}),l4t=W0.or(Ia.extend({toolResult:ko()})),T8e=rT.extend({name:Y(),arguments:Ro(Y(),ko()).optional()}),D8e=Aa.extend({method:$t("tools/call"),params:T8e}),pj=Dl.extend({method:$t("notifications/tools/list_changed"),params:Tl.optional()}),hie=dt({autoRefresh:uo().default(!0),debounceMs:$n().int().nonnegative().default(300)}),yie=rs(["debug","info","notice","warning","error","critical","alert","emergency"]),A8e=Pc.extend({level:yie}),I8e=Aa.extend({method:$t("logging/setLevel"),params:A8e}),w8e=Tl.extend({level:yie,logger:Y().optional(),data:ko()}),k8e=Dl.extend({method:$t("notifications/message"),params:w8e}),C8e=dt({name:Y().optional()}),P8e=dt({hints:ot(C8e).optional(),costPriority:$n().min(0).max(1).optional(),speedPriority:$n().min(0).max(1).optional(),intelligencePriority:$n().min(0).max(1).optional()}),O8e=dt({mode:rs(["auto","required","none"]).optional()}),N8e=dt({type:$t("tool_result"),toolUseId:Y().describe("The unique identifier for the corresponding tool call."),content:ot(sj).default([]),structuredContent:dt({}).loose().optional(),isError:uo().optional(),_meta:Ro(Y(),ko()).optional()}),F8e=GP("type",[oj,ij,aj]),XP=GP("type",[oj,ij,aj,y8e,N8e]),R8e=dt({role:lT,content:go([XP,ot(XP)]),_meta:Ro(Y(),ko()).optional()}),L8e=rT.extend({messages:ot(R8e),modelPreferences:P8e.optional(),systemPrompt:Y().optional(),includeContext:rs(["none","thisServer","allServers"]).optional(),temperature:$n().optional(),maxTokens:$n().int(),stopSequences:ot(Y()).optional(),metadata:Da.optional(),tools:ot(mie).optional(),toolChoice:O8e.optional()}),dj=Aa.extend({method:$t("sampling/createMessage"),params:L8e}),_j=Ia.extend({model:Y(),stopReason:Ko(rs(["endTurn","stopSequence","maxTokens"]).or(Y())),role:lT,content:F8e}),fj=Ia.extend({model:Y(),stopReason:Ko(rs(["endTurn","stopSequence","maxTokens","toolUse"]).or(Y())),role:lT,content:go([XP,ot(XP)])}),$8e=dt({type:$t("boolean"),title:Y().optional(),description:Y().optional(),default:uo().optional()}),M8e=dt({type:$t("string"),title:Y().optional(),description:Y().optional(),minLength:$n().optional(),maxLength:$n().optional(),format:rs(["email","uri","date","date-time"]).optional(),default:Y().optional()}),j8e=dt({type:rs(["number","integer"]),title:Y().optional(),description:Y().optional(),minimum:$n().optional(),maximum:$n().optional(),default:$n().optional()}),B8e=dt({type:$t("string"),title:Y().optional(),description:Y().optional(),enum:ot(Y()),default:Y().optional()}),q8e=dt({type:$t("string"),title:Y().optional(),description:Y().optional(),oneOf:ot(dt({const:Y(),title:Y()})),default:Y().optional()}),U8e=dt({type:$t("string"),title:Y().optional(),description:Y().optional(),enum:ot(Y()),enumNames:ot(Y()).optional(),default:Y().optional()}),z8e=go([B8e,q8e]),J8e=dt({type:$t("array"),title:Y().optional(),description:Y().optional(),minItems:$n().optional(),maxItems:$n().optional(),items:dt({type:$t("string"),enum:ot(Y())}),default:ot(Y()).optional()}),V8e=dt({type:$t("array"),title:Y().optional(),description:Y().optional(),minItems:$n().optional(),maxItems:$n().optional(),items:dt({anyOf:ot(dt({const:Y(),title:Y()}))}),default:ot(Y()).optional()}),K8e=go([J8e,V8e]),G8e=go([U8e,z8e,K8e]),H8e=go([G8e,$8e,M8e,j8e]),Z8e=rT.extend({mode:$t("form").optional(),message:Y(),requestedSchema:dt({type:$t("object"),properties:Ro(Y(),H8e),required:ot(Y()).optional()})}),W8e=rT.extend({mode:$t("url"),message:Y(),elicitationId:Y(),url:Y().url()}),Q8e=go([Z8e,W8e]),uT=Aa.extend({method:$t("elicitation/create"),params:Q8e}),X8e=Tl.extend({elicitationId:Y()}),Y8e=Dl.extend({method:$t("notifications/elicitation/complete"),params:X8e}),mj=Ia.extend({action:rs(["accept","decline","cancel"]),content:WP(e=>e===null?void 0:e,Ro(Y(),go([Y(),$n(),uo(),ot(Y())])).optional())}),e9e=dt({type:$t("ref/resource"),uri:Y()});var t9e=dt({type:$t("ref/prompt"),name:Y()}),r9e=Pc.extend({ref:go([t9e,e9e]),argument:dt({name:Y(),value:Y()}),context:dt({arguments:Ro(Y(),Y()).optional()}).optional()}),n9e=Aa.extend({method:$t("completion/complete"),params:r9e});var hj=Ia.extend({completion:Ui({values:ot(Y()).max(100),total:Ko($n().int()),hasMore:Ko(uo())})}),o9e=dt({uri:Y().startsWith("file://"),name:Y().optional(),_meta:Ro(Y(),ko()).optional()}),i9e=Aa.extend({method:$t("roots/list"),params:Pc.optional()}),a9e=Ia.extend({roots:ot(o9e)}),s9e=Dl.extend({method:$t("notifications/roots/list_changed"),params:Tl.optional()}),u4t=go([r6,HRe,n9e,I8e,h8e,f8e,r8e,n8e,i8e,s8e,l8e,D8e,E8e,o6,a6,s6,l6]),p4t=go([t6,n6,cie,s9e,cT]),d4t=go([Gy,_j,fj,mj,a9e,i6,c6,Hy]),_4t=go([r6,dj,uT,i9e,o6,a6,s6,l6]),f4t=go([t6,n6,k8e,p8e,rj,pj,lj,cT,Y8e]),m4t=go([Gy,W7,hj,cj,nj,X7,Y7,tj,W0,uj,i6,c6,Hy]),rr=class e extends Error{constructor(t,r,n){super(`MCP error ${t}: ${r}`),this.code=t,this.data=n,this.name="McpError"}static fromError(t,r,n){if(t===Tr.UrlElicitationRequired&&n){let o=n;if(o.elicitations)return new tT(o.elicitations,r)}return new e(t,r,n)}},tT=class extends rr{constructor(t,r=`URL elicitation${t.length>1?"s":""} required`){super(Tr.UrlElicitationRequired,r,{elicitations:t})}get elicitations(){return this.data?.elicitations??[]}};function cm(e){return e==="completed"||e==="failed"||e==="cancelled"}var Z4t=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function yj(e){let r=MP(e)?.method;if(!r)throw new Error("Schema is missing a method literal");let n=Wne(r);if(typeof n!="string")throw new Error("Schema method literal must be a string");return n}function gj(e,t){let r=xu(e,t);if(!r.success)throw r.error;return r.data}var _9e=6e4,u6=class{constructor(t){this._options=t,this._requestMessageId=0,this._requestHandlers=new Map,this._requestHandlerAbortControllers=new Map,this._notificationHandlers=new Map,this._responseHandlers=new Map,this._progressHandlers=new Map,this._timeoutInfo=new Map,this._pendingDebouncedNotifications=new Set,this._taskProgressTokens=new Map,this._requestResolvers=new Map,this.setNotificationHandler(t6,r=>{this._oncancel(r)}),this.setNotificationHandler(n6,r=>{this._onprogress(r)}),this.setRequestHandler(r6,r=>({})),this._taskStore=t?.taskStore,this._taskMessageQueue=t?.taskMessageQueue,this._taskStore&&(this.setRequestHandler(o6,async(r,n)=>{let o=await this._taskStore.getTask(r.params.taskId,n.sessionId);if(!o)throw new rr(Tr.InvalidParams,"Failed to retrieve task: Task not found");return{...o}}),this.setRequestHandler(a6,async(r,n)=>{let o=async()=>{let i=r.params.taskId;if(this._taskMessageQueue){let s;for(;s=await this._taskMessageQueue.dequeue(i,n.sessionId);){if(s.type==="response"||s.type==="error"){let c=s.message,p=c.id,d=this._requestResolvers.get(p);if(d)if(this._requestResolvers.delete(p),s.type==="response")d(c);else{let f=c,m=new rr(f.error.code,f.error.message,f.error.data);d(m)}else{let f=s.type==="response"?"Response":"Error";this._onerror(new Error(`${f} handler missing for request ${p}`))}continue}await this._transport?.send(s.message,{relatedRequestId:n.requestId})}}let a=await this._taskStore.getTask(i,n.sessionId);if(!a)throw new rr(Tr.InvalidParams,`Task not found: ${i}`);if(!cm(a.status))return await this._waitForTaskUpdate(i,n.signal),await o();if(cm(a.status)){let s=await this._taskStore.getTaskResult(i,n.sessionId);return this._clearTaskQueue(i),{...s,_meta:{...s._meta,[am]:{taskId:i}}}}return await o()};return await o()}),this.setRequestHandler(s6,async(r,n)=>{try{let{tasks:o,nextCursor:i}=await this._taskStore.listTasks(r.params?.cursor,n.sessionId);return{tasks:o,nextCursor:i,_meta:{}}}catch(o){throw new rr(Tr.InvalidParams,`Failed to list tasks: ${o instanceof Error?o.message:String(o)}`)}}),this.setRequestHandler(l6,async(r,n)=>{try{let o=await this._taskStore.getTask(r.params.taskId,n.sessionId);if(!o)throw new rr(Tr.InvalidParams,`Task not found: ${r.params.taskId}`);if(cm(o.status))throw new rr(Tr.InvalidParams,`Cannot cancel task in terminal status: ${o.status}`);await this._taskStore.updateTaskStatus(r.params.taskId,"cancelled","Client cancelled task execution.",n.sessionId),this._clearTaskQueue(r.params.taskId);let i=await this._taskStore.getTask(r.params.taskId,n.sessionId);if(!i)throw new rr(Tr.InvalidParams,`Task not found after cancellation: ${r.params.taskId}`);return{_meta:{},...i}}catch(o){throw o instanceof rr?o:new rr(Tr.InvalidRequest,`Failed to cancel task: ${o instanceof Error?o.message:String(o)}`)}}))}async _oncancel(t){if(!t.params.requestId)return;this._requestHandlerAbortControllers.get(t.params.requestId)?.abort(t.params.reason)}_setupTimeout(t,r,n,o,i=!1){this._timeoutInfo.set(t,{timeoutId:setTimeout(o,r),startTime:Date.now(),timeout:r,maxTotalTimeout:n,resetTimeoutOnProgress:i,onTimeout:o})}_resetTimeout(t){let r=this._timeoutInfo.get(t);if(!r)return!1;let n=Date.now()-r.startTime;if(r.maxTotalTimeout&&n>=r.maxTotalTimeout)throw this._timeoutInfo.delete(t),rr.fromError(Tr.RequestTimeout,"Maximum total timeout exceeded",{maxTotalTimeout:r.maxTotalTimeout,totalElapsed:n});return clearTimeout(r.timeoutId),r.timeoutId=setTimeout(r.onTimeout,r.timeout),!0}_cleanupTimeout(t){let r=this._timeoutInfo.get(t);r&&(clearTimeout(r.timeoutId),this._timeoutInfo.delete(t))}async connect(t){if(this._transport)throw new Error("Already connected to a transport. Call close() before connecting to a new transport, or use a separate Protocol instance per connection.");this._transport=t;let r=this.transport?.onclose;this._transport.onclose=()=>{r?.(),this._onclose()};let n=this.transport?.onerror;this._transport.onerror=i=>{n?.(i),this._onerror(i)};let o=this._transport?.onmessage;this._transport.onmessage=(i,a)=>{o?.(i,a),Ky(i)||aie(i)?this._onresponse(i):nT(i)?this._onrequest(i,a):iie(i)?this._onnotification(i):this._onerror(new Error(`Unknown message type: ${JSON.stringify(i)}`))},await this._transport.start()}_onclose(){let t=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._taskProgressTokens.clear(),this._pendingDebouncedNotifications.clear();for(let n of this._requestHandlerAbortControllers.values())n.abort();this._requestHandlerAbortControllers.clear();let r=rr.fromError(Tr.ConnectionClosed,"Connection closed");this._transport=void 0,this.onclose?.();for(let n of t.values())n(r)}_onerror(t){this.onerror?.(t)}_onnotification(t){let r=this._notificationHandlers.get(t.method)??this.fallbackNotificationHandler;r!==void 0&&Promise.resolve().then(()=>r(t)).catch(n=>this._onerror(new Error(`Uncaught error in notification handler: ${n}`)))}_onrequest(t,r){let n=this._requestHandlers.get(t.method)??this.fallbackRequestHandler,o=this._transport,i=t.params?._meta?.[am]?.taskId;if(n===void 0){let d={jsonrpc:"2.0",id:t.id,error:{code:Tr.MethodNotFound,message:"Method not found"}};i&&this._taskMessageQueue?this._enqueueTaskMessage(i,{type:"error",message:d,timestamp:Date.now()},o?.sessionId).catch(f=>this._onerror(new Error(`Failed to enqueue error response: ${f}`))):o?.send(d).catch(f=>this._onerror(new Error(`Failed to send an error response: ${f}`)));return}let a=new AbortController;this._requestHandlerAbortControllers.set(t.id,a);let s=rie(t.params)?t.params.task:void 0,c=this._taskStore?this.requestTaskStore(t,o?.sessionId):void 0,p={signal:a.signal,sessionId:o?.sessionId,_meta:t.params?._meta,sendNotification:async d=>{if(a.signal.aborted)return;let f={relatedRequestId:t.id};i&&(f.relatedTask={taskId:i}),await this.notification(d,f)},sendRequest:async(d,f,m)=>{if(a.signal.aborted)throw new rr(Tr.ConnectionClosed,"Request was cancelled");let y={...m,relatedRequestId:t.id};i&&!y.relatedTask&&(y.relatedTask={taskId:i});let g=y.relatedTask?.taskId??i;return g&&c&&await c.updateTaskStatus(g,"input_required"),await this.request(d,f,y)},authInfo:r?.authInfo,requestId:t.id,requestInfo:r?.requestInfo,taskId:i,taskStore:c,taskRequestedTtl:s?.ttl,closeSSEStream:r?.closeSSEStream,closeStandaloneSSEStream:r?.closeStandaloneSSEStream};Promise.resolve().then(()=>{s&&this.assertTaskHandlerCapability(t.method)}).then(()=>n(t,p)).then(async d=>{if(a.signal.aborted)return;let f={result:d,jsonrpc:"2.0",id:t.id};i&&this._taskMessageQueue?await this._enqueueTaskMessage(i,{type:"response",message:f,timestamp:Date.now()},o?.sessionId):await o?.send(f)},async d=>{if(a.signal.aborted)return;let f={jsonrpc:"2.0",id:t.id,error:{code:Number.isSafeInteger(d.code)?d.code:Tr.InternalError,message:d.message??"Internal error",...d.data!==void 0&&{data:d.data}}};i&&this._taskMessageQueue?await this._enqueueTaskMessage(i,{type:"error",message:f,timestamp:Date.now()},o?.sessionId):await o?.send(f)}).catch(d=>this._onerror(new Error(`Failed to send response: ${d}`))).finally(()=>{this._requestHandlerAbortControllers.delete(t.id)})}_onprogress(t){let{progressToken:r,...n}=t.params,o=Number(r),i=this._progressHandlers.get(o);if(!i){this._onerror(new Error(`Received a progress notification for an unknown token: ${JSON.stringify(t)}`));return}let a=this._responseHandlers.get(o),s=this._timeoutInfo.get(o);if(s&&a&&s.resetTimeoutOnProgress)try{this._resetTimeout(o)}catch(c){this._responseHandlers.delete(o),this._progressHandlers.delete(o),this._cleanupTimeout(o),a(c);return}i(n)}_onresponse(t){let r=Number(t.id),n=this._requestResolvers.get(r);if(n){if(this._requestResolvers.delete(r),Ky(t))n(t);else{let a=new rr(t.error.code,t.error.message,t.error.data);n(a)}return}let o=this._responseHandlers.get(r);if(o===void 0){this._onerror(new Error(`Received a response for an unknown message ID: ${JSON.stringify(t)}`));return}this._responseHandlers.delete(r),this._cleanupTimeout(r);let i=!1;if(Ky(t)&&t.result&&typeof t.result=="object"){let a=t.result;if(a.task&&typeof a.task=="object"){let s=a.task;typeof s.taskId=="string"&&(i=!0,this._taskProgressTokens.set(s.taskId,r))}}if(i||this._progressHandlers.delete(r),Ky(t))o(t);else{let a=rr.fromError(t.error.code,t.error.message,t.error.data);o(a)}}get transport(){return this._transport}async close(){await this._transport?.close()}async*requestStream(t,r,n){let{task:o}=n??{};if(!o){try{yield{type:"result",result:await this.request(t,r,n)}}catch(a){yield{type:"error",error:a instanceof rr?a:new rr(Tr.InternalError,String(a))}}return}let i;try{let a=await this.request(t,Hy,n);if(a.task)i=a.task.taskId,yield{type:"taskCreated",task:a.task};else throw new rr(Tr.InternalError,"Task creation did not return a task");for(;;){let s=await this.getTask({taskId:i},n);if(yield{type:"taskStatus",task:s},cm(s.status)){s.status==="completed"?yield{type:"result",result:await this.getTaskResult({taskId:i},r,n)}:s.status==="failed"?yield{type:"error",error:new rr(Tr.InternalError,`Task ${i} failed`)}:s.status==="cancelled"&&(yield{type:"error",error:new rr(Tr.InternalError,`Task ${i} was cancelled`)});return}if(s.status==="input_required"){yield{type:"result",result:await this.getTaskResult({taskId:i},r,n)};return}let c=s.pollInterval??this._options?.defaultTaskPollInterval??1e3;await new Promise(p=>setTimeout(p,c)),n?.signal?.throwIfAborted()}}catch(a){yield{type:"error",error:a instanceof rr?a:new rr(Tr.InternalError,String(a))}}}request(t,r,n){let{relatedRequestId:o,resumptionToken:i,onresumptiontoken:a,task:s,relatedTask:c}=n??{};return new Promise((p,d)=>{let f=I=>{d(I)};if(!this._transport){f(new Error("Not connected"));return}if(this._options?.enforceStrictCapabilities===!0)try{this.assertCapabilityForMethod(t.method),s&&this.assertTaskCapability(t.method)}catch(I){f(I);return}n?.signal?.throwIfAborted();let m=this._requestMessageId++,y={...t,jsonrpc:"2.0",id:m};n?.onprogress&&(this._progressHandlers.set(m,n.onprogress),y.params={...t.params,_meta:{...t.params?._meta||{},progressToken:m}}),s&&(y.params={...y.params,task:s}),c&&(y.params={...y.params,_meta:{...y.params?._meta||{},[am]:c}});let g=I=>{this._responseHandlers.delete(m),this._progressHandlers.delete(m),this._cleanupTimeout(m),this._transport?.send({jsonrpc:"2.0",method:"notifications/cancelled",params:{requestId:m,reason:String(I)}},{relatedRequestId:o,resumptionToken:i,onresumptiontoken:a}).catch(k=>this._onerror(new Error(`Failed to send cancellation: ${k}`)));let T=I instanceof rr?I:new rr(Tr.RequestTimeout,String(I));d(T)};this._responseHandlers.set(m,I=>{if(!n?.signal?.aborted){if(I instanceof Error)return d(I);try{let T=xu(r,I.result);T.success?p(T.data):d(T.error)}catch(T){d(T)}}}),n?.signal?.addEventListener("abort",()=>{g(n?.signal?.reason)});let S=n?.timeout??_9e,b=()=>g(rr.fromError(Tr.RequestTimeout,"Request timed out",{timeout:S}));this._setupTimeout(m,S,n?.maxTotalTimeout,b,n?.resetTimeoutOnProgress??!1);let E=c?.taskId;if(E){let I=T=>{let k=this._responseHandlers.get(m);k?k(T):this._onerror(new Error(`Response handler missing for side-channeled request ${m}`))};this._requestResolvers.set(m,I),this._enqueueTaskMessage(E,{type:"request",message:y,timestamp:Date.now()}).catch(T=>{this._cleanupTimeout(m),d(T)})}else this._transport.send(y,{relatedRequestId:o,resumptionToken:i,onresumptiontoken:a}).catch(I=>{this._cleanupTimeout(m),d(I)})})}async getTask(t,r){return this.request({method:"tasks/get",params:t},i6,r)}async getTaskResult(t,r,n){return this.request({method:"tasks/result",params:t},r,n)}async listTasks(t,r){return this.request({method:"tasks/list",params:t},c6,r)}async cancelTask(t,r){return this.request({method:"tasks/cancel",params:t},uie,r)}async notification(t,r){if(!this._transport)throw new Error("Not connected");this.assertNotificationCapability(t.method);let n=r?.relatedTask?.taskId;if(n){let s={...t,jsonrpc:"2.0",params:{...t.params,_meta:{...t.params?._meta||{},[am]:r.relatedTask}}};await this._enqueueTaskMessage(n,{type:"notification",message:s,timestamp:Date.now()});return}if((this._options?.debouncedNotificationMethods??[]).includes(t.method)&&!t.params&&!r?.relatedRequestId&&!r?.relatedTask){if(this._pendingDebouncedNotifications.has(t.method))return;this._pendingDebouncedNotifications.add(t.method),Promise.resolve().then(()=>{if(this._pendingDebouncedNotifications.delete(t.method),!this._transport)return;let s={...t,jsonrpc:"2.0"};r?.relatedTask&&(s={...s,params:{...s.params,_meta:{...s.params?._meta||{},[am]:r.relatedTask}}}),this._transport?.send(s,r).catch(c=>this._onerror(c))});return}let a={...t,jsonrpc:"2.0"};r?.relatedTask&&(a={...a,params:{...a.params,_meta:{...a.params?._meta||{},[am]:r.relatedTask}}}),await this._transport.send(a,r)}setRequestHandler(t,r){let n=yj(t);this.assertRequestHandlerCapability(n),this._requestHandlers.set(n,(o,i)=>{let a=gj(t,o);return Promise.resolve(r(a,i))})}removeRequestHandler(t){this._requestHandlers.delete(t)}assertCanSetRequestHandler(t){if(this._requestHandlers.has(t))throw new Error(`A request handler for ${t} already exists, which would be overridden`)}setNotificationHandler(t,r){let n=yj(t);this._notificationHandlers.set(n,o=>{let i=gj(t,o);return Promise.resolve(r(i))})}removeNotificationHandler(t){this._notificationHandlers.delete(t)}_cleanupTaskProgressHandler(t){let r=this._taskProgressTokens.get(t);r!==void 0&&(this._progressHandlers.delete(r),this._taskProgressTokens.delete(t))}async _enqueueTaskMessage(t,r,n){if(!this._taskStore||!this._taskMessageQueue)throw new Error("Cannot enqueue task message: taskStore and taskMessageQueue are not configured");let o=this._options?.maxTaskQueueSize;await this._taskMessageQueue.enqueue(t,r,n,o)}async _clearTaskQueue(t,r){if(this._taskMessageQueue){let n=await this._taskMessageQueue.dequeueAll(t,r);for(let o of n)if(o.type==="request"&&nT(o.message)){let i=o.message.id,a=this._requestResolvers.get(i);a?(a(new rr(Tr.InternalError,"Task cancelled or completed")),this._requestResolvers.delete(i)):this._onerror(new Error(`Resolver missing for request ${i} during task ${t} cleanup`))}}}async _waitForTaskUpdate(t,r){let n=this._options?.defaultTaskPollInterval??1e3;try{let o=await this._taskStore?.getTask(t);o?.pollInterval&&(n=o.pollInterval)}catch{}return new Promise((o,i)=>{if(r.aborted){i(new rr(Tr.InvalidRequest,"Request cancelled"));return}let a=setTimeout(o,n);r.addEventListener("abort",()=>{clearTimeout(a),i(new rr(Tr.InvalidRequest,"Request cancelled"))},{once:!0})})}requestTaskStore(t,r){let n=this._taskStore;if(!n)throw new Error("No task store configured");return{createTask:async o=>{if(!t)throw new Error("No request provided");return await n.createTask(o,t.id,{method:t.method,params:t.params},r)},getTask:async o=>{let i=await n.getTask(o,r);if(!i)throw new rr(Tr.InvalidParams,"Failed to retrieve task: Task not found");return i},storeTaskResult:async(o,i,a)=>{await n.storeTaskResult(o,i,a,r);let s=await n.getTask(o,r);if(s){let c=cT.parse({method:"notifications/tasks/status",params:s});await this.notification(c),cm(s.status)&&this._cleanupTaskProgressHandler(o)}},getTaskResult:o=>n.getTaskResult(o,r),updateTaskStatus:async(o,i,a)=>{let s=await n.getTask(o,r);if(!s)throw new rr(Tr.InvalidParams,`Task "${o}" not found - it may have been cleaned up`);if(cm(s.status))throw new rr(Tr.InvalidParams,`Cannot update task "${o}" from terminal status "${s.status}" to "${i}". Terminal states (completed, failed, cancelled) cannot transition to other states.`);await n.updateTaskStatus(o,i,a,r);let c=await n.getTask(o,r);if(c){let p=cT.parse({method:"notifications/tasks/status",params:c});await this.notification(p),cm(c.status)&&this._cleanupTaskProgressHandler(o)}},listTasks:o=>n.listTasks(o,r)}}};function gie(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function Sie(e,t){let r={...e};for(let n in t){let o=n,i=t[o];if(i===void 0)continue;let a=r[o];gie(a)&&gie(i)?r[o]={...a,...i}:r[o]=i}return r}var $ie=n0(bj(),1),Mie=n0(Lie(),1);function V9e(){let e=new $ie.default({strict:!1,validateFormats:!0,validateSchema:!1,allErrors:!0});return(0,Mie.default)(e),e}var _6=class{constructor(t){this._ajv=t??V9e()}getValidator(t){let r="$id"in t&&typeof t.$id=="string"?this._ajv.getSchema(t.$id)??this._ajv.compile(t):this._ajv.compile(t);return n=>r(n)?{valid:!0,data:n,errorMessage:void 0}:{valid:!1,data:void 0,errorMessage:this._ajv.errorsText(r.errors)}}};var f6=class{constructor(t){this._client=t}async*callToolStream(t,r=W0,n){let o=this._client,i={...n,task:n?.task??(o.isToolTask(t.name)?{}:void 0)},a=o.requestStream({method:"tools/call",params:t},r,i),s=o.getToolOutputValidator(t.name);for await(let c of a){if(c.type==="result"&&s){let p=c.result;if(!p.structuredContent&&!p.isError){yield{type:"error",error:new rr(Tr.InvalidRequest,`Tool ${t.name} has an output schema but did not return structured content`)};return}if(p.structuredContent)try{let d=s(p.structuredContent);if(!d.valid){yield{type:"error",error:new rr(Tr.InvalidParams,`Structured content does not match the tool's output schema: ${d.errorMessage}`)};return}}catch(d){if(d instanceof rr){yield{type:"error",error:d};return}yield{type:"error",error:new rr(Tr.InvalidParams,`Failed to validate structured content: ${d instanceof Error?d.message:String(d)}`)};return}}yield c}}async getTask(t,r){return this._client.getTask({taskId:t},r)}async getTaskResult(t,r,n){return this._client.getTaskResult({taskId:t},r,n)}async listTasks(t,r){return this._client.listTasks(t?{cursor:t}:void 0,r)}async cancelTask(t,r){return this._client.cancelTask({taskId:t},r)}requestStream(t,r,n){return this._client.requestStream(t,r,n)}};function jie(e,t,r){if(!e)throw new Error(`${r} does not support task creation (required for ${t})`);switch(t){case"tools/call":if(!e.tools?.call)throw new Error(`${r} does not support task creation for tools/call (required for ${t})`);break;default:break}}function Bie(e,t,r){if(!e)throw new Error(`${r} does not support task creation (required for ${t})`);switch(t){case"sampling/createMessage":if(!e.sampling?.createMessage)throw new Error(`${r} does not support task creation for sampling/createMessage (required for ${t})`);break;case"elicitation/create":if(!e.elicitation?.create)throw new Error(`${r} does not support task creation for elicitation/create (required for ${t})`);break;default:break}}function m6(e,t){if(!(!e||t===null||typeof t!="object")){if(e.type==="object"&&e.properties&&typeof e.properties=="object"){let r=t,n=e.properties;for(let o of Object.keys(n)){let i=n[o];r[o]===void 0&&Object.prototype.hasOwnProperty.call(i,"default")&&(r[o]=i.default),r[o]!==void 0&&m6(i,r[o])}}if(Array.isArray(e.anyOf))for(let r of e.anyOf)typeof r!="boolean"&&m6(r,t);if(Array.isArray(e.oneOf))for(let r of e.oneOf)typeof r!="boolean"&&m6(r,t)}}function K9e(e){if(!e)return{supportsFormMode:!1,supportsUrlMode:!1};let t=e.form!==void 0,r=e.url!==void 0;return{supportsFormMode:t||!t&&!r,supportsUrlMode:r}}var h6=class extends u6{constructor(t,r){super(r),this._clientInfo=t,this._cachedToolOutputValidators=new Map,this._cachedKnownTaskTools=new Set,this._cachedRequiredTaskTools=new Set,this._listChangedDebounceTimers=new Map,this._capabilities=r?.capabilities??{},this._jsonSchemaValidator=r?.jsonSchemaValidator??new _6,r?.listChanged&&(this._pendingListChangedConfig=r.listChanged)}_setupListChangedHandlers(t){t.tools&&this._serverCapabilities?.tools?.listChanged&&this._setupListChangedHandler("tools",pj,t.tools,async()=>(await this.listTools()).tools),t.prompts&&this._serverCapabilities?.prompts?.listChanged&&this._setupListChangedHandler("prompts",lj,t.prompts,async()=>(await this.listPrompts()).prompts),t.resources&&this._serverCapabilities?.resources?.listChanged&&this._setupListChangedHandler("resources",rj,t.resources,async()=>(await this.listResources()).resources)}get experimental(){return this._experimental||(this._experimental={tasks:new f6(this)}),this._experimental}registerCapabilities(t){if(this.transport)throw new Error("Cannot register capabilities after connecting to transport");this._capabilities=Sie(this._capabilities,t)}setRequestHandler(t,r){let o=MP(t)?.method;if(!o)throw new Error("Schema is missing a method literal");let i;if(V0(o)){let s=o;i=s._zod?.def?.value??s.value}else{let s=o;i=s._def?.value??s.value}if(typeof i!="string")throw new Error("Schema method literal must be a string");let a=i;if(a==="elicitation/create"){let s=async(c,p)=>{let d=xu(uT,c);if(!d.success){let I=d.error instanceof Error?d.error.message:String(d.error);throw new rr(Tr.InvalidParams,`Invalid elicitation request: ${I}`)}let{params:f}=d.data;f.mode=f.mode??"form";let{supportsFormMode:m,supportsUrlMode:y}=K9e(this._capabilities.elicitation);if(f.mode==="form"&&!m)throw new rr(Tr.InvalidParams,"Client does not support form-mode elicitation requests");if(f.mode==="url"&&!y)throw new rr(Tr.InvalidParams,"Client does not support URL-mode elicitation requests");let g=await Promise.resolve(r(c,p));if(f.task){let I=xu(Hy,g);if(!I.success){let T=I.error instanceof Error?I.error.message:String(I.error);throw new rr(Tr.InvalidParams,`Invalid task creation result: ${T}`)}return I.data}let S=xu(mj,g);if(!S.success){let I=S.error instanceof Error?S.error.message:String(S.error);throw new rr(Tr.InvalidParams,`Invalid elicitation result: ${I}`)}let b=S.data,E=f.mode==="form"?f.requestedSchema:void 0;if(f.mode==="form"&&b.action==="accept"&&b.content&&E&&this._capabilities.elicitation?.form?.applyDefaults)try{m6(E,b.content)}catch{}return b};return super.setRequestHandler(t,s)}if(a==="sampling/createMessage"){let s=async(c,p)=>{let d=xu(dj,c);if(!d.success){let b=d.error instanceof Error?d.error.message:String(d.error);throw new rr(Tr.InvalidParams,`Invalid sampling request: ${b}`)}let{params:f}=d.data,m=await Promise.resolve(r(c,p));if(f.task){let b=xu(Hy,m);if(!b.success){let E=b.error instanceof Error?b.error.message:String(b.error);throw new rr(Tr.InvalidParams,`Invalid task creation result: ${E}`)}return b.data}let g=f.tools||f.toolChoice?fj:_j,S=xu(g,m);if(!S.success){let b=S.error instanceof Error?S.error.message:String(S.error);throw new rr(Tr.InvalidParams,`Invalid sampling result: ${b}`)}return S.data};return super.setRequestHandler(t,s)}return super.setRequestHandler(t,r)}assertCapability(t,r){if(!this._serverCapabilities?.[t])throw new Error(`Server does not support ${t} (required for ${r})`)}async connect(t,r){if(await super.connect(t),t.sessionId===void 0)try{let n=await this.request({method:"initialize",params:{protocolVersion:H0,capabilities:this._capabilities,clientInfo:this._clientInfo}},W7,r);if(n===void 0)throw new Error(`Server sent invalid initialize result: ${n}`);if(!Yoe.includes(n.protocolVersion))throw new Error(`Server's protocol version is not supported: ${n.protocolVersion}`);this._serverCapabilities=n.capabilities,this._serverVersion=n.serverInfo,t.setProtocolVersion&&t.setProtocolVersion(n.protocolVersion),this._instructions=n.instructions,await this.notification({method:"notifications/initialized"}),this._pendingListChangedConfig&&(this._setupListChangedHandlers(this._pendingListChangedConfig),this._pendingListChangedConfig=void 0)}catch(n){throw this.close(),n}}getServerCapabilities(){return this._serverCapabilities}getServerVersion(){return this._serverVersion}getInstructions(){return this._instructions}assertCapabilityForMethod(t){switch(t){case"logging/setLevel":if(!this._serverCapabilities?.logging)throw new Error(`Server does not support logging (required for ${t})`);break;case"prompts/get":case"prompts/list":if(!this._serverCapabilities?.prompts)throw new Error(`Server does not support prompts (required for ${t})`);break;case"resources/list":case"resources/templates/list":case"resources/read":case"resources/subscribe":case"resources/unsubscribe":if(!this._serverCapabilities?.resources)throw new Error(`Server does not support resources (required for ${t})`);if(t==="resources/subscribe"&&!this._serverCapabilities.resources.subscribe)throw new Error(`Server does not support resource subscriptions (required for ${t})`);break;case"tools/call":case"tools/list":if(!this._serverCapabilities?.tools)throw new Error(`Server does not support tools (required for ${t})`);break;case"completion/complete":if(!this._serverCapabilities?.completions)throw new Error(`Server does not support completions (required for ${t})`);break;case"initialize":break;case"ping":break}}assertNotificationCapability(t){switch(t){case"notifications/roots/list_changed":if(!this._capabilities.roots?.listChanged)throw new Error(`Client does not support roots list changed notifications (required for ${t})`);break;case"notifications/initialized":break;case"notifications/cancelled":break;case"notifications/progress":break}}assertRequestHandlerCapability(t){if(this._capabilities)switch(t){case"sampling/createMessage":if(!this._capabilities.sampling)throw new Error(`Client does not support sampling capability (required for ${t})`);break;case"elicitation/create":if(!this._capabilities.elicitation)throw new Error(`Client does not support elicitation capability (required for ${t})`);break;case"roots/list":if(!this._capabilities.roots)throw new Error(`Client does not support roots capability (required for ${t})`);break;case"tasks/get":case"tasks/list":case"tasks/result":case"tasks/cancel":if(!this._capabilities.tasks)throw new Error(`Client does not support tasks capability (required for ${t})`);break;case"ping":break}}assertTaskCapability(t){jie(this._serverCapabilities?.tasks?.requests,t,"Server")}assertTaskHandlerCapability(t){this._capabilities&&Bie(this._capabilities.tasks?.requests,t,"Client")}async ping(t){return this.request({method:"ping"},Gy,t)}async complete(t,r){return this.request({method:"completion/complete",params:t},hj,r)}async setLoggingLevel(t,r){return this.request({method:"logging/setLevel",params:{level:t}},Gy,r)}async getPrompt(t,r){return this.request({method:"prompts/get",params:t},cj,r)}async listPrompts(t,r){return this.request({method:"prompts/list",params:t},nj,r)}async listResources(t,r){return this.request({method:"resources/list",params:t},X7,r)}async listResourceTemplates(t,r){return this.request({method:"resources/templates/list",params:t},Y7,r)}async readResource(t,r){return this.request({method:"resources/read",params:t},tj,r)}async subscribeResource(t,r){return this.request({method:"resources/subscribe",params:t},Gy,r)}async unsubscribeResource(t,r){return this.request({method:"resources/unsubscribe",params:t},Gy,r)}async callTool(t,r=W0,n){if(this.isToolTaskRequired(t.name))throw new rr(Tr.InvalidRequest,`Tool "${t.name}" requires task-based execution. Use client.experimental.tasks.callToolStream() instead.`);let o=await this.request({method:"tools/call",params:t},r,n),i=this.getToolOutputValidator(t.name);if(i){if(!o.structuredContent&&!o.isError)throw new rr(Tr.InvalidRequest,`Tool ${t.name} has an output schema but did not return structured content`);if(o.structuredContent)try{let a=i(o.structuredContent);if(!a.valid)throw new rr(Tr.InvalidParams,`Structured content does not match the tool's output schema: ${a.errorMessage}`)}catch(a){throw a instanceof rr?a:new rr(Tr.InvalidParams,`Failed to validate structured content: ${a instanceof Error?a.message:String(a)}`)}}return o}isToolTask(t){return this._serverCapabilities?.tasks?.requests?.tools?.call?this._cachedKnownTaskTools.has(t):!1}isToolTaskRequired(t){return this._cachedRequiredTaskTools.has(t)}cacheToolMetadata(t){this._cachedToolOutputValidators.clear(),this._cachedKnownTaskTools.clear(),this._cachedRequiredTaskTools.clear();for(let r of t){if(r.outputSchema){let o=this._jsonSchemaValidator.getValidator(r.outputSchema);this._cachedToolOutputValidators.set(r.name,o)}let n=r.execution?.taskSupport;(n==="required"||n==="optional")&&this._cachedKnownTaskTools.add(r.name),n==="required"&&this._cachedRequiredTaskTools.add(r.name)}}getToolOutputValidator(t){return this._cachedToolOutputValidators.get(t)}async listTools(t,r){let n=await this.request({method:"tools/list",params:t},uj,r);return this.cacheToolMetadata(n.tools),n}_setupListChangedHandler(t,r,n,o){let i=hie.safeParse(n);if(!i.success)throw new Error(`Invalid ${t} listChanged options: ${i.error.message}`);if(typeof n.onChanged!="function")throw new Error(`Invalid ${t} listChanged options: onChanged must be a function`);let{autoRefresh:a,debounceMs:s}=i.data,{onChanged:c}=n,p=async()=>{if(!a){c(null,null);return}try{let f=await o();c(null,f)}catch(f){let m=f instanceof Error?f:new Error(String(f));c(m,null)}},d=()=>{if(s){let f=this._listChangedDebounceTimers.get(t);f&&clearTimeout(f);let m=setTimeout(p,s);this._listChangedDebounceTimers.set(t,m)}else p()};this.setNotificationHandler(r,d)}async sendRootsListChanged(){return this.notification({method:"notifications/roots/list_changed"})}};var y6=class extends Error{constructor(t,r){super(t),this.name="ParseError",this.type=r.type,this.field=r.field,this.value=r.value,this.line=r.line}};function kj(e){}function g6(e){if(typeof e=="function")throw new TypeError("`callbacks` must be an object, got a function instead. Did you mean `{onEvent: fn}`?");let{onEvent:t=kj,onError:r=kj,onRetry:n=kj,onComment:o}=e,i="",a=!0,s,c="",p="";function d(S){let b=a?S.replace(/^\xEF\xBB\xBF/,""):S,[E,I]=G9e(`${i}${b}`);for(let T of E)f(T);i=I,a=!1}function f(S){if(S===""){y();return}if(S.startsWith(":")){o&&o(S.slice(S.startsWith(": ")?2:1));return}let b=S.indexOf(":");if(b!==-1){let E=S.slice(0,b),I=S[b+1]===" "?2:1,T=S.slice(b+I);m(E,T,S);return}m(S,"",S)}function m(S,b,E){switch(S){case"event":p=b;break;case"data":c=`${c}${b} +`;break;case"id":s=b.includes("\0")?void 0:b;break;case"retry":/^\d+$/.test(b)?n(parseInt(b,10)):r(new y6(`Invalid \`retry\` value: "${b}"`,{type:"invalid-retry",value:b,line:E}));break;default:r(new y6(`Unknown field "${S.length>20?`${S.slice(0,20)}\u2026`:S}"`,{type:"unknown-field",field:S,value:b,line:E}));break}}function y(){c.length>0&&t({id:s,event:p||void 0,data:c.endsWith(` +`)?c.slice(0,-1):c}),s=void 0,c="",p=""}function g(S={}){i&&S.consume&&f(i),a=!0,s=void 0,c="",p="",i=""}return{feed:d,reset:g}}function G9e(e){let t=[],r="",n=0;for(;n{throw TypeError(e)},Mj=(e,t,r)=>t.has(e)||zie("Cannot "+r),fn=(e,t,r)=>(Mj(e,t,"read from private field"),r?r.call(e):t.get(e)),Qi=(e,t,r)=>t.has(e)?zie("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),ri=(e,t,r,n)=>(Mj(e,t,"write to private field"),t.set(e,r),r),m_=(e,t,r)=>(Mj(e,t,"access private method"),r),Ws,Zy,tv,S6,b6,mT,ov,hT,um,rv,iv,nv,_T,Tu,Pj,Oj,Nj,Uie,Fj,Rj,fT,Lj,$j,Wy=class extends EventTarget{constructor(t,r){var n,o;super(),Qi(this,Tu),this.CONNECTING=0,this.OPEN=1,this.CLOSED=2,Qi(this,Ws),Qi(this,Zy),Qi(this,tv),Qi(this,S6),Qi(this,b6),Qi(this,mT),Qi(this,ov),Qi(this,hT,null),Qi(this,um),Qi(this,rv),Qi(this,iv,null),Qi(this,nv,null),Qi(this,_T,null),Qi(this,Oj,async i=>{var a;fn(this,rv).reset();let{body:s,redirected:c,status:p,headers:d}=i;if(p===204){m_(this,Tu,fT).call(this,"Server sent HTTP 204, not reconnecting",204),this.close();return}if(c?ri(this,tv,new URL(i.url)):ri(this,tv,void 0),p!==200){m_(this,Tu,fT).call(this,`Non-200 status code (${p})`,p);return}if(!(d.get("content-type")||"").startsWith("text/event-stream")){m_(this,Tu,fT).call(this,'Invalid content type, expected "text/event-stream"',p);return}if(fn(this,Ws)===this.CLOSED)return;ri(this,Ws,this.OPEN);let f=new Event("open");if((a=fn(this,_T))==null||a.call(this,f),this.dispatchEvent(f),typeof s!="object"||!s||!("getReader"in s)){m_(this,Tu,fT).call(this,"Invalid response body, expected a web ReadableStream",p),this.close();return}let m=new TextDecoder,y=s.getReader(),g=!0;do{let{done:S,value:b}=await y.read();b&&fn(this,rv).feed(m.decode(b,{stream:!S})),S&&(g=!1,fn(this,rv).reset(),m_(this,Tu,Lj).call(this))}while(g)}),Qi(this,Nj,i=>{ri(this,um,void 0),!(i.name==="AbortError"||i.type==="aborted")&&m_(this,Tu,Lj).call(this,Cj(i))}),Qi(this,Fj,i=>{typeof i.id=="string"&&ri(this,hT,i.id);let a=new MessageEvent(i.event||"message",{data:i.data,origin:fn(this,tv)?fn(this,tv).origin:fn(this,Zy).origin,lastEventId:i.id||""});fn(this,nv)&&(!i.event||i.event==="message")&&fn(this,nv).call(this,a),this.dispatchEvent(a)}),Qi(this,Rj,i=>{ri(this,mT,i)}),Qi(this,$j,()=>{ri(this,ov,void 0),fn(this,Ws)===this.CONNECTING&&m_(this,Tu,Pj).call(this)});try{if(t instanceof URL)ri(this,Zy,t);else if(typeof t=="string")ri(this,Zy,new URL(t,Z9e()));else throw new Error("Invalid URL")}catch{throw H9e("An invalid or illegal string was specified")}ri(this,rv,g6({onEvent:fn(this,Fj),onRetry:fn(this,Rj)})),ri(this,Ws,this.CONNECTING),ri(this,mT,3e3),ri(this,b6,(n=r?.fetch)!=null?n:globalThis.fetch),ri(this,S6,(o=r?.withCredentials)!=null?o:!1),m_(this,Tu,Pj).call(this)}get readyState(){return fn(this,Ws)}get url(){return fn(this,Zy).href}get withCredentials(){return fn(this,S6)}get onerror(){return fn(this,iv)}set onerror(t){ri(this,iv,t)}get onmessage(){return fn(this,nv)}set onmessage(t){ri(this,nv,t)}get onopen(){return fn(this,_T)}set onopen(t){ri(this,_T,t)}addEventListener(t,r,n){let o=r;super.addEventListener(t,o,n)}removeEventListener(t,r,n){let o=r;super.removeEventListener(t,o,n)}close(){fn(this,ov)&&clearTimeout(fn(this,ov)),fn(this,Ws)!==this.CLOSED&&(fn(this,um)&&fn(this,um).abort(),ri(this,Ws,this.CLOSED),ri(this,um,void 0))}};Ws=new WeakMap,Zy=new WeakMap,tv=new WeakMap,S6=new WeakMap,b6=new WeakMap,mT=new WeakMap,ov=new WeakMap,hT=new WeakMap,um=new WeakMap,rv=new WeakMap,iv=new WeakMap,nv=new WeakMap,_T=new WeakMap,Tu=new WeakSet,Pj=function(){ri(this,Ws,this.CONNECTING),ri(this,um,new AbortController),fn(this,b6)(fn(this,Zy),m_(this,Tu,Uie).call(this)).then(fn(this,Oj)).catch(fn(this,Nj))},Oj=new WeakMap,Nj=new WeakMap,Uie=function(){var e;let t={mode:"cors",redirect:"follow",headers:{Accept:"text/event-stream",...fn(this,hT)?{"Last-Event-ID":fn(this,hT)}:void 0},cache:"no-store",signal:(e=fn(this,um))==null?void 0:e.signal};return"window"in globalThis&&(t.credentials=this.withCredentials?"include":"same-origin"),t},Fj=new WeakMap,Rj=new WeakMap,fT=function(e,t){var r;fn(this,Ws)!==this.CLOSED&&ri(this,Ws,this.CLOSED);let n=new v6("error",{code:t,message:e});(r=fn(this,iv))==null||r.call(this,n),this.dispatchEvent(n)},Lj=function(e,t){var r;if(fn(this,Ws)===this.CLOSED)return;ri(this,Ws,this.CONNECTING);let n=new v6("error",{code:t,message:e});(r=fn(this,iv))==null||r.call(this,n),this.dispatchEvent(n),ri(this,ov,setTimeout(fn(this,$j),fn(this,mT)))},$j=new WeakMap,Wy.CONNECTING=0,Wy.OPEN=1,Wy.CLOSED=2;function Z9e(){let e="document"in globalThis?globalThis.document:void 0;return e&&typeof e=="object"&&"baseURI"in e&&typeof e.baseURI=="string"?e.baseURI:void 0}function av(e){return e?e instanceof Headers?Object.fromEntries(e.entries()):Array.isArray(e)?Object.fromEntries(e):{...e}:{}}function x6(e=fetch,t){return t?async(r,n)=>{let o={...t,...n,headers:n?.headers?{...av(t.headers),...av(n.headers)}:t.headers};return e(r,o)}:e}var jj;jj=globalThis.crypto?.webcrypto??globalThis.crypto??import("node:crypto").then(e=>e.webcrypto);async function W9e(e){return(await jj).getRandomValues(new Uint8Array(e))}async function Q9e(e){let t="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._~",r=Math.pow(2,8)-Math.pow(2,8)%t.length,n="";for(;n.length128)throw`Expected a length between 43 and 128. Received ${e}.`;let t=await X9e(e),r=await Y9e(t);return{code_verifier:t,code_challenge:r}}var ka=x7().superRefine((e,t)=>{if(!URL.canParse(e))return t.addIssue({code:Qoe.custom,message:"URL must be parseable",fatal:!0}),WC}).refine(e=>{let t=new URL(e);return t.protocol!=="javascript:"&&t.protocol!=="data:"&&t.protocol!=="vbscript:"},{message:"URL cannot use javascript:, data:, or vbscript: scheme"}),Vie=Ui({resource:Y().url(),authorization_servers:ot(ka).optional(),jwks_uri:Y().url().optional(),scopes_supported:ot(Y()).optional(),bearer_methods_supported:ot(Y()).optional(),resource_signing_alg_values_supported:ot(Y()).optional(),resource_name:Y().optional(),resource_documentation:Y().optional(),resource_policy_uri:Y().url().optional(),resource_tos_uri:Y().url().optional(),tls_client_certificate_bound_access_tokens:uo().optional(),authorization_details_types_supported:ot(Y()).optional(),dpop_signing_alg_values_supported:ot(Y()).optional(),dpop_bound_access_tokens_required:uo().optional()}),qj=Ui({issuer:Y(),authorization_endpoint:ka,token_endpoint:ka,registration_endpoint:ka.optional(),scopes_supported:ot(Y()).optional(),response_types_supported:ot(Y()),response_modes_supported:ot(Y()).optional(),grant_types_supported:ot(Y()).optional(),token_endpoint_auth_methods_supported:ot(Y()).optional(),token_endpoint_auth_signing_alg_values_supported:ot(Y()).optional(),service_documentation:ka.optional(),revocation_endpoint:ka.optional(),revocation_endpoint_auth_methods_supported:ot(Y()).optional(),revocation_endpoint_auth_signing_alg_values_supported:ot(Y()).optional(),introspection_endpoint:Y().optional(),introspection_endpoint_auth_methods_supported:ot(Y()).optional(),introspection_endpoint_auth_signing_alg_values_supported:ot(Y()).optional(),code_challenge_methods_supported:ot(Y()).optional(),client_id_metadata_document_supported:uo().optional()}),e5e=Ui({issuer:Y(),authorization_endpoint:ka,token_endpoint:ka,userinfo_endpoint:ka.optional(),jwks_uri:ka,registration_endpoint:ka.optional(),scopes_supported:ot(Y()).optional(),response_types_supported:ot(Y()),response_modes_supported:ot(Y()).optional(),grant_types_supported:ot(Y()).optional(),acr_values_supported:ot(Y()).optional(),subject_types_supported:ot(Y()),id_token_signing_alg_values_supported:ot(Y()),id_token_encryption_alg_values_supported:ot(Y()).optional(),id_token_encryption_enc_values_supported:ot(Y()).optional(),userinfo_signing_alg_values_supported:ot(Y()).optional(),userinfo_encryption_alg_values_supported:ot(Y()).optional(),userinfo_encryption_enc_values_supported:ot(Y()).optional(),request_object_signing_alg_values_supported:ot(Y()).optional(),request_object_encryption_alg_values_supported:ot(Y()).optional(),request_object_encryption_enc_values_supported:ot(Y()).optional(),token_endpoint_auth_methods_supported:ot(Y()).optional(),token_endpoint_auth_signing_alg_values_supported:ot(Y()).optional(),display_values_supported:ot(Y()).optional(),claim_types_supported:ot(Y()).optional(),claims_supported:ot(Y()).optional(),service_documentation:Y().optional(),claims_locales_supported:ot(Y()).optional(),ui_locales_supported:ot(Y()).optional(),claims_parameter_supported:uo().optional(),request_parameter_supported:uo().optional(),request_uri_parameter_supported:uo().optional(),require_request_uri_registration:uo().optional(),op_policy_uri:ka.optional(),op_tos_uri:ka.optional(),client_id_metadata_document_supported:uo().optional()}),Kie=dt({...e5e.shape,...qj.pick({code_challenge_methods_supported:!0}).shape}),Gie=dt({access_token:Y(),id_token:Y().optional(),token_type:Y(),expires_in:QP.number().optional(),scope:Y().optional(),refresh_token:Y().optional()}).strip(),Hie=dt({error:Y(),error_description:Y().optional(),error_uri:Y().optional()}),Jie=ka.optional().or($t("").transform(()=>{})),t5e=dt({redirect_uris:ot(ka),token_endpoint_auth_method:Y().optional(),grant_types:ot(Y()).optional(),response_types:ot(Y()).optional(),client_name:Y().optional(),client_uri:ka.optional(),logo_uri:Jie,scope:Y().optional(),contacts:ot(Y()).optional(),tos_uri:Jie,policy_uri:Y().optional(),jwks_uri:ka.optional(),jwks:j7().optional(),software_id:Y().optional(),software_version:Y().optional(),software_statement:Y().optional()}).strip(),r5e=dt({client_id:Y(),client_secret:Y().optional(),client_id_issued_at:$n().optional(),client_secret_expires_at:$n().optional()}).strip(),Zie=t5e.merge(r5e),h8t=dt({error:Y(),error_description:Y().optional()}).strip(),y8t=dt({token:Y(),token_type_hint:Y().optional()}).strip();function Wie(e){let t=typeof e=="string"?new URL(e):new URL(e.href);return t.hash="",t}function Qie({requestedResource:e,configuredResource:t}){let r=typeof e=="string"?new URL(e):new URL(e.href),n=typeof t=="string"?new URL(t):new URL(t.href);if(r.origin!==n.origin||r.pathname.length=400&&e.status<500&&t!=="/"}async function _5e(e,t,r,n){let o=new URL(e),i=n?.protocolVersion??H0,a;if(n?.metadataUrl)a=new URL(n.metadataUrl);else{let c=p5e(t,o.pathname);a=new URL(c,n?.metadataServerUrl??o),a.search=o.search}let s=await Yie(a,i,r);if(!n?.metadataUrl&&d5e(s,o.pathname)){let c=new URL(`/.well-known/${t}`,o);s=await Yie(c,i,r)}return s}function f5e(e){let t=typeof e=="string"?new URL(e):e,r=t.pathname!=="/",n=[];if(!r)return n.push({url:new URL("/.well-known/oauth-authorization-server",t.origin),type:"oauth"}),n.push({url:new URL("/.well-known/openid-configuration",t.origin),type:"oidc"}),n;let o=t.pathname;return o.endsWith("/")&&(o=o.slice(0,-1)),n.push({url:new URL(`/.well-known/oauth-authorization-server${o}`,t.origin),type:"oauth"}),n.push({url:new URL(`/.well-known/openid-configuration${o}`,t.origin),type:"oidc"}),n.push({url:new URL(`${o}/.well-known/openid-configuration`,t.origin),type:"oidc"}),n}async function rae(e,{fetchFn:t=fetch,protocolVersion:r=H0}={}){let n={"MCP-Protocol-Version":r,Accept:"application/json"},o=f5e(e);for(let{url:i,type:a}of o){let s=await Kj(i,n,t);if(s){if(!s.ok){if(await s.body?.cancel(),s.status>=400&&s.status<500)continue;throw new Error(`HTTP ${s.status} trying to load ${a==="oauth"?"OAuth":"OpenID provider"} metadata from ${i}`)}return a==="oauth"?qj.parse(await s.json()):Kie.parse(await s.json())}}}async function m5e(e,t){let r,n;try{r=await tae(e,{resourceMetadataUrl:t?.resourceMetadataUrl},t?.fetchFn),r.authorization_servers&&r.authorization_servers.length>0&&(n=r.authorization_servers[0])}catch{}n||(n=String(new URL("/",e)));let o=await rae(n,{fetchFn:t?.fetchFn});return{authorizationServerUrl:n,authorizationServerMetadata:o,resourceMetadata:r}}async function h5e(e,{metadata:t,clientInformation:r,redirectUrl:n,scope:o,state:i,resource:a}){let s;if(t){if(s=new URL(t.authorization_endpoint),!t.response_types_supported.includes(Uj))throw new Error(`Incompatible auth server: does not support response type ${Uj}`);if(t.code_challenge_methods_supported&&!t.code_challenge_methods_supported.includes(zj))throw new Error(`Incompatible auth server: does not support code challenge method ${zj}`)}else s=new URL("/authorize",e);let c=await Bj(),p=c.code_verifier,d=c.code_challenge;return s.searchParams.set("response_type",Uj),s.searchParams.set("client_id",r.client_id),s.searchParams.set("code_challenge",d),s.searchParams.set("code_challenge_method",zj),s.searchParams.set("redirect_uri",String(n)),i&&s.searchParams.set("state",i),o&&s.searchParams.set("scope",o),o?.includes("offline_access")&&s.searchParams.append("prompt","consent"),a&&s.searchParams.set("resource",a.href),{authorizationUrl:s,codeVerifier:p}}function y5e(e,t,r){return new URLSearchParams({grant_type:"authorization_code",code:e,code_verifier:t,redirect_uri:String(r)})}async function nae(e,{metadata:t,tokenRequestParams:r,clientInformation:n,addClientAuthentication:o,resource:i,fetchFn:a}){let s=t?.token_endpoint?new URL(t.token_endpoint):new URL("/token",e),c=new Headers({"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"});if(i&&r.set("resource",i.href),o)await o(c,r,s,t);else if(n){let d=t?.token_endpoint_auth_methods_supported??[],f=o5e(n,d);i5e(f,n,c,r)}let p=await(a??fetch)(s,{method:"POST",headers:c,body:r});if(!p.ok)throw await eae(p);return Gie.parse(await p.json())}async function g5e(e,{metadata:t,clientInformation:r,refreshToken:n,resource:o,addClientAuthentication:i,fetchFn:a}){let s=new URLSearchParams({grant_type:"refresh_token",refresh_token:n}),c=await nae(e,{metadata:t,tokenRequestParams:s,clientInformation:r,addClientAuthentication:i,resource:o,fetchFn:a});return{refresh_token:n,...c}}async function S5e(e,t,{metadata:r,resource:n,authorizationCode:o,fetchFn:i}={}){let a=e.clientMetadata.scope,s;if(e.prepareTokenRequest&&(s=await e.prepareTokenRequest(a)),!s){if(!o)throw new Error("Either provider.prepareTokenRequest() or authorizationCode is required");if(!e.redirectUrl)throw new Error("redirectUrl is required for authorization_code flow");let p=await e.codeVerifier();s=y5e(o,p,e.redirectUrl)}let c=await e.clientInformation();return nae(t,{metadata:r,tokenRequestParams:s,clientInformation:c??void 0,addClientAuthentication:e.addClientAuthentication,resource:n,fetchFn:i})}async function v5e(e,{metadata:t,clientMetadata:r,fetchFn:n}){let o;if(t){if(!t.registration_endpoint)throw new Error("Incompatible auth server: does not support dynamic client registration");o=new URL(t.registration_endpoint)}else o=new URL("/register",e);let i=await(n??fetch)(o,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)});if(!i.ok)throw await eae(i);return Zie.parse(await i.json())}var Gj=class extends Error{constructor(t,r,n){super(`SSE error: ${r}`),this.code=t,this.event=n}},E6=class{constructor(t,r){this._url=t,this._resourceMetadataUrl=void 0,this._scope=void 0,this._eventSourceInit=r?.eventSourceInit,this._requestInit=r?.requestInit,this._authProvider=r?.authProvider,this._fetch=r?.fetch,this._fetchWithInit=x6(r?.fetch,r?.requestInit)}async _authThenStart(){if(!this._authProvider)throw new As("No auth provider");let t;try{t=await Al(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})}catch(r){throw this.onerror?.(r),r}if(t!=="AUTHORIZED")throw new As;return await this._startOrAuth()}async _commonHeaders(){let t={};if(this._authProvider){let n=await this._authProvider.tokens();n&&(t.Authorization=`Bearer ${n.access_token}`)}this._protocolVersion&&(t["mcp-protocol-version"]=this._protocolVersion);let r=av(this._requestInit?.headers);return new Headers({...t,...r})}_startOrAuth(){let t=this?._eventSourceInit?.fetch??this._fetch??fetch;return new Promise((r,n)=>{this._eventSource=new Wy(this._url.href,{...this._eventSourceInit,fetch:async(o,i)=>{let a=await this._commonHeaders();a.set("Accept","text/event-stream");let s=await t(o,{...i,headers:a});if(s.status===401&&s.headers.has("www-authenticate")){let{resourceMetadataUrl:c,scope:p}=sv(s);this._resourceMetadataUrl=c,this._scope=p}return s}}),this._abortController=new AbortController,this._eventSource.onerror=o=>{if(o.code===401&&this._authProvider){this._authThenStart().then(r,n);return}let i=new Gj(o.code,o.message,o);n(i),this.onerror?.(i)},this._eventSource.onopen=()=>{},this._eventSource.addEventListener("endpoint",o=>{let i=o;try{if(this._endpoint=new URL(i.data,this._url),this._endpoint.origin!==this._url.origin)throw new Error(`Endpoint origin does not match connection origin: ${this._endpoint.origin}`)}catch(a){n(a),this.onerror?.(a),this.close();return}r()}),this._eventSource.onmessage=o=>{let i=o,a;try{a=sm.parse(JSON.parse(i.data))}catch(s){this.onerror?.(s);return}this.onmessage?.(a)}})}async start(){if(this._eventSource)throw new Error("SSEClientTransport already started! If using Client class, note that connect() calls start() automatically.");return await this._startOrAuth()}async finishAuth(t){if(!this._authProvider)throw new As("No auth provider");if(await Al(this._authProvider,{serverUrl:this._url,authorizationCode:t,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new As("Failed to authorize")}async close(){this._abortController?.abort(),this._eventSource?.close(),this.onclose?.()}async send(t){if(!this._endpoint)throw new Error("Not connected");try{let r=await this._commonHeaders();r.set("content-type","application/json");let n={...this._requestInit,method:"POST",headers:r,body:JSON.stringify(t),signal:this._abortController?.signal},o=await(this._fetch??fetch)(this._endpoint,n);if(!o.ok){let i=await o.text().catch(()=>null);if(o.status===401&&this._authProvider){let{resourceMetadataUrl:a,scope:s}=sv(o);if(this._resourceMetadataUrl=a,this._scope=s,await Al(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new As;return this.send(t)}throw new Error(`Error POSTing to endpoint (HTTP ${o.status}): ${i}`)}await o.body?.cancel()}catch(r){throw this.onerror?.(r),r}}setProtocolVersion(t){this._protocolVersion=t}};var Gae=n0(Vae(),1);import I6 from"node:process";import{PassThrough as H5e}from"node:stream";var D6=class{append(t){this._buffer=this._buffer?Buffer.concat([this._buffer,t]):t}readMessage(){if(!this._buffer)return null;let t=this._buffer.indexOf(` +`);if(t===-1)return null;let r=this._buffer.toString("utf8",0,t).replace(/\r$/,"");return this._buffer=this._buffer.subarray(t+1),G5e(r)}clear(){this._buffer=void 0}};function G5e(e){return sm.parse(JSON.parse(e))}function Kae(e){return JSON.stringify(e)+` +`}var Z5e=I6.platform==="win32"?["APPDATA","HOMEDRIVE","HOMEPATH","LOCALAPPDATA","PATH","PROCESSOR_ARCHITECTURE","SYSTEMDRIVE","SYSTEMROOT","TEMP","USERNAME","USERPROFILE","PROGRAMFILES"]:["HOME","LOGNAME","PATH","SHELL","TERM","USER"];function W5e(){let e={};for(let t of Z5e){let r=I6.env[t];r!==void 0&&(r.startsWith("()")||(e[t]=r))}return e}var A6=class{constructor(t){this._readBuffer=new D6,this._stderrStream=null,this._serverParams=t,(t.stderr==="pipe"||t.stderr==="overlapped")&&(this._stderrStream=new H5e)}async start(){if(this._process)throw new Error("StdioClientTransport already started! If using Client class, note that connect() calls start() automatically.");return new Promise((t,r)=>{this._process=(0,Gae.default)(this._serverParams.command,this._serverParams.args??[],{env:{...W5e(),...this._serverParams.env},stdio:["pipe","pipe",this._serverParams.stderr??"inherit"],shell:!1,windowsHide:I6.platform==="win32"&&Q5e(),cwd:this._serverParams.cwd}),this._process.on("error",n=>{r(n),this.onerror?.(n)}),this._process.on("spawn",()=>{t()}),this._process.on("close",n=>{this._process=void 0,this.onclose?.()}),this._process.stdin?.on("error",n=>{this.onerror?.(n)}),this._process.stdout?.on("data",n=>{this._readBuffer.append(n),this.processReadBuffer()}),this._process.stdout?.on("error",n=>{this.onerror?.(n)}),this._stderrStream&&this._process.stderr&&this._process.stderr.pipe(this._stderrStream)})}get stderr(){return this._stderrStream?this._stderrStream:this._process?.stderr??null}get pid(){return this._process?.pid??null}processReadBuffer(){for(;;)try{let t=this._readBuffer.readMessage();if(t===null)break;this.onmessage?.(t)}catch(t){this.onerror?.(t)}}async close(){if(this._process){let t=this._process;this._process=void 0;let r=new Promise(n=>{t.once("close",()=>{n()})});try{t.stdin?.end()}catch{}if(await Promise.race([r,new Promise(n=>setTimeout(n,2e3).unref())]),t.exitCode===null){try{t.kill("SIGTERM")}catch{}await Promise.race([r,new Promise(n=>setTimeout(n,2e3).unref())])}if(t.exitCode===null)try{t.kill("SIGKILL")}catch{}}this._readBuffer.clear()}send(t){return new Promise(r=>{if(!this._process?.stdin)throw new Error("Not connected");let n=Kae(t);this._process.stdin.write(n)?r():this._process.stdin.once("drain",r)})}};function Q5e(){return"type"in I6}var w6=class extends TransformStream{constructor({onError:t,onRetry:r,onComment:n}={}){let o;super({start(i){o=g6({onEvent:a=>{i.enqueue(a)},onError(a){t==="terminate"?i.error(a):typeof t=="function"&&t(a)},onRetry:r,onComment:n})},transform(i){o.feed(i)}})}};var X5e={initialReconnectionDelay:1e3,maxReconnectionDelay:3e4,reconnectionDelayGrowFactor:1.5,maxRetries:2},pm=class extends Error{constructor(t,r){super(`Streamable HTTP error: ${r}`),this.code=t}},k6=class{constructor(t,r){this._hasCompletedAuthFlow=!1,this._url=t,this._resourceMetadataUrl=void 0,this._scope=void 0,this._requestInit=r?.requestInit,this._authProvider=r?.authProvider,this._fetch=r?.fetch,this._fetchWithInit=x6(r?.fetch,r?.requestInit),this._sessionId=r?.sessionId,this._reconnectionOptions=r?.reconnectionOptions??X5e}async _authThenStart(){if(!this._authProvider)throw new As("No auth provider");let t;try{t=await Al(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})}catch(r){throw this.onerror?.(r),r}if(t!=="AUTHORIZED")throw new As;return await this._startOrAuthSse({resumptionToken:void 0})}async _commonHeaders(){let t={};if(this._authProvider){let n=await this._authProvider.tokens();n&&(t.Authorization=`Bearer ${n.access_token}`)}this._sessionId&&(t["mcp-session-id"]=this._sessionId),this._protocolVersion&&(t["mcp-protocol-version"]=this._protocolVersion);let r=av(this._requestInit?.headers);return new Headers({...t,...r})}async _startOrAuthSse(t){let{resumptionToken:r}=t;try{let n=await this._commonHeaders();n.set("Accept","text/event-stream"),r&&n.set("last-event-id",r);let o=await(this._fetch??fetch)(this._url,{method:"GET",headers:n,signal:this._abortController?.signal});if(!o.ok){if(await o.body?.cancel(),o.status===401&&this._authProvider)return await this._authThenStart();if(o.status===405)return;throw new pm(o.status,`Failed to open SSE stream: ${o.statusText}`)}this._handleSseStream(o.body,t,!0)}catch(n){throw this.onerror?.(n),n}}_getNextReconnectionDelay(t){if(this._serverRetryMs!==void 0)return this._serverRetryMs;let r=this._reconnectionOptions.initialReconnectionDelay,n=this._reconnectionOptions.reconnectionDelayGrowFactor,o=this._reconnectionOptions.maxReconnectionDelay;return Math.min(r*Math.pow(n,t),o)}_scheduleReconnection(t,r=0){let n=this._reconnectionOptions.maxRetries;if(r>=n){this.onerror?.(new Error(`Maximum reconnection attempts (${n}) exceeded.`));return}let o=this._getNextReconnectionDelay(r);this._reconnectionTimeout=setTimeout(()=>{this._startOrAuthSse(t).catch(i=>{this.onerror?.(new Error(`Failed to reconnect SSE stream: ${i instanceof Error?i.message:String(i)}`)),this._scheduleReconnection(t,r+1)})},o)}_handleSseStream(t,r,n){if(!t)return;let{onresumptiontoken:o,replayMessageId:i}=r,a,s=!1,c=!1;(async()=>{try{let d=t.pipeThrough(new TextDecoderStream).pipeThrough(new w6({onRetry:y=>{this._serverRetryMs=y}})).getReader();for(;;){let{value:y,done:g}=await d.read();if(g)break;if(y.id&&(a=y.id,s=!0,o?.(y.id)),!!y.data&&(!y.event||y.event==="message"))try{let S=sm.parse(JSON.parse(y.data));Ky(S)&&(c=!0,i!==void 0&&(S.id=i)),this.onmessage?.(S)}catch(S){this.onerror?.(S)}}(n||s)&&!c&&this._abortController&&!this._abortController.signal.aborted&&this._scheduleReconnection({resumptionToken:a,onresumptiontoken:o,replayMessageId:i},0)}catch(d){if(this.onerror?.(new Error(`SSE stream disconnected: ${d}`)),(n||s)&&!c&&this._abortController&&!this._abortController.signal.aborted)try{this._scheduleReconnection({resumptionToken:a,onresumptiontoken:o,replayMessageId:i},0)}catch(y){this.onerror?.(new Error(`Failed to reconnect: ${y instanceof Error?y.message:String(y)}`))}}})()}async start(){if(this._abortController)throw new Error("StreamableHTTPClientTransport already started! If using Client class, note that connect() calls start() automatically.");this._abortController=new AbortController}async finishAuth(t){if(!this._authProvider)throw new As("No auth provider");if(await Al(this._authProvider,{serverUrl:this._url,authorizationCode:t,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new As("Failed to authorize")}async close(){this._reconnectionTimeout&&(clearTimeout(this._reconnectionTimeout),this._reconnectionTimeout=void 0),this._abortController?.abort(),this.onclose?.()}async send(t,r){try{let{resumptionToken:n,onresumptiontoken:o}=r||{};if(n){this._startOrAuthSse({resumptionToken:n,replayMessageId:nT(t)?t.id:void 0}).catch(m=>this.onerror?.(m));return}let i=await this._commonHeaders();i.set("content-type","application/json"),i.set("accept","application/json, text/event-stream");let a={...this._requestInit,method:"POST",headers:i,body:JSON.stringify(t),signal:this._abortController?.signal},s=await(this._fetch??fetch)(this._url,a),c=s.headers.get("mcp-session-id");if(c&&(this._sessionId=c),!s.ok){let m=await s.text().catch(()=>null);if(s.status===401&&this._authProvider){if(this._hasCompletedAuthFlow)throw new pm(401,"Server returned 401 after successful authentication");let{resourceMetadataUrl:y,scope:g}=sv(s);if(this._resourceMetadataUrl=y,this._scope=g,await Al(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new As;return this._hasCompletedAuthFlow=!0,this.send(t)}if(s.status===403&&this._authProvider){let{resourceMetadataUrl:y,scope:g,error:S}=sv(s);if(S==="insufficient_scope"){let b=s.headers.get("WWW-Authenticate");if(this._lastUpscopingHeader===b)throw new pm(403,"Server returned 403 after trying upscoping");if(g&&(this._scope=g),y&&(this._resourceMetadataUrl=y),this._lastUpscopingHeader=b??void 0,await Al(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetch})!=="AUTHORIZED")throw new As;return this.send(t)}}throw new pm(s.status,`Error POSTing to endpoint: ${m}`)}if(this._hasCompletedAuthFlow=!1,this._lastUpscopingHeader=void 0,s.status===202){await s.body?.cancel(),lie(t)&&this._startOrAuthSse({resumptionToken:void 0}).catch(m=>this.onerror?.(m));return}let d=(Array.isArray(t)?t:[t]).filter(m=>"method"in m&&"id"in m&&m.id!==void 0).length>0,f=s.headers.get("content-type");if(d)if(f?.includes("text/event-stream"))this._handleSseStream(s.body,{onresumptiontoken:o},!1);else if(f?.includes("application/json")){let m=await s.json(),y=Array.isArray(m)?m.map(g=>sm.parse(g)):[sm.parse(m)];for(let g of y)this.onmessage?.(g)}else throw await s.body?.cancel(),new pm(-1,`Unexpected content type: ${f}`);else await s.body?.cancel()}catch(n){throw this.onerror?.(n),n}}get sessionId(){return this._sessionId}async terminateSession(){if(this._sessionId)try{let t=await this._commonHeaders(),r={...this._requestInit,method:"DELETE",headers:t,signal:this._abortController?.signal},n=await(this._fetch??fetch)(this._url,r);if(await n.body?.cancel(),!n.ok&&n.status!==405)throw new pm(n.status,`Failed to terminate session: ${n.statusText}`);this._sessionId=void 0}catch(t){throw this.onerror?.(t),t}}setProtocolVersion(t){this._protocolVersion=t}get protocolVersion(){return this._protocolVersion}async resumeStream(t,r){await this._startOrAuthSse({resumptionToken:t,onresumptiontoken:r?.onresumptiontoken})}};import*as Hae from"effect/Data";import*as ns from"effect/Effect";var C6=class extends Hae.TaggedError("McpConnectionError"){},tg=e=>e.transport==="stdio"||typeof e.command=="string"&&e.command.trim().length>0,P6=e=>new C6(e),Y5e=e=>ns.try({try:()=>{if(!e.endpoint)throw new Error("MCP endpoint is required for HTTP/SSE transports");let t=new URL(e.endpoint);for(let[r,n]of Object.entries(e.queryParams))t.searchParams.set(r,n);return t},catch:t=>P6({transport:e.transport,message:"Failed building MCP endpoint URL",cause:t})}),eLe=(e,t,r)=>{let n=new Headers(t?.headers??{});for(let[o,i]of Object.entries(r))n.set(o,i);return fetch(e,{...t,headers:n})},tLe=e=>({client:e,close:()=>e.close()}),rLe=e=>ns.tryPromise({try:()=>e.close(),catch:t=>P6({transport:"auto",message:"Failed closing MCP client",cause:t})}).pipe(ns.ignore),nB=e=>ns.gen(function*(){let t=e.createClient(),r=e.createTransport();return yield*ns.tryPromise({try:()=>t.connect(r),catch:n=>P6({transport:e.transport,message:`Failed connecting to MCP server via ${e.transport}: ${n instanceof Error?n.message:String(n)}`,cause:n})}).pipe(ns.as(tLe(t)),ns.onError(()=>rLe(t)))}),dm=e=>{let t=e.headers??{},r=tg(e)?"stdio":e.transport??"auto",n=Object.keys(t).length>0?{headers:t}:void 0,o=()=>new h6({name:e.clientName??"executor-codemode-mcp",version:e.clientVersion??"0.1.0"},{capabilities:{elicitation:{form:{},url:{}}}});return ns.gen(function*(){if(r==="stdio"){let c=e.command?.trim();return c?yield*nB({createClient:o,transport:"stdio",createTransport:()=>new A6({command:c,args:e.args?[...e.args]:void 0,env:e.env,cwd:e.cwd?.trim().length?e.cwd.trim():void 0})}):yield*P6({transport:"stdio",message:"MCP stdio transport requires a command",cause:new Error("Missing MCP stdio command")})}let i=yield*Y5e({endpoint:e.endpoint,queryParams:e.queryParams??{},transport:r}),a=nB({createClient:o,transport:"streamable-http",createTransport:()=>new k6(i,{requestInit:n,authProvider:e.authProvider})});if(r==="streamable-http")return yield*a;let s=nB({createClient:o,transport:"sse",createTransport:()=>new E6(i,{authProvider:e.authProvider,requestInit:n,eventSourceInit:n?{fetch:(c,p)=>eLe(c,p,t)}:void 0})});return r==="sse"?yield*s:yield*a.pipe(ns.catchAll(()=>s))})};var Ca=1;import{Schema as po}from"effect";var Ip=po.String.pipe(po.brand("DocumentId")),wp=po.String.pipe(po.brand("ResourceId")),Du=po.String.pipe(po.brand("ScopeId")),Oc=po.String.pipe(po.brand("CapabilityId")),Qs=po.String.pipe(po.brand("ExecutableId")),_m=po.String.pipe(po.brand("ResponseSetId")),y_=po.String.pipe(po.brand("DiagnosticId")),mn=po.String.pipe(po.brand("ShapeSymbolId")),fm=po.String.pipe(po.brand("ParameterSymbolId")),rg=po.String.pipe(po.brand("RequestBodySymbolId")),Nc=po.String.pipe(po.brand("ResponseSymbolId")),mm=po.String.pipe(po.brand("HeaderSymbolId")),kp=po.String.pipe(po.brand("ExampleSymbolId")),hm=po.String.pipe(po.brand("SecuritySchemeSymbolId")),Zae=po.Union(mn,fm,rg,Nc,mm,kp,hm);import*as Qae from"effect/Effect";var Wae=5e3,Ci=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),Au=e=>typeof e=="string"&&e.length>0?e:null,Cp=e=>{if(e==null)return null;let t=e.trim();return t.length>0?t:null},Pp=e=>new URL(e).hostname,os=e=>{let t=e.trim().toLowerCase().replace(/[^a-z0-9]+/g,".").replace(/^\.+|\.+$/g,"");return t.length>0?t:"source"},Xae=e=>{let t=e.trim();if(t.length===0)throw new Error("Source URL is required");let r=new URL(t);if(r.protocol!=="http:"&&r.protocol!=="https:")throw new Error("Source URL must use http or https");return r.toString()},uv=(e,t)=>({...t,suggestedKind:e,supported:!1}),Iu=(e,t)=>({...t,suggestedKind:e,supported:!0}),ng=e=>({suggestedKind:"unknown",confidence:"low",supported:!1,reason:e,headerName:null,prefix:null,parameterName:null,parameterLocation:null,oauthAuthorizationUrl:null,oauthTokenUrl:null,oauthScopes:[]}),Op=(e,t="high")=>Iu("none",{confidence:t,reason:e,headerName:null,prefix:null,parameterName:null,parameterLocation:null,oauthAuthorizationUrl:null,oauthTokenUrl:null,oauthScopes:[]}),Yae=(e,t)=>{let r=e["www-authenticate"]??e["WWW-Authenticate"];if(!r)return ng(t);let n=r.toLowerCase();return n.includes("bearer")?Iu("bearer",{confidence:n.includes("realm=")?"medium":"low",reason:`Derived from HTTP challenge: ${r}`,headerName:"Authorization",prefix:"Bearer ",parameterName:null,parameterLocation:null,oauthAuthorizationUrl:null,oauthTokenUrl:null,oauthScopes:[]}):n.includes("basic")?uv("basic",{confidence:"medium",reason:`Derived from HTTP challenge: ${r}`,headerName:"Authorization",prefix:"Basic ",parameterName:null,parameterLocation:null,oauthAuthorizationUrl:null,oauthTokenUrl:null,oauthScopes:[]}):ng(t)},ese=e=>e==null||e.kind==="none"?{}:e.kind==="headers"?{...e.headers}:e.kind==="basic"?{Authorization:`Basic ${Buffer.from(`${e.username}:${e.password}`).toString("base64")}`}:{[Cp(e.headerName)??"Authorization"]:`${e.prefix??"Bearer "}${e.token}`},nLe=e=>{let t={};return e.headers.forEach((r,n)=>{t[n]=r}),t},pv=e=>Qae.tryPromise({try:async()=>{let t;try{t=await fetch(e.url,{method:e.method,headers:e.headers,body:e.body,signal:AbortSignal.timeout(Wae)})}catch(r){throw r instanceof Error&&(r.name==="AbortError"||r.name==="TimeoutError")?new Error(`Source discovery timed out after ${Wae}ms`):r}return{status:t.status,headers:nLe(t),text:await t.text()}},catch:t=>t instanceof Error?t:new Error(String(t))}),ym=e=>/graphql/i.test(new URL(e).pathname),tse=e=>{try{return JSON.parse(e)}catch{return null}},rse=e=>{let t=e,r=Pp(t);return{detectedKind:"unknown",confidence:"low",endpoint:t,specUrl:null,name:r,namespace:os(r),transport:null,authInference:ng("Could not infer source kind or auth requirements from the provided URL"),toolCount:null,warnings:["Could not confirm whether the URL is Google Discovery, OpenAPI, GraphQL, or MCP."]}};var CT=e=>e===null||typeof e!="object"?JSON.stringify(e):Array.isArray(e)?`[${e.map(r=>CT(r)).join(",")}]`:`{${Object.entries(e).sort(([r],[n])=>r.localeCompare(n)).map(([r,n])=>`${JSON.stringify(r)}:${CT(n)}`).join(",")}}`,hn=e=>Dc(CT(e)).slice(0,16),Vr=e=>e,Xs=e=>typeof e=="object"&&e!==null&&!Array.isArray(e)?e:{},oLe=(...e)=>{let t={};for(let r of e){let n=Xs(Xs(r).$defs);for(let[o,i]of Object.entries(n))t[o]=i}return Object.keys(t).length>0?t:void 0},dv=(e,...t)=>{let r=oLe(e,...t);return r?{...e,$defs:r}:e},oB=e=>{let t=Xs(e);return t.type==="object"||t.properties!==void 0},_v=e=>{switch(e.kind){case"openapi":return"openapi";case"graphql":return"graphql-schema";case"google_discovery":return"google-discovery";case"mcp":return"mcp";default:return"custom"}},g_=(e,t)=>{let r=e.namespace??os(e.name);return(r?`${r}.${t}`:t).split(".").filter(o=>o.length>0)},pn=(e,t)=>[{relation:"declared",documentId:e,pointer:t}],S_=e=>({approval:{mayRequire:e!=="read",reasons:e==="delete"?["delete"]:e==="write"||e==="action"?["write"]:[]},elicitation:{mayRequest:!1},resume:{supported:!1}}),Is=e=>({sourceKind:_v(e.source),adapterKey:e.adapterKey,importerVersion:"ir.v1.snapshot_builder",importedAt:new Date().toISOString(),sourceConfigHash:e.source.sourceHash??hn({endpoint:e.source.endpoint,binding:e.source.binding,auth:e.source.auth?.kind??null})}),In=e=>{let t=e.summary??void 0,r=e.description??void 0,n=e.externalDocsUrl??void 0;if(!(!t&&!r&&!n))return{...t?{summary:t}:{},...r?{description:r}:{},...n?{externalDocsUrl:n}:{}}},gm=e=>{let t=kp.make(`example_${hn({pointer:e.pointer,value:e.value})}`);return Vr(e.catalog.symbols)[t]={id:t,kind:"example",exampleKind:"value",...e.name?{name:e.name}:{},...In({summary:e.summary??null,description:e.description??null})?{docs:In({summary:e.summary??null,description:e.description??null})}:{},value:e.value,synthetic:!1,provenance:pn(e.documentId,e.pointer)},t},kT=(e,t)=>{let r=Xs(e),n=Xs(r.properties);if(n[t]!==void 0)return n[t]},PT=(e,t,r)=>{let n=kT(e,r);if(n!==void 0)return n;let i=kT(e,t==="header"?"headers":t==="cookie"?"cookies":t);return i===void 0?void 0:kT(i,r)},fv=e=>kT(e,"body")??kT(e,"input"),OT=e=>{let t=e&&e.length>0?[...e]:["application/json"],r=[...t.filter(n=>n==="application/json"),...t.filter(n=>n!=="application/json"&&n.toLowerCase().includes("+json")),...t.filter(n=>n!=="application/json"&&!n.toLowerCase().includes("+json")&&n.toLowerCase().includes("json")),...t];return[...new Set(r)]},v_=e=>{let t=_m.make(`response_set_${hn({responseId:e.responseId,traits:e.traits})}`);return Vr(e.catalog.responseSets)[t]={id:t,variants:[{match:{kind:"range",value:"2XX"},responseId:e.responseId,...e.traits&&e.traits.length>0?{traits:e.traits}:{}}],synthetic:!1,provenance:e.provenance},t},iB=e=>{let t=_m.make(`response_set_${hn({variants:e.variants.map(r=>({match:r.match,responseId:r.responseId,traits:r.traits}))})}`);return Vr(e.catalog.responseSets)[t]={id:t,variants:e.variants,synthetic:!1,provenance:e.provenance},t},aB=e=>{let t=e.trim().toUpperCase();return/^\d{3}$/.test(t)?{kind:"exact",status:Number(t)}:/^[1-5]XX$/.test(t)?{kind:"range",value:t}:{kind:"default"}};var mv=e=>e!==null&&typeof e=="object"&&!Array.isArray(e)?e:{},wu=e=>typeof e=="string"&&e.trim().length>0?e:null,nse=e=>typeof e=="boolean"?e:null,O6=e=>typeof e=="number"&&Number.isFinite(e)?e:null,NT=e=>Array.isArray(e)?e:[],ose=e=>NT(e).flatMap(t=>{let r=wu(t);return r===null?[]:[r]}),iLe=e=>e.replace(/~1/g,"/").replace(/~0/g,"~"),aLe=e=>{if(!e.startsWith("#/"))return!1;let t=e.slice(2).split("/").map(iLe);for(let r=0;r{let r=y_.make(`diag_${hn(t)}`);return Vr(e.diagnostics)[r]={id:r,...t},r},cLe=e=>({sourceKind:_v(e.source),kind:e.kind,pointer:e.pointer,encoding:"json",...e.summary?{summary:e.summary}:{},value:e.value}),ise=e=>{let t=new Map,r=new Map,n=new Map,o=[],i=new Set,a=(c,p)=>{if(p==="#"||p.length===0)return c;let d=p.replace(/^#\//,"").split("/").map(m=>m.replace(/~1/g,"/").replace(/~0/g,"~")),f=c;for(let m of d){if(Array.isArray(f)){let y=Number(m);f=Number.isInteger(y)?f[y]:void 0;continue}f=mv(f)[m]}return f},s=(c,p,d)=>{let f=`${e.resourceId}:${p}`,m=t.get(f);if(m){let g=o.indexOf(m);if(g!==-1)for(let S of o.slice(g))i.add(S);return m}let y=mn.make(`shape_${hn({resourceId:e.resourceId,key:p})}`);t.set(f,y),o.push(y);try{let g=mv(c),S=wu(g.title)??void 0,b=In({description:wu(g.description)}),E=nse(g.deprecated)??void 0,I=S!==void 0||aLe(p),T=(xe,Rt={})=>{let Jt=CT(xe),Yt=i.has(y),vt=Yt||I?void 0:r.get(Jt);if(vt){let Fr=e.catalog.symbols[vt];return Fr?.kind==="shape"&&(Fr.title===void 0&&S&&(Vr(e.catalog.symbols)[vt]={...Fr,title:S}),Fr.docs===void 0&&b&&(Vr(e.catalog.symbols)[vt]={...Vr(e.catalog.symbols)[vt],docs:b}),Fr.deprecated===void 0&&E!==void 0&&(Vr(e.catalog.symbols)[vt]={...Vr(e.catalog.symbols)[vt],deprecated:E})),n.set(y,vt),t.set(f,vt),vt}return Vr(e.catalog.symbols)[y]={id:y,kind:"shape",resourceId:e.resourceId,...S?{title:S}:{},...b?{docs:b}:{},...E!==void 0?{deprecated:E}:{},node:xe,synthetic:!1,provenance:pn(e.documentId,p),...Rt.diagnosticIds&&Rt.diagnosticIds.length>0?{diagnosticIds:Rt.diagnosticIds}:{},...Rt.native&&Rt.native.length>0?{native:Rt.native}:{}},!Yt&&!I&&r.set(Jt,y),y};if(typeof c=="boolean")return T({type:"unknown",reason:c?"schema_true":"schema_false"});let k=wu(g.$ref);if(k!==null){let xe=k.startsWith("#")?a(d??c,k):void 0;if(xe===void 0){let Jt=sLe(e.catalog,{level:"warning",code:"unresolved_ref",message:`Unresolved JSON schema ref ${k}`,provenance:pn(e.documentId,p),relatedSymbolIds:[y]});return T({type:"unknown",reason:`unresolved_ref:${k}`},{diagnosticIds:[Jt]}),t.get(f)}let Rt=s(xe,k,d??c);return T({type:"ref",target:Rt})}let F=NT(g.enum);if(F.length===1)return T({type:"const",value:F[0]});if(F.length>1)return T({type:"enum",values:F});if("const"in g)return T({type:"const",value:g.const});let O=NT(g.anyOf);if(O.length>0)return T({type:"anyOf",items:O.map((xe,Rt)=>s(xe,`${p}/anyOf/${Rt}`,d??c))});let $=NT(g.allOf);if($.length>0)return T({type:"allOf",items:$.map((xe,Rt)=>s(xe,`${p}/allOf/${Rt}`,d??c))});let N=NT(g.oneOf);if(N.length>0)return T({type:"oneOf",items:N.map((xe,Rt)=>s(xe,`${p}/oneOf/${Rt}`,d??c))});if("if"in g||"then"in g||"else"in g)return T({type:"conditional",ifShapeId:s(g.if??{},`${p}/if`,d??c),thenShapeId:s(g.then??{},`${p}/then`,d??c),...g.else!==void 0?{elseShapeId:s(g.else,`${p}/else`,d??c)}:{}});if("not"in g)return T({type:"not",itemShapeId:s(g.not,`${p}/not`,d??c)});let U=g.type,ge=Array.isArray(U)?U.flatMap(xe=>{let Rt=wu(xe);return Rt===null?[]:[Rt]}):[],Te=nse(g.nullable)===!0||ge.includes("null"),ke=Array.isArray(U)?ge.find(xe=>xe!=="null")??null:wu(U),Je=xe=>(T({type:"nullable",itemShapeId:xe}),y),me={};for(let xe of["format","minLength","maxLength","pattern","minimum","maximum","exclusiveMinimum","exclusiveMaximum","multipleOf","default","examples"])g[xe]!==void 0&&(me[xe]=g[xe]);if(ke==="object"||"properties"in g||"additionalProperties"in g||"patternProperties"in g){let xe=Object.fromEntries(Object.entries(mv(g.properties)).map(([Fr,le])=>[Fr,{shapeId:s(le,`${p}/properties/${Fr}`,d??c),...In({description:wu(mv(le).description)})?{docs:In({description:wu(mv(le).description)})}:{}}])),Rt=Object.fromEntries(Object.entries(mv(g.patternProperties)).map(([Fr,le])=>[Fr,s(le,`${p}/patternProperties/${Fr}`,d??c)])),Jt=g.additionalProperties,Yt=typeof Jt=="boolean"?Jt:Jt!==void 0?s(Jt,`${p}/additionalProperties`,d??c):void 0,vt={type:"object",fields:xe,...ose(g.required).length>0?{required:ose(g.required)}:{},...Yt!==void 0?{additionalProperties:Yt}:{},...Object.keys(Rt).length>0?{patternProperties:Rt}:{}};if(Te){let Fr=s({...g,nullable:!1,type:"object"},`${p}:nonnull`,d??c);return Je(Fr)}return T(vt)}if(ke==="array"||"items"in g||"prefixItems"in g){if(Array.isArray(g.prefixItems)&&g.prefixItems.length>0){let Jt={type:"tuple",itemShapeIds:g.prefixItems.map((Yt,vt)=>s(Yt,`${p}/prefixItems/${vt}`,d??c)),...g.items!==void 0?{additionalItems:typeof g.items=="boolean"?g.items:s(g.items,`${p}/items`,d??c)}:{}};if(Te){let Yt=s({...g,nullable:!1,type:"array"},`${p}:nonnull`,d??c);return Je(Yt)}return T(Jt)}let xe=g.items??{},Rt={type:"array",itemShapeId:s(xe,`${p}/items`,d??c),...O6(g.minItems)!==null?{minItems:O6(g.minItems)}:{},...O6(g.maxItems)!==null?{maxItems:O6(g.maxItems)}:{}};if(Te){let Jt=s({...g,nullable:!1,type:"array"},`${p}:nonnull`,d??c);return Je(Jt)}return T(Rt)}if(ke==="string"||ke==="number"||ke==="integer"||ke==="boolean"||ke==="null"){let xe=ke==="null"?"null":ke==="integer"?"integer":ke==="number"?"number":ke==="boolean"?"boolean":wu(g.format)==="binary"?"bytes":"string",Rt={type:"scalar",scalar:xe,...wu(g.format)?{format:wu(g.format)}:{},...Object.keys(me).length>0?{constraints:me}:{}};if(Te&&xe!=="null"){let Jt=s({...g,nullable:!1,type:ke},`${p}:nonnull`,d??c);return Je(Jt)}return T(Rt)}return T({type:"unknown",reason:`unsupported_schema:${p}`},{native:[cLe({source:e.source,kind:"json_schema",pointer:p,value:c,summary:"Unsupported JSON schema preserved natively"})]})}finally{if(o.pop()!==y)throw new Error(`JSON schema importer stack mismatch for ${y}`)}};return{importSchema:(c,p,d)=>s(c,p,d??c),finalize:()=>{let c=p=>{if(typeof p!="string"&&!(!p||typeof p!="object")){if(Array.isArray(p)){for(let d=0;dDu.make(`scope_service_${hn({sourceId:e.id})}`),ase=(e,t)=>Ip.make(`doc_${hn({sourceId:e.id,key:t})}`),uLe=e=>wp.make(`res_${hn({sourceId:e.id})}`),pLe=e=>({sourceKind:_v(e.source),kind:e.kind,pointer:e.pointer,encoding:"json",...e.summary?{summary:e.summary}:{},value:e.value}),dLe=()=>({version:"ir.v1.fragment",documents:{},resources:{},scopes:{},symbols:{},capabilities:{},executables:{},responseSets:{},diagnostics:{}}),_Le=e=>({version:"ir.v1.fragment",...Object.keys(e.documents).length>0?{documents:e.documents}:{},...Object.keys(e.resources).length>0?{resources:e.resources}:{},...Object.keys(e.scopes).length>0?{scopes:e.scopes}:{},...Object.keys(e.symbols).length>0?{symbols:e.symbols}:{},...Object.keys(e.capabilities).length>0?{capabilities:e.capabilities}:{},...Object.keys(e.executables).length>0?{executables:e.executables}:{},...Object.keys(e.responseSets).length>0?{responseSets:e.responseSets}:{},...Object.keys(e.diagnostics).length>0?{diagnostics:e.diagnostics}:{}}),fLe=e=>{let t=lLe(e.source);return Vr(e.catalog.scopes)[t]={id:t,kind:"service",name:e.source.name,namespace:e.source.namespace??os(e.source.name),docs:In({summary:e.source.name}),...e.defaults?{defaults:e.defaults}:{},synthetic:!1,provenance:pn(e.documentId,"#/service")},t},b_=e=>{let t=dLe(),r=e.documents.length>0?e.documents:[{documentKind:"synthetic",documentKey:e.source.endpoint,fetchedAt:Date.now(),contentText:"{}"}],n=r[0],o=n.documentKey??e.source.endpoint??e.source.id,i=ase(e.source,`${n.documentKind}:${n.documentKey}`),a=uLe(e.source);for(let p of r){let d=ase(e.source,`${p.documentKind}:${p.documentKey}`);Vr(t.documents)[d]={id:d,kind:_v(e.source),title:e.source.name,fetchedAt:new Date(p.fetchedAt??Date.now()).toISOString(),rawRef:p.documentKey,entryUri:p.documentKey.startsWith("http")?p.documentKey:void 0,native:[pLe({source:e.source,kind:"source_document",pointer:`#/${p.documentKind}`,value:p.contentText,summary:p.documentKind})]}}Vr(t.resources)[a]={id:a,documentId:i,canonicalUri:o,baseUri:o,...e.resourceDialectUri?{dialectUri:e.resourceDialectUri}:{},anchors:{},dynamicAnchors:{},synthetic:!1,provenance:pn(i,"#")};let s=fLe({catalog:t,source:e.source,documentId:i,defaults:e.serviceScopeDefaults}),c=ise({catalog:t,source:e.source,resourceId:a,documentId:i});return e.registerOperations({catalog:t,documentId:i,serviceScopeId:s,importer:c}),c.finalize(),_Le(t)};import*as uB from"effect/ParseResult";import{Schema as pB}from"effect";import{Schema as w}from"effect";var sB=w.Literal("openapi","graphql-schema","google-discovery","mcp","custom"),mLe=w.Literal("service","document","resource","pathItem","operation","folder"),hLe=w.Literal("read","write","delete","action","subscribe"),yLe=w.Literal("path","query","header","cookie"),gLe=w.Literal("success","redirect","stream","download","upload","longRunning"),SLe=w.Literal("oauth2","http","apiKey","basic","bearer","custom"),vLe=w.Literal("1XX","2XX","3XX","4XX","5XX"),bLe=w.Literal("cursor","offset","token","unknown"),xLe=w.Literal("info","warning","error"),ELe=w.Literal("external_ref_bundled","relative_ref_rebased","schema_hoisted","selection_shape_synthesized","opaque_hook_imported","discriminator_lost","multi_response_union_synthesized","unsupported_link_preserved_native","unsupported_callback_preserved_native","unresolved_ref","merge_conflict_preserved_first","projection_call_shape_synthesized","projection_result_shape_synthesized","projection_collision_grouped_fields","synthetic_resource_context_created","selection_shape_missing"),TLe=w.Literal("json","yaml","graphql","text","unknown"),DLe=w.Literal("declared","hoisted","derived","merged","projected"),Np=w.Struct({summary:w.optional(w.String),description:w.optional(w.String),externalDocsUrl:w.optional(w.String)}),cse=w.Struct({relation:DLe,documentId:Ip,resourceId:w.optional(wp),pointer:w.optional(w.String),line:w.optional(w.Number),column:w.optional(w.Number)}),lse=w.Struct({sourceKind:sB,kind:w.String,pointer:w.optional(w.String),encoding:w.optional(TLe),summary:w.optional(w.String),value:w.optional(w.Unknown)}),Il=w.Struct({synthetic:w.Boolean,provenance:w.Array(cse),diagnosticIds:w.optional(w.Array(y_)),native:w.optional(w.Array(lse))}),ALe=w.Struct({sourceKind:sB,adapterKey:w.String,importerVersion:w.String,importedAt:w.String,sourceConfigHash:w.String}),use=w.Struct({id:Ip,kind:sB,title:w.optional(w.String),versionHint:w.optional(w.String),fetchedAt:w.String,rawRef:w.String,entryUri:w.optional(w.String),native:w.optional(w.Array(lse))}),pse=w.Struct({shapeId:mn,docs:w.optional(Np),deprecated:w.optional(w.Boolean),exampleIds:w.optional(w.Array(kp))}),ILe=w.Struct({propertyName:w.String,mapping:w.optional(w.Record({key:w.String,value:mn}))}),wLe=w.Struct({type:w.Literal("scalar"),scalar:w.Literal("string","number","integer","boolean","null","bytes"),format:w.optional(w.String),constraints:w.optional(w.Record({key:w.String,value:w.Unknown}))}),kLe=w.Struct({type:w.Literal("unknown"),reason:w.optional(w.String)}),CLe=w.Struct({type:w.Literal("const"),value:w.Unknown}),PLe=w.Struct({type:w.Literal("enum"),values:w.Array(w.Unknown)}),OLe=w.Struct({type:w.Literal("object"),fields:w.Record({key:w.String,value:pse}),required:w.optional(w.Array(w.String)),additionalProperties:w.optional(w.Union(w.Boolean,mn)),patternProperties:w.optional(w.Record({key:w.String,value:mn}))}),NLe=w.Struct({type:w.Literal("array"),itemShapeId:mn,minItems:w.optional(w.Number),maxItems:w.optional(w.Number)}),FLe=w.Struct({type:w.Literal("tuple"),itemShapeIds:w.Array(mn),additionalItems:w.optional(w.Union(w.Boolean,mn))}),RLe=w.Struct({type:w.Literal("map"),valueShapeId:mn}),LLe=w.Struct({type:w.Literal("allOf"),items:w.Array(mn)}),$Le=w.Struct({type:w.Literal("anyOf"),items:w.Array(mn)}),MLe=w.Struct({type:w.Literal("oneOf"),items:w.Array(mn),discriminator:w.optional(ILe)}),jLe=w.Struct({type:w.Literal("nullable"),itemShapeId:mn}),BLe=w.Struct({type:w.Literal("ref"),target:mn}),qLe=w.Struct({type:w.Literal("not"),itemShapeId:mn}),ULe=w.Struct({type:w.Literal("conditional"),ifShapeId:mn,thenShapeId:w.optional(mn),elseShapeId:w.optional(mn)}),zLe=w.Struct({type:w.Literal("graphqlInterface"),fields:w.Record({key:w.String,value:pse}),possibleTypeIds:w.Array(mn)}),JLe=w.Struct({type:w.Literal("graphqlUnion"),memberTypeIds:w.Array(mn)}),VLe=w.Union(kLe,wLe,CLe,PLe,OLe,NLe,FLe,RLe,LLe,$Le,MLe,jLe,BLe,qLe,ULe,zLe,JLe),sse=w.Struct({shapeId:mn,pointer:w.optional(w.String)}),dse=w.extend(w.Struct({id:wp,documentId:Ip,canonicalUri:w.String,baseUri:w.String,dialectUri:w.optional(w.String),rootShapeId:w.optional(mn),anchors:w.Record({key:w.String,value:sse}),dynamicAnchors:w.Record({key:w.String,value:sse})}),Il),KLe=w.Union(w.Struct({location:w.Literal("header","query","cookie"),name:w.String}),w.Struct({location:w.Literal("body"),path:w.String})),GLe=w.Struct({authorizationUrl:w.optional(w.String),tokenUrl:w.optional(w.String),refreshUrl:w.optional(w.String),scopes:w.optional(w.Record({key:w.String,value:w.String}))}),HLe=w.Struct({in:w.optional(w.Literal("header","query","cookie")),name:w.optional(w.String)}),ZLe=w.extend(w.Struct({id:hm,kind:w.Literal("securityScheme"),schemeType:SLe,docs:w.optional(Np),placement:w.optional(HLe),http:w.optional(w.Struct({scheme:w.String,bearerFormat:w.optional(w.String)})),apiKey:w.optional(w.Struct({in:w.Literal("header","query","cookie"),name:w.String})),oauth:w.optional(w.Struct({flows:w.optional(w.Record({key:w.String,value:GLe})),scopes:w.optional(w.Record({key:w.String,value:w.String}))})),custom:w.optional(w.Struct({placementHints:w.optional(w.Array(KLe))}))}),Il),WLe=w.Struct({contentType:w.optional(w.String),style:w.optional(w.String),explode:w.optional(w.Boolean),allowReserved:w.optional(w.Boolean),headers:w.optional(w.Array(mm))}),F6=w.Struct({mediaType:w.String,shapeId:w.optional(mn),exampleIds:w.optional(w.Array(kp)),encoding:w.optional(w.Record({key:w.String,value:WLe}))}),QLe=w.extend(w.Struct({id:mn,kind:w.Literal("shape"),resourceId:w.optional(wp),title:w.optional(w.String),docs:w.optional(Np),deprecated:w.optional(w.Boolean),node:VLe}),Il),XLe=w.extend(w.Struct({id:fm,kind:w.Literal("parameter"),name:w.String,location:yLe,required:w.optional(w.Boolean),docs:w.optional(Np),deprecated:w.optional(w.Boolean),exampleIds:w.optional(w.Array(kp)),schemaShapeId:w.optional(mn),content:w.optional(w.Array(F6)),style:w.optional(w.String),explode:w.optional(w.Boolean),allowReserved:w.optional(w.Boolean)}),Il),YLe=w.extend(w.Struct({id:mm,kind:w.Literal("header"),name:w.String,docs:w.optional(Np),deprecated:w.optional(w.Boolean),exampleIds:w.optional(w.Array(kp)),schemaShapeId:w.optional(mn),content:w.optional(w.Array(F6)),style:w.optional(w.String),explode:w.optional(w.Boolean)}),Il),e$e=w.extend(w.Struct({id:rg,kind:w.Literal("requestBody"),docs:w.optional(Np),required:w.optional(w.Boolean),contents:w.Array(F6)}),Il),t$e=w.extend(w.Struct({id:Nc,kind:w.Literal("response"),docs:w.optional(Np),headerIds:w.optional(w.Array(mm)),contents:w.optional(w.Array(F6))}),Il),r$e=w.extend(w.Struct({id:kp,kind:w.Literal("example"),name:w.optional(w.String),docs:w.optional(Np),exampleKind:w.Literal("value","call"),value:w.optional(w.Unknown),externalValue:w.optional(w.String),call:w.optional(w.Struct({args:w.Record({key:w.String,value:w.Unknown}),result:w.optional(w.Unknown)}))}),Il),_se=w.Union(QLe,XLe,e$e,t$e,YLe,r$e,ZLe),N6=w.suspend(()=>w.Union(w.Struct({kind:w.Literal("none")}),w.Struct({kind:w.Literal("scheme"),schemeId:hm,scopes:w.optional(w.Array(w.String))}),w.Struct({kind:w.Literal("allOf"),items:w.Array(N6)}),w.Struct({kind:w.Literal("anyOf"),items:w.Array(N6)}))),n$e=w.Struct({url:w.String,description:w.optional(w.String),variables:w.optional(w.Record({key:w.String,value:w.String}))}),o$e=w.Struct({servers:w.optional(w.Array(n$e)),auth:w.optional(N6),parameterIds:w.optional(w.Array(fm)),headerIds:w.optional(w.Array(mm)),variables:w.optional(w.Record({key:w.String,value:w.String}))}),fse=w.extend(w.Struct({id:Du,kind:mLe,parentId:w.optional(Du),name:w.optional(w.String),namespace:w.optional(w.String),docs:w.optional(Np),defaults:w.optional(o$e)}),Il),i$e=w.Struct({approval:w.Struct({mayRequire:w.Boolean,reasons:w.optional(w.Array(w.Literal("write","delete","sensitive","externalSideEffect")))}),elicitation:w.Struct({mayRequest:w.Boolean,shapeId:w.optional(mn)}),resume:w.Struct({supported:w.Boolean})}),mse=w.extend(w.Struct({id:Oc,serviceScopeId:Du,surface:w.Struct({toolPath:w.Array(w.String),title:w.optional(w.String),summary:w.optional(w.String),description:w.optional(w.String),aliases:w.optional(w.Array(w.String)),tags:w.optional(w.Array(w.String))}),semantics:w.Struct({effect:hLe,safe:w.optional(w.Boolean),idempotent:w.optional(w.Boolean),destructive:w.optional(w.Boolean)}),docs:w.optional(Np),auth:N6,interaction:i$e,executableIds:w.Array(Qs),preferredExecutableId:w.optional(Qs),exampleIds:w.optional(w.Array(kp))}),Il),a$e=w.Struct({protocol:w.optional(w.String),method:w.optional(w.NullOr(w.String)),pathTemplate:w.optional(w.NullOr(w.String)),operationId:w.optional(w.NullOr(w.String)),group:w.optional(w.NullOr(w.String)),leaf:w.optional(w.NullOr(w.String)),rawToolId:w.optional(w.NullOr(w.String)),title:w.optional(w.NullOr(w.String)),summary:w.optional(w.NullOr(w.String))}),s$e=w.Struct({responseSetId:_m,callShapeId:mn,resultDataShapeId:w.optional(mn),resultErrorShapeId:w.optional(mn),resultHeadersShapeId:w.optional(mn),resultStatusShapeId:w.optional(mn)}),hse=w.extend(w.Struct({id:Qs,capabilityId:Oc,scopeId:Du,adapterKey:w.String,bindingVersion:w.Number,binding:w.Unknown,projection:s$e,display:w.optional(a$e)}),Il),c$e=w.Struct({kind:bLe,tokenParamName:w.optional(w.String),nextFieldPath:w.optional(w.String)}),l$e=w.Union(w.Struct({kind:w.Literal("exact"),status:w.Number}),w.Struct({kind:w.Literal("range"),value:vLe}),w.Struct({kind:w.Literal("default")})),u$e=w.Struct({match:l$e,responseId:Nc,traits:w.optional(w.Array(gLe)),pagination:w.optional(c$e)}),yse=w.extend(w.Struct({id:_m,variants:w.Array(u$e)}),Il),gse=w.Struct({id:y_,level:xLe,code:ELe,message:w.String,relatedSymbolIds:w.optional(w.Array(Zae)),provenance:w.Array(cse)}),cB=w.Struct({version:w.Literal("ir.v1"),documents:w.Record({key:Ip,value:use}),resources:w.Record({key:wp,value:dse}),scopes:w.Record({key:Du,value:fse}),symbols:w.Record({key:w.String,value:_se}),capabilities:w.Record({key:Oc,value:mse}),executables:w.Record({key:Qs,value:hse}),responseSets:w.Record({key:_m,value:yse}),diagnostics:w.Record({key:y_,value:gse})}),Sse=w.Struct({version:w.Literal("ir.v1.fragment"),documents:w.optional(w.Record({key:Ip,value:use})),resources:w.optional(w.Record({key:wp,value:dse})),scopes:w.optional(w.Record({key:Du,value:fse})),symbols:w.optional(w.Record({key:w.String,value:_se})),capabilities:w.optional(w.Record({key:Oc,value:mse})),executables:w.optional(w.Record({key:Qs,value:hse})),responseSets:w.optional(w.Record({key:_m,value:yse})),diagnostics:w.optional(w.Record({key:y_,value:gse}))}),FT=w.Struct({version:w.Literal("ir.v1.snapshot"),import:ALe,catalog:cB});var p$e=pB.decodeUnknownSync(cB),d$e=pB.decodeUnknownSync(FT),U9t=pB.decodeUnknownSync(Sse),hv=e=>e===null||typeof e!="object"?JSON.stringify(e):Array.isArray(e)?`[${e.map(r=>hv(r)).join(",")}]`:`{${Object.entries(e).sort(([r],[n])=>r.localeCompare(n)).map(([r,n])=>`${JSON.stringify(r)}:${hv(n)}`).join(",")}}`,xse=e=>Dc(hv(e)).slice(0,16),og=e=>[...new Set(e)],_$e=e=>({version:e.version,documents:{...e.documents},resources:{...e.resources},scopes:{...e.scopes},symbols:{...e.symbols},capabilities:{...e.capabilities},executables:{...e.executables},responseSets:{...e.responseSets},diagnostics:{...e.diagnostics}}),R6=e=>e,dB=(e,t,r)=>e(`${t}_${xse(r)}`),f$e=()=>({version:"ir.v1",documents:{},resources:{},scopes:{},symbols:{},capabilities:{},executables:{},responseSets:{},diagnostics:{}}),Ese=(e,t)=>{switch(t.kind){case"none":return["none"];case"scheme":{let r=e.symbols[t.schemeId];return!r||r.kind!=="securityScheme"?["unknown"]:[r.schemeType,...(t.scopes??[]).map(n=>`scope:${n}`)]}case"allOf":case"anyOf":return og(t.items.flatMap(r=>Ese(e,r)))}};var m$e=(e,t)=>{let r=e.symbols[t];return r&&r.kind==="response"?r:void 0},h$e=e=>{let t=e.trim().toLowerCase();return t==="application/json"||t.endsWith("+json")||t==="text/json"},_B=(e,t)=>{let r=dB(y_.make,"diag",t.idSeed);return R6(e.diagnostics)[r]={id:r,level:t.level,code:t.code,message:t.message,...t.relatedSymbolIds?{relatedSymbolIds:t.relatedSymbolIds}:{},provenance:t.provenance},r},y$e=(e,t)=>{let r=dB(wp.make,"res",{kind:"projection",capabilityId:t.id});if(!e.resources[r]){let o=e.scopes[t.serviceScopeId]?.provenance[0]?.documentId??Ip.make(`doc_projection_${xse(t.id)}`);e.documents[o]||(R6(e.documents)[o]={id:o,kind:"custom",title:`Projection resource for ${t.id}`,fetchedAt:new Date(0).toISOString(),rawRef:`synthetic://projection/${t.id}`}),R6(e.resources)[r]={id:r,documentId:o,canonicalUri:`synthetic://projection/${t.id}`,baseUri:`synthetic://projection/${t.id}`,anchors:{},dynamicAnchors:{},synthetic:!0,provenance:t.provenance},_B(e,{idSeed:{code:"synthetic_resource_context_created",capabilityId:t.id},level:"info",code:"synthetic_resource_context_created",message:`Created synthetic projection resource for ${t.id}`,provenance:t.provenance})}return r},Sm=(e,t)=>{let r=y$e(e,t.capability),n=dB(mn.make,"shape",{capabilityId:t.capability.id,label:t.label,node:t.node});if(!e.symbols[n]){let o=t.diagnostic?[_B(e,{idSeed:{code:t.diagnostic.code,shapeId:n},level:t.diagnostic.level,code:t.diagnostic.code,message:t.diagnostic.message,...t.diagnostic.relatedSymbolIds?{relatedSymbolIds:t.diagnostic.relatedSymbolIds}:{},provenance:t.capability.provenance})]:void 0;R6(e.symbols)[n]={id:n,kind:"shape",resourceId:r,...t.title?{title:t.title}:{},...t.docs?{docs:t.docs}:{},node:t.node,synthetic:!0,provenance:t.capability.provenance,...o?{diagnosticIds:o}:{}}}return n},g$e=(e,t,r,n)=>{let o=og((r??[]).map(i=>i.shapeId).filter(i=>i!==void 0));if(o.length!==0)return o.length===1?o[0]:Sm(e,{capability:t,label:n,title:`${t.surface.title??t.id} content union`,node:{type:"anyOf",items:o},diagnostic:{level:"warning",code:"projection_result_shape_synthesized",message:`Synthesized content union for ${t.id}`,relatedSymbolIds:o}})},S$e=(e,t)=>{let r=t.preferredExecutableId;if(r){let o=e.executables[r];if(o)return o}let n=t.executableIds.map(o=>e.executables[o]).filter(o=>o!==void 0);if(n.length===0)throw new Error(`Capability ${t.id} has no executables`);return n[0]},v$e=e=>{switch(e.kind){case"exact":return e.status===200?100:e.status>=200&&e.status<300?80:10;case"range":return e.value==="2XX"?60:5;case"default":return 40}},vse=e=>(e.contents??[]).flatMap(t=>t.shapeId?[{mediaType:t.mediaType,shapeId:t.shapeId}]:[]),Tse=(e,t)=>[...t.variants].map(r=>{let n=m$e(e,r.responseId);return n?{variant:r,response:n,score:v$e(r.match)}:null}).filter(r=>r!==null),Dse=e=>{switch(e.kind){case"exact":return e.status>=200&&e.status<300;case"range":return e.value==="2XX";case"default":return!1}},Ase=(e,t,r,n,o)=>{let i=o.flatMap(({response:s})=>vse(s).filter(c=>h$e(c.mediaType)));if(i.length>0)return g$e(e,t,i.map(s=>({mediaType:s.mediaType,shapeId:s.shapeId})),`${r}:json`);let a=og(o.flatMap(({response:s})=>vse(s).map(c=>c.shapeId)));if(a.length!==0)return a.length===1?a[0]:Sm(e,{capability:t,label:`${r}:union`,title:n,node:{type:"anyOf",items:a},diagnostic:{level:"warning",code:"multi_response_union_synthesized",message:`Synthesized response union for ${t.id}`,relatedSymbolIds:a}})},b$e=(e,t,r)=>Ase(e,t,`responseSet:${r.id}`,`${t.surface.title??t.id} result`,Tse(e,r).filter(({variant:n})=>Dse(n.match))),x$e=(e,t,r)=>Ase(e,t,`responseSet:${r.id}:error`,`${t.surface.title??t.id} error`,Tse(e,r).filter(({variant:n})=>!Dse(n.match))),Ise=(e,t,r)=>Sm(e,{capability:t,label:r.label,title:r.title,node:{type:"scalar",scalar:r.scalar}}),E$e=(e,t,r)=>Sm(e,{capability:t,label:r,title:"null",node:{type:"const",value:null}}),bse=(e,t,r)=>Sm(e,{capability:t,label:r.label,title:r.title,node:{type:"unknown",reason:r.reason}}),lB=(e,t,r)=>{let n=E$e(e,t,`${r.label}:null`);return r.baseShapeId===n?n:Sm(e,{capability:t,label:`${r.label}:nullable`,title:r.title,node:{type:"anyOf",items:og([r.baseShapeId,n])}})},T$e=(e,t,r)=>{let n=Ise(e,t,{label:`${r}:value`,title:"Header value",scalar:"string"});return Sm(e,{capability:t,label:r,title:"Response headers",node:{type:"object",fields:{},additionalProperties:n}})},D$e=(e,t,r,n)=>{let o=bse(e,t,{label:`executionResult:${t.id}:data:unknown`,title:"Response data",reason:`Execution result data for ${t.id} is not statically known`}),i=bse(e,t,{label:`executionResult:${t.id}:error:unknown`,title:"Response error",reason:`Execution result error for ${t.id} is not statically known`}),a=T$e(e,t,`executionResult:${t.id}:headers`),s=Ise(e,t,{label:`executionResult:${t.id}:status`,title:"Response status",scalar:"integer"}),c,p,d=a,f=s;c=r.projection.resultDataShapeId??b$e(e,t,n),p=r.projection.resultErrorShapeId??x$e(e,t,n),d=r.projection.resultHeadersShapeId??a,f=r.projection.resultStatusShapeId??s;let m=lB(e,t,{label:`executionResult:${t.id}:data`,title:"Result data",baseShapeId:c??o}),y=lB(e,t,{label:`executionResult:${t.id}:error`,title:"Result error",baseShapeId:p??i}),g=lB(e,t,{label:`executionResult:${t.id}:status`,title:"Result status",baseShapeId:f});return Sm(e,{capability:t,label:`executionResult:${t.id}`,title:`${t.surface.title??t.id} result`,node:{type:"object",fields:{data:{shapeId:m,docs:{description:"Successful result payload when available."}},error:{shapeId:y,docs:{description:"Error payload when the remote execution completed but failed."}},headers:{shapeId:d,docs:{description:"Response headers when available."}},status:{shapeId:g,docs:{description:"Transport status code when available."}}},required:["data","error","headers","status"],additionalProperties:!1},diagnostic:{level:"info",code:"projection_result_shape_synthesized",message:`Synthesized execution result envelope for ${t.id}`,relatedSymbolIds:og([m,y,d,g])}})},A$e=(e,t)=>{let r=S$e(e,t),n=e.responseSets[r.projection.responseSetId];if(!n)throw new Error(`Missing response set ${r.projection.responseSetId} for ${t.id}`);let o=r.projection.callShapeId,i=D$e(e,t,r,n),s=og([...t.diagnosticIds??[],...r.diagnosticIds??[],...n.diagnosticIds??[],...o?e.symbols[o]?.diagnosticIds??[]:[],...i?e.symbols[i]?.diagnosticIds??[]:[]]).map(c=>e.diagnostics[c]).filter(c=>c!==void 0);return{toolPath:[...t.surface.toolPath],capabilityId:t.id,...t.surface.title?{title:t.surface.title}:{},...t.surface.summary?{summary:t.surface.summary}:{},effect:t.semantics.effect,interaction:{mayRequireApproval:t.interaction.approval.mayRequire,mayElicit:t.interaction.elicitation.mayRequest},callShapeId:o,...i?{resultShapeId:i}:{},responseSetId:r.projection.responseSetId,diagnosticCounts:{warning:s.filter(c=>c.level==="warning").length,error:s.filter(c=>c.level==="error").length}}},I$e=(e,t,r)=>({capabilityId:t.id,toolPath:[...t.surface.toolPath],...t.surface.summary?{summary:t.surface.summary}:{},executableIds:[...t.executableIds],auth:t.auth,interaction:t.interaction,callShapeId:r.callShapeId,...r.resultShapeId?{resultShapeId:r.resultShapeId}:{},responseSetId:r.responseSetId,...t.diagnosticIds?{diagnosticIds:[...t.diagnosticIds]}:{}}),w$e=(e,t)=>({capabilityId:t.id,toolPath:[...t.surface.toolPath],...t.surface.title?{title:t.surface.title}:{},...t.surface.summary?{summary:t.surface.summary}:{},...t.surface.tags?{tags:[...t.surface.tags]}:{},protocolHints:og(t.executableIds.map(r=>e.executables[r]?.display?.protocol??e.executables[r]?.adapterKey).filter(r=>r!==void 0)),authHints:Ese(e,t.auth),effect:t.semantics.effect});var wse=e=>{try{return p$e(e)}catch(t){throw new Error(uB.TreeFormatter.formatErrorSync(t))}};var L6=e=>{try{let t=d$e(e);return fB(t.catalog),t}catch(t){throw t instanceof Error?t:new Error(uB.TreeFormatter.formatErrorSync(t))}};var k$e=e=>{let t=fB(wse(e.catalog));return{version:"ir.v1.snapshot",import:e.import,catalog:t}},yv=e=>k$e({import:e.import,catalog:C$e(e.fragments)}),C$e=e=>{let t=f$e(),r=new Map,n=(o,i)=>{if(!i)return;let a=t[o];for(let[s,c]of Object.entries(i)){let p=a[s];if(!p){a[s]=c,r.set(`${String(o)}:${s}`,hv(c));continue}let d=r.get(`${String(o)}:${s}`)??hv(p),f=hv(c);d!==f&&o!=="diagnostics"&&_B(t,{idSeed:{collectionName:o,id:s,existingHash:d,nextHash:f},level:"error",code:"merge_conflict_preserved_first",message:`Conflicting ${String(o)} entry for ${s}; preserved first value`,provenance:"provenance"in p?p.provenance:[]})}};for(let o of e)n("documents",o.documents),n("resources",o.resources),n("scopes",o.scopes),n("symbols",o.symbols),n("capabilities",o.capabilities),n("executables",o.executables),n("responseSets",o.responseSets),n("diagnostics",o.diagnostics);return fB(wse(t))},P$e=e=>{let t=[],r=n=>{for(let o of n.provenance)e.documents[o.documentId]||t.push({code:"missing_provenance_document",entityId:n.entityId,message:`Entity ${n.entityId} references missing provenance document ${o.documentId}`})};for(let n of Object.values(e.symbols))n.provenance.length===0&&t.push({code:"missing_symbol_provenance",entityId:n.id,message:`Symbol ${n.id} is missing provenance`}),n.kind==="shape"&&(!n.resourceId&&!n.synthetic&&t.push({code:"missing_resource_context",entityId:n.id,message:`Shape ${n.id} must belong to a resource or be synthetic`}),n.node.type==="ref"&&!e.symbols[n.node.target]&&t.push({code:"missing_reference_target",entityId:n.id,message:`Shape ${n.id} references missing shape ${n.node.target}`}),n.node.type==="unknown"&&n.node.reason?.includes("unresolved")&&((n.diagnosticIds??[]).map(i=>e.diagnostics[i]).some(i=>i?.code==="unresolved_ref")||t.push({code:"missing_unresolved_ref_diagnostic",entityId:n.id,message:`Shape ${n.id} is unresolved but has no unresolved_ref diagnostic`})),n.synthetic&&n.resourceId&&!e.resources[n.resourceId]&&t.push({code:"missing_resource_context",entityId:n.id,message:`Synthetic shape ${n.id} references missing resource ${n.resourceId}`})),r({entityId:n.id,provenance:n.provenance});for(let n of[...Object.values(e.resources),...Object.values(e.scopes),...Object.values(e.capabilities),...Object.values(e.executables),...Object.values(e.responseSets)])"provenance"in n&&n.provenance.length===0&&t.push({code:"missing_entity_provenance",entityId:"id"in n?n.id:void 0,message:`Entity ${"id"in n?n.id:"unknown"} is missing provenance`}),"id"in n&&r({entityId:n.id,provenance:n.provenance});for(let n of Object.values(e.resources))e.documents[n.documentId]||t.push({code:"missing_document",entityId:n.id,message:`Resource ${n.id} references missing document ${n.documentId}`});for(let n of Object.values(e.capabilities)){e.scopes[n.serviceScopeId]||t.push({code:"missing_service_scope",entityId:n.id,message:`Capability ${n.id} references missing scope ${n.serviceScopeId}`}),n.preferredExecutableId&&!n.executableIds.includes(n.preferredExecutableId)&&t.push({code:"invalid_preferred_executable",entityId:n.id,message:`Capability ${n.id} preferred executable is not in executableIds`});for(let o of n.executableIds)e.executables[o]||t.push({code:"missing_executable",entityId:n.id,message:`Capability ${n.id} references missing executable ${o}`})}for(let n of Object.values(e.executables)){e.capabilities[n.capabilityId]||t.push({code:"missing_executable",entityId:n.id,message:`Executable ${n.id} references missing capability ${n.capabilityId}`}),e.scopes[n.scopeId]||t.push({code:"missing_scope",entityId:n.id,message:`Executable ${n.id} references missing scope ${n.scopeId}`}),e.responseSets[n.projection.responseSetId]||t.push({code:"missing_response_set",entityId:n.id,message:`Executable ${n.id} references missing response set ${n.projection.responseSetId}`});let o=[{kind:"call",shapeId:n.projection.callShapeId},{kind:"result data",shapeId:n.projection.resultDataShapeId},{kind:"result error",shapeId:n.projection.resultErrorShapeId},{kind:"result headers",shapeId:n.projection.resultHeadersShapeId},{kind:"result status",shapeId:n.projection.resultStatusShapeId}];for(let i of o)!i.shapeId||e.symbols[i.shapeId]?.kind==="shape"||t.push({code:"missing_projection_shape",entityId:n.id,message:`Executable ${n.id} references missing ${i.kind} shape ${i.shapeId}`})}return t},fB=e=>{let t=P$e(e);if(t.length===0)return e;let r=t.slice(0,5).map(n=>`${n.code}: ${n.message}`).join(` +`);throw new Error([`Invalid IR catalog (${t.length} invariant violation${t.length===1?"":"s"}).`,r,...t.length>5?[`...and ${String(t.length-5)} more`]:[]].join(` +`))},RT=e=>{let t=_$e(e.catalog),r={},n={},o={},i=Object.values(t.capabilities).sort((a,s)=>a.id.localeCompare(s.id));for(let a of i){let s=A$e(t,a);r[a.id]=s,n[a.id]=w$e(t,a),o[a.id]=I$e(t,a,s)}return{catalog:t,toolDescriptors:r,searchDocs:n,capabilityViews:o}};var LT=e=>Dc(e),Fp=e=>e,$T=e=>yv({import:e.importMetadata,fragments:[e.fragment]});import*as Pse from"effect/Schema";var kse=e=>{let t=new Map(e.map(i=>[i.key,i])),r=i=>{let a=t.get(i);if(!a)throw new Error(`Unsupported source adapter: ${i}`);return a},n=i=>r(i.kind);return{adapters:e,getSourceAdapter:r,getSourceAdapterForSource:n,findSourceAdapterByProviderKey:i=>e.find(a=>a.providerKey===i)??null,sourceBindingStateFromSource:i=>n(i).bindingStateFromSource(i),sourceAdapterCatalogKind:i=>r(i).catalogKind,sourceAdapterRequiresInteractiveConnect:i=>r(i).connectStrategy==="interactive",sourceAdapterUsesCredentialManagedAuth:i=>r(i).credentialStrategy==="credential_managed",isInternalSourceAdapter:i=>r(i).catalogKind==="internal"}};var O$e=e=>e.connectPayloadSchema!==null,N$e=e=>e.executorAddInputSchema!==null,F$e=e=>e.localConfigBindingSchema!==null,R$e=e=>e,Cse=(e,t)=>e.length===0?(()=>{throw new Error(`Cannot create ${t} without any schemas`)})():e.length===1?e[0]:Pse.Union(...R$e(e)),Ose=e=>{let t=e.filter(O$e),r=e.filter(N$e),n=e.filter(F$e),o=kse(e);return{connectableSourceAdapters:t,connectPayloadSchema:Cse(t.map(i=>i.connectPayloadSchema),"connect payload schema"),executorAddableSourceAdapters:r,executorAddInputSchema:Cse(r.map(i=>i.executorAddInputSchema),"executor add input schema"),localConfigurableSourceAdapters:n,...o}};import*as Bt from"effect/Schema";import*as we from"effect/Schema";var ku=we.Struct({providerId:we.String,handle:we.String}),W9t=we.Literal("runtime","import"),Q9t=we.Literal("imported","internal"),L$e=we.String,$$e=we.Literal("draft","probing","auth_required","connected","error"),Fc=we.Literal("auto","streamable-http","sse","stdio"),vm=we.Literal("none","reuse_runtime","separate"),Qr=we.Record({key:we.String,value:we.String}),x_=we.Array(we.String),mB=we.suspend(()=>we.Union(we.String,we.Number,we.Boolean,we.Null,we.Array(mB),we.Record({key:we.String,value:mB}))).annotations({identifier:"JsonValue"}),Fse=we.Record({key:we.String,value:mB}).annotations({identifier:"JsonObject"}),Nse=we.Union(we.Struct({kind:we.Literal("none")}),we.Struct({kind:we.Literal("bearer"),headerName:we.String,prefix:we.String,token:ku}),we.Struct({kind:we.Literal("oauth2"),headerName:we.String,prefix:we.String,accessToken:ku,refreshToken:we.NullOr(ku)}),we.Struct({kind:we.Literal("oauth2_authorized_user"),headerName:we.String,prefix:we.String,tokenEndpoint:we.String,clientId:we.String,clientAuthentication:we.Literal("none","client_secret_post"),clientSecret:we.NullOr(ku),refreshToken:ku,grantSet:we.NullOr(we.Array(we.String))}),we.Struct({kind:we.Literal("provider_grant_ref"),grantId:we.String,providerKey:we.String,requiredScopes:we.Array(we.String),headerName:we.String,prefix:we.String}),we.Struct({kind:we.Literal("mcp_oauth"),redirectUri:we.String,accessToken:ku,refreshToken:we.NullOr(ku),tokenType:we.String,expiresIn:we.NullOr(we.Number),scope:we.NullOr(we.String),resourceMetadataUrl:we.NullOr(we.String),authorizationServerUrl:we.NullOr(we.String),resourceMetadataJson:we.NullOr(we.String),authorizationServerMetadataJson:we.NullOr(we.String),clientInformationJson:we.NullOr(we.String)})),$6=we.Number,X9t=we.Struct({version:$6,payload:Fse}),Y9t=we.Struct({id:we.String,scopeId:we.String,name:we.String,kind:L$e,endpoint:we.String,status:$$e,enabled:we.Boolean,namespace:we.NullOr(we.String),bindingVersion:$6,binding:Fse,importAuthPolicy:vm,importAuth:Nse,auth:Nse,sourceHash:we.NullOr(we.String),lastError:we.NullOr(we.String),createdAt:we.Number,updatedAt:we.Number}),e5t=we.Struct({id:we.String,bindingConfigJson:we.NullOr(we.String)}),M6=we.Literal("app_callback","loopback"),Rse=we.String,hB=we.Struct({clientId:we.Trim.pipe(we.nonEmptyString()),clientSecret:we.optional(we.NullOr(we.Trim.pipe(we.nonEmptyString()))),redirectMode:we.optional(M6)});var yB=Bt.Literal("mcp","openapi","google_discovery","graphql","unknown"),j6=Bt.Literal("low","medium","high"),gB=Bt.Literal("none","bearer","oauth2","apiKey","basic","unknown"),SB=Bt.Literal("header","query","cookie"),Lse=Bt.Union(Bt.Struct({kind:Bt.Literal("none")}),Bt.Struct({kind:Bt.Literal("bearer"),headerName:Bt.optional(Bt.NullOr(Bt.String)),prefix:Bt.optional(Bt.NullOr(Bt.String)),token:Bt.String}),Bt.Struct({kind:Bt.Literal("basic"),username:Bt.String,password:Bt.String}),Bt.Struct({kind:Bt.Literal("headers"),headers:Qr})),vB=Bt.Struct({suggestedKind:gB,confidence:j6,supported:Bt.Boolean,reason:Bt.String,headerName:Bt.NullOr(Bt.String),prefix:Bt.NullOr(Bt.String),parameterName:Bt.NullOr(Bt.String),parameterLocation:Bt.NullOr(SB),oauthAuthorizationUrl:Bt.NullOr(Bt.String),oauthTokenUrl:Bt.NullOr(Bt.String),oauthScopes:Bt.Array(Bt.String)}),$se=Bt.Struct({detectedKind:yB,confidence:j6,endpoint:Bt.String,specUrl:Bt.NullOr(Bt.String),name:Bt.NullOr(Bt.String),namespace:Bt.NullOr(Bt.String),transport:Bt.NullOr(Fc),authInference:vB,toolCount:Bt.NullOr(Bt.Number),warnings:Bt.Array(Bt.String)});import*as Mse from"effect/Data";var bB=class extends Mse.TaggedError("SourceCoreEffectError"){},Co=(e,t)=>new bB({module:e,message:t});import*as jse from"effect/Data";import*as Cu from"effect/Effect";import*as qt from"effect/Schema";var M$e=qt.Trim.pipe(qt.nonEmptyString()),Ho=qt.optional(qt.NullOr(qt.String)),j$e=qt.Struct({kind:qt.Literal("bearer"),headerName:Ho,prefix:Ho,token:Ho,tokenRef:qt.optional(qt.NullOr(ku))}),B$e=qt.Struct({kind:qt.Literal("oauth2"),headerName:Ho,prefix:Ho,accessToken:Ho,accessTokenRef:qt.optional(qt.NullOr(ku)),refreshToken:Ho,refreshTokenRef:qt.optional(qt.NullOr(ku))}),T_=qt.Union(qt.Struct({kind:qt.Literal("none")}),j$e,B$e),bm=qt.Struct({importAuthPolicy:qt.optional(vm),importAuth:qt.optional(T_)}),Bse=qt.optional(qt.NullOr(hB)),B6=qt.Struct({endpoint:M$e,name:Ho,namespace:Ho}),xB=qt.Struct({transport:qt.optional(qt.NullOr(Fc)),queryParams:qt.optional(qt.NullOr(Qr)),headers:qt.optional(qt.NullOr(Qr)),command:qt.optional(qt.NullOr(qt.String)),args:qt.optional(qt.NullOr(x_)),env:qt.optional(qt.NullOr(Qr)),cwd:qt.optional(qt.NullOr(qt.String))});var E_=class extends jse.TaggedError("SourceCredentialRequiredError"){constructor(t,r){super({slot:t,message:r})}},D_=e=>e instanceof E_,Rp={transport:null,queryParams:null,headers:null,command:null,args:null,env:null,cwd:null,specUrl:null,defaultHeaders:null},qse=(e,t)=>qt.Struct({adapterKey:qt.Literal(e),version:$6,payload:t}),Lp=e=>qt.encodeSync(qt.parseJson(qse(e.adapterKey,e.payloadSchema)))({adapterKey:e.adapterKey,version:e.version,payload:e.payload}),$p=e=>e.value===null?Cu.fail(Co("core/shared",`Missing ${e.label} binding config for ${e.sourceId}`)):Cu.try({try:()=>qt.decodeUnknownSync(qt.parseJson(qse(e.adapterKey,e.payloadSchema)))(e.value),catch:t=>{let r=t instanceof Error?t.message:String(t);return new Error(`Invalid ${e.label} binding config for ${e.sourceId}: ${r}`)}}).pipe(Cu.flatMap(t=>t.version===e.version?Cu.succeed({version:t.version,payload:t.payload}):Cu.fail(Co("core/shared",`Unsupported ${e.label} binding config version ${t.version} for ${e.sourceId}; expected ${e.version}`)))),Mp=e=>e.version!==e.expectedVersion?Cu.fail(Co("core/shared",`Unsupported ${e.label} binding version ${e.version} for ${e.sourceId}; expected ${e.expectedVersion}`)):Cu.try({try:()=>{if(e.allowedKeys&&e.value!==null&&typeof e.value=="object"&&!Array.isArray(e.value)){let t=Object.keys(e.value).filter(r=>!e.allowedKeys.includes(r));if(t.length>0)throw new Error(`Unsupported fields: ${t.join(", ")}`)}return qt.decodeUnknownSync(e.schema)(e.value)},catch:t=>{let r=t instanceof Error?t.message:String(t);return new Error(`Invalid ${e.label} binding payload for ${e.sourceId}: ${r}`)}}),xm=e=>{if(e.version!==e.expectedVersion)throw new Error(`Unsupported ${e.label} executable binding version ${e.version} for ${e.executableId}; expected ${e.expectedVersion}`);try{return qt.decodeUnknownSync(e.schema)(e.value)}catch(t){let r=t instanceof Error?t.message:String(t);throw new Error(`Invalid ${e.label} executable binding for ${e.executableId}: ${r}`)}};import*as Sv from"effect/Effect";import*as Use from"effect/Data";var EB=class extends Use.TaggedError("McpOAuthEffectError"){},TB=(e,t)=>new EB({module:e,message:t});var zse=e=>e instanceof Error?e:new Error(String(e)),gv=e=>e!=null&&typeof e=="object"&&!Array.isArray(e)?e:null,Jse=e=>({redirect_uris:[e],grant_types:["authorization_code","refresh_token"],response_types:["code"],token_endpoint_auth_method:"none",client_name:"Executor Local"}),MT=e=>Sv.gen(function*(){let t={},r={get redirectUrl(){return e.redirectUrl},get clientMetadata(){return Jse(e.redirectUrl)},state:()=>e.state,clientInformation:()=>t.clientInformation,saveClientInformation:o=>{t.clientInformation=o},tokens:()=>{},saveTokens:()=>{},redirectToAuthorization:o=>{t.authorizationUrl=o},saveCodeVerifier:o=>{t.codeVerifier=o},codeVerifier:()=>{if(!t.codeVerifier)throw new Error("OAuth code verifier was not captured");return t.codeVerifier},saveDiscoveryState:o=>{t.discoveryState=o},discoveryState:()=>t.discoveryState};return(yield*Sv.tryPromise({try:()=>Al(r,{serverUrl:e.endpoint}),catch:zse}))!=="REDIRECT"||!t.authorizationUrl||!t.codeVerifier?yield*TB("index","OAuth flow did not produce an authorization redirect"):{authorizationUrl:t.authorizationUrl.toString(),codeVerifier:t.codeVerifier,resourceMetadataUrl:t.discoveryState?.resourceMetadataUrl??null,authorizationServerUrl:t.discoveryState?.authorizationServerUrl??null,resourceMetadata:gv(t.discoveryState?.resourceMetadata),authorizationServerMetadata:gv(t.discoveryState?.authorizationServerMetadata),clientInformation:gv(t.clientInformation)}}),DB=e=>Sv.gen(function*(){let t={discoveryState:{authorizationServerUrl:e.session.authorizationServerUrl??new URL("/",e.session.endpoint).toString(),resourceMetadataUrl:e.session.resourceMetadataUrl??void 0,resourceMetadata:e.session.resourceMetadata,authorizationServerMetadata:e.session.authorizationServerMetadata},clientInformation:e.session.clientInformation},r={get redirectUrl(){return e.session.redirectUrl},get clientMetadata(){return Jse(e.session.redirectUrl)},clientInformation:()=>t.clientInformation,saveClientInformation:o=>{t.clientInformation=o},tokens:()=>{},saveTokens:o=>{t.tokens=o},redirectToAuthorization:()=>{throw new Error("Unexpected redirect while completing MCP OAuth")},saveCodeVerifier:()=>{},codeVerifier:()=>e.session.codeVerifier,saveDiscoveryState:o=>{t.discoveryState=o},discoveryState:()=>t.discoveryState};return(yield*Sv.tryPromise({try:()=>Al(r,{serverUrl:e.session.endpoint,authorizationCode:e.code}),catch:zse}))!=="AUTHORIZED"||!t.tokens?yield*TB("index","OAuth redirect did not complete MCP OAuth setup"):{tokens:t.tokens,resourceMetadataUrl:t.discoveryState?.resourceMetadataUrl??null,authorizationServerUrl:t.discoveryState?.authorizationServerUrl??null,resourceMetadata:gv(t.discoveryState?.resourceMetadata),authorizationServerMetadata:gv(t.discoveryState?.authorizationServerMetadata),clientInformation:gv(t.clientInformation)}});import*as J6 from"effect/Either";import*as w_ from"effect/Effect";import*as rce from"effect/Data";import*as kB from"effect/Either";import*as Pr from"effect/Effect";import*as nce from"effect/Cause";import*as oce from"effect/Exit";import*as ice from"effect/PartitionedSemaphore";import*as Vse from"effect/Either";import*as Kse from"effect/Option";import*as Gse from"effect/ParseResult";import*as So from"effect/Schema";var Hse=So.Record({key:So.String,value:So.Unknown}),q$e=So.decodeUnknownOption(Hse),Zse=e=>{let t=q$e(e);return Kse.isSome(t)?t.value:{}},U$e=So.Struct({mode:So.optional(So.Union(So.Literal("form"),So.Literal("url"))),message:So.optional(So.String),requestedSchema:So.optional(Hse),url:So.optional(So.String),elicitationId:So.optional(So.String),id:So.optional(So.String)}),z$e=So.decodeUnknownEither(U$e),Wse=e=>{let t=z$e(e);if(Vse.isLeft(t))throw new Error(`Invalid MCP elicitation request params: ${Gse.TreeFormatter.formatErrorSync(t.left)}`);let r=t.right,n=r.message??"";return r.mode==="url"?{mode:"url",message:n,url:r.url??"",elicitationId:r.elicitationId??r.id??""}:{mode:"form",message:n,requestedSchema:r.requestedSchema??{}}},Qse=e=>e.action==="accept"?{action:"accept",...e.content?{content:e.content}:{}}:{action:e.action},Xse=e=>typeof e.setRequestHandler=="function",AB=e=>e.elicitation.mode==="url"&&e.elicitation.elicitationId.length>0?e.elicitation.elicitationId:[e.invocation?.runId,e.invocation?.callId,e.path,"mcp",typeof e.sequence=="number"?String(e.sequence):void 0].filter(r=>typeof r=="string"&&r.length>0).join(":"),IB=e=>e instanceof tT&&Array.isArray(e.elicitations)&&e.elicitations.length>0;import*as Yse from"effect/Option";import*as ir from"effect/Schema";var J$e=e=>{let t=e.trim().toLowerCase().replace(/[^a-z0-9]+/g,"_").replace(/^_+|_+$/g,"");return t.length>0?t:"tool"},V$e=(e,t)=>{let r=J$e(e),n=(t.get(r)??0)+1;return t.set(r,n),n===1?r:`${r}_${n}`},A_=e=>e!==null&&typeof e=="object"&&!Array.isArray(e)?e:{},q6=e=>{let t=A_(e);return Object.keys(t).length>0?t:null},jp=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),I_=e=>typeof e=="string"&&e.trim().length>0?e.trim():null,Em=e=>typeof e=="boolean"?e:null,ece=e=>Array.isArray(e)?e:null,K$e=ir.Struct({title:ir.optional(ir.NullOr(ir.String)),readOnlyHint:ir.optional(ir.Boolean),destructiveHint:ir.optional(ir.Boolean),idempotentHint:ir.optional(ir.Boolean),openWorldHint:ir.optional(ir.Boolean)}),G$e=ir.Struct({taskSupport:ir.optional(ir.Literal("forbidden","optional","required"))}),H$e=ir.Struct({name:ir.String,title:ir.optional(ir.NullOr(ir.String)),description:ir.optional(ir.NullOr(ir.String)),inputSchema:ir.optional(ir.Unknown),parameters:ir.optional(ir.Unknown),outputSchema:ir.optional(ir.Unknown),annotations:ir.optional(K$e),execution:ir.optional(G$e),icons:ir.optional(ir.Unknown),_meta:ir.optional(ir.Unknown)}),Z$e=ir.Struct({tools:ir.Array(H$e),nextCursor:ir.optional(ir.NullOr(ir.String)),_meta:ir.optional(ir.Unknown)}),W$e=ir.decodeUnknownOption(Z$e),Q$e=e=>{let t=W$e(e);return Yse.isNone(t)?[]:t.value.tools},X$e=e=>{let t=q6(e);if(t===null)return null;let r={title:I_(t.title),readOnlyHint:Em(t.readOnlyHint),destructiveHint:Em(t.destructiveHint),idempotentHint:Em(t.idempotentHint),openWorldHint:Em(t.openWorldHint)};return Object.values(r).some(n=>n!==null)?r:null},Y$e=e=>{let t=q6(e);if(t===null)return null;let r=t.taskSupport;return r!=="forbidden"&&r!=="optional"&&r!=="required"?null:{taskSupport:r}},eMe=e=>{let t=q6(e),r=t?I_(t.name):null,n=t?I_(t.version):null;return r===null||n===null?null:{name:r,version:n,title:I_(t?.title),description:I_(t?.description),websiteUrl:I_(t?.websiteUrl),icons:ece(t?.icons)}},tMe=e=>{let t=q6(e);if(t===null)return null;let r=A_(t.prompts),n=A_(t.resources),o=A_(t.tools),i=A_(t.tasks),a=A_(i.requests),s=A_(a.tools);return{experimental:jp(t,"experimental")?A_(t.experimental):null,logging:jp(t,"logging"),completions:jp(t,"completions"),prompts:jp(t,"prompts")?{listChanged:Em(r.listChanged)??!1}:null,resources:jp(t,"resources")?{subscribe:Em(n.subscribe)??!1,listChanged:Em(n.listChanged)??!1}:null,tools:jp(t,"tools")?{listChanged:Em(o.listChanged)??!1}:null,tasks:jp(t,"tasks")?{list:jp(i,"list"),cancel:jp(i,"cancel"),toolCall:jp(s,"call")}:null}},rMe=e=>{let t=eMe(e?.serverInfo),r=tMe(e?.serverCapabilities),n=I_(e?.instructions),o=e?.serverInfo??null,i=e?.serverCapabilities??null;return t===null&&r===null&&n===null&&o===null&&i===null?null:{info:t,capabilities:r,instructions:n,rawInfo:o,rawCapabilities:i}},wB=(e,t)=>{let r=new Map,n=A_(e),o=Array.isArray(n.tools)?n.tools:[],i=Q$e(e).map((a,s)=>{let c=a.name.trim();if(c.length===0)return null;let p=I_(a.title),d=X$e(a.annotations),f=p??d?.title??c;return{toolId:V$e(c,r),toolName:c,title:p,displayTitle:f,description:a.description??null,annotations:d,execution:Y$e(a.execution),icons:ece(a.icons),meta:a._meta??null,rawTool:o[s]??null,inputSchema:a.inputSchema??a.parameters,outputSchema:a.outputSchema}}).filter(a=>a!==null);return{version:2,server:rMe(t),listTools:{nextCursor:I_(n.nextCursor),meta:n._meta??null,rawResult:e},tools:i}},tce=(e,t)=>!e||e.trim().length===0?t:`${e}.${t}`;var wl=class extends rce.TaggedError("McpToolsError"){},nMe="__EXECUTION_SUSPENDED__",oMe=e=>{if(e instanceof Error)return`${e.message} +${e.stack??""}`;if(typeof e=="string")return e;try{return JSON.stringify(e)}catch{return String(e)}},U6=e=>oMe(e).includes(nMe),ig=e=>e instanceof Error?e.message:String(e),iMe=e=>{if(e==null)return Wd;try{return Wx(e,{vendor:"mcp",fallback:Wd})}catch{return Wd}},aMe=e=>Pr.tryPromise({try:()=>e.close?.()??Promise.resolve(),catch:t=>t instanceof Error?t:new Error(String(t??"mcp connection close failed"))}).pipe(Pr.asVoid,Pr.catchAll(()=>Pr.void)),ace=e=>Pr.acquireUseRelease(e.connect.pipe(Pr.mapError(e.onConnectError)),e.run,aMe),sMe=ice.makeUnsafe({permits:1}),sce=(e,t)=>sMe.withPermits(e,1)(t),cce=e=>e.onElicitation({interactionId:e.interactionId,path:e.path,sourceKey:e.sourceKey,args:e.args,metadata:e.executionContext?.metadata,context:e.executionContext?.invocation,elicitation:e.elicitation}).pipe(Pr.mapError(t=>U6(t)?t:new wl({stage:"call_tool",message:`Failed resolving elicitation for ${e.toolName}`,details:ig(t)}))),lce=e=>{let t=e.client;return Xse(t)?Pr.try({try:()=>{let r=0;t.setRequestHandler(uT,n=>(r+=1,Pr.runPromise(Pr.try({try:()=>Wse(n.params),catch:o=>new wl({stage:"call_tool",message:`Failed parsing MCP elicitation for ${e.toolName}`,details:ig(o)})}).pipe(Pr.flatMap(o=>cce({toolName:e.toolName,onElicitation:e.onElicitation,interactionId:AB({path:e.path,invocation:e.executionContext?.invocation,elicitation:o,sequence:r}),path:e.path,sourceKey:e.sourceKey,args:e.args,executionContext:e.executionContext,elicitation:o})),Pr.map(Qse),Pr.catchAll(o=>U6(o)?Pr.fail(o):(console.error(`[mcp-tools] elicitation failed for ${e.toolName}, treating as cancel:`,o instanceof Error?o.message:String(o)),Pr.succeed({action:"cancel"})))))))},catch:r=>r instanceof wl?r:new wl({stage:"call_tool",message:`Failed installing elicitation handler for ${e.toolName}`,details:ig(r)})}):Pr.succeed(void 0)},uce=e=>Pr.forEach(e.cause.elicitations,t=>cce({toolName:e.toolName,onElicitation:e.onElicitation,interactionId:AB({path:e.path,invocation:e.executionContext?.invocation,elicitation:t}),path:e.path,sourceKey:e.sourceKey,args:e.args,executionContext:e.executionContext,elicitation:t}).pipe(Pr.flatMap(r=>r.action==="accept"?Pr.succeed(void 0):Pr.fail(new wl({stage:"call_tool",message:`URL elicitation was not accepted for ${e.toolName}`,details:r.action})))),{discard:!0}),cMe=e=>Pr.tryPromise({try:()=>e.client.callTool({name:e.toolName,arguments:e.args}),catch:t=>t}),lMe=e=>e?{path:e.path,sourceKey:e.sourceKey,metadata:e.metadata,invocation:e.invocation,onElicitation:e.onElicitation}:void 0,uMe=e=>Pr.gen(function*(){let t=lMe(e.mcpDiscoveryElicitation);e.mcpDiscoveryElicitation&&(yield*lce({client:e.connection.client,toolName:"tools/list",onElicitation:e.mcpDiscoveryElicitation.onElicitation,path:e.mcpDiscoveryElicitation.path,sourceKey:e.mcpDiscoveryElicitation.sourceKey,args:e.mcpDiscoveryElicitation.args,executionContext:t}));let r=0;for(;;){let n=yield*Pr.either(Pr.tryPromise({try:()=>e.connection.client.listTools(),catch:o=>o}));if(kB.isRight(n))return n.right;if(U6(n.left))return yield*n.left;if(e.mcpDiscoveryElicitation&&IB(n.left)&&r<2){yield*uce({cause:n.left,toolName:"tools/list",onElicitation:e.mcpDiscoveryElicitation.onElicitation,path:e.mcpDiscoveryElicitation.path,sourceKey:e.mcpDiscoveryElicitation.sourceKey,args:e.mcpDiscoveryElicitation.args,executionContext:t}),r+=1;continue}return yield*new wl({stage:"list_tools",message:"Failed listing MCP tools",details:ig(n.left)})}}),pMe=e=>Pr.gen(function*(){let t=e.executionContext?.onElicitation;t&&(yield*lce({client:e.connection.client,toolName:e.toolName,onElicitation:t,path:e.path,sourceKey:e.sourceKey,args:e.args,executionContext:e.executionContext}));let r=0;for(;;){let n=yield*Pr.either(cMe({client:e.connection.client,toolName:e.toolName,args:e.args}));if(kB.isRight(n))return n.right;if(U6(n.left))return yield*n.left;if(t&&IB(n.left)&&r<2){yield*uce({cause:n.left,toolName:e.toolName,onElicitation:t,path:e.path,sourceKey:e.sourceKey,args:e.args,executionContext:e.executionContext}),r+=1;continue}return yield*new wl({stage:"call_tool",message:`Failed invoking MCP tool: ${e.toolName}`,details:ig(n.left)})}});var z6=e=>{let t=e.sourceKey??"mcp.generated";return Object.fromEntries(e.manifest.tools.map(r=>{let n=tce(e.namespace,r.toolId);return[n,vl({tool:{description:r.description??`MCP tool: ${r.toolName}`,inputSchema:iMe(r.inputSchema),execute:async(o,i)=>{let a=await Pr.runPromiseExit(ace({connect:e.connect,onConnectError:s=>new wl({stage:"connect",message:`Failed connecting to MCP server for ${r.toolName}`,details:ig(s)}),run:s=>{let c=Zse(o),p=pMe({connection:s,toolName:r.toolName,path:n,sourceKey:t,args:c,executionContext:i});return i?.onElicitation?sce(s.client,p):p}}));if(oce.isSuccess(a))return a.value;throw nce.squash(a.cause)}},metadata:{sourceKey:t,contract:{...r.inputSchema!==void 0?{inputSchema:r.inputSchema}:{},...r.outputSchema!==void 0?{outputSchema:r.outputSchema}:{}}}})]}))},ag=e=>Pr.gen(function*(){let t=yield*ace({connect:e.connect,onConnectError:n=>new wl({stage:"connect",message:"Failed connecting to MCP server",details:ig(n)}),run:n=>{let o=uMe({connection:n,mcpDiscoveryElicitation:e.mcpDiscoveryElicitation}),i=e.mcpDiscoveryElicitation?sce(n.client,o):o;return Pr.map(i,a=>({listed:a,serverInfo:n.client.getServerVersion?.(),serverCapabilities:n.client.getServerCapabilities?.(),instructions:n.client.getInstructions?.()}))}}),r=wB(t.listed,{serverInfo:t.serverInfo,serverCapabilities:t.serverCapabilities,instructions:t.instructions});return{manifest:r,tools:z6({manifest:r,connect:e.connect,namespace:e.namespace,sourceKey:e.sourceKey})}});var CB=e=>w_.gen(function*(){let t=dm({endpoint:e.normalizedUrl,headers:e.headers,transport:"auto"}),r=yield*w_.either(ag({connect:t,sourceKey:"discovery",namespace:os(Pp(e.normalizedUrl))}));if(J6.isRight(r)){let i=Pp(e.normalizedUrl);return{detectedKind:"mcp",confidence:"high",endpoint:e.normalizedUrl,specUrl:null,name:i,namespace:os(i),transport:"auto",authInference:Op("MCP tool discovery succeeded without an advertised auth requirement","medium"),toolCount:r.right.manifest.tools.length,warnings:[]}}let n=yield*w_.either(MT({endpoint:e.normalizedUrl,redirectUrl:"http://127.0.0.1/executor/discovery/oauth/callback",state:"source-discovery"}));if(J6.isLeft(n))return null;let o=Pp(e.normalizedUrl);return{detectedKind:"mcp",confidence:"high",endpoint:e.normalizedUrl,specUrl:null,name:o,namespace:os(o),transport:"auto",authInference:Iu("oauth2",{confidence:"high",reason:"MCP endpoint advertised OAuth during discovery",headerName:"Authorization",prefix:"Bearer ",parameterName:null,parameterLocation:null,oauthAuthorizationUrl:n.right.authorizationUrl,oauthTokenUrl:n.right.authorizationServerUrl,oauthScopes:[]}),toolCount:null,warnings:["OAuth is required before MCP tools can be listed."]}}).pipe(w_.catchAll(()=>w_.succeed(null)));import*as Pi from"effect/Schema";var PB=Pi.Struct({transport:Pi.optional(Pi.NullOr(Fc)),queryParams:Pi.optional(Pi.NullOr(Qr)),headers:Pi.optional(Pi.NullOr(Qr)),command:Pi.optional(Pi.NullOr(Pi.String)),args:Pi.optional(Pi.NullOr(x_)),env:Pi.optional(Pi.NullOr(Qr)),cwd:Pi.optional(Pi.NullOr(Pi.String))});var dMe=e=>e?.taskSupport==="optional"||e?.taskSupport==="required",_Me=e=>{let t=e.effect==="read";return{effect:e.effect,safe:t,idempotent:t||e.annotations?.idempotentHint===!0,destructive:t?!1:e.annotations?.destructiveHint!==!1}},fMe=e=>{let t=g_(e.source,e.operation.providerData.toolId),r=Oc.make(`cap_${hn({sourceId:e.source.id,toolId:e.operation.providerData.toolId})}`),n=Qs.make(`exec_${hn({sourceId:e.source.id,toolId:e.operation.providerData.toolId,protocol:"mcp"})}`),o=e.operation.outputSchema!==void 0?e.importer.importSchema(e.operation.outputSchema,`#/mcp/${e.operation.providerData.toolId}/output`):void 0,i=e.operation.inputSchema===void 0?e.importer.importSchema({type:"object",properties:{},additionalProperties:!1},`#/mcp/${e.operation.providerData.toolId}/call`):oB(e.operation.inputSchema)?e.importer.importSchema(e.operation.inputSchema,`#/mcp/${e.operation.providerData.toolId}/call`,e.operation.inputSchema):e.importer.importSchema(dv({type:"object",properties:{input:e.operation.inputSchema},required:["input"],additionalProperties:!1},e.operation.inputSchema),`#/mcp/${e.operation.providerData.toolId}/call`),a=e.importer.importSchema({type:"null"},`#/mcp/${e.operation.providerData.toolId}/status`),s=Nc.make(`response_${hn({capabilityId:r})}`);Vr(e.catalog.symbols)[s]={id:s,kind:"response",...In({description:e.operation.providerData.description??e.operation.description})?{docs:In({description:e.operation.providerData.description??e.operation.description})}:{},...o?{contents:[{mediaType:"application/json",shapeId:o}]}:{},synthetic:!1,provenance:pn(e.documentId,`#/mcp/${e.operation.providerData.toolId}/response`)};let c=v_({catalog:e.catalog,responseId:s,provenance:pn(e.documentId,`#/mcp/${e.operation.providerData.toolId}/responseSet`)});Vr(e.catalog.executables)[n]={id:n,capabilityId:r,scopeId:e.serviceScopeId,adapterKey:"mcp",bindingVersion:Ca,binding:e.operation.providerData,projection:{responseSetId:c,callShapeId:i,...o?{resultDataShapeId:o}:{},resultStatusShapeId:a},display:{protocol:"mcp",method:null,pathTemplate:null,operationId:e.operation.providerData.toolName,group:null,leaf:e.operation.providerData.toolName,rawToolId:e.operation.providerData.toolId,title:e.operation.providerData.displayTitle,summary:e.operation.providerData.description??e.operation.description??null},synthetic:!1,provenance:pn(e.documentId,`#/mcp/${e.operation.providerData.toolId}/executable`)};let p=S_(e.operation.effect);Vr(e.catalog.capabilities)[r]={id:r,serviceScopeId:e.serviceScopeId,surface:{toolPath:t,title:e.operation.providerData.displayTitle,...e.operation.providerData.description?{summary:e.operation.providerData.description}:{}},semantics:_Me({effect:e.operation.effect,annotations:e.operation.providerData.annotations}),auth:{kind:"none"},interaction:{...p,resume:{supported:dMe(e.operation.providerData.execution)}},executableIds:[n],synthetic:!1,provenance:pn(e.documentId,`#/mcp/${e.operation.providerData.toolId}/capability`)}},pce=e=>b_({source:e.source,documents:e.documents,registerOperations:({catalog:t,documentId:r,serviceScopeId:n,importer:o})=>{for(let i of e.operations)fMe({catalog:t,source:e.source,documentId:r,serviceScopeId:n,operation:i,importer:o})}});import*as Oi from"effect/Effect";import*as Mt from"effect/Schema";var dce=e=>Tc({headers:{...e.headers,...e.authHeaders},cookies:e.authCookies}),OB=e=>typeof e=="object"&&e!==null&&!Array.isArray(e)?e:{},mMe=e=>e,hMe=e=>{let t=e.trim().toLowerCase().replace(/[^a-z0-9]+/g,".").replace(/^\.+|\.+$/g,"");return t.length>0?t:"source"},_ce=(e,t)=>Co("mcp/adapter",t===void 0?e:`${e}: ${t instanceof Error?t.message:String(t)}`),yMe=Mt.optional(Mt.NullOr(x_)),gMe=Mt.extend(xB,Mt.Struct({kind:Mt.Literal("mcp"),endpoint:Ho,name:Ho,namespace:Ho})),SMe=Mt.extend(xB,Mt.Struct({kind:Mt.optional(Mt.Literal("mcp")),endpoint:Ho,name:Ho,namespace:Ho})),fce=Mt.Struct({transport:Mt.NullOr(Fc),queryParams:Mt.NullOr(Qr),headers:Mt.NullOr(Qr),command:Mt.NullOr(Mt.String),args:Mt.NullOr(x_),env:Mt.NullOr(Qr),cwd:Mt.NullOr(Mt.String)}),vMe=Mt.Struct({transport:Mt.optional(Mt.NullOr(Fc)),queryParams:Mt.optional(Mt.NullOr(Qr)),headers:Mt.optional(Mt.NullOr(Qr)),command:Mt.optional(Mt.NullOr(Mt.String)),args:yMe,env:Mt.optional(Mt.NullOr(Qr)),cwd:Mt.optional(Mt.NullOr(Mt.String))}),bMe=Mt.Struct({toolId:Mt.String,toolName:Mt.String,displayTitle:Mt.String,title:Mt.NullOr(Mt.String),description:Mt.NullOr(Mt.String),annotations:Mt.NullOr(Mt.Unknown),execution:Mt.NullOr(Mt.Unknown),icons:Mt.NullOr(Mt.Unknown),meta:Mt.NullOr(Mt.Unknown),rawTool:Mt.NullOr(Mt.Unknown),server:Mt.NullOr(Mt.Unknown)}),jT=1,mce=(e,t)=>e!==null&&typeof e=="object"&&!Array.isArray(e)&&t.some(r=>Object.prototype.hasOwnProperty.call(e,r)),NB=e=>{if(e==null)return null;let t=e.trim();return t.length>0?t:null},xMe=e=>{if(!e||e.length===0)return null;let t=e.map(r=>r.trim()).filter(r=>r.length>0);return t.length>0?t:null},EMe=e=>Oi.gen(function*(){let t=NB(e.command);return tg({transport:e.transport??void 0,command:t??void 0})?t===null?yield*Co("mcp/adapter","MCP stdio transport requires a command"):e.queryParams&&Object.keys(e.queryParams).length>0?yield*Co("mcp/adapter","MCP stdio transport does not support query params"):e.headers&&Object.keys(e.headers).length>0?yield*Co("mcp/adapter","MCP stdio transport does not support request headers"):{transport:"stdio",queryParams:null,headers:null,command:t,args:xMe(e.args),env:e.env??null,cwd:NB(e.cwd)}:t!==null||e.args||e.env||NB(e.cwd)!==null?yield*Co("mcp/adapter",'MCP process settings require transport: "stdio"'):{transport:e.transport??null,queryParams:e.queryParams??null,headers:e.headers??null,command:null,args:null,env:null,cwd:null}}),sg=e=>Oi.gen(function*(){if(mce(e.binding,["specUrl"]))return yield*Co("mcp/adapter","MCP sources cannot define specUrl");if(mce(e.binding,["defaultHeaders"]))return yield*Co("mcp/adapter","MCP sources cannot define HTTP source settings");let t=yield*Mp({sourceId:e.id,label:"MCP",version:e.bindingVersion,expectedVersion:jT,schema:vMe,value:e.binding,allowedKeys:["transport","queryParams","headers","command","args","env","cwd"]});return yield*EMe(t)}),TMe=e=>e.annotations?.readOnlyHint===!0?"read":"write",DMe=e=>({toolId:e.entry.toolId,title:e.entry.displayTitle??e.entry.title??e.entry.toolName,description:e.entry.description??null,effect:TMe(e.entry),inputSchema:e.entry.inputSchema,outputSchema:e.entry.outputSchema,providerData:{toolId:e.entry.toolId,toolName:e.entry.toolName,displayTitle:e.entry.displayTitle??e.entry.title??e.entry.toolName,title:e.entry.title??null,description:e.entry.description??null,annotations:e.entry.annotations??null,execution:e.entry.execution??null,icons:e.entry.icons??null,meta:e.entry.meta??null,rawTool:e.entry.rawTool??null,server:e.server??null}}),FB=e=>{let t=Date.now(),r=JSON.stringify(e.manifest),n=LT(r);return Fp({fragment:pce({source:e.source,documents:[{documentKind:"mcp_manifest",documentKey:e.endpoint,contentText:r,fetchedAt:t}],operations:e.manifest.tools.map(o=>DMe({entry:o,server:e.manifest.server}))}),importMetadata:Is({source:e.source,adapterKey:"mcp"}),sourceHash:n})},hce={key:"mcp",displayName:"MCP",catalogKind:"imported",connectStrategy:"interactive",credentialStrategy:"adapter_defined",bindingConfigVersion:jT,providerKey:"generic_mcp",defaultImportAuthPolicy:"reuse_runtime",connectPayloadSchema:gMe,executorAddInputSchema:SMe,executorAddHelpText:['Omit kind or set kind: "mcp". For remote servers, provide endpoint plus optional transport/queryParams/headers.','For local servers, set transport: "stdio" and provide command plus optional args/env/cwd.'],executorAddInputSignatureWidth:240,localConfigBindingSchema:PB,localConfigBindingFromSource:e=>Oi.runSync(Oi.map(sg(e),t=>({transport:t.transport,queryParams:t.queryParams,headers:t.headers,command:t.command,args:t.args,env:t.env,cwd:t.cwd}))),serializeBindingConfig:e=>Lp({adapterKey:"mcp",version:jT,payloadSchema:fce,payload:Oi.runSync(sg(e))}),deserializeBindingConfig:({id:e,bindingConfigJson:t})=>Oi.map($p({sourceId:e,label:"MCP",adapterKey:"mcp",version:jT,payloadSchema:fce,value:t}),({version:r,payload:n})=>({version:r,payload:n})),bindingStateFromSource:e=>Oi.map(sg(e),t=>({...Rp,transport:t.transport,queryParams:t.queryParams,headers:t.headers,command:t.command,args:t.args,env:t.env,cwd:t.cwd})),sourceConfigFromSource:e=>Oi.runSync(Oi.map(sg(e),t=>({kind:"mcp",endpoint:e.endpoint,transport:t.transport,queryParams:t.queryParams,headers:t.headers,command:t.command,args:t.args,env:t.env,cwd:t.cwd}))),validateSource:e=>Oi.gen(function*(){let t=yield*sg(e);return{...e,bindingVersion:jT,binding:{transport:t.transport,queryParams:t.queryParams,headers:t.headers,command:t.command,args:t.args,env:t.env,cwd:t.cwd}}}),shouldAutoProbe:()=>!1,discoveryPriority:({normalizedUrl:e})=>ym(e)?350:125,detectSource:({normalizedUrl:e,headers:t})=>CB({normalizedUrl:e,headers:t}),syncCatalog:({source:e,resolveAuthMaterialForSlot:t})=>Oi.gen(function*(){let r=yield*sg(e),n=yield*t("import"),o=dm({endpoint:e.endpoint,transport:r.transport??void 0,queryParams:{...r.queryParams,...n.queryParams},headers:dce({headers:r.headers??{},authHeaders:n.headers,authCookies:n.cookies}),authProvider:n.authProvider,command:r.command??void 0,args:r.args??void 0,env:r.env??void 0,cwd:r.cwd??void 0}),i=yield*ag({connect:o,namespace:e.namespace??hMe(e.name),sourceKey:e.id}).pipe(Oi.mapError(a=>new Error(`Failed discovering MCP tools for ${e.id}: ${a.message}${a.details?` (${a.details})`:""}`)));return FB({source:e,endpoint:e.endpoint,manifest:i.manifest})}),invoke:e=>Oi.gen(function*(){if(e.executable.adapterKey!=="mcp")return yield*Co("mcp/adapter",`Expected MCP executable binding, got ${e.executable.adapterKey}`);let t=yield*Oi.try({try:()=>xm({executableId:e.executable.id,label:"MCP",version:e.executable.bindingVersion,expectedVersion:Ca,schema:bMe,value:e.executable.binding}),catch:y=>_ce("Failed decoding MCP executable binding",y)}),r=yield*sg(e.source),n=_L({connect:dm({endpoint:e.source.endpoint,transport:r.transport??void 0,queryParams:{...r.queryParams,...e.auth.queryParams},headers:dce({headers:r.headers??{},authHeaders:e.auth.headers,authCookies:e.auth.cookies}),authProvider:e.auth.authProvider,command:r.command??void 0,args:r.args??void 0,env:r.env??void 0,cwd:r.cwd??void 0}),runId:typeof e.context?.runId=="string"&&e.context.runId.length>0?e.context.runId:void 0,sourceKey:e.source.id}),i=z6({manifest:{version:2,tools:[{toolId:t.toolName,toolName:t.toolName,displayTitle:e.capability.surface.title??e.executable.display?.title??t.toolName,title:e.capability.surface.title??e.executable.display?.title??null,description:e.capability.surface.summary??e.capability.surface.description??e.executable.display?.summary??`MCP tool: ${t.toolName}`,annotations:null,execution:null,icons:null,meta:null,rawTool:null,inputSchema:e.descriptor.contract?.inputSchema,outputSchema:e.descriptor.contract?.outputSchema}]},connect:n,sourceKey:e.source.id})[t.toolName],a=i&&typeof i=="object"&&i!==null&&"tool"in i?i.tool:i;if(!a)return yield*Co("mcp/adapter",`Missing MCP tool definition for ${t.toolName}`);let s=e.executable.projection.callShapeId?e.catalog.symbols[e.executable.projection.callShapeId]:void 0,c=s?.kind==="shape"&&s.node.type!=="object"?OB(e.args).input:e.args,p=e.onElicitation?{path:mMe(e.descriptor.path),sourceKey:e.source.id,metadata:{sourceKey:e.source.id,interaction:e.descriptor.interaction,contract:{...e.descriptor.contract?.inputSchema!==void 0?{inputSchema:e.descriptor.contract.inputSchema}:{},...e.descriptor.contract?.outputSchema!==void 0?{outputSchema:e.descriptor.contract.outputSchema}:{}},providerKind:e.descriptor.providerKind,providerData:e.descriptor.providerData},invocation:e.context,onElicitation:e.onElicitation}:void 0,d=yield*Oi.tryPromise({try:async()=>await a.execute(OB(c),p),catch:y=>_ce(`Failed invoking MCP tool ${t.toolName}`,y)}),m=OB(d).isError===!0;return{data:m?null:d??null,error:m?d:null,headers:{},status:null}})};import*as li from"effect/Effect";import*as Eo from"effect/Layer";import*as ZAe from"effect/ManagedRuntime";import*as nle from"effect/Context";import*as C_ from"effect/Effect";import*as ole from"effect/Layer";import*as ile from"effect/Option";import*as yce from"effect/Context";var Wn=class extends yce.Tag("#runtime/ExecutorStateStore")(){};import{Schema as AMe}from"effect";var It=AMe.Number;import{Schema as tt}from"effect";import{Schema as oo}from"effect";var Br=oo.String.pipe(oo.brand("ScopeId")),Mn=oo.String.pipe(oo.brand("SourceId")),Rc=oo.String.pipe(oo.brand("SourceCatalogId")),Tm=oo.String.pipe(oo.brand("SourceCatalogRevisionId")),Dm=oo.String.pipe(oo.brand("SourceAuthSessionId")),cg=oo.String.pipe(oo.brand("AuthArtifactId")),vv=oo.String.pipe(oo.brand("AuthLeaseId"));var V6=oo.String.pipe(oo.brand("ScopedSourceOauthClientId")),Am=oo.String.pipe(oo.brand("ScopeOauthClientId")),Bp=oo.String.pipe(oo.brand("ProviderAuthGrantId")),qp=oo.String.pipe(oo.brand("SecretMaterialId")),bv=oo.String.pipe(oo.brand("PolicyId")),kl=oo.String.pipe(oo.brand("ExecutionId")),ws=oo.String.pipe(oo.brand("ExecutionInteractionId")),K6=oo.String.pipe(oo.brand("ExecutionStepId"));import{Schema as Le}from"effect";import*as Im from"effect/Option";var pi=Le.Struct({providerId:Le.String,handle:Le.String}),BT=Le.Literal("runtime","import"),gce=BT,Sce=Le.String,IMe=Le.Array(Le.String),G6=Le.Union(Le.Struct({kind:Le.Literal("literal"),value:Le.String}),Le.Struct({kind:Le.Literal("secret_ref"),ref:pi})),vce=Le.Union(Le.Struct({location:Le.Literal("header"),name:Le.String,parts:Le.Array(G6)}),Le.Struct({location:Le.Literal("query"),name:Le.String,parts:Le.Array(G6)}),Le.Struct({location:Le.Literal("cookie"),name:Le.String,parts:Le.Array(G6)}),Le.Struct({location:Le.Literal("body"),path:Le.String,parts:Le.Array(G6)})),wMe=Le.Union(Le.Struct({location:Le.Literal("header"),name:Le.String,value:Le.String}),Le.Struct({location:Le.Literal("query"),name:Le.String,value:Le.String}),Le.Struct({location:Le.Literal("cookie"),name:Le.String,value:Le.String}),Le.Struct({location:Le.Literal("body"),path:Le.String,value:Le.String})),H6=Le.parseJson(Le.Array(vce)),wm="static_bearer",km="static_oauth2",lg="static_placements",Cl="oauth2_authorized_user",RB="provider_grant_ref",LB="mcp_oauth",xv=Le.Literal("none","client_secret_post"),kMe=Le.Literal(wm,km,lg,Cl),CMe=Le.Struct({headerName:Le.String,prefix:Le.String,token:pi}),PMe=Le.Struct({headerName:Le.String,prefix:Le.String,accessToken:pi,refreshToken:Le.NullOr(pi)}),OMe=Le.Struct({placements:Le.Array(vce)}),NMe=Le.Struct({headerName:Le.String,prefix:Le.String,tokenEndpoint:Le.String,clientId:Le.String,clientAuthentication:xv,clientSecret:Le.NullOr(pi),refreshToken:pi}),FMe=Le.Struct({grantId:Bp,providerKey:Le.String,requiredScopes:Le.Array(Le.String),headerName:Le.String,prefix:Le.String}),RMe=Le.Struct({redirectUri:Le.String,accessToken:pi,refreshToken:Le.NullOr(pi),tokenType:Le.String,expiresIn:Le.NullOr(Le.Number),scope:Le.NullOr(Le.String),resourceMetadataUrl:Le.NullOr(Le.String),authorizationServerUrl:Le.NullOr(Le.String),resourceMetadataJson:Le.NullOr(Le.String),authorizationServerMetadataJson:Le.NullOr(Le.String),clientInformationJson:Le.NullOr(Le.String)}),$B=Le.parseJson(CMe),MB=Le.parseJson(PMe),jB=Le.parseJson(OMe),BB=Le.parseJson(NMe),qB=Le.parseJson(FMe),qT=Le.parseJson(RMe),gLt=Le.parseJson(Le.Array(wMe)),UB=Le.parseJson(IMe),LMe=Le.decodeUnknownOption($B),$Me=Le.decodeUnknownOption(MB),MMe=Le.decodeUnknownOption(jB),jMe=Le.decodeUnknownOption(BB),BMe=Le.decodeUnknownOption(qB),qMe=Le.decodeUnknownOption(qT),UMe=Le.decodeUnknownOption(UB),bce=Le.Struct({id:cg,scopeId:Br,sourceId:Mn,actorScopeId:Le.NullOr(Br),slot:BT,artifactKind:Sce,configJson:Le.String,grantSetJson:Le.NullOr(Le.String),createdAt:It,updatedAt:It}),Up=e=>{if(e.artifactKind!==RB)return null;let t=BMe(e.configJson);return Im.isSome(t)?t.value:null},Ev=e=>{if(e.artifactKind!==LB)return null;let t=qMe(e.configJson);return Im.isSome(t)?t.value:null},Cm=e=>{switch(e.artifactKind){case wm:{let t=LMe(e.configJson);return Im.isSome(t)?{artifactKind:wm,config:t.value}:null}case km:{let t=$Me(e.configJson);return Im.isSome(t)?{artifactKind:km,config:t.value}:null}case lg:{let t=MMe(e.configJson);return Im.isSome(t)?{artifactKind:lg,config:t.value}:null}case Cl:{let t=jMe(e.configJson);return Im.isSome(t)?{artifactKind:Cl,config:t.value}:null}default:return null}},zMe=e=>{let t=e!==null&&typeof e=="object"?e.grantSetJson:e;if(t===null)return null;let r=UMe(t);return Im.isSome(r)?r.value:null},xce=zMe,Ece=e=>{let t=Cm(e);if(t!==null)switch(t.artifactKind){case wm:return[t.config.token];case km:return t.config.refreshToken?[t.config.accessToken,t.config.refreshToken]:[t.config.accessToken];case lg:return t.config.placements.flatMap(n=>n.parts.flatMap(o=>o.kind==="secret_ref"?[o.ref]:[]));case Cl:return t.config.clientSecret?[t.config.refreshToken,t.config.clientSecret]:[t.config.refreshToken]}let r=Ev(e);return r!==null?r.refreshToken?[r.accessToken,r.refreshToken]:[r.accessToken]:[]};import{Schema as it}from"effect";var Tce=it.String,Dce=it.Literal("pending","completed","failed","cancelled"),zB=it.suspend(()=>it.Union(it.String,it.Number,it.Boolean,it.Null,it.Array(zB),it.Record({key:it.String,value:zB}))).annotations({identifier:"JsonValue"}),Tv=it.Record({key:it.String,value:zB}).annotations({identifier:"JsonObject"}),JMe=it.Struct({kind:it.Literal("mcp_oauth"),endpoint:it.String,redirectUri:it.String,scope:it.NullOr(it.String),resourceMetadataUrl:it.NullOr(it.String),authorizationServerUrl:it.NullOr(it.String),resourceMetadata:it.NullOr(Tv),authorizationServerMetadata:it.NullOr(Tv),clientInformation:it.NullOr(Tv),codeVerifier:it.NullOr(it.String),authorizationUrl:it.NullOr(it.String)}),JB=it.parseJson(JMe),VMe=it.Struct({kind:it.Literal("oauth2_pkce"),providerKey:it.String,authorizationEndpoint:it.String,tokenEndpoint:it.String,redirectUri:it.String,clientId:it.String,clientAuthentication:xv,clientSecret:it.NullOr(pi),scopes:it.Array(it.String),headerName:it.String,prefix:it.String,authorizationParams:it.Record({key:it.String,value:it.String}),codeVerifier:it.NullOr(it.String),authorizationUrl:it.NullOr(it.String)}),VB=it.parseJson(VMe),KMe=it.Struct({sourceId:Mn,requiredScopes:it.Array(it.String)}),GMe=it.Struct({kind:it.Literal("provider_oauth_batch"),providerKey:it.String,authorizationEndpoint:it.String,tokenEndpoint:it.String,redirectUri:it.String,oauthClientId:Am,clientAuthentication:xv,scopes:it.Array(it.String),headerName:it.String,prefix:it.String,authorizationParams:it.Record({key:it.String,value:it.String}),targetSources:it.Array(KMe),codeVerifier:it.NullOr(it.String),authorizationUrl:it.NullOr(it.String)}),KB=it.parseJson(GMe),Ace=it.Struct({id:Dm,scopeId:Br,sourceId:Mn,actorScopeId:it.NullOr(Br),credentialSlot:gce,executionId:it.NullOr(kl),interactionId:it.NullOr(ws),providerKind:Tce,status:Dce,state:it.String,sessionDataJson:it.String,errorText:it.NullOr(it.String),completedAt:it.NullOr(It),createdAt:It,updatedAt:It});var Z6=tt.String,Dv=tt.Literal("draft","probing","auth_required","connected","error"),GB=tt.Union(tt.Struct({kind:tt.Literal("none")}),tt.Struct({kind:tt.Literal("bearer"),headerName:tt.String,prefix:tt.String,token:pi}),tt.Struct({kind:tt.Literal("oauth2"),headerName:tt.String,prefix:tt.String,accessToken:pi,refreshToken:tt.NullOr(pi)}),tt.Struct({kind:tt.Literal("oauth2_authorized_user"),headerName:tt.String,prefix:tt.String,tokenEndpoint:tt.String,clientId:tt.String,clientAuthentication:tt.Literal("none","client_secret_post"),clientSecret:tt.NullOr(pi),refreshToken:pi,grantSet:tt.NullOr(tt.Array(tt.String))}),tt.Struct({kind:tt.Literal("provider_grant_ref"),grantId:Bp,providerKey:tt.String,requiredScopes:tt.Array(tt.String),headerName:tt.String,prefix:tt.String}),tt.Struct({kind:tt.Literal("mcp_oauth"),redirectUri:tt.String,accessToken:pi,refreshToken:tt.NullOr(pi),tokenType:tt.String,expiresIn:tt.NullOr(tt.Number),scope:tt.NullOr(tt.String),resourceMetadataUrl:tt.NullOr(tt.String),authorizationServerUrl:tt.NullOr(tt.String),resourceMetadataJson:tt.NullOr(tt.String),authorizationServerMetadataJson:tt.NullOr(tt.String),clientInformationJson:tt.NullOr(tt.String)})),HB=tt.Number,HMe=tt.Struct({version:HB,payload:Tv}),ZMe=tt.Struct({scopeId:Br,sourceId:Mn,catalogId:Rc,catalogRevisionId:Tm,name:tt.String,kind:Z6,endpoint:tt.String,status:Dv,enabled:tt.Boolean,namespace:tt.NullOr(tt.String),importAuthPolicy:vm,bindingConfigJson:tt.String,sourceHash:tt.NullOr(tt.String),lastError:tt.NullOr(tt.String),createdAt:It,updatedAt:It}),NLt=tt.transform(ZMe,tt.Struct({id:Mn,scopeId:Br,catalogId:Rc,catalogRevisionId:Tm,name:tt.String,kind:Z6,endpoint:tt.String,status:Dv,enabled:tt.Boolean,namespace:tt.NullOr(tt.String),importAuthPolicy:vm,bindingConfigJson:tt.String,sourceHash:tt.NullOr(tt.String),lastError:tt.NullOr(tt.String),createdAt:It,updatedAt:It}),{strict:!1,decode:e=>({id:e.sourceId,scopeId:e.scopeId,catalogId:e.catalogId,catalogRevisionId:e.catalogRevisionId,name:e.name,kind:e.kind,endpoint:e.endpoint,status:e.status,enabled:e.enabled,namespace:e.namespace,importAuthPolicy:e.importAuthPolicy,bindingConfigJson:e.bindingConfigJson,sourceHash:e.sourceHash,lastError:e.lastError,createdAt:e.createdAt,updatedAt:e.updatedAt}),encode:e=>({scopeId:e.scopeId,sourceId:e.id,catalogId:e.catalogId,catalogRevisionId:e.catalogRevisionId,name:e.name,kind:e.kind,endpoint:e.endpoint,status:e.status,enabled:e.enabled,namespace:e.namespace,importAuthPolicy:e.importAuthPolicy,bindingConfigJson:e.bindingConfigJson,sourceHash:e.sourceHash,lastError:e.lastError,createdAt:e.createdAt,updatedAt:e.updatedAt})}),zp=tt.Struct({id:Mn,scopeId:Br,name:tt.String,kind:Z6,endpoint:tt.String,status:Dv,enabled:tt.Boolean,namespace:tt.NullOr(tt.String),bindingVersion:HB,binding:Tv,importAuthPolicy:vm,importAuth:GB,auth:GB,sourceHash:tt.NullOr(tt.String),lastError:tt.NullOr(tt.String),createdAt:It,updatedAt:It});import{Schema as Pa}from"effect";var Ice=Pa.Literal("imported","internal"),wce=Pa.String,kce=Pa.Literal("private","scope","organization","public"),jLt=Pa.Struct({id:Rc,kind:Ice,adapterKey:wce,providerKey:Pa.String,name:Pa.String,summary:Pa.NullOr(Pa.String),visibility:kce,latestRevisionId:Tm,createdAt:It,updatedAt:It}),UT=Pa.Struct({id:Tm,catalogId:Rc,revisionNumber:Pa.Number,sourceConfigJson:Pa.String,importMetadataJson:Pa.NullOr(Pa.String),importMetadataHash:Pa.NullOr(Pa.String),snapshotHash:Pa.NullOr(Pa.String),createdAt:It,updatedAt:It});import{Schema as Pm}from"effect";var Cce=Pm.Literal("allow","deny"),Pce=Pm.Literal("auto","required"),WMe=Pm.Struct({id:bv,key:Pm.String,scopeId:Br,resourcePattern:Pm.String,effect:Cce,approvalMode:Pce,priority:Pm.Number,enabled:Pm.Boolean,createdAt:It,updatedAt:It});var KLt=Pm.partial(WMe);import{Schema as Av}from"effect";import*as Oce from"effect/Option";var Nce=Av.Struct({id:vv,authArtifactId:cg,scopeId:Br,sourceId:Mn,actorScopeId:Av.NullOr(Br),slot:BT,placementsTemplateJson:Av.String,expiresAt:Av.NullOr(It),refreshAfter:Av.NullOr(It),createdAt:It,updatedAt:It}),QMe=Av.decodeUnknownOption(H6),XMe=e=>{let t=QMe(e.placementsTemplateJson);return Oce.isSome(t)?t.value:null},ZB=e=>(XMe(e)??[]).flatMap(t=>t.parts.flatMap(r=>r.kind==="secret_ref"?[r.ref]:[]));import{Schema as Pl}from"effect";var YMe=Pl.Struct({redirectMode:Pl.optional(M6)}),WB=Pl.parseJson(YMe),Fce=Pl.Struct({id:V6,scopeId:Br,sourceId:Mn,providerKey:Pl.String,clientId:Pl.String,clientSecretProviderId:Pl.NullOr(Pl.String),clientSecretHandle:Pl.NullOr(Pl.String),clientMetadataJson:Pl.NullOr(Pl.String),createdAt:It,updatedAt:It});import{Schema as Pu}from"effect";var Rce=Pu.Struct({id:Am,scopeId:Br,providerKey:Pu.String,label:Pu.NullOr(Pu.String),clientId:Pu.String,clientSecretProviderId:Pu.NullOr(Pu.String),clientSecretHandle:Pu.NullOr(Pu.String),clientMetadataJson:Pu.NullOr(Pu.String),createdAt:It,updatedAt:It});import{Schema as Jp}from"effect";var Lce=Jp.Struct({id:Bp,scopeId:Br,actorScopeId:Jp.NullOr(Br),providerKey:Jp.String,oauthClientId:Am,tokenEndpoint:Jp.String,clientAuthentication:xv,headerName:Jp.String,prefix:Jp.String,refreshToken:pi,grantedScopes:Jp.Array(Jp.String),lastRefreshedAt:Jp.NullOr(It),orphanedAt:Jp.NullOr(It),createdAt:It,updatedAt:It});import{Schema as Om}from"effect";var e7e=Om.Literal("auth_material","oauth_access_token","oauth_refresh_token","oauth_client_info"),$ce=Om.Struct({id:qp,name:Om.NullOr(Om.String),purpose:e7e,providerId:Om.String,handle:Om.String,value:Om.NullOr(Om.String),createdAt:It,updatedAt:It});import*as Iv from"effect/Schema";var t7e=Iv.Struct({scopeId:Br,actorScopeId:Br,resolutionScopeIds:Iv.Array(Br)});var w$t=Iv.partial(t7e);import{Schema as Ae}from"effect";var r7e=Ae.Literal("quickjs","ses","deno"),n7e=Ae.Literal("env","file","exec","params"),o7e=Ae.Struct({source:Ae.Literal("env")}),i7e=Ae.Literal("singleValue","json"),a7e=Ae.Struct({source:Ae.Literal("file"),path:Ae.String,mode:Ae.optional(i7e)}),s7e=Ae.Struct({source:Ae.Literal("exec"),command:Ae.String,args:Ae.optional(Ae.Array(Ae.String)),env:Ae.optional(Ae.Record({key:Ae.String,value:Ae.String})),allowSymlinkCommand:Ae.optional(Ae.Boolean),trustedDirs:Ae.optional(Ae.Array(Ae.String))}),c7e=Ae.Union(o7e,a7e,s7e),l7e=Ae.Struct({source:n7e,provider:Ae.String,id:Ae.String}),u7e=Ae.Union(Ae.String,l7e),p7e=Ae.Struct({endpoint:Ae.String,auth:Ae.optional(u7e)}),W6=Ae.Struct({name:Ae.optional(Ae.String),namespace:Ae.optional(Ae.String),enabled:Ae.optional(Ae.Boolean),connection:p7e}),d7e=Ae.Struct({specUrl:Ae.String,defaultHeaders:Ae.optional(Ae.NullOr(Qr))}),_7e=Ae.Struct({defaultHeaders:Ae.optional(Ae.NullOr(Qr))}),f7e=Ae.Struct({service:Ae.String,version:Ae.String,discoveryUrl:Ae.optional(Ae.NullOr(Ae.String)),defaultHeaders:Ae.optional(Ae.NullOr(Qr)),scopes:Ae.optional(Ae.Array(Ae.String))}),m7e=Ae.Struct({transport:Ae.optional(Ae.NullOr(Fc)),queryParams:Ae.optional(Ae.NullOr(Qr)),headers:Ae.optional(Ae.NullOr(Qr)),command:Ae.optional(Ae.NullOr(Ae.String)),args:Ae.optional(Ae.NullOr(x_)),env:Ae.optional(Ae.NullOr(Qr)),cwd:Ae.optional(Ae.NullOr(Ae.String))}),h7e=Ae.extend(W6,Ae.Struct({kind:Ae.Literal("openapi"),binding:d7e})),y7e=Ae.extend(W6,Ae.Struct({kind:Ae.Literal("graphql"),binding:_7e})),g7e=Ae.extend(W6,Ae.Struct({kind:Ae.Literal("google_discovery"),binding:f7e})),S7e=Ae.extend(W6,Ae.Struct({kind:Ae.Literal("mcp"),binding:m7e})),v7e=Ae.Union(h7e,y7e,g7e,S7e),b7e=Ae.Literal("allow","deny"),x7e=Ae.Literal("auto","manual"),E7e=Ae.Struct({match:Ae.String,action:b7e,approval:x7e,enabled:Ae.optional(Ae.Boolean),priority:Ae.optional(Ae.Number)}),T7e=Ae.Struct({providers:Ae.optional(Ae.Record({key:Ae.String,value:c7e})),defaults:Ae.optional(Ae.Struct({env:Ae.optional(Ae.String),file:Ae.optional(Ae.String),exec:Ae.optional(Ae.String)}))}),D7e=Ae.Struct({name:Ae.optional(Ae.String)}),Mce=Ae.Struct({runtime:Ae.optional(r7e),workspace:Ae.optional(D7e),sources:Ae.optional(Ae.Record({key:Ae.String,value:v7e})),policies:Ae.optional(Ae.Record({key:Ae.String,value:E7e})),secrets:Ae.optional(T7e)});import{Schema as Ut}from"effect";var jce=Ut.Literal("pending","running","waiting_for_interaction","completed","failed","cancelled"),QB=Ut.Struct({id:kl,scopeId:Br,createdByScopeId:Br,status:jce,code:Ut.String,resultJson:Ut.NullOr(Ut.String),errorText:Ut.NullOr(Ut.String),logsJson:Ut.NullOr(Ut.String),startedAt:Ut.NullOr(It),completedAt:Ut.NullOr(It),createdAt:It,updatedAt:It});var L$t=Ut.partial(Ut.Struct({status:jce,code:Ut.String,resultJson:Ut.NullOr(Ut.String),errorText:Ut.NullOr(Ut.String),logsJson:Ut.NullOr(Ut.String),startedAt:Ut.NullOr(It),completedAt:Ut.NullOr(It),updatedAt:It})),Bce=Ut.Literal("pending","resolved","cancelled"),XB=Ut.Struct({id:ws,executionId:kl,status:Bce,kind:Ut.String,purpose:Ut.String,payloadJson:Ut.String,responseJson:Ut.NullOr(Ut.String),responsePrivateJson:Ut.NullOr(Ut.String),createdAt:It,updatedAt:It});var $$t=Ut.partial(Ut.Struct({status:Bce,kind:Ut.String,purpose:Ut.String,payloadJson:Ut.String,responseJson:Ut.NullOr(Ut.String),responsePrivateJson:Ut.NullOr(Ut.String),updatedAt:It})),M$t=Ut.Struct({execution:QB,pendingInteraction:Ut.NullOr(XB)}),A7e=Ut.Literal("tool_call"),qce=Ut.Literal("pending","waiting","completed","failed"),Uce=Ut.Struct({id:K6,executionId:kl,sequence:Ut.Number,kind:A7e,status:qce,path:Ut.String,argsJson:Ut.String,resultJson:Ut.NullOr(Ut.String),errorText:Ut.NullOr(Ut.String),interactionId:Ut.NullOr(ws),createdAt:It,updatedAt:It});var j$t=Ut.partial(Ut.Struct({status:qce,resultJson:Ut.NullOr(Ut.String),errorText:Ut.NullOr(Ut.String),interactionId:Ut.NullOr(ws),updatedAt:It}));import{Schema as ze}from"effect";var I7e=ze.Literal("ir"),w7e=ze.Struct({path:ze.String,sourceKey:ze.String,title:ze.optional(ze.String),description:ze.optional(ze.String),protocol:ze.String,toolId:ze.String,rawToolId:ze.NullOr(ze.String),operationId:ze.NullOr(ze.String),group:ze.NullOr(ze.String),leaf:ze.NullOr(ze.String),tags:ze.Array(ze.String),method:ze.NullOr(ze.String),pathTemplate:ze.NullOr(ze.String),inputTypePreview:ze.optional(ze.String),outputTypePreview:ze.optional(ze.String)}),k7e=ze.Struct({label:ze.String,value:ze.String,mono:ze.optional(ze.Boolean)}),C7e=ze.Struct({kind:ze.Literal("facts"),title:ze.String,items:ze.Array(k7e)}),P7e=ze.Struct({kind:ze.Literal("markdown"),title:ze.String,body:ze.String}),O7e=ze.Struct({kind:ze.Literal("code"),title:ze.String,language:ze.String,body:ze.String}),N7e=ze.Union(C7e,P7e,O7e),F7e=ze.Struct({path:ze.String,method:ze.NullOr(ze.String),inputTypePreview:ze.optional(ze.String),outputTypePreview:ze.optional(ze.String)}),zce=ze.Struct({shapeId:ze.NullOr(ze.String),typePreview:ze.NullOr(ze.String),typeDeclaration:ze.NullOr(ze.String),schemaJson:ze.NullOr(ze.String),exampleJson:ze.NullOr(ze.String)}),R7e=ze.Struct({callSignature:ze.String,callDeclaration:ze.String,callShapeId:ze.String,resultShapeId:ze.NullOr(ze.String),responseSetId:ze.String,input:zce,output:zce}),z$t=ze.Struct({source:zp,namespace:ze.String,pipelineKind:I7e,toolCount:ze.Number,tools:ze.Array(F7e)}),J$t=ze.Struct({summary:w7e,contract:R7e,sections:ze.Array(N7e)}),V$t=ze.Struct({query:ze.String,limit:ze.optional(ze.Number)}),L7e=ze.Struct({path:ze.String,score:ze.Number,description:ze.optional(ze.String),inputTypePreview:ze.optional(ze.String),outputTypePreview:ze.optional(ze.String),reasons:ze.Array(ze.String)}),K$t=ze.Struct({query:ze.String,queryTokens:ze.Array(ze.String),bestPath:ze.NullOr(ze.String),total:ze.Number,results:ze.Array(L7e)});import{Schema as Jce}from"effect";var W$t=Jce.Struct({id:Jce.String,appliedAt:It});import*as Hce from"effect/Either";import*as Ol from"effect/Effect";import*as Vp from"effect/Schema";import*as Vce from"effect/Data";var YB=class extends Vce.TaggedError("RuntimeEffectError"){},Ne=(e,t)=>new YB({module:e,message:t});var Kce={placements:[],headers:{},queryParams:{},cookies:{},bodyValues:{},expiresAt:null,refreshAfter:null,authProvider:void 0},$7e=Vp.encodeSync($B),M7e=Vp.encodeSync(MB),bMt=Vp.encodeSync(jB),j7e=Vp.encodeSync(BB),B7e=Vp.encodeSync(qB),q7e=Vp.encodeSync(qT),U7e=Vp.decodeUnknownEither(H6),z7e=Vp.encodeSync(UB),J7e=(e,t)=>{switch(t.location){case"header":e.headers[t.name]=t.value;break;case"query":e.queryParams[t.name]=t.value;break;case"cookie":e.cookies[t.name]=t.value;break;case"body":e.bodyValues[t.path]=t.value;break}},Q6=(e,t={})=>{let r={headers:{},queryParams:{},cookies:{},bodyValues:{}};for(let n of e)J7e(r,n);return{placements:e,headers:r.headers,queryParams:r.queryParams,cookies:r.cookies,bodyValues:r.bodyValues,expiresAt:t.expiresAt??null,refreshAfter:t.refreshAfter??null}},Gce=e=>Ol.map(Ol.forEach(e.parts,t=>t.kind==="literal"?Ol.succeed(t.value):e.resolveSecretMaterial({ref:t.ref,context:e.context}),{discard:!1}),t=>t.join("")),zT=e=>{if(e.auth.kind==="none")return null;let t=e.existingAuthArtifactId??`auth_art_${crypto.randomUUID()}`,r=e.auth.kind==="oauth2_authorized_user"?V7e(e.auth.grantSet):null;return e.auth.kind==="bearer"?{id:t,scopeId:e.source.scopeId,sourceId:e.source.id,actorScopeId:e.actorScopeId??null,slot:e.slot,artifactKind:wm,configJson:$7e({headerName:e.auth.headerName,prefix:e.auth.prefix,token:e.auth.token}),grantSetJson:r,createdAt:e.source.createdAt,updatedAt:e.source.updatedAt}:e.auth.kind==="oauth2_authorized_user"?{id:t,scopeId:e.source.scopeId,sourceId:e.source.id,actorScopeId:e.actorScopeId??null,slot:e.slot,artifactKind:Cl,configJson:j7e({headerName:e.auth.headerName,prefix:e.auth.prefix,tokenEndpoint:e.auth.tokenEndpoint,clientId:e.auth.clientId,clientAuthentication:e.auth.clientAuthentication,clientSecret:e.auth.clientSecret,refreshToken:e.auth.refreshToken}),grantSetJson:r,createdAt:e.source.createdAt,updatedAt:e.source.updatedAt}:e.auth.kind==="provider_grant_ref"?{id:t,scopeId:e.source.scopeId,sourceId:e.source.id,actorScopeId:e.actorScopeId??null,slot:e.slot,artifactKind:RB,configJson:B7e({grantId:e.auth.grantId,providerKey:e.auth.providerKey,requiredScopes:[...e.auth.requiredScopes],headerName:e.auth.headerName,prefix:e.auth.prefix}),grantSetJson:r,createdAt:e.source.createdAt,updatedAt:e.source.updatedAt}:e.auth.kind==="mcp_oauth"?{id:t,scopeId:e.source.scopeId,sourceId:e.source.id,actorScopeId:e.actorScopeId??null,slot:e.slot,artifactKind:LB,configJson:q7e({redirectUri:e.auth.redirectUri,accessToken:e.auth.accessToken,refreshToken:e.auth.refreshToken,tokenType:e.auth.tokenType,expiresIn:e.auth.expiresIn,scope:e.auth.scope,resourceMetadataUrl:e.auth.resourceMetadataUrl,authorizationServerUrl:e.auth.authorizationServerUrl,resourceMetadataJson:e.auth.resourceMetadataJson,authorizationServerMetadataJson:e.auth.authorizationServerMetadataJson,clientInformationJson:e.auth.clientInformationJson}),grantSetJson:r,createdAt:e.source.createdAt,updatedAt:e.source.updatedAt}:{id:t,scopeId:e.source.scopeId,sourceId:e.source.id,actorScopeId:e.actorScopeId??null,slot:e.slot,artifactKind:km,configJson:M7e({headerName:e.auth.headerName,prefix:e.auth.prefix,accessToken:e.auth.accessToken,refreshToken:e.auth.refreshToken}),grantSetJson:r,createdAt:e.source.createdAt,updatedAt:e.source.updatedAt}},X6=e=>{if(e===null)return{kind:"none"};let t=Up(e);if(t!==null)return{kind:"provider_grant_ref",grantId:t.grantId,providerKey:t.providerKey,requiredScopes:[...t.requiredScopes],headerName:t.headerName,prefix:t.prefix};let r=Ev(e);if(r!==null)return{kind:"mcp_oauth",redirectUri:r.redirectUri,accessToken:r.accessToken,refreshToken:r.refreshToken,tokenType:r.tokenType,expiresIn:r.expiresIn,scope:r.scope,resourceMetadataUrl:r.resourceMetadataUrl,authorizationServerUrl:r.authorizationServerUrl,resourceMetadataJson:r.resourceMetadataJson,authorizationServerMetadataJson:r.authorizationServerMetadataJson,clientInformationJson:r.clientInformationJson};let n=Cm(e);if(n===null)return{kind:"none"};switch(n.artifactKind){case wm:return{kind:"bearer",headerName:n.config.headerName,prefix:n.config.prefix,token:n.config.token};case km:return{kind:"oauth2",headerName:n.config.headerName,prefix:n.config.prefix,accessToken:n.config.accessToken,refreshToken:n.config.refreshToken};case lg:return{kind:"none"};case Cl:return{kind:"oauth2_authorized_user",headerName:n.config.headerName,prefix:n.config.prefix,tokenEndpoint:n.config.tokenEndpoint,clientId:n.config.clientId,clientAuthentication:n.config.clientAuthentication,clientSecret:n.config.clientSecret,refreshToken:n.config.refreshToken,grantSet:xce(e.grantSetJson)}}};var JT=e=>Ece(e);var V7e=e=>e===null?null:z7e([...e]),Nm=e=>Ol.gen(function*(){if(e.artifact===null)return Kce;let t=Cm(e.artifact);if(t!==null)switch(t.artifactKind){case wm:{let a=yield*e.resolveSecretMaterial({ref:t.config.token,context:e.context});return Q6([{location:"header",name:t.config.headerName,value:`${t.config.prefix}${a}`}])}case km:{let a=yield*e.resolveSecretMaterial({ref:t.config.accessToken,context:e.context});return Q6([{location:"header",name:t.config.headerName,value:`${t.config.prefix}${a}`}])}case lg:{let a=yield*Ol.forEach(t.config.placements,s=>Ol.map(Gce({parts:s.parts,resolveSecretMaterial:e.resolveSecretMaterial,context:e.context}),c=>s.location==="body"?{location:"body",path:s.path,value:c}:{location:s.location,name:s.name,value:c}),{discard:!1});return Q6(a)}case Cl:break}if(Up(e.artifact)!==null&&(e.lease===null||e.lease===void 0))return yield*Ne("auth/auth-artifacts",`Provider grant auth artifact ${e.artifact.id} requires a lease`);if(Ev(e.artifact)!==null)return{...Kce};if(e.lease===null||e.lease===void 0)return yield*Ne("auth/auth-artifacts",`Unsupported auth artifact kind: ${e.artifact.artifactKind}`);let o=U7e(e.lease.placementsTemplateJson);if(Hce.isLeft(o))return yield*Ne("auth/auth-artifacts",`Invalid auth lease placements for artifact ${e.artifact.id}`);let i=yield*Ol.forEach(o.right,a=>Ol.map(Gce({parts:a.parts,resolveSecretMaterial:e.resolveSecretMaterial,context:e.context}),s=>a.location==="body"?{location:"body",path:a.path,value:s}:{location:a.location,name:a.name,value:s}),{discard:!1});return Q6(i,{expiresAt:e.lease.expiresAt,refreshAfter:e.lease.refreshAfter})});import*as is from"effect/Effect";import*as ug from"effect/Option";import{createHash as K7e,randomBytes as G7e}from"node:crypto";import*as VT from"effect/Effect";var Zce=e=>e.toString("base64").replaceAll("+","-").replaceAll("/","_").replaceAll("=",""),eq=()=>Zce(G7e(48)),H7e=e=>Zce(K7e("sha256").update(e).digest()),tq=e=>{let t=new URL(e.authorizationEndpoint);t.searchParams.set("client_id",e.clientId),t.searchParams.set("redirect_uri",e.redirectUri),t.searchParams.set("response_type","code"),t.searchParams.set("scope",e.scopes.join(" ")),t.searchParams.set("state",e.state),t.searchParams.set("code_challenge_method","S256"),t.searchParams.set("code_challenge",H7e(e.codeVerifier));for(let[r,n]of Object.entries(e.extraParams??{}))t.searchParams.set(r,n);return t.toString()},Z7e=async e=>{let t=await e.text(),r;try{r=JSON.parse(t)}catch{throw new Error(`OAuth token endpoint returned non-JSON response (${e.status})`)}if(r===null||typeof r!="object"||Array.isArray(r))throw new Error(`OAuth token endpoint returned invalid JSON payload (${e.status})`);let n=r,o=typeof n.access_token=="string"&&n.access_token.length>0?n.access_token:null;if(!e.ok){let i=typeof n.error_description=="string"&&n.error_description.length>0?n.error_description:typeof n.error=="string"&&n.error.length>0?n.error:`status ${e.status}`;throw new Error(`OAuth token exchange failed: ${i}`)}if(o===null)throw new Error("OAuth token endpoint did not return an access_token");return{access_token:o,token_type:typeof n.token_type=="string"?n.token_type:void 0,refresh_token:typeof n.refresh_token=="string"?n.refresh_token:void 0,expires_in:typeof n.expires_in=="number"?n.expires_in:typeof n.expires_in=="string"?Number(n.expires_in):void 0,scope:typeof n.scope=="string"?n.scope:void 0}},Wce=e=>VT.tryPromise({try:async()=>{let t=await fetch(e.tokenEndpoint,{method:"POST",headers:{"content-type":"application/x-www-form-urlencoded",accept:"application/json"},body:e.body,signal:AbortSignal.timeout(2e4)});return Z7e(t)},catch:t=>t instanceof Error?t:new Error(String(t))}),rq=e=>VT.gen(function*(){let t=new URLSearchParams({grant_type:"authorization_code",client_id:e.clientId,redirect_uri:e.redirectUri,code_verifier:e.codeVerifier,code:e.code});return e.clientAuthentication==="client_secret_post"&&e.clientSecret&&t.set("client_secret",e.clientSecret),yield*Wce({tokenEndpoint:e.tokenEndpoint,body:t})}),nq=e=>VT.gen(function*(){let t=new URLSearchParams({grant_type:"refresh_token",client_id:e.clientId,refresh_token:e.refreshToken});return e.clientAuthentication==="client_secret_post"&&e.clientSecret&&t.set("client_secret",e.clientSecret),e.scopes&&e.scopes.length>0&&t.set("scope",e.scopes.join(" ")),yield*Wce({tokenEndpoint:e.tokenEndpoint,body:t})});import*as Lc from"effect/Effect";import*as Xce from"effect/Schema";var W7e=Xce.encodeSync(qT),oq=e=>{if(e!==null)try{let t=JSON.parse(e);return t!==null&&typeof t=="object"&&!Array.isArray(t)?t:void 0}catch{return}},wv=e=>e==null?null:JSON.stringify(e),Q7e=e=>({redirect_uris:[e],grant_types:["authorization_code","refresh_token"],response_types:["code"],token_endpoint_auth_method:"none",client_name:"Executor Local"}),Qce=(e,t)=>(e?.providerId??null)===(t?.providerId??null)&&(e?.handle??null)===(t?.handle??null),X7e=e=>Lc.gen(function*(){Qce(e.previousAccessToken,e.nextAccessToken)||(yield*Lc.either(e.deleteSecretMaterial(e.previousAccessToken))),e.previousRefreshToken!==null&&!Qce(e.previousRefreshToken,e.nextRefreshToken)&&(yield*Lc.either(e.deleteSecretMaterial(e.previousRefreshToken)))}),Yce=e=>({kind:"mcp_oauth",redirectUri:e.redirectUri,accessToken:e.accessToken,refreshToken:e.refreshToken,tokenType:e.tokenType,expiresIn:e.expiresIn,scope:e.scope,resourceMetadataUrl:e.resourceMetadataUrl,authorizationServerUrl:e.authorizationServerUrl,resourceMetadataJson:wv(e.resourceMetadata),authorizationServerMetadataJson:wv(e.authorizationServerMetadata),clientInformationJson:wv(e.clientInformation)}),ele=e=>{let t=e.artifact,r=e.config,n=o=>Lc.gen(function*(){let i={...t,configJson:W7e(o),updatedAt:Date.now()};yield*e.executorState.authArtifacts.upsert(i),t=i,r=o});return{get redirectUrl(){return r.redirectUri},get clientMetadata(){return Q7e(r.redirectUri)},clientInformation:()=>oq(r.clientInformationJson),saveClientInformation:o=>Lc.runPromise(n({...r,clientInformationJson:wv(o)})).then(()=>{}),tokens:async()=>{let o=await Lc.runPromise(e.resolveSecretMaterial({ref:r.accessToken,context:e.context})),i=r.refreshToken?await Lc.runPromise(e.resolveSecretMaterial({ref:r.refreshToken,context:e.context})):void 0;return{access_token:o,token_type:r.tokenType,...typeof r.expiresIn=="number"?{expires_in:r.expiresIn}:{},...r.scope?{scope:r.scope}:{},...i?{refresh_token:i}:{}}},saveTokens:o=>Lc.runPromise(Lc.gen(function*(){let i=r,a=yield*e.storeSecretMaterial({purpose:"oauth_access_token",value:o.access_token,name:`${t.sourceId} MCP Access Token`}),s=o.refresh_token?yield*e.storeSecretMaterial({purpose:"oauth_refresh_token",value:o.refresh_token,name:`${t.sourceId} MCP Refresh Token`}):r.refreshToken,c={...r,accessToken:a,refreshToken:s,tokenType:o.token_type??r.tokenType,expiresIn:typeof o.expires_in=="number"&&Number.isFinite(o.expires_in)?o.expires_in:r.expiresIn,scope:o.scope??r.scope};yield*n(c),yield*X7e({deleteSecretMaterial:e.deleteSecretMaterial,previousAccessToken:i.accessToken,nextAccessToken:a,previousRefreshToken:i.refreshToken,nextRefreshToken:s})})).then(()=>{}),redirectToAuthorization:async o=>{throw new Error(`MCP OAuth re-authorization is required for ${t.sourceId}: ${o.toString()}`)},saveCodeVerifier:()=>{},codeVerifier:()=>{throw new Error("Persisted MCP OAuth sessions do not retain an active PKCE verifier")},saveDiscoveryState:o=>Lc.runPromise(n({...r,resourceMetadataUrl:o.resourceMetadataUrl??null,authorizationServerUrl:o.authorizationServerUrl??null,resourceMetadataJson:wv(o.resourceMetadata),authorizationServerMetadataJson:wv(o.authorizationServerMetadata)})).then(()=>{}),discoveryState:()=>r.authorizationServerUrl===null?void 0:{resourceMetadataUrl:r.resourceMetadataUrl??void 0,authorizationServerUrl:r.authorizationServerUrl,resourceMetadata:oq(r.resourceMetadataJson),authorizationServerMetadata:oq(r.authorizationServerMetadataJson)}}};var e3=6e4,iq=e=>JSON.stringify(e),Y6=e=>`${e.providerId}:${e.handle}`,t3=(e,t,r)=>is.gen(function*(){if(t.previous===null)return;let n=new Set((t.next===null?[]:ZB(t.next)).map(Y6)),o=ZB(t.previous).filter(i=>!n.has(Y6(i)));yield*is.forEach(o,i=>is.either(r(i)),{discard:!0})}),tle=(e,t)=>!(e===null||e.refreshAfter!==null&&t>=e.refreshAfter||e.expiresAt!==null&&t>=e.expiresAt-e3),Y7e=e=>is.gen(function*(){let t=Cm(e.artifact);if(t===null||t.artifactKind!==Cl)return yield*Ne("auth/auth-leases",`Unsupported auth artifact kind: ${e.artifact.artifactKind}`);let r=yield*e.resolveSecretMaterial({ref:t.config.refreshToken,context:e.context}),n=null;t.config.clientSecret&&(n=yield*e.resolveSecretMaterial({ref:t.config.clientSecret,context:e.context}));let o=yield*nq({tokenEndpoint:t.config.tokenEndpoint,clientId:t.config.clientId,clientAuthentication:t.config.clientAuthentication,clientSecret:n,refreshToken:r}),i=yield*e.storeSecretMaterial({purpose:"oauth_access_token",value:o.access_token,name:`${t.config.clientId} Access Token`}),a=Date.now(),s=typeof o.expires_in=="number"&&Number.isFinite(o.expires_in)?Math.max(0,o.expires_in*1e3):null,c=s===null?null:a+s,p=c===null?null:Math.max(a,c-e3),d={id:e.lease?.id??vv.make(`auth_lease_${crypto.randomUUID()}`),authArtifactId:e.artifact.id,scopeId:e.artifact.scopeId,sourceId:e.artifact.sourceId,actorScopeId:e.artifact.actorScopeId,slot:e.artifact.slot,placementsTemplateJson:iq([{location:"header",name:t.config.headerName,parts:[{kind:"literal",value:t.config.prefix},{kind:"secret_ref",ref:i}]}]),expiresAt:c,refreshAfter:p,createdAt:e.lease?.createdAt??a,updatedAt:a};return yield*e.executorState.authLeases.upsert(d),yield*t3(e.executorState,{previous:e.lease,next:d},e.deleteSecretMaterial),d}),eje=e=>e.clientSecretProviderId&&e.clientSecretHandle?{providerId:e.clientSecretProviderId,handle:e.clientSecretHandle}:null,tje=(e,t,r)=>Y6(t.previous)===Y6(t.next)?is.void:r(t.previous).pipe(is.either,is.ignore),rje=e=>is.gen(function*(){let t=Up(e.artifact);if(t===null)return yield*Ne("auth/auth-leases",`Unsupported auth artifact kind: ${e.artifact.artifactKind}`);let r=yield*e.executorState.providerAuthGrants.getById(t.grantId);if(ug.isNone(r))return yield*Ne("auth/auth-leases",`Provider auth grant not found: ${t.grantId}`);let n=r.value,o=yield*e.executorState.scopeOauthClients.getById(n.oauthClientId);if(ug.isNone(o))return yield*Ne("auth/auth-leases",`Scope OAuth client not found: ${n.oauthClientId}`);let i=o.value,a=yield*e.resolveSecretMaterial({ref:n.refreshToken,context:e.context}),s=eje(i),c=s?yield*e.resolveSecretMaterial({ref:s,context:e.context}):null,p=yield*nq({tokenEndpoint:n.tokenEndpoint,clientId:i.clientId,clientAuthentication:n.clientAuthentication,clientSecret:c,refreshToken:a,scopes:t.requiredScopes.length>0?t.requiredScopes:null}),d=yield*e.storeSecretMaterial({purpose:"oauth_access_token",value:p.access_token,name:`${n.providerKey} Access Token`}),f=p.refresh_token?yield*e.storeSecretMaterial({purpose:"oauth_refresh_token",value:p.refresh_token,name:`${n.providerKey} Refresh Token`}):n.refreshToken,m=Date.now(),y={...n,refreshToken:f,lastRefreshedAt:m,updatedAt:m};yield*e.executorState.providerAuthGrants.upsert(y),yield*tje(e.executorState,{previous:n.refreshToken,next:f},e.deleteSecretMaterial);let g=typeof p.expires_in=="number"&&Number.isFinite(p.expires_in)?Math.max(0,p.expires_in*1e3):null,S=g===null?null:m+g,b=S===null?null:Math.max(m,S-e3),E={id:e.lease?.id??vv.make(`auth_lease_${crypto.randomUUID()}`),authArtifactId:e.artifact.id,scopeId:e.artifact.scopeId,sourceId:e.artifact.sourceId,actorScopeId:e.artifact.actorScopeId,slot:e.artifact.slot,placementsTemplateJson:iq([{location:"header",name:t.headerName,parts:[{kind:"literal",value:t.prefix},{kind:"secret_ref",ref:d}]}]),expiresAt:S,refreshAfter:b,createdAt:e.lease?.createdAt??m,updatedAt:m};return yield*e.executorState.authLeases.upsert(E),yield*t3(e.executorState,{previous:e.lease,next:E},e.deleteSecretMaterial),E}),k_=(e,t,r)=>is.gen(function*(){let n=yield*e.authLeases.getByAuthArtifactId(t.authArtifactId);ug.isNone(n)||(yield*e.authLeases.removeByAuthArtifactId(t.authArtifactId),yield*t3(e,{previous:n.value,next:null},r))}),rle=e=>is.gen(function*(){let t=Cm(e.artifact);if(t===null||t.artifactKind!==Cl)return yield*Ne("auth/auth-leases",`Unsupported auth artifact kind: ${e.artifact.artifactKind}`);let r=yield*e.executorState.authLeases.getByAuthArtifactId(e.artifact.id),n=ug.isSome(r)?r.value:null,o=yield*e.storeSecretMaterial({purpose:"oauth_access_token",value:e.tokenResponse.access_token,name:`${t.config.clientId} Access Token`}),i=Date.now(),a=typeof e.tokenResponse.expires_in=="number"&&Number.isFinite(e.tokenResponse.expires_in)?Math.max(0,e.tokenResponse.expires_in*1e3):null,s=a===null?null:i+a,c=s===null?null:Math.max(i,s-e3),p={id:n?.id??vv.make(`auth_lease_${crypto.randomUUID()}`),authArtifactId:e.artifact.id,scopeId:e.artifact.scopeId,sourceId:e.artifact.sourceId,actorScopeId:e.artifact.actorScopeId,slot:e.artifact.slot,placementsTemplateJson:iq([{location:"header",name:t.config.headerName,parts:[{kind:"literal",value:t.config.prefix},{kind:"secret_ref",ref:o}]}]),expiresAt:s,refreshAfter:c,createdAt:n?.createdAt??i,updatedAt:i};yield*e.executorState.authLeases.upsert(p),yield*t3(e.executorState,{previous:n,next:p},e.deleteSecretMaterial)}),aq=e=>is.gen(function*(){if(e.artifact===null)return yield*Nm({artifact:null,resolveSecretMaterial:e.resolveSecretMaterial,context:e.context});let t=yield*e.executorState.authLeases.getByAuthArtifactId(e.artifact.id),r=ug.isSome(t)?t.value:null,n=Cm(e.artifact),o=Up(e.artifact),i=Ev(e.artifact);if(n!==null&&n.artifactKind===Cl){let a=tle(r,Date.now())?r:yield*Y7e({executorState:e.executorState,artifact:e.artifact,lease:r,resolveSecretMaterial:e.resolveSecretMaterial,storeSecretMaterial:e.storeSecretMaterial,deleteSecretMaterial:e.deleteSecretMaterial,context:e.context});return yield*Nm({artifact:e.artifact,lease:a,resolveSecretMaterial:e.resolveSecretMaterial,context:e.context})}if(o!==null){let a=tle(r,Date.now())?r:yield*rje({executorState:e.executorState,artifact:e.artifact,lease:r,resolveSecretMaterial:e.resolveSecretMaterial,storeSecretMaterial:e.storeSecretMaterial,deleteSecretMaterial:e.deleteSecretMaterial,context:e.context});return yield*Nm({artifact:e.artifact,lease:a,resolveSecretMaterial:e.resolveSecretMaterial,context:e.context})}return i!==null?{...yield*Nm({artifact:e.artifact,resolveSecretMaterial:e.resolveSecretMaterial,context:e.context}),authProvider:ele({executorState:e.executorState,artifact:e.artifact,config:i,resolveSecretMaterial:e.resolveSecretMaterial,storeSecretMaterial:e.storeSecretMaterial,deleteSecretMaterial:e.deleteSecretMaterial,context:e.context})}:yield*Nm({artifact:e.artifact,lease:r,resolveSecretMaterial:e.resolveSecretMaterial,context:e.context})});import*as kv from"effect/Context";var Nl=class extends kv.Tag("#runtime/SecretMaterialResolverService")(){},Ys=class extends kv.Tag("#runtime/SecretMaterialStorerService")(){},as=class extends kv.Tag("#runtime/SecretMaterialDeleterService")(){},Kp=class extends kv.Tag("#runtime/SecretMaterialUpdaterService")(){},Gp=class extends kv.Tag("#runtime/LocalInstanceConfigService")(){};var nje=e=>e.slot==="runtime"||e.source.importAuthPolicy==="reuse_runtime"?e.source.auth:e.source.importAuthPolicy==="none"?{kind:"none"}:e.source.importAuth,Fm=class extends nle.Tag("#runtime/RuntimeSourceAuthMaterialService")(){},oje=e=>C_.gen(function*(){let t=e.slot??"runtime";if(e.executorState!==void 0){let n=t==="import"&&e.source.importAuthPolicy==="reuse_runtime"?["import","runtime"]:[t];for(let o of n){let i=yield*e.executorState.authArtifacts.getByScopeSourceAndActor({scopeId:e.source.scopeId,sourceId:e.source.id,actorScopeId:e.actorScopeId??null,slot:o});if(ile.isSome(i))return yield*aq({executorState:e.executorState,artifact:i.value,resolveSecretMaterial:e.resolveSecretMaterial,storeSecretMaterial:e.storeSecretMaterial??(()=>C_.dieMessage("storeSecretMaterial unavailable")),deleteSecretMaterial:e.deleteSecretMaterial??(()=>C_.dieMessage("deleteSecretMaterial unavailable")),context:e.context})}}let r=zT({source:e.source,auth:nje({source:e.source,slot:t}),slot:t,actorScopeId:e.actorScopeId??null});return e.executorState!==void 0?yield*aq({executorState:e.executorState,artifact:r,resolveSecretMaterial:e.resolveSecretMaterial,storeSecretMaterial:e.storeSecretMaterial??(()=>C_.dieMessage("storeSecretMaterial unavailable")),deleteSecretMaterial:e.deleteSecretMaterial??(()=>C_.dieMessage("deleteSecretMaterial unavailable")),context:e.context}):r?.artifactKind==="oauth2_authorized_user"||r?.artifactKind==="provider_grant_ref"||r?.artifactKind==="mcp_oauth"?yield*Ne("auth/source-auth-material","Dynamic auth artifacts require persistence-backed lease resolution"):yield*Nm({artifact:r,resolveSecretMaterial:e.resolveSecretMaterial,context:e.context})});var ale=ole.effect(Fm,C_.gen(function*(){let e=yield*Wn,t=yield*Nl,r=yield*Ys,n=yield*as;return Fm.of({resolve:o=>oje({...o,executorState:e,resolveSecretMaterial:t,storeSecretMaterial:r,deleteSecretMaterial:n})})}));import*as vQ from"effect/Cache";import*as eDe from"effect/Context";import*as qr from"effect/Effect";import*as tDe from"effect/Layer";import*as xn from"effect/Match";import*as Pv from"effect/Data";var r3=class extends Pv.TaggedError("RuntimeLocalScopeUnavailableError"){},Cv=class extends Pv.TaggedError("RuntimeLocalScopeMismatchError"){},KT=class extends Pv.TaggedError("LocalConfiguredSourceNotFoundError"){},n3=class extends Pv.TaggedError("LocalSourceArtifactMissingError"){},o3=class extends Pv.TaggedError("LocalUnsupportedSourceKindError"){};import{createHash as ije}from"node:crypto";var aje=/^[A-Za-z_$][A-Za-z0-9_$]*$/,sje=e=>ije("sha256").update(e).digest("hex").slice(0,24),pq=e=>aje.test(e)?e:JSON.stringify(e),lle=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/([A-Z]+)([A-Z][a-z])/g,"$1 $2").split(/[^A-Za-z0-9]+/).filter(t=>t.length>0),cje=e=>/^\d+$/.test(e)?e:`${e.slice(0,1).toUpperCase()}${e.slice(1).toLowerCase()}`,pg=e=>{let t=lle(e).map(r=>cje(r)).join("");return t.length===0?"Type":/^[A-Za-z_$]/.test(t)?t:`T${t}`},di=(...e)=>e.map(t=>pg(t)).filter(t=>t.length>0).join(""),ule=e=>{switch(e){case"string":case"boolean":return e;case"bytes":return"string";case"integer":case"number":return"number";case"null":return"null";case"object":return"Record";case"array":return"Array";default:throw new Error(`Unsupported JSON Schema primitive type: ${e}`)}},Nv=e=>{let t=JSON.stringify(e);if(t===void 0)throw new Error(`Unsupported literal value in declaration schema: ${String(e)}`);return t},Rm=e=>e.includes(" | ")||e.includes(" & ")?`(${e})`:e,lje=(e,t)=>e.length===0?"{}":["{",...e.flatMap(r=>r.split(` +`).map(n=>`${t}${n}`)),`${t.slice(0,-2)}}`].join(` +`),ks=(e,t)=>{let r=e.symbols[t];if(!r||r.kind!=="shape")throw new Error(`Missing shape symbol for ${t}`);return r},sq=e=>e.type==="unknown"||e.type==="scalar"||e.type==="const"||e.type==="enum",uje=e=>/^shape_[a-f0-9_]+$/i.test(e),pje=e=>/\s/.test(e.trim()),dje=e=>{let t=e.title?.trim();return t&&!uje(t)?pg(t):void 0},_je=e=>e.replace(/~1/g,"/").replace(/~0/g,"~"),sle=e=>{let t=e.trim();if(!(t.length===0||/^\d+$/.test(t)||["$defs","definitions","components","schemas","schema","properties","items","additionalProperties","patternProperties","allOf","anyOf","oneOf","not","if","then","else","input","output","graphql","scalars","responses","headers","parameters","requestBody"].includes(t)))return pg(t)},fje=e=>{for(let t of e){let r=t.pointer;if(!r?.startsWith("#/"))continue;let n=r.slice(2).split("/").map(_je),o=n.flatMap((i,a)=>["$defs","definitions","schemas","input","output"].includes(i)?[a]:[]);for(let i of o){let a=sle(n[i+1]??"");if(a)return a}for(let i=n.length-1;i>=0;i-=1){let a=sle(n[i]??"");if(a)return a}}},i3=e=>{let t=e?.trim();return t&&t.length>0?t:null},ple=e=>e.replace(/\*\//g,"*\\/"),cq=(e,t)=>{if(t){e.length>0&&e.push("");for(let r of t.split(/\r?\n/))e.push(ple(r.trimEnd()))}},GT=e=>{let t=[],r=e.includeTitle&&e.title&&pje(e.title)?i3(e.title):null,n=i3(e.docs?.summary),o=i3(e.docs?.description),i=i3(e.docs?.externalDocsUrl);return cq(t,r&&r!==n?r:null),cq(t,n),cq(t,o&&o!==n?o:null),i&&(t.length>0&&t.push(""),t.push(`@see ${ple(i)}`)),e.deprecated&&(t.length>0&&t.push(""),t.push("@deprecated")),t.length===0?null:["/**",...t.map(a=>a.length>0?` * ${a}`:" *")," */"].join(` +`)},mje=e=>{let t=lle(e);if(t.length<=5)return di(...t);let r=t.filter((n,o)=>o>=t.length-2||!["item","member","value"].includes(n.toLowerCase()));return di(...r.slice(-5))},cle=e=>{switch(e.type){case"unknown":case"scalar":case"const":case"enum":return[];case"object":return[...Object.values(e.fields).map(t=>t.shapeId),...typeof e.additionalProperties=="string"?[e.additionalProperties]:[],...Object.values(e.patternProperties??{})];case"array":return[e.itemShapeId];case"tuple":return[...e.itemShapeIds,...typeof e.additionalItems=="string"?[e.additionalItems]:[]];case"map":return[e.valueShapeId];case"allOf":case"anyOf":case"oneOf":return[...e.items];case"nullable":return[e.itemShapeId];case"ref":return[e.target];case"not":return[e.itemShapeId];case"conditional":return[e.ifShapeId,...e.thenShapeId?[e.thenShapeId]:[],...e.elseShapeId?[e.elseShapeId]:[]];case"graphqlInterface":return[...Object.values(e.fields).map(t=>t.shapeId),...e.possibleTypeIds];case"graphqlUnion":return[...e.memberTypeIds]}},lq=e=>{switch(e.type){case"unknown":return"unknown";case"scalar":return ule(e.scalar);case"const":return Nv(e.value);case"enum":return e.values.map(t=>Nv(t)).join(" | ");default:throw new Error(`Cannot inline non-primitive shape node: ${e.type}`)}},hje=(e,t,r,n,o)=>{let i=new Set;t&&i.add("unknown");for(let a of e)i.add(o(a,{stack:n,aliasHint:r}));return[...i].sort((a,s)=>a.localeCompare(s)).join(" | ")},uq=(e,t,r,n,o)=>{let i=new Set(e.required),a=Object.keys(e.fields).sort((d,f)=>d.localeCompare(f)).map(d=>{let f=e.fields[d],m=`${pq(d)}${i.has(d)?"":"?"}: ${n(f.shapeId,{stack:t,aliasHint:r?di(r,d):d})};`,y=o?GT({docs:f.docs,deprecated:f.deprecated}):null;return y?`${y} +${m}`:m}),s=Object.values(e.patternProperties??{}),c=e.additionalProperties===!0,p=typeof e.additionalProperties=="string"?[e.additionalProperties]:[];return(c||s.length>0||p.length>0)&&a.push(`[key: string]: ${hje([...s,...p],c,r?di(r,"value"):"value",t,n)};`),lje(a," ")},yje=(e,t,r,n,o)=>uq({fields:e.fields,required:e.type==="object"?e.required??[]:[],additionalProperties:e.type==="object"?e.additionalProperties:!1,patternProperties:e.type==="object"?e.patternProperties??{}:{}},t,r,n,o),Ov=(e,t,r,n,o,i)=>{let s=ks(e,t).node;switch(s.type){case"unknown":case"scalar":case"const":case"enum":return lq(s);case"object":case"graphqlInterface":return yje(s,r,n,o,i);case"array":return`Array<${Rm(o(s.itemShapeId,{stack:r,aliasHint:n?di(n,"item"):"item"}))}>`;case"tuple":{let c=s.itemShapeIds.map((d,f)=>o(d,{stack:r,aliasHint:n?di(n,`item_${String(f+1)}`):`item_${String(f+1)}`})),p=s.additionalItems===!0?", ...unknown[]":typeof s.additionalItems=="string"?`, ...Array<${Rm(o(s.additionalItems,{stack:r,aliasHint:n?di(n,"rest"):"rest"}))}>`:"";return`[${c.join(", ")}${p}]`}case"map":return`Record`;case"allOf":return s.items.map((c,p)=>Rm(o(c,{stack:r,aliasHint:n?di(n,`member_${String(p+1)}`):`member_${String(p+1)}`}))).join(" & ");case"anyOf":case"oneOf":return s.items.map((c,p)=>Rm(o(c,{stack:r,aliasHint:n?di(n,`member_${String(p+1)}`):`member_${String(p+1)}`}))).join(" | ");case"nullable":return`${Rm(o(s.itemShapeId,{stack:r,aliasHint:n}))} | null`;case"ref":return o(s.target,{stack:r,aliasHint:n});case"not":case"conditional":return"unknown";case"graphqlUnion":return s.memberTypeIds.map((c,p)=>Rm(o(c,{stack:r,aliasHint:n?di(n,`member_${String(p+1)}`):`member_${String(p+1)}`}))).join(" | ")}},HT=e=>{let{catalog:t,roots:r}=e,n=new Map,o=new Set(r.map(le=>le.shapeId)),i=new Set,a=new Set,s=new Set,c=new Map,p=new Map,d=new Map,f=new Map,m=new Map,y=new Set,g=new Set,S=(le,K=[])=>{let ae=n.get(le);if(ae)return ae;if(K.includes(le))return{key:`cycle:${le}`,recursive:!0};let he=ks(t,le),Oe=[...K,le],pt=(wt,fo)=>{let nn=wt.map(Gn=>S(Gn,Oe));return fo?nn.sort((Gn,bt)=>Gn.key.localeCompare(bt.key)):nn},Ye=!1,lt=wt=>{let fo=S(wt,Oe);return Ye=Ye||fo.recursive,fo.key},Nt=(wt,fo)=>{let nn=pt(wt,fo);return Ye=Ye||nn.some(Gn=>Gn.recursive),nn.map(Gn=>Gn.key)},Ct=(()=>{switch(he.node.type){case"unknown":return"unknown";case"scalar":return`scalar:${ule(he.node.scalar)}`;case"const":return`const:${Nv(he.node.value)}`;case"enum":return`enum:${he.node.values.map(wt=>Nv(wt)).sort().join("|")}`;case"object":{let wt=he.node.required??[],fo=Object.entries(he.node.fields).sort(([bt],[Hn])=>bt.localeCompare(Hn)).map(([bt,Hn])=>`${bt}${wt.includes(bt)?"!":"?"}:${lt(Hn.shapeId)}`).join(","),nn=he.node.additionalProperties===!0?"unknown":typeof he.node.additionalProperties=="string"?lt(he.node.additionalProperties):"none",Gn=Object.entries(he.node.patternProperties??{}).map(([,bt])=>S(bt,Oe)).sort((bt,Hn)=>bt.key.localeCompare(Hn.key)).map(bt=>(Ye=Ye||bt.recursive,bt.key)).join("|");return`object:${fo}:index=${nn}:patterns=${Gn}`}case"array":return`array:${lt(he.node.itemShapeId)}`;case"tuple":return`tuple:${Nt(he.node.itemShapeIds,!1).join(",")}:rest=${he.node.additionalItems===!0?"unknown":typeof he.node.additionalItems=="string"?lt(he.node.additionalItems):"none"}`;case"map":return`map:${lt(he.node.valueShapeId)}`;case"allOf":return`allOf:${Nt(he.node.items,!0).join("&")}`;case"anyOf":return`anyOf:${Nt(he.node.items,!0).join("|")}`;case"oneOf":return`oneOf:${Nt(he.node.items,!0).join("|")}`;case"nullable":return`nullable:${lt(he.node.itemShapeId)}`;case"ref":return lt(he.node.target);case"not":case"conditional":return"unknown";case"graphqlInterface":{let wt=Object.entries(he.node.fields).sort(([nn],[Gn])=>nn.localeCompare(Gn)).map(([nn,Gn])=>`${nn}:${lt(Gn.shapeId)}`).join(","),fo=Nt(he.node.possibleTypeIds,!0).join("|");return`graphqlInterface:${wt}:possible=${fo}`}case"graphqlUnion":return`graphqlUnion:${Nt(he.node.memberTypeIds,!0).join("|")}`}})(),Zr={key:`sig:${sje(Ct)}`,recursive:Ye};return n.set(le,Zr),Zr},b=(le,K=[])=>S(le,K).key,E=le=>{if(!i.has(le)){i.add(le);for(let K of cle(ks(t,le).node))E(K)}};for(let le of r)E(le.shapeId);for(let le of i){let K=ks(t,le);if(K.synthetic)continue;let ae=dje(K);ae&&(f.set(le,ae),m.set(ae,(m.get(ae)??0)+1))}let I=le=>{let K=f.get(le);return K&&m.get(K)===1?K:void 0},T=[],k=new Set,F=le=>{let K=T.indexOf(le);if(K===-1){a.add(le);return}for(let ae of T.slice(K))a.add(ae);a.add(le)},O=le=>{if(!k.has(le)){if(T.includes(le)){F(le);return}T.push(le);for(let K of cle(ks(t,le).node)){if(T.includes(K)){F(K);continue}O(K)}T.pop(),k.add(le)}};for(let le of r){O(le.shapeId);let K=p.get(le.shapeId);(!K||le.aliasHint.length{if(K.includes(le))return null;let ae=ks(t,le);switch(ae.node.type){case"ref":return $(ae.node.target,[...K,le]);case"object":return{shapeId:le,node:ae.node};default:return null}},N=(le,K=[])=>{if(K.includes(le))return null;let ae=ks(t,le);switch(ae.node.type){case"ref":return N(ae.node.target,[...K,le]);case"const":return[Nv(ae.node.value)];case"enum":return ae.node.values.map(he=>Nv(he));default:return null}},U=le=>{let[K,...ae]=le;return K?ae.every(he=>{let Oe=K.node.additionalProperties,pt=he.node.additionalProperties;return Oe===pt?!0:typeof Oe=="string"&&typeof pt=="string"&&b(Oe)===b(pt)}):!1},ge=le=>{let[K,...ae]=le;if(!K)return!1;let he=K.node.patternProperties??{},Oe=Object.keys(he).sort();return ae.every(pt=>{let Ye=pt.node.patternProperties??{},lt=Object.keys(Ye).sort();return lt.length!==Oe.length||lt.some((Nt,Ct)=>Nt!==Oe[Ct])?!1:lt.every(Nt=>b(he[Nt])===b(Ye[Nt]))})},Te=le=>{let[K]=le;if(!K)return null;let ae=["type","kind","action","status","event"];return Object.keys(K.node.fields).filter(Ye=>le.every(lt=>(lt.node.required??[]).includes(Ye))).flatMap(Ye=>{let lt=le.map(Ct=>{let Zr=Ct.node.fields[Ye];return Zr?N(Zr.shapeId):null});if(lt.some(Ct=>Ct===null||Ct.length===0))return[];let Nt=new Set;for(let Ct of lt)for(let Zr of Ct){if(Nt.has(Zr))return[];Nt.add(Zr)}return[{key:Ye,serializedValuesByVariant:lt}]}).sort((Ye,lt)=>{let Nt=ae.indexOf(Ye.key),Ct=ae.indexOf(lt.key),Zr=Nt===-1?Number.MAX_SAFE_INTEGER:Nt,wt=Ct===-1?Number.MAX_SAFE_INTEGER:Ct;return Zr-wt||Ye.key.localeCompare(lt.key)})[0]??null},ke=(le,K)=>{let ae=le?.serializedValuesByVariant[K]?.[0];return ae?ae.startsWith('"')&&ae.endsWith('"')?pg(ae.slice(1,-1)):pg(ae):`Variant${String(K+1)}`},Je=(le,K,ae,he,Oe)=>{let pt=le.map(bt=>$(bt));if(pt.some(bt=>bt===null))return null;let Ye=pt;if(Ye.length===0||!U(Ye)||!ge(Ye))return null;let lt=Te(Ye),[Nt]=Ye;if(!Nt)return null;let Ct=Object.keys(Nt.node.fields).filter(bt=>bt!==lt?.key).filter(bt=>{let Hn=Nt.node.fields[bt];if(!Hn)return!1;let Di=(Nt.node.required??[]).includes(bt);return Ye.every(Ga=>{let ji=Ga.node.fields[bt];return ji?(Ga.node.required??[]).includes(bt)===Di&&b(ji.shapeId)===b(Hn.shapeId):!1})}),Zr={fields:Object.fromEntries(Ct.map(bt=>[bt,Nt.node.fields[bt]])),required:Ct.filter(bt=>(Nt.node.required??[]).includes(bt)),additionalProperties:Nt.node.additionalProperties,patternProperties:Nt.node.patternProperties??{}},wt=Ct.length>0||Zr.additionalProperties===!0||typeof Zr.additionalProperties=="string"||Object.keys(Zr.patternProperties).length>0;if(!wt&<===null)return null;let fo=wt?uq(Zr,K,ae,he,Oe):null,Gn=Ye.map((bt,Hn)=>{let Di=Object.keys(bt.node.fields).filter(ji=>!Ct.includes(ji)),Ga={fields:Object.fromEntries(Di.map(ji=>[ji,bt.node.fields[ji]])),required:Di.filter(ji=>(bt.node.required??[]).includes(ji)),additionalProperties:!1,patternProperties:{}};return uq(Ga,K,ae?di(ae,ke(lt,Hn)):ke(lt,Hn),he,Oe)}).map(bt=>Rm(bt)).join(" | ");return fo?`${Rm(fo)} & (${Gn})`:Gn},me=(le,K)=>{let ae=c.get(le);if(ae)return ae;let he=ks(t,le),Oe=p.get(le),pt=K?mje(K):void 0,Ye=I(le),lt=[Oe,Ye,fje(he.provenance),f.get(le),pt,pg(he.id)].filter(wt=>wt!==void 0),[Nt=pg(he.id)]=lt,Ct=lt.find(wt=>!y.has(wt))??Nt,Zr=2;for(;y.has(Ct);)Ct=`${Nt}_${String(Zr)}`,Zr+=1;return c.set(le,Ct),y.add(Ct),Ct},xe=le=>{let K=ks(t,le);return sq(K.node)?!1:o.has(le)?!0:K.node.type==="ref"?!1:I(le)!==void 0||s.has(le)},Rt=(le,K,ae)=>{let he=ks(t,le);switch(he.node.type){case"anyOf":case"oneOf":return Je(he.node.items,K,ae,Yt,!0)??Ov(t,le,K,ae,Yt,!0);case"graphqlUnion":return Je(he.node.memberTypeIds,K,ae,Yt,!0)??Ov(t,le,K,ae,Yt,!0);default:return Ov(t,le,K,ae,Yt,!0)}},Jt=le=>{let K=d.get(le);if(K)return K;let ae=Rt(le,[le],me(le));return d.set(le,ae),ae},Yt=(le,K={})=>{let ae=ks(t,le);if(sq(ae.node))return lq(ae.node);let he=K.stack??[];return ae.node.type==="ref"&&!o.has(le)?he.includes(le)?Yt(ae.node.target,{stack:he,aliasHint:K.aliasHint}):Rt(le,[...he,le],K.aliasHint):he.includes(le)||xe(le)?(g.add(le),me(le,K.aliasHint)):Rt(le,[...he,le],K.aliasHint)},vt=(le,K={})=>{let ae=ks(t,le);if(sq(ae.node))return lq(ae.node);let he=K.stack??[];if(he.includes(le))return"unknown";switch(ae.node.type){case"anyOf":case"oneOf":return Je(ae.node.items,[...he,le],K.aliasHint,vt,!1)??Ov(t,le,[...he,le],K.aliasHint,vt,!1);case"graphqlUnion":return Je(ae.node.memberTypeIds,[...he,le],K.aliasHint,vt,!1)??Ov(t,le,[...he,le],K.aliasHint,vt,!1)}return Ov(t,le,[...he,le],K.aliasHint,vt,!1)};return{renderSelfContainedShape:vt,renderDeclarationShape:Yt,supportingDeclarations:()=>{let le=[...g],K=new Set,ae=0;for(;aeme(Oe).localeCompare(me(pt))).map(Oe=>{let pt=me(Oe),Ye=ks(t,Oe),lt=GT({title:Ye.title,docs:Ye.docs,deprecated:Ye.deprecated,includeTitle:!0}),Nt=Jt(Oe),Ct=`type ${pt} = ${Nt};`;return lt?`${lt} +${Ct}`:Ct})}}},a3=e=>Object.values(e.toolDescriptors).sort((t,r)=>t.toolPath.join(".").localeCompare(r.toolPath.join("."))).flatMap(t=>[{shapeId:t.callShapeId,aliasHint:di(...t.toolPath,"call")},...t.resultShapeId?[{shapeId:t.resultShapeId,aliasHint:di(...t.toolPath,"result")}]:[]]),ZT=(e,t)=>{let r=ks(e,t);switch(r.node.type){case"ref":return ZT(e,r.node.target);case"object":return(r.node.required??[]).length===0;default:return!1}};var gje=Object.create,Eq=Object.defineProperty,Sje=Object.getOwnPropertyDescriptor,vje=Object.getOwnPropertyNames,bje=Object.getPrototypeOf,xje=Object.prototype.hasOwnProperty,Eje=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Tq=(e,t)=>{for(var r in t)Eq(e,r,{get:t[r],enumerable:!0})},Tje=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of vje(t))!xje.call(e,o)&&o!==r&&Eq(e,o,{get:()=>t[o],enumerable:!(n=Sje(t,o))||n.enumerable});return e},Dje=(e,t,r)=>(r=e!=null?gje(bje(e)):{},Tje(t||!e||!e.__esModule?Eq(r,"default",{value:e,enumerable:!0}):r,e)),Aje=Eje((e,t)=>{var r,n,o,i,a,s,c,p,d,f,m,y,g,S,b,E,I,T,k,F;g=/\/(?![*\/])(?:\[(?:[^\]\\\n\r\u2028\u2029]+|\\.)*\]|[^\/\\\n\r\u2028\u2029]+|\\.)*(\/[$_\u200C\u200D\p{ID_Continue}]*|\\)?/yu,y=/--|\+\+|=>|\.{3}|\??\.(?!\d)|(?:&&|\|\||\?\?|[+\-%&|^]|\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2}|\/(?![\/*]))=?|[?~,:;[\](){}]/y,r=/(\x23?)(?=[$_\p{ID_Start}\\])(?:[$_\u200C\u200D\p{ID_Continue}]+|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]+\})+/yu,b=/(['"])(?:[^'"\\\n\r]+|(?!\1)['"]|\\(?:\r\n|[^]))*(\1)?/y,m=/(?:0[xX][\da-fA-F](?:_?[\da-fA-F])*|0[oO][0-7](?:_?[0-7])*|0[bB][01](?:_?[01])*)n?|0n|[1-9](?:_?\d)*n|(?:(?:0(?!\d)|0\d*[89]\d*|[1-9](?:_?\d)*)(?:\.(?:\d(?:_?\d)*)?)?|\.\d(?:_?\d)*)(?:[eE][+-]?\d(?:_?\d)*)?|0[0-7]+/y,E=/[`}](?:[^`\\$]+|\\[^]|\$(?!\{))*(`|\$\{)?/y,k=/[\t\v\f\ufeff\p{Zs}]+/yu,p=/\r?\n|[\r\u2028\u2029]/y,d=/\/\*(?:[^*]+|\*(?!\/))*(\*\/)?/y,S=/\/\/.*/y,o=/[<>.:={}]|\/(?![\/*])/y,n=/[$_\p{ID_Start}][$_\u200C\u200D\p{ID_Continue}-]*/yu,i=/(['"])(?:[^'"]+|(?!\1)['"])*(\1)?/y,a=/[^<>{}]+/y,T=/^(?:[\/+-]|\.{3}|\?(?:InterpolationIn(?:JSX|Template)|NoLineTerminatorHere|NonExpressionParenEnd|UnaryIncDec))?$|[{}([,;<>=*%&|^!~?:]$/,I=/^(?:=>|[;\]){}]|else|\?(?:NoLineTerminatorHere|NonExpressionParenEnd))?$/,s=/^(?:await|case|default|delete|do|else|instanceof|new|return|throw|typeof|void|yield)$/,c=/^(?:return|throw|yield)$/,f=RegExp(p.source),t.exports=F=function*(O,{jsx:$=!1}={}){var N,U,ge,Te,ke,Je,me,xe,Rt,Jt,Yt,vt,Fr,le;for({length:Je}=O,Te=0,ke="",le=[{tag:"JS"}],N=[],Yt=0,vt=!1;Te":le.pop(),ke==="/"||xe.tag==="JSXTagEnd"?(Jt="?JSX",vt=!0):le.push({tag:"JSXChildren"});break;case"{":le.push({tag:"InterpolationInJSX",nesting:N.length}),Jt="?InterpolationInJSX",vt=!1;break;case"/":ke==="<"&&(le.pop(),le[le.length-1].tag==="JSXChildren"&&le.pop(),le.push({tag:"JSXTagEnd"}))}ke=Jt,yield{type:"JSXPunctuator",value:me[0]};continue}if(n.lastIndex=Te,me=n.exec(O)){Te=n.lastIndex,ke=me[0],yield{type:"JSXIdentifier",value:me[0]};continue}if(i.lastIndex=Te,me=i.exec(O)){Te=i.lastIndex,ke=me[0],yield{type:"JSXString",value:me[0],closed:me[2]!==void 0};continue}break;case"JSXChildren":if(a.lastIndex=Te,me=a.exec(O)){Te=a.lastIndex,ke=me[0],yield{type:"JSXText",value:me[0]};continue}switch(O[Te]){case"<":le.push({tag:"JSXTag"}),Te++,ke="<",yield{type:"JSXPunctuator",value:"<"};continue;case"{":le.push({tag:"InterpolationInJSX",nesting:N.length}),Te++,ke="?InterpolationInJSX",vt=!1,yield{type:"JSXPunctuator",value:"{"};continue}}if(k.lastIndex=Te,me=k.exec(O)){Te=k.lastIndex,yield{type:"WhiteSpace",value:me[0]};continue}if(p.lastIndex=Te,me=p.exec(O)){Te=p.lastIndex,vt=!1,c.test(ke)&&(ke="?NoLineTerminatorHere"),yield{type:"LineTerminatorSequence",value:me[0]};continue}if(d.lastIndex=Te,me=d.exec(O)){Te=d.lastIndex,f.test(me[0])&&(vt=!1,c.test(ke)&&(ke="?NoLineTerminatorHere")),yield{type:"MultiLineComment",value:me[0],closed:me[1]!==void 0};continue}if(S.lastIndex=Te,me=S.exec(O)){Te=S.lastIndex,vt=!1,yield{type:"SingleLineComment",value:me[0]};continue}U=String.fromCodePoint(O.codePointAt(Te)),Te+=U.length,ke=U,vt=!1,yield{type:xe.tag.startsWith("JSX")?"JSXInvalid":"Invalid",value:U}}}}),Ije={};Tq(Ije,{__debug:()=>yze,check:()=>mze,doc:()=>Fue,format:()=>S3,formatWithCursor:()=>Mue,getSupportInfo:()=>hze,util:()=>Rue,version:()=>UUe});var YT=(e,t)=>(r,n,...o)=>r|1&&n==null?void 0:(t.call(n)??n[e]).apply(n,o),wje=String.prototype.replaceAll??function(e,t){return e.global?this.replace(e,t):this.split(e).join(t)},kje=YT("replaceAll",function(){if(typeof this=="string")return wje}),d3=kje,Cje=class{diff(e,t,r={}){let n;typeof r=="function"?(n=r,r={}):"callback"in r&&(n=r.callback);let o=this.castInput(e,r),i=this.castInput(t,r),a=this.removeEmpty(this.tokenize(o,r)),s=this.removeEmpty(this.tokenize(i,r));return this.diffWithOptionsObj(a,s,r,n)}diffWithOptionsObj(e,t,r,n){var o;let i=E=>{if(E=this.postProcess(E,r),n){setTimeout(function(){n(E)},0);return}else return E},a=t.length,s=e.length,c=1,p=a+s;r.maxEditLength!=null&&(p=Math.min(p,r.maxEditLength));let d=(o=r.timeout)!==null&&o!==void 0?o:1/0,f=Date.now()+d,m=[{oldPos:-1,lastComponent:void 0}],y=this.extractCommon(m[0],t,e,0,r);if(m[0].oldPos+1>=s&&y+1>=a)return i(this.buildValues(m[0].lastComponent,t,e));let g=-1/0,S=1/0,b=()=>{for(let E=Math.max(g,-c);E<=Math.min(S,c);E+=2){let I,T=m[E-1],k=m[E+1];T&&(m[E-1]=void 0);let F=!1;if(k){let $=k.oldPos-E;F=k&&0<=$&&$=s&&y+1>=a)return i(this.buildValues(I.lastComponent,t,e))||!0;m[E]=I,I.oldPos+1>=s&&(S=Math.min(S,E-1)),y+1>=a&&(g=Math.max(g,E+1))}c++};if(n)(function E(){setTimeout(function(){if(c>p||Date.now()>f)return n(void 0);b()||E()},0)})();else for(;c<=p&&Date.now()<=f;){let E=b();if(E)return E}}addToPath(e,t,r,n,o){let i=e.lastComponent;return i&&!o.oneChangePerToken&&i.added===t&&i.removed===r?{oldPos:e.oldPos+n,lastComponent:{count:i.count+1,added:t,removed:r,previousComponent:i.previousComponent}}:{oldPos:e.oldPos+n,lastComponent:{count:1,added:t,removed:r,previousComponent:i}}}extractCommon(e,t,r,n,o){let i=t.length,a=r.length,s=e.oldPos,c=s-n,p=0;for(;c+1f.length?y:f}),p.value=this.join(d)}else p.value=this.join(t.slice(s,s+p.count));s+=p.count,p.added||(c+=p.count)}}return n}},Pje=class extends Cje{tokenize(e){return e.slice()}join(e){return e}removeEmpty(e){return e}},Oje=new Pje;function Nje(e,t,r){return Oje.diff(e,t,r)}var Fje=()=>{},$m=Fje,Mle="cr",jle="crlf",Rje="lf",Lje=Rje,Dq="\r",Ble=`\r +`,_3=` +`,$je=_3;function Mje(e){let t=e.indexOf(Dq);return t!==-1?e.charAt(t+1)===_3?jle:Mle:Lje}function Aq(e){return e===Mle?Dq:e===jle?Ble:$je}var jje=new Map([[_3,/\n/gu],[Dq,/\r/gu],[Ble,/\r\n/gu]]);function qle(e,t){let r=jje.get(t);return e.match(r)?.length??0}var Bje=/\r\n?/gu;function qje(e){return d3(0,e,Bje,_3)}function Uje(e){return this[e<0?this.length+e:e]}var zje=YT("at",function(){if(Array.isArray(this)||typeof this=="string")return Uje}),Xi=zje,hg="string",N_="array",jm="cursor",F_="indent",R_="align",L_="trim",tc="group",Qp="fill",$c="if-break",$_="indent-if-break",M_="line-suffix",j_="line-suffix-boundary",Oa="line",Xp="label",Fl="break-parent",Ule=new Set([jm,F_,R_,L_,tc,Qp,$c,$_,M_,j_,Oa,Xp,Fl]);function Jje(e){let t=e.length;for(;t>0&&(e[t-1]==="\r"||e[t-1]===` +`);)t--;return tnew Intl.ListFormat("en-US",{type:"disjunction"}).format(e);function Gje(e){let t=e===null?"null":typeof e;if(t!=="string"&&t!=="object")return`Unexpected doc '${t}', +Expected it to be 'string' or 'object'.`;if(yg(e))throw new Error("doc is valid.");let r=Object.prototype.toString.call(e);if(r!=="[object Object]")return`Unexpected doc '${r}'.`;let n=Kje([...Ule].map(o=>`'${o}'`));return`Unexpected doc.type '${e.type}'. +Expected it to be ${n}.`}var Hje=class extends Error{name="InvalidDocError";constructor(e){super(Gje(e)),this.doc=e}},Lv=Hje,dle={};function Zje(e,t,r,n){let o=[e];for(;o.length>0;){let i=o.pop();if(i===dle){r(o.pop());continue}r&&o.push(i,dle);let a=yg(i);if(!a)throw new Lv(i);if(t?.(i)!==!1)switch(a){case N_:case Qp:{let s=a===N_?i:i.parts;for(let c=s.length,p=c-1;p>=0;--p)o.push(s[p]);break}case $c:o.push(i.flatContents,i.breakContents);break;case tc:if(n&&i.expandedStates)for(let s=i.expandedStates.length,c=s-1;c>=0;--c)o.push(i.expandedStates[c]);else o.push(i.contents);break;case R_:case F_:case $_:case Xp:case M_:o.push(i.contents);break;case hg:case jm:case L_:case j_:case Oa:case Fl:break;default:throw new Lv(i)}}}var Iq=Zje;function f3(e,t){if(typeof e=="string")return t(e);let r=new Map;return n(e);function n(i){if(r.has(i))return r.get(i);let a=o(i);return r.set(i,a),a}function o(i){switch(yg(i)){case N_:return t(i.map(n));case Qp:return t({...i,parts:i.parts.map(n)});case $c:return t({...i,breakContents:n(i.breakContents),flatContents:n(i.flatContents)});case tc:{let{expandedStates:a,contents:s}=i;return a?(a=a.map(n),s=a[0]):s=n(s),t({...i,contents:s,expandedStates:a})}case R_:case F_:case $_:case Xp:case M_:return t({...i,contents:n(i.contents)});case hg:case jm:case L_:case j_:case Oa:case Fl:return t(i);default:throw new Lv(i)}}}function wq(e,t,r){let n=r,o=!1;function i(a){if(o)return!1;let s=t(a);s!==void 0&&(o=!0,n=s)}return Iq(e,i),n}function Wje(e){if(e.type===tc&&e.break||e.type===Oa&&e.hard||e.type===Fl)return!0}function Qje(e){return wq(e,Wje,!1)}function _le(e){if(e.length>0){let t=Xi(0,e,-1);!t.expandedStates&&!t.break&&(t.break="propagated")}return null}function Xje(e){let t=new Set,r=[];function n(i){if(i.type===Fl&&_le(r),i.type===tc){if(r.push(i),t.has(i))return!1;t.add(i)}}function o(i){i.type===tc&&r.pop().break&&_le(r)}Iq(e,n,o,!0)}function Yje(e){return e.type===Oa&&!e.hard?e.soft?"":" ":e.type===$c?e.flatContents:e}function eBe(e){return f3(e,Yje)}function fle(e){for(e=[...e];e.length>=2&&Xi(0,e,-2).type===Oa&&Xi(0,e,-1).type===Fl;)e.length-=2;if(e.length>0){let t=WT(Xi(0,e,-1));e[e.length-1]=t}return e}function WT(e){switch(yg(e)){case F_:case $_:case tc:case M_:case Xp:{let t=WT(e.contents);return{...e,contents:t}}case $c:return{...e,breakContents:WT(e.breakContents),flatContents:WT(e.flatContents)};case Qp:return{...e,parts:fle(e.parts)};case N_:return fle(e);case hg:return Jje(e);case R_:case jm:case L_:case j_:case Oa:case Fl:break;default:throw new Lv(e)}return e}function zle(e){return WT(rBe(e))}function tBe(e){switch(yg(e)){case Qp:if(e.parts.every(t=>t===""))return"";break;case tc:if(!e.contents&&!e.id&&!e.break&&!e.expandedStates)return"";if(e.contents.type===tc&&e.contents.id===e.id&&e.contents.break===e.break&&e.contents.expandedStates===e.expandedStates)return e.contents;break;case R_:case F_:case $_:case M_:if(!e.contents)return"";break;case $c:if(!e.flatContents&&!e.breakContents)return"";break;case N_:{let t=[];for(let r of e){if(!r)continue;let[n,...o]=Array.isArray(r)?r:[r];typeof n=="string"&&typeof Xi(0,t,-1)=="string"?t[t.length-1]+=n:t.push(n),t.push(...o)}return t.length===0?"":t.length===1?t[0]:t}case hg:case jm:case L_:case j_:case Oa:case Xp:case Fl:break;default:throw new Lv(e)}return e}function rBe(e){return f3(e,t=>tBe(t))}function nBe(e,t=Qle){return f3(e,r=>typeof r=="string"?Hle(t,r.split(` +`)):r)}function oBe(e){if(e.type===Oa)return!0}function iBe(e){return wq(e,oBe,!1)}function l3(e,t){return e.type===Xp?{...e,contents:t(e.contents)}:t(e)}var Wp=$m,Jle=$m,aBe=$m,sBe=$m;function p3(e){return Wp(e),{type:F_,contents:e}}function $v(e,t){return sBe(e),Wp(t),{type:R_,contents:t,n:e}}function cBe(e){return $v(Number.NEGATIVE_INFINITY,e)}function Vle(e){return $v({type:"root"},e)}function lBe(e){return $v(-1,e)}function Kle(e,t,r){Wp(e);let n=e;if(t>0){for(let o=0;o0?`, { ${c.join(", ")} }`:"";return`indentIfBreak(${n(i.contents)}${p})`}if(i.type===tc){let c=[];i.break&&i.break!=="propagated"&&c.push("shouldBreak: true"),i.id&&c.push(`id: ${o(i.id)}`);let p=c.length>0?`, { ${c.join(", ")} }`:"";return i.expandedStates?`conditionalGroup([${i.expandedStates.map(d=>n(d)).join(",")}]${p})`:`group(${n(i.contents)}${p})`}if(i.type===Qp)return`fill([${i.parts.map(c=>n(c)).join(", ")}])`;if(i.type===M_)return"lineSuffix("+n(i.contents)+")";if(i.type===j_)return"lineSuffixBoundary";if(i.type===Xp)return`label(${JSON.stringify(i.label)}, ${n(i.contents)})`;if(i.type===jm)return"cursor";throw new Error("Unknown doc type "+i.type)}function o(i){if(typeof i!="symbol")return JSON.stringify(String(i));if(i in t)return t[i];let a=i.description||"symbol";for(let s=0;;s++){let c=a+(s>0?` #${s}`:"");if(!r.has(c))return r.add(c),t[i]=`Symbol.for(${JSON.stringify(c)})`}}}var SBe=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E-\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED8\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])))?))?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3C-\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE8A\uDE8E-\uDEC2\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\uDEEF]|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g;function vBe(e){return e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510}function bBe(e){return e>=4352&&e<=4447||e===8986||e===8987||e===9001||e===9002||e>=9193&&e<=9196||e===9200||e===9203||e===9725||e===9726||e===9748||e===9749||e>=9776&&e<=9783||e>=9800&&e<=9811||e===9855||e>=9866&&e<=9871||e===9875||e===9889||e===9898||e===9899||e===9917||e===9918||e===9924||e===9925||e===9934||e===9940||e===9962||e===9970||e===9971||e===9973||e===9978||e===9981||e===9989||e===9994||e===9995||e===10024||e===10060||e===10062||e>=10067&&e<=10069||e===10071||e>=10133&&e<=10135||e===10160||e===10175||e===11035||e===11036||e===11088||e===11093||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12591||e>=12593&&e<=12686||e>=12688&&e<=12773||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=94176&&e<=94180||e>=94192&&e<=94198||e>=94208&&e<=101589||e>=101631&&e<=101662||e>=101760&&e<=101874||e>=110576&&e<=110579||e>=110581&&e<=110587||e===110589||e===110590||e>=110592&&e<=110882||e===110898||e>=110928&&e<=110930||e===110933||e>=110948&&e<=110951||e>=110960&&e<=111355||e>=119552&&e<=119638||e>=119648&&e<=119670||e===126980||e===127183||e===127374||e>=127377&&e<=127386||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||e===127568||e===127569||e>=127584&&e<=127589||e>=127744&&e<=127776||e>=127789&&e<=127797||e>=127799&&e<=127868||e>=127870&&e<=127891||e>=127904&&e<=127946||e>=127951&&e<=127955||e>=127968&&e<=127984||e===127988||e>=127992&&e<=128062||e===128064||e>=128066&&e<=128252||e>=128255&&e<=128317||e>=128331&&e<=128334||e>=128336&&e<=128359||e===128378||e===128405||e===128406||e===128420||e>=128507&&e<=128591||e>=128640&&e<=128709||e===128716||e>=128720&&e<=128722||e>=128725&&e<=128728||e>=128732&&e<=128735||e===128747||e===128748||e>=128756&&e<=128764||e>=128992&&e<=129003||e===129008||e>=129292&&e<=129338||e>=129340&&e<=129349||e>=129351&&e<=129535||e>=129648&&e<=129660||e>=129664&&e<=129674||e>=129678&&e<=129734||e===129736||e>=129741&&e<=129756||e>=129759&&e<=129770||e>=129775&&e<=129784||e>=131072&&e<=196605||e>=196608&&e<=262141}var xBe="\xA9\xAE\u203C\u2049\u2122\u2139\u2194\u2195\u2196\u2197\u2198\u2199\u21A9\u21AA\u2328\u23CF\u23F1\u23F2\u23F8\u23F9\u23FA\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600\u2601\u2602\u2603\u2604\u260E\u2611\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638\u2639\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694\u2695\u2696\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F1\u26F7\u26F8\u26F9\u2702\u2708\u2709\u270C\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u2764\u27A1\u2934\u2935\u2B05\u2B06\u2B07",EBe=/[^\x20-\x7F]/u,TBe=new Set(xBe);function DBe(e){if(!e)return 0;if(!EBe.test(e))return e.length;e=e.replace(SBe(),r=>TBe.has(r)?" ":" ");let t=0;for(let r of e){let n=r.codePointAt(0);n<=31||n>=127&&n<=159||n>=768&&n<=879||n>=65024&&n<=65039||(t+=vBe(n)||bBe(n)?2:1)}return t}var Cq=DBe,ABe={type:0},IBe={type:1},Xle={value:"",length:0,queue:[],get root(){return Xle}};function Yle(e,t,r){let n=t.type===1?e.queue.slice(0,-1):[...e.queue,t],o="",i=0,a=0,s=0;for(let g of n)switch(g.type){case 0:d(),r.useTabs?c(1):p(r.tabWidth);break;case 3:{let{string:S}=g;d(),o+=S,i+=S.length;break}case 2:{let{width:S}=g;a+=1,s+=S;break}default:throw new Error(`Unexpected indent comment '${g.type}'.`)}return m(),{...e,value:o,length:i,queue:n};function c(g){o+=" ".repeat(g),i+=r.tabWidth*g}function p(g){o+=" ".repeat(g),i+=g}function d(){r.useTabs?f():m()}function f(){a>0&&c(a),y()}function m(){s>0&&p(s),y()}function y(){a=0,s=0}}function wBe(e,t,r){if(!t)return e;if(t.type==="root")return{...e,root:e};if(t===Number.NEGATIVE_INFINITY)return e.root;let n;return typeof t=="number"?t<0?n=IBe:n={type:2,width:t}:n={type:3,string:t},Yle(e,n,r)}function kBe(e,t){return Yle(e,ABe,t)}function CBe(e){let t=0;for(let r=e.length-1;r>=0;r--){let n=e[r];if(n===" "||n===" ")t++;else break}return t}function eue(e){let t=CBe(e);return{text:t===0?e:e.slice(0,e.length-t),count:t}}var ec=Symbol("MODE_BREAK"),Hp=Symbol("MODE_FLAT"),vq=Symbol("DOC_FILL_PRINTED_LENGTH");function s3(e,t,r,n,o,i){if(r===Number.POSITIVE_INFINITY)return!0;let a=t.length,s=!1,c=[e],p="";for(;r>=0;){if(c.length===0){if(a===0)return!0;c.push(t[--a]);continue}let{mode:d,doc:f}=c.pop(),m=yg(f);switch(m){case hg:f&&(s&&(p+=" ",r-=1,s=!1),p+=f,r-=Cq(f));break;case N_:case Qp:{let y=m===N_?f:f.parts,g=f[vq]??0;for(let S=y.length-1;S>=g;S--)c.push({mode:d,doc:y[S]});break}case F_:case R_:case $_:case Xp:c.push({mode:d,doc:f.contents});break;case L_:{let{text:y,count:g}=eue(p);p=y,r+=g;break}case tc:{if(i&&f.break)return!1;let y=f.break?ec:d,g=f.expandedStates&&y===ec?Xi(0,f.expandedStates,-1):f.contents;c.push({mode:y,doc:g});break}case $c:{let y=(f.groupId?o[f.groupId]||Hp:d)===ec?f.breakContents:f.flatContents;y&&c.push({mode:d,doc:y});break}case Oa:if(d===ec||f.hard)return!0;f.soft||(s=!0);break;case M_:n=!0;break;case j_:if(n)return!1;break}}return!1}function h3(e,t){let r=Object.create(null),n=t.printWidth,o=Aq(t.endOfLine),i=0,a=[{indent:Xle,mode:ec,doc:e}],s="",c=!1,p=[],d=[],f=[],m=[],y=0;for(Xje(e);a.length>0;){let{indent:I,mode:T,doc:k}=a.pop();switch(yg(k)){case hg:{let F=o!==` +`?d3(0,k,` +`,o):k;F&&(s+=F,a.length>0&&(i+=Cq(F)));break}case N_:for(let F=k.length-1;F>=0;F--)a.push({indent:I,mode:T,doc:k[F]});break;case jm:if(d.length>=2)throw new Error("There are too many 'cursor' in doc.");d.push(y+s.length);break;case F_:a.push({indent:kBe(I,t),mode:T,doc:k.contents});break;case R_:a.push({indent:wBe(I,k.n,t),mode:T,doc:k.contents});break;case L_:E();break;case tc:switch(T){case Hp:if(!c){a.push({indent:I,mode:k.break?ec:Hp,doc:k.contents});break}case ec:{c=!1;let F={indent:I,mode:Hp,doc:k.contents},O=n-i,$=p.length>0;if(!k.break&&s3(F,a,O,$,r))a.push(F);else if(k.expandedStates){let N=Xi(0,k.expandedStates,-1);if(k.break){a.push({indent:I,mode:ec,doc:N});break}else for(let U=1;U=k.expandedStates.length){a.push({indent:I,mode:ec,doc:N});break}else{let ge=k.expandedStates[U],Te={indent:I,mode:Hp,doc:ge};if(s3(Te,a,O,$,r)){a.push(Te);break}}}else a.push({indent:I,mode:ec,doc:k.contents});break}}k.id&&(r[k.id]=Xi(0,a,-1).mode);break;case Qp:{let F=n-i,O=k[vq]??0,{parts:$}=k,N=$.length-O;if(N===0)break;let U=$[O+0],ge=$[O+1],Te={indent:I,mode:Hp,doc:U},ke={indent:I,mode:ec,doc:U},Je=s3(Te,[],F,p.length>0,r,!0);if(N===1){Je?a.push(Te):a.push(ke);break}let me={indent:I,mode:Hp,doc:ge},xe={indent:I,mode:ec,doc:ge};if(N===2){Je?a.push(me,Te):a.push(xe,ke);break}let Rt=$[O+2],Jt={indent:I,mode:T,doc:{...k,[vq]:O+2}},Yt=s3({indent:I,mode:Hp,doc:[U,ge,Rt]},[],F,p.length>0,r,!0);a.push(Jt),Yt?a.push(me,Te):Je?a.push(xe,Te):a.push(xe,ke);break}case $c:case $_:{let F=k.groupId?r[k.groupId]:T;if(F===ec){let O=k.type===$c?k.breakContents:k.negate?k.contents:p3(k.contents);O&&a.push({indent:I,mode:T,doc:O})}if(F===Hp){let O=k.type===$c?k.flatContents:k.negate?p3(k.contents):k.contents;O&&a.push({indent:I,mode:T,doc:O})}break}case M_:p.push({indent:I,mode:T,doc:k.contents});break;case j_:p.length>0&&a.push({indent:I,mode:T,doc:kq});break;case Oa:switch(T){case Hp:if(k.hard)c=!0;else{k.soft||(s+=" ",i+=1);break}case ec:if(p.length>0){a.push({indent:I,mode:T,doc:k},...p.reverse()),p.length=0;break}k.literal?(s+=o,i=0,I.root&&(I.root.value&&(s+=I.root.value),i=I.root.length)):(E(),s+=o+I.value,i=I.length);break}break;case Xp:a.push({indent:I,mode:T,doc:k.contents});break;case Fl:break;default:throw new Lv(k)}a.length===0&&p.length>0&&(a.push(...p.reverse()),p.length=0)}let g=f.join("")+s,S=[...m,...d];if(S.length!==2)return{formatted:g};let b=S[0];return{formatted:g,cursorNodeStart:b,cursorNodeText:g.slice(b,Xi(0,S,-1))};function E(){let{text:I,count:T}=eue(s);I&&(f.push(I),y+=I.length),s="",i-=T,d.length>0&&(m.push(...d.map(k=>Math.min(k,y))),d.length=0)}}function PBe(e,t,r=0){let n=0;for(let o=r;o1?Xi(0,e,-2):null}getValue(){return Xi(0,this.stack,-1)}getNode(e=0){let t=this.#t(e);return t===-1?null:this.stack[t]}getParentNode(e=0){return this.getNode(e+1)}#t(e){let{stack:t}=this;for(let r=t.length-1;r>=0;r-=2)if(!Array.isArray(t[r])&&--e<0)return r;return-1}call(e,...t){let{stack:r}=this,{length:n}=r,o=Xi(0,r,-1);for(let i of t)o=o?.[i],r.push(i,o);try{return e(this)}finally{r.length=n}}callParent(e,t=0){let r=this.#t(t+1),n=this.stack.splice(r+1);try{return e(this)}finally{this.stack.push(...n)}}each(e,...t){let{stack:r}=this,{length:n}=r,o=Xi(0,r,-1);for(let i of t)o=o[i],r.push(i,o);try{for(let i=0;i{r[o]=e(n,o,i)},...t),r}match(...e){let t=this.stack.length-1,r=null,n=this.stack[t--];for(let o of e){if(n===void 0)return!1;let i=null;if(typeof r=="number"&&(i=r,r=this.stack[t--],n=this.stack[t--]),o&&!o(n,r,i))return!1;r=this.stack[t--],n=this.stack[t--]}return!0}findAncestor(e){for(let t of this.#r())if(e(t))return t}hasAncestor(e){for(let t of this.#r())if(e(t))return!0;return!1}*#r(){let{stack:e}=this;for(let t=e.length-3;t>=0;t-=2){let r=e[t];Array.isArray(r)||(yield r)}}},NBe=OBe;function FBe(e){return e!==null&&typeof e=="object"}var Oq=FBe;function eD(e){return(t,r,n)=>{let o=!!n?.backwards;if(r===!1)return!1;let{length:i}=t,a=r;for(;a>=0&&ae===` +`||e==="\r"||e==="\u2028"||e==="\u2029";function LBe(e,t,r){let n=!!r?.backwards;if(t===!1)return!1;let o=e.charAt(t);if(n){if(e.charAt(t-1)==="\r"&&o===` +`)return t-2;if(mle(o))return t-1}else{if(o==="\r"&&e.charAt(t+1)===` +`)return t+2;if(mle(o))return t+1}return t}var mg=LBe;function $Be(e,t,r={}){let n=Mm(e,r.backwards?t-1:t,r),o=mg(e,n,r);return n!==o}var Lm=$Be;function MBe(e){return Array.isArray(e)&&e.length>0}var jBe=MBe;function*y3(e,t){let{getVisitorKeys:r,filter:n=()=>!0}=t,o=i=>Oq(i)&&n(i);for(let i of r(e)){let a=e[i];if(Array.isArray(a))for(let s of a)o(s)&&(yield s);else o(a)&&(yield a)}}function*BBe(e,t){let r=[e];for(let n=0;n(i??(i=[e,...t]),o(p,i)?[p]:nue(p,i,r))),{locStart:s,locEnd:c}=r;return a.sort((p,d)=>s(p)-s(d)||c(p)-c(d)),n.set(e,a),a}var oue=nue;function UBe(e){let t=e.type||e.kind||"(unknown type)",r=String(e.name||e.id&&(typeof e.id=="object"?e.id.name:e.id)||e.key&&(typeof e.key=="object"?e.key.name:e.key)||e.value&&(typeof e.value=="object"?"":String(e.value))||e.operator||"");return r.length>20&&(r=r.slice(0,19)+"\u2026"),t+(r?" "+r:"")}function Nq(e,t){(e.comments??(e.comments=[])).push(t),t.printed=!1,t.nodeDescription=UBe(e)}function QT(e,t){t.leading=!0,t.trailing=!1,Nq(e,t)}function dg(e,t,r){t.leading=!1,t.trailing=!1,r&&(t.marker=r),Nq(e,t)}function XT(e,t){t.leading=!1,t.trailing=!0,Nq(e,t)}var iue=new WeakMap;function aue(e,t,r,n,o=[]){let{locStart:i,locEnd:a}=r,s=i(t),c=a(t),p=oue(e,o,{cache:iue,locStart:i,locEnd:a,getVisitorKeys:r.getVisitorKeys,filter:r.printer.canAttachComment,getChildren:r.printer.getCommentChildNodes}),d,f,m=0,y=p.length;for(;m>1,S=p[g],b=i(S),E=a(S);if(b<=s&&c<=E)return aue(S,t,r,S,[S,...o]);if(E<=s){d=S,m=g+1;continue}if(c<=b){f=S,y=g;continue}throw new Error("Comment location overlaps with node location")}if(n?.type==="TemplateLiteral"){let{quasis:g}=n,S=_q(g,t,r);d&&_q(g,d,r)!==S&&(d=null),f&&_q(g,f,r)!==S&&(f=null)}return{enclosingNode:n,precedingNode:d,followingNode:f}}var dq=()=>!1;function zBe(e,t){let{comments:r}=e;if(delete e.comments,!jBe(r)||!t.printer.canAttachComment)return;let n=[],{printer:{features:{experimental_avoidAstMutation:o},handleComments:i={}},originalText:a}=t,{ownLine:s=dq,endOfLine:c=dq,remaining:p=dq}=i,d=r.map((f,m)=>({...aue(e,f,t),comment:f,text:a,options:t,ast:e,isLastComment:r.length-1===m}));for(let[f,m]of d.entries()){let{comment:y,precedingNode:g,enclosingNode:S,followingNode:b,text:E,options:I,ast:T,isLastComment:k}=m,F;if(o?F=[m]:(y.enclosingNode=S,y.precedingNode=g,y.followingNode=b,F=[y,E,I,T,k]),JBe(E,I,d,f))y.placement="ownLine",s(...F)||(b?QT(b,y):g?XT(g,y):dg(S||T,y));else if(VBe(E,I,d,f))y.placement="endOfLine",c(...F)||(g?XT(g,y):b?QT(b,y):dg(S||T,y));else if(y.placement="remaining",!p(...F))if(g&&b){let O=n.length;O>0&&n[O-1].followingNode!==b&&hle(n,I),n.push(m)}else g?XT(g,y):b?QT(b,y):dg(S||T,y)}if(hle(n,t),!o)for(let f of r)delete f.precedingNode,delete f.enclosingNode,delete f.followingNode}var sue=e=>!/[\S\n\u2028\u2029]/u.test(e);function JBe(e,t,r,n){let{comment:o,precedingNode:i}=r[n],{locStart:a,locEnd:s}=t,c=a(o);if(i)for(let p=n-1;p>=0;p--){let{comment:d,precedingNode:f}=r[p];if(f!==i||!sue(e.slice(s(d),c)))break;c=a(d)}return Lm(e,c,{backwards:!0})}function VBe(e,t,r,n){let{comment:o,followingNode:i}=r[n],{locStart:a,locEnd:s}=t,c=s(o);if(i)for(let p=n+1;p0;--a){let{comment:s,precedingNode:c,followingNode:p}=e[a-1];$m(c,n),$m(p,o);let d=t.originalText.slice(t.locEnd(s),i);if(t.printer.isGap?.(d,t)??/^[\s(]*$/u.test(d))i=t.locStart(s);else break}for(let[s,{comment:c}]of e.entries())s1&&s.comments.sort((c,p)=>t.locStart(c)-t.locStart(p));e.length=0}function _q(e,t,r){let n=r.locStart(t)-1;for(let o=1;o!n.has(s)).length===0)return{leading:"",trailing:""};let o=[],i=[],a;return e.each(()=>{let s=e.node;if(n?.has(s))return;let{leading:c,trailing:p}=s;c?o.push(GBe(e,t)):p&&(a=HBe(e,t,a),i.push(a.doc))},"comments"),{leading:o,trailing:i}}function WBe(e,t,r){let{leading:n,trailing:o}=ZBe(e,r);return!n&&!o?t:l3(t,i=>[n,i,o])}function QBe(e){let{[Symbol.for("comments")]:t,[Symbol.for("printedComments")]:r}=e;for(let n of t){if(!n.printed&&!r.has(n))throw new Error('Comment "'+n.value.trim()+'" was not printed. Please report this error!');delete n.printed}}var XBe=()=>$m,lue=class extends Error{name="ConfigError"},yle=class extends Error{name="UndefinedParserError"},YBe={checkIgnorePragma:{category:"Special",type:"boolean",default:!1,description:"Check whether the file's first docblock comment contains '@noprettier' or '@noformat' to determine if it should be formatted.",cliCategory:"Other"},cursorOffset:{category:"Special",type:"int",default:-1,range:{start:-1,end:1/0,step:1},description:"Print (to stderr) where a cursor at the given position would move to after formatting.",cliCategory:"Editor"},endOfLine:{category:"Global",type:"choice",default:"lf",description:"Which end of line characters to apply.",choices:[{value:"lf",description:"Line Feed only (\\n), common on Linux and macOS as well as inside git repos"},{value:"crlf",description:"Carriage Return + Line Feed characters (\\r\\n), common on Windows"},{value:"cr",description:"Carriage Return character only (\\r), used very rarely"},{value:"auto",description:`Maintain existing +(mixed values within one file are normalised by looking at what's used after the first line)`}]},filepath:{category:"Special",type:"path",description:"Specify the input filepath. This will be used to do parser inference.",cliName:"stdin-filepath",cliCategory:"Other",cliDescription:"Path to the file to pretend that stdin comes from."},insertPragma:{category:"Special",type:"boolean",default:!1,description:"Insert @format pragma into file's first docblock comment.",cliCategory:"Other"},parser:{category:"Global",type:"choice",default:void 0,description:"Which parser to use.",exception:e=>typeof e=="string"||typeof e=="function",choices:[{value:"flow",description:"Flow"},{value:"babel",description:"JavaScript"},{value:"babel-flow",description:"Flow"},{value:"babel-ts",description:"TypeScript"},{value:"typescript",description:"TypeScript"},{value:"acorn",description:"JavaScript"},{value:"espree",description:"JavaScript"},{value:"meriyah",description:"JavaScript"},{value:"css",description:"CSS"},{value:"less",description:"Less"},{value:"scss",description:"SCSS"},{value:"json",description:"JSON"},{value:"json5",description:"JSON5"},{value:"jsonc",description:"JSON with Comments"},{value:"json-stringify",description:"JSON.stringify"},{value:"graphql",description:"GraphQL"},{value:"markdown",description:"Markdown"},{value:"mdx",description:"MDX"},{value:"vue",description:"Vue"},{value:"yaml",description:"YAML"},{value:"glimmer",description:"Ember / Handlebars"},{value:"html",description:"HTML"},{value:"angular",description:"Angular"},{value:"lwc",description:"Lightning Web Components"},{value:"mjml",description:"MJML"}]},plugins:{type:"path",array:!0,default:[{value:[]}],category:"Global",description:"Add a plugin. Multiple plugins can be passed as separate `--plugin`s.",exception:e=>typeof e=="string"||typeof e=="object",cliName:"plugin",cliCategory:"Config"},printWidth:{category:"Global",type:"int",default:80,description:"The line length where Prettier will try wrap.",range:{start:0,end:1/0,step:1}},rangeEnd:{category:"Special",type:"int",default:1/0,range:{start:0,end:1/0,step:1},description:`Format code ending at a given character offset (exclusive). +The range will extend forwards to the end of the selected statement.`,cliCategory:"Editor"},rangeStart:{category:"Special",type:"int",default:0,range:{start:0,end:1/0,step:1},description:`Format code starting at a given character offset. +The range will extend backwards to the start of the first line containing the selected statement.`,cliCategory:"Editor"},requirePragma:{category:"Special",type:"boolean",default:!1,description:"Require either '@prettier' or '@format' to be present in the file's first docblock comment in order for it to be formatted.",cliCategory:"Other"},tabWidth:{type:"int",category:"Global",default:2,description:"Number of spaces per indentation level.",range:{start:0,end:1/0,step:1}},useTabs:{category:"Global",type:"boolean",default:!1,description:"Indent with tabs instead of spaces."},embeddedLanguageFormatting:{category:"Global",type:"choice",default:"auto",description:"Control how Prettier formats quoted code embedded in the file.",choices:[{value:"auto",description:"Format embedded code if Prettier can automatically identify it."},{value:"off",description:"Never automatically format embedded code."}]}};function uue({plugins:e=[],showDeprecated:t=!1}={}){let r=e.flatMap(o=>o.languages??[]),n=[];for(let o of tqe(Object.assign({},...e.map(({options:i})=>i),YBe)))!t&&o.deprecated||(Array.isArray(o.choices)&&(t||(o.choices=o.choices.filter(i=>!i.deprecated)),o.name==="parser"&&(o.choices=[...o.choices,...eqe(o.choices,r,e)])),o.pluginDefaults=Object.fromEntries(e.filter(i=>i.defaultOptions?.[o.name]!==void 0).map(i=>[i.name,i.defaultOptions[o.name]])),n.push(o));return{languages:r,options:n}}function*eqe(e,t,r){let n=new Set(e.map(o=>o.value));for(let o of t)if(o.parsers){for(let i of o.parsers)if(!n.has(i)){n.add(i);let a=r.find(c=>c.parsers&&Object.prototype.hasOwnProperty.call(c.parsers,i)),s=o.name;a?.name&&(s+=` (plugin: ${a.name})`),yield{value:i,description:s}}}}function tqe(e){let t=[];for(let[r,n]of Object.entries(e)){let o={name:r,...n};Array.isArray(o.default)&&(o.default=Xi(0,o.default,-1).value),t.push(o)}return t}var rqe=Array.prototype.toReversed??function(){return[...this].reverse()},nqe=YT("toReversed",function(){if(Array.isArray(this))return rqe}),oqe=nqe;function iqe(){let e=globalThis,t=e.Deno?.build?.os;return typeof t=="string"?t==="windows":e.navigator?.platform?.startsWith("Win")??e.process?.platform?.startsWith("win")??!1}var aqe=iqe();function pue(e){if(e=e instanceof URL?e:new URL(e),e.protocol!=="file:")throw new TypeError(`URL must be a file URL: received "${e.protocol}"`);return e}function sqe(e){return e=pue(e),decodeURIComponent(e.pathname.replace(/%(?![0-9A-Fa-f]{2})/g,"%25"))}function cqe(e){e=pue(e);let t=decodeURIComponent(e.pathname.replace(/\//g,"\\").replace(/%(?![0-9A-Fa-f]{2})/g,"%25")).replace(/^\\*([A-Za-z]:)(\\|$)/,"$1\\");return e.hostname!==""&&(t=`\\\\${e.hostname}${t}`),t}function lqe(e){return aqe?cqe(e):sqe(e)}var uqe=e=>String(e).split(/[/\\]/u).pop(),pqe=e=>String(e).startsWith("file:");function gle(e,t){if(!t)return;let r=uqe(t).toLowerCase();return e.find(({filenames:n})=>n?.some(o=>o.toLowerCase()===r))??e.find(({extensions:n})=>n?.some(o=>r.endsWith(o)))}function dqe(e,t){if(t)return e.find(({name:r})=>r.toLowerCase()===t)??e.find(({aliases:r})=>r?.includes(t))??e.find(({extensions:r})=>r?.includes(`.${t}`))}var _qe=void 0;function Sle(e,t){if(t){if(pqe(t))try{t=lqe(t)}catch{return}if(typeof t=="string")return e.find(({isSupported:r})=>r?.({filepath:t}))}}function fqe(e,t){let r=oqe(0,e.plugins).flatMap(n=>n.languages??[]);return(dqe(r,t.language)??gle(r,t.physicalFile)??gle(r,t.file)??Sle(r,t.physicalFile)??Sle(r,t.file)??_qe?.(r,t.physicalFile))?.parsers[0]}var due=fqe,Rv={key:e=>/^[$_a-zA-Z][$_a-zA-Z0-9]*$/.test(e)?e:JSON.stringify(e),value(e){if(e===null||typeof e!="object")return JSON.stringify(e);if(Array.isArray(e))return`[${e.map(r=>Rv.value(r)).join(", ")}]`;let t=Object.keys(e);return t.length===0?"{}":`{ ${t.map(r=>`${Rv.key(r)}: ${Rv.value(e[r])}`).join(", ")} }`},pair:({key:e,value:t})=>Rv.value({[e]:t})},Rq=new Proxy(String,{get:()=>Rq}),Zp=Rq,_ue=()=>Rq,mqe=(e,t,{descriptor:r})=>{let n=[`${Zp.yellow(typeof e=="string"?r.key(e):r.pair(e))} is deprecated`];return t&&n.push(`we now treat it as ${Zp.blue(typeof t=="string"?r.key(t):r.pair(t))}`),n.join("; ")+"."},fue=Symbol.for("vnopts.VALUE_NOT_EXIST"),u3=Symbol.for("vnopts.VALUE_UNCHANGED"),vle=" ".repeat(2),hqe=(e,t,r)=>{let{text:n,list:o}=r.normalizeExpectedResult(r.schemas[e].expected(r)),i=[];return n&&i.push(ble(e,t,n,r.descriptor)),o&&i.push([ble(e,t,o.title,r.descriptor)].concat(o.values.map(a=>mue(a,r.loggerPrintWidth))).join(` +`)),hue(i,r.loggerPrintWidth)};function ble(e,t,r,n){return[`Invalid ${Zp.red(n.key(e))} value.`,`Expected ${Zp.blue(r)},`,`but received ${t===fue?Zp.gray("nothing"):Zp.red(n.value(t))}.`].join(" ")}function mue({text:e,list:t},r){let n=[];return e&&n.push(`- ${Zp.blue(e)}`),t&&n.push([`- ${Zp.blue(t.title)}:`].concat(t.values.map(o=>mue(o,r-vle.length).replace(/^|\n/g,`$&${vle}`))).join(` +`)),hue(n,r)}function hue(e,t){if(e.length===1)return e[0];let[r,n]=e,[o,i]=e.map(a=>a.split(` +`,1)[0].length);return o>t&&o>i?n:r}var Fv=[],fq=[];function mq(e,t,r){if(e===t)return 0;let n=r?.maxDistance,o=e;e.length>t.length&&(e=t,t=o);let i=e.length,a=t.length;for(;i>0&&e.charCodeAt(~-i)===t.charCodeAt(~-a);)i--,a--;let s=0;for(;sn)return n;if(i===0)return n!==void 0&&a>n?n:a;let c,p,d,f,m=0,y=0;for(;mp?f>p?p+1:f:f>d?d+1:f;if(n!==void 0){let g=p;for(m=0;mn)return n}}return Fv.length=i,fq.length=i,n!==void 0&&p>n?n:p}function yqe(e,t,r){if(!Array.isArray(t)||t.length===0)return;let n=r?.maxDistance,o=e.length;for(let c of t)if(c===e)return c;if(n===0)return;let i,a=Number.POSITIVE_INFINITY,s=new Set;for(let c of t){if(s.has(c))continue;s.add(c);let p=Math.abs(c.length-o);if(p>=a||n!==void 0&&p>n)continue;let d=Number.isFinite(a)?n===void 0?a:Math.min(a,n):n,f=d===void 0?mq(e,c):mq(e,c,{maxDistance:d});if(n!==void 0&&f>n)continue;let m=f;if(d!==void 0&&f===d&&d===n&&(m=mq(e,c)),mn))return i}var yue=(e,t,{descriptor:r,logger:n,schemas:o})=>{let i=[`Ignored unknown option ${Zp.yellow(r.pair({key:e,value:t}))}.`],a=yqe(e,Object.keys(o),{maxDistance:3});a&&i.push(`Did you mean ${Zp.blue(r.key(a))}?`),n.warn(i.join(" "))},gqe=["default","expected","validate","deprecated","forward","redirect","overlap","preprocess","postprocess"];function Sqe(e,t){let r=new e(t),n=Object.create(r);for(let o of gqe)o in t&&(n[o]=vqe(t[o],r,Bm.prototype[o].length));return n}var Bm=class{static create(e){return Sqe(this,e)}constructor(e){this.name=e.name}default(e){}expected(e){return"nothing"}validate(e,t){return!1}deprecated(e,t){return!1}forward(e,t){}redirect(e,t){}overlap(e,t,r){return e}preprocess(e,t){return e}postprocess(e,t){return u3}};function vqe(e,t,r){return typeof e=="function"?(...n)=>e(...n.slice(0,r-1),t,...n.slice(r-1)):()=>e}var bqe=class extends Bm{constructor(e){super(e),this._sourceName=e.sourceName}expected(e){return e.schemas[this._sourceName].expected(e)}validate(e,t){return t.schemas[this._sourceName].validate(e,t)}redirect(e,t){return this._sourceName}},xqe=class extends Bm{expected(){return"anything"}validate(){return!0}},Eqe=class extends Bm{constructor({valueSchema:e,name:t=e.name,...r}){super({...r,name:t}),this._valueSchema=e}expected(e){let{text:t,list:r}=e.normalizeExpectedResult(this._valueSchema.expected(e));return{text:t&&`an array of ${t}`,list:r&&{title:"an array of the following values",values:[{list:r}]}}}validate(e,t){if(!Array.isArray(e))return!1;let r=[];for(let n of e){let o=t.normalizeValidateResult(this._valueSchema.validate(n,t),n);o!==!0&&r.push(o.value)}return r.length===0?!0:{value:r}}deprecated(e,t){let r=[];for(let n of e){let o=t.normalizeDeprecatedResult(this._valueSchema.deprecated(n,t),n);o!==!1&&r.push(...o.map(({value:i})=>({value:[i]})))}return r}forward(e,t){let r=[];for(let n of e){let o=t.normalizeForwardResult(this._valueSchema.forward(n,t),n);r.push(...o.map(xle))}return r}redirect(e,t){let r=[],n=[];for(let o of e){let i=t.normalizeRedirectResult(this._valueSchema.redirect(o,t),o);"remain"in i&&r.push(i.remain),n.push(...i.redirect.map(xle))}return r.length===0?{redirect:n}:{redirect:n,remain:r}}overlap(e,t){return e.concat(t)}};function xle({from:e,to:t}){return{from:[e],to:t}}var Tqe=class extends Bm{expected(){return"true or false"}validate(e){return typeof e=="boolean"}};function Dqe(e,t){let r=Object.create(null);for(let n of e){let o=n[t];if(r[o])throw new Error(`Duplicate ${t} ${JSON.stringify(o)}`);r[o]=n}return r}function Aqe(e,t){let r=new Map;for(let n of e){let o=n[t];if(r.has(o))throw new Error(`Duplicate ${t} ${JSON.stringify(o)}`);r.set(o,n)}return r}function Iqe(){let e=Object.create(null);return t=>{let r=JSON.stringify(t);return e[r]?!0:(e[r]=!0,!1)}}function wqe(e,t){let r=[],n=[];for(let o of e)t(o)?r.push(o):n.push(o);return[r,n]}function kqe(e){return e===Math.floor(e)}function Cqe(e,t){if(e===t)return 0;let r=typeof e,n=typeof t,o=["undefined","object","boolean","number","string"];return r!==n?o.indexOf(r)-o.indexOf(n):r!=="string"?Number(e)-Number(t):e.localeCompare(t)}function Pqe(e){return(...t)=>{let r=e(...t);return typeof r=="string"?new Error(r):r}}function Ele(e){return e===void 0?{}:e}function gue(e){if(typeof e=="string")return{text:e};let{text:t,list:r}=e;return Oqe((t||r)!==void 0,"Unexpected `expected` result, there should be at least one field."),r?{text:t,list:{title:r.title,values:r.values.map(gue)}}:{text:t}}function Tle(e,t){return e===!0?!0:e===!1?{value:t}:e}function Dle(e,t,r=!1){return e===!1?!1:e===!0?r?!0:[{value:t}]:"value"in e?[e]:e.length===0?!1:e}function Ale(e,t){return typeof e=="string"||"key"in e?{from:t,to:e}:"from"in e?{from:e.from,to:e.to}:{from:t,to:e.to}}function bq(e,t){return e===void 0?[]:Array.isArray(e)?e.map(r=>Ale(r,t)):[Ale(e,t)]}function Ile(e,t){let r=bq(typeof e=="object"&&"redirect"in e?e.redirect:e,t);return r.length===0?{remain:t,redirect:r}:typeof e=="object"&&"remain"in e?{remain:e.remain,redirect:r}:{redirect:r}}function Oqe(e,t){if(!e)throw new Error(t)}var Nqe=class extends Bm{constructor(e){super(e),this._choices=Aqe(e.choices.map(t=>t&&typeof t=="object"?t:{value:t}),"value")}expected({descriptor:e}){let t=Array.from(this._choices.keys()).map(o=>this._choices.get(o)).filter(({hidden:o})=>!o).map(o=>o.value).sort(Cqe).map(e.value),r=t.slice(0,-2),n=t.slice(-2);return{text:r.concat(n.join(" or ")).join(", "),list:{title:"one of the following values",values:t}}}validate(e){return this._choices.has(e)}deprecated(e){let t=this._choices.get(e);return t&&t.deprecated?{value:e}:!1}forward(e){let t=this._choices.get(e);return t?t.forward:void 0}redirect(e){let t=this._choices.get(e);return t?t.redirect:void 0}},Fqe=class extends Bm{expected(){return"a number"}validate(e,t){return typeof e=="number"}},Rqe=class extends Fqe{expected(){return"an integer"}validate(e,t){return t.normalizeValidateResult(super.validate(e,t),e)===!0&&kqe(e)}},wle=class extends Bm{expected(){return"a string"}validate(e){return typeof e=="string"}},Lqe=Rv,$qe=yue,Mqe=hqe,jqe=mqe,Bqe=class{constructor(e,t){let{logger:r=console,loggerPrintWidth:n=80,descriptor:o=Lqe,unknown:i=$qe,invalid:a=Mqe,deprecated:s=jqe,missing:c=()=>!1,required:p=()=>!1,preprocess:d=m=>m,postprocess:f=()=>u3}=t||{};this._utils={descriptor:o,logger:r||{warn:()=>{}},loggerPrintWidth:n,schemas:Dqe(e,"name"),normalizeDefaultResult:Ele,normalizeExpectedResult:gue,normalizeDeprecatedResult:Dle,normalizeForwardResult:bq,normalizeRedirectResult:Ile,normalizeValidateResult:Tle},this._unknownHandler=i,this._invalidHandler=Pqe(a),this._deprecatedHandler=s,this._identifyMissing=(m,y)=>!(m in y)||c(m,y),this._identifyRequired=p,this._preprocess=d,this._postprocess=f,this.cleanHistory()}cleanHistory(){this._hasDeprecationWarned=Iqe()}normalize(e){let t={},r=[this._preprocess(e,this._utils)],n=()=>{for(;r.length!==0;){let o=r.shift(),i=this._applyNormalization(o,t);r.push(...i)}};n();for(let o of Object.keys(this._utils.schemas)){let i=this._utils.schemas[o];if(!(o in t)){let a=Ele(i.default(this._utils));"value"in a&&r.push({[o]:a.value})}}n();for(let o of Object.keys(this._utils.schemas)){if(!(o in t))continue;let i=this._utils.schemas[o],a=t[o],s=i.postprocess(a,this._utils);s!==u3&&(this._applyValidation(s,o,i),t[o]=s)}return this._applyPostprocess(t),this._applyRequiredCheck(t),t}_applyNormalization(e,t){let r=[],{knownKeys:n,unknownKeys:o}=this._partitionOptionKeys(e);for(let i of n){let a=this._utils.schemas[i],s=a.preprocess(e[i],this._utils);this._applyValidation(s,i,a);let c=({from:f,to:m})=>{r.push(typeof m=="string"?{[m]:f}:{[m.key]:m.value})},p=({value:f,redirectTo:m})=>{let y=Dle(a.deprecated(f,this._utils),s,!0);if(y!==!1)if(y===!0)this._hasDeprecationWarned(i)||this._utils.logger.warn(this._deprecatedHandler(i,m,this._utils));else for(let{value:g}of y){let S={key:i,value:g};if(!this._hasDeprecationWarned(S)){let b=typeof m=="string"?{key:m,value:g}:m;this._utils.logger.warn(this._deprecatedHandler(S,b,this._utils))}}};bq(a.forward(s,this._utils),s).forEach(c);let d=Ile(a.redirect(s,this._utils),s);if(d.redirect.forEach(c),"remain"in d){let f=d.remain;t[i]=i in t?a.overlap(t[i],f,this._utils):f,p({value:f})}for(let{from:f,to:m}of d.redirect)p({value:f,redirectTo:m})}for(let i of o){let a=e[i];this._applyUnknownHandler(i,a,t,(s,c)=>{r.push({[s]:c})})}return r}_applyRequiredCheck(e){for(let t of Object.keys(this._utils.schemas))if(this._identifyMissing(t,e)&&this._identifyRequired(t))throw this._invalidHandler(t,fue,this._utils)}_partitionOptionKeys(e){let[t,r]=wqe(Object.keys(e).filter(n=>!this._identifyMissing(n,e)),n=>n in this._utils.schemas);return{knownKeys:t,unknownKeys:r}}_applyValidation(e,t,r){let n=Tle(r.validate(e,this._utils),e);if(n!==!0)throw this._invalidHandler(t,n.value,this._utils)}_applyUnknownHandler(e,t,r,n){let o=this._unknownHandler(e,t,this._utils);if(o)for(let i of Object.keys(o)){if(this._identifyMissing(i,o))continue;let a=o[i];i in this._utils.schemas?n(i,a):r[i]=a}}_applyPostprocess(e){let t=this._postprocess(e,this._utils);if(t!==u3){if(t.delete)for(let r of t.delete)delete e[r];if(t.override){let{knownKeys:r,unknownKeys:n}=this._partitionOptionKeys(t.override);for(let o of r){let i=t.override[o];this._applyValidation(i,o,this._utils.schemas[o]),e[o]=i}for(let o of n){let i=t.override[o];this._applyUnknownHandler(o,i,e,(a,s)=>{let c=this._utils.schemas[a];this._applyValidation(s,a,c),e[a]=s})}}}}},hq;function qqe(e,t,{logger:r=!1,isCLI:n=!1,passThrough:o=!1,FlagSchema:i,descriptor:a}={}){if(n){if(!i)throw new Error("'FlagSchema' option is required.");if(!a)throw new Error("'descriptor' option is required.")}else a=Rv;let s=o?Array.isArray(o)?(m,y)=>o.includes(m)?{[m]:y}:void 0:(m,y)=>({[m]:y}):(m,y,g)=>{let{_:S,...b}=g.schemas;return yue(m,y,{...g,schemas:b})},c=Uqe(t,{isCLI:n,FlagSchema:i}),p=new Bqe(c,{logger:r,unknown:s,descriptor:a}),d=r!==!1;d&&hq&&(p._hasDeprecationWarned=hq);let f=p.normalize(e);return d&&(hq=p._hasDeprecationWarned),f}function Uqe(e,{isCLI:t,FlagSchema:r}){let n=[];t&&n.push(xqe.create({name:"_"}));for(let o of e)n.push(zqe(o,{isCLI:t,optionInfos:e,FlagSchema:r})),o.alias&&t&&n.push(bqe.create({name:o.alias,sourceName:o.name}));return n}function zqe(e,{isCLI:t,optionInfos:r,FlagSchema:n}){let{name:o}=e,i={name:o},a,s={};switch(e.type){case"int":a=Rqe,t&&(i.preprocess=Number);break;case"string":a=wle;break;case"choice":a=Nqe,i.choices=e.choices.map(c=>c?.redirect?{...c,redirect:{to:{key:e.name,value:c.redirect}}}:c);break;case"boolean":a=Tqe;break;case"flag":a=n,i.flags=r.flatMap(c=>[c.alias,c.description&&c.name,c.oppositeDescription&&`no-${c.name}`].filter(Boolean));break;case"path":a=wle;break;default:throw new Error(`Unexpected type ${e.type}`)}if(e.exception?i.validate=(c,p,d)=>e.exception(c)||p.validate(c,d):i.validate=(c,p,d)=>c===void 0||p.validate(c,d),e.redirect&&(s.redirect=c=>c?{to:typeof e.redirect=="string"?e.redirect:{key:e.redirect.option,value:e.redirect.value}}:void 0),e.deprecated&&(s.deprecated=!0),t&&!e.array){let c=i.preprocess||(p=>p);i.preprocess=(p,d,f)=>d.preprocess(c(Array.isArray(p)?Xi(0,p,-1):p),f)}return e.array?Eqe.create({...t?{preprocess:c=>Array.isArray(c)?c:[c]}:{},...s,valueSchema:a.create(i)}):a.create({...i,...s})}var Jqe=qqe,Vqe=Array.prototype.findLast??function(e){for(let t=this.length-1;t>=0;t--){let r=this[t];if(e(r,t,this))return r}},Kqe=YT("findLast",function(){if(Array.isArray(this))return Vqe}),Sue=Kqe,Gqe=Symbol.for("PRETTIER_IS_FRONT_MATTER"),Hqe=[];function Zqe(e){return!!e?.[Gqe]}var Lq=Zqe,vue=new Set(["yaml","toml"]),bue=({node:e})=>Lq(e)&&vue.has(e.language);async function Wqe(e,t,r,n){let{node:o}=r,{language:i}=o;if(!vue.has(i))return;let a=o.value.trim(),s;if(a){let c=i==="yaml"?i:due(n,{language:i});if(!c)return;s=a?await e(a,{parser:c}):""}else s=a;return Vle([o.startDelimiter,o.explicitLanguage??"",O_,s,s?O_:"",o.endDelimiter])}function Qqe(e,t){return bue({node:e})&&(delete t.end,delete t.raw,delete t.value),t}var Xqe=Qqe;function Yqe({node:e}){return e.raw}var eUe=Yqe,xue=new Set(["tokens","comments","parent","enclosingNode","precedingNode","followingNode"]),tUe=e=>Object.keys(e).filter(t=>!xue.has(t));function rUe(e,t){let r=e?n=>e(n,xue):tUe;return t?new Proxy(r,{apply:(n,o,i)=>Lq(i[0])?Hqe:Reflect.apply(n,o,i)}):r}var kle=rUe;function Eue(e,t){if(!t)throw new Error("parserName is required.");let r=Sue(0,e,o=>o.parsers&&Object.prototype.hasOwnProperty.call(o.parsers,t));if(r)return r;let n=`Couldn't resolve parser "${t}".`;throw n+=" Plugins must be explicitly added to the standalone bundle.",new lue(n)}function nUe(e,t){if(!t)throw new Error("astFormat is required.");let r=Sue(0,e,o=>o.printers&&Object.prototype.hasOwnProperty.call(o.printers,t));if(r)return r;let n=`Couldn't find plugin for AST format "${t}".`;throw n+=" Plugins must be explicitly added to the standalone bundle.",new lue(n)}function $q({plugins:e,parser:t}){let r=Eue(e,t);return Tue(r,t)}function Tue(e,t){let r=e.parsers[t];return typeof r=="function"?r():r}async function oUe(e,t){let r=e.printers[t],n=typeof r=="function"?await r():r;return iUe(n)}var yq=new WeakMap;function iUe(e){if(yq.has(e))return yq.get(e);let{features:t,getVisitorKeys:r,embed:n,massageAstNode:o,print:i,...a}=e;t=lUe(t);let s=t.experimental_frontMatterSupport;r=kle(r,s.massageAstNode||s.embed||s.print);let c=o;o&&s.massageAstNode&&(c=new Proxy(o,{apply(m,y,g){return Xqe(...g),Reflect.apply(m,y,g)}}));let p=n;if(n){let m;p=new Proxy(n,{get(y,g,S){return g==="getVisitorKeys"?(m??(m=n.getVisitorKeys?kle(n.getVisitorKeys,s.massageAstNode||s.embed):r),m):Reflect.get(y,g,S)},apply:(y,g,S)=>s.embed&&bue(...S)?Wqe:Reflect.apply(y,g,S)})}let d=i;s.print&&(d=new Proxy(i,{apply(m,y,g){let[S]=g;return Lq(S.node)?eUe(S):Reflect.apply(m,y,g)}}));let f={features:t,getVisitorKeys:r,embed:p,massageAstNode:c,print:d,...a};return yq.set(e,f),f}var aUe=["clean","embed","print"],sUe=Object.fromEntries(aUe.map(e=>[e,!1]));function cUe(e){return{...sUe,...e}}function lUe(e){return{experimental_avoidAstMutation:!1,...e,experimental_frontMatterSupport:cUe(e?.experimental_frontMatterSupport)}}var Cle={astFormat:"estree",printer:{},originalText:void 0,locStart:null,locEnd:null,getVisitorKeys:null};async function uUe(e,t={}){let r={...e};if(!r.parser)if(r.filepath){if(r.parser=due(r,{physicalFile:r.filepath}),!r.parser)throw new yle(`No parser could be inferred for file "${r.filepath}".`)}else throw new yle("No parser and no file path given, couldn't infer a parser.");let n=uue({plugins:e.plugins,showDeprecated:!0}).options,o={...Cle,...Object.fromEntries(n.filter(f=>f.default!==void 0).map(f=>[f.name,f.default]))},i=Eue(r.plugins,r.parser),a=await Tue(i,r.parser);r.astFormat=a.astFormat,r.locEnd=a.locEnd,r.locStart=a.locStart;let s=i.printers?.[a.astFormat]?i:nUe(r.plugins,a.astFormat),c=await oUe(s,a.astFormat);r.printer=c,r.getVisitorKeys=c.getVisitorKeys;let p=s.defaultOptions?Object.fromEntries(Object.entries(s.defaultOptions).filter(([,f])=>f!==void 0)):{},d={...o,...p};for(let[f,m]of Object.entries(d))(r[f]===null||r[f]===void 0)&&(r[f]=m);return r.parser==="json"&&(r.trailingComma="none"),Jqe(r,n,{passThrough:Object.keys(Cle),...t})}var Mv=uUe,VMt=Dje(Aje(),1),Mq="\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088F\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5C\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDC-\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C8A\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7DC\uA7F1-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC",Due="\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0897-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1ADD\u1AE0-\u1AEB\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u200C\u200D\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\u30FB\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F\uFF65",KMt=new RegExp("["+Mq+"]"),GMt=new RegExp("["+Mq+Due+"]");Mq=Due=null;var jq={keyword:["break","case","catch","continue","debugger","default","do","else","finally","for","function","if","return","switch","throw","try","var","const","while","with","new","this","super","class","extends","export","import","null","true","false","in","instanceof","typeof","void","delete"],strict:["implements","interface","let","package","private","protected","public","static","yield"],strictBind:["eval","arguments"]},HMt=new Set(jq.keyword),ZMt=new Set(jq.strict),WMt=new Set(jq.strictBind),c3=(e,t)=>r=>e(t(r));function Aue(e){return{keyword:e.cyan,capitalized:e.yellow,jsxIdentifier:e.yellow,punctuator:e.yellow,number:e.magenta,string:e.green,regex:e.magenta,comment:e.gray,invalid:c3(c3(e.white,e.bgRed),e.bold),gutter:e.gray,marker:c3(e.red,e.bold),message:c3(e.red,e.bold),reset:e.reset}}var QMt=Aue(_ue(!0)),XMt=Aue(_ue(!1));function pUe(){return new Proxy({},{get:()=>e=>e})}var Ple=/\r\n|[\n\r\u2028\u2029]/;function dUe(e,t,r){let n=Object.assign({column:0,line:-1},e.start),o=Object.assign({},n,e.end),{linesAbove:i=2,linesBelow:a=3}=r||{},s=n.line,c=n.column,p=o.line,d=o.column,f=Math.max(s-(i+1),0),m=Math.min(t.length,p+a);s===-1&&(f=0),p===-1&&(m=t.length);let y=p-s,g={};if(y)for(let S=0;S<=y;S++){let b=S+s;if(!c)g[b]=!0;else if(S===0){let E=t[b-1].length;g[b]=[c,E-c+1]}else if(S===y)g[b]=[0,d];else{let E=t[b-S].length;g[b]=[0,E]}}else c===d?c?g[s]=[c,0]:g[s]=!0:g[s]=[c,d-c];return{start:f,end:m,markerLines:g}}function _Ue(e,t,r={}){let n=pUe(!1),o=e.split(Ple),{start:i,end:a,markerLines:s}=dUe(t,o,r),c=t.start&&typeof t.start.column=="number",p=String(a).length,d=e.split(Ple,a).slice(i,a).map((f,m)=>{let y=i+1+m,g=` ${` ${y}`.slice(-p)} |`,S=s[y],b=!s[y+1];if(S){let E="";if(Array.isArray(S)){let I=f.slice(0,Math.max(S[0]-1,0)).replace(/[^\t]/g," "),T=S[1]||1;E=[` + `,n.gutter(g.replace(/\d/g," "))," ",I,n.marker("^").repeat(T)].join(""),b&&r.message&&(E+=" "+n.message(r.message))}return[n.marker(">"),n.gutter(g),f.length>0?` ${f}`:"",E].join("")}else return` ${n.gutter(g)}${f.length>0?` ${f}`:""}`}).join(` +`);return r.message&&!c&&(d=`${" ".repeat(p+1)}${r.message} +${d}`),d}async function fUe(e,t){let r=await $q(t),n=r.preprocess?await r.preprocess(e,t):e;t.originalText=n;let o;try{o=await r.parse(n,t,t)}catch(i){mUe(i,e)}return{text:n,ast:o}}function mUe(e,t){let{loc:r}=e;if(r){let n=_Ue(t,r,{highlightCode:!0});throw e.message+=` +`+n,e.codeFrame=n,e}throw e}var tD=fUe;async function hUe(e,t,r,n,o){if(r.embeddedLanguageFormatting!=="auto")return;let{printer:i}=r,{embed:a}=i;if(!a)return;if(a.length>2)throw new Error("printer.embed has too many parameters. The API changed in Prettier v3. Please update your plugin. See https://prettier.io/docs/plugins#optional-embed");let{hasPrettierIgnore:s}=i,{getVisitorKeys:c}=a,p=[];m();let d=e.stack;for(let{print:y,node:g,pathStack:S}of p)try{e.stack=S;let b=await y(f,t,e,r);b&&o.set(g,b)}catch(b){if(globalThis.PRETTIER_DEBUG)throw b}e.stack=d;function f(y,g){return yUe(y,g,r,n)}function m(){let{node:y}=e;if(y===null||typeof y!="object"||s?.(e))return;for(let S of c(y))Array.isArray(y[S])?e.each(m,S):e.call(m,S);let g=a(e,r);if(g){if(typeof g=="function"){p.push({print:g,node:y,pathStack:[...e.stack]});return}o.set(y,g)}}}async function yUe(e,t,r,n){let o=await Mv({...r,...t,parentParser:r.parser,originalText:e,cursorOffset:void 0,rangeStart:void 0,rangeEnd:void 0},{passThrough:!0}),{ast:i}=await tD(e,o),a=await n(i,o);return zle(a)}function gUe(e,t,r,n){let{originalText:o,[Symbol.for("comments")]:i,locStart:a,locEnd:s,[Symbol.for("printedComments")]:c}=t,{node:p}=e,d=a(p),f=s(p);for(let y of i)a(y)>=d&&s(y)<=f&&c.add(y);let{printPrettierIgnored:m}=t.printer;return m?m(e,t,r,n):o.slice(d,f)}var SUe=gUe;async function g3(e,t){({ast:e}=await Iue(e,t));let r=new Map,n=new NBe(e),o=XBe(t),i=new Map;await hUe(n,s,t,g3,i);let a=await Ole(n,t,s,void 0,i);if(QBe(t),t.cursorOffset>=0){if(t.nodeAfterCursor&&!t.nodeBeforeCursor)return[fg,a];if(t.nodeBeforeCursor&&!t.nodeAfterCursor)return[a,fg]}return a;function s(p,d){return p===void 0||p===n?c(d):Array.isArray(p)?n.call(()=>c(d),...p):n.call(()=>c(d),p)}function c(p){o(n);let d=n.node;if(d==null)return"";let f=Oq(d)&&p===void 0;if(f&&r.has(d))return r.get(d);let m=Ole(n,t,s,p,i);return f&&r.set(d,m),m}}function Ole(e,t,r,n,o){let{node:i}=e,{printer:a}=t,s;switch(a.hasPrettierIgnore?.(e)?s=SUe(e,t,r,n):o.has(i)?s=o.get(i):s=a.print(e,t,r,n),i){case t.cursorNode:s=l3(s,c=>[fg,c,fg]);break;case t.nodeBeforeCursor:s=l3(s,c=>[c,fg]);break;case t.nodeAfterCursor:s=l3(s,c=>[fg,c]);break}return a.printComment&&!a.willPrintOwnComments?.(e,t)&&(s=WBe(e,s,t)),s}async function Iue(e,t){let r=e.comments??[];t[Symbol.for("comments")]=r,t[Symbol.for("printedComments")]=new Set,zBe(e,t);let{printer:{preprocess:n}}=t;return e=n?await n(e,t):e,{ast:e,comments:r}}function vUe(e,t){let{cursorOffset:r,locStart:n,locEnd:o,getVisitorKeys:i}=t,a=y=>n(y)<=r&&o(y)>=r,s=e,c=[e];for(let y of BBe(e,{getVisitorKeys:i,filter:a}))c.push(y),s=y;if(qBe(s,{getVisitorKeys:i}))return{cursorNode:s};let p,d,f=-1,m=Number.POSITIVE_INFINITY;for(;c.length>0&&(p===void 0||d===void 0);){s=c.pop();let y=p!==void 0,g=d!==void 0;for(let S of y3(s,{getVisitorKeys:i})){if(!y){let b=o(S);b<=r&&b>f&&(p=S,f=b)}if(!g){let b=n(S);b>=r&&ba(m,c)).filter(Boolean);let p={},d=new Set(o(s));for(let m in s)!Object.prototype.hasOwnProperty.call(s,m)||i?.has(m)||(d.has(m)?p[m]=a(s[m],s):p[m]=s[m]);let f=n(s,p,c);if(f!==null)return f??p}}var xUe=bUe,EUe=Array.prototype.findLastIndex??function(e){for(let t=this.length-1;t>=0;t--){let r=this[t];if(e(r,t,this))return t}return-1},TUe=YT("findLastIndex",function(){if(Array.isArray(this))return EUe}),DUe=TUe,AUe=({parser:e})=>e==="json"||e==="json5"||e==="jsonc"||e==="json-stringify";function IUe(e,t){return t=new Set(t),e.find(r=>kue.has(r.type)&&t.has(r))}function Nle(e){let t=DUe(0,e,r=>r.type!=="Program"&&r.type!=="File");return t===-1?e:e.slice(0,t+1)}function wUe(e,t,{locStart:r,locEnd:n}){let[o,...i]=e,[a,...s]=t;if(o===a)return[o,a];let c=r(o);for(let d of Nle(s))if(r(d)>=c)a=d;else break;let p=n(a);for(let d of Nle(i)){if(n(d)<=p)o=d;else break;if(o===a)break}return[o,a]}function xq(e,t,r,n,o=[],i){let{locStart:a,locEnd:s}=r,c=a(e),p=s(e);if(t>p||tn);let s=e.slice(n,o).search(/\S/u),c=s===-1;if(!c)for(n+=s;o>n&&!/\S/u.test(e[o-1]);--o);let p=xq(r,n,t,(y,g)=>Fle(t,y,g),[],"rangeStart");if(!p)return;let d=c?p:xq(r,o,t,y=>Fle(t,y),[],"rangeEnd");if(!d)return;let f,m;if(AUe(t)){let y=IUe(p,d);f=y,m=y}else[f,m]=wUe(p,d,t);return[Math.min(i(f),i(m)),Math.max(a(f),a(m))]}var Cue="\uFEFF",Rle=Symbol("cursor");async function Pue(e,t,r=0){if(!e||e.trim().length===0)return{formatted:"",cursorOffset:-1,comments:[]};let{ast:n,text:o}=await tD(e,t);t.cursorOffset>=0&&(t={...t,...wue(n,t)});let i=await g3(n,t,r);r>0&&(i=Kle([O_,i],r,t.tabWidth));let a=h3(i,t);if(r>0){let c=a.formatted.trim();a.cursorNodeStart!==void 0&&(a.cursorNodeStart-=a.formatted.indexOf(c),a.cursorNodeStart<0&&(a.cursorNodeStart=0,a.cursorNodeText=a.cursorNodeText.trimStart()),a.cursorNodeStart+a.cursorNodeText.length>c.length&&(a.cursorNodeText=a.cursorNodeText.trimEnd())),a.formatted=c+Aq(t.endOfLine)}let s=t[Symbol.for("comments")];if(t.cursorOffset>=0){let c,p,d,f;if((t.cursorNode||t.nodeBeforeCursor||t.nodeAfterCursor)&&a.cursorNodeText)if(d=a.cursorNodeStart,f=a.cursorNodeText,t.cursorNode)c=t.locStart(t.cursorNode),p=o.slice(c,t.locEnd(t.cursorNode));else{if(!t.nodeBeforeCursor&&!t.nodeAfterCursor)throw new Error("Cursor location must contain at least one of cursorNode, nodeBeforeCursor, nodeAfterCursor");c=t.nodeBeforeCursor?t.locEnd(t.nodeBeforeCursor):0;let E=t.nodeAfterCursor?t.locStart(t.nodeAfterCursor):o.length;p=o.slice(c,E)}else c=0,p=o,d=0,f=a.formatted;let m=t.cursorOffset-c;if(p===f)return{formatted:a.formatted,cursorOffset:d+m,comments:s};let y=p.split("");y.splice(m,0,Rle);let g=f.split(""),S=Nje(y,g),b=d;for(let E of S)if(E.removed){if(E.value.includes(Rle))break}else b+=E.count;return{formatted:a.formatted,cursorOffset:b,comments:s}}return{formatted:a.formatted,cursorOffset:-1,comments:s}}async function OUe(e,t){let{ast:r,text:n}=await tD(e,t),[o,i]=PUe(n,t,r)??[0,0],a=n.slice(o,i),s=Math.min(o,n.lastIndexOf(` +`,o)+1),c=n.slice(s,o).match(/^\s*/u)[0],p=Pq(c,t.tabWidth),d=await Pue(a,{...t,rangeStart:0,rangeEnd:Number.POSITIVE_INFINITY,cursorOffset:t.cursorOffset>o&&t.cursorOffset<=i?t.cursorOffset-o:-1,endOfLine:"lf"},p),f=d.formatted.trimEnd(),{cursorOffset:m}=t;m>i?m+=f.length-a.length:d.cursorOffset>=0&&(m=d.cursorOffset+o);let y=n.slice(0,o)+f+n.slice(i);if(t.endOfLine!=="lf"){let g=Aq(t.endOfLine);m>=0&&g===`\r +`&&(m+=qle(y.slice(0,m),` +`)),y=d3(0,y,` +`,g)}return{formatted:y,cursorOffset:m,comments:d.comments}}function gq(e,t,r){return typeof t!="number"||Number.isNaN(t)||t<0||t>e.length?r:t}function Lle(e,t){let{cursorOffset:r,rangeStart:n,rangeEnd:o}=t;return r=gq(e,r,-1),n=gq(e,n,0),o=gq(e,o,e.length),{...t,cursorOffset:r,rangeStart:n,rangeEnd:o}}function Oue(e,t){let{cursorOffset:r,rangeStart:n,rangeEnd:o,endOfLine:i}=Lle(e,t),a=e.charAt(0)===Cue;if(a&&(e=e.slice(1),r--,n--,o--),i==="auto"&&(i=Mje(e)),e.includes("\r")){let s=c=>qle(e.slice(0,Math.max(c,0)),`\r +`);r-=s(r),n-=s(n),o-=s(o),e=qje(e)}return{hasBOM:a,text:e,options:Lle(e,{...t,cursorOffset:r,rangeStart:n,rangeEnd:o,endOfLine:i})}}async function $le(e,t){let r=await $q(t);return!r.hasPragma||r.hasPragma(e)}async function NUe(e,t){return(await $q(t)).hasIgnorePragma?.(e)}async function Nue(e,t){let{hasBOM:r,text:n,options:o}=Oue(e,await Mv(t));if(o.rangeStart>=o.rangeEnd&&n!==""||o.requirePragma&&!await $le(n,o)||o.checkIgnorePragma&&await NUe(n,o))return{formatted:e,cursorOffset:t.cursorOffset,comments:[]};let i;return o.rangeStart>0||o.rangeEnd=0&&i.cursorOffset++),i}async function FUe(e,t,r){let{text:n,options:o}=Oue(e,await Mv(t)),i=await tD(n,o);return r&&(r.preprocessForPrint&&(i.ast=await Iue(i.ast,o)),r.massage&&(i.ast=xUe(i.ast,o))),i}async function RUe(e,t){t=await Mv(t);let r=await g3(e,t);return h3(r,t)}async function LUe(e,t){let r=gBe(e),{formatted:n}=await Nue(r,{...t,parser:"__js_expression"});return n}async function $Ue(e,t){t=await Mv(t);let{ast:r}=await tD(e,t);return t.cursorOffset>=0&&(t={...t,...wue(r,t)}),g3(r,t)}async function MUe(e,t){return h3(e,await Mv(t))}var Fue={};Tq(Fue,{builders:()=>jUe,printer:()=>BUe,utils:()=>qUe});var jUe={join:Hle,line:Zle,softline:mBe,hardline:O_,literalline:Qle,group:Gle,conditionalGroup:pBe,fill:uBe,lineSuffix:Sq,lineSuffixBoundary:hBe,cursor:fg,breakParent:m3,ifBreak:dBe,trim:yBe,indent:p3,indentIfBreak:_Be,align:$v,addAlignmentToDoc:Kle,markAsRoot:Vle,dedentToRoot:cBe,dedent:lBe,hardlineWithoutBreakParent:kq,literallineWithoutBreakParent:Wle,label:fBe,concat:e=>e},BUe={printDocToString:h3},qUe={willBreak:Qje,traverseDoc:Iq,findInDoc:wq,mapDoc:f3,removeLines:eBe,stripTrailingHardline:zle,replaceEndOfLine:nBe,canBreak:iBe},UUe="3.8.1",Rue={};Tq(Rue,{addDanglingComment:()=>dg,addLeadingComment:()=>QT,addTrailingComment:()=>XT,getAlignmentSize:()=>Pq,getIndentSize:()=>HUe,getMaxContinuousCount:()=>QUe,getNextNonSpaceNonCommentCharacter:()=>YUe,getNextNonSpaceNonCommentCharacterIndex:()=>lze,getPreferredQuote:()=>nze,getStringWidth:()=>Cq,hasNewline:()=>Lm,hasNewlineInRange:()=>ize,hasSpaces:()=>sze,isNextLineEmpty:()=>fze,isNextLineEmptyAfterIndex:()=>zq,isPreviousLineEmpty:()=>pze,makeString:()=>_ze,skip:()=>eD,skipEverythingButNewLine:()=>rue,skipInlineComment:()=>Bq,skipNewline:()=>mg,skipSpaces:()=>Mm,skipToLineEnd:()=>tue,skipTrailingComment:()=>qq,skipWhitespace:()=>RBe});function zUe(e,t){if(t===!1)return!1;if(e.charAt(t)==="/"&&e.charAt(t+1)==="*"){for(let r=t+2;rMath.max(n,o.length),0)/t.length}var QUe=WUe;function XUe(e,t){let r=Uq(e,t);return r===!1?"":e.charAt(r)}var YUe=XUe,Lue=Object.freeze({character:"'",codePoint:39}),$ue=Object.freeze({character:'"',codePoint:34}),eze=Object.freeze({preferred:Lue,alternate:$ue}),tze=Object.freeze({preferred:$ue,alternate:Lue});function rze(e,t){let{preferred:r,alternate:n}=t===!0||t==="'"?eze:tze,{length:o}=e,i=0,a=0;for(let s=0;sa?n:r).character}var nze=rze;function oze(e,t,r){for(let n=t;na===n?a:s===t?"\\"+s:s||(r&&/^[^\n\r"'0-7\\bfnrt-vx\u2028\u2029]$/u.test(a)?a:"\\"+a));return t+o+t}function fze(e,t){return arguments.length===2||typeof t=="number"?zq(e,t):dze(...arguments)}function _g(e,t=1){return async(...r)=>{let n=r[t]??{},o=n.plugins??[];return r[t]={...n,plugins:Array.isArray(o)?o:Object.values(o)},e(...r)}}var Mue=_g(Nue);async function S3(e,t){let{formatted:r}=await Mue(e,{...t,cursorOffset:-1});return r}async function mze(e,t){return await S3(e,t)===e}var hze=_g(uue,0),yze={parse:_g(FUe),formatAST:_g(RUe),formatDoc:_g(LUe),printToDoc:_g($Ue),printDocToString:_g(MUe)};var gze=Object.defineProperty,iU=(e,t)=>{for(var r in t)gze(e,r,{get:t[r],enumerable:!0})},aU={};iU(aU,{parsers:()=>hKe});var dpe={};iU(dpe,{__babel_estree:()=>lKe,__js_expression:()=>upe,__ts_expression:()=>ppe,__vue_event_binding:()=>cpe,__vue_expression:()=>upe,__vue_ts_event_binding:()=>lpe,__vue_ts_expression:()=>ppe,babel:()=>cpe,"babel-flow":()=>Upe,"babel-ts":()=>lpe});function Sze(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var Jm=class{line;column;index;constructor(e,t,r){this.line=e,this.column=t,this.index=r}},k3=class{start;end;filename;identifierName;constructor(e,t){this.start=e,this.end=t}};function Rl(e,t){let{line:r,column:n,index:o}=e;return new Jm(r,n+t,o+t)}var jue="BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED",vze={ImportMetaOutsideModule:{message:`import.meta may appear only with 'sourceType: "module"'`,code:jue},ImportOutsideModule:{message:`'import' and 'export' may appear only with 'sourceType: "module"'`,code:jue}},Bue={ArrayPattern:"array destructuring pattern",AssignmentExpression:"assignment expression",AssignmentPattern:"assignment expression",ArrowFunctionExpression:"arrow function expression",ConditionalExpression:"conditional expression",CatchClause:"catch clause",ForOfStatement:"for-of statement",ForInStatement:"for-in statement",ForStatement:"for-loop",FormalParameters:"function parameter list",Identifier:"identifier",ImportSpecifier:"import specifier",ImportDefaultSpecifier:"import default specifier",ImportNamespaceSpecifier:"import namespace specifier",ObjectPattern:"object destructuring pattern",ParenthesizedExpression:"parenthesized expression",RestElement:"rest element",UpdateExpression:{true:"prefix operation",false:"postfix operation"},VariableDeclarator:"variable declaration",YieldExpression:"yield expression"},T3=e=>e.type==="UpdateExpression"?Bue.UpdateExpression[`${e.prefix}`]:Bue[e.type],bze={AccessorIsGenerator:({kind:e})=>`A ${e}ter cannot be a generator.`,ArgumentsInClass:"'arguments' is only allowed in functions and class methods.",AsyncFunctionInSingleStatementContext:"Async functions can only be declared at the top level or inside a block.",AwaitBindingIdentifier:"Can not use 'await' as identifier inside an async function.",AwaitBindingIdentifierInStaticBlock:"Can not use 'await' as identifier inside a static block.",AwaitExpressionFormalParameter:"'await' is not allowed in async function parameters.",AwaitUsingNotInAsyncContext:"'await using' is only allowed within async functions and at the top levels of modules.",AwaitNotInAsyncContext:"'await' is only allowed within async functions and at the top levels of modules.",BadGetterArity:"A 'get' accessor must not have any formal parameters.",BadSetterArity:"A 'set' accessor must have exactly one formal parameter.",BadSetterRestParameter:"A 'set' accessor function argument must not be a rest parameter.",ConstructorClassField:"Classes may not have a field named 'constructor'.",ConstructorClassPrivateField:"Classes may not have a private field named '#constructor'.",ConstructorIsAccessor:"Class constructor may not be an accessor.",ConstructorIsAsync:"Constructor can't be an async function.",ConstructorIsGenerator:"Constructor can't be a generator.",DeclarationMissingInitializer:({kind:e})=>`Missing initializer in ${e} declaration.`,DecoratorArgumentsOutsideParentheses:"Decorator arguments must be moved inside parentheses: use '@(decorator(args))' instead of '@(decorator)(args)'.",DecoratorBeforeExport:"Decorators must be placed *before* the 'export' keyword. Remove the 'decoratorsBeforeExport: true' option to use the 'export @decorator class {}' syntax.",DecoratorsBeforeAfterExport:"Decorators can be placed *either* before or after the 'export' keyword, but not in both locations at the same time.",DecoratorConstructor:"Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?",DecoratorExportClass:"Decorators must be placed *after* the 'export' keyword. Remove the 'decoratorsBeforeExport: false' option to use the '@decorator export class {}' syntax.",DecoratorSemicolon:"Decorators must not be followed by a semicolon.",DecoratorStaticBlock:"Decorators can't be used with a static block.",DeferImportRequiresNamespace:'Only `import defer * as x from "./module"` is valid.',DeletePrivateField:"Deleting a private field is not allowed.",DestructureNamedImport:"ES2015 named imports do not destructure. Use another statement for destructuring after the import.",DuplicateConstructor:"Duplicate constructor in the same class.",DuplicateDefaultExport:"Only one default export allowed per module.",DuplicateExport:({exportName:e})=>`\`${e}\` has already been exported. Exported identifiers must be unique.`,DuplicateProto:"Redefinition of __proto__ property.",DuplicateRegExpFlags:"Duplicate regular expression flag.",ElementAfterRest:"Rest element must be last element.",EscapedCharNotAnIdentifier:"Invalid Unicode escape.",ExportBindingIsString:({localName:e,exportName:t})=>`A string literal cannot be used as an exported binding without \`from\`. +- Did you mean \`export { '${e}' as '${t}' } from 'some-module'\`?`,ExportDefaultFromAsIdentifier:"'from' is not allowed as an identifier after 'export default'.",ForInOfLoopInitializer:({type:e})=>`'${e==="ForInStatement"?"for-in":"for-of"}' loop variable declaration may not have an initializer.`,ForInUsing:"For-in loop may not start with 'using' declaration.",ForOfAsync:"The left-hand side of a for-of loop may not be 'async'.",ForOfLet:"The left-hand side of a for-of loop may not start with 'let'.",GeneratorInSingleStatementContext:"Generators can only be declared at the top level or inside a block.",IllegalBreakContinue:({type:e})=>`Unsyntactic ${e==="BreakStatement"?"break":"continue"}.`,IllegalLanguageModeDirective:"Illegal 'use strict' directive in function with non-simple parameter list.",IllegalReturn:"'return' outside of function.",ImportAttributesUseAssert:"The `assert` keyword in import attributes is deprecated and it has been replaced by the `with` keyword. You can enable the `deprecatedImportAssert` parser plugin to suppress this error.",ImportBindingIsString:({importName:e})=>`A string literal cannot be used as an imported binding. +- Did you mean \`import { "${e}" as foo }\`?`,ImportCallArity:"`import()` requires exactly one or two arguments.",ImportCallNotNewExpression:"Cannot use new with import(...).",ImportCallSpreadArgument:"`...` is not allowed in `import()`.",ImportJSONBindingNotDefault:"A JSON module can only be imported with `default`.",ImportReflectionHasAssertion:"`import module x` cannot have assertions.",ImportReflectionNotBinding:'Only `import module x from "./module"` is valid.',IncompatibleRegExpUVFlags:"The 'u' and 'v' regular expression flags cannot be enabled at the same time.",InvalidBigIntLiteral:"Invalid BigIntLiteral.",InvalidCodePoint:"Code point out of bounds.",InvalidCoverDiscardElement:"'void' must be followed by an expression when not used in a binding position.",InvalidCoverInitializedName:"Invalid shorthand property initializer.",InvalidDecimal:"Invalid decimal.",InvalidDigit:({radix:e})=>`Expected number in radix ${e}.`,InvalidEscapeSequence:"Bad character escape sequence.",InvalidEscapeSequenceTemplate:"Invalid escape sequence in template.",InvalidEscapedReservedWord:({reservedWord:e})=>`Escape sequence in keyword ${e}.`,InvalidIdentifier:({identifierName:e})=>`Invalid identifier ${e}.`,InvalidLhs:({ancestor:e})=>`Invalid left-hand side in ${T3(e)}.`,InvalidLhsBinding:({ancestor:e})=>`Binding invalid left-hand side in ${T3(e)}.`,InvalidLhsOptionalChaining:({ancestor:e})=>`Invalid optional chaining in the left-hand side of ${T3(e)}.`,InvalidNumber:"Invalid number.",InvalidOrMissingExponent:"Floating-point numbers require a valid exponent after the 'e'.",InvalidOrUnexpectedToken:({unexpected:e})=>`Unexpected character '${e}'.`,InvalidParenthesizedAssignment:"Invalid parenthesized assignment pattern.",InvalidPrivateFieldResolution:({identifierName:e})=>`Private name #${e} is not defined.`,InvalidPropertyBindingPattern:"Binding member expression.",InvalidRecordProperty:"Only properties and spread elements are allowed in record definitions.",InvalidRestAssignmentPattern:"Invalid rest operator's argument.",LabelRedeclaration:({labelName:e})=>`Label '${e}' is already declared.`,LetInLexicalBinding:"'let' is disallowed as a lexically bound name.",LineTerminatorBeforeArrow:"No line break is allowed before '=>'.",MalformedRegExpFlags:"Invalid regular expression flag.",MissingClassName:"A class name is required.",MissingEqInAssignment:"Only '=' operator can be used for specifying default value.",MissingSemicolon:"Missing semicolon.",MissingPlugin:({missingPlugin:e})=>`This experimental syntax requires enabling the parser plugin: ${e.map(t=>JSON.stringify(t)).join(", ")}.`,MissingOneOfPlugins:({missingPlugin:e})=>`This experimental syntax requires enabling one of the following parser plugin(s): ${e.map(t=>JSON.stringify(t)).join(", ")}.`,MissingUnicodeEscape:"Expecting Unicode escape sequence \\uXXXX.",MixingCoalesceWithLogical:"Nullish coalescing operator(??) requires parens when mixing with logical operators.",ModuleAttributeDifferentFromType:"The only accepted module attribute is `type`.",ModuleAttributeInvalidValue:"Only string literals are allowed as module attribute values.",ModuleAttributesWithDuplicateKeys:({key:e})=>`Duplicate key "${e}" is not allowed in module attributes.`,ModuleExportNameHasLoneSurrogate:({surrogateCharCode:e})=>`An export name cannot include a lone surrogate, found '\\u${e.toString(16)}'.`,ModuleExportUndefined:({localName:e})=>`Export '${e}' is not defined.`,MultipleDefaultsInSwitch:"Multiple default clauses.",NewlineAfterThrow:"Illegal newline after throw.",NoCatchOrFinally:"Missing catch or finally clause.",NumberIdentifier:"Identifier directly after number.",NumericSeparatorInEscapeSequence:"Numeric separators are not allowed inside unicode escape sequences or hex escape sequences.",ObsoleteAwaitStar:"'await*' has been removed from the async functions proposal. Use Promise.all() instead.",OptionalChainingNoNew:"Constructors in/after an Optional Chain are not allowed.",OptionalChainingNoTemplate:"Tagged Template Literals are not allowed in optionalChain.",OverrideOnConstructor:"'override' modifier cannot appear on a constructor declaration.",ParamDupe:"Argument name clash.",PatternHasAccessor:"Object pattern can't contain getter or setter.",PatternHasMethod:"Object pattern can't contain methods.",PrivateInExpectedIn:({identifierName:e})=>`Private names are only allowed in property accesses (\`obj.#${e}\`) or in \`in\` expressions (\`#${e} in obj\`).`,PrivateNameRedeclaration:({identifierName:e})=>`Duplicate private name #${e}.`,RecordExpressionBarIncorrectEndSyntaxType:"Record expressions ending with '|}' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",RecordExpressionBarIncorrectStartSyntaxType:"Record expressions starting with '{|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",RecordExpressionHashIncorrectStartSyntaxType:"Record expressions starting with '#{' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.",RecordNoProto:"'__proto__' is not allowed in Record expressions.",RestTrailingComma:"Unexpected trailing comma after rest element.",SloppyFunction:"In non-strict mode code, functions can only be declared at top level or inside a block.",SloppyFunctionAnnexB:"In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement.",SourcePhaseImportRequiresDefault:'Only `import source x from "./module"` is valid.',StaticPrototype:"Classes may not have static property named prototype.",SuperNotAllowed:"`super()` is only valid inside a class constructor of a subclass. Maybe a typo in the method name ('constructor') or not extending another class?",SuperPrivateField:"Private fields can't be accessed on super.",TrailingDecorator:"Decorators must be attached to a class element.",TupleExpressionBarIncorrectEndSyntaxType:"Tuple expressions ending with '|]' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",TupleExpressionBarIncorrectStartSyntaxType:"Tuple expressions starting with '[|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",TupleExpressionHashIncorrectStartSyntaxType:"Tuple expressions starting with '#[' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.",UnexpectedArgumentPlaceholder:"Unexpected argument placeholder.",UnexpectedAwaitAfterPipelineBody:'Unexpected "await" after pipeline body; await must have parentheses in minimal proposal.',UnexpectedDigitAfterHash:"Unexpected digit after hash token.",UnexpectedImportExport:"'import' and 'export' may only appear at the top level.",UnexpectedKeyword:({keyword:e})=>`Unexpected keyword '${e}'.`,UnexpectedLeadingDecorator:"Leading decorators must be attached to a class declaration.",UnexpectedLexicalDeclaration:"Lexical declaration cannot appear in a single-statement context.",UnexpectedNewTarget:"`new.target` can only be used in functions or class properties.",UnexpectedNumericSeparator:"A numeric separator is only allowed between two digits.",UnexpectedPrivateField:"Unexpected private name.",UnexpectedReservedWord:({reservedWord:e})=>`Unexpected reserved word '${e}'.`,UnexpectedSuper:"'super' is only allowed in object methods and classes.",UnexpectedToken:({expected:e,unexpected:t})=>`Unexpected token${t?` '${t}'.`:""}${e?`, expected "${e}"`:""}`,UnexpectedTokenUnaryExponentiation:"Illegal expression. Wrap left hand side or entire exponentiation in parentheses.",UnexpectedUsingDeclaration:"Using declaration cannot appear in the top level when source type is `script` or in the bare case statement.",UnexpectedVoidPattern:"Unexpected void binding.",UnsupportedBind:"Binding should be performed on object property.",UnsupportedDecoratorExport:"A decorated export must export a class declaration.",UnsupportedDefaultExport:"Only expressions, functions or classes are allowed as the `default` export.",UnsupportedImport:"`import` can only be used in `import()` or `import.meta`.",UnsupportedMetaProperty:({target:e,onlyValidPropertyName:t})=>`The only valid meta property for ${e} is ${e}.${t}.`,UnsupportedParameterDecorator:"Decorators cannot be used to decorate parameters.",UnsupportedPropertyDecorator:"Decorators cannot be used to decorate object literal properties.",UnsupportedSuper:"'super' can only be used with function calls (i.e. super()) or in property accesses (i.e. super.prop or super[prop]).",UnterminatedComment:"Unterminated comment.",UnterminatedRegExp:"Unterminated regular expression.",UnterminatedString:"Unterminated string constant.",UnterminatedTemplate:"Unterminated template.",UsingDeclarationExport:"Using declaration cannot be exported.",UsingDeclarationHasBindingPattern:"Using declaration cannot have destructuring patterns.",VarRedeclaration:({identifierName:e})=>`Identifier '${e}' has already been declared.`,VoidPatternCatchClauseParam:"A void binding can not be the catch clause parameter. Use `try { ... } catch { ... }` if you want to discard the caught error.",VoidPatternInitializer:"A void binding may not have an initializer.",YieldBindingIdentifier:"Can not use 'yield' as identifier inside a generator.",YieldInParameter:"Yield expression is not allowed in formal parameters.",YieldNotInGeneratorFunction:"'yield' is only allowed within generator functions.",ZeroDigitNumericSeparator:"Numeric separator can not be used after leading 0."},xze={StrictDelete:"Deleting local variable in strict mode.",StrictEvalArguments:({referenceName:e})=>`Assigning to '${e}' in strict mode.`,StrictEvalArgumentsBinding:({bindingName:e})=>`Binding '${e}' in strict mode.`,StrictFunction:"In strict mode code, functions can only be declared at top level or inside a block.",StrictNumericEscape:"The only valid numeric escape in strict mode is '\\0'.",StrictOctalLiteral:"Legacy octal literals are not allowed in strict mode.",StrictWith:"'with' in strict mode."},Eze={ParseExpressionEmptyInput:"Unexpected parseExpression() input: The input is empty or contains only comments.",ParseExpressionExpectsEOF:({unexpected:e})=>`Unexpected parseExpression() input: The input should contain exactly one expression, but the first expression is followed by the unexpected character \`${String.fromCodePoint(e)}\`.`},Tze=new Set(["ArrowFunctionExpression","AssignmentExpression","ConditionalExpression","YieldExpression"]),Dze=Object.assign({PipeBodyIsTighter:"Unexpected yield after pipeline body; any yield expression acting as Hack-style pipe body must be parenthesized due to its loose operator precedence.",PipeTopicRequiresHackPipes:'Topic references are only supported when using the `"proposal": "hack"` version of the pipeline proposal.',PipeTopicUnbound:"Topic reference is unbound; it must be inside a pipe body.",PipeTopicUnconfiguredToken:({token:e})=>`Invalid topic token ${e}. In order to use ${e} as a topic reference, the pipelineOperator plugin must be configured with { "proposal": "hack", "topicToken": "${e}" }.`,PipeTopicUnused:"Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once.",PipeUnparenthesizedBody:({type:e})=>`Hack-style pipe body cannot be an unparenthesized ${T3({type:e})}; please wrap it in parentheses.`},{}),Aze=["message"];function que(e,t,r){Object.defineProperty(e,t,{enumerable:!1,configurable:!0,value:r})}function Ize({toMessage:e,code:t,reasonCode:r,syntaxPlugin:n}){let o=r==="MissingPlugin"||r==="MissingOneOfPlugins";return function i(a,s){let c=new SyntaxError;return c.code=t,c.reasonCode=r,c.loc=a,c.pos=a.index,c.syntaxPlugin=n,o&&(c.missingPlugin=s.missingPlugin),que(c,"clone",function(p={}){let{line:d,column:f,index:m}=p.loc??a;return i(new Jm(d,f,m),Object.assign({},s,p.details))}),que(c,"details",s),Object.defineProperty(c,"message",{configurable:!0,get(){let p=`${e(s)} (${a.line}:${a.column})`;return this.message=p,p},set(p){Object.defineProperty(this,"message",{value:p,writable:!0})}}),c}}function Yp(e,t){if(Array.isArray(e))return n=>Yp(n,e[0]);let r={};for(let n of Object.keys(e)){let o=e[n],i=typeof o=="string"?{message:()=>o}:typeof o=="function"?{message:o}:o,{message:a}=i,s=Sze(i,Aze),c=typeof a=="string"?()=>a:a;r[n]=Ize(Object.assign({code:"BABEL_PARSER_SYNTAX_ERROR",reasonCode:n,toMessage:c},t?{syntaxPlugin:t}:{},s))}return r}var W=Object.assign({},Yp(vze),Yp(bze),Yp(xze),Yp(Eze),Yp`pipelineOperator`(Dze));function wze(){return{sourceType:"script",sourceFilename:void 0,startIndex:0,startColumn:0,startLine:1,allowAwaitOutsideFunction:!1,allowReturnOutsideFunction:!1,allowNewTargetOutsideFunction:!1,allowImportExportEverywhere:!1,allowSuperOutsideMethod:!1,allowUndeclaredExports:!1,allowYieldOutsideFunction:!1,plugins:[],strictMode:void 0,ranges:!1,tokens:!1,createImportExpressions:!0,createParenthesizedExpressions:!1,errorRecovery:!1,attachComment:!0,annexB:!0}}function kze(e){let t=wze();if(e==null)return t;if(e.annexB!=null&&e.annexB!==!1)throw new Error("The `annexB` option can only be set to `false`.");for(let r of Object.keys(t))e[r]!=null&&(t[r]=e[r]);if(t.startLine===1)e.startIndex==null&&t.startColumn>0?t.startIndex=t.startColumn:e.startColumn==null&&t.startIndex>0&&(t.startColumn=t.startIndex);else if(e.startColumn==null||e.startIndex==null)throw new Error("With a `startLine > 1` you must also specify `startIndex` and `startColumn`.");if(t.sourceType==="commonjs"){if(e.allowAwaitOutsideFunction!=null)throw new Error("The `allowAwaitOutsideFunction` option cannot be used with `sourceType: 'commonjs'`.");if(e.allowReturnOutsideFunction!=null)throw new Error("`sourceType: 'commonjs'` implies `allowReturnOutsideFunction: true`, please remove the `allowReturnOutsideFunction` option or use `sourceType: 'script'`.");if(e.allowNewTargetOutsideFunction!=null)throw new Error("`sourceType: 'commonjs'` implies `allowNewTargetOutsideFunction: true`, please remove the `allowNewTargetOutsideFunction` option or use `sourceType: 'script'`.")}return t}var{defineProperty:Cze}=Object,Uue=(e,t)=>{e&&Cze(e,t,{enumerable:!1,value:e[t]})};function rD(e){return Uue(e.loc.start,"index"),Uue(e.loc.end,"index"),e}var Pze=e=>class extends e{parse(){let t=rD(super.parse());return this.optionFlags&256&&(t.tokens=t.tokens.map(rD)),t}parseRegExpLiteral({pattern:t,flags:r}){let n=null;try{n=new RegExp(t,r)}catch{}let o=this.estreeParseLiteral(n);return o.regex={pattern:t,flags:r},o}parseBigIntLiteral(t){let r;try{r=BigInt(t)}catch{r=null}let n=this.estreeParseLiteral(r);return n.bigint=String(n.value||t),n}parseDecimalLiteral(t){let r=this.estreeParseLiteral(null);return r.decimal=String(r.value||t),r}estreeParseLiteral(t){return this.parseLiteral(t,"Literal")}parseStringLiteral(t){return this.estreeParseLiteral(t)}parseNumericLiteral(t){return this.estreeParseLiteral(t)}parseNullLiteral(){return this.estreeParseLiteral(null)}parseBooleanLiteral(t){return this.estreeParseLiteral(t)}estreeParseChainExpression(t,r){let n=this.startNodeAtNode(t);return n.expression=t,this.finishNodeAt(n,"ChainExpression",r)}directiveToStmt(t){let r=t.value;delete t.value,this.castNodeTo(r,"Literal"),r.raw=r.extra.raw,r.value=r.extra.expressionValue;let n=this.castNodeTo(t,"ExpressionStatement");return n.expression=r,n.directive=r.extra.rawValue,delete r.extra,n}fillOptionalPropertiesForTSESLint(t){}cloneEstreeStringLiteral(t){let{start:r,end:n,loc:o,range:i,raw:a,value:s}=t,c=Object.create(t.constructor.prototype);return c.type="Literal",c.start=r,c.end=n,c.loc=o,c.range=i,c.raw=a,c.value=s,c}initFunction(t,r){super.initFunction(t,r),t.expression=!1}checkDeclaration(t){t!=null&&this.isObjectProperty(t)?this.checkDeclaration(t.value):super.checkDeclaration(t)}getObjectOrClassMethodParams(t){return t.value.params}isValidDirective(t){return t.type==="ExpressionStatement"&&t.expression.type==="Literal"&&typeof t.expression.value=="string"&&!t.expression.extra?.parenthesized}parseBlockBody(t,r,n,o,i){super.parseBlockBody(t,r,n,o,i);let a=t.directives.map(s=>this.directiveToStmt(s));t.body=a.concat(t.body),delete t.directives}parsePrivateName(){let t=super.parsePrivateName();return this.convertPrivateNameToPrivateIdentifier(t)}convertPrivateNameToPrivateIdentifier(t){let r=super.getPrivateNameSV(t);return delete t.id,t.name=r,this.castNodeTo(t,"PrivateIdentifier")}isPrivateName(t){return t.type==="PrivateIdentifier"}getPrivateNameSV(t){return t.name}parseLiteral(t,r){let n=super.parseLiteral(t,r);return n.raw=n.extra.raw,delete n.extra,n}parseFunctionBody(t,r,n=!1){super.parseFunctionBody(t,r,n),t.expression=t.body.type!=="BlockStatement"}parseMethod(t,r,n,o,i,a,s=!1){let c=this.startNode();c.kind=t.kind,c=super.parseMethod(c,r,n,o,i,a,s),delete c.kind;let{typeParameters:p}=t;p&&(delete t.typeParameters,c.typeParameters=p,this.resetStartLocationFromNode(c,p));let d=this.castNodeTo(c,this.hasPlugin("typescript")&&!c.body?"TSEmptyBodyFunctionExpression":"FunctionExpression");return t.value=d,a==="ClassPrivateMethod"&&(t.computed=!1),this.hasPlugin("typescript")&&t.abstract?(delete t.abstract,this.finishNode(t,"TSAbstractMethodDefinition")):a==="ObjectMethod"?(t.kind==="method"&&(t.kind="init"),t.shorthand=!1,this.finishNode(t,"Property")):this.finishNode(t,"MethodDefinition")}nameIsConstructor(t){return t.type==="Literal"?t.value==="constructor":super.nameIsConstructor(t)}parseClassProperty(...t){let r=super.parseClassProperty(...t);return r.abstract&&this.hasPlugin("typescript")?(delete r.abstract,this.castNodeTo(r,"TSAbstractPropertyDefinition")):this.castNodeTo(r,"PropertyDefinition"),r}parseClassPrivateProperty(...t){let r=super.parseClassPrivateProperty(...t);return r.abstract&&this.hasPlugin("typescript")?this.castNodeTo(r,"TSAbstractPropertyDefinition"):this.castNodeTo(r,"PropertyDefinition"),r.computed=!1,r}parseClassAccessorProperty(t){let r=super.parseClassAccessorProperty(t);return r.abstract&&this.hasPlugin("typescript")?(delete r.abstract,this.castNodeTo(r,"TSAbstractAccessorProperty")):this.castNodeTo(r,"AccessorProperty"),r}parseObjectProperty(t,r,n,o){let i=super.parseObjectProperty(t,r,n,o);return i&&(i.kind="init",this.castNodeTo(i,"Property")),i}finishObjectProperty(t){return t.kind="init",this.finishNode(t,"Property")}isValidLVal(t,r,n,o){return t==="Property"?"value":super.isValidLVal(t,r,n,o)}isAssignable(t,r){return t!=null&&this.isObjectProperty(t)?this.isAssignable(t.value,r):super.isAssignable(t,r)}toAssignable(t,r=!1){if(t!=null&&this.isObjectProperty(t)){let{key:n,value:o}=t;this.isPrivateName(n)&&this.classScope.usePrivateName(this.getPrivateNameSV(n),n.loc.start),this.toAssignable(o,r)}else super.toAssignable(t,r)}toAssignableObjectExpressionProp(t,r,n){t.type==="Property"&&(t.kind==="get"||t.kind==="set")?this.raise(W.PatternHasAccessor,t.key):t.type==="Property"&&t.method?this.raise(W.PatternHasMethod,t.key):super.toAssignableObjectExpressionProp(t,r,n)}finishCallExpression(t,r){let n=super.finishCallExpression(t,r);return n.callee.type==="Import"?(this.castNodeTo(n,"ImportExpression"),n.source=n.arguments[0],n.options=n.arguments[1]??null,delete n.arguments,delete n.callee):n.type==="OptionalCallExpression"?this.castNodeTo(n,"CallExpression"):n.optional=!1,n}toReferencedArguments(t){t.type!=="ImportExpression"&&super.toReferencedArguments(t)}parseExport(t,r){let n=this.state.lastTokStartLoc,o=super.parseExport(t,r);switch(o.type){case"ExportAllDeclaration":o.exported=null;break;case"ExportNamedDeclaration":o.specifiers.length===1&&o.specifiers[0].type==="ExportNamespaceSpecifier"&&(this.castNodeTo(o,"ExportAllDeclaration"),o.exported=o.specifiers[0].exported,delete o.specifiers);case"ExportDefaultDeclaration":{let{declaration:i}=o;i?.type==="ClassDeclaration"&&i.decorators?.length>0&&i.start===o.start&&this.resetStartLocation(o,n)}break}return o}stopParseSubscript(t,r){let n=super.stopParseSubscript(t,r);return r.optionalChainMember?this.estreeParseChainExpression(n,t.loc.end):n}parseMember(t,r,n,o,i){let a=super.parseMember(t,r,n,o,i);return a.type==="OptionalMemberExpression"?this.castNodeTo(a,"MemberExpression"):a.optional=!1,a}isOptionalMemberExpression(t){return t.type==="ChainExpression"?t.expression.type==="MemberExpression":super.isOptionalMemberExpression(t)}hasPropertyAsPrivateName(t){return t.type==="ChainExpression"&&(t=t.expression),super.hasPropertyAsPrivateName(t)}isObjectProperty(t){return t.type==="Property"&&t.kind==="init"&&!t.method}isObjectMethod(t){return t.type==="Property"&&(t.method||t.kind==="get"||t.kind==="set")}castNodeTo(t,r){let n=super.castNodeTo(t,r);return this.fillOptionalPropertiesForTSESLint(n),n}cloneIdentifier(t){let r=super.cloneIdentifier(t);return this.fillOptionalPropertiesForTSESLint(r),r}cloneStringLiteral(t){return t.type==="Literal"?this.cloneEstreeStringLiteral(t):super.cloneStringLiteral(t)}finishNodeAt(t,r,n){return rD(super.finishNodeAt(t,r,n))}finishNode(t,r){let n=super.finishNode(t,r);return this.fillOptionalPropertiesForTSESLint(n),n}resetStartLocation(t,r){super.resetStartLocation(t,r),rD(t)}resetEndLocation(t,r=this.state.lastTokEndLoc){super.resetEndLocation(t,r),rD(t)}},v3=class{constructor(e,t){this.token=e,this.preserveSpace=!!t}token;preserveSpace},Lo={brace:new v3("{"),j_oTag:new v3("...",!0)},Xr=!0,ct=!0,Jq=!0,nD=!0,qm=!0,Oze=!0,_pe=class{label;keyword;beforeExpr;startsExpr;rightAssociative;isLoop;isAssign;prefix;postfix;binop;constructor(e,t={}){this.label=e,this.keyword=t.keyword,this.beforeExpr=!!t.beforeExpr,this.startsExpr=!!t.startsExpr,this.rightAssociative=!!t.rightAssociative,this.isLoop=!!t.isLoop,this.isAssign=!!t.isAssign,this.prefix=!!t.prefix,this.postfix=!!t.postfix,this.binop=t.binop!=null?t.binop:null}},sU=new Map;function wn(e,t={}){t.keyword=e;let r=Wt(e,t);return sU.set(e,r),r}function Cs(e,t){return Wt(e,{beforeExpr:Xr,binop:t})}var cD=-1,cU=[],lU=[],uU=[],pU=[],dU=[],_U=[];function Wt(e,t={}){return++cD,lU.push(e),uU.push(t.binop??-1),pU.push(t.beforeExpr??!1),dU.push(t.startsExpr??!1),_U.push(t.prefix??!1),cU.push(new _pe(e,t)),cD}function cn(e,t={}){return++cD,sU.set(e,cD),lU.push(e),uU.push(t.binop??-1),pU.push(t.beforeExpr??!1),dU.push(t.startsExpr??!1),_U.push(t.prefix??!1),cU.push(new _pe("name",t)),cD}var Nze={bracketL:Wt("[",{beforeExpr:Xr,startsExpr:ct}),bracketHashL:Wt("#[",{beforeExpr:Xr,startsExpr:ct}),bracketBarL:Wt("[|",{beforeExpr:Xr,startsExpr:ct}),bracketR:Wt("]"),bracketBarR:Wt("|]"),braceL:Wt("{",{beforeExpr:Xr,startsExpr:ct}),braceBarL:Wt("{|",{beforeExpr:Xr,startsExpr:ct}),braceHashL:Wt("#{",{beforeExpr:Xr,startsExpr:ct}),braceR:Wt("}"),braceBarR:Wt("|}"),parenL:Wt("(",{beforeExpr:Xr,startsExpr:ct}),parenR:Wt(")"),comma:Wt(",",{beforeExpr:Xr}),semi:Wt(";",{beforeExpr:Xr}),colon:Wt(":",{beforeExpr:Xr}),doubleColon:Wt("::",{beforeExpr:Xr}),dot:Wt("."),question:Wt("?",{beforeExpr:Xr}),questionDot:Wt("?."),arrow:Wt("=>",{beforeExpr:Xr}),template:Wt("template"),ellipsis:Wt("...",{beforeExpr:Xr}),backQuote:Wt("`",{startsExpr:ct}),dollarBraceL:Wt("${",{beforeExpr:Xr,startsExpr:ct}),templateTail:Wt("...`",{startsExpr:ct}),templateNonTail:Wt("...${",{beforeExpr:Xr,startsExpr:ct}),at:Wt("@"),hash:Wt("#",{startsExpr:ct}),interpreterDirective:Wt("#!..."),eq:Wt("=",{beforeExpr:Xr,isAssign:nD}),assign:Wt("_=",{beforeExpr:Xr,isAssign:nD}),slashAssign:Wt("_=",{beforeExpr:Xr,isAssign:nD}),xorAssign:Wt("_=",{beforeExpr:Xr,isAssign:nD}),moduloAssign:Wt("_=",{beforeExpr:Xr,isAssign:nD}),incDec:Wt("++/--",{prefix:qm,postfix:Oze,startsExpr:ct}),bang:Wt("!",{beforeExpr:Xr,prefix:qm,startsExpr:ct}),tilde:Wt("~",{beforeExpr:Xr,prefix:qm,startsExpr:ct}),doubleCaret:Wt("^^",{startsExpr:ct}),doubleAt:Wt("@@",{startsExpr:ct}),pipeline:Cs("|>",0),nullishCoalescing:Cs("??",1),logicalOR:Cs("||",1),logicalAND:Cs("&&",2),bitwiseOR:Cs("|",3),bitwiseXOR:Cs("^",4),bitwiseAND:Cs("&",5),equality:Cs("==/!=/===/!==",6),lt:Cs("/<=/>=",7),gt:Cs("/<=/>=",7),relational:Cs("/<=/>=",7),bitShift:Cs("<>/>>>",8),bitShiftL:Cs("<>/>>>",8),bitShiftR:Cs("<>/>>>",8),plusMin:Wt("+/-",{beforeExpr:Xr,binop:9,prefix:qm,startsExpr:ct}),modulo:Wt("%",{binop:10,startsExpr:ct}),star:Wt("*",{binop:10}),slash:Cs("/",10),exponent:Wt("**",{beforeExpr:Xr,binop:11,rightAssociative:!0}),_in:wn("in",{beforeExpr:Xr,binop:7}),_instanceof:wn("instanceof",{beforeExpr:Xr,binop:7}),_break:wn("break"),_case:wn("case",{beforeExpr:Xr}),_catch:wn("catch"),_continue:wn("continue"),_debugger:wn("debugger"),_default:wn("default",{beforeExpr:Xr}),_else:wn("else",{beforeExpr:Xr}),_finally:wn("finally"),_function:wn("function",{startsExpr:ct}),_if:wn("if"),_return:wn("return",{beforeExpr:Xr}),_switch:wn("switch"),_throw:wn("throw",{beforeExpr:Xr,prefix:qm,startsExpr:ct}),_try:wn("try"),_var:wn("var"),_const:wn("const"),_with:wn("with"),_new:wn("new",{beforeExpr:Xr,startsExpr:ct}),_this:wn("this",{startsExpr:ct}),_super:wn("super",{startsExpr:ct}),_class:wn("class",{startsExpr:ct}),_extends:wn("extends",{beforeExpr:Xr}),_export:wn("export"),_import:wn("import",{startsExpr:ct}),_null:wn("null",{startsExpr:ct}),_true:wn("true",{startsExpr:ct}),_false:wn("false",{startsExpr:ct}),_typeof:wn("typeof",{beforeExpr:Xr,prefix:qm,startsExpr:ct}),_void:wn("void",{beforeExpr:Xr,prefix:qm,startsExpr:ct}),_delete:wn("delete",{beforeExpr:Xr,prefix:qm,startsExpr:ct}),_do:wn("do",{isLoop:Jq,beforeExpr:Xr}),_for:wn("for",{isLoop:Jq}),_while:wn("while",{isLoop:Jq}),_as:cn("as",{startsExpr:ct}),_assert:cn("assert",{startsExpr:ct}),_async:cn("async",{startsExpr:ct}),_await:cn("await",{startsExpr:ct}),_defer:cn("defer",{startsExpr:ct}),_from:cn("from",{startsExpr:ct}),_get:cn("get",{startsExpr:ct}),_let:cn("let",{startsExpr:ct}),_meta:cn("meta",{startsExpr:ct}),_of:cn("of",{startsExpr:ct}),_sent:cn("sent",{startsExpr:ct}),_set:cn("set",{startsExpr:ct}),_source:cn("source",{startsExpr:ct}),_static:cn("static",{startsExpr:ct}),_using:cn("using",{startsExpr:ct}),_yield:cn("yield",{startsExpr:ct}),_asserts:cn("asserts",{startsExpr:ct}),_checks:cn("checks",{startsExpr:ct}),_exports:cn("exports",{startsExpr:ct}),_global:cn("global",{startsExpr:ct}),_implements:cn("implements",{startsExpr:ct}),_intrinsic:cn("intrinsic",{startsExpr:ct}),_infer:cn("infer",{startsExpr:ct}),_is:cn("is",{startsExpr:ct}),_mixins:cn("mixins",{startsExpr:ct}),_proto:cn("proto",{startsExpr:ct}),_require:cn("require",{startsExpr:ct}),_satisfies:cn("satisfies",{startsExpr:ct}),_keyof:cn("keyof",{startsExpr:ct}),_readonly:cn("readonly",{startsExpr:ct}),_unique:cn("unique",{startsExpr:ct}),_abstract:cn("abstract",{startsExpr:ct}),_declare:cn("declare",{startsExpr:ct}),_enum:cn("enum",{startsExpr:ct}),_module:cn("module",{startsExpr:ct}),_namespace:cn("namespace",{startsExpr:ct}),_interface:cn("interface",{startsExpr:ct}),_type:cn("type",{startsExpr:ct}),_opaque:cn("opaque",{startsExpr:ct}),name:Wt("name",{startsExpr:ct}),placeholder:Wt("%%",{startsExpr:ct}),string:Wt("string",{startsExpr:ct}),num:Wt("num",{startsExpr:ct}),bigint:Wt("bigint",{startsExpr:ct}),decimal:Wt("decimal",{startsExpr:ct}),regexp:Wt("regexp",{startsExpr:ct}),privateName:Wt("#name",{startsExpr:ct}),eof:Wt("eof"),jsxName:Wt("jsxName"),jsxText:Wt("jsxText",{beforeExpr:Xr}),jsxTagStart:Wt("jsxTagStart",{startsExpr:ct}),jsxTagEnd:Wt("jsxTagEnd")};function Qn(e){return e>=93&&e<=133}function Fze(e){return e<=92}function Ou(e){return e>=58&&e<=133}function fpe(e){return e>=58&&e<=137}function Rze(e){return pU[e]}function aD(e){return dU[e]}function Lze(e){return e>=29&&e<=33}function zue(e){return e>=129&&e<=131}function $ze(e){return e>=90&&e<=92}function fU(e){return e>=58&&e<=92}function Mze(e){return e>=39&&e<=59}function jze(e){return e===34}function Bze(e){return _U[e]}function qze(e){return e>=121&&e<=123}function Uze(e){return e>=124&&e<=130}function Vm(e){return lU[e]}function D3(e){return uU[e]}function zze(e){return e===57}function Xq(e){return e>=24&&e<=25}function mpe(e){return cU[e]}var mU="\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088F\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5C\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDC-\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C8A\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7DC\uA7F1-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC",hpe="\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0897-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1ADD\u1AE0-\u1AEB\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u200C\u200D\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\u30FB\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F\uFF65",Jze=new RegExp("["+mU+"]"),Vze=new RegExp("["+mU+hpe+"]");mU=hpe=null;var ype=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,4,51,13,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,7,25,39,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,39,27,10,22,251,41,7,1,17,5,57,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,31,9,2,0,3,0,2,37,2,0,26,0,2,0,45,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,200,32,32,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,24,43,261,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,26,3994,6,582,6842,29,1763,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,433,44,212,63,33,24,3,24,45,74,6,0,67,12,65,1,2,0,15,4,10,7381,42,31,98,114,8702,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,229,29,3,0,208,30,2,2,2,1,2,6,3,4,10,1,225,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4381,3,5773,3,7472,16,621,2467,541,1507,4938,6,8489],Kze=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,7,9,32,4,318,1,78,5,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,68,8,2,0,3,0,2,3,2,4,2,0,15,1,83,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,7,19,58,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,199,7,137,9,54,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,55,9,266,3,10,1,2,0,49,6,4,4,14,10,5350,0,7,14,11465,27,2343,9,87,9,39,4,60,6,26,9,535,9,470,0,2,54,8,3,82,0,12,1,19628,1,4178,9,519,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,245,1,2,9,233,0,3,0,8,1,6,0,475,6,110,6,6,9,4759,9,787719,239];function Yq(e,t){let r=65536;for(let n=0,o=t.length;ne)return!1;if(r+=t[n+1],r>=e)return!0}return!1}function ed(e){return e<65?e===36:e<=90?!0:e<97?e===95:e<=122?!0:e<=65535?e>=170&&Jze.test(String.fromCharCode(e)):Yq(e,ype)}function Sg(e){return e<48?e===36:e<58?!0:e<65?!1:e<=90?!0:e<97?e===95:e<=122?!0:e<=65535?e>=170&&Vze.test(String.fromCharCode(e)):Yq(e,ype)||Yq(e,Kze)}var hU={keyword:["break","case","catch","continue","debugger","default","do","else","finally","for","function","if","return","switch","throw","try","var","const","while","with","new","this","super","class","extends","export","import","null","true","false","in","instanceof","typeof","void","delete"],strict:["implements","interface","let","package","private","protected","public","static","yield"],strictBind:["eval","arguments"]},Gze=new Set(hU.keyword),Hze=new Set(hU.strict),Zze=new Set(hU.strictBind);function gpe(e,t){return t&&e==="await"||e==="enum"}function Spe(e,t){return gpe(e,t)||Hze.has(e)}function vpe(e){return Zze.has(e)}function bpe(e,t){return Spe(e,t)||vpe(e)}function Wze(e){return Gze.has(e)}function Qze(e,t,r){return e===64&&t===64&&ed(r)}var Xze=new Set(["break","case","catch","continue","debugger","default","do","else","finally","for","function","if","return","switch","throw","try","var","const","while","with","new","this","super","class","extends","export","import","null","true","false","in","instanceof","typeof","void","delete","implements","interface","let","package","private","protected","public","static","yield","eval","arguments","enum","await"]);function Yze(e){return Xze.has(e)}var yU=class{flags=0;names=new Map;firstLexicalName="";constructor(e){this.flags=e}},gU=class{parser;scopeStack=[];inModule;undefinedExports=new Map;constructor(e,t){this.parser=e,this.inModule=t}get inTopLevel(){return(this.currentScope().flags&1)>0}get inFunction(){return(this.currentVarScopeFlags()&2)>0}get allowSuper(){return(this.currentThisScopeFlags()&16)>0}get allowDirectSuper(){return(this.currentThisScopeFlags()&32)>0}get allowNewTarget(){return(this.currentThisScopeFlags()&512)>0}get inClass(){return(this.currentThisScopeFlags()&64)>0}get inClassAndNotInNonArrowFunction(){let e=this.currentThisScopeFlags();return(e&64)>0&&(e&2)===0}get inStaticBlock(){for(let e=this.scopeStack.length-1;;e--){let{flags:t}=this.scopeStack[e];if(t&128)return!0;if(t&1731)return!1}}get inNonArrowFunction(){return(this.currentThisScopeFlags()&2)>0}get inBareCaseStatement(){return(this.currentScope().flags&256)>0}get treatFunctionsAsVar(){return this.treatFunctionsAsVarInScope(this.currentScope())}createScope(e){return new yU(e)}enter(e){this.scopeStack.push(this.createScope(e))}exit(){return this.scopeStack.pop().flags}treatFunctionsAsVarInScope(e){return!!(e.flags&130||!this.parser.inModule&&e.flags&1)}declareName(e,t,r){let n=this.currentScope();if(t&8||t&16){this.checkRedeclarationInScope(n,e,t,r);let o=n.names.get(e)||0;t&16?o=o|4:(n.firstLexicalName||(n.firstLexicalName=e),o=o|2),n.names.set(e,o),t&8&&this.maybeExportDefined(n,e)}else if(t&4)for(let o=this.scopeStack.length-1;o>=0&&(n=this.scopeStack[o],this.checkRedeclarationInScope(n,e,t,r),n.names.set(e,(n.names.get(e)||0)|1),this.maybeExportDefined(n,e),!(n.flags&1667));--o);this.parser.inModule&&n.flags&1&&this.undefinedExports.delete(e)}maybeExportDefined(e,t){this.parser.inModule&&e.flags&1&&this.undefinedExports.delete(t)}checkRedeclarationInScope(e,t,r,n){this.isRedeclaredInScope(e,t,r)&&this.parser.raise(W.VarRedeclaration,n,{identifierName:t})}isRedeclaredInScope(e,t,r){if(!(r&1))return!1;if(r&8)return e.names.has(t);let n=e.names.get(t)||0;return r&16?(n&2)>0||!this.treatFunctionsAsVarInScope(e)&&(n&1)>0:(n&2)>0&&!(e.flags&8&&e.firstLexicalName===t)||!this.treatFunctionsAsVarInScope(e)&&(n&4)>0}checkLocalExport(e){let{name:t}=e;this.scopeStack[0].names.has(t)||this.undefinedExports.set(t,e.loc.start)}currentScope(){return this.scopeStack[this.scopeStack.length-1]}currentVarScopeFlags(){for(let e=this.scopeStack.length-1;;e--){let{flags:t}=this.scopeStack[e];if(t&1667)return t}}currentThisScopeFlags(){for(let e=this.scopeStack.length-1;;e--){let{flags:t}=this.scopeStack[e];if(t&1731&&!(t&4))return t}}},eJe=class extends yU{declareFunctions=new Set},tJe=class extends gU{createScope(e){return new eJe(e)}declareName(e,t,r){let n=this.currentScope();if(t&2048){this.checkRedeclarationInScope(n,e,t,r),this.maybeExportDefined(n,e),n.declareFunctions.add(e);return}super.declareName(e,t,r)}isRedeclaredInScope(e,t,r){if(super.isRedeclaredInScope(e,t,r))return!0;if(r&2048&&!e.declareFunctions.has(t)){let n=e.names.get(t);return(n&4)>0||(n&2)>0}return!1}checkLocalExport(e){this.scopeStack[0].declareFunctions.has(e.name)||super.checkLocalExport(e)}},rJe=new Set(["_","any","bool","boolean","empty","extends","false","interface","mixed","null","number","static","string","true","typeof","void"]),Xt=Yp`flow`({AmbiguousConditionalArrow:"Ambiguous expression: wrap the arrow functions in parentheses to disambiguate.",AmbiguousDeclareModuleKind:"Found both `declare module.exports` and `declare export` in the same module. Modules can only have 1 since they are either an ES module or they are a CommonJS module.",AssignReservedType:({reservedType:e})=>`Cannot overwrite reserved type ${e}.`,DeclareClassElement:"The `declare` modifier can only appear on class fields.",DeclareClassFieldInitializer:"Initializers are not allowed in fields with the `declare` modifier.",DuplicateDeclareModuleExports:"Duplicate `declare module.exports` statement.",EnumBooleanMemberNotInitialized:({memberName:e,enumName:t})=>`Boolean enum members need to be initialized. Use either \`${e} = true,\` or \`${e} = false,\` in enum \`${t}\`.`,EnumDuplicateMemberName:({memberName:e,enumName:t})=>`Enum member names need to be unique, but the name \`${e}\` has already been used before in enum \`${t}\`.`,EnumInconsistentMemberValues:({enumName:e})=>`Enum \`${e}\` has inconsistent member initializers. Either use no initializers, or consistently use literals (either booleans, numbers, or strings) for all member initializers.`,EnumInvalidExplicitType:({invalidEnumType:e,enumName:t})=>`Enum type \`${e}\` is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${t}\`.`,EnumInvalidExplicitTypeUnknownSupplied:({enumName:e})=>`Supplied enum type is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${e}\`.`,EnumInvalidMemberInitializerPrimaryType:({enumName:e,memberName:t,explicitType:r})=>`Enum \`${e}\` has type \`${r}\`, so the initializer of \`${t}\` needs to be a ${r} literal.`,EnumInvalidMemberInitializerSymbolType:({enumName:e,memberName:t})=>`Symbol enum members cannot be initialized. Use \`${t},\` in enum \`${e}\`.`,EnumInvalidMemberInitializerUnknownType:({enumName:e,memberName:t})=>`The enum member initializer for \`${t}\` needs to be a literal (either a boolean, number, or string) in enum \`${e}\`.`,EnumInvalidMemberName:({enumName:e,memberName:t,suggestion:r})=>`Enum member names cannot start with lowercase 'a' through 'z'. Instead of using \`${t}\`, consider using \`${r}\`, in enum \`${e}\`.`,EnumNumberMemberNotInitialized:({enumName:e,memberName:t})=>`Number enum members need to be initialized, e.g. \`${t} = 1\` in enum \`${e}\`.`,EnumStringMemberInconsistentlyInitialized:({enumName:e})=>`String enum members need to consistently either all use initializers, or use no initializers, in enum \`${e}\`.`,GetterMayNotHaveThisParam:"A getter cannot have a `this` parameter.",ImportReflectionHasImportType:"An `import module` declaration can not use `type` or `typeof` keyword.",ImportTypeShorthandOnlyInPureImport:"The `type` and `typeof` keywords on named imports can only be used on regular `import` statements. It cannot be used with `import type` or `import typeof` statements.",InexactInsideExact:"Explicit inexact syntax cannot appear inside an explicit exact object type.",InexactInsideNonObject:"Explicit inexact syntax cannot appear in class or interface definitions.",InexactVariance:"Explicit inexact syntax cannot have variance.",InvalidNonTypeImportInDeclareModule:"Imports within a `declare module` body must always be `import type` or `import typeof`.",MissingTypeParamDefault:"Type parameter declaration needs a default, since a preceding type parameter declaration has a default.",NestedDeclareModule:"`declare module` cannot be used inside another `declare module`.",NestedFlowComment:"Cannot have a flow comment inside another flow comment.",PatternIsOptional:Object.assign({message:"A binding pattern parameter cannot be optional in an implementation signature."},{}),SetterMayNotHaveThisParam:"A setter cannot have a `this` parameter.",SpreadVariance:"Spread properties cannot have variance.",ThisParamAnnotationRequired:"A type annotation is required for the `this` parameter.",ThisParamBannedInConstructor:"Constructors cannot have a `this` parameter; constructors don't bind `this` like other functions.",ThisParamMayNotBeOptional:"The `this` parameter cannot be optional.",ThisParamMustBeFirst:"The `this` parameter must be the first function parameter.",ThisParamNoDefault:"The `this` parameter may not have a default value.",TypeBeforeInitializer:"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.",TypeCastInPattern:"The type cast expression is expected to be wrapped with parenthesis.",UnexpectedExplicitInexactInObject:"Explicit inexact syntax must appear at the end of an inexact object.",UnexpectedReservedType:({reservedType:e})=>`Unexpected reserved type ${e}.`,UnexpectedReservedUnderscore:"`_` is only allowed as a type argument to call or new.",UnexpectedSpaceBetweenModuloChecks:"Spaces between `%` and `checks` are not allowed here.",UnexpectedSpreadType:"Spread operator cannot appear in class or interface definitions.",UnexpectedSubtractionOperand:'Unexpected token, expected "number" or "bigint".',UnexpectedTokenAfterTypeParameter:"Expected an arrow function after this type parameter declaration.",UnexpectedTypeParameterBeforeAsyncArrowFunction:"Type parameters must come after the async keyword, e.g. instead of ` async () => {}`, use `async () => {}`.",UnsupportedDeclareExportKind:({unsupportedExportKind:e,suggestion:t})=>`\`declare export ${e}\` is not supported. Use \`${t}\` instead.`,UnsupportedStatementInDeclareModule:"Only declares and type imports are allowed inside declare module.",UnterminatedFlowComment:"Unterminated flow-comment."});function nJe(e){return e.type==="DeclareExportAllDeclaration"||e.type==="DeclareExportDeclaration"&&(!e.declaration||e.declaration.type!=="TypeAlias"&&e.declaration.type!=="InterfaceDeclaration")}function Jue(e){return e.importKind==="type"||e.importKind==="typeof"}var oJe={const:"declare export var",let:"declare export var",type:"export type",interface:"export interface"};function iJe(e,t){let r=[],n=[];for(let o=0;oclass extends e{flowPragma=void 0;getScopeHandler(){return tJe}shouldParseTypes(){return this.getPluginOption("flow","all")||this.flowPragma==="flow"}finishToken(t,r){t!==134&&t!==13&&t!==28&&this.flowPragma===void 0&&(this.flowPragma=null),super.finishToken(t,r)}addComment(t){if(this.flowPragma===void 0){let r=aJe.exec(t.value);if(r)if(r[1]==="flow")this.flowPragma="flow";else if(r[1]==="noflow")this.flowPragma="noflow";else throw new Error("Unexpected flow pragma")}super.addComment(t)}flowParseTypeInitialiser(t){let r=this.state.inType;this.state.inType=!0,this.expect(t||14);let n=this.flowParseType();return this.state.inType=r,n}flowParsePredicate(){let t=this.startNode(),r=this.state.startLoc;return this.next(),this.expectContextual(110),this.state.lastTokStartLoc.index>r.index+1&&this.raise(Xt.UnexpectedSpaceBetweenModuloChecks,r),this.eat(10)?(t.value=super.parseExpression(),this.expect(11),this.finishNode(t,"DeclaredPredicate")):this.finishNode(t,"InferredPredicate")}flowParseTypeAndPredicateInitialiser(){let t=this.state.inType;this.state.inType=!0,this.expect(14);let r=null,n=null;return this.match(54)?(this.state.inType=t,n=this.flowParsePredicate()):(r=this.flowParseType(),this.state.inType=t,this.match(54)&&(n=this.flowParsePredicate())),[r,n]}flowParseDeclareClass(t){return this.next(),this.flowParseInterfaceish(t,!0),this.finishNode(t,"DeclareClass")}flowParseDeclareFunction(t){this.next();let r=t.id=this.parseIdentifier(),n=this.startNode(),o=this.startNode();this.match(47)?n.typeParameters=this.flowParseTypeParameterDeclaration():n.typeParameters=null,this.expect(10);let i=this.flowParseFunctionTypeParams();return n.params=i.params,n.rest=i.rest,n.this=i._this,this.expect(11),[n.returnType,t.predicate]=this.flowParseTypeAndPredicateInitialiser(),o.typeAnnotation=this.finishNode(n,"FunctionTypeAnnotation"),r.typeAnnotation=this.finishNode(o,"TypeAnnotation"),this.resetEndLocation(r),this.semicolon(),this.scope.declareName(t.id.name,2048,t.id.loc.start),this.finishNode(t,"DeclareFunction")}flowParseDeclare(t,r){if(this.match(80))return this.flowParseDeclareClass(t);if(this.match(68))return this.flowParseDeclareFunction(t);if(this.match(74))return this.flowParseDeclareVariable(t);if(this.eatContextual(127))return this.match(16)?this.flowParseDeclareModuleExports(t):(r&&this.raise(Xt.NestedDeclareModule,this.state.lastTokStartLoc),this.flowParseDeclareModule(t));if(this.isContextual(130))return this.flowParseDeclareTypeAlias(t);if(this.isContextual(131))return this.flowParseDeclareOpaqueType(t);if(this.isContextual(129))return this.flowParseDeclareInterface(t);if(this.match(82))return this.flowParseDeclareExportDeclaration(t,r);throw this.unexpected()}flowParseDeclareVariable(t){return this.next(),t.id=this.flowParseTypeAnnotatableIdentifier(!0),this.scope.declareName(t.id.name,5,t.id.loc.start),this.semicolon(),this.finishNode(t,"DeclareVariable")}flowParseDeclareModule(t){this.scope.enter(0),this.match(134)?t.id=super.parseExprAtom():t.id=this.parseIdentifier();let r=t.body=this.startNode(),n=r.body=[];for(this.expect(5);!this.match(8);){let a=this.startNode();this.match(83)?(this.next(),!this.isContextual(130)&&!this.match(87)&&this.raise(Xt.InvalidNonTypeImportInDeclareModule,this.state.lastTokStartLoc),n.push(super.parseImport(a))):(this.expectContextual(125,Xt.UnsupportedStatementInDeclareModule),n.push(this.flowParseDeclare(a,!0)))}this.scope.exit(),this.expect(8),this.finishNode(r,"BlockStatement");let o=null,i=!1;return n.forEach(a=>{nJe(a)?(o==="CommonJS"&&this.raise(Xt.AmbiguousDeclareModuleKind,a),o="ES"):a.type==="DeclareModuleExports"&&(i&&this.raise(Xt.DuplicateDeclareModuleExports,a),o==="ES"&&this.raise(Xt.AmbiguousDeclareModuleKind,a),o="CommonJS",i=!0)}),t.kind=o||"CommonJS",this.finishNode(t,"DeclareModule")}flowParseDeclareExportDeclaration(t,r){if(this.expect(82),this.eat(65))return this.match(68)||this.match(80)?t.declaration=this.flowParseDeclare(this.startNode()):(t.declaration=this.flowParseType(),this.semicolon()),t.default=!0,this.finishNode(t,"DeclareExportDeclaration");if(this.match(75)||this.isLet()||(this.isContextual(130)||this.isContextual(129))&&!r){let n=this.state.value;throw this.raise(Xt.UnsupportedDeclareExportKind,this.state.startLoc,{unsupportedExportKind:n,suggestion:oJe[n]})}if(this.match(74)||this.match(68)||this.match(80)||this.isContextual(131))return t.declaration=this.flowParseDeclare(this.startNode()),t.default=!1,this.finishNode(t,"DeclareExportDeclaration");if(this.match(55)||this.match(5)||this.isContextual(129)||this.isContextual(130)||this.isContextual(131))return t=this.parseExport(t,null),t.type==="ExportNamedDeclaration"?(t.default=!1,delete t.exportKind,this.castNodeTo(t,"DeclareExportDeclaration")):this.castNodeTo(t,"DeclareExportAllDeclaration");throw this.unexpected()}flowParseDeclareModuleExports(t){return this.next(),this.expectContextual(111),t.typeAnnotation=this.flowParseTypeAnnotation(),this.semicolon(),this.finishNode(t,"DeclareModuleExports")}flowParseDeclareTypeAlias(t){this.next();let r=this.flowParseTypeAlias(t);return this.castNodeTo(r,"DeclareTypeAlias"),r}flowParseDeclareOpaqueType(t){this.next();let r=this.flowParseOpaqueType(t,!0);return this.castNodeTo(r,"DeclareOpaqueType"),r}flowParseDeclareInterface(t){return this.next(),this.flowParseInterfaceish(t,!1),this.finishNode(t,"DeclareInterface")}flowParseInterfaceish(t,r){if(t.id=this.flowParseRestrictedIdentifier(!r,!0),this.scope.declareName(t.id.name,r?17:8201,t.id.loc.start),this.match(47)?t.typeParameters=this.flowParseTypeParameterDeclaration():t.typeParameters=null,t.extends=[],this.eat(81))do t.extends.push(this.flowParseInterfaceExtends());while(!r&&this.eat(12));if(r){if(t.implements=[],t.mixins=[],this.eatContextual(117))do t.mixins.push(this.flowParseInterfaceExtends());while(this.eat(12));if(this.eatContextual(113))do t.implements.push(this.flowParseInterfaceExtends());while(this.eat(12))}t.body=this.flowParseObjectType({allowStatic:r,allowExact:!1,allowSpread:!1,allowProto:r,allowInexact:!1})}flowParseInterfaceExtends(){let t=this.startNode();return t.id=this.flowParseQualifiedTypeIdentifier(),this.match(47)?t.typeParameters=this.flowParseTypeParameterInstantiation():t.typeParameters=null,this.finishNode(t,"InterfaceExtends")}flowParseInterface(t){return this.flowParseInterfaceish(t,!1),this.finishNode(t,"InterfaceDeclaration")}checkNotUnderscore(t){t==="_"&&this.raise(Xt.UnexpectedReservedUnderscore,this.state.startLoc)}checkReservedType(t,r,n){rJe.has(t)&&this.raise(n?Xt.AssignReservedType:Xt.UnexpectedReservedType,r,{reservedType:t})}flowParseRestrictedIdentifier(t,r){return this.checkReservedType(this.state.value,this.state.startLoc,r),this.parseIdentifier(t)}flowParseTypeAlias(t){return t.id=this.flowParseRestrictedIdentifier(!1,!0),this.scope.declareName(t.id.name,8201,t.id.loc.start),this.match(47)?t.typeParameters=this.flowParseTypeParameterDeclaration():t.typeParameters=null,t.right=this.flowParseTypeInitialiser(29),this.semicolon(),this.finishNode(t,"TypeAlias")}flowParseOpaqueType(t,r){return this.expectContextual(130),t.id=this.flowParseRestrictedIdentifier(!0,!0),this.scope.declareName(t.id.name,8201,t.id.loc.start),this.match(47)?t.typeParameters=this.flowParseTypeParameterDeclaration():t.typeParameters=null,t.supertype=null,this.match(14)&&(t.supertype=this.flowParseTypeInitialiser(14)),t.impltype=null,r||(t.impltype=this.flowParseTypeInitialiser(29)),this.semicolon(),this.finishNode(t,"OpaqueType")}flowParseTypeParameter(t=!1){let r=this.state.startLoc,n=this.startNode(),o=this.flowParseVariance(),i=this.flowParseTypeAnnotatableIdentifier();return n.name=i.name,n.variance=o,n.bound=i.typeAnnotation,this.match(29)?(this.eat(29),n.default=this.flowParseType()):t&&this.raise(Xt.MissingTypeParamDefault,r),this.finishNode(n,"TypeParameter")}flowParseTypeParameterDeclaration(){let t=this.state.inType,r=this.startNode();r.params=[],this.state.inType=!0,this.match(47)||this.match(143)?this.next():this.unexpected();let n=!1;do{let o=this.flowParseTypeParameter(n);r.params.push(o),o.default&&(n=!0),this.match(48)||this.expect(12)}while(!this.match(48));return this.expect(48),this.state.inType=t,this.finishNode(r,"TypeParameterDeclaration")}flowInTopLevelContext(t){if(this.curContext()!==Lo.brace){let r=this.state.context;this.state.context=[r[0]];try{return t()}finally{this.state.context=r}}else return t()}flowParseTypeParameterInstantiationInExpression(){if(this.reScan_lt()===47)return this.flowParseTypeParameterInstantiation()}flowParseTypeParameterInstantiation(){let t=this.startNode(),r=this.state.inType;return this.state.inType=!0,t.params=[],this.flowInTopLevelContext(()=>{this.expect(47);let n=this.state.noAnonFunctionType;for(this.state.noAnonFunctionType=!1;!this.match(48);)t.params.push(this.flowParseType()),this.match(48)||this.expect(12);this.state.noAnonFunctionType=n}),this.state.inType=r,!this.state.inType&&this.curContext()===Lo.brace&&this.reScan_lt_gt(),this.expect(48),this.finishNode(t,"TypeParameterInstantiation")}flowParseTypeParameterInstantiationCallOrNew(){if(this.reScan_lt()!==47)return null;let t=this.startNode(),r=this.state.inType;for(t.params=[],this.state.inType=!0,this.expect(47);!this.match(48);)t.params.push(this.flowParseTypeOrImplicitInstantiation()),this.match(48)||this.expect(12);return this.expect(48),this.state.inType=r,this.finishNode(t,"TypeParameterInstantiation")}flowParseInterfaceType(){let t=this.startNode();if(this.expectContextual(129),t.extends=[],this.eat(81))do t.extends.push(this.flowParseInterfaceExtends());while(this.eat(12));return t.body=this.flowParseObjectType({allowStatic:!1,allowExact:!1,allowSpread:!1,allowProto:!1,allowInexact:!1}),this.finishNode(t,"InterfaceTypeAnnotation")}flowParseObjectPropertyKey(){return this.match(135)||this.match(134)?super.parseExprAtom():this.parseIdentifier(!0)}flowParseObjectTypeIndexer(t,r,n){return t.static=r,this.lookahead().type===14?(t.id=this.flowParseObjectPropertyKey(),t.key=this.flowParseTypeInitialiser()):(t.id=null,t.key=this.flowParseType()),this.expect(3),t.value=this.flowParseTypeInitialiser(),t.variance=n,this.finishNode(t,"ObjectTypeIndexer")}flowParseObjectTypeInternalSlot(t,r){return t.static=r,t.id=this.flowParseObjectPropertyKey(),this.expect(3),this.expect(3),this.match(47)||this.match(10)?(t.method=!0,t.optional=!1,t.value=this.flowParseObjectTypeMethodish(this.startNodeAt(t.loc.start))):(t.method=!1,this.eat(17)&&(t.optional=!0),t.value=this.flowParseTypeInitialiser()),this.finishNode(t,"ObjectTypeInternalSlot")}flowParseObjectTypeMethodish(t){for(t.params=[],t.rest=null,t.typeParameters=null,t.this=null,this.match(47)&&(t.typeParameters=this.flowParseTypeParameterDeclaration()),this.expect(10),this.match(78)&&(t.this=this.flowParseFunctionTypeParam(!0),t.this.name=null,this.match(11)||this.expect(12));!this.match(11)&&!this.match(21);)t.params.push(this.flowParseFunctionTypeParam(!1)),this.match(11)||this.expect(12);return this.eat(21)&&(t.rest=this.flowParseFunctionTypeParam(!1)),this.expect(11),t.returnType=this.flowParseTypeInitialiser(),this.finishNode(t,"FunctionTypeAnnotation")}flowParseObjectTypeCallProperty(t,r){let n=this.startNode();return t.static=r,t.value=this.flowParseObjectTypeMethodish(n),this.finishNode(t,"ObjectTypeCallProperty")}flowParseObjectType({allowStatic:t,allowExact:r,allowSpread:n,allowProto:o,allowInexact:i}){let a=this.state.inType;this.state.inType=!0;let s=this.startNode();s.callProperties=[],s.properties=[],s.indexers=[],s.internalSlots=[];let c,p,d=!1;for(r&&this.match(6)?(this.expect(6),c=9,p=!0):(this.expect(5),c=8,p=!1),s.exact=p;!this.match(c);){let m=!1,y=null,g=null,S=this.startNode();if(o&&this.isContextual(118)){let E=this.lookahead();E.type!==14&&E.type!==17&&(this.next(),y=this.state.startLoc,t=!1)}if(t&&this.isContextual(106)){let E=this.lookahead();E.type!==14&&E.type!==17&&(this.next(),m=!0)}let b=this.flowParseVariance();if(this.eat(0))y!=null&&this.unexpected(y),this.eat(0)?(b&&this.unexpected(b.loc.start),s.internalSlots.push(this.flowParseObjectTypeInternalSlot(S,m))):s.indexers.push(this.flowParseObjectTypeIndexer(S,m,b));else if(this.match(10)||this.match(47))y!=null&&this.unexpected(y),b&&this.unexpected(b.loc.start),s.callProperties.push(this.flowParseObjectTypeCallProperty(S,m));else{let E="init";if(this.isContextual(99)||this.isContextual(104)){let T=this.lookahead();fpe(T.type)&&(E=this.state.value,this.next())}let I=this.flowParseObjectTypeProperty(S,m,y,b,E,n,i??!p);I===null?(d=!0,g=this.state.lastTokStartLoc):s.properties.push(I)}this.flowObjectTypeSemicolon(),g&&!this.match(8)&&!this.match(9)&&this.raise(Xt.UnexpectedExplicitInexactInObject,g)}this.expect(c),n&&(s.inexact=d);let f=this.finishNode(s,"ObjectTypeAnnotation");return this.state.inType=a,f}flowParseObjectTypeProperty(t,r,n,o,i,a,s){if(this.eat(21))return this.match(12)||this.match(13)||this.match(8)||this.match(9)?(a?s||this.raise(Xt.InexactInsideExact,this.state.lastTokStartLoc):this.raise(Xt.InexactInsideNonObject,this.state.lastTokStartLoc),o&&this.raise(Xt.InexactVariance,o),null):(a||this.raise(Xt.UnexpectedSpreadType,this.state.lastTokStartLoc),n!=null&&this.unexpected(n),o&&this.raise(Xt.SpreadVariance,o),t.argument=this.flowParseType(),this.finishNode(t,"ObjectTypeSpreadProperty"));{t.key=this.flowParseObjectPropertyKey(),t.static=r,t.proto=n!=null,t.kind=i;let c=!1;return this.match(47)||this.match(10)?(t.method=!0,n!=null&&this.unexpected(n),o&&this.unexpected(o.loc.start),t.value=this.flowParseObjectTypeMethodish(this.startNodeAt(t.loc.start)),(i==="get"||i==="set")&&this.flowCheckGetterSetterParams(t),!a&&t.key.name==="constructor"&&t.value.this&&this.raise(Xt.ThisParamBannedInConstructor,t.value.this)):(i!=="init"&&this.unexpected(),t.method=!1,this.eat(17)&&(c=!0),t.value=this.flowParseTypeInitialiser(),t.variance=o),t.optional=c,this.finishNode(t,"ObjectTypeProperty")}}flowCheckGetterSetterParams(t){let r=t.kind==="get"?0:1,n=t.value.params.length+(t.value.rest?1:0);t.value.this&&this.raise(t.kind==="get"?Xt.GetterMayNotHaveThisParam:Xt.SetterMayNotHaveThisParam,t.value.this),n!==r&&this.raise(t.kind==="get"?W.BadGetterArity:W.BadSetterArity,t),t.kind==="set"&&t.value.rest&&this.raise(W.BadSetterRestParameter,t)}flowObjectTypeSemicolon(){!this.eat(13)&&!this.eat(12)&&!this.match(8)&&!this.match(9)&&this.unexpected()}flowParseQualifiedTypeIdentifier(t,r){t??(t=this.state.startLoc);let n=r||this.flowParseRestrictedIdentifier(!0);for(;this.eat(16);){let o=this.startNodeAt(t);o.qualification=n,o.id=this.flowParseRestrictedIdentifier(!0),n=this.finishNode(o,"QualifiedTypeIdentifier")}return n}flowParseGenericType(t,r){let n=this.startNodeAt(t);return n.typeParameters=null,n.id=this.flowParseQualifiedTypeIdentifier(t,r),this.match(47)&&(n.typeParameters=this.flowParseTypeParameterInstantiation()),this.finishNode(n,"GenericTypeAnnotation")}flowParseTypeofType(){let t=this.startNode();return this.expect(87),t.argument=this.flowParsePrimaryType(),this.finishNode(t,"TypeofTypeAnnotation")}flowParseTupleType(){let t=this.startNode();for(t.types=[],this.expect(0);this.state.possuper.parseFunctionBody(t,!0,n));return}super.parseFunctionBody(t,!1,n)}parseFunctionBodyAndFinish(t,r,n=!1){if(this.match(14)){let o=this.startNode();[o.typeAnnotation,t.predicate]=this.flowParseTypeAndPredicateInitialiser(),t.returnType=o.typeAnnotation?this.finishNode(o,"TypeAnnotation"):null}return super.parseFunctionBodyAndFinish(t,r,n)}parseStatementLike(t){if(this.state.strict&&this.isContextual(129)){let n=this.lookahead();if(Ou(n.type)){let o=this.startNode();return this.next(),this.flowParseInterface(o)}}else if(this.isContextual(126)){let n=this.startNode();return this.next(),this.flowParseEnumDeclaration(n)}let r=super.parseStatementLike(t);return this.flowPragma===void 0&&!this.isValidDirective(r)&&(this.flowPragma=null),r}parseExpressionStatement(t,r,n){if(r.type==="Identifier"){if(r.name==="declare"){if(this.match(80)||Qn(this.state.type)||this.match(68)||this.match(74)||this.match(82))return this.flowParseDeclare(t)}else if(Qn(this.state.type)){if(r.name==="interface")return this.flowParseInterface(t);if(r.name==="type")return this.flowParseTypeAlias(t);if(r.name==="opaque")return this.flowParseOpaqueType(t,!1)}}return super.parseExpressionStatement(t,r,n)}shouldParseExportDeclaration(){let{type:t}=this.state;return t===126||zue(t)?!this.state.containsEsc:super.shouldParseExportDeclaration()}isExportDefaultSpecifier(){let{type:t}=this.state;return t===126||zue(t)?this.state.containsEsc:super.isExportDefaultSpecifier()}parseExportDefaultExpression(){if(this.isContextual(126)){let t=this.startNode();return this.next(),this.flowParseEnumDeclaration(t)}return super.parseExportDefaultExpression()}parseConditional(t,r,n){if(!this.match(17))return t;if(this.state.maybeInArrowParameters){let f=this.lookaheadCharCode();if(f===44||f===61||f===58||f===41)return this.setOptionalParametersError(n),t}this.expect(17);let o=this.state.clone(),i=this.state.noArrowAt,a=this.startNodeAt(r),{consequent:s,failed:c}=this.tryParseConditionalConsequent(),[p,d]=this.getArrowLikeExpressions(s);if(c||d.length>0){let f=[...i];if(d.length>0){this.state=o,this.state.noArrowAt=f;for(let m=0;m1&&this.raise(Xt.AmbiguousConditionalArrow,o.startLoc),c&&p.length===1&&(this.state=o,f.push(p[0].start),this.state.noArrowAt=f,{consequent:s,failed:c}=this.tryParseConditionalConsequent())}return this.getArrowLikeExpressions(s,!0),this.state.noArrowAt=i,this.expect(14),a.test=t,a.consequent=s,a.alternate=this.forwardNoArrowParamsConversionAt(a,()=>this.parseMaybeAssign(void 0,void 0)),this.finishNode(a,"ConditionalExpression")}tryParseConditionalConsequent(){this.state.noArrowParamsConversionAt.push(this.state.start);let t=this.parseMaybeAssignAllowIn(),r=!this.match(14);return this.state.noArrowParamsConversionAt.pop(),{consequent:t,failed:r}}getArrowLikeExpressions(t,r){let n=[t],o=[];for(;n.length!==0;){let i=n.pop();i.type==="ArrowFunctionExpression"&&i.body.type!=="BlockStatement"?(i.typeParameters||!i.returnType?this.finishArrowValidation(i):o.push(i),n.push(i.body)):i.type==="ConditionalExpression"&&(n.push(i.consequent),n.push(i.alternate))}return r?(o.forEach(i=>this.finishArrowValidation(i)),[o,[]]):iJe(o,i=>i.params.every(a=>this.isAssignable(a,!0)))}finishArrowValidation(t){this.toAssignableList(t.params,t.extra?.trailingCommaLoc,!1),this.scope.enter(518),super.checkParams(t,!1,!0),this.scope.exit()}forwardNoArrowParamsConversionAt(t,r){let n;return this.state.noArrowParamsConversionAt.includes(this.offsetToSourcePos(t.start))?(this.state.noArrowParamsConversionAt.push(this.state.start),n=r(),this.state.noArrowParamsConversionAt.pop()):n=r(),n}parseParenItem(t,r){let n=super.parseParenItem(t,r);if(this.eat(17)&&(n.optional=!0,this.resetEndLocation(t)),this.match(14)){let o=this.startNodeAt(r);return o.expression=n,o.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(o,"TypeCastExpression")}return n}assertModuleNodeAllowed(t){t.type==="ImportDeclaration"&&(t.importKind==="type"||t.importKind==="typeof")||t.type==="ExportNamedDeclaration"&&t.exportKind==="type"||t.type==="ExportAllDeclaration"&&t.exportKind==="type"||super.assertModuleNodeAllowed(t)}parseExportDeclaration(t){if(this.isContextual(130)){t.exportKind="type";let r=this.startNode();return this.next(),this.match(5)?(t.specifiers=this.parseExportSpecifiers(!0),super.parseExportFrom(t),null):this.flowParseTypeAlias(r)}else if(this.isContextual(131)){t.exportKind="type";let r=this.startNode();return this.next(),this.flowParseOpaqueType(r,!1)}else if(this.isContextual(129)){t.exportKind="type";let r=this.startNode();return this.next(),this.flowParseInterface(r)}else if(this.isContextual(126)){t.exportKind="value";let r=this.startNode();return this.next(),this.flowParseEnumDeclaration(r)}else return super.parseExportDeclaration(t)}eatExportStar(t){return super.eatExportStar(t)?!0:this.isContextual(130)&&this.lookahead().type===55?(t.exportKind="type",this.next(),this.next(),!0):!1}maybeParseExportNamespaceSpecifier(t){let{startLoc:r}=this.state,n=super.maybeParseExportNamespaceSpecifier(t);return n&&t.exportKind==="type"&&this.unexpected(r),n}parseClassId(t,r,n){super.parseClassId(t,r,n),this.match(47)&&(t.typeParameters=this.flowParseTypeParameterDeclaration())}parseClassMember(t,r,n){let{startLoc:o}=this.state;if(this.isContextual(125)){if(super.parseClassMemberFromModifier(t,r))return;r.declare=!0}super.parseClassMember(t,r,n),r.declare&&(r.type!=="ClassProperty"&&r.type!=="ClassPrivateProperty"&&r.type!=="PropertyDefinition"?this.raise(Xt.DeclareClassElement,o):r.value&&this.raise(Xt.DeclareClassFieldInitializer,r.value))}isIterator(t){return t==="iterator"||t==="asyncIterator"}readIterator(){let t=super.readWord1(),r="@@"+t;(!this.isIterator(t)||!this.state.inType)&&this.raise(W.InvalidIdentifier,this.state.curPosition(),{identifierName:r}),this.finishToken(132,r)}getTokenFromCode(t){let r=this.input.charCodeAt(this.state.pos+1);t===123&&r===124?this.finishOp(6,2):this.state.inType&&(t===62||t===60)?this.finishOp(t===62?48:47,1):this.state.inType&&t===63?r===46?this.finishOp(18,2):this.finishOp(17,1):Qze(t,r,this.input.charCodeAt(this.state.pos+2))?(this.state.pos+=2,this.readIterator()):super.getTokenFromCode(t)}isAssignable(t,r){return t.type==="TypeCastExpression"?this.isAssignable(t.expression,r):super.isAssignable(t,r)}toAssignable(t,r=!1){!r&&t.type==="AssignmentExpression"&&t.left.type==="TypeCastExpression"&&(t.left=this.typeCastToParameter(t.left)),super.toAssignable(t,r)}toAssignableList(t,r,n){for(let o=0;o1||!r)&&this.raise(Xt.TypeCastInPattern,o.typeAnnotation)}return t}parseArrayLike(t,r,n){let o=super.parseArrayLike(t,r,n);return n!=null&&!this.state.maybeInArrowParameters&&this.toReferencedList(o.elements),o}isValidLVal(t,r,n,o){return t==="TypeCastExpression"||super.isValidLVal(t,r,n,o)}parseClassProperty(t){return this.match(14)&&(t.typeAnnotation=this.flowParseTypeAnnotation()),super.parseClassProperty(t)}parseClassPrivateProperty(t){return this.match(14)&&(t.typeAnnotation=this.flowParseTypeAnnotation()),super.parseClassPrivateProperty(t)}isClassMethod(){return this.match(47)||super.isClassMethod()}isClassProperty(){return this.match(14)||super.isClassProperty()}isNonstaticConstructor(t){return!this.match(14)&&super.isNonstaticConstructor(t)}pushClassMethod(t,r,n,o,i,a){if(r.variance&&this.unexpected(r.variance.loc.start),delete r.variance,this.match(47)&&(r.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassMethod(t,r,n,o,i,a),r.params&&i){let s=r.params;s.length>0&&this.isThisParam(s[0])&&this.raise(Xt.ThisParamBannedInConstructor,r)}else if(r.type==="MethodDefinition"&&i&&r.value.params){let s=r.value.params;s.length>0&&this.isThisParam(s[0])&&this.raise(Xt.ThisParamBannedInConstructor,r)}}pushClassPrivateMethod(t,r,n,o){r.variance&&this.unexpected(r.variance.loc.start),delete r.variance,this.match(47)&&(r.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassPrivateMethod(t,r,n,o)}parseClassSuper(t){if(super.parseClassSuper(t),t.superClass&&(this.match(47)||this.match(51))&&(t.superTypeArguments=this.flowParseTypeParameterInstantiationInExpression()),this.isContextual(113)){this.next();let r=t.implements=[];do{let n=this.startNode();n.id=this.flowParseRestrictedIdentifier(!0),this.match(47)?n.typeParameters=this.flowParseTypeParameterInstantiation():n.typeParameters=null,r.push(this.finishNode(n,"ClassImplements"))}while(this.eat(12))}}checkGetterSetterParams(t){super.checkGetterSetterParams(t);let r=this.getObjectOrClassMethodParams(t);if(r.length>0){let n=r[0];this.isThisParam(n)&&t.kind==="get"?this.raise(Xt.GetterMayNotHaveThisParam,n):this.isThisParam(n)&&this.raise(Xt.SetterMayNotHaveThisParam,n)}}parsePropertyNamePrefixOperator(t){t.variance=this.flowParseVariance()}parseObjPropValue(t,r,n,o,i,a,s){t.variance&&this.unexpected(t.variance.loc.start),delete t.variance;let c;this.match(47)&&!a&&(c=this.flowParseTypeParameterDeclaration(),this.match(10)||this.unexpected());let p=super.parseObjPropValue(t,r,n,o,i,a,s);return c&&((p.value||p).typeParameters=c),p}parseFunctionParamType(t){return this.eat(17)&&(t.type!=="Identifier"&&this.raise(Xt.PatternIsOptional,t),this.isThisParam(t)&&this.raise(Xt.ThisParamMayNotBeOptional,t),t.optional=!0),this.match(14)?t.typeAnnotation=this.flowParseTypeAnnotation():this.isThisParam(t)&&this.raise(Xt.ThisParamAnnotationRequired,t),this.match(29)&&this.isThisParam(t)&&this.raise(Xt.ThisParamNoDefault,t),this.resetEndLocation(t),t}parseMaybeDefault(t,r){let n=super.parseMaybeDefault(t,r);return n.type==="AssignmentPattern"&&n.typeAnnotation&&n.right.startsuper.parseMaybeAssign(t,r),n),!o.error)return o.node;let{context:i}=this.state,a=i[i.length-1];(a===Lo.j_oTag||a===Lo.j_expr)&&i.pop()}if(o?.error||this.match(47)){n=n||this.state.clone();let i,a=this.tryParse(c=>{i=this.flowParseTypeParameterDeclaration();let p=this.forwardNoArrowParamsConversionAt(i,()=>{let f=super.parseMaybeAssign(t,r);return this.resetStartLocationFromNode(f,i),f});p.extra?.parenthesized&&c();let d=this.maybeUnwrapTypeCastExpression(p);return d.type!=="ArrowFunctionExpression"&&c(),d.typeParameters=i,this.resetStartLocationFromNode(d,i),p},n),s=null;if(a.node&&this.maybeUnwrapTypeCastExpression(a.node).type==="ArrowFunctionExpression"){if(!a.error&&!a.aborted)return a.node.async&&this.raise(Xt.UnexpectedTypeParameterBeforeAsyncArrowFunction,i),a.node;s=a.node}if(o?.node)return this.state=o.failState,o.node;if(s)return this.state=a.failState,s;throw o?.thrown?o.error:a.thrown?a.error:this.raise(Xt.UnexpectedTokenAfterTypeParameter,i)}return super.parseMaybeAssign(t,r)}parseArrow(t){if(this.match(14)){let r=this.tryParse(()=>{let n=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0;let o=this.startNode();return[o.typeAnnotation,t.predicate]=this.flowParseTypeAndPredicateInitialiser(),this.state.noAnonFunctionType=n,this.canInsertSemicolon()&&this.unexpected(),this.match(19)||this.unexpected(),o});if(r.thrown)return null;r.error&&(this.state=r.failState),t.returnType=r.node.typeAnnotation?this.finishNode(r.node,"TypeAnnotation"):null}return super.parseArrow(t)}shouldParseArrow(t){return this.match(14)||super.shouldParseArrow(t)}setArrowFunctionParameters(t,r){this.state.noArrowParamsConversionAt.includes(this.offsetToSourcePos(t.start))?t.params=r:super.setArrowFunctionParameters(t,r)}checkParams(t,r,n,o=!0){if(!(n&&this.state.noArrowParamsConversionAt.includes(this.offsetToSourcePos(t.start)))){for(let i=0;i0&&this.raise(Xt.ThisParamMustBeFirst,t.params[i]);super.checkParams(t,r,n,o)}}parseParenAndDistinguishExpression(t){return super.parseParenAndDistinguishExpression(t&&!this.state.noArrowAt.includes(this.sourceToOffsetPos(this.state.start)))}parseSubscripts(t,r,n){if(t.type==="Identifier"&&t.name==="async"&&this.state.noArrowAt.includes(r.index)){this.next();let o=this.startNodeAt(r);o.callee=t,o.arguments=super.parseCallExpressionArguments(),t=this.finishNode(o,"CallExpression")}else if(t.type==="Identifier"&&t.name==="async"&&this.match(47)){let o=this.state.clone(),i=this.tryParse(s=>this.parseAsyncArrowWithTypeParameters(r)||s(),o);if(!i.error&&!i.aborted)return i.node;let a=this.tryParse(()=>super.parseSubscripts(t,r,n),o);if(a.node&&!a.error)return a.node;if(i.node)return this.state=i.failState,i.node;if(a.node)return this.state=a.failState,a.node;throw i.error||a.error}return super.parseSubscripts(t,r,n)}parseSubscript(t,r,n,o){if(this.match(18)&&this.isLookaheadToken_lt()){if(o.optionalChainMember=!0,n)return o.stop=!0,t;this.next();let i=this.startNodeAt(r);return i.callee=t,i.typeArguments=this.flowParseTypeParameterInstantiationInExpression(),this.expect(10),i.arguments=this.parseCallExpressionArguments(),i.optional=!0,this.finishCallExpression(i,!0)}else if(!n&&this.shouldParseTypes()&&(this.match(47)||this.match(51))){let i=this.startNodeAt(r);i.callee=t;let a=this.tryParse(()=>(i.typeArguments=this.flowParseTypeParameterInstantiationCallOrNew(),this.expect(10),i.arguments=super.parseCallExpressionArguments(),o.optionalChainMember&&(i.optional=!1),this.finishCallExpression(i,o.optionalChainMember)));if(a.node)return a.error&&(this.state=a.failState),a.node}return super.parseSubscript(t,r,n,o)}parseNewCallee(t){super.parseNewCallee(t);let r=null;this.shouldParseTypes()&&this.match(47)&&(r=this.tryParse(()=>this.flowParseTypeParameterInstantiationCallOrNew()).node),t.typeArguments=r}parseAsyncArrowWithTypeParameters(t){let r=this.startNodeAt(t);if(this.parseFunctionParams(r,!1),!!this.parseArrow(r))return super.parseArrowExpression(r,void 0,!0)}readToken_mult_modulo(t){let r=this.input.charCodeAt(this.state.pos+1);if(t===42&&r===47&&this.state.hasFlowComment){this.state.hasFlowComment=!1,this.state.pos+=2,this.nextToken();return}super.readToken_mult_modulo(t)}readToken_pipe_amp(t){let r=this.input.charCodeAt(this.state.pos+1);if(t===124&&r===125){this.finishOp(9,2);return}super.readToken_pipe_amp(t)}parseTopLevel(t,r){let n=super.parseTopLevel(t,r);return this.state.hasFlowComment&&this.raise(Xt.UnterminatedFlowComment,this.state.curPosition()),n}skipBlockComment(){if(this.hasPlugin("flowComments")&&this.skipFlowComment()){if(this.state.hasFlowComment)throw this.raise(Xt.NestedFlowComment,this.state.startLoc);this.hasFlowCommentCompletion();let t=this.skipFlowComment();t&&(this.state.pos+=t,this.state.hasFlowComment=!0);return}return super.skipBlockComment(this.state.hasFlowComment?"*-/":"*/")}skipFlowComment(){let{pos:t}=this.state,r=2;for(;[32,9].includes(this.input.charCodeAt(t+r));)r++;let n=this.input.charCodeAt(r+t),o=this.input.charCodeAt(r+t+1);return n===58&&o===58?r+2:this.input.slice(r+t,r+t+12)==="flow-include"?r+12:n===58&&o!==58?r:!1}hasFlowCommentCompletion(){if(this.input.indexOf("*/",this.state.pos)===-1)throw this.raise(W.UnterminatedComment,this.state.curPosition())}flowEnumErrorBooleanMemberNotInitialized(t,{enumName:r,memberName:n}){this.raise(Xt.EnumBooleanMemberNotInitialized,t,{memberName:n,enumName:r})}flowEnumErrorInvalidMemberInitializer(t,r){return this.raise(r.explicitType?r.explicitType==="symbol"?Xt.EnumInvalidMemberInitializerSymbolType:Xt.EnumInvalidMemberInitializerPrimaryType:Xt.EnumInvalidMemberInitializerUnknownType,t,r)}flowEnumErrorNumberMemberNotInitialized(t,r){this.raise(Xt.EnumNumberMemberNotInitialized,t,r)}flowEnumErrorStringMemberInconsistentlyInitialized(t,r){this.raise(Xt.EnumStringMemberInconsistentlyInitialized,t,r)}flowEnumMemberInit(){let t=this.state.startLoc,r=()=>this.match(12)||this.match(8);switch(this.state.type){case 135:{let n=this.parseNumericLiteral(this.state.value);return r()?{type:"number",loc:n.loc.start,value:n}:{type:"invalid",loc:t}}case 134:{let n=this.parseStringLiteral(this.state.value);return r()?{type:"string",loc:n.loc.start,value:n}:{type:"invalid",loc:t}}case 85:case 86:{let n=this.parseBooleanLiteral(this.match(85));return r()?{type:"boolean",loc:n.loc.start,value:n}:{type:"invalid",loc:t}}default:return{type:"invalid",loc:t}}}flowEnumMemberRaw(){let t=this.state.startLoc,r=this.parseIdentifier(!0),n=this.eat(29)?this.flowEnumMemberInit():{type:"none",loc:t};return{id:r,init:n}}flowEnumCheckExplicitTypeMismatch(t,r,n){let{explicitType:o}=r;o!==null&&o!==n&&this.flowEnumErrorInvalidMemberInitializer(t,r)}flowEnumMembers({enumName:t,explicitType:r}){let n=new Set,o={booleanMembers:[],numberMembers:[],stringMembers:[],defaultedMembers:[]},i=!1;for(;!this.match(8);){if(this.eat(21)){i=!0;break}let a=this.startNode(),{id:s,init:c}=this.flowEnumMemberRaw(),p=s.name;if(p==="")continue;/^[a-z]/.test(p)&&this.raise(Xt.EnumInvalidMemberName,s,{memberName:p,suggestion:p[0].toUpperCase()+p.slice(1),enumName:t}),n.has(p)&&this.raise(Xt.EnumDuplicateMemberName,s,{memberName:p,enumName:t}),n.add(p);let d={enumName:t,explicitType:r,memberName:p};switch(a.id=s,c.type){case"boolean":{this.flowEnumCheckExplicitTypeMismatch(c.loc,d,"boolean"),a.init=c.value,o.booleanMembers.push(this.finishNode(a,"EnumBooleanMember"));break}case"number":{this.flowEnumCheckExplicitTypeMismatch(c.loc,d,"number"),a.init=c.value,o.numberMembers.push(this.finishNode(a,"EnumNumberMember"));break}case"string":{this.flowEnumCheckExplicitTypeMismatch(c.loc,d,"string"),a.init=c.value,o.stringMembers.push(this.finishNode(a,"EnumStringMember"));break}case"invalid":throw this.flowEnumErrorInvalidMemberInitializer(c.loc,d);case"none":switch(r){case"boolean":this.flowEnumErrorBooleanMemberNotInitialized(c.loc,d);break;case"number":this.flowEnumErrorNumberMemberNotInitialized(c.loc,d);break;default:o.defaultedMembers.push(this.finishNode(a,"EnumDefaultedMember"))}}this.match(8)||this.expect(12)}return{members:o,hasUnknownMembers:i}}flowEnumStringMembers(t,r,{enumName:n}){if(t.length===0)return r;if(r.length===0)return t;if(r.length>t.length){for(let o of t)this.flowEnumErrorStringMemberInconsistentlyInitialized(o,{enumName:n});return r}else{for(let o of r)this.flowEnumErrorStringMemberInconsistentlyInitialized(o,{enumName:n});return t}}flowEnumParseExplicitType({enumName:t}){if(!this.eatContextual(102))return null;if(!Qn(this.state.type))throw this.raise(Xt.EnumInvalidExplicitTypeUnknownSupplied,this.state.startLoc,{enumName:t});let{value:r}=this.state;return this.next(),r!=="boolean"&&r!=="number"&&r!=="string"&&r!=="symbol"&&this.raise(Xt.EnumInvalidExplicitType,this.state.startLoc,{enumName:t,invalidEnumType:r}),r}flowEnumBody(t,r){let n=r.name,o=r.loc.start,i=this.flowEnumParseExplicitType({enumName:n});this.expect(5);let{members:a,hasUnknownMembers:s}=this.flowEnumMembers({enumName:n,explicitType:i});switch(t.hasUnknownMembers=s,i){case"boolean":return t.explicitType=!0,t.members=a.booleanMembers,this.expect(8),this.finishNode(t,"EnumBooleanBody");case"number":return t.explicitType=!0,t.members=a.numberMembers,this.expect(8),this.finishNode(t,"EnumNumberBody");case"string":return t.explicitType=!0,t.members=this.flowEnumStringMembers(a.stringMembers,a.defaultedMembers,{enumName:n}),this.expect(8),this.finishNode(t,"EnumStringBody");case"symbol":return t.members=a.defaultedMembers,this.expect(8),this.finishNode(t,"EnumSymbolBody");default:{let c=()=>(t.members=[],this.expect(8),this.finishNode(t,"EnumStringBody"));t.explicitType=!1;let p=a.booleanMembers.length,d=a.numberMembers.length,f=a.stringMembers.length,m=a.defaultedMembers.length;if(!p&&!d&&!f&&!m)return c();if(!p&&!d)return t.members=this.flowEnumStringMembers(a.stringMembers,a.defaultedMembers,{enumName:n}),this.expect(8),this.finishNode(t,"EnumStringBody");if(!d&&!f&&p>=m){for(let y of a.defaultedMembers)this.flowEnumErrorBooleanMemberNotInitialized(y.loc.start,{enumName:n,memberName:y.id.name});return t.members=a.booleanMembers,this.expect(8),this.finishNode(t,"EnumBooleanBody")}else if(!p&&!f&&d>=m){for(let y of a.defaultedMembers)this.flowEnumErrorNumberMemberNotInitialized(y.loc.start,{enumName:n,memberName:y.id.name});return t.members=a.numberMembers,this.expect(8),this.finishNode(t,"EnumNumberBody")}else return this.raise(Xt.EnumInconsistentMemberValues,o,{enumName:n}),c()}}}flowParseEnumDeclaration(t){let r=this.parseIdentifier();return t.id=r,t.body=this.flowEnumBody(this.startNode(),r),this.finishNode(t,"EnumDeclaration")}jsxParseOpeningElementAfterName(t){return this.shouldParseTypes()&&(this.match(47)||this.match(51))&&(t.typeArguments=this.flowParseTypeParameterInstantiationInExpression()),super.jsxParseOpeningElementAfterName(t)}isLookaheadToken_lt(){let t=this.nextTokenStart();if(this.input.charCodeAt(t)===60){let r=this.input.charCodeAt(t+1);return r!==60&&r!==61}return!1}reScan_lt_gt(){let{type:t}=this.state;t===47?(this.state.pos-=1,this.readToken_lt()):t===48&&(this.state.pos-=1,this.readToken_gt())}reScan_lt(){let{type:t}=this.state;return t===51?(this.state.pos-=2,this.finishOp(47,1),47):t}maybeUnwrapTypeCastExpression(t){return t.type==="TypeCastExpression"?t.expression:t}},cJe=/\r\n|[\r\n\u2028\u2029]/,b3=new RegExp(cJe.source,"g");function qv(e){switch(e){case 10:case 13:case 8232:case 8233:return!0;default:return!1}}function Vue(e,t,r){for(let n=t;n`Expected corresponding JSX closing tag for <${e}>.`,MissingClosingTagFragment:"Expected corresponding JSX closing tag for <>.",UnexpectedSequenceExpression:"Sequence expressions cannot be directly nested inside JSX. Did you mean to wrap it in parentheses (...)?",UnexpectedToken:({unexpected:e,HTMLEntity:t})=>`Unexpected token \`${e}\`. Did you mean \`${t}\` or \`{'${e}'}\`?`,UnsupportedJsxValue:"JSX value should be either an expression or a quoted JSX text.",UnterminatedJsxContent:"Unterminated JSX contents.",UnwrappedAdjacentJSXElements:"Adjacent JSX elements must be wrapped in an enclosing tag. Did you want a JSX fragment <>...?"});function Um(e){return e?e.type==="JSXOpeningFragment"||e.type==="JSXClosingFragment":!1}function Bv(e){if(e.type==="JSXIdentifier")return e.name;if(e.type==="JSXNamespacedName")return e.namespace.name+":"+e.name.name;if(e.type==="JSXMemberExpression")return Bv(e.object)+"."+Bv(e.property);throw new Error("Node had unexpected type: "+e.type)}var uJe=e=>class extends e{jsxReadToken(){let t="",r=this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(B_.UnterminatedJsxContent,this.state.startLoc);let n=this.input.charCodeAt(this.state.pos);switch(n){case 60:case 123:if(this.state.pos===this.state.start){n===60&&this.state.canStartJSXElement?(++this.state.pos,this.finishToken(143)):super.getTokenFromCode(n);return}t+=this.input.slice(r,this.state.pos),this.finishToken(142,t);return;case 38:t+=this.input.slice(r,this.state.pos),t+=this.jsxReadEntity(),r=this.state.pos;break;case 62:case 125:this.raise(B_.UnexpectedToken,this.state.curPosition(),{unexpected:this.input[this.state.pos],HTMLEntity:n===125?"}":">"});default:qv(n)?(t+=this.input.slice(r,this.state.pos),t+=this.jsxReadNewLine(!0),r=this.state.pos):++this.state.pos}}}jsxReadNewLine(t){let r=this.input.charCodeAt(this.state.pos),n;return++this.state.pos,r===13&&this.input.charCodeAt(this.state.pos)===10?(++this.state.pos,n=t?` +`:`\r +`):n=String.fromCharCode(r),++this.state.curLine,this.state.lineStart=this.state.pos,n}jsxReadString(t){let r="",n=++this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(W.UnterminatedString,this.state.startLoc);let o=this.input.charCodeAt(this.state.pos);if(o===t)break;o===38?(r+=this.input.slice(n,this.state.pos),r+=this.jsxReadEntity(),n=this.state.pos):qv(o)?(r+=this.input.slice(n,this.state.pos),r+=this.jsxReadNewLine(!1),n=this.state.pos):++this.state.pos}r+=this.input.slice(n,this.state.pos++),this.finishToken(134,r)}jsxReadEntity(){let t=++this.state.pos;if(this.codePointAtPos(this.state.pos)===35){++this.state.pos;let r=10;this.codePointAtPos(this.state.pos)===120&&(r=16,++this.state.pos);let n=this.readInt(r,void 0,!1,"bail");if(n!==null&&this.codePointAtPos(this.state.pos)===59)return++this.state.pos,String.fromCodePoint(n)}else{let r=0,n=!1;for(;r++<10&&this.state.pos1){for(let n=0;n0){if(r&256){let o=!!(r&512),i=(n&4)>0;return o!==i}return!0}return r&128&&(n&8)>0?e.names.get(t)&2?!!(r&1):!1:r&2&&(n&1)>0?!0:super.isRedeclaredInScope(e,t,r)}checkLocalExport(e){let{name:t}=e;if(this.hasImport(t))return;let r=this.scopeStack.length;for(let n=r-1;n>=0;n--){let o=this.scopeStack[n].tsNames.get(t);if((o&1)>0||(o&16)>0)return}super.checkLocalExport(e)}},_Je=class{stacks=[];enter(e){this.stacks.push(e)}exit(){this.stacks.pop()}currentFlags(){return this.stacks[this.stacks.length-1]}get hasAwait(){return(this.currentFlags()&2)>0}get hasYield(){return(this.currentFlags()&1)>0}get hasReturn(){return(this.currentFlags()&4)>0}get hasIn(){return(this.currentFlags()&8)>0}};function A3(e,t){return(e?2:0)|(t?1:0)}var fJe=class{sawUnambiguousESM=!1;ambiguousScriptDifferentAst=!1;sourceToOffsetPos(e){return e+this.startIndex}offsetToSourcePos(e){return e-this.startIndex}hasPlugin(e){if(typeof e=="string")return this.plugins.has(e);{let[t,r]=e;if(!this.hasPlugin(t))return!1;let n=this.plugins.get(t);for(let o of Object.keys(r))if(n?.[o]!==r[o])return!1;return!0}}getPluginOption(e,t){return this.plugins.get(e)?.[t]}};function xpe(e,t){e.trailingComments===void 0?e.trailingComments=t:e.trailingComments.unshift(...t)}function mJe(e,t){e.leadingComments===void 0?e.leadingComments=t:e.leadingComments.unshift(...t)}function Uv(e,t){e.innerComments===void 0?e.innerComments=t:e.innerComments.unshift(...t)}function gg(e,t,r){let n=null,o=t.length;for(;n===null&&o>0;)n=t[--o];n===null||n.start>r.start?Uv(e,r.comments):xpe(n,r.comments)}var hJe=class extends fJe{addComment(e){this.filename&&(e.loc.filename=this.filename);let{commentsLen:t}=this.state;this.comments.length!==t&&(this.comments.length=t),this.comments.push(e),this.state.commentsLen++}processComment(e){let{commentStack:t}=this.state,r=t.length;if(r===0)return;let n=r-1,o=t[n];o.start===e.end&&(o.leadingNode=e,n--);let{start:i}=e;for(;n>=0;n--){let a=t[n],s=a.end;if(s>i)a.containingNode=e,this.finalizeComment(a),t.splice(n,1);else{s===i&&(a.trailingNode=e);break}}}finalizeComment(e){let{comments:t}=e;if(e.leadingNode!==null||e.trailingNode!==null)e.leadingNode!==null&&xpe(e.leadingNode,t),e.trailingNode!==null&&mJe(e.trailingNode,t);else{let r=e.containingNode,n=e.start;if(this.input.charCodeAt(this.offsetToSourcePos(n)-1)===44)switch(r.type){case"ObjectExpression":case"ObjectPattern":case"RecordExpression":gg(r,r.properties,e);break;case"CallExpression":case"OptionalCallExpression":gg(r,r.arguments,e);break;case"ImportExpression":gg(r,[r.source,r.options??null],e);break;case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":case"ObjectMethod":case"ClassMethod":case"ClassPrivateMethod":gg(r,r.params,e);break;case"ArrayExpression":case"ArrayPattern":case"TupleExpression":gg(r,r.elements,e);break;case"ExportNamedDeclaration":case"ImportDeclaration":gg(r,r.specifiers,e);break;case"TSEnumDeclaration":Uv(r,t);break;case"TSEnumBody":gg(r,r.members,e);break;default:Uv(r,t)}else Uv(r,t)}}finalizeRemainingComments(){let{commentStack:e}=this.state;for(let t=e.length-1;t>=0;t--)this.finalizeComment(e[t]);this.state.commentStack=[]}resetPreviousNodeTrailingComments(e){let{commentStack:t}=this.state,{length:r}=t;if(r===0)return;let n=t[r-1];n.leadingNode===e&&(n.leadingNode=null)}takeSurroundingComments(e,t,r){let{commentStack:n}=this.state,o=n.length;if(o===0)return;let i=o-1;for(;i>=0;i--){let a=n[i],s=a.end;if(a.start===r)a.leadingNode=e;else if(s===t)a.trailingNode=e;else if(s0}set strict(t){t?this.flags|=1:this.flags&=-2}startIndex;curLine;lineStart;startLoc;endLoc;init({strictMode:t,sourceType:r,startIndex:n,startLine:o,startColumn:i}){this.strict=t===!1?!1:t===!0?!0:r==="module",this.startIndex=n,this.curLine=o,this.lineStart=-i,this.startLoc=this.endLoc=new Jm(o,i,n)}errors=[];potentialArrowAt=-1;noArrowAt=[];noArrowParamsConversionAt=[];get maybeInArrowParameters(){return(this.flags&2)>0}set maybeInArrowParameters(t){t?this.flags|=2:this.flags&=-3}get inType(){return(this.flags&4)>0}set inType(t){t?this.flags|=4:this.flags&=-5}get noAnonFunctionType(){return(this.flags&8)>0}set noAnonFunctionType(t){t?this.flags|=8:this.flags&=-9}get hasFlowComment(){return(this.flags&16)>0}set hasFlowComment(t){t?this.flags|=16:this.flags&=-17}get isAmbientContext(){return(this.flags&32)>0}set isAmbientContext(t){t?this.flags|=32:this.flags&=-33}get inAbstractClass(){return(this.flags&64)>0}set inAbstractClass(t){t?this.flags|=64:this.flags&=-65}get inDisallowConditionalTypesContext(){return(this.flags&128)>0}set inDisallowConditionalTypesContext(t){t?this.flags|=128:this.flags&=-129}topicContext={maxNumOfResolvableTopics:0,maxTopicIndex:null};get soloAwait(){return(this.flags&256)>0}set soloAwait(t){t?this.flags|=256:this.flags&=-257}get inFSharpPipelineDirectBody(){return(this.flags&512)>0}set inFSharpPipelineDirectBody(t){t?this.flags|=512:this.flags&=-513}labels=[];commentsLen=0;commentStack=[];pos=0;type=140;value=null;start=0;end=0;lastTokEndLoc=null;lastTokStartLoc=null;context=[Lo.brace];get canStartJSXElement(){return(this.flags&1024)>0}set canStartJSXElement(t){t?this.flags|=1024:this.flags&=-1025}get containsEsc(){return(this.flags&2048)>0}set containsEsc(t){t?this.flags|=2048:this.flags&=-2049}firstInvalidTemplateEscapePos=null;get hasTopLevelAwait(){return(this.flags&4096)>0}set hasTopLevelAwait(t){t?this.flags|=4096:this.flags&=-4097}strictErrors=new Map;tokensLength=0;curPosition(){return new Jm(this.curLine,this.pos-this.lineStart,this.pos+this.startIndex)}clone(){let t=new Epe;return t.flags=this.flags,t.startIndex=this.startIndex,t.curLine=this.curLine,t.lineStart=this.lineStart,t.startLoc=this.startLoc,t.endLoc=this.endLoc,t.errors=this.errors.slice(),t.potentialArrowAt=this.potentialArrowAt,t.noArrowAt=this.noArrowAt.slice(),t.noArrowParamsConversionAt=this.noArrowParamsConversionAt.slice(),t.topicContext=this.topicContext,t.labels=this.labels.slice(),t.commentsLen=this.commentsLen,t.commentStack=this.commentStack.slice(),t.pos=this.pos,t.type=this.type,t.value=this.value,t.start=this.start,t.end=this.end,t.lastTokEndLoc=this.lastTokEndLoc,t.lastTokStartLoc=this.lastTokStartLoc,t.context=this.context.slice(),t.firstInvalidTemplateEscapePos=this.firstInvalidTemplateEscapePos,t.strictErrors=this.strictErrors,t.tokensLength=this.tokensLength,t}},gJe=function(e){return e>=48&&e<=57},Kue={decBinOct:new Set([46,66,69,79,95,98,101,111]),hex:new Set([46,88,95,120])},x3={bin:e=>e===48||e===49,oct:e=>e>=48&&e<=55,dec:e=>e>=48&&e<=57,hex:e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102};function Gue(e,t,r,n,o,i){let a=r,s=n,c=o,p="",d=null,f=r,{length:m}=t;for(;;){if(r>=m){i.unterminated(a,s,c),p+=t.slice(f,r);break}let y=t.charCodeAt(r);if(SJe(e,y,t,r)){p+=t.slice(f,r);break}if(y===92){p+=t.slice(f,r);let g=vJe(t,r,n,o,e==="template",i);g.ch===null&&!d?d={pos:r,lineStart:n,curLine:o}:p+=g.ch,{pos:r,lineStart:n,curLine:o}=g,f=r}else y===8232||y===8233?(++r,++o,n=r):y===10||y===13?e==="template"?(p+=t.slice(f,r)+` +`,++r,y===13&&t.charCodeAt(r)===10&&++r,++o,f=n=r):i.unterminated(a,s,c):++r}return{pos:r,str:p,firstInvalidLoc:d,lineStart:n,curLine:o}}function SJe(e,t,r,n){return e==="template"?t===96||t===36&&r.charCodeAt(n+1)===123:t===(e==="double"?34:39)}function vJe(e,t,r,n,o,i){let a=!o;t++;let s=p=>({pos:t,ch:p,lineStart:r,curLine:n}),c=e.charCodeAt(t++);switch(c){case 110:return s(` +`);case 114:return s("\r");case 120:{let p;return{code:p,pos:t}=eU(e,t,r,n,2,!1,a,i),s(p===null?null:String.fromCharCode(p))}case 117:{let p;return{code:p,pos:t}=Dpe(e,t,r,n,a,i),s(p===null?null:String.fromCodePoint(p))}case 116:return s(" ");case 98:return s("\b");case 118:return s("\v");case 102:return s("\f");case 13:e.charCodeAt(t)===10&&++t;case 10:r=t,++n;case 8232:case 8233:return s("");case 56:case 57:if(o)return s(null);i.strictNumericEscape(t-1,r,n);default:if(c>=48&&c<=55){let p=t-1,d=/^[0-7]+/.exec(e.slice(p,t+2))[0],f=parseInt(d,8);f>255&&(d=d.slice(0,-1),f=parseInt(d,8)),t+=d.length-1;let m=e.charCodeAt(t);if(d!=="0"||m===56||m===57){if(o)return s(null);i.strictNumericEscape(p,r,n)}return s(String.fromCharCode(f))}return s(String.fromCharCode(c))}}function eU(e,t,r,n,o,i,a,s){let c=t,p;return{n:p,pos:t}=Tpe(e,t,r,n,16,o,i,!1,s,!a),p===null&&(a?s.invalidEscapeSequence(c,r,n):t=c-1),{code:p,pos:t}}function Tpe(e,t,r,n,o,i,a,s,c,p){let d=t,f=o===16?Kue.hex:Kue.decBinOct,m=o===16?x3.hex:o===10?x3.dec:o===8?x3.oct:x3.bin,y=!1,g=0;for(let S=0,b=i??1/0;S=97?I=E-97+10:E>=65?I=E-65+10:gJe(E)?I=E-48:I=1/0,I>=o){if(I<=9&&p)return{n:null,pos:t};if(I<=9&&c.invalidDigit(t,r,n,o))I=0;else if(a)I=0,y=!0;else break}++t,g=g*o+I}return t===d||i!=null&&t-d!==i||y?{n:null,pos:t}:{n:g,pos:t}}function Dpe(e,t,r,n,o,i){let a=e.charCodeAt(t),s;if(a===123){if(++t,{code:s,pos:t}=eU(e,t,r,n,e.indexOf("}",t)-t,!0,o,i),++t,s!==null&&s>1114111)if(o)i.invalidCodePoint(t,r,n);else return{code:null,pos:t}}else({code:s,pos:t}=eU(e,t,r,n,4,!1,o,i));return{code:s,pos:t}}function oD(e,t,r){return new Jm(r,e-t,e)}var bJe=new Set([103,109,115,105,121,117,100,118]),xJe=class{constructor(e){let t=e.startIndex||0;this.type=e.type,this.value=e.value,this.start=t+e.start,this.end=t+e.end,this.loc=new k3(e.startLoc,e.endLoc)}},EJe=class extends hJe{isLookahead;tokens=[];constructor(e,t){super(),this.state=new yJe,this.state.init(e),this.input=t,this.length=t.length,this.comments=[],this.isLookahead=!1}pushToken(e){this.tokens.length=this.state.tokensLength,this.tokens.push(e),++this.state.tokensLength}next(){this.checkKeywordEscapes(),this.optionFlags&256&&this.pushToken(new xJe(this.state)),this.state.lastTokEndLoc=this.state.endLoc,this.state.lastTokStartLoc=this.state.startLoc,this.nextToken()}eat(e){return this.match(e)?(this.next(),!0):!1}match(e){return this.state.type===e}createLookaheadState(e){return{pos:e.pos,value:null,type:e.type,start:e.start,end:e.end,context:[this.curContext()],inType:e.inType,startLoc:e.startLoc,lastTokEndLoc:e.lastTokEndLoc,curLine:e.curLine,lineStart:e.lineStart,curPosition:e.curPosition}}lookahead(){let e=this.state;this.state=this.createLookaheadState(e),this.isLookahead=!0,this.nextToken(),this.isLookahead=!1;let t=this.state;return this.state=e,t}nextTokenStart(){return this.nextTokenStartSince(this.state.pos)}nextTokenStartSince(e){return Vq.lastIndex=e,Vq.test(this.input)?Vq.lastIndex:e}lookaheadCharCode(){return this.lookaheadCharCodeSince(this.state.pos)}lookaheadCharCodeSince(e){return this.input.charCodeAt(this.nextTokenStartSince(e))}nextTokenInLineStart(){return this.nextTokenInLineStartSince(this.state.pos)}nextTokenInLineStartSince(e){return Kq.lastIndex=e,Kq.test(this.input)?Kq.lastIndex:e}lookaheadInLineCharCode(){return this.input.charCodeAt(this.nextTokenInLineStart())}codePointAtPos(e){let t=this.input.charCodeAt(e);if((t&64512)===55296&&++ethis.raise(t,r)),this.state.strictErrors.clear())}curContext(){return this.state.context[this.state.context.length-1]}nextToken(){if(this.skipSpace(),this.state.start=this.state.pos,this.isLookahead||(this.state.startLoc=this.state.curPosition()),this.state.pos>=this.length){this.finishToken(140);return}this.getTokenFromCode(this.codePointAtPos(this.state.pos))}skipBlockComment(e){let t;this.isLookahead||(t=this.state.curPosition());let r=this.state.pos,n=this.input.indexOf(e,r+2);if(n===-1)throw this.raise(W.UnterminatedComment,this.state.curPosition());for(this.state.pos=n+e.length,b3.lastIndex=r+2;b3.test(this.input)&&b3.lastIndex<=n;)++this.state.curLine,this.state.lineStart=b3.lastIndex;if(this.isLookahead)return;let o={type:"CommentBlock",value:this.input.slice(r+2,n),start:this.sourceToOffsetPos(r),end:this.sourceToOffsetPos(n+e.length),loc:new k3(t,this.state.curPosition())};return this.optionFlags&256&&this.pushToken(o),o}skipLineComment(e){let t=this.state.pos,r;this.isLookahead||(r=this.state.curPosition());let n=this.input.charCodeAt(this.state.pos+=e);if(this.state.pose)){let o=this.skipLineComment(3);o!==void 0&&(this.addComment(o),t?.push(o))}else break e}else if(r===60&&!this.inModule&&this.optionFlags&8192){let n=this.state.pos;if(this.input.charCodeAt(n+1)===33&&this.input.charCodeAt(n+2)===45&&this.input.charCodeAt(n+3)===45){let o=this.skipLineComment(4);o!==void 0&&(this.addComment(o),t?.push(o))}else break e}else break e}}if(t?.length>0){let r=this.state.pos,n={start:this.sourceToOffsetPos(e),end:this.sourceToOffsetPos(r),comments:t,leadingNode:null,trailingNode:null,containingNode:null};this.state.commentStack.push(n)}}finishToken(e,t){this.state.end=this.state.pos,this.state.endLoc=this.state.curPosition();let r=this.state.type;this.state.type=e,this.state.value=t,this.isLookahead||this.updateContext(r)}replaceToken(e){this.state.type=e,this.updateContext()}readToken_numberSign(){if(this.state.pos===0&&this.readToken_interpreter())return;let e=this.state.pos+1,t=this.codePointAtPos(e);if(t>=48&&t<=57)throw this.raise(W.UnexpectedDigitAfterHash,this.state.curPosition());ed(t)?(++this.state.pos,this.finishToken(139,this.readWord1(t))):t===92?(++this.state.pos,this.finishToken(139,this.readWord1())):this.finishOp(27,1)}readToken_dot(){let e=this.input.charCodeAt(this.state.pos+1);if(e>=48&&e<=57){this.readNumber(!0);return}e===46&&this.input.charCodeAt(this.state.pos+2)===46?(this.state.pos+=3,this.finishToken(21)):(++this.state.pos,this.finishToken(16))}readToken_slash(){this.input.charCodeAt(this.state.pos+1)===61?this.finishOp(31,2):this.finishOp(56,1)}readToken_interpreter(){if(this.state.pos!==0||this.length<2)return!1;let e=this.input.charCodeAt(this.state.pos+1);if(e!==33)return!1;let t=this.state.pos;for(this.state.pos+=1;!qv(e)&&++this.state.pos=48&&t<=57)?(this.state.pos+=2,this.finishToken(18)):(++this.state.pos,this.finishToken(17))}getTokenFromCode(e){switch(e){case 46:this.readToken_dot();return;case 40:++this.state.pos,this.finishToken(10);return;case 41:++this.state.pos,this.finishToken(11);return;case 59:++this.state.pos,this.finishToken(13);return;case 44:++this.state.pos,this.finishToken(12);return;case 91:++this.state.pos,this.finishToken(0);return;case 93:++this.state.pos,this.finishToken(3);return;case 123:++this.state.pos,this.finishToken(5);return;case 125:++this.state.pos,this.finishToken(8);return;case 58:this.hasPlugin("functionBind")&&this.input.charCodeAt(this.state.pos+1)===58?this.finishOp(15,2):(++this.state.pos,this.finishToken(14));return;case 63:this.readToken_question();return;case 96:this.readTemplateToken();return;case 48:{let t=this.input.charCodeAt(this.state.pos+1);if(t===120||t===88){this.readRadixNumber(16);return}if(t===111||t===79){this.readRadixNumber(8);return}if(t===98||t===66){this.readRadixNumber(2);return}}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:this.readNumber(!1);return;case 34:case 39:this.readString(e);return;case 47:this.readToken_slash();return;case 37:case 42:this.readToken_mult_modulo(e);return;case 124:case 38:this.readToken_pipe_amp(e);return;case 94:this.readToken_caret();return;case 43:case 45:this.readToken_plus_min(e);return;case 60:this.readToken_lt();return;case 62:this.readToken_gt();return;case 61:case 33:this.readToken_eq_excl(e);return;case 126:this.finishOp(36,1);return;case 64:this.readToken_atSign();return;case 35:this.readToken_numberSign();return;case 92:this.readWord();return;default:if(ed(e)){this.readWord(e);return}}throw this.raise(W.InvalidOrUnexpectedToken,this.state.curPosition(),{unexpected:String.fromCodePoint(e)})}finishOp(e,t){let r=this.input.slice(this.state.pos,this.state.pos+t);this.state.pos+=t,this.finishToken(e,r)}readRegexp(){let e=this.state.startLoc,t=this.state.start+1,r,n,{pos:o}=this.state;for(;;++o){if(o>=this.length)throw this.raise(W.UnterminatedRegExp,Rl(e,1));let c=this.input.charCodeAt(o);if(qv(c))throw this.raise(W.UnterminatedRegExp,Rl(e,1));if(r)r=!1;else{if(c===91)n=!0;else if(c===93&&n)n=!1;else if(c===47&&!n)break;r=c===92}}let i=this.input.slice(t,o);++o;let a="",s=()=>Rl(e,o+2-t);for(;o=2&&this.input.charCodeAt(t)===48;if(a){let d=this.input.slice(t,this.state.pos);if(this.recordStrictModeErrors(W.StrictOctalLiteral,r),!this.state.strict){let f=d.indexOf("_");f>0&&this.raise(W.ZeroDigitNumericSeparator,Rl(r,f))}i=a&&!/[89]/.test(d)}let s=this.input.charCodeAt(this.state.pos);if(s===46&&!i&&(++this.state.pos,this.readInt(10),n=!0,s=this.input.charCodeAt(this.state.pos)),(s===69||s===101)&&!i&&(s=this.input.charCodeAt(++this.state.pos),(s===43||s===45)&&++this.state.pos,this.readInt(10)===null&&this.raise(W.InvalidOrMissingExponent,r),n=!0,s=this.input.charCodeAt(this.state.pos)),s===110&&((n||a)&&this.raise(W.InvalidBigIntLiteral,r),++this.state.pos,o=!0),ed(this.codePointAtPos(this.state.pos)))throw this.raise(W.NumberIdentifier,this.state.curPosition());let c=this.input.slice(t,this.state.pos).replace(/[_mn]/g,"");if(o){this.finishToken(136,c);return}let p=i?parseInt(c,8):parseFloat(c);this.finishToken(135,p)}readCodePoint(e){let{code:t,pos:r}=Dpe(this.input,this.state.pos,this.state.lineStart,this.state.curLine,e,this.errorHandlers_readCodePoint);return this.state.pos=r,t}readString(e){let{str:t,pos:r,curLine:n,lineStart:o}=Gue(e===34?"double":"single",this.input,this.state.pos+1,this.state.lineStart,this.state.curLine,this.errorHandlers_readStringContents_string);this.state.pos=r+1,this.state.lineStart=o,this.state.curLine=n,this.finishToken(134,t)}readTemplateContinuation(){this.match(8)||this.unexpected(null,8),this.state.pos--,this.readTemplateToken()}readTemplateToken(){let e=this.input[this.state.pos],{str:t,firstInvalidLoc:r,pos:n,curLine:o,lineStart:i}=Gue("template",this.input,this.state.pos+1,this.state.lineStart,this.state.curLine,this.errorHandlers_readStringContents_template);this.state.pos=n+1,this.state.lineStart=i,this.state.curLine=o,r&&(this.state.firstInvalidTemplateEscapePos=new Jm(r.curLine,r.pos-r.lineStart,this.sourceToOffsetPos(r.pos))),this.input.codePointAt(n)===96?this.finishToken(24,r?null:e+t+"`"):(this.state.pos++,this.finishToken(25,r?null:e+t+"${"))}recordStrictModeErrors(e,t){let r=t.index;this.state.strict&&!this.state.strictErrors.has(r)?this.raise(e,t):this.state.strictErrors.set(r,[e,t])}readWord1(e){this.state.containsEsc=!1;let t="",r=this.state.pos,n=this.state.pos;for(e!==void 0&&(this.state.pos+=e<=65535?1:2);this.state.pos=0;a--){let s=i[a];if(s.loc.index===o)return i[a]=e(n,r);if(s.loc.indexthis.hasPlugin(t)))throw this.raise(W.MissingOneOfPlugins,this.state.startLoc,{missingPlugin:e})}errorBuilder(e){return(t,r,n)=>{this.raise(e,oD(t,r,n))}}errorHandlers_readInt={invalidDigit:(e,t,r,n)=>this.optionFlags&2048?(this.raise(W.InvalidDigit,oD(e,t,r),{radix:n}),!0):!1,numericSeparatorInEscapeSequence:this.errorBuilder(W.NumericSeparatorInEscapeSequence),unexpectedNumericSeparator:this.errorBuilder(W.UnexpectedNumericSeparator)};errorHandlers_readCodePoint=Object.assign({},this.errorHandlers_readInt,{invalidEscapeSequence:this.errorBuilder(W.InvalidEscapeSequence),invalidCodePoint:this.errorBuilder(W.InvalidCodePoint)});errorHandlers_readStringContents_string=Object.assign({},this.errorHandlers_readCodePoint,{strictNumericEscape:(e,t,r)=>{this.recordStrictModeErrors(W.StrictNumericEscape,oD(e,t,r))},unterminated:(e,t,r)=>{throw this.raise(W.UnterminatedString,oD(e-1,t,r))}});errorHandlers_readStringContents_template=Object.assign({},this.errorHandlers_readCodePoint,{strictNumericEscape:this.errorBuilder(W.StrictNumericEscape),unterminated:(e,t,r)=>{throw this.raise(W.UnterminatedTemplate,oD(e,t,r))}})},TJe=class{privateNames=new Set;loneAccessors=new Map;undefinedPrivateNames=new Map},DJe=class{parser;stack=[];undefinedPrivateNames=new Map;constructor(e){this.parser=e}current(){return this.stack[this.stack.length-1]}enter(){this.stack.push(new TJe)}exit(){let e=this.stack.pop(),t=this.current();for(let[r,n]of Array.from(e.undefinedPrivateNames))t?t.undefinedPrivateNames.has(r)||t.undefinedPrivateNames.set(r,n):this.parser.raise(W.InvalidPrivateFieldResolution,n,{identifierName:r})}declarePrivateName(e,t,r){let{privateNames:n,loneAccessors:o,undefinedPrivateNames:i}=this.current(),a=n.has(e);if(t&3){let s=a&&o.get(e);if(s){let c=s&4,p=t&4,d=s&3,f=t&3;a=d===f||c!==p,a||o.delete(e)}else a||o.set(e,t)}a&&this.parser.raise(W.PrivateNameRedeclaration,r,{identifierName:e}),n.add(e),i.delete(e)}usePrivateName(e,t){let r;for(r of this.stack)if(r.privateNames.has(e))return;r?r.undefinedPrivateNames.set(e,t):this.parser.raise(W.InvalidPrivateFieldResolution,t,{identifierName:e})}},C3=class{constructor(e=0){this.type=e}canBeArrowParameterDeclaration(){return this.type===2||this.type===1}isCertainlyParameterDeclaration(){return this.type===3}},Ape=class extends C3{declarationErrors=new Map;constructor(e){super(e)}recordDeclarationError(e,t){let r=t.index;this.declarationErrors.set(r,[e,t])}clearDeclarationError(e){this.declarationErrors.delete(e)}iterateErrors(e){this.declarationErrors.forEach(e)}},AJe=class{parser;stack=[new C3];constructor(e){this.parser=e}enter(e){this.stack.push(e)}exit(){this.stack.pop()}recordParameterInitializerError(e,t){let r=t.loc.start,{stack:n}=this,o=n.length-1,i=n[o];for(;!i.isCertainlyParameterDeclaration();){if(i.canBeArrowParameterDeclaration())i.recordDeclarationError(e,r);else return;i=n[--o]}this.parser.raise(e,r)}recordArrowParameterBindingError(e,t){let{stack:r}=this,n=r[r.length-1],o=t.loc.start;if(n.isCertainlyParameterDeclaration())this.parser.raise(e,o);else if(n.canBeArrowParameterDeclaration())n.recordDeclarationError(e,o);else return}recordAsyncArrowParametersError(e){let{stack:t}=this,r=t.length-1,n=t[r];for(;n.canBeArrowParameterDeclaration();)n.type===2&&n.recordDeclarationError(W.AwaitBindingIdentifier,e),n=t[--r]}validateAsPattern(){let{stack:e}=this,t=e[e.length-1];t.canBeArrowParameterDeclaration()&&t.iterateErrors(([r,n])=>{this.parser.raise(r,n);let o=e.length-2,i=e[o];for(;i.canBeArrowParameterDeclaration();)i.clearDeclarationError(n.index),i=e[--o]})}};function IJe(){return new C3(3)}function wJe(){return new Ape(1)}function kJe(){return new Ape(2)}function Ipe(){return new C3}var CJe=class extends EJe{addExtra(e,t,r,n=!0){if(!e)return;let{extra:o}=e;o==null&&(o={},e.extra=o),n?o[t]=r:Object.defineProperty(o,t,{enumerable:n,value:r})}isContextual(e){return this.state.type===e&&!this.state.containsEsc}isUnparsedContextual(e,t){if(this.input.startsWith(t,e)){let r=this.input.charCodeAt(e+t.length);return!(Sg(r)||(r&64512)===55296)}return!1}isLookaheadContextual(e){let t=this.nextTokenStart();return this.isUnparsedContextual(t,e)}eatContextual(e){return this.isContextual(e)?(this.next(),!0):!1}expectContextual(e,t){if(!this.eatContextual(e)){if(t!=null)throw this.raise(t,this.state.startLoc);this.unexpected(null,e)}}canInsertSemicolon(){return this.match(140)||this.match(8)||this.hasPrecedingLineBreak()}hasPrecedingLineBreak(){return Vue(this.input,this.offsetToSourcePos(this.state.lastTokEndLoc.index),this.state.start)}hasFollowingLineBreak(){return Vue(this.input,this.state.end,this.nextTokenStart())}isLineTerminator(){return this.eat(13)||this.canInsertSemicolon()}semicolon(e=!0){(e?this.isLineTerminator():this.eat(13))||this.raise(W.MissingSemicolon,this.state.lastTokEndLoc)}expect(e,t){this.eat(e)||this.unexpected(t,e)}tryParse(e,t=this.state.clone()){let r={node:null};try{let n=e((o=null)=>{throw r.node=o,r});if(this.state.errors.length>t.errors.length){let o=this.state;return this.state=t,this.state.tokensLength=o.tokensLength,{node:n,error:o.errors[t.errors.length],thrown:!1,aborted:!1,failState:o}}return{node:n,error:null,thrown:!1,aborted:!1,failState:null}}catch(n){let o=this.state;if(this.state=t,n instanceof SyntaxError)return{node:null,error:n,thrown:!0,aborted:!1,failState:o};if(n===r)return{node:r.node,error:null,thrown:!1,aborted:!0,failState:o};throw n}}checkExpressionErrors(e,t){if(!e)return!1;let{shorthandAssignLoc:r,doubleProtoLoc:n,privateKeyLoc:o,optionalParametersLoc:i,voidPatternLoc:a}=e,s=!!r||!!n||!!i||!!o||!!a;if(!t)return s;r!=null&&this.raise(W.InvalidCoverInitializedName,r),n!=null&&this.raise(W.DuplicateProto,n),o!=null&&this.raise(W.UnexpectedPrivateField,o),i!=null&&this.unexpected(i),a!=null&&this.raise(W.InvalidCoverDiscardElement,a)}isLiteralPropertyName(){return fpe(this.state.type)}isPrivateName(e){return e.type==="PrivateName"}getPrivateNameSV(e){return e.id.name}hasPropertyAsPrivateName(e){return(e.type==="MemberExpression"||e.type==="OptionalMemberExpression")&&this.isPrivateName(e.property)}isObjectProperty(e){return e.type==="ObjectProperty"}isObjectMethod(e){return e.type==="ObjectMethod"}initializeScopes(e=this.options.sourceType==="module"){let t=this.state.labels;this.state.labels=[];let r=this.exportedIdentifiers;this.exportedIdentifiers=new Set;let n=this.inModule;this.inModule=e;let o=this.scope,i=this.getScopeHandler();this.scope=new i(this,e);let a=this.prodParam;this.prodParam=new _Je;let s=this.classScope;this.classScope=new DJe(this);let c=this.expressionScope;return this.expressionScope=new AJe(this),()=>{this.state.labels=t,this.exportedIdentifiers=r,this.inModule=n,this.scope=o,this.prodParam=a,this.classScope=s,this.expressionScope=c}}enterInitialScopes(){let e=0;(this.inModule||this.optionFlags&1)&&(e|=2),this.optionFlags&32&&(e|=1);let t=!this.inModule&&this.options.sourceType==="commonjs";(t||this.optionFlags&2)&&(e|=4),this.prodParam.enter(e);let r=t?514:1;this.optionFlags&4&&(r|=512),this.optionFlags&16&&(r|=48),this.scope.enter(r)}checkDestructuringPrivate(e){let{privateKeyLoc:t}=e;t!==null&&this.expectPlugin("destructuringPrivate",t)}},I3=class{shorthandAssignLoc=null;doubleProtoLoc=null;privateKeyLoc=null;optionalParametersLoc=null;voidPatternLoc=null},tU=class{constructor(e,t,r){this.start=t,this.end=0,this.loc=new k3(r),e?.optionFlags&128&&(this.range=[t,0]),e?.filename&&(this.loc.filename=e.filename)}type=""},Hue=tU.prototype,PJe=class extends CJe{startNode(){let e=this.state.startLoc;return new tU(this,e.index,e)}startNodeAt(e){return new tU(this,e.index,e)}startNodeAtNode(e){return this.startNodeAt(e.loc.start)}finishNode(e,t){return this.finishNodeAt(e,t,this.state.lastTokEndLoc)}finishNodeAt(e,t,r){return e.type=t,e.end=r.index,e.loc.end=r,this.optionFlags&128&&(e.range[1]=r.index),this.optionFlags&4096&&this.processComment(e),e}resetStartLocation(e,t){e.start=t.index,e.loc.start=t,this.optionFlags&128&&(e.range[0]=t.index)}resetEndLocation(e,t=this.state.lastTokEndLoc){e.end=t.index,e.loc.end=t,this.optionFlags&128&&(e.range[1]=t.index)}resetStartLocationFromNode(e,t){this.resetStartLocation(e,t.loc.start)}castNodeTo(e,t){return e.type=t,e}cloneIdentifier(e){let{type:t,start:r,end:n,loc:o,range:i,name:a}=e,s=Object.create(Hue);return s.type=t,s.start=r,s.end=n,s.loc=o,s.range=i,s.name=a,e.extra&&(s.extra=e.extra),s}cloneStringLiteral(e){let{type:t,start:r,end:n,loc:o,range:i,extra:a}=e,s=Object.create(Hue);return s.type=t,s.start=r,s.end=n,s.loc=o,s.range=i,s.extra=a,s.value=e.value,s}},rU=e=>e.type==="ParenthesizedExpression"?rU(e.expression):e,OJe=class extends PJe{toAssignable(e,t=!1){let r;switch((e.type==="ParenthesizedExpression"||e.extra?.parenthesized)&&(r=rU(e),t?r.type==="Identifier"?this.expressionScope.recordArrowParameterBindingError(W.InvalidParenthesizedAssignment,e):r.type!=="CallExpression"&&r.type!=="MemberExpression"&&!this.isOptionalMemberExpression(r)&&this.raise(W.InvalidParenthesizedAssignment,e):this.raise(W.InvalidParenthesizedAssignment,e)),e.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":case"VoidPattern":break;case"ObjectExpression":this.castNodeTo(e,"ObjectPattern");for(let n=0,o=e.properties.length,i=o-1;nn.type!=="ObjectMethod"&&(o===r||n.type!=="SpreadElement")&&this.isAssignable(n))}case"ObjectProperty":return this.isAssignable(e.value);case"SpreadElement":return this.isAssignable(e.argument);case"ArrayExpression":return e.elements.every(r=>r===null||this.isAssignable(r));case"AssignmentExpression":return e.operator==="=";case"ParenthesizedExpression":return this.isAssignable(e.expression);case"MemberExpression":case"OptionalMemberExpression":return!t;default:return!1}}toReferencedList(e,t){return e}toReferencedListDeep(e,t){this.toReferencedList(e,t);for(let r of e)r?.type==="ArrayExpression"&&this.toReferencedListDeep(r.elements)}parseSpread(e){let t=this.startNode();return this.next(),t.argument=this.parseMaybeAssignAllowIn(e,void 0),this.finishNode(t,"SpreadElement")}parseRestBinding(){let e=this.startNode();this.next();let t=this.parseBindingAtom();return t.type==="VoidPattern"&&this.raise(W.UnexpectedVoidPattern,t),e.argument=t,this.finishNode(e,"RestElement")}parseBindingAtom(){switch(this.state.type){case 0:{let e=this.startNode();return this.next(),e.elements=this.parseBindingList(3,93,1),this.finishNode(e,"ArrayPattern")}case 5:return this.parseObjectLike(8,!0);case 88:return this.parseVoidPattern(null)}return this.parseIdentifier()}parseBindingList(e,t,r){let n=r&1,o=[],i=!0;for(;!this.eat(e);)if(i?i=!1:this.expect(12),n&&this.match(12))o.push(null);else{if(this.eat(e))break;if(this.match(21)){let a=this.parseRestBinding();if(r&2&&(a=this.parseFunctionParamType(a)),o.push(a),!this.checkCommaAfterRest(t)){this.expect(e);break}}else{let a=[];if(r&2)for(this.match(26)&&this.hasPlugin("decorators")&&this.raise(W.UnsupportedParameterDecorator,this.state.startLoc);this.match(26);)a.push(this.parseDecorator());o.push(this.parseBindingElement(r,a))}}return o}parseBindingRestProperty(e){return this.next(),this.hasPlugin("discardBinding")&&this.match(88)?(e.argument=this.parseVoidPattern(null),this.raise(W.UnexpectedVoidPattern,e.argument)):e.argument=this.parseIdentifier(),this.checkCommaAfterRest(125),this.finishNode(e,"RestElement")}parseBindingProperty(){let{type:e,startLoc:t}=this.state;if(e===21)return this.parseBindingRestProperty(this.startNode());let r=this.startNode();return e===139?(this.expectPlugin("destructuringPrivate",t),this.classScope.usePrivateName(this.state.value,t),r.key=this.parsePrivateName()):this.parsePropertyName(r),r.method=!1,this.parseObjPropValue(r,t,!1,!1,!0,!1)}parseBindingElement(e,t){let r=this.parseMaybeDefault();return e&2&&this.parseFunctionParamType(r),t.length&&(r.decorators=t,this.resetStartLocationFromNode(r,t[0])),this.parseMaybeDefault(r.loc.start,r)}parseFunctionParamType(e){return e}parseMaybeDefault(e,t){if(e??(e=this.state.startLoc),t=t??this.parseBindingAtom(),!this.eat(29))return t;let r=this.startNodeAt(e);return t.type==="VoidPattern"&&this.raise(W.VoidPatternInitializer,t),r.left=t,r.right=this.parseMaybeAssignAllowIn(),this.finishNode(r,"AssignmentPattern")}isValidLVal(e,t,r,n){switch(e){case"AssignmentPattern":return"left";case"RestElement":return"argument";case"ObjectProperty":return"value";case"ParenthesizedExpression":return"expression";case"ArrayPattern":return"elements";case"ObjectPattern":return"properties";case"VoidPattern":return!0;case"CallExpression":if(!t&&!this.state.strict&&this.optionFlags&8192)return!0}return!1}isOptionalMemberExpression(e){return e.type==="OptionalMemberExpression"}checkLVal(e,t,r=64,n=!1,o=!1,i=!1,a=!1){let s=e.type;if(this.isObjectMethod(e))return;let c=this.isOptionalMemberExpression(e);if(c||s==="MemberExpression"){c&&(this.expectPlugin("optionalChainingAssign",e.loc.start),t.type!=="AssignmentExpression"&&this.raise(W.InvalidLhsOptionalChaining,e,{ancestor:t})),r!==64&&this.raise(W.InvalidPropertyBindingPattern,e);return}if(s==="Identifier"){this.checkIdentifier(e,r,o);let{name:S}=e;n&&(n.has(S)?this.raise(W.ParamDupe,e):n.add(S));return}else s==="VoidPattern"&&t.type==="CatchClause"&&this.raise(W.VoidPatternCatchClauseParam,e);let p=rU(e);a||(a=p.type==="CallExpression"&&(p.callee.type==="Import"||p.callee.type==="Super"));let d=this.isValidLVal(s,a,!(i||e.extra?.parenthesized)&&t.type==="AssignmentExpression",r);if(d===!0)return;if(d===!1){let S=r===64?W.InvalidLhs:W.InvalidLhsBinding;this.raise(S,e,{ancestor:t});return}let f,m;typeof d=="string"?(f=d,m=s==="ParenthesizedExpression"):[f,m]=d;let y=s==="ArrayPattern"||s==="ObjectPattern"?{type:s}:t,g=e[f];if(Array.isArray(g))for(let S of g)S&&this.checkLVal(S,y,r,n,o,m,!0);else g&&this.checkLVal(g,y,r,n,o,m,a)}checkIdentifier(e,t,r=!1){this.state.strict&&(r?bpe(e.name,this.inModule):vpe(e.name))&&(t===64?this.raise(W.StrictEvalArguments,e,{referenceName:e.name}):this.raise(W.StrictEvalArgumentsBinding,e,{bindingName:e.name})),t&8192&&e.name==="let"&&this.raise(W.LetInLexicalBinding,e),t&64||this.declareNameFromIdentifier(e,t)}declareNameFromIdentifier(e,t){this.scope.declareName(e.name,t,e.loc.start)}checkToRestConversion(e,t){switch(e.type){case"ParenthesizedExpression":this.checkToRestConversion(e.expression,t);break;case"Identifier":case"MemberExpression":break;case"ArrayExpression":case"ObjectExpression":if(t)break;default:this.raise(W.InvalidRestAssignmentPattern,e)}}checkCommaAfterRest(e){return this.match(12)?(this.raise(this.lookaheadCharCode()===e?W.RestTrailingComma:W.ElementAfterRest,this.state.startLoc),!0):!1}},Gq=/in(?:stanceof)?|as|satisfies/y;function NJe(e){if(e==null)throw new Error(`Unexpected ${e} value.`);return e}function Zue(e){if(!e)throw new Error("Assert fail")}var xt=Yp`typescript`({AbstractMethodHasImplementation:({methodName:e})=>`Method '${e}' cannot have an implementation because it is marked abstract.`,AbstractPropertyHasInitializer:({propertyName:e})=>`Property '${e}' cannot have an initializer because it is marked abstract.`,AccessorCannotBeOptional:"An 'accessor' property cannot be declared optional.",AccessorCannotDeclareThisParameter:"'get' and 'set' accessors cannot declare 'this' parameters.",AccessorCannotHaveTypeParameters:"An accessor cannot have type parameters.",ClassMethodHasDeclare:"Class methods cannot have the 'declare' modifier.",ClassMethodHasReadonly:"Class methods cannot have the 'readonly' modifier.",ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference:"A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.",ConstructorHasTypeParameters:"Type parameters cannot appear on a constructor declaration.",DeclareAccessor:({kind:e})=>`'declare' is not allowed in ${e}ters.`,DeclareClassFieldHasInitializer:"Initializers are not allowed in ambient contexts.",DeclareFunctionHasImplementation:"An implementation cannot be declared in ambient contexts.",DuplicateAccessibilityModifier:({modifier:e})=>`Accessibility modifier already seen: '${e}'.`,DuplicateModifier:({modifier:e})=>`Duplicate modifier: '${e}'.`,EmptyHeritageClauseType:({token:e})=>`'${e}' list cannot be empty.`,EmptyTypeArguments:"Type argument list cannot be empty.",EmptyTypeParameters:"Type parameter list cannot be empty.",ExpectedAmbientAfterExportDeclare:"'export declare' must be followed by an ambient declaration.",ImportAliasHasImportType:"An import alias can not use 'import type'.",ImportReflectionHasImportType:"An `import module` declaration can not use `type` modifier",IncompatibleModifiers:({modifiers:e})=>`'${e[0]}' modifier cannot be used with '${e[1]}' modifier.`,IndexSignatureHasAbstract:"Index signatures cannot have the 'abstract' modifier.",IndexSignatureHasAccessibility:({modifier:e})=>`Index signatures cannot have an accessibility modifier ('${e}').`,IndexSignatureHasDeclare:"Index signatures cannot have the 'declare' modifier.",IndexSignatureHasOverride:"'override' modifier cannot appear on an index signature.",IndexSignatureHasStatic:"Index signatures cannot have the 'static' modifier.",InitializerNotAllowedInAmbientContext:"Initializers are not allowed in ambient contexts.",InvalidHeritageClauseType:({token:e})=>`'${e}' list can only include identifiers or qualified-names with optional type arguments.`,InvalidModifierOnAwaitUsingDeclaration:e=>`'${e}' modifier cannot appear on an await using declaration.`,InvalidModifierOnTypeMember:({modifier:e})=>`'${e}' modifier cannot appear on a type member.`,InvalidModifierOnTypeParameter:({modifier:e})=>`'${e}' modifier cannot appear on a type parameter.`,InvalidModifierOnTypeParameterPositions:({modifier:e})=>`'${e}' modifier can only appear on a type parameter of a class, interface or type alias.`,InvalidModifierOnUsingDeclaration:e=>`'${e}' modifier cannot appear on a using declaration.`,InvalidModifiersOrder:({orderedModifiers:e})=>`'${e[0]}' modifier must precede '${e[1]}' modifier.`,InvalidPropertyAccessAfterInstantiationExpression:"Invalid property access after an instantiation expression. You can either wrap the instantiation expression in parentheses, or delete the type arguments.",InvalidTupleMemberLabel:"Tuple members must be labeled with a simple identifier.",MissingInterfaceName:"'interface' declarations must be followed by an identifier.",NonAbstractClassHasAbstractMethod:"Abstract methods can only appear within an abstract class.",NonClassMethodPropertyHasAbstractModifier:"'abstract' modifier can only appear on a class, method, or property declaration.",OptionalTypeBeforeRequired:"A required element cannot follow an optional element.",OverrideNotInSubClass:"This member cannot have an 'override' modifier because its containing class does not extend another class.",PatternIsOptional:"A binding pattern parameter cannot be optional in an implementation signature.",PrivateElementHasAbstract:"Private elements cannot have the 'abstract' modifier.",PrivateElementHasAccessibility:({modifier:e})=>`Private elements cannot have an accessibility modifier ('${e}').`,ReadonlyForMethodSignature:"'readonly' modifier can only appear on a property declaration or index signature.",ReservedArrowTypeParam:"This syntax is reserved in files with the .mts or .cts extension. Add a trailing comma, as in `() => ...`.",ReservedTypeAssertion:"This syntax is reserved in files with the .mts or .cts extension. Use an `as` expression instead.",SetAccessorCannotHaveOptionalParameter:"A 'set' accessor cannot have an optional parameter.",SetAccessorCannotHaveRestParameter:"A 'set' accessor cannot have rest parameter.",SetAccessorCannotHaveReturnType:"A 'set' accessor cannot have a return type annotation.",SingleTypeParameterWithoutTrailingComma:({typeParameterName:e})=>`Single type parameter ${e} should have a trailing comma. Example usage: <${e},>.`,StaticBlockCannotHaveModifier:"Static class blocks cannot have any modifier.",TupleOptionalAfterType:"A labeled tuple optional element must be declared using a question mark after the name and before the colon (`name?: type`), rather than after the type (`name: type?`).",TypeAnnotationAfterAssign:"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.",TypeImportCannotSpecifyDefaultAndNamed:"A type-only import can specify a default import or named bindings, but not both.",TypeModifierIsUsedInTypeExports:"The 'type' modifier cannot be used on a named export when 'export type' is used on its export statement.",TypeModifierIsUsedInTypeImports:"The 'type' modifier cannot be used on a named import when 'import type' is used on its import statement.",UnexpectedParameterModifier:"A parameter property is only allowed in a constructor implementation.",UnexpectedReadonly:"'readonly' type modifier is only permitted on array and tuple literal types.",UnexpectedTypeAnnotation:"Did not expect a type annotation here.",UnexpectedTypeCastInParameter:"Unexpected type cast in parameter position.",UnsupportedImportTypeArgument:"Argument in a type import must be a string literal.",UnsupportedParameterPropertyKind:"A parameter property may not be declared using a binding pattern.",UnsupportedSignatureParameterKind:({type:e})=>`Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got ${e}.`,UsingDeclarationInAmbientContext:e=>`'${e}' declarations are not allowed in ambient contexts.`});function FJe(e){switch(e){case"any":return"TSAnyKeyword";case"boolean":return"TSBooleanKeyword";case"bigint":return"TSBigIntKeyword";case"never":return"TSNeverKeyword";case"number":return"TSNumberKeyword";case"object":return"TSObjectKeyword";case"string":return"TSStringKeyword";case"symbol":return"TSSymbolKeyword";case"undefined":return"TSUndefinedKeyword";case"unknown":return"TSUnknownKeyword";default:return}}function Wue(e){return e==="private"||e==="public"||e==="protected"}function RJe(e){return e==="in"||e==="out"}function nU(e){if(e.extra?.parenthesized)return!1;switch(e.type){case"Identifier":return!0;case"MemberExpression":return!e.computed&&nU(e.object);case"TSInstantiationExpression":return nU(e.expression);default:return!1}}var LJe=e=>class extends e{getScopeHandler(){return dJe}tsIsIdentifier(){return Qn(this.state.type)}tsTokenCanFollowModifier(){return this.match(0)||this.match(5)||this.match(55)||this.match(21)||this.match(139)||this.isLiteralPropertyName()}tsNextTokenOnSameLineAndCanFollowModifier(){return this.next(),this.hasPrecedingLineBreak()?!1:this.tsTokenCanFollowModifier()}tsNextTokenCanFollowModifier(){return this.match(106)?(this.next(),this.tsTokenCanFollowModifier()):this.tsNextTokenOnSameLineAndCanFollowModifier()}tsParseModifier(t,r,n){if(!Qn(this.state.type)&&this.state.type!==58&&this.state.type!==75)return;let o=this.state.value;if(t.includes(o)){if(n&&this.match(106)||r&&this.tsIsStartOfStaticBlocks())return;if(this.tsTryParse(this.tsNextTokenCanFollowModifier.bind(this)))return o}}tsParseModifiers({allowedModifiers:t,disallowedModifiers:r,stopOnStartOfClassStaticBlock:n,errorTemplate:o=xt.InvalidModifierOnTypeMember},i){let a=(c,p,d,f)=>{p===d&&i[f]&&this.raise(xt.InvalidModifiersOrder,c,{orderedModifiers:[d,f]})},s=(c,p,d,f)=>{(i[d]&&p===f||i[f]&&p===d)&&this.raise(xt.IncompatibleModifiers,c,{modifiers:[d,f]})};for(;;){let{startLoc:c}=this.state,p=this.tsParseModifier(t.concat(r??[]),n,i.static);if(!p)break;Wue(p)?i.accessibility?this.raise(xt.DuplicateAccessibilityModifier,c,{modifier:p}):(a(c,p,p,"override"),a(c,p,p,"static"),a(c,p,p,"readonly"),i.accessibility=p):RJe(p)?(i[p]&&this.raise(xt.DuplicateModifier,c,{modifier:p}),i[p]=!0,a(c,p,"in","out")):(Object.prototype.hasOwnProperty.call(i,p)?this.raise(xt.DuplicateModifier,c,{modifier:p}):(a(c,p,"static","readonly"),a(c,p,"static","override"),a(c,p,"override","readonly"),a(c,p,"abstract","override"),s(c,p,"declare","override"),s(c,p,"static","abstract")),i[p]=!0),r?.includes(p)&&this.raise(o,c,{modifier:p})}}tsIsListTerminator(t){switch(t){case"EnumMembers":case"TypeMembers":return this.match(8);case"HeritageClauseElement":return this.match(5);case"TupleElementTypes":return this.match(3);case"TypeParametersOrArguments":return this.match(48)}}tsParseList(t,r){let n=[];for(;!this.tsIsListTerminator(t);)n.push(r());return n}tsParseDelimitedList(t,r,n){return NJe(this.tsParseDelimitedListWorker(t,r,!0,n))}tsParseDelimitedListWorker(t,r,n,o){let i=[],a=-1;for(;!this.tsIsListTerminator(t);){a=-1;let s=r();if(s==null)return;if(i.push(s),this.eat(12)){a=this.state.lastTokStartLoc.index;continue}if(this.tsIsListTerminator(t))break;n&&this.expect(12);return}return o&&(o.value=a),i}tsParseBracketedList(t,r,n,o,i){o||(n?this.expect(0):this.expect(47));let a=this.tsParseDelimitedList(t,r,i);return n?this.expect(3):this.expect(48),a}tsParseImportType(){let t=this.startNode();return this.expect(83),this.expect(10),this.match(134)?t.argument=this.tsParseLiteralTypeNode():(this.raise(xt.UnsupportedImportTypeArgument,this.state.startLoc),t.argument=this.tsParseNonConditionalType()),this.eat(12)?t.options=this.tsParseImportTypeOptions():t.options=null,this.expect(11),this.eat(16)&&(t.qualifier=this.tsParseEntityName(3)),this.match(47)&&(t.typeArguments=this.tsParseTypeArguments()),this.finishNode(t,"TSImportType")}tsParseImportTypeOptions(){let t=this.startNode();this.expect(5);let r=this.startNode();return this.isContextual(76)?(r.method=!1,r.key=this.parseIdentifier(!0),r.computed=!1,r.shorthand=!1):this.unexpected(null,76),this.expect(14),r.value=this.tsParseImportTypeWithPropertyValue(),t.properties=[this.finishObjectProperty(r)],this.eat(12),this.expect(8),this.finishNode(t,"ObjectExpression")}tsParseImportTypeWithPropertyValue(){let t=this.startNode(),r=[];for(this.expect(5);!this.match(8);){let n=this.state.type;Qn(n)||n===134?r.push(super.parsePropertyDefinition(null)):this.unexpected(),this.eat(12)}return t.properties=r,this.next(),this.finishNode(t,"ObjectExpression")}tsParseEntityName(t){let r;if(t&1&&this.match(78))if(t&2)r=this.parseIdentifier(!0);else{let n=this.startNode();this.next(),r=this.finishNode(n,"ThisExpression")}else r=this.parseIdentifier(!!(t&1));for(;this.eat(16);){let n=this.startNodeAtNode(r);n.left=r,n.right=this.parseIdentifier(!!(t&1)),r=this.finishNode(n,"TSQualifiedName")}return r}tsParseTypeReference(){let t=this.startNode();return t.typeName=this.tsParseEntityName(1),!this.hasPrecedingLineBreak()&&this.match(47)&&(t.typeArguments=this.tsParseTypeArguments()),this.finishNode(t,"TSTypeReference")}tsParseThisTypePredicate(t){this.next();let r=this.startNodeAtNode(t);return r.parameterName=t,r.typeAnnotation=this.tsParseTypeAnnotation(!1),r.asserts=!1,this.finishNode(r,"TSTypePredicate")}tsParseThisTypeNode(){let t=this.startNode();return this.next(),this.finishNode(t,"TSThisType")}tsParseTypeQuery(){let t=this.startNode();return this.expect(87),this.match(83)?t.exprName=this.tsParseImportType():t.exprName=this.tsParseEntityName(1),!this.hasPrecedingLineBreak()&&this.match(47)&&(t.typeArguments=this.tsParseTypeArguments()),this.finishNode(t,"TSTypeQuery")}tsParseInOutModifiers=this.tsParseModifiers.bind(this,{allowedModifiers:["in","out"],disallowedModifiers:["const","public","private","protected","readonly","declare","abstract","override"],errorTemplate:xt.InvalidModifierOnTypeParameter});tsParseConstModifier=this.tsParseModifiers.bind(this,{allowedModifiers:["const"],disallowedModifiers:["in","out"],errorTemplate:xt.InvalidModifierOnTypeParameterPositions});tsParseInOutConstModifiers=this.tsParseModifiers.bind(this,{allowedModifiers:["in","out","const"],disallowedModifiers:["public","private","protected","readonly","declare","abstract","override"],errorTemplate:xt.InvalidModifierOnTypeParameter});tsParseTypeParameter(t){let r=this.startNode();return t(r),r.name=this.tsParseTypeParameterName(),r.constraint=this.tsEatThenParseType(81),r.default=this.tsEatThenParseType(29),this.finishNode(r,"TSTypeParameter")}tsTryParseTypeParameters(t){if(this.match(47))return this.tsParseTypeParameters(t)}tsParseTypeParameters(t){let r=this.startNode();this.match(47)||this.match(143)?this.next():this.unexpected();let n={value:-1};return r.params=this.tsParseBracketedList("TypeParametersOrArguments",this.tsParseTypeParameter.bind(this,t),!1,!0,n),r.params.length===0&&this.raise(xt.EmptyTypeParameters,r),n.value!==-1&&this.addExtra(r,"trailingComma",n.value),this.finishNode(r,"TSTypeParameterDeclaration")}tsFillSignature(t,r){let n=t===19,o="params",i="returnType";r.typeParameters=this.tsTryParseTypeParameters(this.tsParseConstModifier),this.expect(10),r[o]=this.tsParseBindingListForSignature(),n?r[i]=this.tsParseTypeOrTypePredicateAnnotation(t):this.match(t)&&(r[i]=this.tsParseTypeOrTypePredicateAnnotation(t))}tsParseBindingListForSignature(){let t=super.parseBindingList(11,41,2);for(let r of t){let{type:n}=r;(n==="AssignmentPattern"||n==="TSParameterProperty")&&this.raise(xt.UnsupportedSignatureParameterKind,r,{type:n})}return t}tsParseTypeMemberSemicolon(){!this.eat(12)&&!this.isLineTerminator()&&this.expect(13)}tsParseSignatureMember(t,r){return this.tsFillSignature(14,r),this.tsParseTypeMemberSemicolon(),this.finishNode(r,t)}tsIsUnambiguouslyIndexSignature(){return this.next(),Qn(this.state.type)?(this.next(),this.match(14)):!1}tsTryParseIndexSignature(t){if(!(this.match(0)&&this.tsLookAhead(this.tsIsUnambiguouslyIndexSignature.bind(this))))return;this.expect(0);let r=this.parseIdentifier();r.typeAnnotation=this.tsParseTypeAnnotation(),this.resetEndLocation(r),this.expect(3),t.parameters=[r];let n=this.tsTryParseTypeAnnotation();return n&&(t.typeAnnotation=n),this.tsParseTypeMemberSemicolon(),this.finishNode(t,"TSIndexSignature")}tsParsePropertyOrMethodSignature(t,r){if(this.eat(17)&&(t.optional=!0),this.match(10)||this.match(47)){r&&this.raise(xt.ReadonlyForMethodSignature,t);let n=t;n.kind&&this.match(47)&&this.raise(xt.AccessorCannotHaveTypeParameters,this.state.curPosition()),this.tsFillSignature(14,n),this.tsParseTypeMemberSemicolon();let o="params",i="returnType";if(n.kind==="get")n[o].length>0&&(this.raise(W.BadGetterArity,this.state.curPosition()),this.isThisParam(n[o][0])&&this.raise(xt.AccessorCannotDeclareThisParameter,this.state.curPosition()));else if(n.kind==="set"){if(n[o].length!==1)this.raise(W.BadSetterArity,this.state.curPosition());else{let a=n[o][0];this.isThisParam(a)&&this.raise(xt.AccessorCannotDeclareThisParameter,this.state.curPosition()),a.type==="Identifier"&&a.optional&&this.raise(xt.SetAccessorCannotHaveOptionalParameter,this.state.curPosition()),a.type==="RestElement"&&this.raise(xt.SetAccessorCannotHaveRestParameter,this.state.curPosition())}n[i]&&this.raise(xt.SetAccessorCannotHaveReturnType,n[i])}else n.kind="method";return this.finishNode(n,"TSMethodSignature")}else{let n=t;r&&(n.readonly=!0);let o=this.tsTryParseTypeAnnotation();return o&&(n.typeAnnotation=o),this.tsParseTypeMemberSemicolon(),this.finishNode(n,"TSPropertySignature")}}tsParseTypeMember(){let t=this.startNode();if(this.match(10)||this.match(47))return this.tsParseSignatureMember("TSCallSignatureDeclaration",t);if(this.match(77)){let n=this.startNode();return this.next(),this.match(10)||this.match(47)?this.tsParseSignatureMember("TSConstructSignatureDeclaration",t):(t.key=this.createIdentifier(n,"new"),this.tsParsePropertyOrMethodSignature(t,!1))}return this.tsParseModifiers({allowedModifiers:["readonly"],disallowedModifiers:["declare","abstract","private","protected","public","static","override"]},t),this.tsTryParseIndexSignature(t)||(super.parsePropertyName(t),!t.computed&&t.key.type==="Identifier"&&(t.key.name==="get"||t.key.name==="set")&&this.tsTokenCanFollowModifier()&&(t.kind=t.key.name,super.parsePropertyName(t),!this.match(10)&&!this.match(47)&&this.unexpected(null,10)),this.tsParsePropertyOrMethodSignature(t,!!t.readonly))}tsParseTypeLiteral(){let t=this.startNode();return t.members=this.tsParseObjectTypeMembers(),this.finishNode(t,"TSTypeLiteral")}tsParseObjectTypeMembers(){this.expect(5);let t=this.tsParseList("TypeMembers",this.tsParseTypeMember.bind(this));return this.expect(8),t}tsIsStartOfMappedType(){return this.next(),this.eat(53)?this.isContextual(122):(this.isContextual(122)&&this.next(),!this.match(0)||(this.next(),!this.tsIsIdentifier())?!1:(this.next(),this.match(58)))}tsParseMappedType(){let t=this.startNode();return this.expect(5),this.match(53)?(t.readonly=this.state.value,this.next(),this.expectContextual(122)):this.eatContextual(122)&&(t.readonly=!0),this.expect(0),t.key=this.tsParseTypeParameterName(),t.constraint=this.tsExpectThenParseType(58),t.nameType=this.eatContextual(93)?this.tsParseType():null,this.expect(3),this.match(53)?(t.optional=this.state.value,this.next(),this.expect(17)):this.eat(17)&&(t.optional=!0),t.typeAnnotation=this.tsTryParseType(),this.semicolon(),this.expect(8),this.finishNode(t,"TSMappedType")}tsParseTupleType(){let t=this.startNode();t.elementTypes=this.tsParseBracketedList("TupleElementTypes",this.tsParseTupleElementType.bind(this),!0,!1);let r=!1;return t.elementTypes.forEach(n=>{let{type:o}=n;r&&o!=="TSRestType"&&o!=="TSOptionalType"&&!(o==="TSNamedTupleMember"&&n.optional)&&this.raise(xt.OptionalTypeBeforeRequired,n),r||(r=o==="TSNamedTupleMember"&&n.optional||o==="TSOptionalType")}),this.finishNode(t,"TSTupleType")}tsParseTupleElementType(){let t=this.state.startLoc,r=this.eat(21),{startLoc:n}=this.state,o,i,a,s,c=Ou(this.state.type)?this.lookaheadCharCode():null;if(c===58)o=!0,a=!1,i=this.parseIdentifier(!0),this.expect(14),s=this.tsParseType();else if(c===63){a=!0;let p=this.state.value,d=this.tsParseNonArrayType();this.lookaheadCharCode()===58?(o=!0,i=this.createIdentifier(this.startNodeAt(n),p),this.expect(17),this.expect(14),s=this.tsParseType()):(o=!1,s=d,this.expect(17))}else s=this.tsParseType(),a=this.eat(17),o=this.eat(14);if(o){let p;i?(p=this.startNodeAt(n),p.optional=a,p.label=i,p.elementType=s,this.eat(17)&&(p.optional=!0,this.raise(xt.TupleOptionalAfterType,this.state.lastTokStartLoc))):(p=this.startNodeAt(n),p.optional=a,this.raise(xt.InvalidTupleMemberLabel,s),p.label=s,p.elementType=this.tsParseType()),s=this.finishNode(p,"TSNamedTupleMember")}else if(a){let p=this.startNodeAt(n);p.typeAnnotation=s,s=this.finishNode(p,"TSOptionalType")}if(r){let p=this.startNodeAt(t);p.typeAnnotation=s,s=this.finishNode(p,"TSRestType")}return s}tsParseParenthesizedType(){let t=this.startNode();return this.expect(10),t.typeAnnotation=this.tsParseType(),this.expect(11),this.finishNode(t,"TSParenthesizedType")}tsParseFunctionOrConstructorType(t,r){let n=this.startNode();return t==="TSConstructorType"&&(n.abstract=!!r,r&&this.next(),this.next()),this.tsInAllowConditionalTypesContext(()=>this.tsFillSignature(19,n)),this.finishNode(n,t)}tsParseLiteralTypeNode(){let t=this.startNode();switch(this.state.type){case 135:case 136:case 134:case 85:case 86:t.literal=super.parseExprAtom();break;default:this.unexpected()}return this.finishNode(t,"TSLiteralType")}tsParseTemplateLiteralType(){{let t=this.state.startLoc,r=this.parseTemplateElement(!1),n=[r];if(r.tail){let o=this.startNodeAt(t),i=this.startNodeAt(t);return i.expressions=[],i.quasis=n,o.literal=this.finishNode(i,"TemplateLiteral"),this.finishNode(o,"TSLiteralType")}else{let o=[];for(;!r.tail;)o.push(this.tsParseType()),this.readTemplateContinuation(),n.push(r=this.parseTemplateElement(!1));let i=this.startNodeAt(t);return i.types=o,i.quasis=n,this.finishNode(i,"TSTemplateLiteralType")}}}parseTemplateSubstitution(){return this.state.inType?this.tsParseType():super.parseTemplateSubstitution()}tsParseThisTypeOrThisTypePredicate(){let t=this.tsParseThisTypeNode();return this.isContextual(116)&&!this.hasPrecedingLineBreak()?this.tsParseThisTypePredicate(t):t}tsParseNonArrayType(){switch(this.state.type){case 134:case 135:case 136:case 85:case 86:return this.tsParseLiteralTypeNode();case 53:if(this.state.value==="-"){let t=this.startNode(),r=this.lookahead();return r.type!==135&&r.type!==136&&this.unexpected(),t.literal=this.parseMaybeUnary(),this.finishNode(t,"TSLiteralType")}break;case 78:return this.tsParseThisTypeOrThisTypePredicate();case 87:return this.tsParseTypeQuery();case 83:return this.tsParseImportType();case 5:return this.tsLookAhead(this.tsIsStartOfMappedType.bind(this))?this.tsParseMappedType():this.tsParseTypeLiteral();case 0:return this.tsParseTupleType();case 10:if(!(this.optionFlags&1024)){let t=this.state.startLoc;this.next();let r=this.tsParseType();return this.expect(11),this.addExtra(r,"parenthesized",!0),this.addExtra(r,"parenStart",t.index),r}return this.tsParseParenthesizedType();case 25:case 24:return this.tsParseTemplateLiteralType();default:{let{type:t}=this.state;if(Qn(t)||t===88||t===84){let r=t===88?"TSVoidKeyword":t===84?"TSNullKeyword":FJe(this.state.value);if(r!==void 0&&this.lookaheadCharCode()!==46){let n=this.startNode();return this.next(),this.finishNode(n,r)}return this.tsParseTypeReference()}}}throw this.unexpected()}tsParseArrayTypeOrHigher(){let{startLoc:t}=this.state,r=this.tsParseNonArrayType();for(;!this.hasPrecedingLineBreak()&&this.eat(0);)if(this.match(3)){let n=this.startNodeAt(t);n.elementType=r,this.expect(3),r=this.finishNode(n,"TSArrayType")}else{let n=this.startNodeAt(t);n.objectType=r,n.indexType=this.tsParseType(),this.expect(3),r=this.finishNode(n,"TSIndexedAccessType")}return r}tsParseTypeOperator(){let t=this.startNode(),r=this.state.value;return this.next(),t.operator=r,t.typeAnnotation=this.tsParseTypeOperatorOrHigher(),r==="readonly"&&this.tsCheckTypeAnnotationForReadOnly(t),this.finishNode(t,"TSTypeOperator")}tsCheckTypeAnnotationForReadOnly(t){switch(t.typeAnnotation.type){case"TSTupleType":case"TSArrayType":return;default:this.raise(xt.UnexpectedReadonly,t)}}tsParseInferType(){let t=this.startNode();this.expectContextual(115);let r=this.startNode();return r.name=this.tsParseTypeParameterName(),r.constraint=this.tsTryParse(()=>this.tsParseConstraintForInferType()),t.typeParameter=this.finishNode(r,"TSTypeParameter"),this.finishNode(t,"TSInferType")}tsParseConstraintForInferType(){if(this.eat(81)){let t=this.tsInDisallowConditionalTypesContext(()=>this.tsParseType());if(this.state.inDisallowConditionalTypesContext||!this.match(17))return t}}tsParseTypeOperatorOrHigher(){return qze(this.state.type)&&!this.state.containsEsc?this.tsParseTypeOperator():this.isContextual(115)?this.tsParseInferType():this.tsInAllowConditionalTypesContext(()=>this.tsParseArrayTypeOrHigher())}tsParseUnionOrIntersectionType(t,r,n){let o=this.startNode(),i=this.eat(n),a=[];do a.push(r());while(this.eat(n));return a.length===1&&!i?a[0]:(o.types=a,this.finishNode(o,t))}tsParseIntersectionTypeOrHigher(){return this.tsParseUnionOrIntersectionType("TSIntersectionType",this.tsParseTypeOperatorOrHigher.bind(this),45)}tsParseUnionTypeOrHigher(){return this.tsParseUnionOrIntersectionType("TSUnionType",this.tsParseIntersectionTypeOrHigher.bind(this),43)}tsIsStartOfFunctionType(){return this.match(47)?!0:this.match(10)&&this.tsLookAhead(this.tsIsUnambiguouslyStartOfFunctionType.bind(this))}tsSkipParameterStart(){if(Qn(this.state.type)||this.match(78))return this.next(),!0;if(this.match(5)){let{errors:t}=this.state,r=t.length;try{return this.parseObjectLike(8,!0),t.length===r}catch{return!1}}if(this.match(0)){this.next();let{errors:t}=this.state,r=t.length;try{return super.parseBindingList(3,93,1),t.length===r}catch{return!1}}return!1}tsIsUnambiguouslyStartOfFunctionType(){return this.next(),!!(this.match(11)||this.match(21)||this.tsSkipParameterStart()&&(this.match(14)||this.match(12)||this.match(17)||this.match(29)||this.match(11)&&(this.next(),this.match(19))))}tsParseTypeOrTypePredicateAnnotation(t){return this.tsInType(()=>{let r=this.startNode();this.expect(t);let n=this.startNode(),o=!!this.tsTryParse(this.tsParseTypePredicateAsserts.bind(this));if(o&&this.match(78)){let s=this.tsParseThisTypeOrThisTypePredicate();return s.type==="TSThisType"?(n.parameterName=s,n.asserts=!0,n.typeAnnotation=null,s=this.finishNode(n,"TSTypePredicate")):(this.resetStartLocationFromNode(s,n),s.asserts=!0),r.typeAnnotation=s,this.finishNode(r,"TSTypeAnnotation")}let i=this.tsIsIdentifier()&&this.tsTryParse(this.tsParseTypePredicatePrefix.bind(this));if(!i)return o?(n.parameterName=this.parseIdentifier(),n.asserts=o,n.typeAnnotation=null,r.typeAnnotation=this.finishNode(n,"TSTypePredicate"),this.finishNode(r,"TSTypeAnnotation")):this.tsParseTypeAnnotation(!1,r);let a=this.tsParseTypeAnnotation(!1);return n.parameterName=i,n.typeAnnotation=a,n.asserts=o,r.typeAnnotation=this.finishNode(n,"TSTypePredicate"),this.finishNode(r,"TSTypeAnnotation")})}tsTryParseTypeOrTypePredicateAnnotation(){if(this.match(14))return this.tsParseTypeOrTypePredicateAnnotation(14)}tsTryParseTypeAnnotation(){if(this.match(14))return this.tsParseTypeAnnotation()}tsTryParseType(){return this.tsEatThenParseType(14)}tsParseTypePredicatePrefix(){let t=this.parseIdentifier();if(this.isContextual(116)&&!this.hasPrecedingLineBreak())return this.next(),t}tsParseTypePredicateAsserts(){if(this.state.type!==109)return!1;let t=this.state.containsEsc;return this.next(),!Qn(this.state.type)&&!this.match(78)?!1:(t&&this.raise(W.InvalidEscapedReservedWord,this.state.lastTokStartLoc,{reservedWord:"asserts"}),!0)}tsParseTypeAnnotation(t=!0,r=this.startNode()){return this.tsInType(()=>{t&&this.expect(14),r.typeAnnotation=this.tsParseType()}),this.finishNode(r,"TSTypeAnnotation")}tsParseType(){Zue(this.state.inType);let t=this.tsParseNonConditionalType();if(this.state.inDisallowConditionalTypesContext||this.hasPrecedingLineBreak()||!this.eat(81))return t;let r=this.startNodeAtNode(t);return r.checkType=t,r.extendsType=this.tsInDisallowConditionalTypesContext(()=>this.tsParseNonConditionalType()),this.expect(17),r.trueType=this.tsInAllowConditionalTypesContext(()=>this.tsParseType()),this.expect(14),r.falseType=this.tsInAllowConditionalTypesContext(()=>this.tsParseType()),this.finishNode(r,"TSConditionalType")}isAbstractConstructorSignature(){return this.isContextual(124)&&this.isLookaheadContextual("new")}tsParseNonConditionalType(){return this.tsIsStartOfFunctionType()?this.tsParseFunctionOrConstructorType("TSFunctionType"):this.match(77)?this.tsParseFunctionOrConstructorType("TSConstructorType"):this.isAbstractConstructorSignature()?this.tsParseFunctionOrConstructorType("TSConstructorType",!0):this.tsParseUnionTypeOrHigher()}tsParseTypeAssertion(){this.getPluginOption("typescript","disallowAmbiguousJSXLike")&&this.raise(xt.ReservedTypeAssertion,this.state.startLoc);let t=this.startNode();return t.typeAnnotation=this.tsInType(()=>(this.next(),this.match(75)?this.tsParseTypeReference():this.tsParseType())),this.expect(48),t.expression=this.parseMaybeUnary(),this.finishNode(t,"TSTypeAssertion")}tsParseHeritageClause(t){let r=this.state.startLoc,n=this.tsParseDelimitedList("HeritageClauseElement",()=>{{let o=super.parseExprSubscripts();nU(o)||this.raise(xt.InvalidHeritageClauseType,o.loc.start,{token:t});let i=t==="extends"?"TSInterfaceHeritage":"TSClassImplements";if(o.type==="TSInstantiationExpression")return o.type=i,o;let a=this.startNodeAtNode(o);return a.expression=o,(this.match(47)||this.match(51))&&(a.typeArguments=this.tsParseTypeArgumentsInExpression()),this.finishNode(a,i)}});return n.length||this.raise(xt.EmptyHeritageClauseType,r,{token:t}),n}tsParseInterfaceDeclaration(t,r={}){if(this.hasFollowingLineBreak())return null;this.expectContextual(129),r.declare&&(t.declare=!0),Qn(this.state.type)?(t.id=this.parseIdentifier(),this.checkIdentifier(t.id,130)):(t.id=null,this.raise(xt.MissingInterfaceName,this.state.startLoc)),t.typeParameters=this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers),this.eat(81)&&(t.extends=this.tsParseHeritageClause("extends"));let n=this.startNode();return n.body=this.tsInType(this.tsParseObjectTypeMembers.bind(this)),t.body=this.finishNode(n,"TSInterfaceBody"),this.finishNode(t,"TSInterfaceDeclaration")}tsParseTypeAliasDeclaration(t){return t.id=this.parseIdentifier(),this.checkIdentifier(t.id,2),t.typeAnnotation=this.tsInType(()=>{if(t.typeParameters=this.tsTryParseTypeParameters(this.tsParseInOutModifiers),this.expect(29),this.isContextual(114)&&this.lookaheadCharCode()!==46){let r=this.startNode();return this.next(),this.finishNode(r,"TSIntrinsicKeyword")}return this.tsParseType()}),this.semicolon(),this.finishNode(t,"TSTypeAliasDeclaration")}tsInTopLevelContext(t){if(this.curContext()!==Lo.brace){let r=this.state.context;this.state.context=[r[0]];try{return t()}finally{this.state.context=r}}else return t()}tsInType(t){let r=this.state.inType;this.state.inType=!0;try{return t()}finally{this.state.inType=r}}tsInDisallowConditionalTypesContext(t){let r=this.state.inDisallowConditionalTypesContext;this.state.inDisallowConditionalTypesContext=!0;try{return t()}finally{this.state.inDisallowConditionalTypesContext=r}}tsInAllowConditionalTypesContext(t){let r=this.state.inDisallowConditionalTypesContext;this.state.inDisallowConditionalTypesContext=!1;try{return t()}finally{this.state.inDisallowConditionalTypesContext=r}}tsEatThenParseType(t){if(this.match(t))return this.tsNextThenParseType()}tsExpectThenParseType(t){return this.tsInType(()=>(this.expect(t),this.tsParseType()))}tsNextThenParseType(){return this.tsInType(()=>(this.next(),this.tsParseType()))}tsParseEnumMember(){let t=this.startNode();return t.id=this.match(134)?super.parseStringLiteral(this.state.value):this.parseIdentifier(!0),this.eat(29)&&(t.initializer=super.parseMaybeAssignAllowIn()),this.finishNode(t,"TSEnumMember")}tsParseEnumDeclaration(t,r={}){return r.const&&(t.const=!0),r.declare&&(t.declare=!0),this.expectContextual(126),t.id=this.parseIdentifier(),this.checkIdentifier(t.id,t.const?8971:8459),t.body=this.tsParseEnumBody(),this.finishNode(t,"TSEnumDeclaration")}tsParseEnumBody(){let t=this.startNode();return this.expect(5),t.members=this.tsParseDelimitedList("EnumMembers",this.tsParseEnumMember.bind(this)),this.expect(8),this.finishNode(t,"TSEnumBody")}tsParseModuleBlock(){let t=this.startNode();return this.scope.enter(0),this.expect(5),super.parseBlockOrModuleBlockBody(t.body=[],void 0,!0,8),this.scope.exit(),this.finishNode(t,"TSModuleBlock")}tsParseModuleOrNamespaceDeclaration(t,r=!1){return t.id=this.tsParseEntityName(1),t.id.type==="Identifier"&&this.checkIdentifier(t.id,1024),this.scope.enter(1024),this.prodParam.enter(0),t.body=this.tsParseModuleBlock(),this.prodParam.exit(),this.scope.exit(),this.finishNode(t,"TSModuleDeclaration")}tsParseAmbientExternalModuleDeclaration(t){return this.isContextual(112)?(t.kind="global",t.id=this.parseIdentifier()):this.match(134)?(t.kind="module",t.id=super.parseStringLiteral(this.state.value)):this.unexpected(),this.match(5)?(this.scope.enter(1024),this.prodParam.enter(0),t.body=this.tsParseModuleBlock(),this.prodParam.exit(),this.scope.exit()):this.semicolon(),this.finishNode(t,"TSModuleDeclaration")}tsParseImportEqualsDeclaration(t,r,n){t.id=r||this.parseIdentifier(),this.checkIdentifier(t.id,4096),this.expect(29);let o=this.tsParseModuleReference();return t.importKind==="type"&&o.type!=="TSExternalModuleReference"&&this.raise(xt.ImportAliasHasImportType,o),t.moduleReference=o,this.semicolon(),this.finishNode(t,"TSImportEqualsDeclaration")}tsIsExternalModuleReference(){return this.isContextual(119)&&this.lookaheadCharCode()===40}tsParseModuleReference(){return this.tsIsExternalModuleReference()?this.tsParseExternalModuleReference():this.tsParseEntityName(0)}tsParseExternalModuleReference(){let t=this.startNode();return this.expectContextual(119),this.expect(10),this.match(134)||this.unexpected(),t.expression=super.parseExprAtom(),this.expect(11),this.sawUnambiguousESM=!0,this.finishNode(t,"TSExternalModuleReference")}tsLookAhead(t){let r=this.state.clone(),n=t();return this.state=r,n}tsTryParseAndCatch(t){let r=this.tryParse(n=>t()||n());if(!(r.aborted||!r.node))return r.error&&(this.state=r.failState),r.node}tsTryParse(t){let r=this.state.clone(),n=t();if(n!==void 0&&n!==!1)return n;this.state=r}tsTryParseDeclare(t){if(this.isLineTerminator())return;let r=this.state.type;return this.tsInAmbientContext(()=>{switch(r){case 68:return t.declare=!0,super.parseFunctionStatement(t,!1,!1);case 80:return t.declare=!0,this.parseClass(t,!0,!1);case 126:return this.tsParseEnumDeclaration(t,{declare:!0});case 112:return this.tsParseAmbientExternalModuleDeclaration(t);case 100:if(this.state.containsEsc)return;case 75:case 74:return!this.match(75)||!this.isLookaheadContextual("enum")?(t.declare=!0,this.parseVarStatement(t,this.state.value,!0)):(this.expect(75),this.tsParseEnumDeclaration(t,{const:!0,declare:!0}));case 107:if(this.isUsing())return this.raise(xt.InvalidModifierOnUsingDeclaration,this.state.startLoc,"declare"),t.declare=!0,this.parseVarStatement(t,"using",!0);break;case 96:if(this.isAwaitUsing())return this.raise(xt.InvalidModifierOnAwaitUsingDeclaration,this.state.startLoc,"declare"),t.declare=!0,this.next(),this.parseVarStatement(t,"await using",!0);break;case 129:{let n=this.tsParseInterfaceDeclaration(t,{declare:!0});if(n)return n}default:if(Qn(r))return this.tsParseDeclaration(t,this.state.type,!0,null)}})}tsTryParseExportDeclaration(){return this.tsParseDeclaration(this.startNode(),this.state.type,!0,null)}tsParseDeclaration(t,r,n,o){switch(r){case 124:if(this.tsCheckLineTerminator(n)&&(this.match(80)||Qn(this.state.type)))return this.tsParseAbstractDeclaration(t,o);break;case 127:if(this.tsCheckLineTerminator(n)){if(this.match(134))return this.tsParseAmbientExternalModuleDeclaration(t);if(Qn(this.state.type))return t.kind="module",this.tsParseModuleOrNamespaceDeclaration(t)}break;case 128:if(this.tsCheckLineTerminator(n)&&Qn(this.state.type))return t.kind="namespace",this.tsParseModuleOrNamespaceDeclaration(t);break;case 130:if(this.tsCheckLineTerminator(n)&&Qn(this.state.type))return this.tsParseTypeAliasDeclaration(t);break}}tsCheckLineTerminator(t){return t?this.hasFollowingLineBreak()?!1:(this.next(),!0):!this.isLineTerminator()}tsTryParseGenericAsyncArrowFunction(t){if(!this.match(47))return;let r=this.state.maybeInArrowParameters;this.state.maybeInArrowParameters=!0;let n=this.tsTryParseAndCatch(()=>{let o=this.startNodeAt(t);return o.typeParameters=this.tsParseTypeParameters(this.tsParseConstModifier),super.parseFunctionParams(o),o.returnType=this.tsTryParseTypeOrTypePredicateAnnotation(),this.expect(19),o});if(this.state.maybeInArrowParameters=r,!!n)return super.parseArrowExpression(n,null,!0)}tsParseTypeArgumentsInExpression(){if(this.reScan_lt()===47)return this.tsParseTypeArguments()}tsParseTypeArguments(){let t=this.startNode();return t.params=this.tsInType(()=>this.tsInTopLevelContext(()=>(this.expect(47),this.tsParseDelimitedList("TypeParametersOrArguments",this.tsParseType.bind(this))))),t.params.length===0?this.raise(xt.EmptyTypeArguments,t):!this.state.inType&&this.curContext()===Lo.brace&&this.reScan_lt_gt(),this.expect(48),this.finishNode(t,"TSTypeParameterInstantiation")}tsIsDeclarationStart(){return Uze(this.state.type)}isExportDefaultSpecifier(){return this.tsIsDeclarationStart()?!1:super.isExportDefaultSpecifier()}parseBindingElement(t,r){let n=r.length?r[0].loc.start:this.state.startLoc,o={};this.tsParseModifiers({allowedModifiers:["public","private","protected","override","readonly"]},o);let i=o.accessibility,a=o.override,s=o.readonly;!(t&4)&&(i||s||a)&&this.raise(xt.UnexpectedParameterModifier,n);let c=this.parseMaybeDefault();t&2&&this.parseFunctionParamType(c);let p=this.parseMaybeDefault(c.loc.start,c);if(i||s||a){let d=this.startNodeAt(n);return r.length&&(d.decorators=r),i&&(d.accessibility=i),s&&(d.readonly=s),a&&(d.override=a),p.type!=="Identifier"&&p.type!=="AssignmentPattern"&&this.raise(xt.UnsupportedParameterPropertyKind,d),d.parameter=p,this.finishNode(d,"TSParameterProperty")}return r.length&&(c.decorators=r),p}isSimpleParameter(t){return t.type==="TSParameterProperty"&&super.isSimpleParameter(t.parameter)||super.isSimpleParameter(t)}tsDisallowOptionalPattern(t){for(let r of t.params)r.type!=="Identifier"&&r.optional&&!this.state.isAmbientContext&&this.raise(xt.PatternIsOptional,r)}setArrowFunctionParameters(t,r,n){super.setArrowFunctionParameters(t,r,n),this.tsDisallowOptionalPattern(t)}parseFunctionBodyAndFinish(t,r,n=!1){this.match(14)&&(t.returnType=this.tsParseTypeOrTypePredicateAnnotation(14));let o=r==="FunctionDeclaration"?"TSDeclareFunction":r==="ClassMethod"||r==="ClassPrivateMethod"?"TSDeclareMethod":void 0;return o&&!this.match(5)&&this.isLineTerminator()?this.finishNode(t,o):o==="TSDeclareFunction"&&this.state.isAmbientContext&&(this.raise(xt.DeclareFunctionHasImplementation,t),t.declare)?super.parseFunctionBodyAndFinish(t,o,n):(this.tsDisallowOptionalPattern(t),super.parseFunctionBodyAndFinish(t,r,n))}registerFunctionStatementId(t){!t.body&&t.id?this.checkIdentifier(t.id,1024):super.registerFunctionStatementId(t)}tsCheckForInvalidTypeCasts(t){t.forEach(r=>{r?.type==="TSTypeCastExpression"&&this.raise(xt.UnexpectedTypeAnnotation,r.typeAnnotation)})}toReferencedList(t,r){return this.tsCheckForInvalidTypeCasts(t),t}parseArrayLike(t,r,n){let o=super.parseArrayLike(t,r,n);return o.type==="ArrayExpression"&&this.tsCheckForInvalidTypeCasts(o.elements),o}parseSubscript(t,r,n,o){if(!this.hasPrecedingLineBreak()&&this.match(35)){this.state.canStartJSXElement=!1,this.next();let a=this.startNodeAt(r);return a.expression=t,this.finishNode(a,"TSNonNullExpression")}let i=!1;if(this.match(18)&&this.lookaheadCharCode()===60){if(n)return o.stop=!0,t;o.optionalChainMember=i=!0,this.next()}if(this.match(47)||this.match(51)){let a,s=this.tsTryParseAndCatch(()=>{if(!n&&this.atPossibleAsyncArrow(t)){let f=this.tsTryParseGenericAsyncArrowFunction(r);if(f)return o.stop=!0,f}let c=this.tsParseTypeArgumentsInExpression();if(!c)return;if(i&&!this.match(10)){a=this.state.curPosition();return}if(Xq(this.state.type)){let f=super.parseTaggedTemplateExpression(t,r,o);return f.typeArguments=c,f}if(!n&&this.eat(10)){let f=this.startNodeAt(r);return f.callee=t,f.arguments=this.parseCallExpressionArguments(),this.tsCheckForInvalidTypeCasts(f.arguments),f.typeArguments=c,o.optionalChainMember&&(f.optional=i),this.finishCallExpression(f,o.optionalChainMember)}let p=this.state.type;if(p===48||p===52||p!==10&&aD(p)&&!this.hasPrecedingLineBreak())return;let d=this.startNodeAt(r);return d.expression=t,d.typeArguments=c,this.finishNode(d,"TSInstantiationExpression")});if(a&&this.unexpected(a,10),s)return s.type==="TSInstantiationExpression"&&((this.match(16)||this.match(18)&&this.lookaheadCharCode()!==40)&&this.raise(xt.InvalidPropertyAccessAfterInstantiationExpression,this.state.startLoc),!this.match(16)&&!this.match(18)&&(s.expression=super.stopParseSubscript(t,o))),s}return super.parseSubscript(t,r,n,o)}parseNewCallee(t){super.parseNewCallee(t);let{callee:r}=t;r.type==="TSInstantiationExpression"&&!r.extra?.parenthesized&&(t.typeArguments=r.typeArguments,t.callee=r.expression)}parseExprOp(t,r,n){let o;if(D3(58)>n&&!this.hasPrecedingLineBreak()&&(this.isContextual(93)||(o=this.isContextual(120)))){let i=this.startNodeAt(r);return i.expression=t,i.typeAnnotation=this.tsInType(()=>(this.next(),this.match(75)?(o&&this.raise(W.UnexpectedKeyword,this.state.startLoc,{keyword:"const"}),this.tsParseTypeReference()):this.tsParseType())),this.finishNode(i,o?"TSSatisfiesExpression":"TSAsExpression"),this.reScan_lt_gt(),this.parseExprOp(i,r,n)}return super.parseExprOp(t,r,n)}checkReservedWord(t,r,n,o){this.state.isAmbientContext||super.checkReservedWord(t,r,n,o)}checkImportReflection(t){super.checkImportReflection(t),t.module&&t.importKind!=="value"&&this.raise(xt.ImportReflectionHasImportType,t.specifiers[0].loc.start)}checkDuplicateExports(){}isPotentialImportPhase(t){if(super.isPotentialImportPhase(t))return!0;if(this.isContextual(130)){let r=this.lookaheadCharCode();return t?r===123||r===42:r!==61}return!t&&this.isContextual(87)}applyImportPhase(t,r,n,o){super.applyImportPhase(t,r,n,o),r?t.exportKind=n==="type"?"type":"value":t.importKind=n==="type"||n==="typeof"?n:"value"}parseImport(t){if(this.match(134))return t.importKind="value",super.parseImport(t);let r;if(Qn(this.state.type)&&this.lookaheadCharCode()===61)return t.importKind="value",this.tsParseImportEqualsDeclaration(t);if(this.isContextual(130)){let n=this.parseMaybeImportPhase(t,!1);if(this.lookaheadCharCode()===61)return this.tsParseImportEqualsDeclaration(t,n);r=super.parseImportSpecifiersAndAfter(t,n)}else r=super.parseImport(t);return r.importKind==="type"&&r.specifiers.length>1&&r.specifiers[0].type==="ImportDefaultSpecifier"&&this.raise(xt.TypeImportCannotSpecifyDefaultAndNamed,r),r}parseExport(t,r){if(this.match(83)){let n=this.startNode();this.next();let o=null;this.isContextual(130)&&this.isPotentialImportPhase(!1)?o=this.parseMaybeImportPhase(n,!1):n.importKind="value";let i=this.tsParseImportEqualsDeclaration(n,o,!0);return t.attributes=[],t.declaration=i,t.exportKind="value",t.source=null,t.specifiers=[],this.finishNode(t,"ExportNamedDeclaration")}else if(this.eat(29)){let n=t;return n.expression=super.parseExpression(),this.semicolon(),this.sawUnambiguousESM=!0,this.finishNode(n,"TSExportAssignment")}else if(this.eatContextual(93)){let n=t;return this.expectContextual(128),n.id=this.parseIdentifier(),this.semicolon(),this.finishNode(n,"TSNamespaceExportDeclaration")}else return super.parseExport(t,r)}isAbstractClass(){return this.isContextual(124)&&this.isLookaheadContextual("class")}parseExportDefaultExpression(){if(this.isAbstractClass()){let t=this.startNode();return this.next(),t.abstract=!0,this.parseClass(t,!0,!0)}if(this.match(129)){let t=this.tsParseInterfaceDeclaration(this.startNode());if(t)return t}return super.parseExportDefaultExpression()}parseVarStatement(t,r,n=!1){let{isAmbientContext:o}=this.state,i=super.parseVarStatement(t,r,n||o);if(!o)return i;if(!t.declare&&(r==="using"||r==="await using"))return this.raiseOverwrite(xt.UsingDeclarationInAmbientContext,t,r),i;for(let{id:a,init:s}of i.declarations)s&&(r==="var"||r==="let"||a.typeAnnotation?this.raise(xt.InitializerNotAllowedInAmbientContext,s):MJe(s,this.hasPlugin("estree"))||this.raise(xt.ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference,s));return i}parseStatementContent(t,r){if(!this.state.containsEsc)switch(this.state.type){case 75:{if(this.isLookaheadContextual("enum")){let n=this.startNode();return this.expect(75),this.tsParseEnumDeclaration(n,{const:!0})}break}case 124:case 125:{if(this.nextTokenIsIdentifierAndNotTSRelationalOperatorOnSameLine()){let n=this.state.type,o=this.startNode();this.next();let i=n===125?this.tsTryParseDeclare(o):this.tsParseAbstractDeclaration(o,r);return i?(n===125&&(i.declare=!0),i):(o.expression=this.createIdentifier(this.startNodeAt(o.loc.start),n===125?"declare":"abstract"),this.semicolon(!1),this.finishNode(o,"ExpressionStatement"))}break}case 126:return this.tsParseEnumDeclaration(this.startNode());case 112:{if(this.lookaheadCharCode()===123){let n=this.startNode();return this.tsParseAmbientExternalModuleDeclaration(n)}break}case 129:{let n=this.tsParseInterfaceDeclaration(this.startNode());if(n)return n;break}case 127:{if(this.nextTokenIsIdentifierOrStringLiteralOnSameLine()){let n=this.startNode();return this.next(),this.tsParseDeclaration(n,127,!1,r)}break}case 128:{if(this.nextTokenIsIdentifierOnSameLine()){let n=this.startNode();return this.next(),this.tsParseDeclaration(n,128,!1,r)}break}case 130:{if(this.nextTokenIsIdentifierOnSameLine()){let n=this.startNode();return this.next(),this.tsParseTypeAliasDeclaration(n)}break}}return super.parseStatementContent(t,r)}parseAccessModifier(){return this.tsParseModifier(["public","protected","private"])}tsHasSomeModifiers(t,r){return r.some(n=>Wue(n)?t.accessibility===n:!!t[n])}tsIsStartOfStaticBlocks(){return this.isContextual(106)&&this.lookaheadCharCode()===123}parseClassMember(t,r,n){let o=["declare","private","public","protected","override","abstract","readonly","static"];this.tsParseModifiers({allowedModifiers:o,disallowedModifiers:["in","out"],stopOnStartOfClassStaticBlock:!0,errorTemplate:xt.InvalidModifierOnTypeParameterPositions},r);let i=()=>{this.tsIsStartOfStaticBlocks()?(this.next(),this.next(),this.tsHasSomeModifiers(r,o)&&this.raise(xt.StaticBlockCannotHaveModifier,this.state.curPosition()),super.parseClassStaticBlock(t,r)):this.parseClassMemberWithIsStatic(t,r,n,!!r.static)};r.declare?this.tsInAmbientContext(i):i()}parseClassMemberWithIsStatic(t,r,n,o){let i=this.tsTryParseIndexSignature(r);if(i){t.body.push(i),r.abstract&&this.raise(xt.IndexSignatureHasAbstract,r),r.accessibility&&this.raise(xt.IndexSignatureHasAccessibility,r,{modifier:r.accessibility}),r.declare&&this.raise(xt.IndexSignatureHasDeclare,r),r.override&&this.raise(xt.IndexSignatureHasOverride,r);return}!this.state.inAbstractClass&&r.abstract&&this.raise(xt.NonAbstractClassHasAbstractMethod,r),r.override&&(n.hadSuperClass||this.raise(xt.OverrideNotInSubClass,r)),super.parseClassMemberWithIsStatic(t,r,n,o)}parsePostMemberNameModifiers(t){this.eat(17)&&(t.optional=!0),t.readonly&&this.match(10)&&this.raise(xt.ClassMethodHasReadonly,t),t.declare&&this.match(10)&&this.raise(xt.ClassMethodHasDeclare,t)}shouldParseExportDeclaration(){return this.tsIsDeclarationStart()?!0:super.shouldParseExportDeclaration()}parseConditional(t,r,n){if(!this.match(17))return t;if(this.state.maybeInArrowParameters){let o=this.lookaheadCharCode();if(o===44||o===61||o===58||o===41)return this.setOptionalParametersError(n),t}return super.parseConditional(t,r,n)}parseParenItem(t,r){let n=super.parseParenItem(t,r);if(this.eat(17)&&(n.optional=!0,this.resetEndLocation(t)),this.match(14)){let o=this.startNodeAt(r);return o.expression=t,o.typeAnnotation=this.tsParseTypeAnnotation(),this.finishNode(o,"TSTypeCastExpression")}return t}parseExportDeclaration(t){if(!this.state.isAmbientContext&&this.isContextual(125))return this.tsInAmbientContext(()=>this.parseExportDeclaration(t));let r=this.state.startLoc,n=this.eatContextual(125);if(n&&(this.isContextual(125)||!this.shouldParseExportDeclaration()))throw this.raise(xt.ExpectedAmbientAfterExportDeclare,this.state.startLoc);let o=Qn(this.state.type)&&this.tsTryParseExportDeclaration()||super.parseExportDeclaration(t);return o?((o.type==="TSInterfaceDeclaration"||o.type==="TSTypeAliasDeclaration"||n)&&(t.exportKind="type"),n&&o.type!=="TSImportEqualsDeclaration"&&(this.resetStartLocation(o,r),o.declare=!0),o):null}parseClassId(t,r,n,o){if((!r||n)&&this.isContextual(113))return;super.parseClassId(t,r,n,t.declare?1024:8331);let i=this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers);i&&(t.typeParameters=i)}parseClassPropertyAnnotation(t){t.optional||(this.eat(35)?t.definite=!0:this.eat(17)&&(t.optional=!0));let r=this.tsTryParseTypeAnnotation();r&&(t.typeAnnotation=r)}parseClassProperty(t){if(this.parseClassPropertyAnnotation(t),this.state.isAmbientContext&&!(t.readonly&&!t.typeAnnotation)&&this.match(29)&&this.raise(xt.DeclareClassFieldHasInitializer,this.state.startLoc),t.abstract&&this.match(29)){let{key:r}=t;this.raise(xt.AbstractPropertyHasInitializer,this.state.startLoc,{propertyName:r.type==="Identifier"&&!t.computed?r.name:`[${this.input.slice(this.offsetToSourcePos(r.start),this.offsetToSourcePos(r.end))}]`})}return super.parseClassProperty(t)}parseClassPrivateProperty(t){return t.abstract&&this.raise(xt.PrivateElementHasAbstract,t),t.accessibility&&this.raise(xt.PrivateElementHasAccessibility,t,{modifier:t.accessibility}),this.parseClassPropertyAnnotation(t),super.parseClassPrivateProperty(t)}parseClassAccessorProperty(t){return this.parseClassPropertyAnnotation(t),t.optional&&this.raise(xt.AccessorCannotBeOptional,t),super.parseClassAccessorProperty(t)}pushClassMethod(t,r,n,o,i,a){let s=this.tsTryParseTypeParameters(this.tsParseConstModifier);s&&i&&this.raise(xt.ConstructorHasTypeParameters,s);let{declare:c=!1,kind:p}=r;c&&(p==="get"||p==="set")&&this.raise(xt.DeclareAccessor,r,{kind:p}),s&&(r.typeParameters=s),super.pushClassMethod(t,r,n,o,i,a)}pushClassPrivateMethod(t,r,n,o){let i=this.tsTryParseTypeParameters(this.tsParseConstModifier);i&&(r.typeParameters=i),super.pushClassPrivateMethod(t,r,n,o)}declareClassPrivateMethodInScope(t,r){t.type!=="TSDeclareMethod"&&(t.type==="MethodDefinition"&&t.value.body==null||super.declareClassPrivateMethodInScope(t,r))}parseClassSuper(t){super.parseClassSuper(t),t.superClass&&(this.match(47)||this.match(51))&&(t.superTypeArguments=this.tsParseTypeArgumentsInExpression()),this.eatContextual(113)&&(t.implements=this.tsParseHeritageClause("implements"))}parseObjPropValue(t,r,n,o,i,a,s){let c=this.tsTryParseTypeParameters(this.tsParseConstModifier);return c&&(t.typeParameters=c),super.parseObjPropValue(t,r,n,o,i,a,s)}parseFunctionParams(t,r){let n=this.tsTryParseTypeParameters(this.tsParseConstModifier);n&&(t.typeParameters=n),super.parseFunctionParams(t,r)}parseVarId(t,r){super.parseVarId(t,r),t.id.type==="Identifier"&&!this.hasPrecedingLineBreak()&&this.eat(35)&&(t.definite=!0);let n=this.tsTryParseTypeAnnotation();n&&(t.id.typeAnnotation=n,this.resetEndLocation(t.id))}parseAsyncArrowFromCallExpression(t,r){return this.match(14)&&(t.returnType=this.tsParseTypeAnnotation()),super.parseAsyncArrowFromCallExpression(t,r)}parseMaybeAssign(t,r){let n,o,i;if(this.hasPlugin("jsx")&&(this.match(143)||this.match(47))){if(n=this.state.clone(),o=this.tryParse(()=>super.parseMaybeAssign(t,r),n),!o.error)return o.node;let{context:c}=this.state,p=c[c.length-1];(p===Lo.j_oTag||p===Lo.j_expr)&&c.pop()}if(!o?.error&&!this.match(47))return super.parseMaybeAssign(t,r);(!n||n===this.state)&&(n=this.state.clone());let a,s=this.tryParse(c=>{a=this.tsParseTypeParameters(this.tsParseConstModifier);let p=super.parseMaybeAssign(t,r);if((p.type!=="ArrowFunctionExpression"||p.extra?.parenthesized)&&c(),a?.params.length!==0&&this.resetStartLocationFromNode(p,a),p.typeParameters=a,this.hasPlugin("jsx")&&p.typeParameters.params.length===1&&!p.typeParameters.extra?.trailingComma){let d=p.typeParameters.params[0];d.constraint||this.raise(xt.SingleTypeParameterWithoutTrailingComma,Rl(d.loc.end,1),{typeParameterName:d.name.name})}return p},n);if(!s.error&&!s.aborted)return a&&this.reportReservedArrowTypeParam(a),s.node;if(!o&&(Zue(!this.hasPlugin("jsx")),i=this.tryParse(()=>super.parseMaybeAssign(t,r),n),!i.error))return i.node;if(o?.node)return this.state=o.failState,o.node;if(s.node)return this.state=s.failState,a&&this.reportReservedArrowTypeParam(a),s.node;if(i?.node)return this.state=i.failState,i.node;throw o?.error||s.error||i?.error}reportReservedArrowTypeParam(t){t.params.length===1&&!t.params[0].constraint&&!t.extra?.trailingComma&&this.getPluginOption("typescript","disallowAmbiguousJSXLike")&&this.raise(xt.ReservedArrowTypeParam,t)}parseMaybeUnary(t,r){return!this.hasPlugin("jsx")&&this.match(47)?this.tsParseTypeAssertion():super.parseMaybeUnary(t,r)}parseArrow(t){if(this.match(14)){let r=this.tryParse(n=>{let o=this.tsParseTypeOrTypePredicateAnnotation(14);return(this.canInsertSemicolon()||!this.match(19))&&n(),o});if(r.aborted)return;r.thrown||(r.error&&(this.state=r.failState),t.returnType=r.node)}return super.parseArrow(t)}parseFunctionParamType(t){this.eat(17)&&(t.optional=!0);let r=this.tsTryParseTypeAnnotation();return r&&(t.typeAnnotation=r),this.resetEndLocation(t),t}isAssignable(t,r){switch(t.type){case"TSTypeCastExpression":return this.isAssignable(t.expression,r);case"TSParameterProperty":return!0;default:return super.isAssignable(t,r)}}toAssignable(t,r=!1){switch(t.type){case"ParenthesizedExpression":this.toAssignableParenthesizedExpression(t,r);break;case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":r?this.expressionScope.recordArrowParameterBindingError(xt.UnexpectedTypeCastInParameter,t):this.raise(xt.UnexpectedTypeCastInParameter,t),this.toAssignable(t.expression,r);break;case"AssignmentExpression":!r&&t.left.type==="TSTypeCastExpression"&&(t.left=this.typeCastToParameter(t.left));default:super.toAssignable(t,r)}}toAssignableParenthesizedExpression(t,r){switch(t.expression.type){case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":case"ParenthesizedExpression":this.toAssignable(t.expression,r);break;default:super.toAssignable(t,r)}}checkToRestConversion(t,r){switch(t.type){case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":case"TSNonNullExpression":this.checkToRestConversion(t.expression,!1);break;default:super.checkToRestConversion(t,r)}}isValidLVal(t,r,n,o){switch(t){case"TSTypeCastExpression":return!0;case"TSParameterProperty":return"parameter";case"TSNonNullExpression":return"expression";case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":return(o!==64||!n)&&["expression",!0];default:return super.isValidLVal(t,r,n,o)}}parseBindingAtom(){return this.state.type===78?this.parseIdentifier(!0):super.parseBindingAtom()}parseMaybeDecoratorArguments(t,r){if(this.match(47)||this.match(51)){let n=this.tsParseTypeArgumentsInExpression();if(this.match(10)){let o=super.parseMaybeDecoratorArguments(t,r);return o.typeArguments=n,o}this.unexpected(null,10)}return super.parseMaybeDecoratorArguments(t,r)}checkCommaAfterRest(t){return this.state.isAmbientContext&&this.match(12)&&this.lookaheadCharCode()===t?(this.next(),!1):super.checkCommaAfterRest(t)}isClassMethod(){return this.match(47)||super.isClassMethod()}isClassProperty(){return this.match(35)||this.match(14)||super.isClassProperty()}parseMaybeDefault(t,r){let n=super.parseMaybeDefault(t,r);return n.type==="AssignmentPattern"&&n.typeAnnotation&&n.right.startthis.isAssignable(r,!0)):super.shouldParseArrow(t)}shouldParseAsyncArrow(){return this.match(14)||super.shouldParseAsyncArrow()}canHaveLeadingDecorator(){return super.canHaveLeadingDecorator()||this.isAbstractClass()}jsxParseOpeningElementAfterName(t){if(this.match(47)||this.match(51)){let r=this.tsTryParseAndCatch(()=>this.tsParseTypeArgumentsInExpression());r&&(t.typeArguments=r)}return super.jsxParseOpeningElementAfterName(t)}getGetterSetterExpectedParamCount(t){let r=super.getGetterSetterExpectedParamCount(t),n=this.getObjectOrClassMethodParams(t)[0];return n&&this.isThisParam(n)?r+1:r}parseCatchClauseParam(){let t=super.parseCatchClauseParam(),r=this.tsTryParseTypeAnnotation();return r&&(t.typeAnnotation=r,this.resetEndLocation(t)),t}tsInAmbientContext(t){let{isAmbientContext:r,strict:n}=this.state;this.state.isAmbientContext=!0,this.state.strict=!1;try{return t()}finally{this.state.isAmbientContext=r,this.state.strict=n}}parseClass(t,r,n){let o=this.state.inAbstractClass;this.state.inAbstractClass=!!t.abstract;try{return super.parseClass(t,r,n)}finally{this.state.inAbstractClass=o}}tsParseAbstractDeclaration(t,r){if(this.match(80))return t.abstract=!0,this.maybeTakeDecorators(r,this.parseClass(t,!0,!1));if(this.isContextual(129))return this.hasFollowingLineBreak()?null:(t.abstract=!0,this.raise(xt.NonClassMethodPropertyHasAbstractModifier,t),this.tsParseInterfaceDeclaration(t));throw this.unexpected(null,80)}parseMethod(t,r,n,o,i,a,s){let c=super.parseMethod(t,r,n,o,i,a,s);if((c.abstract||c.type==="TSAbstractMethodDefinition")&&(this.hasPlugin("estree")?c.value:c).body){let{key:p}=c;this.raise(xt.AbstractMethodHasImplementation,c,{methodName:p.type==="Identifier"&&!c.computed?p.name:`[${this.input.slice(this.offsetToSourcePos(p.start),this.offsetToSourcePos(p.end))}]`})}return c}tsParseTypeParameterName(){return this.parseIdentifier()}shouldParseAsAmbientContext(){return!!this.getPluginOption("typescript","dts")}parse(){return this.shouldParseAsAmbientContext()&&(this.state.isAmbientContext=!0),super.parse()}getExpression(){return this.shouldParseAsAmbientContext()&&(this.state.isAmbientContext=!0),super.getExpression()}parseExportSpecifier(t,r,n,o){return!r&&o?(this.parseTypeOnlyImportExportSpecifier(t,!1,n),this.finishNode(t,"ExportSpecifier")):(t.exportKind="value",super.parseExportSpecifier(t,r,n,o))}parseImportSpecifier(t,r,n,o,i){return!r&&o?(this.parseTypeOnlyImportExportSpecifier(t,!0,n),this.finishNode(t,"ImportSpecifier")):(t.importKind="value",super.parseImportSpecifier(t,r,n,o,n?4098:4096))}parseTypeOnlyImportExportSpecifier(t,r,n){let o=r?"imported":"local",i=r?"local":"exported",a=t[o],s,c=!1,p=!0,d=a.loc.start;if(this.isContextual(93)){let m=this.parseIdentifier();if(this.isContextual(93)){let y=this.parseIdentifier();Ou(this.state.type)?(c=!0,a=m,s=r?this.parseIdentifier():this.parseModuleExportName(),p=!1):(s=y,p=!1)}else Ou(this.state.type)?(p=!1,s=r?this.parseIdentifier():this.parseModuleExportName()):(c=!0,a=m)}else Ou(this.state.type)&&(c=!0,r?(a=this.parseIdentifier(!0),this.isContextual(93)||this.checkReservedWord(a.name,a.loc.start,!0,!0)):a=this.parseModuleExportName());c&&n&&this.raise(r?xt.TypeModifierIsUsedInTypeImports:xt.TypeModifierIsUsedInTypeExports,d),t[o]=a,t[i]=s;let f=r?"importKind":"exportKind";t[f]=c?"type":"value",p&&this.eatContextual(93)&&(t[i]=r?this.parseIdentifier():this.parseModuleExportName()),t[i]||(t[i]=this.cloneIdentifier(t[o])),r&&this.checkIdentifier(t[i],c?4098:4096)}fillOptionalPropertiesForTSESLint(t){switch(t.type){case"ExpressionStatement":t.directive??(t.directive=void 0);return;case"RestElement":t.value=void 0;case"Identifier":case"ArrayPattern":case"AssignmentPattern":case"ObjectPattern":t.decorators??(t.decorators=[]),t.optional??(t.optional=!1),t.typeAnnotation??(t.typeAnnotation=void 0);return;case"TSParameterProperty":t.accessibility??(t.accessibility=void 0),t.decorators??(t.decorators=[]),t.override??(t.override=!1),t.readonly??(t.readonly=!1),t.static??(t.static=!1);return;case"TSEmptyBodyFunctionExpression":t.body=null;case"TSDeclareFunction":case"FunctionDeclaration":case"FunctionExpression":case"ClassMethod":case"ClassPrivateMethod":t.declare??(t.declare=!1),t.returnType??(t.returnType=void 0),t.typeParameters??(t.typeParameters=void 0);return;case"Property":t.optional??(t.optional=!1);return;case"TSMethodSignature":case"TSPropertySignature":t.optional??(t.optional=!1);case"TSIndexSignature":t.accessibility??(t.accessibility=void 0),t.readonly??(t.readonly=!1),t.static??(t.static=!1);return;case"TSAbstractPropertyDefinition":case"PropertyDefinition":case"TSAbstractAccessorProperty":case"AccessorProperty":t.declare??(t.declare=!1),t.definite??(t.definite=!1),t.readonly??(t.readonly=!1),t.typeAnnotation??(t.typeAnnotation=void 0);case"TSAbstractMethodDefinition":case"MethodDefinition":t.accessibility??(t.accessibility=void 0),t.decorators??(t.decorators=[]),t.override??(t.override=!1),t.optional??(t.optional=!1);return;case"ClassExpression":t.id??(t.id=null);case"ClassDeclaration":t.abstract??(t.abstract=!1),t.declare??(t.declare=!1),t.decorators??(t.decorators=[]),t.implements??(t.implements=[]),t.superTypeArguments??(t.superTypeArguments=void 0),t.typeParameters??(t.typeParameters=void 0);return;case"TSTypeAliasDeclaration":case"VariableDeclaration":t.declare??(t.declare=!1);return;case"VariableDeclarator":t.definite??(t.definite=!1);return;case"TSEnumDeclaration":t.const??(t.const=!1),t.declare??(t.declare=!1);return;case"TSEnumMember":t.computed??(t.computed=!1);return;case"TSImportType":t.qualifier??(t.qualifier=null),t.options??(t.options=null),t.typeArguments??(t.typeArguments=null);return;case"TSInterfaceDeclaration":t.declare??(t.declare=!1),t.extends??(t.extends=[]);return;case"TSMappedType":t.optional??(t.optional=!1),t.readonly??(t.readonly=void 0);return;case"TSModuleDeclaration":t.declare??(t.declare=!1),t.global??(t.global=t.kind==="global");return;case"TSTypeParameter":t.const??(t.const=!1),t.in??(t.in=!1),t.out??(t.out=!1);return}}chStartsBindingIdentifierAndNotRelationalOperator(t,r){if(ed(t)){if(Gq.lastIndex=r,Gq.test(this.input)){let n=this.codePointAtPos(Gq.lastIndex);if(!Sg(n)&&n!==92)return!1}return!0}else return t===92}nextTokenIsIdentifierAndNotTSRelationalOperatorOnSameLine(){let t=this.nextTokenInLineStart(),r=this.codePointAtPos(t);return this.chStartsBindingIdentifierAndNotRelationalOperator(r,t)}nextTokenIsIdentifierOrStringLiteralOnSameLine(){let t=this.nextTokenInLineStart(),r=this.codePointAtPos(t);return this.chStartsBindingIdentifier(r,t)||r===34||r===39}};function $Je(e){if(e.type!=="MemberExpression")return!1;let{computed:t,property:r}=e;return t&&r.type!=="StringLiteral"&&(r.type!=="TemplateLiteral"||r.expressions.length>0)?!1:kpe(e.object)}function MJe(e,t){let{type:r}=e;if(e.extra?.parenthesized)return!1;if(t){if(r==="Literal"){let{value:n}=e;if(typeof n=="string"||typeof n=="boolean")return!0}}else if(r==="StringLiteral"||r==="BooleanLiteral")return!0;return!!(wpe(e,t)||jJe(e,t)||r==="TemplateLiteral"&&e.expressions.length===0||$Je(e))}function wpe(e,t){return t?e.type==="Literal"&&(typeof e.value=="number"||"bigint"in e):e.type==="NumericLiteral"||e.type==="BigIntLiteral"}function jJe(e,t){if(e.type==="UnaryExpression"){let{operator:r,argument:n}=e;if(r==="-"&&wpe(n,t))return!0}return!1}function kpe(e){return e.type==="Identifier"?!0:e.type!=="MemberExpression"||e.computed?!1:kpe(e.object)}var Que=Yp`placeholders`({ClassNameIsRequired:"A class name is required.",UnexpectedSpace:"Unexpected space in placeholder."}),BJe=e=>class extends e{parsePlaceholder(t){if(this.match(133)){let r=this.startNode();return this.next(),this.assertNoSpace(),r.name=super.parseIdentifier(!0),this.assertNoSpace(),this.expect(133),this.finishPlaceholder(r,t)}}finishPlaceholder(t,r){let n=t;return(!n.expectedNode||!n.type)&&(n=this.finishNode(n,"Placeholder")),n.expectedNode=r,n}getTokenFromCode(t){t===37&&this.input.charCodeAt(this.state.pos+1)===37?this.finishOp(133,2):super.getTokenFromCode(t)}parseExprAtom(t){return this.parsePlaceholder("Expression")||super.parseExprAtom(t)}parseIdentifier(t){return this.parsePlaceholder("Identifier")||super.parseIdentifier(t)}checkReservedWord(t,r,n,o){t!==void 0&&super.checkReservedWord(t,r,n,o)}cloneIdentifier(t){let r=super.cloneIdentifier(t);return r.type==="Placeholder"&&(r.expectedNode=t.expectedNode),r}cloneStringLiteral(t){return t.type==="Placeholder"?this.cloneIdentifier(t):super.cloneStringLiteral(t)}parseBindingAtom(){return this.parsePlaceholder("Pattern")||super.parseBindingAtom()}isValidLVal(t,r,n,o){return t==="Placeholder"||super.isValidLVal(t,r,n,o)}toAssignable(t,r){t&&t.type==="Placeholder"&&t.expectedNode==="Expression"?t.expectedNode="Pattern":super.toAssignable(t,r)}chStartsBindingIdentifier(t,r){if(super.chStartsBindingIdentifier(t,r))return!0;let n=this.nextTokenStart();return this.input.charCodeAt(n)===37&&this.input.charCodeAt(n+1)===37}verifyBreakContinue(t,r){t.label&&t.label.type==="Placeholder"||super.verifyBreakContinue(t,r)}parseExpressionStatement(t,r){if(r.type!=="Placeholder"||r.extra?.parenthesized)return super.parseExpressionStatement(t,r);if(this.match(14)){let o=t;return o.label=this.finishPlaceholder(r,"Identifier"),this.next(),o.body=super.parseStatementOrSloppyAnnexBFunctionDeclaration(),this.finishNode(o,"LabeledStatement")}this.semicolon();let n=t;return n.name=r.name,this.finishPlaceholder(n,"Statement")}parseBlock(t,r,n){return this.parsePlaceholder("BlockStatement")||super.parseBlock(t,r,n)}parseFunctionId(t){return this.parsePlaceholder("Identifier")||super.parseFunctionId(t)}parseClass(t,r,n){let o=r?"ClassDeclaration":"ClassExpression";this.next();let i=this.state.strict,a=this.parsePlaceholder("Identifier");if(a)if(this.match(81)||this.match(133)||this.match(5))t.id=a;else{if(n||!r)return t.id=null,t.body=this.finishPlaceholder(a,"ClassBody"),this.finishNode(t,o);throw this.raise(Que.ClassNameIsRequired,this.state.startLoc)}else this.parseClassId(t,r,n);return super.parseClassSuper(t),t.body=this.parsePlaceholder("ClassBody")||super.parseClassBody(!!t.superClass,i),this.finishNode(t,o)}parseExport(t,r){let n=this.parsePlaceholder("Identifier");if(!n)return super.parseExport(t,r);let o=t;if(!this.isContextual(98)&&!this.match(12))return o.specifiers=[],o.source=null,o.declaration=this.finishPlaceholder(n,"Declaration"),this.finishNode(o,"ExportNamedDeclaration");this.expectPlugin("exportDefaultFrom");let i=this.startNode();return i.exported=n,o.specifiers=[this.finishNode(i,"ExportDefaultSpecifier")],super.parseExport(o,r)}isExportDefaultSpecifier(){if(this.match(65)){let t=this.nextTokenStart();if(this.isUnparsedContextual(t,"from")&&this.input.startsWith(Vm(133),this.nextTokenStartSince(t+4)))return!0}return super.isExportDefaultSpecifier()}maybeParseExportDefaultSpecifier(t,r){return t.specifiers?.length?!0:super.maybeParseExportDefaultSpecifier(t,r)}checkExport(t){let{specifiers:r}=t;r?.length&&(t.specifiers=r.filter(n=>n.exported.type==="Placeholder")),super.checkExport(t),t.specifiers=r}parseImport(t){let r=this.parsePlaceholder("Identifier");if(!r)return super.parseImport(t);if(t.specifiers=[],!this.isContextual(98)&&!this.match(12))return t.source=this.finishPlaceholder(r,"StringLiteral"),this.semicolon(),this.finishNode(t,"ImportDeclaration");let n=this.startNodeAtNode(r);return n.local=r,t.specifiers.push(this.finishNode(n,"ImportDefaultSpecifier")),this.eat(12)&&(this.maybeParseStarImportSpecifier(t)||this.parseNamedImportSpecifiers(t)),this.expectContextual(98),t.source=this.parseImportSource(),this.semicolon(),this.finishNode(t,"ImportDeclaration")}parseImportSource(){return this.parsePlaceholder("StringLiteral")||super.parseImportSource()}assertNoSpace(){this.state.start>this.offsetToSourcePos(this.state.lastTokEndLoc.index)&&this.raise(Que.UnexpectedSpace,this.state.lastTokEndLoc)}},qJe=e=>class extends e{parseV8Intrinsic(){if(this.match(54)){let t=this.state.startLoc,r=this.startNode();if(this.next(),Qn(this.state.type)){let n=this.parseIdentifierName(),o=this.createIdentifier(r,n);if(this.castNodeTo(o,"V8IntrinsicIdentifier"),this.match(10))return o}this.unexpected(t)}}parseExprAtom(t){return this.parseV8Intrinsic()||super.parseExprAtom(t)}},Xue=["fsharp","hack"],Yue=["^^","@@","^","%","#"];function UJe(e){if(e.has("decorators")){if(e.has("decorators-legacy"))throw new Error("Cannot use the decorators and decorators-legacy plugin together");let t=e.get("decorators").decoratorsBeforeExport;if(t!=null&&typeof t!="boolean")throw new Error("'decoratorsBeforeExport' must be a boolean, if specified.");let r=e.get("decorators").allowCallParenthesized;if(r!=null&&typeof r!="boolean")throw new Error("'allowCallParenthesized' must be a boolean.")}if(e.has("flow")&&e.has("typescript"))throw new Error("Cannot combine flow and typescript plugins.");if(e.has("placeholders")&&e.has("v8intrinsic"))throw new Error("Cannot combine placeholders and v8intrinsic plugins.");if(e.has("pipelineOperator")){let t=e.get("pipelineOperator").proposal;if(!Xue.includes(t)){let r=Xue.map(n=>`"${n}"`).join(", ");throw new Error(`"pipelineOperator" requires "proposal" option whose value must be one of: ${r}.`)}if(t==="hack"){if(e.has("placeholders"))throw new Error("Cannot combine placeholders plugin and Hack-style pipes.");if(e.has("v8intrinsic"))throw new Error("Cannot combine v8intrinsic plugin and Hack-style pipes.");let r=e.get("pipelineOperator").topicToken;if(!Yue.includes(r)){let n=Yue.map(o=>`"${o}"`).join(", ");throw new Error(`"pipelineOperator" in "proposal": "hack" mode also requires a "topicToken" option whose value must be one of: ${n}.`)}}}if(e.has("moduleAttributes"))throw new Error("`moduleAttributes` has been removed in Babel 8, please migrate to import attributes instead.");if(e.has("importAssertions"))throw new Error("`importAssertions` has been removed in Babel 8, please use import attributes instead. To use the non-standard `assert` syntax you can enable the `deprecatedImportAssert` parser plugin.");if(!e.has("deprecatedImportAssert")&&e.has("importAttributes")&&e.get("importAttributes").deprecatedAssertSyntax)throw new Error("The 'importAttributes' plugin has been removed in Babel 8. If you need to enable support for the deprecated `assert` syntax, you can enable the `deprecatedImportAssert` parser plugin.");if(e.has("recordAndTuple"))throw new Error("The 'recordAndTuple' plugin has been removed in Babel 8. Please remove it from your configuration.");if(e.has("asyncDoExpressions")&&!e.has("doExpressions")){let t=new Error("'asyncDoExpressions' requires 'doExpressions', please add 'doExpressions' to parser plugins.");throw t.missingPlugins="doExpressions",t}if(e.has("optionalChainingAssign")&&e.get("optionalChainingAssign").version!=="2023-07")throw new Error("The 'optionalChainingAssign' plugin requires a 'version' option, representing the last proposal update. Currently, the only supported value is '2023-07'.");if(e.has("discardBinding")&&e.get("discardBinding").syntaxType!=="void")throw new Error("The 'discardBinding' plugin requires a 'syntaxType' option. Currently the only supported value is 'void'.");{if(e.has("decimal"))throw new Error("The 'decimal' plugin has been removed in Babel 8. Please remove it from your configuration.");if(e.has("importReflection"))throw new Error("The 'importReflection' plugin has been removed in Babel 8. Use 'sourcePhaseImports' instead, and replace 'import module' with 'import source' in your code.")}}var Cpe={estree:Pze,jsx:uJe,flow:sJe,typescript:LJe,v8intrinsic:qJe,placeholders:BJe},zJe=Object.keys(Cpe),JJe=class extends OJe{checkProto(e,t,r,n){if(e.type==="SpreadElement"||this.isObjectMethod(e)||e.computed||e.shorthand)return r;let o=e.key;return(o.type==="Identifier"?o.name:o.value)==="__proto__"?t?(this.raise(W.RecordNoProto,o),!0):(r&&(n?n.doubleProtoLoc===null&&(n.doubleProtoLoc=o.loc.start):this.raise(W.DuplicateProto,o)),!0):r}shouldExitDescending(e,t){return e.type==="ArrowFunctionExpression"&&this.offsetToSourcePos(e.start)===t}getExpression(){if(this.enterInitialScopes(),this.nextToken(),this.match(140))throw this.raise(W.ParseExpressionEmptyInput,this.state.startLoc);let e=this.parseExpression();if(!this.match(140))throw this.raise(W.ParseExpressionExpectsEOF,this.state.startLoc,{unexpected:this.input.codePointAt(this.state.start)});return this.finalizeRemainingComments(),e.comments=this.comments,e.errors=this.state.errors,this.optionFlags&256&&(e.tokens=this.tokens),e}parseExpression(e,t){return e?this.disallowInAnd(()=>this.parseExpressionBase(t)):this.allowInAnd(()=>this.parseExpressionBase(t))}parseExpressionBase(e){let t=this.state.startLoc,r=this.parseMaybeAssign(e);if(this.match(12)){let n=this.startNodeAt(t);for(n.expressions=[r];this.eat(12);)n.expressions.push(this.parseMaybeAssign(e));return this.toReferencedList(n.expressions),this.finishNode(n,"SequenceExpression")}return r}parseMaybeAssignDisallowIn(e,t){return this.disallowInAnd(()=>this.parseMaybeAssign(e,t))}parseMaybeAssignAllowIn(e,t){return this.allowInAnd(()=>this.parseMaybeAssign(e,t))}setOptionalParametersError(e){e.optionalParametersLoc=this.state.startLoc}parseMaybeAssign(e,t){let r=this.state.startLoc,n=this.isContextual(108);if(n&&this.prodParam.hasYield){this.next();let s=this.parseYield(r);return t&&(s=t.call(this,s,r)),s}let o;e?o=!1:(e=new I3,o=!0);let{type:i}=this.state;(i===10||Qn(i))&&(this.state.potentialArrowAt=this.state.start);let a=this.parseMaybeConditional(e);if(t&&(a=t.call(this,a,r)),Lze(this.state.type)){let s=this.startNodeAt(r),c=this.state.value;if(s.operator=c,this.match(29)){this.toAssignable(a,!0),s.left=a;let p=r.index;e.doubleProtoLoc!=null&&e.doubleProtoLoc.index>=p&&(e.doubleProtoLoc=null),e.shorthandAssignLoc!=null&&e.shorthandAssignLoc.index>=p&&(e.shorthandAssignLoc=null),e.privateKeyLoc!=null&&e.privateKeyLoc.index>=p&&(this.checkDestructuringPrivate(e),e.privateKeyLoc=null),e.voidPatternLoc!=null&&e.voidPatternLoc.index>=p&&(e.voidPatternLoc=null)}else s.left=a;return this.next(),s.right=this.parseMaybeAssign(),this.checkLVal(a,this.finishNode(s,"AssignmentExpression"),void 0,void 0,void 0,void 0,c==="||="||c==="&&="||c==="??="),s}else o&&this.checkExpressionErrors(e,!0);if(n){let{type:s}=this.state;if((this.hasPlugin("v8intrinsic")?aD(s):aD(s)&&!this.match(54))&&!this.isAmbiguousPrefixOrIdentifier())return this.raiseOverwrite(W.YieldNotInGeneratorFunction,r),this.parseYield(r)}return a}parseMaybeConditional(e){let t=this.state.startLoc,r=this.state.potentialArrowAt,n=this.parseExprOps(e);return this.shouldExitDescending(n,r)?n:this.parseConditional(n,t,e)}parseConditional(e,t,r){if(this.eat(17)){let n=this.startNodeAt(t);return n.test=e,n.consequent=this.parseMaybeAssignAllowIn(),this.expect(14),n.alternate=this.parseMaybeAssign(),this.finishNode(n,"ConditionalExpression")}return e}parseMaybeUnaryOrPrivate(e){return this.match(139)?this.parsePrivateName():this.parseMaybeUnary(e)}parseExprOps(e){let t=this.state.startLoc,r=this.state.potentialArrowAt,n=this.parseMaybeUnaryOrPrivate(e);return this.shouldExitDescending(n,r)?n:this.parseExprOp(n,t,-1)}parseExprOp(e,t,r){if(this.isPrivateName(e)){let o=this.getPrivateNameSV(e);(r>=D3(58)||!this.prodParam.hasIn||!this.match(58))&&this.raise(W.PrivateInExpectedIn,e,{identifierName:o}),this.classScope.usePrivateName(o,e.loc.start)}let n=this.state.type;if(Mze(n)&&(this.prodParam.hasIn||!this.match(58))){let o=D3(n);if(o>r){if(n===39){if(this.expectPlugin("pipelineOperator"),this.state.inFSharpPipelineDirectBody)return e;this.checkPipelineAtInfixOperator(e,t)}let i=this.startNodeAt(t);i.left=e,i.operator=this.state.value;let a=n===41||n===42,s=n===40;s&&(o=D3(42)),this.next(),i.right=this.parseExprOpRightExpr(n,o);let c=this.finishNode(i,a||s?"LogicalExpression":"BinaryExpression"),p=this.state.type;if(s&&(p===41||p===42)||a&&p===40)throw this.raise(W.MixingCoalesceWithLogical,this.state.startLoc);return this.parseExprOp(c,t,r)}}return e}parseExprOpRightExpr(e,t){switch(this.state.startLoc,e){case 39:switch(this.getPluginOption("pipelineOperator","proposal")){case"hack":return this.withTopicBindingContext(()=>this.parseHackPipeBody());case"fsharp":return this.withSoloAwaitPermittingContext(()=>this.parseFSharpPipelineBody(t))}default:return this.parseExprOpBaseRightExpr(e,t)}}parseExprOpBaseRightExpr(e,t){let r=this.state.startLoc;return this.parseExprOp(this.parseMaybeUnaryOrPrivate(),r,zze(e)?t-1:t)}parseHackPipeBody(){let{startLoc:e}=this.state,t=this.parseMaybeAssign();return Tze.has(t.type)&&!t.extra?.parenthesized&&this.raise(W.PipeUnparenthesizedBody,e,{type:t.type}),this.topicReferenceWasUsedInCurrentContext()||this.raise(W.PipeTopicUnused,e),t}checkExponentialAfterUnary(e){this.match(57)&&this.raise(W.UnexpectedTokenUnaryExponentiation,e.argument)}parseMaybeUnary(e,t){let r=this.state.startLoc,n=this.isContextual(96);if(n&&this.recordAwaitIfAllowed()){this.next();let s=this.parseAwait(r);return t||this.checkExponentialAfterUnary(s),s}let o=this.match(34),i=this.startNode();if(Bze(this.state.type)){i.operator=this.state.value,i.prefix=!0,this.match(72)&&this.expectPlugin("throwExpressions");let s=this.match(89);if(this.next(),i.argument=this.parseMaybeUnary(null,!0),this.checkExpressionErrors(e,!0),this.state.strict&&s){let c=i.argument;c.type==="Identifier"?this.raise(W.StrictDelete,i):this.hasPropertyAsPrivateName(c)&&this.raise(W.DeletePrivateField,i)}if(!o)return t||this.checkExponentialAfterUnary(i),this.finishNode(i,"UnaryExpression")}let a=this.parseUpdate(i,o,e);if(n){let{type:s}=this.state;if((this.hasPlugin("v8intrinsic")?aD(s):aD(s)&&!this.match(54))&&!this.isAmbiguousPrefixOrIdentifier())return this.raiseOverwrite(W.AwaitNotInAsyncContext,r),this.parseAwait(r)}return a}parseUpdate(e,t,r){if(t){let i=e;return this.checkLVal(i.argument,this.finishNode(i,"UpdateExpression")),e}let n=this.state.startLoc,o=this.parseExprSubscripts(r);if(this.checkExpressionErrors(r,!1))return o;for(;jze(this.state.type)&&!this.canInsertSemicolon();){let i=this.startNodeAt(n);i.operator=this.state.value,i.prefix=!1,i.argument=o,this.next(),this.checkLVal(o,o=this.finishNode(i,"UpdateExpression"))}return o}parseExprSubscripts(e){let t=this.state.startLoc,r=this.state.potentialArrowAt,n=this.parseExprAtom(e);return this.shouldExitDescending(n,r)?n:this.parseSubscripts(n,t)}parseSubscripts(e,t,r){let n={optionalChainMember:!1,maybeAsyncArrow:this.atPossibleAsyncArrow(e),stop:!1};do e=this.parseSubscript(e,t,r,n),n.maybeAsyncArrow=!1;while(!n.stop);return e}parseSubscript(e,t,r,n){let{type:o}=this.state;if(!r&&o===15)return this.parseBind(e,t,r,n);if(Xq(o))return this.parseTaggedTemplateExpression(e,t,n);let i=!1;if(o===18){if(r&&(this.raise(W.OptionalChainingNoNew,this.state.startLoc),this.lookaheadCharCode()===40))return this.stopParseSubscript(e,n);n.optionalChainMember=i=!0,this.next()}if(!r&&this.match(10))return this.parseCoverCallAndAsyncArrowHead(e,t,n,i);{let a=this.eat(0);return a||i||this.eat(16)?this.parseMember(e,t,n,a,i):this.stopParseSubscript(e,n)}}stopParseSubscript(e,t){return t.stop=!0,e}parseMember(e,t,r,n,o){let i=this.startNodeAt(t);return i.object=e,i.computed=n,n?(i.property=this.parseExpression(),this.expect(3)):this.match(139)?(e.type==="Super"&&this.raise(W.SuperPrivateField,t),this.classScope.usePrivateName(this.state.value,this.state.startLoc),i.property=this.parsePrivateName()):i.property=this.parseIdentifier(!0),r.optionalChainMember?(i.optional=o,this.finishNode(i,"OptionalMemberExpression")):this.finishNode(i,"MemberExpression")}parseBind(e,t,r,n){let o=this.startNodeAt(t);return o.object=e,this.next(),o.callee=this.parseNoCallExpr(),n.stop=!0,this.parseSubscripts(this.finishNode(o,"BindExpression"),t,r)}parseCoverCallAndAsyncArrowHead(e,t,r,n){let o=this.state.maybeInArrowParameters,i=null;this.state.maybeInArrowParameters=!0,this.next();let a=this.startNodeAt(t);a.callee=e;let{maybeAsyncArrow:s,optionalChainMember:c}=r;s&&(this.expressionScope.enter(kJe()),i=new I3),c&&(a.optional=n),n?a.arguments=this.parseCallExpressionArguments():a.arguments=this.parseCallExpressionArguments(e.type!=="Super",a,i);let p=this.finishCallExpression(a,c);return s&&this.shouldParseAsyncArrow()&&!n?(r.stop=!0,this.checkDestructuringPrivate(i),this.expressionScope.validateAsPattern(),this.expressionScope.exit(),p=this.parseAsyncArrowFromCallExpression(this.startNodeAt(t),p)):(s&&(this.checkExpressionErrors(i,!0),this.expressionScope.exit()),this.toReferencedArguments(p)),this.state.maybeInArrowParameters=o,p}toReferencedArguments(e,t){this.toReferencedListDeep(e.arguments,t)}parseTaggedTemplateExpression(e,t,r){let n=this.startNodeAt(t);return n.tag=e,n.quasi=this.parseTemplate(!0),r.optionalChainMember&&this.raise(W.OptionalChainingNoTemplate,t),this.finishNode(n,"TaggedTemplateExpression")}atPossibleAsyncArrow(e){return e.type==="Identifier"&&e.name==="async"&&this.state.lastTokEndLoc.index===e.end&&!this.canInsertSemicolon()&&e.end-e.start===5&&this.offsetToSourcePos(e.start)===this.state.potentialArrowAt}finishCallExpression(e,t){if(e.callee.type==="Import")if(e.arguments.length===0||e.arguments.length>2)this.raise(W.ImportCallArity,e);else for(let r of e.arguments)r.type==="SpreadElement"&&this.raise(W.ImportCallSpreadArgument,r);return this.finishNode(e,t?"OptionalCallExpression":"CallExpression")}parseCallExpressionArguments(e,t,r){let n=[],o=!0,i=this.state.inFSharpPipelineDirectBody;for(this.state.inFSharpPipelineDirectBody=!1;!this.eat(11);){if(o)o=!1;else if(this.expect(12),this.match(11)){t&&this.addTrailingCommaExtraToNode(t),this.next();break}n.push(this.parseExprListItem(11,!1,r,e))}return this.state.inFSharpPipelineDirectBody=i,n}shouldParseAsyncArrow(){return this.match(19)&&!this.canInsertSemicolon()}parseAsyncArrowFromCallExpression(e,t){return this.resetPreviousNodeTrailingComments(t),this.expect(19),this.parseArrowExpression(e,t.arguments,!0,t.extra?.trailingCommaLoc),t.innerComments&&Uv(e,t.innerComments),t.callee.trailingComments&&Uv(e,t.callee.trailingComments),e}parseNoCallExpr(){let e=this.state.startLoc;return this.parseSubscripts(this.parseExprAtom(),e,!0)}parseExprAtom(e){let t,r=null,{type:n}=this.state;switch(n){case 79:return this.parseSuper();case 83:return t=this.startNode(),this.next(),this.match(16)?this.parseImportMetaPropertyOrPhaseCall(t):this.match(10)?this.optionFlags&512?this.parseImportCall(t):this.finishNode(t,"Import"):(this.raise(W.UnsupportedImport,this.state.lastTokStartLoc),this.finishNode(t,"Import"));case 78:return t=this.startNode(),this.next(),this.finishNode(t,"ThisExpression");case 90:return this.parseDo(this.startNode(),!1);case 56:case 31:return this.readRegexp(),this.parseRegExpLiteral(this.state.value);case 135:return this.parseNumericLiteral(this.state.value);case 136:return this.parseBigIntLiteral(this.state.value);case 134:return this.parseStringLiteral(this.state.value);case 84:return this.parseNullLiteral();case 85:return this.parseBooleanLiteral(!0);case 86:return this.parseBooleanLiteral(!1);case 10:{let o=this.state.potentialArrowAt===this.state.start;return this.parseParenAndDistinguishExpression(o)}case 0:return this.parseArrayLike(3,!1,e);case 5:return this.parseObjectLike(8,!1,!1,e);case 68:return this.parseFunctionOrFunctionSent();case 26:r=this.parseDecorators();case 80:return this.parseClass(this.maybeTakeDecorators(r,this.startNode()),!1);case 77:return this.parseNewOrNewTarget();case 25:case 24:return this.parseTemplate(!1);case 15:{t=this.startNode(),this.next(),t.object=null;let o=t.callee=this.parseNoCallExpr();if(o.type==="MemberExpression")return this.finishNode(t,"BindExpression");throw this.raise(W.UnsupportedBind,o)}case 139:return this.raise(W.PrivateInExpectedIn,this.state.startLoc,{identifierName:this.state.value}),this.parsePrivateName();case 33:return this.parseTopicReferenceThenEqualsSign(54,"%");case 32:return this.parseTopicReferenceThenEqualsSign(44,"^");case 37:case 38:return this.parseTopicReference("hack");case 44:case 54:case 27:{let o=this.getPluginOption("pipelineOperator","proposal");if(o)return this.parseTopicReference(o);throw this.unexpected()}case 47:{let o=this.input.codePointAt(this.nextTokenStart());throw ed(o)||o===62?this.expectOnePlugin(["jsx","flow","typescript"]):this.unexpected()}default:if(Qn(n)){if(this.isContextual(127)&&this.lookaheadInLineCharCode()===123)return this.parseModuleExpression();let o=this.state.potentialArrowAt===this.state.start,i=this.state.containsEsc,a=this.parseIdentifier();if(!i&&a.name==="async"&&!this.canInsertSemicolon()){let{type:s}=this.state;if(s===68)return this.resetPreviousNodeTrailingComments(a),this.next(),this.parseAsyncFunctionExpression(this.startNodeAtNode(a));if(Qn(s))return this.lookaheadCharCode()===61?this.parseAsyncArrowUnaryFunction(this.startNodeAtNode(a)):a;if(s===90)return this.resetPreviousNodeTrailingComments(a),this.parseDo(this.startNodeAtNode(a),!0)}return o&&this.match(19)&&!this.canInsertSemicolon()?(this.next(),this.parseArrowExpression(this.startNodeAtNode(a),[a],!1)):a}else throw this.unexpected()}}parseTopicReferenceThenEqualsSign(e,t){let r=this.getPluginOption("pipelineOperator","proposal");if(r)return this.state.type=e,this.state.value=t,this.state.pos--,this.state.end--,this.state.endLoc=Rl(this.state.endLoc,-1),this.parseTopicReference(r);throw this.unexpected()}parseTopicReference(e){let t=this.startNode(),r=this.state.startLoc,n=this.state.type;return this.next(),this.finishTopicReference(t,r,e,n)}finishTopicReference(e,t,r,n){if(this.testTopicReferenceConfiguration(r,t,n))return this.topicReferenceIsAllowedInCurrentContext()||this.raise(W.PipeTopicUnbound,t),this.registerTopicReference(),this.finishNode(e,"TopicReference");throw this.raise(W.PipeTopicUnconfiguredToken,t,{token:Vm(n)})}testTopicReferenceConfiguration(e,t,r){switch(e){case"hack":return this.hasPlugin(["pipelineOperator",{topicToken:Vm(r)}]);case"smart":return r===27;default:throw this.raise(W.PipeTopicRequiresHackPipes,t)}}parseAsyncArrowUnaryFunction(e){this.prodParam.enter(A3(!0,this.prodParam.hasYield));let t=[this.parseIdentifier()];return this.prodParam.exit(),this.hasPrecedingLineBreak()&&this.raise(W.LineTerminatorBeforeArrow,this.state.curPosition()),this.expect(19),this.parseArrowExpression(e,t,!0)}parseDo(e,t){this.expectPlugin("doExpressions"),t&&this.expectPlugin("asyncDoExpressions"),e.async=t,this.next();let r=this.state.labels;return this.state.labels=[],t?(this.prodParam.enter(2),e.body=this.parseBlock(),this.prodParam.exit()):e.body=this.parseBlock(),this.state.labels=r,this.finishNode(e,"DoExpression")}parseSuper(){let e=this.startNode();return this.next(),this.match(10)&&!this.scope.allowDirectSuper?this.raise(W.SuperNotAllowed,e):this.scope.allowSuper||this.raise(W.UnexpectedSuper,e),!this.match(10)&&!this.match(0)&&!this.match(16)&&this.raise(W.UnsupportedSuper,e),this.finishNode(e,"Super")}parsePrivateName(){let e=this.startNode(),t=this.startNodeAt(Rl(this.state.startLoc,1)),r=this.state.value;return this.next(),e.id=this.createIdentifier(t,r),this.finishNode(e,"PrivateName")}parseFunctionOrFunctionSent(){let e=this.startNode();if(this.next(),this.prodParam.hasYield&&this.match(16)){let t=this.createIdentifier(this.startNodeAtNode(e),"function");return this.next(),this.match(103)?this.expectPlugin("functionSent"):this.hasPlugin("functionSent")||this.unexpected(),this.parseMetaProperty(e,t,"sent")}return this.parseFunction(e)}parseMetaProperty(e,t,r){e.meta=t;let n=this.state.containsEsc;return e.property=this.parseIdentifier(!0),(e.property.name!==r||n)&&this.raise(W.UnsupportedMetaProperty,e.property,{target:t.name,onlyValidPropertyName:r}),this.finishNode(e,"MetaProperty")}parseImportMetaPropertyOrPhaseCall(e){if(this.next(),this.isContextual(105)||this.isContextual(97)){let t=this.isContextual(105);return this.expectPlugin(t?"sourcePhaseImports":"deferredImportEvaluation"),this.next(),e.phase=t?"source":"defer",this.parseImportCall(e)}else{let t=this.createIdentifierAt(this.startNodeAtNode(e),"import",this.state.lastTokStartLoc);return this.isContextual(101)&&(this.inModule||this.raise(W.ImportMetaOutsideModule,t),this.sawUnambiguousESM=!0),this.parseMetaProperty(e,t,"meta")}}parseLiteralAtNode(e,t,r){return this.addExtra(r,"rawValue",e),this.addExtra(r,"raw",this.input.slice(this.offsetToSourcePos(r.start),this.state.end)),r.value=e,this.next(),this.finishNode(r,t)}parseLiteral(e,t){let r=this.startNode();return this.parseLiteralAtNode(e,t,r)}parseStringLiteral(e){return this.parseLiteral(e,"StringLiteral")}parseNumericLiteral(e){return this.parseLiteral(e,"NumericLiteral")}parseBigIntLiteral(e){{let t;try{t=BigInt(e)}catch{t=null}return this.parseLiteral(t,"BigIntLiteral")}}parseDecimalLiteral(e){return this.parseLiteral(e,"DecimalLiteral")}parseRegExpLiteral(e){let t=this.startNode();return this.addExtra(t,"raw",this.input.slice(this.offsetToSourcePos(t.start),this.state.end)),t.pattern=e.pattern,t.flags=e.flags,this.next(),this.finishNode(t,"RegExpLiteral")}parseBooleanLiteral(e){let t=this.startNode();return t.value=e,this.next(),this.finishNode(t,"BooleanLiteral")}parseNullLiteral(){let e=this.startNode();return this.next(),this.finishNode(e,"NullLiteral")}parseParenAndDistinguishExpression(e){let t=this.state.startLoc,r;this.next(),this.expressionScope.enter(wJe());let n=this.state.maybeInArrowParameters,o=this.state.inFSharpPipelineDirectBody;this.state.maybeInArrowParameters=!0,this.state.inFSharpPipelineDirectBody=!1;let i=this.state.startLoc,a=[],s=new I3,c=!0,p,d;for(;!this.match(11);){if(c)c=!1;else if(this.expect(12,s.optionalParametersLoc===null?null:s.optionalParametersLoc),this.match(11)){d=this.state.startLoc;break}if(this.match(21)){let y=this.state.startLoc;if(p=this.state.startLoc,a.push(this.parseParenItem(this.parseRestBinding(),y)),!this.checkCommaAfterRest(41))break}else a.push(this.parseMaybeAssignAllowInOrVoidPattern(11,s,this.parseParenItem))}let f=this.state.lastTokEndLoc;this.expect(11),this.state.maybeInArrowParameters=n,this.state.inFSharpPipelineDirectBody=o;let m=this.startNodeAt(t);return e&&this.shouldParseArrow(a)&&(m=this.parseArrow(m))?(this.checkDestructuringPrivate(s),this.expressionScope.validateAsPattern(),this.expressionScope.exit(),this.parseArrowExpression(m,a,!1),m):(this.expressionScope.exit(),a.length||this.unexpected(this.state.lastTokStartLoc),d&&this.unexpected(d),p&&this.unexpected(p),this.checkExpressionErrors(s,!0),this.toReferencedListDeep(a,!0),a.length>1?(r=this.startNodeAt(i),r.expressions=a,this.finishNode(r,"SequenceExpression"),this.resetEndLocation(r,f)):r=a[0],this.wrapParenthesis(t,r))}wrapParenthesis(e,t){if(!(this.optionFlags&1024))return this.addExtra(t,"parenthesized",!0),this.addExtra(t,"parenStart",e.index),this.takeSurroundingComments(t,e.index,this.state.lastTokEndLoc.index),t;let r=this.startNodeAt(e);return r.expression=t,this.finishNode(r,"ParenthesizedExpression")}shouldParseArrow(e){return!this.canInsertSemicolon()}parseArrow(e){if(this.eat(19))return e}parseParenItem(e,t){return e}parseNewOrNewTarget(){let e=this.startNode();if(this.next(),this.match(16)){let t=this.createIdentifier(this.startNodeAtNode(e),"new");this.next();let r=this.parseMetaProperty(e,t,"target");return this.scope.allowNewTarget||this.raise(W.UnexpectedNewTarget,r),r}return this.parseNew(e)}parseNew(e){if(this.parseNewCallee(e),this.eat(10)){let t=this.parseExprList(11);this.toReferencedList(t),e.arguments=t}else e.arguments=[];return this.finishNode(e,"NewExpression")}parseNewCallee(e){let t=this.match(83),r=this.parseNoCallExpr();e.callee=r,t&&(r.type==="Import"||r.type==="ImportExpression")&&this.raise(W.ImportCallNotNewExpression,r)}parseTemplateElement(e){let{start:t,startLoc:r,end:n,value:o}=this.state,i=t+1,a=this.startNodeAt(Rl(r,1));o===null&&(e||this.raise(W.InvalidEscapeSequenceTemplate,Rl(this.state.firstInvalidTemplateEscapePos,1)));let s=this.match(24),c=s?-1:-2,p=n+c;a.value={raw:this.input.slice(i,p).replace(/\r\n?/g,` +`),cooked:o===null?null:o.slice(1,c)},a.tail=s,this.next();let d=this.finishNode(a,"TemplateElement");return this.resetEndLocation(d,Rl(this.state.lastTokEndLoc,c)),d}parseTemplate(e){let t=this.startNode(),r=this.parseTemplateElement(e),n=[r],o=[];for(;!r.tail;)o.push(this.parseTemplateSubstitution()),this.readTemplateContinuation(),n.push(r=this.parseTemplateElement(e));return t.expressions=o,t.quasis=n,this.finishNode(t,"TemplateLiteral")}parseTemplateSubstitution(){return this.parseExpression()}parseObjectLike(e,t,r,n){r&&this.expectPlugin("recordAndTuple");let o=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;let i=!1,a=!0,s=this.startNode();for(s.properties=[],this.next();!this.match(e);){if(a)a=!1;else if(this.expect(12),this.match(e)){this.addTrailingCommaExtraToNode(s);break}let p;t?p=this.parseBindingProperty():(p=this.parsePropertyDefinition(n),i=this.checkProto(p,r,i,n)),r&&!this.isObjectProperty(p)&&p.type!=="SpreadElement"&&this.raise(W.InvalidRecordProperty,p),s.properties.push(p)}this.next(),this.state.inFSharpPipelineDirectBody=o;let c="ObjectExpression";return t?c="ObjectPattern":r&&(c="RecordExpression"),this.finishNode(s,c)}addTrailingCommaExtraToNode(e){this.addExtra(e,"trailingComma",this.state.lastTokStartLoc.index),this.addExtra(e,"trailingCommaLoc",this.state.lastTokStartLoc,!1)}maybeAsyncOrAccessorProp(e){return!e.computed&&e.key.type==="Identifier"&&(this.isLiteralPropertyName()||this.match(0)||this.match(55))}parsePropertyDefinition(e){let t=[];if(this.match(26))for(this.hasPlugin("decorators")&&this.raise(W.UnsupportedPropertyDecorator,this.state.startLoc);this.match(26);)t.push(this.parseDecorator());let r=this.startNode(),n=!1,o=!1,i;if(this.match(21))return t.length&&this.unexpected(),this.parseSpread();t.length&&(r.decorators=t,t=[]),r.method=!1,e&&(i=this.state.startLoc);let a=this.eat(55);this.parsePropertyNamePrefixOperator(r);let s=this.state.containsEsc;if(this.parsePropertyName(r,e),!a&&!s&&this.maybeAsyncOrAccessorProp(r)){let{key:c}=r,p=c.name;p==="async"&&!this.hasPrecedingLineBreak()&&(n=!0,this.resetPreviousNodeTrailingComments(c),a=this.eat(55),this.parsePropertyName(r)),(p==="get"||p==="set")&&(o=!0,this.resetPreviousNodeTrailingComments(c),r.kind=p,this.match(55)&&(a=!0,this.raise(W.AccessorIsGenerator,this.state.curPosition(),{kind:p}),this.next()),this.parsePropertyName(r))}return this.parseObjPropValue(r,i,a,n,!1,o,e)}getGetterSetterExpectedParamCount(e){return e.kind==="get"?0:1}getObjectOrClassMethodParams(e){return e.params}checkGetterSetterParams(e){let t=this.getGetterSetterExpectedParamCount(e),r=this.getObjectOrClassMethodParams(e);r.length!==t&&this.raise(e.kind==="get"?W.BadGetterArity:W.BadSetterArity,e),e.kind==="set"&&r[r.length-1]?.type==="RestElement"&&this.raise(W.BadSetterRestParameter,e)}parseObjectMethod(e,t,r,n,o){if(o){let i=this.parseMethod(e,t,!1,!1,!1,"ObjectMethod");return this.checkGetterSetterParams(i),i}if(r||t||this.match(10))return n&&this.unexpected(),e.kind="method",e.method=!0,this.parseMethod(e,t,r,!1,!1,"ObjectMethod")}parseObjectProperty(e,t,r,n){if(e.shorthand=!1,this.eat(14))return e.value=r?this.parseMaybeDefault(this.state.startLoc):this.parseMaybeAssignAllowInOrVoidPattern(8,n),this.finishObjectProperty(e);if(!e.computed&&e.key.type==="Identifier"){if(this.checkReservedWord(e.key.name,e.key.loc.start,!0,!1),r)e.value=this.parseMaybeDefault(t,this.cloneIdentifier(e.key));else if(this.match(29)){let o=this.state.startLoc;n!=null?n.shorthandAssignLoc===null&&(n.shorthandAssignLoc=o):this.raise(W.InvalidCoverInitializedName,o),e.value=this.parseMaybeDefault(t,this.cloneIdentifier(e.key))}else e.value=this.cloneIdentifier(e.key);return e.shorthand=!0,this.finishObjectProperty(e)}}finishObjectProperty(e){return this.finishNode(e,"ObjectProperty")}parseObjPropValue(e,t,r,n,o,i,a){let s=this.parseObjectMethod(e,r,n,o,i)||this.parseObjectProperty(e,t,o,a);return s||this.unexpected(),s}parsePropertyName(e,t){if(this.eat(0))e.computed=!0,e.key=this.parseMaybeAssignAllowIn(),this.expect(3);else{let{type:r,value:n}=this.state,o;if(Ou(r))o=this.parseIdentifier(!0);else switch(r){case 135:o=this.parseNumericLiteral(n);break;case 134:o=this.parseStringLiteral(n);break;case 136:o=this.parseBigIntLiteral(n);break;case 139:{let i=this.state.startLoc;t!=null?t.privateKeyLoc===null&&(t.privateKeyLoc=i):this.raise(W.UnexpectedPrivateField,i),o=this.parsePrivateName();break}default:this.unexpected()}e.key=o,r!==139&&(e.computed=!1)}}initFunction(e,t){e.id=null,e.generator=!1,e.async=t}parseMethod(e,t,r,n,o,i,a=!1){this.initFunction(e,r),e.generator=t,this.scope.enter(530|(a?576:0)|(o?32:0)),this.prodParam.enter(A3(r,e.generator)),this.parseFunctionParams(e,n);let s=this.parseFunctionBodyAndFinish(e,i,!0);return this.prodParam.exit(),this.scope.exit(),s}parseArrayLike(e,t,r){t&&this.expectPlugin("recordAndTuple");let n=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;let o=this.startNode();return this.next(),o.elements=this.parseExprList(e,!t,r,o),this.state.inFSharpPipelineDirectBody=n,this.finishNode(o,t?"TupleExpression":"ArrayExpression")}parseArrowExpression(e,t,r,n){this.scope.enter(518);let o=A3(r,!1);!this.match(5)&&this.prodParam.hasIn&&(o|=8),this.prodParam.enter(o),this.initFunction(e,r);let i=this.state.maybeInArrowParameters;return t&&(this.state.maybeInArrowParameters=!0,this.setArrowFunctionParameters(e,t,n)),this.state.maybeInArrowParameters=!1,this.parseFunctionBody(e,!0),this.prodParam.exit(),this.scope.exit(),this.state.maybeInArrowParameters=i,this.finishNode(e,"ArrowFunctionExpression")}setArrowFunctionParameters(e,t,r){this.toAssignableList(t,r,!1),e.params=t}parseFunctionBodyAndFinish(e,t,r=!1){return this.parseFunctionBody(e,!1,r),this.finishNode(e,t)}parseFunctionBody(e,t,r=!1){let n=t&&!this.match(5);if(this.expressionScope.enter(Ipe()),n)e.body=this.parseMaybeAssign(),this.checkParams(e,!1,t,!1);else{let o=this.state.strict,i=this.state.labels;this.state.labels=[],this.prodParam.enter(this.prodParam.currentFlags()|4),e.body=this.parseBlock(!0,!1,a=>{let s=!this.isSimpleParamList(e.params);a&&s&&this.raise(W.IllegalLanguageModeDirective,(e.kind==="method"||e.kind==="constructor")&&e.key?e.key.loc.end:e);let c=!o&&this.state.strict;this.checkParams(e,!this.state.strict&&!t&&!r&&!s,t,c),this.state.strict&&e.id&&this.checkIdentifier(e.id,65,c)}),this.prodParam.exit(),this.state.labels=i}this.expressionScope.exit()}isSimpleParameter(e){return e.type==="Identifier"}isSimpleParamList(e){for(let t=0,r=e.length;t10||!Yze(e))){if(r&&Wze(e)){this.raise(W.UnexpectedKeyword,t,{keyword:e});return}if((this.state.strict?n?bpe:Spe:gpe)(e,this.inModule)){this.raise(W.UnexpectedReservedWord,t,{reservedWord:e});return}else if(e==="yield"){if(this.prodParam.hasYield){this.raise(W.YieldBindingIdentifier,t);return}}else if(e==="await"){if(this.prodParam.hasAwait){this.raise(W.AwaitBindingIdentifier,t);return}if(this.scope.inStaticBlock){this.raise(W.AwaitBindingIdentifierInStaticBlock,t);return}this.expressionScope.recordAsyncArrowParametersError(t)}else if(e==="arguments"&&this.scope.inClassAndNotInNonArrowFunction){this.raise(W.ArgumentsInClass,t);return}}}recordAwaitIfAllowed(){let e=this.prodParam.hasAwait;return e&&!this.scope.inFunction&&(this.state.hasTopLevelAwait=!0),e}parseAwait(e){let t=this.startNodeAt(e);return this.expressionScope.recordParameterInitializerError(W.AwaitExpressionFormalParameter,t),this.eat(55)&&this.raise(W.ObsoleteAwaitStar,t),!this.scope.inFunction&&!(this.optionFlags&1)&&(this.isAmbiguousPrefixOrIdentifier()?this.ambiguousScriptDifferentAst=!0:this.sawUnambiguousESM=!0),this.state.soloAwait||(t.argument=this.parseMaybeUnary(null,!0)),this.finishNode(t,"AwaitExpression")}isAmbiguousPrefixOrIdentifier(){if(this.hasPrecedingLineBreak())return!0;let{type:e}=this.state;return e===53||e===10||e===0||Xq(e)||e===102&&!this.state.containsEsc||e===138||e===56||this.hasPlugin("v8intrinsic")&&e===54}parseYield(e){let t=this.startNodeAt(e);this.expressionScope.recordParameterInitializerError(W.YieldInParameter,t);let r=!1,n=null;if(!this.hasPrecedingLineBreak())switch(r=this.eat(55),this.state.type){case 13:case 140:case 8:case 11:case 3:case 9:case 14:case 12:if(!r)break;default:n=this.parseMaybeAssign()}return t.delegate=r,t.argument=n,this.finishNode(t,"YieldExpression")}parseImportCall(e){if(this.next(),e.source=this.parseMaybeAssignAllowIn(),e.options=null,this.eat(12)){if(this.match(11))this.addTrailingCommaExtraToNode(e.source);else if(e.options=this.parseMaybeAssignAllowIn(),this.eat(12)&&(this.addTrailingCommaExtraToNode(e.options),!this.match(11))){do this.parseMaybeAssignAllowIn();while(this.eat(12)&&!this.match(11));this.raise(W.ImportCallArity,e)}}return this.expect(11),this.finishNode(e,"ImportExpression")}checkPipelineAtInfixOperator(e,t){this.hasPlugin(["pipelineOperator",{proposal:"smart"}])&&e.type==="SequenceExpression"&&this.raise(W.PipelineHeadSequenceExpression,t)}parseSmartPipelineBodyInStyle(e,t){if(this.isSimpleReference(e)){let r=this.startNodeAt(t);return r.callee=e,this.finishNode(r,"PipelineBareFunction")}else{let r=this.startNodeAt(t);return this.checkSmartPipeTopicBodyEarlyErrors(t),r.expression=e,this.finishNode(r,"PipelineTopicExpression")}}isSimpleReference(e){switch(e.type){case"MemberExpression":return!e.computed&&this.isSimpleReference(e.object);case"Identifier":return!0;default:return!1}}checkSmartPipeTopicBodyEarlyErrors(e){if(this.match(19))throw this.raise(W.PipelineBodyNoArrow,this.state.startLoc);this.topicReferenceWasUsedInCurrentContext()||this.raise(W.PipelineTopicUnused,e)}withTopicBindingContext(e){let t=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:1,maxTopicIndex:null};try{return e()}finally{this.state.topicContext=t}}withSmartMixTopicForbiddingContext(e){return e()}withSoloAwaitPermittingContext(e){let t=this.state.soloAwait;this.state.soloAwait=!0;try{return e()}finally{this.state.soloAwait=t}}allowInAnd(e){let t=this.prodParam.currentFlags();if(8&~t){this.prodParam.enter(t|8);try{return e()}finally{this.prodParam.exit()}}return e()}disallowInAnd(e){let t=this.prodParam.currentFlags();if(8&t){this.prodParam.enter(t&-9);try{return e()}finally{this.prodParam.exit()}}return e()}registerTopicReference(){this.state.topicContext.maxTopicIndex=0}topicReferenceIsAllowedInCurrentContext(){return this.state.topicContext.maxNumOfResolvableTopics>=1}topicReferenceWasUsedInCurrentContext(){return this.state.topicContext.maxTopicIndex!=null&&this.state.topicContext.maxTopicIndex>=0}parseFSharpPipelineBody(e){let t=this.state.startLoc;this.state.potentialArrowAt=this.state.start;let r=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!0;let n=this.parseExprOp(this.parseMaybeUnaryOrPrivate(),t,e);return this.state.inFSharpPipelineDirectBody=r,n}parseModuleExpression(){this.expectPlugin("moduleBlocks");let e=this.startNode();this.next(),this.match(5)||this.unexpected(null,5);let t=this.startNodeAt(this.state.endLoc);this.next();let r=this.initializeScopes(!0);this.enterInitialScopes();try{e.body=this.parseProgram(t,8,"module")}finally{r()}return this.finishNode(e,"ModuleExpression")}parseVoidPattern(e){this.expectPlugin("discardBinding");let t=this.startNode();return e!=null&&(e.voidPatternLoc=this.state.startLoc),this.next(),this.finishNode(t,"VoidPattern")}parseMaybeAssignAllowInOrVoidPattern(e,t,r){if(t!=null&&this.match(88)){let n=this.lookaheadCharCode();if(n===44||n===(e===3?93:e===8?125:41)||n===61)return this.parseMaybeDefault(this.state.startLoc,this.parseVoidPattern(t))}return this.parseMaybeAssignAllowIn(t,r)}parsePropertyNamePrefixOperator(e){}},Hq={kind:1},VJe={kind:2},KJe=/[\uD800-\uDFFF]/u,Zq=/in(?:stanceof)?/y;function GJe(e,t,r){for(let n=0;n0)for(let[o,i]of Array.from(this.scope.undefinedExports))this.raise(W.ModuleExportUndefined,i,{localName:o});this.addExtra(e,"topLevelAwait",this.state.hasTopLevelAwait)}let n;return t===140?n=this.finishNode(e,"Program"):n=this.finishNodeAt(e,"Program",Rl(this.state.startLoc,-1)),n}stmtToDirective(e){let t=this.castNodeTo(e,"Directive"),r=this.castNodeTo(e.expression,"DirectiveLiteral"),n=r.value,o=this.input.slice(this.offsetToSourcePos(r.start),this.offsetToSourcePos(r.end)),i=r.value=o.slice(1,-1);return this.addExtra(r,"raw",o),this.addExtra(r,"rawValue",i),this.addExtra(r,"expressionValue",n),t.value=r,delete e.expression,t}parseInterpreterDirective(){if(!this.match(28))return null;let e=this.startNode();return e.value=this.state.value,this.next(),this.finishNode(e,"InterpreterDirective")}isLet(){return this.isContextual(100)?this.hasFollowingBindingAtom():!1}isUsing(){return this.isContextual(107)?this.nextTokenIsIdentifierOnSameLine():!1}isForUsing(){if(!this.isContextual(107))return!1;let e=this.nextTokenInLineStart(),t=this.codePointAtPos(e);if(this.isUnparsedContextual(e,"of")){let r=this.lookaheadCharCodeSince(e+2);if(r!==61&&r!==58&&r!==59)return!1}return!!(this.chStartsBindingIdentifier(t,e)||this.isUnparsedContextual(e,"void"))}nextTokenIsIdentifierOnSameLine(){let e=this.nextTokenInLineStart(),t=this.codePointAtPos(e);return this.chStartsBindingIdentifier(t,e)}isAwaitUsing(){if(!this.isContextual(96))return!1;let e=this.nextTokenInLineStart();if(this.isUnparsedContextual(e,"using")){e=this.nextTokenInLineStartSince(e+5);let t=this.codePointAtPos(e);if(this.chStartsBindingIdentifier(t,e))return!0}return!1}chStartsBindingIdentifier(e,t){if(ed(e)){if(Zq.lastIndex=t,Zq.test(this.input)){let r=this.codePointAtPos(Zq.lastIndex);if(!Sg(r)&&r!==92)return!1}return!0}else return e===92}chStartsBindingPattern(e){return e===91||e===123}hasFollowingBindingAtom(){let e=this.nextTokenStart(),t=this.codePointAtPos(e);return this.chStartsBindingPattern(t)||this.chStartsBindingIdentifier(t,e)}hasInLineFollowingBindingIdentifierOrBrace(){let e=this.nextTokenInLineStart(),t=this.codePointAtPos(e);return t===123||this.chStartsBindingIdentifier(t,e)}allowsUsing(){return(this.scope.inModule||!this.scope.inTopLevel)&&!this.scope.inBareCaseStatement}parseModuleItem(){return this.parseStatementLike(15)}parseStatementListItem(){return this.parseStatementLike(6|(!this.options.annexB||this.state.strict?0:8))}parseStatementOrSloppyAnnexBFunctionDeclaration(e=!1){let t=0;return this.options.annexB&&!this.state.strict&&(t|=4,e&&(t|=8)),this.parseStatementLike(t)}parseStatement(){return this.parseStatementLike(0)}parseStatementLike(e){let t=null;return this.match(26)&&(t=this.parseDecorators(!0)),this.parseStatementContent(e,t)}parseStatementContent(e,t){let r=this.state.type,n=this.startNode(),o=!!(e&2),i=!!(e&4),a=e&1;switch(r){case 60:return this.parseBreakContinueStatement(n,!0);case 63:return this.parseBreakContinueStatement(n,!1);case 64:return this.parseDebuggerStatement(n);case 90:return this.parseDoWhileStatement(n);case 91:return this.parseForStatement(n);case 68:if(this.lookaheadCharCode()===46)break;return i||this.raise(this.state.strict?W.StrictFunction:this.options.annexB?W.SloppyFunctionAnnexB:W.SloppyFunction,this.state.startLoc),this.parseFunctionStatement(n,!1,!o&&i);case 80:return o||this.unexpected(),this.parseClass(this.maybeTakeDecorators(t,n),!0);case 69:return this.parseIfStatement(n);case 70:return this.parseReturnStatement(n);case 71:return this.parseSwitchStatement(n);case 72:return this.parseThrowStatement(n);case 73:return this.parseTryStatement(n);case 96:if(this.isAwaitUsing())return this.allowsUsing()?o?this.recordAwaitIfAllowed()||this.raise(W.AwaitUsingNotInAsyncContext,n):this.raise(W.UnexpectedLexicalDeclaration,n):this.raise(W.UnexpectedUsingDeclaration,n),this.next(),this.parseVarStatement(n,"await using");break;case 107:if(this.state.containsEsc||!this.hasInLineFollowingBindingIdentifierOrBrace())break;return this.allowsUsing()?o||this.raise(W.UnexpectedLexicalDeclaration,this.state.startLoc):this.raise(W.UnexpectedUsingDeclaration,this.state.startLoc),this.parseVarStatement(n,"using");case 100:{if(this.state.containsEsc)break;let p=this.nextTokenStart(),d=this.codePointAtPos(p);if(d!==91&&(!o&&this.hasFollowingLineBreak()||!this.chStartsBindingIdentifier(d,p)&&d!==123))break}case 75:o||this.raise(W.UnexpectedLexicalDeclaration,this.state.startLoc);case 74:{let p=this.state.value;return this.parseVarStatement(n,p)}case 92:return this.parseWhileStatement(n);case 76:return this.parseWithStatement(n);case 5:return this.parseBlock();case 13:return this.parseEmptyStatement(n);case 83:{let p=this.lookaheadCharCode();if(p===40||p===46)break}case 82:{!(this.optionFlags&8)&&!a&&this.raise(W.UnexpectedImportExport,this.state.startLoc),this.next();let p;return r===83?p=this.parseImport(n):p=this.parseExport(n,t),this.assertModuleNodeAllowed(p),p}default:if(this.isAsyncFunction())return o||this.raise(W.AsyncFunctionInSingleStatementContext,this.state.startLoc),this.next(),this.parseFunctionStatement(n,!0,!o&&i)}let s=this.state.value,c=this.parseExpression();return Qn(r)&&c.type==="Identifier"&&this.eat(14)?this.parseLabeledStatement(n,s,c,e):this.parseExpressionStatement(n,c,t)}assertModuleNodeAllowed(e){!(this.optionFlags&8)&&!this.inModule&&this.raise(W.ImportOutsideModule,e)}decoratorsEnabledBeforeExport(){return this.hasPlugin("decorators-legacy")?!0:this.hasPlugin("decorators")&&this.getPluginOption("decorators","decoratorsBeforeExport")!==!1}maybeTakeDecorators(e,t,r){return e&&(t.decorators?.length?(typeof this.getPluginOption("decorators","decoratorsBeforeExport")!="boolean"&&this.raise(W.DecoratorsBeforeAfterExport,t.decorators[0]),t.decorators.unshift(...e)):t.decorators=e,this.resetStartLocationFromNode(t,e[0]),r&&this.resetStartLocationFromNode(r,t)),t}canHaveLeadingDecorator(){return this.match(80)}parseDecorators(e){let t=[];do t.push(this.parseDecorator());while(this.match(26));if(this.match(82))e||this.unexpected(),this.decoratorsEnabledBeforeExport()||this.raise(W.DecoratorExportClass,this.state.startLoc);else if(!this.canHaveLeadingDecorator())throw this.raise(W.UnexpectedLeadingDecorator,this.state.startLoc);return t}parseDecorator(){this.expectOnePlugin(["decorators","decorators-legacy"]);let e=this.startNode();if(this.next(),this.hasPlugin("decorators")){let t=this.state.startLoc,r;if(this.match(10)){let n=this.state.startLoc;this.next(),r=this.parseExpression(),this.expect(11),r=this.wrapParenthesis(n,r);let o=this.state.startLoc;e.expression=this.parseMaybeDecoratorArguments(r,n),this.getPluginOption("decorators","allowCallParenthesized")===!1&&e.expression!==r&&this.raise(W.DecoratorArgumentsOutsideParentheses,o)}else{for(r=this.parseIdentifier(!1);this.eat(16);){let n=this.startNodeAt(t);n.object=r,this.match(139)?(this.classScope.usePrivateName(this.state.value,this.state.startLoc),n.property=this.parsePrivateName()):n.property=this.parseIdentifier(!0),n.computed=!1,r=this.finishNode(n,"MemberExpression")}e.expression=this.parseMaybeDecoratorArguments(r,t)}}else e.expression=this.parseExprSubscripts();return this.finishNode(e,"Decorator")}parseMaybeDecoratorArguments(e,t){if(this.eat(10)){let r=this.startNodeAt(t);return r.callee=e,r.arguments=this.parseCallExpressionArguments(),this.toReferencedList(r.arguments),this.finishNode(r,"CallExpression")}return e}parseBreakContinueStatement(e,t){return this.next(),this.isLineTerminator()?e.label=null:(e.label=this.parseIdentifier(),this.semicolon()),this.verifyBreakContinue(e,t),this.finishNode(e,t?"BreakStatement":"ContinueStatement")}verifyBreakContinue(e,t){let r;for(r=0;rthis.parseStatement()),this.state.labels.pop(),this.expect(92),e.test=this.parseHeaderExpression(),this.eat(13),this.finishNode(e,"DoWhileStatement")}parseForStatement(e){this.next(),this.state.labels.push(Hq);let t=null;if(this.isContextual(96)&&this.recordAwaitIfAllowed()&&(t=this.state.startLoc,this.next()),this.scope.enter(0),this.expect(10),this.match(13))return t!==null&&this.unexpected(t),this.parseFor(e,null);let r=this.isContextual(100);{let s=this.isAwaitUsing(),c=s||this.isForUsing(),p=r&&this.hasFollowingBindingAtom()||c;if(this.match(74)||this.match(75)||p){let d=this.startNode(),f;s?(f="await using",this.recordAwaitIfAllowed()||this.raise(W.AwaitUsingNotInAsyncContext,this.state.startLoc),this.next()):f=this.state.value,this.next(),this.parseVar(d,!0,f);let m=this.finishNode(d,"VariableDeclaration"),y=this.match(58);return y&&c&&this.raise(W.ForInUsing,m),(y||this.isContextual(102))&&m.declarations.length===1?this.parseForIn(e,m,t):(t!==null&&this.unexpected(t),this.parseFor(e,m))}}let n=this.isContextual(95),o=new I3,i=this.parseExpression(!0,o),a=this.isContextual(102);if(a&&(r&&this.raise(W.ForOfLet,i),t===null&&n&&i.type==="Identifier"&&this.raise(W.ForOfAsync,i)),a||this.match(58)){this.checkDestructuringPrivate(o),this.toAssignable(i,!0);let s=a?"ForOfStatement":"ForInStatement";return this.checkLVal(i,{type:s}),this.parseForIn(e,i,t)}else this.checkExpressionErrors(o,!0);return t!==null&&this.unexpected(t),this.parseFor(e,i)}parseFunctionStatement(e,t,r){return this.next(),this.parseFunction(e,1|(r?2:0)|(t?8:0))}parseIfStatement(e){return this.next(),e.test=this.parseHeaderExpression(),e.consequent=this.parseStatementOrSloppyAnnexBFunctionDeclaration(),e.alternate=this.eat(66)?this.parseStatementOrSloppyAnnexBFunctionDeclaration():null,this.finishNode(e,"IfStatement")}parseReturnStatement(e){return this.prodParam.hasReturn||this.raise(W.IllegalReturn,this.state.startLoc),this.next(),this.isLineTerminator()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,"ReturnStatement")}parseSwitchStatement(e){this.next(),e.discriminant=this.parseHeaderExpression();let t=e.cases=[];this.expect(5),this.state.labels.push(VJe),this.scope.enter(256);let r;for(let n;!this.match(8);)if(this.match(61)||this.match(65)){let o=this.match(61);r&&this.finishNode(r,"SwitchCase"),t.push(r=this.startNode()),r.consequent=[],this.next(),o?r.test=this.parseExpression():(n&&this.raise(W.MultipleDefaultsInSwitch,this.state.lastTokStartLoc),n=!0,r.test=null),this.expect(14)}else r?r.consequent.push(this.parseStatementListItem()):this.unexpected();return this.scope.exit(),r&&this.finishNode(r,"SwitchCase"),this.next(),this.state.labels.pop(),this.finishNode(e,"SwitchStatement")}parseThrowStatement(e){return this.next(),this.hasPrecedingLineBreak()&&this.raise(W.NewlineAfterThrow,this.state.lastTokEndLoc),e.argument=this.parseExpression(),this.semicolon(),this.finishNode(e,"ThrowStatement")}parseCatchClauseParam(){let e=this.parseBindingAtom();return this.scope.enter(this.options.annexB&&e.type==="Identifier"?8:0),this.checkLVal(e,{type:"CatchClause"},9),e}parseTryStatement(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.match(62)){let t=this.startNode();this.next(),this.match(10)?(this.expect(10),t.param=this.parseCatchClauseParam(),this.expect(11)):(t.param=null,this.scope.enter(0)),t.body=this.withSmartMixTopicForbiddingContext(()=>this.parseBlock(!1,!1)),this.scope.exit(),e.handler=this.finishNode(t,"CatchClause")}return e.finalizer=this.eat(67)?this.parseBlock():null,!e.handler&&!e.finalizer&&this.raise(W.NoCatchOrFinally,e),this.finishNode(e,"TryStatement")}parseVarStatement(e,t,r=!1){return this.next(),this.parseVar(e,!1,t,r),this.semicolon(),this.finishNode(e,"VariableDeclaration")}parseWhileStatement(e){return this.next(),e.test=this.parseHeaderExpression(),this.state.labels.push(Hq),e.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.state.labels.pop(),this.finishNode(e,"WhileStatement")}parseWithStatement(e){return this.state.strict&&this.raise(W.StrictWith,this.state.startLoc),this.next(),e.object=this.parseHeaderExpression(),e.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.finishNode(e,"WithStatement")}parseEmptyStatement(e){return this.next(),this.finishNode(e,"EmptyStatement")}parseLabeledStatement(e,t,r,n){for(let i of this.state.labels)i.name===t&&this.raise(W.LabelRedeclaration,r,{labelName:t});let o=$ze(this.state.type)?1:this.match(71)?2:null;for(let i=this.state.labels.length-1;i>=0;i--){let a=this.state.labels[i];if(a.statementStart===e.start)a.statementStart=this.sourceToOffsetPos(this.state.start),a.kind=o;else break}return this.state.labels.push({name:t,kind:o,statementStart:this.sourceToOffsetPos(this.state.start)}),e.body=n&8?this.parseStatementOrSloppyAnnexBFunctionDeclaration(!0):this.parseStatement(),this.state.labels.pop(),e.label=r,this.finishNode(e,"LabeledStatement")}parseExpressionStatement(e,t,r){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")}parseBlock(e=!1,t=!0,r){let n=this.startNode();return e&&this.state.strictErrors.clear(),this.expect(5),t&&this.scope.enter(0),this.parseBlockBody(n,e,!1,8,r),t&&this.scope.exit(),this.finishNode(n,"BlockStatement")}isValidDirective(e){return e.type==="ExpressionStatement"&&e.expression.type==="StringLiteral"&&!e.expression.extra.parenthesized}parseBlockBody(e,t,r,n,o){let i=e.body=[],a=e.directives=[];this.parseBlockOrModuleBlockBody(i,t?a:void 0,r,n,o)}parseBlockOrModuleBlockBody(e,t,r,n,o){let i=this.state.strict,a=!1,s=!1;for(;!this.match(n);){let c=r?this.parseModuleItem():this.parseStatementListItem();if(t&&!s){if(this.isValidDirective(c)){let p=this.stmtToDirective(c);t.push(p),!a&&p.value.value==="use strict"&&(a=!0,this.setStrict(!0));continue}s=!0,this.state.strictErrors.clear()}e.push(c)}o?.call(this,a),i||this.setStrict(!1),this.next()}parseFor(e,t){return e.init=t,this.semicolon(!1),e.test=this.match(13)?null:this.parseExpression(),this.semicolon(!1),e.update=this.match(11)?null:this.parseExpression(),this.expect(11),e.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.scope.exit(),this.state.labels.pop(),this.finishNode(e,"ForStatement")}parseForIn(e,t,r){let n=this.match(58);return this.next(),n?r!==null&&this.unexpected(r):e.await=r!==null,t.type==="VariableDeclaration"&&t.declarations[0].init!=null&&(!n||!this.options.annexB||this.state.strict||t.kind!=="var"||t.declarations[0].id.type!=="Identifier")&&this.raise(W.ForInOfLoopInitializer,t,{type:n?"ForInStatement":"ForOfStatement"}),t.type==="AssignmentPattern"&&this.raise(W.InvalidLhs,t,{ancestor:{type:"ForStatement"}}),e.left=t,e.right=n?this.parseExpression():this.parseMaybeAssignAllowIn(),this.expect(11),e.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.scope.exit(),this.state.labels.pop(),this.finishNode(e,n?"ForInStatement":"ForOfStatement")}parseVar(e,t,r,n=!1){let o=e.declarations=[];for(e.kind=r;;){let i=this.startNode();if(this.parseVarId(i,r),i.init=this.eat(29)?t?this.parseMaybeAssignDisallowIn():this.parseMaybeAssignAllowIn():null,i.init===null&&!n&&(i.id.type!=="Identifier"&&!(t&&(this.match(58)||this.isContextual(102)))?this.raise(W.DeclarationMissingInitializer,this.state.lastTokEndLoc,{kind:"destructuring"}):(r==="const"||r==="using"||r==="await using")&&!(this.match(58)||this.isContextual(102))&&this.raise(W.DeclarationMissingInitializer,this.state.lastTokEndLoc,{kind:r})),o.push(this.finishNode(i,"VariableDeclarator")),!this.eat(12))break}return e}parseVarId(e,t){let r=this.parseBindingAtom();t==="using"||t==="await using"?(r.type==="ArrayPattern"||r.type==="ObjectPattern")&&this.raise(W.UsingDeclarationHasBindingPattern,r.loc.start):r.type==="VoidPattern"&&this.raise(W.UnexpectedVoidPattern,r.loc.start),this.checkLVal(r,{type:"VariableDeclarator"},t==="var"?5:8201),e.id=r}parseAsyncFunctionExpression(e){return this.parseFunction(e,8)}parseFunction(e,t=0){let r=t&2,n=!!(t&1),o=n&&!(t&4),i=!!(t&8);this.initFunction(e,i),this.match(55)&&(r&&this.raise(W.GeneratorInSingleStatementContext,this.state.startLoc),this.next(),e.generator=!0),n&&(e.id=this.parseFunctionId(o));let a=this.state.maybeInArrowParameters;return this.state.maybeInArrowParameters=!1,this.scope.enter(514),this.prodParam.enter(A3(i,e.generator)),n||(e.id=this.parseFunctionId()),this.parseFunctionParams(e,!1),this.withSmartMixTopicForbiddingContext(()=>{this.parseFunctionBodyAndFinish(e,n?"FunctionDeclaration":"FunctionExpression")}),this.prodParam.exit(),this.scope.exit(),n&&!r&&this.registerFunctionStatementId(e),this.state.maybeInArrowParameters=a,e}parseFunctionId(e){return e||Qn(this.state.type)?this.parseIdentifier():null}parseFunctionParams(e,t){this.expect(10),this.expressionScope.enter(IJe()),e.params=this.parseBindingList(11,41,2|(t?4:0)),this.expressionScope.exit()}registerFunctionStatementId(e){e.id&&this.scope.declareName(e.id.name,!this.options.annexB||this.state.strict||e.generator||e.async?this.scope.treatFunctionsAsVar?5:8201:17,e.id.loc.start)}parseClass(e,t,r){this.next();let n=this.state.strict;return this.state.strict=!0,this.parseClassId(e,t,r),this.parseClassSuper(e),e.body=this.parseClassBody(!!e.superClass,n),this.finishNode(e,t?"ClassDeclaration":"ClassExpression")}isClassProperty(){return this.match(29)||this.match(13)||this.match(8)}isClassMethod(){return this.match(10)}nameIsConstructor(e){return e.type==="Identifier"&&e.name==="constructor"||e.type==="StringLiteral"&&e.value==="constructor"}isNonstaticConstructor(e){return!e.computed&&!e.static&&this.nameIsConstructor(e.key)}parseClassBody(e,t){this.classScope.enter();let r={hadConstructor:!1,hadSuperClass:e},n=[],o=this.startNode();if(o.body=[],this.expect(5),this.withSmartMixTopicForbiddingContext(()=>{for(;!this.match(8);){if(this.eat(13)){if(n.length>0)throw this.raise(W.DecoratorSemicolon,this.state.lastTokEndLoc);continue}if(this.match(26)){n.push(this.parseDecorator());continue}let i=this.startNode();n.length&&(i.decorators=n,this.resetStartLocationFromNode(i,n[0]),n=[]),this.parseClassMember(o,i,r),i.kind==="constructor"&&i.decorators&&i.decorators.length>0&&this.raise(W.DecoratorConstructor,i)}}),this.state.strict=t,this.next(),n.length)throw this.raise(W.TrailingDecorator,this.state.startLoc);return this.classScope.exit(),this.finishNode(o,"ClassBody")}parseClassMemberFromModifier(e,t){let r=this.parseIdentifier(!0);if(this.isClassMethod()){let n=t;return n.kind="method",n.computed=!1,n.key=r,n.static=!1,this.pushClassMethod(e,n,!1,!1,!1,!1),!0}else if(this.isClassProperty()){let n=t;return n.computed=!1,n.key=r,n.static=!1,e.body.push(this.parseClassProperty(n)),!0}return this.resetPreviousNodeTrailingComments(r),!1}parseClassMember(e,t,r){let n=this.isContextual(106);if(n){if(this.parseClassMemberFromModifier(e,t))return;if(this.eat(5)){this.parseClassStaticBlock(e,t);return}}this.parseClassMemberWithIsStatic(e,t,r,n)}parseClassMemberWithIsStatic(e,t,r,n){let o=t,i=t,a=t,s=t,c=t,p=o,d=o;if(t.static=n,this.parsePropertyNamePrefixOperator(t),this.eat(55)){p.kind="method";let b=this.match(139);if(this.parseClassElementName(p),this.parsePostMemberNameModifiers(p),b){this.pushClassPrivateMethod(e,i,!0,!1);return}this.isNonstaticConstructor(o)&&this.raise(W.ConstructorIsGenerator,o.key),this.pushClassMethod(e,o,!0,!1,!1,!1);return}let f=!this.state.containsEsc&&Qn(this.state.type),m=this.parseClassElementName(t),y=f?m.name:null,g=this.isPrivateName(m),S=this.state.startLoc;if(this.parsePostMemberNameModifiers(d),this.isClassMethod()){if(p.kind="method",g){this.pushClassPrivateMethod(e,i,!1,!1);return}let b=this.isNonstaticConstructor(o),E=!1;b&&(o.kind="constructor",r.hadConstructor&&!this.hasPlugin("typescript")&&this.raise(W.DuplicateConstructor,m),b&&this.hasPlugin("typescript")&&t.override&&this.raise(W.OverrideOnConstructor,m),r.hadConstructor=!0,E=r.hadSuperClass),this.pushClassMethod(e,o,!1,!1,b,E)}else if(this.isClassProperty())g?this.pushClassPrivateProperty(e,s):this.pushClassProperty(e,a);else if(y==="async"&&!this.isLineTerminator()){this.resetPreviousNodeTrailingComments(m);let b=this.eat(55);d.optional&&this.unexpected(S),p.kind="method";let E=this.match(139);this.parseClassElementName(p),this.parsePostMemberNameModifiers(d),E?this.pushClassPrivateMethod(e,i,b,!0):(this.isNonstaticConstructor(o)&&this.raise(W.ConstructorIsAsync,o.key),this.pushClassMethod(e,o,b,!0,!1,!1))}else if((y==="get"||y==="set")&&!(this.match(55)&&this.isLineTerminator())){this.resetPreviousNodeTrailingComments(m),p.kind=y;let b=this.match(139);this.parseClassElementName(o),b?this.pushClassPrivateMethod(e,i,!1,!1):(this.isNonstaticConstructor(o)&&this.raise(W.ConstructorIsAccessor,o.key),this.pushClassMethod(e,o,!1,!1,!1,!1)),this.checkGetterSetterParams(o)}else if(y==="accessor"&&!this.isLineTerminator()){this.expectPlugin("decoratorAutoAccessors"),this.resetPreviousNodeTrailingComments(m);let b=this.match(139);this.parseClassElementName(a),this.pushClassAccessorProperty(e,c,b)}else this.isLineTerminator()?g?this.pushClassPrivateProperty(e,s):this.pushClassProperty(e,a):this.unexpected()}parseClassElementName(e){let{type:t,value:r}=this.state;if((t===132||t===134)&&e.static&&r==="prototype"&&this.raise(W.StaticPrototype,this.state.startLoc),t===139){r==="constructor"&&this.raise(W.ConstructorClassPrivateField,this.state.startLoc);let n=this.parsePrivateName();return e.key=n,n}return this.parsePropertyName(e),e.key}parseClassStaticBlock(e,t){this.scope.enter(720);let r=this.state.labels;this.state.labels=[],this.prodParam.enter(0);let n=t.body=[];this.parseBlockOrModuleBlockBody(n,void 0,!1,8),this.prodParam.exit(),this.scope.exit(),this.state.labels=r,e.body.push(this.finishNode(t,"StaticBlock")),t.decorators?.length&&this.raise(W.DecoratorStaticBlock,t)}pushClassProperty(e,t){!t.computed&&this.nameIsConstructor(t.key)&&this.raise(W.ConstructorClassField,t.key),e.body.push(this.parseClassProperty(t))}pushClassPrivateProperty(e,t){let r=this.parseClassPrivateProperty(t);e.body.push(r),this.classScope.declarePrivateName(this.getPrivateNameSV(r.key),0,r.key.loc.start)}pushClassAccessorProperty(e,t,r){!r&&!t.computed&&this.nameIsConstructor(t.key)&&this.raise(W.ConstructorClassField,t.key);let n=this.parseClassAccessorProperty(t);e.body.push(n),r&&this.classScope.declarePrivateName(this.getPrivateNameSV(n.key),0,n.key.loc.start)}pushClassMethod(e,t,r,n,o,i){e.body.push(this.parseMethod(t,r,n,o,i,"ClassMethod",!0))}pushClassPrivateMethod(e,t,r,n){let o=this.parseMethod(t,r,n,!1,!1,"ClassPrivateMethod",!0);e.body.push(o);let i=o.kind==="get"?o.static?6:2:o.kind==="set"?o.static?5:1:0;this.declareClassPrivateMethodInScope(o,i)}declareClassPrivateMethodInScope(e,t){this.classScope.declarePrivateName(this.getPrivateNameSV(e.key),t,e.key.loc.start)}parsePostMemberNameModifiers(e){}parseClassPrivateProperty(e){return this.parseInitializer(e),this.semicolon(),this.finishNode(e,"ClassPrivateProperty")}parseClassProperty(e){return this.parseInitializer(e),this.semicolon(),this.finishNode(e,"ClassProperty")}parseClassAccessorProperty(e){return this.parseInitializer(e),this.semicolon(),this.finishNode(e,"ClassAccessorProperty")}parseInitializer(e){this.scope.enter(592),this.expressionScope.enter(Ipe()),this.prodParam.enter(0),e.value=this.eat(29)?this.parseMaybeAssignAllowIn():null,this.expressionScope.exit(),this.prodParam.exit(),this.scope.exit()}parseClassId(e,t,r,n=8331){if(Qn(this.state.type))e.id=this.parseIdentifier(),t&&this.declareNameFromIdentifier(e.id,n);else if(r||!t)e.id=null;else throw this.raise(W.MissingClassName,this.state.startLoc)}parseClassSuper(e){e.superClass=this.eat(81)?this.parseExprSubscripts():null}parseExport(e,t){let r=this.parseMaybeImportPhase(e,!0),n=this.maybeParseExportDefaultSpecifier(e,r),o=!n||this.eat(12),i=o&&this.eatExportStar(e),a=i&&this.maybeParseExportNamespaceSpecifier(e),s=o&&(!a||this.eat(12)),c=n||i;if(i&&!a){if(n&&this.unexpected(),t)throw this.raise(W.UnsupportedDecoratorExport,e);return this.parseExportFrom(e,!0),this.sawUnambiguousESM=!0,this.finishNode(e,"ExportAllDeclaration")}let p=this.maybeParseExportNamedSpecifiers(e);n&&o&&!i&&!p&&this.unexpected(null,5),a&&s&&this.unexpected(null,98);let d;if(c||p){if(d=!1,t)throw this.raise(W.UnsupportedDecoratorExport,e);this.parseExportFrom(e,c)}else d=this.maybeParseExportDeclaration(e);if(c||p||d){let f=e;if(this.checkExport(f,!0,!1,!!f.source),f.declaration?.type==="ClassDeclaration")this.maybeTakeDecorators(t,f.declaration,f);else if(t)throw this.raise(W.UnsupportedDecoratorExport,e);return this.sawUnambiguousESM=!0,this.finishNode(f,"ExportNamedDeclaration")}if(this.eat(65)){let f=e,m=this.parseExportDefaultExpression();if(f.declaration=m,m.type==="ClassDeclaration")this.maybeTakeDecorators(t,m,f);else if(t)throw this.raise(W.UnsupportedDecoratorExport,e);return this.checkExport(f,!0,!0),this.sawUnambiguousESM=!0,this.finishNode(f,"ExportDefaultDeclaration")}throw this.unexpected(null,5)}eatExportStar(e){return this.eat(55)}maybeParseExportDefaultSpecifier(e,t){if(t||this.isExportDefaultSpecifier()){this.expectPlugin("exportDefaultFrom",t?.loc.start);let r=t||this.parseIdentifier(!0),n=this.startNodeAtNode(r);return n.exported=r,e.specifiers=[this.finishNode(n,"ExportDefaultSpecifier")],!0}return!1}maybeParseExportNamespaceSpecifier(e){if(this.isContextual(93)){e.specifiers??(e.specifiers=[]);let t=this.startNodeAt(this.state.lastTokStartLoc);return this.next(),t.exported=this.parseModuleExportName(),e.specifiers.push(this.finishNode(t,"ExportNamespaceSpecifier")),!0}return!1}maybeParseExportNamedSpecifiers(e){if(this.match(5)){let t=e;t.specifiers||(t.specifiers=[]);let r=t.exportKind==="type";return t.specifiers.push(...this.parseExportSpecifiers(r)),t.source=null,t.attributes=[],t.declaration=null,!0}return!1}maybeParseExportDeclaration(e){return this.shouldParseExportDeclaration()?(e.specifiers=[],e.source=null,e.attributes=[],e.declaration=this.parseExportDeclaration(e),!0):!1}isAsyncFunction(){if(!this.isContextual(95))return!1;let e=this.nextTokenInLineStart();return this.isUnparsedContextual(e,"function")}parseExportDefaultExpression(){let e=this.startNode();if(this.match(68))return this.next(),this.parseFunction(e,5);if(this.isAsyncFunction())return this.next(),this.next(),this.parseFunction(e,13);if(this.match(80))return this.parseClass(e,!0,!0);if(this.match(26))return this.hasPlugin("decorators")&&this.getPluginOption("decorators","decoratorsBeforeExport")===!0&&this.raise(W.DecoratorBeforeExport,this.state.startLoc),this.parseClass(this.maybeTakeDecorators(this.parseDecorators(!1),this.startNode()),!0,!0);if(this.match(75)||this.match(74)||this.isLet()||this.isUsing()||this.isAwaitUsing())throw this.raise(W.UnsupportedDefaultExport,this.state.startLoc);let t=this.parseMaybeAssignAllowIn();return this.semicolon(),t}parseExportDeclaration(e){return this.match(80)?this.parseClass(this.startNode(),!0,!1):this.parseStatementListItem()}isExportDefaultSpecifier(){let{type:e}=this.state;if(Qn(e)){if(e===95&&!this.state.containsEsc||e===100)return!1;if((e===130||e===129)&&!this.state.containsEsc){let n=this.nextTokenStart(),o=this.input.charCodeAt(n);if(o===123||this.chStartsBindingIdentifier(o,n)&&!this.input.startsWith("from",n))return this.expectOnePlugin(["flow","typescript"]),!1}}else if(!this.match(65))return!1;let t=this.nextTokenStart(),r=this.isUnparsedContextual(t,"from");if(this.input.charCodeAt(t)===44||Qn(this.state.type)&&r)return!0;if(this.match(65)&&r){let n=this.input.charCodeAt(this.nextTokenStartSince(t+4));return n===34||n===39}return!1}parseExportFrom(e,t){this.eatContextual(98)?(e.source=this.parseImportSource(),this.checkExport(e),this.maybeParseImportAttributes(e),this.checkJSONModuleImport(e)):t&&this.unexpected(),this.semicolon()}shouldParseExportDeclaration(){let{type:e}=this.state;return e===26&&(this.expectOnePlugin(["decorators","decorators-legacy"]),this.hasPlugin("decorators"))?(this.getPluginOption("decorators","decoratorsBeforeExport")===!0&&this.raise(W.DecoratorBeforeExport,this.state.startLoc),!0):this.isUsing()?(this.raise(W.UsingDeclarationExport,this.state.startLoc),!0):this.isAwaitUsing()?(this.raise(W.UsingDeclarationExport,this.state.startLoc),!0):e===74||e===75||e===68||e===80||this.isLet()||this.isAsyncFunction()}checkExport(e,t,r,n){if(t){if(r){if(this.checkDuplicateExports(e,"default"),this.hasPlugin("exportDefaultFrom")){let o=e.declaration;o.type==="Identifier"&&o.name==="from"&&o.end-o.start===4&&!o.extra?.parenthesized&&this.raise(W.ExportDefaultFromAsIdentifier,o)}}else if(e.specifiers?.length)for(let o of e.specifiers){let{exported:i}=o,a=i.type==="Identifier"?i.name:i.value;if(this.checkDuplicateExports(o,a),!n&&o.local){let{local:s}=o;s.type!=="Identifier"?this.raise(W.ExportBindingIsString,o,{localName:s.value,exportName:a}):(this.checkReservedWord(s.name,s.loc.start,!0,!1),this.scope.checkLocalExport(s))}}else if(e.declaration){let o=e.declaration;if(o.type==="FunctionDeclaration"||o.type==="ClassDeclaration"){let{id:i}=o;if(!i)throw new Error("Assertion failure");this.checkDuplicateExports(e,i.name)}else if(o.type==="VariableDeclaration")for(let i of o.declarations)this.checkDeclaration(i.id)}}}checkDeclaration(e){if(e.type==="Identifier")this.checkDuplicateExports(e,e.name);else if(e.type==="ObjectPattern")for(let t of e.properties)this.checkDeclaration(t);else if(e.type==="ArrayPattern")for(let t of e.elements)t&&this.checkDeclaration(t);else e.type==="ObjectProperty"?this.checkDeclaration(e.value):e.type==="RestElement"?this.checkDeclaration(e.argument):e.type==="AssignmentPattern"&&this.checkDeclaration(e.left)}checkDuplicateExports(e,t){this.exportedIdentifiers.has(t)&&(t==="default"?this.raise(W.DuplicateDefaultExport,e):this.raise(W.DuplicateExport,e,{exportName:t})),this.exportedIdentifiers.add(t)}parseExportSpecifiers(e){let t=[],r=!0;for(this.expect(5);!this.eat(8);){if(r)r=!1;else if(this.expect(12),this.eat(8))break;let n=this.isContextual(130),o=this.match(134),i=this.startNode();i.local=this.parseModuleExportName(),t.push(this.parseExportSpecifier(i,o,e,n))}return t}parseExportSpecifier(e,t,r,n){return this.eatContextual(93)?e.exported=this.parseModuleExportName():t?e.exported=this.cloneStringLiteral(e.local):e.exported||(e.exported=this.cloneIdentifier(e.local)),this.finishNode(e,"ExportSpecifier")}parseModuleExportName(){if(this.match(134)){let e=this.parseStringLiteral(this.state.value),t=KJe.exec(e.value);return t&&this.raise(W.ModuleExportNameHasLoneSurrogate,e,{surrogateCharCode:t[0].charCodeAt(0)}),e}return this.parseIdentifier(!0)}isJSONModuleImport(e){return e.assertions!=null?e.assertions.some(({key:t,value:r})=>r.value==="json"&&(t.type==="Identifier"?t.name==="type":t.value==="type")):!1}checkImportReflection(e){let{specifiers:t}=e,r=t.length===1?t[0].type:null;e.phase==="source"?r!=="ImportDefaultSpecifier"&&this.raise(W.SourcePhaseImportRequiresDefault,t[0].loc.start):e.phase==="defer"?r!=="ImportNamespaceSpecifier"&&this.raise(W.DeferImportRequiresNamespace,t[0].loc.start):e.module&&(r!=="ImportDefaultSpecifier"&&this.raise(W.ImportReflectionNotBinding,t[0].loc.start),e.assertions?.length>0&&this.raise(W.ImportReflectionHasAssertion,t[0].loc.start))}checkJSONModuleImport(e){if(this.isJSONModuleImport(e)&&e.type!=="ExportAllDeclaration"){let{specifiers:t}=e;if(t!=null){let r=t.find(n=>{let o;if(n.type==="ExportSpecifier"?o=n.local:n.type==="ImportSpecifier"&&(o=n.imported),o!==void 0)return o.type==="Identifier"?o.name!=="default":o.value!=="default"});r!==void 0&&this.raise(W.ImportJSONBindingNotDefault,r.loc.start)}}}isPotentialImportPhase(e){return e?!1:this.isContextual(105)||this.isContextual(97)}applyImportPhase(e,t,r,n){t||(this.hasPlugin("importReflection")&&(e.module=!1),r==="source"?(this.expectPlugin("sourcePhaseImports",n),e.phase="source"):r==="defer"?(this.expectPlugin("deferredImportEvaluation",n),e.phase="defer"):this.hasPlugin("sourcePhaseImports")&&(e.phase=null))}parseMaybeImportPhase(e,t){if(!this.isPotentialImportPhase(t))return this.applyImportPhase(e,t,null),null;let r=this.startNode(),n=this.parseIdentifierName(!0),{type:o}=this.state;return(Ou(o)?o!==98||this.lookaheadCharCode()===102:o!==12)?(this.applyImportPhase(e,t,n,r.loc.start),null):(this.applyImportPhase(e,t,null),this.createIdentifier(r,n))}isPrecedingIdImportPhase(e){let{type:t}=this.state;return Qn(t)?t!==98||this.lookaheadCharCode()===102:t!==12}parseImport(e){return this.match(134)?this.parseImportSourceAndAttributes(e):this.parseImportSpecifiersAndAfter(e,this.parseMaybeImportPhase(e,!1))}parseImportSpecifiersAndAfter(e,t){e.specifiers=[];let r=!this.maybeParseDefaultImportSpecifier(e,t)||this.eat(12),n=r&&this.maybeParseStarImportSpecifier(e);return r&&!n&&this.parseNamedImportSpecifiers(e),this.expectContextual(98),this.parseImportSourceAndAttributes(e)}parseImportSourceAndAttributes(e){return e.specifiers??(e.specifiers=[]),e.source=this.parseImportSource(),this.maybeParseImportAttributes(e),this.checkImportReflection(e),this.checkJSONModuleImport(e),this.semicolon(),this.sawUnambiguousESM=!0,this.finishNode(e,"ImportDeclaration")}parseImportSource(){return this.match(134)||this.unexpected(),this.parseExprAtom()}parseImportSpecifierLocal(e,t,r){t.local=this.parseIdentifier(),e.specifiers.push(this.finishImportSpecifier(t,r))}finishImportSpecifier(e,t,r=8201){return this.checkLVal(e.local,{type:t},r),this.finishNode(e,t)}parseImportAttributes(){this.expect(5);let e=[],t=new Set;do{if(this.match(8))break;let r=this.startNode(),n=this.state.value;if(t.has(n)&&this.raise(W.ModuleAttributesWithDuplicateKeys,this.state.startLoc,{key:n}),t.add(n),this.match(134)?r.key=this.parseStringLiteral(n):r.key=this.parseIdentifier(!0),this.expect(14),!this.match(134))throw this.raise(W.ModuleAttributeInvalidValue,this.state.startLoc);r.value=this.parseStringLiteral(this.state.value),e.push(this.finishNode(r,"ImportAttribute"))}while(this.eat(12));return this.expect(8),e}parseModuleAttributes(){let e=[],t=new Set;do{let r=this.startNode();if(r.key=this.parseIdentifier(!0),r.key.name!=="type"&&this.raise(W.ModuleAttributeDifferentFromType,r.key),t.has(r.key.name)&&this.raise(W.ModuleAttributesWithDuplicateKeys,r.key,{key:r.key.name}),t.add(r.key.name),this.expect(14),!this.match(134))throw this.raise(W.ModuleAttributeInvalidValue,this.state.startLoc);r.value=this.parseStringLiteral(this.state.value),e.push(this.finishNode(r,"ImportAttribute"))}while(this.eat(12));return e}maybeParseImportAttributes(e){let t;if(this.match(76)){if(this.hasPrecedingLineBreak()&&this.lookaheadCharCode()===40)return;this.next(),t=this.parseImportAttributes()}else this.isContextual(94)&&!this.hasPrecedingLineBreak()?(this.hasPlugin("deprecatedImportAssert")||this.raise(W.ImportAttributesUseAssert,this.state.startLoc),this.addExtra(e,"deprecatedAssertSyntax",!0),this.next(),t=this.parseImportAttributes()):t=[];e.attributes=t}maybeParseDefaultImportSpecifier(e,t){if(t){let r=this.startNodeAtNode(t);return r.local=t,e.specifiers.push(this.finishImportSpecifier(r,"ImportDefaultSpecifier")),!0}else if(Ou(this.state.type))return this.parseImportSpecifierLocal(e,this.startNode(),"ImportDefaultSpecifier"),!0;return!1}maybeParseStarImportSpecifier(e){if(this.match(55)){let t=this.startNode();return this.next(),this.expectContextual(93),this.parseImportSpecifierLocal(e,t,"ImportNamespaceSpecifier"),!0}return!1}parseNamedImportSpecifiers(e){let t=!0;for(this.expect(5);!this.eat(8);){if(t)t=!1;else{if(this.eat(14))throw this.raise(W.DestructureNamedImport,this.state.startLoc);if(this.expect(12),this.eat(8))break}let r=this.startNode(),n=this.match(134),o=this.isContextual(130);r.imported=this.parseModuleExportName();let i=this.parseImportSpecifier(r,n,e.importKind==="type"||e.importKind==="typeof",o,void 0);e.specifiers.push(i)}}parseImportSpecifier(e,t,r,n,o){if(this.eatContextual(93))e.local=this.parseIdentifier();else{let{imported:i}=e;if(t)throw this.raise(W.ImportBindingIsString,e,{importName:i.value});this.checkReservedWord(i.name,e.loc.start,!0,!0),e.local||(e.local=this.cloneIdentifier(i))}return this.finishImportSpecifier(e,"ImportSpecifier",o)}isThisParam(e){return e.type==="Identifier"&&e.name==="this"}},Ppe=class extends HJe{constructor(e,t,r){let n=kze(e);super(n,t),this.options=n,this.initializeScopes(),this.plugins=r,this.filename=n.sourceFilename,this.startIndex=n.startIndex;let o=0;n.allowAwaitOutsideFunction&&(o|=1),n.allowReturnOutsideFunction&&(o|=2),n.allowImportExportEverywhere&&(o|=8),n.allowSuperOutsideMethod&&(o|=16),n.allowUndeclaredExports&&(o|=64),n.allowNewTargetOutsideFunction&&(o|=4),n.allowYieldOutsideFunction&&(o|=32),n.ranges&&(o|=128),n.tokens&&(o|=256),n.createImportExpressions&&(o|=512),n.createParenthesizedExpressions&&(o|=1024),n.errorRecovery&&(o|=2048),n.attachComment&&(o|=4096),n.annexB&&(o|=8192),this.optionFlags=o}getScopeHandler(){return gU}parse(){this.enterInitialScopes();let e=this.startNode(),t=this.startNode();this.nextToken(),e.errors=null;let r=this.parseTopLevel(e,t);return r.errors=this.state.errors,r.comments.length=this.state.commentsLen,r}};function Ope(e,t){if(t?.sourceType==="unambiguous"){t=Object.assign({},t);try{t.sourceType="module";let r=sD(t,e),n=r.parse();if(r.sawUnambiguousESM)return n;if(r.ambiguousScriptDifferentAst)try{return t.sourceType="script",sD(t,e).parse()}catch{}else n.program.sourceType="script";return n}catch(r){try{return t.sourceType="script",sD(t,e).parse()}catch{}throw r}}else return sD(t,e).parse()}function Npe(e,t){let r=sD(t,e);return r.options.strictMode&&(r.state.strict=!0),r.getExpression()}function ZJe(e){let t={};for(let r of Object.keys(e))t[r]=mpe(e[r]);return t}var h7t=ZJe(Nze);function sD(e,t){let r=Ppe,n=new Map;if(e?.plugins){for(let o of e.plugins){let i,a;typeof o=="string"?i=o:[i,a]=o,n.has(i)||n.set(i,a||{})}UJe(n),r=WJe(n)}return new r(e,t,n)}var epe=new Map;function WJe(e){let t=[];for(let o of zJe)e.has(o)&&t.push(o);let r=t.join("|"),n=epe.get(r);if(!n){n=Ppe;for(let o of t)n=Cpe[o](n);epe.set(r,n)}return n}function P3(e){return(t,r,n)=>{let o=!!n?.backwards;if(r===!1)return!1;let{length:i}=t,a=r;for(;a>=0&&ae===` +`||e==="\r"||e==="\u2028"||e==="\u2029";function tVe(e,t,r){let n=!!r?.backwards;if(t===!1)return!1;let o=e.charAt(t);if(n){if(e.charAt(t-1)==="\r"&&o===` +`)return t-2;if(tpe(o))return t-1}else{if(o==="\r"&&e.charAt(t+1)===` +`)return t+2;if(tpe(o))return t+1}return t}var rVe=tVe;function nVe(e,t){return t===!1?!1:e.charAt(t)==="/"&&e.charAt(t+1)==="/"?XJe(e,t):t}var oVe=nVe;function iVe(e,t){let r=null,n=t;for(;n!==r;)r=n,n=QJe(e,n),n=eVe(e,n),n=oVe(e,n),n=rVe(e,n);return n}var aVe=iVe;function sVe(e){let t=[];for(let r of e)try{return r()}catch(n){t.push(n)}throw Object.assign(new Error("All combinations failed"),{errors:t})}function cVe(e){if(!e.startsWith("#!"))return"";let t=e.indexOf(` +`);return t===-1?e:e.slice(0,t)}var Fpe=cVe,SU=(e,t)=>(r,n,...o)=>r|1&&n==null?void 0:(t.call(n)??n[e]).apply(n,o),lVe=Array.prototype.findLast??function(e){for(let t=this.length-1;t>=0;t--){let r=this[t];if(e(r,t,this))return r}},uVe=SU("findLast",function(){if(Array.isArray(this))return lVe}),pVe=uVe;function dVe(e){return this[e<0?this.length+e:e]}var _Ve=SU("at",function(){if(Array.isArray(this)||typeof this=="string")return dVe}),fVe=_Ve;function q_(e){let t=e.range?.[0]??e.start,r=(e.declaration?.decorators??e.decorators)?.[0];return r?Math.min(q_(r),t):t}function td(e){return e.range?.[1]??e.end}function mVe(e){let t=new Set(e);return r=>t.has(r?.type)}var vU=mVe,hVe=vU(["Block","CommentBlock","MultiLine"]),bU=hVe,yVe=vU(["Line","CommentLine","SingleLine","HashbangComment","HTMLOpen","HTMLClose","Hashbang","InterpreterDirective"]),gVe=yVe,Wq=new WeakMap;function SVe(e){return Wq.has(e)||Wq.set(e,bU(e)&&e.value[0]==="*"&&/@(?:type|satisfies)\b/u.test(e.value)),Wq.get(e)}var vVe=SVe;function bVe(e){if(!bU(e))return!1;let t=`*${e.value}*`.split(` +`);return t.length>1&&t.every(r=>r.trimStart()[0]==="*")}var Qq=new WeakMap;function xVe(e){return Qq.has(e)||Qq.set(e,bVe(e)),Qq.get(e)}var rpe=xVe;function EVe(e){if(e.length<2)return;let t;for(let r=e.length-1;r>=0;r--){let n=e[r];if(t&&td(n)===q_(t)&&rpe(n)&&rpe(t)&&(e.splice(r+1,1),n.value+="*//*"+t.value,n.range=[q_(n),td(t)]),!gVe(n)&&!bU(n))throw new TypeError(`Unknown comment type: "${n.type}".`);t=n}}var TVe=EVe;function DVe(e){return e!==null&&typeof e=="object"}var AVe=DVe,iD=null;function lD(e){if(iD!==null&&typeof iD.property){let t=iD;return iD=lD.prototype=null,t}return iD=lD.prototype=e??Object.create(null),new lD}var IVe=10;for(let e=0;e<=IVe;e++)lD();function wVe(e){return lD(e)}function kVe(e,t="type"){wVe(e);function r(n){let o=n[t],i=e[o];if(!Array.isArray(i))throw Object.assign(new Error(`Missing visitor keys for '${o}'.`),{node:n});return i}return r}var CVe=kVe,z=[["decorators","key","typeAnnotation","value"],[],["elementType"],["expression"],["expression","typeAnnotation"],["left","right"],["argument"],["directives","body"],["label"],["callee","typeArguments","arguments"],["body"],["decorators","id","typeParameters","superClass","superTypeArguments","mixins","implements","body","superTypeParameters"],["id","typeParameters"],["decorators","key","typeParameters","params","returnType","body"],["decorators","variance","key","typeAnnotation","value"],["name","typeAnnotation"],["test","consequent","alternate"],["checkType","extendsType","trueType","falseType"],["value"],["id","body"],["declaration","specifiers","source","attributes"],["id"],["id","typeParameters","extends","body"],["typeAnnotation"],["id","typeParameters","right"],["body","test"],["members"],["id","init"],["exported"],["left","right","body"],["id","typeParameters","params","predicate","returnType","body"],["id","params","body","typeParameters","returnType"],["key","value"],["local"],["objectType","indexType"],["typeParameter"],["types"],["node"],["object","property"],["argument","cases"],["pattern","body","guard"],["literal"],["decorators","key","value"],["expressions"],["qualification","id"],["decorators","key","typeAnnotation"],["typeParameters","params","returnType"],["expression","typeArguments"],["params"],["parameterName","typeAnnotation"]],PVe={AccessorProperty:z[0],AnyTypeAnnotation:z[1],ArgumentPlaceholder:z[1],ArrayExpression:["elements"],ArrayPattern:["elements","typeAnnotation","decorators"],ArrayTypeAnnotation:z[2],ArrowFunctionExpression:["typeParameters","params","predicate","returnType","body"],AsConstExpression:z[3],AsExpression:z[4],AssignmentExpression:z[5],AssignmentPattern:["left","right","decorators","typeAnnotation"],AwaitExpression:z[6],BigIntLiteral:z[1],BigIntLiteralTypeAnnotation:z[1],BigIntTypeAnnotation:z[1],BinaryExpression:z[5],BindExpression:["object","callee"],BlockStatement:z[7],BooleanLiteral:z[1],BooleanLiteralTypeAnnotation:z[1],BooleanTypeAnnotation:z[1],BreakStatement:z[8],CallExpression:z[9],CatchClause:["param","body"],ChainExpression:z[3],ClassAccessorProperty:z[0],ClassBody:z[10],ClassDeclaration:z[11],ClassExpression:z[11],ClassImplements:z[12],ClassMethod:z[13],ClassPrivateMethod:z[13],ClassPrivateProperty:z[14],ClassProperty:z[14],ComponentDeclaration:["id","params","body","typeParameters","rendersType"],ComponentParameter:["name","local"],ComponentTypeAnnotation:["params","rest","typeParameters","rendersType"],ComponentTypeParameter:z[15],ConditionalExpression:z[16],ConditionalTypeAnnotation:z[17],ContinueStatement:z[8],DebuggerStatement:z[1],DeclareClass:["id","typeParameters","extends","mixins","implements","body"],DeclareComponent:["id","params","rest","typeParameters","rendersType"],DeclaredPredicate:z[18],DeclareEnum:z[19],DeclareExportAllDeclaration:["source","attributes"],DeclareExportDeclaration:z[20],DeclareFunction:["id","predicate"],DeclareHook:z[21],DeclareInterface:z[22],DeclareModule:z[19],DeclareModuleExports:z[23],DeclareNamespace:z[19],DeclareOpaqueType:["id","typeParameters","supertype","lowerBound","upperBound"],DeclareTypeAlias:z[24],DeclareVariable:z[21],Decorator:z[3],Directive:z[18],DirectiveLiteral:z[1],DoExpression:z[10],DoWhileStatement:z[25],EmptyStatement:z[1],EmptyTypeAnnotation:z[1],EnumBigIntBody:z[26],EnumBigIntMember:z[27],EnumBooleanBody:z[26],EnumBooleanMember:z[27],EnumDeclaration:z[19],EnumDefaultedMember:z[21],EnumNumberBody:z[26],EnumNumberMember:z[27],EnumStringBody:z[26],EnumStringMember:z[27],EnumSymbolBody:z[26],ExistsTypeAnnotation:z[1],ExperimentalRestProperty:z[6],ExperimentalSpreadProperty:z[6],ExportAllDeclaration:["source","attributes","exported"],ExportDefaultDeclaration:["declaration"],ExportDefaultSpecifier:z[28],ExportNamedDeclaration:z[20],ExportNamespaceSpecifier:z[28],ExportSpecifier:["local","exported"],ExpressionStatement:z[3],File:["program"],ForInStatement:z[29],ForOfStatement:z[29],ForStatement:["init","test","update","body"],FunctionDeclaration:z[30],FunctionExpression:z[30],FunctionTypeAnnotation:["typeParameters","this","params","rest","returnType"],FunctionTypeParam:z[15],GenericTypeAnnotation:z[12],HookDeclaration:z[31],HookTypeAnnotation:["params","returnType","rest","typeParameters"],Identifier:["typeAnnotation","decorators"],IfStatement:z[16],ImportAttribute:z[32],ImportDeclaration:["specifiers","source","attributes"],ImportDefaultSpecifier:z[33],ImportExpression:["source","options"],ImportNamespaceSpecifier:z[33],ImportSpecifier:["imported","local"],IndexedAccessType:z[34],InferredPredicate:z[1],InferTypeAnnotation:z[35],InterfaceDeclaration:z[22],InterfaceExtends:z[12],InterfaceTypeAnnotation:["extends","body"],InterpreterDirective:z[1],IntersectionTypeAnnotation:z[36],JsExpressionRoot:z[37],JsonRoot:z[37],JSXAttribute:["name","value"],JSXClosingElement:["name"],JSXClosingFragment:z[1],JSXElement:["openingElement","children","closingElement"],JSXEmptyExpression:z[1],JSXExpressionContainer:z[3],JSXFragment:["openingFragment","children","closingFragment"],JSXIdentifier:z[1],JSXMemberExpression:z[38],JSXNamespacedName:["namespace","name"],JSXOpeningElement:["name","typeArguments","attributes"],JSXOpeningFragment:z[1],JSXSpreadAttribute:z[6],JSXSpreadChild:z[3],JSXText:z[1],KeyofTypeAnnotation:z[6],LabeledStatement:["label","body"],Literal:z[1],LogicalExpression:z[5],MatchArrayPattern:["elements","rest"],MatchAsPattern:["pattern","target"],MatchBindingPattern:z[21],MatchExpression:z[39],MatchExpressionCase:z[40],MatchIdentifierPattern:z[21],MatchLiteralPattern:z[41],MatchMemberPattern:["base","property"],MatchObjectPattern:["properties","rest"],MatchObjectPatternProperty:["key","pattern"],MatchOrPattern:["patterns"],MatchRestPattern:z[6],MatchStatement:z[39],MatchStatementCase:z[40],MatchUnaryPattern:z[6],MatchWildcardPattern:z[1],MemberExpression:z[38],MetaProperty:["meta","property"],MethodDefinition:z[42],MixedTypeAnnotation:z[1],ModuleExpression:z[10],NeverTypeAnnotation:z[1],NewExpression:z[9],NGChainedExpression:z[43],NGEmptyExpression:z[1],NGMicrosyntax:z[10],NGMicrosyntaxAs:["key","alias"],NGMicrosyntaxExpression:["expression","alias"],NGMicrosyntaxKey:z[1],NGMicrosyntaxKeyedExpression:["key","expression"],NGMicrosyntaxLet:z[32],NGPipeExpression:["left","right","arguments"],NGRoot:z[37],NullableTypeAnnotation:z[23],NullLiteral:z[1],NullLiteralTypeAnnotation:z[1],NumberLiteralTypeAnnotation:z[1],NumberTypeAnnotation:z[1],NumericLiteral:z[1],ObjectExpression:["properties"],ObjectMethod:z[13],ObjectPattern:["decorators","properties","typeAnnotation"],ObjectProperty:z[42],ObjectTypeAnnotation:["properties","indexers","callProperties","internalSlots"],ObjectTypeCallProperty:z[18],ObjectTypeIndexer:["variance","id","key","value"],ObjectTypeInternalSlot:["id","value"],ObjectTypeMappedTypeProperty:["keyTparam","propType","sourceType","variance"],ObjectTypeProperty:["key","value","variance"],ObjectTypeSpreadProperty:z[6],OpaqueType:["id","typeParameters","supertype","impltype","lowerBound","upperBound"],OptionalCallExpression:z[9],OptionalIndexedAccessType:z[34],OptionalMemberExpression:z[38],ParenthesizedExpression:z[3],PipelineBareFunction:["callee"],PipelinePrimaryTopicReference:z[1],PipelineTopicExpression:z[3],Placeholder:z[1],PrivateIdentifier:z[1],PrivateName:z[21],Program:z[7],Property:z[32],PropertyDefinition:z[14],QualifiedTypeIdentifier:z[44],QualifiedTypeofIdentifier:z[44],RegExpLiteral:z[1],RestElement:["argument","typeAnnotation","decorators"],ReturnStatement:z[6],SatisfiesExpression:z[4],SequenceExpression:z[43],SpreadElement:z[6],StaticBlock:z[10],StringLiteral:z[1],StringLiteralTypeAnnotation:z[1],StringTypeAnnotation:z[1],Super:z[1],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],SymbolTypeAnnotation:z[1],TaggedTemplateExpression:["tag","typeArguments","quasi"],TemplateElement:z[1],TemplateLiteral:["quasis","expressions"],ThisExpression:z[1],ThisTypeAnnotation:z[1],ThrowStatement:z[6],TopicReference:z[1],TryStatement:["block","handler","finalizer"],TSAbstractAccessorProperty:z[45],TSAbstractKeyword:z[1],TSAbstractMethodDefinition:z[32],TSAbstractPropertyDefinition:z[45],TSAnyKeyword:z[1],TSArrayType:z[2],TSAsExpression:z[4],TSAsyncKeyword:z[1],TSBigIntKeyword:z[1],TSBooleanKeyword:z[1],TSCallSignatureDeclaration:z[46],TSClassImplements:z[47],TSConditionalType:z[17],TSConstructorType:z[46],TSConstructSignatureDeclaration:z[46],TSDeclareFunction:z[31],TSDeclareKeyword:z[1],TSDeclareMethod:["decorators","key","typeParameters","params","returnType"],TSEmptyBodyFunctionExpression:["id","typeParameters","params","returnType"],TSEnumBody:z[26],TSEnumDeclaration:z[19],TSEnumMember:["id","initializer"],TSExportAssignment:z[3],TSExportKeyword:z[1],TSExternalModuleReference:z[3],TSFunctionType:z[46],TSImportEqualsDeclaration:["id","moduleReference"],TSImportType:["options","qualifier","typeArguments","source"],TSIndexedAccessType:z[34],TSIndexSignature:["parameters","typeAnnotation"],TSInferType:z[35],TSInstantiationExpression:z[47],TSInterfaceBody:z[10],TSInterfaceDeclaration:z[22],TSInterfaceHeritage:z[47],TSIntersectionType:z[36],TSIntrinsicKeyword:z[1],TSJSDocAllType:z[1],TSJSDocNonNullableType:z[23],TSJSDocNullableType:z[23],TSJSDocUnknownType:z[1],TSLiteralType:z[41],TSMappedType:["key","constraint","nameType","typeAnnotation"],TSMethodSignature:["key","typeParameters","params","returnType"],TSModuleBlock:z[10],TSModuleDeclaration:z[19],TSNamedTupleMember:["label","elementType"],TSNamespaceExportDeclaration:z[21],TSNeverKeyword:z[1],TSNonNullExpression:z[3],TSNullKeyword:z[1],TSNumberKeyword:z[1],TSObjectKeyword:z[1],TSOptionalType:z[23],TSParameterProperty:["parameter","decorators"],TSParenthesizedType:z[23],TSPrivateKeyword:z[1],TSPropertySignature:["key","typeAnnotation"],TSProtectedKeyword:z[1],TSPublicKeyword:z[1],TSQualifiedName:z[5],TSReadonlyKeyword:z[1],TSRestType:z[23],TSSatisfiesExpression:z[4],TSStaticKeyword:z[1],TSStringKeyword:z[1],TSSymbolKeyword:z[1],TSTemplateLiteralType:["quasis","types"],TSThisType:z[1],TSTupleType:["elementTypes"],TSTypeAliasDeclaration:["id","typeParameters","typeAnnotation"],TSTypeAnnotation:z[23],TSTypeAssertion:z[4],TSTypeLiteral:z[26],TSTypeOperator:z[23],TSTypeParameter:["name","constraint","default"],TSTypeParameterDeclaration:z[48],TSTypeParameterInstantiation:z[48],TSTypePredicate:z[49],TSTypeQuery:["exprName","typeArguments"],TSTypeReference:["typeName","typeArguments"],TSUndefinedKeyword:z[1],TSUnionType:z[36],TSUnknownKeyword:z[1],TSVoidKeyword:z[1],TupleTypeAnnotation:["types","elementTypes"],TupleTypeLabeledElement:["label","elementType","variance"],TupleTypeSpreadElement:["label","typeAnnotation"],TypeAlias:z[24],TypeAnnotation:z[23],TypeCastExpression:z[4],TypeofTypeAnnotation:["argument","typeArguments"],TypeOperator:z[23],TypeParameter:["bound","default","variance"],TypeParameterDeclaration:z[48],TypeParameterInstantiation:z[48],TypePredicate:z[49],UnaryExpression:z[6],UndefinedTypeAnnotation:z[1],UnionTypeAnnotation:z[36],UnknownTypeAnnotation:z[1],UpdateExpression:z[6],V8IntrinsicIdentifier:z[1],VariableDeclaration:["declarations"],VariableDeclarator:z[27],Variance:z[1],VoidPattern:z[1],VoidTypeAnnotation:z[1],WhileStatement:z[25],WithStatement:["object","body"],YieldExpression:z[6]},OVe=CVe(PVe),NVe=OVe;function w3(e,t){if(!AVe(e))return e;if(Array.isArray(e)){for(let n=0;ny<=d);f=m&&n.slice(m,d).trim().length===0}return f?void 0:(p.extra={...p.extra,parenthesized:!0},p)}case"TemplateLiteral":if(c.expressions.length!==c.quasis.length-1)throw new Error("Malformed template literal.");break;case"TemplateElement":if(r==="flow"||r==="hermes"||r==="espree"||r==="typescript"||i){let p=q_(c)+1,d=td(c)-(c.tail?1:2);c.range=[p,d]}break;case"VariableDeclaration":{let p=fVe(0,c.declarations,-1);p?.init&&n[td(p)]!==";"&&(c.range=[q_(c),td(p)]);break}case"TSParenthesizedType":return c.typeAnnotation;case"TopicReference":e.extra={...e.extra,__isUsingHackPipeline:!0};break;case"TSUnionType":case"TSIntersectionType":if(c.types.length===1)return c.types[0];break;case"ImportExpression":r==="hermes"&&c.attributes&&!c.options&&(c.options=c.attributes);break}},onLeave(c){switch(c.type){case"LogicalExpression":if(Rpe(c))return oU(c);break;case"TSImportType":!c.source&&c.argument.type==="TSLiteralType"&&(c.source=c.argument.literal,delete c.argument);break}}}),e}function Rpe(e){return e.type==="LogicalExpression"&&e.right.type==="LogicalExpression"&&e.operator===e.right.operator}function oU(e){return Rpe(e)?oU({type:"LogicalExpression",operator:e.operator,left:oU({type:"LogicalExpression",operator:e.operator,left:e.left,right:e.right.left,range:[q_(e.left),td(e.right.left)]}),right:e.right.right,range:[q_(e),td(e)]}):e}var LVe=RVe;function $Ve(e,t){let r=new SyntaxError(e+" ("+t.loc.start.line+":"+t.loc.start.column+")");return Object.assign(r,t)}var Lpe=$Ve,npe="Unexpected parseExpression() input: ";function MVe(e){let{message:t,loc:r,reasonCode:n}=e;if(!r)return e;let{line:o,column:i}=r,a=e;(n==="MissingPlugin"||n==="MissingOneOfPlugins")&&(t="Unexpected token.",a=void 0);let s=` (${o}:${i})`;return t.endsWith(s)&&(t=t.slice(0,-s.length)),t.startsWith(npe)&&(t=t.slice(npe.length)),Lpe(t,{loc:{start:{line:o,column:i+1}},cause:a})}var $pe=MVe,jVe=String.prototype.replaceAll??function(e,t){return e.global?this.replace(e,t):this.split(e).join(t)},BVe=SU("replaceAll",function(){if(typeof this=="string")return jVe}),E3=BVe,qVe=/\*\/$/,UVe=/^\/\*\*?/,zVe=/^\s*(\/\*\*?(.|\r?\n)*?\*\/)/,JVe=/(^|\s+)\/\/([^\n\r]*)/g,ope=/^(\r?\n)+/,VVe=/(?:^|\r?\n) *(@[^\n\r]*?) *\r?\n *(?![^\n\r@]*\/\/[^]*)([^\s@][^\n\r@]+?) *\r?\n/g,ipe=/(?:^|\r?\n) *@(\S+) *([^\n\r]*)/g,KVe=/(\r?\n|^) *\* ?/g,GVe=[];function HVe(e){let t=e.match(zVe);return t?t[0].trimStart():""}function ZVe(e){e=E3(0,e.replace(UVe,"").replace(qVe,""),KVe,"$1");let t="";for(;t!==e;)t=e,e=E3(0,e,VVe,` +$1 $2 +`);e=e.replace(ope,"").trimEnd();let r=Object.create(null),n=E3(0,e,ipe,"").replace(ope,"").trimEnd(),o;for(;o=ipe.exec(e);){let i=E3(0,o[2],JVe,"");if(typeof r[o[1]]=="string"||Array.isArray(r[o[1]])){let a=r[o[1]];r[o[1]]=[...GVe,...Array.isArray(a)?a:[a],i]}else r[o[1]]=i}return{comments:n,pragmas:r}}var WVe=["noformat","noprettier"],QVe=["format","prettier"];function Mpe(e){let t=Fpe(e);t&&(e=e.slice(t.length+1));let r=HVe(e),{pragmas:n,comments:o}=ZVe(r);return{shebang:t,text:e,pragmas:n,comments:o}}function XVe(e){let{pragmas:t}=Mpe(e);return QVe.some(r=>Object.prototype.hasOwnProperty.call(t,r))}function YVe(e){let{pragmas:t}=Mpe(e);return WVe.some(r=>Object.prototype.hasOwnProperty.call(t,r))}function eKe(e){return e=typeof e=="function"?{parse:e}:e,{astFormat:"estree",hasPragma:XVe,hasIgnorePragma:YVe,locStart:q_,locEnd:td,...e}}var uD=eKe,xU="module",jpe="commonjs";function tKe(e){if(typeof e=="string"){if(e=e.toLowerCase(),/\.(?:mjs|mts)$/iu.test(e))return xU;if(/\.(?:cjs|cts)$/iu.test(e))return jpe}}function rKe(e,t){let{type:r="JsExpressionRoot",rootMarker:n,text:o}=t,{tokens:i,comments:a}=e;return delete e.tokens,delete e.comments,{tokens:i,comments:a,type:r,node:e,range:[0,o.length],rootMarker:n}}var Bpe=rKe,zv=e=>uD(sKe(e)),nKe={sourceType:xU,allowImportExportEverywhere:!0,allowReturnOutsideFunction:!0,allowNewTargetOutsideFunction:!0,allowSuperOutsideMethod:!0,allowUndeclaredExports:!0,errorRecovery:!0,createParenthesizedExpressions:!0,attachComment:!1,plugins:["doExpressions","exportDefaultFrom","functionBind","functionSent","throwExpressions","partialApplication","decorators","moduleBlocks","asyncDoExpressions","destructuringPrivate","decoratorAutoAccessors","sourcePhaseImports","deferredImportEvaluation",["optionalChainingAssign",{version:"2023-07"}],["discardBinding",{syntaxType:"void"}]],tokens:!1,ranges:!1},ape="v8intrinsic",spe=[["pipelineOperator",{proposal:"hack",topicToken:"%"}],["pipelineOperator",{proposal:"fsharp"}]],U_=(e,t=nKe)=>({...t,plugins:[...t.plugins,...e]}),oKe=/@(?:no)?flow\b/u;function iKe(e,t){if(t?.endsWith(".js.flow"))return!0;let r=Fpe(e);r&&(e=e.slice(r.length));let n=aVe(e,0);return n!==!1&&(e=e.slice(0,n)),oKe.test(e)}function aKe(e,t,r){let n=e(t,r),o=n.errors.find(i=>!cKe.has(i.reasonCode));if(o)throw o;return n}function sKe({isExpression:e=!1,optionsCombinations:t}){return(r,n={})=>{let{filepath:o}=n;if(typeof o!="string"&&(o=void 0),(n.parser==="babel"||n.parser==="__babel_estree")&&iKe(r,o))return n.parser="babel-flow",Upe.parse(r,n);let i=t,a=n.__babelSourceType??tKe(o);a&&a!==xU&&(i=i.map(d=>({...d,sourceType:a,...a===jpe?{allowReturnOutsideFunction:void 0,allowNewTargetOutsideFunction:void 0}:void 0})));let s=/%[A-Z]/u.test(r);r.includes("|>")?i=(s?[...spe,ape]:spe).flatMap(d=>i.map(f=>U_([d],f))):s&&(i=i.map(d=>U_([ape],d)));let c=e?Npe:Ope,p;try{p=sVe(i.map(d=>()=>aKe(c,r,d)))}catch({errors:[d]}){throw $pe(d)}return e&&(p=Bpe(p,{text:r,rootMarker:n.rootMarker})),LVe(p,{text:r})}}var cKe=new Set(["StrictNumericEscape","StrictWith","StrictOctalLiteral","StrictDelete","StrictEvalArguments","StrictEvalArgumentsBinding","StrictFunction","ForInOfLoopInitializer","ConstructorHasTypeParameters","UnsupportedParameterPropertyKind","DecoratorExportClass","ParamDupe","InvalidDecimal","RestTrailingComma","UnsupportedParameterDecorator","UnterminatedJsxContent","UnexpectedReservedWord","ModuleAttributesWithDuplicateKeys","InvalidEscapeSequenceTemplate","NonAbstractClassHasAbstractMethod","OptionalTypeBeforeRequired","PatternIsOptional","DeclareClassFieldHasInitializer","TypeImportCannotSpecifyDefaultAndNamed","VarRedeclaration","InvalidPrivateFieldResolution","DuplicateExport","ImportAttributesUseAssert","DeclarationMissingInitializer"]),qpe=[U_(["jsx"])],cpe=zv({optionsCombinations:qpe}),lpe=zv({optionsCombinations:[U_(["jsx","typescript"]),U_(["typescript"])]}),upe=zv({isExpression:!0,optionsCombinations:[U_(["jsx"])]}),ppe=zv({isExpression:!0,optionsCombinations:[U_(["typescript"])]}),Upe=zv({optionsCombinations:[U_(["jsx",["flow",{all:!0}],"flowComments"])]}),lKe=zv({optionsCombinations:qpe.map(e=>U_(["estree"],e))}),zpe={};iU(zpe,{json:()=>dKe,"json-stringify":()=>mKe,json5:()=>_Ke,jsonc:()=>fKe});function uKe(e){return Array.isArray(e)&&e.length>0}var Jpe=uKe,Vpe={tokens:!1,ranges:!1,attachComment:!1,createParenthesizedExpressions:!0};function pKe(e){let t=Ope(e,Vpe),{program:r}=t;if(r.body.length===0&&r.directives.length===0&&!r.interpreter)return t}function O3(e,t={}){let{allowComments:r=!0,allowEmpty:n=!1}=t,o;try{o=Npe(e,Vpe)}catch(i){if(n&&i.code==="BABEL_PARSER_SYNTAX_ERROR"&&i.reasonCode==="ParseExpressionEmptyInput")try{o=pKe(e)}catch{}if(!o)throw $pe(i)}if(!r&&Jpe(o.comments))throw zm(o.comments[0],"Comment");return o=Bpe(o,{type:"JsonRoot",text:e}),o.node.type==="File"?delete o.node:jv(o.node),o}function zm(e,t){let[r,n]=[e.loc.start,e.loc.end].map(({line:o,column:i})=>({line:o,column:i+1}));return Lpe(`${t} is not allowed in JSON.`,{loc:{start:r,end:n}})}function jv(e){switch(e.type){case"ArrayExpression":for(let t of e.elements)t!==null&&jv(t);return;case"ObjectExpression":for(let t of e.properties)jv(t);return;case"ObjectProperty":if(e.computed)throw zm(e.key,"Computed key");if(e.shorthand)throw zm(e.key,"Shorthand property");e.key.type!=="Identifier"&&jv(e.key),jv(e.value);return;case"UnaryExpression":{let{operator:t,argument:r}=e;if(t!=="+"&&t!=="-")throw zm(e,`Operator '${e.operator}'`);if(r.type==="NumericLiteral"||r.type==="Identifier"&&(r.name==="Infinity"||r.name==="NaN"))return;throw zm(r,`Operator '${t}' before '${r.type}'`)}case"Identifier":if(e.name!=="Infinity"&&e.name!=="NaN"&&e.name!=="undefined")throw zm(e,`Identifier '${e.name}'`);return;case"TemplateLiteral":if(Jpe(e.expressions))throw zm(e.expressions[0],"'TemplateLiteral' with expression");for(let t of e.quasis)jv(t);return;case"NullLiteral":case"BooleanLiteral":case"NumericLiteral":case"StringLiteral":case"TemplateElement":return;default:throw zm(e,`'${e.type}'`)}}var dKe=uD({parse:e=>O3(e),hasPragma:()=>!0,hasIgnorePragma:()=>!1}),_Ke=uD(e=>O3(e)),fKe=uD(e=>O3(e,{allowEmpty:!0})),mKe=uD({parse:e=>O3(e,{allowComments:!1}),astFormat:"estree-json"}),hKe={...dpe,...zpe};var yKe=Object.defineProperty,QU=(e,t)=>{for(var r in t)yKe(e,r,{get:t[r],enumerable:!0})},XU={};QU(XU,{languages:()=>vYe,options:()=>gYe,printers:()=>SYe});var gKe=[{name:"JavaScript",type:"programming",aceMode:"javascript",extensions:[".js","._js",".bones",".cjs",".es",".es6",".gs",".jake",".javascript",".jsb",".jscad",".jsfl",".jslib",".jsm",".jspre",".jss",".mjs",".njs",".pac",".sjs",".ssjs",".xsjs",".xsjslib",".start.frag",".end.frag",".wxs"],filenames:["Jakefile","start.frag","end.frag"],tmScope:"source.js",aliases:["js","node"],codemirrorMode:"javascript",codemirrorMimeType:"text/javascript",interpreters:["chakra","d8","gjs","js","node","nodejs","qjs","rhino","v8","v8-shell","zx"],parsers:["babel","acorn","espree","meriyah","babel-flow","babel-ts","flow","typescript"],vscodeLanguageIds:["javascript","mongo"],linguistLanguageId:183},{name:"Flow",type:"programming",aceMode:"javascript",extensions:[".js.flow"],filenames:[],tmScope:"source.js",aliases:[],codemirrorMode:"javascript",codemirrorMimeType:"text/javascript",interpreters:["chakra","d8","gjs","js","node","nodejs","qjs","rhino","v8","v8-shell"],parsers:["flow","babel-flow"],vscodeLanguageIds:["javascript"],linguistLanguageId:183},{name:"JSX",type:"programming",aceMode:"javascript",extensions:[".jsx"],filenames:void 0,tmScope:"source.js.jsx",aliases:void 0,codemirrorMode:"jsx",codemirrorMimeType:"text/jsx",interpreters:void 0,parsers:["babel","babel-flow","babel-ts","flow","typescript","espree","meriyah"],vscodeLanguageIds:["javascriptreact"],group:"JavaScript",linguistLanguageId:183},{name:"TypeScript",type:"programming",aceMode:"typescript",extensions:[".ts",".cts",".mts"],tmScope:"source.ts",aliases:["ts"],codemirrorMode:"javascript",codemirrorMimeType:"application/typescript",interpreters:["bun","deno","ts-node","tsx"],parsers:["typescript","babel-ts"],vscodeLanguageIds:["typescript"],linguistLanguageId:378},{name:"TSX",type:"programming",aceMode:"tsx",extensions:[".tsx"],tmScope:"source.tsx",codemirrorMode:"jsx",codemirrorMimeType:"text/typescript-jsx",group:"TypeScript",parsers:["typescript","babel-ts"],vscodeLanguageIds:["typescriptreact"],linguistLanguageId:94901924}],xde={};QU(xde,{canAttachComment:()=>MGe,embed:()=>CZe,features:()=>uYe,getVisitorKeys:()=>kde,handleComments:()=>SHe,hasPrettierIgnore:()=>Tz,insertPragma:()=>JZe,isBlockComment:()=>ju,isGap:()=>bHe,massageAstNode:()=>OGe,print:()=>vde,printComment:()=>HZe,printPrettierIgnored:()=>vde,willPrintOwnComments:()=>THe});var YU=(e,t)=>(r,n,...o)=>r|1&&n==null?void 0:(t.call(n)??n[e]).apply(n,o),SKe=String.prototype.replaceAll??function(e,t){return e.global?this.replace(e,t):this.split(e).join(t)},vKe=YU("replaceAll",function(){if(typeof this=="string")return SKe}),da=vKe;function bKe(e){return this[e<0?this.length+e:e]}var xKe=YU("at",function(){if(Array.isArray(this)||typeof this=="string")return bKe}),Vn=xKe;function EKe(e){return e!==null&&typeof e=="object"}var Ede=EKe;function*TKe(e,t){let{getVisitorKeys:r,filter:n=()=>!0}=t,o=i=>Ede(i)&&n(i);for(let i of r(e)){let a=e[i];if(Array.isArray(a))for(let s of a)o(s)&&(yield s);else o(a)&&(yield a)}}function*DKe(e,t){let r=[e];for(let n=0;n/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E-\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED8\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])))?))?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3C-\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE8A\uDE8E-\uDEC2\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\uDEEF]|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g;function wKe(e){return e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510}function kKe(e){return e>=4352&&e<=4447||e===8986||e===8987||e===9001||e===9002||e>=9193&&e<=9196||e===9200||e===9203||e===9725||e===9726||e===9748||e===9749||e>=9776&&e<=9783||e>=9800&&e<=9811||e===9855||e>=9866&&e<=9871||e===9875||e===9889||e===9898||e===9899||e===9917||e===9918||e===9924||e===9925||e===9934||e===9940||e===9962||e===9970||e===9971||e===9973||e===9978||e===9981||e===9989||e===9994||e===9995||e===10024||e===10060||e===10062||e>=10067&&e<=10069||e===10071||e>=10133&&e<=10135||e===10160||e===10175||e===11035||e===11036||e===11088||e===11093||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12591||e>=12593&&e<=12686||e>=12688&&e<=12773||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=94176&&e<=94180||e>=94192&&e<=94198||e>=94208&&e<=101589||e>=101631&&e<=101662||e>=101760&&e<=101874||e>=110576&&e<=110579||e>=110581&&e<=110587||e===110589||e===110590||e>=110592&&e<=110882||e===110898||e>=110928&&e<=110930||e===110933||e>=110948&&e<=110951||e>=110960&&e<=111355||e>=119552&&e<=119638||e>=119648&&e<=119670||e===126980||e===127183||e===127374||e>=127377&&e<=127386||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||e===127568||e===127569||e>=127584&&e<=127589||e>=127744&&e<=127776||e>=127789&&e<=127797||e>=127799&&e<=127868||e>=127870&&e<=127891||e>=127904&&e<=127946||e>=127951&&e<=127955||e>=127968&&e<=127984||e===127988||e>=127992&&e<=128062||e===128064||e>=128066&&e<=128252||e>=128255&&e<=128317||e>=128331&&e<=128334||e>=128336&&e<=128359||e===128378||e===128405||e===128406||e===128420||e>=128507&&e<=128591||e>=128640&&e<=128709||e===128716||e>=128720&&e<=128722||e>=128725&&e<=128728||e>=128732&&e<=128735||e===128747||e===128748||e>=128756&&e<=128764||e>=128992&&e<=129003||e===129008||e>=129292&&e<=129338||e>=129340&&e<=129349||e>=129351&&e<=129535||e>=129648&&e<=129660||e>=129664&&e<=129674||e>=129678&&e<=129734||e===129736||e>=129741&&e<=129756||e>=129759&&e<=129770||e>=129775&&e<=129784||e>=131072&&e<=196605||e>=196608&&e<=262141}var CKe="\xA9\xAE\u203C\u2049\u2122\u2139\u2194\u2195\u2196\u2197\u2198\u2199\u21A9\u21AA\u2328\u23CF\u23F1\u23F2\u23F8\u23F9\u23FA\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600\u2601\u2602\u2603\u2604\u260E\u2611\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638\u2639\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694\u2695\u2696\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F1\u26F7\u26F8\u26F9\u2702\u2708\u2709\u270C\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u2764\u27A1\u2934\u2935\u2B05\u2B06\u2B07",PKe=/[^\x20-\x7F]/u,OKe=new Set(CKe);function NKe(e){if(!e)return 0;if(!PKe.test(e))return e.length;e=e.replace(IKe(),r=>OKe.has(r)?" ":" ");let t=0;for(let r of e){let n=r.codePointAt(0);n<=31||n>=127&&n<=159||n>=768&&n<=879||n>=65024&&n<=65039||(t+=wKe(n)||kKe(n)?2:1)}return t}var Gv=NKe;function V3(e){return(t,r,n)=>{let o=!!n?.backwards;if(r===!1)return!1;let{length:i}=t,a=r;for(;a>=0&&ae===` +`||e==="\r"||e==="\u2028"||e==="\u2029";function LKe(e,t,r){let n=!!r?.backwards;if(t===!1)return!1;let o=e.charAt(t);if(n){if(e.charAt(t-1)==="\r"&&o===` +`)return t-2;if(Kpe(o))return t-1}else{if(o==="\r"&&e.charAt(t+1)===` +`)return t+2;if(Kpe(o))return t+1}return t}var Zv=LKe;function $Ke(e,t,r={}){let n=Hv(e,r.backwards?t-1:t,r),o=Zv(e,n,r);return n!==o}var nc=$Ke;function MKe(e,t){if(t===!1)return!1;if(e.charAt(t)==="/"&&e.charAt(t+1)==="*"){for(let r=t+2;r0}var jo=qKe,UKe=()=>{},Eg=UKe,Tde=Object.freeze({character:"'",codePoint:39}),Dde=Object.freeze({character:'"',codePoint:34}),zKe=Object.freeze({preferred:Tde,alternate:Dde}),JKe=Object.freeze({preferred:Dde,alternate:Tde});function VKe(e,t){let{preferred:r,alternate:n}=t===!0||t==="'"?zKe:JKe,{length:o}=e,i=0,a=0;for(let s=0;sa?n:r).character}var Ade=VKe,KKe=/\\(["'\\])|(["'])/gu;function GKe(e,t){let r=t==='"'?"'":'"',n=da(0,e,KKe,(o,i,a)=>i?i===r?r:o:a===t?"\\"+a:a);return t+n+t}var HKe=GKe;function ZKe(e,t){Eg(/^(?["']).*\k$/su.test(e));let r=e.slice(1,-1),n=t.parser==="json"||t.parser==="jsonc"||t.parser==="json5"&&t.quoteProps==="preserve"&&!t.singleQuote?'"':t.__isInHtmlAttribute?"'":Ade(r,t.singleQuote);return e.charAt(0)===n?e:HKe(r,n)}var Wv=ZKe,Ide=e=>Number.isInteger(e)&&e>=0;function Yr(e){let t=e.range?.[0]??e.start,r=(e.declaration?.decorators??e.decorators)?.[0];return r?Math.min(Yr(r),t):t}function Kr(e){return e.range?.[1]??e.end}function K3(e,t){let r=Yr(e);return Ide(r)&&r===Yr(t)}function WKe(e,t){let r=Kr(e);return Ide(r)&&r===Kr(t)}function QKe(e,t){return K3(e,t)&&WKe(e,t)}var pD=null;function fD(e){if(pD!==null&&typeof pD.property){let t=pD;return pD=fD.prototype=null,t}return pD=fD.prototype=e??Object.create(null),new fD}var XKe=10;for(let e=0;e<=XKe;e++)fD();function YKe(e){return fD(e)}function eGe(e,t="type"){YKe(e);function r(n){let o=n[t],i=e[o];if(!Array.isArray(i))throw Object.assign(new Error(`Missing visitor keys for '${o}'.`),{node:n});return i}return r}var wde=eGe,J=[["decorators","key","typeAnnotation","value"],[],["elementType"],["expression"],["expression","typeAnnotation"],["left","right"],["argument"],["directives","body"],["label"],["callee","typeArguments","arguments"],["body"],["decorators","id","typeParameters","superClass","superTypeArguments","mixins","implements","body","superTypeParameters"],["id","typeParameters"],["decorators","key","typeParameters","params","returnType","body"],["decorators","variance","key","typeAnnotation","value"],["name","typeAnnotation"],["test","consequent","alternate"],["checkType","extendsType","trueType","falseType"],["value"],["id","body"],["declaration","specifiers","source","attributes"],["id"],["id","typeParameters","extends","body"],["typeAnnotation"],["id","typeParameters","right"],["body","test"],["members"],["id","init"],["exported"],["left","right","body"],["id","typeParameters","params","predicate","returnType","body"],["id","params","body","typeParameters","returnType"],["key","value"],["local"],["objectType","indexType"],["typeParameter"],["types"],["node"],["object","property"],["argument","cases"],["pattern","body","guard"],["literal"],["decorators","key","value"],["expressions"],["qualification","id"],["decorators","key","typeAnnotation"],["typeParameters","params","returnType"],["expression","typeArguments"],["params"],["parameterName","typeAnnotation"]],tGe={AccessorProperty:J[0],AnyTypeAnnotation:J[1],ArgumentPlaceholder:J[1],ArrayExpression:["elements"],ArrayPattern:["elements","typeAnnotation","decorators"],ArrayTypeAnnotation:J[2],ArrowFunctionExpression:["typeParameters","params","predicate","returnType","body"],AsConstExpression:J[3],AsExpression:J[4],AssignmentExpression:J[5],AssignmentPattern:["left","right","decorators","typeAnnotation"],AwaitExpression:J[6],BigIntLiteral:J[1],BigIntLiteralTypeAnnotation:J[1],BigIntTypeAnnotation:J[1],BinaryExpression:J[5],BindExpression:["object","callee"],BlockStatement:J[7],BooleanLiteral:J[1],BooleanLiteralTypeAnnotation:J[1],BooleanTypeAnnotation:J[1],BreakStatement:J[8],CallExpression:J[9],CatchClause:["param","body"],ChainExpression:J[3],ClassAccessorProperty:J[0],ClassBody:J[10],ClassDeclaration:J[11],ClassExpression:J[11],ClassImplements:J[12],ClassMethod:J[13],ClassPrivateMethod:J[13],ClassPrivateProperty:J[14],ClassProperty:J[14],ComponentDeclaration:["id","params","body","typeParameters","rendersType"],ComponentParameter:["name","local"],ComponentTypeAnnotation:["params","rest","typeParameters","rendersType"],ComponentTypeParameter:J[15],ConditionalExpression:J[16],ConditionalTypeAnnotation:J[17],ContinueStatement:J[8],DebuggerStatement:J[1],DeclareClass:["id","typeParameters","extends","mixins","implements","body"],DeclareComponent:["id","params","rest","typeParameters","rendersType"],DeclaredPredicate:J[18],DeclareEnum:J[19],DeclareExportAllDeclaration:["source","attributes"],DeclareExportDeclaration:J[20],DeclareFunction:["id","predicate"],DeclareHook:J[21],DeclareInterface:J[22],DeclareModule:J[19],DeclareModuleExports:J[23],DeclareNamespace:J[19],DeclareOpaqueType:["id","typeParameters","supertype","lowerBound","upperBound"],DeclareTypeAlias:J[24],DeclareVariable:J[21],Decorator:J[3],Directive:J[18],DirectiveLiteral:J[1],DoExpression:J[10],DoWhileStatement:J[25],EmptyStatement:J[1],EmptyTypeAnnotation:J[1],EnumBigIntBody:J[26],EnumBigIntMember:J[27],EnumBooleanBody:J[26],EnumBooleanMember:J[27],EnumDeclaration:J[19],EnumDefaultedMember:J[21],EnumNumberBody:J[26],EnumNumberMember:J[27],EnumStringBody:J[26],EnumStringMember:J[27],EnumSymbolBody:J[26],ExistsTypeAnnotation:J[1],ExperimentalRestProperty:J[6],ExperimentalSpreadProperty:J[6],ExportAllDeclaration:["source","attributes","exported"],ExportDefaultDeclaration:["declaration"],ExportDefaultSpecifier:J[28],ExportNamedDeclaration:J[20],ExportNamespaceSpecifier:J[28],ExportSpecifier:["local","exported"],ExpressionStatement:J[3],File:["program"],ForInStatement:J[29],ForOfStatement:J[29],ForStatement:["init","test","update","body"],FunctionDeclaration:J[30],FunctionExpression:J[30],FunctionTypeAnnotation:["typeParameters","this","params","rest","returnType"],FunctionTypeParam:J[15],GenericTypeAnnotation:J[12],HookDeclaration:J[31],HookTypeAnnotation:["params","returnType","rest","typeParameters"],Identifier:["typeAnnotation","decorators"],IfStatement:J[16],ImportAttribute:J[32],ImportDeclaration:["specifiers","source","attributes"],ImportDefaultSpecifier:J[33],ImportExpression:["source","options"],ImportNamespaceSpecifier:J[33],ImportSpecifier:["imported","local"],IndexedAccessType:J[34],InferredPredicate:J[1],InferTypeAnnotation:J[35],InterfaceDeclaration:J[22],InterfaceExtends:J[12],InterfaceTypeAnnotation:["extends","body"],InterpreterDirective:J[1],IntersectionTypeAnnotation:J[36],JsExpressionRoot:J[37],JsonRoot:J[37],JSXAttribute:["name","value"],JSXClosingElement:["name"],JSXClosingFragment:J[1],JSXElement:["openingElement","children","closingElement"],JSXEmptyExpression:J[1],JSXExpressionContainer:J[3],JSXFragment:["openingFragment","children","closingFragment"],JSXIdentifier:J[1],JSXMemberExpression:J[38],JSXNamespacedName:["namespace","name"],JSXOpeningElement:["name","typeArguments","attributes"],JSXOpeningFragment:J[1],JSXSpreadAttribute:J[6],JSXSpreadChild:J[3],JSXText:J[1],KeyofTypeAnnotation:J[6],LabeledStatement:["label","body"],Literal:J[1],LogicalExpression:J[5],MatchArrayPattern:["elements","rest"],MatchAsPattern:["pattern","target"],MatchBindingPattern:J[21],MatchExpression:J[39],MatchExpressionCase:J[40],MatchIdentifierPattern:J[21],MatchLiteralPattern:J[41],MatchMemberPattern:["base","property"],MatchObjectPattern:["properties","rest"],MatchObjectPatternProperty:["key","pattern"],MatchOrPattern:["patterns"],MatchRestPattern:J[6],MatchStatement:J[39],MatchStatementCase:J[40],MatchUnaryPattern:J[6],MatchWildcardPattern:J[1],MemberExpression:J[38],MetaProperty:["meta","property"],MethodDefinition:J[42],MixedTypeAnnotation:J[1],ModuleExpression:J[10],NeverTypeAnnotation:J[1],NewExpression:J[9],NGChainedExpression:J[43],NGEmptyExpression:J[1],NGMicrosyntax:J[10],NGMicrosyntaxAs:["key","alias"],NGMicrosyntaxExpression:["expression","alias"],NGMicrosyntaxKey:J[1],NGMicrosyntaxKeyedExpression:["key","expression"],NGMicrosyntaxLet:J[32],NGPipeExpression:["left","right","arguments"],NGRoot:J[37],NullableTypeAnnotation:J[23],NullLiteral:J[1],NullLiteralTypeAnnotation:J[1],NumberLiteralTypeAnnotation:J[1],NumberTypeAnnotation:J[1],NumericLiteral:J[1],ObjectExpression:["properties"],ObjectMethod:J[13],ObjectPattern:["decorators","properties","typeAnnotation"],ObjectProperty:J[42],ObjectTypeAnnotation:["properties","indexers","callProperties","internalSlots"],ObjectTypeCallProperty:J[18],ObjectTypeIndexer:["variance","id","key","value"],ObjectTypeInternalSlot:["id","value"],ObjectTypeMappedTypeProperty:["keyTparam","propType","sourceType","variance"],ObjectTypeProperty:["key","value","variance"],ObjectTypeSpreadProperty:J[6],OpaqueType:["id","typeParameters","supertype","impltype","lowerBound","upperBound"],OptionalCallExpression:J[9],OptionalIndexedAccessType:J[34],OptionalMemberExpression:J[38],ParenthesizedExpression:J[3],PipelineBareFunction:["callee"],PipelinePrimaryTopicReference:J[1],PipelineTopicExpression:J[3],Placeholder:J[1],PrivateIdentifier:J[1],PrivateName:J[21],Program:J[7],Property:J[32],PropertyDefinition:J[14],QualifiedTypeIdentifier:J[44],QualifiedTypeofIdentifier:J[44],RegExpLiteral:J[1],RestElement:["argument","typeAnnotation","decorators"],ReturnStatement:J[6],SatisfiesExpression:J[4],SequenceExpression:J[43],SpreadElement:J[6],StaticBlock:J[10],StringLiteral:J[1],StringLiteralTypeAnnotation:J[1],StringTypeAnnotation:J[1],Super:J[1],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],SymbolTypeAnnotation:J[1],TaggedTemplateExpression:["tag","typeArguments","quasi"],TemplateElement:J[1],TemplateLiteral:["quasis","expressions"],ThisExpression:J[1],ThisTypeAnnotation:J[1],ThrowStatement:J[6],TopicReference:J[1],TryStatement:["block","handler","finalizer"],TSAbstractAccessorProperty:J[45],TSAbstractKeyword:J[1],TSAbstractMethodDefinition:J[32],TSAbstractPropertyDefinition:J[45],TSAnyKeyword:J[1],TSArrayType:J[2],TSAsExpression:J[4],TSAsyncKeyword:J[1],TSBigIntKeyword:J[1],TSBooleanKeyword:J[1],TSCallSignatureDeclaration:J[46],TSClassImplements:J[47],TSConditionalType:J[17],TSConstructorType:J[46],TSConstructSignatureDeclaration:J[46],TSDeclareFunction:J[31],TSDeclareKeyword:J[1],TSDeclareMethod:["decorators","key","typeParameters","params","returnType"],TSEmptyBodyFunctionExpression:["id","typeParameters","params","returnType"],TSEnumBody:J[26],TSEnumDeclaration:J[19],TSEnumMember:["id","initializer"],TSExportAssignment:J[3],TSExportKeyword:J[1],TSExternalModuleReference:J[3],TSFunctionType:J[46],TSImportEqualsDeclaration:["id","moduleReference"],TSImportType:["options","qualifier","typeArguments","source"],TSIndexedAccessType:J[34],TSIndexSignature:["parameters","typeAnnotation"],TSInferType:J[35],TSInstantiationExpression:J[47],TSInterfaceBody:J[10],TSInterfaceDeclaration:J[22],TSInterfaceHeritage:J[47],TSIntersectionType:J[36],TSIntrinsicKeyword:J[1],TSJSDocAllType:J[1],TSJSDocNonNullableType:J[23],TSJSDocNullableType:J[23],TSJSDocUnknownType:J[1],TSLiteralType:J[41],TSMappedType:["key","constraint","nameType","typeAnnotation"],TSMethodSignature:["key","typeParameters","params","returnType"],TSModuleBlock:J[10],TSModuleDeclaration:J[19],TSNamedTupleMember:["label","elementType"],TSNamespaceExportDeclaration:J[21],TSNeverKeyword:J[1],TSNonNullExpression:J[3],TSNullKeyword:J[1],TSNumberKeyword:J[1],TSObjectKeyword:J[1],TSOptionalType:J[23],TSParameterProperty:["parameter","decorators"],TSParenthesizedType:J[23],TSPrivateKeyword:J[1],TSPropertySignature:["key","typeAnnotation"],TSProtectedKeyword:J[1],TSPublicKeyword:J[1],TSQualifiedName:J[5],TSReadonlyKeyword:J[1],TSRestType:J[23],TSSatisfiesExpression:J[4],TSStaticKeyword:J[1],TSStringKeyword:J[1],TSSymbolKeyword:J[1],TSTemplateLiteralType:["quasis","types"],TSThisType:J[1],TSTupleType:["elementTypes"],TSTypeAliasDeclaration:["id","typeParameters","typeAnnotation"],TSTypeAnnotation:J[23],TSTypeAssertion:J[4],TSTypeLiteral:J[26],TSTypeOperator:J[23],TSTypeParameter:["name","constraint","default"],TSTypeParameterDeclaration:J[48],TSTypeParameterInstantiation:J[48],TSTypePredicate:J[49],TSTypeQuery:["exprName","typeArguments"],TSTypeReference:["typeName","typeArguments"],TSUndefinedKeyword:J[1],TSUnionType:J[36],TSUnknownKeyword:J[1],TSVoidKeyword:J[1],TupleTypeAnnotation:["types","elementTypes"],TupleTypeLabeledElement:["label","elementType","variance"],TupleTypeSpreadElement:["label","typeAnnotation"],TypeAlias:J[24],TypeAnnotation:J[23],TypeCastExpression:J[4],TypeofTypeAnnotation:["argument","typeArguments"],TypeOperator:J[23],TypeParameter:["bound","default","variance"],TypeParameterDeclaration:J[48],TypeParameterInstantiation:J[48],TypePredicate:J[49],UnaryExpression:J[6],UndefinedTypeAnnotation:J[1],UnionTypeAnnotation:J[36],UnknownTypeAnnotation:J[1],UpdateExpression:J[6],V8IntrinsicIdentifier:J[1],VariableDeclaration:["declarations"],VariableDeclarator:J[27],Variance:J[1],VoidPattern:J[1],VoidTypeAnnotation:J[1],WhileStatement:J[25],WithStatement:["object","body"],YieldExpression:J[6]},rGe=wde(tGe),kde=rGe;function nGe(e){let t=new Set(e);return r=>t.has(r?.type)}var Ir=nGe;function oGe(e){return e.extra?.raw??e.raw}var oc=oGe,iGe=Ir(["Block","CommentBlock","MultiLine"]),ju=iGe,aGe=Ir(["AnyTypeAnnotation","ThisTypeAnnotation","NumberTypeAnnotation","VoidTypeAnnotation","BooleanTypeAnnotation","BigIntTypeAnnotation","SymbolTypeAnnotation","StringTypeAnnotation","NeverTypeAnnotation","UndefinedTypeAnnotation","UnknownTypeAnnotation","EmptyTypeAnnotation","MixedTypeAnnotation"]),Cde=aGe,sGe=Ir(["Line","CommentLine","SingleLine","HashbangComment","HTMLOpen","HTMLClose","Hashbang","InterpreterDirective"]),ED=sGe;function cGe(e,t){let r=t.split(".");for(let n=r.length-1;n>=0;n--){let o=r[n];if(n===0)return e.type==="Identifier"&&e.name===o;if(n===1&&e.type==="MetaProperty"&&e.property.type==="Identifier"&&e.property.name===o){e=e.meta;continue}if(e.type==="MemberExpression"&&!e.optional&&!e.computed&&e.property.type==="Identifier"&&e.property.name===o){e=e.object;continue}return!1}}function lGe(e,t){return t.some(r=>cGe(e,r))}var nz=lGe;function uGe({type:e}){return e.startsWith("TS")&&e.endsWith("Keyword")}var Pde=uGe;function pGe({node:e,parent:t}){return e?.type!=="EmptyStatement"?!1:t.type==="IfStatement"?t.consequent===e||t.alternate===e:t.type==="DoWhileStatement"||t.type==="ForInStatement"||t.type==="ForOfStatement"||t.type==="ForStatement"||t.type==="LabeledStatement"||t.type==="WithStatement"||t.type==="WhileStatement"?t.body===e:!1}var oz=pGe;function LU(e,t){return t(e)||AKe(e,{getVisitorKeys:kde,predicate:t})}function iz(e){return e.type==="AssignmentExpression"||e.type==="BinaryExpression"||e.type==="LogicalExpression"||e.type==="NGPipeExpression"||e.type==="ConditionalExpression"||jn(e)||Mo(e)||e.type==="SequenceExpression"||e.type==="TaggedTemplateExpression"||e.type==="BindExpression"||e.type==="UpdateExpression"&&!e.prefix||Fu(e)||e.type==="TSNonNullExpression"||e.type==="ChainExpression"}function dGe(e){return e.expressions?e.expressions[0]:e.left??e.test??e.callee??e.object??e.tag??e.argument??e.expression}function Ode(e){if(e.expressions)return["expressions",0];if(e.left)return["left"];if(e.test)return["test"];if(e.object)return["object"];if(e.callee)return["callee"];if(e.tag)return["tag"];if(e.argument)return["argument"];if(e.expression)return["expression"];throw new Error("Unexpected node has no left side.")}var _Ge=Ir(["ExportDefaultDeclaration","DeclareExportDeclaration","ExportNamedDeclaration","ExportAllDeclaration","DeclareExportAllDeclaration"]),Fa=Ir(["ArrayExpression"]),Lu=Ir(["ObjectExpression"]);function fGe(e){return e.type==="LogicalExpression"&&e.operator==="??"}function od(e){return e.type==="NumericLiteral"||e.type==="Literal"&&typeof e.value=="number"}function mGe(e){return e.type==="BooleanLiteral"||e.type==="Literal"&&typeof e.value=="boolean"}function Nde(e){return e.type==="UnaryExpression"&&(e.operator==="+"||e.operator==="-")&&od(e.argument)}function fa(e){return!!(e&&(e.type==="StringLiteral"||e.type==="Literal"&&typeof e.value=="string"))}function Fde(e){return e.type==="RegExpLiteral"||e.type==="Literal"&&!!e.regex}var az=Ir(["Literal","BooleanLiteral","BigIntLiteral","DirectiveLiteral","NullLiteral","NumericLiteral","RegExpLiteral","StringLiteral"]),hGe=Ir(["Identifier","ThisExpression","Super","PrivateName","PrivateIdentifier"]),Hm=Ir(["ObjectTypeAnnotation","TSTypeLiteral","TSMappedType"]),gD=Ir(["FunctionExpression","ArrowFunctionExpression"]);function yGe(e){return e.type==="FunctionExpression"||e.type==="ArrowFunctionExpression"&&e.body.type==="BlockStatement"}function EU(e){return jn(e)&&e.callee.type==="Identifier"&&["async","inject","fakeAsync","waitForAsync"].includes(e.callee.name)}var _a=Ir(["JSXElement","JSXFragment"]);function TD(e){return e.method&&e.kind==="init"||e.kind==="get"||e.kind==="set"}function Rde(e){return(e.type==="ObjectTypeProperty"||e.type==="ObjectTypeInternalSlot")&&!e.static&&!e.method&&e.kind!=="get"&&e.kind!=="set"&&e.value.type==="FunctionTypeAnnotation"}function gGe(e){return(e.type==="TypeAnnotation"||e.type==="TSTypeAnnotation")&&e.typeAnnotation.type==="FunctionTypeAnnotation"&&!e.static&&!K3(e,e.typeAnnotation)}var J_=Ir(["BinaryExpression","LogicalExpression","NGPipeExpression"]);function Kv(e){return Mo(e)||e.type==="BindExpression"&&!!e.object}var SGe=Ir(["TSThisType","NullLiteralTypeAnnotation","BooleanLiteralTypeAnnotation","StringLiteralTypeAnnotation","BigIntLiteralTypeAnnotation","NumberLiteralTypeAnnotation","TSLiteralType","TSTemplateLiteralType"]);function sz(e){return Pde(e)||Cde(e)||SGe(e)||e.type==="GenericTypeAnnotation"&&!e.typeParameters||e.type==="TSTypeReference"&&!e.typeArguments}function vGe(e){return e.type==="Identifier"&&(e.name==="beforeEach"||e.name==="beforeAll"||e.name==="afterEach"||e.name==="afterAll")}var bGe=["it","it.only","it.skip","describe","describe.only","describe.skip","test","test.only","test.skip","test.fixme","test.step","test.describe","test.describe.only","test.describe.skip","test.describe.fixme","test.describe.parallel","test.describe.parallel.only","test.describe.serial","test.describe.serial.only","skip","xit","xdescribe","xtest","fit","fdescribe","ftest"];function xGe(e){return nz(e,bGe)}function G3(e,t){if(e?.type!=="CallExpression"||e.optional)return!1;let r=qc(e);if(r.length===1){if(EU(e)&&G3(t))return gD(r[0]);if(vGe(e.callee))return EU(r[0])}else if((r.length===2||r.length===3)&&(r[0].type==="TemplateLiteral"||fa(r[0]))&&xGe(e.callee))return r[2]&&!od(r[2])?!1:(r.length===2?gD(r[1]):yGe(r[1])&&ss(r[1]).length<=1)||EU(r[1]);return!1}var Lde=e=>t=>(t?.type==="ChainExpression"&&(t=t.expression),e(t)),jn=Lde(Ir(["CallExpression","OptionalCallExpression"])),Mo=Lde(Ir(["MemberExpression","OptionalMemberExpression"]));function Gpe(e,t=5){return $de(e,t)<=t}function $de(e,t){let r=0;for(let n in e){let o=e[n];if(Ede(o)&&typeof o.type=="string"&&(r++,r+=$de(o,t-r)),r>t)return r}return r}var EGe=.25;function cz(e,t){let{printWidth:r}=t;if(rt(e))return!1;let n=r*EGe;if(e.type==="ThisExpression"||e.type==="Identifier"&&e.name.length<=n||Nde(e)&&!rt(e.argument))return!0;let o=e.type==="Literal"&&"regex"in e&&e.regex.pattern||e.type==="RegExpLiteral"&&e.pattern;return o?o.length<=n:fa(e)?Wv(oc(e),t).length<=n:e.type==="TemplateLiteral"?e.expressions.length===0&&e.quasis[0].value.raw.length<=n&&!e.quasis[0].value.raw.includes(` +`):e.type==="UnaryExpression"?cz(e.argument,{printWidth:r}):e.type==="CallExpression"&&e.arguments.length===0&&e.callee.type==="Identifier"?e.callee.name.length<=n-2:az(e)}function Ru(e,t){return _a(t)?H3(t):rt(t,St.Leading,r=>nc(e,Kr(r)))}function Hpe(e){return e.quasis.some(t=>t.value.raw.includes(` +`))}function Mde(e,t){return(e.type==="TemplateLiteral"&&Hpe(e)||e.type==="TaggedTemplateExpression"&&Hpe(e.quasi))&&!nc(t,Yr(e),{backwards:!0})}function jde(e){if(!rt(e))return!1;let t=Vn(0,bg(e,St.Dangling),-1);return t&&!ju(t)}function TGe(e){if(e.length<=1)return!1;let t=0;for(let r of e)if(gD(r)){if(t+=1,t>1)return!0}else if(jn(r)){for(let n of qc(r))if(gD(n))return!0}return!1}function Bde(e){let{node:t,parent:r,key:n}=e;return n==="callee"&&jn(t)&&jn(r)&&r.arguments.length>0&&t.arguments.length>r.arguments.length}var DGe=new Set(["!","-","+","~"]);function Nu(e,t=2){if(t<=0)return!1;if(e.type==="ChainExpression"||e.type==="TSNonNullExpression")return Nu(e.expression,t);let r=n=>Nu(n,t-1);if(Fde(e))return Gv(e.pattern??e.regex.pattern)<=5;if(az(e)||hGe(e)||e.type==="ArgumentPlaceholder")return!0;if(e.type==="TemplateLiteral")return e.quasis.every(n=>!n.value.raw.includes(` +`))&&e.expressions.every(r);if(Lu(e))return e.properties.every(n=>!n.computed&&(n.shorthand||n.value&&r(n.value)));if(Fa(e))return e.elements.every(n=>n===null||r(n));if(Xv(e)){if(e.type==="ImportExpression"||Nu(e.callee,t)){let n=qc(e);return n.length<=t&&n.every(r)}return!1}return Mo(e)?Nu(e.object,t)&&Nu(e.property,t):e.type==="UnaryExpression"&&DGe.has(e.operator)||e.type==="UpdateExpression"?Nu(e.argument,t):!1}function cd(e,t="es5"){return e.trailingComma==="es5"&&t==="es5"||e.trailingComma==="all"&&(t==="all"||t==="es5")}function Ps(e,t){switch(e.type){case"BinaryExpression":case"LogicalExpression":case"AssignmentExpression":case"NGPipeExpression":return Ps(e.left,t);case"MemberExpression":case"OptionalMemberExpression":return Ps(e.object,t);case"TaggedTemplateExpression":return e.tag.type==="FunctionExpression"?!1:Ps(e.tag,t);case"CallExpression":case"OptionalCallExpression":return e.callee.type==="FunctionExpression"?!1:Ps(e.callee,t);case"ConditionalExpression":return Ps(e.test,t);case"UpdateExpression":return!e.prefix&&Ps(e.argument,t);case"BindExpression":return e.object&&Ps(e.object,t);case"SequenceExpression":return Ps(e.expressions[0],t);case"ChainExpression":case"TSSatisfiesExpression":case"TSAsExpression":case"TSNonNullExpression":case"AsExpression":case"AsConstExpression":case"SatisfiesExpression":return Ps(e.expression,t);default:return t(e)}}var Zpe={"==":!0,"!=":!0,"===":!0,"!==":!0},N3={"*":!0,"/":!0,"%":!0},$U={">>":!0,">>>":!0,"<<":!0};function lz(e,t){return!(B3(t)!==B3(e)||e==="**"||Zpe[e]&&Zpe[t]||t==="%"&&N3[e]||e==="%"&&N3[t]||t!==e&&N3[t]&&N3[e]||$U[e]&&$U[t])}var AGe=new Map([["|>"],["??"],["||"],["&&"],["|"],["^"],["&"],["==","===","!=","!=="],["<",">","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"],["**"]].flatMap((e,t)=>e.map(r=>[r,t])));function B3(e){return AGe.get(e)}function IGe(e){return!!$U[e]||e==="|"||e==="^"||e==="&"}function wGe(e){if(e.rest)return!0;let t=ss(e);return Vn(0,t,-1)?.type==="RestElement"}var TU=new WeakMap;function ss(e){if(TU.has(e))return TU.get(e);let t=[];return e.this&&t.push(e.this),t.push(...e.params),e.rest&&t.push(e.rest),TU.set(e,t),t}function kGe(e,t){let{node:r}=e,n=0,o=()=>t(e,n++);r.this&&e.call(o,"this"),e.each(o,"params"),r.rest&&e.call(o,"rest")}var DU=new WeakMap;function qc(e){if(DU.has(e))return DU.get(e);if(e.type==="ChainExpression")return qc(e.expression);let t;return e.type==="ImportExpression"||e.type==="TSImportType"?(t=[e.source],e.options&&t.push(e.options)):e.type==="TSExternalModuleReference"?t=[e.expression]:t=e.arguments,DU.set(e,t),t}function q3(e,t){let{node:r}=e;if(r.type==="ChainExpression")return e.call(()=>q3(e,t),"expression");r.type==="ImportExpression"||r.type==="TSImportType"?(e.call(()=>t(e,0),"source"),r.options&&e.call(()=>t(e,1),"options")):r.type==="TSExternalModuleReference"?e.call(()=>t(e,0),"expression"):e.each(t,"arguments")}function Wpe(e,t){let r=[];if(e.type==="ChainExpression"&&(e=e.expression,r.push("expression")),e.type==="ImportExpression"||e.type==="TSImportType"){if(t===0||t===(e.options?-2:-1))return[...r,"source"];if(e.options&&(t===1||t===-1))return[...r,"options"];throw new RangeError("Invalid argument index")}else if(e.type==="TSExternalModuleReference"){if(t===0||t===-1)return[...r,"expression"]}else if(t<0&&(t=e.arguments.length+t),t>=0&&t{if(typeof e=="function"&&(t=e,e=0),e||t)return(r,n,o)=>!(e&St.Leading&&!r.leading||e&St.Trailing&&!r.trailing||e&St.Dangling&&(r.leading||r.trailing)||e&St.Block&&!ju(r)||e&St.Line&&!ED(r)||e&St.First&&n!==0||e&St.Last&&n!==o.length-1||e&St.PrettierIgnore&&!Qv(r)||t&&!t(r))};function rt(e,t,r){if(!jo(e?.comments))return!1;let n=qde(t,r);return n?e.comments.some(n):!0}function bg(e,t,r){if(!Array.isArray(e?.comments))return[];let n=qde(t,r);return n?e.comments.filter(n):e.comments}var ld=(e,{originalText:t})=>rz(t,Kr(e));function Xv(e){return jn(e)||e.type==="NewExpression"||e.type==="ImportExpression"}function Wm(e){return e&&(e.type==="ObjectProperty"||e.type==="Property"&&!TD(e))}var Fu=Ir(["TSAsExpression","TSSatisfiesExpression","AsExpression","AsConstExpression","SatisfiesExpression"]),id=Ir(["TSUnionType","UnionTypeAnnotation"]),DD=Ir(["TSIntersectionType","IntersectionTypeAnnotation"]),Zm=Ir(["TSConditionalType","ConditionalTypeAnnotation"]),CGe=e=>e?.type==="TSAsExpression"&&e.typeAnnotation.type==="TSTypeReference"&&e.typeAnnotation.typeName.type==="Identifier"&&e.typeAnnotation.typeName.name==="const",MU=Ir(["TSTypeAliasDeclaration","TypeAlias"]);function Ude({key:e,parent:t}){return!(e==="types"&&id(t)||e==="types"&&DD(t))}var PGe=new Set(["range","raw","comments","leadingComments","trailingComments","innerComments","extra","start","end","loc","flags","errors","tokens"]),Jv=e=>{for(let t of e.quasis)delete t.value};function zde(e,t,r){if(e.type==="Program"&&delete t.sourceType,(e.type==="BigIntLiteral"||e.type==="Literal")&&e.bigint&&(t.bigint=e.bigint.toLowerCase()),e.type==="EmptyStatement"&&!oz({node:e,parent:r})||e.type==="JSXText"||e.type==="JSXExpressionContainer"&&(e.expression.type==="Literal"||e.expression.type==="StringLiteral")&&e.expression.value===" ")return null;if((e.type==="Property"||e.type==="ObjectProperty"||e.type==="MethodDefinition"||e.type==="ClassProperty"||e.type==="ClassMethod"||e.type==="PropertyDefinition"||e.type==="TSDeclareMethod"||e.type==="TSPropertySignature"||e.type==="ObjectTypeProperty"||e.type==="ImportAttribute")&&e.key&&!e.computed){let{key:o}=e;fa(o)||od(o)?t.key=String(o.value):o.type==="Identifier"&&(t.key=o.name)}if(e.type==="JSXElement"&&e.openingElement.name.name==="style"&&e.openingElement.attributes.some(o=>o.type==="JSXAttribute"&&o.name.name==="jsx"))for(let{type:o,expression:i}of t.children)o==="JSXExpressionContainer"&&i.type==="TemplateLiteral"&&Jv(i);e.type==="JSXAttribute"&&e.name.name==="css"&&e.value.type==="JSXExpressionContainer"&&e.value.expression.type==="TemplateLiteral"&&Jv(t.value.expression),e.type==="JSXAttribute"&&e.value?.type==="Literal"&&/["']|"|'/u.test(e.value.value)&&(t.value.value=da(0,e.value.value,/["']|"|'/gu,'"'));let n=e.expression||e.callee;if(e.type==="Decorator"&&n.type==="CallExpression"&&n.callee.name==="Component"&&n.arguments.length===1){let o=e.expression.arguments[0].properties;for(let[i,a]of t.expression.arguments[0].properties.entries())switch(o[i].key.name){case"styles":Fa(a.value)&&Jv(a.value.elements[0]);break;case"template":a.value.type==="TemplateLiteral"&&Jv(a.value);break}}e.type==="TaggedTemplateExpression"&&(e.tag.type==="MemberExpression"||e.tag.type==="Identifier"&&(e.tag.name==="gql"||e.tag.name==="graphql"||e.tag.name==="css"||e.tag.name==="md"||e.tag.name==="markdown"||e.tag.name==="html")||e.tag.type==="CallExpression")&&Jv(t.quasi),e.type==="TemplateLiteral"&&Jv(t),e.type==="ChainExpression"&&e.expression.type==="TSNonNullExpression"&&(t.type="TSNonNullExpression",t.expression.type="ChainExpression")}zde.ignoredProperties=PGe;var OGe=zde,NGe=Ir(["File","TemplateElement","TSEmptyBodyFunctionExpression","ChainExpression"]),FGe=(e,[t])=>t?.type==="ComponentParameter"&&t.shorthand&&t.name===e&&t.local!==t.name||t?.type==="MatchObjectPatternProperty"&&t.shorthand&&t.key===e&&t.value!==t.key||t?.type==="ObjectProperty"&&t.shorthand&&t.key===e&&t.value!==t.key||t?.type==="Property"&&t.shorthand&&t.key===e&&!TD(t)&&t.value!==t.key,RGe=(e,[t])=>!!(e.type==="FunctionExpression"&&t.type==="MethodDefinition"&&t.value===e&&ss(e).length===0&&!e.returnType&&!jo(e.typeParameters)&&e.body),Qpe=(e,[t])=>t?.typeAnnotation===e&&CGe(t),LGe=(e,[t,...r])=>Qpe(e,[t])||t?.typeName===e&&Qpe(t,r);function $Ge(e,t){return NGe(e)||FGe(e,t)||RGe(e,t)?!1:e.type==="EmptyStatement"?oz({node:e,parent:t[0]}):!(LGe(e,t)||e.type==="TSTypeAnnotation"&&t[0].type==="TSPropertySignature")}var MGe=$Ge;function jGe(e){let t=e.type||e.kind||"(unknown type)",r=String(e.name||e.id&&(typeof e.id=="object"?e.id.name:e.id)||e.key&&(typeof e.key=="object"?e.key.name:e.key)||e.value&&(typeof e.value=="object"?"":String(e.value))||e.operator||"");return r.length>20&&(r=r.slice(0,19)+"\u2026"),t+(r?" "+r:"")}function uz(e,t){(e.comments??(e.comments=[])).push(t),t.printed=!1,t.nodeDescription=jGe(e)}function Ni(e,t){t.leading=!0,t.trailing=!1,uz(e,t)}function Mc(e,t,r){t.leading=!1,t.trailing=!1,r&&(t.marker=r),uz(e,t)}function ni(e,t){t.leading=!1,t.trailing=!0,uz(e,t)}function BGe(e,t){let r=null,n=t;for(;n!==r;)r=n,n=Hv(e,n),n=ez(e,n),n=tz(e,n),n=Zv(e,n);return n}var e1=BGe;function qGe(e,t){let r=e1(e,t);return r===!1?"":e.charAt(r)}var $u=qGe;function UGe(e,t,r){for(let n=t;nED(e)||!jc(t,Yr(e),Kr(e));function JGe(e){return[Yde,Kde,Wde,tHe,HGe,dz,_z,Vde,Gde,aHe,nHe,oHe,mz,Xde,sHe,Hde,Qde,fz,ZGe,fHe,e_e,hz].some(t=>t(e))}function VGe(e){return[GGe,Wde,Kde,Xde,dz,_z,Vde,Gde,Qde,rHe,iHe,mz,uHe,fz,dHe,_He,mHe,e_e,yHe,hHe,hz].some(t=>t(e))}function KGe(e){return[Yde,dz,_z,eHe,Hde,mz,YGe,XGe,fz,pHe,hz].some(t=>t(e))}function Tg(e,t){let r=(e.body||e.properties).find(({type:n})=>n!=="EmptyStatement");r?Ni(r,t):Mc(e,t)}function jU(e,t){e.type==="BlockStatement"?Tg(e,t):Ni(e,t)}function GGe({comment:e,followingNode:t}){return t&&Jde(e)?(Ni(t,e),!0):!1}function dz({comment:e,precedingNode:t,enclosingNode:r,followingNode:n,text:o}){if(r?.type!=="IfStatement"||!n)return!1;if($u(o,Kr(e))===")")return ni(t,e),!0;if(n.type==="BlockStatement"&&n===r.consequent&&Yr(e)>=Kr(t)&&Kr(e)<=Yr(n))return Ni(n,e),!0;if(t===r.consequent&&n===r.alternate){let i=e1(o,Kr(r.consequent));if(n.type==="BlockStatement"&&Yr(e)>=i&&Kr(e)<=Yr(n))return Ni(n,e),!0;if(Yr(e)"?(Mc(t,e),!0):!1}function eHe({comment:e,enclosingNode:t,text:r}){return $u(r,Kr(e))!==")"?!1:t&&(t_e(t)&&ss(t).length===0||Xv(t)&&qc(t).length===0)?(Mc(t,e),!0):(t?.type==="MethodDefinition"||t?.type==="TSAbstractMethodDefinition")&&ss(t.value).length===0?(Mc(t.value,e),!0):!1}function tHe({comment:e,precedingNode:t,enclosingNode:r,followingNode:n,text:o}){return t?.type==="ComponentTypeParameter"&&(r?.type==="DeclareComponent"||r?.type==="ComponentTypeAnnotation")&&n?.type!=="ComponentTypeParameter"||(t?.type==="ComponentParameter"||t?.type==="RestElement")&&r?.type==="ComponentDeclaration"&&$u(o,Kr(e))===")"?(ni(t,e),!0):!1}function Wde({comment:e,precedingNode:t,enclosingNode:r,followingNode:n,text:o}){return t?.type==="FunctionTypeParam"&&r?.type==="FunctionTypeAnnotation"&&n?.type!=="FunctionTypeParam"||(t?.type==="Identifier"||t?.type==="AssignmentPattern"||t?.type==="ObjectPattern"||t?.type==="ArrayPattern"||t?.type==="RestElement"||t?.type==="TSParameterProperty")&&t_e(r)&&$u(o,Kr(e))===")"?(ni(t,e),!0):!ju(e)&&n?.type==="BlockStatement"&&Zde(r)&&(r.type==="MethodDefinition"?r.value.body:r.body)===n&&e1(o,Kr(e))===Yr(n)?(Tg(n,e),!0):!1}function Qde({comment:e,enclosingNode:t}){return t?.type==="LabeledStatement"?(Ni(t,e),!0):!1}function fz({comment:e,enclosingNode:t}){return(t?.type==="ContinueStatement"||t?.type==="BreakStatement")&&!t.label?(ni(t,e),!0):!1}function rHe({comment:e,precedingNode:t,enclosingNode:r}){return jn(r)&&t&&r.callee===t&&r.arguments.length>0?(Ni(r.arguments[0],e),!0):!1}function nHe({comment:e,precedingNode:t,enclosingNode:r,followingNode:n}){return id(r)?(Qv(e)&&(n.prettierIgnore=!0,e.unignore=!0),t?(ni(t,e),!0):!1):(id(n)&&Qv(e)&&(n.types[0].prettierIgnore=!0,e.unignore=!0),!1)}function oHe({comment:e,precedingNode:t,enclosingNode:r,followingNode:n}){return r&&r.type==="MatchOrPattern"?(Qv(e)&&(n.prettierIgnore=!0,e.unignore=!0),t?(ni(t,e),!0):!1):(n&&n.type==="MatchOrPattern"&&Qv(e)&&(n.types[0].prettierIgnore=!0,e.unignore=!0),!1)}function iHe({comment:e,enclosingNode:t}){return Wm(t)?(Ni(t,e),!0):!1}function mz({comment:e,enclosingNode:t,ast:r,isLastComment:n}){return r?.body?.length===0?(n?Mc(r,e):Ni(r,e),!0):t?.type==="Program"&&t.body.length===0&&!jo(t.directives)?(n?Mc(t,e):Ni(t,e),!0):!1}function aHe({comment:e,enclosingNode:t,followingNode:r}){return(t?.type==="ForInStatement"||t?.type==="ForOfStatement")&&r!==t.body?(Ni(t,e),!0):!1}function Xde({comment:e,precedingNode:t,enclosingNode:r,text:n}){if(r?.type==="ImportSpecifier"||r?.type==="ExportSpecifier")return Ni(r,e),!0;let o=t?.type==="ImportSpecifier"&&r?.type==="ImportDeclaration",i=t?.type==="ExportSpecifier"&&r?.type==="ExportNamedDeclaration";return(o||i)&&nc(n,Kr(e))?(ni(t,e),!0):!1}function sHe({comment:e,enclosingNode:t}){return t?.type==="AssignmentPattern"?(Ni(t,e),!0):!1}var cHe=Ir(["VariableDeclarator","AssignmentExpression","TypeAlias","TSTypeAliasDeclaration"]),lHe=Ir(["ObjectExpression","ArrayExpression","TemplateLiteral","TaggedTemplateExpression","ObjectTypeAnnotation","TSTypeLiteral"]);function uHe({comment:e,enclosingNode:t,followingNode:r}){return cHe(t)&&r&&(lHe(r)||ju(e))?(Ni(r,e),!0):!1}function pHe({comment:e,enclosingNode:t,precedingNode:r,followingNode:n,text:o}){return!n&&(t?.type==="TSMethodSignature"||t?.type==="TSDeclareFunction"||t?.type==="TSAbstractMethodDefinition")&&(!r||r!==t.returnType)&&$u(o,Kr(e))===";"?(ni(t,e),!0):!1}function Yde({comment:e,enclosingNode:t,followingNode:r}){if(Qv(e)&&t?.type==="TSMappedType"&&r===t.key)return t.prettierIgnore=!0,e.unignore=!0,!0}function e_e({comment:e,precedingNode:t,enclosingNode:r}){if(r?.type==="TSMappedType"&&!t)return Mc(r,e),!0}function dHe({comment:e,enclosingNode:t,followingNode:r}){return!t||t.type!=="SwitchCase"||t.test||!r||r!==t.consequent[0]?!1:(r.type==="BlockStatement"&&ED(e)?Tg(r,e):Mc(t,e),!0)}function _He({comment:e,precedingNode:t,enclosingNode:r,followingNode:n}){return id(t)&&((r.type==="TSArrayType"||r.type==="ArrayTypeAnnotation")&&!n||DD(r))?(ni(Vn(0,t.types,-1),e),!0):!1}function fHe({comment:e,enclosingNode:t,precedingNode:r,followingNode:n}){if((t?.type==="ObjectPattern"||t?.type==="ArrayPattern")&&n?.type==="TSTypeAnnotation")return r?ni(r,e):Mc(t,e),!0}function mHe({comment:e,precedingNode:t,enclosingNode:r,followingNode:n,text:o}){return!n&&r?.type==="UnaryExpression"&&(t?.type==="LogicalExpression"||t?.type==="BinaryExpression")&&jc(o,Yr(r.argument),Yr(t.right))&&pz(e,o)&&!jc(o,Yr(t.right),Yr(e))?(ni(t.right,e),!0):!1}function hHe({enclosingNode:e,followingNode:t,comment:r}){if(e&&(e.type==="TSPropertySignature"||e.type==="ObjectTypeProperty")&&(id(t)||DD(t)))return Ni(t,r),!0}function hz({enclosingNode:e,precedingNode:t,followingNode:r,comment:n,text:o}){if(Fu(e)&&t===e.expression&&!pz(n,o))return r?Ni(r,n):ni(e,n),!0}function yHe({comment:e,enclosingNode:t,followingNode:r,precedingNode:n}){return t&&r&&n&&t.type==="ArrowFunctionExpression"&&t.returnType===n&&(n.type==="TSTypeAnnotation"||n.type==="TypeAnnotation")?(Ni(r,e),!0):!1}var t_e=Ir(["ArrowFunctionExpression","FunctionExpression","FunctionDeclaration","ObjectMethod","ClassMethod","TSDeclareFunction","TSCallSignatureDeclaration","TSConstructSignatureDeclaration","TSMethodSignature","TSConstructorType","TSFunctionType","TSDeclareMethod"]),gHe={endOfLine:VGe,ownLine:JGe,remaining:KGe},SHe=gHe;function vHe(e,{parser:t}){if(t==="flow"||t==="hermes"||t==="babel-flow")return e=da(0,e,/[\s(]/gu,""),e===""||e==="/*"||e==="/*::"}var bHe=vHe,xHe=Ir(["ClassDeclaration","ClassExpression","DeclareClass","DeclareInterface","InterfaceDeclaration","TSInterfaceDeclaration"]);function EHe(e){let{key:t,parent:r}=e;if(t==="types"&&id(r)||t==="argument"&&r.type==="JSXSpreadAttribute"||t==="expression"&&r.type==="JSXSpreadChild"||t==="superClass"&&(r.type==="ClassDeclaration"||r.type==="ClassExpression")||(t==="id"||t==="typeParameters")&&xHe(r)||t==="patterns"&&r.type==="MatchOrPattern")return!0;let{node:n}=e;return H3(n)?!1:id(n)?Ude(e):!!_a(n)}var THe=EHe,Dg="string",V_="array",t1="cursor",Ag="indent",Ig="align",wg="trim",$l="group",Qm="fill",nd="if-break",kg="indent-if-break",Cg="line-suffix",Xm="line-suffix-boundary",ic="line",G_="label",H_="break-parent",r_e=new Set([t1,Ag,Ig,wg,$l,Qm,nd,kg,Cg,Xm,ic,G_,H_]);function DHe(e){if(typeof e=="string")return Dg;if(Array.isArray(e))return V_;if(!e)return;let{type:t}=e;if(r_e.has(t))return t}var Ym=DHe,AHe=e=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(e);function IHe(e){let t=e===null?"null":typeof e;if(t!=="string"&&t!=="object")return`Unexpected doc '${t}', +Expected it to be 'string' or 'object'.`;if(Ym(e))throw new Error("doc is valid.");let r=Object.prototype.toString.call(e);if(r!=="[object Object]")return`Unexpected doc '${r}'.`;let n=AHe([...r_e].map(o=>`'${o}'`));return`Unexpected doc.type '${e.type}'. +Expected it to be ${n}.`}var wHe=class extends Error{name="InvalidDocError";constructor(e){super(IHe(e)),this.doc=e}},SD=wHe,Xpe={};function kHe(e,t,r,n){let o=[e];for(;o.length>0;){let i=o.pop();if(i===Xpe){r(o.pop());continue}r&&o.push(i,Xpe);let a=Ym(i);if(!a)throw new SD(i);if(t?.(i)!==!1)switch(a){case V_:case Qm:{let s=a===V_?i:i.parts;for(let c=s.length,p=c-1;p>=0;--p)o.push(s[p]);break}case nd:o.push(i.flatContents,i.breakContents);break;case $l:if(n&&i.expandedStates)for(let s=i.expandedStates.length,c=s-1;c>=0;--c)o.push(i.expandedStates[c]);else o.push(i.contents);break;case Ig:case Ag:case kg:case G_:case Cg:o.push(i.contents);break;case Dg:case t1:case wg:case Xm:case ic:case H_:break;default:throw new SD(i)}}}var yz=kHe;function r1(e,t){if(typeof e=="string")return t(e);let r=new Map;return n(e);function n(i){if(r.has(i))return r.get(i);let a=o(i);return r.set(i,a),a}function o(i){switch(Ym(i)){case V_:return t(i.map(n));case Qm:return t({...i,parts:i.parts.map(n)});case nd:return t({...i,breakContents:n(i.breakContents),flatContents:n(i.flatContents)});case $l:{let{expandedStates:a,contents:s}=i;return a?(a=a.map(n),s=a[0]):s=n(s),t({...i,contents:s,expandedStates:a})}case Ig:case Ag:case kg:case G_:case Cg:return t({...i,contents:n(i.contents)});case Dg:case t1:case wg:case Xm:case ic:case H_:return t(i);default:throw new SD(i)}}}function n_e(e,t,r){let n=r,o=!1;function i(a){if(o)return!1;let s=t(a);s!==void 0&&(o=!0,n=s)}return yz(e,i),n}function CHe(e){if(e.type===$l&&e.break||e.type===ic&&e.hard||e.type===H_)return!0}function Os(e){return n_e(e,CHe,!1)}function Ype(e){if(e.length>0){let t=Vn(0,e,-1);!t.expandedStates&&!t.break&&(t.break="propagated")}return null}function PHe(e){let t=new Set,r=[];function n(i){if(i.type===H_&&Ype(r),i.type===$l){if(r.push(i),t.has(i))return!1;t.add(i)}}function o(i){i.type===$l&&r.pop().break&&Ype(r)}yz(e,n,o,!0)}function OHe(e){return e.type===ic&&!e.hard?e.soft?"":" ":e.type===nd?e.flatContents:e}function U3(e){return r1(e,OHe)}function NHe(e){switch(Ym(e)){case Qm:if(e.parts.every(t=>t===""))return"";break;case $l:if(!e.contents&&!e.id&&!e.break&&!e.expandedStates)return"";if(e.contents.type===$l&&e.contents.id===e.id&&e.contents.break===e.break&&e.contents.expandedStates===e.expandedStates)return e.contents;break;case Ig:case Ag:case kg:case Cg:if(!e.contents)return"";break;case nd:if(!e.flatContents&&!e.breakContents)return"";break;case V_:{let t=[];for(let r of e){if(!r)continue;let[n,...o]=Array.isArray(r)?r:[r];typeof n=="string"&&typeof Vn(0,t,-1)=="string"?t[t.length-1]+=n:t.push(n),t.push(...o)}return t.length===0?"":t.length===1?t[0]:t}case Dg:case t1:case wg:case Xm:case ic:case G_:case H_:break;default:throw new SD(e)}return e}function gz(e){return r1(e,t=>NHe(t))}function xg(e,t=c_e){return r1(e,r=>typeof r=="string"?dn(t,r.split(` +`)):r)}function FHe(e){if(e.type===ic)return!0}function RHe(e){return n_e(e,FHe,!1)}function BU(e,t){return e.type===G_?{...e,contents:t(e.contents)}:t(e)}function LHe(e){let t=!0;return yz(e,r=>{switch(Ym(r)){case Dg:if(r==="")break;case wg:case Xm:case ic:case H_:return t=!1,!1}}),t}var ad=Eg,o_e=Eg,$He=Eg,MHe=Eg;function Fe(e){return ad(e),{type:Ag,contents:e}}function Mu(e,t){return MHe(e),ad(t),{type:Ig,contents:t,n:e}}function jHe(e){return Mu(Number.NEGATIVE_INFINITY,e)}function i_e(e){return Mu(-1,e)}function BHe(e,t,r){ad(e);let n=e;if(t>0){for(let o=0;o0&&c(a),y()}function m(){s>0&&p(s),y()}function y(){a=0,s=0}}function QHe(e,t,r){if(!t)return e;if(t.type==="root")return{...e,root:e};if(t===Number.NEGATIVE_INFINITY)return e.root;let n;return typeof t=="number"?t<0?n=WHe:n={type:2,width:t}:n={type:3,string:t},u_e(e,n,r)}function XHe(e,t){return u_e(e,ZHe,t)}function YHe(e){let t=0;for(let r=e.length-1;r>=0;r--){let n=e[r];if(n===" "||n===" ")t++;else break}return t}function p_e(e){let t=YHe(e);return{text:t===0?e:e.slice(0,e.length-t),count:t}}var rc=Symbol("MODE_BREAK"),rd=Symbol("MODE_FLAT"),qU=Symbol("DOC_FILL_PRINTED_LENGTH");function R3(e,t,r,n,o,i){if(r===Number.POSITIVE_INFINITY)return!0;let a=t.length,s=!1,c=[e],p="";for(;r>=0;){if(c.length===0){if(a===0)return!0;c.push(t[--a]);continue}let{mode:d,doc:f}=c.pop(),m=Ym(f);switch(m){case Dg:f&&(s&&(p+=" ",r-=1,s=!1),p+=f,r-=Gv(f));break;case V_:case Qm:{let y=m===V_?f:f.parts,g=f[qU]??0;for(let S=y.length-1;S>=g;S--)c.push({mode:d,doc:y[S]});break}case Ag:case Ig:case kg:case G_:c.push({mode:d,doc:f.contents});break;case wg:{let{text:y,count:g}=p_e(p);p=y,r+=g;break}case $l:{if(i&&f.break)return!1;let y=f.break?rc:d,g=f.expandedStates&&y===rc?Vn(0,f.expandedStates,-1):f.contents;c.push({mode:y,doc:g});break}case nd:{let y=(f.groupId?o[f.groupId]||rd:d)===rc?f.breakContents:f.flatContents;y&&c.push({mode:d,doc:y});break}case ic:if(d===rc||f.hard)return!0;f.soft||(s=!0);break;case Cg:n=!0;break;case Xm:if(n)return!1;break}}return!1}function d_e(e,t){let r=Object.create(null),n=t.printWidth,o=HHe(t.endOfLine),i=0,a=[{indent:l_e,mode:rc,doc:e}],s="",c=!1,p=[],d=[],f=[],m=[],y=0;for(PHe(e);a.length>0;){let{indent:I,mode:T,doc:k}=a.pop();switch(Ym(k)){case Dg:{let F=o!==` +`?da(0,k,` +`,o):k;F&&(s+=F,a.length>0&&(i+=Gv(F)));break}case V_:for(let F=k.length-1;F>=0;F--)a.push({indent:I,mode:T,doc:k[F]});break;case t1:if(d.length>=2)throw new Error("There are too many 'cursor' in doc.");d.push(y+s.length);break;case Ag:a.push({indent:XHe(I,t),mode:T,doc:k.contents});break;case Ig:a.push({indent:QHe(I,k.n,t),mode:T,doc:k.contents});break;case wg:E();break;case $l:switch(T){case rd:if(!c){a.push({indent:I,mode:k.break?rc:rd,doc:k.contents});break}case rc:{c=!1;let F={indent:I,mode:rd,doc:k.contents},O=n-i,$=p.length>0;if(!k.break&&R3(F,a,O,$,r))a.push(F);else if(k.expandedStates){let N=Vn(0,k.expandedStates,-1);if(k.break){a.push({indent:I,mode:rc,doc:N});break}else for(let U=1;U=k.expandedStates.length){a.push({indent:I,mode:rc,doc:N});break}else{let ge=k.expandedStates[U],Te={indent:I,mode:rd,doc:ge};if(R3(Te,a,O,$,r)){a.push(Te);break}}}else a.push({indent:I,mode:rc,doc:k.contents});break}}k.id&&(r[k.id]=Vn(0,a,-1).mode);break;case Qm:{let F=n-i,O=k[qU]??0,{parts:$}=k,N=$.length-O;if(N===0)break;let U=$[O+0],ge=$[O+1],Te={indent:I,mode:rd,doc:U},ke={indent:I,mode:rc,doc:U},Je=R3(Te,[],F,p.length>0,r,!0);if(N===1){Je?a.push(Te):a.push(ke);break}let me={indent:I,mode:rd,doc:ge},xe={indent:I,mode:rc,doc:ge};if(N===2){Je?a.push(me,Te):a.push(xe,ke);break}let Rt=$[O+2],Jt={indent:I,mode:T,doc:{...k,[qU]:O+2}},Yt=R3({indent:I,mode:rd,doc:[U,ge,Rt]},[],F,p.length>0,r,!0);a.push(Jt),Yt?a.push(me,Te):Je?a.push(xe,Te):a.push(xe,ke);break}case nd:case kg:{let F=k.groupId?r[k.groupId]:T;if(F===rc){let O=k.type===nd?k.breakContents:k.negate?k.contents:Fe(k.contents);O&&a.push({indent:I,mode:T,doc:O})}if(F===rd){let O=k.type===nd?k.flatContents:k.negate?Fe(k.contents):k.contents;O&&a.push({indent:I,mode:T,doc:O})}break}case Cg:p.push({indent:I,mode:T,doc:k.contents});break;case Xm:p.length>0&&a.push({indent:I,mode:T,doc:s_e});break;case ic:switch(T){case rd:if(k.hard)c=!0;else{k.soft||(s+=" ",i+=1);break}case rc:if(p.length>0){a.push({indent:I,mode:T,doc:k},...p.reverse()),p.length=0;break}k.literal?(s+=o,i=0,I.root&&(I.root.value&&(s+=I.root.value),i=I.root.length)):(E(),s+=o+I.value,i=I.length);break}break;case G_:a.push({indent:I,mode:T,doc:k.contents});break;case H_:break;default:throw new SD(k)}a.length===0&&p.length>0&&(a.push(...p.reverse()),p.length=0)}let g=f.join("")+s,S=[...m,...d];if(S.length!==2)return{formatted:g};let b=S[0];return{formatted:g,cursorNodeStart:b,cursorNodeText:g.slice(b,Vn(0,S,-1))};function E(){let{text:I,count:T}=p_e(s);I&&(f.push(I),y+=I.length),s="",i-=T,d.length>0&&(m.push(...d.map(k=>Math.min(k,y))),d.length=0)}}function eZe(e,t,r=0){let n=0;for(let o=r;o{if(i.push(r()),p.tail)return;let{tabWidth:d}=t,f=p.value.raw,m=f.includes(` +`)?nZe(f,d):s;s=m;let y=a[c],g=n[o][c],S=jc(t.originalText,Kr(p),Yr(n.quasis[c+1]));if(!S){let E=d_e(y,{...t,printWidth:Number.POSITIVE_INFINITY}).formatted;E.includes(` +`)?S=!0:y=E}S&&(rt(g)||g.type==="Identifier"||Mo(g)||g.type==="ConditionalExpression"||g.type==="SequenceExpression"||Fu(g)||J_(g))&&(y=[Fe([Pe,y]),Pe]);let b=m===0&&f.endsWith(` +`)?Mu(Number.NEGATIVE_INFINITY,y):BHe(y,m,d);i.push(de(["${",b,sd,"}"]))},"quasis"),i.push("`"),i}function oZe(e,t,r){let n=r("quasi"),{node:o}=e,i="",a=bg(o.quasi,St.Leading)[0];return a&&(jc(t.originalText,Kr(o.typeArguments??o.tag),Yr(a))?i=Pe:i=" "),AD(n.label&&{tagged:!0,...n.label},[r("tag"),r("typeArguments"),i,sd,n])}function iZe(e,t,r){let{node:n}=e,o=n.quasis[0].value.raw.trim().split(/\s*\|\s*/u);if(o.length>1||o.some(i=>i.length>0)){t.__inJestEach=!0;let i=e.map(r,"expressions");t.__inJestEach=!1;let a=i.map(f=>"${"+d_e(f,{...t,printWidth:Number.POSITIVE_INFINITY,endOfLine:"lf"}).formatted+"}"),s=[{hasLineBreak:!1,cells:[]}];for(let f=1;ff.cells.length)),p=Array.from({length:c}).fill(0),d=[{cells:o},...s.filter(f=>f.cells.length>0)];for(let{cells:f}of d.filter(m=>!m.hasLineBreak))for(let[m,y]of f.entries())p[m]=Math.max(p[m],Gv(y));return[sd,"`",Fe([Be,dn(Be,d.map(f=>dn(" | ",f.cells.map((m,y)=>f.hasLineBreak?m:m+" ".repeat(p[y]-Gv(m))))))]),Be,"`"]}}function aZe(e,t){let{node:r}=e,n=t();return rt(r)&&(n=de([Fe([Pe,n]),Pe])),["${",n,sd,"}"]}function Sz(e,t){return e.map(()=>aZe(e,t),"expressions")}function f_e(e,t){return r1(e,r=>typeof r=="string"?t?da(0,r,/(\\*)`/gu,"$1$1\\`"):m_e(r):r)}function m_e(e){return da(0,e,/([\\`]|\$\{)/gu,"\\$1")}function sZe({node:e,parent:t}){let r=/^[fx]?(?:describe|it|test)$/u;return t.type==="TaggedTemplateExpression"&&t.quasi===e&&t.tag.type==="MemberExpression"&&t.tag.property.type==="Identifier"&&t.tag.property.name==="each"&&(t.tag.object.type==="Identifier"&&r.test(t.tag.object.name)||t.tag.object.type==="MemberExpression"&&t.tag.object.property.type==="Identifier"&&(t.tag.object.property.name==="only"||t.tag.object.property.name==="skip")&&t.tag.object.object.type==="Identifier"&&r.test(t.tag.object.object.name))}var UU=[(e,t)=>e.type==="ObjectExpression"&&t==="properties",(e,t)=>e.type==="CallExpression"&&e.callee.type==="Identifier"&&e.callee.name==="Component"&&t==="arguments",(e,t)=>e.type==="Decorator"&&t==="expression"];function cZe(e){let t=n=>n.type==="TemplateLiteral",r=(n,o)=>Wm(n)&&!n.computed&&n.key.type==="Identifier"&&n.key.name==="styles"&&o==="value";return e.match(t,(n,o)=>Fa(n)&&o==="elements",r,...UU)||e.match(t,r,...UU)}function lZe(e){return e.match(t=>t.type==="TemplateLiteral",(t,r)=>Wm(t)&&!t.computed&&t.key.type==="Identifier"&&t.key.name==="template"&&r==="value",...UU)}function IU(e,t){return rt(e,St.Block|St.Leading,({value:r})=>r===` ${t} `)}function h_e({node:e,parent:t},r){return IU(e,r)||uZe(t)&&IU(t,r)||t.type==="ExpressionStatement"&&IU(t,r)}function uZe(e){return e.type==="AsConstExpression"||e.type==="TSAsExpression"&&e.typeAnnotation.type==="TSTypeReference"&&e.typeAnnotation.typeName.type==="Identifier"&&e.typeAnnotation.typeName.name==="const"}async function pZe(e,t,r){let{node:n}=r,o="";for(let[c,p]of n.quasis.entries()){let{raw:d}=p.value;c>0&&(o+="@prettier-placeholder-"+(c-1)+"-id"),o+=d}let i=await e(o,{parser:"scss"}),a=Sz(r,t),s=dZe(i,a);if(!s)throw new Error("Couldn't insert all the expressions");return["`",Fe([Be,s]),Pe,"`"]}function dZe(e,t){if(!jo(t))return e;let r=0,n=r1(gz(e),o=>typeof o!="string"||!o.includes("@prettier-placeholder")?o:o.split(/@prettier-placeholder-(\d+)-id/u).map((i,a)=>a%2===0?xg(i):(r++,t[i])));return t.length===r?n:null}function _Ze(e){return e.match(void 0,(t,r)=>r==="quasi"&&t.type==="TaggedTemplateExpression"&&nz(t.tag,["css","css.global","css.resolve"]))||e.match(void 0,(t,r)=>r==="expression"&&t.type==="JSXExpressionContainer",(t,r)=>r==="children"&&t.type==="JSXElement"&&t.openingElement.name.type==="JSXIdentifier"&&t.openingElement.name.name==="style"&&t.openingElement.attributes.some(n=>n.type==="JSXAttribute"&&n.name.type==="JSXIdentifier"&&n.name.name==="jsx"))}function L3(e){return e.type==="Identifier"&&e.name==="styled"}function tde(e){return/^[A-Z]/u.test(e.object.name)&&e.property.name==="extend"}function fZe({parent:e}){if(!e||e.type!=="TaggedTemplateExpression")return!1;let t=e.tag.type==="ParenthesizedExpression"?e.tag.expression:e.tag;switch(t.type){case"MemberExpression":return L3(t.object)||tde(t);case"CallExpression":return L3(t.callee)||t.callee.type==="MemberExpression"&&(t.callee.object.type==="MemberExpression"&&(L3(t.callee.object.object)||tde(t.callee.object))||t.callee.object.type==="CallExpression"&&L3(t.callee.object.callee));case"Identifier":return t.name==="css";default:return!1}}function mZe({parent:e,grandparent:t}){return t?.type==="JSXAttribute"&&e.type==="JSXExpressionContainer"&&t.name.type==="JSXIdentifier"&&t.name.name==="css"}var hZe=e=>_Ze(e)||fZe(e)||mZe(e)||cZe(e);async function yZe(e,t,r){let{node:n}=r,o=n.quasis.length,i=Sz(r,t),a=[];for(let s=0;s2&&m[0].trim()===""&&m[1].trim()==="",b=y>2&&m[y-1].trim()===""&&m[y-2].trim()==="",E=m.every(T=>/^\s*(?:#[^\n\r]*)?$/u.test(T));if(!d&&/#[^\n\r]*$/u.test(m[y-1]))return null;let I=null;E?I=gZe(m):I=await e(f,{parser:"graphql"}),I?(I=f_e(I,!1),!p&&S&&a.push(""),a.push(I),!d&&b&&a.push("")):!p&&!d&&S&&a.push(""),g&&a.push(g)}return["`",Fe([Be,dn(Be,a)]),Be,"`"]}function gZe(e){let t=[],r=!1,n=e.map(o=>o.trim());for(let[o,i]of n.entries())i!==""&&(n[o-1]===""&&r?t.push([Be,i]):t.push(i),r=!0);return t.length===0?null:dn(Be,t)}function SZe({node:e,parent:t}){return h_e({node:e,parent:t},"GraphQL")||t&&(t.type==="TaggedTemplateExpression"&&(t.tag.type==="MemberExpression"&&t.tag.object.name==="graphql"&&t.tag.property.name==="experimental"||t.tag.type==="Identifier"&&(t.tag.name==="gql"||t.tag.name==="graphql"))||t.type==="CallExpression"&&t.callee.type==="Identifier"&&t.callee.name==="graphql")}var wU=0;async function y_e(e,t,r,n,o){let{node:i}=n,a=wU;wU=wU+1>>>0;let s=E=>`PRETTIER_HTML_PLACEHOLDER_${E}_${a}_IN_JS`,c=i.quasis.map((E,I,T)=>I===T.length-1?E.value.cooked:E.value.cooked+s(I)).join(""),p=Sz(n,r),d=new RegExp(s("(\\d+)"),"gu"),f=0,m=await t(c,{parser:e,__onHtmlRoot(E){f=E.children.length}}),y=r1(m,E=>{if(typeof E!="string")return E;let I=[],T=E.split(d);for(let k=0;k1?Fe(de(y)):de(y),S,"`"]))}function vZe(e){return h_e(e,"HTML")||e.match(t=>t.type==="TemplateLiteral",(t,r)=>t.type==="TaggedTemplateExpression"&&t.tag.type==="Identifier"&&t.tag.name==="html"&&r==="quasi")}var bZe=y_e.bind(void 0,"html"),xZe=y_e.bind(void 0,"angular");async function EZe(e,t,r){let{node:n}=r,o=da(0,n.quasis[0].value.raw,/((?:\\\\)*)\\`/gu,(c,p)=>"\\".repeat(p.length/2)+"`"),i=TZe(o),a=i!=="";a&&(o=da(0,o,new RegExp(`^${i}`,"gmu"),""));let s=f_e(await e(o,{parser:"markdown",__inJsTemplate:!0}),!0);return["`",a?Fe([Pe,s]):[c_e,jHe(s)],Pe,"`"]}function TZe(e){let t=e.match(/^([^\S\n]*)\S/mu);return t===null?"":t[1]}function DZe({node:e,parent:t}){return t?.type==="TaggedTemplateExpression"&&e.quasis.length===1&&t.tag.type==="Identifier"&&(t.tag.name==="md"||t.tag.name==="markdown")}var AZe=[{test:hZe,print:pZe},{test:SZe,print:yZe},{test:vZe,print:bZe},{test:lZe,print:xZe},{test:DZe,print:EZe}].map(({test:e,print:t})=>({test:e,print:wZe(t)}));function IZe(e){let{node:t}=e;if(t.type!=="TemplateLiteral"||kZe(t))return;let r=AZe.find(({test:n})=>n(e));if(r)return t.quasis.length===1&&t.quasis[0].value.raw.trim()===""?"``":r.print}function wZe(e){return async(...t)=>{let r=await e(...t);return r&&AD({embed:!0,...r.label},r)}}function kZe({quasis:e}){return e.some(({value:{cooked:t}})=>t===null)}var CZe=IZe,PZe=/\*\/$/,OZe=/^\/\*\*?/,g_e=/^\s*(\/\*\*?(.|\r?\n)*?\*\/)/,NZe=/(^|\s+)\/\/([^\n\r]*)/g,rde=/^(\r?\n)+/,FZe=/(?:^|\r?\n) *(@[^\n\r]*?) *\r?\n *(?![^\n\r@]*\/\/[^]*)([^\s@][^\n\r@]+?) *\r?\n/g,nde=/(?:^|\r?\n) *@(\S+) *([^\n\r]*)/g,RZe=/(\r?\n|^) *\* ?/g,S_e=[];function LZe(e){let t=e.match(g_e);return t?t[0].trimStart():""}function $Ze(e){let t=e.match(g_e)?.[0];return t==null?e:e.slice(t.length)}function MZe(e){e=da(0,e.replace(OZe,"").replace(PZe,""),RZe,"$1");let t="";for(;t!==e;)t=e,e=da(0,e,FZe,` +$1 $2 +`);e=e.replace(rde,"").trimEnd();let r=Object.create(null),n=da(0,e,nde,"").replace(rde,"").trimEnd(),o;for(;o=nde.exec(e);){let i=da(0,o[2],NZe,"");if(typeof r[o[1]]=="string"||Array.isArray(r[o[1]])){let a=r[o[1]];r[o[1]]=[...S_e,...Array.isArray(a)?a:[a],i]}else r[o[1]]=i}return{comments:n,pragmas:r}}function jZe({comments:e="",pragmas:t={}}){let r=Object.keys(t),n=r.flatMap(i=>ode(i,t[i])).map(i=>` * ${i} +`).join("");if(!e){if(r.length===0)return"";if(r.length===1&&!Array.isArray(t[r[0]])){let i=t[r[0]];return`/** ${ode(r[0],i)[0]} */`}}let o=e.split(` +`).map(i=>` * ${i}`).join(` +`)+` +`;return`/** +`+(e?o:"")+(e&&r.length>0?` * +`:"")+n+" */"}function ode(e,t){return[...S_e,...Array.isArray(t)?t:[t]].map(r=>`@${e} ${r}`.trim())}var BZe="format";function qZe(e){if(!e.startsWith("#!"))return"";let t=e.indexOf(` +`);return t===-1?e:e.slice(0,t)}var UZe=qZe;function zZe(e){let t=UZe(e);t&&(e=e.slice(t.length+1));let r=LZe(e),{pragmas:n,comments:o}=MZe(r);return{shebang:t,text:e,pragmas:n,comments:o}}function JZe(e){let{shebang:t,text:r,pragmas:n,comments:o}=zZe(e),i=$Ze(r),a=jZe({pragmas:{[BZe]:"",...n},comments:o.trimStart()});return(t?`${t} +`:"")+a+(i.startsWith(` +`)?` +`:` + +`)+i}function VZe(e){if(!ju(e))return!1;let t=`*${e.value}*`.split(` +`);return t.length>1&&t.every(r=>r.trimStart()[0]==="*")}var kU=new WeakMap;function KZe(e){return kU.has(e)||kU.set(e,VZe(e)),kU.get(e)}var GZe=KZe;function HZe(e,t){let r=e.node;if(ED(r))return t.originalText.slice(Yr(r),Kr(r)).trimEnd();if(GZe(r))return ZZe(r);if(ju(r))return["/*",xg(r.value),"*/"];throw new Error("Not a comment: "+JSON.stringify(r))}function ZZe(e){let t=e.value.split(` +`);return["/*",dn(Be,t.map((r,n)=>n===0?r.trimEnd():" "+(na.type==="ForOfStatement")?.left;if(i&&Ps(i,a=>a===r))return!0}if(n==="object"&&r.name==="let"&&o.type==="MemberExpression"&&o.computed&&!o.optional){let i=e.findAncestor(s=>s.type==="ExpressionStatement"||s.type==="ForStatement"||s.type==="ForInStatement"),a=i?i.type==="ExpressionStatement"?i.expression:i.type==="ForStatement"?i.init:i.left:void 0;if(a&&Ps(a,s=>s===r))return!0}if(n==="expression")switch(r.name){case"await":case"interface":case"module":case"using":case"yield":case"let":case"component":case"hook":case"type":{let i=e.findAncestor(a=>!Fu(a));if(i!==o&&i.type==="ExpressionStatement")return!0}}return!1}if(r.type==="ObjectExpression"||r.type==="FunctionExpression"||r.type==="ClassExpression"||r.type==="DoExpression"){let i=e.findAncestor(a=>a.type==="ExpressionStatement")?.expression;if(i&&Ps(i,a=>a===r))return!0}if(r.type==="ObjectExpression"){let i=e.findAncestor(a=>a.type==="ArrowFunctionExpression")?.body;if(i&&i.type!=="SequenceExpression"&&i.type!=="AssignmentExpression"&&Ps(i,a=>a===r))return!0}switch(o.type){case"ParenthesizedExpression":return!1;case"ClassDeclaration":case"ClassExpression":if(n==="superClass"&&(r.type==="ArrowFunctionExpression"||r.type==="AssignmentExpression"||r.type==="AwaitExpression"||r.type==="BinaryExpression"||r.type==="ConditionalExpression"||r.type==="LogicalExpression"||r.type==="NewExpression"||r.type==="ObjectExpression"||r.type==="SequenceExpression"||r.type==="TaggedTemplateExpression"||r.type==="UnaryExpression"||r.type==="UpdateExpression"||r.type==="YieldExpression"||r.type==="TSNonNullExpression"||r.type==="ClassExpression"&&jo(r.decorators)))return!0;break;case"ExportDefaultDeclaration":return v_e(e,t)||r.type==="SequenceExpression";case"Decorator":if(n==="expression"&&!tWe(r))return!0;break;case"TypeAnnotation":if(e.match(void 0,void 0,(i,a)=>a==="returnType"&&i.type==="ArrowFunctionExpression")&&XZe(r))return!0;break;case"BinaryExpression":if(n==="left"&&(o.operator==="in"||o.operator==="instanceof")&&r.type==="UnaryExpression")return!0;break;case"VariableDeclarator":if(n==="init"&&e.match(void 0,void 0,(i,a)=>a==="declarations"&&i.type==="VariableDeclaration",(i,a)=>a==="left"&&i.type==="ForInStatement"))return!0;break}switch(r.type){case"UpdateExpression":if(o.type==="UnaryExpression")return r.prefix&&(r.operator==="++"&&o.operator==="+"||r.operator==="--"&&o.operator==="-");case"UnaryExpression":switch(o.type){case"UnaryExpression":return r.operator===o.operator&&(r.operator==="+"||r.operator==="-");case"BindExpression":return!0;case"MemberExpression":case"OptionalMemberExpression":return n==="object";case"TaggedTemplateExpression":return!0;case"NewExpression":case"CallExpression":case"OptionalCallExpression":return n==="callee";case"BinaryExpression":return n==="left"&&o.operator==="**";case"TSNonNullExpression":return!0;default:return!1}case"BinaryExpression":if(o.type==="UpdateExpression"||r.operator==="in"&&QZe(e))return!0;if(r.operator==="|>"&&r.extra?.parenthesized){let i=e.grandparent;if(i.type==="BinaryExpression"&&i.operator==="|>")return!0}case"TSTypeAssertion":case"TSAsExpression":case"TSSatisfiesExpression":case"AsExpression":case"AsConstExpression":case"SatisfiesExpression":case"LogicalExpression":switch(o.type){case"TSAsExpression":case"TSSatisfiesExpression":case"AsExpression":case"AsConstExpression":case"SatisfiesExpression":return!Fu(r);case"ConditionalExpression":return Fu(r)||fGe(r);case"CallExpression":case"NewExpression":case"OptionalCallExpression":return n==="callee";case"ClassExpression":case"ClassDeclaration":return n==="superClass";case"TSTypeAssertion":case"TaggedTemplateExpression":case"UnaryExpression":case"JSXSpreadAttribute":case"SpreadElement":case"BindExpression":case"AwaitExpression":case"TSNonNullExpression":case"UpdateExpression":return!0;case"MemberExpression":case"OptionalMemberExpression":return n==="object";case"AssignmentExpression":case"AssignmentPattern":return n==="left"&&(r.type==="TSTypeAssertion"||Fu(r));case"LogicalExpression":if(r.type==="LogicalExpression")return o.operator!==r.operator;case"BinaryExpression":{let{operator:i,type:a}=r;if(!i&&a!=="TSTypeAssertion")return!0;let s=B3(i),c=o.operator,p=B3(c);return!!(p>s||n==="right"&&p===s||p===s&&!lz(c,i)||p");default:return!1}case"TSFunctionType":if(e.match(i=>i.type==="TSFunctionType",(i,a)=>a==="typeAnnotation"&&i.type==="TSTypeAnnotation",(i,a)=>a==="returnType"&&i.type==="ArrowFunctionExpression"))return!0;case"TSConditionalType":case"TSConstructorType":case"ConditionalTypeAnnotation":if(n==="extendsType"&&Zm(r)&&o.type===r.type||n==="checkType"&&Zm(o))return!0;if(n==="extendsType"&&o.type==="TSConditionalType"){let{typeAnnotation:i}=r.returnType||r.typeAnnotation;if(i.type==="TSTypePredicate"&&i.typeAnnotation&&(i=i.typeAnnotation.typeAnnotation),i.type==="TSInferType"&&i.typeParameter.constraint)return!0}case"TSUnionType":case"TSIntersectionType":if(id(o)||DD(o))return!0;case"TSInferType":if(r.type==="TSInferType"){if(o.type==="TSRestType")return!1;if(n==="types"&&(o.type==="TSUnionType"||o.type==="TSIntersectionType")&&r.typeParameter.type==="TSTypeParameter"&&r.typeParameter.constraint)return!0}case"TSTypeOperator":return o.type==="TSArrayType"||o.type==="TSOptionalType"||o.type==="TSRestType"||n==="objectType"&&o.type==="TSIndexedAccessType"||o.type==="TSTypeOperator"||o.type==="TSTypeAnnotation"&&e.grandparent.type.startsWith("TSJSDoc");case"TSTypeQuery":return n==="objectType"&&o.type==="TSIndexedAccessType"||n==="elementType"&&o.type==="TSArrayType";case"TypeOperator":return o.type==="ArrayTypeAnnotation"||o.type==="NullableTypeAnnotation"||n==="objectType"&&(o.type==="IndexedAccessType"||o.type==="OptionalIndexedAccessType")||o.type==="TypeOperator";case"TypeofTypeAnnotation":return n==="objectType"&&(o.type==="IndexedAccessType"||o.type==="OptionalIndexedAccessType")||n==="elementType"&&o.type==="ArrayTypeAnnotation";case"ArrayTypeAnnotation":return o.type==="NullableTypeAnnotation";case"IntersectionTypeAnnotation":case"UnionTypeAnnotation":return o.type==="TypeOperator"||o.type==="KeyofTypeAnnotation"||o.type==="ArrayTypeAnnotation"||o.type==="NullableTypeAnnotation"||o.type==="IntersectionTypeAnnotation"||o.type==="UnionTypeAnnotation"||n==="objectType"&&(o.type==="IndexedAccessType"||o.type==="OptionalIndexedAccessType");case"InferTypeAnnotation":case"NullableTypeAnnotation":return o.type==="ArrayTypeAnnotation"||n==="objectType"&&(o.type==="IndexedAccessType"||o.type==="OptionalIndexedAccessType");case"ComponentTypeAnnotation":case"FunctionTypeAnnotation":{if(r.type==="ComponentTypeAnnotation"&&(r.rendersType===null||r.rendersType===void 0))return!1;if(e.match(void 0,(a,s)=>s==="typeAnnotation"&&a.type==="TypeAnnotation",(a,s)=>s==="returnType"&&a.type==="ArrowFunctionExpression")||e.match(void 0,(a,s)=>s==="typeAnnotation"&&a.type==="TypePredicate",(a,s)=>s==="typeAnnotation"&&a.type==="TypeAnnotation",(a,s)=>s==="returnType"&&a.type==="ArrowFunctionExpression"))return!0;let i=o.type==="NullableTypeAnnotation"?e.grandparent:o;return i.type==="UnionTypeAnnotation"||i.type==="IntersectionTypeAnnotation"||i.type==="ArrayTypeAnnotation"||n==="objectType"&&(i.type==="IndexedAccessType"||i.type==="OptionalIndexedAccessType")||n==="checkType"&&o.type==="ConditionalTypeAnnotation"||n==="extendsType"&&o.type==="ConditionalTypeAnnotation"&&r.returnType?.type==="InferTypeAnnotation"&&r.returnType?.typeParameter.bound||i.type==="NullableTypeAnnotation"||o.type==="FunctionTypeParam"&&o.name===null&&ss(r).some(a=>a.typeAnnotation?.type==="NullableTypeAnnotation")}case"OptionalIndexedAccessType":return n==="objectType"&&o.type==="IndexedAccessType";case"StringLiteral":case"NumericLiteral":case"Literal":if(typeof r.value=="string"&&o.type==="ExpressionStatement"&&typeof o.directive!="string"){let i=e.grandparent;return i.type==="Program"||i.type==="BlockStatement"}return n==="object"&&Mo(o)&&od(r);case"AssignmentExpression":return!((n==="init"||n==="update")&&o.type==="ForStatement"||n==="expression"&&r.left.type!=="ObjectPattern"&&o.type==="ExpressionStatement"||n==="key"&&o.type==="TSPropertySignature"||o.type==="AssignmentExpression"||n==="expressions"&&o.type==="SequenceExpression"&&e.match(void 0,void 0,(i,a)=>(a==="init"||a==="update")&&i.type==="ForStatement")||n==="value"&&o.type==="Property"&&e.match(void 0,void 0,(i,a)=>a==="properties"&&i.type==="ObjectPattern")||o.type==="NGChainedExpression"||n==="node"&&o.type==="JsExpressionRoot");case"ConditionalExpression":switch(o.type){case"TaggedTemplateExpression":case"UnaryExpression":case"SpreadElement":case"BinaryExpression":case"LogicalExpression":case"NGPipeExpression":case"ExportDefaultDeclaration":case"AwaitExpression":case"JSXSpreadAttribute":case"TSTypeAssertion":case"TypeCastExpression":case"TSAsExpression":case"TSSatisfiesExpression":case"AsExpression":case"AsConstExpression":case"SatisfiesExpression":case"TSNonNullExpression":return!0;case"NewExpression":case"CallExpression":case"OptionalCallExpression":return n==="callee";case"ConditionalExpression":return t.experimentalTernaries?!1:n==="test";case"MemberExpression":case"OptionalMemberExpression":return n==="object";default:return!1}case"FunctionExpression":switch(o.type){case"NewExpression":case"CallExpression":case"OptionalCallExpression":return n==="callee";case"TaggedTemplateExpression":return!0;default:return!1}case"ArrowFunctionExpression":switch(o.type){case"BinaryExpression":return o.operator!=="|>"||r.extra?.parenthesized;case"NewExpression":case"CallExpression":case"OptionalCallExpression":return n==="callee";case"MemberExpression":case"OptionalMemberExpression":return n==="object";case"TSAsExpression":case"TSSatisfiesExpression":case"AsExpression":case"AsConstExpression":case"SatisfiesExpression":case"TSNonNullExpression":case"BindExpression":case"TaggedTemplateExpression":case"UnaryExpression":case"LogicalExpression":case"AwaitExpression":case"TSTypeAssertion":case"MatchExpressionCase":return!0;case"TSInstantiationExpression":return n==="expression";case"ConditionalExpression":return n==="test";default:return!1}case"ClassExpression":return o.type==="NewExpression"?n==="callee":!1;case"OptionalMemberExpression":case"OptionalCallExpression":case"CallExpression":case"MemberExpression":if(eWe(e))return!0;case"TaggedTemplateExpression":case"TSNonNullExpression":if(n==="callee"&&(o.type==="BindExpression"||o.type==="NewExpression")){let i=r;for(;i;)switch(i.type){case"CallExpression":case"OptionalCallExpression":return!0;case"MemberExpression":case"OptionalMemberExpression":case"BindExpression":i=i.object;break;case"TaggedTemplateExpression":i=i.tag;break;case"TSNonNullExpression":i=i.expression;break;default:return!1}}return!1;case"BindExpression":return n==="callee"&&(o.type==="BindExpression"||o.type==="NewExpression")||n==="object"&&Mo(o);case"NGPipeExpression":return!(o.type==="NGRoot"||o.type==="NGMicrosyntaxExpression"||o.type==="ObjectProperty"&&!r.extra?.parenthesized||Fa(o)||n==="arguments"&&jn(o)||n==="right"&&o.type==="NGPipeExpression"||n==="property"&&o.type==="MemberExpression"||o.type==="AssignmentExpression");case"JSXFragment":case"JSXElement":return n==="callee"||n==="left"&&o.type==="BinaryExpression"&&o.operator==="<"||!Fa(o)&&o.type!=="ArrowFunctionExpression"&&o.type!=="AssignmentExpression"&&o.type!=="AssignmentPattern"&&o.type!=="BinaryExpression"&&o.type!=="NewExpression"&&o.type!=="ConditionalExpression"&&o.type!=="ExpressionStatement"&&o.type!=="JsExpressionRoot"&&o.type!=="JSXAttribute"&&o.type!=="JSXElement"&&o.type!=="JSXExpressionContainer"&&o.type!=="JSXFragment"&&o.type!=="LogicalExpression"&&!jn(o)&&!Wm(o)&&o.type!=="ReturnStatement"&&o.type!=="ThrowStatement"&&o.type!=="TypeCastExpression"&&o.type!=="VariableDeclarator"&&o.type!=="YieldExpression"&&o.type!=="MatchExpressionCase";case"TSInstantiationExpression":return n==="object"&&Mo(o);case"MatchOrPattern":return o.type==="MatchAsPattern"}return!1}var WZe=Ir(["BlockStatement","BreakStatement","ComponentDeclaration","ClassBody","ClassDeclaration","ClassMethod","ClassProperty","PropertyDefinition","ClassPrivateProperty","ContinueStatement","DebuggerStatement","DeclareComponent","DeclareClass","DeclareExportAllDeclaration","DeclareExportDeclaration","DeclareFunction","DeclareHook","DeclareInterface","DeclareModule","DeclareModuleExports","DeclareNamespace","DeclareVariable","DeclareEnum","DoWhileStatement","EnumDeclaration","ExportAllDeclaration","ExportDefaultDeclaration","ExportNamedDeclaration","ExpressionStatement","ForInStatement","ForOfStatement","ForStatement","FunctionDeclaration","HookDeclaration","IfStatement","ImportDeclaration","InterfaceDeclaration","LabeledStatement","MethodDefinition","ReturnStatement","SwitchStatement","ThrowStatement","TryStatement","TSDeclareFunction","TSEnumDeclaration","TSImportEqualsDeclaration","TSInterfaceDeclaration","TSModuleDeclaration","TSNamespaceExportDeclaration","TypeAlias","VariableDeclaration","WhileStatement","WithStatement"]);function QZe(e){let t=0,{node:r}=e;for(;r;){let n=e.getParentNode(t++);if(n?.type==="ForStatement"&&n.init===r)return!0;r=n}return!1}function XZe(e){return LU(e,t=>t.type==="ObjectTypeAnnotation"&&LU(t,r=>r.type==="FunctionTypeAnnotation"))}function YZe(e){return Lu(e)}function _D(e){let{parent:t,key:r}=e;switch(t.type){case"NGPipeExpression":if(r==="arguments"&&e.isLast)return e.callParent(_D);break;case"ObjectProperty":if(r==="value")return e.callParent(()=>e.key==="properties"&&e.isLast);break;case"BinaryExpression":case"LogicalExpression":if(r==="right")return e.callParent(_D);break;case"ConditionalExpression":if(r==="alternate")return e.callParent(_D);break;case"UnaryExpression":if(t.prefix)return e.callParent(_D);break}return!1}function v_e(e,t){let{node:r,parent:n}=e;return r.type==="FunctionExpression"||r.type==="ClassExpression"?n.type==="ExportDefaultDeclaration"||!zU(e,t):!iz(r)||n.type!=="ExportDefaultDeclaration"&&zU(e,t)?!1:e.call(()=>v_e(e,t),...Ode(r))}function eWe(e){return!!(e.match(void 0,(t,r)=>r==="expression"&&t.type==="ChainExpression",(t,r)=>r==="tag"&&t.type==="TaggedTemplateExpression")||e.match(t=>t.type==="OptionalCallExpression"||t.type==="OptionalMemberExpression",(t,r)=>r==="tag"&&t.type==="TaggedTemplateExpression")||e.match(t=>t.type==="OptionalCallExpression"||t.type==="OptionalMemberExpression",(t,r)=>r==="expression"&&t.type==="TSNonNullExpression",(t,r)=>r==="tag"&&t.type==="TaggedTemplateExpression")||e.match(void 0,(t,r)=>r==="expression"&&t.type==="ChainExpression",(t,r)=>r==="expression"&&t.type==="TSNonNullExpression",(t,r)=>r==="tag"&&t.type==="TaggedTemplateExpression")||e.match(void 0,(t,r)=>r==="expression"&&t.type==="TSNonNullExpression",(t,r)=>r==="expression"&&t.type==="ChainExpression",(t,r)=>r==="tag"&&t.type==="TaggedTemplateExpression")||e.match(t=>t.type==="OptionalMemberExpression"||t.type==="OptionalCallExpression",(t,r)=>r==="object"&&t.type==="MemberExpression"||r==="callee"&&(t.type==="CallExpression"||t.type==="NewExpression"))||e.match(t=>t.type==="OptionalMemberExpression"||t.type==="OptionalCallExpression",(t,r)=>r==="expression"&&t.type==="TSNonNullExpression",(t,r)=>r==="object"&&t.type==="MemberExpression"||r==="callee"&&t.type==="CallExpression")||e.match(t=>t.type==="CallExpression"||t.type==="MemberExpression",(t,r)=>r==="expression"&&t.type==="ChainExpression")&&(e.match(void 0,void 0,(t,r)=>r==="callee"&&(t.type==="CallExpression"&&!t.optional||t.type==="NewExpression")||r==="object"&&t.type==="MemberExpression"&&!t.optional)||e.match(void 0,void 0,(t,r)=>r==="expression"&&t.type==="TSNonNullExpression",(t,r)=>r==="object"&&t.type==="MemberExpression"||r==="callee"&&t.type==="CallExpression"))||e.match(t=>t.type==="CallExpression"||t.type==="MemberExpression",(t,r)=>r==="expression"&&t.type==="TSNonNullExpression",(t,r)=>r==="expression"&&t.type==="ChainExpression",(t,r)=>r==="object"&&t.type==="MemberExpression"||r==="callee"&&t.type==="CallExpression"))}function JU(e){return e.type==="Identifier"?!0:Mo(e)?!e.computed&&!e.optional&&e.property.type==="Identifier"&&JU(e.object):!1}function tWe(e){return e.type==="ChainExpression"&&(e=e.expression),JU(e)||jn(e)&&!e.optional&&JU(e.callee)}var eh=zU;function rWe(e,t){let r=t-1;r=Hv(e,r,{backwards:!0}),r=Zv(e,r,{backwards:!0}),r=Hv(e,r,{backwards:!0});let n=Zv(e,r,{backwards:!0});return r!==n}var nWe=rWe,oWe=()=>!0;function vz(e,t){let r=e.node;return r.printed=!0,t.printer.printComment(e,t)}function iWe(e,t){let r=e.node,n=[vz(e,t)],{printer:o,originalText:i,locStart:a,locEnd:s}=t;if(o.isBlockComment?.(r)){let p=nc(i,s(r))?nc(i,a(r),{backwards:!0})?Be:at:" ";n.push(p)}else n.push(Be);let c=Zv(i,Hv(i,s(r)));return c!==!1&&nc(i,c)&&n.push(Be),n}function aWe(e,t,r){let n=e.node,o=vz(e,t),{printer:i,originalText:a,locStart:s}=t,c=i.isBlockComment?.(n);if(r?.hasLineSuffix&&!r?.isBlock||nc(a,s(n),{backwards:!0})){let p=nWe(a,s(n));return{doc:ede([Be,p?Be:"",o]),isBlock:c,hasLineSuffix:!0}}return!c||r?.hasLineSuffix?{doc:[ede([" ",o]),K_],isBlock:c,hasLineSuffix:!0}:{doc:[" ",o],isBlock:c,hasLineSuffix:!1}}function $o(e,t,r={}){let{node:n}=e;if(!jo(n?.comments))return"";let{indent:o=!1,marker:i,filter:a=oWe}=r,s=[];if(e.each(({node:p})=>{p.leading||p.trailing||p.marker!==i||!a(p)||s.push(vz(e,t))},"comments"),s.length===0)return"";let c=dn(Be,s);return o?Fe([Be,c]):c}function Z3(e,t){let r=e.node;if(!r)return{};let n=t[Symbol.for("printedComments")];if((r.comments||[]).filter(s=>!n.has(s)).length===0)return{leading:"",trailing:""};let o=[],i=[],a;return e.each(()=>{let s=e.node;if(n?.has(s))return;let{leading:c,trailing:p}=s;c?o.push(iWe(e,t)):p&&(a=aWe(e,t,a),i.push(a.doc))},"comments"),{leading:o,trailing:i}}function Ll(e,t,r){let{leading:n,trailing:o}=Z3(e,r);return!n&&!o?t:BU(t,i=>[n,i,o])}var z3=class extends Error{name="ArgExpansionBailout"};function Pg(e,t,r,n,o){let i=e.node,a=ss(i),s=o&&i.typeParameters?r("typeParameters"):"";if(a.length===0)return[s,"(",$o(e,t,{filter:y=>$u(t.originalText,Kr(y))===")"}),")"];let{parent:c}=e,p=G3(c),d=b_e(i),f=[];if(kGe(e,(y,g)=>{let S=g===a.length-1;S&&i.rest&&f.push("..."),f.push(r()),!S&&(f.push(","),p||d?f.push(" "):ld(a[g],t)?f.push(Be,Be):f.push(at))}),n&&!cWe(e)){if(Os(s)||Os(f))throw new z3;return de([U3(s),"(",U3(f),")"])}let m=a.every(y=>!jo(y.decorators));return d&&m?[s,"(",...f,")"]:p?[s,"(",...f,")"]:(Rde(c)||gGe(c)||c.type==="TypeAlias"||c.type==="UnionTypeAnnotation"||c.type==="IntersectionTypeAnnotation"||c.type==="FunctionTypeAnnotation"&&c.returnType===i)&&a.length===1&&a[0].name===null&&i.this!==a[0]&&a[0].typeAnnotation&&i.typeParameters===null&&sz(a[0].typeAnnotation)&&!i.rest?t.arrowParens==="always"||i.type==="HookTypeAnnotation"?["(",...f,")"]:f:[s,"(",Fe([Pe,...f]),Sr(!wGe(i)&&cd(t,"all")?",":""),Pe,")"]}function b_e(e){if(!e)return!1;let t=ss(e);if(t.length!==1)return!1;let[r]=t;return!rt(r)&&(r.type==="ObjectPattern"||r.type==="ArrayPattern"||r.type==="Identifier"&&r.typeAnnotation&&(r.typeAnnotation.type==="TypeAnnotation"||r.typeAnnotation.type==="TSTypeAnnotation")&&Hm(r.typeAnnotation.typeAnnotation)||r.type==="FunctionTypeParam"&&Hm(r.typeAnnotation)&&r!==e.rest||r.type==="AssignmentPattern"&&(r.left.type==="ObjectPattern"||r.left.type==="ArrayPattern")&&(r.right.type==="Identifier"||Lu(r.right)&&r.right.properties.length===0||Fa(r.right)&&r.right.elements.length===0))}function sWe(e){let t;return e.returnType?(t=e.returnType,t.typeAnnotation&&(t=t.typeAnnotation)):e.typeAnnotation&&(t=e.typeAnnotation),t}function n1(e,t){let r=sWe(e);if(!r)return!1;let n=e.typeParameters?.params;if(n){if(n.length>1)return!1;if(n.length===1){let o=n[0];if(o.constraint||o.default)return!1}}return ss(e).length===1&&(Hm(r)||Os(t))}function cWe(e){return e.match(t=>t.type==="ArrowFunctionExpression"&&t.body.type==="BlockStatement",(t,r)=>{if(t.type==="CallExpression"&&r==="arguments"&&t.arguments.length===1&&t.callee.type==="CallExpression"){let n=t.callee.callee;return n.type==="Identifier"||n.type==="MemberExpression"&&!n.computed&&n.object.type==="Identifier"&&n.property.type==="Identifier"}return!1},(t,r)=>t.type==="VariableDeclarator"&&r==="init"||t.type==="ExportDefaultDeclaration"&&r==="declaration"||t.type==="TSExportAssignment"&&r==="expression"||t.type==="AssignmentExpression"&&r==="right"&&t.left.type==="MemberExpression"&&t.left.object.type==="Identifier"&&t.left.object.name==="module"&&t.left.property.type==="Identifier"&&t.left.property.name==="exports",t=>t.type!=="VariableDeclaration"||t.kind==="const"&&t.declarations.length===1)}function lWe(e){let t=ss(e);return t.length>1&&t.some(r=>r.type==="TSParameterProperty")}function mD(e,t){return(t==="params"||t==="this"||t==="rest")&&b_e(e)}function Ns(e){let{node:t}=e;return!t.optional||t.type==="Identifier"&&t===e.parent.key?"":jn(t)||Mo(t)&&t.computed||t.type==="OptionalIndexedAccessType"?"?.":"?"}function x_e(e){return e.node.definite||e.match(void 0,(t,r)=>r==="id"&&t.type==="VariableDeclarator"&&t.definite)?"!":""}var uWe=Ir(["DeclareClass","DeclareComponent","DeclareFunction","DeclareHook","DeclareVariable","DeclareExportDeclaration","DeclareExportAllDeclaration","DeclareOpaqueType","DeclareTypeAlias","DeclareEnum","DeclareInterface"]);function Bc(e){let{node:t}=e;return t.declare||uWe(t)&&e.parent.type!=="DeclareExportDeclaration"?"declare ":""}var pWe=Ir(["TSAbstractMethodDefinition","TSAbstractPropertyDefinition","TSAbstractAccessorProperty"]);function W3({node:e}){return e.abstract||pWe(e)?"abstract ":""}function Km(e,t,r){return e.type==="EmptyStatement"?rt(e,St.Leading)?[" ",t]:t:e.type==="BlockStatement"||r?[" ",t]:Fe([at,t])}function Q3(e){return e.accessibility?e.accessibility+" ":""}var dWe=/^[\$A-Z_a-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC][\$0-9A-Z_a-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]*$/,_We=e=>dWe.test(e),fWe=_We;function mWe(e){return e.length===1?e:e.toLowerCase().replace(/^([+-]?[\d.]+e)(?:\+|(-))?0*(?=\d)/u,"$1$2").replace(/^([+-]?[\d.]+)e[+-]?0+$/u,"$1").replace(/^([+-])?\./u,"$10.").replace(/(\.\d+?)0+(?=e|$)/u,"$1").replace(/\.(?=e|$)/u,"")}var Yv=mWe,hWe=0;function E_e(e,t,r){let{node:n,parent:o,grandparent:i,key:a}=e,s=a!=="body"&&(o.type==="IfStatement"||o.type==="WhileStatement"||o.type==="SwitchStatement"||o.type==="DoWhileStatement"),c=n.operator==="|>"&&e.root.extra?.__isUsingHackPipeline,p=VU(e,t,r,!1,s);if(s)return p;if(c)return de(p);if(a==="callee"&&(jn(o)||o.type==="NewExpression")||o.type==="UnaryExpression"||Mo(o)&&!o.computed)return de([Fe([Pe,...p]),Pe]);let d=o.type==="ReturnStatement"||o.type==="ThrowStatement"||o.type==="JSXExpressionContainer"&&i.type==="JSXAttribute"||n.operator!=="|"&&o.type==="JsExpressionRoot"||n.type!=="NGPipeExpression"&&(o.type==="NGRoot"&&t.parser==="__ng_binding"||o.type==="NGMicrosyntaxExpression"&&i.type==="NGMicrosyntax"&&i.body.length===1)||n===o.body&&o.type==="ArrowFunctionExpression"||n!==o.body&&o.type==="ForStatement"||o.type==="ConditionalExpression"&&i.type!=="ReturnStatement"&&i.type!=="ThrowStatement"&&!jn(i)&&i.type!=="NewExpression"||o.type==="TemplateLiteral"||gWe(e),f=o.type==="AssignmentExpression"||o.type==="VariableDeclarator"||o.type==="ClassProperty"||o.type==="PropertyDefinition"||o.type==="TSAbstractPropertyDefinition"||o.type==="ClassPrivateProperty"||Wm(o),m=J_(n.left)&&lz(n.operator,n.left.operator);if(d||bD(n)&&!m||!bD(n)&&f)return de(p);if(p.length===0)return"";let y=_a(n.right),g=p.findIndex(k=>typeof k!="string"&&!Array.isArray(k)&&k.type===$l),S=p.slice(0,g===-1?1:g+1),b=p.slice(S.length,y?-1:void 0),E=Symbol("logicalChain-"+ ++hWe),I=de([...S,Fe(b)],{id:E});if(!y)return I;let T=Vn(0,p,-1);return de([I,vD(T,{groupId:E})])}function VU(e,t,r,n,o){let{node:i}=e;if(!J_(i))return[de(r())];let a=[];lz(i.operator,i.left.operator)?a=e.call(()=>VU(e,t,r,!0,o),"left"):a.push(de(r("left")));let s=bD(i),c=i.right.type==="ChainExpression"?i.right.expression:i.right,p=(i.operator==="|>"||i.type==="NGPipeExpression"||yWe(e,t))&&!Ru(t.originalText,c),d=!rt(c,St.Leading,Jde)&&Ru(t.originalText,c),f=i.type==="NGPipeExpression"?"|":i.operator,m=i.type==="NGPipeExpression"&&i.arguments.length>0?de(Fe([Pe,": ",dn([at,": "],e.map(()=>Mu(2,de(r())),"arguments"))])):"",y;if(s)y=[f,Ru(t.originalText,c)?Fe([at,r("right"),m]):[" ",r("right"),m]];else{let b=f==="|>"&&e.root.extra?.__isUsingHackPipeline?e.call(()=>VU(e,t,r,!0,o),"right"):r("right");if(t.experimentalOperatorPosition==="start"){let E="";if(d)switch(Ym(b)){case V_:E=b.splice(0,1)[0];break;case G_:E=b.contents.splice(0,1)[0];break}y=[at,E,f," ",b,m]}else y=[p?at:"",f,p?" ":at,b,m]}let{parent:g}=e,S=rt(i.left,St.Trailing|St.Line);if((S||!(o&&i.type==="LogicalExpression")&&g.type!==i.type&&i.left.type!==i.type&&i.right.type!==i.type)&&(y=de(y,{shouldBreak:S})),t.experimentalOperatorPosition==="start"?a.push(s||d?" ":"",y):a.push(p?"":" ",y),n&&rt(i)){let b=gz(Ll(e,a,t));return b.type===Qm?b.parts:Array.isArray(b)?b:[b]}return a}function bD(e){return e.type!=="LogicalExpression"?!1:!!(Lu(e.right)&&e.right.properties.length>0||Fa(e.right)&&e.right.elements.length>0||_a(e.right))}var ide=e=>e.type==="BinaryExpression"&&e.operator==="|";function yWe(e,t){return(t.parser==="__vue_expression"||t.parser==="__vue_ts_expression")&&ide(e.node)&&!e.hasAncestor(r=>!ide(r)&&r.type!=="JsExpressionRoot")}function gWe(e){if(e.key!=="arguments")return!1;let{parent:t}=e;if(!(jn(t)&&!t.optional&&t.arguments.length===1))return!1;let{callee:r}=t;return r.type==="Identifier"&&r.name==="Boolean"}function T_e(e,t,r){let{node:n}=e,{parent:o}=e,i=o.type!=="TypeParameterInstantiation"&&(!Zm(o)||!t.experimentalTernaries)&&o.type!=="TSTypeParameterInstantiation"&&o.type!=="GenericTypeAnnotation"&&o.type!=="TSTypeReference"&&o.type!=="TSTypeAssertion"&&o.type!=="TupleTypeAnnotation"&&o.type!=="TSTupleType"&&!(o.type==="FunctionTypeParam"&&!o.name&&e.grandparent.this!==o)&&!((MU(o)||o.type==="VariableDeclarator")&&Ru(t.originalText,n))&&!(MU(o)&&rt(o.id,St.Trailing|St.Line)),a=D_e(n),s=e.map(()=>{let y=r();return a||(y=Mu(2,y)),Ll(e,y,t)},"types"),c="",p="";if(Ude(e)&&({leading:c,trailing:p}=Z3(e,t)),a)return[c,dn(" | ",s),p];let d=i&&!Ru(t.originalText,n),f=[Sr([d?at:"","| "]),dn([at,"| "],s)];if(eh(e,t))return[c,de([Fe(f),Pe]),p];let m=[c,de(f)];return(o.type==="TupleTypeAnnotation"||o.type==="TSTupleType")&&o[o.type==="TupleTypeAnnotation"&&o.types?"types":"elementTypes"].length>1?[de([Fe([Sr(["(",Pe]),m]),Pe,Sr(")")]),p]:[de(i?Fe(m):m),p]}var SWe=Ir(["VoidTypeAnnotation","TSVoidKeyword","NullLiteralTypeAnnotation","TSNullKeyword"]),vWe=Ir(["ObjectTypeAnnotation","TSTypeLiteral","GenericTypeAnnotation","TSTypeReference"]);function D_e(e){let{types:t}=e;if(t.some(n=>rt(n)))return!1;let r=t.find(n=>vWe(n));return r?t.every(n=>n===r||SWe(n)):!1}function bWe(e){return sz(e)||Hm(e)?!0:id(e)?D_e(e):!1}var xWe=new WeakSet;function Na(e,t,r="typeAnnotation"){let{node:{[r]:n}}=e;if(!n)return"";let o=!1;if(n.type==="TSTypeAnnotation"||n.type==="TypeAnnotation"){let i=e.call(A_e,r);(i==="=>"||i===":"&&rt(n,St.Leading))&&(o=!0),xWe.add(n)}return o?[" ",t(r)]:t(r)}var A_e=e=>e.match(t=>t.type==="TSTypeAnnotation",(t,r)=>(r==="returnType"||r==="typeAnnotation")&&(t.type==="TSFunctionType"||t.type==="TSConstructorType"))?"=>":e.match(t=>t.type==="TSTypeAnnotation",(t,r)=>r==="typeAnnotation"&&(t.type==="TSJSDocNullableType"||t.type==="TSJSDocNonNullableType"||t.type==="TSTypePredicate"))||e.match(t=>t.type==="TypeAnnotation",(t,r)=>r==="typeAnnotation"&&t.type==="Identifier",(t,r)=>r==="id"&&t.type==="DeclareFunction")||e.match(t=>t.type==="TypeAnnotation",(t,r)=>r==="typeAnnotation"&&t.type==="Identifier",(t,r)=>r==="id"&&t.type==="DeclareHook")||e.match(t=>t.type==="TypeAnnotation",(t,r)=>r==="bound"&&t.type==="TypeParameter"&&t.usesExtendsBound)?"":":";function I_e(e,t,r){let n=A_e(e);return n?[n," ",r("typeAnnotation")]:r("typeAnnotation")}function EWe(e,t,r,n){let{node:o}=e,i=o.inexact?"...":"";return rt(o,St.Dangling)?de([r,i,$o(e,t,{indent:!0}),Pe,n]):[r,i,n]}function bz(e,t,r){let{node:n}=e,o=[],i="[",a="]",s=n.type==="TupleTypeAnnotation"&&n.types?"types":n.type==="TSTupleType"||n.type==="TupleTypeAnnotation"?"elementTypes":"elements",c=n[s];if(c.length===0)o.push(EWe(e,t,i,a));else{let p=Vn(0,c,-1),d=p?.type!=="RestElement"&&!n.inexact,f=p===null,m=Symbol("array"),y=!t.__inJestEach&&c.length>1&&c.every((b,E,I)=>{let T=b?.type;if(!Fa(b)&&!Lu(b))return!1;let k=I[E+1];if(k&&T!==k.type)return!1;let F=Fa(b)?"elements":"properties";return b[F]&&b[F].length>1}),g=w_e(n,t),S=d?f?",":cd(t)?g?Sr(",","",{groupId:m}):Sr(","):"":"";o.push(de([i,Fe([Pe,g?DWe(e,t,r,S):[TWe(e,t,r,s,n.inexact),S],$o(e,t)]),Pe,a],{shouldBreak:y,id:m}))}return o.push(Ns(e),Na(e,r)),o}function w_e(e,t){return Fa(e)&&e.elements.length>0&&e.elements.every(r=>r&&(od(r)||Nde(r)&&!rt(r.argument))&&!rt(r,St.Trailing|St.Line,n=>!nc(t.originalText,Yr(n),{backwards:!0})))}function k_e({node:e},{originalText:t}){let r=Kr(e);if(r===Yr(e))return!1;let{length:n}=t;for(;r{i.push(a?de(r()):""),(!s||o)&&i.push([",",at,a&&k_e(e,t)?Pe:""])},n),o&&i.push("..."),i}function DWe(e,t,r,n){let o=[];return e.each(({isLast:i,next:a})=>{o.push([r(),i?n:","]),i||o.push(k_e(e,t)?[Be,Be]:rt(a,St.Leading|St.Line)?Be:at)},"elements"),a_e(o)}function AWe(e,t,r){let{node:n}=e,o=qc(n);if(o.length===0)return["(",$o(e,t),")"];let i=o.length-1;if(kWe(o)){let f=["("];return q3(e,(m,y)=>{f.push(r()),y!==i&&f.push(", ")}),f.push(")"),f}let a=!1,s=[];q3(e,({node:f},m)=>{let y=r();m===i||(ld(f,t)?(a=!0,y=[y,",",Be,Be]):y=[y,",",at]),s.push(y)});let c=!t.parser.startsWith("__ng_")&&n.type!=="ImportExpression"&&n.type!=="TSImportType"&&n.type!=="TSExternalModuleReference"&&cd(t,"all")?",":"";function p(){return de(["(",Fe([at,...s]),c,at,")"],{shouldBreak:!0})}if(a||e.parent.type!=="Decorator"&&TGe(o))return p();if(wWe(o)){let f=s.slice(1);if(f.some(Os))return p();let m;try{m=r(Wpe(n,0),{expandFirstArg:!0})}catch(y){if(y instanceof z3)return p();throw y}return Os(m)?[K_,vg([["(",de(m,{shouldBreak:!0}),", ",...f,")"],p()])]:vg([["(",m,", ",...f,")"],["(",de(m,{shouldBreak:!0}),", ",...f,")"],p()])}if(IWe(o,s,t)){let f=s.slice(0,-1);if(f.some(Os))return p();let m;try{m=r(Wpe(n,-1),{expandLastArg:!0})}catch(y){if(y instanceof z3)return p();throw y}return Os(m)?[K_,vg([["(",...f,de(m,{shouldBreak:!0}),")"],p()])]:vg([["(",...f,m,")"],["(",...f,de(m,{shouldBreak:!0}),")"],p()])}let d=["(",Fe([Pe,...s]),Sr(c),Pe,")"];return Bde(e)?d:de(d,{shouldBreak:s.some(Os)||a})}function hD(e,t=!1){return Lu(e)&&(e.properties.length>0||rt(e))||Fa(e)&&(e.elements.length>0||rt(e))||e.type==="TSTypeAssertion"&&hD(e.expression)||Fu(e)&&hD(e.expression)||e.type==="FunctionExpression"||e.type==="ArrowFunctionExpression"&&(!e.returnType||!e.returnType.typeAnnotation||e.returnType.typeAnnotation.type!=="TSTypeReference"||CWe(e.body))&&(e.body.type==="BlockStatement"||e.body.type==="ArrowFunctionExpression"&&hD(e.body,!0)||Lu(e.body)||Fa(e.body)||!t&&(jn(e.body)||e.body.type==="ConditionalExpression")||_a(e.body))||e.type==="DoExpression"||e.type==="ModuleExpression"}function IWe(e,t,r){let n=Vn(0,e,-1);if(e.length===1){let i=Vn(0,t,-1);if(i.label?.embed&&i.label?.hug!==!1)return!0}let o=Vn(0,e,-2);return!rt(n,St.Leading)&&!rt(n,St.Trailing)&&hD(n)&&(!o||o.type!==n.type)&&(e.length!==2||o.type!=="ArrowFunctionExpression"||!Fa(n))&&!(e.length>1&&w_e(n,r))}function wWe(e){if(e.length!==2)return!1;let[t,r]=e;return t.type==="ModuleExpression"&&PWe(r)?!0:!rt(t)&&(t.type==="FunctionExpression"||t.type==="ArrowFunctionExpression"&&t.body.type==="BlockStatement")&&r.type!=="FunctionExpression"&&r.type!=="ArrowFunctionExpression"&&r.type!=="ConditionalExpression"&&C_e(r)&&!hD(r)}function C_e(e){if(e.type==="ParenthesizedExpression")return C_e(e.expression);if(Fu(e)||e.type==="TypeCastExpression"){let{typeAnnotation:t}=e;if(t.type==="TypeAnnotation"&&(t=t.typeAnnotation),t.type==="TSArrayType"&&(t=t.elementType,t.type==="TSArrayType"&&(t=t.elementType)),t.type==="GenericTypeAnnotation"||t.type==="TSTypeReference"){let r=t.type==="GenericTypeAnnotation"?t.typeParameters:t.typeArguments;r?.params.length===1&&(t=r.params[0])}return sz(t)&&Nu(e.expression,1)}return Xv(e)&&qc(e).length>1?!1:J_(e)?Nu(e.left,1)&&Nu(e.right,1):Fde(e)||Nu(e)}function kWe(e){return e.length===2?ade(e,0):e.length===3?e[0].type==="Identifier"&&ade(e,1):!1}function ade(e,t){let r=e[t],n=e[t+1];return r.type==="ArrowFunctionExpression"&&ss(r).length===0&&r.body.type==="BlockStatement"&&n.type==="ArrayExpression"&&!e.some(o=>rt(o))}function CWe(e){return e.type==="BlockStatement"&&(e.body.some(t=>t.type!=="EmptyStatement")||rt(e,St.Dangling))}function PWe(e){if(!(e.type==="ObjectExpression"&&e.properties.length===1))return!1;let[t]=e.properties;return Wm(t)?!t.computed&&(t.key.type==="Identifier"&&t.key.name==="type"||fa(t.key)&&t.key.value==="type")&&fa(t.value)&&t.value.value==="module":!1}var KU=AWe;function OWe(e,t,r){return[r("object"),de(Fe([Pe,P_e(e,t,r)]))]}function P_e(e,t,r){return["::",r("callee")]}var NWe=e=>((e.type==="ChainExpression"||e.type==="TSNonNullExpression")&&(e=e.expression),jn(e)&&qc(e).length>0);function FWe(e){let{node:t,ancestors:r}=e;for(let n of r){if(!(Mo(n)&&n.object===t||n.type==="TSNonNullExpression"&&n.expression===t))return n.type==="NewExpression"&&n.callee===t;t=n}return!1}function RWe(e,t,r){let n=r("object"),o=O_e(e,t,r),{node:i}=e,a=e.findAncestor(p=>!(Mo(p)||p.type==="TSNonNullExpression")),s=e.findAncestor(p=>!(p.type==="ChainExpression"||p.type==="TSNonNullExpression")),c=a.type==="BindExpression"||a.type==="AssignmentExpression"&&a.left.type!=="Identifier"||FWe(e)||i.computed||i.object.type==="Identifier"&&i.property.type==="Identifier"&&!Mo(s)||(s.type==="AssignmentExpression"||s.type==="VariableDeclarator")&&(NWe(i.object)||n.label?.memberChain);return AD(n.label,[n,c?o:de(Fe([Pe,o]))])}function O_e(e,t,r){let n=r("property"),{node:o}=e,i=Ns(e);return o.computed?!o.property||od(o.property)?[i,"[",n,"]"]:de([i,"[",Fe([Pe,n]),Pe,"]"]):[i,".",n]}function N_e(e,t,r){if(e.node.type==="ChainExpression")return e.call(()=>N_e(e,t,r),"expression");let n=(e.parent.type==="ChainExpression"?e.grandparent:e.parent).type==="ExpressionStatement",o=[];function i(Je){let{originalText:me}=t,xe=e1(me,Kr(Je));return me.charAt(xe)===")"?xe!==!1&&rz(me,xe+1):ld(Je,t)}function a(){let{node:Je}=e;if(Je.type==="ChainExpression")return e.call(a,"expression");if(jn(Je)&&(Kv(Je.callee)||jn(Je.callee))){let me=i(Je);o.unshift({node:Je,hasTrailingEmptyLine:me,printed:[Ll(e,[Ns(e),r("typeArguments"),KU(e,t,r)],t),me?Be:""]}),e.call(a,"callee")}else Kv(Je)?(o.unshift({node:Je,needsParens:eh(e,t),printed:Ll(e,Mo(Je)?O_e(e,t,r):P_e(e,t,r),t)}),e.call(a,"object")):Je.type==="TSNonNullExpression"?(o.unshift({node:Je,printed:Ll(e,"!",t)}),e.call(a,"expression")):o.unshift({node:Je,printed:r()})}let{node:s}=e;o.unshift({node:s,printed:[Ns(e),r("typeArguments"),KU(e,t,r)]}),s.callee&&e.call(a,"callee");let c=[],p=[o[0]],d=1;for(;d0&&c.push(p);function m(Je){return/^[A-Z]|^[$_]+$/u.test(Je)}function y(Je){return Je.length<=t.tabWidth}function g(Je){let me=Je[1][0]?.node.computed;if(Je[0].length===1){let Rt=Je[0][0].node;return Rt.type==="ThisExpression"||Rt.type==="Identifier"&&(m(Rt.name)||n&&y(Rt.name)||me)}let xe=Vn(0,Je[0],-1).node;return Mo(xe)&&xe.property.type==="Identifier"&&(m(xe.property.name)||me)}let S=c.length>=2&&!rt(c[1][0].node)&&g(c);function b(Je){let me=Je.map(xe=>xe.printed);return Je.length>0&&Vn(0,Je,-1).needsParens?["(",...me,")"]:me}function E(Je){return Je.length===0?"":Fe([Be,dn(Be,Je.map(b))])}let I=c.map(b),T=I,k=S?3:2,F=c.flat(),O=F.slice(1,-1).some(Je=>rt(Je.node,St.Leading))||F.slice(0,-1).some(Je=>rt(Je.node,St.Trailing))||c[k]&&rt(c[k][0].node,St.Leading);if(c.length<=k&&!O&&!c.some(Je=>Vn(0,Je,-1).hasTrailingEmptyLine))return Bde(e)?T:de(T);let $=Vn(0,c[S?1:0],-1).node,N=!jn($)&&i($),U=[b(c[0]),S?c.slice(1,2).map(b):"",N?Be:"",E(c.slice(S?2:1))],ge=o.map(({node:Je})=>Je).filter(jn);function Te(){let Je=Vn(0,Vn(0,c,-1),-1).node,me=Vn(0,I,-1);return jn(Je)&&Os(me)&&ge.slice(0,-1).some(xe=>xe.arguments.some(gD))}let ke;return O||ge.length>2&&ge.some(Je=>!Je.arguments.every(me=>Nu(me)))||I.slice(0,-1).some(Os)||Te()?ke=de(U):ke=[Os(T)||N?K_:"",vg([T,U])],AD({memberChain:!0},ke)}var LWe=N_e;function J3(e,t,r){let{node:n}=e,o=n.type==="NewExpression",i=Ns(e),a=qc(n),s=n.type!=="TSImportType"&&n.typeArguments?r("typeArguments"):"",c=a.length===1&&Mde(a[0],t.originalText);if(c||MWe(e)||jWe(e)||G3(n,e.parent)){let f=[];if(q3(e,()=>{f.push(r())}),!(c&&f[0].label?.embed))return[o?"new ":"",sde(e,r),i,s,"(",dn(", ",f),")"]}let p=n.type==="ImportExpression"||n.type==="TSImportType"||n.type==="TSExternalModuleReference";if(!p&&!o&&Kv(n.callee)&&!e.call(()=>eh(e,t),"callee",...n.callee.type==="ChainExpression"?["expression"]:[]))return LWe(e,t,r);let d=[o?"new ":"",sde(e,r),i,s,KU(e,t,r)];return p||jn(n.callee)?de(d):d}function sde(e,t){let{node:r}=e;return r.type==="ImportExpression"?`import${r.phase?`.${r.phase}`:""}`:r.type==="TSImportType"?"import":r.type==="TSExternalModuleReference"?"require":t("callee")}var $We=["require","require.resolve","require.resolve.paths","import.meta.resolve"];function MWe(e){let{node:t}=e;if(!(t.type==="ImportExpression"||t.type==="TSImportType"||t.type==="TSExternalModuleReference"||t.type==="CallExpression"&&!t.optional&&nz(t.callee,$We)))return!1;let r=qc(t);return r.length===1&&fa(r[0])&&!rt(r[0])}function jWe(e){let{node:t}=e;if(t.type!=="CallExpression"||t.optional||t.callee.type!=="Identifier")return!1;let r=qc(t);return t.callee.name==="require"?(r.length===1&&fa(r[0])||r.length>1)&&!rt(r[0]):t.callee.name==="define"&&e.parent.type==="ExpressionStatement"?r.length===1||r.length===2&&r[0].type==="ArrayExpression"||r.length===3&&fa(r[0])&&r[1].type==="ArrayExpression":!1}function ID(e,t,r,n,o,i){let a=UWe(e,t,r,n,i),s=i?r(i,{assignmentLayout:a}):"";switch(a){case"break-after-operator":return de([de(n),o,de(Fe([at,s]))]);case"never-break-after-operator":return de([de(n),o," ",s]);case"fluid":{let c=Symbol("assignment");return de([de(n),o,de(Fe(at),{id:c}),sd,vD(s,{groupId:c})])}case"break-lhs":return de([n,o," ",de(s)]);case"chain":return[de(n),o,at,s];case"chain-tail":return[de(n),o,Fe([at,s])];case"chain-tail-arrow-chain":return[de(n),o,s];case"only-left":return n}}function BWe(e,t,r){let{node:n}=e;return ID(e,t,r,r("left"),[" ",n.operator],"right")}function qWe(e,t,r){return ID(e,t,r,r("id")," =","init")}function UWe(e,t,r,n,o){let{node:i}=e,a=i[o];if(!a)return"only-left";let s=!$3(a);if(e.match($3,F_e,d=>!s||d.type!=="ExpressionStatement"&&d.type!=="VariableDeclaration"))return s?a.type==="ArrowFunctionExpression"&&a.body.type==="ArrowFunctionExpression"?"chain-tail-arrow-chain":"chain-tail":"chain";if(!s&&$3(a.right)||Ru(t.originalText,a))return"break-after-operator";if(i.type==="ImportAttribute"||a.type==="CallExpression"&&a.callee.name==="require"||t.parser==="json5"||t.parser==="jsonc"||t.parser==="json")return"never-break-after-operator";let c=RHe(n);if(JWe(i)||GWe(i)||R_e(i)&&c)return"break-lhs";let p=HWe(i,n,t);return e.call(()=>zWe(e,t,r,p),o)?"break-after-operator":VWe(i)?"break-lhs":!c&&(p||a.type==="TemplateLiteral"||a.type==="TaggedTemplateExpression"||mGe(a)||od(a)||a.type==="ClassExpression")?"never-break-after-operator":"fluid"}function zWe(e,t,r,n){let o=e.node;if(J_(o)&&!bD(o))return!0;switch(o.type){case"StringLiteralTypeAnnotation":case"SequenceExpression":return!0;case"TSConditionalType":case"ConditionalTypeAnnotation":if(!t.experimentalTernaries&&!QWe(o))break;return!0;case"ConditionalExpression":{if(!t.experimentalTernaries){let{test:p}=o;return J_(p)&&!bD(p)}let{consequent:s,alternate:c}=o;return s.type==="ConditionalExpression"||c.type==="ConditionalExpression"}case"ClassExpression":return jo(o.decorators)}if(n)return!1;let i=o,a=[];for(;;)if(i.type==="UnaryExpression"||i.type==="AwaitExpression"||i.type==="YieldExpression"&&i.argument!==null)i=i.argument,a.push("argument");else if(i.type==="TSNonNullExpression")i=i.expression,a.push("expression");else break;return!!(fa(i)||e.call(()=>L_e(e,t,r),...a))}function JWe(e){if(F_e(e)){let t=e.left||e.id;return t.type==="ObjectPattern"&&t.properties.length>2&&t.properties.some(r=>Wm(r)&&(!r.shorthand||r.value?.type==="AssignmentPattern"))}return!1}function $3(e){return e.type==="AssignmentExpression"}function F_e(e){return $3(e)||e.type==="VariableDeclarator"}function VWe(e){let t=KWe(e);if(jo(t)){let r=e.type==="TSTypeAliasDeclaration"?"constraint":"bound";if(t.length>1&&t.some(n=>n[r]||n.default))return!0}return!1}function KWe(e){if(MU(e))return e.typeParameters?.params}function GWe(e){if(e.type!=="VariableDeclarator")return!1;let{typeAnnotation:t}=e.id;if(!t||!t.typeAnnotation)return!1;let r=cde(t.typeAnnotation);return jo(r)&&r.length>1&&r.some(n=>jo(cde(n))||n.type==="TSConditionalType")}function R_e(e){return e.type==="VariableDeclarator"&&e.init?.type==="ArrowFunctionExpression"}function cde(e){let t;switch(e.type){case"GenericTypeAnnotation":t=e.typeParameters;break;case"TSTypeReference":t=e.typeArguments;break}return t?.params}function L_e(e,t,r,n=!1){let{node:o}=e,i=()=>L_e(e,t,r,!0);if(o.type==="ChainExpression"||o.type==="TSNonNullExpression")return e.call(i,"expression");if(jn(o)){if(J3(e,t,r).label?.memberChain)return!1;let a=qc(o);return!(a.length===0||a.length===1&&cz(a[0],t))||ZWe(o,r)?!1:e.call(i,"callee")}return Mo(o)?e.call(i,"object"):n&&(o.type==="Identifier"||o.type==="ThisExpression")}function HWe(e,t,r){return Wm(e)?(t=gz(t),typeof t=="string"&&Gv(t)1)return!0;if(r.length===1){let o=r[0];if(id(o)||DD(o)||o.type==="TSTypeLiteral"||o.type==="ObjectTypeAnnotation")return!0}let n=e.typeParameters?"typeParameters":"typeArguments";if(Os(t(n)))return!0}return!1}function WWe(e){return(e.typeParameters??e.typeArguments)?.params}function lde(e){switch(e.type){case"FunctionTypeAnnotation":case"GenericTypeAnnotation":case"TSFunctionType":return!!e.typeParameters;case"TSTypeReference":return!!e.typeArguments;default:return!1}}function QWe(e){return lde(e.checkType)||lde(e.extendsType)}var M3=new WeakMap;function $_e(e){return/^(?:\d+|\d+\.\d+)$/u.test(e)}function ude(e,t){return t.parser==="json"||t.parser==="jsonc"||!fa(e.key)||Wv(oc(e.key),t).slice(1,-1)!==e.key.value?!1:!!(fWe(e.key.value)&&!(t.parser==="babel-ts"&&e.type==="ClassProperty"||(t.parser==="typescript"||t.parser==="oxc-ts")&&e.type==="PropertyDefinition")||$_e(e.key.value)&&String(Number(e.key.value))===e.key.value&&e.type!=="ImportAttribute"&&(t.parser==="babel"||t.parser==="acorn"||t.parser==="oxc"||t.parser==="espree"||t.parser==="meriyah"||t.parser==="__babel_estree"))}function XWe(e,t){let{key:r}=e.node;return(r.type==="Identifier"||od(r)&&$_e(Yv(oc(r)))&&String(r.value)===Yv(oc(r))&&!(t.parser==="typescript"||t.parser==="babel-ts"||t.parser==="oxc-ts"))&&(t.parser==="json"||t.parser==="jsonc"||t.quoteProps==="consistent"&&M3.get(e.parent))}function wD(e,t,r){let{node:n}=e;if(n.computed)return["[",r("key"),"]"];let{parent:o}=e,{key:i}=n;if(t.quoteProps==="consistent"&&!M3.has(o)){let a=e.siblings.some(s=>!s.computed&&fa(s.key)&&!ude(s,t));M3.set(o,a)}if(XWe(e,t)){let a=Wv(JSON.stringify(i.type==="Identifier"?i.name:i.value.toString()),t);return e.call(()=>Ll(e,a,t),"key")}return ude(n,t)&&(t.quoteProps==="as-needed"||t.quoteProps==="consistent"&&!M3.get(o))?e.call(()=>Ll(e,/^\d/u.test(i.value)?Yv(i.value):i.value,t),"key"):r("key")}function CU(e,t,r){let{node:n}=e;return n.shorthand?r("value"):ID(e,t,r,wD(e,t,r),":","value")}var YWe=({node:e,key:t,parent:r})=>t==="value"&&e.type==="FunctionExpression"&&(r.type==="ObjectMethod"||r.type==="ClassMethod"||r.type==="ClassPrivateMethod"||r.type==="MethodDefinition"||r.type==="TSAbstractMethodDefinition"||r.type==="TSDeclareMethod"||r.type==="Property"&&TD(r));function M_e(e,t,r,n){if(YWe(e))return xz(e,t,r);let{node:o}=e,i=!1;if((o.type==="FunctionDeclaration"||o.type==="FunctionExpression")&&n?.expandLastArg){let{parent:d}=e;jn(d)&&(qc(d).length>1||ss(o).every(f=>f.type==="Identifier"&&!f.typeAnnotation))&&(i=!0)}let a=[Bc(e),o.async?"async ":"",`function${o.generator?"*":""} `,o.id?r("id"):""],s=Pg(e,t,r,i),c=X3(e,r),p=n1(o,c);return a.push(r("typeParameters"),de([p?de(s):s,c]),o.body?" ":"",r("body")),t.semi&&(o.declare||!o.body)&&a.push(";"),a}function GU(e,t,r){let{node:n}=e,{kind:o}=n,i=n.value||n,a=[];return!o||o==="init"||o==="method"||o==="constructor"?i.async&&a.push("async "):(Eg(o==="get"||o==="set"),a.push(o," ")),i.generator&&a.push("*"),a.push(wD(e,t,r),n.optional?"?":"",n===i?xz(e,t,r):r("value")),a}function xz(e,t,r){let{node:n}=e,o=Pg(e,t,r),i=X3(e,r),a=lWe(n),s=n1(n,i),c=[r("typeParameters"),de([a?de(o,{shouldBreak:!0}):s?de(o):o,i])];return n.body?c.push(" ",r("body")):c.push(t.semi?";":""),c}function eQe(e){let t=ss(e);return t.length===1&&!e.typeParameters&&!rt(e,St.Dangling)&&t[0].type==="Identifier"&&!t[0].typeAnnotation&&!rt(t[0])&&!t[0].optional&&!e.predicate&&!e.returnType}function j_e(e,t){if(t.arrowParens==="always")return!1;if(t.arrowParens==="avoid"){let{node:r}=e;return eQe(r)}return!1}function X3(e,t){let{node:r}=e,n=[Na(e,t,"returnType")];return r.predicate&&n.push(t("predicate")),n}function B_e(e,t,r){let{node:n}=e,o=[];if(n.argument){let s=r("argument");nQe(t,n.argument)?s=["(",Fe([Be,s]),Be,")"]:(J_(n.argument)||t.experimentalTernaries&&n.argument.type==="ConditionalExpression"&&(n.argument.consequent.type==="ConditionalExpression"||n.argument.alternate.type==="ConditionalExpression"))&&(s=de([Sr("("),Fe([Pe,s]),Pe,Sr(")")])),o.push(" ",s)}let i=rt(n,St.Dangling),a=t.semi&&i&&rt(n,St.Last|St.Line);return a&&o.push(";"),i&&o.push(" ",$o(e,t)),!a&&t.semi&&o.push(";"),o}function tQe(e,t,r){return["return",B_e(e,t,r)]}function rQe(e,t,r){return["throw",B_e(e,t,r)]}function nQe(e,t){if(Ru(e.originalText,t)||rt(t,St.Leading,r=>jc(e.originalText,Yr(r),Kr(r)))&&!_a(t))return!0;if(iz(t)){let r=t,n;for(;n=dGe(r);)if(r=n,Ru(e.originalText,r))return!0}return!1}function oQe(e,t){if(t.semi||U_e(e,t)||J_e(e,t)||z_e(e,t))return!1;let{node:r,key:n,parent:o}=e;return!!(r.type==="ExpressionStatement"&&(n==="body"&&(o.type==="Program"||o.type==="BlockStatement"||o.type==="StaticBlock"||o.type==="TSModuleBlock")||n==="consequent"&&o.type==="SwitchCase")&&e.call(()=>q_e(e,t),"expression"))}function q_e(e,t){let{node:r}=e;switch(r.type){case"ParenthesizedExpression":case"TypeCastExpression":case"ArrayExpression":case"ArrayPattern":case"TemplateLiteral":case"TemplateElement":case"RegExpLiteral":return!0;case"ArrowFunctionExpression":if(!j_e(e,t))return!0;break;case"UnaryExpression":{let{prefix:n,operator:o}=r;if(n&&(o==="+"||o==="-"))return!0;break}case"BindExpression":if(!r.object)return!0;break;case"Literal":if(r.regex)return!0;break;default:if(_a(r))return!0}return eh(e,t)?!0:iz(r)?e.call(()=>q_e(e,t),...Ode(r)):!1}var Ez=({node:e,parent:t})=>e.type==="ExpressionStatement"&&t.type==="Program"&&t.body.length===1&&(Array.isArray(t.directives)&&t.directives.length===0||!t.directives);function U_e(e,t){return(t.parentParser==="markdown"||t.parentParser==="mdx")&&Ez(e)&&_a(e.node.expression)}function z_e(e,t){return t.__isHtmlInlineEventHandler&&Ez(e)}function J_e(e,t){return(t.parser==="__vue_event_binding"||t.parser==="__vue_ts_event_binding")&&Ez(e)}var iQe=class extends Error{name="UnexpectedNodeError";constructor(e,t,r="type"){super(`Unexpected ${t} node ${r}: ${JSON.stringify(e[r])}.`),this.node=e}},o1=iQe;function aQe(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var sQe=class{#t;constructor(e){this.#t=new Set(e)}getLeadingWhitespaceCount(e){let t=this.#t,r=0;for(let n=0;n=0&&t.has(e.charAt(n));n--)r++;return r}getLeadingWhitespace(e){let t=this.getLeadingWhitespaceCount(e);return e.slice(0,t)}getTrailingWhitespace(e){let t=this.getTrailingWhitespaceCount(e);return e.slice(e.length-t)}hasLeadingWhitespace(e){return this.#t.has(e.charAt(0))}hasTrailingWhitespace(e){return this.#t.has(Vn(0,e,-1))}trimStart(e){let t=this.getLeadingWhitespaceCount(e);return e.slice(t)}trimEnd(e){let t=this.getTrailingWhitespaceCount(e);return e.slice(0,e.length-t)}trim(e){return this.trimEnd(this.trimStart(e))}split(e,t=!1){let r=`[${aQe([...this.#t].join(""))}]+`,n=new RegExp(t?`(${r})`:r,"u");return e.split(n)}hasWhitespaceCharacter(e){let t=this.#t;return Array.prototype.some.call(e,r=>t.has(r))}hasNonWhitespaceCharacter(e){let t=this.#t;return Array.prototype.some.call(e,r=>!t.has(r))}isWhitespaceOnly(e){let t=this.#t;return Array.prototype.every.call(e,r=>t.has(r))}#r(e){let t=Number.POSITIVE_INFINITY;for(let r of e.split(` +`)){if(r.length===0)continue;let n=this.getLeadingWhitespaceCount(r);if(n===0)return 0;r.length!==n&&nr.slice(t)).join(` +`)}},cQe=sQe,j3=new cQe(` +\r `),PU=e=>e===""||e===at||e===Be||e===Pe;function lQe(e,t,r){let{node:n}=e;if(n.type==="JSXElement"&&DQe(n))return[r("openingElement"),r("closingElement")];let o=n.type==="JSXElement"?r("openingElement"):r("openingFragment"),i=n.type==="JSXElement"?r("closingElement"):r("closingFragment");if(n.children.length===1&&n.children[0].type==="JSXExpressionContainer"&&(n.children[0].expression.type==="TemplateLiteral"||n.children[0].expression.type==="TaggedTemplateExpression"))return[o,...e.map(r,"children"),i];n.children=n.children.map(T=>AQe(T)?{type:"JSXText",value:" ",raw:" "}:T);let a=n.children.some(_a),s=n.children.filter(T=>T.type==="JSXExpressionContainer").length>1,c=n.type==="JSXElement"&&n.openingElement.attributes.length>1,p=Os(o)||a||c||s,d=e.parent.rootMarker==="mdx",f=t.singleQuote?"{' '}":'{" "}',m=d?at:Sr([f,Pe]," "),y=n.openingElement?.name?.name==="fbt",g=uQe(e,t,r,m,y),S=n.children.some(T=>xD(T));for(let T=g.length-2;T>=0;T--){let k=g[T]===""&&g[T+1]==="",F=g[T]===Be&&g[T+1]===""&&g[T+2]===Be,O=(g[T]===Pe||g[T]===Be)&&g[T+1]===""&&g[T+2]===m,$=g[T]===m&&g[T+1]===""&&(g[T+2]===Pe||g[T+2]===Be),N=g[T]===m&&g[T+1]===""&&g[T+2]===m,U=g[T]===Pe&&g[T+1]===""&&g[T+2]===Be||g[T]===Be&&g[T+1]===""&&g[T+2]===Pe;F&&S||k||O||N||U?g.splice(T,2):$&&g.splice(T+1,2)}for(;g.length>0&&PU(Vn(0,g,-1));)g.pop();for(;g.length>1&&PU(g[0])&&PU(g[1]);)g.shift(),g.shift();let b=[""];for(let[T,k]of g.entries()){if(k===m){if(T===1&&LHe(g[T-1])){if(g.length===2){b.push([b.pop(),f]);continue}b.push([f,Be],"");continue}else if(T===g.length-1){b.push([b.pop(),f]);continue}else if(g[T-1]===""&&g[T-2]===Be){b.push([b.pop(),f]);continue}}T%2===0?b.push([b.pop(),k]):b.push(k,""),Os(k)&&(p=!0)}let E=S?a_e(b):de(b,{shouldBreak:!0});if(t.cursorNode?.type==="JSXText"&&n.children.includes(t.cursorNode)?E=[F3,E,F3]:t.nodeBeforeCursor?.type==="JSXText"&&n.children.includes(t.nodeBeforeCursor)?E=[F3,E]:t.nodeAfterCursor?.type==="JSXText"&&n.children.includes(t.nodeAfterCursor)&&(E=[E,F3]),d)return E;let I=de([o,Fe([Be,E]),Be,i]);return p?I:vg([de([o,...g,i]),I])}function uQe(e,t,r,n,o){let i="",a=[i];function s(p){i=p,a.push([a.pop(),p])}function c(p){p!==""&&(i=p,a.push(p,""))}return e.each(({node:p,next:d})=>{if(p.type==="JSXText"){let f=oc(p);if(xD(p)){let m=j3.split(f,!0);m[0]===""&&(m.shift(),/\n/u.test(m[0])?c(dde(o,m[1],p,d)):c(n),m.shift());let y;if(Vn(0,m,-1)===""&&(m.pop(),y=m.pop()),m.length===0)return;for(let[g,S]of m.entries())g%2===1?c(at):s(S);y!==void 0?/\n/u.test(y)?c(dde(o,i,p,d)):c(n):c(pde(o,i,p,d))}else/\n/u.test(f)?f.match(/\n/gu).length>1&&c(Be):c(n)}else{let f=r();if(s(f),d&&xD(d)){let m=j3.trim(oc(d)),[y]=j3.split(m);c(pde(o,y,p,d))}else c(Be)}},"children"),a}function pde(e,t,r,n){return e?"":r.type==="JSXElement"&&!r.closingElement||n?.type==="JSXElement"&&!n.closingElement?t.length===1?Pe:Be:Pe}function dde(e,t,r,n){return e?Be:t.length===1?r.type==="JSXElement"&&!r.closingElement||n?.type==="JSXElement"&&!n.closingElement?Be:Pe:Be}var pQe=Ir(["ArrayExpression","JSXAttribute","JSXElement","JSXExpressionContainer","JSXFragment","ExpressionStatement","NewExpression","CallExpression","OptionalCallExpression","ConditionalExpression","JsExpressionRoot","MatchExpressionCase"]);function dQe(e,t,r){let{parent:n}=e;if(pQe(n))return t;let o=_Qe(e),i=eh(e,r);return de([i?"":Sr("("),Fe([Pe,t]),Pe,i?"":Sr(")")],{shouldBreak:o})}function _Qe(e){return e.match(void 0,(t,r)=>r==="body"&&t.type==="ArrowFunctionExpression",(t,r)=>r==="arguments"&&jn(t))&&(e.match(void 0,void 0,void 0,(t,r)=>r==="expression"&&t.type==="JSXExpressionContainer")||e.match(void 0,void 0,void 0,(t,r)=>r==="expression"&&t.type==="ChainExpression",(t,r)=>r==="expression"&&t.type==="JSXExpressionContainer"))}function fQe(e,t,r){let{node:n}=e,o=[r("name")];if(n.value){let i;if(fa(n.value)){let a=oc(n.value),s=da(0,da(0,a.slice(1,-1),"'","'"),""",'"'),c=Ade(s,t.jsxSingleQuote);s=c==='"'?da(0,s,'"',"""):da(0,s,"'","'"),i=e.call(()=>Ll(e,xg(c+s+c),t),"value")}else i=r("value");o.push("=",i)}return o}function mQe(e,t,r){let{node:n}=e,o=(i,a)=>i.type==="JSXEmptyExpression"||!rt(i)&&(Fa(i)||Lu(i)||i.type==="ArrowFunctionExpression"||i.type==="AwaitExpression"&&(o(i.argument,i)||i.argument.type==="JSXElement")||jn(i)||i.type==="ChainExpression"&&jn(i.expression)||i.type==="FunctionExpression"||i.type==="TemplateLiteral"||i.type==="TaggedTemplateExpression"||i.type==="DoExpression"||_a(a)&&(i.type==="ConditionalExpression"||J_(i)));return o(n.expression,e.parent)?de(["{",r("expression"),sd,"}"]):de(["{",Fe([Pe,r("expression")]),Pe,sd,"}"])}function hQe(e,t,r){let{node:n}=e,o=rt(n.name)||rt(n.typeArguments);if(n.selfClosing&&n.attributes.length===0&&!o)return["<",r("name"),r("typeArguments")," />"];if(n.attributes?.length===1&&fa(n.attributes[0].value)&&!n.attributes[0].value.value.includes(` +`)&&!o&&!rt(n.attributes[0]))return de(["<",r("name"),r("typeArguments")," ",...e.map(r,"attributes"),n.selfClosing?" />":">"]);let i=n.attributes?.some(s=>fa(s.value)&&s.value.value.includes(` +`)),a=t.singleAttributePerLine&&n.attributes.length>1?Be:at;return de(["<",r("name"),r("typeArguments"),Fe(e.map(()=>[a,r()],"attributes")),...yQe(n,t,o)],{shouldBreak:i})}function yQe(e,t,r){return e.selfClosing?[at,"/>"]:gQe(e,t,r)?[">"]:[Pe,">"]}function gQe(e,t,r){let n=e.attributes.length>0&&rt(Vn(0,e.attributes,-1),St.Trailing);return e.attributes.length===0&&!r||(t.bracketSameLine||t.jsxBracketSameLine)&&(!r||e.attributes.length>0)&&!n}function SQe(e,t,r){let{node:n}=e,o=[""),o}function vQe(e,t){let{node:r}=e,n=rt(r),o=rt(r,St.Line),i=r.type==="JSXOpeningFragment";return[i?"<":""]}function bQe(e,t,r){let n=Ll(e,lQe(e,t,r),t);return dQe(e,n,t)}function xQe(e,t){let{node:r}=e,n=rt(r,St.Line);return[$o(e,t,{indent:n}),n?Be:""]}function EQe(e,t,r){let{node:n}=e;return["{",e.call(({node:o})=>{let i=["...",r()];return rt(o)?[Fe([Pe,Ll(e,i,t)]),Pe]:i},n.type==="JSXSpreadAttribute"?"argument":"expression"),"}"]}function TQe(e,t,r){let{node:n}=e;if(n.type.startsWith("JSX"))switch(n.type){case"JSXAttribute":return fQe(e,t,r);case"JSXIdentifier":return n.name;case"JSXNamespacedName":return dn(":",[r("namespace"),r("name")]);case"JSXMemberExpression":return dn(".",[r("object"),r("property")]);case"JSXSpreadAttribute":case"JSXSpreadChild":return EQe(e,t,r);case"JSXExpressionContainer":return mQe(e,t,r);case"JSXFragment":case"JSXElement":return bQe(e,t,r);case"JSXOpeningElement":return hQe(e,t,r);case"JSXClosingElement":return SQe(e,t,r);case"JSXOpeningFragment":case"JSXClosingFragment":return vQe(e,t);case"JSXEmptyExpression":return xQe(e,t);case"JSXText":throw new Error("JSXText should be handled by JSXElement");default:throw new o1(n,"JSX")}}function DQe(e){if(e.children.length===0)return!0;if(e.children.length>1)return!1;let t=e.children[0];return t.type==="JSXText"&&!xD(t)}function xD(e){return e.type==="JSXText"&&(j3.hasNonWhitespaceCharacter(oc(e))||!/\n/u.test(oc(e)))}function AQe(e){return e.type==="JSXExpressionContainer"&&fa(e.expression)&&e.expression.value===" "&&!rt(e.expression)}function IQe(e){let{node:t,parent:r}=e;if(!_a(t)||!_a(r))return!1;let{index:n,siblings:o}=e,i;for(let a=n;a>0;a--){let s=o[a-1];if(!(s.type==="JSXText"&&!xD(s))){i=s;break}}return i?.type==="JSXExpressionContainer"&&i.expression.type==="JSXEmptyExpression"&&H3(i.expression)}function wQe(e){return H3(e.node)||IQe(e)}var Tz=wQe;function kQe(e,t,r){let{node:n}=e;if(n.type.startsWith("NG"))switch(n.type){case"NGRoot":return r("node");case"NGPipeExpression":return E_e(e,t,r);case"NGChainedExpression":return de(dn([";",at],e.map(()=>OQe(e)?r():["(",r(),")"],"expressions")));case"NGEmptyExpression":return"";case"NGMicrosyntax":return e.map(()=>[e.isFirst?"":_de(e)?" ":[";",at],r()],"body");case"NGMicrosyntaxKey":return/^[$_a-z][\w$]*(?:-[$_a-z][\w$])*$/iu.test(n.name)?n.name:JSON.stringify(n.name);case"NGMicrosyntaxExpression":return[r("expression"),n.alias===null?"":[" as ",r("alias")]];case"NGMicrosyntaxKeyedExpression":{let{index:o,parent:i}=e,a=_de(e)||CQe(e)||(o===1&&(n.key.name==="then"||n.key.name==="else"||n.key.name==="as")||o===2&&(n.key.name==="else"&&i.body[o-1].type==="NGMicrosyntaxKeyedExpression"&&i.body[o-1].key.name==="then"||n.key.name==="track"))&&i.body[0].type==="NGMicrosyntaxExpression";return[r("key"),a?" ":": ",r("expression")]}case"NGMicrosyntaxLet":return["let ",r("key"),n.value===null?"":[" = ",r("value")]];case"NGMicrosyntaxAs":return[r("key")," as ",r("alias")];default:throw new o1(n,"Angular")}}function _de({node:e,index:t}){return e.type==="NGMicrosyntaxKeyedExpression"&&e.key.name==="of"&&t===1}function CQe(e){let{node:t}=e;return e.parent.body[1].key.name==="of"&&t.type==="NGMicrosyntaxKeyedExpression"&&t.key.name==="track"&&t.key.type==="NGMicrosyntaxKey"}var PQe=Ir(["CallExpression","OptionalCallExpression","AssignmentExpression"]);function OQe({node:e}){return LU(e,PQe)}function V_e(e,t,r){let{node:n}=e;return de([dn(at,e.map(r,"decorators")),K_e(n,t)?Be:at])}function NQe(e,t,r){return G_e(e.node)?[dn(Be,e.map(r,"declaration","decorators")),Be]:""}function FQe(e,t,r){let{node:n,parent:o}=e,{decorators:i}=n;if(!jo(i)||G_e(o)||Tz(e))return"";let a=n.type==="ClassExpression"||n.type==="ClassDeclaration"||K_e(n,t);return[e.key==="declaration"&&_Ge(o)?Be:a?K_:"",dn(at,e.map(r,"decorators")),at]}function K_e(e,t){return e.decorators.some(r=>nc(t.originalText,Kr(r)))}function G_e(e){if(e.type!=="ExportDefaultDeclaration"&&e.type!=="ExportNamedDeclaration"&&e.type!=="DeclareExportDeclaration")return!1;let t=e.declaration?.decorators;return jo(t)&&K3(e,t[0])}var OU=new WeakMap;function H_e(e){return OU.has(e)||OU.set(e,e.type==="ConditionalExpression"&&!Ps(e,t=>t.type==="ObjectExpression")),OU.get(e)}var RQe=e=>e.type==="SequenceExpression";function LQe(e,t,r,n={}){let o=[],i,a=[],s=!1,c=!n.expandLastArg&&e.node.body.type==="ArrowFunctionExpression",p;(function E(){let{node:I}=e,T=$Qe(e,t,r,n);if(o.length===0)o.push(T);else{let{leading:k,trailing:F}=Z3(e,t);o.push([k,T]),a.unshift(F)}c&&(s||(s=I.returnType&&ss(I).length>0||I.typeParameters||ss(I).some(k=>k.type!=="Identifier"))),!c||I.body.type!=="ArrowFunctionExpression"?(i=r("body",n),p=I.body):e.call(E,"body")})();let d=!Ru(t.originalText,p)&&(RQe(p)||MQe(p,i,t)||!s&&H_e(p)),f=e.key==="callee"&&Xv(e.parent),m=Symbol("arrow-chain"),y=jQe(e,n,{signatureDocs:o,shouldBreak:s}),g=!1,S=!1,b=!1;return c&&(f||n.assignmentLayout)&&(S=!0,b=!rt(e.node,St.Leading&St.Line),g=n.assignmentLayout==="chain-tail-arrow-chain"||f&&!d),i=BQe(e,t,n,{bodyDoc:i,bodyComments:a,functionBody:p,shouldPutBodyOnSameLine:d}),de([de(S?Fe([b?Pe:"",y]):y,{shouldBreak:g,id:m})," =>",c?vD(i,{groupId:m}):de(i),c&&f?Sr(Pe,"",{groupId:m}):""])}function $Qe(e,t,r,n){let{node:o}=e,i=[];if(o.async&&i.push("async "),j_e(e,t))i.push(r(["params",0]));else{let s=n.expandLastArg||n.expandFirstArg,c=X3(e,r);if(s){if(Os(c))throw new z3;c=de(U3(c))}i.push(de([Pg(e,t,r,s,!0),c]))}let a=$o(e,t,{filter(s){let c=e1(t.originalText,Kr(s));return c!==!1&&t.originalText.slice(c,c+2)==="=>"}});return a&&i.push(" ",a),i}function MQe(e,t,r){return Fa(e)||Lu(e)||e.type==="ArrowFunctionExpression"||e.type==="DoExpression"||e.type==="BlockStatement"||_a(e)||t.label?.hug!==!1&&(t.label?.embed||Mde(e,r.originalText))}function jQe(e,t,{signatureDocs:r,shouldBreak:n}){if(r.length===1)return r[0];let{parent:o,key:i}=e;return i!=="callee"&&Xv(o)||J_(o)?de([r[0]," =>",Fe([at,dn([" =>",at],r.slice(1))])],{shouldBreak:n}):i==="callee"&&Xv(o)||t.assignmentLayout?de(dn([" =>",at],r),{shouldBreak:n}):de(Fe(dn([" =>",at],r)),{shouldBreak:n})}function BQe(e,t,r,{bodyDoc:n,bodyComments:o,functionBody:i,shouldPutBodyOnSameLine:a}){let{node:s,parent:c}=e,p=r.expandLastArg&&cd(t,"all")?Sr(","):"",d=(r.expandLastArg||c.type==="JSXExpressionContainer")&&!rt(s)?Pe:"";return a&&H_e(i)?[" ",de([Sr("","("),Fe([Pe,n]),Sr("",")"),p,d]),o]:a?[" ",n,o]:[Fe([at,n,o]),p,d]}var qQe=Array.prototype.findLast??function(e){for(let t=this.length-1;t>=0;t--){let r=this[t];if(e(r,t,this))return r}},UQe=YU("findLast",function(){if(Array.isArray(this))return qQe}),zQe=UQe;function HU(e,t,r,n){let{node:o}=e,i=[],a=zQe(0,o[n],s=>s.type!=="EmptyStatement");return e.each(({node:s})=>{s.type!=="EmptyStatement"&&(i.push(r()),s!==a&&(i.push(Be),ld(s,t)&&i.push(Be)))},n),i}function Z_e(e,t,r){let n=JQe(e,t,r),{node:o,parent:i}=e;if(o.type==="Program"&&i?.type!=="ModuleExpression")return n?[n,Be]:"";let a=[];if(o.type==="StaticBlock"&&a.push("static "),a.push("{"),n)a.push(Fe([Be,n]),Be);else{let s=e.grandparent;i.type==="ArrowFunctionExpression"||i.type==="FunctionExpression"||i.type==="FunctionDeclaration"||i.type==="ComponentDeclaration"||i.type==="HookDeclaration"||i.type==="ObjectMethod"||i.type==="ClassMethod"||i.type==="ClassPrivateMethod"||i.type==="ForStatement"||i.type==="WhileStatement"||i.type==="DoWhileStatement"||i.type==="DoExpression"||i.type==="ModuleExpression"||i.type==="CatchClause"&&!s.finalizer||i.type==="TSModuleDeclaration"||i.type==="MatchStatementCase"||o.type==="StaticBlock"||a.push(Be)}return a.push("}"),a}function JQe(e,t,r){let{node:n}=e,o=jo(n.directives),i=n.body.some(c=>c.type!=="EmptyStatement"),a=rt(n,St.Dangling);if(!o&&!i&&!a)return"";let s=[];return o&&(s.push(HU(e,t,r,"directives")),(i||a)&&(s.push(Be),ld(Vn(0,n.directives,-1),t)&&s.push(Be))),i&&s.push(HU(e,t,r,"body")),a&&s.push($o(e,t)),s}function VQe(e){let t=new WeakMap;return function(r){return t.has(r)||t.set(r,Symbol(e)),t.get(r)}}var KQe=VQe;function Dz(e,t,r){let{node:n}=e,o=[],i=n.type==="ObjectTypeAnnotation",a=!W_e(e),s=a?at:Be,c=rt(n,St.Dangling),[p,d]=i&&n.exact?["{|","|}"]:"{}",f;if(GQe(e,({node:m,next:y,isLast:g})=>{if(f??(f=m),o.push(r()),a&&i){let{parent:S}=e;S.inexact||!g?o.push(","):cd(t)&&o.push(Sr(","))}!a&&(HQe({node:m,next:y},t)||X_e({node:m,next:y},t))&&o.push(";"),g||(o.push(s),ld(m,t)&&o.push(Be))}),c&&o.push($o(e,t)),n.type==="ObjectTypeAnnotation"&&n.inexact){let m;rt(n,St.Dangling)?m=[rt(n,St.Line)||nc(t.originalText,Kr(Vn(0,bg(n),-1)))?Be:at,"..."]:m=[f?at:"","..."],o.push(m)}if(a){let m=c||t.objectWrap==="preserve"&&f&&jc(t.originalText,Yr(n),Yr(f)),y;if(o.length===0)y=p+d;else{let g=t.bracketSpacing?at:Pe;y=[p,Fe([g,...o]),g,d]}return e.match(void 0,(g,S)=>S==="typeAnnotation",(g,S)=>S==="typeAnnotation",mD)||e.match(void 0,(g,S)=>g.type==="FunctionTypeParam"&&S==="typeAnnotation",mD)?y:de(y,{shouldBreak:m})}return[p,o.length>0?[Fe([Be,o]),Be]:"",d]}function W_e(e){let{node:t}=e;if(t.type==="ObjectTypeAnnotation"){let{key:r,parent:n}=e;return r==="body"&&(n.type==="InterfaceDeclaration"||n.type==="DeclareInterface"||n.type==="DeclareClass")}return t.type==="ClassBody"||t.type==="TSInterfaceBody"}function GQe(e,t){let{node:r}=e;if(r.type==="ClassBody"||r.type==="TSInterfaceBody"){e.each(t,"body");return}if(r.type==="TSTypeLiteral"){e.each(t,"members");return}if(r.type==="ObjectTypeAnnotation"){let n=["properties","indexers","callProperties","internalSlots"].flatMap(o=>e.map(({node:i,index:a})=>({node:i,loc:Yr(i),selector:[o,a]}),o)).sort((o,i)=>o.loc-i.loc);for(let[o,{node:i,selector:a}]of n.entries())e.call(()=>t({node:i,next:n[o+1]?.node,isLast:o===n.length-1}),...a)}}function z_(e,t){let{parent:r}=e;return e.callParent(W_e)?t.semi||r.type==="ObjectTypeAnnotation"?";":"":r.type==="TSTypeLiteral"?e.isLast?t.semi?Sr(";"):"":t.semi||X_e({node:e.node,next:e.next},t)?";":Sr("",";"):""}var fde=Ir(["ClassProperty","PropertyDefinition","ClassPrivateProperty","ClassAccessorProperty","AccessorProperty","TSAbstractPropertyDefinition","TSAbstractAccessorProperty"]),Q_e=e=>{if(e.computed||e.typeAnnotation)return!1;let{type:t,name:r}=e.key;return t==="Identifier"&&(r==="static"||r==="get"||r==="set")};function HQe({node:e,next:t},r){if(r.semi||!fde(e))return!1;if(!e.value&&Q_e(e))return!0;if(!t||t.static||t.accessibility||t.readonly)return!1;if(!t.computed){let n=t.key?.name;if(n==="in"||n==="instanceof")return!0}if(fde(t)&&t.variance&&!t.static&&!t.declare)return!0;switch(t.type){case"ClassProperty":case"PropertyDefinition":case"TSAbstractPropertyDefinition":return t.computed;case"MethodDefinition":case"TSAbstractMethodDefinition":case"ClassMethod":case"ClassPrivateMethod":{if((t.value?t.value.async:t.async)||t.kind==="get"||t.kind==="set")return!1;let n=t.value?t.value.generator:t.generator;return!!(t.computed||n)}case"TSIndexSignature":return!0}return!1}var ZQe=Ir(["TSPropertySignature"]);function X_e({node:e,next:t},r){return r.semi||!ZQe(e)?!1:Q_e(e)?!0:t?t.type==="TSCallSignatureDeclaration":!1}var WQe=KQe("heritageGroup"),QQe=Ir(["TSInterfaceDeclaration","DeclareInterface","InterfaceDeclaration","InterfaceTypeAnnotation"]);function Az(e,t,r){let{node:n}=e,o=QQe(n),i=[Bc(e),W3(e),o?"interface":"class"],a=efe(e),s=[],c=[];if(n.type!=="InterfaceTypeAnnotation"){n.id&&s.push(" ");for(let d of["id","typeParameters"])if(n[d]){let{leading:f,trailing:m}=e.call(()=>Z3(e,t),d);s.push(f,r(d),Fe(m))}}if(n.superClass){let d=[eXe(e,t,r),r(n.superTypeArguments?"superTypeArguments":"superTypeParameters")],f=e.call(()=>["extends ",Ll(e,d,t)],"superClass");a?c.push(at,de(f)):c.push(" ",f)}else c.push(FU(e,t,r,"extends"));c.push(FU(e,t,r,"mixins"),FU(e,t,r,"implements"));let p;return a?(p=WQe(n),i.push(de([...s,Fe(c)],{id:p}))):i.push(...s,...c),!o&&a&&XQe(n.body)?i.push(Sr(Be," ",{groupId:p})):i.push(" "),i.push(r("body")),i}function XQe(e){return e.type==="ObjectTypeAnnotation"?["properties","indexers","callProperties","internalSlots"].some(t=>jo(e[t])):jo(e.body)}function Y_e(e){let t=e.superClass?1:0;for(let r of["extends","mixins","implements"])if(Array.isArray(e[r])&&(t+=e[r].length),t>1)return!0;return t>1}function YQe(e){let{node:t}=e;if(rt(t.id,St.Trailing)||rt(t.typeParameters,St.Trailing)||rt(t.superClass)||Y_e(t))return!0;if(t.superClass)return e.parent.type==="AssignmentExpression"?!1:!(t.superTypeArguments??t.superTypeParameters)&&Mo(t.superClass);let r=t.extends?.[0]??t.mixins?.[0]??t.implements?.[0];return r?r.type==="InterfaceExtends"&&r.id.type==="QualifiedTypeIdentifier"&&!r.typeParameters||(r.type==="TSClassImplements"||r.type==="TSInterfaceHeritage")&&Mo(r.expression)&&!r.typeArguments:!1}var NU=new WeakMap;function efe(e){let{node:t}=e;return NU.has(t)||NU.set(t,YQe(e)),NU.get(t)}function FU(e,t,r,n){let{node:o}=e;if(!jo(o[n]))return"";let i=$o(e,t,{marker:n}),a=dn([",",at],e.map(r,n));if(!Y_e(o)){let s=[`${n} `,i,a];return efe(e)?[at,de(s)]:[" ",s]}return[at,i,i&&Be,n,de(Fe([at,a]))]}function eXe(e,t,r){let n=r("superClass"),{parent:o}=e;return o.type==="AssignmentExpression"?de(Sr(["(",Fe([Pe,n]),Pe,")"],n)):n}function tfe(e,t,r){let{node:n}=e,o=[];return jo(n.decorators)&&o.push(V_e(e,t,r)),o.push(Q3(n)),n.static&&o.push("static "),o.push(W3(e)),n.override&&o.push("override "),o.push(GU(e,t,r)),o}function rfe(e,t,r){let{node:n}=e,o=[];jo(n.decorators)&&o.push(V_e(e,t,r)),o.push(Bc(e),Q3(n)),n.static&&o.push("static "),o.push(W3(e)),n.override&&o.push("override "),n.readonly&&o.push("readonly "),n.variance&&o.push(r("variance")),(n.type==="ClassAccessorProperty"||n.type==="AccessorProperty"||n.type==="TSAbstractAccessorProperty")&&o.push("accessor "),o.push(wD(e,t,r),Ns(e),x_e(e),Na(e,r));let i=n.type==="TSAbstractPropertyDefinition"||n.type==="TSAbstractAccessorProperty";return[ID(e,t,r,o," =",i?void 0:"value"),t.semi?";":""]}var tXe=Ir(["TSAsExpression","TSTypeAssertion","TSNonNullExpression","TSInstantiationExpression","TSSatisfiesExpression"]);function nfe(e){return tXe(e)?nfe(e.expression):e}var rXe=Ir(["FunctionExpression","ArrowFunctionExpression"]);function nXe(e){return e.type==="MemberExpression"||e.type==="OptionalMemberExpression"||e.type==="Identifier"&&e.name!=="undefined"}function oXe(e,t){if(J_e(e,t)){let r=nfe(e.node.expression);return rXe(r)||nXe(r)}return!(!t.semi||U_e(e,t)||z_e(e,t))}function iXe(e,t,r){return[r("expression"),oXe(e,t)?";":""]}function aXe(e,t,r){if(t.__isVueBindings||t.__isVueForBindingLeft){let n=e.map(r,"program","body",0,"params");if(n.length===1)return n[0];let o=dn([",",at],n);return t.__isVueForBindingLeft?["(",Fe([Pe,de(o)]),Pe,")"]:o}if(t.__isEmbeddedTypescriptGenericParameters){let n=e.map(r,"program","body",0,"typeParameters","params");return dn([",",at],n)}}function sXe(e,t){let{node:r}=e;switch(r.type){case"RegExpLiteral":return mde(r);case"BigIntLiteral":return ZU(r.extra.raw);case"NumericLiteral":return Yv(r.extra.raw);case"StringLiteral":return xg(Wv(r.extra.raw,t));case"NullLiteral":return"null";case"BooleanLiteral":return String(r.value);case"DirectiveLiteral":return hde(r.extra.raw,t);case"Literal":{if(r.regex)return mde(r.regex);if(r.bigint)return ZU(r.raw);let{value:n}=r;return typeof n=="number"?Yv(r.raw):typeof n=="string"?cXe(e)?hde(r.raw,t):xg(Wv(r.raw,t)):String(n)}}}function cXe(e){if(e.key!=="expression")return;let{parent:t}=e;return t.type==="ExpressionStatement"&&typeof t.directive=="string"}function ZU(e){return e.toLowerCase()}function mde({pattern:e,flags:t}){return t=[...t].sort().join(""),`/${e}/${t}`}var lXe="use strict";function hde(e,t){let r=e.slice(1,-1);if(r===lXe||!(r.includes('"')||r.includes("'"))){let n=t.singleQuote?"'":'"';return n+r+n}return e}function uXe(e,t,r){let n=e.originalText.slice(t,r);for(let o of e[Symbol.for("comments")]){let i=Yr(o);if(i>r)break;let a=Kr(o);if(ab.value&&(b.value.type==="ObjectPattern"||b.value.type==="ArrayPattern"))||n.type!=="ObjectPattern"&&t.objectWrap==="preserve"&&d.length>0&&dXe(n,d[0],t),m=[],y=e.map(({node:b})=>{let E=[...m,de(r())];return m=[",",at],ld(b,t)&&m.push(Be),E},p);if(c){let b;if(rt(n,St.Dangling)){let E=rt(n,St.Line);b=[$o(e,t),E||nc(t.originalText,Kr(Vn(0,bg(n),-1)))?Be:at,"..."]}else b=["..."];y.push([...m,...b])}let g=!(c||Vn(0,d,-1)?.type==="RestElement"),S;if(y.length===0){if(!rt(n,St.Dangling))return["{}",Na(e,r)];S=de(["{",$o(e,t,{indent:!0}),Pe,"}",Ns(e),Na(e,r)])}else{let b=t.bracketSpacing?at:Pe;S=["{",Fe([b,...y]),Sr(g&&cd(t)?",":""),b,"}",Ns(e),Na(e,r)]}return e.match(b=>b.type==="ObjectPattern"&&!jo(b.decorators),mD)||Hm(n)&&(e.match(void 0,(b,E)=>E==="typeAnnotation",(b,E)=>E==="typeAnnotation",mD)||e.match(void 0,(b,E)=>b.type==="FunctionTypeParam"&&E==="typeAnnotation",mD))||!f&&e.match(b=>b.type==="ObjectPattern",b=>b.type==="AssignmentExpression"||b.type==="VariableDeclarator")?S:de(S,{shouldBreak:f})}function dXe(e,t,r){let n=r.originalText,o=Yr(e),i=Yr(t);if(ofe(e)){let a=Yr(e),s=Y3(r,a,i);o=a+s.lastIndexOf("{")}return jc(n,o,i)}function _Xe(e,t,r){let{node:n}=e;return["import",n.phase?` ${n.phase}`:"",sfe(n),lfe(e,t,r),cfe(e,t,r),pfe(e,t,r),t.semi?";":""]}var ife=e=>e.type==="ExportDefaultDeclaration"||e.type==="DeclareExportDeclaration"&&e.default;function afe(e,t,r){let{node:n}=e,o=[NQe(e,t,r),Bc(e),"export",ife(n)?" default":""],{declaration:i,exported:a}=n;return rt(n,St.Dangling)&&(o.push(" ",$o(e,t)),jde(n)&&o.push(Be)),i?o.push(" ",r("declaration")):(o.push(hXe(n)),n.type==="ExportAllDeclaration"||n.type==="DeclareExportAllDeclaration"?(o.push(" *"),a&&o.push(" as ",r("exported"))):o.push(lfe(e,t,r)),o.push(cfe(e,t,r),pfe(e,t,r))),o.push(mXe(n,t)),o}var fXe=Ir(["ClassDeclaration","ComponentDeclaration","FunctionDeclaration","TSInterfaceDeclaration","DeclareClass","DeclareComponent","DeclareFunction","DeclareHook","HookDeclaration","TSDeclareFunction","EnumDeclaration"]);function mXe(e,t){return t.semi&&(!e.declaration||ife(e)&&!fXe(e.declaration))?";":""}function wz(e,t=!0){return e&&e!=="value"?`${t?" ":""}${e}${t?"":" "}`:""}function sfe(e,t){return wz(e.importKind,t)}function hXe(e){return wz(e.exportKind)}function cfe(e,t,r){let{node:n}=e;return n.source?[ufe(n,t)?" from":""," ",r("source")]:""}function lfe(e,t,r){let{node:n}=e;if(!ufe(n,t))return"";let o=[" "];if(jo(n.specifiers)){let i=[],a=[];e.each(()=>{let s=e.node.type;if(s==="ExportNamespaceSpecifier"||s==="ExportDefaultSpecifier"||s==="ImportNamespaceSpecifier"||s==="ImportDefaultSpecifier")i.push(r());else if(s==="ExportSpecifier"||s==="ImportSpecifier")a.push(r());else throw new o1(n,"specifier")},"specifiers"),o.push(dn(", ",i)),a.length>0&&(i.length>0&&o.push(", "),a.length>1||i.length>0||n.specifiers.some(s=>rt(s))?o.push(de(["{",Fe([t.bracketSpacing?at:Pe,dn([",",at],a)]),Sr(cd(t)?",":""),t.bracketSpacing?at:Pe,"}"])):o.push(["{",t.bracketSpacing?" ":"",...a,t.bracketSpacing?" ":"","}"]))}else o.push("{}");return o}function ufe(e,t){return e.type!=="ImportDeclaration"||jo(e.specifiers)||e.importKind==="type"?!0:Y3(t,Yr(e),Yr(e.source)).trimEnd().endsWith("from")}function yXe(e,t){if(e.extra?.deprecatedAssertSyntax)return"assert";let r=Y3(t,Kr(e.source),e.attributes?.[0]?Yr(e.attributes[0]):Kr(e)).trimStart();return r.startsWith("assert")?"assert":r.startsWith("with")||jo(e.attributes)?"with":void 0}var gXe=e=>{let{attributes:t}=e;if(t.length!==1)return!1;let[r]=t,{type:n,key:o,value:i}=r;return n==="ImportAttribute"&&(o.type==="Identifier"&&o.name==="type"||fa(o)&&o.value==="type")&&fa(i)&&!rt(r)&&!rt(o)&&!rt(i)};function pfe(e,t,r){let{node:n}=e;if(!n.source)return"";let o=yXe(n,t);if(!o)return"";let i=Iz(e,t,r);return gXe(n)&&(i=U3(i)),[` ${o} `,i]}function SXe(e,t,r){let{node:n}=e,{type:o}=n,i=o.startsWith("Import"),a=i?"imported":"local",s=i?"local":"exported",c=n[a],p=n[s],d="",f="";return o==="ExportNamespaceSpecifier"||o==="ImportNamespaceSpecifier"?d="*":c&&(d=r(a)),p&&!vXe(n)&&(f=r(s)),[wz(o==="ImportSpecifier"?n.importKind:n.exportKind,!1),d,d&&f?" as ":"",f]}function vXe(e){if(e.type!=="ImportSpecifier"&&e.type!=="ExportSpecifier")return!1;let{local:t,[e.type==="ImportSpecifier"?"imported":"exported"]:r}=e;return t.type!==r.type||!QKe(t,r)?!1:fa(t)?t.value===r.value&&oc(t)===oc(r):t.type==="Identifier"?t.name===r.name:!1}function WU(e,t){return["...",t("argument"),Na(e,t)]}function bXe(e){let t=[e];for(let r=0;rm[N]===n),g=m.type===n.type&&!y,S,b,E=0;do b=S||n,S=e.getParentNode(E),E++;while(S&&S.type===n.type&&s.every(N=>S[N]!==b));let I=S||m,T=b;if(o&&(_a(n[s[0]])||_a(c)||_a(p)||bXe(T))){f=!0,g=!0;let N=ge=>[Sr("("),Fe([Pe,ge]),Pe,Sr(")")],U=ge=>ge.type==="NullLiteral"||ge.type==="Literal"&&ge.value===null||ge.type==="Identifier"&&ge.name==="undefined";d.push(" ? ",U(c)?r(i):N(r(i))," : ",p.type===n.type||U(p)?r(a):N(r(a)))}else{let N=ge=>t.useTabs?Fe(r(ge)):Mu(2,r(ge)),U=[at,"? ",c.type===n.type?Sr("","("):"",N(i),c.type===n.type?Sr("",")"):"",at,": ",N(a)];d.push(m.type!==n.type||m[a]===n||y?U:t.useTabs?i_e(Fe(U)):Mu(Math.max(0,t.tabWidth-2),U))}let k=N=>m===I?de(N):N,F=!f&&(Mo(m)||m.type==="NGPipeExpression"&&m.left===n)&&!m.computed,O=TXe(e),$=k([xXe(e,t,r),g?d:Fe(d),o&&F&&!O?Pe:""]);return y||O?de([Fe([Pe,$]),Pe]):$}function AXe(e,t){return(Mo(t)||t.type==="NGPipeExpression"&&t.left===e)&&!t.computed}function IXe(e,t,r,n){return[...e.map(o=>bg(o)),bg(t),bg(r)].flat().some(o=>ju(o)&&jc(n.originalText,Yr(o),Kr(o)))}var wXe=new Map([["AssignmentExpression","right"],["VariableDeclarator","init"],["ReturnStatement","argument"],["ThrowStatement","argument"],["UnaryExpression","argument"],["YieldExpression","argument"],["AwaitExpression","argument"]]);function kXe(e){let{node:t}=e;if(t.type!=="ConditionalExpression")return!1;let r,n=t;for(let o=0;!r;o++){let i=e.getParentNode(o);if(i.type==="ChainExpression"&&i.expression===n||jn(i)&&i.callee===n||Mo(i)&&i.object===n||i.type==="TSNonNullExpression"&&i.expression===n){n=i;continue}i.type==="NewExpression"&&i.callee===n||Fu(i)&&i.expression===n?(r=e.getParentNode(o+1),n=i):r=i}return n===t?!1:r[wXe.get(r.type)]===n}var RU=e=>[Sr("("),Fe([Pe,e]),Pe,Sr(")")];function kz(e,t,r,n){if(!t.experimentalTernaries)return DXe(e,t,r);let{node:o}=e,i=o.type==="ConditionalExpression",a=Zm(o),s=i?"consequent":"trueType",c=i?"alternate":"falseType",p=i?["test"]:["checkType","extendsType"],d=o[s],f=o[c],m=p.map(wt=>o[wt]),{parent:y}=e,g=y.type===o.type,S=g&&p.some(wt=>y[wt]===o),b=g&&y[c]===o,E=d.type===o.type,I=f.type===o.type,T=I||b,k=t.tabWidth>2||t.useTabs,F,O,$=0;do O=F||o,F=e.getParentNode($),$++;while(F&&F.type===o.type&&p.every(wt=>F[wt]!==O));let N=F||y,U=n&&n.assignmentLayout&&n.assignmentLayout!=="break-after-operator"&&(y.type==="AssignmentExpression"||y.type==="VariableDeclarator"||y.type==="ClassProperty"||y.type==="PropertyDefinition"||y.type==="ClassPrivateProperty"||y.type==="ObjectProperty"||y.type==="Property"),ge=(y.type==="ReturnStatement"||y.type==="ThrowStatement")&&!(E||I),Te=i&&N.type==="JSXExpressionContainer"&&e.grandparent.type!=="JSXAttribute",ke=kXe(e),Je=AXe(o,y),me=a&&eh(e,t),xe=k?t.useTabs?" ":" ".repeat(t.tabWidth-1):"",Rt=IXe(m,d,f,t)||E||I,Jt=!T&&!g&&!a&&(Te?d.type==="NullLiteral"||d.type==="Literal"&&d.value===null:cz(d,t)&&Gpe(o.test,3)),Yt=T||b||a&&!g||g&&i&&Gpe(o.test,1)||Jt,vt=[];!E&&rt(d,St.Dangling)&&e.call(()=>{vt.push($o(e,t),Be)},"consequent");let Fr=[];rt(o.test,St.Dangling)&&e.call(()=>{Fr.push($o(e,t))},"test"),!I&&rt(f,St.Dangling)&&e.call(()=>{Fr.push($o(e,t))},"alternate"),rt(o,St.Dangling)&&Fr.push($o(e,t));let le=Symbol("test"),K=Symbol("consequent"),ae=Symbol("test-and-consequent"),he=i?[RU(r("test")),o.test.type==="ConditionalExpression"?K_:""]:[r("checkType")," ","extends"," ",Zm(o.extendsType)||o.extendsType.type==="TSMappedType"?r("extendsType"):de(RU(r("extendsType")))],Oe=de([he," ?"],{id:le}),pt=r(s),Ye=Fe([E||Te&&(_a(d)||g||T)?Be:at,vt,pt]),lt=Yt?de([Oe,T?Ye:Sr(Ye,de(Ye,{id:K}),{groupId:le})],{id:ae}):[Oe,Ye],Nt=r(c),Ct=Jt?Sr(Nt,i_e(RU(Nt)),{groupId:ae}):Nt,Zr=[lt,Fr.length>0?[Fe([Be,Fr]),Be]:I?Be:Jt?Sr(at," ",{groupId:ae}):at,":",I?" ":k?Yt?Sr(xe,Sr(T||Jt?" ":xe," "),{groupId:ae}):Sr(xe," "):" ",I?Ct:de([Fe(Ct),Te&&!Jt?Pe:""]),Je&&!ke?Pe:"",Rt?K_:""];return U&&!Rt?de(Fe([Pe,de(Zr)])):U||ge?de(Fe(Zr)):ke||a&&S?de([Fe([Pe,Zr]),me?Pe:""]):y===N?de(Zr):Zr}function CXe(e,t,r,n){let{node:o}=e;if(az(o))return sXe(e,t);switch(o.type){case"JsExpressionRoot":return r("node");case"JsonRoot":return[$o(e,t),r("node"),Be];case"File":return aXe(e,t,r)??r("program");case"ExpressionStatement":return iXe(e,t,r);case"ChainExpression":return r("expression");case"ParenthesizedExpression":return!rt(o.expression)&&(Lu(o.expression)||Fa(o.expression))?["(",r("expression"),")"]:de(["(",Fe([Pe,r("expression")]),Pe,")"]);case"AssignmentExpression":return BWe(e,t,r);case"VariableDeclarator":return qWe(e,t,r);case"BinaryExpression":case"LogicalExpression":return E_e(e,t,r);case"AssignmentPattern":return[r("left")," = ",r("right")];case"OptionalMemberExpression":case"MemberExpression":return RWe(e,t,r);case"MetaProperty":return[r("meta"),".",r("property")];case"BindExpression":return OWe(e,t,r);case"Identifier":return[o.name,Ns(e),x_e(e),Na(e,r)];case"V8IntrinsicIdentifier":return["%",o.name];case"SpreadElement":return WU(e,r);case"RestElement":return WU(e,r);case"FunctionDeclaration":case"FunctionExpression":return M_e(e,t,r,n);case"ArrowFunctionExpression":return LQe(e,t,r,n);case"YieldExpression":return[`yield${o.delegate?"*":""}`,o.argument?[" ",r("argument")]:""];case"AwaitExpression":{let i=["await"];if(o.argument){i.push(" ",r("argument"));let{parent:a}=e;if(jn(a)&&a.callee===o||Mo(a)&&a.object===o){i=[Fe([Pe,...i]),Pe];let s=e.findAncestor(c=>c.type==="AwaitExpression"||c.type==="BlockStatement");if(s?.type!=="AwaitExpression"||!Ps(s.argument,c=>c===o))return de(i)}}return i}case"ExportDefaultDeclaration":case"ExportNamedDeclaration":case"ExportAllDeclaration":return afe(e,t,r);case"ImportDeclaration":return _Xe(e,t,r);case"ImportSpecifier":case"ExportSpecifier":case"ImportNamespaceSpecifier":case"ExportNamespaceSpecifier":case"ImportDefaultSpecifier":case"ExportDefaultSpecifier":return SXe(e,t,r);case"ImportAttribute":return CU(e,t,r);case"Program":case"BlockStatement":case"StaticBlock":return Z_e(e,t,r);case"ClassBody":return Dz(e,t,r);case"ThrowStatement":return rQe(e,t,r);case"ReturnStatement":return tQe(e,t,r);case"NewExpression":case"ImportExpression":case"OptionalCallExpression":case"CallExpression":return J3(e,t,r);case"ObjectExpression":case"ObjectPattern":return Iz(e,t,r);case"Property":return TD(o)?GU(e,t,r):CU(e,t,r);case"ObjectProperty":return CU(e,t,r);case"ObjectMethod":return GU(e,t,r);case"Decorator":return["@",r("expression")];case"ArrayExpression":case"ArrayPattern":return bz(e,t,r);case"SequenceExpression":{let{parent:i}=e;if(i.type==="ExpressionStatement"||i.type==="ForStatement"){let s=[];return e.each(({isFirst:c})=>{c?s.push(r()):s.push(",",Fe([at,r()]))},"expressions"),de(s)}let a=dn([",",at],e.map(r,"expressions"));return(i.type==="ReturnStatement"||i.type==="ThrowStatement")&&e.key==="argument"||i.type==="ArrowFunctionExpression"&&e.key==="body"?de(Sr([Fe([Pe,a]),Pe],a)):de(a)}case"ThisExpression":return"this";case"Super":return"super";case"Directive":return[r("value"),t.semi?";":""];case"UnaryExpression":{let i=[o.operator];return/[a-z]$/u.test(o.operator)&&i.push(" "),rt(o.argument)?i.push(de(["(",Fe([Pe,r("argument")]),Pe,")"])):i.push(r("argument")),i}case"UpdateExpression":return[o.prefix?o.operator:"",r("argument"),o.prefix?"":o.operator];case"ConditionalExpression":return kz(e,t,r,n);case"VariableDeclaration":{let i=e.map(r,"declarations"),a=e.parent,s=a.type==="ForStatement"||a.type==="ForInStatement"||a.type==="ForOfStatement",c=o.declarations.some(d=>d.init),p;return i.length===1&&!rt(o.declarations[0])?p=i[0]:i.length>0&&(p=Fe(i[0])),de([Bc(e),o.kind,p?[" ",p]:"",Fe(i.slice(1).map(d=>[",",c&&!s?Be:at,d])),t.semi&&!(s&&a.body!==o)?";":""])}case"WithStatement":return de(["with (",r("object"),")",Km(o.body,r("body"))]);case"IfStatement":{let i=Km(o.consequent,r("consequent")),a=[de(["if (",de([Fe([Pe,r("test")]),Pe]),")",i])];if(o.alternate){let s=rt(o.consequent,St.Trailing|St.Line)||jde(o),c=o.consequent.type==="BlockStatement"&&!s;a.push(c?" ":Be),rt(o,St.Dangling)&&a.push($o(e,t),s?Be:" "),a.push("else",de(Km(o.alternate,r("alternate"),o.alternate.type==="IfStatement")))}return a}case"ForStatement":{let i=Km(o.body,r("body")),a=$o(e,t),s=a?[a,Pe]:"";return!o.init&&!o.test&&!o.update?[s,de(["for (;;)",i])]:[s,de(["for (",de([Fe([Pe,r("init"),";",at,r("test"),";",o.update?[at,r("update")]:Sr("",at)]),Pe]),")",i])]}case"WhileStatement":return de(["while (",de([Fe([Pe,r("test")]),Pe]),")",Km(o.body,r("body"))]);case"ForInStatement":return de(["for (",r("left")," in ",r("right"),")",Km(o.body,r("body"))]);case"ForOfStatement":return de(["for",o.await?" await":""," (",r("left")," of ",r("right"),")",Km(o.body,r("body"))]);case"DoWhileStatement":{let i=Km(o.body,r("body"));return[de(["do",i]),o.body.type==="BlockStatement"?" ":Be,"while (",de([Fe([Pe,r("test")]),Pe]),")",t.semi?";":""]}case"DoExpression":return[o.async?"async ":"","do ",r("body")];case"BreakStatement":case"ContinueStatement":return[o.type==="BreakStatement"?"break":"continue",o.label?[" ",r("label")]:"",t.semi?";":""];case"LabeledStatement":return[r("label"),`:${o.body.type==="EmptyStatement"&&!rt(o.body,St.Leading)?"":" "}`,r("body")];case"TryStatement":return["try ",r("block"),o.handler?[" ",r("handler")]:"",o.finalizer?[" finally ",r("finalizer")]:""];case"CatchClause":if(o.param){let i=rt(o.param,s=>!ju(s)||s.leading&&nc(t.originalText,Kr(s))||s.trailing&&nc(t.originalText,Yr(s),{backwards:!0})),a=r("param");return["catch ",i?["(",Fe([Pe,a]),Pe,") "]:["(",a,") "],r("body")]}return["catch ",r("body")];case"SwitchStatement":return[de(["switch (",Fe([Pe,r("discriminant")]),Pe,")"])," {",o.cases.length>0?Fe([Be,dn(Be,e.map(({node:i,isLast:a})=>[r(),!a&&ld(i,t)?Be:""],"cases"))]):"",Be,"}"];case"SwitchCase":{let i=[];o.test?i.push("case ",r("test"),":"):i.push("default:"),rt(o,St.Dangling)&&i.push(" ",$o(e,t));let a=o.consequent.filter(s=>s.type!=="EmptyStatement");if(a.length>0){let s=HU(e,t,r,"consequent");i.push(a.length===1&&a[0].type==="BlockStatement"?[" ",s]:Fe([Be,s]))}return i}case"DebuggerStatement":return["debugger",t.semi?";":""];case"ClassDeclaration":case"ClassExpression":return Az(e,t,r);case"ClassMethod":case"ClassPrivateMethod":case"MethodDefinition":return tfe(e,t,r);case"ClassProperty":case"PropertyDefinition":case"ClassPrivateProperty":case"ClassAccessorProperty":case"AccessorProperty":return rfe(e,t,r);case"TemplateElement":return xg(o.value.raw);case"TemplateLiteral":return __e(e,t,r);case"TaggedTemplateExpression":return oZe(e,t,r);case"PrivateIdentifier":return["#",o.name];case"PrivateName":return["#",r("id")];case"TopicReference":return"%";case"ArgumentPlaceholder":return"?";case"ModuleExpression":return["module ",r("body")];case"VoidPattern":return"void";case"EmptyStatement":if(oz(e))return";";default:throw new o1(o,"ESTree")}}function dfe(e){return[e("elementType"),"[]"]}var PXe=Ir(["SatisfiesExpression","TSSatisfiesExpression"]);function _fe(e,t,r){let{parent:n,node:o,key:i}=e,a=o.type==="AsConstExpression"?"const":r("typeAnnotation"),s=[r("expression")," ",PXe(o)?"satisfies":"as"," ",a];return i==="callee"&&jn(n)||i==="object"&&Mo(n)?de([Fe([Pe,...s]),Pe]):s}function OXe(e,t,r){let{node:n}=e,o=[Bc(e),"component"];n.id&&o.push(" ",r("id")),o.push(r("typeParameters"));let i=NXe(e,t,r);return n.rendersType?o.push(de([i," ",r("rendersType")])):o.push(de([i])),n.body&&o.push(" ",r("body")),t.semi&&n.type==="DeclareComponent"&&o.push(";"),o}function NXe(e,t,r){let{node:n}=e,o=n.params;if(n.rest&&(o=[...o,n.rest]),o.length===0)return["(",$o(e,t,{filter:a=>$u(t.originalText,Kr(a))===")"}),")"];let i=[];return RXe(e,(a,s)=>{let c=s===o.length-1;c&&n.rest&&i.push("..."),i.push(r()),!c&&(i.push(","),ld(o[s],t)?i.push(Be,Be):i.push(at))}),["(",Fe([Pe,...i]),Sr(cd(t,"all")&&!FXe(n,o)?",":""),Pe,")"]}function FXe(e,t){return e.rest||Vn(0,t,-1)?.type==="RestElement"}function RXe(e,t){let{node:r}=e,n=0,o=i=>t(i,n++);e.each(o,"params"),r.rest&&e.call(o,"rest")}function LXe(e,t,r){let{node:n}=e;return n.shorthand?r("local"):[r("name")," as ",r("local")]}function $Xe(e,t,r){let{node:n}=e,o=[];return n.name&&o.push(r("name"),n.optional?"?: ":": "),o.push(r("typeAnnotation")),o}function ffe(e,t,r){return Iz(e,t,r)}function MXe(e,t,r){let{node:n}=e;return[n.type==="EnumSymbolBody"||n.explicitType?`of ${n.type.slice(4,-4).toLowerCase()} `:"",ffe(e,t,r)]}function mfe(e,t){let{node:r}=e,n=t("id");r.computed&&(n=["[",n,"]"]);let o="";return r.initializer&&(o=t("initializer")),r.init&&(o=t("init")),o?[n," = ",o]:n}function hfe(e,t){let{node:r}=e;return[Bc(e),r.const?"const ":"","enum ",t("id")," ",t("body")]}function yfe(e,t,r){let{node:n}=e,o=[W3(e)];(n.type==="TSConstructorType"||n.type==="TSConstructSignatureDeclaration")&&o.push("new ");let i=Pg(e,t,r,!1,!0),a=[];return n.type==="FunctionTypeAnnotation"?a.push(jXe(e)?" => ":": ",r("returnType")):a.push(Na(e,r,"returnType")),n1(n,a)&&(i=de(i)),o.push(i,a),[de(o),n.type==="TSConstructSignatureDeclaration"||n.type==="TSCallSignatureDeclaration"?z_(e,t):""]}function jXe(e){let{node:t,parent:r}=e;return t.type==="FunctionTypeAnnotation"&&(Rde(r)||!((r.type==="ObjectTypeProperty"||r.type==="ObjectTypeInternalSlot")&&!r.variance&&!r.optional&&K3(r,t)||r.type==="ObjectTypeCallProperty"||e.getParentNode(2)?.type==="DeclareFunction"))}function BXe(e,t,r){let{node:n}=e,o=["hook"];n.id&&o.push(" ",r("id"));let i=Pg(e,t,r,!1,!0),a=X3(e,r),s=n1(n,a);return o.push(de([s?de(i):i,a]),n.body?" ":"",r("body")),o}function qXe(e,t,r){let{node:n}=e,o=[Bc(e),"hook"];return n.id&&o.push(" ",r("id")),t.semi&&o.push(";"),o}function yde(e){let{node:t}=e;return t.type==="HookTypeAnnotation"&&e.getParentNode(2)?.type==="DeclareHook"}function UXe(e,t,r){let{node:n}=e,o=Pg(e,t,r,!1,!0),i=[yde(e)?": ":" => ",r("returnType")];return de([yde(e)?"":"hook ",n1(n,i)?de(o):o,i])}function gfe(e,t,r){return[r("objectType"),Ns(e),"[",r("indexType"),"]"]}function Sfe(e,t,r){return["infer ",r("typeParameter")]}function vfe(e,t,r){let n=!1;return de(e.map(({isFirst:o,previous:i,node:a,index:s})=>{let c=r();if(o)return c;let p=Hm(a),d=Hm(i);return d&&p?[" & ",n?Fe(c):c]:!d&&!p||Ru(t.originalText,a)?t.experimentalOperatorPosition==="start"?Fe([at,"& ",c]):Fe([" &",at,c]):(s>1&&(n=!0),[" & ",s>1?Fe(c):c])},"types"))}function zXe(e){switch(e){case null:return"";case"PlusOptional":return"+?";case"MinusOptional":return"-?";case"Optional":return"?"}}function JXe(e,t,r){let{node:n}=e;return[de([n.variance?r("variance"):"","[",Fe([r("keyTparam")," in ",r("sourceType")]),"]",zXe(n.optional),": ",r("propType")]),z_(e,t)]}function gde(e,t){return e==="+"||e==="-"?e+t:t}function VXe(e,t,r){let{node:n}=e,o=!1;if(t.objectWrap==="preserve"){let i=Yr(n),a=Y3(t,i+1,Yr(n.key)),s=i+1+a.search(/\S/u);jc(t.originalText,i,s)&&(o=!0)}return de(["{",Fe([t.bracketSpacing?at:Pe,rt(n,St.Dangling)?de([$o(e,t),Be]):"",de([n.readonly?[gde(n.readonly,"readonly")," "]:"","[",r("key")," in ",r("constraint"),n.nameType?[" as ",r("nameType")]:"","]",n.optional?gde(n.optional,"?"):"",n.typeAnnotation?": ":"",r("typeAnnotation")]),t.semi?Sr(";"):""]),t.bracketSpacing?at:Pe,"}"],{shouldBreak:o})}function KXe(e,t,r){let{node:n}=e;return[de(["match (",Fe([Pe,r("argument")]),Pe,")"])," {",n.cases.length>0?Fe([Be,dn(Be,e.map(({node:o,isLast:i})=>[r(),!i&&ld(o,t)?Be:""],"cases"))]):"",Be,"}"]}function GXe(e,t,r){let{node:n}=e,o=rt(n,St.Dangling)?[" ",$o(e,t)]:[],i=n.type==="MatchStatementCase"?[" ",r("body")]:Fe([at,r("body"),","]);return[r("pattern"),n.guard?de([Fe([at,"if (",r("guard"),")"])]):"",de([" =>",o,i])]}function HXe(e,t,r){let{node:n}=e;switch(n.type){case"MatchOrPattern":return QXe(e,t,r);case"MatchAsPattern":return[r("pattern")," as ",r("target")];case"MatchWildcardPattern":return["_"];case"MatchLiteralPattern":return r("literal");case"MatchUnaryPattern":return[n.operator,r("argument")];case"MatchIdentifierPattern":return r("id");case"MatchMemberPattern":{let o=n.property.type==="Identifier"?[".",r("property")]:["[",Fe([Pe,r("property")]),Pe,"]"];return de([r("base"),o])}case"MatchBindingPattern":return[n.kind," ",r("id")];case"MatchObjectPattern":{let o=e.map(r,"properties");return n.rest&&o.push(r("rest")),de(["{",Fe([Pe,dn([",",at],o)]),n.rest?"":Sr(","),Pe,"}"])}case"MatchArrayPattern":{let o=e.map(r,"elements");return n.rest&&o.push(r("rest")),de(["[",Fe([Pe,dn([",",at],o)]),n.rest?"":Sr(","),Pe,"]"])}case"MatchObjectPatternProperty":return n.shorthand?r("pattern"):de([r("key"),":",Fe([at,r("pattern")])]);case"MatchRestPattern":{let o=["..."];return n.argument&&o.push(r("argument")),o}}}var bfe=Ir(["MatchWildcardPattern","MatchLiteralPattern","MatchUnaryPattern","MatchIdentifierPattern"]);function ZXe(e){let{patterns:t}=e;if(t.some(n=>rt(n)))return!1;let r=t.find(n=>n.type==="MatchObjectPattern");return r?t.every(n=>n===r||bfe(n)):!1}function WXe(e){return bfe(e)||e.type==="MatchObjectPattern"?!0:e.type==="MatchOrPattern"?ZXe(e):!1}function QXe(e,t,r){let{node:n}=e,{parent:o}=e,i=o.type!=="MatchStatementCase"&&o.type!=="MatchExpressionCase"&&o.type!=="MatchArrayPattern"&&o.type!=="MatchObjectPatternProperty"&&!Ru(t.originalText,n),a=WXe(n),s=e.map(()=>{let p=r();return a||(p=Mu(2,p)),Ll(e,p,t)},"patterns");if(a)return dn(" | ",s);let c=[Sr(["| "]),dn([at,"| "],s)];return eh(e,t)?de([Fe([Sr([Pe]),c]),Pe]):o.type==="MatchArrayPattern"&&o.elements.length>1?de([Fe([Sr(["(",Pe]),c]),Pe,Sr(")")]):de(i?Fe(c):c)}function XXe(e,t,r){let{node:n}=e,o=[Bc(e),"opaque type ",r("id"),r("typeParameters")];if(n.supertype&&o.push(": ",r("supertype")),n.lowerBound||n.upperBound){let i=[];n.lowerBound&&i.push(Fe([at,"super ",r("lowerBound")])),n.upperBound&&i.push(Fe([at,"extends ",r("upperBound")])),o.push(de(i))}return n.impltype&&o.push(" = ",r("impltype")),o.push(t.semi?";":""),o}function xfe(e,t,r){let{node:n}=e;return["...",...n.type==="TupleTypeSpreadElement"&&n.label?[r("label"),": "]:[],r("typeAnnotation")]}function Efe(e,t,r){let{node:n}=e;return[n.variance?r("variance"):"",r("label"),n.optional?"?":"",": ",r("elementType")]}function Tfe(e,t,r){let{node:n}=e,o=[Bc(e),"type ",r("id"),r("typeParameters")],i=n.type==="TSTypeAliasDeclaration"?"typeAnnotation":"right";return[ID(e,t,r,o," =",i),t.semi?";":""]}function YXe(e,t,r){let{node:n}=e;return ss(n).length===1&&n.type.startsWith("TS")&&!n[r][0].constraint&&e.parent.type==="ArrowFunctionExpression"&&!(t.filepath&&/\.ts$/u.test(t.filepath))}function yD(e,t,r,n){let{node:o}=e;if(!o[n])return"";if(!Array.isArray(o[n]))return r(n);let i=G3(e.grandparent),a=e.match(c=>!(c[n].length===1&&Hm(c[n][0])),void 0,(c,p)=>p==="typeAnnotation",c=>c.type==="Identifier",R_e);if(o[n].length===0||!a&&(i||o[n].length===1&&(o[n][0].type==="NullableTypeAnnotation"||bWe(o[n][0]))))return["<",dn(", ",e.map(r,n)),eYe(e,t),">"];let s=o.type==="TSTypeParameterInstantiation"?"":YXe(e,t,n)?",":cd(t)?Sr(","):"";return de(["<",Fe([Pe,dn([",",at],e.map(r,n))]),s,Pe,">"])}function eYe(e,t){let{node:r}=e;if(!rt(r,St.Dangling))return"";let n=!rt(r,St.Line),o=$o(e,t,{indent:!n});return n?o:[o,Be]}function Dfe(e,t,r){let{node:n}=e,o=[n.const?"const ":""],i=n.type==="TSTypeParameter"?r("name"):n.name;if(n.variance&&o.push(r("variance")),n.in&&o.push("in "),n.out&&o.push("out "),o.push(i),n.bound&&(n.usesExtendsBound&&o.push(" extends "),o.push(Na(e,r,"bound"))),n.constraint){let a=Symbol("constraint");o.push(" extends",de(Fe(at),{id:a}),sd,vD(r("constraint"),{groupId:a}))}if(n.default){let a=Symbol("default");o.push(" =",de(Fe(at),{id:a}),sd,vD(r("default"),{groupId:a}))}return de(o)}function Afe(e,t){let{node:r}=e;return[r.type==="TSTypePredicate"&&r.asserts?"asserts ":r.type==="TypePredicate"&&r.kind?`${r.kind} `:"",t("parameterName"),r.typeAnnotation?[" is ",Na(e,t)]:""]}function Ife({node:e},t){let r=e.type==="TSTypeQuery"?"exprName":"argument";return["typeof ",t(r),t("typeArguments")]}function tYe(e,t,r){let{node:n}=e;if(Cde(n))return n.type.slice(0,-14).toLowerCase();switch(n.type){case"ComponentDeclaration":case"DeclareComponent":case"ComponentTypeAnnotation":return OXe(e,t,r);case"ComponentParameter":return LXe(e,t,r);case"ComponentTypeParameter":return $Xe(e,t,r);case"HookDeclaration":return BXe(e,t,r);case"DeclareHook":return qXe(e,t,r);case"HookTypeAnnotation":return UXe(e,t,r);case"DeclareFunction":return[Bc(e),"function ",r("id"),r("predicate"),t.semi?";":""];case"DeclareModule":return["declare module ",r("id")," ",r("body")];case"DeclareModuleExports":return["declare module.exports",Na(e,r),t.semi?";":""];case"DeclareNamespace":return["declare namespace ",r("id")," ",r("body")];case"DeclareVariable":return[Bc(e),n.kind??"var"," ",r("id"),t.semi?";":""];case"DeclareExportDeclaration":case"DeclareExportAllDeclaration":return afe(e,t,r);case"DeclareOpaqueType":case"OpaqueType":return XXe(e,t,r);case"DeclareTypeAlias":case"TypeAlias":return Tfe(e,t,r);case"IntersectionTypeAnnotation":return vfe(e,t,r);case"UnionTypeAnnotation":return T_e(e,t,r);case"ConditionalTypeAnnotation":return kz(e,t,r);case"InferTypeAnnotation":return Sfe(e,t,r);case"FunctionTypeAnnotation":return yfe(e,t,r);case"TupleTypeAnnotation":return bz(e,t,r);case"TupleTypeLabeledElement":return Efe(e,t,r);case"TupleTypeSpreadElement":return xfe(e,t,r);case"GenericTypeAnnotation":return[r("id"),yD(e,t,r,"typeParameters")];case"IndexedAccessType":case"OptionalIndexedAccessType":return gfe(e,t,r);case"TypeAnnotation":return I_e(e,t,r);case"TypeParameter":return Dfe(e,t,r);case"TypeofTypeAnnotation":return Ife(e,r);case"ExistsTypeAnnotation":return"*";case"ArrayTypeAnnotation":return dfe(r);case"DeclareEnum":case"EnumDeclaration":return hfe(e,r);case"EnumBooleanBody":case"EnumNumberBody":case"EnumBigIntBody":case"EnumStringBody":case"EnumSymbolBody":return MXe(e,t,r);case"EnumBooleanMember":case"EnumNumberMember":case"EnumBigIntMember":case"EnumStringMember":case"EnumDefaultedMember":return mfe(e,r);case"FunctionTypeParam":{let o=n.name?r("name"):e.parent.this===n?"this":"";return[o,Ns(e),o?": ":"",r("typeAnnotation")]}case"DeclareClass":case"DeclareInterface":case"InterfaceDeclaration":case"InterfaceTypeAnnotation":return Az(e,t,r);case"ObjectTypeAnnotation":return Dz(e,t,r);case"ClassImplements":case"InterfaceExtends":return[r("id"),r("typeParameters")];case"NullableTypeAnnotation":return["?",r("typeAnnotation")];case"Variance":{let{kind:o}=n;return Eg(o==="plus"||o==="minus"),o==="plus"?"+":"-"}case"KeyofTypeAnnotation":return["keyof ",r("argument")];case"ObjectTypeCallProperty":return[n.static?"static ":"",r("value"),z_(e,t)];case"ObjectTypeMappedTypeProperty":return JXe(e,t,r);case"ObjectTypeIndexer":return[n.static?"static ":"",n.variance?r("variance"):"","[",r("id"),n.id?": ":"",r("key"),"]: ",r("value"),z_(e,t)];case"ObjectTypeProperty":{let o="";return n.proto?o="proto ":n.static&&(o="static "),[o,n.kind!=="init"?n.kind+" ":"",n.variance?r("variance"):"",wD(e,t,r),Ns(e),TD(n)?"":": ",r("value"),z_(e,t)]}case"ObjectTypeInternalSlot":return[n.static?"static ":"","[[",r("id"),"]]",Ns(e),n.method?"":": ",r("value"),z_(e,t)];case"ObjectTypeSpreadProperty":return WU(e,r);case"QualifiedTypeofIdentifier":case"QualifiedTypeIdentifier":return[r("qualification"),".",r("id")];case"NullLiteralTypeAnnotation":return"null";case"BooleanLiteralTypeAnnotation":return String(n.value);case"StringLiteralTypeAnnotation":return xg(Wv(oc(n),t));case"NumberLiteralTypeAnnotation":return Yv(oc(n));case"BigIntLiteralTypeAnnotation":return ZU(oc(n));case"TypeCastExpression":return["(",r("expression"),Na(e,r),")"];case"TypePredicate":return Afe(e,r);case"TypeOperator":return[n.operator," ",r("typeAnnotation")];case"TypeParameterDeclaration":case"TypeParameterInstantiation":return yD(e,t,r,"params");case"InferredPredicate":case"DeclaredPredicate":return[e.key==="predicate"&&e.parent.type!=="DeclareFunction"&&!e.parent.returnType?": ":" ","%checks",...n.type==="DeclaredPredicate"?["(",r("value"),")"]:[]];case"AsExpression":case"AsConstExpression":case"SatisfiesExpression":return _fe(e,t,r);case"MatchExpression":case"MatchStatement":return KXe(e,t,r);case"MatchExpressionCase":case"MatchStatementCase":return GXe(e,t,r);case"MatchOrPattern":case"MatchAsPattern":case"MatchWildcardPattern":case"MatchLiteralPattern":case"MatchUnaryPattern":case"MatchIdentifierPattern":case"MatchMemberPattern":case"MatchBindingPattern":case"MatchObjectPattern":case"MatchObjectPatternProperty":case"MatchRestPattern":case"MatchArrayPattern":return HXe(e,t,r)}}function rYe(e,t,r){let{node:n}=e,o=n.parameters.length>1?Sr(cd(t)?",":""):"",i=de([Fe([Pe,dn([", ",Pe],e.map(r,"parameters"))]),o,Pe]);return[e.key==="body"&&e.parent.type==="ClassBody"&&n.static?"static ":"",n.readonly?"readonly ":"","[",n.parameters?i:"","]",Na(e,r),z_(e,t)]}function Sde(e,t,r){let{node:n}=e;return[n.postfix?"":r,Na(e,t),n.postfix?r:""]}function nYe(e,t,r){let{node:n}=e,o=[],i=n.kind&&n.kind!=="method"?`${n.kind} `:"";o.push(Q3(n),i,n.computed?"[":"",r("key"),n.computed?"]":"",Ns(e));let a=Pg(e,t,r,!1,!0),s=Na(e,r,"returnType"),c=n1(n,s);return o.push(c?de(a):a),n.returnType&&o.push(de(s)),[de(o),z_(e,t)]}function oYe(e,t,r){let{node:n}=e;return[Bc(e),n.kind==="global"?"":`${n.kind} `,r("id"),n.body?[" ",de(r("body"))]:t.semi?";":""]}function iYe(e,t,r){let{node:n}=e,o=!(Fa(n.expression)||Lu(n.expression)),i=de(["<",Fe([Pe,r("typeAnnotation")]),Pe,">"]),a=[Sr("("),Fe([Pe,r("expression")]),Pe,Sr(")")];return o?vg([[i,r("expression")],[i,de(a,{shouldBreak:!0})],[i,r("expression")]]):de([i,r("expression")])}function aYe(e,t,r){let{node:n}=e;if(n.type.startsWith("TS")){if(Pde(n))return n.type.slice(2,-7).toLowerCase();switch(n.type){case"TSThisType":return"this";case"TSTypeAssertion":return iYe(e,t,r);case"TSDeclareFunction":return M_e(e,t,r);case"TSExportAssignment":return["export = ",r("expression"),t.semi?";":""];case"TSModuleBlock":return Z_e(e,t,r);case"TSInterfaceBody":case"TSTypeLiteral":return Dz(e,t,r);case"TSTypeAliasDeclaration":return Tfe(e,t,r);case"TSQualifiedName":return[r("left"),".",r("right")];case"TSAbstractMethodDefinition":case"TSDeclareMethod":return tfe(e,t,r);case"TSAbstractAccessorProperty":case"TSAbstractPropertyDefinition":return rfe(e,t,r);case"TSInterfaceHeritage":case"TSClassImplements":case"TSInstantiationExpression":return[r("expression"),r("typeArguments")];case"TSTemplateLiteralType":return __e(e,t,r);case"TSNamedTupleMember":return Efe(e,t,r);case"TSRestType":return xfe(e,t,r);case"TSOptionalType":return[r("typeAnnotation"),"?"];case"TSInterfaceDeclaration":return Az(e,t,r);case"TSTypeParameterDeclaration":case"TSTypeParameterInstantiation":return yD(e,t,r,"params");case"TSTypeParameter":return Dfe(e,t,r);case"TSAsExpression":case"TSSatisfiesExpression":return _fe(e,t,r);case"TSArrayType":return dfe(r);case"TSPropertySignature":return[n.readonly?"readonly ":"",wD(e,t,r),Ns(e),Na(e,r),z_(e,t)];case"TSParameterProperty":return[Q3(n),n.static?"static ":"",n.override?"override ":"",n.readonly?"readonly ":"",r("parameter")];case"TSTypeQuery":return Ife(e,r);case"TSIndexSignature":return rYe(e,t,r);case"TSTypePredicate":return Afe(e,r);case"TSNonNullExpression":return[r("expression"),"!"];case"TSImportType":return[J3(e,t,r),n.qualifier?[".",r("qualifier")]:"",yD(e,t,r,"typeArguments")];case"TSLiteralType":return r("literal");case"TSIndexedAccessType":return gfe(e,t,r);case"TSTypeOperator":return[n.operator," ",r("typeAnnotation")];case"TSMappedType":return VXe(e,t,r);case"TSMethodSignature":return nYe(e,t,r);case"TSNamespaceExportDeclaration":return["export as namespace ",r("id"),t.semi?";":""];case"TSEnumDeclaration":return hfe(e,r);case"TSEnumBody":return ffe(e,t,r);case"TSEnumMember":return mfe(e,r);case"TSImportEqualsDeclaration":return["import ",sfe(n,!1),r("id")," = ",r("moduleReference"),t.semi?";":""];case"TSExternalModuleReference":return J3(e,t,r);case"TSModuleDeclaration":return oYe(e,t,r);case"TSConditionalType":return kz(e,t,r);case"TSInferType":return Sfe(e,t,r);case"TSIntersectionType":return vfe(e,t,r);case"TSUnionType":return T_e(e,t,r);case"TSFunctionType":case"TSCallSignatureDeclaration":case"TSConstructorType":case"TSConstructSignatureDeclaration":return yfe(e,t,r);case"TSTupleType":return bz(e,t,r);case"TSTypeReference":return[r("typeName"),yD(e,t,r,"typeArguments")];case"TSTypeAnnotation":return I_e(e,t,r);case"TSEmptyBodyFunctionExpression":return xz(e,t,r);case"TSJSDocAllType":return"*";case"TSJSDocUnknownType":return"?";case"TSJSDocNullableType":return Sde(e,r,"?");case"TSJSDocNonNullableType":return Sde(e,r,"!");default:throw new o1(n,"TypeScript")}}}function sYe(e,t,r,n){for(let o of[kQe,TQe,tYe,aYe,CXe]){let i=o(e,t,r,n);if(i!==void 0)return i}}var cYe=Ir(["ClassMethod","ClassPrivateMethod","ClassProperty","ClassAccessorProperty","AccessorProperty","TSAbstractAccessorProperty","PropertyDefinition","TSAbstractPropertyDefinition","ClassPrivateProperty","MethodDefinition","TSAbstractMethodDefinition","TSDeclareMethod"]);function lYe(e,t,r,n){e.isRoot&&t.__onHtmlBindingRoot?.(e.node,t);let{node:o}=e,i=Tz(e)?t.originalText.slice(Yr(o),Kr(o)):sYe(e,t,r,n);if(!i)return"";if(cYe(o))return i;let a=jo(o.decorators),s=FQe(e,t,r),c=o.type==="ClassExpression";if(a&&!c)return BU(i,f=>de([s,f]));let p=eh(e,t),d=oQe(e,t);return!s&&!p&&!d?i:BU(i,f=>[d?";":"",p?"(":"",p&&c&&a?[Fe([at,s,f]),at]:[s,f],p?")":""])}var vde=lYe,uYe={experimental_avoidAstMutation:!0},pYe=[{name:"JSON.stringify",type:"data",aceMode:"json",extensions:[".importmap"],filenames:["package.json","package-lock.json","composer.json"],tmScope:"source.json",aliases:["geojson","jsonl","sarif","topojson"],codemirrorMode:"javascript",codemirrorMimeType:"application/json",parsers:["json-stringify"],vscodeLanguageIds:["json"],linguistLanguageId:174},{name:"JSON",type:"data",aceMode:"json",extensions:[".json",".4DForm",".4DProject",".avsc",".geojson",".gltf",".har",".ice",".JSON-tmLanguage",".json.example",".mcmeta",".sarif",".tact",".tfstate",".tfstate.backup",".topojson",".webapp",".webmanifest",".yy",".yyp"],filenames:[".all-contributorsrc",".arcconfig",".auto-changelog",".c8rc",".htmlhintrc",".imgbotconfig",".nycrc",".tern-config",".tern-project",".watchmanconfig",".babelrc",".jscsrc",".jshintrc",".jslintrc",".swcrc"],tmScope:"source.json",aliases:["geojson","jsonl","sarif","topojson"],codemirrorMode:"javascript",codemirrorMimeType:"application/json",parsers:["json"],vscodeLanguageIds:["json"],linguistLanguageId:174},{name:"JSON with Comments",type:"data",aceMode:"javascript",extensions:[".jsonc",".code-snippets",".code-workspace",".sublime-build",".sublime-color-scheme",".sublime-commands",".sublime-completions",".sublime-keymap",".sublime-macro",".sublime-menu",".sublime-mousemap",".sublime-project",".sublime-settings",".sublime-theme",".sublime-workspace",".sublime_metrics",".sublime_session"],filenames:[],tmScope:"source.json.comments",aliases:["jsonc"],codemirrorMode:"javascript",codemirrorMimeType:"text/javascript",group:"JSON",parsers:["jsonc"],vscodeLanguageIds:["jsonc"],linguistLanguageId:423},{name:"JSON5",type:"data",aceMode:"json5",extensions:[".json5"],tmScope:"source.js",codemirrorMode:"javascript",codemirrorMimeType:"application/json",parsers:["json5"],vscodeLanguageIds:["json5"],linguistLanguageId:175}],wfe={};QU(wfe,{getVisitorKeys:()=>fYe,massageAstNode:()=>kfe,print:()=>mYe});var Vv=[[]],dYe={JsonRoot:["node"],ArrayExpression:["elements"],ObjectExpression:["properties"],ObjectProperty:["key","value"],UnaryExpression:["argument"],NullLiteral:Vv[0],BooleanLiteral:Vv[0],StringLiteral:Vv[0],NumericLiteral:Vv[0],Identifier:Vv[0],TemplateLiteral:["quasis"],TemplateElement:Vv[0]},_Ye=wde(dYe),fYe=_Ye;function mYe(e,t,r){let{node:n}=e;switch(n.type){case"JsonRoot":return[r("node"),Be];case"ArrayExpression":{if(n.elements.length===0)return"[]";let o=e.map(()=>e.node===null?"null":r(),"elements");return["[",Fe([Be,dn([",",Be],o)]),Be,"]"]}case"ObjectExpression":return n.properties.length===0?"{}":["{",Fe([Be,dn([",",Be],e.map(r,"properties"))]),Be,"}"];case"ObjectProperty":return[r("key"),": ",r("value")];case"UnaryExpression":return[n.operator==="+"?"":n.operator,r("argument")];case"NullLiteral":return"null";case"BooleanLiteral":return n.value?"true":"false";case"StringLiteral":return JSON.stringify(n.value);case"NumericLiteral":return bde(e)?JSON.stringify(String(n.value)):JSON.stringify(n.value);case"Identifier":return bde(e)?JSON.stringify(n.name):n.name;case"TemplateLiteral":return r(["quasis",0]);case"TemplateElement":return JSON.stringify(n.value.cooked);default:throw new o1(n,"JSON")}}function bde(e){return e.key==="key"&&e.parent.type==="ObjectProperty"}var hYe=new Set(["start","end","extra","loc","comments","leadingComments","trailingComments","innerComments","errors","range","tokens"]);function kfe(e,t){let{type:r}=e;if(r==="ObjectProperty"){let{key:n}=e;n.type==="Identifier"?t.key={type:"StringLiteral",value:n.name}:n.type==="NumericLiteral"&&(t.key={type:"StringLiteral",value:String(n.value)});return}if(r==="UnaryExpression"&&e.operator==="+")return t.argument;if(r==="ArrayExpression"){for(let[n,o]of e.elements.entries())o===null&&t.elements.splice(n,0,{type:"NullLiteral"});return}if(r==="TemplateLiteral")return{type:"StringLiteral",value:e.quasis[0].value.cooked}}kfe.ignoredProperties=hYe;var dD={bracketSpacing:{category:"Common",type:"boolean",default:!0,description:"Print spaces between brackets.",oppositeDescription:"Do not print spaces between brackets."},objectWrap:{category:"Common",type:"choice",default:"preserve",description:"How to wrap object literals.",choices:[{value:"preserve",description:"Keep as multi-line, if there is a newline between the opening brace and first property."},{value:"collapse",description:"Fit to a single line when possible."}]},singleQuote:{category:"Common",type:"boolean",default:!1,description:"Use single quotes instead of double quotes."},proseWrap:{category:"Common",type:"choice",default:"preserve",description:"How to wrap prose.",choices:[{value:"always",description:"Wrap prose if it exceeds the print width."},{value:"never",description:"Do not wrap prose."},{value:"preserve",description:"Wrap prose as-is."}]},bracketSameLine:{category:"Common",type:"boolean",default:!1,description:"Put > of opening tags on the last line instead of on a new line."},singleAttributePerLine:{category:"Common",type:"boolean",default:!1,description:"Enforce single attribute per line in HTML, Vue and JSX."}},Gm="JavaScript",yYe={arrowParens:{category:Gm,type:"choice",default:"always",description:"Include parentheses around a sole arrow function parameter.",choices:[{value:"always",description:"Always include parens. Example: `(x) => x`"},{value:"avoid",description:"Omit parens when possible. Example: `x => x`"}]},bracketSameLine:dD.bracketSameLine,objectWrap:dD.objectWrap,bracketSpacing:dD.bracketSpacing,jsxBracketSameLine:{category:Gm,type:"boolean",description:"Put > on the last line instead of at a new line.",deprecated:"2.4.0"},semi:{category:Gm,type:"boolean",default:!0,description:"Print semicolons.",oppositeDescription:"Do not print semicolons, except at the beginning of lines which may need them."},experimentalOperatorPosition:{category:Gm,type:"choice",default:"end",description:"Where to print operators when binary expressions wrap lines.",choices:[{value:"start",description:"Print operators at the start of new lines."},{value:"end",description:"Print operators at the end of previous lines."}]},experimentalTernaries:{category:Gm,type:"boolean",default:!1,description:"Use curious ternaries, with the question mark after the condition.",oppositeDescription:"Default behavior of ternaries; keep question marks on the same line as the consequent."},singleQuote:dD.singleQuote,jsxSingleQuote:{category:Gm,type:"boolean",default:!1,description:"Use single quotes in JSX."},quoteProps:{category:Gm,type:"choice",default:"as-needed",description:"Change when properties in objects are quoted.",choices:[{value:"as-needed",description:"Only add quotes around object properties where required."},{value:"consistent",description:"If at least one property in an object requires quotes, quote all properties."},{value:"preserve",description:"Respect the input use of quotes in object properties."}]},trailingComma:{category:Gm,type:"choice",default:"all",description:"Print trailing commas wherever possible when multi-line.",choices:[{value:"all",description:"Trailing commas wherever possible (including function arguments)."},{value:"es5",description:"Trailing commas where valid in ES5 (objects, arrays, etc.)"},{value:"none",description:"No trailing commas."}]},singleAttributePerLine:dD.singleAttributePerLine},gYe=yYe,SYe={estree:xde,"estree-json":wfe},vYe=[...gKe,...pYe];var bYe=Object.defineProperty,Bme=(e,t)=>{for(var r in t)bYe(e,r,{get:t[r],enumerable:!0})},_J={};Bme(_J,{parsers:()=>qme});var qme={};Bme(qme,{typescript:()=>Lst});var xYe=()=>()=>{},fJ=xYe,mJ=(e,t)=>(r,n,...o)=>r|1&&n==null?void 0:(t.call(n)??n[e]).apply(n,o),EYe=String.prototype.replaceAll??function(e,t){return e.global?this.replace(e,t):this.split(e).join(t)},TYe=mJ("replaceAll",function(){if(typeof this=="string")return EYe}),_1=TYe,DYe="5.9",ii=[],AYe=new Map;function RD(e){return e!==void 0?e.length:0}function Vc(e,t){if(e!==void 0)for(let r=0;r0;return!1}function yJ(e,t){return t===void 0||t.length===0?e:e===void 0||e.length===0?t:[...e,...t]}function PYe(e,t,r=SJ){if(e===void 0||t===void 0)return e===t;if(e.length!==t.length)return!1;for(let n=0;ne?.at(t):(e,t)=>{if(e!==void 0&&(t=Gz(e,t),t>1),c=r(e[s],s);switch(n(c,t)){case-1:i=s+1;break;case 0:return s;case 1:a=s-1;break}}return~i}function jYe(e,t,r,n,o){if(e&&e.length>0){let i=e.length;if(i>0){let a=n===void 0||n<0?0:n,s=o===void 0||a+o>i-1?i-1:a+o,c;for(arguments.length<=2?(c=e[a],a++):c=r;a<=s;)c=t(c,e[a],a),a++;return c}}return r}var Vme=Object.prototype.hasOwnProperty;function fd(e,t){return Vme.call(e,t)}function BYe(e){let t=[];for(let r in e)Vme.call(e,r)&&t.push(r);return t}function qYe(){let e=new Map;return e.add=UYe,e.remove=zYe,e}function UYe(e,t){let r=this.get(e);return r!==void 0?r.push(t):this.set(e,r=[t]),r}function zYe(e,t){let r=this.get(e);r!==void 0&&(XYe(r,t),r.length||this.delete(e))}function rf(e){return Array.isArray(e)}function Pz(e){return rf(e)?e:[e]}function JYe(e,t){return e!==void 0&&t(e)?e:void 0}function pd(e,t){return e!==void 0&&t(e)?e:pe.fail(`Invalid cast. The supplied value ${e} did not pass the test '${pe.getFunctionName(t)}'.`)}function x1(e){}function VYe(){return!0}function Bo(e){return e}function Pfe(e){let t;return()=>(e&&(t=e(),e=void 0),t)}function Ml(e){let t=new Map;return r=>{let n=`${typeof r}:${r}`,o=t.get(n);return o===void 0&&!t.has(n)&&(o=e(r),t.set(n,o)),o}}function SJ(e,t){return e===t}function vJ(e,t){return e===t||e!==void 0&&t!==void 0&&e.toUpperCase()===t.toUpperCase()}function KYe(e,t){return SJ(e,t)}function GYe(e,t){return e===t?0:e===void 0?-1:t===void 0?1:er?s-r:1),d=Math.floor(t.length>r+s?r+s:t.length);o[0]=s;let f=s;for(let y=1;yr)return;let m=n;n=o,o=m}let a=n[t.length];return a>r?void 0:a}function WYe(e,t,r){let n=e.length-t.length;return n>=0&&(r?vJ(e.slice(n),t):e.indexOf(t,n)===n)}function QYe(e,t){e[t]=e[e.length-1],e.pop()}function XYe(e,t){return YYe(e,r=>r===t)}function YYe(e,t){for(let r=0;r{let t=0;e.currentLogLevel=2,e.isDebugging=!1;function r(oe){return e.currentLogLevel<=oe}e.shouldLog=r;function n(oe,qe){e.loggingHost&&r(oe)&&e.loggingHost.log(oe,qe)}function o(oe){n(3,oe)}e.log=o,(oe=>{function qe(_n){n(1,_n)}oe.error=qe;function et(_n){n(2,_n)}oe.warn=et;function Et(_n){n(3,_n)}oe.log=Et;function Wr(_n){n(4,_n)}oe.trace=Wr})(o=e.log||(e.log={}));let i={};function a(){return t}e.getAssertionLevel=a;function s(oe){let qe=t;if(t=oe,oe>qe)for(let et of BYe(i)){let Et=i[et];Et!==void 0&&e[et]!==Et.assertion&&oe>=Et.level&&(e[et]=Et,i[et]=void 0)}}e.setAssertionLevel=s;function c(oe){return t>=oe}e.shouldAssert=c;function p(oe,qe){return c(oe)?!0:(i[qe]={level:oe,assertion:e[qe]},e[qe]=x1,!1)}function d(oe,qe){debugger;let et=new Error(oe?`Debug Failure. ${oe}`:"Debug Failure.");throw Error.captureStackTrace&&Error.captureStackTrace(et,qe||d),et}e.fail=d;function f(oe,qe,et){return d(`${qe||"Unexpected node."}\r +Node ${Yt(oe.kind)} was unexpected.`,et||f)}e.failBadSyntaxKind=f;function m(oe,qe,et,Et){oe||(qe=qe?`False expression: ${qe}`:"False expression.",et&&(qe+=`\r +Verbose Debug Information: `+(typeof et=="string"?et:et())),d(qe,Et||m))}e.assert=m;function y(oe,qe,et,Et,Wr){if(oe!==qe){let _n=et?Et?`${et} ${Et}`:et:"";d(`Expected ${oe} === ${qe}. ${_n}`,Wr||y)}}e.assertEqual=y;function g(oe,qe,et,Et){oe>=qe&&d(`Expected ${oe} < ${qe}. ${et||""}`,Et||g)}e.assertLessThan=g;function S(oe,qe,et){oe>qe&&d(`Expected ${oe} <= ${qe}`,et||S)}e.assertLessThanOrEqual=S;function b(oe,qe,et){oe= ${qe}`,et||b)}e.assertGreaterThanOrEqual=b;function E(oe,qe,et){oe==null&&d(qe,et||E)}e.assertIsDefined=E;function I(oe,qe,et){return E(oe,qe,et||I),oe}e.checkDefined=I;function T(oe,qe,et){for(let Et of oe)E(Et,qe,et||T)}e.assertEachIsDefined=T;function k(oe,qe,et){return T(oe,qe,et||k),oe}e.checkEachDefined=k;function F(oe,qe="Illegal value:",et){let Et=typeof oe=="object"&&fd(oe,"kind")&&fd(oe,"pos")?"SyntaxKind: "+Yt(oe.kind):JSON.stringify(oe);return d(`${qe} ${Et}`,et||F)}e.assertNever=F;function O(oe,qe,et,Et){p(1,"assertEachNode")&&m(qe===void 0||hJ(oe,qe),et||"Unexpected node.",()=>`Node array did not pass test '${Je(qe)}'.`,Et||O)}e.assertEachNode=O;function $(oe,qe,et,Et){p(1,"assertNode")&&m(oe!==void 0&&(qe===void 0||qe(oe)),et||"Unexpected node.",()=>`Node ${Yt(oe?.kind)} did not pass test '${Je(qe)}'.`,Et||$)}e.assertNode=$;function N(oe,qe,et,Et){p(1,"assertNotNode")&&m(oe===void 0||qe===void 0||!qe(oe),et||"Unexpected node.",()=>`Node ${Yt(oe.kind)} should not have passed test '${Je(qe)}'.`,Et||N)}e.assertNotNode=N;function U(oe,qe,et,Et){p(1,"assertOptionalNode")&&m(qe===void 0||oe===void 0||qe(oe),et||"Unexpected node.",()=>`Node ${Yt(oe?.kind)} did not pass test '${Je(qe)}'.`,Et||U)}e.assertOptionalNode=U;function ge(oe,qe,et,Et){p(1,"assertOptionalToken")&&m(qe===void 0||oe===void 0||oe.kind===qe,et||"Unexpected node.",()=>`Node ${Yt(oe?.kind)} was not a '${Yt(qe)}' token.`,Et||ge)}e.assertOptionalToken=ge;function Te(oe,qe,et){p(1,"assertMissingNode")&&m(oe===void 0,qe||"Unexpected node.",()=>`Node ${Yt(oe.kind)} was unexpected'.`,et||Te)}e.assertMissingNode=Te;function ke(oe){}e.type=ke;function Je(oe){if(typeof oe!="function")return"";if(fd(oe,"name"))return oe.name;{let qe=Function.prototype.toString.call(oe),et=/^function\s+([\w$]+)\s*\(/.exec(qe);return et?et[1]:""}}e.getFunctionName=Je;function me(oe){return`{ name: ${GD(oe.escapedName)}; flags: ${pt(oe.flags)}; declarations: ${Kz(oe.declarations,qe=>Yt(qe.kind))} }`}e.formatSymbol=me;function xe(oe=0,qe,et){let Et=Jt(qe);if(oe===0)return Et.length>0&&Et[0][0]===0?Et[0][1]:"0";if(et){let Wr=[],_n=oe;for(let[ro,fi]of Et){if(ro>oe)break;ro!==0&&ro&oe&&(Wr.push(fi),_n&=~ro)}if(_n===0)return Wr.join("|")}else for(let[Wr,_n]of Et)if(Wr===oe)return _n;return oe.toString()}e.formatEnum=xe;let Rt=new Map;function Jt(oe){let qe=Rt.get(oe);if(qe)return qe;let et=[];for(let Wr in oe){let _n=oe[Wr];typeof _n=="number"&&et.push([_n,Wr])}let Et=FYe(et,(Wr,_n)=>Kme(Wr[0],_n[0]));return Rt.set(oe,Et),Et}function Yt(oe){return xe(oe,Qt,!1)}e.formatSyntaxKind=Yt;function vt(oe){return xe(oe,the,!1)}e.formatSnippetKind=vt;function Fr(oe){return xe(oe,X_,!1)}e.formatScriptKind=Fr;function le(oe){return xe(oe,Jc,!0)}e.formatNodeFlags=le;function K(oe){return xe(oe,Wme,!0)}e.formatNodeCheckFlags=K;function ae(oe){return xe(oe,Gme,!0)}e.formatModifierFlags=ae;function he(oe){return xe(oe,ehe,!0)}e.formatTransformFlags=he;function Oe(oe){return xe(oe,rhe,!0)}e.formatEmitFlags=Oe;function pt(oe){return xe(oe,Zme,!0)}e.formatSymbolFlags=pt;function Ye(oe){return xe(oe,cs,!0)}e.formatTypeFlags=Ye;function lt(oe){return xe(oe,Xme,!0)}e.formatSignatureFlags=lt;function Nt(oe){return xe(oe,Qme,!0)}e.formatObjectFlags=Nt;function Ct(oe){return xe(oe,Zz,!0)}e.formatFlowFlags=Ct;function Zr(oe){return xe(oe,Hme,!0)}e.formatRelationComparisonResult=Zr;function wt(oe){return xe(oe,CheckMode,!0)}e.formatCheckMode=wt;function fo(oe){return xe(oe,SignatureCheckMode,!0)}e.formatSignatureCheckMode=fo;function nn(oe){return xe(oe,TypeFacts,!0)}e.formatTypeFacts=nn;let Gn=!1,bt;function Hn(oe){"__debugFlowFlags"in oe||Object.defineProperties(oe,{__tsDebuggerDisplay:{value(){let qe=this.flags&2?"FlowStart":this.flags&4?"FlowBranchLabel":this.flags&8?"FlowLoopLabel":this.flags&16?"FlowAssignment":this.flags&32?"FlowTrueCondition":this.flags&64?"FlowFalseCondition":this.flags&128?"FlowSwitchClause":this.flags&256?"FlowArrayMutation":this.flags&512?"FlowCall":this.flags&1024?"FlowReduceLabel":this.flags&1?"FlowUnreachable":"UnknownFlow",et=this.flags&-2048;return`${qe}${et?` (${Ct(et)})`:""}`}},__debugFlowFlags:{get(){return xe(this.flags,Zz,!0)}},__debugToString:{value(){return lp(this)}}})}function Di(oe){return Gn&&(typeof Object.setPrototypeOf=="function"?(bt||(bt=Object.create(Object.prototype),Hn(bt)),Object.setPrototypeOf(oe,bt)):Hn(oe)),oe}e.attachFlowNodeDebugInfo=Di;let Ga;function ji(oe){"__tsDebuggerDisplay"in oe||Object.defineProperties(oe,{__tsDebuggerDisplay:{value(qe){return qe=String(qe).replace(/(?:,[\s\w]+:[^,]+)+\]$/,"]"),`NodeArray ${qe}`}}})}function iu(oe){Gn&&(typeof Object.setPrototypeOf=="function"?(Ga||(Ga=Object.create(Array.prototype),ji(Ga)),Object.setPrototypeOf(oe,Ga)):ji(oe))}e.attachNodeArrayDebugInfo=iu;function ol(){if(Gn)return;let oe=new WeakMap,qe=new WeakMap;Object.defineProperties(oi.getSymbolConstructor().prototype,{__tsDebuggerDisplay:{value(){let Et=this.flags&33554432?"TransientSymbol":"Symbol",Wr=this.flags&-33554433;return`${Et} '${Xz(this)}'${Wr?` (${pt(Wr)})`:""}`}},__debugFlags:{get(){return pt(this.flags)}}}),Object.defineProperties(oi.getTypeConstructor().prototype,{__tsDebuggerDisplay:{value(){let Et=this.flags&67359327?`IntrinsicType ${this.intrinsicName}${this.debugIntrinsicName?` (${this.debugIntrinsicName})`:""}`:this.flags&98304?"NullableType":this.flags&384?`LiteralType ${JSON.stringify(this.value)}`:this.flags&2048?`LiteralType ${this.value.negative?"-":""}${this.value.base10Value}n`:this.flags&8192?"UniqueESSymbolType":this.flags&32?"EnumType":this.flags&1048576?"UnionType":this.flags&2097152?"IntersectionType":this.flags&4194304?"IndexType":this.flags&8388608?"IndexedAccessType":this.flags&16777216?"ConditionalType":this.flags&33554432?"SubstitutionType":this.flags&262144?"TypeParameter":this.flags&524288?this.objectFlags&3?"InterfaceType":this.objectFlags&4?"TypeReference":this.objectFlags&8?"TupleType":this.objectFlags&16?"AnonymousType":this.objectFlags&32?"MappedType":this.objectFlags&1024?"ReverseMappedType":this.objectFlags&256?"EvolvingArrayType":"ObjectType":"Type",Wr=this.flags&524288?this.objectFlags&-1344:0;return`${Et}${this.symbol?` '${Xz(this.symbol)}'`:""}${Wr?` (${Nt(Wr)})`:""}`}},__debugFlags:{get(){return Ye(this.flags)}},__debugObjectFlags:{get(){return this.flags&524288?Nt(this.objectFlags):""}},__debugTypeToString:{value(){let Et=oe.get(this);return Et===void 0&&(Et=this.checker.typeToString(this),oe.set(this,Et)),Et}}}),Object.defineProperties(oi.getSignatureConstructor().prototype,{__debugFlags:{get(){return lt(this.flags)}},__debugSignatureToString:{value(){var Et;return(Et=this.checker)==null?void 0:Et.signatureToString(this)}}});let et=[oi.getNodeConstructor(),oi.getIdentifierConstructor(),oi.getTokenConstructor(),oi.getSourceFileConstructor()];for(let Et of et)fd(Et.prototype,"__debugKind")||Object.defineProperties(Et.prototype,{__tsDebuggerDisplay:{value(){return`${m1(this)?"GeneratedIdentifier":kn(this)?`Identifier '${uc(this)}'`:zg(this)?`PrivateIdentifier '${uc(this)}'`:b1(this)?`StringLiteral ${JSON.stringify(this.text.length<10?this.text:this.text.slice(10)+"...")}`:T1(this)?`NumericLiteral ${this.text}`:hnt(this)?`BigIntLiteral ${this.text}n`:Whe(this)?"TypeParameterDeclaration":vO(this)?"ParameterDeclaration":Qhe(this)?"ConstructorDeclaration":iJ(this)?"GetAccessorDeclaration":xO(this)?"SetAccessorDeclaration":Tnt(this)?"CallSignatureDeclaration":Dnt(this)?"ConstructSignatureDeclaration":Xhe(this)?"IndexSignatureDeclaration":Ant(this)?"TypePredicateNode":Yhe(this)?"TypeReferenceNode":eye(this)?"FunctionTypeNode":tye(this)?"ConstructorTypeNode":Int(this)?"TypeQueryNode":wnt(this)?"TypeLiteralNode":knt(this)?"ArrayTypeNode":Cnt(this)?"TupleTypeNode":Ont(this)?"OptionalTypeNode":Nnt(this)?"RestTypeNode":Fnt(this)?"UnionTypeNode":Rnt(this)?"IntersectionTypeNode":Lnt(this)?"ConditionalTypeNode":$nt(this)?"InferTypeNode":Mnt(this)?"ParenthesizedTypeNode":jnt(this)?"ThisTypeNode":Bnt(this)?"TypeOperatorNode":qnt(this)?"IndexedAccessTypeNode":Unt(this)?"MappedTypeNode":znt(this)?"LiteralTypeNode":Pnt(this)?"NamedTupleMember":Jnt(this)?"ImportTypeNode":Yt(this.kind)}${this.flags?` (${le(this.flags)})`:""}`}},__debugKind:{get(){return Yt(this.kind)}},__debugNodeFlags:{get(){return le(this.flags)}},__debugModifierFlags:{get(){return ae(Art(this))}},__debugTransformFlags:{get(){return he(this.transformFlags)}},__debugIsParseTreeNode:{get(){return yO(this)}},__debugEmitFlags:{get(){return Oe(v1(this))}},__debugGetText:{value(Wr){if(u1(this))return"";let _n=qe.get(this);if(_n===void 0){let ro=Bet(this),fi=ro&&sh(ro);_n=fi?Kfe(fi,ro,Wr):"",qe.set(this,_n)}return _n}}});Gn=!0}e.enableDebugInfo=ol;function il(oe){let qe=oe&7,et=qe===0?"in out":qe===3?"[bivariant]":qe===2?"in":qe===1?"out":qe===4?"[independent]":"";return oe&8?et+=" (unmeasurable)":oe&16&&(et+=" (unreliable)"),et}e.formatVariance=il;class Md{__debugToString(){var qe;switch(this.kind){case 3:return((qe=this.debugInfo)==null?void 0:qe.call(this))||"(function mapper)";case 0:return`${this.source.__debugTypeToString()} -> ${this.target.__debugTypeToString()}`;case 1:return Cfe(this.sources,this.targets||Kz(this.sources,()=>"any"),(et,Et)=>`${et.__debugTypeToString()} -> ${typeof Et=="string"?Et:Et.__debugTypeToString()}`).join(", ");case 2:return Cfe(this.sources,this.targets,(et,Et)=>`${et.__debugTypeToString()} -> ${Et().__debugTypeToString()}`).join(", ");case 5:case 4:return`m1: ${this.mapper1.__debugToString().split(` +`).join(` + `)} +m2: ${this.mapper2.__debugToString().split(` +`).join(` + `)}`;default:return F(this)}}}e.DebugTypeMapper=Md;function al(oe){return e.isDebugging?Object.setPrototypeOf(oe,Md.prototype):oe}e.attachDebugPrototypeIfDebug=al;function Vt(oe){return console.log(lp(oe))}e.printControlFlowGraph=Vt;function lp(oe){let qe=-1;function et(D){return D.id||(D.id=qe,qe--),D.id}let Et;(D=>{D.lr="\u2500",D.ud="\u2502",D.dr="\u256D",D.dl="\u256E",D.ul="\u256F",D.ur="\u2570",D.udr="\u251C",D.udl="\u2524",D.dlr="\u252C",D.ulr="\u2534",D.udlr="\u256B"})(Et||(Et={}));let Wr;(D=>{D[D.None=0]="None",D[D.Up=1]="Up",D[D.Down=2]="Down",D[D.Left=4]="Left",D[D.Right=8]="Right",D[D.UpDown=3]="UpDown",D[D.LeftRight=12]="LeftRight",D[D.UpLeft=5]="UpLeft",D[D.UpRight=9]="UpRight",D[D.DownLeft=6]="DownLeft",D[D.DownRight=10]="DownRight",D[D.UpDownLeft=7]="UpDownLeft",D[D.UpDownRight=11]="UpDownRight",D[D.UpLeftRight=13]="UpLeftRight",D[D.DownLeftRight=14]="DownLeftRight",D[D.UpDownLeftRight=15]="UpDownLeftRight",D[D.NoChildren=16]="NoChildren"})(Wr||(Wr={}));let _n=2032,ro=882,fi=Object.create(null),Uo=[],co=[],jd=At(oe,new Set);for(let D of Uo)D.text=Zn(D.flowNode,D.circular),ut(D);let up=wr(jd),vc=Tn(up);return $r(jd,0),_s();function sl(D){return!!(D.flags&128)}function ny(D){return!!(D.flags&12)&&!!D.antecedent}function ue(D){return!!(D.flags&_n)}function Ee(D){return!!(D.flags&ro)}function Ie(D){let Ht=[];for(let er of D.edges)er.source===D&&Ht.push(er.target);return Ht}function Tt(D){let Ht=[];for(let er of D.edges)er.target===D&&Ht.push(er.source);return Ht}function At(D,Ht){let er=et(D),ce=fi[er];if(ce&&Ht.has(D))return ce.circular=!0,ce={id:-1,flowNode:D,edges:[],text:"",lane:-1,endLane:-1,level:-1,circular:"circularity"},Uo.push(ce),ce;if(Ht.add(D),!ce)if(fi[er]=ce={id:er,flowNode:D,edges:[],text:"",lane:-1,endLane:-1,level:-1,circular:!1},Uo.push(ce),ny(D))for(let vr of D.antecedent)kt(ce,vr,Ht);else ue(D)&&kt(ce,D.antecedent,Ht);return Ht.delete(D),ce}function kt(D,Ht,er){let ce=At(Ht,er),vr={source:D,target:ce};co.push(vr),D.edges.push(vr),ce.edges.push(vr)}function ut(D){if(D.level!==-1)return D.level;let Ht=0;for(let er of Tt(D))Ht=Math.max(Ht,ut(er)+1);return D.level=Ht}function wr(D){let Ht=0;for(let er of Ie(D))Ht=Math.max(Ht,wr(er));return Ht+1}function Tn(D){let Ht=re(Array(D),0);for(let er of Uo)Ht[er.level]=Math.max(Ht[er.level],er.text.length);return Ht}function $r(D,Ht){if(D.lane===-1){D.lane=Ht,D.endLane=Ht;let er=Ie(D);for(let ce=0;ce0&&Ht++;let vr=er[ce];$r(vr,Ht),vr.endLane>D.endLane&&(Ht=vr.endLane)}D.endLane=Ht}}function Ft(D){if(D&2)return"Start";if(D&4)return"Branch";if(D&8)return"Loop";if(D&16)return"Assignment";if(D&32)return"True";if(D&64)return"False";if(D&128)return"SwitchClause";if(D&256)return"ArrayMutation";if(D&512)return"Call";if(D&1024)return"ReduceLabel";if(D&1)return"Unreachable";throw new Error}function Bs(D){let Ht=sh(D);return Kfe(Ht,D,!1)}function Zn(D,Ht){let er=Ft(D.flags);if(Ht&&(er=`${er}#${et(D)}`),sl(D)){let ce=[],{switchStatement:vr,clauseStart:Ha,clauseEnd:Dr}=D.node;for(let on=Ha;onDr.lane)+1,er=re(Array(Ht),""),ce=vc.map(()=>Array(Ht)),vr=vc.map(()=>re(Array(Ht),0));for(let Dr of Uo){ce[Dr.level][Dr.lane]=Dr;let on=Ie(Dr);for(let ei=0;ei0&&(Gi|=1),ei0&&(Gi|=1),ei0?vr[Dr-1][on]:0,ei=on>0?vr[Dr][on-1]:0,hi=vr[Dr][on];hi||(mi&8&&(hi|=12),ei&2&&(hi|=3),vr[Dr][on]=hi)}for(let Dr=0;Dr0?D.repeat(Ht):"";let er="";for(;er.length{},eet=()=>{},sO,Qt=(e=>(e[e.Unknown=0]="Unknown",e[e.EndOfFileToken=1]="EndOfFileToken",e[e.SingleLineCommentTrivia=2]="SingleLineCommentTrivia",e[e.MultiLineCommentTrivia=3]="MultiLineCommentTrivia",e[e.NewLineTrivia=4]="NewLineTrivia",e[e.WhitespaceTrivia=5]="WhitespaceTrivia",e[e.ShebangTrivia=6]="ShebangTrivia",e[e.ConflictMarkerTrivia=7]="ConflictMarkerTrivia",e[e.NonTextFileMarkerTrivia=8]="NonTextFileMarkerTrivia",e[e.NumericLiteral=9]="NumericLiteral",e[e.BigIntLiteral=10]="BigIntLiteral",e[e.StringLiteral=11]="StringLiteral",e[e.JsxText=12]="JsxText",e[e.JsxTextAllWhiteSpaces=13]="JsxTextAllWhiteSpaces",e[e.RegularExpressionLiteral=14]="RegularExpressionLiteral",e[e.NoSubstitutionTemplateLiteral=15]="NoSubstitutionTemplateLiteral",e[e.TemplateHead=16]="TemplateHead",e[e.TemplateMiddle=17]="TemplateMiddle",e[e.TemplateTail=18]="TemplateTail",e[e.OpenBraceToken=19]="OpenBraceToken",e[e.CloseBraceToken=20]="CloseBraceToken",e[e.OpenParenToken=21]="OpenParenToken",e[e.CloseParenToken=22]="CloseParenToken",e[e.OpenBracketToken=23]="OpenBracketToken",e[e.CloseBracketToken=24]="CloseBracketToken",e[e.DotToken=25]="DotToken",e[e.DotDotDotToken=26]="DotDotDotToken",e[e.SemicolonToken=27]="SemicolonToken",e[e.CommaToken=28]="CommaToken",e[e.QuestionDotToken=29]="QuestionDotToken",e[e.LessThanToken=30]="LessThanToken",e[e.LessThanSlashToken=31]="LessThanSlashToken",e[e.GreaterThanToken=32]="GreaterThanToken",e[e.LessThanEqualsToken=33]="LessThanEqualsToken",e[e.GreaterThanEqualsToken=34]="GreaterThanEqualsToken",e[e.EqualsEqualsToken=35]="EqualsEqualsToken",e[e.ExclamationEqualsToken=36]="ExclamationEqualsToken",e[e.EqualsEqualsEqualsToken=37]="EqualsEqualsEqualsToken",e[e.ExclamationEqualsEqualsToken=38]="ExclamationEqualsEqualsToken",e[e.EqualsGreaterThanToken=39]="EqualsGreaterThanToken",e[e.PlusToken=40]="PlusToken",e[e.MinusToken=41]="MinusToken",e[e.AsteriskToken=42]="AsteriskToken",e[e.AsteriskAsteriskToken=43]="AsteriskAsteriskToken",e[e.SlashToken=44]="SlashToken",e[e.PercentToken=45]="PercentToken",e[e.PlusPlusToken=46]="PlusPlusToken",e[e.MinusMinusToken=47]="MinusMinusToken",e[e.LessThanLessThanToken=48]="LessThanLessThanToken",e[e.GreaterThanGreaterThanToken=49]="GreaterThanGreaterThanToken",e[e.GreaterThanGreaterThanGreaterThanToken=50]="GreaterThanGreaterThanGreaterThanToken",e[e.AmpersandToken=51]="AmpersandToken",e[e.BarToken=52]="BarToken",e[e.CaretToken=53]="CaretToken",e[e.ExclamationToken=54]="ExclamationToken",e[e.TildeToken=55]="TildeToken",e[e.AmpersandAmpersandToken=56]="AmpersandAmpersandToken",e[e.BarBarToken=57]="BarBarToken",e[e.QuestionToken=58]="QuestionToken",e[e.ColonToken=59]="ColonToken",e[e.AtToken=60]="AtToken",e[e.QuestionQuestionToken=61]="QuestionQuestionToken",e[e.BacktickToken=62]="BacktickToken",e[e.HashToken=63]="HashToken",e[e.EqualsToken=64]="EqualsToken",e[e.PlusEqualsToken=65]="PlusEqualsToken",e[e.MinusEqualsToken=66]="MinusEqualsToken",e[e.AsteriskEqualsToken=67]="AsteriskEqualsToken",e[e.AsteriskAsteriskEqualsToken=68]="AsteriskAsteriskEqualsToken",e[e.SlashEqualsToken=69]="SlashEqualsToken",e[e.PercentEqualsToken=70]="PercentEqualsToken",e[e.LessThanLessThanEqualsToken=71]="LessThanLessThanEqualsToken",e[e.GreaterThanGreaterThanEqualsToken=72]="GreaterThanGreaterThanEqualsToken",e[e.GreaterThanGreaterThanGreaterThanEqualsToken=73]="GreaterThanGreaterThanGreaterThanEqualsToken",e[e.AmpersandEqualsToken=74]="AmpersandEqualsToken",e[e.BarEqualsToken=75]="BarEqualsToken",e[e.BarBarEqualsToken=76]="BarBarEqualsToken",e[e.AmpersandAmpersandEqualsToken=77]="AmpersandAmpersandEqualsToken",e[e.QuestionQuestionEqualsToken=78]="QuestionQuestionEqualsToken",e[e.CaretEqualsToken=79]="CaretEqualsToken",e[e.Identifier=80]="Identifier",e[e.PrivateIdentifier=81]="PrivateIdentifier",e[e.JSDocCommentTextToken=82]="JSDocCommentTextToken",e[e.BreakKeyword=83]="BreakKeyword",e[e.CaseKeyword=84]="CaseKeyword",e[e.CatchKeyword=85]="CatchKeyword",e[e.ClassKeyword=86]="ClassKeyword",e[e.ConstKeyword=87]="ConstKeyword",e[e.ContinueKeyword=88]="ContinueKeyword",e[e.DebuggerKeyword=89]="DebuggerKeyword",e[e.DefaultKeyword=90]="DefaultKeyword",e[e.DeleteKeyword=91]="DeleteKeyword",e[e.DoKeyword=92]="DoKeyword",e[e.ElseKeyword=93]="ElseKeyword",e[e.EnumKeyword=94]="EnumKeyword",e[e.ExportKeyword=95]="ExportKeyword",e[e.ExtendsKeyword=96]="ExtendsKeyword",e[e.FalseKeyword=97]="FalseKeyword",e[e.FinallyKeyword=98]="FinallyKeyword",e[e.ForKeyword=99]="ForKeyword",e[e.FunctionKeyword=100]="FunctionKeyword",e[e.IfKeyword=101]="IfKeyword",e[e.ImportKeyword=102]="ImportKeyword",e[e.InKeyword=103]="InKeyword",e[e.InstanceOfKeyword=104]="InstanceOfKeyword",e[e.NewKeyword=105]="NewKeyword",e[e.NullKeyword=106]="NullKeyword",e[e.ReturnKeyword=107]="ReturnKeyword",e[e.SuperKeyword=108]="SuperKeyword",e[e.SwitchKeyword=109]="SwitchKeyword",e[e.ThisKeyword=110]="ThisKeyword",e[e.ThrowKeyword=111]="ThrowKeyword",e[e.TrueKeyword=112]="TrueKeyword",e[e.TryKeyword=113]="TryKeyword",e[e.TypeOfKeyword=114]="TypeOfKeyword",e[e.VarKeyword=115]="VarKeyword",e[e.VoidKeyword=116]="VoidKeyword",e[e.WhileKeyword=117]="WhileKeyword",e[e.WithKeyword=118]="WithKeyword",e[e.ImplementsKeyword=119]="ImplementsKeyword",e[e.InterfaceKeyword=120]="InterfaceKeyword",e[e.LetKeyword=121]="LetKeyword",e[e.PackageKeyword=122]="PackageKeyword",e[e.PrivateKeyword=123]="PrivateKeyword",e[e.ProtectedKeyword=124]="ProtectedKeyword",e[e.PublicKeyword=125]="PublicKeyword",e[e.StaticKeyword=126]="StaticKeyword",e[e.YieldKeyword=127]="YieldKeyword",e[e.AbstractKeyword=128]="AbstractKeyword",e[e.AccessorKeyword=129]="AccessorKeyword",e[e.AsKeyword=130]="AsKeyword",e[e.AssertsKeyword=131]="AssertsKeyword",e[e.AssertKeyword=132]="AssertKeyword",e[e.AnyKeyword=133]="AnyKeyword",e[e.AsyncKeyword=134]="AsyncKeyword",e[e.AwaitKeyword=135]="AwaitKeyword",e[e.BooleanKeyword=136]="BooleanKeyword",e[e.ConstructorKeyword=137]="ConstructorKeyword",e[e.DeclareKeyword=138]="DeclareKeyword",e[e.GetKeyword=139]="GetKeyword",e[e.InferKeyword=140]="InferKeyword",e[e.IntrinsicKeyword=141]="IntrinsicKeyword",e[e.IsKeyword=142]="IsKeyword",e[e.KeyOfKeyword=143]="KeyOfKeyword",e[e.ModuleKeyword=144]="ModuleKeyword",e[e.NamespaceKeyword=145]="NamespaceKeyword",e[e.NeverKeyword=146]="NeverKeyword",e[e.OutKeyword=147]="OutKeyword",e[e.ReadonlyKeyword=148]="ReadonlyKeyword",e[e.RequireKeyword=149]="RequireKeyword",e[e.NumberKeyword=150]="NumberKeyword",e[e.ObjectKeyword=151]="ObjectKeyword",e[e.SatisfiesKeyword=152]="SatisfiesKeyword",e[e.SetKeyword=153]="SetKeyword",e[e.StringKeyword=154]="StringKeyword",e[e.SymbolKeyword=155]="SymbolKeyword",e[e.TypeKeyword=156]="TypeKeyword",e[e.UndefinedKeyword=157]="UndefinedKeyword",e[e.UniqueKeyword=158]="UniqueKeyword",e[e.UnknownKeyword=159]="UnknownKeyword",e[e.UsingKeyword=160]="UsingKeyword",e[e.FromKeyword=161]="FromKeyword",e[e.GlobalKeyword=162]="GlobalKeyword",e[e.BigIntKeyword=163]="BigIntKeyword",e[e.OverrideKeyword=164]="OverrideKeyword",e[e.OfKeyword=165]="OfKeyword",e[e.DeferKeyword=166]="DeferKeyword",e[e.QualifiedName=167]="QualifiedName",e[e.ComputedPropertyName=168]="ComputedPropertyName",e[e.TypeParameter=169]="TypeParameter",e[e.Parameter=170]="Parameter",e[e.Decorator=171]="Decorator",e[e.PropertySignature=172]="PropertySignature",e[e.PropertyDeclaration=173]="PropertyDeclaration",e[e.MethodSignature=174]="MethodSignature",e[e.MethodDeclaration=175]="MethodDeclaration",e[e.ClassStaticBlockDeclaration=176]="ClassStaticBlockDeclaration",e[e.Constructor=177]="Constructor",e[e.GetAccessor=178]="GetAccessor",e[e.SetAccessor=179]="SetAccessor",e[e.CallSignature=180]="CallSignature",e[e.ConstructSignature=181]="ConstructSignature",e[e.IndexSignature=182]="IndexSignature",e[e.TypePredicate=183]="TypePredicate",e[e.TypeReference=184]="TypeReference",e[e.FunctionType=185]="FunctionType",e[e.ConstructorType=186]="ConstructorType",e[e.TypeQuery=187]="TypeQuery",e[e.TypeLiteral=188]="TypeLiteral",e[e.ArrayType=189]="ArrayType",e[e.TupleType=190]="TupleType",e[e.OptionalType=191]="OptionalType",e[e.RestType=192]="RestType",e[e.UnionType=193]="UnionType",e[e.IntersectionType=194]="IntersectionType",e[e.ConditionalType=195]="ConditionalType",e[e.InferType=196]="InferType",e[e.ParenthesizedType=197]="ParenthesizedType",e[e.ThisType=198]="ThisType",e[e.TypeOperator=199]="TypeOperator",e[e.IndexedAccessType=200]="IndexedAccessType",e[e.MappedType=201]="MappedType",e[e.LiteralType=202]="LiteralType",e[e.NamedTupleMember=203]="NamedTupleMember",e[e.TemplateLiteralType=204]="TemplateLiteralType",e[e.TemplateLiteralTypeSpan=205]="TemplateLiteralTypeSpan",e[e.ImportType=206]="ImportType",e[e.ObjectBindingPattern=207]="ObjectBindingPattern",e[e.ArrayBindingPattern=208]="ArrayBindingPattern",e[e.BindingElement=209]="BindingElement",e[e.ArrayLiteralExpression=210]="ArrayLiteralExpression",e[e.ObjectLiteralExpression=211]="ObjectLiteralExpression",e[e.PropertyAccessExpression=212]="PropertyAccessExpression",e[e.ElementAccessExpression=213]="ElementAccessExpression",e[e.CallExpression=214]="CallExpression",e[e.NewExpression=215]="NewExpression",e[e.TaggedTemplateExpression=216]="TaggedTemplateExpression",e[e.TypeAssertionExpression=217]="TypeAssertionExpression",e[e.ParenthesizedExpression=218]="ParenthesizedExpression",e[e.FunctionExpression=219]="FunctionExpression",e[e.ArrowFunction=220]="ArrowFunction",e[e.DeleteExpression=221]="DeleteExpression",e[e.TypeOfExpression=222]="TypeOfExpression",e[e.VoidExpression=223]="VoidExpression",e[e.AwaitExpression=224]="AwaitExpression",e[e.PrefixUnaryExpression=225]="PrefixUnaryExpression",e[e.PostfixUnaryExpression=226]="PostfixUnaryExpression",e[e.BinaryExpression=227]="BinaryExpression",e[e.ConditionalExpression=228]="ConditionalExpression",e[e.TemplateExpression=229]="TemplateExpression",e[e.YieldExpression=230]="YieldExpression",e[e.SpreadElement=231]="SpreadElement",e[e.ClassExpression=232]="ClassExpression",e[e.OmittedExpression=233]="OmittedExpression",e[e.ExpressionWithTypeArguments=234]="ExpressionWithTypeArguments",e[e.AsExpression=235]="AsExpression",e[e.NonNullExpression=236]="NonNullExpression",e[e.MetaProperty=237]="MetaProperty",e[e.SyntheticExpression=238]="SyntheticExpression",e[e.SatisfiesExpression=239]="SatisfiesExpression",e[e.TemplateSpan=240]="TemplateSpan",e[e.SemicolonClassElement=241]="SemicolonClassElement",e[e.Block=242]="Block",e[e.EmptyStatement=243]="EmptyStatement",e[e.VariableStatement=244]="VariableStatement",e[e.ExpressionStatement=245]="ExpressionStatement",e[e.IfStatement=246]="IfStatement",e[e.DoStatement=247]="DoStatement",e[e.WhileStatement=248]="WhileStatement",e[e.ForStatement=249]="ForStatement",e[e.ForInStatement=250]="ForInStatement",e[e.ForOfStatement=251]="ForOfStatement",e[e.ContinueStatement=252]="ContinueStatement",e[e.BreakStatement=253]="BreakStatement",e[e.ReturnStatement=254]="ReturnStatement",e[e.WithStatement=255]="WithStatement",e[e.SwitchStatement=256]="SwitchStatement",e[e.LabeledStatement=257]="LabeledStatement",e[e.ThrowStatement=258]="ThrowStatement",e[e.TryStatement=259]="TryStatement",e[e.DebuggerStatement=260]="DebuggerStatement",e[e.VariableDeclaration=261]="VariableDeclaration",e[e.VariableDeclarationList=262]="VariableDeclarationList",e[e.FunctionDeclaration=263]="FunctionDeclaration",e[e.ClassDeclaration=264]="ClassDeclaration",e[e.InterfaceDeclaration=265]="InterfaceDeclaration",e[e.TypeAliasDeclaration=266]="TypeAliasDeclaration",e[e.EnumDeclaration=267]="EnumDeclaration",e[e.ModuleDeclaration=268]="ModuleDeclaration",e[e.ModuleBlock=269]="ModuleBlock",e[e.CaseBlock=270]="CaseBlock",e[e.NamespaceExportDeclaration=271]="NamespaceExportDeclaration",e[e.ImportEqualsDeclaration=272]="ImportEqualsDeclaration",e[e.ImportDeclaration=273]="ImportDeclaration",e[e.ImportClause=274]="ImportClause",e[e.NamespaceImport=275]="NamespaceImport",e[e.NamedImports=276]="NamedImports",e[e.ImportSpecifier=277]="ImportSpecifier",e[e.ExportAssignment=278]="ExportAssignment",e[e.ExportDeclaration=279]="ExportDeclaration",e[e.NamedExports=280]="NamedExports",e[e.NamespaceExport=281]="NamespaceExport",e[e.ExportSpecifier=282]="ExportSpecifier",e[e.MissingDeclaration=283]="MissingDeclaration",e[e.ExternalModuleReference=284]="ExternalModuleReference",e[e.JsxElement=285]="JsxElement",e[e.JsxSelfClosingElement=286]="JsxSelfClosingElement",e[e.JsxOpeningElement=287]="JsxOpeningElement",e[e.JsxClosingElement=288]="JsxClosingElement",e[e.JsxFragment=289]="JsxFragment",e[e.JsxOpeningFragment=290]="JsxOpeningFragment",e[e.JsxClosingFragment=291]="JsxClosingFragment",e[e.JsxAttribute=292]="JsxAttribute",e[e.JsxAttributes=293]="JsxAttributes",e[e.JsxSpreadAttribute=294]="JsxSpreadAttribute",e[e.JsxExpression=295]="JsxExpression",e[e.JsxNamespacedName=296]="JsxNamespacedName",e[e.CaseClause=297]="CaseClause",e[e.DefaultClause=298]="DefaultClause",e[e.HeritageClause=299]="HeritageClause",e[e.CatchClause=300]="CatchClause",e[e.ImportAttributes=301]="ImportAttributes",e[e.ImportAttribute=302]="ImportAttribute",e[e.AssertClause=301]="AssertClause",e[e.AssertEntry=302]="AssertEntry",e[e.ImportTypeAssertionContainer=303]="ImportTypeAssertionContainer",e[e.PropertyAssignment=304]="PropertyAssignment",e[e.ShorthandPropertyAssignment=305]="ShorthandPropertyAssignment",e[e.SpreadAssignment=306]="SpreadAssignment",e[e.EnumMember=307]="EnumMember",e[e.SourceFile=308]="SourceFile",e[e.Bundle=309]="Bundle",e[e.JSDocTypeExpression=310]="JSDocTypeExpression",e[e.JSDocNameReference=311]="JSDocNameReference",e[e.JSDocMemberName=312]="JSDocMemberName",e[e.JSDocAllType=313]="JSDocAllType",e[e.JSDocUnknownType=314]="JSDocUnknownType",e[e.JSDocNullableType=315]="JSDocNullableType",e[e.JSDocNonNullableType=316]="JSDocNonNullableType",e[e.JSDocOptionalType=317]="JSDocOptionalType",e[e.JSDocFunctionType=318]="JSDocFunctionType",e[e.JSDocVariadicType=319]="JSDocVariadicType",e[e.JSDocNamepathType=320]="JSDocNamepathType",e[e.JSDoc=321]="JSDoc",e[e.JSDocComment=321]="JSDocComment",e[e.JSDocText=322]="JSDocText",e[e.JSDocTypeLiteral=323]="JSDocTypeLiteral",e[e.JSDocSignature=324]="JSDocSignature",e[e.JSDocLink=325]="JSDocLink",e[e.JSDocLinkCode=326]="JSDocLinkCode",e[e.JSDocLinkPlain=327]="JSDocLinkPlain",e[e.JSDocTag=328]="JSDocTag",e[e.JSDocAugmentsTag=329]="JSDocAugmentsTag",e[e.JSDocImplementsTag=330]="JSDocImplementsTag",e[e.JSDocAuthorTag=331]="JSDocAuthorTag",e[e.JSDocDeprecatedTag=332]="JSDocDeprecatedTag",e[e.JSDocClassTag=333]="JSDocClassTag",e[e.JSDocPublicTag=334]="JSDocPublicTag",e[e.JSDocPrivateTag=335]="JSDocPrivateTag",e[e.JSDocProtectedTag=336]="JSDocProtectedTag",e[e.JSDocReadonlyTag=337]="JSDocReadonlyTag",e[e.JSDocOverrideTag=338]="JSDocOverrideTag",e[e.JSDocCallbackTag=339]="JSDocCallbackTag",e[e.JSDocOverloadTag=340]="JSDocOverloadTag",e[e.JSDocEnumTag=341]="JSDocEnumTag",e[e.JSDocParameterTag=342]="JSDocParameterTag",e[e.JSDocReturnTag=343]="JSDocReturnTag",e[e.JSDocThisTag=344]="JSDocThisTag",e[e.JSDocTypeTag=345]="JSDocTypeTag",e[e.JSDocTemplateTag=346]="JSDocTemplateTag",e[e.JSDocTypedefTag=347]="JSDocTypedefTag",e[e.JSDocSeeTag=348]="JSDocSeeTag",e[e.JSDocPropertyTag=349]="JSDocPropertyTag",e[e.JSDocThrowsTag=350]="JSDocThrowsTag",e[e.JSDocSatisfiesTag=351]="JSDocSatisfiesTag",e[e.JSDocImportTag=352]="JSDocImportTag",e[e.SyntaxList=353]="SyntaxList",e[e.NotEmittedStatement=354]="NotEmittedStatement",e[e.NotEmittedTypeElement=355]="NotEmittedTypeElement",e[e.PartiallyEmittedExpression=356]="PartiallyEmittedExpression",e[e.CommaListExpression=357]="CommaListExpression",e[e.SyntheticReferenceExpression=358]="SyntheticReferenceExpression",e[e.Count=359]="Count",e[e.FirstAssignment=64]="FirstAssignment",e[e.LastAssignment=79]="LastAssignment",e[e.FirstCompoundAssignment=65]="FirstCompoundAssignment",e[e.LastCompoundAssignment=79]="LastCompoundAssignment",e[e.FirstReservedWord=83]="FirstReservedWord",e[e.LastReservedWord=118]="LastReservedWord",e[e.FirstKeyword=83]="FirstKeyword",e[e.LastKeyword=166]="LastKeyword",e[e.FirstFutureReservedWord=119]="FirstFutureReservedWord",e[e.LastFutureReservedWord=127]="LastFutureReservedWord",e[e.FirstTypeNode=183]="FirstTypeNode",e[e.LastTypeNode=206]="LastTypeNode",e[e.FirstPunctuation=19]="FirstPunctuation",e[e.LastPunctuation=79]="LastPunctuation",e[e.FirstToken=0]="FirstToken",e[e.LastToken=166]="LastToken",e[e.FirstTriviaToken=2]="FirstTriviaToken",e[e.LastTriviaToken=7]="LastTriviaToken",e[e.FirstLiteralToken=9]="FirstLiteralToken",e[e.LastLiteralToken=15]="LastLiteralToken",e[e.FirstTemplateToken=15]="FirstTemplateToken",e[e.LastTemplateToken=18]="LastTemplateToken",e[e.FirstBinaryOperator=30]="FirstBinaryOperator",e[e.LastBinaryOperator=79]="LastBinaryOperator",e[e.FirstStatement=244]="FirstStatement",e[e.LastStatement=260]="LastStatement",e[e.FirstNode=167]="FirstNode",e[e.FirstJSDocNode=310]="FirstJSDocNode",e[e.LastJSDocNode=352]="LastJSDocNode",e[e.FirstJSDocTagNode=328]="FirstJSDocTagNode",e[e.LastJSDocTagNode=352]="LastJSDocTagNode",e[e.FirstContextualKeyword=128]="FirstContextualKeyword",e[e.LastContextualKeyword=166]="LastContextualKeyword",e))(Qt||{}),Jc=(e=>(e[e.None=0]="None",e[e.Let=1]="Let",e[e.Const=2]="Const",e[e.Using=4]="Using",e[e.AwaitUsing=6]="AwaitUsing",e[e.NestedNamespace=8]="NestedNamespace",e[e.Synthesized=16]="Synthesized",e[e.Namespace=32]="Namespace",e[e.OptionalChain=64]="OptionalChain",e[e.ExportContext=128]="ExportContext",e[e.ContainsThis=256]="ContainsThis",e[e.HasImplicitReturn=512]="HasImplicitReturn",e[e.HasExplicitReturn=1024]="HasExplicitReturn",e[e.GlobalAugmentation=2048]="GlobalAugmentation",e[e.HasAsyncFunctions=4096]="HasAsyncFunctions",e[e.DisallowInContext=8192]="DisallowInContext",e[e.YieldContext=16384]="YieldContext",e[e.DecoratorContext=32768]="DecoratorContext",e[e.AwaitContext=65536]="AwaitContext",e[e.DisallowConditionalTypesContext=131072]="DisallowConditionalTypesContext",e[e.ThisNodeHasError=262144]="ThisNodeHasError",e[e.JavaScriptFile=524288]="JavaScriptFile",e[e.ThisNodeOrAnySubNodesHasError=1048576]="ThisNodeOrAnySubNodesHasError",e[e.HasAggregatedChildData=2097152]="HasAggregatedChildData",e[e.PossiblyContainsDynamicImport=4194304]="PossiblyContainsDynamicImport",e[e.PossiblyContainsImportMeta=8388608]="PossiblyContainsImportMeta",e[e.JSDoc=16777216]="JSDoc",e[e.Ambient=33554432]="Ambient",e[e.InWithStatement=67108864]="InWithStatement",e[e.JsonFile=134217728]="JsonFile",e[e.TypeCached=268435456]="TypeCached",e[e.Deprecated=536870912]="Deprecated",e[e.BlockScoped=7]="BlockScoped",e[e.Constant=6]="Constant",e[e.ReachabilityCheckFlags=1536]="ReachabilityCheckFlags",e[e.ReachabilityAndEmitFlags=5632]="ReachabilityAndEmitFlags",e[e.ContextFlags=101441536]="ContextFlags",e[e.TypeExcludesFlags=81920]="TypeExcludesFlags",e[e.PermanentlySetIncrementalFlags=12582912]="PermanentlySetIncrementalFlags",e[e.IdentifierHasExtendedUnicodeEscape=256]="IdentifierHasExtendedUnicodeEscape",e[e.IdentifierIsInJSDocNamespace=4096]="IdentifierIsInJSDocNamespace",e))(Jc||{}),Gme=(e=>(e[e.None=0]="None",e[e.Public=1]="Public",e[e.Private=2]="Private",e[e.Protected=4]="Protected",e[e.Readonly=8]="Readonly",e[e.Override=16]="Override",e[e.Export=32]="Export",e[e.Abstract=64]="Abstract",e[e.Ambient=128]="Ambient",e[e.Static=256]="Static",e[e.Accessor=512]="Accessor",e[e.Async=1024]="Async",e[e.Default=2048]="Default",e[e.Const=4096]="Const",e[e.In=8192]="In",e[e.Out=16384]="Out",e[e.Decorator=32768]="Decorator",e[e.Deprecated=65536]="Deprecated",e[e.JSDocPublic=8388608]="JSDocPublic",e[e.JSDocPrivate=16777216]="JSDocPrivate",e[e.JSDocProtected=33554432]="JSDocProtected",e[e.JSDocReadonly=67108864]="JSDocReadonly",e[e.JSDocOverride=134217728]="JSDocOverride",e[e.SyntacticOrJSDocModifiers=31]="SyntacticOrJSDocModifiers",e[e.SyntacticOnlyModifiers=65504]="SyntacticOnlyModifiers",e[e.SyntacticModifiers=65535]="SyntacticModifiers",e[e.JSDocCacheOnlyModifiers=260046848]="JSDocCacheOnlyModifiers",e[e.JSDocOnlyModifiers=65536]="JSDocOnlyModifiers",e[e.NonCacheOnlyModifiers=131071]="NonCacheOnlyModifiers",e[e.HasComputedJSDocModifiers=268435456]="HasComputedJSDocModifiers",e[e.HasComputedFlags=536870912]="HasComputedFlags",e[e.AccessibilityModifier=7]="AccessibilityModifier",e[e.ParameterPropertyModifier=31]="ParameterPropertyModifier",e[e.NonPublicAccessibilityModifier=6]="NonPublicAccessibilityModifier",e[e.TypeScriptModifier=28895]="TypeScriptModifier",e[e.ExportDefault=2080]="ExportDefault",e[e.All=131071]="All",e[e.Modifier=98303]="Modifier",e))(Gme||{}),Hme=(e=>(e[e.None=0]="None",e[e.Succeeded=1]="Succeeded",e[e.Failed=2]="Failed",e[e.ReportsUnmeasurable=8]="ReportsUnmeasurable",e[e.ReportsUnreliable=16]="ReportsUnreliable",e[e.ReportsMask=24]="ReportsMask",e[e.ComplexityOverflow=32]="ComplexityOverflow",e[e.StackDepthOverflow=64]="StackDepthOverflow",e[e.Overflow=96]="Overflow",e))(Hme||{}),Zz=(e=>(e[e.Unreachable=1]="Unreachable",e[e.Start=2]="Start",e[e.BranchLabel=4]="BranchLabel",e[e.LoopLabel=8]="LoopLabel",e[e.Assignment=16]="Assignment",e[e.TrueCondition=32]="TrueCondition",e[e.FalseCondition=64]="FalseCondition",e[e.SwitchClause=128]="SwitchClause",e[e.ArrayMutation=256]="ArrayMutation",e[e.Call=512]="Call",e[e.ReduceLabel=1024]="ReduceLabel",e[e.Referenced=2048]="Referenced",e[e.Shared=4096]="Shared",e[e.Label=12]="Label",e[e.Condition=96]="Condition",e))(Zz||{}),Zme=(e=>(e[e.None=0]="None",e[e.FunctionScopedVariable=1]="FunctionScopedVariable",e[e.BlockScopedVariable=2]="BlockScopedVariable",e[e.Property=4]="Property",e[e.EnumMember=8]="EnumMember",e[e.Function=16]="Function",e[e.Class=32]="Class",e[e.Interface=64]="Interface",e[e.ConstEnum=128]="ConstEnum",e[e.RegularEnum=256]="RegularEnum",e[e.ValueModule=512]="ValueModule",e[e.NamespaceModule=1024]="NamespaceModule",e[e.TypeLiteral=2048]="TypeLiteral",e[e.ObjectLiteral=4096]="ObjectLiteral",e[e.Method=8192]="Method",e[e.Constructor=16384]="Constructor",e[e.GetAccessor=32768]="GetAccessor",e[e.SetAccessor=65536]="SetAccessor",e[e.Signature=131072]="Signature",e[e.TypeParameter=262144]="TypeParameter",e[e.TypeAlias=524288]="TypeAlias",e[e.ExportValue=1048576]="ExportValue",e[e.Alias=2097152]="Alias",e[e.Prototype=4194304]="Prototype",e[e.ExportStar=8388608]="ExportStar",e[e.Optional=16777216]="Optional",e[e.Transient=33554432]="Transient",e[e.Assignment=67108864]="Assignment",e[e.ModuleExports=134217728]="ModuleExports",e[e.All=-1]="All",e[e.Enum=384]="Enum",e[e.Variable=3]="Variable",e[e.Value=111551]="Value",e[e.Type=788968]="Type",e[e.Namespace=1920]="Namespace",e[e.Module=1536]="Module",e[e.Accessor=98304]="Accessor",e[e.FunctionScopedVariableExcludes=111550]="FunctionScopedVariableExcludes",e[e.BlockScopedVariableExcludes=111551]="BlockScopedVariableExcludes",e[e.ParameterExcludes=111551]="ParameterExcludes",e[e.PropertyExcludes=0]="PropertyExcludes",e[e.EnumMemberExcludes=900095]="EnumMemberExcludes",e[e.FunctionExcludes=110991]="FunctionExcludes",e[e.ClassExcludes=899503]="ClassExcludes",e[e.InterfaceExcludes=788872]="InterfaceExcludes",e[e.RegularEnumExcludes=899327]="RegularEnumExcludes",e[e.ConstEnumExcludes=899967]="ConstEnumExcludes",e[e.ValueModuleExcludes=110735]="ValueModuleExcludes",e[e.NamespaceModuleExcludes=0]="NamespaceModuleExcludes",e[e.MethodExcludes=103359]="MethodExcludes",e[e.GetAccessorExcludes=46015]="GetAccessorExcludes",e[e.SetAccessorExcludes=78783]="SetAccessorExcludes",e[e.AccessorExcludes=13247]="AccessorExcludes",e[e.TypeParameterExcludes=526824]="TypeParameterExcludes",e[e.TypeAliasExcludes=788968]="TypeAliasExcludes",e[e.AliasExcludes=2097152]="AliasExcludes",e[e.ModuleMember=2623475]="ModuleMember",e[e.ExportHasLocal=944]="ExportHasLocal",e[e.BlockScoped=418]="BlockScoped",e[e.PropertyOrAccessor=98308]="PropertyOrAccessor",e[e.ClassMember=106500]="ClassMember",e[e.ExportSupportsDefaultModifier=112]="ExportSupportsDefaultModifier",e[e.ExportDoesNotSupportDefaultModifier=-113]="ExportDoesNotSupportDefaultModifier",e[e.Classifiable=2885600]="Classifiable",e[e.LateBindingContainer=6256]="LateBindingContainer",e))(Zme||{}),Wme=(e=>(e[e.None=0]="None",e[e.TypeChecked=1]="TypeChecked",e[e.LexicalThis=2]="LexicalThis",e[e.CaptureThis=4]="CaptureThis",e[e.CaptureNewTarget=8]="CaptureNewTarget",e[e.SuperInstance=16]="SuperInstance",e[e.SuperStatic=32]="SuperStatic",e[e.ContextChecked=64]="ContextChecked",e[e.MethodWithSuperPropertyAccessInAsync=128]="MethodWithSuperPropertyAccessInAsync",e[e.MethodWithSuperPropertyAssignmentInAsync=256]="MethodWithSuperPropertyAssignmentInAsync",e[e.CaptureArguments=512]="CaptureArguments",e[e.EnumValuesComputed=1024]="EnumValuesComputed",e[e.LexicalModuleMergesWithClass=2048]="LexicalModuleMergesWithClass",e[e.LoopWithCapturedBlockScopedBinding=4096]="LoopWithCapturedBlockScopedBinding",e[e.ContainsCapturedBlockScopeBinding=8192]="ContainsCapturedBlockScopeBinding",e[e.CapturedBlockScopedBinding=16384]="CapturedBlockScopedBinding",e[e.BlockScopedBindingInLoop=32768]="BlockScopedBindingInLoop",e[e.NeedsLoopOutParameter=65536]="NeedsLoopOutParameter",e[e.AssignmentsMarked=131072]="AssignmentsMarked",e[e.ContainsConstructorReference=262144]="ContainsConstructorReference",e[e.ConstructorReference=536870912]="ConstructorReference",e[e.ContainsClassWithPrivateIdentifiers=1048576]="ContainsClassWithPrivateIdentifiers",e[e.ContainsSuperPropertyInStaticInitializer=2097152]="ContainsSuperPropertyInStaticInitializer",e[e.InCheckIdentifier=4194304]="InCheckIdentifier",e[e.PartiallyTypeChecked=8388608]="PartiallyTypeChecked",e[e.LazyFlags=539358128]="LazyFlags",e))(Wme||{}),cs=(e=>(e[e.Any=1]="Any",e[e.Unknown=2]="Unknown",e[e.String=4]="String",e[e.Number=8]="Number",e[e.Boolean=16]="Boolean",e[e.Enum=32]="Enum",e[e.BigInt=64]="BigInt",e[e.StringLiteral=128]="StringLiteral",e[e.NumberLiteral=256]="NumberLiteral",e[e.BooleanLiteral=512]="BooleanLiteral",e[e.EnumLiteral=1024]="EnumLiteral",e[e.BigIntLiteral=2048]="BigIntLiteral",e[e.ESSymbol=4096]="ESSymbol",e[e.UniqueESSymbol=8192]="UniqueESSymbol",e[e.Void=16384]="Void",e[e.Undefined=32768]="Undefined",e[e.Null=65536]="Null",e[e.Never=131072]="Never",e[e.TypeParameter=262144]="TypeParameter",e[e.Object=524288]="Object",e[e.Union=1048576]="Union",e[e.Intersection=2097152]="Intersection",e[e.Index=4194304]="Index",e[e.IndexedAccess=8388608]="IndexedAccess",e[e.Conditional=16777216]="Conditional",e[e.Substitution=33554432]="Substitution",e[e.NonPrimitive=67108864]="NonPrimitive",e[e.TemplateLiteral=134217728]="TemplateLiteral",e[e.StringMapping=268435456]="StringMapping",e[e.Reserved1=536870912]="Reserved1",e[e.Reserved2=1073741824]="Reserved2",e[e.AnyOrUnknown=3]="AnyOrUnknown",e[e.Nullable=98304]="Nullable",e[e.Literal=2944]="Literal",e[e.Unit=109472]="Unit",e[e.Freshable=2976]="Freshable",e[e.StringOrNumberLiteral=384]="StringOrNumberLiteral",e[e.StringOrNumberLiteralOrUnique=8576]="StringOrNumberLiteralOrUnique",e[e.DefinitelyFalsy=117632]="DefinitelyFalsy",e[e.PossiblyFalsy=117724]="PossiblyFalsy",e[e.Intrinsic=67359327]="Intrinsic",e[e.StringLike=402653316]="StringLike",e[e.NumberLike=296]="NumberLike",e[e.BigIntLike=2112]="BigIntLike",e[e.BooleanLike=528]="BooleanLike",e[e.EnumLike=1056]="EnumLike",e[e.ESSymbolLike=12288]="ESSymbolLike",e[e.VoidLike=49152]="VoidLike",e[e.Primitive=402784252]="Primitive",e[e.DefinitelyNonNullable=470302716]="DefinitelyNonNullable",e[e.DisjointDomains=469892092]="DisjointDomains",e[e.UnionOrIntersection=3145728]="UnionOrIntersection",e[e.StructuredType=3670016]="StructuredType",e[e.TypeVariable=8650752]="TypeVariable",e[e.InstantiableNonPrimitive=58982400]="InstantiableNonPrimitive",e[e.InstantiablePrimitive=406847488]="InstantiablePrimitive",e[e.Instantiable=465829888]="Instantiable",e[e.StructuredOrInstantiable=469499904]="StructuredOrInstantiable",e[e.ObjectFlagsType=3899393]="ObjectFlagsType",e[e.Simplifiable=25165824]="Simplifiable",e[e.Singleton=67358815]="Singleton",e[e.Narrowable=536624127]="Narrowable",e[e.IncludesMask=473694207]="IncludesMask",e[e.IncludesMissingType=262144]="IncludesMissingType",e[e.IncludesNonWideningType=4194304]="IncludesNonWideningType",e[e.IncludesWildcard=8388608]="IncludesWildcard",e[e.IncludesEmptyObject=16777216]="IncludesEmptyObject",e[e.IncludesInstantiable=33554432]="IncludesInstantiable",e[e.IncludesConstrainedTypeVariable=536870912]="IncludesConstrainedTypeVariable",e[e.IncludesError=1073741824]="IncludesError",e[e.NotPrimitiveUnion=36323331]="NotPrimitiveUnion",e))(cs||{}),Qme=(e=>(e[e.None=0]="None",e[e.Class=1]="Class",e[e.Interface=2]="Interface",e[e.Reference=4]="Reference",e[e.Tuple=8]="Tuple",e[e.Anonymous=16]="Anonymous",e[e.Mapped=32]="Mapped",e[e.Instantiated=64]="Instantiated",e[e.ObjectLiteral=128]="ObjectLiteral",e[e.EvolvingArray=256]="EvolvingArray",e[e.ObjectLiteralPatternWithComputedProperties=512]="ObjectLiteralPatternWithComputedProperties",e[e.ReverseMapped=1024]="ReverseMapped",e[e.JsxAttributes=2048]="JsxAttributes",e[e.JSLiteral=4096]="JSLiteral",e[e.FreshLiteral=8192]="FreshLiteral",e[e.ArrayLiteral=16384]="ArrayLiteral",e[e.PrimitiveUnion=32768]="PrimitiveUnion",e[e.ContainsWideningType=65536]="ContainsWideningType",e[e.ContainsObjectOrArrayLiteral=131072]="ContainsObjectOrArrayLiteral",e[e.NonInferrableType=262144]="NonInferrableType",e[e.CouldContainTypeVariablesComputed=524288]="CouldContainTypeVariablesComputed",e[e.CouldContainTypeVariables=1048576]="CouldContainTypeVariables",e[e.SingleSignatureType=134217728]="SingleSignatureType",e[e.ClassOrInterface=3]="ClassOrInterface",e[e.RequiresWidening=196608]="RequiresWidening",e[e.PropagatingFlags=458752]="PropagatingFlags",e[e.InstantiatedMapped=96]="InstantiatedMapped",e[e.ObjectTypeKindMask=1343]="ObjectTypeKindMask",e[e.ContainsSpread=2097152]="ContainsSpread",e[e.ObjectRestType=4194304]="ObjectRestType",e[e.InstantiationExpressionType=8388608]="InstantiationExpressionType",e[e.IsClassInstanceClone=16777216]="IsClassInstanceClone",e[e.IdenticalBaseTypeCalculated=33554432]="IdenticalBaseTypeCalculated",e[e.IdenticalBaseTypeExists=67108864]="IdenticalBaseTypeExists",e[e.IsGenericTypeComputed=2097152]="IsGenericTypeComputed",e[e.IsGenericObjectType=4194304]="IsGenericObjectType",e[e.IsGenericIndexType=8388608]="IsGenericIndexType",e[e.IsGenericType=12582912]="IsGenericType",e[e.ContainsIntersections=16777216]="ContainsIntersections",e[e.IsUnknownLikeUnionComputed=33554432]="IsUnknownLikeUnionComputed",e[e.IsUnknownLikeUnion=67108864]="IsUnknownLikeUnion",e[e.IsNeverIntersectionComputed=16777216]="IsNeverIntersectionComputed",e[e.IsNeverIntersection=33554432]="IsNeverIntersection",e[e.IsConstrainedTypeVariable=67108864]="IsConstrainedTypeVariable",e))(Qme||{}),Xme=(e=>(e[e.None=0]="None",e[e.HasRestParameter=1]="HasRestParameter",e[e.HasLiteralTypes=2]="HasLiteralTypes",e[e.Abstract=4]="Abstract",e[e.IsInnerCallChain=8]="IsInnerCallChain",e[e.IsOuterCallChain=16]="IsOuterCallChain",e[e.IsUntypedSignatureInJSFile=32]="IsUntypedSignatureInJSFile",e[e.IsNonInferrable=64]="IsNonInferrable",e[e.IsSignatureCandidateForOverloadFailure=128]="IsSignatureCandidateForOverloadFailure",e[e.PropagatingFlags=167]="PropagatingFlags",e[e.CallChainFlags=24]="CallChainFlags",e))(Xme||{}),X_=(e=>(e[e.Unknown=0]="Unknown",e[e.JS=1]="JS",e[e.JSX=2]="JSX",e[e.TS=3]="TS",e[e.TSX=4]="TSX",e[e.External=5]="External",e[e.JSON=6]="JSON",e[e.Deferred=7]="Deferred",e))(X_||{}),bJ=(e=>(e[e.ES3=0]="ES3",e[e.ES5=1]="ES5",e[e.ES2015=2]="ES2015",e[e.ES2016=3]="ES2016",e[e.ES2017=4]="ES2017",e[e.ES2018=5]="ES2018",e[e.ES2019=6]="ES2019",e[e.ES2020=7]="ES2020",e[e.ES2021=8]="ES2021",e[e.ES2022=9]="ES2022",e[e.ES2023=10]="ES2023",e[e.ES2024=11]="ES2024",e[e.ESNext=99]="ESNext",e[e.JSON=100]="JSON",e[e.Latest=99]="Latest",e))(bJ||{}),Yme=(e=>(e[e.Standard=0]="Standard",e[e.JSX=1]="JSX",e))(Yme||{}),jl=(e=>(e.Ts=".ts",e.Tsx=".tsx",e.Dts=".d.ts",e.Js=".js",e.Jsx=".jsx",e.Json=".json",e.TsBuildInfo=".tsbuildinfo",e.Mjs=".mjs",e.Mts=".mts",e.Dmts=".d.mts",e.Cjs=".cjs",e.Cts=".cts",e.Dcts=".d.cts",e))(jl||{}),ehe=(e=>(e[e.None=0]="None",e[e.ContainsTypeScript=1]="ContainsTypeScript",e[e.ContainsJsx=2]="ContainsJsx",e[e.ContainsESNext=4]="ContainsESNext",e[e.ContainsES2022=8]="ContainsES2022",e[e.ContainsES2021=16]="ContainsES2021",e[e.ContainsES2020=32]="ContainsES2020",e[e.ContainsES2019=64]="ContainsES2019",e[e.ContainsES2018=128]="ContainsES2018",e[e.ContainsES2017=256]="ContainsES2017",e[e.ContainsES2016=512]="ContainsES2016",e[e.ContainsES2015=1024]="ContainsES2015",e[e.ContainsGenerator=2048]="ContainsGenerator",e[e.ContainsDestructuringAssignment=4096]="ContainsDestructuringAssignment",e[e.ContainsTypeScriptClassSyntax=8192]="ContainsTypeScriptClassSyntax",e[e.ContainsLexicalThis=16384]="ContainsLexicalThis",e[e.ContainsRestOrSpread=32768]="ContainsRestOrSpread",e[e.ContainsObjectRestOrSpread=65536]="ContainsObjectRestOrSpread",e[e.ContainsComputedPropertyName=131072]="ContainsComputedPropertyName",e[e.ContainsBlockScopedBinding=262144]="ContainsBlockScopedBinding",e[e.ContainsBindingPattern=524288]="ContainsBindingPattern",e[e.ContainsYield=1048576]="ContainsYield",e[e.ContainsAwait=2097152]="ContainsAwait",e[e.ContainsHoistedDeclarationOrCompletion=4194304]="ContainsHoistedDeclarationOrCompletion",e[e.ContainsDynamicImport=8388608]="ContainsDynamicImport",e[e.ContainsClassFields=16777216]="ContainsClassFields",e[e.ContainsDecorators=33554432]="ContainsDecorators",e[e.ContainsPossibleTopLevelAwait=67108864]="ContainsPossibleTopLevelAwait",e[e.ContainsLexicalSuper=134217728]="ContainsLexicalSuper",e[e.ContainsUpdateExpressionForIdentifier=268435456]="ContainsUpdateExpressionForIdentifier",e[e.ContainsPrivateIdentifierInExpression=536870912]="ContainsPrivateIdentifierInExpression",e[e.HasComputedFlags=-2147483648]="HasComputedFlags",e[e.AssertTypeScript=1]="AssertTypeScript",e[e.AssertJsx=2]="AssertJsx",e[e.AssertESNext=4]="AssertESNext",e[e.AssertES2022=8]="AssertES2022",e[e.AssertES2021=16]="AssertES2021",e[e.AssertES2020=32]="AssertES2020",e[e.AssertES2019=64]="AssertES2019",e[e.AssertES2018=128]="AssertES2018",e[e.AssertES2017=256]="AssertES2017",e[e.AssertES2016=512]="AssertES2016",e[e.AssertES2015=1024]="AssertES2015",e[e.AssertGenerator=2048]="AssertGenerator",e[e.AssertDestructuringAssignment=4096]="AssertDestructuringAssignment",e[e.OuterExpressionExcludes=-2147483648]="OuterExpressionExcludes",e[e.PropertyAccessExcludes=-2147483648]="PropertyAccessExcludes",e[e.NodeExcludes=-2147483648]="NodeExcludes",e[e.ArrowFunctionExcludes=-2072174592]="ArrowFunctionExcludes",e[e.FunctionExcludes=-1937940480]="FunctionExcludes",e[e.ConstructorExcludes=-1937948672]="ConstructorExcludes",e[e.MethodOrAccessorExcludes=-2005057536]="MethodOrAccessorExcludes",e[e.PropertyExcludes=-2013249536]="PropertyExcludes",e[e.ClassExcludes=-2147344384]="ClassExcludes",e[e.ModuleExcludes=-1941676032]="ModuleExcludes",e[e.TypeExcludes=-2]="TypeExcludes",e[e.ObjectLiteralExcludes=-2147278848]="ObjectLiteralExcludes",e[e.ArrayLiteralOrCallOrNewExcludes=-2147450880]="ArrayLiteralOrCallOrNewExcludes",e[e.VariableDeclarationListExcludes=-2146893824]="VariableDeclarationListExcludes",e[e.ParameterExcludes=-2147483648]="ParameterExcludes",e[e.CatchClauseExcludes=-2147418112]="CatchClauseExcludes",e[e.BindingPatternExcludes=-2147450880]="BindingPatternExcludes",e[e.ContainsLexicalThisOrSuper=134234112]="ContainsLexicalThisOrSuper",e[e.PropertyNamePropagatingFlags=134234112]="PropertyNamePropagatingFlags",e))(ehe||{}),the=(e=>(e[e.TabStop=0]="TabStop",e[e.Placeholder=1]="Placeholder",e[e.Choice=2]="Choice",e[e.Variable=3]="Variable",e))(the||{}),rhe=(e=>(e[e.None=0]="None",e[e.SingleLine=1]="SingleLine",e[e.MultiLine=2]="MultiLine",e[e.AdviseOnEmitNode=4]="AdviseOnEmitNode",e[e.NoSubstitution=8]="NoSubstitution",e[e.CapturesThis=16]="CapturesThis",e[e.NoLeadingSourceMap=32]="NoLeadingSourceMap",e[e.NoTrailingSourceMap=64]="NoTrailingSourceMap",e[e.NoSourceMap=96]="NoSourceMap",e[e.NoNestedSourceMaps=128]="NoNestedSourceMaps",e[e.NoTokenLeadingSourceMaps=256]="NoTokenLeadingSourceMaps",e[e.NoTokenTrailingSourceMaps=512]="NoTokenTrailingSourceMaps",e[e.NoTokenSourceMaps=768]="NoTokenSourceMaps",e[e.NoLeadingComments=1024]="NoLeadingComments",e[e.NoTrailingComments=2048]="NoTrailingComments",e[e.NoComments=3072]="NoComments",e[e.NoNestedComments=4096]="NoNestedComments",e[e.HelperName=8192]="HelperName",e[e.ExportName=16384]="ExportName",e[e.LocalName=32768]="LocalName",e[e.InternalName=65536]="InternalName",e[e.Indented=131072]="Indented",e[e.NoIndentation=262144]="NoIndentation",e[e.AsyncFunctionBody=524288]="AsyncFunctionBody",e[e.ReuseTempVariableScope=1048576]="ReuseTempVariableScope",e[e.CustomPrologue=2097152]="CustomPrologue",e[e.NoHoisting=4194304]="NoHoisting",e[e.Iterator=8388608]="Iterator",e[e.NoAsciiEscaping=16777216]="NoAsciiEscaping",e))(rhe||{}),kD={Classes:2,ForOf:2,Generators:2,Iteration:2,SpreadElements:2,RestElements:2,TaggedTemplates:2,DestructuringAssignment:2,BindingPatterns:2,ArrowFunctions:2,BlockScopedVariables:2,ObjectAssign:2,RegularExpressionFlagsUnicode:2,RegularExpressionFlagsSticky:2,Exponentiation:3,AsyncFunctions:4,ForAwaitOf:5,AsyncGenerators:5,AsyncIteration:5,ObjectSpreadRest:5,RegularExpressionFlagsDotAll:5,BindinglessCatch:6,BigInt:7,NullishCoalesce:7,OptionalChaining:7,LogicalAssignment:8,TopLevelAwait:9,ClassFields:9,PrivateNamesAndClassStaticBlocks:9,RegularExpressionFlagsHasIndices:9,ShebangComments:10,RegularExpressionFlagsUnicodeSets:11,UsingAndAwaitUsing:99,ClassAndClassElementDecorators:99},nhe={reference:{args:[{name:"types",optional:!0,captureSpan:!0},{name:"lib",optional:!0,captureSpan:!0},{name:"path",optional:!0,captureSpan:!0},{name:"no-default-lib",optional:!0},{name:"resolution-mode",optional:!0},{name:"preserve",optional:!0}],kind:1},"amd-dependency":{args:[{name:"path"},{name:"name",optional:!0}],kind:1},"amd-module":{args:[{name:"name"}],kind:1},"ts-check":{kind:2},"ts-nocheck":{kind:2},jsx:{args:[{name:"factory"}],kind:4},jsxfrag:{args:[{name:"factory"}],kind:4},jsximportsource:{args:[{name:"factory"}],kind:4},jsxruntime:{args:[{name:"factory"}],kind:4}},$D=(e=>(e[e.ParseAll=0]="ParseAll",e[e.ParseNone=1]="ParseNone",e[e.ParseForTypeErrors=2]="ParseForTypeErrors",e[e.ParseForTypeInfo=3]="ParseForTypeInfo",e))($D||{}),ef="/",tet="\\",Nfe="://",ret=/\\/g;function net(e){return e===47||e===92}function oet(e,t){return e.length>t.length&&WYe(e,t)}function xJ(e){return e.length>0&&net(e.charCodeAt(e.length-1))}function Ffe(e){return e>=97&&e<=122||e>=65&&e<=90}function iet(e,t){let r=e.charCodeAt(t);if(r===58)return t+1;if(r===37&&e.charCodeAt(t+1)===51){let n=e.charCodeAt(t+2);if(n===97||n===65)return t+3}return-1}function aet(e){if(!e)return 0;let t=e.charCodeAt(0);if(t===47||t===92){if(e.charCodeAt(1)!==t)return 1;let n=e.indexOf(t===47?ef:tet,2);return n<0?e.length:n+1}if(Ffe(t)&&e.charCodeAt(1)===58){let n=e.charCodeAt(2);if(n===47||n===92)return 3;if(e.length===2)return 2}let r=e.indexOf(Nfe);if(r!==-1){let n=r+Nfe.length,o=e.indexOf(ef,n);if(o!==-1){let i=e.slice(0,r),a=e.slice(n,o);if(i==="file"&&(a===""||a==="localhost")&&Ffe(e.charCodeAt(o+1))){let s=iet(e,o+2);if(s!==-1){if(e.charCodeAt(s)===47)return~(s+1);if(s===e.length)return~s}}return~(o+1)}return~e.length}return 0}function VD(e){let t=aet(e);return t<0?~t:t}function ohe(e,t,r){if(e=KD(e),VD(e)===e.length)return"";e=mO(e);let n=e.slice(Math.max(VD(e),e.lastIndexOf(ef)+1)),o=t!==void 0&&r!==void 0?ihe(n,t,r):void 0;return o?n.slice(0,n.length-o.length):n}function Rfe(e,t,r){if(fO(t,".")||(t="."+t),e.length>=t.length&&e.charCodeAt(e.length-t.length)===46){let n=e.slice(e.length-t.length);if(r(n,t))return n}}function set(e,t,r){if(typeof t=="string")return Rfe(e,t,r)||"";for(let n of t){let o=Rfe(e,n,r);if(o)return o}return""}function ihe(e,t,r){if(t)return set(mO(e),t,r?vJ:KYe);let n=ohe(e),o=n.lastIndexOf(".");return o>=0?n.substring(o):""}function KD(e){return e.includes("\\")?e.replace(ret,ef):e}function cet(e,...t){e&&(e=KD(e));for(let r of t)r&&(r=KD(r),!e||VD(r)!==0?e=r:e=she(e)+r);return e}function uet(e,t){let r=VD(e);r===0&&t?(e=cet(t,e),r=VD(e)):e=KD(e);let n=ahe(e);if(n!==void 0)return n.length>r?mO(n):n;let o=e.length,i=e.substring(0,r),a,s=r,c=s,p=s,d=r!==0;for(;sc&&(a??(a=e.substring(0,c-1)),c=s);let m=e.indexOf(ef,s+1);m===-1&&(m=o);let y=m-c;if(y===1&&e.charCodeAt(s)===46)a??(a=e.substring(0,p));else if(y===2&&e.charCodeAt(s)===46&&e.charCodeAt(s+1)===46)if(!d)a!==void 0?a+=a.length===r?"..":"/..":p=s+2;else if(a===void 0)p-2>=0?a=e.substring(0,Math.max(r,e.lastIndexOf(ef,p-2))):a=e.substring(0,p);else{let g=a.lastIndexOf(ef);g!==-1?a=a.substring(0,Math.max(r,g)):a=i,a.length===r&&(d=r!==0)}else a!==void 0?(a.length!==r&&(a+=ef),d=!0,a+=e.substring(c,m)):(d=!0,p=m);s=m+1}return a??(o>r?mO(e):e)}function pet(e){e=KD(e);let t=ahe(e);return t!==void 0?t:(t=uet(e,""),t&&xJ(e)?she(t):t)}function ahe(e){if(!Lfe.test(e))return e;let t=e.replace(/\/\.\//g,"/");if(t.startsWith("./")&&(t=t.slice(2)),t!==e&&(e=t,!Lfe.test(e)))return e}function mO(e){return xJ(e)?e.substr(0,e.length-1):e}function she(e){return xJ(e)?e:e+ef}var Lfe=/\/\/|(?:^|\/)\.\.?(?:$|\/)/;function u(e,t,r,n,o,i,a){return{code:e,category:t,key:r,message:n,reportsUnnecessary:o,elidedInCompatabilityPyramid:i,reportsDeprecated:a}}var G={Unterminated_string_literal:u(1002,1,"Unterminated_string_literal_1002","Unterminated string literal."),Identifier_expected:u(1003,1,"Identifier_expected_1003","Identifier expected."),_0_expected:u(1005,1,"_0_expected_1005","'{0}' expected."),A_file_cannot_have_a_reference_to_itself:u(1006,1,"A_file_cannot_have_a_reference_to_itself_1006","A file cannot have a reference to itself."),The_parser_expected_to_find_a_1_to_match_the_0_token_here:u(1007,1,"The_parser_expected_to_find_a_1_to_match_the_0_token_here_1007","The parser expected to find a '{1}' to match the '{0}' token here."),Trailing_comma_not_allowed:u(1009,1,"Trailing_comma_not_allowed_1009","Trailing comma not allowed."),Asterisk_Slash_expected:u(1010,1,"Asterisk_Slash_expected_1010","'*/' expected."),An_element_access_expression_should_take_an_argument:u(1011,1,"An_element_access_expression_should_take_an_argument_1011","An element access expression should take an argument."),Unexpected_token:u(1012,1,"Unexpected_token_1012","Unexpected token."),A_rest_parameter_or_binding_pattern_may_not_have_a_trailing_comma:u(1013,1,"A_rest_parameter_or_binding_pattern_may_not_have_a_trailing_comma_1013","A rest parameter or binding pattern may not have a trailing comma."),A_rest_parameter_must_be_last_in_a_parameter_list:u(1014,1,"A_rest_parameter_must_be_last_in_a_parameter_list_1014","A rest parameter must be last in a parameter list."),Parameter_cannot_have_question_mark_and_initializer:u(1015,1,"Parameter_cannot_have_question_mark_and_initializer_1015","Parameter cannot have question mark and initializer."),A_required_parameter_cannot_follow_an_optional_parameter:u(1016,1,"A_required_parameter_cannot_follow_an_optional_parameter_1016","A required parameter cannot follow an optional parameter."),An_index_signature_cannot_have_a_rest_parameter:u(1017,1,"An_index_signature_cannot_have_a_rest_parameter_1017","An index signature cannot have a rest parameter."),An_index_signature_parameter_cannot_have_an_accessibility_modifier:u(1018,1,"An_index_signature_parameter_cannot_have_an_accessibility_modifier_1018","An index signature parameter cannot have an accessibility modifier."),An_index_signature_parameter_cannot_have_a_question_mark:u(1019,1,"An_index_signature_parameter_cannot_have_a_question_mark_1019","An index signature parameter cannot have a question mark."),An_index_signature_parameter_cannot_have_an_initializer:u(1020,1,"An_index_signature_parameter_cannot_have_an_initializer_1020","An index signature parameter cannot have an initializer."),An_index_signature_must_have_a_type_annotation:u(1021,1,"An_index_signature_must_have_a_type_annotation_1021","An index signature must have a type annotation."),An_index_signature_parameter_must_have_a_type_annotation:u(1022,1,"An_index_signature_parameter_must_have_a_type_annotation_1022","An index signature parameter must have a type annotation."),readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature:u(1024,1,"readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature_1024","'readonly' modifier can only appear on a property declaration or index signature."),An_index_signature_cannot_have_a_trailing_comma:u(1025,1,"An_index_signature_cannot_have_a_trailing_comma_1025","An index signature cannot have a trailing comma."),Accessibility_modifier_already_seen:u(1028,1,"Accessibility_modifier_already_seen_1028","Accessibility modifier already seen."),_0_modifier_must_precede_1_modifier:u(1029,1,"_0_modifier_must_precede_1_modifier_1029","'{0}' modifier must precede '{1}' modifier."),_0_modifier_already_seen:u(1030,1,"_0_modifier_already_seen_1030","'{0}' modifier already seen."),_0_modifier_cannot_appear_on_class_elements_of_this_kind:u(1031,1,"_0_modifier_cannot_appear_on_class_elements_of_this_kind_1031","'{0}' modifier cannot appear on class elements of this kind."),super_must_be_followed_by_an_argument_list_or_member_access:u(1034,1,"super_must_be_followed_by_an_argument_list_or_member_access_1034","'super' must be followed by an argument list or member access."),Only_ambient_modules_can_use_quoted_names:u(1035,1,"Only_ambient_modules_can_use_quoted_names_1035","Only ambient modules can use quoted names."),Statements_are_not_allowed_in_ambient_contexts:u(1036,1,"Statements_are_not_allowed_in_ambient_contexts_1036","Statements are not allowed in ambient contexts."),A_declare_modifier_cannot_be_used_in_an_already_ambient_context:u(1038,1,"A_declare_modifier_cannot_be_used_in_an_already_ambient_context_1038","A 'declare' modifier cannot be used in an already ambient context."),Initializers_are_not_allowed_in_ambient_contexts:u(1039,1,"Initializers_are_not_allowed_in_ambient_contexts_1039","Initializers are not allowed in ambient contexts."),_0_modifier_cannot_be_used_in_an_ambient_context:u(1040,1,"_0_modifier_cannot_be_used_in_an_ambient_context_1040","'{0}' modifier cannot be used in an ambient context."),_0_modifier_cannot_be_used_here:u(1042,1,"_0_modifier_cannot_be_used_here_1042","'{0}' modifier cannot be used here."),_0_modifier_cannot_appear_on_a_module_or_namespace_element:u(1044,1,"_0_modifier_cannot_appear_on_a_module_or_namespace_element_1044","'{0}' modifier cannot appear on a module or namespace element."),Top_level_declarations_in_d_ts_files_must_start_with_either_a_declare_or_export_modifier:u(1046,1,"Top_level_declarations_in_d_ts_files_must_start_with_either_a_declare_or_export_modifier_1046","Top-level declarations in .d.ts files must start with either a 'declare' or 'export' modifier."),A_rest_parameter_cannot_be_optional:u(1047,1,"A_rest_parameter_cannot_be_optional_1047","A rest parameter cannot be optional."),A_rest_parameter_cannot_have_an_initializer:u(1048,1,"A_rest_parameter_cannot_have_an_initializer_1048","A rest parameter cannot have an initializer."),A_set_accessor_must_have_exactly_one_parameter:u(1049,1,"A_set_accessor_must_have_exactly_one_parameter_1049","A 'set' accessor must have exactly one parameter."),A_set_accessor_cannot_have_an_optional_parameter:u(1051,1,"A_set_accessor_cannot_have_an_optional_parameter_1051","A 'set' accessor cannot have an optional parameter."),A_set_accessor_parameter_cannot_have_an_initializer:u(1052,1,"A_set_accessor_parameter_cannot_have_an_initializer_1052","A 'set' accessor parameter cannot have an initializer."),A_set_accessor_cannot_have_rest_parameter:u(1053,1,"A_set_accessor_cannot_have_rest_parameter_1053","A 'set' accessor cannot have rest parameter."),A_get_accessor_cannot_have_parameters:u(1054,1,"A_get_accessor_cannot_have_parameters_1054","A 'get' accessor cannot have parameters."),Type_0_is_not_a_valid_async_function_return_type_in_ES5_because_it_does_not_refer_to_a_Promise_compatible_constructor_value:u(1055,1,"Type_0_is_not_a_valid_async_function_return_type_in_ES5_because_it_does_not_refer_to_a_Promise_compa_1055","Type '{0}' is not a valid async function return type in ES5 because it does not refer to a Promise-compatible constructor value."),Accessors_are_only_available_when_targeting_ECMAScript_5_and_higher:u(1056,1,"Accessors_are_only_available_when_targeting_ECMAScript_5_and_higher_1056","Accessors are only available when targeting ECMAScript 5 and higher."),The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member:u(1058,1,"The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_t_1058","The return type of an async function must either be a valid promise or must not contain a callable 'then' member."),A_promise_must_have_a_then_method:u(1059,1,"A_promise_must_have_a_then_method_1059","A promise must have a 'then' method."),The_first_parameter_of_the_then_method_of_a_promise_must_be_a_callback:u(1060,1,"The_first_parameter_of_the_then_method_of_a_promise_must_be_a_callback_1060","The first parameter of the 'then' method of a promise must be a callback."),Enum_member_must_have_initializer:u(1061,1,"Enum_member_must_have_initializer_1061","Enum member must have initializer."),Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method:u(1062,1,"Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method_1062","Type is referenced directly or indirectly in the fulfillment callback of its own 'then' method."),An_export_assignment_cannot_be_used_in_a_namespace:u(1063,1,"An_export_assignment_cannot_be_used_in_a_namespace_1063","An export assignment cannot be used in a namespace."),The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_Did_you_mean_to_write_Promise_0:u(1064,1,"The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_Did_you_mean_to_wri_1064","The return type of an async function or method must be the global Promise type. Did you mean to write 'Promise<{0}>'?"),The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type:u(1065,1,"The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_1065","The return type of an async function or method must be the global Promise type."),In_ambient_enum_declarations_member_initializer_must_be_constant_expression:u(1066,1,"In_ambient_enum_declarations_member_initializer_must_be_constant_expression_1066","In ambient enum declarations member initializer must be constant expression."),Unexpected_token_A_constructor_method_accessor_or_property_was_expected:u(1068,1,"Unexpected_token_A_constructor_method_accessor_or_property_was_expected_1068","Unexpected token. A constructor, method, accessor, or property was expected."),Unexpected_token_A_type_parameter_name_was_expected_without_curly_braces:u(1069,1,"Unexpected_token_A_type_parameter_name_was_expected_without_curly_braces_1069","Unexpected token. A type parameter name was expected without curly braces."),_0_modifier_cannot_appear_on_a_type_member:u(1070,1,"_0_modifier_cannot_appear_on_a_type_member_1070","'{0}' modifier cannot appear on a type member."),_0_modifier_cannot_appear_on_an_index_signature:u(1071,1,"_0_modifier_cannot_appear_on_an_index_signature_1071","'{0}' modifier cannot appear on an index signature."),A_0_modifier_cannot_be_used_with_an_import_declaration:u(1079,1,"A_0_modifier_cannot_be_used_with_an_import_declaration_1079","A '{0}' modifier cannot be used with an import declaration."),Invalid_reference_directive_syntax:u(1084,1,"Invalid_reference_directive_syntax_1084","Invalid 'reference' directive syntax."),_0_modifier_cannot_appear_on_a_constructor_declaration:u(1089,1,"_0_modifier_cannot_appear_on_a_constructor_declaration_1089","'{0}' modifier cannot appear on a constructor declaration."),_0_modifier_cannot_appear_on_a_parameter:u(1090,1,"_0_modifier_cannot_appear_on_a_parameter_1090","'{0}' modifier cannot appear on a parameter."),Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement:u(1091,1,"Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement_1091","Only a single variable declaration is allowed in a 'for...in' statement."),Type_parameters_cannot_appear_on_a_constructor_declaration:u(1092,1,"Type_parameters_cannot_appear_on_a_constructor_declaration_1092","Type parameters cannot appear on a constructor declaration."),Type_annotation_cannot_appear_on_a_constructor_declaration:u(1093,1,"Type_annotation_cannot_appear_on_a_constructor_declaration_1093","Type annotation cannot appear on a constructor declaration."),An_accessor_cannot_have_type_parameters:u(1094,1,"An_accessor_cannot_have_type_parameters_1094","An accessor cannot have type parameters."),A_set_accessor_cannot_have_a_return_type_annotation:u(1095,1,"A_set_accessor_cannot_have_a_return_type_annotation_1095","A 'set' accessor cannot have a return type annotation."),An_index_signature_must_have_exactly_one_parameter:u(1096,1,"An_index_signature_must_have_exactly_one_parameter_1096","An index signature must have exactly one parameter."),_0_list_cannot_be_empty:u(1097,1,"_0_list_cannot_be_empty_1097","'{0}' list cannot be empty."),Type_parameter_list_cannot_be_empty:u(1098,1,"Type_parameter_list_cannot_be_empty_1098","Type parameter list cannot be empty."),Type_argument_list_cannot_be_empty:u(1099,1,"Type_argument_list_cannot_be_empty_1099","Type argument list cannot be empty."),Invalid_use_of_0_in_strict_mode:u(1100,1,"Invalid_use_of_0_in_strict_mode_1100","Invalid use of '{0}' in strict mode."),with_statements_are_not_allowed_in_strict_mode:u(1101,1,"with_statements_are_not_allowed_in_strict_mode_1101","'with' statements are not allowed in strict mode."),delete_cannot_be_called_on_an_identifier_in_strict_mode:u(1102,1,"delete_cannot_be_called_on_an_identifier_in_strict_mode_1102","'delete' cannot be called on an identifier in strict mode."),for_await_loops_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules:u(1103,1,"for_await_loops_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules_1103","'for await' loops are only allowed within async functions and at the top levels of modules."),A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement:u(1104,1,"A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement_1104","A 'continue' statement can only be used within an enclosing iteration statement."),A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement:u(1105,1,"A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement_1105","A 'break' statement can only be used within an enclosing iteration or switch statement."),The_left_hand_side_of_a_for_of_statement_may_not_be_async:u(1106,1,"The_left_hand_side_of_a_for_of_statement_may_not_be_async_1106","The left-hand side of a 'for...of' statement may not be 'async'."),Jump_target_cannot_cross_function_boundary:u(1107,1,"Jump_target_cannot_cross_function_boundary_1107","Jump target cannot cross function boundary."),A_return_statement_can_only_be_used_within_a_function_body:u(1108,1,"A_return_statement_can_only_be_used_within_a_function_body_1108","A 'return' statement can only be used within a function body."),Expression_expected:u(1109,1,"Expression_expected_1109","Expression expected."),Type_expected:u(1110,1,"Type_expected_1110","Type expected."),Private_field_0_must_be_declared_in_an_enclosing_class:u(1111,1,"Private_field_0_must_be_declared_in_an_enclosing_class_1111","Private field '{0}' must be declared in an enclosing class."),A_default_clause_cannot_appear_more_than_once_in_a_switch_statement:u(1113,1,"A_default_clause_cannot_appear_more_than_once_in_a_switch_statement_1113","A 'default' clause cannot appear more than once in a 'switch' statement."),Duplicate_label_0:u(1114,1,"Duplicate_label_0_1114","Duplicate label '{0}'."),A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement:u(1115,1,"A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement_1115","A 'continue' statement can only jump to a label of an enclosing iteration statement."),A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement:u(1116,1,"A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement_1116","A 'break' statement can only jump to a label of an enclosing statement."),An_object_literal_cannot_have_multiple_properties_with_the_same_name:u(1117,1,"An_object_literal_cannot_have_multiple_properties_with_the_same_name_1117","An object literal cannot have multiple properties with the same name."),An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name:u(1118,1,"An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name_1118","An object literal cannot have multiple get/set accessors with the same name."),An_object_literal_cannot_have_property_and_accessor_with_the_same_name:u(1119,1,"An_object_literal_cannot_have_property_and_accessor_with_the_same_name_1119","An object literal cannot have property and accessor with the same name."),An_export_assignment_cannot_have_modifiers:u(1120,1,"An_export_assignment_cannot_have_modifiers_1120","An export assignment cannot have modifiers."),Octal_literals_are_not_allowed_Use_the_syntax_0:u(1121,1,"Octal_literals_are_not_allowed_Use_the_syntax_0_1121","Octal literals are not allowed. Use the syntax '{0}'."),Variable_declaration_list_cannot_be_empty:u(1123,1,"Variable_declaration_list_cannot_be_empty_1123","Variable declaration list cannot be empty."),Digit_expected:u(1124,1,"Digit_expected_1124","Digit expected."),Hexadecimal_digit_expected:u(1125,1,"Hexadecimal_digit_expected_1125","Hexadecimal digit expected."),Unexpected_end_of_text:u(1126,1,"Unexpected_end_of_text_1126","Unexpected end of text."),Invalid_character:u(1127,1,"Invalid_character_1127","Invalid character."),Declaration_or_statement_expected:u(1128,1,"Declaration_or_statement_expected_1128","Declaration or statement expected."),Statement_expected:u(1129,1,"Statement_expected_1129","Statement expected."),case_or_default_expected:u(1130,1,"case_or_default_expected_1130","'case' or 'default' expected."),Property_or_signature_expected:u(1131,1,"Property_or_signature_expected_1131","Property or signature expected."),Enum_member_expected:u(1132,1,"Enum_member_expected_1132","Enum member expected."),Variable_declaration_expected:u(1134,1,"Variable_declaration_expected_1134","Variable declaration expected."),Argument_expression_expected:u(1135,1,"Argument_expression_expected_1135","Argument expression expected."),Property_assignment_expected:u(1136,1,"Property_assignment_expected_1136","Property assignment expected."),Expression_or_comma_expected:u(1137,1,"Expression_or_comma_expected_1137","Expression or comma expected."),Parameter_declaration_expected:u(1138,1,"Parameter_declaration_expected_1138","Parameter declaration expected."),Type_parameter_declaration_expected:u(1139,1,"Type_parameter_declaration_expected_1139","Type parameter declaration expected."),Type_argument_expected:u(1140,1,"Type_argument_expected_1140","Type argument expected."),String_literal_expected:u(1141,1,"String_literal_expected_1141","String literal expected."),Line_break_not_permitted_here:u(1142,1,"Line_break_not_permitted_here_1142","Line break not permitted here."),or_expected:u(1144,1,"or_expected_1144","'{' or ';' expected."),or_JSX_element_expected:u(1145,1,"or_JSX_element_expected_1145","'{' or JSX element expected."),Declaration_expected:u(1146,1,"Declaration_expected_1146","Declaration expected."),Import_declarations_in_a_namespace_cannot_reference_a_module:u(1147,1,"Import_declarations_in_a_namespace_cannot_reference_a_module_1147","Import declarations in a namespace cannot reference a module."),Cannot_use_imports_exports_or_module_augmentations_when_module_is_none:u(1148,1,"Cannot_use_imports_exports_or_module_augmentations_when_module_is_none_1148","Cannot use imports, exports, or module augmentations when '--module' is 'none'."),File_name_0_differs_from_already_included_file_name_1_only_in_casing:u(1149,1,"File_name_0_differs_from_already_included_file_name_1_only_in_casing_1149","File name '{0}' differs from already included file name '{1}' only in casing."),_0_declarations_must_be_initialized:u(1155,1,"_0_declarations_must_be_initialized_1155","'{0}' declarations must be initialized."),_0_declarations_can_only_be_declared_inside_a_block:u(1156,1,"_0_declarations_can_only_be_declared_inside_a_block_1156","'{0}' declarations can only be declared inside a block."),Unterminated_template_literal:u(1160,1,"Unterminated_template_literal_1160","Unterminated template literal."),Unterminated_regular_expression_literal:u(1161,1,"Unterminated_regular_expression_literal_1161","Unterminated regular expression literal."),An_object_member_cannot_be_declared_optional:u(1162,1,"An_object_member_cannot_be_declared_optional_1162","An object member cannot be declared optional."),A_yield_expression_is_only_allowed_in_a_generator_body:u(1163,1,"A_yield_expression_is_only_allowed_in_a_generator_body_1163","A 'yield' expression is only allowed in a generator body."),Computed_property_names_are_not_allowed_in_enums:u(1164,1,"Computed_property_names_are_not_allowed_in_enums_1164","Computed property names are not allowed in enums."),A_computed_property_name_in_an_ambient_context_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type:u(1165,1,"A_computed_property_name_in_an_ambient_context_must_refer_to_an_expression_whose_type_is_a_literal_t_1165","A computed property name in an ambient context must refer to an expression whose type is a literal type or a 'unique symbol' type."),A_computed_property_name_in_a_class_property_declaration_must_have_a_simple_literal_type_or_a_unique_symbol_type:u(1166,1,"A_computed_property_name_in_a_class_property_declaration_must_have_a_simple_literal_type_or_a_unique_1166","A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type."),A_computed_property_name_in_a_method_overload_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type:u(1168,1,"A_computed_property_name_in_a_method_overload_must_refer_to_an_expression_whose_type_is_a_literal_ty_1168","A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type."),A_computed_property_name_in_an_interface_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type:u(1169,1,"A_computed_property_name_in_an_interface_must_refer_to_an_expression_whose_type_is_a_literal_type_or_1169","A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type."),A_computed_property_name_in_a_type_literal_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type:u(1170,1,"A_computed_property_name_in_a_type_literal_must_refer_to_an_expression_whose_type_is_a_literal_type__1170","A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type."),A_comma_expression_is_not_allowed_in_a_computed_property_name:u(1171,1,"A_comma_expression_is_not_allowed_in_a_computed_property_name_1171","A comma expression is not allowed in a computed property name."),extends_clause_already_seen:u(1172,1,"extends_clause_already_seen_1172","'extends' clause already seen."),extends_clause_must_precede_implements_clause:u(1173,1,"extends_clause_must_precede_implements_clause_1173","'extends' clause must precede 'implements' clause."),Classes_can_only_extend_a_single_class:u(1174,1,"Classes_can_only_extend_a_single_class_1174","Classes can only extend a single class."),implements_clause_already_seen:u(1175,1,"implements_clause_already_seen_1175","'implements' clause already seen."),Interface_declaration_cannot_have_implements_clause:u(1176,1,"Interface_declaration_cannot_have_implements_clause_1176","Interface declaration cannot have 'implements' clause."),Binary_digit_expected:u(1177,1,"Binary_digit_expected_1177","Binary digit expected."),Octal_digit_expected:u(1178,1,"Octal_digit_expected_1178","Octal digit expected."),Unexpected_token_expected:u(1179,1,"Unexpected_token_expected_1179","Unexpected token. '{' expected."),Property_destructuring_pattern_expected:u(1180,1,"Property_destructuring_pattern_expected_1180","Property destructuring pattern expected."),Array_element_destructuring_pattern_expected:u(1181,1,"Array_element_destructuring_pattern_expected_1181","Array element destructuring pattern expected."),A_destructuring_declaration_must_have_an_initializer:u(1182,1,"A_destructuring_declaration_must_have_an_initializer_1182","A destructuring declaration must have an initializer."),An_implementation_cannot_be_declared_in_ambient_contexts:u(1183,1,"An_implementation_cannot_be_declared_in_ambient_contexts_1183","An implementation cannot be declared in ambient contexts."),Modifiers_cannot_appear_here:u(1184,1,"Modifiers_cannot_appear_here_1184","Modifiers cannot appear here."),Merge_conflict_marker_encountered:u(1185,1,"Merge_conflict_marker_encountered_1185","Merge conflict marker encountered."),A_rest_element_cannot_have_an_initializer:u(1186,1,"A_rest_element_cannot_have_an_initializer_1186","A rest element cannot have an initializer."),A_parameter_property_may_not_be_declared_using_a_binding_pattern:u(1187,1,"A_parameter_property_may_not_be_declared_using_a_binding_pattern_1187","A parameter property may not be declared using a binding pattern."),Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement:u(1188,1,"Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement_1188","Only a single variable declaration is allowed in a 'for...of' statement."),The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer:u(1189,1,"The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer_1189","The variable declaration of a 'for...in' statement cannot have an initializer."),The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer:u(1190,1,"The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer_1190","The variable declaration of a 'for...of' statement cannot have an initializer."),An_import_declaration_cannot_have_modifiers:u(1191,1,"An_import_declaration_cannot_have_modifiers_1191","An import declaration cannot have modifiers."),Module_0_has_no_default_export:u(1192,1,"Module_0_has_no_default_export_1192","Module '{0}' has no default export."),An_export_declaration_cannot_have_modifiers:u(1193,1,"An_export_declaration_cannot_have_modifiers_1193","An export declaration cannot have modifiers."),Export_declarations_are_not_permitted_in_a_namespace:u(1194,1,"Export_declarations_are_not_permitted_in_a_namespace_1194","Export declarations are not permitted in a namespace."),export_Asterisk_does_not_re_export_a_default:u(1195,1,"export_Asterisk_does_not_re_export_a_default_1195","'export *' does not re-export a default."),Catch_clause_variable_type_annotation_must_be_any_or_unknown_if_specified:u(1196,1,"Catch_clause_variable_type_annotation_must_be_any_or_unknown_if_specified_1196","Catch clause variable type annotation must be 'any' or 'unknown' if specified."),Catch_clause_variable_cannot_have_an_initializer:u(1197,1,"Catch_clause_variable_cannot_have_an_initializer_1197","Catch clause variable cannot have an initializer."),An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive:u(1198,1,"An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive_1198","An extended Unicode escape value must be between 0x0 and 0x10FFFF inclusive."),Unterminated_Unicode_escape_sequence:u(1199,1,"Unterminated_Unicode_escape_sequence_1199","Unterminated Unicode escape sequence."),Line_terminator_not_permitted_before_arrow:u(1200,1,"Line_terminator_not_permitted_before_arrow_1200","Line terminator not permitted before arrow."),Import_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_import_Asterisk_as_ns_from_mod_import_a_from_mod_import_d_from_mod_or_another_module_format_instead:u(1202,1,"Import_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_import_Asterisk_as_1202",`Import assignment cannot be used when targeting ECMAScript modules. Consider using 'import * as ns from "mod"', 'import {a} from "mod"', 'import d from "mod"', or another module format instead.`),Export_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_export_default_or_another_module_format_instead:u(1203,1,"Export_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_export_default_or__1203","Export assignment cannot be used when targeting ECMAScript modules. Consider using 'export default' or another module format instead."),Re_exporting_a_type_when_0_is_enabled_requires_using_export_type:u(1205,1,"Re_exporting_a_type_when_0_is_enabled_requires_using_export_type_1205","Re-exporting a type when '{0}' is enabled requires using 'export type'."),Decorators_are_not_valid_here:u(1206,1,"Decorators_are_not_valid_here_1206","Decorators are not valid here."),Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name:u(1207,1,"Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name_1207","Decorators cannot be applied to multiple get/set accessors of the same name."),Invalid_optional_chain_from_new_expression_Did_you_mean_to_call_0:u(1209,1,"Invalid_optional_chain_from_new_expression_Did_you_mean_to_call_0_1209","Invalid optional chain from new expression. Did you mean to call '{0}()'?"),Code_contained_in_a_class_is_evaluated_in_JavaScript_s_strict_mode_which_does_not_allow_this_use_of_0_For_more_information_see_https_Colon_Slash_Slashdeveloper_mozilla_org_Slashen_US_Slashdocs_SlashWeb_SlashJavaScript_SlashReference_SlashStrict_mode:u(1210,1,"Code_contained_in_a_class_is_evaluated_in_JavaScript_s_strict_mode_which_does_not_allow_this_use_of__1210","Code contained in a class is evaluated in JavaScript's strict mode which does not allow this use of '{0}'. For more information, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode."),A_class_declaration_without_the_default_modifier_must_have_a_name:u(1211,1,"A_class_declaration_without_the_default_modifier_must_have_a_name_1211","A class declaration without the 'default' modifier must have a name."),Identifier_expected_0_is_a_reserved_word_in_strict_mode:u(1212,1,"Identifier_expected_0_is_a_reserved_word_in_strict_mode_1212","Identifier expected. '{0}' is a reserved word in strict mode."),Identifier_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_strict_mode:u(1213,1,"Identifier_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_stric_1213","Identifier expected. '{0}' is a reserved word in strict mode. Class definitions are automatically in strict mode."),Identifier_expected_0_is_a_reserved_word_in_strict_mode_Modules_are_automatically_in_strict_mode:u(1214,1,"Identifier_expected_0_is_a_reserved_word_in_strict_mode_Modules_are_automatically_in_strict_mode_1214","Identifier expected. '{0}' is a reserved word in strict mode. Modules are automatically in strict mode."),Invalid_use_of_0_Modules_are_automatically_in_strict_mode:u(1215,1,"Invalid_use_of_0_Modules_are_automatically_in_strict_mode_1215","Invalid use of '{0}'. Modules are automatically in strict mode."),Identifier_expected_esModule_is_reserved_as_an_exported_marker_when_transforming_ECMAScript_modules:u(1216,1,"Identifier_expected_esModule_is_reserved_as_an_exported_marker_when_transforming_ECMAScript_modules_1216","Identifier expected. '__esModule' is reserved as an exported marker when transforming ECMAScript modules."),Export_assignment_is_not_supported_when_module_flag_is_system:u(1218,1,"Export_assignment_is_not_supported_when_module_flag_is_system_1218","Export assignment is not supported when '--module' flag is 'system'."),Generators_are_not_allowed_in_an_ambient_context:u(1221,1,"Generators_are_not_allowed_in_an_ambient_context_1221","Generators are not allowed in an ambient context."),An_overload_signature_cannot_be_declared_as_a_generator:u(1222,1,"An_overload_signature_cannot_be_declared_as_a_generator_1222","An overload signature cannot be declared as a generator."),_0_tag_already_specified:u(1223,1,"_0_tag_already_specified_1223","'{0}' tag already specified."),Signature_0_must_be_a_type_predicate:u(1224,1,"Signature_0_must_be_a_type_predicate_1224","Signature '{0}' must be a type predicate."),Cannot_find_parameter_0:u(1225,1,"Cannot_find_parameter_0_1225","Cannot find parameter '{0}'."),Type_predicate_0_is_not_assignable_to_1:u(1226,1,"Type_predicate_0_is_not_assignable_to_1_1226","Type predicate '{0}' is not assignable to '{1}'."),Parameter_0_is_not_in_the_same_position_as_parameter_1:u(1227,1,"Parameter_0_is_not_in_the_same_position_as_parameter_1_1227","Parameter '{0}' is not in the same position as parameter '{1}'."),A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods:u(1228,1,"A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods_1228","A type predicate is only allowed in return type position for functions and methods."),A_type_predicate_cannot_reference_a_rest_parameter:u(1229,1,"A_type_predicate_cannot_reference_a_rest_parameter_1229","A type predicate cannot reference a rest parameter."),A_type_predicate_cannot_reference_element_0_in_a_binding_pattern:u(1230,1,"A_type_predicate_cannot_reference_element_0_in_a_binding_pattern_1230","A type predicate cannot reference element '{0}' in a binding pattern."),An_export_assignment_must_be_at_the_top_level_of_a_file_or_module_declaration:u(1231,1,"An_export_assignment_must_be_at_the_top_level_of_a_file_or_module_declaration_1231","An export assignment must be at the top level of a file or module declaration."),An_import_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module:u(1232,1,"An_import_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module_1232","An import declaration can only be used at the top level of a namespace or module."),An_export_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module:u(1233,1,"An_export_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module_1233","An export declaration can only be used at the top level of a namespace or module."),An_ambient_module_declaration_is_only_allowed_at_the_top_level_in_a_file:u(1234,1,"An_ambient_module_declaration_is_only_allowed_at_the_top_level_in_a_file_1234","An ambient module declaration is only allowed at the top level in a file."),A_namespace_declaration_is_only_allowed_at_the_top_level_of_a_namespace_or_module:u(1235,1,"A_namespace_declaration_is_only_allowed_at_the_top_level_of_a_namespace_or_module_1235","A namespace declaration is only allowed at the top level of a namespace or module."),The_return_type_of_a_property_decorator_function_must_be_either_void_or_any:u(1236,1,"The_return_type_of_a_property_decorator_function_must_be_either_void_or_any_1236","The return type of a property decorator function must be either 'void' or 'any'."),The_return_type_of_a_parameter_decorator_function_must_be_either_void_or_any:u(1237,1,"The_return_type_of_a_parameter_decorator_function_must_be_either_void_or_any_1237","The return type of a parameter decorator function must be either 'void' or 'any'."),Unable_to_resolve_signature_of_class_decorator_when_called_as_an_expression:u(1238,1,"Unable_to_resolve_signature_of_class_decorator_when_called_as_an_expression_1238","Unable to resolve signature of class decorator when called as an expression."),Unable_to_resolve_signature_of_parameter_decorator_when_called_as_an_expression:u(1239,1,"Unable_to_resolve_signature_of_parameter_decorator_when_called_as_an_expression_1239","Unable to resolve signature of parameter decorator when called as an expression."),Unable_to_resolve_signature_of_property_decorator_when_called_as_an_expression:u(1240,1,"Unable_to_resolve_signature_of_property_decorator_when_called_as_an_expression_1240","Unable to resolve signature of property decorator when called as an expression."),Unable_to_resolve_signature_of_method_decorator_when_called_as_an_expression:u(1241,1,"Unable_to_resolve_signature_of_method_decorator_when_called_as_an_expression_1241","Unable to resolve signature of method decorator when called as an expression."),abstract_modifier_can_only_appear_on_a_class_method_or_property_declaration:u(1242,1,"abstract_modifier_can_only_appear_on_a_class_method_or_property_declaration_1242","'abstract' modifier can only appear on a class, method, or property declaration."),_0_modifier_cannot_be_used_with_1_modifier:u(1243,1,"_0_modifier_cannot_be_used_with_1_modifier_1243","'{0}' modifier cannot be used with '{1}' modifier."),Abstract_methods_can_only_appear_within_an_abstract_class:u(1244,1,"Abstract_methods_can_only_appear_within_an_abstract_class_1244","Abstract methods can only appear within an abstract class."),Method_0_cannot_have_an_implementation_because_it_is_marked_abstract:u(1245,1,"Method_0_cannot_have_an_implementation_because_it_is_marked_abstract_1245","Method '{0}' cannot have an implementation because it is marked abstract."),An_interface_property_cannot_have_an_initializer:u(1246,1,"An_interface_property_cannot_have_an_initializer_1246","An interface property cannot have an initializer."),A_type_literal_property_cannot_have_an_initializer:u(1247,1,"A_type_literal_property_cannot_have_an_initializer_1247","A type literal property cannot have an initializer."),A_class_member_cannot_have_the_0_keyword:u(1248,1,"A_class_member_cannot_have_the_0_keyword_1248","A class member cannot have the '{0}' keyword."),A_decorator_can_only_decorate_a_method_implementation_not_an_overload:u(1249,1,"A_decorator_can_only_decorate_a_method_implementation_not_an_overload_1249","A decorator can only decorate a method implementation, not an overload."),Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES5:u(1250,1,"Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES5_1250","Function declarations are not allowed inside blocks in strict mode when targeting 'ES5'."),Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES5_Class_definitions_are_automatically_in_strict_mode:u(1251,1,"Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES5_Class_definiti_1251","Function declarations are not allowed inside blocks in strict mode when targeting 'ES5'. Class definitions are automatically in strict mode."),Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES5_Modules_are_automatically_in_strict_mode:u(1252,1,"Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES5_Modules_are_au_1252","Function declarations are not allowed inside blocks in strict mode when targeting 'ES5'. Modules are automatically in strict mode."),Abstract_properties_can_only_appear_within_an_abstract_class:u(1253,1,"Abstract_properties_can_only_appear_within_an_abstract_class_1253","Abstract properties can only appear within an abstract class."),A_const_initializer_in_an_ambient_context_must_be_a_string_or_numeric_literal_or_literal_enum_reference:u(1254,1,"A_const_initializer_in_an_ambient_context_must_be_a_string_or_numeric_literal_or_literal_enum_refere_1254","A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference."),A_definite_assignment_assertion_is_not_permitted_in_this_context:u(1255,1,"A_definite_assignment_assertion_is_not_permitted_in_this_context_1255","A definite assignment assertion '!' is not permitted in this context."),A_required_element_cannot_follow_an_optional_element:u(1257,1,"A_required_element_cannot_follow_an_optional_element_1257","A required element cannot follow an optional element."),A_default_export_must_be_at_the_top_level_of_a_file_or_module_declaration:u(1258,1,"A_default_export_must_be_at_the_top_level_of_a_file_or_module_declaration_1258","A default export must be at the top level of a file or module declaration."),Module_0_can_only_be_default_imported_using_the_1_flag:u(1259,1,"Module_0_can_only_be_default_imported_using_the_1_flag_1259","Module '{0}' can only be default-imported using the '{1}' flag"),Keywords_cannot_contain_escape_characters:u(1260,1,"Keywords_cannot_contain_escape_characters_1260","Keywords cannot contain escape characters."),Already_included_file_name_0_differs_from_file_name_1_only_in_casing:u(1261,1,"Already_included_file_name_0_differs_from_file_name_1_only_in_casing_1261","Already included file name '{0}' differs from file name '{1}' only in casing."),Identifier_expected_0_is_a_reserved_word_at_the_top_level_of_a_module:u(1262,1,"Identifier_expected_0_is_a_reserved_word_at_the_top_level_of_a_module_1262","Identifier expected. '{0}' is a reserved word at the top-level of a module."),Declarations_with_initializers_cannot_also_have_definite_assignment_assertions:u(1263,1,"Declarations_with_initializers_cannot_also_have_definite_assignment_assertions_1263","Declarations with initializers cannot also have definite assignment assertions."),Declarations_with_definite_assignment_assertions_must_also_have_type_annotations:u(1264,1,"Declarations_with_definite_assignment_assertions_must_also_have_type_annotations_1264","Declarations with definite assignment assertions must also have type annotations."),A_rest_element_cannot_follow_another_rest_element:u(1265,1,"A_rest_element_cannot_follow_another_rest_element_1265","A rest element cannot follow another rest element."),An_optional_element_cannot_follow_a_rest_element:u(1266,1,"An_optional_element_cannot_follow_a_rest_element_1266","An optional element cannot follow a rest element."),Property_0_cannot_have_an_initializer_because_it_is_marked_abstract:u(1267,1,"Property_0_cannot_have_an_initializer_because_it_is_marked_abstract_1267","Property '{0}' cannot have an initializer because it is marked abstract."),An_index_signature_parameter_type_must_be_string_number_symbol_or_a_template_literal_type:u(1268,1,"An_index_signature_parameter_type_must_be_string_number_symbol_or_a_template_literal_type_1268","An index signature parameter type must be 'string', 'number', 'symbol', or a template literal type."),Cannot_use_export_import_on_a_type_or_type_only_namespace_when_0_is_enabled:u(1269,1,"Cannot_use_export_import_on_a_type_or_type_only_namespace_when_0_is_enabled_1269","Cannot use 'export import' on a type or type-only namespace when '{0}' is enabled."),Decorator_function_return_type_0_is_not_assignable_to_type_1:u(1270,1,"Decorator_function_return_type_0_is_not_assignable_to_type_1_1270","Decorator function return type '{0}' is not assignable to type '{1}'."),Decorator_function_return_type_is_0_but_is_expected_to_be_void_or_any:u(1271,1,"Decorator_function_return_type_is_0_but_is_expected_to_be_void_or_any_1271","Decorator function return type is '{0}' but is expected to be 'void' or 'any'."),A_type_referenced_in_a_decorated_signature_must_be_imported_with_import_type_or_a_namespace_import_when_isolatedModules_and_emitDecoratorMetadata_are_enabled:u(1272,1,"A_type_referenced_in_a_decorated_signature_must_be_imported_with_import_type_or_a_namespace_import_w_1272","A type referenced in a decorated signature must be imported with 'import type' or a namespace import when 'isolatedModules' and 'emitDecoratorMetadata' are enabled."),_0_modifier_cannot_appear_on_a_type_parameter:u(1273,1,"_0_modifier_cannot_appear_on_a_type_parameter_1273","'{0}' modifier cannot appear on a type parameter"),_0_modifier_can_only_appear_on_a_type_parameter_of_a_class_interface_or_type_alias:u(1274,1,"_0_modifier_can_only_appear_on_a_type_parameter_of_a_class_interface_or_type_alias_1274","'{0}' modifier can only appear on a type parameter of a class, interface or type alias"),accessor_modifier_can_only_appear_on_a_property_declaration:u(1275,1,"accessor_modifier_can_only_appear_on_a_property_declaration_1275","'accessor' modifier can only appear on a property declaration."),An_accessor_property_cannot_be_declared_optional:u(1276,1,"An_accessor_property_cannot_be_declared_optional_1276","An 'accessor' property cannot be declared optional."),_0_modifier_can_only_appear_on_a_type_parameter_of_a_function_method_or_class:u(1277,1,"_0_modifier_can_only_appear_on_a_type_parameter_of_a_function_method_or_class_1277","'{0}' modifier can only appear on a type parameter of a function, method or class"),The_runtime_will_invoke_the_decorator_with_1_arguments_but_the_decorator_expects_0:u(1278,1,"The_runtime_will_invoke_the_decorator_with_1_arguments_but_the_decorator_expects_0_1278","The runtime will invoke the decorator with {1} arguments, but the decorator expects {0}."),The_runtime_will_invoke_the_decorator_with_1_arguments_but_the_decorator_expects_at_least_0:u(1279,1,"The_runtime_will_invoke_the_decorator_with_1_arguments_but_the_decorator_expects_at_least_0_1279","The runtime will invoke the decorator with {1} arguments, but the decorator expects at least {0}."),Namespaces_are_not_allowed_in_global_script_files_when_0_is_enabled_If_this_file_is_not_intended_to_be_a_global_script_set_moduleDetection_to_force_or_add_an_empty_export_statement:u(1280,1,"Namespaces_are_not_allowed_in_global_script_files_when_0_is_enabled_If_this_file_is_not_intended_to__1280","Namespaces are not allowed in global script files when '{0}' is enabled. If this file is not intended to be a global script, set 'moduleDetection' to 'force' or add an empty 'export {}' statement."),Cannot_access_0_from_another_file_without_qualification_when_1_is_enabled_Use_2_instead:u(1281,1,"Cannot_access_0_from_another_file_without_qualification_when_1_is_enabled_Use_2_instead_1281","Cannot access '{0}' from another file without qualification when '{1}' is enabled. Use '{2}' instead."),An_export_declaration_must_reference_a_value_when_verbatimModuleSyntax_is_enabled_but_0_only_refers_to_a_type:u(1282,1,"An_export_declaration_must_reference_a_value_when_verbatimModuleSyntax_is_enabled_but_0_only_refers__1282","An 'export =' declaration must reference a value when 'verbatimModuleSyntax' is enabled, but '{0}' only refers to a type."),An_export_declaration_must_reference_a_real_value_when_verbatimModuleSyntax_is_enabled_but_0_resolves_to_a_type_only_declaration:u(1283,1,"An_export_declaration_must_reference_a_real_value_when_verbatimModuleSyntax_is_enabled_but_0_resolve_1283","An 'export =' declaration must reference a real value when 'verbatimModuleSyntax' is enabled, but '{0}' resolves to a type-only declaration."),An_export_default_must_reference_a_value_when_verbatimModuleSyntax_is_enabled_but_0_only_refers_to_a_type:u(1284,1,"An_export_default_must_reference_a_value_when_verbatimModuleSyntax_is_enabled_but_0_only_refers_to_a_1284","An 'export default' must reference a value when 'verbatimModuleSyntax' is enabled, but '{0}' only refers to a type."),An_export_default_must_reference_a_real_value_when_verbatimModuleSyntax_is_enabled_but_0_resolves_to_a_type_only_declaration:u(1285,1,"An_export_default_must_reference_a_real_value_when_verbatimModuleSyntax_is_enabled_but_0_resolves_to_1285","An 'export default' must reference a real value when 'verbatimModuleSyntax' is enabled, but '{0}' resolves to a type-only declaration."),ECMAScript_imports_and_exports_cannot_be_written_in_a_CommonJS_file_under_verbatimModuleSyntax:u(1286,1,"ECMAScript_imports_and_exports_cannot_be_written_in_a_CommonJS_file_under_verbatimModuleSyntax_1286","ECMAScript imports and exports cannot be written in a CommonJS file under 'verbatimModuleSyntax'."),A_top_level_export_modifier_cannot_be_used_on_value_declarations_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled:u(1287,1,"A_top_level_export_modifier_cannot_be_used_on_value_declarations_in_a_CommonJS_module_when_verbatimM_1287","A top-level 'export' modifier cannot be used on value declarations in a CommonJS module when 'verbatimModuleSyntax' is enabled."),An_import_alias_cannot_resolve_to_a_type_or_type_only_declaration_when_verbatimModuleSyntax_is_enabled:u(1288,1,"An_import_alias_cannot_resolve_to_a_type_or_type_only_declaration_when_verbatimModuleSyntax_is_enabl_1288","An import alias cannot resolve to a type or type-only declaration when 'verbatimModuleSyntax' is enabled."),_0_resolves_to_a_type_only_declaration_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enabled_Consider_using_import_type_where_0_is_imported:u(1289,1,"_0_resolves_to_a_type_only_declaration_and_must_be_marked_type_only_in_this_file_before_re_exporting_1289","'{0}' resolves to a type-only declaration and must be marked type-only in this file before re-exporting when '{1}' is enabled. Consider using 'import type' where '{0}' is imported."),_0_resolves_to_a_type_only_declaration_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enabled_Consider_using_export_type_0_as_default:u(1290,1,"_0_resolves_to_a_type_only_declaration_and_must_be_marked_type_only_in_this_file_before_re_exporting_1290","'{0}' resolves to a type-only declaration and must be marked type-only in this file before re-exporting when '{1}' is enabled. Consider using 'export type { {0} as default }'."),_0_resolves_to_a_type_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enabled_Consider_using_import_type_where_0_is_imported:u(1291,1,"_0_resolves_to_a_type_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enable_1291","'{0}' resolves to a type and must be marked type-only in this file before re-exporting when '{1}' is enabled. Consider using 'import type' where '{0}' is imported."),_0_resolves_to_a_type_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enabled_Consider_using_export_type_0_as_default:u(1292,1,"_0_resolves_to_a_type_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enable_1292","'{0}' resolves to a type and must be marked type-only in this file before re-exporting when '{1}' is enabled. Consider using 'export type { {0} as default }'."),ECMAScript_module_syntax_is_not_allowed_in_a_CommonJS_module_when_module_is_set_to_preserve:u(1293,1,"ECMAScript_module_syntax_is_not_allowed_in_a_CommonJS_module_when_module_is_set_to_preserve_1293","ECMAScript module syntax is not allowed in a CommonJS module when 'module' is set to 'preserve'."),This_syntax_is_not_allowed_when_erasableSyntaxOnly_is_enabled:u(1294,1,"This_syntax_is_not_allowed_when_erasableSyntaxOnly_is_enabled_1294","This syntax is not allowed when 'erasableSyntaxOnly' is enabled."),ECMAScript_imports_and_exports_cannot_be_written_in_a_CommonJS_file_under_verbatimModuleSyntax_Adjust_the_type_field_in_the_nearest_package_json_to_make_this_file_an_ECMAScript_module_or_adjust_your_verbatimModuleSyntax_module_and_moduleResolution_settings_in_TypeScript:u(1295,1,"ECMAScript_imports_and_exports_cannot_be_written_in_a_CommonJS_file_under_verbatimModuleSyntax_Adjus_1295","ECMAScript imports and exports cannot be written in a CommonJS file under 'verbatimModuleSyntax'. Adjust the 'type' field in the nearest 'package.json' to make this file an ECMAScript module, or adjust your 'verbatimModuleSyntax', 'module', and 'moduleResolution' settings in TypeScript."),with_statements_are_not_allowed_in_an_async_function_block:u(1300,1,"with_statements_are_not_allowed_in_an_async_function_block_1300","'with' statements are not allowed in an async function block."),await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules:u(1308,1,"await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules_1308","'await' expressions are only allowed within async functions and at the top levels of modules."),The_current_file_is_a_CommonJS_module_and_cannot_use_await_at_the_top_level:u(1309,1,"The_current_file_is_a_CommonJS_module_and_cannot_use_await_at_the_top_level_1309","The current file is a CommonJS module and cannot use 'await' at the top level."),Did_you_mean_to_use_a_Colon_An_can_only_follow_a_property_name_when_the_containing_object_literal_is_part_of_a_destructuring_pattern:u(1312,1,"Did_you_mean_to_use_a_Colon_An_can_only_follow_a_property_name_when_the_containing_object_literal_is_1312","Did you mean to use a ':'? An '=' can only follow a property name when the containing object literal is part of a destructuring pattern."),The_body_of_an_if_statement_cannot_be_the_empty_statement:u(1313,1,"The_body_of_an_if_statement_cannot_be_the_empty_statement_1313","The body of an 'if' statement cannot be the empty statement."),Global_module_exports_may_only_appear_in_module_files:u(1314,1,"Global_module_exports_may_only_appear_in_module_files_1314","Global module exports may only appear in module files."),Global_module_exports_may_only_appear_in_declaration_files:u(1315,1,"Global_module_exports_may_only_appear_in_declaration_files_1315","Global module exports may only appear in declaration files."),Global_module_exports_may_only_appear_at_top_level:u(1316,1,"Global_module_exports_may_only_appear_at_top_level_1316","Global module exports may only appear at top level."),A_parameter_property_cannot_be_declared_using_a_rest_parameter:u(1317,1,"A_parameter_property_cannot_be_declared_using_a_rest_parameter_1317","A parameter property cannot be declared using a rest parameter."),An_abstract_accessor_cannot_have_an_implementation:u(1318,1,"An_abstract_accessor_cannot_have_an_implementation_1318","An abstract accessor cannot have an implementation."),A_default_export_can_only_be_used_in_an_ECMAScript_style_module:u(1319,1,"A_default_export_can_only_be_used_in_an_ECMAScript_style_module_1319","A default export can only be used in an ECMAScript-style module."),Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member:u(1320,1,"Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member_1320","Type of 'await' operand must either be a valid promise or must not contain a callable 'then' member."),Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member:u(1321,1,"Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_cal_1321","Type of 'yield' operand in an async generator must either be a valid promise or must not contain a callable 'then' member."),Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member:u(1322,1,"Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_con_1322","Type of iterated elements of a 'yield*' operand must either be a valid promise or must not contain a callable 'then' member."),Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_es2020_es2022_esnext_commonjs_amd_system_umd_node16_node18_node20_or_nodenext:u(1323,1,"Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_es2020_es2022_esnext_commonjs_amd__1323","Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', 'node18', 'node20', or 'nodenext'."),Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_node16_node18_node20_nodenext_or_preserve:u(1324,1,"Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_node16_node18_1324","Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', 'node18', 'node20', 'nodenext', or 'preserve'."),Argument_of_dynamic_import_cannot_be_spread_element:u(1325,1,"Argument_of_dynamic_import_cannot_be_spread_element_1325","Argument of dynamic import cannot be spread element."),This_use_of_import_is_invalid_import_calls_can_be_written_but_they_must_have_parentheses_and_cannot_have_type_arguments:u(1326,1,"This_use_of_import_is_invalid_import_calls_can_be_written_but_they_must_have_parentheses_and_cannot__1326","This use of 'import' is invalid. 'import()' calls can be written, but they must have parentheses and cannot have type arguments."),String_literal_with_double_quotes_expected:u(1327,1,"String_literal_with_double_quotes_expected_1327","String literal with double quotes expected."),Property_value_can_only_be_string_literal_numeric_literal_true_false_null_object_literal_or_array_literal:u(1328,1,"Property_value_can_only_be_string_literal_numeric_literal_true_false_null_object_literal_or_array_li_1328","Property value can only be string literal, numeric literal, 'true', 'false', 'null', object literal or array literal."),_0_accepts_too_few_arguments_to_be_used_as_a_decorator_here_Did_you_mean_to_call_it_first_and_write_0:u(1329,1,"_0_accepts_too_few_arguments_to_be_used_as_a_decorator_here_Did_you_mean_to_call_it_first_and_write__1329","'{0}' accepts too few arguments to be used as a decorator here. Did you mean to call it first and write '@{0}()'?"),A_property_of_an_interface_or_type_literal_whose_type_is_a_unique_symbol_type_must_be_readonly:u(1330,1,"A_property_of_an_interface_or_type_literal_whose_type_is_a_unique_symbol_type_must_be_readonly_1330","A property of an interface or type literal whose type is a 'unique symbol' type must be 'readonly'."),A_property_of_a_class_whose_type_is_a_unique_symbol_type_must_be_both_static_and_readonly:u(1331,1,"A_property_of_a_class_whose_type_is_a_unique_symbol_type_must_be_both_static_and_readonly_1331","A property of a class whose type is a 'unique symbol' type must be both 'static' and 'readonly'."),A_variable_whose_type_is_a_unique_symbol_type_must_be_const:u(1332,1,"A_variable_whose_type_is_a_unique_symbol_type_must_be_const_1332","A variable whose type is a 'unique symbol' type must be 'const'."),unique_symbol_types_may_not_be_used_on_a_variable_declaration_with_a_binding_name:u(1333,1,"unique_symbol_types_may_not_be_used_on_a_variable_declaration_with_a_binding_name_1333","'unique symbol' types may not be used on a variable declaration with a binding name."),unique_symbol_types_are_only_allowed_on_variables_in_a_variable_statement:u(1334,1,"unique_symbol_types_are_only_allowed_on_variables_in_a_variable_statement_1334","'unique symbol' types are only allowed on variables in a variable statement."),unique_symbol_types_are_not_allowed_here:u(1335,1,"unique_symbol_types_are_not_allowed_here_1335","'unique symbol' types are not allowed here."),An_index_signature_parameter_type_cannot_be_a_literal_type_or_generic_type_Consider_using_a_mapped_object_type_instead:u(1337,1,"An_index_signature_parameter_type_cannot_be_a_literal_type_or_generic_type_Consider_using_a_mapped_o_1337","An index signature parameter type cannot be a literal type or generic type. Consider using a mapped object type instead."),infer_declarations_are_only_permitted_in_the_extends_clause_of_a_conditional_type:u(1338,1,"infer_declarations_are_only_permitted_in_the_extends_clause_of_a_conditional_type_1338","'infer' declarations are only permitted in the 'extends' clause of a conditional type."),Module_0_does_not_refer_to_a_value_but_is_used_as_a_value_here:u(1339,1,"Module_0_does_not_refer_to_a_value_but_is_used_as_a_value_here_1339","Module '{0}' does not refer to a value, but is used as a value here."),Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_Did_you_mean_typeof_import_0:u(1340,1,"Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_Did_you_mean_typeof_import_0_1340","Module '{0}' does not refer to a type, but is used as a type here. Did you mean 'typeof import('{0}')'?"),Class_constructor_may_not_be_an_accessor:u(1341,1,"Class_constructor_may_not_be_an_accessor_1341","Class constructor may not be an accessor."),The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_es2022_esnext_system_node16_node18_node20_or_nodenext:u(1343,1,"The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_es2022_esnext_system__1343","The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', or 'nodenext'."),A_label_is_not_allowed_here:u(1344,1,"A_label_is_not_allowed_here_1344","'A label is not allowed here."),An_expression_of_type_void_cannot_be_tested_for_truthiness:u(1345,1,"An_expression_of_type_void_cannot_be_tested_for_truthiness_1345","An expression of type 'void' cannot be tested for truthiness."),This_parameter_is_not_allowed_with_use_strict_directive:u(1346,1,"This_parameter_is_not_allowed_with_use_strict_directive_1346","This parameter is not allowed with 'use strict' directive."),use_strict_directive_cannot_be_used_with_non_simple_parameter_list:u(1347,1,"use_strict_directive_cannot_be_used_with_non_simple_parameter_list_1347","'use strict' directive cannot be used with non-simple parameter list."),Non_simple_parameter_declared_here:u(1348,1,"Non_simple_parameter_declared_here_1348","Non-simple parameter declared here."),use_strict_directive_used_here:u(1349,1,"use_strict_directive_used_here_1349","'use strict' directive used here."),Print_the_final_configuration_instead_of_building:u(1350,3,"Print_the_final_configuration_instead_of_building_1350","Print the final configuration instead of building."),An_identifier_or_keyword_cannot_immediately_follow_a_numeric_literal:u(1351,1,"An_identifier_or_keyword_cannot_immediately_follow_a_numeric_literal_1351","An identifier or keyword cannot immediately follow a numeric literal."),A_bigint_literal_cannot_use_exponential_notation:u(1352,1,"A_bigint_literal_cannot_use_exponential_notation_1352","A bigint literal cannot use exponential notation."),A_bigint_literal_must_be_an_integer:u(1353,1,"A_bigint_literal_must_be_an_integer_1353","A bigint literal must be an integer."),readonly_type_modifier_is_only_permitted_on_array_and_tuple_literal_types:u(1354,1,"readonly_type_modifier_is_only_permitted_on_array_and_tuple_literal_types_1354","'readonly' type modifier is only permitted on array and tuple literal types."),A_const_assertions_can_only_be_applied_to_references_to_enum_members_or_string_number_boolean_array_or_object_literals:u(1355,1,"A_const_assertions_can_only_be_applied_to_references_to_enum_members_or_string_number_boolean_array__1355","A 'const' assertions can only be applied to references to enum members, or string, number, boolean, array, or object literals."),Did_you_mean_to_mark_this_function_as_async:u(1356,1,"Did_you_mean_to_mark_this_function_as_async_1356","Did you mean to mark this function as 'async'?"),An_enum_member_name_must_be_followed_by_a_or:u(1357,1,"An_enum_member_name_must_be_followed_by_a_or_1357","An enum member name must be followed by a ',', '=', or '}'."),Tagged_template_expressions_are_not_permitted_in_an_optional_chain:u(1358,1,"Tagged_template_expressions_are_not_permitted_in_an_optional_chain_1358","Tagged template expressions are not permitted in an optional chain."),Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here:u(1359,1,"Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here_1359","Identifier expected. '{0}' is a reserved word that cannot be used here."),Type_0_does_not_satisfy_the_expected_type_1:u(1360,1,"Type_0_does_not_satisfy_the_expected_type_1_1360","Type '{0}' does not satisfy the expected type '{1}'."),_0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type:u(1361,1,"_0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type_1361","'{0}' cannot be used as a value because it was imported using 'import type'."),_0_cannot_be_used_as_a_value_because_it_was_exported_using_export_type:u(1362,1,"_0_cannot_be_used_as_a_value_because_it_was_exported_using_export_type_1362","'{0}' cannot be used as a value because it was exported using 'export type'."),A_type_only_import_can_specify_a_default_import_or_named_bindings_but_not_both:u(1363,1,"A_type_only_import_can_specify_a_default_import_or_named_bindings_but_not_both_1363","A type-only import can specify a default import or named bindings, but not both."),Convert_to_type_only_export:u(1364,3,"Convert_to_type_only_export_1364","Convert to type-only export"),Convert_all_re_exported_types_to_type_only_exports:u(1365,3,"Convert_all_re_exported_types_to_type_only_exports_1365","Convert all re-exported types to type-only exports"),Split_into_two_separate_import_declarations:u(1366,3,"Split_into_two_separate_import_declarations_1366","Split into two separate import declarations"),Split_all_invalid_type_only_imports:u(1367,3,"Split_all_invalid_type_only_imports_1367","Split all invalid type-only imports"),Class_constructor_may_not_be_a_generator:u(1368,1,"Class_constructor_may_not_be_a_generator_1368","Class constructor may not be a generator."),Did_you_mean_0:u(1369,3,"Did_you_mean_0_1369","Did you mean '{0}'?"),await_expressions_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module:u(1375,1,"await_expressions_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_fi_1375","'await' expressions are only allowed at the top level of a file when that file is a module, but this file has no imports or exports. Consider adding an empty 'export {}' to make this file a module."),_0_was_imported_here:u(1376,3,"_0_was_imported_here_1376","'{0}' was imported here."),_0_was_exported_here:u(1377,3,"_0_was_exported_here_1377","'{0}' was exported here."),Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_node18_node20_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher:u(1378,1,"Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_n_1378","Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher."),An_import_alias_cannot_reference_a_declaration_that_was_exported_using_export_type:u(1379,1,"An_import_alias_cannot_reference_a_declaration_that_was_exported_using_export_type_1379","An import alias cannot reference a declaration that was exported using 'export type'."),An_import_alias_cannot_reference_a_declaration_that_was_imported_using_import_type:u(1380,1,"An_import_alias_cannot_reference_a_declaration_that_was_imported_using_import_type_1380","An import alias cannot reference a declaration that was imported using 'import type'."),Unexpected_token_Did_you_mean_or_rbrace:u(1381,1,"Unexpected_token_Did_you_mean_or_rbrace_1381","Unexpected token. Did you mean `{'}'}` or `}`?"),Unexpected_token_Did_you_mean_or_gt:u(1382,1,"Unexpected_token_Did_you_mean_or_gt_1382","Unexpected token. Did you mean `{'>'}` or `>`?"),Function_type_notation_must_be_parenthesized_when_used_in_a_union_type:u(1385,1,"Function_type_notation_must_be_parenthesized_when_used_in_a_union_type_1385","Function type notation must be parenthesized when used in a union type."),Constructor_type_notation_must_be_parenthesized_when_used_in_a_union_type:u(1386,1,"Constructor_type_notation_must_be_parenthesized_when_used_in_a_union_type_1386","Constructor type notation must be parenthesized when used in a union type."),Function_type_notation_must_be_parenthesized_when_used_in_an_intersection_type:u(1387,1,"Function_type_notation_must_be_parenthesized_when_used_in_an_intersection_type_1387","Function type notation must be parenthesized when used in an intersection type."),Constructor_type_notation_must_be_parenthesized_when_used_in_an_intersection_type:u(1388,1,"Constructor_type_notation_must_be_parenthesized_when_used_in_an_intersection_type_1388","Constructor type notation must be parenthesized when used in an intersection type."),_0_is_not_allowed_as_a_variable_declaration_name:u(1389,1,"_0_is_not_allowed_as_a_variable_declaration_name_1389","'{0}' is not allowed as a variable declaration name."),_0_is_not_allowed_as_a_parameter_name:u(1390,1,"_0_is_not_allowed_as_a_parameter_name_1390","'{0}' is not allowed as a parameter name."),An_import_alias_cannot_use_import_type:u(1392,1,"An_import_alias_cannot_use_import_type_1392","An import alias cannot use 'import type'"),Imported_via_0_from_file_1:u(1393,3,"Imported_via_0_from_file_1_1393","Imported via {0} from file '{1}'"),Imported_via_0_from_file_1_with_packageId_2:u(1394,3,"Imported_via_0_from_file_1_with_packageId_2_1394","Imported via {0} from file '{1}' with packageId '{2}'"),Imported_via_0_from_file_1_to_import_importHelpers_as_specified_in_compilerOptions:u(1395,3,"Imported_via_0_from_file_1_to_import_importHelpers_as_specified_in_compilerOptions_1395","Imported via {0} from file '{1}' to import 'importHelpers' as specified in compilerOptions"),Imported_via_0_from_file_1_with_packageId_2_to_import_importHelpers_as_specified_in_compilerOptions:u(1396,3,"Imported_via_0_from_file_1_with_packageId_2_to_import_importHelpers_as_specified_in_compilerOptions_1396","Imported via {0} from file '{1}' with packageId '{2}' to import 'importHelpers' as specified in compilerOptions"),Imported_via_0_from_file_1_to_import_jsx_and_jsxs_factory_functions:u(1397,3,"Imported_via_0_from_file_1_to_import_jsx_and_jsxs_factory_functions_1397","Imported via {0} from file '{1}' to import 'jsx' and 'jsxs' factory functions"),Imported_via_0_from_file_1_with_packageId_2_to_import_jsx_and_jsxs_factory_functions:u(1398,3,"Imported_via_0_from_file_1_with_packageId_2_to_import_jsx_and_jsxs_factory_functions_1398","Imported via {0} from file '{1}' with packageId '{2}' to import 'jsx' and 'jsxs' factory functions"),File_is_included_via_import_here:u(1399,3,"File_is_included_via_import_here_1399","File is included via import here."),Referenced_via_0_from_file_1:u(1400,3,"Referenced_via_0_from_file_1_1400","Referenced via '{0}' from file '{1}'"),File_is_included_via_reference_here:u(1401,3,"File_is_included_via_reference_here_1401","File is included via reference here."),Type_library_referenced_via_0_from_file_1:u(1402,3,"Type_library_referenced_via_0_from_file_1_1402","Type library referenced via '{0}' from file '{1}'"),Type_library_referenced_via_0_from_file_1_with_packageId_2:u(1403,3,"Type_library_referenced_via_0_from_file_1_with_packageId_2_1403","Type library referenced via '{0}' from file '{1}' with packageId '{2}'"),File_is_included_via_type_library_reference_here:u(1404,3,"File_is_included_via_type_library_reference_here_1404","File is included via type library reference here."),Library_referenced_via_0_from_file_1:u(1405,3,"Library_referenced_via_0_from_file_1_1405","Library referenced via '{0}' from file '{1}'"),File_is_included_via_library_reference_here:u(1406,3,"File_is_included_via_library_reference_here_1406","File is included via library reference here."),Matched_by_include_pattern_0_in_1:u(1407,3,"Matched_by_include_pattern_0_in_1_1407","Matched by include pattern '{0}' in '{1}'"),File_is_matched_by_include_pattern_specified_here:u(1408,3,"File_is_matched_by_include_pattern_specified_here_1408","File is matched by include pattern specified here."),Part_of_files_list_in_tsconfig_json:u(1409,3,"Part_of_files_list_in_tsconfig_json_1409","Part of 'files' list in tsconfig.json"),File_is_matched_by_files_list_specified_here:u(1410,3,"File_is_matched_by_files_list_specified_here_1410","File is matched by 'files' list specified here."),Output_from_referenced_project_0_included_because_1_specified:u(1411,3,"Output_from_referenced_project_0_included_because_1_specified_1411","Output from referenced project '{0}' included because '{1}' specified"),Output_from_referenced_project_0_included_because_module_is_specified_as_none:u(1412,3,"Output_from_referenced_project_0_included_because_module_is_specified_as_none_1412","Output from referenced project '{0}' included because '--module' is specified as 'none'"),File_is_output_from_referenced_project_specified_here:u(1413,3,"File_is_output_from_referenced_project_specified_here_1413","File is output from referenced project specified here."),Source_from_referenced_project_0_included_because_1_specified:u(1414,3,"Source_from_referenced_project_0_included_because_1_specified_1414","Source from referenced project '{0}' included because '{1}' specified"),Source_from_referenced_project_0_included_because_module_is_specified_as_none:u(1415,3,"Source_from_referenced_project_0_included_because_module_is_specified_as_none_1415","Source from referenced project '{0}' included because '--module' is specified as 'none'"),File_is_source_from_referenced_project_specified_here:u(1416,3,"File_is_source_from_referenced_project_specified_here_1416","File is source from referenced project specified here."),Entry_point_of_type_library_0_specified_in_compilerOptions:u(1417,3,"Entry_point_of_type_library_0_specified_in_compilerOptions_1417","Entry point of type library '{0}' specified in compilerOptions"),Entry_point_of_type_library_0_specified_in_compilerOptions_with_packageId_1:u(1418,3,"Entry_point_of_type_library_0_specified_in_compilerOptions_with_packageId_1_1418","Entry point of type library '{0}' specified in compilerOptions with packageId '{1}'"),File_is_entry_point_of_type_library_specified_here:u(1419,3,"File_is_entry_point_of_type_library_specified_here_1419","File is entry point of type library specified here."),Entry_point_for_implicit_type_library_0:u(1420,3,"Entry_point_for_implicit_type_library_0_1420","Entry point for implicit type library '{0}'"),Entry_point_for_implicit_type_library_0_with_packageId_1:u(1421,3,"Entry_point_for_implicit_type_library_0_with_packageId_1_1421","Entry point for implicit type library '{0}' with packageId '{1}'"),Library_0_specified_in_compilerOptions:u(1422,3,"Library_0_specified_in_compilerOptions_1422","Library '{0}' specified in compilerOptions"),File_is_library_specified_here:u(1423,3,"File_is_library_specified_here_1423","File is library specified here."),Default_library:u(1424,3,"Default_library_1424","Default library"),Default_library_for_target_0:u(1425,3,"Default_library_for_target_0_1425","Default library for target '{0}'"),File_is_default_library_for_target_specified_here:u(1426,3,"File_is_default_library_for_target_specified_here_1426","File is default library for target specified here."),Root_file_specified_for_compilation:u(1427,3,"Root_file_specified_for_compilation_1427","Root file specified for compilation"),File_is_output_of_project_reference_source_0:u(1428,3,"File_is_output_of_project_reference_source_0_1428","File is output of project reference source '{0}'"),File_redirects_to_file_0:u(1429,3,"File_redirects_to_file_0_1429","File redirects to file '{0}'"),The_file_is_in_the_program_because_Colon:u(1430,3,"The_file_is_in_the_program_because_Colon_1430","The file is in the program because:"),for_await_loops_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module:u(1431,1,"for_await_loops_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_1431","'for await' loops are only allowed at the top level of a file when that file is a module, but this file has no imports or exports. Consider adding an empty 'export {}' to make this file a module."),Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_node18_node20_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher:u(1432,1,"Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_nod_1432","Top-level 'for await' loops are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher."),Neither_decorators_nor_modifiers_may_be_applied_to_this_parameters:u(1433,1,"Neither_decorators_nor_modifiers_may_be_applied_to_this_parameters_1433","Neither decorators nor modifiers may be applied to 'this' parameters."),Unexpected_keyword_or_identifier:u(1434,1,"Unexpected_keyword_or_identifier_1434","Unexpected keyword or identifier."),Unknown_keyword_or_identifier_Did_you_mean_0:u(1435,1,"Unknown_keyword_or_identifier_Did_you_mean_0_1435","Unknown keyword or identifier. Did you mean '{0}'?"),Decorators_must_precede_the_name_and_all_keywords_of_property_declarations:u(1436,1,"Decorators_must_precede_the_name_and_all_keywords_of_property_declarations_1436","Decorators must precede the name and all keywords of property declarations."),Namespace_must_be_given_a_name:u(1437,1,"Namespace_must_be_given_a_name_1437","Namespace must be given a name."),Interface_must_be_given_a_name:u(1438,1,"Interface_must_be_given_a_name_1438","Interface must be given a name."),Type_alias_must_be_given_a_name:u(1439,1,"Type_alias_must_be_given_a_name_1439","Type alias must be given a name."),Variable_declaration_not_allowed_at_this_location:u(1440,1,"Variable_declaration_not_allowed_at_this_location_1440","Variable declaration not allowed at this location."),Cannot_start_a_function_call_in_a_type_annotation:u(1441,1,"Cannot_start_a_function_call_in_a_type_annotation_1441","Cannot start a function call in a type annotation."),Expected_for_property_initializer:u(1442,1,"Expected_for_property_initializer_1442","Expected '=' for property initializer."),Module_declaration_names_may_only_use_or_quoted_strings:u(1443,1,"Module_declaration_names_may_only_use_or_quoted_strings_1443",`Module declaration names may only use ' or " quoted strings.`),_0_resolves_to_a_type_only_declaration_and_must_be_re_exported_using_a_type_only_re_export_when_1_is_enabled:u(1448,1,"_0_resolves_to_a_type_only_declaration_and_must_be_re_exported_using_a_type_only_re_export_when_1_is_1448","'{0}' resolves to a type-only declaration and must be re-exported using a type-only re-export when '{1}' is enabled."),Preserve_unused_imported_values_in_the_JavaScript_output_that_would_otherwise_be_removed:u(1449,3,"Preserve_unused_imported_values_in_the_JavaScript_output_that_would_otherwise_be_removed_1449","Preserve unused imported values in the JavaScript output that would otherwise be removed."),Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_set_of_attributes_as_arguments:u(1450,3,"Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_set_of_attributes_as_arguments_1450","Dynamic imports can only accept a module specifier and an optional set of attributes as arguments"),Private_identifiers_are_only_allowed_in_class_bodies_and_may_only_be_used_as_part_of_a_class_member_declaration_property_access_or_on_the_left_hand_side_of_an_in_expression:u(1451,1,"Private_identifiers_are_only_allowed_in_class_bodies_and_may_only_be_used_as_part_of_a_class_member__1451","Private identifiers are only allowed in class bodies and may only be used as part of a class member declaration, property access, or on the left-hand-side of an 'in' expression"),resolution_mode_should_be_either_require_or_import:u(1453,1,"resolution_mode_should_be_either_require_or_import_1453","`resolution-mode` should be either `require` or `import`."),resolution_mode_can_only_be_set_for_type_only_imports:u(1454,1,"resolution_mode_can_only_be_set_for_type_only_imports_1454","`resolution-mode` can only be set for type-only imports."),resolution_mode_is_the_only_valid_key_for_type_import_assertions:u(1455,1,"resolution_mode_is_the_only_valid_key_for_type_import_assertions_1455","`resolution-mode` is the only valid key for type import assertions."),Type_import_assertions_should_have_exactly_one_key_resolution_mode_with_value_import_or_require:u(1456,1,"Type_import_assertions_should_have_exactly_one_key_resolution_mode_with_value_import_or_require_1456","Type import assertions should have exactly one key - `resolution-mode` - with value `import` or `require`."),Matched_by_default_include_pattern_Asterisk_Asterisk_Slash_Asterisk:u(1457,3,"Matched_by_default_include_pattern_Asterisk_Asterisk_Slash_Asterisk_1457","Matched by default include pattern '**/*'"),File_is_ECMAScript_module_because_0_has_field_type_with_value_module:u(1458,3,"File_is_ECMAScript_module_because_0_has_field_type_with_value_module_1458",`File is ECMAScript module because '{0}' has field "type" with value "module"`),File_is_CommonJS_module_because_0_has_field_type_whose_value_is_not_module:u(1459,3,"File_is_CommonJS_module_because_0_has_field_type_whose_value_is_not_module_1459",`File is CommonJS module because '{0}' has field "type" whose value is not "module"`),File_is_CommonJS_module_because_0_does_not_have_field_type:u(1460,3,"File_is_CommonJS_module_because_0_does_not_have_field_type_1460",`File is CommonJS module because '{0}' does not have field "type"`),File_is_CommonJS_module_because_package_json_was_not_found:u(1461,3,"File_is_CommonJS_module_because_package_json_was_not_found_1461","File is CommonJS module because 'package.json' was not found"),resolution_mode_is_the_only_valid_key_for_type_import_attributes:u(1463,1,"resolution_mode_is_the_only_valid_key_for_type_import_attributes_1463","'resolution-mode' is the only valid key for type import attributes."),Type_import_attributes_should_have_exactly_one_key_resolution_mode_with_value_import_or_require:u(1464,1,"Type_import_attributes_should_have_exactly_one_key_resolution_mode_with_value_import_or_require_1464","Type import attributes should have exactly one key - 'resolution-mode' - with value 'import' or 'require'."),The_import_meta_meta_property_is_not_allowed_in_files_which_will_build_into_CommonJS_output:u(1470,1,"The_import_meta_meta_property_is_not_allowed_in_files_which_will_build_into_CommonJS_output_1470","The 'import.meta' meta-property is not allowed in files which will build into CommonJS output."),Module_0_cannot_be_imported_using_this_construct_The_specifier_only_resolves_to_an_ES_module_which_cannot_be_imported_with_require_Use_an_ECMAScript_import_instead:u(1471,1,"Module_0_cannot_be_imported_using_this_construct_The_specifier_only_resolves_to_an_ES_module_which_c_1471","Module '{0}' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead."),catch_or_finally_expected:u(1472,1,"catch_or_finally_expected_1472","'catch' or 'finally' expected."),An_import_declaration_can_only_be_used_at_the_top_level_of_a_module:u(1473,1,"An_import_declaration_can_only_be_used_at_the_top_level_of_a_module_1473","An import declaration can only be used at the top level of a module."),An_export_declaration_can_only_be_used_at_the_top_level_of_a_module:u(1474,1,"An_export_declaration_can_only_be_used_at_the_top_level_of_a_module_1474","An export declaration can only be used at the top level of a module."),Control_what_method_is_used_to_detect_module_format_JS_files:u(1475,3,"Control_what_method_is_used_to_detect_module_format_JS_files_1475","Control what method is used to detect module-format JS files."),auto_Colon_Treat_files_with_imports_exports_import_meta_jsx_with_jsx_Colon_react_jsx_or_esm_format_with_module_Colon_node16_as_modules:u(1476,3,"auto_Colon_Treat_files_with_imports_exports_import_meta_jsx_with_jsx_Colon_react_jsx_or_esm_format_w_1476",'"auto": Treat files with imports, exports, import.meta, jsx (with jsx: react-jsx), or esm format (with module: node16+) as modules.'),An_instantiation_expression_cannot_be_followed_by_a_property_access:u(1477,1,"An_instantiation_expression_cannot_be_followed_by_a_property_access_1477","An instantiation expression cannot be followed by a property access."),Identifier_or_string_literal_expected:u(1478,1,"Identifier_or_string_literal_expected_1478","Identifier or string literal expected."),The_current_file_is_a_CommonJS_module_whose_imports_will_produce_require_calls_however_the_referenced_file_is_an_ECMAScript_module_and_cannot_be_imported_with_require_Consider_writing_a_dynamic_import_0_call_instead:u(1479,1,"The_current_file_is_a_CommonJS_module_whose_imports_will_produce_require_calls_however_the_reference_1479",`The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("{0}")' call instead.`),To_convert_this_file_to_an_ECMAScript_module_change_its_file_extension_to_0_or_create_a_local_package_json_file_with_type_Colon_module:u(1480,3,"To_convert_this_file_to_an_ECMAScript_module_change_its_file_extension_to_0_or_create_a_local_packag_1480",'To convert this file to an ECMAScript module, change its file extension to \'{0}\' or create a local package.json file with `{ "type": "module" }`.'),To_convert_this_file_to_an_ECMAScript_module_change_its_file_extension_to_0_or_add_the_field_type_Colon_module_to_1:u(1481,3,"To_convert_this_file_to_an_ECMAScript_module_change_its_file_extension_to_0_or_add_the_field_type_Co_1481",`To convert this file to an ECMAScript module, change its file extension to '{0}', or add the field \`"type": "module"\` to '{1}'.`),To_convert_this_file_to_an_ECMAScript_module_add_the_field_type_Colon_module_to_0:u(1482,3,"To_convert_this_file_to_an_ECMAScript_module_add_the_field_type_Colon_module_to_0_1482",'To convert this file to an ECMAScript module, add the field `"type": "module"` to \'{0}\'.'),To_convert_this_file_to_an_ECMAScript_module_create_a_local_package_json_file_with_type_Colon_module:u(1483,3,"To_convert_this_file_to_an_ECMAScript_module_create_a_local_package_json_file_with_type_Colon_module_1483",'To convert this file to an ECMAScript module, create a local package.json file with `{ "type": "module" }`.'),_0_is_a_type_and_must_be_imported_using_a_type_only_import_when_verbatimModuleSyntax_is_enabled:u(1484,1,"_0_is_a_type_and_must_be_imported_using_a_type_only_import_when_verbatimModuleSyntax_is_enabled_1484","'{0}' is a type and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled."),_0_resolves_to_a_type_only_declaration_and_must_be_imported_using_a_type_only_import_when_verbatimModuleSyntax_is_enabled:u(1485,1,"_0_resolves_to_a_type_only_declaration_and_must_be_imported_using_a_type_only_import_when_verbatimMo_1485","'{0}' resolves to a type-only declaration and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled."),Decorator_used_before_export_here:u(1486,1,"Decorator_used_before_export_here_1486","Decorator used before 'export' here."),Octal_escape_sequences_are_not_allowed_Use_the_syntax_0:u(1487,1,"Octal_escape_sequences_are_not_allowed_Use_the_syntax_0_1487","Octal escape sequences are not allowed. Use the syntax '{0}'."),Escape_sequence_0_is_not_allowed:u(1488,1,"Escape_sequence_0_is_not_allowed_1488","Escape sequence '{0}' is not allowed."),Decimals_with_leading_zeros_are_not_allowed:u(1489,1,"Decimals_with_leading_zeros_are_not_allowed_1489","Decimals with leading zeros are not allowed."),File_appears_to_be_binary:u(1490,1,"File_appears_to_be_binary_1490","File appears to be binary."),_0_modifier_cannot_appear_on_a_using_declaration:u(1491,1,"_0_modifier_cannot_appear_on_a_using_declaration_1491","'{0}' modifier cannot appear on a 'using' declaration."),_0_declarations_may_not_have_binding_patterns:u(1492,1,"_0_declarations_may_not_have_binding_patterns_1492","'{0}' declarations may not have binding patterns."),The_left_hand_side_of_a_for_in_statement_cannot_be_a_using_declaration:u(1493,1,"The_left_hand_side_of_a_for_in_statement_cannot_be_a_using_declaration_1493","The left-hand side of a 'for...in' statement cannot be a 'using' declaration."),The_left_hand_side_of_a_for_in_statement_cannot_be_an_await_using_declaration:u(1494,1,"The_left_hand_side_of_a_for_in_statement_cannot_be_an_await_using_declaration_1494","The left-hand side of a 'for...in' statement cannot be an 'await using' declaration."),_0_modifier_cannot_appear_on_an_await_using_declaration:u(1495,1,"_0_modifier_cannot_appear_on_an_await_using_declaration_1495","'{0}' modifier cannot appear on an 'await using' declaration."),Identifier_string_literal_or_number_literal_expected:u(1496,1,"Identifier_string_literal_or_number_literal_expected_1496","Identifier, string literal, or number literal expected."),Expression_must_be_enclosed_in_parentheses_to_be_used_as_a_decorator:u(1497,1,"Expression_must_be_enclosed_in_parentheses_to_be_used_as_a_decorator_1497","Expression must be enclosed in parentheses to be used as a decorator."),Invalid_syntax_in_decorator:u(1498,1,"Invalid_syntax_in_decorator_1498","Invalid syntax in decorator."),Unknown_regular_expression_flag:u(1499,1,"Unknown_regular_expression_flag_1499","Unknown regular expression flag."),Duplicate_regular_expression_flag:u(1500,1,"Duplicate_regular_expression_flag_1500","Duplicate regular expression flag."),This_regular_expression_flag_is_only_available_when_targeting_0_or_later:u(1501,1,"This_regular_expression_flag_is_only_available_when_targeting_0_or_later_1501","This regular expression flag is only available when targeting '{0}' or later."),The_Unicode_u_flag_and_the_Unicode_Sets_v_flag_cannot_be_set_simultaneously:u(1502,1,"The_Unicode_u_flag_and_the_Unicode_Sets_v_flag_cannot_be_set_simultaneously_1502","The Unicode (u) flag and the Unicode Sets (v) flag cannot be set simultaneously."),Named_capturing_groups_are_only_available_when_targeting_ES2018_or_later:u(1503,1,"Named_capturing_groups_are_only_available_when_targeting_ES2018_or_later_1503","Named capturing groups are only available when targeting 'ES2018' or later."),Subpattern_flags_must_be_present_when_there_is_a_minus_sign:u(1504,1,"Subpattern_flags_must_be_present_when_there_is_a_minus_sign_1504","Subpattern flags must be present when there is a minus sign."),Incomplete_quantifier_Digit_expected:u(1505,1,"Incomplete_quantifier_Digit_expected_1505","Incomplete quantifier. Digit expected."),Numbers_out_of_order_in_quantifier:u(1506,1,"Numbers_out_of_order_in_quantifier_1506","Numbers out of order in quantifier."),There_is_nothing_available_for_repetition:u(1507,1,"There_is_nothing_available_for_repetition_1507","There is nothing available for repetition."),Unexpected_0_Did_you_mean_to_escape_it_with_backslash:u(1508,1,"Unexpected_0_Did_you_mean_to_escape_it_with_backslash_1508","Unexpected '{0}'. Did you mean to escape it with backslash?"),This_regular_expression_flag_cannot_be_toggled_within_a_subpattern:u(1509,1,"This_regular_expression_flag_cannot_be_toggled_within_a_subpattern_1509","This regular expression flag cannot be toggled within a subpattern."),k_must_be_followed_by_a_capturing_group_name_enclosed_in_angle_brackets:u(1510,1,"k_must_be_followed_by_a_capturing_group_name_enclosed_in_angle_brackets_1510","'\\k' must be followed by a capturing group name enclosed in angle brackets."),q_is_only_available_inside_character_class:u(1511,1,"q_is_only_available_inside_character_class_1511","'\\q' is only available inside character class."),c_must_be_followed_by_an_ASCII_letter:u(1512,1,"c_must_be_followed_by_an_ASCII_letter_1512","'\\c' must be followed by an ASCII letter."),Undetermined_character_escape:u(1513,1,"Undetermined_character_escape_1513","Undetermined character escape."),Expected_a_capturing_group_name:u(1514,1,"Expected_a_capturing_group_name_1514","Expected a capturing group name."),Named_capturing_groups_with_the_same_name_must_be_mutually_exclusive_to_each_other:u(1515,1,"Named_capturing_groups_with_the_same_name_must_be_mutually_exclusive_to_each_other_1515","Named capturing groups with the same name must be mutually exclusive to each other."),A_character_class_range_must_not_be_bounded_by_another_character_class:u(1516,1,"A_character_class_range_must_not_be_bounded_by_another_character_class_1516","A character class range must not be bounded by another character class."),Range_out_of_order_in_character_class:u(1517,1,"Range_out_of_order_in_character_class_1517","Range out of order in character class."),Anything_that_would_possibly_match_more_than_a_single_character_is_invalid_inside_a_negated_character_class:u(1518,1,"Anything_that_would_possibly_match_more_than_a_single_character_is_invalid_inside_a_negated_characte_1518","Anything that would possibly match more than a single character is invalid inside a negated character class."),Operators_must_not_be_mixed_within_a_character_class_Wrap_it_in_a_nested_class_instead:u(1519,1,"Operators_must_not_be_mixed_within_a_character_class_Wrap_it_in_a_nested_class_instead_1519","Operators must not be mixed within a character class. Wrap it in a nested class instead."),Expected_a_class_set_operand:u(1520,1,"Expected_a_class_set_operand_1520","Expected a class set operand."),q_must_be_followed_by_string_alternatives_enclosed_in_braces:u(1521,1,"q_must_be_followed_by_string_alternatives_enclosed_in_braces_1521","'\\q' must be followed by string alternatives enclosed in braces."),A_character_class_must_not_contain_a_reserved_double_punctuator_Did_you_mean_to_escape_it_with_backslash:u(1522,1,"A_character_class_must_not_contain_a_reserved_double_punctuator_Did_you_mean_to_escape_it_with_backs_1522","A character class must not contain a reserved double punctuator. Did you mean to escape it with backslash?"),Expected_a_Unicode_property_name:u(1523,1,"Expected_a_Unicode_property_name_1523","Expected a Unicode property name."),Unknown_Unicode_property_name:u(1524,1,"Unknown_Unicode_property_name_1524","Unknown Unicode property name."),Expected_a_Unicode_property_value:u(1525,1,"Expected_a_Unicode_property_value_1525","Expected a Unicode property value."),Unknown_Unicode_property_value:u(1526,1,"Unknown_Unicode_property_value_1526","Unknown Unicode property value."),Expected_a_Unicode_property_name_or_value:u(1527,1,"Expected_a_Unicode_property_name_or_value_1527","Expected a Unicode property name or value."),Any_Unicode_property_that_would_possibly_match_more_than_a_single_character_is_only_available_when_the_Unicode_Sets_v_flag_is_set:u(1528,1,"Any_Unicode_property_that_would_possibly_match_more_than_a_single_character_is_only_available_when_t_1528","Any Unicode property that would possibly match more than a single character is only available when the Unicode Sets (v) flag is set."),Unknown_Unicode_property_name_or_value:u(1529,1,"Unknown_Unicode_property_name_or_value_1529","Unknown Unicode property name or value."),Unicode_property_value_expressions_are_only_available_when_the_Unicode_u_flag_or_the_Unicode_Sets_v_flag_is_set:u(1530,1,"Unicode_property_value_expressions_are_only_available_when_the_Unicode_u_flag_or_the_Unicode_Sets_v__1530","Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set."),_0_must_be_followed_by_a_Unicode_property_value_expression_enclosed_in_braces:u(1531,1,"_0_must_be_followed_by_a_Unicode_property_value_expression_enclosed_in_braces_1531","'\\{0}' must be followed by a Unicode property value expression enclosed in braces."),There_is_no_capturing_group_named_0_in_this_regular_expression:u(1532,1,"There_is_no_capturing_group_named_0_in_this_regular_expression_1532","There is no capturing group named '{0}' in this regular expression."),This_backreference_refers_to_a_group_that_does_not_exist_There_are_only_0_capturing_groups_in_this_regular_expression:u(1533,1,"This_backreference_refers_to_a_group_that_does_not_exist_There_are_only_0_capturing_groups_in_this_r_1533","This backreference refers to a group that does not exist. There are only {0} capturing groups in this regular expression."),This_backreference_refers_to_a_group_that_does_not_exist_There_are_no_capturing_groups_in_this_regular_expression:u(1534,1,"This_backreference_refers_to_a_group_that_does_not_exist_There_are_no_capturing_groups_in_this_regul_1534","This backreference refers to a group that does not exist. There are no capturing groups in this regular expression."),This_character_cannot_be_escaped_in_a_regular_expression:u(1535,1,"This_character_cannot_be_escaped_in_a_regular_expression_1535","This character cannot be escaped in a regular expression."),Octal_escape_sequences_and_backreferences_are_not_allowed_in_a_character_class_If_this_was_intended_as_an_escape_sequence_use_the_syntax_0_instead:u(1536,1,"Octal_escape_sequences_and_backreferences_are_not_allowed_in_a_character_class_If_this_was_intended__1536","Octal escape sequences and backreferences are not allowed in a character class. If this was intended as an escape sequence, use the syntax '{0}' instead."),Decimal_escape_sequences_and_backreferences_are_not_allowed_in_a_character_class:u(1537,1,"Decimal_escape_sequences_and_backreferences_are_not_allowed_in_a_character_class_1537","Decimal escape sequences and backreferences are not allowed in a character class."),Unicode_escape_sequences_are_only_available_when_the_Unicode_u_flag_or_the_Unicode_Sets_v_flag_is_set:u(1538,1,"Unicode_escape_sequences_are_only_available_when_the_Unicode_u_flag_or_the_Unicode_Sets_v_flag_is_se_1538","Unicode escape sequences are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set."),A_bigint_literal_cannot_be_used_as_a_property_name:u(1539,1,"A_bigint_literal_cannot_be_used_as_a_property_name_1539","A 'bigint' literal cannot be used as a property name."),A_namespace_declaration_should_not_be_declared_using_the_module_keyword_Please_use_the_namespace_keyword_instead:u(1540,2,"A_namespace_declaration_should_not_be_declared_using_the_module_keyword_Please_use_the_namespace_key_1540","A 'namespace' declaration should not be declared using the 'module' keyword. Please use the 'namespace' keyword instead.",void 0,void 0,!0),Type_only_import_of_an_ECMAScript_module_from_a_CommonJS_module_must_have_a_resolution_mode_attribute:u(1541,1,"Type_only_import_of_an_ECMAScript_module_from_a_CommonJS_module_must_have_a_resolution_mode_attribut_1541","Type-only import of an ECMAScript module from a CommonJS module must have a 'resolution-mode' attribute."),Type_import_of_an_ECMAScript_module_from_a_CommonJS_module_must_have_a_resolution_mode_attribute:u(1542,1,"Type_import_of_an_ECMAScript_module_from_a_CommonJS_module_must_have_a_resolution_mode_attribute_1542","Type import of an ECMAScript module from a CommonJS module must have a 'resolution-mode' attribute."),Importing_a_JSON_file_into_an_ECMAScript_module_requires_a_type_Colon_json_import_attribute_when_module_is_set_to_0:u(1543,1,"Importing_a_JSON_file_into_an_ECMAScript_module_requires_a_type_Colon_json_import_attribute_when_mod_1543",`Importing a JSON file into an ECMAScript module requires a 'type: "json"' import attribute when 'module' is set to '{0}'.`),Named_imports_from_a_JSON_file_into_an_ECMAScript_module_are_not_allowed_when_module_is_set_to_0:u(1544,1,"Named_imports_from_a_JSON_file_into_an_ECMAScript_module_are_not_allowed_when_module_is_set_to_0_1544","Named imports from a JSON file into an ECMAScript module are not allowed when 'module' is set to '{0}'."),using_declarations_are_not_allowed_in_ambient_contexts:u(1545,1,"using_declarations_are_not_allowed_in_ambient_contexts_1545","'using' declarations are not allowed in ambient contexts."),await_using_declarations_are_not_allowed_in_ambient_contexts:u(1546,1,"await_using_declarations_are_not_allowed_in_ambient_contexts_1546","'await using' declarations are not allowed in ambient contexts."),The_types_of_0_are_incompatible_between_these_types:u(2200,1,"The_types_of_0_are_incompatible_between_these_types_2200","The types of '{0}' are incompatible between these types."),The_types_returned_by_0_are_incompatible_between_these_types:u(2201,1,"The_types_returned_by_0_are_incompatible_between_these_types_2201","The types returned by '{0}' are incompatible between these types."),Call_signature_return_types_0_and_1_are_incompatible:u(2202,1,"Call_signature_return_types_0_and_1_are_incompatible_2202","Call signature return types '{0}' and '{1}' are incompatible.",void 0,!0),Construct_signature_return_types_0_and_1_are_incompatible:u(2203,1,"Construct_signature_return_types_0_and_1_are_incompatible_2203","Construct signature return types '{0}' and '{1}' are incompatible.",void 0,!0),Call_signatures_with_no_arguments_have_incompatible_return_types_0_and_1:u(2204,1,"Call_signatures_with_no_arguments_have_incompatible_return_types_0_and_1_2204","Call signatures with no arguments have incompatible return types '{0}' and '{1}'.",void 0,!0),Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1:u(2205,1,"Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1_2205","Construct signatures with no arguments have incompatible return types '{0}' and '{1}'.",void 0,!0),The_type_modifier_cannot_be_used_on_a_named_import_when_import_type_is_used_on_its_import_statement:u(2206,1,"The_type_modifier_cannot_be_used_on_a_named_import_when_import_type_is_used_on_its_import_statement_2206","The 'type' modifier cannot be used on a named import when 'import type' is used on its import statement."),The_type_modifier_cannot_be_used_on_a_named_export_when_export_type_is_used_on_its_export_statement:u(2207,1,"The_type_modifier_cannot_be_used_on_a_named_export_when_export_type_is_used_on_its_export_statement_2207","The 'type' modifier cannot be used on a named export when 'export type' is used on its export statement."),This_type_parameter_might_need_an_extends_0_constraint:u(2208,1,"This_type_parameter_might_need_an_extends_0_constraint_2208","This type parameter might need an `extends {0}` constraint."),The_project_root_is_ambiguous_but_is_required_to_resolve_export_map_entry_0_in_file_1_Supply_the_rootDir_compiler_option_to_disambiguate:u(2209,1,"The_project_root_is_ambiguous_but_is_required_to_resolve_export_map_entry_0_in_file_1_Supply_the_roo_2209","The project root is ambiguous, but is required to resolve export map entry '{0}' in file '{1}'. Supply the `rootDir` compiler option to disambiguate."),The_project_root_is_ambiguous_but_is_required_to_resolve_import_map_entry_0_in_file_1_Supply_the_rootDir_compiler_option_to_disambiguate:u(2210,1,"The_project_root_is_ambiguous_but_is_required_to_resolve_import_map_entry_0_in_file_1_Supply_the_roo_2210","The project root is ambiguous, but is required to resolve import map entry '{0}' in file '{1}'. Supply the `rootDir` compiler option to disambiguate."),Add_extends_constraint:u(2211,3,"Add_extends_constraint_2211","Add `extends` constraint."),Add_extends_constraint_to_all_type_parameters:u(2212,3,"Add_extends_constraint_to_all_type_parameters_2212","Add `extends` constraint to all type parameters"),Duplicate_identifier_0:u(2300,1,"Duplicate_identifier_0_2300","Duplicate identifier '{0}'."),Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor:u(2301,1,"Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor_2301","Initializer of instance member variable '{0}' cannot reference identifier '{1}' declared in the constructor."),Static_members_cannot_reference_class_type_parameters:u(2302,1,"Static_members_cannot_reference_class_type_parameters_2302","Static members cannot reference class type parameters."),Circular_definition_of_import_alias_0:u(2303,1,"Circular_definition_of_import_alias_0_2303","Circular definition of import alias '{0}'."),Cannot_find_name_0:u(2304,1,"Cannot_find_name_0_2304","Cannot find name '{0}'."),Module_0_has_no_exported_member_1:u(2305,1,"Module_0_has_no_exported_member_1_2305","Module '{0}' has no exported member '{1}'."),File_0_is_not_a_module:u(2306,1,"File_0_is_not_a_module_2306","File '{0}' is not a module."),Cannot_find_module_0_or_its_corresponding_type_declarations:u(2307,1,"Cannot_find_module_0_or_its_corresponding_type_declarations_2307","Cannot find module '{0}' or its corresponding type declarations."),Module_0_has_already_exported_a_member_named_1_Consider_explicitly_re_exporting_to_resolve_the_ambiguity:u(2308,1,"Module_0_has_already_exported_a_member_named_1_Consider_explicitly_re_exporting_to_resolve_the_ambig_2308","Module {0} has already exported a member named '{1}'. Consider explicitly re-exporting to resolve the ambiguity."),An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements:u(2309,1,"An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements_2309","An export assignment cannot be used in a module with other exported elements."),Type_0_recursively_references_itself_as_a_base_type:u(2310,1,"Type_0_recursively_references_itself_as_a_base_type_2310","Type '{0}' recursively references itself as a base type."),Cannot_find_name_0_Did_you_mean_to_write_this_in_an_async_function:u(2311,1,"Cannot_find_name_0_Did_you_mean_to_write_this_in_an_async_function_2311","Cannot find name '{0}'. Did you mean to write this in an async function?"),An_interface_can_only_extend_an_object_type_or_intersection_of_object_types_with_statically_known_members:u(2312,1,"An_interface_can_only_extend_an_object_type_or_intersection_of_object_types_with_statically_known_me_2312","An interface can only extend an object type or intersection of object types with statically known members."),Type_parameter_0_has_a_circular_constraint:u(2313,1,"Type_parameter_0_has_a_circular_constraint_2313","Type parameter '{0}' has a circular constraint."),Generic_type_0_requires_1_type_argument_s:u(2314,1,"Generic_type_0_requires_1_type_argument_s_2314","Generic type '{0}' requires {1} type argument(s)."),Type_0_is_not_generic:u(2315,1,"Type_0_is_not_generic_2315","Type '{0}' is not generic."),Global_type_0_must_be_a_class_or_interface_type:u(2316,1,"Global_type_0_must_be_a_class_or_interface_type_2316","Global type '{0}' must be a class or interface type."),Global_type_0_must_have_1_type_parameter_s:u(2317,1,"Global_type_0_must_have_1_type_parameter_s_2317","Global type '{0}' must have {1} type parameter(s)."),Cannot_find_global_type_0:u(2318,1,"Cannot_find_global_type_0_2318","Cannot find global type '{0}'."),Named_property_0_of_types_1_and_2_are_not_identical:u(2319,1,"Named_property_0_of_types_1_and_2_are_not_identical_2319","Named property '{0}' of types '{1}' and '{2}' are not identical."),Interface_0_cannot_simultaneously_extend_types_1_and_2:u(2320,1,"Interface_0_cannot_simultaneously_extend_types_1_and_2_2320","Interface '{0}' cannot simultaneously extend types '{1}' and '{2}'."),Excessive_stack_depth_comparing_types_0_and_1:u(2321,1,"Excessive_stack_depth_comparing_types_0_and_1_2321","Excessive stack depth comparing types '{0}' and '{1}'."),Type_0_is_not_assignable_to_type_1:u(2322,1,"Type_0_is_not_assignable_to_type_1_2322","Type '{0}' is not assignable to type '{1}'."),Cannot_redeclare_exported_variable_0:u(2323,1,"Cannot_redeclare_exported_variable_0_2323","Cannot redeclare exported variable '{0}'."),Property_0_is_missing_in_type_1:u(2324,1,"Property_0_is_missing_in_type_1_2324","Property '{0}' is missing in type '{1}'."),Property_0_is_private_in_type_1_but_not_in_type_2:u(2325,1,"Property_0_is_private_in_type_1_but_not_in_type_2_2325","Property '{0}' is private in type '{1}' but not in type '{2}'."),Types_of_property_0_are_incompatible:u(2326,1,"Types_of_property_0_are_incompatible_2326","Types of property '{0}' are incompatible."),Property_0_is_optional_in_type_1_but_required_in_type_2:u(2327,1,"Property_0_is_optional_in_type_1_but_required_in_type_2_2327","Property '{0}' is optional in type '{1}' but required in type '{2}'."),Types_of_parameters_0_and_1_are_incompatible:u(2328,1,"Types_of_parameters_0_and_1_are_incompatible_2328","Types of parameters '{0}' and '{1}' are incompatible."),Index_signature_for_type_0_is_missing_in_type_1:u(2329,1,"Index_signature_for_type_0_is_missing_in_type_1_2329","Index signature for type '{0}' is missing in type '{1}'."),_0_and_1_index_signatures_are_incompatible:u(2330,1,"_0_and_1_index_signatures_are_incompatible_2330","'{0}' and '{1}' index signatures are incompatible."),this_cannot_be_referenced_in_a_module_or_namespace_body:u(2331,1,"this_cannot_be_referenced_in_a_module_or_namespace_body_2331","'this' cannot be referenced in a module or namespace body."),this_cannot_be_referenced_in_current_location:u(2332,1,"this_cannot_be_referenced_in_current_location_2332","'this' cannot be referenced in current location."),this_cannot_be_referenced_in_a_static_property_initializer:u(2334,1,"this_cannot_be_referenced_in_a_static_property_initializer_2334","'this' cannot be referenced in a static property initializer."),super_can_only_be_referenced_in_a_derived_class:u(2335,1,"super_can_only_be_referenced_in_a_derived_class_2335","'super' can only be referenced in a derived class."),super_cannot_be_referenced_in_constructor_arguments:u(2336,1,"super_cannot_be_referenced_in_constructor_arguments_2336","'super' cannot be referenced in constructor arguments."),Super_calls_are_not_permitted_outside_constructors_or_in_nested_functions_inside_constructors:u(2337,1,"Super_calls_are_not_permitted_outside_constructors_or_in_nested_functions_inside_constructors_2337","Super calls are not permitted outside constructors or in nested functions inside constructors."),super_property_access_is_permitted_only_in_a_constructor_member_function_or_member_accessor_of_a_derived_class:u(2338,1,"super_property_access_is_permitted_only_in_a_constructor_member_function_or_member_accessor_of_a_der_2338","'super' property access is permitted only in a constructor, member function, or member accessor of a derived class."),Property_0_does_not_exist_on_type_1:u(2339,1,"Property_0_does_not_exist_on_type_1_2339","Property '{0}' does not exist on type '{1}'."),Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword:u(2340,1,"Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword_2340","Only public and protected methods of the base class are accessible via the 'super' keyword."),Property_0_is_private_and_only_accessible_within_class_1:u(2341,1,"Property_0_is_private_and_only_accessible_within_class_1_2341","Property '{0}' is private and only accessible within class '{1}'."),This_syntax_requires_an_imported_helper_named_1_which_does_not_exist_in_0_Consider_upgrading_your_version_of_0:u(2343,1,"This_syntax_requires_an_imported_helper_named_1_which_does_not_exist_in_0_Consider_upgrading_your_ve_2343","This syntax requires an imported helper named '{1}' which does not exist in '{0}'. Consider upgrading your version of '{0}'."),Type_0_does_not_satisfy_the_constraint_1:u(2344,1,"Type_0_does_not_satisfy_the_constraint_1_2344","Type '{0}' does not satisfy the constraint '{1}'."),Argument_of_type_0_is_not_assignable_to_parameter_of_type_1:u(2345,1,"Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_2345","Argument of type '{0}' is not assignable to parameter of type '{1}'."),Call_target_does_not_contain_any_signatures:u(2346,1,"Call_target_does_not_contain_any_signatures_2346","Call target does not contain any signatures."),Untyped_function_calls_may_not_accept_type_arguments:u(2347,1,"Untyped_function_calls_may_not_accept_type_arguments_2347","Untyped function calls may not accept type arguments."),Value_of_type_0_is_not_callable_Did_you_mean_to_include_new:u(2348,1,"Value_of_type_0_is_not_callable_Did_you_mean_to_include_new_2348","Value of type '{0}' is not callable. Did you mean to include 'new'?"),This_expression_is_not_callable:u(2349,1,"This_expression_is_not_callable_2349","This expression is not callable."),Only_a_void_function_can_be_called_with_the_new_keyword:u(2350,1,"Only_a_void_function_can_be_called_with_the_new_keyword_2350","Only a void function can be called with the 'new' keyword."),This_expression_is_not_constructable:u(2351,1,"This_expression_is_not_constructable_2351","This expression is not constructable."),Conversion_of_type_0_to_type_1_may_be_a_mistake_because_neither_type_sufficiently_overlaps_with_the_other_If_this_was_intentional_convert_the_expression_to_unknown_first:u(2352,1,"Conversion_of_type_0_to_type_1_may_be_a_mistake_because_neither_type_sufficiently_overlaps_with_the__2352","Conversion of type '{0}' to type '{1}' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first."),Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1:u(2353,1,"Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1_2353","Object literal may only specify known properties, and '{0}' does not exist in type '{1}'."),This_syntax_requires_an_imported_helper_but_module_0_cannot_be_found:u(2354,1,"This_syntax_requires_an_imported_helper_but_module_0_cannot_be_found_2354","This syntax requires an imported helper but module '{0}' cannot be found."),A_function_whose_declared_type_is_neither_undefined_void_nor_any_must_return_a_value:u(2355,1,"A_function_whose_declared_type_is_neither_undefined_void_nor_any_must_return_a_value_2355","A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value."),An_arithmetic_operand_must_be_of_type_any_number_bigint_or_an_enum_type:u(2356,1,"An_arithmetic_operand_must_be_of_type_any_number_bigint_or_an_enum_type_2356","An arithmetic operand must be of type 'any', 'number', 'bigint' or an enum type."),The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_or_a_property_access:u(2357,1,"The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_or_a_property_access_2357","The operand of an increment or decrement operator must be a variable or a property access."),The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_parameter:u(2358,1,"The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_paramete_2358","The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter."),The_right_hand_side_of_an_instanceof_expression_must_be_either_of_type_any_a_class_function_or_other_type_assignable_to_the_Function_interface_type_or_an_object_type_with_a_Symbol_hasInstance_method:u(2359,1,"The_right_hand_side_of_an_instanceof_expression_must_be_either_of_type_any_a_class_function_or_other_2359","The right-hand side of an 'instanceof' expression must be either of type 'any', a class, function, or other type assignable to the 'Function' interface type, or an object type with a 'Symbol.hasInstance' method."),The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type:u(2362,1,"The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type_2362","The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type."),The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type:u(2363,1,"The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type_2363","The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type."),The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access:u(2364,1,"The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access_2364","The left-hand side of an assignment expression must be a variable or a property access."),Operator_0_cannot_be_applied_to_types_1_and_2:u(2365,1,"Operator_0_cannot_be_applied_to_types_1_and_2_2365","Operator '{0}' cannot be applied to types '{1}' and '{2}'."),Function_lacks_ending_return_statement_and_return_type_does_not_include_undefined:u(2366,1,"Function_lacks_ending_return_statement_and_return_type_does_not_include_undefined_2366","Function lacks ending return statement and return type does not include 'undefined'."),This_comparison_appears_to_be_unintentional_because_the_types_0_and_1_have_no_overlap:u(2367,1,"This_comparison_appears_to_be_unintentional_because_the_types_0_and_1_have_no_overlap_2367","This comparison appears to be unintentional because the types '{0}' and '{1}' have no overlap."),Type_parameter_name_cannot_be_0:u(2368,1,"Type_parameter_name_cannot_be_0_2368","Type parameter name cannot be '{0}'."),A_parameter_property_is_only_allowed_in_a_constructor_implementation:u(2369,1,"A_parameter_property_is_only_allowed_in_a_constructor_implementation_2369","A parameter property is only allowed in a constructor implementation."),A_rest_parameter_must_be_of_an_array_type:u(2370,1,"A_rest_parameter_must_be_of_an_array_type_2370","A rest parameter must be of an array type."),A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation:u(2371,1,"A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation_2371","A parameter initializer is only allowed in a function or constructor implementation."),Parameter_0_cannot_reference_itself:u(2372,1,"Parameter_0_cannot_reference_itself_2372","Parameter '{0}' cannot reference itself."),Parameter_0_cannot_reference_identifier_1_declared_after_it:u(2373,1,"Parameter_0_cannot_reference_identifier_1_declared_after_it_2373","Parameter '{0}' cannot reference identifier '{1}' declared after it."),Duplicate_index_signature_for_type_0:u(2374,1,"Duplicate_index_signature_for_type_0_2374","Duplicate index signature for type '{0}'."),Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_types_of_the_target_s_properties:u(2375,1,"Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefi_2375","Type '{0}' is not assignable to type '{1}' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the types of the target's properties."),A_super_call_must_be_the_first_statement_in_the_constructor_to_refer_to_super_or_this_when_a_derived_class_contains_initialized_properties_parameter_properties_or_private_identifiers:u(2376,1,"A_super_call_must_be_the_first_statement_in_the_constructor_to_refer_to_super_or_this_when_a_derived_2376","A 'super' call must be the first statement in the constructor to refer to 'super' or 'this' when a derived class contains initialized properties, parameter properties, or private identifiers."),Constructors_for_derived_classes_must_contain_a_super_call:u(2377,1,"Constructors_for_derived_classes_must_contain_a_super_call_2377","Constructors for derived classes must contain a 'super' call."),A_get_accessor_must_return_a_value:u(2378,1,"A_get_accessor_must_return_a_value_2378","A 'get' accessor must return a value."),Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_types_of_the_target_s_properties:u(2379,1,"Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_with_exactOptionalPropertyTypes_Colon_tr_2379","Argument of type '{0}' is not assignable to parameter of type '{1}' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the types of the target's properties."),Overload_signatures_must_all_be_exported_or_non_exported:u(2383,1,"Overload_signatures_must_all_be_exported_or_non_exported_2383","Overload signatures must all be exported or non-exported."),Overload_signatures_must_all_be_ambient_or_non_ambient:u(2384,1,"Overload_signatures_must_all_be_ambient_or_non_ambient_2384","Overload signatures must all be ambient or non-ambient."),Overload_signatures_must_all_be_public_private_or_protected:u(2385,1,"Overload_signatures_must_all_be_public_private_or_protected_2385","Overload signatures must all be public, private or protected."),Overload_signatures_must_all_be_optional_or_required:u(2386,1,"Overload_signatures_must_all_be_optional_or_required_2386","Overload signatures must all be optional or required."),Function_overload_must_be_static:u(2387,1,"Function_overload_must_be_static_2387","Function overload must be static."),Function_overload_must_not_be_static:u(2388,1,"Function_overload_must_not_be_static_2388","Function overload must not be static."),Function_implementation_name_must_be_0:u(2389,1,"Function_implementation_name_must_be_0_2389","Function implementation name must be '{0}'."),Constructor_implementation_is_missing:u(2390,1,"Constructor_implementation_is_missing_2390","Constructor implementation is missing."),Function_implementation_is_missing_or_not_immediately_following_the_declaration:u(2391,1,"Function_implementation_is_missing_or_not_immediately_following_the_declaration_2391","Function implementation is missing or not immediately following the declaration."),Multiple_constructor_implementations_are_not_allowed:u(2392,1,"Multiple_constructor_implementations_are_not_allowed_2392","Multiple constructor implementations are not allowed."),Duplicate_function_implementation:u(2393,1,"Duplicate_function_implementation_2393","Duplicate function implementation."),This_overload_signature_is_not_compatible_with_its_implementation_signature:u(2394,1,"This_overload_signature_is_not_compatible_with_its_implementation_signature_2394","This overload signature is not compatible with its implementation signature."),Individual_declarations_in_merged_declaration_0_must_be_all_exported_or_all_local:u(2395,1,"Individual_declarations_in_merged_declaration_0_must_be_all_exported_or_all_local_2395","Individual declarations in merged declaration '{0}' must be all exported or all local."),Duplicate_identifier_arguments_Compiler_uses_arguments_to_initialize_rest_parameters:u(2396,1,"Duplicate_identifier_arguments_Compiler_uses_arguments_to_initialize_rest_parameters_2396","Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters."),Declaration_name_conflicts_with_built_in_global_identifier_0:u(2397,1,"Declaration_name_conflicts_with_built_in_global_identifier_0_2397","Declaration name conflicts with built-in global identifier '{0}'."),constructor_cannot_be_used_as_a_parameter_property_name:u(2398,1,"constructor_cannot_be_used_as_a_parameter_property_name_2398","'constructor' cannot be used as a parameter property name."),Duplicate_identifier_this_Compiler_uses_variable_declaration_this_to_capture_this_reference:u(2399,1,"Duplicate_identifier_this_Compiler_uses_variable_declaration_this_to_capture_this_reference_2399","Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference."),Expression_resolves_to_variable_declaration_this_that_compiler_uses_to_capture_this_reference:u(2400,1,"Expression_resolves_to_variable_declaration_this_that_compiler_uses_to_capture_this_reference_2400","Expression resolves to variable declaration '_this' that compiler uses to capture 'this' reference."),A_super_call_must_be_a_root_level_statement_within_a_constructor_of_a_derived_class_that_contains_initialized_properties_parameter_properties_or_private_identifiers:u(2401,1,"A_super_call_must_be_a_root_level_statement_within_a_constructor_of_a_derived_class_that_contains_in_2401","A 'super' call must be a root-level statement within a constructor of a derived class that contains initialized properties, parameter properties, or private identifiers."),Expression_resolves_to_super_that_compiler_uses_to_capture_base_class_reference:u(2402,1,"Expression_resolves_to_super_that_compiler_uses_to_capture_base_class_reference_2402","Expression resolves to '_super' that compiler uses to capture base class reference."),Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_type_2:u(2403,1,"Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_t_2403","Subsequent variable declarations must have the same type. Variable '{0}' must be of type '{1}', but here has type '{2}'."),The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation:u(2404,1,"The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation_2404","The left-hand side of a 'for...in' statement cannot use a type annotation."),The_left_hand_side_of_a_for_in_statement_must_be_of_type_string_or_any:u(2405,1,"The_left_hand_side_of_a_for_in_statement_must_be_of_type_string_or_any_2405","The left-hand side of a 'for...in' statement must be of type 'string' or 'any'."),The_left_hand_side_of_a_for_in_statement_must_be_a_variable_or_a_property_access:u(2406,1,"The_left_hand_side_of_a_for_in_statement_must_be_a_variable_or_a_property_access_2406","The left-hand side of a 'for...in' statement must be a variable or a property access."),The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter_but_here_has_type_0:u(2407,1,"The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter_but_2407","The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter, but here has type '{0}'."),Setters_cannot_return_a_value:u(2408,1,"Setters_cannot_return_a_value_2408","Setters cannot return a value."),Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class:u(2409,1,"Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class_2409","Return type of constructor signature must be assignable to the instance type of the class."),The_with_statement_is_not_supported_All_symbols_in_a_with_block_will_have_type_any:u(2410,1,"The_with_statement_is_not_supported_All_symbols_in_a_with_block_will_have_type_any_2410","The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'."),Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_type_of_the_target:u(2412,1,"Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefi_2412","Type '{0}' is not assignable to type '{1}' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the type of the target."),Property_0_of_type_1_is_not_assignable_to_2_index_type_3:u(2411,1,"Property_0_of_type_1_is_not_assignable_to_2_index_type_3_2411","Property '{0}' of type '{1}' is not assignable to '{2}' index type '{3}'."),_0_index_type_1_is_not_assignable_to_2_index_type_3:u(2413,1,"_0_index_type_1_is_not_assignable_to_2_index_type_3_2413","'{0}' index type '{1}' is not assignable to '{2}' index type '{3}'."),Class_name_cannot_be_0:u(2414,1,"Class_name_cannot_be_0_2414","Class name cannot be '{0}'."),Class_0_incorrectly_extends_base_class_1:u(2415,1,"Class_0_incorrectly_extends_base_class_1_2415","Class '{0}' incorrectly extends base class '{1}'."),Property_0_in_type_1_is_not_assignable_to_the_same_property_in_base_type_2:u(2416,1,"Property_0_in_type_1_is_not_assignable_to_the_same_property_in_base_type_2_2416","Property '{0}' in type '{1}' is not assignable to the same property in base type '{2}'."),Class_static_side_0_incorrectly_extends_base_class_static_side_1:u(2417,1,"Class_static_side_0_incorrectly_extends_base_class_static_side_1_2417","Class static side '{0}' incorrectly extends base class static side '{1}'."),Type_of_computed_property_s_value_is_0_which_is_not_assignable_to_type_1:u(2418,1,"Type_of_computed_property_s_value_is_0_which_is_not_assignable_to_type_1_2418","Type of computed property's value is '{0}', which is not assignable to type '{1}'."),Types_of_construct_signatures_are_incompatible:u(2419,1,"Types_of_construct_signatures_are_incompatible_2419","Types of construct signatures are incompatible."),Class_0_incorrectly_implements_interface_1:u(2420,1,"Class_0_incorrectly_implements_interface_1_2420","Class '{0}' incorrectly implements interface '{1}'."),A_class_can_only_implement_an_object_type_or_intersection_of_object_types_with_statically_known_members:u(2422,1,"A_class_can_only_implement_an_object_type_or_intersection_of_object_types_with_statically_known_memb_2422","A class can only implement an object type or intersection of object types with statically known members."),Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_accessor:u(2423,1,"Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_access_2423","Class '{0}' defines instance member function '{1}', but extended class '{2}' defines it as instance member accessor."),Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_function:u(2425,1,"Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_functi_2425","Class '{0}' defines instance member property '{1}', but extended class '{2}' defines it as instance member function."),Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_function:u(2426,1,"Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_functi_2426","Class '{0}' defines instance member accessor '{1}', but extended class '{2}' defines it as instance member function."),Interface_name_cannot_be_0:u(2427,1,"Interface_name_cannot_be_0_2427","Interface name cannot be '{0}'."),All_declarations_of_0_must_have_identical_type_parameters:u(2428,1,"All_declarations_of_0_must_have_identical_type_parameters_2428","All declarations of '{0}' must have identical type parameters."),Interface_0_incorrectly_extends_interface_1:u(2430,1,"Interface_0_incorrectly_extends_interface_1_2430","Interface '{0}' incorrectly extends interface '{1}'."),Enum_name_cannot_be_0:u(2431,1,"Enum_name_cannot_be_0_2431","Enum name cannot be '{0}'."),In_an_enum_with_multiple_declarations_only_one_declaration_can_omit_an_initializer_for_its_first_enum_element:u(2432,1,"In_an_enum_with_multiple_declarations_only_one_declaration_can_omit_an_initializer_for_its_first_enu_2432","In an enum with multiple declarations, only one declaration can omit an initializer for its first enum element."),A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merged:u(2433,1,"A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merg_2433","A namespace declaration cannot be in a different file from a class or function with which it is merged."),A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged:u(2434,1,"A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged_2434","A namespace declaration cannot be located prior to a class or function with which it is merged."),Ambient_modules_cannot_be_nested_in_other_modules_or_namespaces:u(2435,1,"Ambient_modules_cannot_be_nested_in_other_modules_or_namespaces_2435","Ambient modules cannot be nested in other modules or namespaces."),Ambient_module_declaration_cannot_specify_relative_module_name:u(2436,1,"Ambient_module_declaration_cannot_specify_relative_module_name_2436","Ambient module declaration cannot specify relative module name."),Module_0_is_hidden_by_a_local_declaration_with_the_same_name:u(2437,1,"Module_0_is_hidden_by_a_local_declaration_with_the_same_name_2437","Module '{0}' is hidden by a local declaration with the same name."),Import_name_cannot_be_0:u(2438,1,"Import_name_cannot_be_0_2438","Import name cannot be '{0}'."),Import_or_export_declaration_in_an_ambient_module_declaration_cannot_reference_module_through_relative_module_name:u(2439,1,"Import_or_export_declaration_in_an_ambient_module_declaration_cannot_reference_module_through_relati_2439","Import or export declaration in an ambient module declaration cannot reference module through relative module name."),Import_declaration_conflicts_with_local_declaration_of_0:u(2440,1,"Import_declaration_conflicts_with_local_declaration_of_0_2440","Import declaration conflicts with local declaration of '{0}'."),Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module:u(2441,1,"Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_2441","Duplicate identifier '{0}'. Compiler reserves name '{1}' in top level scope of a module."),Types_have_separate_declarations_of_a_private_property_0:u(2442,1,"Types_have_separate_declarations_of_a_private_property_0_2442","Types have separate declarations of a private property '{0}'."),Property_0_is_protected_but_type_1_is_not_a_class_derived_from_2:u(2443,1,"Property_0_is_protected_but_type_1_is_not_a_class_derived_from_2_2443","Property '{0}' is protected but type '{1}' is not a class derived from '{2}'."),Property_0_is_protected_in_type_1_but_public_in_type_2:u(2444,1,"Property_0_is_protected_in_type_1_but_public_in_type_2_2444","Property '{0}' is protected in type '{1}' but public in type '{2}'."),Property_0_is_protected_and_only_accessible_within_class_1_and_its_subclasses:u(2445,1,"Property_0_is_protected_and_only_accessible_within_class_1_and_its_subclasses_2445","Property '{0}' is protected and only accessible within class '{1}' and its subclasses."),Property_0_is_protected_and_only_accessible_through_an_instance_of_class_1_This_is_an_instance_of_class_2:u(2446,1,"Property_0_is_protected_and_only_accessible_through_an_instance_of_class_1_This_is_an_instance_of_cl_2446","Property '{0}' is protected and only accessible through an instance of class '{1}'. This is an instance of class '{2}'."),The_0_operator_is_not_allowed_for_boolean_types_Consider_using_1_instead:u(2447,1,"The_0_operator_is_not_allowed_for_boolean_types_Consider_using_1_instead_2447","The '{0}' operator is not allowed for boolean types. Consider using '{1}' instead."),Block_scoped_variable_0_used_before_its_declaration:u(2448,1,"Block_scoped_variable_0_used_before_its_declaration_2448","Block-scoped variable '{0}' used before its declaration."),Class_0_used_before_its_declaration:u(2449,1,"Class_0_used_before_its_declaration_2449","Class '{0}' used before its declaration."),Enum_0_used_before_its_declaration:u(2450,1,"Enum_0_used_before_its_declaration_2450","Enum '{0}' used before its declaration."),Cannot_redeclare_block_scoped_variable_0:u(2451,1,"Cannot_redeclare_block_scoped_variable_0_2451","Cannot redeclare block-scoped variable '{0}'."),An_enum_member_cannot_have_a_numeric_name:u(2452,1,"An_enum_member_cannot_have_a_numeric_name_2452","An enum member cannot have a numeric name."),Variable_0_is_used_before_being_assigned:u(2454,1,"Variable_0_is_used_before_being_assigned_2454","Variable '{0}' is used before being assigned."),Type_alias_0_circularly_references_itself:u(2456,1,"Type_alias_0_circularly_references_itself_2456","Type alias '{0}' circularly references itself."),Type_alias_name_cannot_be_0:u(2457,1,"Type_alias_name_cannot_be_0_2457","Type alias name cannot be '{0}'."),An_AMD_module_cannot_have_multiple_name_assignments:u(2458,1,"An_AMD_module_cannot_have_multiple_name_assignments_2458","An AMD module cannot have multiple name assignments."),Module_0_declares_1_locally_but_it_is_not_exported:u(2459,1,"Module_0_declares_1_locally_but_it_is_not_exported_2459","Module '{0}' declares '{1}' locally, but it is not exported."),Module_0_declares_1_locally_but_it_is_exported_as_2:u(2460,1,"Module_0_declares_1_locally_but_it_is_exported_as_2_2460","Module '{0}' declares '{1}' locally, but it is exported as '{2}'."),Type_0_is_not_an_array_type:u(2461,1,"Type_0_is_not_an_array_type_2461","Type '{0}' is not an array type."),A_rest_element_must_be_last_in_a_destructuring_pattern:u(2462,1,"A_rest_element_must_be_last_in_a_destructuring_pattern_2462","A rest element must be last in a destructuring pattern."),A_binding_pattern_parameter_cannot_be_optional_in_an_implementation_signature:u(2463,1,"A_binding_pattern_parameter_cannot_be_optional_in_an_implementation_signature_2463","A binding pattern parameter cannot be optional in an implementation signature."),A_computed_property_name_must_be_of_type_string_number_symbol_or_any:u(2464,1,"A_computed_property_name_must_be_of_type_string_number_symbol_or_any_2464","A computed property name must be of type 'string', 'number', 'symbol', or 'any'."),this_cannot_be_referenced_in_a_computed_property_name:u(2465,1,"this_cannot_be_referenced_in_a_computed_property_name_2465","'this' cannot be referenced in a computed property name."),super_cannot_be_referenced_in_a_computed_property_name:u(2466,1,"super_cannot_be_referenced_in_a_computed_property_name_2466","'super' cannot be referenced in a computed property name."),A_computed_property_name_cannot_reference_a_type_parameter_from_its_containing_type:u(2467,1,"A_computed_property_name_cannot_reference_a_type_parameter_from_its_containing_type_2467","A computed property name cannot reference a type parameter from its containing type."),Cannot_find_global_value_0:u(2468,1,"Cannot_find_global_value_0_2468","Cannot find global value '{0}'."),The_0_operator_cannot_be_applied_to_type_symbol:u(2469,1,"The_0_operator_cannot_be_applied_to_type_symbol_2469","The '{0}' operator cannot be applied to type 'symbol'."),Spread_operator_in_new_expressions_is_only_available_when_targeting_ECMAScript_5_and_higher:u(2472,1,"Spread_operator_in_new_expressions_is_only_available_when_targeting_ECMAScript_5_and_higher_2472","Spread operator in 'new' expressions is only available when targeting ECMAScript 5 and higher."),Enum_declarations_must_all_be_const_or_non_const:u(2473,1,"Enum_declarations_must_all_be_const_or_non_const_2473","Enum declarations must all be const or non-const."),const_enum_member_initializers_must_be_constant_expressions:u(2474,1,"const_enum_member_initializers_must_be_constant_expressions_2474","const enum member initializers must be constant expressions."),const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_import_declaration_or_export_assignment_or_type_query:u(2475,1,"const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_im_2475","'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment or type query."),A_const_enum_member_can_only_be_accessed_using_a_string_literal:u(2476,1,"A_const_enum_member_can_only_be_accessed_using_a_string_literal_2476","A const enum member can only be accessed using a string literal."),const_enum_member_initializer_was_evaluated_to_a_non_finite_value:u(2477,1,"const_enum_member_initializer_was_evaluated_to_a_non_finite_value_2477","'const' enum member initializer was evaluated to a non-finite value."),const_enum_member_initializer_was_evaluated_to_disallowed_value_NaN:u(2478,1,"const_enum_member_initializer_was_evaluated_to_disallowed_value_NaN_2478","'const' enum member initializer was evaluated to disallowed value 'NaN'."),let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations:u(2480,1,"let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations_2480","'let' is not allowed to be used as a name in 'let' or 'const' declarations."),Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1:u(2481,1,"Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1_2481","Cannot initialize outer scoped variable '{0}' in the same scope as block scoped declaration '{1}'."),The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation:u(2483,1,"The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation_2483","The left-hand side of a 'for...of' statement cannot use a type annotation."),Export_declaration_conflicts_with_exported_declaration_of_0:u(2484,1,"Export_declaration_conflicts_with_exported_declaration_of_0_2484","Export declaration conflicts with exported declaration of '{0}'."),The_left_hand_side_of_a_for_of_statement_must_be_a_variable_or_a_property_access:u(2487,1,"The_left_hand_side_of_a_for_of_statement_must_be_a_variable_or_a_property_access_2487","The left-hand side of a 'for...of' statement must be a variable or a property access."),Type_0_must_have_a_Symbol_iterator_method_that_returns_an_iterator:u(2488,1,"Type_0_must_have_a_Symbol_iterator_method_that_returns_an_iterator_2488","Type '{0}' must have a '[Symbol.iterator]()' method that returns an iterator."),An_iterator_must_have_a_next_method:u(2489,1,"An_iterator_must_have_a_next_method_2489","An iterator must have a 'next()' method."),The_type_returned_by_the_0_method_of_an_iterator_must_have_a_value_property:u(2490,1,"The_type_returned_by_the_0_method_of_an_iterator_must_have_a_value_property_2490","The type returned by the '{0}()' method of an iterator must have a 'value' property."),The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern:u(2491,1,"The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern_2491","The left-hand side of a 'for...in' statement cannot be a destructuring pattern."),Cannot_redeclare_identifier_0_in_catch_clause:u(2492,1,"Cannot_redeclare_identifier_0_in_catch_clause_2492","Cannot redeclare identifier '{0}' in catch clause."),Tuple_type_0_of_length_1_has_no_element_at_index_2:u(2493,1,"Tuple_type_0_of_length_1_has_no_element_at_index_2_2493","Tuple type '{0}' of length '{1}' has no element at index '{2}'."),Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher:u(2494,1,"Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher_2494","Using a string in a 'for...of' statement is only supported in ECMAScript 5 and higher."),Type_0_is_not_an_array_type_or_a_string_type:u(2495,1,"Type_0_is_not_an_array_type_or_a_string_type_2495","Type '{0}' is not an array type or a string type."),The_arguments_object_cannot_be_referenced_in_an_arrow_function_in_ES5_Consider_using_a_standard_function_expression:u(2496,1,"The_arguments_object_cannot_be_referenced_in_an_arrow_function_in_ES5_Consider_using_a_standard_func_2496","The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression."),This_module_can_only_be_referenced_with_ECMAScript_imports_Slashexports_by_turning_on_the_0_flag_and_referencing_its_default_export:u(2497,1,"This_module_can_only_be_referenced_with_ECMAScript_imports_Slashexports_by_turning_on_the_0_flag_and_2497","This module can only be referenced with ECMAScript imports/exports by turning on the '{0}' flag and referencing its default export."),Module_0_uses_export_and_cannot_be_used_with_export_Asterisk:u(2498,1,"Module_0_uses_export_and_cannot_be_used_with_export_Asterisk_2498","Module '{0}' uses 'export =' and cannot be used with 'export *'."),An_interface_can_only_extend_an_identifier_Slashqualified_name_with_optional_type_arguments:u(2499,1,"An_interface_can_only_extend_an_identifier_Slashqualified_name_with_optional_type_arguments_2499","An interface can only extend an identifier/qualified-name with optional type arguments."),A_class_can_only_implement_an_identifier_Slashqualified_name_with_optional_type_arguments:u(2500,1,"A_class_can_only_implement_an_identifier_Slashqualified_name_with_optional_type_arguments_2500","A class can only implement an identifier/qualified-name with optional type arguments."),A_rest_element_cannot_contain_a_binding_pattern:u(2501,1,"A_rest_element_cannot_contain_a_binding_pattern_2501","A rest element cannot contain a binding pattern."),_0_is_referenced_directly_or_indirectly_in_its_own_type_annotation:u(2502,1,"_0_is_referenced_directly_or_indirectly_in_its_own_type_annotation_2502","'{0}' is referenced directly or indirectly in its own type annotation."),Cannot_find_namespace_0:u(2503,1,"Cannot_find_namespace_0_2503","Cannot find namespace '{0}'."),Type_0_must_have_a_Symbol_asyncIterator_method_that_returns_an_async_iterator:u(2504,1,"Type_0_must_have_a_Symbol_asyncIterator_method_that_returns_an_async_iterator_2504","Type '{0}' must have a '[Symbol.asyncIterator]()' method that returns an async iterator."),A_generator_cannot_have_a_void_type_annotation:u(2505,1,"A_generator_cannot_have_a_void_type_annotation_2505","A generator cannot have a 'void' type annotation."),_0_is_referenced_directly_or_indirectly_in_its_own_base_expression:u(2506,1,"_0_is_referenced_directly_or_indirectly_in_its_own_base_expression_2506","'{0}' is referenced directly or indirectly in its own base expression."),Type_0_is_not_a_constructor_function_type:u(2507,1,"Type_0_is_not_a_constructor_function_type_2507","Type '{0}' is not a constructor function type."),No_base_constructor_has_the_specified_number_of_type_arguments:u(2508,1,"No_base_constructor_has_the_specified_number_of_type_arguments_2508","No base constructor has the specified number of type arguments."),Base_constructor_return_type_0_is_not_an_object_type_or_intersection_of_object_types_with_statically_known_members:u(2509,1,"Base_constructor_return_type_0_is_not_an_object_type_or_intersection_of_object_types_with_statically_2509","Base constructor return type '{0}' is not an object type or intersection of object types with statically known members."),Base_constructors_must_all_have_the_same_return_type:u(2510,1,"Base_constructors_must_all_have_the_same_return_type_2510","Base constructors must all have the same return type."),Cannot_create_an_instance_of_an_abstract_class:u(2511,1,"Cannot_create_an_instance_of_an_abstract_class_2511","Cannot create an instance of an abstract class."),Overload_signatures_must_all_be_abstract_or_non_abstract:u(2512,1,"Overload_signatures_must_all_be_abstract_or_non_abstract_2512","Overload signatures must all be abstract or non-abstract."),Abstract_method_0_in_class_1_cannot_be_accessed_via_super_expression:u(2513,1,"Abstract_method_0_in_class_1_cannot_be_accessed_via_super_expression_2513","Abstract method '{0}' in class '{1}' cannot be accessed via super expression."),A_tuple_type_cannot_be_indexed_with_a_negative_value:u(2514,1,"A_tuple_type_cannot_be_indexed_with_a_negative_value_2514","A tuple type cannot be indexed with a negative value."),Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2:u(2515,1,"Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2_2515","Non-abstract class '{0}' does not implement inherited abstract member {1} from class '{2}'."),All_declarations_of_an_abstract_method_must_be_consecutive:u(2516,1,"All_declarations_of_an_abstract_method_must_be_consecutive_2516","All declarations of an abstract method must be consecutive."),Cannot_assign_an_abstract_constructor_type_to_a_non_abstract_constructor_type:u(2517,1,"Cannot_assign_an_abstract_constructor_type_to_a_non_abstract_constructor_type_2517","Cannot assign an abstract constructor type to a non-abstract constructor type."),A_this_based_type_guard_is_not_compatible_with_a_parameter_based_type_guard:u(2518,1,"A_this_based_type_guard_is_not_compatible_with_a_parameter_based_type_guard_2518","A 'this'-based type guard is not compatible with a parameter-based type guard."),An_async_iterator_must_have_a_next_method:u(2519,1,"An_async_iterator_must_have_a_next_method_2519","An async iterator must have a 'next()' method."),Duplicate_identifier_0_Compiler_uses_declaration_1_to_support_async_functions:u(2520,1,"Duplicate_identifier_0_Compiler_uses_declaration_1_to_support_async_functions_2520","Duplicate identifier '{0}'. Compiler uses declaration '{1}' to support async functions."),The_arguments_object_cannot_be_referenced_in_an_async_function_or_method_in_ES5_Consider_using_a_standard_function_or_method:u(2522,1,"The_arguments_object_cannot_be_referenced_in_an_async_function_or_method_in_ES5_Consider_using_a_sta_2522","The 'arguments' object cannot be referenced in an async function or method in ES5. Consider using a standard function or method."),yield_expressions_cannot_be_used_in_a_parameter_initializer:u(2523,1,"yield_expressions_cannot_be_used_in_a_parameter_initializer_2523","'yield' expressions cannot be used in a parameter initializer."),await_expressions_cannot_be_used_in_a_parameter_initializer:u(2524,1,"await_expressions_cannot_be_used_in_a_parameter_initializer_2524","'await' expressions cannot be used in a parameter initializer."),A_this_type_is_available_only_in_a_non_static_member_of_a_class_or_interface:u(2526,1,"A_this_type_is_available_only_in_a_non_static_member_of_a_class_or_interface_2526","A 'this' type is available only in a non-static member of a class or interface."),The_inferred_type_of_0_references_an_inaccessible_1_type_A_type_annotation_is_necessary:u(2527,1,"The_inferred_type_of_0_references_an_inaccessible_1_type_A_type_annotation_is_necessary_2527","The inferred type of '{0}' references an inaccessible '{1}' type. A type annotation is necessary."),A_module_cannot_have_multiple_default_exports:u(2528,1,"A_module_cannot_have_multiple_default_exports_2528","A module cannot have multiple default exports."),Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_containing_async_functions:u(2529,1,"Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_containing_async_func_2529","Duplicate identifier '{0}'. Compiler reserves name '{1}' in top level scope of a module containing async functions."),Property_0_is_incompatible_with_index_signature:u(2530,1,"Property_0_is_incompatible_with_index_signature_2530","Property '{0}' is incompatible with index signature."),Object_is_possibly_null:u(2531,1,"Object_is_possibly_null_2531","Object is possibly 'null'."),Object_is_possibly_undefined:u(2532,1,"Object_is_possibly_undefined_2532","Object is possibly 'undefined'."),Object_is_possibly_null_or_undefined:u(2533,1,"Object_is_possibly_null_or_undefined_2533","Object is possibly 'null' or 'undefined'."),A_function_returning_never_cannot_have_a_reachable_end_point:u(2534,1,"A_function_returning_never_cannot_have_a_reachable_end_point_2534","A function returning 'never' cannot have a reachable end point."),Type_0_cannot_be_used_to_index_type_1:u(2536,1,"Type_0_cannot_be_used_to_index_type_1_2536","Type '{0}' cannot be used to index type '{1}'."),Type_0_has_no_matching_index_signature_for_type_1:u(2537,1,"Type_0_has_no_matching_index_signature_for_type_1_2537","Type '{0}' has no matching index signature for type '{1}'."),Type_0_cannot_be_used_as_an_index_type:u(2538,1,"Type_0_cannot_be_used_as_an_index_type_2538","Type '{0}' cannot be used as an index type."),Cannot_assign_to_0_because_it_is_not_a_variable:u(2539,1,"Cannot_assign_to_0_because_it_is_not_a_variable_2539","Cannot assign to '{0}' because it is not a variable."),Cannot_assign_to_0_because_it_is_a_read_only_property:u(2540,1,"Cannot_assign_to_0_because_it_is_a_read_only_property_2540","Cannot assign to '{0}' because it is a read-only property."),Index_signature_in_type_0_only_permits_reading:u(2542,1,"Index_signature_in_type_0_only_permits_reading_2542","Index signature in type '{0}' only permits reading."),Duplicate_identifier_newTarget_Compiler_uses_variable_declaration_newTarget_to_capture_new_target_meta_property_reference:u(2543,1,"Duplicate_identifier_newTarget_Compiler_uses_variable_declaration_newTarget_to_capture_new_target_me_2543","Duplicate identifier '_newTarget'. Compiler uses variable declaration '_newTarget' to capture 'new.target' meta-property reference."),Expression_resolves_to_variable_declaration_newTarget_that_compiler_uses_to_capture_new_target_meta_property_reference:u(2544,1,"Expression_resolves_to_variable_declaration_newTarget_that_compiler_uses_to_capture_new_target_meta__2544","Expression resolves to variable declaration '_newTarget' that compiler uses to capture 'new.target' meta-property reference."),A_mixin_class_must_have_a_constructor_with_a_single_rest_parameter_of_type_any:u(2545,1,"A_mixin_class_must_have_a_constructor_with_a_single_rest_parameter_of_type_any_2545","A mixin class must have a constructor with a single rest parameter of type 'any[]'."),The_type_returned_by_the_0_method_of_an_async_iterator_must_be_a_promise_for_a_type_with_a_value_property:u(2547,1,"The_type_returned_by_the_0_method_of_an_async_iterator_must_be_a_promise_for_a_type_with_a_value_pro_2547","The type returned by the '{0}()' method of an async iterator must be a promise for a type with a 'value' property."),Type_0_is_not_an_array_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator:u(2548,1,"Type_0_is_not_an_array_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator_2548","Type '{0}' is not an array type or does not have a '[Symbol.iterator]()' method that returns an iterator."),Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator:u(2549,1,"Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns__2549","Type '{0}' is not an array type or a string type or does not have a '[Symbol.iterator]()' method that returns an iterator."),Property_0_does_not_exist_on_type_1_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_2_or_later:u(2550,1,"Property_0_does_not_exist_on_type_1_Do_you_need_to_change_your_target_library_Try_changing_the_lib_c_2550","Property '{0}' does not exist on type '{1}'. Do you need to change your target library? Try changing the 'lib' compiler option to '{2}' or later."),Property_0_does_not_exist_on_type_1_Did_you_mean_2:u(2551,1,"Property_0_does_not_exist_on_type_1_Did_you_mean_2_2551","Property '{0}' does not exist on type '{1}'. Did you mean '{2}'?"),Cannot_find_name_0_Did_you_mean_1:u(2552,1,"Cannot_find_name_0_Did_you_mean_1_2552","Cannot find name '{0}'. Did you mean '{1}'?"),Computed_values_are_not_permitted_in_an_enum_with_string_valued_members:u(2553,1,"Computed_values_are_not_permitted_in_an_enum_with_string_valued_members_2553","Computed values are not permitted in an enum with string valued members."),Expected_0_arguments_but_got_1:u(2554,1,"Expected_0_arguments_but_got_1_2554","Expected {0} arguments, but got {1}."),Expected_at_least_0_arguments_but_got_1:u(2555,1,"Expected_at_least_0_arguments_but_got_1_2555","Expected at least {0} arguments, but got {1}."),A_spread_argument_must_either_have_a_tuple_type_or_be_passed_to_a_rest_parameter:u(2556,1,"A_spread_argument_must_either_have_a_tuple_type_or_be_passed_to_a_rest_parameter_2556","A spread argument must either have a tuple type or be passed to a rest parameter."),Expected_0_type_arguments_but_got_1:u(2558,1,"Expected_0_type_arguments_but_got_1_2558","Expected {0} type arguments, but got {1}."),Type_0_has_no_properties_in_common_with_type_1:u(2559,1,"Type_0_has_no_properties_in_common_with_type_1_2559","Type '{0}' has no properties in common with type '{1}'."),Value_of_type_0_has_no_properties_in_common_with_type_1_Did_you_mean_to_call_it:u(2560,1,"Value_of_type_0_has_no_properties_in_common_with_type_1_Did_you_mean_to_call_it_2560","Value of type '{0}' has no properties in common with type '{1}'. Did you mean to call it?"),Object_literal_may_only_specify_known_properties_but_0_does_not_exist_in_type_1_Did_you_mean_to_write_2:u(2561,1,"Object_literal_may_only_specify_known_properties_but_0_does_not_exist_in_type_1_Did_you_mean_to_writ_2561","Object literal may only specify known properties, but '{0}' does not exist in type '{1}'. Did you mean to write '{2}'?"),Base_class_expressions_cannot_reference_class_type_parameters:u(2562,1,"Base_class_expressions_cannot_reference_class_type_parameters_2562","Base class expressions cannot reference class type parameters."),The_containing_function_or_module_body_is_too_large_for_control_flow_analysis:u(2563,1,"The_containing_function_or_module_body_is_too_large_for_control_flow_analysis_2563","The containing function or module body is too large for control flow analysis."),Property_0_has_no_initializer_and_is_not_definitely_assigned_in_the_constructor:u(2564,1,"Property_0_has_no_initializer_and_is_not_definitely_assigned_in_the_constructor_2564","Property '{0}' has no initializer and is not definitely assigned in the constructor."),Property_0_is_used_before_being_assigned:u(2565,1,"Property_0_is_used_before_being_assigned_2565","Property '{0}' is used before being assigned."),A_rest_element_cannot_have_a_property_name:u(2566,1,"A_rest_element_cannot_have_a_property_name_2566","A rest element cannot have a property name."),Enum_declarations_can_only_merge_with_namespace_or_other_enum_declarations:u(2567,1,"Enum_declarations_can_only_merge_with_namespace_or_other_enum_declarations_2567","Enum declarations can only merge with namespace or other enum declarations."),Property_0_may_not_exist_on_type_1_Did_you_mean_2:u(2568,1,"Property_0_may_not_exist_on_type_1_Did_you_mean_2_2568","Property '{0}' may not exist on type '{1}'. Did you mean '{2}'?"),Could_not_find_name_0_Did_you_mean_1:u(2570,1,"Could_not_find_name_0_Did_you_mean_1_2570","Could not find name '{0}'. Did you mean '{1}'?"),Object_is_of_type_unknown:u(2571,1,"Object_is_of_type_unknown_2571","Object is of type 'unknown'."),A_rest_element_type_must_be_an_array_type:u(2574,1,"A_rest_element_type_must_be_an_array_type_2574","A rest element type must be an array type."),No_overload_expects_0_arguments_but_overloads_do_exist_that_expect_either_1_or_2_arguments:u(2575,1,"No_overload_expects_0_arguments_but_overloads_do_exist_that_expect_either_1_or_2_arguments_2575","No overload expects {0} arguments, but overloads do exist that expect either {1} or {2} arguments."),Property_0_does_not_exist_on_type_1_Did_you_mean_to_access_the_static_member_2_instead:u(2576,1,"Property_0_does_not_exist_on_type_1_Did_you_mean_to_access_the_static_member_2_instead_2576","Property '{0}' does not exist on type '{1}'. Did you mean to access the static member '{2}' instead?"),Return_type_annotation_circularly_references_itself:u(2577,1,"Return_type_annotation_circularly_references_itself_2577","Return type annotation circularly references itself."),Unused_ts_expect_error_directive:u(2578,1,"Unused_ts_expect_error_directive_2578","Unused '@ts-expect-error' directive."),Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashnode:u(2580,1,"Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashno_2580","Cannot find name '{0}'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`."),Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_save_dev_types_Slashjquery:u(2581,1,"Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_save_dev_types_Slash_2581","Cannot find name '{0}'. Do you need to install type definitions for jQuery? Try `npm i --save-dev @types/jquery`."),Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_save_dev_types_Slashjest_or_npm_i_save_dev_types_Slashmocha:u(2582,1,"Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_save_dev_type_2582","Cannot find name '{0}'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`."),Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_1_or_later:u(2583,1,"Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_2583","Cannot find name '{0}'. Do you need to change your target library? Try changing the 'lib' compiler option to '{1}' or later."),Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_include_dom:u(2584,1,"Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_2584","Cannot find name '{0}'. Do you need to change your target library? Try changing the 'lib' compiler option to include 'dom'."),_0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_es2015_or_later:u(2585,1,"_0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Do_you_need_to_change_your_target_library_2585","'{0}' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later."),Cannot_assign_to_0_because_it_is_a_constant:u(2588,1,"Cannot_assign_to_0_because_it_is_a_constant_2588","Cannot assign to '{0}' because it is a constant."),Type_instantiation_is_excessively_deep_and_possibly_infinite:u(2589,1,"Type_instantiation_is_excessively_deep_and_possibly_infinite_2589","Type instantiation is excessively deep and possibly infinite."),Expression_produces_a_union_type_that_is_too_complex_to_represent:u(2590,1,"Expression_produces_a_union_type_that_is_too_complex_to_represent_2590","Expression produces a union type that is too complex to represent."),Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashnode_and_then_add_node_to_the_types_field_in_your_tsconfig:u(2591,1,"Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashno_2591","Cannot find name '{0}'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig."),Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_save_dev_types_Slashjquery_and_then_add_jquery_to_the_types_field_in_your_tsconfig:u(2592,1,"Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_save_dev_types_Slash_2592","Cannot find name '{0}'. Do you need to install type definitions for jQuery? Try `npm i --save-dev @types/jquery` and then add 'jquery' to the types field in your tsconfig."),Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_save_dev_types_Slashjest_or_npm_i_save_dev_types_Slashmocha_and_then_add_jest_or_mocha_to_the_types_field_in_your_tsconfig:u(2593,1,"Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_save_dev_type_2593","Cannot find name '{0}'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add 'jest' or 'mocha' to the types field in your tsconfig."),This_module_is_declared_with_export_and_can_only_be_used_with_a_default_import_when_using_the_0_flag:u(2594,1,"This_module_is_declared_with_export_and_can_only_be_used_with_a_default_import_when_using_the_0_flag_2594","This module is declared with 'export =', and can only be used with a default import when using the '{0}' flag."),_0_can_only_be_imported_by_using_a_default_import:u(2595,1,"_0_can_only_be_imported_by_using_a_default_import_2595","'{0}' can only be imported by using a default import."),_0_can_only_be_imported_by_turning_on_the_esModuleInterop_flag_and_using_a_default_import:u(2596,1,"_0_can_only_be_imported_by_turning_on_the_esModuleInterop_flag_and_using_a_default_import_2596","'{0}' can only be imported by turning on the 'esModuleInterop' flag and using a default import."),_0_can_only_be_imported_by_using_a_require_call_or_by_using_a_default_import:u(2597,1,"_0_can_only_be_imported_by_using_a_require_call_or_by_using_a_default_import_2597","'{0}' can only be imported by using a 'require' call or by using a default import."),_0_can_only_be_imported_by_using_a_require_call_or_by_turning_on_the_esModuleInterop_flag_and_using_a_default_import:u(2598,1,"_0_can_only_be_imported_by_using_a_require_call_or_by_turning_on_the_esModuleInterop_flag_and_using__2598","'{0}' can only be imported by using a 'require' call or by turning on the 'esModuleInterop' flag and using a default import."),JSX_element_implicitly_has_type_any_because_the_global_type_JSX_Element_does_not_exist:u(2602,1,"JSX_element_implicitly_has_type_any_because_the_global_type_JSX_Element_does_not_exist_2602","JSX element implicitly has type 'any' because the global type 'JSX.Element' does not exist."),Property_0_in_type_1_is_not_assignable_to_type_2:u(2603,1,"Property_0_in_type_1_is_not_assignable_to_type_2_2603","Property '{0}' in type '{1}' is not assignable to type '{2}'."),JSX_element_type_0_does_not_have_any_construct_or_call_signatures:u(2604,1,"JSX_element_type_0_does_not_have_any_construct_or_call_signatures_2604","JSX element type '{0}' does not have any construct or call signatures."),Property_0_of_JSX_spread_attribute_is_not_assignable_to_target_property:u(2606,1,"Property_0_of_JSX_spread_attribute_is_not_assignable_to_target_property_2606","Property '{0}' of JSX spread attribute is not assignable to target property."),JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property:u(2607,1,"JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property_2607","JSX element class does not support attributes because it does not have a '{0}' property."),The_global_type_JSX_0_may_not_have_more_than_one_property:u(2608,1,"The_global_type_JSX_0_may_not_have_more_than_one_property_2608","The global type 'JSX.{0}' may not have more than one property."),JSX_spread_child_must_be_an_array_type:u(2609,1,"JSX_spread_child_must_be_an_array_type_2609","JSX spread child must be an array type."),_0_is_defined_as_an_accessor_in_class_1_but_is_overridden_here_in_2_as_an_instance_property:u(2610,1,"_0_is_defined_as_an_accessor_in_class_1_but_is_overridden_here_in_2_as_an_instance_property_2610","'{0}' is defined as an accessor in class '{1}', but is overridden here in '{2}' as an instance property."),_0_is_defined_as_a_property_in_class_1_but_is_overridden_here_in_2_as_an_accessor:u(2611,1,"_0_is_defined_as_a_property_in_class_1_but_is_overridden_here_in_2_as_an_accessor_2611","'{0}' is defined as a property in class '{1}', but is overridden here in '{2}' as an accessor."),Property_0_will_overwrite_the_base_property_in_1_If_this_is_intentional_add_an_initializer_Otherwise_add_a_declare_modifier_or_remove_the_redundant_declaration:u(2612,1,"Property_0_will_overwrite_the_base_property_in_1_If_this_is_intentional_add_an_initializer_Otherwise_2612","Property '{0}' will overwrite the base property in '{1}'. If this is intentional, add an initializer. Otherwise, add a 'declare' modifier or remove the redundant declaration."),Module_0_has_no_default_export_Did_you_mean_to_use_import_1_from_0_instead:u(2613,1,"Module_0_has_no_default_export_Did_you_mean_to_use_import_1_from_0_instead_2613","Module '{0}' has no default export. Did you mean to use 'import { {1} } from {0}' instead?"),Module_0_has_no_exported_member_1_Did_you_mean_to_use_import_1_from_0_instead:u(2614,1,"Module_0_has_no_exported_member_1_Did_you_mean_to_use_import_1_from_0_instead_2614","Module '{0}' has no exported member '{1}'. Did you mean to use 'import {1} from {0}' instead?"),Type_of_property_0_circularly_references_itself_in_mapped_type_1:u(2615,1,"Type_of_property_0_circularly_references_itself_in_mapped_type_1_2615","Type of property '{0}' circularly references itself in mapped type '{1}'."),_0_can_only_be_imported_by_using_import_1_require_2_or_a_default_import:u(2616,1,"_0_can_only_be_imported_by_using_import_1_require_2_or_a_default_import_2616","'{0}' can only be imported by using 'import {1} = require({2})' or a default import."),_0_can_only_be_imported_by_using_import_1_require_2_or_by_turning_on_the_esModuleInterop_flag_and_using_a_default_import:u(2617,1,"_0_can_only_be_imported_by_using_import_1_require_2_or_by_turning_on_the_esModuleInterop_flag_and_us_2617","'{0}' can only be imported by using 'import {1} = require({2})' or by turning on the 'esModuleInterop' flag and using a default import."),Source_has_0_element_s_but_target_requires_1:u(2618,1,"Source_has_0_element_s_but_target_requires_1_2618","Source has {0} element(s) but target requires {1}."),Source_has_0_element_s_but_target_allows_only_1:u(2619,1,"Source_has_0_element_s_but_target_allows_only_1_2619","Source has {0} element(s) but target allows only {1}."),Target_requires_0_element_s_but_source_may_have_fewer:u(2620,1,"Target_requires_0_element_s_but_source_may_have_fewer_2620","Target requires {0} element(s) but source may have fewer."),Target_allows_only_0_element_s_but_source_may_have_more:u(2621,1,"Target_allows_only_0_element_s_but_source_may_have_more_2621","Target allows only {0} element(s) but source may have more."),Source_provides_no_match_for_required_element_at_position_0_in_target:u(2623,1,"Source_provides_no_match_for_required_element_at_position_0_in_target_2623","Source provides no match for required element at position {0} in target."),Source_provides_no_match_for_variadic_element_at_position_0_in_target:u(2624,1,"Source_provides_no_match_for_variadic_element_at_position_0_in_target_2624","Source provides no match for variadic element at position {0} in target."),Variadic_element_at_position_0_in_source_does_not_match_element_at_position_1_in_target:u(2625,1,"Variadic_element_at_position_0_in_source_does_not_match_element_at_position_1_in_target_2625","Variadic element at position {0} in source does not match element at position {1} in target."),Type_at_position_0_in_source_is_not_compatible_with_type_at_position_1_in_target:u(2626,1,"Type_at_position_0_in_source_is_not_compatible_with_type_at_position_1_in_target_2626","Type at position {0} in source is not compatible with type at position {1} in target."),Type_at_positions_0_through_1_in_source_is_not_compatible_with_type_at_position_2_in_target:u(2627,1,"Type_at_positions_0_through_1_in_source_is_not_compatible_with_type_at_position_2_in_target_2627","Type at positions {0} through {1} in source is not compatible with type at position {2} in target."),Cannot_assign_to_0_because_it_is_an_enum:u(2628,1,"Cannot_assign_to_0_because_it_is_an_enum_2628","Cannot assign to '{0}' because it is an enum."),Cannot_assign_to_0_because_it_is_a_class:u(2629,1,"Cannot_assign_to_0_because_it_is_a_class_2629","Cannot assign to '{0}' because it is a class."),Cannot_assign_to_0_because_it_is_a_function:u(2630,1,"Cannot_assign_to_0_because_it_is_a_function_2630","Cannot assign to '{0}' because it is a function."),Cannot_assign_to_0_because_it_is_a_namespace:u(2631,1,"Cannot_assign_to_0_because_it_is_a_namespace_2631","Cannot assign to '{0}' because it is a namespace."),Cannot_assign_to_0_because_it_is_an_import:u(2632,1,"Cannot_assign_to_0_because_it_is_an_import_2632","Cannot assign to '{0}' because it is an import."),JSX_property_access_expressions_cannot_include_JSX_namespace_names:u(2633,1,"JSX_property_access_expressions_cannot_include_JSX_namespace_names_2633","JSX property access expressions cannot include JSX namespace names"),_0_index_signatures_are_incompatible:u(2634,1,"_0_index_signatures_are_incompatible_2634","'{0}' index signatures are incompatible."),Type_0_has_no_signatures_for_which_the_type_argument_list_is_applicable:u(2635,1,"Type_0_has_no_signatures_for_which_the_type_argument_list_is_applicable_2635","Type '{0}' has no signatures for which the type argument list is applicable."),Type_0_is_not_assignable_to_type_1_as_implied_by_variance_annotation:u(2636,1,"Type_0_is_not_assignable_to_type_1_as_implied_by_variance_annotation_2636","Type '{0}' is not assignable to type '{1}' as implied by variance annotation."),Variance_annotations_are_only_supported_in_type_aliases_for_object_function_constructor_and_mapped_types:u(2637,1,"Variance_annotations_are_only_supported_in_type_aliases_for_object_function_constructor_and_mapped_t_2637","Variance annotations are only supported in type aliases for object, function, constructor, and mapped types."),Type_0_may_represent_a_primitive_value_which_is_not_permitted_as_the_right_operand_of_the_in_operator:u(2638,1,"Type_0_may_represent_a_primitive_value_which_is_not_permitted_as_the_right_operand_of_the_in_operato_2638","Type '{0}' may represent a primitive value, which is not permitted as the right operand of the 'in' operator."),React_components_cannot_include_JSX_namespace_names:u(2639,1,"React_components_cannot_include_JSX_namespace_names_2639","React components cannot include JSX namespace names"),Cannot_augment_module_0_with_value_exports_because_it_resolves_to_a_non_module_entity:u(2649,1,"Cannot_augment_module_0_with_value_exports_because_it_resolves_to_a_non_module_entity_2649","Cannot augment module '{0}' with value exports because it resolves to a non-module entity."),Non_abstract_class_expression_is_missing_implementations_for_the_following_members_of_0_Colon_1_and_2_more:u(2650,1,"Non_abstract_class_expression_is_missing_implementations_for_the_following_members_of_0_Colon_1_and__2650","Non-abstract class expression is missing implementations for the following members of '{0}': {1} and {2} more."),A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_members_defined_in_other_enums:u(2651,1,"A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_memb_2651","A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums."),Merged_declaration_0_cannot_include_a_default_export_declaration_Consider_adding_a_separate_export_default_0_declaration_instead:u(2652,1,"Merged_declaration_0_cannot_include_a_default_export_declaration_Consider_adding_a_separate_export_d_2652","Merged declaration '{0}' cannot include a default export declaration. Consider adding a separate 'export default {0}' declaration instead."),Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1:u(2653,1,"Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1_2653","Non-abstract class expression does not implement inherited abstract member '{0}' from class '{1}'."),Non_abstract_class_0_is_missing_implementations_for_the_following_members_of_1_Colon_2:u(2654,1,"Non_abstract_class_0_is_missing_implementations_for_the_following_members_of_1_Colon_2_2654","Non-abstract class '{0}' is missing implementations for the following members of '{1}': {2}."),Non_abstract_class_0_is_missing_implementations_for_the_following_members_of_1_Colon_2_and_3_more:u(2655,1,"Non_abstract_class_0_is_missing_implementations_for_the_following_members_of_1_Colon_2_and_3_more_2655","Non-abstract class '{0}' is missing implementations for the following members of '{1}': {2} and {3} more."),Non_abstract_class_expression_is_missing_implementations_for_the_following_members_of_0_Colon_1:u(2656,1,"Non_abstract_class_expression_is_missing_implementations_for_the_following_members_of_0_Colon_1_2656","Non-abstract class expression is missing implementations for the following members of '{0}': {1}."),JSX_expressions_must_have_one_parent_element:u(2657,1,"JSX_expressions_must_have_one_parent_element_2657","JSX expressions must have one parent element."),Type_0_provides_no_match_for_the_signature_1:u(2658,1,"Type_0_provides_no_match_for_the_signature_1_2658","Type '{0}' provides no match for the signature '{1}'."),super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_higher:u(2659,1,"super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_highe_2659","'super' is only allowed in members of object literal expressions when option 'target' is 'ES2015' or higher."),super_can_only_be_referenced_in_members_of_derived_classes_or_object_literal_expressions:u(2660,1,"super_can_only_be_referenced_in_members_of_derived_classes_or_object_literal_expressions_2660","'super' can only be referenced in members of derived classes or object literal expressions."),Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module:u(2661,1,"Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module_2661","Cannot export '{0}'. Only local declarations can be exported from a module."),Cannot_find_name_0_Did_you_mean_the_static_member_1_0:u(2662,1,"Cannot_find_name_0_Did_you_mean_the_static_member_1_0_2662","Cannot find name '{0}'. Did you mean the static member '{1}.{0}'?"),Cannot_find_name_0_Did_you_mean_the_instance_member_this_0:u(2663,1,"Cannot_find_name_0_Did_you_mean_the_instance_member_this_0_2663","Cannot find name '{0}'. Did you mean the instance member 'this.{0}'?"),Invalid_module_name_in_augmentation_module_0_cannot_be_found:u(2664,1,"Invalid_module_name_in_augmentation_module_0_cannot_be_found_2664","Invalid module name in augmentation, module '{0}' cannot be found."),Invalid_module_name_in_augmentation_Module_0_resolves_to_an_untyped_module_at_1_which_cannot_be_augmented:u(2665,1,"Invalid_module_name_in_augmentation_Module_0_resolves_to_an_untyped_module_at_1_which_cannot_be_augm_2665","Invalid module name in augmentation. Module '{0}' resolves to an untyped module at '{1}', which cannot be augmented."),Exports_and_export_assignments_are_not_permitted_in_module_augmentations:u(2666,1,"Exports_and_export_assignments_are_not_permitted_in_module_augmentations_2666","Exports and export assignments are not permitted in module augmentations."),Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_module:u(2667,1,"Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_mod_2667","Imports are not permitted in module augmentations. Consider moving them to the enclosing external module."),export_modifier_cannot_be_applied_to_ambient_modules_and_module_augmentations_since_they_are_always_visible:u(2668,1,"export_modifier_cannot_be_applied_to_ambient_modules_and_module_augmentations_since_they_are_always__2668","'export' modifier cannot be applied to ambient modules and module augmentations since they are always visible."),Augmentations_for_the_global_scope_can_only_be_directly_nested_in_external_modules_or_ambient_module_declarations:u(2669,1,"Augmentations_for_the_global_scope_can_only_be_directly_nested_in_external_modules_or_ambient_module_2669","Augmentations for the global scope can only be directly nested in external modules or ambient module declarations."),Augmentations_for_the_global_scope_should_have_declare_modifier_unless_they_appear_in_already_ambient_context:u(2670,1,"Augmentations_for_the_global_scope_should_have_declare_modifier_unless_they_appear_in_already_ambien_2670","Augmentations for the global scope should have 'declare' modifier unless they appear in already ambient context."),Cannot_augment_module_0_because_it_resolves_to_a_non_module_entity:u(2671,1,"Cannot_augment_module_0_because_it_resolves_to_a_non_module_entity_2671","Cannot augment module '{0}' because it resolves to a non-module entity."),Cannot_assign_a_0_constructor_type_to_a_1_constructor_type:u(2672,1,"Cannot_assign_a_0_constructor_type_to_a_1_constructor_type_2672","Cannot assign a '{0}' constructor type to a '{1}' constructor type."),Constructor_of_class_0_is_private_and_only_accessible_within_the_class_declaration:u(2673,1,"Constructor_of_class_0_is_private_and_only_accessible_within_the_class_declaration_2673","Constructor of class '{0}' is private and only accessible within the class declaration."),Constructor_of_class_0_is_protected_and_only_accessible_within_the_class_declaration:u(2674,1,"Constructor_of_class_0_is_protected_and_only_accessible_within_the_class_declaration_2674","Constructor of class '{0}' is protected and only accessible within the class declaration."),Cannot_extend_a_class_0_Class_constructor_is_marked_as_private:u(2675,1,"Cannot_extend_a_class_0_Class_constructor_is_marked_as_private_2675","Cannot extend a class '{0}'. Class constructor is marked as private."),Accessors_must_both_be_abstract_or_non_abstract:u(2676,1,"Accessors_must_both_be_abstract_or_non_abstract_2676","Accessors must both be abstract or non-abstract."),A_type_predicate_s_type_must_be_assignable_to_its_parameter_s_type:u(2677,1,"A_type_predicate_s_type_must_be_assignable_to_its_parameter_s_type_2677","A type predicate's type must be assignable to its parameter's type."),Type_0_is_not_comparable_to_type_1:u(2678,1,"Type_0_is_not_comparable_to_type_1_2678","Type '{0}' is not comparable to type '{1}'."),A_function_that_is_called_with_the_new_keyword_cannot_have_a_this_type_that_is_void:u(2679,1,"A_function_that_is_called_with_the_new_keyword_cannot_have_a_this_type_that_is_void_2679","A function that is called with the 'new' keyword cannot have a 'this' type that is 'void'."),A_0_parameter_must_be_the_first_parameter:u(2680,1,"A_0_parameter_must_be_the_first_parameter_2680","A '{0}' parameter must be the first parameter."),A_constructor_cannot_have_a_this_parameter:u(2681,1,"A_constructor_cannot_have_a_this_parameter_2681","A constructor cannot have a 'this' parameter."),this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation:u(2683,1,"this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_2683","'this' implicitly has type 'any' because it does not have a type annotation."),The_this_context_of_type_0_is_not_assignable_to_method_s_this_of_type_1:u(2684,1,"The_this_context_of_type_0_is_not_assignable_to_method_s_this_of_type_1_2684","The 'this' context of type '{0}' is not assignable to method's 'this' of type '{1}'."),The_this_types_of_each_signature_are_incompatible:u(2685,1,"The_this_types_of_each_signature_are_incompatible_2685","The 'this' types of each signature are incompatible."),_0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead:u(2686,1,"_0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead_2686","'{0}' refers to a UMD global, but the current file is a module. Consider adding an import instead."),All_declarations_of_0_must_have_identical_modifiers:u(2687,1,"All_declarations_of_0_must_have_identical_modifiers_2687","All declarations of '{0}' must have identical modifiers."),Cannot_find_type_definition_file_for_0:u(2688,1,"Cannot_find_type_definition_file_for_0_2688","Cannot find type definition file for '{0}'."),Cannot_extend_an_interface_0_Did_you_mean_implements:u(2689,1,"Cannot_extend_an_interface_0_Did_you_mean_implements_2689","Cannot extend an interface '{0}'. Did you mean 'implements'?"),_0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Did_you_mean_to_use_1_in_0:u(2690,1,"_0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Did_you_mean_to_use_1_in_0_2690","'{0}' only refers to a type, but is being used as a value here. Did you mean to use '{1} in {0}'?"),_0_is_a_primitive_but_1_is_a_wrapper_object_Prefer_using_0_when_possible:u(2692,1,"_0_is_a_primitive_but_1_is_a_wrapper_object_Prefer_using_0_when_possible_2692","'{0}' is a primitive, but '{1}' is a wrapper object. Prefer using '{0}' when possible."),_0_only_refers_to_a_type_but_is_being_used_as_a_value_here:u(2693,1,"_0_only_refers_to_a_type_but_is_being_used_as_a_value_here_2693","'{0}' only refers to a type, but is being used as a value here."),Namespace_0_has_no_exported_member_1:u(2694,1,"Namespace_0_has_no_exported_member_1_2694","Namespace '{0}' has no exported member '{1}'."),Left_side_of_comma_operator_is_unused_and_has_no_side_effects:u(2695,1,"Left_side_of_comma_operator_is_unused_and_has_no_side_effects_2695","Left side of comma operator is unused and has no side effects.",!0),The_Object_type_is_assignable_to_very_few_other_types_Did_you_mean_to_use_the_any_type_instead:u(2696,1,"The_Object_type_is_assignable_to_very_few_other_types_Did_you_mean_to_use_the_any_type_instead_2696","The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead?"),An_async_function_or_method_must_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option:u(2697,1,"An_async_function_or_method_must_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_in_2697","An async function or method must return a 'Promise'. Make sure you have a declaration for 'Promise' or include 'ES2015' in your '--lib' option."),Spread_types_may_only_be_created_from_object_types:u(2698,1,"Spread_types_may_only_be_created_from_object_types_2698","Spread types may only be created from object types."),Static_property_0_conflicts_with_built_in_property_Function_0_of_constructor_function_1:u(2699,1,"Static_property_0_conflicts_with_built_in_property_Function_0_of_constructor_function_1_2699","Static property '{0}' conflicts with built-in property 'Function.{0}' of constructor function '{1}'."),Rest_types_may_only_be_created_from_object_types:u(2700,1,"Rest_types_may_only_be_created_from_object_types_2700","Rest types may only be created from object types."),The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access:u(2701,1,"The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access_2701","The target of an object rest assignment must be a variable or a property access."),_0_only_refers_to_a_type_but_is_being_used_as_a_namespace_here:u(2702,1,"_0_only_refers_to_a_type_but_is_being_used_as_a_namespace_here_2702","'{0}' only refers to a type, but is being used as a namespace here."),The_operand_of_a_delete_operator_must_be_a_property_reference:u(2703,1,"The_operand_of_a_delete_operator_must_be_a_property_reference_2703","The operand of a 'delete' operator must be a property reference."),The_operand_of_a_delete_operator_cannot_be_a_read_only_property:u(2704,1,"The_operand_of_a_delete_operator_cannot_be_a_read_only_property_2704","The operand of a 'delete' operator cannot be a read-only property."),An_async_function_or_method_in_ES5_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option:u(2705,1,"An_async_function_or_method_in_ES5_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_2705","An async function or method in ES5 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option."),Required_type_parameters_may_not_follow_optional_type_parameters:u(2706,1,"Required_type_parameters_may_not_follow_optional_type_parameters_2706","Required type parameters may not follow optional type parameters."),Generic_type_0_requires_between_1_and_2_type_arguments:u(2707,1,"Generic_type_0_requires_between_1_and_2_type_arguments_2707","Generic type '{0}' requires between {1} and {2} type arguments."),Cannot_use_namespace_0_as_a_value:u(2708,1,"Cannot_use_namespace_0_as_a_value_2708","Cannot use namespace '{0}' as a value."),Cannot_use_namespace_0_as_a_type:u(2709,1,"Cannot_use_namespace_0_as_a_type_2709","Cannot use namespace '{0}' as a type."),_0_are_specified_twice_The_attribute_named_0_will_be_overwritten:u(2710,1,"_0_are_specified_twice_The_attribute_named_0_will_be_overwritten_2710","'{0}' are specified twice. The attribute named '{0}' will be overwritten."),A_dynamic_import_call_returns_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option:u(2711,1,"A_dynamic_import_call_returns_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES20_2711","A dynamic import call returns a 'Promise'. Make sure you have a declaration for 'Promise' or include 'ES2015' in your '--lib' option."),A_dynamic_import_call_in_ES5_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option:u(2712,1,"A_dynamic_import_call_in_ES5_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_t_2712","A dynamic import call in ES5 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option."),Cannot_access_0_1_because_0_is_a_type_but_not_a_namespace_Did_you_mean_to_retrieve_the_type_of_the_property_1_in_0_with_0_1:u(2713,1,"Cannot_access_0_1_because_0_is_a_type_but_not_a_namespace_Did_you_mean_to_retrieve_the_type_of_the_p_2713",`Cannot access '{0}.{1}' because '{0}' is a type, but not a namespace. Did you mean to retrieve the type of the property '{1}' in '{0}' with '{0}["{1}"]'?`),The_expression_of_an_export_assignment_must_be_an_identifier_or_qualified_name_in_an_ambient_context:u(2714,1,"The_expression_of_an_export_assignment_must_be_an_identifier_or_qualified_name_in_an_ambient_context_2714","The expression of an export assignment must be an identifier or qualified name in an ambient context."),Abstract_property_0_in_class_1_cannot_be_accessed_in_the_constructor:u(2715,1,"Abstract_property_0_in_class_1_cannot_be_accessed_in_the_constructor_2715","Abstract property '{0}' in class '{1}' cannot be accessed in the constructor."),Type_parameter_0_has_a_circular_default:u(2716,1,"Type_parameter_0_has_a_circular_default_2716","Type parameter '{0}' has a circular default."),Subsequent_property_declarations_must_have_the_same_type_Property_0_must_be_of_type_1_but_here_has_type_2:u(2717,1,"Subsequent_property_declarations_must_have_the_same_type_Property_0_must_be_of_type_1_but_here_has_t_2717","Subsequent property declarations must have the same type. Property '{0}' must be of type '{1}', but here has type '{2}'."),Duplicate_property_0:u(2718,1,"Duplicate_property_0_2718","Duplicate property '{0}'."),Type_0_is_not_assignable_to_type_1_Two_different_types_with_this_name_exist_but_they_are_unrelated:u(2719,1,"Type_0_is_not_assignable_to_type_1_Two_different_types_with_this_name_exist_but_they_are_unrelated_2719","Type '{0}' is not assignable to type '{1}'. Two different types with this name exist, but they are unrelated."),Class_0_incorrectly_implements_class_1_Did_you_mean_to_extend_1_and_inherit_its_members_as_a_subclass:u(2720,1,"Class_0_incorrectly_implements_class_1_Did_you_mean_to_extend_1_and_inherit_its_members_as_a_subclas_2720","Class '{0}' incorrectly implements class '{1}'. Did you mean to extend '{1}' and inherit its members as a subclass?"),Cannot_invoke_an_object_which_is_possibly_null:u(2721,1,"Cannot_invoke_an_object_which_is_possibly_null_2721","Cannot invoke an object which is possibly 'null'."),Cannot_invoke_an_object_which_is_possibly_undefined:u(2722,1,"Cannot_invoke_an_object_which_is_possibly_undefined_2722","Cannot invoke an object which is possibly 'undefined'."),Cannot_invoke_an_object_which_is_possibly_null_or_undefined:u(2723,1,"Cannot_invoke_an_object_which_is_possibly_null_or_undefined_2723","Cannot invoke an object which is possibly 'null' or 'undefined'."),_0_has_no_exported_member_named_1_Did_you_mean_2:u(2724,1,"_0_has_no_exported_member_named_1_Did_you_mean_2_2724","'{0}' has no exported member named '{1}'. Did you mean '{2}'?"),Class_name_cannot_be_Object_when_targeting_ES5_and_above_with_module_0:u(2725,1,"Class_name_cannot_be_Object_when_targeting_ES5_and_above_with_module_0_2725","Class name cannot be 'Object' when targeting ES5 and above with module {0}."),Cannot_find_lib_definition_for_0:u(2726,1,"Cannot_find_lib_definition_for_0_2726","Cannot find lib definition for '{0}'."),Cannot_find_lib_definition_for_0_Did_you_mean_1:u(2727,1,"Cannot_find_lib_definition_for_0_Did_you_mean_1_2727","Cannot find lib definition for '{0}'. Did you mean '{1}'?"),_0_is_declared_here:u(2728,3,"_0_is_declared_here_2728","'{0}' is declared here."),Property_0_is_used_before_its_initialization:u(2729,1,"Property_0_is_used_before_its_initialization_2729","Property '{0}' is used before its initialization."),An_arrow_function_cannot_have_a_this_parameter:u(2730,1,"An_arrow_function_cannot_have_a_this_parameter_2730","An arrow function cannot have a 'this' parameter."),Implicit_conversion_of_a_symbol_to_a_string_will_fail_at_runtime_Consider_wrapping_this_expression_in_String:u(2731,1,"Implicit_conversion_of_a_symbol_to_a_string_will_fail_at_runtime_Consider_wrapping_this_expression_i_2731","Implicit conversion of a 'symbol' to a 'string' will fail at runtime. Consider wrapping this expression in 'String(...)'."),Cannot_find_module_0_Consider_using_resolveJsonModule_to_import_module_with_json_extension:u(2732,1,"Cannot_find_module_0_Consider_using_resolveJsonModule_to_import_module_with_json_extension_2732","Cannot find module '{0}'. Consider using '--resolveJsonModule' to import module with '.json' extension."),Property_0_was_also_declared_here:u(2733,1,"Property_0_was_also_declared_here_2733","Property '{0}' was also declared here."),Are_you_missing_a_semicolon:u(2734,1,"Are_you_missing_a_semicolon_2734","Are you missing a semicolon?"),Did_you_mean_for_0_to_be_constrained_to_type_new_args_Colon_any_1:u(2735,1,"Did_you_mean_for_0_to_be_constrained_to_type_new_args_Colon_any_1_2735","Did you mean for '{0}' to be constrained to type 'new (...args: any[]) => {1}'?"),Operator_0_cannot_be_applied_to_type_1:u(2736,1,"Operator_0_cannot_be_applied_to_type_1_2736","Operator '{0}' cannot be applied to type '{1}'."),BigInt_literals_are_not_available_when_targeting_lower_than_ES2020:u(2737,1,"BigInt_literals_are_not_available_when_targeting_lower_than_ES2020_2737","BigInt literals are not available when targeting lower than ES2020."),An_outer_value_of_this_is_shadowed_by_this_container:u(2738,3,"An_outer_value_of_this_is_shadowed_by_this_container_2738","An outer value of 'this' is shadowed by this container."),Type_0_is_missing_the_following_properties_from_type_1_Colon_2:u(2739,1,"Type_0_is_missing_the_following_properties_from_type_1_Colon_2_2739","Type '{0}' is missing the following properties from type '{1}': {2}"),Type_0_is_missing_the_following_properties_from_type_1_Colon_2_and_3_more:u(2740,1,"Type_0_is_missing_the_following_properties_from_type_1_Colon_2_and_3_more_2740","Type '{0}' is missing the following properties from type '{1}': {2}, and {3} more."),Property_0_is_missing_in_type_1_but_required_in_type_2:u(2741,1,"Property_0_is_missing_in_type_1_but_required_in_type_2_2741","Property '{0}' is missing in type '{1}' but required in type '{2}'."),The_inferred_type_of_0_cannot_be_named_without_a_reference_to_1_This_is_likely_not_portable_A_type_annotation_is_necessary:u(2742,1,"The_inferred_type_of_0_cannot_be_named_without_a_reference_to_1_This_is_likely_not_portable_A_type_a_2742","The inferred type of '{0}' cannot be named without a reference to '{1}'. This is likely not portable. A type annotation is necessary."),No_overload_expects_0_type_arguments_but_overloads_do_exist_that_expect_either_1_or_2_type_arguments:u(2743,1,"No_overload_expects_0_type_arguments_but_overloads_do_exist_that_expect_either_1_or_2_type_arguments_2743","No overload expects {0} type arguments, but overloads do exist that expect either {1} or {2} type arguments."),Type_parameter_defaults_can_only_reference_previously_declared_type_parameters:u(2744,1,"Type_parameter_defaults_can_only_reference_previously_declared_type_parameters_2744","Type parameter defaults can only reference previously declared type parameters."),This_JSX_tag_s_0_prop_expects_type_1_which_requires_multiple_children_but_only_a_single_child_was_provided:u(2745,1,"This_JSX_tag_s_0_prop_expects_type_1_which_requires_multiple_children_but_only_a_single_child_was_pr_2745","This JSX tag's '{0}' prop expects type '{1}' which requires multiple children, but only a single child was provided."),This_JSX_tag_s_0_prop_expects_a_single_child_of_type_1_but_multiple_children_were_provided:u(2746,1,"This_JSX_tag_s_0_prop_expects_a_single_child_of_type_1_but_multiple_children_were_provided_2746","This JSX tag's '{0}' prop expects a single child of type '{1}', but multiple children were provided."),_0_components_don_t_accept_text_as_child_elements_Text_in_JSX_has_the_type_string_but_the_expected_type_of_1_is_2:u(2747,1,"_0_components_don_t_accept_text_as_child_elements_Text_in_JSX_has_the_type_string_but_the_expected_t_2747","'{0}' components don't accept text as child elements. Text in JSX has the type 'string', but the expected type of '{1}' is '{2}'."),Cannot_access_ambient_const_enums_when_0_is_enabled:u(2748,1,"Cannot_access_ambient_const_enums_when_0_is_enabled_2748","Cannot access ambient const enums when '{0}' is enabled."),_0_refers_to_a_value_but_is_being_used_as_a_type_here_Did_you_mean_typeof_0:u(2749,1,"_0_refers_to_a_value_but_is_being_used_as_a_type_here_Did_you_mean_typeof_0_2749","'{0}' refers to a value, but is being used as a type here. Did you mean 'typeof {0}'?"),The_implementation_signature_is_declared_here:u(2750,1,"The_implementation_signature_is_declared_here_2750","The implementation signature is declared here."),Circularity_originates_in_type_at_this_location:u(2751,1,"Circularity_originates_in_type_at_this_location_2751","Circularity originates in type at this location."),The_first_export_default_is_here:u(2752,1,"The_first_export_default_is_here_2752","The first export default is here."),Another_export_default_is_here:u(2753,1,"Another_export_default_is_here_2753","Another export default is here."),super_may_not_use_type_arguments:u(2754,1,"super_may_not_use_type_arguments_2754","'super' may not use type arguments."),No_constituent_of_type_0_is_callable:u(2755,1,"No_constituent_of_type_0_is_callable_2755","No constituent of type '{0}' is callable."),Not_all_constituents_of_type_0_are_callable:u(2756,1,"Not_all_constituents_of_type_0_are_callable_2756","Not all constituents of type '{0}' are callable."),Type_0_has_no_call_signatures:u(2757,1,"Type_0_has_no_call_signatures_2757","Type '{0}' has no call signatures."),Each_member_of_the_union_type_0_has_signatures_but_none_of_those_signatures_are_compatible_with_each_other:u(2758,1,"Each_member_of_the_union_type_0_has_signatures_but_none_of_those_signatures_are_compatible_with_each_2758","Each member of the union type '{0}' has signatures, but none of those signatures are compatible with each other."),No_constituent_of_type_0_is_constructable:u(2759,1,"No_constituent_of_type_0_is_constructable_2759","No constituent of type '{0}' is constructable."),Not_all_constituents_of_type_0_are_constructable:u(2760,1,"Not_all_constituents_of_type_0_are_constructable_2760","Not all constituents of type '{0}' are constructable."),Type_0_has_no_construct_signatures:u(2761,1,"Type_0_has_no_construct_signatures_2761","Type '{0}' has no construct signatures."),Each_member_of_the_union_type_0_has_construct_signatures_but_none_of_those_signatures_are_compatible_with_each_other:u(2762,1,"Each_member_of_the_union_type_0_has_construct_signatures_but_none_of_those_signatures_are_compatible_2762","Each member of the union type '{0}' has construct signatures, but none of those signatures are compatible with each other."),Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_for_of_will_always_send_0:u(2763,1,"Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_for_of_will_always_s_2763","Cannot iterate value because the 'next' method of its iterator expects type '{1}', but for-of will always send '{0}'."),Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_spread_will_always_send_0:u(2764,1,"Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_spread_will_al_2764","Cannot iterate value because the 'next' method of its iterator expects type '{1}', but array spread will always send '{0}'."),Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_destructuring_will_always_send_0:u(2765,1,"Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_destructuring__2765","Cannot iterate value because the 'next' method of its iterator expects type '{1}', but array destructuring will always send '{0}'."),Cannot_delegate_iteration_to_value_because_the_next_method_of_its_iterator_expects_type_1_but_the_containing_generator_will_always_send_0:u(2766,1,"Cannot_delegate_iteration_to_value_because_the_next_method_of_its_iterator_expects_type_1_but_the_co_2766","Cannot delegate iteration to value because the 'next' method of its iterator expects type '{1}', but the containing generator will always send '{0}'."),The_0_property_of_an_iterator_must_be_a_method:u(2767,1,"The_0_property_of_an_iterator_must_be_a_method_2767","The '{0}' property of an iterator must be a method."),The_0_property_of_an_async_iterator_must_be_a_method:u(2768,1,"The_0_property_of_an_async_iterator_must_be_a_method_2768","The '{0}' property of an async iterator must be a method."),No_overload_matches_this_call:u(2769,1,"No_overload_matches_this_call_2769","No overload matches this call."),The_last_overload_gave_the_following_error:u(2770,1,"The_last_overload_gave_the_following_error_2770","The last overload gave the following error."),The_last_overload_is_declared_here:u(2771,1,"The_last_overload_is_declared_here_2771","The last overload is declared here."),Overload_0_of_1_2_gave_the_following_error:u(2772,1,"Overload_0_of_1_2_gave_the_following_error_2772","Overload {0} of {1}, '{2}', gave the following error."),Did_you_forget_to_use_await:u(2773,1,"Did_you_forget_to_use_await_2773","Did you forget to use 'await'?"),This_condition_will_always_return_true_since_this_function_is_always_defined_Did_you_mean_to_call_it_instead:u(2774,1,"This_condition_will_always_return_true_since_this_function_is_always_defined_Did_you_mean_to_call_it_2774","This condition will always return true since this function is always defined. Did you mean to call it instead?"),Assertions_require_every_name_in_the_call_target_to_be_declared_with_an_explicit_type_annotation:u(2775,1,"Assertions_require_every_name_in_the_call_target_to_be_declared_with_an_explicit_type_annotation_2775","Assertions require every name in the call target to be declared with an explicit type annotation."),Assertions_require_the_call_target_to_be_an_identifier_or_qualified_name:u(2776,1,"Assertions_require_the_call_target_to_be_an_identifier_or_qualified_name_2776","Assertions require the call target to be an identifier or qualified name."),The_operand_of_an_increment_or_decrement_operator_may_not_be_an_optional_property_access:u(2777,1,"The_operand_of_an_increment_or_decrement_operator_may_not_be_an_optional_property_access_2777","The operand of an increment or decrement operator may not be an optional property access."),The_target_of_an_object_rest_assignment_may_not_be_an_optional_property_access:u(2778,1,"The_target_of_an_object_rest_assignment_may_not_be_an_optional_property_access_2778","The target of an object rest assignment may not be an optional property access."),The_left_hand_side_of_an_assignment_expression_may_not_be_an_optional_property_access:u(2779,1,"The_left_hand_side_of_an_assignment_expression_may_not_be_an_optional_property_access_2779","The left-hand side of an assignment expression may not be an optional property access."),The_left_hand_side_of_a_for_in_statement_may_not_be_an_optional_property_access:u(2780,1,"The_left_hand_side_of_a_for_in_statement_may_not_be_an_optional_property_access_2780","The left-hand side of a 'for...in' statement may not be an optional property access."),The_left_hand_side_of_a_for_of_statement_may_not_be_an_optional_property_access:u(2781,1,"The_left_hand_side_of_a_for_of_statement_may_not_be_an_optional_property_access_2781","The left-hand side of a 'for...of' statement may not be an optional property access."),_0_needs_an_explicit_type_annotation:u(2782,3,"_0_needs_an_explicit_type_annotation_2782","'{0}' needs an explicit type annotation."),_0_is_specified_more_than_once_so_this_usage_will_be_overwritten:u(2783,1,"_0_is_specified_more_than_once_so_this_usage_will_be_overwritten_2783","'{0}' is specified more than once, so this usage will be overwritten."),get_and_set_accessors_cannot_declare_this_parameters:u(2784,1,"get_and_set_accessors_cannot_declare_this_parameters_2784","'get' and 'set' accessors cannot declare 'this' parameters."),This_spread_always_overwrites_this_property:u(2785,1,"This_spread_always_overwrites_this_property_2785","This spread always overwrites this property."),_0_cannot_be_used_as_a_JSX_component:u(2786,1,"_0_cannot_be_used_as_a_JSX_component_2786","'{0}' cannot be used as a JSX component."),Its_return_type_0_is_not_a_valid_JSX_element:u(2787,1,"Its_return_type_0_is_not_a_valid_JSX_element_2787","Its return type '{0}' is not a valid JSX element."),Its_instance_type_0_is_not_a_valid_JSX_element:u(2788,1,"Its_instance_type_0_is_not_a_valid_JSX_element_2788","Its instance type '{0}' is not a valid JSX element."),Its_element_type_0_is_not_a_valid_JSX_element:u(2789,1,"Its_element_type_0_is_not_a_valid_JSX_element_2789","Its element type '{0}' is not a valid JSX element."),The_operand_of_a_delete_operator_must_be_optional:u(2790,1,"The_operand_of_a_delete_operator_must_be_optional_2790","The operand of a 'delete' operator must be optional."),Exponentiation_cannot_be_performed_on_bigint_values_unless_the_target_option_is_set_to_es2016_or_later:u(2791,1,"Exponentiation_cannot_be_performed_on_bigint_values_unless_the_target_option_is_set_to_es2016_or_lat_2791","Exponentiation cannot be performed on 'bigint' values unless the 'target' option is set to 'es2016' or later."),Cannot_find_module_0_Did_you_mean_to_set_the_moduleResolution_option_to_nodenext_or_to_add_aliases_to_the_paths_option:u(2792,1,"Cannot_find_module_0_Did_you_mean_to_set_the_moduleResolution_option_to_nodenext_or_to_add_aliases_t_2792","Cannot find module '{0}'. Did you mean to set the 'moduleResolution' option to 'nodenext', or to add aliases to the 'paths' option?"),The_call_would_have_succeeded_against_this_implementation_but_implementation_signatures_of_overloads_are_not_externally_visible:u(2793,1,"The_call_would_have_succeeded_against_this_implementation_but_implementation_signatures_of_overloads_2793","The call would have succeeded against this implementation, but implementation signatures of overloads are not externally visible."),Expected_0_arguments_but_got_1_Did_you_forget_to_include_void_in_your_type_argument_to_Promise:u(2794,1,"Expected_0_arguments_but_got_1_Did_you_forget_to_include_void_in_your_type_argument_to_Promise_2794","Expected {0} arguments, but got {1}. Did you forget to include 'void' in your type argument to 'Promise'?"),The_intrinsic_keyword_can_only_be_used_to_declare_compiler_provided_intrinsic_types:u(2795,1,"The_intrinsic_keyword_can_only_be_used_to_declare_compiler_provided_intrinsic_types_2795","The 'intrinsic' keyword can only be used to declare compiler provided intrinsic types."),It_is_likely_that_you_are_missing_a_comma_to_separate_these_two_template_expressions_They_form_a_tagged_template_expression_which_cannot_be_invoked:u(2796,1,"It_is_likely_that_you_are_missing_a_comma_to_separate_these_two_template_expressions_They_form_a_tag_2796","It is likely that you are missing a comma to separate these two template expressions. They form a tagged template expression which cannot be invoked."),A_mixin_class_that_extends_from_a_type_variable_containing_an_abstract_construct_signature_must_also_be_declared_abstract:u(2797,1,"A_mixin_class_that_extends_from_a_type_variable_containing_an_abstract_construct_signature_must_also_2797","A mixin class that extends from a type variable containing an abstract construct signature must also be declared 'abstract'."),The_declaration_was_marked_as_deprecated_here:u(2798,1,"The_declaration_was_marked_as_deprecated_here_2798","The declaration was marked as deprecated here."),Type_produces_a_tuple_type_that_is_too_large_to_represent:u(2799,1,"Type_produces_a_tuple_type_that_is_too_large_to_represent_2799","Type produces a tuple type that is too large to represent."),Expression_produces_a_tuple_type_that_is_too_large_to_represent:u(2800,1,"Expression_produces_a_tuple_type_that_is_too_large_to_represent_2800","Expression produces a tuple type that is too large to represent."),This_condition_will_always_return_true_since_this_0_is_always_defined:u(2801,1,"This_condition_will_always_return_true_since_this_0_is_always_defined_2801","This condition will always return true since this '{0}' is always defined."),Type_0_can_only_be_iterated_through_when_using_the_downlevelIteration_flag_or_with_a_target_of_es2015_or_higher:u(2802,1,"Type_0_can_only_be_iterated_through_when_using_the_downlevelIteration_flag_or_with_a_target_of_es201_2802","Type '{0}' can only be iterated through when using the '--downlevelIteration' flag or with a '--target' of 'es2015' or higher."),Cannot_assign_to_private_method_0_Private_methods_are_not_writable:u(2803,1,"Cannot_assign_to_private_method_0_Private_methods_are_not_writable_2803","Cannot assign to private method '{0}'. Private methods are not writable."),Duplicate_identifier_0_Static_and_instance_elements_cannot_share_the_same_private_name:u(2804,1,"Duplicate_identifier_0_Static_and_instance_elements_cannot_share_the_same_private_name_2804","Duplicate identifier '{0}'. Static and instance elements cannot share the same private name."),Private_accessor_was_defined_without_a_getter:u(2806,1,"Private_accessor_was_defined_without_a_getter_2806","Private accessor was defined without a getter."),This_syntax_requires_an_imported_helper_named_1_with_2_parameters_which_is_not_compatible_with_the_one_in_0_Consider_upgrading_your_version_of_0:u(2807,1,"This_syntax_requires_an_imported_helper_named_1_with_2_parameters_which_is_not_compatible_with_the_o_2807","This syntax requires an imported helper named '{1}' with {2} parameters, which is not compatible with the one in '{0}'. Consider upgrading your version of '{0}'."),A_get_accessor_must_be_at_least_as_accessible_as_the_setter:u(2808,1,"A_get_accessor_must_be_at_least_as_accessible_as_the_setter_2808","A get accessor must be at least as accessible as the setter"),Declaration_or_statement_expected_This_follows_a_block_of_statements_so_if_you_intended_to_write_a_destructuring_assignment_you_might_need_to_wrap_the_whole_assignment_in_parentheses:u(2809,1,"Declaration_or_statement_expected_This_follows_a_block_of_statements_so_if_you_intended_to_write_a_d_2809","Declaration or statement expected. This '=' follows a block of statements, so if you intended to write a destructuring assignment, you might need to wrap the whole assignment in parentheses."),Expected_1_argument_but_got_0_new_Promise_needs_a_JSDoc_hint_to_produce_a_resolve_that_can_be_called_without_arguments:u(2810,1,"Expected_1_argument_but_got_0_new_Promise_needs_a_JSDoc_hint_to_produce_a_resolve_that_can_be_called_2810","Expected 1 argument, but got 0. 'new Promise()' needs a JSDoc hint to produce a 'resolve' that can be called without arguments."),Initializer_for_property_0:u(2811,1,"Initializer_for_property_0_2811","Initializer for property '{0}'"),Property_0_does_not_exist_on_type_1_Try_changing_the_lib_compiler_option_to_include_dom:u(2812,1,"Property_0_does_not_exist_on_type_1_Try_changing_the_lib_compiler_option_to_include_dom_2812","Property '{0}' does not exist on type '{1}'. Try changing the 'lib' compiler option to include 'dom'."),Class_declaration_cannot_implement_overload_list_for_0:u(2813,1,"Class_declaration_cannot_implement_overload_list_for_0_2813","Class declaration cannot implement overload list for '{0}'."),Function_with_bodies_can_only_merge_with_classes_that_are_ambient:u(2814,1,"Function_with_bodies_can_only_merge_with_classes_that_are_ambient_2814","Function with bodies can only merge with classes that are ambient."),arguments_cannot_be_referenced_in_property_initializers_or_class_static_initialization_blocks:u(2815,1,"arguments_cannot_be_referenced_in_property_initializers_or_class_static_initialization_blocks_2815","'arguments' cannot be referenced in property initializers or class static initialization blocks."),Cannot_use_this_in_a_static_property_initializer_of_a_decorated_class:u(2816,1,"Cannot_use_this_in_a_static_property_initializer_of_a_decorated_class_2816","Cannot use 'this' in a static property initializer of a decorated class."),Property_0_has_no_initializer_and_is_not_definitely_assigned_in_a_class_static_block:u(2817,1,"Property_0_has_no_initializer_and_is_not_definitely_assigned_in_a_class_static_block_2817","Property '{0}' has no initializer and is not definitely assigned in a class static block."),Duplicate_identifier_0_Compiler_reserves_name_1_when_emitting_super_references_in_static_initializers:u(2818,1,"Duplicate_identifier_0_Compiler_reserves_name_1_when_emitting_super_references_in_static_initializer_2818","Duplicate identifier '{0}'. Compiler reserves name '{1}' when emitting 'super' references in static initializers."),Namespace_name_cannot_be_0:u(2819,1,"Namespace_name_cannot_be_0_2819","Namespace name cannot be '{0}'."),Type_0_is_not_assignable_to_type_1_Did_you_mean_2:u(2820,1,"Type_0_is_not_assignable_to_type_1_Did_you_mean_2_2820","Type '{0}' is not assignable to type '{1}'. Did you mean '{2}'?"),Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_node18_node20_nodenext_or_preserve:u(2821,1,"Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_node18_node20_nodenext__2821","Import assertions are only supported when the '--module' option is set to 'esnext', 'node18', 'node20', 'nodenext', or 'preserve'."),Import_assertions_cannot_be_used_with_type_only_imports_or_exports:u(2822,1,"Import_assertions_cannot_be_used_with_type_only_imports_or_exports_2822","Import assertions cannot be used with type-only imports or exports."),Import_attributes_are_only_supported_when_the_module_option_is_set_to_esnext_node18_node20_nodenext_or_preserve:u(2823,1,"Import_attributes_are_only_supported_when_the_module_option_is_set_to_esnext_node18_node20_nodenext__2823","Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'node20', 'nodenext', or 'preserve'."),Cannot_find_namespace_0_Did_you_mean_1:u(2833,1,"Cannot_find_namespace_0_Did_you_mean_1_2833","Cannot find namespace '{0}'. Did you mean '{1}'?"),Relative_import_paths_need_explicit_file_extensions_in_ECMAScript_imports_when_moduleResolution_is_node16_or_nodenext_Consider_adding_an_extension_to_the_import_path:u(2834,1,"Relative_import_paths_need_explicit_file_extensions_in_ECMAScript_imports_when_moduleResolution_is_n_2834","Relative import paths need explicit file extensions in ECMAScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path."),Relative_import_paths_need_explicit_file_extensions_in_ECMAScript_imports_when_moduleResolution_is_node16_or_nodenext_Did_you_mean_0:u(2835,1,"Relative_import_paths_need_explicit_file_extensions_in_ECMAScript_imports_when_moduleResolution_is_n_2835","Relative import paths need explicit file extensions in ECMAScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean '{0}'?"),Import_assertions_are_not_allowed_on_statements_that_compile_to_CommonJS_require_calls:u(2836,1,"Import_assertions_are_not_allowed_on_statements_that_compile_to_CommonJS_require_calls_2836","Import assertions are not allowed on statements that compile to CommonJS 'require' calls."),Import_assertion_values_must_be_string_literal_expressions:u(2837,1,"Import_assertion_values_must_be_string_literal_expressions_2837","Import assertion values must be string literal expressions."),All_declarations_of_0_must_have_identical_constraints:u(2838,1,"All_declarations_of_0_must_have_identical_constraints_2838","All declarations of '{0}' must have identical constraints."),This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value:u(2839,1,"This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value_2839","This condition will always return '{0}' since JavaScript compares objects by reference, not value."),An_interface_cannot_extend_a_primitive_type_like_0_It_can_only_extend_other_named_object_types:u(2840,1,"An_interface_cannot_extend_a_primitive_type_like_0_It_can_only_extend_other_named_object_types_2840","An interface cannot extend a primitive type like '{0}'. It can only extend other named object types."),_0_is_an_unused_renaming_of_1_Did_you_intend_to_use_it_as_a_type_annotation:u(2842,1,"_0_is_an_unused_renaming_of_1_Did_you_intend_to_use_it_as_a_type_annotation_2842","'{0}' is an unused renaming of '{1}'. Did you intend to use it as a type annotation?"),We_can_only_write_a_type_for_0_by_adding_a_type_for_the_entire_parameter_here:u(2843,1,"We_can_only_write_a_type_for_0_by_adding_a_type_for_the_entire_parameter_here_2843","We can only write a type for '{0}' by adding a type for the entire parameter here."),Type_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor:u(2844,1,"Type_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor_2844","Type of instance member variable '{0}' cannot reference identifier '{1}' declared in the constructor."),This_condition_will_always_return_0:u(2845,1,"This_condition_will_always_return_0_2845","This condition will always return '{0}'."),A_declaration_file_cannot_be_imported_without_import_type_Did_you_mean_to_import_an_implementation_file_0_instead:u(2846,1,"A_declaration_file_cannot_be_imported_without_import_type_Did_you_mean_to_import_an_implementation_f_2846","A declaration file cannot be imported without 'import type'. Did you mean to import an implementation file '{0}' instead?"),The_right_hand_side_of_an_instanceof_expression_must_not_be_an_instantiation_expression:u(2848,1,"The_right_hand_side_of_an_instanceof_expression_must_not_be_an_instantiation_expression_2848","The right-hand side of an 'instanceof' expression must not be an instantiation expression."),Target_signature_provides_too_few_arguments_Expected_0_or_more_but_got_1:u(2849,1,"Target_signature_provides_too_few_arguments_Expected_0_or_more_but_got_1_2849","Target signature provides too few arguments. Expected {0} or more, but got {1}."),The_initializer_of_a_using_declaration_must_be_either_an_object_with_a_Symbol_dispose_method_or_be_null_or_undefined:u(2850,1,"The_initializer_of_a_using_declaration_must_be_either_an_object_with_a_Symbol_dispose_method_or_be_n_2850","The initializer of a 'using' declaration must be either an object with a '[Symbol.dispose]()' method, or be 'null' or 'undefined'."),The_initializer_of_an_await_using_declaration_must_be_either_an_object_with_a_Symbol_asyncDispose_or_Symbol_dispose_method_or_be_null_or_undefined:u(2851,1,"The_initializer_of_an_await_using_declaration_must_be_either_an_object_with_a_Symbol_asyncDispose_or_2851","The initializer of an 'await using' declaration must be either an object with a '[Symbol.asyncDispose]()' or '[Symbol.dispose]()' method, or be 'null' or 'undefined'."),await_using_statements_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules:u(2852,1,"await_using_statements_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules_2852","'await using' statements are only allowed within async functions and at the top levels of modules."),await_using_statements_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module:u(2853,1,"await_using_statements_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_th_2853","'await using' statements are only allowed at the top level of a file when that file is a module, but this file has no imports or exports. Consider adding an empty 'export {}' to make this file a module."),Top_level_await_using_statements_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_node18_node20_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher:u(2854,1,"Top_level_await_using_statements_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_sys_2854","Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher."),Class_field_0_defined_by_the_parent_class_is_not_accessible_in_the_child_class_via_super:u(2855,1,"Class_field_0_defined_by_the_parent_class_is_not_accessible_in_the_child_class_via_super_2855","Class field '{0}' defined by the parent class is not accessible in the child class via super."),Import_attributes_are_not_allowed_on_statements_that_compile_to_CommonJS_require_calls:u(2856,1,"Import_attributes_are_not_allowed_on_statements_that_compile_to_CommonJS_require_calls_2856","Import attributes are not allowed on statements that compile to CommonJS 'require' calls."),Import_attributes_cannot_be_used_with_type_only_imports_or_exports:u(2857,1,"Import_attributes_cannot_be_used_with_type_only_imports_or_exports_2857","Import attributes cannot be used with type-only imports or exports."),Import_attribute_values_must_be_string_literal_expressions:u(2858,1,"Import_attribute_values_must_be_string_literal_expressions_2858","Import attribute values must be string literal expressions."),Excessive_complexity_comparing_types_0_and_1:u(2859,1,"Excessive_complexity_comparing_types_0_and_1_2859","Excessive complexity comparing types '{0}' and '{1}'."),The_left_hand_side_of_an_instanceof_expression_must_be_assignable_to_the_first_argument_of_the_right_hand_side_s_Symbol_hasInstance_method:u(2860,1,"The_left_hand_side_of_an_instanceof_expression_must_be_assignable_to_the_first_argument_of_the_right_2860","The left-hand side of an 'instanceof' expression must be assignable to the first argument of the right-hand side's '[Symbol.hasInstance]' method."),An_object_s_Symbol_hasInstance_method_must_return_a_boolean_value_for_it_to_be_used_on_the_right_hand_side_of_an_instanceof_expression:u(2861,1,"An_object_s_Symbol_hasInstance_method_must_return_a_boolean_value_for_it_to_be_used_on_the_right_han_2861","An object's '[Symbol.hasInstance]' method must return a boolean value for it to be used on the right-hand side of an 'instanceof' expression."),Type_0_is_generic_and_can_only_be_indexed_for_reading:u(2862,1,"Type_0_is_generic_and_can_only_be_indexed_for_reading_2862","Type '{0}' is generic and can only be indexed for reading."),A_class_cannot_extend_a_primitive_type_like_0_Classes_can_only_extend_constructable_values:u(2863,1,"A_class_cannot_extend_a_primitive_type_like_0_Classes_can_only_extend_constructable_values_2863","A class cannot extend a primitive type like '{0}'. Classes can only extend constructable values."),A_class_cannot_implement_a_primitive_type_like_0_It_can_only_implement_other_named_object_types:u(2864,1,"A_class_cannot_implement_a_primitive_type_like_0_It_can_only_implement_other_named_object_types_2864","A class cannot implement a primitive type like '{0}'. It can only implement other named object types."),Import_0_conflicts_with_local_value_so_must_be_declared_with_a_type_only_import_when_isolatedModules_is_enabled:u(2865,1,"Import_0_conflicts_with_local_value_so_must_be_declared_with_a_type_only_import_when_isolatedModules_2865","Import '{0}' conflicts with local value, so must be declared with a type-only import when 'isolatedModules' is enabled."),Import_0_conflicts_with_global_value_used_in_this_file_so_must_be_declared_with_a_type_only_import_when_isolatedModules_is_enabled:u(2866,1,"Import_0_conflicts_with_global_value_used_in_this_file_so_must_be_declared_with_a_type_only_import_w_2866","Import '{0}' conflicts with global value used in this file, so must be declared with a type-only import when 'isolatedModules' is enabled."),Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_Bun_Try_npm_i_save_dev_types_Slashbun:u(2867,1,"Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_Bun_Try_npm_i_save_dev_types_Slashbun_2867","Cannot find name '{0}'. Do you need to install type definitions for Bun? Try `npm i --save-dev @types/bun`."),Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_Bun_Try_npm_i_save_dev_types_Slashbun_and_then_add_bun_to_the_types_field_in_your_tsconfig:u(2868,1,"Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_Bun_Try_npm_i_save_dev_types_Slashbun_2868","Cannot find name '{0}'. Do you need to install type definitions for Bun? Try `npm i --save-dev @types/bun` and then add 'bun' to the types field in your tsconfig."),Right_operand_of_is_unreachable_because_the_left_operand_is_never_nullish:u(2869,1,"Right_operand_of_is_unreachable_because_the_left_operand_is_never_nullish_2869","Right operand of ?? is unreachable because the left operand is never nullish."),This_binary_expression_is_never_nullish_Are_you_missing_parentheses:u(2870,1,"This_binary_expression_is_never_nullish_Are_you_missing_parentheses_2870","This binary expression is never nullish. Are you missing parentheses?"),This_expression_is_always_nullish:u(2871,1,"This_expression_is_always_nullish_2871","This expression is always nullish."),This_kind_of_expression_is_always_truthy:u(2872,1,"This_kind_of_expression_is_always_truthy_2872","This kind of expression is always truthy."),This_kind_of_expression_is_always_falsy:u(2873,1,"This_kind_of_expression_is_always_falsy_2873","This kind of expression is always falsy."),This_JSX_tag_requires_0_to_be_in_scope_but_it_could_not_be_found:u(2874,1,"This_JSX_tag_requires_0_to_be_in_scope_but_it_could_not_be_found_2874","This JSX tag requires '{0}' to be in scope, but it could not be found."),This_JSX_tag_requires_the_module_path_0_to_exist_but_none_could_be_found_Make_sure_you_have_types_for_the_appropriate_package_installed:u(2875,1,"This_JSX_tag_requires_the_module_path_0_to_exist_but_none_could_be_found_Make_sure_you_have_types_fo_2875","This JSX tag requires the module path '{0}' to exist, but none could be found. Make sure you have types for the appropriate package installed."),This_relative_import_path_is_unsafe_to_rewrite_because_it_looks_like_a_file_name_but_actually_resolves_to_0:u(2876,1,"This_relative_import_path_is_unsafe_to_rewrite_because_it_looks_like_a_file_name_but_actually_resolv_2876",'This relative import path is unsafe to rewrite because it looks like a file name, but actually resolves to "{0}".'),This_import_uses_a_0_extension_to_resolve_to_an_input_TypeScript_file_but_will_not_be_rewritten_during_emit_because_it_is_not_a_relative_path:u(2877,1,"This_import_uses_a_0_extension_to_resolve_to_an_input_TypeScript_file_but_will_not_be_rewritten_duri_2877","This import uses a '{0}' extension to resolve to an input TypeScript file, but will not be rewritten during emit because it is not a relative path."),This_import_path_is_unsafe_to_rewrite_because_it_resolves_to_another_project_and_the_relative_path_between_the_projects_output_files_is_not_the_same_as_the_relative_path_between_its_input_files:u(2878,1,"This_import_path_is_unsafe_to_rewrite_because_it_resolves_to_another_project_and_the_relative_path_b_2878","This import path is unsafe to rewrite because it resolves to another project, and the relative path between the projects' output files is not the same as the relative path between its input files."),Using_JSX_fragments_requires_fragment_factory_0_to_be_in_scope_but_it_could_not_be_found:u(2879,1,"Using_JSX_fragments_requires_fragment_factory_0_to_be_in_scope_but_it_could_not_be_found_2879","Using JSX fragments requires fragment factory '{0}' to be in scope, but it could not be found."),Import_assertions_have_been_replaced_by_import_attributes_Use_with_instead_of_assert:u(2880,1,"Import_assertions_have_been_replaced_by_import_attributes_Use_with_instead_of_assert_2880","Import assertions have been replaced by import attributes. Use 'with' instead of 'assert'."),This_expression_is_never_nullish:u(2881,1,"This_expression_is_never_nullish_2881","This expression is never nullish."),Import_declaration_0_is_using_private_name_1:u(4e3,1,"Import_declaration_0_is_using_private_name_1_4000","Import declaration '{0}' is using private name '{1}'."),Type_parameter_0_of_exported_class_has_or_is_using_private_name_1:u(4002,1,"Type_parameter_0_of_exported_class_has_or_is_using_private_name_1_4002","Type parameter '{0}' of exported class has or is using private name '{1}'."),Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1:u(4004,1,"Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1_4004","Type parameter '{0}' of exported interface has or is using private name '{1}'."),Type_parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1:u(4006,1,"Type_parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1_4006","Type parameter '{0}' of constructor signature from exported interface has or is using private name '{1}'."),Type_parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1:u(4008,1,"Type_parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1_4008","Type parameter '{0}' of call signature from exported interface has or is using private name '{1}'."),Type_parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1:u(4010,1,"Type_parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1_4010","Type parameter '{0}' of public static method from exported class has or is using private name '{1}'."),Type_parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1:u(4012,1,"Type_parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1_4012","Type parameter '{0}' of public method from exported class has or is using private name '{1}'."),Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1:u(4014,1,"Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1_4014","Type parameter '{0}' of method from exported interface has or is using private name '{1}'."),Type_parameter_0_of_exported_function_has_or_is_using_private_name_1:u(4016,1,"Type_parameter_0_of_exported_function_has_or_is_using_private_name_1_4016","Type parameter '{0}' of exported function has or is using private name '{1}'."),Implements_clause_of_exported_class_0_has_or_is_using_private_name_1:u(4019,1,"Implements_clause_of_exported_class_0_has_or_is_using_private_name_1_4019","Implements clause of exported class '{0}' has or is using private name '{1}'."),extends_clause_of_exported_class_0_has_or_is_using_private_name_1:u(4020,1,"extends_clause_of_exported_class_0_has_or_is_using_private_name_1_4020","'extends' clause of exported class '{0}' has or is using private name '{1}'."),extends_clause_of_exported_class_has_or_is_using_private_name_0:u(4021,1,"extends_clause_of_exported_class_has_or_is_using_private_name_0_4021","'extends' clause of exported class has or is using private name '{0}'."),extends_clause_of_exported_interface_0_has_or_is_using_private_name_1:u(4022,1,"extends_clause_of_exported_interface_0_has_or_is_using_private_name_1_4022","'extends' clause of exported interface '{0}' has or is using private name '{1}'."),Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:u(4023,1,"Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named_4023","Exported variable '{0}' has or is using name '{1}' from external module {2} but cannot be named."),Exported_variable_0_has_or_is_using_name_1_from_private_module_2:u(4024,1,"Exported_variable_0_has_or_is_using_name_1_from_private_module_2_4024","Exported variable '{0}' has or is using name '{1}' from private module '{2}'."),Exported_variable_0_has_or_is_using_private_name_1:u(4025,1,"Exported_variable_0_has_or_is_using_private_name_1_4025","Exported variable '{0}' has or is using private name '{1}'."),Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:u(4026,1,"Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot__4026","Public static property '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named."),Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2:u(4027,1,"Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2_4027","Public static property '{0}' of exported class has or is using name '{1}' from private module '{2}'."),Public_static_property_0_of_exported_class_has_or_is_using_private_name_1:u(4028,1,"Public_static_property_0_of_exported_class_has_or_is_using_private_name_1_4028","Public static property '{0}' of exported class has or is using private name '{1}'."),Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:u(4029,1,"Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_name_4029","Public property '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named."),Public_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2:u(4030,1,"Public_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2_4030","Public property '{0}' of exported class has or is using name '{1}' from private module '{2}'."),Public_property_0_of_exported_class_has_or_is_using_private_name_1:u(4031,1,"Public_property_0_of_exported_class_has_or_is_using_private_name_1_4031","Public property '{0}' of exported class has or is using private name '{1}'."),Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2:u(4032,1,"Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2_4032","Property '{0}' of exported interface has or is using name '{1}' from private module '{2}'."),Property_0_of_exported_interface_has_or_is_using_private_name_1:u(4033,1,"Property_0_of_exported_interface_has_or_is_using_private_name_1_4033","Property '{0}' of exported interface has or is using private name '{1}'."),Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2:u(4034,1,"Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_name_1_from_private_mod_4034","Parameter type of public static setter '{0}' from exported class has or is using name '{1}' from private module '{2}'."),Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_private_name_1:u(4035,1,"Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_private_name_1_4035","Parameter type of public static setter '{0}' from exported class has or is using private name '{1}'."),Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2:u(4036,1,"Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2_4036","Parameter type of public setter '{0}' from exported class has or is using name '{1}' from private module '{2}'."),Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_private_name_1:u(4037,1,"Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_private_name_1_4037","Parameter type of public setter '{0}' from exported class has or is using private name '{1}'."),Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:u(4038,1,"Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_name_1_from_external_modul_4038","Return type of public static getter '{0}' from exported class has or is using name '{1}' from external module {2} but cannot be named."),Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2:u(4039,1,"Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_name_1_from_private_module_4039","Return type of public static getter '{0}' from exported class has or is using name '{1}' from private module '{2}'."),Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_private_name_1:u(4040,1,"Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_private_name_1_4040","Return type of public static getter '{0}' from exported class has or is using private name '{1}'."),Return_type_of_public_getter_0_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:u(4041,1,"Return_type_of_public_getter_0_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_4041","Return type of public getter '{0}' from exported class has or is using name '{1}' from external module {2} but cannot be named."),Return_type_of_public_getter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2:u(4042,1,"Return_type_of_public_getter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2_4042","Return type of public getter '{0}' from exported class has or is using name '{1}' from private module '{2}'."),Return_type_of_public_getter_0_from_exported_class_has_or_is_using_private_name_1:u(4043,1,"Return_type_of_public_getter_0_from_exported_class_has_or_is_using_private_name_1_4043","Return type of public getter '{0}' from exported class has or is using private name '{1}'."),Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1:u(4044,1,"Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_name_0_from_private_mod_4044","Return type of constructor signature from exported interface has or is using name '{0}' from private module '{1}'."),Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_0:u(4045,1,"Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_0_4045","Return type of constructor signature from exported interface has or is using private name '{0}'."),Return_type_of_call_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1:u(4046,1,"Return_type_of_call_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1_4046","Return type of call signature from exported interface has or is using name '{0}' from private module '{1}'."),Return_type_of_call_signature_from_exported_interface_has_or_is_using_private_name_0:u(4047,1,"Return_type_of_call_signature_from_exported_interface_has_or_is_using_private_name_0_4047","Return type of call signature from exported interface has or is using private name '{0}'."),Return_type_of_index_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1:u(4048,1,"Return_type_of_index_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1_4048","Return type of index signature from exported interface has or is using name '{0}' from private module '{1}'."),Return_type_of_index_signature_from_exported_interface_has_or_is_using_private_name_0:u(4049,1,"Return_type_of_index_signature_from_exported_interface_has_or_is_using_private_name_0_4049","Return type of index signature from exported interface has or is using private name '{0}'."),Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named:u(4050,1,"Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_external_module__4050","Return type of public static method from exported class has or is using name '{0}' from external module {1} but cannot be named."),Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_private_module_1:u(4051,1,"Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_private_module_1_4051","Return type of public static method from exported class has or is using name '{0}' from private module '{1}'."),Return_type_of_public_static_method_from_exported_class_has_or_is_using_private_name_0:u(4052,1,"Return_type_of_public_static_method_from_exported_class_has_or_is_using_private_name_0_4052","Return type of public static method from exported class has or is using private name '{0}'."),Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named:u(4053,1,"Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_c_4053","Return type of public method from exported class has or is using name '{0}' from external module {1} but cannot be named."),Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_private_module_1:u(4054,1,"Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_private_module_1_4054","Return type of public method from exported class has or is using name '{0}' from private module '{1}'."),Return_type_of_public_method_from_exported_class_has_or_is_using_private_name_0:u(4055,1,"Return_type_of_public_method_from_exported_class_has_or_is_using_private_name_0_4055","Return type of public method from exported class has or is using private name '{0}'."),Return_type_of_method_from_exported_interface_has_or_is_using_name_0_from_private_module_1:u(4056,1,"Return_type_of_method_from_exported_interface_has_or_is_using_name_0_from_private_module_1_4056","Return type of method from exported interface has or is using name '{0}' from private module '{1}'."),Return_type_of_method_from_exported_interface_has_or_is_using_private_name_0:u(4057,1,"Return_type_of_method_from_exported_interface_has_or_is_using_private_name_0_4057","Return type of method from exported interface has or is using private name '{0}'."),Return_type_of_exported_function_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named:u(4058,1,"Return_type_of_exported_function_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named_4058","Return type of exported function has or is using name '{0}' from external module {1} but cannot be named."),Return_type_of_exported_function_has_or_is_using_name_0_from_private_module_1:u(4059,1,"Return_type_of_exported_function_has_or_is_using_name_0_from_private_module_1_4059","Return type of exported function has or is using name '{0}' from private module '{1}'."),Return_type_of_exported_function_has_or_is_using_private_name_0:u(4060,1,"Return_type_of_exported_function_has_or_is_using_private_name_0_4060","Return type of exported function has or is using private name '{0}'."),Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:u(4061,1,"Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_can_4061","Parameter '{0}' of constructor from exported class has or is using name '{1}' from external module {2} but cannot be named."),Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_private_module_2:u(4062,1,"Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_private_module_2_4062","Parameter '{0}' of constructor from exported class has or is using name '{1}' from private module '{2}'."),Parameter_0_of_constructor_from_exported_class_has_or_is_using_private_name_1:u(4063,1,"Parameter_0_of_constructor_from_exported_class_has_or_is_using_private_name_1_4063","Parameter '{0}' of constructor from exported class has or is using private name '{1}'."),Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2:u(4064,1,"Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_name_1_from_private_mod_4064","Parameter '{0}' of constructor signature from exported interface has or is using name '{1}' from private module '{2}'."),Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1:u(4065,1,"Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1_4065","Parameter '{0}' of constructor signature from exported interface has or is using private name '{1}'."),Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2:u(4066,1,"Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2_4066","Parameter '{0}' of call signature from exported interface has or is using name '{1}' from private module '{2}'."),Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1:u(4067,1,"Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1_4067","Parameter '{0}' of call signature from exported interface has or is using private name '{1}'."),Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:u(4068,1,"Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_external_module__4068","Parameter '{0}' of public static method from exported class has or is using name '{1}' from external module {2} but cannot be named."),Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_private_module_2:u(4069,1,"Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_private_module_2_4069","Parameter '{0}' of public static method from exported class has or is using name '{1}' from private module '{2}'."),Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1:u(4070,1,"Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1_4070","Parameter '{0}' of public static method from exported class has or is using private name '{1}'."),Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:u(4071,1,"Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_c_4071","Parameter '{0}' of public method from exported class has or is using name '{1}' from external module {2} but cannot be named."),Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_private_module_2:u(4072,1,"Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_private_module_2_4072","Parameter '{0}' of public method from exported class has or is using name '{1}' from private module '{2}'."),Parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1:u(4073,1,"Parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1_4073","Parameter '{0}' of public method from exported class has or is using private name '{1}'."),Parameter_0_of_method_from_exported_interface_has_or_is_using_name_1_from_private_module_2:u(4074,1,"Parameter_0_of_method_from_exported_interface_has_or_is_using_name_1_from_private_module_2_4074","Parameter '{0}' of method from exported interface has or is using name '{1}' from private module '{2}'."),Parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1:u(4075,1,"Parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1_4075","Parameter '{0}' of method from exported interface has or is using private name '{1}'."),Parameter_0_of_exported_function_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:u(4076,1,"Parameter_0_of_exported_function_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named_4076","Parameter '{0}' of exported function has or is using name '{1}' from external module {2} but cannot be named."),Parameter_0_of_exported_function_has_or_is_using_name_1_from_private_module_2:u(4077,1,"Parameter_0_of_exported_function_has_or_is_using_name_1_from_private_module_2_4077","Parameter '{0}' of exported function has or is using name '{1}' from private module '{2}'."),Parameter_0_of_exported_function_has_or_is_using_private_name_1:u(4078,1,"Parameter_0_of_exported_function_has_or_is_using_private_name_1_4078","Parameter '{0}' of exported function has or is using private name '{1}'."),Exported_type_alias_0_has_or_is_using_private_name_1:u(4081,1,"Exported_type_alias_0_has_or_is_using_private_name_1_4081","Exported type alias '{0}' has or is using private name '{1}'."),Default_export_of_the_module_has_or_is_using_private_name_0:u(4082,1,"Default_export_of_the_module_has_or_is_using_private_name_0_4082","Default export of the module has or is using private name '{0}'."),Type_parameter_0_of_exported_type_alias_has_or_is_using_private_name_1:u(4083,1,"Type_parameter_0_of_exported_type_alias_has_or_is_using_private_name_1_4083","Type parameter '{0}' of exported type alias has or is using private name '{1}'."),Exported_type_alias_0_has_or_is_using_private_name_1_from_module_2:u(4084,1,"Exported_type_alias_0_has_or_is_using_private_name_1_from_module_2_4084","Exported type alias '{0}' has or is using private name '{1}' from module {2}."),Extends_clause_for_inferred_type_0_has_or_is_using_private_name_1:u(4085,1,"Extends_clause_for_inferred_type_0_has_or_is_using_private_name_1_4085","Extends clause for inferred type '{0}' has or is using private name '{1}'."),Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2:u(4091,1,"Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2_4091","Parameter '{0}' of index signature from exported interface has or is using name '{1}' from private module '{2}'."),Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_private_name_1:u(4092,1,"Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_private_name_1_4092","Parameter '{0}' of index signature from exported interface has or is using private name '{1}'."),Property_0_of_exported_anonymous_class_type_may_not_be_private_or_protected:u(4094,1,"Property_0_of_exported_anonymous_class_type_may_not_be_private_or_protected_4094","Property '{0}' of exported anonymous class type may not be private or protected."),Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:u(4095,1,"Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_4095","Public static method '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named."),Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2:u(4096,1,"Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2_4096","Public static method '{0}' of exported class has or is using name '{1}' from private module '{2}'."),Public_static_method_0_of_exported_class_has_or_is_using_private_name_1:u(4097,1,"Public_static_method_0_of_exported_class_has_or_is_using_private_name_1_4097","Public static method '{0}' of exported class has or is using private name '{1}'."),Public_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:u(4098,1,"Public_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named_4098","Public method '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named."),Public_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2:u(4099,1,"Public_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2_4099","Public method '{0}' of exported class has or is using name '{1}' from private module '{2}'."),Public_method_0_of_exported_class_has_or_is_using_private_name_1:u(4100,1,"Public_method_0_of_exported_class_has_or_is_using_private_name_1_4100","Public method '{0}' of exported class has or is using private name '{1}'."),Method_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2:u(4101,1,"Method_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2_4101","Method '{0}' of exported interface has or is using name '{1}' from private module '{2}'."),Method_0_of_exported_interface_has_or_is_using_private_name_1:u(4102,1,"Method_0_of_exported_interface_has_or_is_using_private_name_1_4102","Method '{0}' of exported interface has or is using private name '{1}'."),Type_parameter_0_of_exported_mapped_object_type_is_using_private_name_1:u(4103,1,"Type_parameter_0_of_exported_mapped_object_type_is_using_private_name_1_4103","Type parameter '{0}' of exported mapped object type is using private name '{1}'."),The_type_0_is_readonly_and_cannot_be_assigned_to_the_mutable_type_1:u(4104,1,"The_type_0_is_readonly_and_cannot_be_assigned_to_the_mutable_type_1_4104","The type '{0}' is 'readonly' and cannot be assigned to the mutable type '{1}'."),Private_or_protected_member_0_cannot_be_accessed_on_a_type_parameter:u(4105,1,"Private_or_protected_member_0_cannot_be_accessed_on_a_type_parameter_4105","Private or protected member '{0}' cannot be accessed on a type parameter."),Parameter_0_of_accessor_has_or_is_using_private_name_1:u(4106,1,"Parameter_0_of_accessor_has_or_is_using_private_name_1_4106","Parameter '{0}' of accessor has or is using private name '{1}'."),Parameter_0_of_accessor_has_or_is_using_name_1_from_private_module_2:u(4107,1,"Parameter_0_of_accessor_has_or_is_using_name_1_from_private_module_2_4107","Parameter '{0}' of accessor has or is using name '{1}' from private module '{2}'."),Parameter_0_of_accessor_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:u(4108,1,"Parameter_0_of_accessor_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named_4108","Parameter '{0}' of accessor has or is using name '{1}' from external module '{2}' but cannot be named."),Type_arguments_for_0_circularly_reference_themselves:u(4109,1,"Type_arguments_for_0_circularly_reference_themselves_4109","Type arguments for '{0}' circularly reference themselves."),Tuple_type_arguments_circularly_reference_themselves:u(4110,1,"Tuple_type_arguments_circularly_reference_themselves_4110","Tuple type arguments circularly reference themselves."),Property_0_comes_from_an_index_signature_so_it_must_be_accessed_with_0:u(4111,1,"Property_0_comes_from_an_index_signature_so_it_must_be_accessed_with_0_4111","Property '{0}' comes from an index signature, so it must be accessed with ['{0}']."),This_member_cannot_have_an_override_modifier_because_its_containing_class_0_does_not_extend_another_class:u(4112,1,"This_member_cannot_have_an_override_modifier_because_its_containing_class_0_does_not_extend_another__4112","This member cannot have an 'override' modifier because its containing class '{0}' does not extend another class."),This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0:u(4113,1,"This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0_4113","This member cannot have an 'override' modifier because it is not declared in the base class '{0}'."),This_member_must_have_an_override_modifier_because_it_overrides_a_member_in_the_base_class_0:u(4114,1,"This_member_must_have_an_override_modifier_because_it_overrides_a_member_in_the_base_class_0_4114","This member must have an 'override' modifier because it overrides a member in the base class '{0}'."),This_parameter_property_must_have_an_override_modifier_because_it_overrides_a_member_in_base_class_0:u(4115,1,"This_parameter_property_must_have_an_override_modifier_because_it_overrides_a_member_in_base_class_0_4115","This parameter property must have an 'override' modifier because it overrides a member in base class '{0}'."),This_member_must_have_an_override_modifier_because_it_overrides_an_abstract_method_that_is_declared_in_the_base_class_0:u(4116,1,"This_member_must_have_an_override_modifier_because_it_overrides_an_abstract_method_that_is_declared__4116","This member must have an 'override' modifier because it overrides an abstract method that is declared in the base class '{0}'."),This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0_Did_you_mean_1:u(4117,1,"This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0_Did_you__4117","This member cannot have an 'override' modifier because it is not declared in the base class '{0}'. Did you mean '{1}'?"),The_type_of_this_node_cannot_be_serialized_because_its_property_0_cannot_be_serialized:u(4118,1,"The_type_of_this_node_cannot_be_serialized_because_its_property_0_cannot_be_serialized_4118","The type of this node cannot be serialized because its property '{0}' cannot be serialized."),This_member_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0:u(4119,1,"This_member_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_4119","This member must have a JSDoc comment with an '@override' tag because it overrides a member in the base class '{0}'."),This_parameter_property_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0:u(4120,1,"This_parameter_property_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_4120","This parameter property must have a JSDoc comment with an '@override' tag because it overrides a member in the base class '{0}'."),This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_containing_class_0_does_not_extend_another_class:u(4121,1,"This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_containing_class_0_does_not_4121","This member cannot have a JSDoc comment with an '@override' tag because its containing class '{0}' does not extend another class."),This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0:u(4122,1,"This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base__4122","This member cannot have a JSDoc comment with an '@override' tag because it is not declared in the base class '{0}'."),This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0_Did_you_mean_1:u(4123,1,"This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base__4123","This member cannot have a JSDoc comment with an 'override' tag because it is not declared in the base class '{0}'. Did you mean '{1}'?"),Compiler_option_0_of_value_1_is_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_with_npm_install_D_typescript_next:u(4124,1,"Compiler_option_0_of_value_1_is_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_w_4124","Compiler option '{0}' of value '{1}' is unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'."),Each_declaration_of_0_1_differs_in_its_value_where_2_was_expected_but_3_was_given:u(4125,1,"Each_declaration_of_0_1_differs_in_its_value_where_2_was_expected_but_3_was_given_4125","Each declaration of '{0}.{1}' differs in its value, where '{2}' was expected but '{3}' was given."),One_value_of_0_1_is_the_string_2_and_the_other_is_assumed_to_be_an_unknown_numeric_value:u(4126,1,"One_value_of_0_1_is_the_string_2_and_the_other_is_assumed_to_be_an_unknown_numeric_value_4126","One value of '{0}.{1}' is the string '{2}', and the other is assumed to be an unknown numeric value."),This_member_cannot_have_an_override_modifier_because_its_name_is_dynamic:u(4127,1,"This_member_cannot_have_an_override_modifier_because_its_name_is_dynamic_4127","This member cannot have an 'override' modifier because its name is dynamic."),This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_name_is_dynamic:u(4128,1,"This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_name_is_dynamic_4128","This member cannot have a JSDoc comment with an '@override' tag because its name is dynamic."),The_current_host_does_not_support_the_0_option:u(5001,1,"The_current_host_does_not_support_the_0_option_5001","The current host does not support the '{0}' option."),Cannot_find_the_common_subdirectory_path_for_the_input_files:u(5009,1,"Cannot_find_the_common_subdirectory_path_for_the_input_files_5009","Cannot find the common subdirectory path for the input files."),File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0:u(5010,1,"File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0_5010","File specification cannot end in a recursive directory wildcard ('**'): '{0}'."),Cannot_read_file_0_Colon_1:u(5012,1,"Cannot_read_file_0_Colon_1_5012","Cannot read file '{0}': {1}."),Unknown_compiler_option_0:u(5023,1,"Unknown_compiler_option_0_5023","Unknown compiler option '{0}'."),Compiler_option_0_requires_a_value_of_type_1:u(5024,1,"Compiler_option_0_requires_a_value_of_type_1_5024","Compiler option '{0}' requires a value of type {1}."),Unknown_compiler_option_0_Did_you_mean_1:u(5025,1,"Unknown_compiler_option_0_Did_you_mean_1_5025","Unknown compiler option '{0}'. Did you mean '{1}'?"),Could_not_write_file_0_Colon_1:u(5033,1,"Could_not_write_file_0_Colon_1_5033","Could not write file '{0}': {1}."),Option_project_cannot_be_mixed_with_source_files_on_a_command_line:u(5042,1,"Option_project_cannot_be_mixed_with_source_files_on_a_command_line_5042","Option 'project' cannot be mixed with source files on a command line."),Option_isolatedModules_can_only_be_used_when_either_option_module_is_provided_or_option_target_is_ES2015_or_higher:u(5047,1,"Option_isolatedModules_can_only_be_used_when_either_option_module_is_provided_or_option_target_is_ES_5047","Option 'isolatedModules' can only be used when either option '--module' is provided or option 'target' is 'ES2015' or higher."),Option_0_can_only_be_used_when_either_option_inlineSourceMap_or_option_sourceMap_is_provided:u(5051,1,"Option_0_can_only_be_used_when_either_option_inlineSourceMap_or_option_sourceMap_is_provided_5051","Option '{0} can only be used when either option '--inlineSourceMap' or option '--sourceMap' is provided."),Option_0_cannot_be_specified_without_specifying_option_1:u(5052,1,"Option_0_cannot_be_specified_without_specifying_option_1_5052","Option '{0}' cannot be specified without specifying option '{1}'."),Option_0_cannot_be_specified_with_option_1:u(5053,1,"Option_0_cannot_be_specified_with_option_1_5053","Option '{0}' cannot be specified with option '{1}'."),A_tsconfig_json_file_is_already_defined_at_Colon_0:u(5054,1,"A_tsconfig_json_file_is_already_defined_at_Colon_0_5054","A 'tsconfig.json' file is already defined at: '{0}'."),Cannot_write_file_0_because_it_would_overwrite_input_file:u(5055,1,"Cannot_write_file_0_because_it_would_overwrite_input_file_5055","Cannot write file '{0}' because it would overwrite input file."),Cannot_write_file_0_because_it_would_be_overwritten_by_multiple_input_files:u(5056,1,"Cannot_write_file_0_because_it_would_be_overwritten_by_multiple_input_files_5056","Cannot write file '{0}' because it would be overwritten by multiple input files."),Cannot_find_a_tsconfig_json_file_at_the_specified_directory_Colon_0:u(5057,1,"Cannot_find_a_tsconfig_json_file_at_the_specified_directory_Colon_0_5057","Cannot find a tsconfig.json file at the specified directory: '{0}'."),The_specified_path_does_not_exist_Colon_0:u(5058,1,"The_specified_path_does_not_exist_Colon_0_5058","The specified path does not exist: '{0}'."),Invalid_value_for_reactNamespace_0_is_not_a_valid_identifier:u(5059,1,"Invalid_value_for_reactNamespace_0_is_not_a_valid_identifier_5059","Invalid value for '--reactNamespace'. '{0}' is not a valid identifier."),Pattern_0_can_have_at_most_one_Asterisk_character:u(5061,1,"Pattern_0_can_have_at_most_one_Asterisk_character_5061","Pattern '{0}' can have at most one '*' character."),Substitution_0_in_pattern_1_can_have_at_most_one_Asterisk_character:u(5062,1,"Substitution_0_in_pattern_1_can_have_at_most_one_Asterisk_character_5062","Substitution '{0}' in pattern '{1}' can have at most one '*' character."),Substitutions_for_pattern_0_should_be_an_array:u(5063,1,"Substitutions_for_pattern_0_should_be_an_array_5063","Substitutions for pattern '{0}' should be an array."),Substitution_0_for_pattern_1_has_incorrect_type_expected_string_got_2:u(5064,1,"Substitution_0_for_pattern_1_has_incorrect_type_expected_string_got_2_5064","Substitution '{0}' for pattern '{1}' has incorrect type, expected 'string', got '{2}'."),File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0:u(5065,1,"File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildca_5065","File specification cannot contain a parent directory ('..') that appears after a recursive directory wildcard ('**'): '{0}'."),Substitutions_for_pattern_0_shouldn_t_be_an_empty_array:u(5066,1,"Substitutions_for_pattern_0_shouldn_t_be_an_empty_array_5066","Substitutions for pattern '{0}' shouldn't be an empty array."),Invalid_value_for_jsxFactory_0_is_not_a_valid_identifier_or_qualified_name:u(5067,1,"Invalid_value_for_jsxFactory_0_is_not_a_valid_identifier_or_qualified_name_5067","Invalid value for 'jsxFactory'. '{0}' is not a valid identifier or qualified-name."),Adding_a_tsconfig_json_file_will_help_organize_projects_that_contain_both_TypeScript_and_JavaScript_files_Learn_more_at_https_Colon_Slash_Slashaka_ms_Slashtsconfig:u(5068,1,"Adding_a_tsconfig_json_file_will_help_organize_projects_that_contain_both_TypeScript_and_JavaScript__5068","Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig."),Option_0_cannot_be_specified_without_specifying_option_1_or_option_2:u(5069,1,"Option_0_cannot_be_specified_without_specifying_option_1_or_option_2_5069","Option '{0}' cannot be specified without specifying option '{1}' or option '{2}'."),Option_resolveJsonModule_cannot_be_specified_when_moduleResolution_is_set_to_classic:u(5070,1,"Option_resolveJsonModule_cannot_be_specified_when_moduleResolution_is_set_to_classic_5070","Option '--resolveJsonModule' cannot be specified when 'moduleResolution' is set to 'classic'."),Option_resolveJsonModule_cannot_be_specified_when_module_is_set_to_none_system_or_umd:u(5071,1,"Option_resolveJsonModule_cannot_be_specified_when_module_is_set_to_none_system_or_umd_5071","Option '--resolveJsonModule' cannot be specified when 'module' is set to 'none', 'system', or 'umd'."),Unknown_build_option_0:u(5072,1,"Unknown_build_option_0_5072","Unknown build option '{0}'."),Build_option_0_requires_a_value_of_type_1:u(5073,1,"Build_option_0_requires_a_value_of_type_1_5073","Build option '{0}' requires a value of type {1}."),Option_incremental_can_only_be_specified_using_tsconfig_emitting_to_single_file_or_when_option_tsBuildInfoFile_is_specified:u(5074,1,"Option_incremental_can_only_be_specified_using_tsconfig_emitting_to_single_file_or_when_option_tsBui_5074","Option '--incremental' can only be specified using tsconfig, emitting to single file or when option '--tsBuildInfoFile' is specified."),_0_is_assignable_to_the_constraint_of_type_1_but_1_could_be_instantiated_with_a_different_subtype_of_constraint_2:u(5075,1,"_0_is_assignable_to_the_constraint_of_type_1_but_1_could_be_instantiated_with_a_different_subtype_of_5075","'{0}' is assignable to the constraint of type '{1}', but '{1}' could be instantiated with a different subtype of constraint '{2}'."),_0_and_1_operations_cannot_be_mixed_without_parentheses:u(5076,1,"_0_and_1_operations_cannot_be_mixed_without_parentheses_5076","'{0}' and '{1}' operations cannot be mixed without parentheses."),Unknown_build_option_0_Did_you_mean_1:u(5077,1,"Unknown_build_option_0_Did_you_mean_1_5077","Unknown build option '{0}'. Did you mean '{1}'?"),Unknown_watch_option_0:u(5078,1,"Unknown_watch_option_0_5078","Unknown watch option '{0}'."),Unknown_watch_option_0_Did_you_mean_1:u(5079,1,"Unknown_watch_option_0_Did_you_mean_1_5079","Unknown watch option '{0}'. Did you mean '{1}'?"),Watch_option_0_requires_a_value_of_type_1:u(5080,1,"Watch_option_0_requires_a_value_of_type_1_5080","Watch option '{0}' requires a value of type {1}."),Cannot_find_a_tsconfig_json_file_at_the_current_directory_Colon_0:u(5081,1,"Cannot_find_a_tsconfig_json_file_at_the_current_directory_Colon_0_5081","Cannot find a tsconfig.json file at the current directory: {0}."),_0_could_be_instantiated_with_an_arbitrary_type_which_could_be_unrelated_to_1:u(5082,1,"_0_could_be_instantiated_with_an_arbitrary_type_which_could_be_unrelated_to_1_5082","'{0}' could be instantiated with an arbitrary type which could be unrelated to '{1}'."),Cannot_read_file_0:u(5083,1,"Cannot_read_file_0_5083","Cannot read file '{0}'."),A_tuple_member_cannot_be_both_optional_and_rest:u(5085,1,"A_tuple_member_cannot_be_both_optional_and_rest_5085","A tuple member cannot be both optional and rest."),A_labeled_tuple_element_is_declared_as_optional_with_a_question_mark_after_the_name_and_before_the_colon_rather_than_after_the_type:u(5086,1,"A_labeled_tuple_element_is_declared_as_optional_with_a_question_mark_after_the_name_and_before_the_c_5086","A labeled tuple element is declared as optional with a question mark after the name and before the colon, rather than after the type."),A_labeled_tuple_element_is_declared_as_rest_with_a_before_the_name_rather_than_before_the_type:u(5087,1,"A_labeled_tuple_element_is_declared_as_rest_with_a_before_the_name_rather_than_before_the_type_5087","A labeled tuple element is declared as rest with a '...' before the name, rather than before the type."),The_inferred_type_of_0_references_a_type_with_a_cyclic_structure_which_cannot_be_trivially_serialized_A_type_annotation_is_necessary:u(5088,1,"The_inferred_type_of_0_references_a_type_with_a_cyclic_structure_which_cannot_be_trivially_serialize_5088","The inferred type of '{0}' references a type with a cyclic structure which cannot be trivially serialized. A type annotation is necessary."),Option_0_cannot_be_specified_when_option_jsx_is_1:u(5089,1,"Option_0_cannot_be_specified_when_option_jsx_is_1_5089","Option '{0}' cannot be specified when option 'jsx' is '{1}'."),Non_relative_paths_are_not_allowed_when_baseUrl_is_not_set_Did_you_forget_a_leading_Slash:u(5090,1,"Non_relative_paths_are_not_allowed_when_baseUrl_is_not_set_Did_you_forget_a_leading_Slash_5090","Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'?"),Option_preserveConstEnums_cannot_be_disabled_when_0_is_enabled:u(5091,1,"Option_preserveConstEnums_cannot_be_disabled_when_0_is_enabled_5091","Option 'preserveConstEnums' cannot be disabled when '{0}' is enabled."),The_root_value_of_a_0_file_must_be_an_object:u(5092,1,"The_root_value_of_a_0_file_must_be_an_object_5092","The root value of a '{0}' file must be an object."),Compiler_option_0_may_only_be_used_with_build:u(5093,1,"Compiler_option_0_may_only_be_used_with_build_5093","Compiler option '--{0}' may only be used with '--build'."),Compiler_option_0_may_not_be_used_with_build:u(5094,1,"Compiler_option_0_may_not_be_used_with_build_5094","Compiler option '--{0}' may not be used with '--build'."),Option_0_can_only_be_used_when_module_is_set_to_preserve_or_to_es2015_or_later:u(5095,1,"Option_0_can_only_be_used_when_module_is_set_to_preserve_or_to_es2015_or_later_5095","Option '{0}' can only be used when 'module' is set to 'preserve' or to 'es2015' or later."),Option_allowImportingTsExtensions_can_only_be_used_when_either_noEmit_or_emitDeclarationOnly_is_set:u(5096,1,"Option_allowImportingTsExtensions_can_only_be_used_when_either_noEmit_or_emitDeclarationOnly_is_set_5096","Option 'allowImportingTsExtensions' can only be used when either 'noEmit' or 'emitDeclarationOnly' is set."),An_import_path_can_only_end_with_a_0_extension_when_allowImportingTsExtensions_is_enabled:u(5097,1,"An_import_path_can_only_end_with_a_0_extension_when_allowImportingTsExtensions_is_enabled_5097","An import path can only end with a '{0}' extension when 'allowImportingTsExtensions' is enabled."),Option_0_can_only_be_used_when_moduleResolution_is_set_to_node16_nodenext_or_bundler:u(5098,1,"Option_0_can_only_be_used_when_moduleResolution_is_set_to_node16_nodenext_or_bundler_5098","Option '{0}' can only be used when 'moduleResolution' is set to 'node16', 'nodenext', or 'bundler'."),Option_0_is_deprecated_and_will_stop_functioning_in_TypeScript_1_Specify_compilerOption_ignoreDeprecations_Colon_2_to_silence_this_error:u(5101,1,"Option_0_is_deprecated_and_will_stop_functioning_in_TypeScript_1_Specify_compilerOption_ignoreDeprec_5101",`Option '{0}' is deprecated and will stop functioning in TypeScript {1}. Specify compilerOption '"ignoreDeprecations": "{2}"' to silence this error.`),Option_0_has_been_removed_Please_remove_it_from_your_configuration:u(5102,1,"Option_0_has_been_removed_Please_remove_it_from_your_configuration_5102","Option '{0}' has been removed. Please remove it from your configuration."),Invalid_value_for_ignoreDeprecations:u(5103,1,"Invalid_value_for_ignoreDeprecations_5103","Invalid value for '--ignoreDeprecations'."),Option_0_is_redundant_and_cannot_be_specified_with_option_1:u(5104,1,"Option_0_is_redundant_and_cannot_be_specified_with_option_1_5104","Option '{0}' is redundant and cannot be specified with option '{1}'."),Option_verbatimModuleSyntax_cannot_be_used_when_module_is_set_to_UMD_AMD_or_System:u(5105,1,"Option_verbatimModuleSyntax_cannot_be_used_when_module_is_set_to_UMD_AMD_or_System_5105","Option 'verbatimModuleSyntax' cannot be used when 'module' is set to 'UMD', 'AMD', or 'System'."),Use_0_instead:u(5106,3,"Use_0_instead_5106","Use '{0}' instead."),Option_0_1_is_deprecated_and_will_stop_functioning_in_TypeScript_2_Specify_compilerOption_ignoreDeprecations_Colon_3_to_silence_this_error:u(5107,1,"Option_0_1_is_deprecated_and_will_stop_functioning_in_TypeScript_2_Specify_compilerOption_ignoreDepr_5107",`Option '{0}={1}' is deprecated and will stop functioning in TypeScript {2}. Specify compilerOption '"ignoreDeprecations": "{3}"' to silence this error.`),Option_0_1_has_been_removed_Please_remove_it_from_your_configuration:u(5108,1,"Option_0_1_has_been_removed_Please_remove_it_from_your_configuration_5108","Option '{0}={1}' has been removed. Please remove it from your configuration."),Option_moduleResolution_must_be_set_to_0_or_left_unspecified_when_option_module_is_set_to_1:u(5109,1,"Option_moduleResolution_must_be_set_to_0_or_left_unspecified_when_option_module_is_set_to_1_5109","Option 'moduleResolution' must be set to '{0}' (or left unspecified) when option 'module' is set to '{1}'."),Option_module_must_be_set_to_0_when_option_moduleResolution_is_set_to_1:u(5110,1,"Option_module_must_be_set_to_0_when_option_moduleResolution_is_set_to_1_5110","Option 'module' must be set to '{0}' when option 'moduleResolution' is set to '{1}'."),Generates_a_sourcemap_for_each_corresponding_d_ts_file:u(6e3,3,"Generates_a_sourcemap_for_each_corresponding_d_ts_file_6000","Generates a sourcemap for each corresponding '.d.ts' file."),Concatenate_and_emit_output_to_single_file:u(6001,3,"Concatenate_and_emit_output_to_single_file_6001","Concatenate and emit output to single file."),Generates_corresponding_d_ts_file:u(6002,3,"Generates_corresponding_d_ts_file_6002","Generates corresponding '.d.ts' file."),Specify_the_location_where_debugger_should_locate_TypeScript_files_instead_of_source_locations:u(6004,3,"Specify_the_location_where_debugger_should_locate_TypeScript_files_instead_of_source_locations_6004","Specify the location where debugger should locate TypeScript files instead of source locations."),Watch_input_files:u(6005,3,"Watch_input_files_6005","Watch input files."),Redirect_output_structure_to_the_directory:u(6006,3,"Redirect_output_structure_to_the_directory_6006","Redirect output structure to the directory."),Do_not_erase_const_enum_declarations_in_generated_code:u(6007,3,"Do_not_erase_const_enum_declarations_in_generated_code_6007","Do not erase const enum declarations in generated code."),Do_not_emit_outputs_if_any_errors_were_reported:u(6008,3,"Do_not_emit_outputs_if_any_errors_were_reported_6008","Do not emit outputs if any errors were reported."),Do_not_emit_comments_to_output:u(6009,3,"Do_not_emit_comments_to_output_6009","Do not emit comments to output."),Do_not_emit_outputs:u(6010,3,"Do_not_emit_outputs_6010","Do not emit outputs."),Allow_default_imports_from_modules_with_no_default_export_This_does_not_affect_code_emit_just_typechecking:u(6011,3,"Allow_default_imports_from_modules_with_no_default_export_This_does_not_affect_code_emit_just_typech_6011","Allow default imports from modules with no default export. This does not affect code emit, just typechecking."),Skip_type_checking_of_declaration_files:u(6012,3,"Skip_type_checking_of_declaration_files_6012","Skip type checking of declaration files."),Do_not_resolve_the_real_path_of_symlinks:u(6013,3,"Do_not_resolve_the_real_path_of_symlinks_6013","Do not resolve the real path of symlinks."),Only_emit_d_ts_declaration_files:u(6014,3,"Only_emit_d_ts_declaration_files_6014","Only emit '.d.ts' declaration files."),Specify_ECMAScript_target_version:u(6015,3,"Specify_ECMAScript_target_version_6015","Specify ECMAScript target version."),Specify_module_code_generation:u(6016,3,"Specify_module_code_generation_6016","Specify module code generation."),Print_this_message:u(6017,3,"Print_this_message_6017","Print this message."),Print_the_compiler_s_version:u(6019,3,"Print_the_compiler_s_version_6019","Print the compiler's version."),Compile_the_project_given_the_path_to_its_configuration_file_or_to_a_folder_with_a_tsconfig_json:u(6020,3,"Compile_the_project_given_the_path_to_its_configuration_file_or_to_a_folder_with_a_tsconfig_json_6020","Compile the project given the path to its configuration file, or to a folder with a 'tsconfig.json'."),Syntax_Colon_0:u(6023,3,"Syntax_Colon_0_6023","Syntax: {0}"),options:u(6024,3,"options_6024","options"),file:u(6025,3,"file_6025","file"),Examples_Colon_0:u(6026,3,"Examples_Colon_0_6026","Examples: {0}"),Options_Colon:u(6027,3,"Options_Colon_6027","Options:"),Version_0:u(6029,3,"Version_0_6029","Version {0}"),Insert_command_line_options_and_files_from_a_file:u(6030,3,"Insert_command_line_options_and_files_from_a_file_6030","Insert command line options and files from a file."),Starting_compilation_in_watch_mode:u(6031,3,"Starting_compilation_in_watch_mode_6031","Starting compilation in watch mode..."),File_change_detected_Starting_incremental_compilation:u(6032,3,"File_change_detected_Starting_incremental_compilation_6032","File change detected. Starting incremental compilation..."),KIND:u(6034,3,"KIND_6034","KIND"),FILE:u(6035,3,"FILE_6035","FILE"),VERSION:u(6036,3,"VERSION_6036","VERSION"),LOCATION:u(6037,3,"LOCATION_6037","LOCATION"),DIRECTORY:u(6038,3,"DIRECTORY_6038","DIRECTORY"),STRATEGY:u(6039,3,"STRATEGY_6039","STRATEGY"),FILE_OR_DIRECTORY:u(6040,3,"FILE_OR_DIRECTORY_6040","FILE OR DIRECTORY"),Errors_Files:u(6041,3,"Errors_Files_6041","Errors Files"),Generates_corresponding_map_file:u(6043,3,"Generates_corresponding_map_file_6043","Generates corresponding '.map' file."),Compiler_option_0_expects_an_argument:u(6044,1,"Compiler_option_0_expects_an_argument_6044","Compiler option '{0}' expects an argument."),Unterminated_quoted_string_in_response_file_0:u(6045,1,"Unterminated_quoted_string_in_response_file_0_6045","Unterminated quoted string in response file '{0}'."),Argument_for_0_option_must_be_Colon_1:u(6046,1,"Argument_for_0_option_must_be_Colon_1_6046","Argument for '{0}' option must be: {1}."),Locale_must_be_of_the_form_language_or_language_territory_For_example_0_or_1:u(6048,1,"Locale_must_be_of_the_form_language_or_language_territory_For_example_0_or_1_6048","Locale must be of the form or -. For example '{0}' or '{1}'."),Unable_to_open_file_0:u(6050,1,"Unable_to_open_file_0_6050","Unable to open file '{0}'."),Corrupted_locale_file_0:u(6051,1,"Corrupted_locale_file_0_6051","Corrupted locale file {0}."),Raise_error_on_expressions_and_declarations_with_an_implied_any_type:u(6052,3,"Raise_error_on_expressions_and_declarations_with_an_implied_any_type_6052","Raise error on expressions and declarations with an implied 'any' type."),File_0_not_found:u(6053,1,"File_0_not_found_6053","File '{0}' not found."),File_0_has_an_unsupported_extension_The_only_supported_extensions_are_1:u(6054,1,"File_0_has_an_unsupported_extension_The_only_supported_extensions_are_1_6054","File '{0}' has an unsupported extension. The only supported extensions are {1}."),Suppress_noImplicitAny_errors_for_indexing_objects_lacking_index_signatures:u(6055,3,"Suppress_noImplicitAny_errors_for_indexing_objects_lacking_index_signatures_6055","Suppress noImplicitAny errors for indexing objects lacking index signatures."),Do_not_emit_declarations_for_code_that_has_an_internal_annotation:u(6056,3,"Do_not_emit_declarations_for_code_that_has_an_internal_annotation_6056","Do not emit declarations for code that has an '@internal' annotation."),Specify_the_root_directory_of_input_files_Use_to_control_the_output_directory_structure_with_outDir:u(6058,3,"Specify_the_root_directory_of_input_files_Use_to_control_the_output_directory_structure_with_outDir_6058","Specify the root directory of input files. Use to control the output directory structure with --outDir."),File_0_is_not_under_rootDir_1_rootDir_is_expected_to_contain_all_source_files:u(6059,1,"File_0_is_not_under_rootDir_1_rootDir_is_expected_to_contain_all_source_files_6059","File '{0}' is not under 'rootDir' '{1}'. 'rootDir' is expected to contain all source files."),Specify_the_end_of_line_sequence_to_be_used_when_emitting_files_Colon_CRLF_dos_or_LF_unix:u(6060,3,"Specify_the_end_of_line_sequence_to_be_used_when_emitting_files_Colon_CRLF_dos_or_LF_unix_6060","Specify the end of line sequence to be used when emitting files: 'CRLF' (dos) or 'LF' (unix)."),NEWLINE:u(6061,3,"NEWLINE_6061","NEWLINE"),Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_null_on_command_line:u(6064,1,"Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_null_on_command_line_6064","Option '{0}' can only be specified in 'tsconfig.json' file or set to 'null' on command line."),Enables_experimental_support_for_ES7_decorators:u(6065,3,"Enables_experimental_support_for_ES7_decorators_6065","Enables experimental support for ES7 decorators."),Enables_experimental_support_for_emitting_type_metadata_for_decorators:u(6066,3,"Enables_experimental_support_for_emitting_type_metadata_for_decorators_6066","Enables experimental support for emitting type metadata for decorators."),Initializes_a_TypeScript_project_and_creates_a_tsconfig_json_file:u(6070,3,"Initializes_a_TypeScript_project_and_creates_a_tsconfig_json_file_6070","Initializes a TypeScript project and creates a tsconfig.json file."),Successfully_created_a_tsconfig_json_file:u(6071,3,"Successfully_created_a_tsconfig_json_file_6071","Successfully created a tsconfig.json file."),Suppress_excess_property_checks_for_object_literals:u(6072,3,"Suppress_excess_property_checks_for_object_literals_6072","Suppress excess property checks for object literals."),Stylize_errors_and_messages_using_color_and_context_experimental:u(6073,3,"Stylize_errors_and_messages_using_color_and_context_experimental_6073","Stylize errors and messages using color and context (experimental)."),Do_not_report_errors_on_unused_labels:u(6074,3,"Do_not_report_errors_on_unused_labels_6074","Do not report errors on unused labels."),Report_error_when_not_all_code_paths_in_function_return_a_value:u(6075,3,"Report_error_when_not_all_code_paths_in_function_return_a_value_6075","Report error when not all code paths in function return a value."),Report_errors_for_fallthrough_cases_in_switch_statement:u(6076,3,"Report_errors_for_fallthrough_cases_in_switch_statement_6076","Report errors for fallthrough cases in switch statement."),Do_not_report_errors_on_unreachable_code:u(6077,3,"Do_not_report_errors_on_unreachable_code_6077","Do not report errors on unreachable code."),Disallow_inconsistently_cased_references_to_the_same_file:u(6078,3,"Disallow_inconsistently_cased_references_to_the_same_file_6078","Disallow inconsistently-cased references to the same file."),Specify_library_files_to_be_included_in_the_compilation:u(6079,3,"Specify_library_files_to_be_included_in_the_compilation_6079","Specify library files to be included in the compilation."),Specify_JSX_code_generation:u(6080,3,"Specify_JSX_code_generation_6080","Specify JSX code generation."),Only_amd_and_system_modules_are_supported_alongside_0:u(6082,1,"Only_amd_and_system_modules_are_supported_alongside_0_6082","Only 'amd' and 'system' modules are supported alongside --{0}."),Base_directory_to_resolve_non_absolute_module_names:u(6083,3,"Base_directory_to_resolve_non_absolute_module_names_6083","Base directory to resolve non-absolute module names."),Deprecated_Use_jsxFactory_instead_Specify_the_object_invoked_for_createElement_when_targeting_react_JSX_emit:u(6084,3,"Deprecated_Use_jsxFactory_instead_Specify_the_object_invoked_for_createElement_when_targeting_react__6084","[Deprecated] Use '--jsxFactory' instead. Specify the object invoked for createElement when targeting 'react' JSX emit"),Enable_tracing_of_the_name_resolution_process:u(6085,3,"Enable_tracing_of_the_name_resolution_process_6085","Enable tracing of the name resolution process."),Resolving_module_0_from_1:u(6086,3,"Resolving_module_0_from_1_6086","======== Resolving module '{0}' from '{1}'. ========"),Explicitly_specified_module_resolution_kind_Colon_0:u(6087,3,"Explicitly_specified_module_resolution_kind_Colon_0_6087","Explicitly specified module resolution kind: '{0}'."),Module_resolution_kind_is_not_specified_using_0:u(6088,3,"Module_resolution_kind_is_not_specified_using_0_6088","Module resolution kind is not specified, using '{0}'."),Module_name_0_was_successfully_resolved_to_1:u(6089,3,"Module_name_0_was_successfully_resolved_to_1_6089","======== Module name '{0}' was successfully resolved to '{1}'. ========"),Module_name_0_was_not_resolved:u(6090,3,"Module_name_0_was_not_resolved_6090","======== Module name '{0}' was not resolved. ========"),paths_option_is_specified_looking_for_a_pattern_to_match_module_name_0:u(6091,3,"paths_option_is_specified_looking_for_a_pattern_to_match_module_name_0_6091","'paths' option is specified, looking for a pattern to match module name '{0}'."),Module_name_0_matched_pattern_1:u(6092,3,"Module_name_0_matched_pattern_1_6092","Module name '{0}', matched pattern '{1}'."),Trying_substitution_0_candidate_module_location_Colon_1:u(6093,3,"Trying_substitution_0_candidate_module_location_Colon_1_6093","Trying substitution '{0}', candidate module location: '{1}'."),Resolving_module_name_0_relative_to_base_url_1_2:u(6094,3,"Resolving_module_name_0_relative_to_base_url_1_2_6094","Resolving module name '{0}' relative to base url '{1}' - '{2}'."),Loading_module_as_file_Slash_folder_candidate_module_location_0_target_file_types_Colon_1:u(6095,3,"Loading_module_as_file_Slash_folder_candidate_module_location_0_target_file_types_Colon_1_6095","Loading module as file / folder, candidate module location '{0}', target file types: {1}."),File_0_does_not_exist:u(6096,3,"File_0_does_not_exist_6096","File '{0}' does not exist."),File_0_exists_use_it_as_a_name_resolution_result:u(6097,3,"File_0_exists_use_it_as_a_name_resolution_result_6097","File '{0}' exists - use it as a name resolution result."),Loading_module_0_from_node_modules_folder_target_file_types_Colon_1:u(6098,3,"Loading_module_0_from_node_modules_folder_target_file_types_Colon_1_6098","Loading module '{0}' from 'node_modules' folder, target file types: {1}."),Found_package_json_at_0:u(6099,3,"Found_package_json_at_0_6099","Found 'package.json' at '{0}'."),package_json_does_not_have_a_0_field:u(6100,3,"package_json_does_not_have_a_0_field_6100","'package.json' does not have a '{0}' field."),package_json_has_0_field_1_that_references_2:u(6101,3,"package_json_has_0_field_1_that_references_2_6101","'package.json' has '{0}' field '{1}' that references '{2}'."),Allow_javascript_files_to_be_compiled:u(6102,3,"Allow_javascript_files_to_be_compiled_6102","Allow javascript files to be compiled."),Checking_if_0_is_the_longest_matching_prefix_for_1_2:u(6104,3,"Checking_if_0_is_the_longest_matching_prefix_for_1_2_6104","Checking if '{0}' is the longest matching prefix for '{1}' - '{2}'."),Expected_type_of_0_field_in_package_json_to_be_1_got_2:u(6105,3,"Expected_type_of_0_field_in_package_json_to_be_1_got_2_6105","Expected type of '{0}' field in 'package.json' to be '{1}', got '{2}'."),baseUrl_option_is_set_to_0_using_this_value_to_resolve_non_relative_module_name_1:u(6106,3,"baseUrl_option_is_set_to_0_using_this_value_to_resolve_non_relative_module_name_1_6106","'baseUrl' option is set to '{0}', using this value to resolve non-relative module name '{1}'."),rootDirs_option_is_set_using_it_to_resolve_relative_module_name_0:u(6107,3,"rootDirs_option_is_set_using_it_to_resolve_relative_module_name_0_6107","'rootDirs' option is set, using it to resolve relative module name '{0}'."),Longest_matching_prefix_for_0_is_1:u(6108,3,"Longest_matching_prefix_for_0_is_1_6108","Longest matching prefix for '{0}' is '{1}'."),Loading_0_from_the_root_dir_1_candidate_location_2:u(6109,3,"Loading_0_from_the_root_dir_1_candidate_location_2_6109","Loading '{0}' from the root dir '{1}', candidate location '{2}'."),Trying_other_entries_in_rootDirs:u(6110,3,"Trying_other_entries_in_rootDirs_6110","Trying other entries in 'rootDirs'."),Module_resolution_using_rootDirs_has_failed:u(6111,3,"Module_resolution_using_rootDirs_has_failed_6111","Module resolution using 'rootDirs' has failed."),Do_not_emit_use_strict_directives_in_module_output:u(6112,3,"Do_not_emit_use_strict_directives_in_module_output_6112","Do not emit 'use strict' directives in module output."),Enable_strict_null_checks:u(6113,3,"Enable_strict_null_checks_6113","Enable strict null checks."),Unknown_option_excludes_Did_you_mean_exclude:u(6114,1,"Unknown_option_excludes_Did_you_mean_exclude_6114","Unknown option 'excludes'. Did you mean 'exclude'?"),Raise_error_on_this_expressions_with_an_implied_any_type:u(6115,3,"Raise_error_on_this_expressions_with_an_implied_any_type_6115","Raise error on 'this' expressions with an implied 'any' type."),Resolving_type_reference_directive_0_containing_file_1_root_directory_2:u(6116,3,"Resolving_type_reference_directive_0_containing_file_1_root_directory_2_6116","======== Resolving type reference directive '{0}', containing file '{1}', root directory '{2}'. ========"),Type_reference_directive_0_was_successfully_resolved_to_1_primary_Colon_2:u(6119,3,"Type_reference_directive_0_was_successfully_resolved_to_1_primary_Colon_2_6119","======== Type reference directive '{0}' was successfully resolved to '{1}', primary: {2}. ========"),Type_reference_directive_0_was_not_resolved:u(6120,3,"Type_reference_directive_0_was_not_resolved_6120","======== Type reference directive '{0}' was not resolved. ========"),Resolving_with_primary_search_path_0:u(6121,3,"Resolving_with_primary_search_path_0_6121","Resolving with primary search path '{0}'."),Root_directory_cannot_be_determined_skipping_primary_search_paths:u(6122,3,"Root_directory_cannot_be_determined_skipping_primary_search_paths_6122","Root directory cannot be determined, skipping primary search paths."),Resolving_type_reference_directive_0_containing_file_1_root_directory_not_set:u(6123,3,"Resolving_type_reference_directive_0_containing_file_1_root_directory_not_set_6123","======== Resolving type reference directive '{0}', containing file '{1}', root directory not set. ========"),Type_declaration_files_to_be_included_in_compilation:u(6124,3,"Type_declaration_files_to_be_included_in_compilation_6124","Type declaration files to be included in compilation."),Looking_up_in_node_modules_folder_initial_location_0:u(6125,3,"Looking_up_in_node_modules_folder_initial_location_0_6125","Looking up in 'node_modules' folder, initial location '{0}'."),Containing_file_is_not_specified_and_root_directory_cannot_be_determined_skipping_lookup_in_node_modules_folder:u(6126,3,"Containing_file_is_not_specified_and_root_directory_cannot_be_determined_skipping_lookup_in_node_mod_6126","Containing file is not specified and root directory cannot be determined, skipping lookup in 'node_modules' folder."),Resolving_type_reference_directive_0_containing_file_not_set_root_directory_1:u(6127,3,"Resolving_type_reference_directive_0_containing_file_not_set_root_directory_1_6127","======== Resolving type reference directive '{0}', containing file not set, root directory '{1}'. ========"),Resolving_type_reference_directive_0_containing_file_not_set_root_directory_not_set:u(6128,3,"Resolving_type_reference_directive_0_containing_file_not_set_root_directory_not_set_6128","======== Resolving type reference directive '{0}', containing file not set, root directory not set. ========"),Resolving_real_path_for_0_result_1:u(6130,3,"Resolving_real_path_for_0_result_1_6130","Resolving real path for '{0}', result '{1}'."),Cannot_compile_modules_using_option_0_unless_the_module_flag_is_amd_or_system:u(6131,1,"Cannot_compile_modules_using_option_0_unless_the_module_flag_is_amd_or_system_6131","Cannot compile modules using option '{0}' unless the '--module' flag is 'amd' or 'system'."),File_name_0_has_a_1_extension_stripping_it:u(6132,3,"File_name_0_has_a_1_extension_stripping_it_6132","File name '{0}' has a '{1}' extension - stripping it."),_0_is_declared_but_its_value_is_never_read:u(6133,1,"_0_is_declared_but_its_value_is_never_read_6133","'{0}' is declared but its value is never read.",!0),Report_errors_on_unused_locals:u(6134,3,"Report_errors_on_unused_locals_6134","Report errors on unused locals."),Report_errors_on_unused_parameters:u(6135,3,"Report_errors_on_unused_parameters_6135","Report errors on unused parameters."),The_maximum_dependency_depth_to_search_under_node_modules_and_load_JavaScript_files:u(6136,3,"The_maximum_dependency_depth_to_search_under_node_modules_and_load_JavaScript_files_6136","The maximum dependency depth to search under node_modules and load JavaScript files."),Cannot_import_type_declaration_files_Consider_importing_0_instead_of_1:u(6137,1,"Cannot_import_type_declaration_files_Consider_importing_0_instead_of_1_6137","Cannot import type declaration files. Consider importing '{0}' instead of '{1}'."),Property_0_is_declared_but_its_value_is_never_read:u(6138,1,"Property_0_is_declared_but_its_value_is_never_read_6138","Property '{0}' is declared but its value is never read.",!0),Import_emit_helpers_from_tslib:u(6139,3,"Import_emit_helpers_from_tslib_6139","Import emit helpers from 'tslib'."),Auto_discovery_for_typings_is_enabled_in_project_0_Running_extra_resolution_pass_for_module_1_using_cache_location_2:u(6140,1,"Auto_discovery_for_typings_is_enabled_in_project_0_Running_extra_resolution_pass_for_module_1_using__6140","Auto discovery for typings is enabled in project '{0}'. Running extra resolution pass for module '{1}' using cache location '{2}'."),Parse_in_strict_mode_and_emit_use_strict_for_each_source_file:u(6141,3,"Parse_in_strict_mode_and_emit_use_strict_for_each_source_file_6141",'Parse in strict mode and emit "use strict" for each source file.'),Module_0_was_resolved_to_1_but_jsx_is_not_set:u(6142,1,"Module_0_was_resolved_to_1_but_jsx_is_not_set_6142","Module '{0}' was resolved to '{1}', but '--jsx' is not set."),Module_0_was_resolved_as_locally_declared_ambient_module_in_file_1:u(6144,3,"Module_0_was_resolved_as_locally_declared_ambient_module_in_file_1_6144","Module '{0}' was resolved as locally declared ambient module in file '{1}'."),Specify_the_JSX_factory_function_to_use_when_targeting_react_JSX_emit_e_g_React_createElement_or_h:u(6146,3,"Specify_the_JSX_factory_function_to_use_when_targeting_react_JSX_emit_e_g_React_createElement_or_h_6146","Specify the JSX factory function to use when targeting 'react' JSX emit, e.g. 'React.createElement' or 'h'."),Resolution_for_module_0_was_found_in_cache_from_location_1:u(6147,3,"Resolution_for_module_0_was_found_in_cache_from_location_1_6147","Resolution for module '{0}' was found in cache from location '{1}'."),Directory_0_does_not_exist_skipping_all_lookups_in_it:u(6148,3,"Directory_0_does_not_exist_skipping_all_lookups_in_it_6148","Directory '{0}' does not exist, skipping all lookups in it."),Show_diagnostic_information:u(6149,3,"Show_diagnostic_information_6149","Show diagnostic information."),Show_verbose_diagnostic_information:u(6150,3,"Show_verbose_diagnostic_information_6150","Show verbose diagnostic information."),Emit_a_single_file_with_source_maps_instead_of_having_a_separate_file:u(6151,3,"Emit_a_single_file_with_source_maps_instead_of_having_a_separate_file_6151","Emit a single file with source maps instead of having a separate file."),Emit_the_source_alongside_the_sourcemaps_within_a_single_file_requires_inlineSourceMap_or_sourceMap_to_be_set:u(6152,3,"Emit_the_source_alongside_the_sourcemaps_within_a_single_file_requires_inlineSourceMap_or_sourceMap__6152","Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set."),Transpile_each_file_as_a_separate_module_similar_to_ts_transpileModule:u(6153,3,"Transpile_each_file_as_a_separate_module_similar_to_ts_transpileModule_6153","Transpile each file as a separate module (similar to 'ts.transpileModule')."),Print_names_of_generated_files_part_of_the_compilation:u(6154,3,"Print_names_of_generated_files_part_of_the_compilation_6154","Print names of generated files part of the compilation."),Print_names_of_files_part_of_the_compilation:u(6155,3,"Print_names_of_files_part_of_the_compilation_6155","Print names of files part of the compilation."),The_locale_used_when_displaying_messages_to_the_user_e_g_en_us:u(6156,3,"The_locale_used_when_displaying_messages_to_the_user_e_g_en_us_6156","The locale used when displaying messages to the user (e.g. 'en-us')"),Do_not_generate_custom_helper_functions_like_extends_in_compiled_output:u(6157,3,"Do_not_generate_custom_helper_functions_like_extends_in_compiled_output_6157","Do not generate custom helper functions like '__extends' in compiled output."),Do_not_include_the_default_library_file_lib_d_ts:u(6158,3,"Do_not_include_the_default_library_file_lib_d_ts_6158","Do not include the default library file (lib.d.ts)."),Do_not_add_triple_slash_references_or_imported_modules_to_the_list_of_compiled_files:u(6159,3,"Do_not_add_triple_slash_references_or_imported_modules_to_the_list_of_compiled_files_6159","Do not add triple-slash references or imported modules to the list of compiled files."),Deprecated_Use_skipLibCheck_instead_Skip_type_checking_of_default_library_declaration_files:u(6160,3,"Deprecated_Use_skipLibCheck_instead_Skip_type_checking_of_default_library_declaration_files_6160","[Deprecated] Use '--skipLibCheck' instead. Skip type checking of default library declaration files."),List_of_folders_to_include_type_definitions_from:u(6161,3,"List_of_folders_to_include_type_definitions_from_6161","List of folders to include type definitions from."),Disable_size_limitations_on_JavaScript_projects:u(6162,3,"Disable_size_limitations_on_JavaScript_projects_6162","Disable size limitations on JavaScript projects."),The_character_set_of_the_input_files:u(6163,3,"The_character_set_of_the_input_files_6163","The character set of the input files."),Skipping_module_0_that_looks_like_an_absolute_URI_target_file_types_Colon_1:u(6164,3,"Skipping_module_0_that_looks_like_an_absolute_URI_target_file_types_Colon_1_6164","Skipping module '{0}' that looks like an absolute URI, target file types: {1}."),Do_not_truncate_error_messages:u(6165,3,"Do_not_truncate_error_messages_6165","Do not truncate error messages."),Output_directory_for_generated_declaration_files:u(6166,3,"Output_directory_for_generated_declaration_files_6166","Output directory for generated declaration files."),A_series_of_entries_which_re_map_imports_to_lookup_locations_relative_to_the_baseUrl:u(6167,3,"A_series_of_entries_which_re_map_imports_to_lookup_locations_relative_to_the_baseUrl_6167","A series of entries which re-map imports to lookup locations relative to the 'baseUrl'."),List_of_root_folders_whose_combined_content_represents_the_structure_of_the_project_at_runtime:u(6168,3,"List_of_root_folders_whose_combined_content_represents_the_structure_of_the_project_at_runtime_6168","List of root folders whose combined content represents the structure of the project at runtime."),Show_all_compiler_options:u(6169,3,"Show_all_compiler_options_6169","Show all compiler options."),Deprecated_Use_outFile_instead_Concatenate_and_emit_output_to_single_file:u(6170,3,"Deprecated_Use_outFile_instead_Concatenate_and_emit_output_to_single_file_6170","[Deprecated] Use '--outFile' instead. Concatenate and emit output to single file"),Command_line_Options:u(6171,3,"Command_line_Options_6171","Command-line Options"),Provide_full_support_for_iterables_in_for_of_spread_and_destructuring_when_targeting_ES5:u(6179,3,"Provide_full_support_for_iterables_in_for_of_spread_and_destructuring_when_targeting_ES5_6179","Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5'."),Enable_all_strict_type_checking_options:u(6180,3,"Enable_all_strict_type_checking_options_6180","Enable all strict type-checking options."),Scoped_package_detected_looking_in_0:u(6182,3,"Scoped_package_detected_looking_in_0_6182","Scoped package detected, looking in '{0}'"),Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2:u(6183,3,"Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2_6183","Reusing resolution of module '{0}' from '{1}' of old program, it was successfully resolved to '{2}'."),Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package_ID_3:u(6184,3,"Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package__6184","Reusing resolution of module '{0}' from '{1}' of old program, it was successfully resolved to '{2}' with Package ID '{3}'."),Enable_strict_checking_of_function_types:u(6186,3,"Enable_strict_checking_of_function_types_6186","Enable strict checking of function types."),Enable_strict_checking_of_property_initialization_in_classes:u(6187,3,"Enable_strict_checking_of_property_initialization_in_classes_6187","Enable strict checking of property initialization in classes."),Numeric_separators_are_not_allowed_here:u(6188,1,"Numeric_separators_are_not_allowed_here_6188","Numeric separators are not allowed here."),Multiple_consecutive_numeric_separators_are_not_permitted:u(6189,1,"Multiple_consecutive_numeric_separators_are_not_permitted_6189","Multiple consecutive numeric separators are not permitted."),Whether_to_keep_outdated_console_output_in_watch_mode_instead_of_clearing_the_screen:u(6191,3,"Whether_to_keep_outdated_console_output_in_watch_mode_instead_of_clearing_the_screen_6191","Whether to keep outdated console output in watch mode instead of clearing the screen."),All_imports_in_import_declaration_are_unused:u(6192,1,"All_imports_in_import_declaration_are_unused_6192","All imports in import declaration are unused.",!0),Found_1_error_Watching_for_file_changes:u(6193,3,"Found_1_error_Watching_for_file_changes_6193","Found 1 error. Watching for file changes."),Found_0_errors_Watching_for_file_changes:u(6194,3,"Found_0_errors_Watching_for_file_changes_6194","Found {0} errors. Watching for file changes."),Resolve_keyof_to_string_valued_property_names_only_no_numbers_or_symbols:u(6195,3,"Resolve_keyof_to_string_valued_property_names_only_no_numbers_or_symbols_6195","Resolve 'keyof' to string valued property names only (no numbers or symbols)."),_0_is_declared_but_never_used:u(6196,1,"_0_is_declared_but_never_used_6196","'{0}' is declared but never used.",!0),Include_modules_imported_with_json_extension:u(6197,3,"Include_modules_imported_with_json_extension_6197","Include modules imported with '.json' extension"),All_destructured_elements_are_unused:u(6198,1,"All_destructured_elements_are_unused_6198","All destructured elements are unused.",!0),All_variables_are_unused:u(6199,1,"All_variables_are_unused_6199","All variables are unused.",!0),Definitions_of_the_following_identifiers_conflict_with_those_in_another_file_Colon_0:u(6200,1,"Definitions_of_the_following_identifiers_conflict_with_those_in_another_file_Colon_0_6200","Definitions of the following identifiers conflict with those in another file: {0}"),Conflicts_are_in_this_file:u(6201,3,"Conflicts_are_in_this_file_6201","Conflicts are in this file."),Project_references_may_not_form_a_circular_graph_Cycle_detected_Colon_0:u(6202,1,"Project_references_may_not_form_a_circular_graph_Cycle_detected_Colon_0_6202","Project references may not form a circular graph. Cycle detected: {0}"),_0_was_also_declared_here:u(6203,3,"_0_was_also_declared_here_6203","'{0}' was also declared here."),and_here:u(6204,3,"and_here_6204","and here."),All_type_parameters_are_unused:u(6205,1,"All_type_parameters_are_unused_6205","All type parameters are unused."),package_json_has_a_typesVersions_field_with_version_specific_path_mappings:u(6206,3,"package_json_has_a_typesVersions_field_with_version_specific_path_mappings_6206","'package.json' has a 'typesVersions' field with version-specific path mappings."),package_json_does_not_have_a_typesVersions_entry_that_matches_version_0:u(6207,3,"package_json_does_not_have_a_typesVersions_entry_that_matches_version_0_6207","'package.json' does not have a 'typesVersions' entry that matches version '{0}'."),package_json_has_a_typesVersions_entry_0_that_matches_compiler_version_1_looking_for_a_pattern_to_match_module_name_2:u(6208,3,"package_json_has_a_typesVersions_entry_0_that_matches_compiler_version_1_looking_for_a_pattern_to_ma_6208","'package.json' has a 'typesVersions' entry '{0}' that matches compiler version '{1}', looking for a pattern to match module name '{2}'."),package_json_has_a_typesVersions_entry_0_that_is_not_a_valid_semver_range:u(6209,3,"package_json_has_a_typesVersions_entry_0_that_is_not_a_valid_semver_range_6209","'package.json' has a 'typesVersions' entry '{0}' that is not a valid semver range."),An_argument_for_0_was_not_provided:u(6210,3,"An_argument_for_0_was_not_provided_6210","An argument for '{0}' was not provided."),An_argument_matching_this_binding_pattern_was_not_provided:u(6211,3,"An_argument_matching_this_binding_pattern_was_not_provided_6211","An argument matching this binding pattern was not provided."),Did_you_mean_to_call_this_expression:u(6212,3,"Did_you_mean_to_call_this_expression_6212","Did you mean to call this expression?"),Did_you_mean_to_use_new_with_this_expression:u(6213,3,"Did_you_mean_to_use_new_with_this_expression_6213","Did you mean to use 'new' with this expression?"),Enable_strict_bind_call_and_apply_methods_on_functions:u(6214,3,"Enable_strict_bind_call_and_apply_methods_on_functions_6214","Enable strict 'bind', 'call', and 'apply' methods on functions."),Using_compiler_options_of_project_reference_redirect_0:u(6215,3,"Using_compiler_options_of_project_reference_redirect_0_6215","Using compiler options of project reference redirect '{0}'."),Found_1_error:u(6216,3,"Found_1_error_6216","Found 1 error."),Found_0_errors:u(6217,3,"Found_0_errors_6217","Found {0} errors."),Module_name_0_was_successfully_resolved_to_1_with_Package_ID_2:u(6218,3,"Module_name_0_was_successfully_resolved_to_1_with_Package_ID_2_6218","======== Module name '{0}' was successfully resolved to '{1}' with Package ID '{2}'. ========"),Type_reference_directive_0_was_successfully_resolved_to_1_with_Package_ID_2_primary_Colon_3:u(6219,3,"Type_reference_directive_0_was_successfully_resolved_to_1_with_Package_ID_2_primary_Colon_3_6219","======== Type reference directive '{0}' was successfully resolved to '{1}' with Package ID '{2}', primary: {3}. ========"),package_json_had_a_falsy_0_field:u(6220,3,"package_json_had_a_falsy_0_field_6220","'package.json' had a falsy '{0}' field."),Disable_use_of_source_files_instead_of_declaration_files_from_referenced_projects:u(6221,3,"Disable_use_of_source_files_instead_of_declaration_files_from_referenced_projects_6221","Disable use of source files instead of declaration files from referenced projects."),Emit_class_fields_with_Define_instead_of_Set:u(6222,3,"Emit_class_fields_with_Define_instead_of_Set_6222","Emit class fields with Define instead of Set."),Generates_a_CPU_profile:u(6223,3,"Generates_a_CPU_profile_6223","Generates a CPU profile."),Disable_solution_searching_for_this_project:u(6224,3,"Disable_solution_searching_for_this_project_6224","Disable solution searching for this project."),Specify_strategy_for_watching_file_Colon_FixedPollingInterval_default_PriorityPollingInterval_DynamicPriorityPolling_FixedChunkSizePolling_UseFsEvents_UseFsEventsOnParentDirectory:u(6225,3,"Specify_strategy_for_watching_file_Colon_FixedPollingInterval_default_PriorityPollingInterval_Dynami_6225","Specify strategy for watching file: 'FixedPollingInterval' (default), 'PriorityPollingInterval', 'DynamicPriorityPolling', 'FixedChunkSizePolling', 'UseFsEvents', 'UseFsEventsOnParentDirectory'."),Specify_strategy_for_watching_directory_on_platforms_that_don_t_support_recursive_watching_natively_Colon_UseFsEvents_default_FixedPollingInterval_DynamicPriorityPolling_FixedChunkSizePolling:u(6226,3,"Specify_strategy_for_watching_directory_on_platforms_that_don_t_support_recursive_watching_natively__6226","Specify strategy for watching directory on platforms that don't support recursive watching natively: 'UseFsEvents' (default), 'FixedPollingInterval', 'DynamicPriorityPolling', 'FixedChunkSizePolling'."),Specify_strategy_for_creating_a_polling_watch_when_it_fails_to_create_using_file_system_events_Colon_FixedInterval_default_PriorityInterval_DynamicPriority_FixedChunkSize:u(6227,3,"Specify_strategy_for_creating_a_polling_watch_when_it_fails_to_create_using_file_system_events_Colon_6227","Specify strategy for creating a polling watch when it fails to create using file system events: 'FixedInterval' (default), 'PriorityInterval', 'DynamicPriority', 'FixedChunkSize'."),Tag_0_expects_at_least_1_arguments_but_the_JSX_factory_2_provides_at_most_3:u(6229,1,"Tag_0_expects_at_least_1_arguments_but_the_JSX_factory_2_provides_at_most_3_6229","Tag '{0}' expects at least '{1}' arguments, but the JSX factory '{2}' provides at most '{3}'."),Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_false_or_null_on_command_line:u(6230,1,"Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_false_or_null_on_command_line_6230","Option '{0}' can only be specified in 'tsconfig.json' file or set to 'false' or 'null' on command line."),Could_not_resolve_the_path_0_with_the_extensions_Colon_1:u(6231,1,"Could_not_resolve_the_path_0_with_the_extensions_Colon_1_6231","Could not resolve the path '{0}' with the extensions: {1}."),Declaration_augments_declaration_in_another_file_This_cannot_be_serialized:u(6232,1,"Declaration_augments_declaration_in_another_file_This_cannot_be_serialized_6232","Declaration augments declaration in another file. This cannot be serialized."),This_is_the_declaration_being_augmented_Consider_moving_the_augmenting_declaration_into_the_same_file:u(6233,1,"This_is_the_declaration_being_augmented_Consider_moving_the_augmenting_declaration_into_the_same_fil_6233","This is the declaration being augmented. Consider moving the augmenting declaration into the same file."),This_expression_is_not_callable_because_it_is_a_get_accessor_Did_you_mean_to_use_it_without:u(6234,1,"This_expression_is_not_callable_because_it_is_a_get_accessor_Did_you_mean_to_use_it_without_6234","This expression is not callable because it is a 'get' accessor. Did you mean to use it without '()'?"),Disable_loading_referenced_projects:u(6235,3,"Disable_loading_referenced_projects_6235","Disable loading referenced projects."),Arguments_for_the_rest_parameter_0_were_not_provided:u(6236,1,"Arguments_for_the_rest_parameter_0_were_not_provided_6236","Arguments for the rest parameter '{0}' were not provided."),Generates_an_event_trace_and_a_list_of_types:u(6237,3,"Generates_an_event_trace_and_a_list_of_types_6237","Generates an event trace and a list of types."),Specify_the_module_specifier_to_be_used_to_import_the_jsx_and_jsxs_factory_functions_from_eg_react:u(6238,1,"Specify_the_module_specifier_to_be_used_to_import_the_jsx_and_jsxs_factory_functions_from_eg_react_6238","Specify the module specifier to be used to import the 'jsx' and 'jsxs' factory functions from. eg, react"),File_0_exists_according_to_earlier_cached_lookups:u(6239,3,"File_0_exists_according_to_earlier_cached_lookups_6239","File '{0}' exists according to earlier cached lookups."),File_0_does_not_exist_according_to_earlier_cached_lookups:u(6240,3,"File_0_does_not_exist_according_to_earlier_cached_lookups_6240","File '{0}' does not exist according to earlier cached lookups."),Resolution_for_type_reference_directive_0_was_found_in_cache_from_location_1:u(6241,3,"Resolution_for_type_reference_directive_0_was_found_in_cache_from_location_1_6241","Resolution for type reference directive '{0}' was found in cache from location '{1}'."),Resolving_type_reference_directive_0_containing_file_1:u(6242,3,"Resolving_type_reference_directive_0_containing_file_1_6242","======== Resolving type reference directive '{0}', containing file '{1}'. ========"),Interpret_optional_property_types_as_written_rather_than_adding_undefined:u(6243,3,"Interpret_optional_property_types_as_written_rather_than_adding_undefined_6243","Interpret optional property types as written, rather than adding 'undefined'."),Modules:u(6244,3,"Modules_6244","Modules"),File_Management:u(6245,3,"File_Management_6245","File Management"),Emit:u(6246,3,"Emit_6246","Emit"),JavaScript_Support:u(6247,3,"JavaScript_Support_6247","JavaScript Support"),Type_Checking:u(6248,3,"Type_Checking_6248","Type Checking"),Editor_Support:u(6249,3,"Editor_Support_6249","Editor Support"),Watch_and_Build_Modes:u(6250,3,"Watch_and_Build_Modes_6250","Watch and Build Modes"),Compiler_Diagnostics:u(6251,3,"Compiler_Diagnostics_6251","Compiler Diagnostics"),Interop_Constraints:u(6252,3,"Interop_Constraints_6252","Interop Constraints"),Backwards_Compatibility:u(6253,3,"Backwards_Compatibility_6253","Backwards Compatibility"),Language_and_Environment:u(6254,3,"Language_and_Environment_6254","Language and Environment"),Projects:u(6255,3,"Projects_6255","Projects"),Output_Formatting:u(6256,3,"Output_Formatting_6256","Output Formatting"),Completeness:u(6257,3,"Completeness_6257","Completeness"),_0_should_be_set_inside_the_compilerOptions_object_of_the_config_json_file:u(6258,1,"_0_should_be_set_inside_the_compilerOptions_object_of_the_config_json_file_6258","'{0}' should be set inside the 'compilerOptions' object of the config json file"),Found_1_error_in_0:u(6259,3,"Found_1_error_in_0_6259","Found 1 error in {0}"),Found_0_errors_in_the_same_file_starting_at_Colon_1:u(6260,3,"Found_0_errors_in_the_same_file_starting_at_Colon_1_6260","Found {0} errors in the same file, starting at: {1}"),Found_0_errors_in_1_files:u(6261,3,"Found_0_errors_in_1_files_6261","Found {0} errors in {1} files."),File_name_0_has_a_1_extension_looking_up_2_instead:u(6262,3,"File_name_0_has_a_1_extension_looking_up_2_instead_6262","File name '{0}' has a '{1}' extension - looking up '{2}' instead."),Module_0_was_resolved_to_1_but_allowArbitraryExtensions_is_not_set:u(6263,1,"Module_0_was_resolved_to_1_but_allowArbitraryExtensions_is_not_set_6263","Module '{0}' was resolved to '{1}', but '--allowArbitraryExtensions' is not set."),Enable_importing_files_with_any_extension_provided_a_declaration_file_is_present:u(6264,3,"Enable_importing_files_with_any_extension_provided_a_declaration_file_is_present_6264","Enable importing files with any extension, provided a declaration file is present."),Resolving_type_reference_directive_for_program_that_specifies_custom_typeRoots_skipping_lookup_in_node_modules_folder:u(6265,3,"Resolving_type_reference_directive_for_program_that_specifies_custom_typeRoots_skipping_lookup_in_no_6265","Resolving type reference directive for program that specifies custom typeRoots, skipping lookup in 'node_modules' folder."),Option_0_can_only_be_specified_on_command_line:u(6266,1,"Option_0_can_only_be_specified_on_command_line_6266","Option '{0}' can only be specified on command line."),Directory_0_has_no_containing_package_json_scope_Imports_will_not_resolve:u(6270,3,"Directory_0_has_no_containing_package_json_scope_Imports_will_not_resolve_6270","Directory '{0}' has no containing package.json scope. Imports will not resolve."),Import_specifier_0_does_not_exist_in_package_json_scope_at_path_1:u(6271,3,"Import_specifier_0_does_not_exist_in_package_json_scope_at_path_1_6271","Import specifier '{0}' does not exist in package.json scope at path '{1}'."),Invalid_import_specifier_0_has_no_possible_resolutions:u(6272,3,"Invalid_import_specifier_0_has_no_possible_resolutions_6272","Invalid import specifier '{0}' has no possible resolutions."),package_json_scope_0_has_no_imports_defined:u(6273,3,"package_json_scope_0_has_no_imports_defined_6273","package.json scope '{0}' has no imports defined."),package_json_scope_0_explicitly_maps_specifier_1_to_null:u(6274,3,"package_json_scope_0_explicitly_maps_specifier_1_to_null_6274","package.json scope '{0}' explicitly maps specifier '{1}' to null."),package_json_scope_0_has_invalid_type_for_target_of_specifier_1:u(6275,3,"package_json_scope_0_has_invalid_type_for_target_of_specifier_1_6275","package.json scope '{0}' has invalid type for target of specifier '{1}'"),Export_specifier_0_does_not_exist_in_package_json_scope_at_path_1:u(6276,3,"Export_specifier_0_does_not_exist_in_package_json_scope_at_path_1_6276","Export specifier '{0}' does not exist in package.json scope at path '{1}'."),Resolution_of_non_relative_name_failed_trying_with_modern_Node_resolution_features_disabled_to_see_if_npm_library_needs_configuration_update:u(6277,3,"Resolution_of_non_relative_name_failed_trying_with_modern_Node_resolution_features_disabled_to_see_i_6277","Resolution of non-relative name failed; trying with modern Node resolution features disabled to see if npm library needs configuration update."),There_are_types_at_0_but_this_result_could_not_be_resolved_when_respecting_package_json_exports_The_1_library_may_need_to_update_its_package_json_or_typings:u(6278,3,"There_are_types_at_0_but_this_result_could_not_be_resolved_when_respecting_package_json_exports_The__6278",`There are types at '{0}', but this result could not be resolved when respecting package.json "exports". The '{1}' library may need to update its package.json or typings.`),Resolution_of_non_relative_name_failed_trying_with_moduleResolution_bundler_to_see_if_project_may_need_configuration_update:u(6279,3,"Resolution_of_non_relative_name_failed_trying_with_moduleResolution_bundler_to_see_if_project_may_ne_6279","Resolution of non-relative name failed; trying with '--moduleResolution bundler' to see if project may need configuration update."),There_are_types_at_0_but_this_result_could_not_be_resolved_under_your_current_moduleResolution_setting_Consider_updating_to_node16_nodenext_or_bundler:u(6280,3,"There_are_types_at_0_but_this_result_could_not_be_resolved_under_your_current_moduleResolution_setti_6280","There are types at '{0}', but this result could not be resolved under your current 'moduleResolution' setting. Consider updating to 'node16', 'nodenext', or 'bundler'."),package_json_has_a_peerDependencies_field:u(6281,3,"package_json_has_a_peerDependencies_field_6281","'package.json' has a 'peerDependencies' field."),Found_peerDependency_0_with_1_version:u(6282,3,"Found_peerDependency_0_with_1_version_6282","Found peerDependency '{0}' with '{1}' version."),Failed_to_find_peerDependency_0:u(6283,3,"Failed_to_find_peerDependency_0_6283","Failed to find peerDependency '{0}'."),File_Layout:u(6284,3,"File_Layout_6284","File Layout"),Environment_Settings:u(6285,3,"Environment_Settings_6285","Environment Settings"),See_also_https_Colon_Slash_Slashaka_ms_Slashtsconfig_Slashmodule:u(6286,3,"See_also_https_Colon_Slash_Slashaka_ms_Slashtsconfig_Slashmodule_6286","See also https://aka.ms/tsconfig/module"),For_nodejs_Colon:u(6287,3,"For_nodejs_Colon_6287","For nodejs:"),and_npm_install_D_types_Slashnode:u(6290,3,"and_npm_install_D_types_Slashnode_6290","and npm install -D @types/node"),Other_Outputs:u(6291,3,"Other_Outputs_6291","Other Outputs"),Stricter_Typechecking_Options:u(6292,3,"Stricter_Typechecking_Options_6292","Stricter Typechecking Options"),Style_Options:u(6293,3,"Style_Options_6293","Style Options"),Recommended_Options:u(6294,3,"Recommended_Options_6294","Recommended Options"),Enable_project_compilation:u(6302,3,"Enable_project_compilation_6302","Enable project compilation"),Composite_projects_may_not_disable_declaration_emit:u(6304,1,"Composite_projects_may_not_disable_declaration_emit_6304","Composite projects may not disable declaration emit."),Output_file_0_has_not_been_built_from_source_file_1:u(6305,1,"Output_file_0_has_not_been_built_from_source_file_1_6305","Output file '{0}' has not been built from source file '{1}'."),Referenced_project_0_must_have_setting_composite_Colon_true:u(6306,1,"Referenced_project_0_must_have_setting_composite_Colon_true_6306",`Referenced project '{0}' must have setting "composite": true.`),File_0_is_not_listed_within_the_file_list_of_project_1_Projects_must_list_all_files_or_use_an_include_pattern:u(6307,1,"File_0_is_not_listed_within_the_file_list_of_project_1_Projects_must_list_all_files_or_use_an_includ_6307","File '{0}' is not listed within the file list of project '{1}'. Projects must list all files or use an 'include' pattern."),Referenced_project_0_may_not_disable_emit:u(6310,1,"Referenced_project_0_may_not_disable_emit_6310","Referenced project '{0}' may not disable emit."),Project_0_is_out_of_date_because_output_1_is_older_than_input_2:u(6350,3,"Project_0_is_out_of_date_because_output_1_is_older_than_input_2_6350","Project '{0}' is out of date because output '{1}' is older than input '{2}'"),Project_0_is_up_to_date_because_newest_input_1_is_older_than_output_2:u(6351,3,"Project_0_is_up_to_date_because_newest_input_1_is_older_than_output_2_6351","Project '{0}' is up to date because newest input '{1}' is older than output '{2}'"),Project_0_is_out_of_date_because_output_file_1_does_not_exist:u(6352,3,"Project_0_is_out_of_date_because_output_file_1_does_not_exist_6352","Project '{0}' is out of date because output file '{1}' does not exist"),Project_0_is_out_of_date_because_its_dependency_1_is_out_of_date:u(6353,3,"Project_0_is_out_of_date_because_its_dependency_1_is_out_of_date_6353","Project '{0}' is out of date because its dependency '{1}' is out of date"),Project_0_is_up_to_date_with_d_ts_files_from_its_dependencies:u(6354,3,"Project_0_is_up_to_date_with_d_ts_files_from_its_dependencies_6354","Project '{0}' is up to date with .d.ts files from its dependencies"),Projects_in_this_build_Colon_0:u(6355,3,"Projects_in_this_build_Colon_0_6355","Projects in this build: {0}"),A_non_dry_build_would_delete_the_following_files_Colon_0:u(6356,3,"A_non_dry_build_would_delete_the_following_files_Colon_0_6356","A non-dry build would delete the following files: {0}"),A_non_dry_build_would_build_project_0:u(6357,3,"A_non_dry_build_would_build_project_0_6357","A non-dry build would build project '{0}'"),Building_project_0:u(6358,3,"Building_project_0_6358","Building project '{0}'..."),Updating_output_timestamps_of_project_0:u(6359,3,"Updating_output_timestamps_of_project_0_6359","Updating output timestamps of project '{0}'..."),Project_0_is_up_to_date:u(6361,3,"Project_0_is_up_to_date_6361","Project '{0}' is up to date"),Skipping_build_of_project_0_because_its_dependency_1_has_errors:u(6362,3,"Skipping_build_of_project_0_because_its_dependency_1_has_errors_6362","Skipping build of project '{0}' because its dependency '{1}' has errors"),Project_0_can_t_be_built_because_its_dependency_1_has_errors:u(6363,3,"Project_0_can_t_be_built_because_its_dependency_1_has_errors_6363","Project '{0}' can't be built because its dependency '{1}' has errors"),Build_one_or_more_projects_and_their_dependencies_if_out_of_date:u(6364,3,"Build_one_or_more_projects_and_their_dependencies_if_out_of_date_6364","Build one or more projects and their dependencies, if out of date"),Delete_the_outputs_of_all_projects:u(6365,3,"Delete_the_outputs_of_all_projects_6365","Delete the outputs of all projects."),Show_what_would_be_built_or_deleted_if_specified_with_clean:u(6367,3,"Show_what_would_be_built_or_deleted_if_specified_with_clean_6367","Show what would be built (or deleted, if specified with '--clean')"),Option_build_must_be_the_first_command_line_argument:u(6369,1,"Option_build_must_be_the_first_command_line_argument_6369","Option '--build' must be the first command line argument."),Options_0_and_1_cannot_be_combined:u(6370,1,"Options_0_and_1_cannot_be_combined_6370","Options '{0}' and '{1}' cannot be combined."),Updating_unchanged_output_timestamps_of_project_0:u(6371,3,"Updating_unchanged_output_timestamps_of_project_0_6371","Updating unchanged output timestamps of project '{0}'..."),A_non_dry_build_would_update_timestamps_for_output_of_project_0:u(6374,3,"A_non_dry_build_would_update_timestamps_for_output_of_project_0_6374","A non-dry build would update timestamps for output of project '{0}'"),Cannot_write_file_0_because_it_will_overwrite_tsbuildinfo_file_generated_by_referenced_project_1:u(6377,1,"Cannot_write_file_0_because_it_will_overwrite_tsbuildinfo_file_generated_by_referenced_project_1_6377","Cannot write file '{0}' because it will overwrite '.tsbuildinfo' file generated by referenced project '{1}'"),Composite_projects_may_not_disable_incremental_compilation:u(6379,1,"Composite_projects_may_not_disable_incremental_compilation_6379","Composite projects may not disable incremental compilation."),Specify_file_to_store_incremental_compilation_information:u(6380,3,"Specify_file_to_store_incremental_compilation_information_6380","Specify file to store incremental compilation information"),Project_0_is_out_of_date_because_output_for_it_was_generated_with_version_1_that_differs_with_current_version_2:u(6381,3,"Project_0_is_out_of_date_because_output_for_it_was_generated_with_version_1_that_differs_with_curren_6381","Project '{0}' is out of date because output for it was generated with version '{1}' that differs with current version '{2}'"),Skipping_build_of_project_0_because_its_dependency_1_was_not_built:u(6382,3,"Skipping_build_of_project_0_because_its_dependency_1_was_not_built_6382","Skipping build of project '{0}' because its dependency '{1}' was not built"),Project_0_can_t_be_built_because_its_dependency_1_was_not_built:u(6383,3,"Project_0_can_t_be_built_because_its_dependency_1_was_not_built_6383","Project '{0}' can't be built because its dependency '{1}' was not built"),Have_recompiles_in_incremental_and_watch_assume_that_changes_within_a_file_will_only_affect_files_directly_depending_on_it:u(6384,3,"Have_recompiles_in_incremental_and_watch_assume_that_changes_within_a_file_will_only_affect_files_di_6384","Have recompiles in '--incremental' and '--watch' assume that changes within a file will only affect files directly depending on it."),_0_is_deprecated:u(6385,2,"_0_is_deprecated_6385","'{0}' is deprecated.",void 0,void 0,!0),Performance_timings_for_diagnostics_or_extendedDiagnostics_are_not_available_in_this_session_A_native_implementation_of_the_Web_Performance_API_could_not_be_found:u(6386,3,"Performance_timings_for_diagnostics_or_extendedDiagnostics_are_not_available_in_this_session_A_nativ_6386","Performance timings for '--diagnostics' or '--extendedDiagnostics' are not available in this session. A native implementation of the Web Performance API could not be found."),The_signature_0_of_1_is_deprecated:u(6387,2,"The_signature_0_of_1_is_deprecated_6387","The signature '{0}' of '{1}' is deprecated.",void 0,void 0,!0),Project_0_is_being_forcibly_rebuilt:u(6388,3,"Project_0_is_being_forcibly_rebuilt_6388","Project '{0}' is being forcibly rebuilt"),Reusing_resolution_of_module_0_from_1_of_old_program_it_was_not_resolved:u(6389,3,"Reusing_resolution_of_module_0_from_1_of_old_program_it_was_not_resolved_6389","Reusing resolution of module '{0}' from '{1}' of old program, it was not resolved."),Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved_to_2:u(6390,3,"Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved__6390","Reusing resolution of type reference directive '{0}' from '{1}' of old program, it was successfully resolved to '{2}'."),Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package_ID_3:u(6391,3,"Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved__6391","Reusing resolution of type reference directive '{0}' from '{1}' of old program, it was successfully resolved to '{2}' with Package ID '{3}'."),Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_not_resolved:u(6392,3,"Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_not_resolved_6392","Reusing resolution of type reference directive '{0}' from '{1}' of old program, it was not resolved."),Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_3:u(6393,3,"Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_6393","Reusing resolution of module '{0}' from '{1}' found in cache from location '{2}', it was successfully resolved to '{3}'."),Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_3_with_Package_ID_4:u(6394,3,"Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_6394","Reusing resolution of module '{0}' from '{1}' found in cache from location '{2}', it was successfully resolved to '{3}' with Package ID '{4}'."),Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_not_resolved:u(6395,3,"Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_not_resolved_6395","Reusing resolution of module '{0}' from '{1}' found in cache from location '{2}', it was not resolved."),Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_3:u(6396,3,"Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_succes_6396","Reusing resolution of type reference directive '{0}' from '{1}' found in cache from location '{2}', it was successfully resolved to '{3}'."),Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_3_with_Package_ID_4:u(6397,3,"Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_succes_6397","Reusing resolution of type reference directive '{0}' from '{1}' found in cache from location '{2}', it was successfully resolved to '{3}' with Package ID '{4}'."),Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_not_resolved:u(6398,3,"Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_not_re_6398","Reusing resolution of type reference directive '{0}' from '{1}' found in cache from location '{2}', it was not resolved."),Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_some_of_the_changes_were_not_emitted:u(6399,3,"Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_some_of_the_changes_were_not_emitte_6399","Project '{0}' is out of date because buildinfo file '{1}' indicates that some of the changes were not emitted"),Project_0_is_up_to_date_but_needs_to_update_timestamps_of_output_files_that_are_older_than_input_files:u(6400,3,"Project_0_is_up_to_date_but_needs_to_update_timestamps_of_output_files_that_are_older_than_input_fil_6400","Project '{0}' is up to date but needs to update timestamps of output files that are older than input files"),Project_0_is_out_of_date_because_there_was_error_reading_file_1:u(6401,3,"Project_0_is_out_of_date_because_there_was_error_reading_file_1_6401","Project '{0}' is out of date because there was error reading file '{1}'"),Resolving_in_0_mode_with_conditions_1:u(6402,3,"Resolving_in_0_mode_with_conditions_1_6402","Resolving in {0} mode with conditions {1}."),Matched_0_condition_1:u(6403,3,"Matched_0_condition_1_6403","Matched '{0}' condition '{1}'."),Using_0_subpath_1_with_target_2:u(6404,3,"Using_0_subpath_1_with_target_2_6404","Using '{0}' subpath '{1}' with target '{2}'."),Saw_non_matching_condition_0:u(6405,3,"Saw_non_matching_condition_0_6405","Saw non-matching condition '{0}'."),Project_0_is_out_of_date_because_buildinfo_file_1_indicates_there_is_change_in_compilerOptions:u(6406,3,"Project_0_is_out_of_date_because_buildinfo_file_1_indicates_there_is_change_in_compilerOptions_6406","Project '{0}' is out of date because buildinfo file '{1}' indicates there is change in compilerOptions"),Allow_imports_to_include_TypeScript_file_extensions_Requires_moduleResolution_bundler_and_either_noEmit_or_emitDeclarationOnly_to_be_set:u(6407,3,"Allow_imports_to_include_TypeScript_file_extensions_Requires_moduleResolution_bundler_and_either_noE_6407","Allow imports to include TypeScript file extensions. Requires '--moduleResolution bundler' and either '--noEmit' or '--emitDeclarationOnly' to be set."),Use_the_package_json_exports_field_when_resolving_package_imports:u(6408,3,"Use_the_package_json_exports_field_when_resolving_package_imports_6408","Use the package.json 'exports' field when resolving package imports."),Use_the_package_json_imports_field_when_resolving_imports:u(6409,3,"Use_the_package_json_imports_field_when_resolving_imports_6409","Use the package.json 'imports' field when resolving imports."),Conditions_to_set_in_addition_to_the_resolver_specific_defaults_when_resolving_imports:u(6410,3,"Conditions_to_set_in_addition_to_the_resolver_specific_defaults_when_resolving_imports_6410","Conditions to set in addition to the resolver-specific defaults when resolving imports."),true_when_moduleResolution_is_node16_nodenext_or_bundler_otherwise_false:u(6411,3,"true_when_moduleResolution_is_node16_nodenext_or_bundler_otherwise_false_6411","`true` when 'moduleResolution' is 'node16', 'nodenext', or 'bundler'; otherwise `false`."),Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_file_2_was_root_file_of_compilation_but_not_any_more:u(6412,3,"Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_file_2_was_root_file_of_compilation_6412","Project '{0}' is out of date because buildinfo file '{1}' indicates that file '{2}' was root file of compilation but not any more."),Entering_conditional_exports:u(6413,3,"Entering_conditional_exports_6413","Entering conditional exports."),Resolved_under_condition_0:u(6414,3,"Resolved_under_condition_0_6414","Resolved under condition '{0}'."),Failed_to_resolve_under_condition_0:u(6415,3,"Failed_to_resolve_under_condition_0_6415","Failed to resolve under condition '{0}'."),Exiting_conditional_exports:u(6416,3,"Exiting_conditional_exports_6416","Exiting conditional exports."),Searching_all_ancestor_node_modules_directories_for_preferred_extensions_Colon_0:u(6417,3,"Searching_all_ancestor_node_modules_directories_for_preferred_extensions_Colon_0_6417","Searching all ancestor node_modules directories for preferred extensions: {0}."),Searching_all_ancestor_node_modules_directories_for_fallback_extensions_Colon_0:u(6418,3,"Searching_all_ancestor_node_modules_directories_for_fallback_extensions_Colon_0_6418","Searching all ancestor node_modules directories for fallback extensions: {0}."),Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_program_needs_to_report_errors:u(6419,3,"Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_program_needs_to_report_errors_6419","Project '{0}' is out of date because buildinfo file '{1}' indicates that program needs to report errors."),Project_0_is_out_of_date_because_1:u(6420,3,"Project_0_is_out_of_date_because_1_6420","Project '{0}' is out of date because {1}."),Rewrite_ts_tsx_mts_and_cts_file_extensions_in_relative_import_paths_to_their_JavaScript_equivalent_in_output_files:u(6421,3,"Rewrite_ts_tsx_mts_and_cts_file_extensions_in_relative_import_paths_to_their_JavaScript_equivalent_i_6421","Rewrite '.ts', '.tsx', '.mts', and '.cts' file extensions in relative import paths to their JavaScript equivalent in output files."),The_expected_type_comes_from_property_0_which_is_declared_here_on_type_1:u(6500,3,"The_expected_type_comes_from_property_0_which_is_declared_here_on_type_1_6500","The expected type comes from property '{0}' which is declared here on type '{1}'"),The_expected_type_comes_from_this_index_signature:u(6501,3,"The_expected_type_comes_from_this_index_signature_6501","The expected type comes from this index signature."),The_expected_type_comes_from_the_return_type_of_this_signature:u(6502,3,"The_expected_type_comes_from_the_return_type_of_this_signature_6502","The expected type comes from the return type of this signature."),Print_names_of_files_that_are_part_of_the_compilation_and_then_stop_processing:u(6503,3,"Print_names_of_files_that_are_part_of_the_compilation_and_then_stop_processing_6503","Print names of files that are part of the compilation and then stop processing."),File_0_is_a_JavaScript_file_Did_you_mean_to_enable_the_allowJs_option:u(6504,1,"File_0_is_a_JavaScript_file_Did_you_mean_to_enable_the_allowJs_option_6504","File '{0}' is a JavaScript file. Did you mean to enable the 'allowJs' option?"),Print_names_of_files_and_the_reason_they_are_part_of_the_compilation:u(6505,3,"Print_names_of_files_and_the_reason_they_are_part_of_the_compilation_6505","Print names of files and the reason they are part of the compilation."),Consider_adding_a_declare_modifier_to_this_class:u(6506,3,"Consider_adding_a_declare_modifier_to_this_class_6506","Consider adding a 'declare' modifier to this class."),Allow_JavaScript_files_to_be_a_part_of_your_program_Use_the_checkJs_option_to_get_errors_from_these_files:u(6600,3,"Allow_JavaScript_files_to_be_a_part_of_your_program_Use_the_checkJs_option_to_get_errors_from_these__6600","Allow JavaScript files to be a part of your program. Use the 'checkJs' option to get errors from these files."),Allow_import_x_from_y_when_a_module_doesn_t_have_a_default_export:u(6601,3,"Allow_import_x_from_y_when_a_module_doesn_t_have_a_default_export_6601","Allow 'import x from y' when a module doesn't have a default export."),Allow_accessing_UMD_globals_from_modules:u(6602,3,"Allow_accessing_UMD_globals_from_modules_6602","Allow accessing UMD globals from modules."),Disable_error_reporting_for_unreachable_code:u(6603,3,"Disable_error_reporting_for_unreachable_code_6603","Disable error reporting for unreachable code."),Disable_error_reporting_for_unused_labels:u(6604,3,"Disable_error_reporting_for_unused_labels_6604","Disable error reporting for unused labels."),Ensure_use_strict_is_always_emitted:u(6605,3,"Ensure_use_strict_is_always_emitted_6605","Ensure 'use strict' is always emitted."),Have_recompiles_in_projects_that_use_incremental_and_watch_mode_assume_that_changes_within_a_file_will_only_affect_files_directly_depending_on_it:u(6606,3,"Have_recompiles_in_projects_that_use_incremental_and_watch_mode_assume_that_changes_within_a_file_wi_6606","Have recompiles in projects that use 'incremental' and 'watch' mode assume that changes within a file will only affect files directly depending on it."),Specify_the_base_directory_to_resolve_non_relative_module_names:u(6607,3,"Specify_the_base_directory_to_resolve_non_relative_module_names_6607","Specify the base directory to resolve non-relative module names."),No_longer_supported_In_early_versions_manually_set_the_text_encoding_for_reading_files:u(6608,3,"No_longer_supported_In_early_versions_manually_set_the_text_encoding_for_reading_files_6608","No longer supported. In early versions, manually set the text encoding for reading files."),Enable_error_reporting_in_type_checked_JavaScript_files:u(6609,3,"Enable_error_reporting_in_type_checked_JavaScript_files_6609","Enable error reporting in type-checked JavaScript files."),Enable_constraints_that_allow_a_TypeScript_project_to_be_used_with_project_references:u(6611,3,"Enable_constraints_that_allow_a_TypeScript_project_to_be_used_with_project_references_6611","Enable constraints that allow a TypeScript project to be used with project references."),Generate_d_ts_files_from_TypeScript_and_JavaScript_files_in_your_project:u(6612,3,"Generate_d_ts_files_from_TypeScript_and_JavaScript_files_in_your_project_6612","Generate .d.ts files from TypeScript and JavaScript files in your project."),Specify_the_output_directory_for_generated_declaration_files:u(6613,3,"Specify_the_output_directory_for_generated_declaration_files_6613","Specify the output directory for generated declaration files."),Create_sourcemaps_for_d_ts_files:u(6614,3,"Create_sourcemaps_for_d_ts_files_6614","Create sourcemaps for d.ts files."),Output_compiler_performance_information_after_building:u(6615,3,"Output_compiler_performance_information_after_building_6615","Output compiler performance information after building."),Disables_inference_for_type_acquisition_by_looking_at_filenames_in_a_project:u(6616,3,"Disables_inference_for_type_acquisition_by_looking_at_filenames_in_a_project_6616","Disables inference for type acquisition by looking at filenames in a project."),Reduce_the_number_of_projects_loaded_automatically_by_TypeScript:u(6617,3,"Reduce_the_number_of_projects_loaded_automatically_by_TypeScript_6617","Reduce the number of projects loaded automatically by TypeScript."),Remove_the_20mb_cap_on_total_source_code_size_for_JavaScript_files_in_the_TypeScript_language_server:u(6618,3,"Remove_the_20mb_cap_on_total_source_code_size_for_JavaScript_files_in_the_TypeScript_language_server_6618","Remove the 20mb cap on total source code size for JavaScript files in the TypeScript language server."),Opt_a_project_out_of_multi_project_reference_checking_when_editing:u(6619,3,"Opt_a_project_out_of_multi_project_reference_checking_when_editing_6619","Opt a project out of multi-project reference checking when editing."),Disable_preferring_source_files_instead_of_declaration_files_when_referencing_composite_projects:u(6620,3,"Disable_preferring_source_files_instead_of_declaration_files_when_referencing_composite_projects_6620","Disable preferring source files instead of declaration files when referencing composite projects."),Emit_more_compliant_but_verbose_and_less_performant_JavaScript_for_iteration:u(6621,3,"Emit_more_compliant_but_verbose_and_less_performant_JavaScript_for_iteration_6621","Emit more compliant, but verbose and less performant JavaScript for iteration."),Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files:u(6622,3,"Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files_6622","Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files."),Only_output_d_ts_files_and_not_JavaScript_files:u(6623,3,"Only_output_d_ts_files_and_not_JavaScript_files_6623","Only output d.ts files and not JavaScript files."),Emit_design_type_metadata_for_decorated_declarations_in_source_files:u(6624,3,"Emit_design_type_metadata_for_decorated_declarations_in_source_files_6624","Emit design-type metadata for decorated declarations in source files."),Disable_the_type_acquisition_for_JavaScript_projects:u(6625,3,"Disable_the_type_acquisition_for_JavaScript_projects_6625","Disable the type acquisition for JavaScript projects"),Emit_additional_JavaScript_to_ease_support_for_importing_CommonJS_modules_This_enables_allowSyntheticDefaultImports_for_type_compatibility:u(6626,3,"Emit_additional_JavaScript_to_ease_support_for_importing_CommonJS_modules_This_enables_allowSyntheti_6626","Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility."),Filters_results_from_the_include_option:u(6627,3,"Filters_results_from_the_include_option_6627","Filters results from the `include` option."),Remove_a_list_of_directories_from_the_watch_process:u(6628,3,"Remove_a_list_of_directories_from_the_watch_process_6628","Remove a list of directories from the watch process."),Remove_a_list_of_files_from_the_watch_mode_s_processing:u(6629,3,"Remove_a_list_of_files_from_the_watch_mode_s_processing_6629","Remove a list of files from the watch mode's processing."),Enable_experimental_support_for_legacy_experimental_decorators:u(6630,3,"Enable_experimental_support_for_legacy_experimental_decorators_6630","Enable experimental support for legacy experimental decorators."),Print_files_read_during_the_compilation_including_why_it_was_included:u(6631,3,"Print_files_read_during_the_compilation_including_why_it_was_included_6631","Print files read during the compilation including why it was included."),Output_more_detailed_compiler_performance_information_after_building:u(6632,3,"Output_more_detailed_compiler_performance_information_after_building_6632","Output more detailed compiler performance information after building."),Specify_one_or_more_path_or_node_module_references_to_base_configuration_files_from_which_settings_are_inherited:u(6633,3,"Specify_one_or_more_path_or_node_module_references_to_base_configuration_files_from_which_settings_a_6633","Specify one or more path or node module references to base configuration files from which settings are inherited."),Specify_what_approach_the_watcher_should_use_if_the_system_runs_out_of_native_file_watchers:u(6634,3,"Specify_what_approach_the_watcher_should_use_if_the_system_runs_out_of_native_file_watchers_6634","Specify what approach the watcher should use if the system runs out of native file watchers."),Include_a_list_of_files_This_does_not_support_glob_patterns_as_opposed_to_include:u(6635,3,"Include_a_list_of_files_This_does_not_support_glob_patterns_as_opposed_to_include_6635","Include a list of files. This does not support glob patterns, as opposed to `include`."),Build_all_projects_including_those_that_appear_to_be_up_to_date:u(6636,3,"Build_all_projects_including_those_that_appear_to_be_up_to_date_6636","Build all projects, including those that appear to be up to date."),Ensure_that_casing_is_correct_in_imports:u(6637,3,"Ensure_that_casing_is_correct_in_imports_6637","Ensure that casing is correct in imports."),Emit_a_v8_CPU_profile_of_the_compiler_run_for_debugging:u(6638,3,"Emit_a_v8_CPU_profile_of_the_compiler_run_for_debugging_6638","Emit a v8 CPU profile of the compiler run for debugging."),Allow_importing_helper_functions_from_tslib_once_per_project_instead_of_including_them_per_file:u(6639,3,"Allow_importing_helper_functions_from_tslib_once_per_project_instead_of_including_them_per_file_6639","Allow importing helper functions from tslib once per project, instead of including them per-file."),Skip_building_downstream_projects_on_error_in_upstream_project:u(6640,3,"Skip_building_downstream_projects_on_error_in_upstream_project_6640","Skip building downstream projects on error in upstream project."),Specify_a_list_of_glob_patterns_that_match_files_to_be_included_in_compilation:u(6641,3,"Specify_a_list_of_glob_patterns_that_match_files_to_be_included_in_compilation_6641","Specify a list of glob patterns that match files to be included in compilation."),Save_tsbuildinfo_files_to_allow_for_incremental_compilation_of_projects:u(6642,3,"Save_tsbuildinfo_files_to_allow_for_incremental_compilation_of_projects_6642","Save .tsbuildinfo files to allow for incremental compilation of projects."),Include_sourcemap_files_inside_the_emitted_JavaScript:u(6643,3,"Include_sourcemap_files_inside_the_emitted_JavaScript_6643","Include sourcemap files inside the emitted JavaScript."),Include_source_code_in_the_sourcemaps_inside_the_emitted_JavaScript:u(6644,3,"Include_source_code_in_the_sourcemaps_inside_the_emitted_JavaScript_6644","Include source code in the sourcemaps inside the emitted JavaScript."),Ensure_that_each_file_can_be_safely_transpiled_without_relying_on_other_imports:u(6645,3,"Ensure_that_each_file_can_be_safely_transpiled_without_relying_on_other_imports_6645","Ensure that each file can be safely transpiled without relying on other imports."),Specify_what_JSX_code_is_generated:u(6646,3,"Specify_what_JSX_code_is_generated_6646","Specify what JSX code is generated."),Specify_the_JSX_factory_function_used_when_targeting_React_JSX_emit_e_g_React_createElement_or_h:u(6647,3,"Specify_the_JSX_factory_function_used_when_targeting_React_JSX_emit_e_g_React_createElement_or_h_6647","Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'."),Specify_the_JSX_Fragment_reference_used_for_fragments_when_targeting_React_JSX_emit_e_g_React_Fragment_or_Fragment:u(6648,3,"Specify_the_JSX_Fragment_reference_used_for_fragments_when_targeting_React_JSX_emit_e_g_React_Fragme_6648","Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'."),Specify_module_specifier_used_to_import_the_JSX_factory_functions_when_using_jsx_Colon_react_jsx_Asterisk:u(6649,3,"Specify_module_specifier_used_to_import_the_JSX_factory_functions_when_using_jsx_Colon_react_jsx_Ast_6649","Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'."),Make_keyof_only_return_strings_instead_of_string_numbers_or_symbols_Legacy_option:u(6650,3,"Make_keyof_only_return_strings_instead_of_string_numbers_or_symbols_Legacy_option_6650","Make keyof only return strings instead of string, numbers or symbols. Legacy option."),Specify_a_set_of_bundled_library_declaration_files_that_describe_the_target_runtime_environment:u(6651,3,"Specify_a_set_of_bundled_library_declaration_files_that_describe_the_target_runtime_environment_6651","Specify a set of bundled library declaration files that describe the target runtime environment."),Print_the_names_of_emitted_files_after_a_compilation:u(6652,3,"Print_the_names_of_emitted_files_after_a_compilation_6652","Print the names of emitted files after a compilation."),Print_all_of_the_files_read_during_the_compilation:u(6653,3,"Print_all_of_the_files_read_during_the_compilation_6653","Print all of the files read during the compilation."),Set_the_language_of_the_messaging_from_TypeScript_This_does_not_affect_emit:u(6654,3,"Set_the_language_of_the_messaging_from_TypeScript_This_does_not_affect_emit_6654","Set the language of the messaging from TypeScript. This does not affect emit."),Specify_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations:u(6655,3,"Specify_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations_6655","Specify the location where debugger should locate map files instead of generated locations."),Specify_the_maximum_folder_depth_used_for_checking_JavaScript_files_from_node_modules_Only_applicable_with_allowJs:u(6656,3,"Specify_the_maximum_folder_depth_used_for_checking_JavaScript_files_from_node_modules_Only_applicabl_6656","Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'."),Specify_what_module_code_is_generated:u(6657,3,"Specify_what_module_code_is_generated_6657","Specify what module code is generated."),Specify_how_TypeScript_looks_up_a_file_from_a_given_module_specifier:u(6658,3,"Specify_how_TypeScript_looks_up_a_file_from_a_given_module_specifier_6658","Specify how TypeScript looks up a file from a given module specifier."),Set_the_newline_character_for_emitting_files:u(6659,3,"Set_the_newline_character_for_emitting_files_6659","Set the newline character for emitting files."),Disable_emitting_files_from_a_compilation:u(6660,3,"Disable_emitting_files_from_a_compilation_6660","Disable emitting files from a compilation."),Disable_generating_custom_helper_functions_like_extends_in_compiled_output:u(6661,3,"Disable_generating_custom_helper_functions_like_extends_in_compiled_output_6661","Disable generating custom helper functions like '__extends' in compiled output."),Disable_emitting_files_if_any_type_checking_errors_are_reported:u(6662,3,"Disable_emitting_files_if_any_type_checking_errors_are_reported_6662","Disable emitting files if any type checking errors are reported."),Disable_truncating_types_in_error_messages:u(6663,3,"Disable_truncating_types_in_error_messages_6663","Disable truncating types in error messages."),Enable_error_reporting_for_fallthrough_cases_in_switch_statements:u(6664,3,"Enable_error_reporting_for_fallthrough_cases_in_switch_statements_6664","Enable error reporting for fallthrough cases in switch statements."),Enable_error_reporting_for_expressions_and_declarations_with_an_implied_any_type:u(6665,3,"Enable_error_reporting_for_expressions_and_declarations_with_an_implied_any_type_6665","Enable error reporting for expressions and declarations with an implied 'any' type."),Ensure_overriding_members_in_derived_classes_are_marked_with_an_override_modifier:u(6666,3,"Ensure_overriding_members_in_derived_classes_are_marked_with_an_override_modifier_6666","Ensure overriding members in derived classes are marked with an override modifier."),Enable_error_reporting_for_codepaths_that_do_not_explicitly_return_in_a_function:u(6667,3,"Enable_error_reporting_for_codepaths_that_do_not_explicitly_return_in_a_function_6667","Enable error reporting for codepaths that do not explicitly return in a function."),Enable_error_reporting_when_this_is_given_the_type_any:u(6668,3,"Enable_error_reporting_when_this_is_given_the_type_any_6668","Enable error reporting when 'this' is given the type 'any'."),Disable_adding_use_strict_directives_in_emitted_JavaScript_files:u(6669,3,"Disable_adding_use_strict_directives_in_emitted_JavaScript_files_6669","Disable adding 'use strict' directives in emitted JavaScript files."),Disable_including_any_library_files_including_the_default_lib_d_ts:u(6670,3,"Disable_including_any_library_files_including_the_default_lib_d_ts_6670","Disable including any library files, including the default lib.d.ts."),Enforces_using_indexed_accessors_for_keys_declared_using_an_indexed_type:u(6671,3,"Enforces_using_indexed_accessors_for_keys_declared_using_an_indexed_type_6671","Enforces using indexed accessors for keys declared using an indexed type."),Disallow_import_s_require_s_or_reference_s_from_expanding_the_number_of_files_TypeScript_should_add_to_a_project:u(6672,3,"Disallow_import_s_require_s_or_reference_s_from_expanding_the_number_of_files_TypeScript_should_add__6672","Disallow 'import's, 'require's or ''s from expanding the number of files TypeScript should add to a project."),Disable_strict_checking_of_generic_signatures_in_function_types:u(6673,3,"Disable_strict_checking_of_generic_signatures_in_function_types_6673","Disable strict checking of generic signatures in function types."),Add_undefined_to_a_type_when_accessed_using_an_index:u(6674,3,"Add_undefined_to_a_type_when_accessed_using_an_index_6674","Add 'undefined' to a type when accessed using an index."),Enable_error_reporting_when_local_variables_aren_t_read:u(6675,3,"Enable_error_reporting_when_local_variables_aren_t_read_6675","Enable error reporting when local variables aren't read."),Raise_an_error_when_a_function_parameter_isn_t_read:u(6676,3,"Raise_an_error_when_a_function_parameter_isn_t_read_6676","Raise an error when a function parameter isn't read."),Deprecated_setting_Use_outFile_instead:u(6677,3,"Deprecated_setting_Use_outFile_instead_6677","Deprecated setting. Use 'outFile' instead."),Specify_an_output_folder_for_all_emitted_files:u(6678,3,"Specify_an_output_folder_for_all_emitted_files_6678","Specify an output folder for all emitted files."),Specify_a_file_that_bundles_all_outputs_into_one_JavaScript_file_If_declaration_is_true_also_designates_a_file_that_bundles_all_d_ts_output:u(6679,3,"Specify_a_file_that_bundles_all_outputs_into_one_JavaScript_file_If_declaration_is_true_also_designa_6679","Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output."),Specify_a_set_of_entries_that_re_map_imports_to_additional_lookup_locations:u(6680,3,"Specify_a_set_of_entries_that_re_map_imports_to_additional_lookup_locations_6680","Specify a set of entries that re-map imports to additional lookup locations."),Specify_a_list_of_language_service_plugins_to_include:u(6681,3,"Specify_a_list_of_language_service_plugins_to_include_6681","Specify a list of language service plugins to include."),Disable_erasing_const_enum_declarations_in_generated_code:u(6682,3,"Disable_erasing_const_enum_declarations_in_generated_code_6682","Disable erasing 'const enum' declarations in generated code."),Disable_resolving_symlinks_to_their_realpath_This_correlates_to_the_same_flag_in_node:u(6683,3,"Disable_resolving_symlinks_to_their_realpath_This_correlates_to_the_same_flag_in_node_6683","Disable resolving symlinks to their realpath. This correlates to the same flag in node."),Disable_wiping_the_console_in_watch_mode:u(6684,3,"Disable_wiping_the_console_in_watch_mode_6684","Disable wiping the console in watch mode."),Enable_color_and_formatting_in_TypeScript_s_output_to_make_compiler_errors_easier_to_read:u(6685,3,"Enable_color_and_formatting_in_TypeScript_s_output_to_make_compiler_errors_easier_to_read_6685","Enable color and formatting in TypeScript's output to make compiler errors easier to read."),Specify_the_object_invoked_for_createElement_This_only_applies_when_targeting_react_JSX_emit:u(6686,3,"Specify_the_object_invoked_for_createElement_This_only_applies_when_targeting_react_JSX_emit_6686","Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit."),Specify_an_array_of_objects_that_specify_paths_for_projects_Used_in_project_references:u(6687,3,"Specify_an_array_of_objects_that_specify_paths_for_projects_Used_in_project_references_6687","Specify an array of objects that specify paths for projects. Used in project references."),Disable_emitting_comments:u(6688,3,"Disable_emitting_comments_6688","Disable emitting comments."),Enable_importing_json_files:u(6689,3,"Enable_importing_json_files_6689","Enable importing .json files."),Specify_the_root_folder_within_your_source_files:u(6690,3,"Specify_the_root_folder_within_your_source_files_6690","Specify the root folder within your source files."),Allow_multiple_folders_to_be_treated_as_one_when_resolving_modules:u(6691,3,"Allow_multiple_folders_to_be_treated_as_one_when_resolving_modules_6691","Allow multiple folders to be treated as one when resolving modules."),Skip_type_checking_d_ts_files_that_are_included_with_TypeScript:u(6692,3,"Skip_type_checking_d_ts_files_that_are_included_with_TypeScript_6692","Skip type checking .d.ts files that are included with TypeScript."),Skip_type_checking_all_d_ts_files:u(6693,3,"Skip_type_checking_all_d_ts_files_6693","Skip type checking all .d.ts files."),Create_source_map_files_for_emitted_JavaScript_files:u(6694,3,"Create_source_map_files_for_emitted_JavaScript_files_6694","Create source map files for emitted JavaScript files."),Specify_the_root_path_for_debuggers_to_find_the_reference_source_code:u(6695,3,"Specify_the_root_path_for_debuggers_to_find_the_reference_source_code_6695","Specify the root path for debuggers to find the reference source code."),Check_that_the_arguments_for_bind_call_and_apply_methods_match_the_original_function:u(6697,3,"Check_that_the_arguments_for_bind_call_and_apply_methods_match_the_original_function_6697","Check that the arguments for 'bind', 'call', and 'apply' methods match the original function."),When_assigning_functions_check_to_ensure_parameters_and_the_return_values_are_subtype_compatible:u(6698,3,"When_assigning_functions_check_to_ensure_parameters_and_the_return_values_are_subtype_compatible_6698","When assigning functions, check to ensure parameters and the return values are subtype-compatible."),When_type_checking_take_into_account_null_and_undefined:u(6699,3,"When_type_checking_take_into_account_null_and_undefined_6699","When type checking, take into account 'null' and 'undefined'."),Check_for_class_properties_that_are_declared_but_not_set_in_the_constructor:u(6700,3,"Check_for_class_properties_that_are_declared_but_not_set_in_the_constructor_6700","Check for class properties that are declared but not set in the constructor."),Disable_emitting_declarations_that_have_internal_in_their_JSDoc_comments:u(6701,3,"Disable_emitting_declarations_that_have_internal_in_their_JSDoc_comments_6701","Disable emitting declarations that have '@internal' in their JSDoc comments."),Disable_reporting_of_excess_property_errors_during_the_creation_of_object_literals:u(6702,3,"Disable_reporting_of_excess_property_errors_during_the_creation_of_object_literals_6702","Disable reporting of excess property errors during the creation of object literals."),Suppress_noImplicitAny_errors_when_indexing_objects_that_lack_index_signatures:u(6703,3,"Suppress_noImplicitAny_errors_when_indexing_objects_that_lack_index_signatures_6703","Suppress 'noImplicitAny' errors when indexing objects that lack index signatures."),Synchronously_call_callbacks_and_update_the_state_of_directory_watchers_on_platforms_that_don_t_support_recursive_watching_natively:u(6704,3,"Synchronously_call_callbacks_and_update_the_state_of_directory_watchers_on_platforms_that_don_t_supp_6704","Synchronously call callbacks and update the state of directory watchers on platforms that don`t support recursive watching natively."),Set_the_JavaScript_language_version_for_emitted_JavaScript_and_include_compatible_library_declarations:u(6705,3,"Set_the_JavaScript_language_version_for_emitted_JavaScript_and_include_compatible_library_declaratio_6705","Set the JavaScript language version for emitted JavaScript and include compatible library declarations."),Log_paths_used_during_the_moduleResolution_process:u(6706,3,"Log_paths_used_during_the_moduleResolution_process_6706","Log paths used during the 'moduleResolution' process."),Specify_the_path_to_tsbuildinfo_incremental_compilation_file:u(6707,3,"Specify_the_path_to_tsbuildinfo_incremental_compilation_file_6707","Specify the path to .tsbuildinfo incremental compilation file."),Specify_options_for_automatic_acquisition_of_declaration_files:u(6709,3,"Specify_options_for_automatic_acquisition_of_declaration_files_6709","Specify options for automatic acquisition of declaration files."),Specify_multiple_folders_that_act_like_Slashnode_modules_Slash_types:u(6710,3,"Specify_multiple_folders_that_act_like_Slashnode_modules_Slash_types_6710","Specify multiple folders that act like './node_modules/@types'."),Specify_type_package_names_to_be_included_without_being_referenced_in_a_source_file:u(6711,3,"Specify_type_package_names_to_be_included_without_being_referenced_in_a_source_file_6711","Specify type package names to be included without being referenced in a source file."),Emit_ECMAScript_standard_compliant_class_fields:u(6712,3,"Emit_ECMAScript_standard_compliant_class_fields_6712","Emit ECMAScript-standard-compliant class fields."),Enable_verbose_logging:u(6713,3,"Enable_verbose_logging_6713","Enable verbose logging."),Specify_how_directories_are_watched_on_systems_that_lack_recursive_file_watching_functionality:u(6714,3,"Specify_how_directories_are_watched_on_systems_that_lack_recursive_file_watching_functionality_6714","Specify how directories are watched on systems that lack recursive file-watching functionality."),Specify_how_the_TypeScript_watch_mode_works:u(6715,3,"Specify_how_the_TypeScript_watch_mode_works_6715","Specify how the TypeScript watch mode works."),Require_undeclared_properties_from_index_signatures_to_use_element_accesses:u(6717,3,"Require_undeclared_properties_from_index_signatures_to_use_element_accesses_6717","Require undeclared properties from index signatures to use element accesses."),Specify_emit_Slashchecking_behavior_for_imports_that_are_only_used_for_types:u(6718,3,"Specify_emit_Slashchecking_behavior_for_imports_that_are_only_used_for_types_6718","Specify emit/checking behavior for imports that are only used for types."),Require_sufficient_annotation_on_exports_so_other_tools_can_trivially_generate_declaration_files:u(6719,3,"Require_sufficient_annotation_on_exports_so_other_tools_can_trivially_generate_declaration_files_6719","Require sufficient annotation on exports so other tools can trivially generate declaration files."),Built_in_iterators_are_instantiated_with_a_TReturn_type_of_undefined_instead_of_any:u(6720,3,"Built_in_iterators_are_instantiated_with_a_TReturn_type_of_undefined_instead_of_any_6720","Built-in iterators are instantiated with a 'TReturn' type of 'undefined' instead of 'any'."),Do_not_allow_runtime_constructs_that_are_not_part_of_ECMAScript:u(6721,3,"Do_not_allow_runtime_constructs_that_are_not_part_of_ECMAScript_6721","Do not allow runtime constructs that are not part of ECMAScript."),Default_catch_clause_variables_as_unknown_instead_of_any:u(6803,3,"Default_catch_clause_variables_as_unknown_instead_of_any_6803","Default catch clause variables as 'unknown' instead of 'any'."),Do_not_transform_or_elide_any_imports_or_exports_not_marked_as_type_only_ensuring_they_are_written_in_the_output_file_s_format_based_on_the_module_setting:u(6804,3,"Do_not_transform_or_elide_any_imports_or_exports_not_marked_as_type_only_ensuring_they_are_written_i_6804","Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting."),Disable_full_type_checking_only_critical_parse_and_emit_errors_will_be_reported:u(6805,3,"Disable_full_type_checking_only_critical_parse_and_emit_errors_will_be_reported_6805","Disable full type checking (only critical parse and emit errors will be reported)."),Check_side_effect_imports:u(6806,3,"Check_side_effect_imports_6806","Check side effect imports."),This_operation_can_be_simplified_This_shift_is_identical_to_0_1_2:u(6807,1,"This_operation_can_be_simplified_This_shift_is_identical_to_0_1_2_6807","This operation can be simplified. This shift is identical to `{0} {1} {2}`."),Enable_lib_replacement:u(6808,3,"Enable_lib_replacement_6808","Enable lib replacement."),one_of_Colon:u(6900,3,"one_of_Colon_6900","one of:"),one_or_more_Colon:u(6901,3,"one_or_more_Colon_6901","one or more:"),type_Colon:u(6902,3,"type_Colon_6902","type:"),default_Colon:u(6903,3,"default_Colon_6903","default:"),module_system_or_esModuleInterop:u(6904,3,"module_system_or_esModuleInterop_6904",'module === "system" or esModuleInterop'),false_unless_strict_is_set:u(6905,3,"false_unless_strict_is_set_6905","`false`, unless `strict` is set"),false_unless_composite_is_set:u(6906,3,"false_unless_composite_is_set_6906","`false`, unless `composite` is set"),node_modules_bower_components_jspm_packages_plus_the_value_of_outDir_if_one_is_specified:u(6907,3,"node_modules_bower_components_jspm_packages_plus_the_value_of_outDir_if_one_is_specified_6907",'`["node_modules", "bower_components", "jspm_packages"]`, plus the value of `outDir` if one is specified.'),if_files_is_specified_otherwise_Asterisk_Asterisk_Slash_Asterisk:u(6908,3,"if_files_is_specified_otherwise_Asterisk_Asterisk_Slash_Asterisk_6908",'`[]` if `files` is specified, otherwise `["**/*"]`'),true_if_composite_false_otherwise:u(6909,3,"true_if_composite_false_otherwise_6909","`true` if `composite`, `false` otherwise"),module_AMD_or_UMD_or_System_or_ES6_then_Classic_Otherwise_Node:u(69010,3,"module_AMD_or_UMD_or_System_or_ES6_then_Classic_Otherwise_Node_69010","module === `AMD` or `UMD` or `System` or `ES6`, then `Classic`, Otherwise `Node`"),Computed_from_the_list_of_input_files:u(6911,3,"Computed_from_the_list_of_input_files_6911","Computed from the list of input files"),Platform_specific:u(6912,3,"Platform_specific_6912","Platform specific"),You_can_learn_about_all_of_the_compiler_options_at_0:u(6913,3,"You_can_learn_about_all_of_the_compiler_options_at_0_6913","You can learn about all of the compiler options at {0}"),Including_watch_w_will_start_watching_the_current_project_for_the_file_changes_Once_set_you_can_config_watch_mode_with_Colon:u(6914,3,"Including_watch_w_will_start_watching_the_current_project_for_the_file_changes_Once_set_you_can_conf_6914","Including --watch, -w will start watching the current project for the file changes. Once set, you can config watch mode with:"),Using_build_b_will_make_tsc_behave_more_like_a_build_orchestrator_than_a_compiler_This_is_used_to_trigger_building_composite_projects_which_you_can_learn_more_about_at_0:u(6915,3,"Using_build_b_will_make_tsc_behave_more_like_a_build_orchestrator_than_a_compiler_This_is_used_to_tr_6915","Using --build, -b will make tsc behave more like a build orchestrator than a compiler. This is used to trigger building composite projects which you can learn more about at {0}"),COMMON_COMMANDS:u(6916,3,"COMMON_COMMANDS_6916","COMMON COMMANDS"),ALL_COMPILER_OPTIONS:u(6917,3,"ALL_COMPILER_OPTIONS_6917","ALL COMPILER OPTIONS"),WATCH_OPTIONS:u(6918,3,"WATCH_OPTIONS_6918","WATCH OPTIONS"),BUILD_OPTIONS:u(6919,3,"BUILD_OPTIONS_6919","BUILD OPTIONS"),COMMON_COMPILER_OPTIONS:u(6920,3,"COMMON_COMPILER_OPTIONS_6920","COMMON COMPILER OPTIONS"),COMMAND_LINE_FLAGS:u(6921,3,"COMMAND_LINE_FLAGS_6921","COMMAND LINE FLAGS"),tsc_Colon_The_TypeScript_Compiler:u(6922,3,"tsc_Colon_The_TypeScript_Compiler_6922","tsc: The TypeScript Compiler"),Compiles_the_current_project_tsconfig_json_in_the_working_directory:u(6923,3,"Compiles_the_current_project_tsconfig_json_in_the_working_directory_6923","Compiles the current project (tsconfig.json in the working directory.)"),Ignoring_tsconfig_json_compiles_the_specified_files_with_default_compiler_options:u(6924,3,"Ignoring_tsconfig_json_compiles_the_specified_files_with_default_compiler_options_6924","Ignoring tsconfig.json, compiles the specified files with default compiler options."),Build_a_composite_project_in_the_working_directory:u(6925,3,"Build_a_composite_project_in_the_working_directory_6925","Build a composite project in the working directory."),Creates_a_tsconfig_json_with_the_recommended_settings_in_the_working_directory:u(6926,3,"Creates_a_tsconfig_json_with_the_recommended_settings_in_the_working_directory_6926","Creates a tsconfig.json with the recommended settings in the working directory."),Compiles_the_TypeScript_project_located_at_the_specified_path:u(6927,3,"Compiles_the_TypeScript_project_located_at_the_specified_path_6927","Compiles the TypeScript project located at the specified path."),An_expanded_version_of_this_information_showing_all_possible_compiler_options:u(6928,3,"An_expanded_version_of_this_information_showing_all_possible_compiler_options_6928","An expanded version of this information, showing all possible compiler options"),Compiles_the_current_project_with_additional_settings:u(6929,3,"Compiles_the_current_project_with_additional_settings_6929","Compiles the current project, with additional settings."),true_for_ES2022_and_above_including_ESNext:u(6930,3,"true_for_ES2022_and_above_including_ESNext_6930","`true` for ES2022 and above, including ESNext."),List_of_file_name_suffixes_to_search_when_resolving_a_module:u(6931,1,"List_of_file_name_suffixes_to_search_when_resolving_a_module_6931","List of file name suffixes to search when resolving a module."),Variable_0_implicitly_has_an_1_type:u(7005,1,"Variable_0_implicitly_has_an_1_type_7005","Variable '{0}' implicitly has an '{1}' type."),Parameter_0_implicitly_has_an_1_type:u(7006,1,"Parameter_0_implicitly_has_an_1_type_7006","Parameter '{0}' implicitly has an '{1}' type."),Member_0_implicitly_has_an_1_type:u(7008,1,"Member_0_implicitly_has_an_1_type_7008","Member '{0}' implicitly has an '{1}' type."),new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type:u(7009,1,"new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type_7009","'new' expression, whose target lacks a construct signature, implicitly has an 'any' type."),_0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type:u(7010,1,"_0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type_7010","'{0}', which lacks return-type annotation, implicitly has an '{1}' return type."),Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type:u(7011,1,"Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type_7011","Function expression, which lacks return-type annotation, implicitly has an '{0}' return type."),This_overload_implicitly_returns_the_type_0_because_it_lacks_a_return_type_annotation:u(7012,1,"This_overload_implicitly_returns_the_type_0_because_it_lacks_a_return_type_annotation_7012","This overload implicitly returns the type '{0}' because it lacks a return type annotation."),Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type:u(7013,1,"Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type_7013","Construct signature, which lacks return-type annotation, implicitly has an 'any' return type."),Function_type_which_lacks_return_type_annotation_implicitly_has_an_0_return_type:u(7014,1,"Function_type_which_lacks_return_type_annotation_implicitly_has_an_0_return_type_7014","Function type, which lacks return-type annotation, implicitly has an '{0}' return type."),Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number:u(7015,1,"Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number_7015","Element implicitly has an 'any' type because index expression is not of type 'number'."),Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type:u(7016,1,"Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type_7016","Could not find a declaration file for module '{0}'. '{1}' implicitly has an 'any' type."),Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature:u(7017,1,"Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature_7017","Element implicitly has an 'any' type because type '{0}' has no index signature."),Object_literal_s_property_0_implicitly_has_an_1_type:u(7018,1,"Object_literal_s_property_0_implicitly_has_an_1_type_7018","Object literal's property '{0}' implicitly has an '{1}' type."),Rest_parameter_0_implicitly_has_an_any_type:u(7019,1,"Rest_parameter_0_implicitly_has_an_any_type_7019","Rest parameter '{0}' implicitly has an 'any[]' type."),Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type:u(7020,1,"Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type_7020","Call signature, which lacks return-type annotation, implicitly has an 'any' return type."),_0_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_and_is_referenced_directly_or_indirectly_in_its_own_initializer:u(7022,1,"_0_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_and_is_referenced_directly_or__7022","'{0}' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer."),_0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions:u(7023,1,"_0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_reference_7023","'{0}' implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions."),Function_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions:u(7024,1,"Function_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_ref_7024","Function implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions."),Generator_implicitly_has_yield_type_0_Consider_supplying_a_return_type_annotation:u(7025,1,"Generator_implicitly_has_yield_type_0_Consider_supplying_a_return_type_annotation_7025","Generator implicitly has yield type '{0}'. Consider supplying a return type annotation."),JSX_element_implicitly_has_type_any_because_no_interface_JSX_0_exists:u(7026,1,"JSX_element_implicitly_has_type_any_because_no_interface_JSX_0_exists_7026","JSX element implicitly has type 'any' because no interface 'JSX.{0}' exists."),Unreachable_code_detected:u(7027,1,"Unreachable_code_detected_7027","Unreachable code detected.",!0),Unused_label:u(7028,1,"Unused_label_7028","Unused label.",!0),Fallthrough_case_in_switch:u(7029,1,"Fallthrough_case_in_switch_7029","Fallthrough case in switch."),Not_all_code_paths_return_a_value:u(7030,1,"Not_all_code_paths_return_a_value_7030","Not all code paths return a value."),Binding_element_0_implicitly_has_an_1_type:u(7031,1,"Binding_element_0_implicitly_has_an_1_type_7031","Binding element '{0}' implicitly has an '{1}' type."),Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation:u(7032,1,"Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation_7032","Property '{0}' implicitly has type 'any', because its set accessor lacks a parameter type annotation."),Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation:u(7033,1,"Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation_7033","Property '{0}' implicitly has type 'any', because its get accessor lacks a return type annotation."),Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined:u(7034,1,"Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined_7034","Variable '{0}' implicitly has type '{1}' in some locations where its type cannot be determined."),Try_npm_i_save_dev_types_Slash_1_if_it_exists_or_add_a_new_declaration_d_ts_file_containing_declare_module_0:u(7035,1,"Try_npm_i_save_dev_types_Slash_1_if_it_exists_or_add_a_new_declaration_d_ts_file_containing_declare__7035","Try `npm i --save-dev @types/{1}` if it exists or add a new declaration (.d.ts) file containing `declare module '{0}';`"),Dynamic_import_s_specifier_must_be_of_type_string_but_here_has_type_0:u(7036,1,"Dynamic_import_s_specifier_must_be_of_type_string_but_here_has_type_0_7036","Dynamic import's specifier must be of type 'string', but here has type '{0}'."),Enables_emit_interoperability_between_CommonJS_and_ES_Modules_via_creation_of_namespace_objects_for_all_imports_Implies_allowSyntheticDefaultImports:u(7037,3,"Enables_emit_interoperability_between_CommonJS_and_ES_Modules_via_creation_of_namespace_objects_for__7037","Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'."),Type_originates_at_this_import_A_namespace_style_import_cannot_be_called_or_constructed_and_will_cause_a_failure_at_runtime_Consider_using_a_default_import_or_import_require_here_instead:u(7038,3,"Type_originates_at_this_import_A_namespace_style_import_cannot_be_called_or_constructed_and_will_cau_7038","Type originates at this import. A namespace-style import cannot be called or constructed, and will cause a failure at runtime. Consider using a default import or import require here instead."),Mapped_object_type_implicitly_has_an_any_template_type:u(7039,1,"Mapped_object_type_implicitly_has_an_any_template_type_7039","Mapped object type implicitly has an 'any' template type."),If_the_0_package_actually_exposes_this_module_consider_sending_a_pull_request_to_amend_https_Colon_Slash_Slashgithub_com_SlashDefinitelyTyped_SlashDefinitelyTyped_Slashtree_Slashmaster_Slashtypes_Slash_1:u(7040,1,"If_the_0_package_actually_exposes_this_module_consider_sending_a_pull_request_to_amend_https_Colon_S_7040","If the '{0}' package actually exposes this module, consider sending a pull request to amend 'https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/{1}'"),The_containing_arrow_function_captures_the_global_value_of_this:u(7041,1,"The_containing_arrow_function_captures_the_global_value_of_this_7041","The containing arrow function captures the global value of 'this'."),Module_0_was_resolved_to_1_but_resolveJsonModule_is_not_used:u(7042,1,"Module_0_was_resolved_to_1_but_resolveJsonModule_is_not_used_7042","Module '{0}' was resolved to '{1}', but '--resolveJsonModule' is not used."),Variable_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage:u(7043,2,"Variable_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage_7043","Variable '{0}' implicitly has an '{1}' type, but a better type may be inferred from usage."),Parameter_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage:u(7044,2,"Parameter_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage_7044","Parameter '{0}' implicitly has an '{1}' type, but a better type may be inferred from usage."),Member_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage:u(7045,2,"Member_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage_7045","Member '{0}' implicitly has an '{1}' type, but a better type may be inferred from usage."),Variable_0_implicitly_has_type_1_in_some_locations_but_a_better_type_may_be_inferred_from_usage:u(7046,2,"Variable_0_implicitly_has_type_1_in_some_locations_but_a_better_type_may_be_inferred_from_usage_7046","Variable '{0}' implicitly has type '{1}' in some locations, but a better type may be inferred from usage."),Rest_parameter_0_implicitly_has_an_any_type_but_a_better_type_may_be_inferred_from_usage:u(7047,2,"Rest_parameter_0_implicitly_has_an_any_type_but_a_better_type_may_be_inferred_from_usage_7047","Rest parameter '{0}' implicitly has an 'any[]' type, but a better type may be inferred from usage."),Property_0_implicitly_has_type_any_but_a_better_type_for_its_get_accessor_may_be_inferred_from_usage:u(7048,2,"Property_0_implicitly_has_type_any_but_a_better_type_for_its_get_accessor_may_be_inferred_from_usage_7048","Property '{0}' implicitly has type 'any', but a better type for its get accessor may be inferred from usage."),Property_0_implicitly_has_type_any_but_a_better_type_for_its_set_accessor_may_be_inferred_from_usage:u(7049,2,"Property_0_implicitly_has_type_any_but_a_better_type_for_its_set_accessor_may_be_inferred_from_usage_7049","Property '{0}' implicitly has type 'any', but a better type for its set accessor may be inferred from usage."),_0_implicitly_has_an_1_return_type_but_a_better_type_may_be_inferred_from_usage:u(7050,2,"_0_implicitly_has_an_1_return_type_but_a_better_type_may_be_inferred_from_usage_7050","'{0}' implicitly has an '{1}' return type, but a better type may be inferred from usage."),Parameter_has_a_name_but_no_type_Did_you_mean_0_Colon_1:u(7051,1,"Parameter_has_a_name_but_no_type_Did_you_mean_0_Colon_1_7051","Parameter has a name but no type. Did you mean '{0}: {1}'?"),Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature_Did_you_mean_to_call_1:u(7052,1,"Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature_Did_you_mean_to_call_1_7052","Element implicitly has an 'any' type because type '{0}' has no index signature. Did you mean to call '{1}'?"),Element_implicitly_has_an_any_type_because_expression_of_type_0_can_t_be_used_to_index_type_1:u(7053,1,"Element_implicitly_has_an_any_type_because_expression_of_type_0_can_t_be_used_to_index_type_1_7053","Element implicitly has an 'any' type because expression of type '{0}' can't be used to index type '{1}'."),No_index_signature_with_a_parameter_of_type_0_was_found_on_type_1:u(7054,1,"No_index_signature_with_a_parameter_of_type_0_was_found_on_type_1_7054","No index signature with a parameter of type '{0}' was found on type '{1}'."),_0_which_lacks_return_type_annotation_implicitly_has_an_1_yield_type:u(7055,1,"_0_which_lacks_return_type_annotation_implicitly_has_an_1_yield_type_7055","'{0}', which lacks return-type annotation, implicitly has an '{1}' yield type."),The_inferred_type_of_this_node_exceeds_the_maximum_length_the_compiler_will_serialize_An_explicit_type_annotation_is_needed:u(7056,1,"The_inferred_type_of_this_node_exceeds_the_maximum_length_the_compiler_will_serialize_An_explicit_ty_7056","The inferred type of this node exceeds the maximum length the compiler will serialize. An explicit type annotation is needed."),yield_expression_implicitly_results_in_an_any_type_because_its_containing_generator_lacks_a_return_type_annotation:u(7057,1,"yield_expression_implicitly_results_in_an_any_type_because_its_containing_generator_lacks_a_return_t_7057","'yield' expression implicitly results in an 'any' type because its containing generator lacks a return-type annotation."),If_the_0_package_actually_exposes_this_module_try_adding_a_new_declaration_d_ts_file_containing_declare_module_1:u(7058,1,"If_the_0_package_actually_exposes_this_module_try_adding_a_new_declaration_d_ts_file_containing_decl_7058","If the '{0}' package actually exposes this module, try adding a new declaration (.d.ts) file containing `declare module '{1}';`"),This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Use_an_as_expression_instead:u(7059,1,"This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Use_an_as_expression_instead_7059","This syntax is reserved in files with the .mts or .cts extension. Use an `as` expression instead."),This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Add_a_trailing_comma_or_explicit_constraint:u(7060,1,"This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Add_a_trailing_comma_or_explicit_cons_7060","This syntax is reserved in files with the .mts or .cts extension. Add a trailing comma or explicit constraint."),A_mapped_type_may_not_declare_properties_or_methods:u(7061,1,"A_mapped_type_may_not_declare_properties_or_methods_7061","A mapped type may not declare properties or methods."),You_cannot_rename_this_element:u(8e3,1,"You_cannot_rename_this_element_8000","You cannot rename this element."),You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library:u(8001,1,"You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library_8001","You cannot rename elements that are defined in the standard TypeScript library."),import_can_only_be_used_in_TypeScript_files:u(8002,1,"import_can_only_be_used_in_TypeScript_files_8002","'import ... =' can only be used in TypeScript files."),export_can_only_be_used_in_TypeScript_files:u(8003,1,"export_can_only_be_used_in_TypeScript_files_8003","'export =' can only be used in TypeScript files."),Type_parameter_declarations_can_only_be_used_in_TypeScript_files:u(8004,1,"Type_parameter_declarations_can_only_be_used_in_TypeScript_files_8004","Type parameter declarations can only be used in TypeScript files."),implements_clauses_can_only_be_used_in_TypeScript_files:u(8005,1,"implements_clauses_can_only_be_used_in_TypeScript_files_8005","'implements' clauses can only be used in TypeScript files."),_0_declarations_can_only_be_used_in_TypeScript_files:u(8006,1,"_0_declarations_can_only_be_used_in_TypeScript_files_8006","'{0}' declarations can only be used in TypeScript files."),Type_aliases_can_only_be_used_in_TypeScript_files:u(8008,1,"Type_aliases_can_only_be_used_in_TypeScript_files_8008","Type aliases can only be used in TypeScript files."),The_0_modifier_can_only_be_used_in_TypeScript_files:u(8009,1,"The_0_modifier_can_only_be_used_in_TypeScript_files_8009","The '{0}' modifier can only be used in TypeScript files."),Type_annotations_can_only_be_used_in_TypeScript_files:u(8010,1,"Type_annotations_can_only_be_used_in_TypeScript_files_8010","Type annotations can only be used in TypeScript files."),Type_arguments_can_only_be_used_in_TypeScript_files:u(8011,1,"Type_arguments_can_only_be_used_in_TypeScript_files_8011","Type arguments can only be used in TypeScript files."),Parameter_modifiers_can_only_be_used_in_TypeScript_files:u(8012,1,"Parameter_modifiers_can_only_be_used_in_TypeScript_files_8012","Parameter modifiers can only be used in TypeScript files."),Non_null_assertions_can_only_be_used_in_TypeScript_files:u(8013,1,"Non_null_assertions_can_only_be_used_in_TypeScript_files_8013","Non-null assertions can only be used in TypeScript files."),Type_assertion_expressions_can_only_be_used_in_TypeScript_files:u(8016,1,"Type_assertion_expressions_can_only_be_used_in_TypeScript_files_8016","Type assertion expressions can only be used in TypeScript files."),Signature_declarations_can_only_be_used_in_TypeScript_files:u(8017,1,"Signature_declarations_can_only_be_used_in_TypeScript_files_8017","Signature declarations can only be used in TypeScript files."),Report_errors_in_js_files:u(8019,3,"Report_errors_in_js_files_8019","Report errors in .js files."),JSDoc_types_can_only_be_used_inside_documentation_comments:u(8020,1,"JSDoc_types_can_only_be_used_inside_documentation_comments_8020","JSDoc types can only be used inside documentation comments."),JSDoc_typedef_tag_should_either_have_a_type_annotation_or_be_followed_by_property_or_member_tags:u(8021,1,"JSDoc_typedef_tag_should_either_have_a_type_annotation_or_be_followed_by_property_or_member_tags_8021","JSDoc '@typedef' tag should either have a type annotation or be followed by '@property' or '@member' tags."),JSDoc_0_is_not_attached_to_a_class:u(8022,1,"JSDoc_0_is_not_attached_to_a_class_8022","JSDoc '@{0}' is not attached to a class."),JSDoc_0_1_does_not_match_the_extends_2_clause:u(8023,1,"JSDoc_0_1_does_not_match_the_extends_2_clause_8023","JSDoc '@{0} {1}' does not match the 'extends {2}' clause."),JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name:u(8024,1,"JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_8024","JSDoc '@param' tag has name '{0}', but there is no parameter with that name."),Class_declarations_cannot_have_more_than_one_augments_or_extends_tag:u(8025,1,"Class_declarations_cannot_have_more_than_one_augments_or_extends_tag_8025","Class declarations cannot have more than one '@augments' or '@extends' tag."),Expected_0_type_arguments_provide_these_with_an_extends_tag:u(8026,1,"Expected_0_type_arguments_provide_these_with_an_extends_tag_8026","Expected {0} type arguments; provide these with an '@extends' tag."),Expected_0_1_type_arguments_provide_these_with_an_extends_tag:u(8027,1,"Expected_0_1_type_arguments_provide_these_with_an_extends_tag_8027","Expected {0}-{1} type arguments; provide these with an '@extends' tag."),JSDoc_may_only_appear_in_the_last_parameter_of_a_signature:u(8028,1,"JSDoc_may_only_appear_in_the_last_parameter_of_a_signature_8028","JSDoc '...' may only appear in the last parameter of a signature."),JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_It_would_match_arguments_if_it_had_an_array_type:u(8029,1,"JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_It_would_match_arguments_if_it_h_8029","JSDoc '@param' tag has name '{0}', but there is no parameter with that name. It would match 'arguments' if it had an array type."),The_type_of_a_function_declaration_must_match_the_function_s_signature:u(8030,1,"The_type_of_a_function_declaration_must_match_the_function_s_signature_8030","The type of a function declaration must match the function's signature."),You_cannot_rename_a_module_via_a_global_import:u(8031,1,"You_cannot_rename_a_module_via_a_global_import_8031","You cannot rename a module via a global import."),Qualified_name_0_is_not_allowed_without_a_leading_param_object_1:u(8032,1,"Qualified_name_0_is_not_allowed_without_a_leading_param_object_1_8032","Qualified name '{0}' is not allowed without a leading '@param {object} {1}'."),A_JSDoc_typedef_comment_may_not_contain_multiple_type_tags:u(8033,1,"A_JSDoc_typedef_comment_may_not_contain_multiple_type_tags_8033","A JSDoc '@typedef' comment may not contain multiple '@type' tags."),The_tag_was_first_specified_here:u(8034,1,"The_tag_was_first_specified_here_8034","The tag was first specified here."),You_cannot_rename_elements_that_are_defined_in_a_node_modules_folder:u(8035,1,"You_cannot_rename_elements_that_are_defined_in_a_node_modules_folder_8035","You cannot rename elements that are defined in a 'node_modules' folder."),You_cannot_rename_elements_that_are_defined_in_another_node_modules_folder:u(8036,1,"You_cannot_rename_elements_that_are_defined_in_another_node_modules_folder_8036","You cannot rename elements that are defined in another 'node_modules' folder."),Type_satisfaction_expressions_can_only_be_used_in_TypeScript_files:u(8037,1,"Type_satisfaction_expressions_can_only_be_used_in_TypeScript_files_8037","Type satisfaction expressions can only be used in TypeScript files."),Decorators_may_not_appear_after_export_or_export_default_if_they_also_appear_before_export:u(8038,1,"Decorators_may_not_appear_after_export_or_export_default_if_they_also_appear_before_export_8038","Decorators may not appear after 'export' or 'export default' if they also appear before 'export'."),A_JSDoc_template_tag_may_not_follow_a_typedef_callback_or_overload_tag:u(8039,1,"A_JSDoc_template_tag_may_not_follow_a_typedef_callback_or_overload_tag_8039","A JSDoc '@template' tag may not follow a '@typedef', '@callback', or '@overload' tag"),Declaration_emit_for_this_file_requires_using_private_name_0_An_explicit_type_annotation_may_unblock_declaration_emit:u(9005,1,"Declaration_emit_for_this_file_requires_using_private_name_0_An_explicit_type_annotation_may_unblock_9005","Declaration emit for this file requires using private name '{0}'. An explicit type annotation may unblock declaration emit."),Declaration_emit_for_this_file_requires_using_private_name_0_from_module_1_An_explicit_type_annotation_may_unblock_declaration_emit:u(9006,1,"Declaration_emit_for_this_file_requires_using_private_name_0_from_module_1_An_explicit_type_annotati_9006","Declaration emit for this file requires using private name '{0}' from module '{1}'. An explicit type annotation may unblock declaration emit."),Function_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations:u(9007,1,"Function_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations_9007","Function must have an explicit return type annotation with --isolatedDeclarations."),Method_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations:u(9008,1,"Method_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations_9008","Method must have an explicit return type annotation with --isolatedDeclarations."),At_least_one_accessor_must_have_an_explicit_type_annotation_with_isolatedDeclarations:u(9009,1,"At_least_one_accessor_must_have_an_explicit_type_annotation_with_isolatedDeclarations_9009","At least one accessor must have an explicit type annotation with --isolatedDeclarations."),Variable_must_have_an_explicit_type_annotation_with_isolatedDeclarations:u(9010,1,"Variable_must_have_an_explicit_type_annotation_with_isolatedDeclarations_9010","Variable must have an explicit type annotation with --isolatedDeclarations."),Parameter_must_have_an_explicit_type_annotation_with_isolatedDeclarations:u(9011,1,"Parameter_must_have_an_explicit_type_annotation_with_isolatedDeclarations_9011","Parameter must have an explicit type annotation with --isolatedDeclarations."),Property_must_have_an_explicit_type_annotation_with_isolatedDeclarations:u(9012,1,"Property_must_have_an_explicit_type_annotation_with_isolatedDeclarations_9012","Property must have an explicit type annotation with --isolatedDeclarations."),Expression_type_can_t_be_inferred_with_isolatedDeclarations:u(9013,1,"Expression_type_can_t_be_inferred_with_isolatedDeclarations_9013","Expression type can't be inferred with --isolatedDeclarations."),Computed_properties_must_be_number_or_string_literals_variables_or_dotted_expressions_with_isolatedDeclarations:u(9014,1,"Computed_properties_must_be_number_or_string_literals_variables_or_dotted_expressions_with_isolatedD_9014","Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations."),Objects_that_contain_spread_assignments_can_t_be_inferred_with_isolatedDeclarations:u(9015,1,"Objects_that_contain_spread_assignments_can_t_be_inferred_with_isolatedDeclarations_9015","Objects that contain spread assignments can't be inferred with --isolatedDeclarations."),Objects_that_contain_shorthand_properties_can_t_be_inferred_with_isolatedDeclarations:u(9016,1,"Objects_that_contain_shorthand_properties_can_t_be_inferred_with_isolatedDeclarations_9016","Objects that contain shorthand properties can't be inferred with --isolatedDeclarations."),Only_const_arrays_can_be_inferred_with_isolatedDeclarations:u(9017,1,"Only_const_arrays_can_be_inferred_with_isolatedDeclarations_9017","Only const arrays can be inferred with --isolatedDeclarations."),Arrays_with_spread_elements_can_t_inferred_with_isolatedDeclarations:u(9018,1,"Arrays_with_spread_elements_can_t_inferred_with_isolatedDeclarations_9018","Arrays with spread elements can't inferred with --isolatedDeclarations."),Binding_elements_can_t_be_exported_directly_with_isolatedDeclarations:u(9019,1,"Binding_elements_can_t_be_exported_directly_with_isolatedDeclarations_9019","Binding elements can't be exported directly with --isolatedDeclarations."),Enum_member_initializers_must_be_computable_without_references_to_external_symbols_with_isolatedDeclarations:u(9020,1,"Enum_member_initializers_must_be_computable_without_references_to_external_symbols_with_isolatedDecl_9020","Enum member initializers must be computable without references to external symbols with --isolatedDeclarations."),Extends_clause_can_t_contain_an_expression_with_isolatedDeclarations:u(9021,1,"Extends_clause_can_t_contain_an_expression_with_isolatedDeclarations_9021","Extends clause can't contain an expression with --isolatedDeclarations."),Inference_from_class_expressions_is_not_supported_with_isolatedDeclarations:u(9022,1,"Inference_from_class_expressions_is_not_supported_with_isolatedDeclarations_9022","Inference from class expressions is not supported with --isolatedDeclarations."),Assigning_properties_to_functions_without_declaring_them_is_not_supported_with_isolatedDeclarations_Add_an_explicit_declaration_for_the_properties_assigned_to_this_function:u(9023,1,"Assigning_properties_to_functions_without_declaring_them_is_not_supported_with_isolatedDeclarations__9023","Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function."),Declaration_emit_for_this_parameter_requires_implicitly_adding_undefined_to_its_type_This_is_not_supported_with_isolatedDeclarations:u(9025,1,"Declaration_emit_for_this_parameter_requires_implicitly_adding_undefined_to_its_type_This_is_not_sup_9025","Declaration emit for this parameter requires implicitly adding undefined to its type. This is not supported with --isolatedDeclarations."),Declaration_emit_for_this_file_requires_preserving_this_import_for_augmentations_This_is_not_supported_with_isolatedDeclarations:u(9026,1,"Declaration_emit_for_this_file_requires_preserving_this_import_for_augmentations_This_is_not_support_9026","Declaration emit for this file requires preserving this import for augmentations. This is not supported with --isolatedDeclarations."),Add_a_type_annotation_to_the_variable_0:u(9027,1,"Add_a_type_annotation_to_the_variable_0_9027","Add a type annotation to the variable {0}."),Add_a_type_annotation_to_the_parameter_0:u(9028,1,"Add_a_type_annotation_to_the_parameter_0_9028","Add a type annotation to the parameter {0}."),Add_a_type_annotation_to_the_property_0:u(9029,1,"Add_a_type_annotation_to_the_property_0_9029","Add a type annotation to the property {0}."),Add_a_return_type_to_the_function_expression:u(9030,1,"Add_a_return_type_to_the_function_expression_9030","Add a return type to the function expression."),Add_a_return_type_to_the_function_declaration:u(9031,1,"Add_a_return_type_to_the_function_declaration_9031","Add a return type to the function declaration."),Add_a_return_type_to_the_get_accessor_declaration:u(9032,1,"Add_a_return_type_to_the_get_accessor_declaration_9032","Add a return type to the get accessor declaration."),Add_a_type_to_parameter_of_the_set_accessor_declaration:u(9033,1,"Add_a_type_to_parameter_of_the_set_accessor_declaration_9033","Add a type to parameter of the set accessor declaration."),Add_a_return_type_to_the_method:u(9034,1,"Add_a_return_type_to_the_method_9034","Add a return type to the method"),Add_satisfies_and_a_type_assertion_to_this_expression_satisfies_T_as_T_to_make_the_type_explicit:u(9035,1,"Add_satisfies_and_a_type_assertion_to_this_expression_satisfies_T_as_T_to_make_the_type_explicit_9035","Add satisfies and a type assertion to this expression (satisfies T as T) to make the type explicit."),Move_the_expression_in_default_export_to_a_variable_and_add_a_type_annotation_to_it:u(9036,1,"Move_the_expression_in_default_export_to_a_variable_and_add_a_type_annotation_to_it_9036","Move the expression in default export to a variable and add a type annotation to it."),Default_exports_can_t_be_inferred_with_isolatedDeclarations:u(9037,1,"Default_exports_can_t_be_inferred_with_isolatedDeclarations_9037","Default exports can't be inferred with --isolatedDeclarations."),Computed_property_names_on_class_or_object_literals_cannot_be_inferred_with_isolatedDeclarations:u(9038,1,"Computed_property_names_on_class_or_object_literals_cannot_be_inferred_with_isolatedDeclarations_9038","Computed property names on class or object literals cannot be inferred with --isolatedDeclarations."),Type_containing_private_name_0_can_t_be_used_with_isolatedDeclarations:u(9039,1,"Type_containing_private_name_0_can_t_be_used_with_isolatedDeclarations_9039","Type containing private name '{0}' can't be used with --isolatedDeclarations."),JSX_attributes_must_only_be_assigned_a_non_empty_expression:u(17e3,1,"JSX_attributes_must_only_be_assigned_a_non_empty_expression_17000","JSX attributes must only be assigned a non-empty 'expression'."),JSX_elements_cannot_have_multiple_attributes_with_the_same_name:u(17001,1,"JSX_elements_cannot_have_multiple_attributes_with_the_same_name_17001","JSX elements cannot have multiple attributes with the same name."),Expected_corresponding_JSX_closing_tag_for_0:u(17002,1,"Expected_corresponding_JSX_closing_tag_for_0_17002","Expected corresponding JSX closing tag for '{0}'."),Cannot_use_JSX_unless_the_jsx_flag_is_provided:u(17004,1,"Cannot_use_JSX_unless_the_jsx_flag_is_provided_17004","Cannot use JSX unless the '--jsx' flag is provided."),A_constructor_cannot_contain_a_super_call_when_its_class_extends_null:u(17005,1,"A_constructor_cannot_contain_a_super_call_when_its_class_extends_null_17005","A constructor cannot contain a 'super' call when its class extends 'null'."),An_unary_expression_with_the_0_operator_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses:u(17006,1,"An_unary_expression_with_the_0_operator_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_ex_17006","An unary expression with the '{0}' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses."),A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses:u(17007,1,"A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Con_17007","A type assertion expression is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses."),JSX_element_0_has_no_corresponding_closing_tag:u(17008,1,"JSX_element_0_has_no_corresponding_closing_tag_17008","JSX element '{0}' has no corresponding closing tag."),super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class:u(17009,1,"super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class_17009","'super' must be called before accessing 'this' in the constructor of a derived class."),Unknown_type_acquisition_option_0:u(17010,1,"Unknown_type_acquisition_option_0_17010","Unknown type acquisition option '{0}'."),super_must_be_called_before_accessing_a_property_of_super_in_the_constructor_of_a_derived_class:u(17011,1,"super_must_be_called_before_accessing_a_property_of_super_in_the_constructor_of_a_derived_class_17011","'super' must be called before accessing a property of 'super' in the constructor of a derived class."),_0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2:u(17012,1,"_0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2_17012","'{0}' is not a valid meta-property for keyword '{1}'. Did you mean '{2}'?"),Meta_property_0_is_only_allowed_in_the_body_of_a_function_declaration_function_expression_or_constructor:u(17013,1,"Meta_property_0_is_only_allowed_in_the_body_of_a_function_declaration_function_expression_or_constru_17013","Meta-property '{0}' is only allowed in the body of a function declaration, function expression, or constructor."),JSX_fragment_has_no_corresponding_closing_tag:u(17014,1,"JSX_fragment_has_no_corresponding_closing_tag_17014","JSX fragment has no corresponding closing tag."),Expected_corresponding_closing_tag_for_JSX_fragment:u(17015,1,"Expected_corresponding_closing_tag_for_JSX_fragment_17015","Expected corresponding closing tag for JSX fragment."),The_jsxFragmentFactory_compiler_option_must_be_provided_to_use_JSX_fragments_with_the_jsxFactory_compiler_option:u(17016,1,"The_jsxFragmentFactory_compiler_option_must_be_provided_to_use_JSX_fragments_with_the_jsxFactory_com_17016","The 'jsxFragmentFactory' compiler option must be provided to use JSX fragments with the 'jsxFactory' compiler option."),An_jsxFrag_pragma_is_required_when_using_an_jsx_pragma_with_JSX_fragments:u(17017,1,"An_jsxFrag_pragma_is_required_when_using_an_jsx_pragma_with_JSX_fragments_17017","An @jsxFrag pragma is required when using an @jsx pragma with JSX fragments."),Unknown_type_acquisition_option_0_Did_you_mean_1:u(17018,1,"Unknown_type_acquisition_option_0_Did_you_mean_1_17018","Unknown type acquisition option '{0}'. Did you mean '{1}'?"),_0_at_the_end_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1:u(17019,1,"_0_at_the_end_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1_17019","'{0}' at the end of a type is not valid TypeScript syntax. Did you mean to write '{1}'?"),_0_at_the_start_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1:u(17020,1,"_0_at_the_start_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1_17020","'{0}' at the start of a type is not valid TypeScript syntax. Did you mean to write '{1}'?"),Unicode_escape_sequence_cannot_appear_here:u(17021,1,"Unicode_escape_sequence_cannot_appear_here_17021","Unicode escape sequence cannot appear here."),Circularity_detected_while_resolving_configuration_Colon_0:u(18e3,1,"Circularity_detected_while_resolving_configuration_Colon_0_18000","Circularity detected while resolving configuration: {0}"),The_files_list_in_config_file_0_is_empty:u(18002,1,"The_files_list_in_config_file_0_is_empty_18002","The 'files' list in config file '{0}' is empty."),No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2:u(18003,1,"No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2_18003","No inputs were found in config file '{0}'. Specified 'include' paths were '{1}' and 'exclude' paths were '{2}'."),File_is_a_CommonJS_module_it_may_be_converted_to_an_ES_module:u(80001,2,"File_is_a_CommonJS_module_it_may_be_converted_to_an_ES_module_80001","File is a CommonJS module; it may be converted to an ES module."),This_constructor_function_may_be_converted_to_a_class_declaration:u(80002,2,"This_constructor_function_may_be_converted_to_a_class_declaration_80002","This constructor function may be converted to a class declaration."),Import_may_be_converted_to_a_default_import:u(80003,2,"Import_may_be_converted_to_a_default_import_80003","Import may be converted to a default import."),JSDoc_types_may_be_moved_to_TypeScript_types:u(80004,2,"JSDoc_types_may_be_moved_to_TypeScript_types_80004","JSDoc types may be moved to TypeScript types."),require_call_may_be_converted_to_an_import:u(80005,2,"require_call_may_be_converted_to_an_import_80005","'require' call may be converted to an import."),This_may_be_converted_to_an_async_function:u(80006,2,"This_may_be_converted_to_an_async_function_80006","This may be converted to an async function."),await_has_no_effect_on_the_type_of_this_expression:u(80007,2,"await_has_no_effect_on_the_type_of_this_expression_80007","'await' has no effect on the type of this expression."),Numeric_literals_with_absolute_values_equal_to_2_53_or_greater_are_too_large_to_be_represented_accurately_as_integers:u(80008,2,"Numeric_literals_with_absolute_values_equal_to_2_53_or_greater_are_too_large_to_be_represented_accur_80008","Numeric literals with absolute values equal to 2^53 or greater are too large to be represented accurately as integers."),JSDoc_typedef_may_be_converted_to_TypeScript_type:u(80009,2,"JSDoc_typedef_may_be_converted_to_TypeScript_type_80009","JSDoc typedef may be converted to TypeScript type."),JSDoc_typedefs_may_be_converted_to_TypeScript_types:u(80010,2,"JSDoc_typedefs_may_be_converted_to_TypeScript_types_80010","JSDoc typedefs may be converted to TypeScript types."),Add_missing_super_call:u(90001,3,"Add_missing_super_call_90001","Add missing 'super()' call"),Make_super_call_the_first_statement_in_the_constructor:u(90002,3,"Make_super_call_the_first_statement_in_the_constructor_90002","Make 'super()' call the first statement in the constructor"),Change_extends_to_implements:u(90003,3,"Change_extends_to_implements_90003","Change 'extends' to 'implements'"),Remove_unused_declaration_for_Colon_0:u(90004,3,"Remove_unused_declaration_for_Colon_0_90004","Remove unused declaration for: '{0}'"),Remove_import_from_0:u(90005,3,"Remove_import_from_0_90005","Remove import from '{0}'"),Implement_interface_0:u(90006,3,"Implement_interface_0_90006","Implement interface '{0}'"),Implement_inherited_abstract_class:u(90007,3,"Implement_inherited_abstract_class_90007","Implement inherited abstract class"),Add_0_to_unresolved_variable:u(90008,3,"Add_0_to_unresolved_variable_90008","Add '{0}.' to unresolved variable"),Remove_variable_statement:u(90010,3,"Remove_variable_statement_90010","Remove variable statement"),Remove_template_tag:u(90011,3,"Remove_template_tag_90011","Remove template tag"),Remove_type_parameters:u(90012,3,"Remove_type_parameters_90012","Remove type parameters"),Import_0_from_1:u(90013,3,"Import_0_from_1_90013",`Import '{0}' from "{1}"`),Change_0_to_1:u(90014,3,"Change_0_to_1_90014","Change '{0}' to '{1}'"),Declare_property_0:u(90016,3,"Declare_property_0_90016","Declare property '{0}'"),Add_index_signature_for_property_0:u(90017,3,"Add_index_signature_for_property_0_90017","Add index signature for property '{0}'"),Disable_checking_for_this_file:u(90018,3,"Disable_checking_for_this_file_90018","Disable checking for this file"),Ignore_this_error_message:u(90019,3,"Ignore_this_error_message_90019","Ignore this error message"),Initialize_property_0_in_the_constructor:u(90020,3,"Initialize_property_0_in_the_constructor_90020","Initialize property '{0}' in the constructor"),Initialize_static_property_0:u(90021,3,"Initialize_static_property_0_90021","Initialize static property '{0}'"),Change_spelling_to_0:u(90022,3,"Change_spelling_to_0_90022","Change spelling to '{0}'"),Declare_method_0:u(90023,3,"Declare_method_0_90023","Declare method '{0}'"),Declare_static_method_0:u(90024,3,"Declare_static_method_0_90024","Declare static method '{0}'"),Prefix_0_with_an_underscore:u(90025,3,"Prefix_0_with_an_underscore_90025","Prefix '{0}' with an underscore"),Rewrite_as_the_indexed_access_type_0:u(90026,3,"Rewrite_as_the_indexed_access_type_0_90026","Rewrite as the indexed access type '{0}'"),Declare_static_property_0:u(90027,3,"Declare_static_property_0_90027","Declare static property '{0}'"),Call_decorator_expression:u(90028,3,"Call_decorator_expression_90028","Call decorator expression"),Add_async_modifier_to_containing_function:u(90029,3,"Add_async_modifier_to_containing_function_90029","Add async modifier to containing function"),Replace_infer_0_with_unknown:u(90030,3,"Replace_infer_0_with_unknown_90030","Replace 'infer {0}' with 'unknown'"),Replace_all_unused_infer_with_unknown:u(90031,3,"Replace_all_unused_infer_with_unknown_90031","Replace all unused 'infer' with 'unknown'"),Add_parameter_name:u(90034,3,"Add_parameter_name_90034","Add parameter name"),Declare_private_property_0:u(90035,3,"Declare_private_property_0_90035","Declare private property '{0}'"),Replace_0_with_Promise_1:u(90036,3,"Replace_0_with_Promise_1_90036","Replace '{0}' with 'Promise<{1}>'"),Fix_all_incorrect_return_type_of_an_async_functions:u(90037,3,"Fix_all_incorrect_return_type_of_an_async_functions_90037","Fix all incorrect return type of an async functions"),Declare_private_method_0:u(90038,3,"Declare_private_method_0_90038","Declare private method '{0}'"),Remove_unused_destructuring_declaration:u(90039,3,"Remove_unused_destructuring_declaration_90039","Remove unused destructuring declaration"),Remove_unused_declarations_for_Colon_0:u(90041,3,"Remove_unused_declarations_for_Colon_0_90041","Remove unused declarations for: '{0}'"),Declare_a_private_field_named_0:u(90053,3,"Declare_a_private_field_named_0_90053","Declare a private field named '{0}'."),Includes_imports_of_types_referenced_by_0:u(90054,3,"Includes_imports_of_types_referenced_by_0_90054","Includes imports of types referenced by '{0}'"),Remove_type_from_import_declaration_from_0:u(90055,3,"Remove_type_from_import_declaration_from_0_90055",`Remove 'type' from import declaration from "{0}"`),Remove_type_from_import_of_0_from_1:u(90056,3,"Remove_type_from_import_of_0_from_1_90056",`Remove 'type' from import of '{0}' from "{1}"`),Add_import_from_0:u(90057,3,"Add_import_from_0_90057",'Add import from "{0}"'),Update_import_from_0:u(90058,3,"Update_import_from_0_90058",'Update import from "{0}"'),Export_0_from_module_1:u(90059,3,"Export_0_from_module_1_90059","Export '{0}' from module '{1}'"),Export_all_referenced_locals:u(90060,3,"Export_all_referenced_locals_90060","Export all referenced locals"),Update_modifiers_of_0:u(90061,3,"Update_modifiers_of_0_90061","Update modifiers of '{0}'"),Add_annotation_of_type_0:u(90062,3,"Add_annotation_of_type_0_90062","Add annotation of type '{0}'"),Add_return_type_0:u(90063,3,"Add_return_type_0_90063","Add return type '{0}'"),Extract_base_class_to_variable:u(90064,3,"Extract_base_class_to_variable_90064","Extract base class to variable"),Extract_default_export_to_variable:u(90065,3,"Extract_default_export_to_variable_90065","Extract default export to variable"),Extract_binding_expressions_to_variable:u(90066,3,"Extract_binding_expressions_to_variable_90066","Extract binding expressions to variable"),Add_all_missing_type_annotations:u(90067,3,"Add_all_missing_type_annotations_90067","Add all missing type annotations"),Add_satisfies_and_an_inline_type_assertion_with_0:u(90068,3,"Add_satisfies_and_an_inline_type_assertion_with_0_90068","Add satisfies and an inline type assertion with '{0}'"),Extract_to_variable_and_replace_with_0_as_typeof_0:u(90069,3,"Extract_to_variable_and_replace_with_0_as_typeof_0_90069","Extract to variable and replace with '{0} as typeof {0}'"),Mark_array_literal_as_const:u(90070,3,"Mark_array_literal_as_const_90070","Mark array literal as const"),Annotate_types_of_properties_expando_function_in_a_namespace:u(90071,3,"Annotate_types_of_properties_expando_function_in_a_namespace_90071","Annotate types of properties expando function in a namespace"),Convert_function_to_an_ES2015_class:u(95001,3,"Convert_function_to_an_ES2015_class_95001","Convert function to an ES2015 class"),Convert_0_to_1_in_0:u(95003,3,"Convert_0_to_1_in_0_95003","Convert '{0}' to '{1} in {0}'"),Extract_to_0_in_1:u(95004,3,"Extract_to_0_in_1_95004","Extract to {0} in {1}"),Extract_function:u(95005,3,"Extract_function_95005","Extract function"),Extract_constant:u(95006,3,"Extract_constant_95006","Extract constant"),Extract_to_0_in_enclosing_scope:u(95007,3,"Extract_to_0_in_enclosing_scope_95007","Extract to {0} in enclosing scope"),Extract_to_0_in_1_scope:u(95008,3,"Extract_to_0_in_1_scope_95008","Extract to {0} in {1} scope"),Annotate_with_type_from_JSDoc:u(95009,3,"Annotate_with_type_from_JSDoc_95009","Annotate with type from JSDoc"),Infer_type_of_0_from_usage:u(95011,3,"Infer_type_of_0_from_usage_95011","Infer type of '{0}' from usage"),Infer_parameter_types_from_usage:u(95012,3,"Infer_parameter_types_from_usage_95012","Infer parameter types from usage"),Convert_to_default_import:u(95013,3,"Convert_to_default_import_95013","Convert to default import"),Install_0:u(95014,3,"Install_0_95014","Install '{0}'"),Replace_import_with_0:u(95015,3,"Replace_import_with_0_95015","Replace import with '{0}'."),Use_synthetic_default_member:u(95016,3,"Use_synthetic_default_member_95016","Use synthetic 'default' member."),Convert_to_ES_module:u(95017,3,"Convert_to_ES_module_95017","Convert to ES module"),Add_undefined_type_to_property_0:u(95018,3,"Add_undefined_type_to_property_0_95018","Add 'undefined' type to property '{0}'"),Add_initializer_to_property_0:u(95019,3,"Add_initializer_to_property_0_95019","Add initializer to property '{0}'"),Add_definite_assignment_assertion_to_property_0:u(95020,3,"Add_definite_assignment_assertion_to_property_0_95020","Add definite assignment assertion to property '{0}'"),Convert_all_type_literals_to_mapped_type:u(95021,3,"Convert_all_type_literals_to_mapped_type_95021","Convert all type literals to mapped type"),Add_all_missing_members:u(95022,3,"Add_all_missing_members_95022","Add all missing members"),Infer_all_types_from_usage:u(95023,3,"Infer_all_types_from_usage_95023","Infer all types from usage"),Delete_all_unused_declarations:u(95024,3,"Delete_all_unused_declarations_95024","Delete all unused declarations"),Prefix_all_unused_declarations_with_where_possible:u(95025,3,"Prefix_all_unused_declarations_with_where_possible_95025","Prefix all unused declarations with '_' where possible"),Fix_all_detected_spelling_errors:u(95026,3,"Fix_all_detected_spelling_errors_95026","Fix all detected spelling errors"),Add_initializers_to_all_uninitialized_properties:u(95027,3,"Add_initializers_to_all_uninitialized_properties_95027","Add initializers to all uninitialized properties"),Add_definite_assignment_assertions_to_all_uninitialized_properties:u(95028,3,"Add_definite_assignment_assertions_to_all_uninitialized_properties_95028","Add definite assignment assertions to all uninitialized properties"),Add_undefined_type_to_all_uninitialized_properties:u(95029,3,"Add_undefined_type_to_all_uninitialized_properties_95029","Add undefined type to all uninitialized properties"),Change_all_jsdoc_style_types_to_TypeScript:u(95030,3,"Change_all_jsdoc_style_types_to_TypeScript_95030","Change all jsdoc-style types to TypeScript"),Change_all_jsdoc_style_types_to_TypeScript_and_add_undefined_to_nullable_types:u(95031,3,"Change_all_jsdoc_style_types_to_TypeScript_and_add_undefined_to_nullable_types_95031","Change all jsdoc-style types to TypeScript (and add '| undefined' to nullable types)"),Implement_all_unimplemented_interfaces:u(95032,3,"Implement_all_unimplemented_interfaces_95032","Implement all unimplemented interfaces"),Install_all_missing_types_packages:u(95033,3,"Install_all_missing_types_packages_95033","Install all missing types packages"),Rewrite_all_as_indexed_access_types:u(95034,3,"Rewrite_all_as_indexed_access_types_95034","Rewrite all as indexed access types"),Convert_all_to_default_imports:u(95035,3,"Convert_all_to_default_imports_95035","Convert all to default imports"),Make_all_super_calls_the_first_statement_in_their_constructor:u(95036,3,"Make_all_super_calls_the_first_statement_in_their_constructor_95036","Make all 'super()' calls the first statement in their constructor"),Add_qualifier_to_all_unresolved_variables_matching_a_member_name:u(95037,3,"Add_qualifier_to_all_unresolved_variables_matching_a_member_name_95037","Add qualifier to all unresolved variables matching a member name"),Change_all_extended_interfaces_to_implements:u(95038,3,"Change_all_extended_interfaces_to_implements_95038","Change all extended interfaces to 'implements'"),Add_all_missing_super_calls:u(95039,3,"Add_all_missing_super_calls_95039","Add all missing super calls"),Implement_all_inherited_abstract_classes:u(95040,3,"Implement_all_inherited_abstract_classes_95040","Implement all inherited abstract classes"),Add_all_missing_async_modifiers:u(95041,3,"Add_all_missing_async_modifiers_95041","Add all missing 'async' modifiers"),Add_ts_ignore_to_all_error_messages:u(95042,3,"Add_ts_ignore_to_all_error_messages_95042","Add '@ts-ignore' to all error messages"),Annotate_everything_with_types_from_JSDoc:u(95043,3,"Annotate_everything_with_types_from_JSDoc_95043","Annotate everything with types from JSDoc"),Add_to_all_uncalled_decorators:u(95044,3,"Add_to_all_uncalled_decorators_95044","Add '()' to all uncalled decorators"),Convert_all_constructor_functions_to_classes:u(95045,3,"Convert_all_constructor_functions_to_classes_95045","Convert all constructor functions to classes"),Generate_get_and_set_accessors:u(95046,3,"Generate_get_and_set_accessors_95046","Generate 'get' and 'set' accessors"),Convert_require_to_import:u(95047,3,"Convert_require_to_import_95047","Convert 'require' to 'import'"),Convert_all_require_to_import:u(95048,3,"Convert_all_require_to_import_95048","Convert all 'require' to 'import'"),Move_to_a_new_file:u(95049,3,"Move_to_a_new_file_95049","Move to a new file"),Remove_unreachable_code:u(95050,3,"Remove_unreachable_code_95050","Remove unreachable code"),Remove_all_unreachable_code:u(95051,3,"Remove_all_unreachable_code_95051","Remove all unreachable code"),Add_missing_typeof:u(95052,3,"Add_missing_typeof_95052","Add missing 'typeof'"),Remove_unused_label:u(95053,3,"Remove_unused_label_95053","Remove unused label"),Remove_all_unused_labels:u(95054,3,"Remove_all_unused_labels_95054","Remove all unused labels"),Convert_0_to_mapped_object_type:u(95055,3,"Convert_0_to_mapped_object_type_95055","Convert '{0}' to mapped object type"),Convert_namespace_import_to_named_imports:u(95056,3,"Convert_namespace_import_to_named_imports_95056","Convert namespace import to named imports"),Convert_named_imports_to_namespace_import:u(95057,3,"Convert_named_imports_to_namespace_import_95057","Convert named imports to namespace import"),Add_or_remove_braces_in_an_arrow_function:u(95058,3,"Add_or_remove_braces_in_an_arrow_function_95058","Add or remove braces in an arrow function"),Add_braces_to_arrow_function:u(95059,3,"Add_braces_to_arrow_function_95059","Add braces to arrow function"),Remove_braces_from_arrow_function:u(95060,3,"Remove_braces_from_arrow_function_95060","Remove braces from arrow function"),Convert_default_export_to_named_export:u(95061,3,"Convert_default_export_to_named_export_95061","Convert default export to named export"),Convert_named_export_to_default_export:u(95062,3,"Convert_named_export_to_default_export_95062","Convert named export to default export"),Add_missing_enum_member_0:u(95063,3,"Add_missing_enum_member_0_95063","Add missing enum member '{0}'"),Add_all_missing_imports:u(95064,3,"Add_all_missing_imports_95064","Add all missing imports"),Convert_to_async_function:u(95065,3,"Convert_to_async_function_95065","Convert to async function"),Convert_all_to_async_functions:u(95066,3,"Convert_all_to_async_functions_95066","Convert all to async functions"),Add_missing_call_parentheses:u(95067,3,"Add_missing_call_parentheses_95067","Add missing call parentheses"),Add_all_missing_call_parentheses:u(95068,3,"Add_all_missing_call_parentheses_95068","Add all missing call parentheses"),Add_unknown_conversion_for_non_overlapping_types:u(95069,3,"Add_unknown_conversion_for_non_overlapping_types_95069","Add 'unknown' conversion for non-overlapping types"),Add_unknown_to_all_conversions_of_non_overlapping_types:u(95070,3,"Add_unknown_to_all_conversions_of_non_overlapping_types_95070","Add 'unknown' to all conversions of non-overlapping types"),Add_missing_new_operator_to_call:u(95071,3,"Add_missing_new_operator_to_call_95071","Add missing 'new' operator to call"),Add_missing_new_operator_to_all_calls:u(95072,3,"Add_missing_new_operator_to_all_calls_95072","Add missing 'new' operator to all calls"),Add_names_to_all_parameters_without_names:u(95073,3,"Add_names_to_all_parameters_without_names_95073","Add names to all parameters without names"),Enable_the_experimentalDecorators_option_in_your_configuration_file:u(95074,3,"Enable_the_experimentalDecorators_option_in_your_configuration_file_95074","Enable the 'experimentalDecorators' option in your configuration file"),Convert_parameters_to_destructured_object:u(95075,3,"Convert_parameters_to_destructured_object_95075","Convert parameters to destructured object"),Extract_type:u(95077,3,"Extract_type_95077","Extract type"),Extract_to_type_alias:u(95078,3,"Extract_to_type_alias_95078","Extract to type alias"),Extract_to_typedef:u(95079,3,"Extract_to_typedef_95079","Extract to typedef"),Infer_this_type_of_0_from_usage:u(95080,3,"Infer_this_type_of_0_from_usage_95080","Infer 'this' type of '{0}' from usage"),Add_const_to_unresolved_variable:u(95081,3,"Add_const_to_unresolved_variable_95081","Add 'const' to unresolved variable"),Add_const_to_all_unresolved_variables:u(95082,3,"Add_const_to_all_unresolved_variables_95082","Add 'const' to all unresolved variables"),Add_await:u(95083,3,"Add_await_95083","Add 'await'"),Add_await_to_initializer_for_0:u(95084,3,"Add_await_to_initializer_for_0_95084","Add 'await' to initializer for '{0}'"),Fix_all_expressions_possibly_missing_await:u(95085,3,"Fix_all_expressions_possibly_missing_await_95085","Fix all expressions possibly missing 'await'"),Remove_unnecessary_await:u(95086,3,"Remove_unnecessary_await_95086","Remove unnecessary 'await'"),Remove_all_unnecessary_uses_of_await:u(95087,3,"Remove_all_unnecessary_uses_of_await_95087","Remove all unnecessary uses of 'await'"),Enable_the_jsx_flag_in_your_configuration_file:u(95088,3,"Enable_the_jsx_flag_in_your_configuration_file_95088","Enable the '--jsx' flag in your configuration file"),Add_await_to_initializers:u(95089,3,"Add_await_to_initializers_95089","Add 'await' to initializers"),Extract_to_interface:u(95090,3,"Extract_to_interface_95090","Extract to interface"),Convert_to_a_bigint_numeric_literal:u(95091,3,"Convert_to_a_bigint_numeric_literal_95091","Convert to a bigint numeric literal"),Convert_all_to_bigint_numeric_literals:u(95092,3,"Convert_all_to_bigint_numeric_literals_95092","Convert all to bigint numeric literals"),Convert_const_to_let:u(95093,3,"Convert_const_to_let_95093","Convert 'const' to 'let'"),Prefix_with_declare:u(95094,3,"Prefix_with_declare_95094","Prefix with 'declare'"),Prefix_all_incorrect_property_declarations_with_declare:u(95095,3,"Prefix_all_incorrect_property_declarations_with_declare_95095","Prefix all incorrect property declarations with 'declare'"),Convert_to_template_string:u(95096,3,"Convert_to_template_string_95096","Convert to template string"),Add_export_to_make_this_file_into_a_module:u(95097,3,"Add_export_to_make_this_file_into_a_module_95097","Add 'export {}' to make this file into a module"),Set_the_target_option_in_your_configuration_file_to_0:u(95098,3,"Set_the_target_option_in_your_configuration_file_to_0_95098","Set the 'target' option in your configuration file to '{0}'"),Set_the_module_option_in_your_configuration_file_to_0:u(95099,3,"Set_the_module_option_in_your_configuration_file_to_0_95099","Set the 'module' option in your configuration file to '{0}'"),Convert_invalid_character_to_its_html_entity_code:u(95100,3,"Convert_invalid_character_to_its_html_entity_code_95100","Convert invalid character to its html entity code"),Convert_all_invalid_characters_to_HTML_entity_code:u(95101,3,"Convert_all_invalid_characters_to_HTML_entity_code_95101","Convert all invalid characters to HTML entity code"),Convert_all_const_to_let:u(95102,3,"Convert_all_const_to_let_95102","Convert all 'const' to 'let'"),Convert_function_expression_0_to_arrow_function:u(95105,3,"Convert_function_expression_0_to_arrow_function_95105","Convert function expression '{0}' to arrow function"),Convert_function_declaration_0_to_arrow_function:u(95106,3,"Convert_function_declaration_0_to_arrow_function_95106","Convert function declaration '{0}' to arrow function"),Fix_all_implicit_this_errors:u(95107,3,"Fix_all_implicit_this_errors_95107","Fix all implicit-'this' errors"),Wrap_invalid_character_in_an_expression_container:u(95108,3,"Wrap_invalid_character_in_an_expression_container_95108","Wrap invalid character in an expression container"),Wrap_all_invalid_characters_in_an_expression_container:u(95109,3,"Wrap_all_invalid_characters_in_an_expression_container_95109","Wrap all invalid characters in an expression container"),Visit_https_Colon_Slash_Slashaka_ms_Slashtsconfig_to_read_more_about_this_file:u(95110,3,"Visit_https_Colon_Slash_Slashaka_ms_Slashtsconfig_to_read_more_about_this_file_95110","Visit https://aka.ms/tsconfig to read more about this file"),Add_a_return_statement:u(95111,3,"Add_a_return_statement_95111","Add a return statement"),Remove_braces_from_arrow_function_body:u(95112,3,"Remove_braces_from_arrow_function_body_95112","Remove braces from arrow function body"),Wrap_the_following_body_with_parentheses_which_should_be_an_object_literal:u(95113,3,"Wrap_the_following_body_with_parentheses_which_should_be_an_object_literal_95113","Wrap the following body with parentheses which should be an object literal"),Add_all_missing_return_statement:u(95114,3,"Add_all_missing_return_statement_95114","Add all missing return statement"),Remove_braces_from_all_arrow_function_bodies_with_relevant_issues:u(95115,3,"Remove_braces_from_all_arrow_function_bodies_with_relevant_issues_95115","Remove braces from all arrow function bodies with relevant issues"),Wrap_all_object_literal_with_parentheses:u(95116,3,"Wrap_all_object_literal_with_parentheses_95116","Wrap all object literal with parentheses"),Move_labeled_tuple_element_modifiers_to_labels:u(95117,3,"Move_labeled_tuple_element_modifiers_to_labels_95117","Move labeled tuple element modifiers to labels"),Convert_overload_list_to_single_signature:u(95118,3,"Convert_overload_list_to_single_signature_95118","Convert overload list to single signature"),Generate_get_and_set_accessors_for_all_overriding_properties:u(95119,3,"Generate_get_and_set_accessors_for_all_overriding_properties_95119","Generate 'get' and 'set' accessors for all overriding properties"),Wrap_in_JSX_fragment:u(95120,3,"Wrap_in_JSX_fragment_95120","Wrap in JSX fragment"),Wrap_all_unparented_JSX_in_JSX_fragment:u(95121,3,"Wrap_all_unparented_JSX_in_JSX_fragment_95121","Wrap all unparented JSX in JSX fragment"),Convert_arrow_function_or_function_expression:u(95122,3,"Convert_arrow_function_or_function_expression_95122","Convert arrow function or function expression"),Convert_to_anonymous_function:u(95123,3,"Convert_to_anonymous_function_95123","Convert to anonymous function"),Convert_to_named_function:u(95124,3,"Convert_to_named_function_95124","Convert to named function"),Convert_to_arrow_function:u(95125,3,"Convert_to_arrow_function_95125","Convert to arrow function"),Remove_parentheses:u(95126,3,"Remove_parentheses_95126","Remove parentheses"),Could_not_find_a_containing_arrow_function:u(95127,3,"Could_not_find_a_containing_arrow_function_95127","Could not find a containing arrow function"),Containing_function_is_not_an_arrow_function:u(95128,3,"Containing_function_is_not_an_arrow_function_95128","Containing function is not an arrow function"),Could_not_find_export_statement:u(95129,3,"Could_not_find_export_statement_95129","Could not find export statement"),This_file_already_has_a_default_export:u(95130,3,"This_file_already_has_a_default_export_95130","This file already has a default export"),Could_not_find_import_clause:u(95131,3,"Could_not_find_import_clause_95131","Could not find import clause"),Could_not_find_namespace_import_or_named_imports:u(95132,3,"Could_not_find_namespace_import_or_named_imports_95132","Could not find namespace import or named imports"),Selection_is_not_a_valid_type_node:u(95133,3,"Selection_is_not_a_valid_type_node_95133","Selection is not a valid type node"),No_type_could_be_extracted_from_this_type_node:u(95134,3,"No_type_could_be_extracted_from_this_type_node_95134","No type could be extracted from this type node"),Could_not_find_property_for_which_to_generate_accessor:u(95135,3,"Could_not_find_property_for_which_to_generate_accessor_95135","Could not find property for which to generate accessor"),Name_is_not_valid:u(95136,3,"Name_is_not_valid_95136","Name is not valid"),Can_only_convert_property_with_modifier:u(95137,3,"Can_only_convert_property_with_modifier_95137","Can only convert property with modifier"),Switch_each_misused_0_to_1:u(95138,3,"Switch_each_misused_0_to_1_95138","Switch each misused '{0}' to '{1}'"),Convert_to_optional_chain_expression:u(95139,3,"Convert_to_optional_chain_expression_95139","Convert to optional chain expression"),Could_not_find_convertible_access_expression:u(95140,3,"Could_not_find_convertible_access_expression_95140","Could not find convertible access expression"),Could_not_find_matching_access_expressions:u(95141,3,"Could_not_find_matching_access_expressions_95141","Could not find matching access expressions"),Can_only_convert_logical_AND_access_chains:u(95142,3,"Can_only_convert_logical_AND_access_chains_95142","Can only convert logical AND access chains"),Add_void_to_Promise_resolved_without_a_value:u(95143,3,"Add_void_to_Promise_resolved_without_a_value_95143","Add 'void' to Promise resolved without a value"),Add_void_to_all_Promises_resolved_without_a_value:u(95144,3,"Add_void_to_all_Promises_resolved_without_a_value_95144","Add 'void' to all Promises resolved without a value"),Use_element_access_for_0:u(95145,3,"Use_element_access_for_0_95145","Use element access for '{0}'"),Use_element_access_for_all_undeclared_properties:u(95146,3,"Use_element_access_for_all_undeclared_properties_95146","Use element access for all undeclared properties."),Delete_all_unused_imports:u(95147,3,"Delete_all_unused_imports_95147","Delete all unused imports"),Infer_function_return_type:u(95148,3,"Infer_function_return_type_95148","Infer function return type"),Return_type_must_be_inferred_from_a_function:u(95149,3,"Return_type_must_be_inferred_from_a_function_95149","Return type must be inferred from a function"),Could_not_determine_function_return_type:u(95150,3,"Could_not_determine_function_return_type_95150","Could not determine function return type"),Could_not_convert_to_arrow_function:u(95151,3,"Could_not_convert_to_arrow_function_95151","Could not convert to arrow function"),Could_not_convert_to_named_function:u(95152,3,"Could_not_convert_to_named_function_95152","Could not convert to named function"),Could_not_convert_to_anonymous_function:u(95153,3,"Could_not_convert_to_anonymous_function_95153","Could not convert to anonymous function"),Can_only_convert_string_concatenations_and_string_literals:u(95154,3,"Can_only_convert_string_concatenations_and_string_literals_95154","Can only convert string concatenations and string literals"),Selection_is_not_a_valid_statement_or_statements:u(95155,3,"Selection_is_not_a_valid_statement_or_statements_95155","Selection is not a valid statement or statements"),Add_missing_function_declaration_0:u(95156,3,"Add_missing_function_declaration_0_95156","Add missing function declaration '{0}'"),Add_all_missing_function_declarations:u(95157,3,"Add_all_missing_function_declarations_95157","Add all missing function declarations"),Method_not_implemented:u(95158,3,"Method_not_implemented_95158","Method not implemented."),Function_not_implemented:u(95159,3,"Function_not_implemented_95159","Function not implemented."),Add_override_modifier:u(95160,3,"Add_override_modifier_95160","Add 'override' modifier"),Remove_override_modifier:u(95161,3,"Remove_override_modifier_95161","Remove 'override' modifier"),Add_all_missing_override_modifiers:u(95162,3,"Add_all_missing_override_modifiers_95162","Add all missing 'override' modifiers"),Remove_all_unnecessary_override_modifiers:u(95163,3,"Remove_all_unnecessary_override_modifiers_95163","Remove all unnecessary 'override' modifiers"),Can_only_convert_named_export:u(95164,3,"Can_only_convert_named_export_95164","Can only convert named export"),Add_missing_properties:u(95165,3,"Add_missing_properties_95165","Add missing properties"),Add_all_missing_properties:u(95166,3,"Add_all_missing_properties_95166","Add all missing properties"),Add_missing_attributes:u(95167,3,"Add_missing_attributes_95167","Add missing attributes"),Add_all_missing_attributes:u(95168,3,"Add_all_missing_attributes_95168","Add all missing attributes"),Add_undefined_to_optional_property_type:u(95169,3,"Add_undefined_to_optional_property_type_95169","Add 'undefined' to optional property type"),Convert_named_imports_to_default_import:u(95170,3,"Convert_named_imports_to_default_import_95170","Convert named imports to default import"),Delete_unused_param_tag_0:u(95171,3,"Delete_unused_param_tag_0_95171","Delete unused '@param' tag '{0}'"),Delete_all_unused_param_tags:u(95172,3,"Delete_all_unused_param_tags_95172","Delete all unused '@param' tags"),Rename_param_tag_name_0_to_1:u(95173,3,"Rename_param_tag_name_0_to_1_95173","Rename '@param' tag name '{0}' to '{1}'"),Use_0:u(95174,3,"Use_0_95174","Use `{0}`."),Use_Number_isNaN_in_all_conditions:u(95175,3,"Use_Number_isNaN_in_all_conditions_95175","Use `Number.isNaN` in all conditions."),Convert_typedef_to_TypeScript_type:u(95176,3,"Convert_typedef_to_TypeScript_type_95176","Convert typedef to TypeScript type."),Convert_all_typedef_to_TypeScript_types:u(95177,3,"Convert_all_typedef_to_TypeScript_types_95177","Convert all typedef to TypeScript types."),Move_to_file:u(95178,3,"Move_to_file_95178","Move to file"),Cannot_move_to_file_selected_file_is_invalid:u(95179,3,"Cannot_move_to_file_selected_file_is_invalid_95179","Cannot move to file, selected file is invalid"),Use_import_type:u(95180,3,"Use_import_type_95180","Use 'import type'"),Use_type_0:u(95181,3,"Use_type_0_95181","Use 'type {0}'"),Fix_all_with_type_only_imports:u(95182,3,"Fix_all_with_type_only_imports_95182","Fix all with type-only imports"),Cannot_move_statements_to_the_selected_file:u(95183,3,"Cannot_move_statements_to_the_selected_file_95183","Cannot move statements to the selected file"),Inline_variable:u(95184,3,"Inline_variable_95184","Inline variable"),Could_not_find_variable_to_inline:u(95185,3,"Could_not_find_variable_to_inline_95185","Could not find variable to inline."),Variables_with_multiple_declarations_cannot_be_inlined:u(95186,3,"Variables_with_multiple_declarations_cannot_be_inlined_95186","Variables with multiple declarations cannot be inlined."),Add_missing_comma_for_object_member_completion_0:u(95187,3,"Add_missing_comma_for_object_member_completion_0_95187","Add missing comma for object member completion '{0}'."),Add_missing_parameter_to_0:u(95188,3,"Add_missing_parameter_to_0_95188","Add missing parameter to '{0}'"),Add_missing_parameters_to_0:u(95189,3,"Add_missing_parameters_to_0_95189","Add missing parameters to '{0}'"),Add_all_missing_parameters:u(95190,3,"Add_all_missing_parameters_95190","Add all missing parameters"),Add_optional_parameter_to_0:u(95191,3,"Add_optional_parameter_to_0_95191","Add optional parameter to '{0}'"),Add_optional_parameters_to_0:u(95192,3,"Add_optional_parameters_to_0_95192","Add optional parameters to '{0}'"),Add_all_optional_parameters:u(95193,3,"Add_all_optional_parameters_95193","Add all optional parameters"),Wrap_in_parentheses:u(95194,3,"Wrap_in_parentheses_95194","Wrap in parentheses"),Wrap_all_invalid_decorator_expressions_in_parentheses:u(95195,3,"Wrap_all_invalid_decorator_expressions_in_parentheses_95195","Wrap all invalid decorator expressions in parentheses"),Add_resolution_mode_import_attribute:u(95196,3,"Add_resolution_mode_import_attribute_95196","Add 'resolution-mode' import attribute"),Add_resolution_mode_import_attribute_to_all_type_only_imports_that_need_it:u(95197,3,"Add_resolution_mode_import_attribute_to_all_type_only_imports_that_need_it_95197","Add 'resolution-mode' import attribute to all type-only imports that need it"),No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer:u(18004,1,"No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer_18004","No value exists in scope for the shorthand property '{0}'. Either declare one or provide an initializer."),Classes_may_not_have_a_field_named_constructor:u(18006,1,"Classes_may_not_have_a_field_named_constructor_18006","Classes may not have a field named 'constructor'."),JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array:u(18007,1,"JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array_18007","JSX expressions may not use the comma operator. Did you mean to write an array?"),Private_identifiers_cannot_be_used_as_parameters:u(18009,1,"Private_identifiers_cannot_be_used_as_parameters_18009","Private identifiers cannot be used as parameters."),An_accessibility_modifier_cannot_be_used_with_a_private_identifier:u(18010,1,"An_accessibility_modifier_cannot_be_used_with_a_private_identifier_18010","An accessibility modifier cannot be used with a private identifier."),The_operand_of_a_delete_operator_cannot_be_a_private_identifier:u(18011,1,"The_operand_of_a_delete_operator_cannot_be_a_private_identifier_18011","The operand of a 'delete' operator cannot be a private identifier."),constructor_is_a_reserved_word:u(18012,1,"constructor_is_a_reserved_word_18012","'#constructor' is a reserved word."),Property_0_is_not_accessible_outside_class_1_because_it_has_a_private_identifier:u(18013,1,"Property_0_is_not_accessible_outside_class_1_because_it_has_a_private_identifier_18013","Property '{0}' is not accessible outside class '{1}' because it has a private identifier."),The_property_0_cannot_be_accessed_on_type_1_within_this_class_because_it_is_shadowed_by_another_private_identifier_with_the_same_spelling:u(18014,1,"The_property_0_cannot_be_accessed_on_type_1_within_this_class_because_it_is_shadowed_by_another_priv_18014","The property '{0}' cannot be accessed on type '{1}' within this class because it is shadowed by another private identifier with the same spelling."),Property_0_in_type_1_refers_to_a_different_member_that_cannot_be_accessed_from_within_type_2:u(18015,1,"Property_0_in_type_1_refers_to_a_different_member_that_cannot_be_accessed_from_within_type_2_18015","Property '{0}' in type '{1}' refers to a different member that cannot be accessed from within type '{2}'."),Private_identifiers_are_not_allowed_outside_class_bodies:u(18016,1,"Private_identifiers_are_not_allowed_outside_class_bodies_18016","Private identifiers are not allowed outside class bodies."),The_shadowing_declaration_of_0_is_defined_here:u(18017,1,"The_shadowing_declaration_of_0_is_defined_here_18017","The shadowing declaration of '{0}' is defined here"),The_declaration_of_0_that_you_probably_intended_to_use_is_defined_here:u(18018,1,"The_declaration_of_0_that_you_probably_intended_to_use_is_defined_here_18018","The declaration of '{0}' that you probably intended to use is defined here"),_0_modifier_cannot_be_used_with_a_private_identifier:u(18019,1,"_0_modifier_cannot_be_used_with_a_private_identifier_18019","'{0}' modifier cannot be used with a private identifier."),An_enum_member_cannot_be_named_with_a_private_identifier:u(18024,1,"An_enum_member_cannot_be_named_with_a_private_identifier_18024","An enum member cannot be named with a private identifier."),can_only_be_used_at_the_start_of_a_file:u(18026,1,"can_only_be_used_at_the_start_of_a_file_18026","'#!' can only be used at the start of a file."),Compiler_reserves_name_0_when_emitting_private_identifier_downlevel:u(18027,1,"Compiler_reserves_name_0_when_emitting_private_identifier_downlevel_18027","Compiler reserves name '{0}' when emitting private identifier downlevel."),Private_identifiers_are_only_available_when_targeting_ECMAScript_2015_and_higher:u(18028,1,"Private_identifiers_are_only_available_when_targeting_ECMAScript_2015_and_higher_18028","Private identifiers are only available when targeting ECMAScript 2015 and higher."),Private_identifiers_are_not_allowed_in_variable_declarations:u(18029,1,"Private_identifiers_are_not_allowed_in_variable_declarations_18029","Private identifiers are not allowed in variable declarations."),An_optional_chain_cannot_contain_private_identifiers:u(18030,1,"An_optional_chain_cannot_contain_private_identifiers_18030","An optional chain cannot contain private identifiers."),The_intersection_0_was_reduced_to_never_because_property_1_has_conflicting_types_in_some_constituents:u(18031,1,"The_intersection_0_was_reduced_to_never_because_property_1_has_conflicting_types_in_some_constituent_18031","The intersection '{0}' was reduced to 'never' because property '{1}' has conflicting types in some constituents."),The_intersection_0_was_reduced_to_never_because_property_1_exists_in_multiple_constituents_and_is_private_in_some:u(18032,1,"The_intersection_0_was_reduced_to_never_because_property_1_exists_in_multiple_constituents_and_is_pr_18032","The intersection '{0}' was reduced to 'never' because property '{1}' exists in multiple constituents and is private in some."),Type_0_is_not_assignable_to_type_1_as_required_for_computed_enum_member_values:u(18033,1,"Type_0_is_not_assignable_to_type_1_as_required_for_computed_enum_member_values_18033","Type '{0}' is not assignable to type '{1}' as required for computed enum member values."),Specify_the_JSX_fragment_factory_function_to_use_when_targeting_react_JSX_emit_with_jsxFactory_compiler_option_is_specified_e_g_Fragment:u(18034,3,"Specify_the_JSX_fragment_factory_function_to_use_when_targeting_react_JSX_emit_with_jsxFactory_compi_18034","Specify the JSX fragment factory function to use when targeting 'react' JSX emit with 'jsxFactory' compiler option is specified, e.g. 'Fragment'."),Invalid_value_for_jsxFragmentFactory_0_is_not_a_valid_identifier_or_qualified_name:u(18035,1,"Invalid_value_for_jsxFragmentFactory_0_is_not_a_valid_identifier_or_qualified_name_18035","Invalid value for 'jsxFragmentFactory'. '{0}' is not a valid identifier or qualified-name."),Class_decorators_can_t_be_used_with_static_private_identifier_Consider_removing_the_experimental_decorator:u(18036,1,"Class_decorators_can_t_be_used_with_static_private_identifier_Consider_removing_the_experimental_dec_18036","Class decorators can't be used with static private identifier. Consider removing the experimental decorator."),await_expression_cannot_be_used_inside_a_class_static_block:u(18037,1,"await_expression_cannot_be_used_inside_a_class_static_block_18037","'await' expression cannot be used inside a class static block."),for_await_loops_cannot_be_used_inside_a_class_static_block:u(18038,1,"for_await_loops_cannot_be_used_inside_a_class_static_block_18038","'for await' loops cannot be used inside a class static block."),Invalid_use_of_0_It_cannot_be_used_inside_a_class_static_block:u(18039,1,"Invalid_use_of_0_It_cannot_be_used_inside_a_class_static_block_18039","Invalid use of '{0}'. It cannot be used inside a class static block."),A_return_statement_cannot_be_used_inside_a_class_static_block:u(18041,1,"A_return_statement_cannot_be_used_inside_a_class_static_block_18041","A 'return' statement cannot be used inside a class static block."),_0_is_a_type_and_cannot_be_imported_in_JavaScript_files_Use_1_in_a_JSDoc_type_annotation:u(18042,1,"_0_is_a_type_and_cannot_be_imported_in_JavaScript_files_Use_1_in_a_JSDoc_type_annotation_18042","'{0}' is a type and cannot be imported in JavaScript files. Use '{1}' in a JSDoc type annotation."),Types_cannot_appear_in_export_declarations_in_JavaScript_files:u(18043,1,"Types_cannot_appear_in_export_declarations_in_JavaScript_files_18043","Types cannot appear in export declarations in JavaScript files."),_0_is_automatically_exported_here:u(18044,3,"_0_is_automatically_exported_here_18044","'{0}' is automatically exported here."),Properties_with_the_accessor_modifier_are_only_available_when_targeting_ECMAScript_2015_and_higher:u(18045,1,"Properties_with_the_accessor_modifier_are_only_available_when_targeting_ECMAScript_2015_and_higher_18045","Properties with the 'accessor' modifier are only available when targeting ECMAScript 2015 and higher."),_0_is_of_type_unknown:u(18046,1,"_0_is_of_type_unknown_18046","'{0}' is of type 'unknown'."),_0_is_possibly_null:u(18047,1,"_0_is_possibly_null_18047","'{0}' is possibly 'null'."),_0_is_possibly_undefined:u(18048,1,"_0_is_possibly_undefined_18048","'{0}' is possibly 'undefined'."),_0_is_possibly_null_or_undefined:u(18049,1,"_0_is_possibly_null_or_undefined_18049","'{0}' is possibly 'null' or 'undefined'."),The_value_0_cannot_be_used_here:u(18050,1,"The_value_0_cannot_be_used_here_18050","The value '{0}' cannot be used here."),Compiler_option_0_cannot_be_given_an_empty_string:u(18051,1,"Compiler_option_0_cannot_be_given_an_empty_string_18051","Compiler option '{0}' cannot be given an empty string."),Its_type_0_is_not_a_valid_JSX_element_type:u(18053,1,"Its_type_0_is_not_a_valid_JSX_element_type_18053","Its type '{0}' is not a valid JSX element type."),await_using_statements_cannot_be_used_inside_a_class_static_block:u(18054,1,"await_using_statements_cannot_be_used_inside_a_class_static_block_18054","'await using' statements cannot be used inside a class static block."),_0_has_a_string_type_but_must_have_syntactically_recognizable_string_syntax_when_isolatedModules_is_enabled:u(18055,1,"_0_has_a_string_type_but_must_have_syntactically_recognizable_string_syntax_when_isolatedModules_is__18055","'{0}' has a string type, but must have syntactically recognizable string syntax when 'isolatedModules' is enabled."),Enum_member_following_a_non_literal_numeric_member_must_have_an_initializer_when_isolatedModules_is_enabled:u(18056,1,"Enum_member_following_a_non_literal_numeric_member_must_have_an_initializer_when_isolatedModules_is__18056","Enum member following a non-literal numeric member must have an initializer when 'isolatedModules' is enabled."),String_literal_import_and_export_names_are_not_supported_when_the_module_flag_is_set_to_es2015_or_es2020:u(18057,1,"String_literal_import_and_export_names_are_not_supported_when_the_module_flag_is_set_to_es2015_or_es_18057","String literal import and export names are not supported when the '--module' flag is set to 'es2015' or 'es2020'."),Default_imports_are_not_allowed_in_a_deferred_import:u(18058,1,"Default_imports_are_not_allowed_in_a_deferred_import_18058","Default imports are not allowed in a deferred import."),Named_imports_are_not_allowed_in_a_deferred_import:u(18059,1,"Named_imports_are_not_allowed_in_a_deferred_import_18059","Named imports are not allowed in a deferred import."),Deferred_imports_are_only_supported_when_the_module_flag_is_set_to_esnext_or_preserve:u(18060,1,"Deferred_imports_are_only_supported_when_the_module_flag_is_set_to_esnext_or_preserve_18060","Deferred imports are only supported when the '--module' flag is set to 'esnext' or 'preserve'."),_0_is_not_a_valid_meta_property_for_keyword_import_Did_you_mean_meta_or_defer:u(18061,1,"_0_is_not_a_valid_meta_property_for_keyword_import_Did_you_mean_meta_or_defer_18061","'{0}' is not a valid meta-property for keyword 'import'. Did you mean 'meta' or 'defer'?")};function Zo(e){return e>=80}function det(e){return e===32||Zo(e)}var EJ={abstract:128,accessor:129,any:133,as:130,asserts:131,assert:132,bigint:163,boolean:136,break:83,case:84,catch:85,class:86,continue:88,const:87,constructor:137,debugger:89,declare:138,default:90,defer:166,delete:91,do:92,else:93,enum:94,export:95,extends:96,false:97,finally:98,for:99,from:161,function:100,get:139,if:101,implements:119,import:102,in:103,infer:140,instanceof:104,interface:120,intrinsic:141,is:142,keyof:143,let:121,module:144,namespace:145,never:146,new:105,null:106,number:150,object:151,package:122,private:123,protected:124,public:125,override:164,out:147,readonly:148,require:149,global:162,return:107,satisfies:152,set:153,static:126,string:154,super:108,switch:109,symbol:155,this:110,throw:111,true:112,try:113,type:156,typeof:114,undefined:157,unique:158,unknown:159,using:160,var:115,void:116,while:117,with:118,yield:127,async:134,await:135,of:165},_et=new Map(Object.entries(EJ)),che=new Map(Object.entries({...EJ,"{":19,"}":20,"(":21,")":22,"[":23,"]":24,".":25,"...":26,";":27,",":28,"<":30,">":32,"<=":33,">=":34,"==":35,"!=":36,"===":37,"!==":38,"=>":39,"+":40,"-":41,"**":43,"*":42,"/":44,"%":45,"++":46,"--":47,"<<":48,">":49,">>>":50,"&":51,"|":52,"^":53,"!":54,"~":55,"&&":56,"||":57,"?":58,"??":61,"?.":29,":":59,"=":64,"+=":65,"-=":66,"*=":67,"**=":68,"/=":69,"%=":70,"<<=":71,">>=":72,">>>=":73,"&=":74,"|=":75,"^=":79,"||=":76,"&&=":77,"??=":78,"@":60,"#":63,"`":62})),lhe=new Map([[100,1],[103,2],[105,4],[109,8],[115,16],[117,32],[118,64],[121,128]]),fet=new Map([[1,kD.RegularExpressionFlagsHasIndices],[16,kD.RegularExpressionFlagsDotAll],[32,kD.RegularExpressionFlagsUnicode],[64,kD.RegularExpressionFlagsUnicodeSets],[128,kD.RegularExpressionFlagsSticky]]),met=[170,170,181,181,186,186,192,214,216,246,248,705,710,721,736,740,748,748,750,750,880,884,886,887,890,893,902,902,904,906,908,908,910,929,931,1013,1015,1153,1162,1319,1329,1366,1369,1369,1377,1415,1488,1514,1520,1522,1568,1610,1646,1647,1649,1747,1749,1749,1765,1766,1774,1775,1786,1788,1791,1791,1808,1808,1810,1839,1869,1957,1969,1969,1994,2026,2036,2037,2042,2042,2048,2069,2074,2074,2084,2084,2088,2088,2112,2136,2208,2208,2210,2220,2308,2361,2365,2365,2384,2384,2392,2401,2417,2423,2425,2431,2437,2444,2447,2448,2451,2472,2474,2480,2482,2482,2486,2489,2493,2493,2510,2510,2524,2525,2527,2529,2544,2545,2565,2570,2575,2576,2579,2600,2602,2608,2610,2611,2613,2614,2616,2617,2649,2652,2654,2654,2674,2676,2693,2701,2703,2705,2707,2728,2730,2736,2738,2739,2741,2745,2749,2749,2768,2768,2784,2785,2821,2828,2831,2832,2835,2856,2858,2864,2866,2867,2869,2873,2877,2877,2908,2909,2911,2913,2929,2929,2947,2947,2949,2954,2958,2960,2962,2965,2969,2970,2972,2972,2974,2975,2979,2980,2984,2986,2990,3001,3024,3024,3077,3084,3086,3088,3090,3112,3114,3123,3125,3129,3133,3133,3160,3161,3168,3169,3205,3212,3214,3216,3218,3240,3242,3251,3253,3257,3261,3261,3294,3294,3296,3297,3313,3314,3333,3340,3342,3344,3346,3386,3389,3389,3406,3406,3424,3425,3450,3455,3461,3478,3482,3505,3507,3515,3517,3517,3520,3526,3585,3632,3634,3635,3648,3654,3713,3714,3716,3716,3719,3720,3722,3722,3725,3725,3732,3735,3737,3743,3745,3747,3749,3749,3751,3751,3754,3755,3757,3760,3762,3763,3773,3773,3776,3780,3782,3782,3804,3807,3840,3840,3904,3911,3913,3948,3976,3980,4096,4138,4159,4159,4176,4181,4186,4189,4193,4193,4197,4198,4206,4208,4213,4225,4238,4238,4256,4293,4295,4295,4301,4301,4304,4346,4348,4680,4682,4685,4688,4694,4696,4696,4698,4701,4704,4744,4746,4749,4752,4784,4786,4789,4792,4798,4800,4800,4802,4805,4808,4822,4824,4880,4882,4885,4888,4954,4992,5007,5024,5108,5121,5740,5743,5759,5761,5786,5792,5866,5870,5872,5888,5900,5902,5905,5920,5937,5952,5969,5984,5996,5998,6e3,6016,6067,6103,6103,6108,6108,6176,6263,6272,6312,6314,6314,6320,6389,6400,6428,6480,6509,6512,6516,6528,6571,6593,6599,6656,6678,6688,6740,6823,6823,6917,6963,6981,6987,7043,7072,7086,7087,7098,7141,7168,7203,7245,7247,7258,7293,7401,7404,7406,7409,7413,7414,7424,7615,7680,7957,7960,7965,7968,8005,8008,8013,8016,8023,8025,8025,8027,8027,8029,8029,8031,8061,8064,8116,8118,8124,8126,8126,8130,8132,8134,8140,8144,8147,8150,8155,8160,8172,8178,8180,8182,8188,8305,8305,8319,8319,8336,8348,8450,8450,8455,8455,8458,8467,8469,8469,8473,8477,8484,8484,8486,8486,8488,8488,8490,8493,8495,8505,8508,8511,8517,8521,8526,8526,8544,8584,11264,11310,11312,11358,11360,11492,11499,11502,11506,11507,11520,11557,11559,11559,11565,11565,11568,11623,11631,11631,11648,11670,11680,11686,11688,11694,11696,11702,11704,11710,11712,11718,11720,11726,11728,11734,11736,11742,11823,11823,12293,12295,12321,12329,12337,12341,12344,12348,12353,12438,12445,12447,12449,12538,12540,12543,12549,12589,12593,12686,12704,12730,12784,12799,13312,19893,19968,40908,40960,42124,42192,42237,42240,42508,42512,42527,42538,42539,42560,42606,42623,42647,42656,42735,42775,42783,42786,42888,42891,42894,42896,42899,42912,42922,43e3,43009,43011,43013,43015,43018,43020,43042,43072,43123,43138,43187,43250,43255,43259,43259,43274,43301,43312,43334,43360,43388,43396,43442,43471,43471,43520,43560,43584,43586,43588,43595,43616,43638,43642,43642,43648,43695,43697,43697,43701,43702,43705,43709,43712,43712,43714,43714,43739,43741,43744,43754,43762,43764,43777,43782,43785,43790,43793,43798,43808,43814,43816,43822,43968,44002,44032,55203,55216,55238,55243,55291,63744,64109,64112,64217,64256,64262,64275,64279,64285,64285,64287,64296,64298,64310,64312,64316,64318,64318,64320,64321,64323,64324,64326,64433,64467,64829,64848,64911,64914,64967,65008,65019,65136,65140,65142,65276,65313,65338,65345,65370,65382,65470,65474,65479,65482,65487,65490,65495,65498,65500],het=[170,170,181,181,186,186,192,214,216,246,248,705,710,721,736,740,748,748,750,750,768,884,886,887,890,893,902,902,904,906,908,908,910,929,931,1013,1015,1153,1155,1159,1162,1319,1329,1366,1369,1369,1377,1415,1425,1469,1471,1471,1473,1474,1476,1477,1479,1479,1488,1514,1520,1522,1552,1562,1568,1641,1646,1747,1749,1756,1759,1768,1770,1788,1791,1791,1808,1866,1869,1969,1984,2037,2042,2042,2048,2093,2112,2139,2208,2208,2210,2220,2276,2302,2304,2403,2406,2415,2417,2423,2425,2431,2433,2435,2437,2444,2447,2448,2451,2472,2474,2480,2482,2482,2486,2489,2492,2500,2503,2504,2507,2510,2519,2519,2524,2525,2527,2531,2534,2545,2561,2563,2565,2570,2575,2576,2579,2600,2602,2608,2610,2611,2613,2614,2616,2617,2620,2620,2622,2626,2631,2632,2635,2637,2641,2641,2649,2652,2654,2654,2662,2677,2689,2691,2693,2701,2703,2705,2707,2728,2730,2736,2738,2739,2741,2745,2748,2757,2759,2761,2763,2765,2768,2768,2784,2787,2790,2799,2817,2819,2821,2828,2831,2832,2835,2856,2858,2864,2866,2867,2869,2873,2876,2884,2887,2888,2891,2893,2902,2903,2908,2909,2911,2915,2918,2927,2929,2929,2946,2947,2949,2954,2958,2960,2962,2965,2969,2970,2972,2972,2974,2975,2979,2980,2984,2986,2990,3001,3006,3010,3014,3016,3018,3021,3024,3024,3031,3031,3046,3055,3073,3075,3077,3084,3086,3088,3090,3112,3114,3123,3125,3129,3133,3140,3142,3144,3146,3149,3157,3158,3160,3161,3168,3171,3174,3183,3202,3203,3205,3212,3214,3216,3218,3240,3242,3251,3253,3257,3260,3268,3270,3272,3274,3277,3285,3286,3294,3294,3296,3299,3302,3311,3313,3314,3330,3331,3333,3340,3342,3344,3346,3386,3389,3396,3398,3400,3402,3406,3415,3415,3424,3427,3430,3439,3450,3455,3458,3459,3461,3478,3482,3505,3507,3515,3517,3517,3520,3526,3530,3530,3535,3540,3542,3542,3544,3551,3570,3571,3585,3642,3648,3662,3664,3673,3713,3714,3716,3716,3719,3720,3722,3722,3725,3725,3732,3735,3737,3743,3745,3747,3749,3749,3751,3751,3754,3755,3757,3769,3771,3773,3776,3780,3782,3782,3784,3789,3792,3801,3804,3807,3840,3840,3864,3865,3872,3881,3893,3893,3895,3895,3897,3897,3902,3911,3913,3948,3953,3972,3974,3991,3993,4028,4038,4038,4096,4169,4176,4253,4256,4293,4295,4295,4301,4301,4304,4346,4348,4680,4682,4685,4688,4694,4696,4696,4698,4701,4704,4744,4746,4749,4752,4784,4786,4789,4792,4798,4800,4800,4802,4805,4808,4822,4824,4880,4882,4885,4888,4954,4957,4959,4992,5007,5024,5108,5121,5740,5743,5759,5761,5786,5792,5866,5870,5872,5888,5900,5902,5908,5920,5940,5952,5971,5984,5996,5998,6e3,6002,6003,6016,6099,6103,6103,6108,6109,6112,6121,6155,6157,6160,6169,6176,6263,6272,6314,6320,6389,6400,6428,6432,6443,6448,6459,6470,6509,6512,6516,6528,6571,6576,6601,6608,6617,6656,6683,6688,6750,6752,6780,6783,6793,6800,6809,6823,6823,6912,6987,6992,7001,7019,7027,7040,7155,7168,7223,7232,7241,7245,7293,7376,7378,7380,7414,7424,7654,7676,7957,7960,7965,7968,8005,8008,8013,8016,8023,8025,8025,8027,8027,8029,8029,8031,8061,8064,8116,8118,8124,8126,8126,8130,8132,8134,8140,8144,8147,8150,8155,8160,8172,8178,8180,8182,8188,8204,8205,8255,8256,8276,8276,8305,8305,8319,8319,8336,8348,8400,8412,8417,8417,8421,8432,8450,8450,8455,8455,8458,8467,8469,8469,8473,8477,8484,8484,8486,8486,8488,8488,8490,8493,8495,8505,8508,8511,8517,8521,8526,8526,8544,8584,11264,11310,11312,11358,11360,11492,11499,11507,11520,11557,11559,11559,11565,11565,11568,11623,11631,11631,11647,11670,11680,11686,11688,11694,11696,11702,11704,11710,11712,11718,11720,11726,11728,11734,11736,11742,11744,11775,11823,11823,12293,12295,12321,12335,12337,12341,12344,12348,12353,12438,12441,12442,12445,12447,12449,12538,12540,12543,12549,12589,12593,12686,12704,12730,12784,12799,13312,19893,19968,40908,40960,42124,42192,42237,42240,42508,42512,42539,42560,42607,42612,42621,42623,42647,42655,42737,42775,42783,42786,42888,42891,42894,42896,42899,42912,42922,43e3,43047,43072,43123,43136,43204,43216,43225,43232,43255,43259,43259,43264,43309,43312,43347,43360,43388,43392,43456,43471,43481,43520,43574,43584,43597,43600,43609,43616,43638,43642,43643,43648,43714,43739,43741,43744,43759,43762,43766,43777,43782,43785,43790,43793,43798,43808,43814,43816,43822,43968,44010,44012,44013,44016,44025,44032,55203,55216,55238,55243,55291,63744,64109,64112,64217,64256,64262,64275,64279,64285,64296,64298,64310,64312,64316,64318,64318,64320,64321,64323,64324,64326,64433,64467,64829,64848,64911,64914,64967,65008,65019,65024,65039,65056,65062,65075,65076,65101,65103,65136,65140,65142,65276,65296,65305,65313,65338,65343,65343,65345,65370,65382,65470,65474,65479,65482,65487,65490,65495,65498,65500],yet=[65,90,97,122,170,170,181,181,186,186,192,214,216,246,248,705,710,721,736,740,748,748,750,750,880,884,886,887,890,893,895,895,902,902,904,906,908,908,910,929,931,1013,1015,1153,1162,1327,1329,1366,1369,1369,1376,1416,1488,1514,1519,1522,1568,1610,1646,1647,1649,1747,1749,1749,1765,1766,1774,1775,1786,1788,1791,1791,1808,1808,1810,1839,1869,1957,1969,1969,1994,2026,2036,2037,2042,2042,2048,2069,2074,2074,2084,2084,2088,2088,2112,2136,2144,2154,2160,2183,2185,2190,2208,2249,2308,2361,2365,2365,2384,2384,2392,2401,2417,2432,2437,2444,2447,2448,2451,2472,2474,2480,2482,2482,2486,2489,2493,2493,2510,2510,2524,2525,2527,2529,2544,2545,2556,2556,2565,2570,2575,2576,2579,2600,2602,2608,2610,2611,2613,2614,2616,2617,2649,2652,2654,2654,2674,2676,2693,2701,2703,2705,2707,2728,2730,2736,2738,2739,2741,2745,2749,2749,2768,2768,2784,2785,2809,2809,2821,2828,2831,2832,2835,2856,2858,2864,2866,2867,2869,2873,2877,2877,2908,2909,2911,2913,2929,2929,2947,2947,2949,2954,2958,2960,2962,2965,2969,2970,2972,2972,2974,2975,2979,2980,2984,2986,2990,3001,3024,3024,3077,3084,3086,3088,3090,3112,3114,3129,3133,3133,3160,3162,3165,3165,3168,3169,3200,3200,3205,3212,3214,3216,3218,3240,3242,3251,3253,3257,3261,3261,3293,3294,3296,3297,3313,3314,3332,3340,3342,3344,3346,3386,3389,3389,3406,3406,3412,3414,3423,3425,3450,3455,3461,3478,3482,3505,3507,3515,3517,3517,3520,3526,3585,3632,3634,3635,3648,3654,3713,3714,3716,3716,3718,3722,3724,3747,3749,3749,3751,3760,3762,3763,3773,3773,3776,3780,3782,3782,3804,3807,3840,3840,3904,3911,3913,3948,3976,3980,4096,4138,4159,4159,4176,4181,4186,4189,4193,4193,4197,4198,4206,4208,4213,4225,4238,4238,4256,4293,4295,4295,4301,4301,4304,4346,4348,4680,4682,4685,4688,4694,4696,4696,4698,4701,4704,4744,4746,4749,4752,4784,4786,4789,4792,4798,4800,4800,4802,4805,4808,4822,4824,4880,4882,4885,4888,4954,4992,5007,5024,5109,5112,5117,5121,5740,5743,5759,5761,5786,5792,5866,5870,5880,5888,5905,5919,5937,5952,5969,5984,5996,5998,6e3,6016,6067,6103,6103,6108,6108,6176,6264,6272,6312,6314,6314,6320,6389,6400,6430,6480,6509,6512,6516,6528,6571,6576,6601,6656,6678,6688,6740,6823,6823,6917,6963,6981,6988,7043,7072,7086,7087,7098,7141,7168,7203,7245,7247,7258,7293,7296,7304,7312,7354,7357,7359,7401,7404,7406,7411,7413,7414,7418,7418,7424,7615,7680,7957,7960,7965,7968,8005,8008,8013,8016,8023,8025,8025,8027,8027,8029,8029,8031,8061,8064,8116,8118,8124,8126,8126,8130,8132,8134,8140,8144,8147,8150,8155,8160,8172,8178,8180,8182,8188,8305,8305,8319,8319,8336,8348,8450,8450,8455,8455,8458,8467,8469,8469,8472,8477,8484,8484,8486,8486,8488,8488,8490,8505,8508,8511,8517,8521,8526,8526,8544,8584,11264,11492,11499,11502,11506,11507,11520,11557,11559,11559,11565,11565,11568,11623,11631,11631,11648,11670,11680,11686,11688,11694,11696,11702,11704,11710,11712,11718,11720,11726,11728,11734,11736,11742,12293,12295,12321,12329,12337,12341,12344,12348,12353,12438,12443,12447,12449,12538,12540,12543,12549,12591,12593,12686,12704,12735,12784,12799,13312,19903,19968,42124,42192,42237,42240,42508,42512,42527,42538,42539,42560,42606,42623,42653,42656,42735,42775,42783,42786,42888,42891,42954,42960,42961,42963,42963,42965,42969,42994,43009,43011,43013,43015,43018,43020,43042,43072,43123,43138,43187,43250,43255,43259,43259,43261,43262,43274,43301,43312,43334,43360,43388,43396,43442,43471,43471,43488,43492,43494,43503,43514,43518,43520,43560,43584,43586,43588,43595,43616,43638,43642,43642,43646,43695,43697,43697,43701,43702,43705,43709,43712,43712,43714,43714,43739,43741,43744,43754,43762,43764,43777,43782,43785,43790,43793,43798,43808,43814,43816,43822,43824,43866,43868,43881,43888,44002,44032,55203,55216,55238,55243,55291,63744,64109,64112,64217,64256,64262,64275,64279,64285,64285,64287,64296,64298,64310,64312,64316,64318,64318,64320,64321,64323,64324,64326,64433,64467,64829,64848,64911,64914,64967,65008,65019,65136,65140,65142,65276,65313,65338,65345,65370,65382,65470,65474,65479,65482,65487,65490,65495,65498,65500,65536,65547,65549,65574,65576,65594,65596,65597,65599,65613,65616,65629,65664,65786,65856,65908,66176,66204,66208,66256,66304,66335,66349,66378,66384,66421,66432,66461,66464,66499,66504,66511,66513,66517,66560,66717,66736,66771,66776,66811,66816,66855,66864,66915,66928,66938,66940,66954,66956,66962,66964,66965,66967,66977,66979,66993,66995,67001,67003,67004,67072,67382,67392,67413,67424,67431,67456,67461,67463,67504,67506,67514,67584,67589,67592,67592,67594,67637,67639,67640,67644,67644,67647,67669,67680,67702,67712,67742,67808,67826,67828,67829,67840,67861,67872,67897,67968,68023,68030,68031,68096,68096,68112,68115,68117,68119,68121,68149,68192,68220,68224,68252,68288,68295,68297,68324,68352,68405,68416,68437,68448,68466,68480,68497,68608,68680,68736,68786,68800,68850,68864,68899,69248,69289,69296,69297,69376,69404,69415,69415,69424,69445,69488,69505,69552,69572,69600,69622,69635,69687,69745,69746,69749,69749,69763,69807,69840,69864,69891,69926,69956,69956,69959,69959,69968,70002,70006,70006,70019,70066,70081,70084,70106,70106,70108,70108,70144,70161,70163,70187,70207,70208,70272,70278,70280,70280,70282,70285,70287,70301,70303,70312,70320,70366,70405,70412,70415,70416,70419,70440,70442,70448,70450,70451,70453,70457,70461,70461,70480,70480,70493,70497,70656,70708,70727,70730,70751,70753,70784,70831,70852,70853,70855,70855,71040,71086,71128,71131,71168,71215,71236,71236,71296,71338,71352,71352,71424,71450,71488,71494,71680,71723,71840,71903,71935,71942,71945,71945,71948,71955,71957,71958,71960,71983,71999,71999,72001,72001,72096,72103,72106,72144,72161,72161,72163,72163,72192,72192,72203,72242,72250,72250,72272,72272,72284,72329,72349,72349,72368,72440,72704,72712,72714,72750,72768,72768,72818,72847,72960,72966,72968,72969,72971,73008,73030,73030,73056,73061,73063,73064,73066,73097,73112,73112,73440,73458,73474,73474,73476,73488,73490,73523,73648,73648,73728,74649,74752,74862,74880,75075,77712,77808,77824,78895,78913,78918,82944,83526,92160,92728,92736,92766,92784,92862,92880,92909,92928,92975,92992,92995,93027,93047,93053,93071,93760,93823,93952,94026,94032,94032,94099,94111,94176,94177,94179,94179,94208,100343,100352,101589,101632,101640,110576,110579,110581,110587,110589,110590,110592,110882,110898,110898,110928,110930,110933,110933,110948,110951,110960,111355,113664,113770,113776,113788,113792,113800,113808,113817,119808,119892,119894,119964,119966,119967,119970,119970,119973,119974,119977,119980,119982,119993,119995,119995,119997,120003,120005,120069,120071,120074,120077,120084,120086,120092,120094,120121,120123,120126,120128,120132,120134,120134,120138,120144,120146,120485,120488,120512,120514,120538,120540,120570,120572,120596,120598,120628,120630,120654,120656,120686,120688,120712,120714,120744,120746,120770,120772,120779,122624,122654,122661,122666,122928,122989,123136,123180,123191,123197,123214,123214,123536,123565,123584,123627,124112,124139,124896,124902,124904,124907,124909,124910,124912,124926,124928,125124,125184,125251,125259,125259,126464,126467,126469,126495,126497,126498,126500,126500,126503,126503,126505,126514,126516,126519,126521,126521,126523,126523,126530,126530,126535,126535,126537,126537,126539,126539,126541,126543,126545,126546,126548,126548,126551,126551,126553,126553,126555,126555,126557,126557,126559,126559,126561,126562,126564,126564,126567,126570,126572,126578,126580,126583,126585,126588,126590,126590,126592,126601,126603,126619,126625,126627,126629,126633,126635,126651,131072,173791,173824,177977,177984,178205,178208,183969,183984,191456,191472,192093,194560,195101,196608,201546,201552,205743],get=[48,57,65,90,95,95,97,122,170,170,181,181,183,183,186,186,192,214,216,246,248,705,710,721,736,740,748,748,750,750,768,884,886,887,890,893,895,895,902,906,908,908,910,929,931,1013,1015,1153,1155,1159,1162,1327,1329,1366,1369,1369,1376,1416,1425,1469,1471,1471,1473,1474,1476,1477,1479,1479,1488,1514,1519,1522,1552,1562,1568,1641,1646,1747,1749,1756,1759,1768,1770,1788,1791,1791,1808,1866,1869,1969,1984,2037,2042,2042,2045,2045,2048,2093,2112,2139,2144,2154,2160,2183,2185,2190,2200,2273,2275,2403,2406,2415,2417,2435,2437,2444,2447,2448,2451,2472,2474,2480,2482,2482,2486,2489,2492,2500,2503,2504,2507,2510,2519,2519,2524,2525,2527,2531,2534,2545,2556,2556,2558,2558,2561,2563,2565,2570,2575,2576,2579,2600,2602,2608,2610,2611,2613,2614,2616,2617,2620,2620,2622,2626,2631,2632,2635,2637,2641,2641,2649,2652,2654,2654,2662,2677,2689,2691,2693,2701,2703,2705,2707,2728,2730,2736,2738,2739,2741,2745,2748,2757,2759,2761,2763,2765,2768,2768,2784,2787,2790,2799,2809,2815,2817,2819,2821,2828,2831,2832,2835,2856,2858,2864,2866,2867,2869,2873,2876,2884,2887,2888,2891,2893,2901,2903,2908,2909,2911,2915,2918,2927,2929,2929,2946,2947,2949,2954,2958,2960,2962,2965,2969,2970,2972,2972,2974,2975,2979,2980,2984,2986,2990,3001,3006,3010,3014,3016,3018,3021,3024,3024,3031,3031,3046,3055,3072,3084,3086,3088,3090,3112,3114,3129,3132,3140,3142,3144,3146,3149,3157,3158,3160,3162,3165,3165,3168,3171,3174,3183,3200,3203,3205,3212,3214,3216,3218,3240,3242,3251,3253,3257,3260,3268,3270,3272,3274,3277,3285,3286,3293,3294,3296,3299,3302,3311,3313,3315,3328,3340,3342,3344,3346,3396,3398,3400,3402,3406,3412,3415,3423,3427,3430,3439,3450,3455,3457,3459,3461,3478,3482,3505,3507,3515,3517,3517,3520,3526,3530,3530,3535,3540,3542,3542,3544,3551,3558,3567,3570,3571,3585,3642,3648,3662,3664,3673,3713,3714,3716,3716,3718,3722,3724,3747,3749,3749,3751,3773,3776,3780,3782,3782,3784,3790,3792,3801,3804,3807,3840,3840,3864,3865,3872,3881,3893,3893,3895,3895,3897,3897,3902,3911,3913,3948,3953,3972,3974,3991,3993,4028,4038,4038,4096,4169,4176,4253,4256,4293,4295,4295,4301,4301,4304,4346,4348,4680,4682,4685,4688,4694,4696,4696,4698,4701,4704,4744,4746,4749,4752,4784,4786,4789,4792,4798,4800,4800,4802,4805,4808,4822,4824,4880,4882,4885,4888,4954,4957,4959,4969,4977,4992,5007,5024,5109,5112,5117,5121,5740,5743,5759,5761,5786,5792,5866,5870,5880,5888,5909,5919,5940,5952,5971,5984,5996,5998,6e3,6002,6003,6016,6099,6103,6103,6108,6109,6112,6121,6155,6157,6159,6169,6176,6264,6272,6314,6320,6389,6400,6430,6432,6443,6448,6459,6470,6509,6512,6516,6528,6571,6576,6601,6608,6618,6656,6683,6688,6750,6752,6780,6783,6793,6800,6809,6823,6823,6832,6845,6847,6862,6912,6988,6992,7001,7019,7027,7040,7155,7168,7223,7232,7241,7245,7293,7296,7304,7312,7354,7357,7359,7376,7378,7380,7418,7424,7957,7960,7965,7968,8005,8008,8013,8016,8023,8025,8025,8027,8027,8029,8029,8031,8061,8064,8116,8118,8124,8126,8126,8130,8132,8134,8140,8144,8147,8150,8155,8160,8172,8178,8180,8182,8188,8204,8205,8255,8256,8276,8276,8305,8305,8319,8319,8336,8348,8400,8412,8417,8417,8421,8432,8450,8450,8455,8455,8458,8467,8469,8469,8472,8477,8484,8484,8486,8486,8488,8488,8490,8505,8508,8511,8517,8521,8526,8526,8544,8584,11264,11492,11499,11507,11520,11557,11559,11559,11565,11565,11568,11623,11631,11631,11647,11670,11680,11686,11688,11694,11696,11702,11704,11710,11712,11718,11720,11726,11728,11734,11736,11742,11744,11775,12293,12295,12321,12335,12337,12341,12344,12348,12353,12438,12441,12447,12449,12543,12549,12591,12593,12686,12704,12735,12784,12799,13312,19903,19968,42124,42192,42237,42240,42508,42512,42539,42560,42607,42612,42621,42623,42737,42775,42783,42786,42888,42891,42954,42960,42961,42963,42963,42965,42969,42994,43047,43052,43052,43072,43123,43136,43205,43216,43225,43232,43255,43259,43259,43261,43309,43312,43347,43360,43388,43392,43456,43471,43481,43488,43518,43520,43574,43584,43597,43600,43609,43616,43638,43642,43714,43739,43741,43744,43759,43762,43766,43777,43782,43785,43790,43793,43798,43808,43814,43816,43822,43824,43866,43868,43881,43888,44010,44012,44013,44016,44025,44032,55203,55216,55238,55243,55291,63744,64109,64112,64217,64256,64262,64275,64279,64285,64296,64298,64310,64312,64316,64318,64318,64320,64321,64323,64324,64326,64433,64467,64829,64848,64911,64914,64967,65008,65019,65024,65039,65056,65071,65075,65076,65101,65103,65136,65140,65142,65276,65296,65305,65313,65338,65343,65343,65345,65370,65381,65470,65474,65479,65482,65487,65490,65495,65498,65500,65536,65547,65549,65574,65576,65594,65596,65597,65599,65613,65616,65629,65664,65786,65856,65908,66045,66045,66176,66204,66208,66256,66272,66272,66304,66335,66349,66378,66384,66426,66432,66461,66464,66499,66504,66511,66513,66517,66560,66717,66720,66729,66736,66771,66776,66811,66816,66855,66864,66915,66928,66938,66940,66954,66956,66962,66964,66965,66967,66977,66979,66993,66995,67001,67003,67004,67072,67382,67392,67413,67424,67431,67456,67461,67463,67504,67506,67514,67584,67589,67592,67592,67594,67637,67639,67640,67644,67644,67647,67669,67680,67702,67712,67742,67808,67826,67828,67829,67840,67861,67872,67897,67968,68023,68030,68031,68096,68099,68101,68102,68108,68115,68117,68119,68121,68149,68152,68154,68159,68159,68192,68220,68224,68252,68288,68295,68297,68326,68352,68405,68416,68437,68448,68466,68480,68497,68608,68680,68736,68786,68800,68850,68864,68903,68912,68921,69248,69289,69291,69292,69296,69297,69373,69404,69415,69415,69424,69456,69488,69509,69552,69572,69600,69622,69632,69702,69734,69749,69759,69818,69826,69826,69840,69864,69872,69881,69888,69940,69942,69951,69956,69959,69968,70003,70006,70006,70016,70084,70089,70092,70094,70106,70108,70108,70144,70161,70163,70199,70206,70209,70272,70278,70280,70280,70282,70285,70287,70301,70303,70312,70320,70378,70384,70393,70400,70403,70405,70412,70415,70416,70419,70440,70442,70448,70450,70451,70453,70457,70459,70468,70471,70472,70475,70477,70480,70480,70487,70487,70493,70499,70502,70508,70512,70516,70656,70730,70736,70745,70750,70753,70784,70853,70855,70855,70864,70873,71040,71093,71096,71104,71128,71133,71168,71232,71236,71236,71248,71257,71296,71352,71360,71369,71424,71450,71453,71467,71472,71481,71488,71494,71680,71738,71840,71913,71935,71942,71945,71945,71948,71955,71957,71958,71960,71989,71991,71992,71995,72003,72016,72025,72096,72103,72106,72151,72154,72161,72163,72164,72192,72254,72263,72263,72272,72345,72349,72349,72368,72440,72704,72712,72714,72758,72760,72768,72784,72793,72818,72847,72850,72871,72873,72886,72960,72966,72968,72969,72971,73014,73018,73018,73020,73021,73023,73031,73040,73049,73056,73061,73063,73064,73066,73102,73104,73105,73107,73112,73120,73129,73440,73462,73472,73488,73490,73530,73534,73538,73552,73561,73648,73648,73728,74649,74752,74862,74880,75075,77712,77808,77824,78895,78912,78933,82944,83526,92160,92728,92736,92766,92768,92777,92784,92862,92864,92873,92880,92909,92912,92916,92928,92982,92992,92995,93008,93017,93027,93047,93053,93071,93760,93823,93952,94026,94031,94087,94095,94111,94176,94177,94179,94180,94192,94193,94208,100343,100352,101589,101632,101640,110576,110579,110581,110587,110589,110590,110592,110882,110898,110898,110928,110930,110933,110933,110948,110951,110960,111355,113664,113770,113776,113788,113792,113800,113808,113817,113821,113822,118528,118573,118576,118598,119141,119145,119149,119154,119163,119170,119173,119179,119210,119213,119362,119364,119808,119892,119894,119964,119966,119967,119970,119970,119973,119974,119977,119980,119982,119993,119995,119995,119997,120003,120005,120069,120071,120074,120077,120084,120086,120092,120094,120121,120123,120126,120128,120132,120134,120134,120138,120144,120146,120485,120488,120512,120514,120538,120540,120570,120572,120596,120598,120628,120630,120654,120656,120686,120688,120712,120714,120744,120746,120770,120772,120779,120782,120831,121344,121398,121403,121452,121461,121461,121476,121476,121499,121503,121505,121519,122624,122654,122661,122666,122880,122886,122888,122904,122907,122913,122915,122916,122918,122922,122928,122989,123023,123023,123136,123180,123184,123197,123200,123209,123214,123214,123536,123566,123584,123641,124112,124153,124896,124902,124904,124907,124909,124910,124912,124926,124928,125124,125136,125142,125184,125259,125264,125273,126464,126467,126469,126495,126497,126498,126500,126500,126503,126503,126505,126514,126516,126519,126521,126521,126523,126523,126530,126530,126535,126535,126537,126537,126539,126539,126541,126543,126545,126546,126548,126548,126551,126551,126553,126553,126555,126555,126557,126557,126559,126559,126561,126562,126564,126564,126567,126570,126572,126578,126580,126583,126585,126588,126590,126590,126592,126601,126603,126619,126625,126627,126629,126633,126635,126651,130032,130041,131072,173791,173824,177977,177984,178205,178208,183969,183984,191456,191472,192093,194560,195101,196608,201546,201552,205743,917760,917999],vet=/^\/\/\/?\s*@(ts-expect-error|ts-ignore)/,bet=/^(?:\/|\*)*\s*@(ts-expect-error|ts-ignore)/,xet=/@(?:see|link)/i;function hO(e,t){if(e=2?hO(e,yet):hO(e,met)}function Tet(e,t){return t>=2?hO(e,get):hO(e,het)}function uhe(e){let t=[];return e.forEach((r,n)=>{t[r]=n}),t}var Det=uhe(che);function io(e){return Det[e]}function phe(e){return che.get(e)}var ljt=uhe(lhe);function $fe(e){return lhe.get(e)}function dhe(e){let t=[],r=0,n=0;for(;r127&&cc(o)&&(t.push(n),n=r);break}}return t.push(n),t}function Aet(e,t,r,n,o){(t<0||t>=e.length)&&(o?t=t<0?0:t>=e.length?e.length-1:t:pe.fail(`Bad line number. Line: ${t}, lineStarts.length: ${e.length} , line map is correct? ${n!==void 0?PYe(e,dhe(n)):"unknown"}`));let i=e[t]+r;return o?i>e[t+1]?e[t+1]:typeof n=="string"&&i>n.length?n.length:i:(t=8192&&e<=8203||e===8239||e===8287||e===12288||e===65279}function cc(e){return e===10||e===13||e===8232||e===8233}function nh(e){return e>=48&&e<=57}function Oz(e){return nh(e)||e>=65&&e<=70||e>=97&&e<=102}function TJ(e){return e>=65&&e<=90||e>=97&&e<=122}function fhe(e){return TJ(e)||nh(e)||e===95}function Nz(e){return e>=48&&e<=55}function dd(e,t,r,n,o){if(QD(t))return t;let i=!1;for(;;){let a=e.charCodeAt(t);switch(a){case 13:e.charCodeAt(t+1)===10&&t++;case 10:if(t++,r)return t;i=!!o;continue;case 9:case 11:case 12:case 32:t++;continue;case 47:if(n)break;if(e.charCodeAt(t+1)===47){for(t+=2;t127&&y1(a)){t++;continue}break}return t}}var cO=7;function Lg(e,t){if(pe.assert(t>=0),t===0||cc(e.charCodeAt(t-1))){let r=e.charCodeAt(t);if(t+cO=0&&r127&&y1(g)){f&&cc(g)&&(d=!0),r++;continue}break e}}return f&&(y=o(s,c,p,d,i,y)),y}function ket(e,t,r,n){return DO(!1,e,t,!1,r,n)}function Cet(e,t,r,n){return DO(!1,e,t,!0,r,n)}function Pet(e,t,r,n,o){return DO(!0,e,t,!1,r,n,o)}function Oet(e,t,r,n,o){return DO(!0,e,t,!0,r,n,o)}function yhe(e,t,r,n,o,i=[]){return i.push({kind:r,pos:e,end:t,hasTrailingNewLine:n}),i}function Qz(e,t){return Pet(e,t,yhe,void 0,void 0)}function Net(e,t){return Oet(e,t,yhe,void 0,void 0)}function ghe(e){let t=DJ.exec(e);if(t)return t[0]}function qu(e,t){return TJ(e)||e===36||e===95||e>127&&Eet(e,t)}function W_(e,t,r){return fhe(e)||e===36||(r===1?e===45||e===58:!1)||e>127&&Tet(e,t)}function Fet(e,t,r){let n=$g(e,0);if(!qu(n,t))return!1;for(let o=Yi(n);od,getStartPos:()=>d,getTokenEnd:()=>c,getTextPos:()=>c,getToken:()=>m,getTokenStart:()=>f,getTokenPos:()=>f,getTokenText:()=>s.substring(f,c),getTokenValue:()=>y,hasUnicodeEscape:()=>(g&1024)!==0,hasExtendedUnicodeEscape:()=>(g&8)!==0,hasPrecedingLineBreak:()=>(g&1)!==0,hasPrecedingJSDocComment:()=>(g&2)!==0,hasPrecedingJSDocLeadingAsterisks:()=>(g&32768)!==0,isIdentifier:()=>m===80||m>118,isReservedWord:()=>m>=83&&m<=118,isUnterminated:()=>(g&4)!==0,getCommentDirectives:()=>S,getNumericLiteralFlags:()=>g&25584,getTokenFlags:()=>g,reScanGreaterToken:Ct,reScanAsteriskEqualsToken:Zr,reScanSlashToken:wt,reScanTemplateToken:Hn,reScanTemplateHeadOrNoSubstitutionTemplate:Di,scanJsxIdentifier:Md,scanJsxAttributeValue:al,reScanJsxAttributeValue:Vt,reScanJsxToken:Ga,reScanLessThanToken:ji,reScanHashToken:iu,reScanQuestionToken:ol,reScanInvalidIdentifier:lt,scanJsxToken:il,scanJsDocToken:oe,scanJSDocCommentTextToken:lp,scan:pt,getText:_n,clearCommentDirectives:ro,setText:fi,setScriptTarget:co,setLanguageVariant:jd,setScriptKind:up,setJSDocParsingMode:vc,setOnError:Uo,resetTokenState:sl,setTextPos:sl,setSkipJsDocLeadingAsterisks:ny,tryScan:Wr,lookAhead:Et,scanRange:et};return pe.isDebugging&&Object.defineProperty(T,"__debugShowCurrentPositionInText",{get:()=>{let ue=T.getText();return ue.slice(0,T.getTokenFullStart())+"\u2551"+ue.slice(T.getTokenFullStart())}}),T;function k(ue){return $g(s,ue)}function F(ue){return ue>=0&&ue=0&&ue=65&&ut<=70)ut+=32;else if(!(ut>=48&&ut<=57||ut>=97&&ut<=102))break;Tt.push(ut),c++,kt=!1}return Tt.length=p){Ie+=s.substring(Tt,c),g|=4,N(G.Unterminated_string_literal);break}let At=O(c);if(At===Ee){Ie+=s.substring(Tt,c),c++;break}if(At===92&&!ue){Ie+=s.substring(Tt,c),Ie+=Yt(3),Tt=c;continue}if((At===10||At===13)&&!ue){Ie+=s.substring(Tt,c),g|=4,N(G.Unterminated_string_literal);break}c++}return Ie}function Jt(ue){let Ee=O(c)===96;c++;let Ie=c,Tt="",At;for(;;){if(c>=p){Tt+=s.substring(Ie,c),g|=4,N(G.Unterminated_template_literal),At=Ee?15:18;break}let kt=O(c);if(kt===96){Tt+=s.substring(Ie,c),c++,At=Ee?15:18;break}if(kt===36&&c+1=p)return N(G.Unexpected_end_of_text),"";let Ie=O(c);switch(c++,Ie){case 48:if(c>=p||!nh(O(c)))return"\0";case 49:case 50:case 51:c=55296&&Tt<=56319&&c+6=56320&&wr<=57343)return c=ut,At+String.fromCharCode(wr)}return At;case 120:for(;c1114111&&(ue&&N(G.An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive,Ie,c-Ie),kt=!0),c>=p?(ue&&N(G.Unexpected_end_of_text),kt=!0):O(c)===125?c++:(ue&&N(G.Unterminated_Unicode_escape_sequence),kt=!0),kt?(g|=2048,s.substring(Ee,c)):(g|=8,Mfe(At))}function Fr(){if(c+5=0&&W_(Ie,e)){ue+=vt(!0),Ee=c;continue}if(Ie=Fr(),!(Ie>=0&&W_(Ie,e)))break;g|=1024,ue+=s.substring(Ee,c),ue+=Mfe(Ie),c+=6,Ee=c}else break}return ue+=s.substring(Ee,c),ue}function ae(){let ue=y.length;if(ue>=2&&ue<=12){let Ee=y.charCodeAt(0);if(Ee>=97&&Ee<=122){let Ie=_et.get(y);if(Ie!==void 0)return m=Ie}}return m=80}function he(ue){let Ee="",Ie=!1,Tt=!1;for(;;){let At=O(c);if(At===95){g|=512,Ie?(Ie=!1,Tt=!0):N(Tt?G.Multiple_consecutive_numeric_separators_are_not_permitted:G.Numeric_separators_are_not_allowed_here,c,1),c++;continue}if(Ie=!0,!nh(At)||At-48>=ue)break;Ee+=s[c],c++,Tt=!1}return O(c-1)===95&&N(G.Numeric_separators_are_not_allowed_here,c-1,1),Ee}function Oe(){return O(c)===110?(y+="n",g&384&&(y=Xrt(y)+"n"),c++,10):(y=""+(g&128?parseInt(y.slice(2),2):g&256?parseInt(y.slice(2),8):+y),9)}function pt(){for(d=c,g=0;;){if(f=c,c>=p)return m=1;let ue=k(c);if(c===0&&ue===35&&mhe(s,c)){if(c=hhe(s,c),t)continue;return m=6}switch(ue){case 10:case 13:if(g|=1,t){c++;continue}else return ue===13&&c+1=0&&qu(Ee,e))return y=vt(!0)+K(),m=ae();let Ie=Fr();return Ie>=0&&qu(Ie,e)?(c+=6,g|=1024,y=String.fromCharCode(Ie)+K(),m=ae()):(N(G.Invalid_character),c++,m=0);case 35:if(c!==0&&s[c+1]==="!")return N(G.can_only_be_used_at_the_start_of_a_file,c,2),c++,m=0;let Tt=k(c+1);if(Tt===92){c++;let ut=le();if(ut>=0&&qu(ut,e))return y="#"+vt(!0)+K(),m=81;let wr=Fr();if(wr>=0&&qu(wr,e))return c+=6,g|=1024,y="#"+String.fromCharCode(wr)+K(),m=81;c--}return qu(Tt,e)?(c++,Nt(Tt,e)):(y="#",N(G.Invalid_character,c++,Yi(ue))),m=81;case 65533:return N(G.File_appears_to_be_binary,0,0),c=p,m=8;default:let At=Nt(ue,e);if(At)return m=At;if(MD(ue)){c+=Yi(ue);continue}else if(cc(ue)){g|=1,c+=Yi(ue);continue}let kt=Yi(ue);return N(G.Invalid_character,c,kt),c+=kt,m=0}}}function Ye(){switch(I){case 0:return!0;case 1:return!1}return E!==3&&E!==4?!0:I===3?!1:xet.test(s.slice(d,c))}function lt(){pe.assert(m===0,"'reScanInvalidIdentifier' should only be called when the current token is 'SyntaxKind.Unknown'."),c=f=d,g=0;let ue=k(c),Ee=Nt(ue,99);return Ee?m=Ee:(c+=Yi(ue),m)}function Nt(ue,Ee){let Ie=ue;if(qu(Ie,Ee)){for(c+=Yi(Ie);c=p)return m=1;let Ee=O(c);if(Ee===60)return O(c+1)===47?(c+=2,m=31):(c++,m=30);if(Ee===123)return c++,m=19;let Ie=0;for(;c0)break;y1(Ee)||(Ie=c)}c++}return y=s.substring(d,c),Ie===-1?13:12}function Md(){if(Zo(m)){for(;c=p)return m=1;for(let Ee=O(c);c=0&&MD(O(c-1))&&!(c+1=p)return m=1;let ue=k(c);switch(c+=Yi(ue),ue){case 9:case 11:case 12:case 32:for(;c=0&&qu(Ee,e))return y=vt(!0)+K(),m=ae();let Ie=Fr();return Ie>=0&&qu(Ie,e)?(c+=6,g|=1024,y=String.fromCharCode(Ie)+K(),m=ae()):(c++,m=0)}if(qu(ue,e)){let Ee=ue;for(;c=0),c=ue,d=ue,f=ue,m=0,y=void 0,g=0}function ny(ue){b+=ue?1:-1}}function $g(e,t){return e.codePointAt(t)}function Yi(e){return e>=65536?2:e===-1?0:1}function Ret(e){if(pe.assert(0<=e&&e<=1114111),e<=65535)return String.fromCharCode(e);let t=Math.floor((e-65536)/1024)+55296,r=(e-65536)%1024+56320;return String.fromCharCode(t,r)}var Let=String.fromCodePoint?e=>String.fromCodePoint(e):Ret;function Mfe(e){return Let(e)}var jfe=new Map(Object.entries({General_Category:"General_Category",gc:"General_Category",Script:"Script",sc:"Script",Script_Extensions:"Script_Extensions",scx:"Script_Extensions"})),Bfe=new Set(["ASCII","ASCII_Hex_Digit","AHex","Alphabetic","Alpha","Any","Assigned","Bidi_Control","Bidi_C","Bidi_Mirrored","Bidi_M","Case_Ignorable","CI","Cased","Changes_When_Casefolded","CWCF","Changes_When_Casemapped","CWCM","Changes_When_Lowercased","CWL","Changes_When_NFKC_Casefolded","CWKCF","Changes_When_Titlecased","CWT","Changes_When_Uppercased","CWU","Dash","Default_Ignorable_Code_Point","DI","Deprecated","Dep","Diacritic","Dia","Emoji","Emoji_Component","EComp","Emoji_Modifier","EMod","Emoji_Modifier_Base","EBase","Emoji_Presentation","EPres","Extended_Pictographic","ExtPict","Extender","Ext","Grapheme_Base","Gr_Base","Grapheme_Extend","Gr_Ext","Hex_Digit","Hex","IDS_Binary_Operator","IDSB","IDS_Trinary_Operator","IDST","ID_Continue","IDC","ID_Start","IDS","Ideographic","Ideo","Join_Control","Join_C","Logical_Order_Exception","LOE","Lowercase","Lower","Math","Noncharacter_Code_Point","NChar","Pattern_Syntax","Pat_Syn","Pattern_White_Space","Pat_WS","Quotation_Mark","QMark","Radical","Regional_Indicator","RI","Sentence_Terminal","STerm","Soft_Dotted","SD","Terminal_Punctuation","Term","Unified_Ideograph","UIdeo","Uppercase","Upper","Variation_Selector","VS","White_Space","space","XID_Continue","XIDC","XID_Start","XIDS"]),qfe=new Set(["Basic_Emoji","Emoji_Keycap_Sequence","RGI_Emoji_Modifier_Sequence","RGI_Emoji_Flag_Sequence","RGI_Emoji_Tag_Sequence","RGI_Emoji_ZWJ_Sequence","RGI_Emoji"]),f1={General_Category:new Set(["C","Other","Cc","Control","cntrl","Cf","Format","Cn","Unassigned","Co","Private_Use","Cs","Surrogate","L","Letter","LC","Cased_Letter","Ll","Lowercase_Letter","Lm","Modifier_Letter","Lo","Other_Letter","Lt","Titlecase_Letter","Lu","Uppercase_Letter","M","Mark","Combining_Mark","Mc","Spacing_Mark","Me","Enclosing_Mark","Mn","Nonspacing_Mark","N","Number","Nd","Decimal_Number","digit","Nl","Letter_Number","No","Other_Number","P","Punctuation","punct","Pc","Connector_Punctuation","Pd","Dash_Punctuation","Pe","Close_Punctuation","Pf","Final_Punctuation","Pi","Initial_Punctuation","Po","Other_Punctuation","Ps","Open_Punctuation","S","Symbol","Sc","Currency_Symbol","Sk","Modifier_Symbol","Sm","Math_Symbol","So","Other_Symbol","Z","Separator","Zl","Line_Separator","Zp","Paragraph_Separator","Zs","Space_Separator"]),Script:new Set(["Adlm","Adlam","Aghb","Caucasian_Albanian","Ahom","Arab","Arabic","Armi","Imperial_Aramaic","Armn","Armenian","Avst","Avestan","Bali","Balinese","Bamu","Bamum","Bass","Bassa_Vah","Batk","Batak","Beng","Bengali","Bhks","Bhaiksuki","Bopo","Bopomofo","Brah","Brahmi","Brai","Braille","Bugi","Buginese","Buhd","Buhid","Cakm","Chakma","Cans","Canadian_Aboriginal","Cari","Carian","Cham","Cher","Cherokee","Chrs","Chorasmian","Copt","Coptic","Qaac","Cpmn","Cypro_Minoan","Cprt","Cypriot","Cyrl","Cyrillic","Deva","Devanagari","Diak","Dives_Akuru","Dogr","Dogra","Dsrt","Deseret","Dupl","Duployan","Egyp","Egyptian_Hieroglyphs","Elba","Elbasan","Elym","Elymaic","Ethi","Ethiopic","Geor","Georgian","Glag","Glagolitic","Gong","Gunjala_Gondi","Gonm","Masaram_Gondi","Goth","Gothic","Gran","Grantha","Grek","Greek","Gujr","Gujarati","Guru","Gurmukhi","Hang","Hangul","Hani","Han","Hano","Hanunoo","Hatr","Hatran","Hebr","Hebrew","Hira","Hiragana","Hluw","Anatolian_Hieroglyphs","Hmng","Pahawh_Hmong","Hmnp","Nyiakeng_Puachue_Hmong","Hrkt","Katakana_Or_Hiragana","Hung","Old_Hungarian","Ital","Old_Italic","Java","Javanese","Kali","Kayah_Li","Kana","Katakana","Kawi","Khar","Kharoshthi","Khmr","Khmer","Khoj","Khojki","Kits","Khitan_Small_Script","Knda","Kannada","Kthi","Kaithi","Lana","Tai_Tham","Laoo","Lao","Latn","Latin","Lepc","Lepcha","Limb","Limbu","Lina","Linear_A","Linb","Linear_B","Lisu","Lyci","Lycian","Lydi","Lydian","Mahj","Mahajani","Maka","Makasar","Mand","Mandaic","Mani","Manichaean","Marc","Marchen","Medf","Medefaidrin","Mend","Mende_Kikakui","Merc","Meroitic_Cursive","Mero","Meroitic_Hieroglyphs","Mlym","Malayalam","Modi","Mong","Mongolian","Mroo","Mro","Mtei","Meetei_Mayek","Mult","Multani","Mymr","Myanmar","Nagm","Nag_Mundari","Nand","Nandinagari","Narb","Old_North_Arabian","Nbat","Nabataean","Newa","Nkoo","Nko","Nshu","Nushu","Ogam","Ogham","Olck","Ol_Chiki","Orkh","Old_Turkic","Orya","Oriya","Osge","Osage","Osma","Osmanya","Ougr","Old_Uyghur","Palm","Palmyrene","Pauc","Pau_Cin_Hau","Perm","Old_Permic","Phag","Phags_Pa","Phli","Inscriptional_Pahlavi","Phlp","Psalter_Pahlavi","Phnx","Phoenician","Plrd","Miao","Prti","Inscriptional_Parthian","Rjng","Rejang","Rohg","Hanifi_Rohingya","Runr","Runic","Samr","Samaritan","Sarb","Old_South_Arabian","Saur","Saurashtra","Sgnw","SignWriting","Shaw","Shavian","Shrd","Sharada","Sidd","Siddham","Sind","Khudawadi","Sinh","Sinhala","Sogd","Sogdian","Sogo","Old_Sogdian","Sora","Sora_Sompeng","Soyo","Soyombo","Sund","Sundanese","Sylo","Syloti_Nagri","Syrc","Syriac","Tagb","Tagbanwa","Takr","Takri","Tale","Tai_Le","Talu","New_Tai_Lue","Taml","Tamil","Tang","Tangut","Tavt","Tai_Viet","Telu","Telugu","Tfng","Tifinagh","Tglg","Tagalog","Thaa","Thaana","Thai","Tibt","Tibetan","Tirh","Tirhuta","Tnsa","Tangsa","Toto","Ugar","Ugaritic","Vaii","Vai","Vith","Vithkuqi","Wara","Warang_Citi","Wcho","Wancho","Xpeo","Old_Persian","Xsux","Cuneiform","Yezi","Yezidi","Yiii","Yi","Zanb","Zanabazar_Square","Zinh","Inherited","Qaai","Zyyy","Common","Zzzz","Unknown"]),Script_Extensions:void 0};f1.Script_Extensions=f1.Script;function ud(e){return e.start+e.length}function $et(e){return e.length===0}function IJ(e,t){if(e<0)throw new Error("start < 0");if(t<0)throw new Error("length < 0");return{start:e,length:t}}function Met(e,t){return IJ(e,t-e)}function CD(e){return IJ(e.span.start,e.newLength)}function jet(e){return $et(e.span)&&e.newLength===0}function She(e,t){if(t<0)throw new Error("newLength < 0");return{span:e,newLength:t}}var ujt=She(IJ(0,0),0);function vhe(e,t){for(;e;){let r=t(e);if(r==="quit")return;if(r)return e;e=e.parent}}function yO(e){return(e.flags&16)===0}function Bet(e,t){if(e===void 0||yO(e))return e;for(e=e.original;e;){if(yO(e))return!t||t(e)?e:void 0;e=e.original}}function l1(e){return e.length>=2&&e.charCodeAt(0)===95&&e.charCodeAt(1)===95?"_"+e:e}function GD(e){let t=e;return t.length>=3&&t.charCodeAt(0)===95&&t.charCodeAt(1)===95&&t.charCodeAt(2)===95?t.substr(1):t}function uc(e){return GD(e.escapedText)}function qet(e){let t=phe(e.escapedText);return t?JYe(t,oh):void 0}function Xz(e){return e.valueDeclaration&&_tt(e.valueDeclaration)?uc(e.valueDeclaration.name):GD(e.escapedName)}function bhe(e){let t=e.parent.parent;if(t){if(Jfe(t))return eO(t);switch(t.kind){case 244:if(t.declarationList&&t.declarationList.declarations[0])return eO(t.declarationList.declarations[0]);break;case 245:let r=t.expression;switch(r.kind===227&&r.operatorToken.kind===64&&(r=r.left),r.kind){case 212:return r.name;case 213:let n=r.argumentExpression;if(kn(n))return n}break;case 218:return eO(t.expression);case 257:{if(Jfe(t.statement)||Att(t.statement))return eO(t.statement);break}}}}function eO(e){let t=xhe(e);return t&&kn(t)?t:void 0}function Uet(e){return e.name||bhe(e)}function zet(e){return!!e.name}function wJ(e){switch(e.kind){case 80:return e;case 349:case 342:{let{name:r}=e;if(r.kind===167)return r.right;break}case 214:case 227:{let r=e;switch(NJ(r)){case 1:case 4:case 5:case 3:return FJ(r.left);case 7:case 8:case 9:return r.arguments[1];default:return}}case 347:return Uet(e);case 341:return bhe(e);case 278:{let{expression:r}=e;return kn(r)?r:void 0}case 213:let t=e;if(Mhe(t))return t.argumentExpression}return e.name}function xhe(e){if(e!==void 0)return wJ(e)||(oye(e)||iye(e)||aJ(e)?Jet(e):void 0)}function Jet(e){if(e.parent){if(cot(e.parent)||Vnt(e.parent))return e.parent.name;if(E1(e.parent)&&e===e.parent.right){if(kn(e.parent.left))return e.parent.left;if(Jhe(e.parent.left))return FJ(e.parent.left)}else if(sye(e.parent)&&kn(e.parent.name))return e.parent.name}else return}function Vet(e){if(vrt(e))return Y_(e.modifiers,qJ)}function Ket(e){if(eA(e,98303))return Y_(e.modifiers,htt)}function Ehe(e,t){if(e.name)if(kn(e.name)){let r=e.name.escapedText;return HD(e.parent,t).filter(n=>ame(n)&&kn(n.name)&&n.name.escapedText===r)}else{let r=e.parent.parameters.indexOf(e);pe.assert(r>-1,"Parameters should always be in their parents' parameter list");let n=HD(e.parent,t).filter(ame);if(rEot(n)&&n.typeParameters.some(o=>o.name.escapedText===r))}function Zet(e){return The(e,!1)}function Wet(e){return The(e,!0)}function Qet(e){return lh(e,fot)}function Xet(e){return att(e,Tot)}function Yet(e){return lh(e,mot,!0)}function ett(e){return lh(e,hot,!0)}function ttt(e){return lh(e,yot,!0)}function rtt(e){return lh(e,got,!0)}function ntt(e){return lh(e,Sot,!0)}function ott(e){return lh(e,bot,!0)}function itt(e){let t=lh(e,JJ);if(t&&t.typeExpression&&t.typeExpression.type)return t}function HD(e,t){var r;if(!RJ(e))return ii;let n=(r=e.jsDoc)==null?void 0:r.jsDocCache;if(n===void 0||t){let o=ort(e,t);pe.assert(o.length<2||o[0]!==o[1]),n=Jme(o,i=>hye(i)?i.tags:i),t||(e.jsDoc??(e.jsDoc=[]),e.jsDoc.jsDocCache=n)}return n}function Dhe(e){return HD(e,!1)}function lh(e,t,r){return Ume(HD(e,r),t)}function att(e,t){return Dhe(e).filter(t)}function Yz(e){return e.kind===80||e.kind===81}function stt(e){return nf(e)&&!!(e.flags&64)}function ctt(e){return tA(e)&&!!(e.flags&64)}function Ufe(e){return nye(e)&&!!(e.flags&64)}function ltt(e){let t=e.kind;return!!(e.flags&64)&&(t===212||t===213||t===214||t===236)}function kJ(e){return VJ(e,8)}function utt(e){return uO(e)&&!!(e.flags&64)}function CJ(e){return e>=167}function Ahe(e){return e>=0&&e<=166}function ptt(e){return Ahe(e.kind)}function ih(e){return fd(e,"pos")&&fd(e,"end")}function dtt(e){return 9<=e&&e<=15}function zfe(e){return 15<=e&&e<=18}function m1(e){var t;return kn(e)&&((t=e.emitNode)==null?void 0:t.autoGenerate)!==void 0}function Ihe(e){var t;return zg(e)&&((t=e.emitNode)==null?void 0:t.autoGenerate)!==void 0}function _tt(e){return(bO(e)||Stt(e))&&zg(e.name)}function Q_(e){switch(e){case 128:case 129:case 134:case 87:case 138:case 90:case 95:case 103:case 125:case 123:case 124:case 148:case 126:case 147:case 164:return!0}return!1}function ftt(e){return!!(Uhe(e)&31)}function mtt(e){return ftt(e)||e===126||e===164||e===129}function htt(e){return Q_(e.kind)}function whe(e){let t=e.kind;return t===80||t===81||t===11||t===9||t===168}function khe(e){return!!e&>t(e.kind)}function ytt(e){switch(e){case 263:case 175:case 177:case 178:case 179:case 219:case 220:return!0;default:return!1}}function gtt(e){switch(e){case 174:case 180:case 324:case 181:case 182:case 185:case 318:case 186:return!0;default:return ytt(e)}}function g1(e){return e&&(e.kind===264||e.kind===232)}function Stt(e){switch(e.kind){case 175:case 178:case 179:return!0;default:return!1}}function vtt(e){let t=e.kind;return t===304||t===305||t===306||t===175||t===178||t===179}function btt(e){return Prt(e.kind)}function xtt(e){if(e){let t=e.kind;return t===208||t===207}return!1}function Ett(e){let t=e.kind;return t===210||t===211}function Ttt(e){switch(e.kind){case 261:case 170:case 209:return!0}return!1}function S1(e){return Che(kJ(e).kind)}function Che(e){switch(e){case 212:case 213:case 215:case 214:case 285:case 286:case 289:case 216:case 210:case 218:case 211:case 232:case 219:case 80:case 81:case 14:case 9:case 10:case 11:case 15:case 229:case 97:case 106:case 110:case 112:case 108:case 236:case 234:case 237:case 102:case 283:return!0;default:return!1}}function Dtt(e){return Phe(kJ(e).kind)}function Phe(e){switch(e){case 225:case 226:case 221:case 222:case 223:case 224:case 217:return!0;default:return Che(e)}}function Att(e){return Itt(kJ(e).kind)}function Itt(e){switch(e){case 228:case 230:case 220:case 227:case 231:case 235:case 233:case 357:case 356:case 239:return!0;default:return Phe(e)}}function wtt(e){return e===220||e===209||e===264||e===232||e===176||e===177||e===267||e===307||e===282||e===263||e===219||e===178||e===274||e===272||e===277||e===265||e===292||e===175||e===174||e===268||e===271||e===275||e===281||e===170||e===304||e===173||e===172||e===179||e===305||e===266||e===169||e===261||e===347||e===339||e===349||e===203}function Ohe(e){return e===263||e===283||e===264||e===265||e===266||e===267||e===268||e===273||e===272||e===279||e===278||e===271}function Nhe(e){return e===253||e===252||e===260||e===247||e===245||e===243||e===250||e===251||e===249||e===246||e===257||e===254||e===256||e===258||e===259||e===244||e===248||e===255||e===354}function Jfe(e){return e.kind===169?e.parent&&e.parent.kind!==346||Jg(e):wtt(e.kind)}function ktt(e){let t=e.kind;return Nhe(t)||Ohe(t)||Ctt(e)}function Ctt(e){return e.kind!==242||e.parent!==void 0&&(e.parent.kind===259||e.parent.kind===300)?!1:!Vtt(e)}function Ptt(e){let t=e.kind;return Nhe(t)||Ohe(t)||t===242}function Fhe(e){return e.kind>=310&&e.kind<=352}function Ott(e){return e.kind===321||e.kind===320||e.kind===322||Rtt(e)||Ntt(e)||_ot(e)||yye(e)}function Ntt(e){return e.kind>=328&&e.kind<=352}function tO(e){return e.kind===179}function rO(e){return e.kind===178}function jg(e){if(!RJ(e))return!1;let{jsDoc:t}=e;return!!t&&t.length>0}function Ftt(e){return!!e.initializer}function PJ(e){return e.kind===11||e.kind===15}function Rtt(e){return e.kind===325||e.kind===326||e.kind===327}function Vfe(e){return(e.flags&33554432)!==0}var pjt=Ltt();function Ltt(){var e="";let t=r=>e+=r;return{getText:()=>e,write:t,rawWrite:t,writeKeyword:t,writeOperator:t,writePunctuation:t,writeSpace:t,writeStringLiteral:t,writeLiteral:t,writeParameter:t,writeProperty:t,writeSymbol:(r,n)=>t(r),writeTrailingSemicolon:t,writeComment:t,getTextPos:()=>e.length,getLine:()=>0,getColumn:()=>0,getIndent:()=>0,isAtStartOfLine:()=>!1,hasTrailingComment:()=>!1,hasTrailingWhitespace:()=>!!e.length&&y1(e.charCodeAt(e.length-1)),writeLine:()=>e+=" ",increaseIndent:x1,decreaseIndent:x1,clear:()=>e=""}}function $tt(e,t){let r=e.entries();for(let[n,o]of r){let i=t(o,n);if(i)return i}}function Mtt(e){return e.end-e.pos}function Rhe(e){return jtt(e),(e.flags&1048576)!==0}function jtt(e){e.flags&2097152||(((e.flags&262144)!==0||La(e,Rhe))&&(e.flags|=1048576),e.flags|=2097152)}function sh(e){for(;e&&e.kind!==308;)e=e.parent;return e}function Bg(e){return e===void 0?!0:e.pos===e.end&&e.pos>=0&&e.kind!==1}function eJ(e){return!Bg(e)}function gO(e,t,r){if(Bg(e))return e.pos;if(Fhe(e)||e.kind===12)return dd((t??sh(e)).text,e.pos,!1,!0);if(r&&jg(e))return gO(e.jsDoc[0],t);if(e.kind===353){t??(t=sh(e));let n=gJ(gye(e,t));if(n)return gO(n,t,r)}return dd((t??sh(e)).text,e.pos,!1,!1,Ktt(e))}function Kfe(e,t,r=!1){return jD(e.text,t,r)}function Btt(e){return!!vhe(e,uot)}function jD(e,t,r=!1){if(Bg(t))return"";let n=e.substring(r?t.pos:dd(e,t.pos),t.end);return Btt(t)&&(n=n.split(/\r\n|\n|\r/).map(o=>o.replace(/^\s*\*/,"").trimStart()).join(` +`)),n}function v1(e){let t=e.emitNode;return t&&t.flags||0}function qtt(e,t,r){pe.assertGreaterThanOrEqual(t,0),pe.assertGreaterThanOrEqual(r,0),pe.assertLessThanOrEqual(t,e.length),pe.assertLessThanOrEqual(t+r,e.length)}function lO(e){return e.kind===245&&e.expression.kind===11}function OJ(e){return!!(v1(e)&2097152)}function Gfe(e){return OJ(e)&&cye(e)}function Utt(e){return kn(e.name)&&!e.initializer}function Hfe(e){return OJ(e)&&IO(e)&&hJ(e.declarationList.declarations,Utt)}function ztt(e,t){let r=e.kind===170||e.kind===169||e.kind===219||e.kind===220||e.kind===218||e.kind===261||e.kind===282?yJ(Net(t,e.pos),Qz(t,e.pos)):Qz(t,e.pos);return Y_(r,n=>n.end<=e.end&&t.charCodeAt(n.pos+1)===42&&t.charCodeAt(n.pos+2)===42&&t.charCodeAt(n.pos+3)!==47)}function Jtt(e){if(e)switch(e.kind){case 209:case 307:case 170:case 304:case 173:case 172:case 305:case 261:return!0}return!1}function Vtt(e){return e&&e.kind===242&&khe(e.parent)}function Zfe(e){let t=e.kind;return(t===212||t===213)&&e.expression.kind===108}function Jg(e){return!!e&&!!(e.flags&524288)}function Ktt(e){return!!e&&!!(e.flags&16777216)}function Gtt(e){for(;SO(e,!0);)e=e.right;return e}function Htt(e){return kn(e)&&e.escapedText==="exports"}function Ztt(e){return kn(e)&&e.escapedText==="module"}function Lhe(e){return(nf(e)||$he(e))&&Ztt(e.expression)&&WD(e)==="exports"}function NJ(e){let t=Qtt(e);return t===5||Jg(e)?t:0}function Wtt(e){return RD(e.arguments)===3&&nf(e.expression)&&kn(e.expression.expression)&&uc(e.expression.expression)==="Object"&&uc(e.expression.name)==="defineProperty"&&AO(e.arguments[1])&&ZD(e.arguments[0],!0)}function $he(e){return tA(e)&&AO(e.argumentExpression)}function YD(e,t){return nf(e)&&(!t&&e.expression.kind===110||kn(e.name)&&ZD(e.expression,!0))||Mhe(e,t)}function Mhe(e,t){return $he(e)&&(!t&&e.expression.kind===110||MJ(e.expression)||YD(e.expression,!0))}function ZD(e,t){return MJ(e)||YD(e,t)}function Qtt(e){if(nye(e)){if(!Wtt(e))return 0;let t=e.arguments[0];return Htt(t)||Lhe(t)?8:YD(t)&&WD(t)==="prototype"?9:7}return e.operatorToken.kind!==64||!Jhe(e.left)||Xtt(Gtt(e))?0:ZD(e.left.expression,!0)&&WD(e.left)==="prototype"&&rye(ert(e))?6:Ytt(e.left)}function Xtt(e){return Hnt(e)&&T1(e.expression)&&e.expression.text==="0"}function FJ(e){if(nf(e))return e.name;let t=LJ(e.argumentExpression);return T1(t)||PJ(t)?t:e}function WD(e){let t=FJ(e);if(t){if(kn(t))return t.escapedText;if(PJ(t)||T1(t))return l1(t.text)}}function Ytt(e){if(e.expression.kind===110)return 4;if(Lhe(e))return 2;if(ZD(e.expression,!0)){if(krt(e.expression))return 3;let t=e;for(;!kn(t.expression);)t=t.expression;let r=t.expression;if((r.escapedText==="exports"||r.escapedText==="module"&&WD(t)==="exports")&&YD(e))return 1;if(ZD(e,!0)||tA(e)&&frt(e))return 5}return 0}function ert(e){for(;E1(e.right);)e=e.right;return e.right}function trt(e){return aye(e)&&E1(e.expression)&&NJ(e.expression)!==0&&E1(e.expression.right)&&(e.expression.right.operatorToken.kind===57||e.expression.right.operatorToken.kind===61)?e.expression.right.right:void 0}function rrt(e){switch(e.kind){case 244:let t=tJ(e);return t&&t.initializer;case 173:return e.initializer;case 304:return e.initializer}}function tJ(e){return IO(e)?gJ(e.declarationList.declarations):void 0}function nrt(e){return XD(e)&&e.body&&e.body.kind===268?e.body:void 0}function RJ(e){switch(e.kind){case 220:case 227:case 242:case 253:case 180:case 297:case 264:case 232:case 176:case 177:case 186:case 181:case 252:case 260:case 247:case 213:case 243:case 1:case 267:case 307:case 278:case 279:case 282:case 245:case 250:case 251:case 249:case 263:case 219:case 185:case 178:case 80:case 246:case 273:case 272:case 182:case 265:case 318:case 324:case 257:case 175:case 174:case 268:case 203:case 271:case 211:case 170:case 218:case 212:case 304:case 173:case 172:case 254:case 241:case 179:case 305:case 306:case 256:case 258:case 259:case 266:case 169:case 261:case 244:case 248:case 255:return!0;default:return!1}}function ort(e,t){let r;Jtt(e)&&Ftt(e)&&jg(e.initializer)&&(r=lc(r,Wfe(e,e.initializer.jsDoc)));let n=e;for(;n&&n.parent;){if(jg(n)&&(r=lc(r,Wfe(e,n.jsDoc))),n.kind===170){r=lc(r,(t?Het:Get)(n));break}if(n.kind===169){r=lc(r,(t?Wet:Zet)(n));break}n=art(n)}return r||ii}function Wfe(e,t){let r=RYe(t);return Jme(t,n=>{if(n===r){let o=Y_(n.tags,i=>irt(e,i));return n.tags===o?[n]:o}else return Y_(n.tags,vot)})}function irt(e,t){return!(JJ(t)||Dot(t))||!t.parent||!hye(t.parent)||!UJ(t.parent.parent)||t.parent.parent===e}function art(e){let t=e.parent;if(t.kind===304||t.kind===278||t.kind===173||t.kind===245&&e.kind===212||t.kind===254||nrt(t)||SO(e))return t;if(t.parent&&(tJ(t.parent)===e||SO(t)))return t.parent;if(t.parent&&t.parent.parent&&(tJ(t.parent.parent)||rrt(t.parent.parent)===e||trt(t.parent.parent)))return t.parent.parent}function LJ(e,t){return VJ(e,t?-2147483647:1)}function srt(e){let t=crt(e);if(t&&Jg(e)){let r=Qet(e);if(r)return r.class}return t}function crt(e){let t=$J(e.heritageClauses,96);return t&&t.types.length>0?t.types[0]:void 0}function lrt(e){return Jg(e)?Xet(e).map(t=>t.class):$J(e.heritageClauses,119)?.types}function urt(e){return zJ(e)?prt(e)||ii:g1(e)&&yJ(Hz(srt(e)),lrt(e))||ii}function prt(e){let t=$J(e.heritageClauses,96);return t?t.types:void 0}function $J(e,t){if(e){for(let r of e)if(r.token===t)return r}}function oh(e){return 83<=e&&e<=166}function drt(e){return 19<=e&&e<=79}function Fz(e){return oh(e)||drt(e)}function AO(e){return PJ(e)||T1(e)}function _rt(e){return Znt(e)&&(e.operator===40||e.operator===41)&&T1(e.operand)}function frt(e){if(!(e.kind===168||e.kind===213))return!1;let t=tA(e)?LJ(e.argumentExpression):e.expression;return!AO(t)&&!_rt(t)}function mrt(e){return Yz(e)?uc(e):mye(e)?ont(e):e.text}function u1(e){return QD(e.pos)||QD(e.end)}function Rz(e){switch(e){case 61:return 5;case 57:return 5;case 56:return 6;case 52:return 7;case 53:return 8;case 51:return 9;case 35:case 36:case 37:case 38:return 10;case 30:case 32:case 33:case 34:case 104:case 103:case 130:case 152:return 11;case 48:case 49:case 50:return 12;case 40:case 41:return 13;case 42:case 44:case 45:return 14;case 43:return 15}return-1}function Lz(e){return!!((e.templateFlags||0)&2048)}function hrt(e){return e&&!!(ynt(e)?Lz(e):Lz(e.head)||Ra(e.templateSpans,t=>Lz(t.literal)))}var djt=new Map(Object.entries({" ":"\\t","\v":"\\v","\f":"\\f","\b":"\\b","\r":"\\r","\n":"\\n","\\":"\\\\",'"':'\\"',"'":"\\'","`":"\\`","\u2028":"\\u2028","\u2029":"\\u2029","\x85":"\\u0085","\r\n":"\\r\\n"})),_jt=new Map(Object.entries({'"':""","'":"'"}));function yrt(e){return!!e&&e.kind===80&&grt(e)}function grt(e){return e.escapedText==="this"}function eA(e,t){return!!brt(e,t)}function Srt(e){return eA(e,256)}function vrt(e){return eA(e,32768)}function brt(e,t){return Ert(e)&t}function xrt(e,t,r){return e.kind>=0&&e.kind<=166?0:(e.modifierFlagsCache&536870912||(e.modifierFlagsCache=qhe(e)|536870912),r||t&&Jg(e)?(!(e.modifierFlagsCache&268435456)&&e.parent&&(e.modifierFlagsCache|=jhe(e)|268435456),Bhe(e.modifierFlagsCache)):Trt(e.modifierFlagsCache))}function Ert(e){return xrt(e,!1)}function jhe(e){let t=0;return e.parent&&!vO(e)&&(Jg(e)&&(Yet(e)&&(t|=8388608),ett(e)&&(t|=16777216),ttt(e)&&(t|=33554432),rtt(e)&&(t|=67108864),ntt(e)&&(t|=134217728)),ott(e)&&(t|=65536)),t}function Trt(e){return e&65535}function Bhe(e){return e&131071|(e&260046848)>>>23}function Drt(e){return Bhe(jhe(e))}function Art(e){return qhe(e)|Drt(e)}function qhe(e){let t=KJ(e)?zc(e.modifiers):0;return(e.flags&8||e.kind===80&&e.flags&4096)&&(t|=32),t}function zc(e){let t=0;if(e)for(let r of e)t|=Uhe(r.kind);return t}function Uhe(e){switch(e){case 126:return 256;case 125:return 1;case 124:return 4;case 123:return 2;case 128:return 64;case 129:return 512;case 95:return 32;case 138:return 128;case 87:return 4096;case 90:return 2048;case 134:return 1024;case 148:return 8;case 164:return 16;case 103:return 8192;case 147:return 16384;case 171:return 32768}return 0}function Irt(e){return e===76||e===77||e===78}function zhe(e){return e>=64&&e<=79}function SO(e,t){return E1(e)&&(t?e.operatorToken.kind===64:zhe(e.operatorToken.kind))&&S1(e.left)}function MJ(e){return e.kind===80||wrt(e)}function wrt(e){return nf(e)&&kn(e.name)&&MJ(e.expression)}function krt(e){return YD(e)&&WD(e)==="prototype"}function $z(e){return e.flags&3899393?e.objectFlags:0}function Crt(e){let t;return La(e,r=>{eJ(r)&&(t=r)},r=>{for(let n=r.length-1;n>=0;n--)if(eJ(r[n])){t=r[n];break}}),t}function Prt(e){return e>=183&&e<=206||e===133||e===159||e===150||e===163||e===151||e===136||e===154||e===155||e===116||e===157||e===146||e===141||e===234||e===313||e===314||e===315||e===316||e===317||e===318||e===319}function Jhe(e){return e.kind===212||e.kind===213}function Ort(e,t){this.flags=e,this.escapedName=t,this.declarations=void 0,this.valueDeclaration=void 0,this.id=0,this.mergeId=0,this.parent=void 0,this.members=void 0,this.exports=void 0,this.exportSymbol=void 0,this.constEnumOnlyModule=void 0,this.isReferenced=void 0,this.lastAssignmentPos=void 0,this.links=void 0}function Nrt(e,t){this.flags=t,(pe.isDebugging||sO)&&(this.checker=e)}function Frt(e,t){this.flags=t,pe.isDebugging&&(this.checker=e)}function Mz(e,t,r){this.pos=t,this.end=r,this.kind=e,this.id=0,this.flags=0,this.modifierFlagsCache=0,this.transformFlags=0,this.parent=void 0,this.original=void 0,this.emitNode=void 0}function Rrt(e,t,r){this.pos=t,this.end=r,this.kind=e,this.id=0,this.flags=0,this.transformFlags=0,this.parent=void 0,this.emitNode=void 0}function Lrt(e,t,r){this.pos=t,this.end=r,this.kind=e,this.id=0,this.flags=0,this.transformFlags=0,this.parent=void 0,this.original=void 0,this.emitNode=void 0}function $rt(e,t,r){this.fileName=e,this.text=t,this.skipTrivia=r||(n=>n)}var oi={getNodeConstructor:()=>Mz,getTokenConstructor:()=>Rrt,getIdentifierConstructor:()=>Lrt,getPrivateIdentifierConstructor:()=>Mz,getSourceFileConstructor:()=>Mz,getSymbolConstructor:()=>Ort,getTypeConstructor:()=>Nrt,getSignatureConstructor:()=>Frt,getSourceMapSourceConstructor:()=>$rt},Mrt=[];function jrt(e){Object.assign(oi,e),Vc(Mrt,t=>t(oi))}function Brt(e,t){return e.replace(/\{(\d+)\}/g,(r,n)=>""+pe.checkDefined(t[+n]))}var Qfe;function qrt(e){return Qfe&&Qfe[e.key]||e.message}function i1(e,t,r,n,o,...i){r+n>t.length&&(n=t.length-r),qtt(t,r,n);let a=qrt(o);return Ra(i)&&(a=Brt(a,i)),{file:void 0,start:r,length:n,messageText:a,category:o.category,code:o.code,reportsUnnecessary:o.reportsUnnecessary,fileName:e}}function Urt(e){return e.file===void 0&&e.start!==void 0&&e.length!==void 0&&typeof e.fileName=="string"}function Vhe(e,t){let r=t.fileName||"",n=t.text.length;pe.assertEqual(e.fileName,r),pe.assertLessThanOrEqual(e.start,n),pe.assertLessThanOrEqual(e.start+e.length,n);let o={file:t,start:e.start,length:e.length,messageText:e.messageText,category:e.category,code:e.code,reportsUnnecessary:e.reportsUnnecessary};if(e.relatedInformation){o.relatedInformation=[];for(let i of e.relatedInformation)Urt(i)&&i.fileName===r?(pe.assertLessThanOrEqual(i.start,n),pe.assertLessThanOrEqual(i.start+i.length,n),o.relatedInformation.push(Vhe(i,t))):o.relatedInformation.push(i)}return o}function Og(e,t){let r=[];for(let n of e)r.push(Vhe(n,t));return r}function Xfe(e){return e===4||e===2||e===1||e===6?1:0}var Xn={allowImportingTsExtensions:{dependencies:["rewriteRelativeImportExtensions"],computeValue:e=>!!(e.allowImportingTsExtensions||e.rewriteRelativeImportExtensions)},target:{dependencies:["module"],computeValue:e=>(e.target===0?void 0:e.target)??(e.module===100&&9||e.module===101&&9||e.module===102&&10||e.module===199&&99||1)},module:{dependencies:["target"],computeValue:e=>typeof e.module=="number"?e.module:Xn.target.computeValue(e)>=2?5:1},moduleResolution:{dependencies:["module","target"],computeValue:e=>{let t=e.moduleResolution;if(t===void 0)switch(Xn.module.computeValue(e)){case 1:t=2;break;case 100:case 101:case 102:t=3;break;case 199:t=99;break;case 200:t=100;break;default:t=1;break}return t}},moduleDetection:{dependencies:["module","target"],computeValue:e=>{if(e.moduleDetection!==void 0)return e.moduleDetection;let t=Xn.module.computeValue(e);return 100<=t&&t<=199?3:2}},isolatedModules:{dependencies:["verbatimModuleSyntax"],computeValue:e=>!!(e.isolatedModules||e.verbatimModuleSyntax)},esModuleInterop:{dependencies:["module","target"],computeValue:e=>{if(e.esModuleInterop!==void 0)return e.esModuleInterop;switch(Xn.module.computeValue(e)){case 100:case 101:case 102:case 199:case 200:return!0}return!1}},allowSyntheticDefaultImports:{dependencies:["module","target","moduleResolution"],computeValue:e=>e.allowSyntheticDefaultImports!==void 0?e.allowSyntheticDefaultImports:Xn.esModuleInterop.computeValue(e)||Xn.module.computeValue(e)===4||Xn.moduleResolution.computeValue(e)===100},resolvePackageJsonExports:{dependencies:["moduleResolution"],computeValue:e=>{let t=Xn.moduleResolution.computeValue(e);if(!Yfe(t))return!1;if(e.resolvePackageJsonExports!==void 0)return e.resolvePackageJsonExports;switch(t){case 3:case 99:case 100:return!0}return!1}},resolvePackageJsonImports:{dependencies:["moduleResolution","resolvePackageJsonExports"],computeValue:e=>{let t=Xn.moduleResolution.computeValue(e);if(!Yfe(t))return!1;if(e.resolvePackageJsonImports!==void 0)return e.resolvePackageJsonImports;switch(t){case 3:case 99:case 100:return!0}return!1}},resolveJsonModule:{dependencies:["moduleResolution","module","target"],computeValue:e=>{if(e.resolveJsonModule!==void 0)return e.resolveJsonModule;switch(Xn.module.computeValue(e)){case 102:case 199:return!0}return Xn.moduleResolution.computeValue(e)===100}},declaration:{dependencies:["composite"],computeValue:e=>!!(e.declaration||e.composite)},preserveConstEnums:{dependencies:["isolatedModules","verbatimModuleSyntax"],computeValue:e=>!!(e.preserveConstEnums||Xn.isolatedModules.computeValue(e))},incremental:{dependencies:["composite"],computeValue:e=>!!(e.incremental||e.composite)},declarationMap:{dependencies:["declaration","composite"],computeValue:e=>!!(e.declarationMap&&Xn.declaration.computeValue(e))},allowJs:{dependencies:["checkJs"],computeValue:e=>e.allowJs===void 0?!!e.checkJs:e.allowJs},useDefineForClassFields:{dependencies:["target","module"],computeValue:e=>e.useDefineForClassFields===void 0?Xn.target.computeValue(e)>=9:e.useDefineForClassFields},noImplicitAny:{dependencies:["strict"],computeValue:e=>Z_(e,"noImplicitAny")},noImplicitThis:{dependencies:["strict"],computeValue:e=>Z_(e,"noImplicitThis")},strictNullChecks:{dependencies:["strict"],computeValue:e=>Z_(e,"strictNullChecks")},strictFunctionTypes:{dependencies:["strict"],computeValue:e=>Z_(e,"strictFunctionTypes")},strictBindCallApply:{dependencies:["strict"],computeValue:e=>Z_(e,"strictBindCallApply")},strictPropertyInitialization:{dependencies:["strict"],computeValue:e=>Z_(e,"strictPropertyInitialization")},strictBuiltinIteratorReturn:{dependencies:["strict"],computeValue:e=>Z_(e,"strictBuiltinIteratorReturn")},alwaysStrict:{dependencies:["strict"],computeValue:e=>Z_(e,"alwaysStrict")},useUnknownInCatchVariables:{dependencies:["strict"],computeValue:e=>Z_(e,"useUnknownInCatchVariables")}},fjt=Xn.allowImportingTsExtensions.computeValue,mjt=Xn.target.computeValue,hjt=Xn.module.computeValue,yjt=Xn.moduleResolution.computeValue,gjt=Xn.moduleDetection.computeValue,Sjt=Xn.isolatedModules.computeValue,vjt=Xn.esModuleInterop.computeValue,bjt=Xn.allowSyntheticDefaultImports.computeValue,xjt=Xn.resolvePackageJsonExports.computeValue,Ejt=Xn.resolvePackageJsonImports.computeValue,Tjt=Xn.resolveJsonModule.computeValue,Djt=Xn.declaration.computeValue,Ajt=Xn.preserveConstEnums.computeValue,Ijt=Xn.incremental.computeValue,wjt=Xn.declarationMap.computeValue,kjt=Xn.allowJs.computeValue,Cjt=Xn.useDefineForClassFields.computeValue;function Yfe(e){return e>=3&&e<=99||e===100}function Z_(e,t){return e[t]===void 0?!!e.strict:!!e[t]}function zrt(e){return $tt(targetOptionDeclaration.type,(t,r)=>t===e?r:void 0)}var Jrt=["node_modules","bower_components","jspm_packages"],Khe=`(?!(?:${Jrt.join("|")})(?:/|$))`,Vrt={singleAsteriskRegexFragment:"(?:[^./]|(?:\\.(?!min\\.js$))?)*",doubleAsteriskRegexFragment:`(?:/${Khe}[^/.][^/]*)*?`,replaceWildcardCharacter:e=>Ghe(e,Vrt.singleAsteriskRegexFragment)},Krt={singleAsteriskRegexFragment:"[^/]*",doubleAsteriskRegexFragment:`(?:/${Khe}[^/.][^/]*)*?`,replaceWildcardCharacter:e=>Ghe(e,Krt.singleAsteriskRegexFragment)};function Ghe(e,t){return e==="*"?t:e==="?"?"[^/]":"\\"+e}function Grt(e,t){return t||Hrt(e)||3}function Hrt(e){switch(e.substr(e.lastIndexOf(".")).toLowerCase()){case".js":case".cjs":case".mjs":return 1;case".jsx":return 2;case".ts":case".cts":case".mts":return 3;case".tsx":return 4;case".json":return 6;default:return 0}}var Hhe=[[".ts",".tsx",".d.ts"],[".cts",".d.cts"],[".mts",".d.mts"]],Pjt=zme(Hhe),Ojt=[...Hhe,[".json"]],Zrt=[[".js",".jsx"],[".mjs"],[".cjs"]],Njt=zme(Zrt),Wrt=[[".ts",".tsx",".d.ts",".js",".jsx"],[".cts",".d.cts",".cjs"],[".mts",".d.mts",".mjs"]],Fjt=[...Wrt,[".json"]],Qrt=[".d.ts",".d.cts",".d.mts"];function QD(e){return!(e>=0)}function nO(e,...t){return t.length&&(e.relatedInformation||(e.relatedInformation=[]),pe.assert(e.relatedInformation!==ii,"Diagnostic had empty array singleton for related info, but is still being constructed!"),e.relatedInformation.push(...t)),e}function Xrt(e){let t;switch(e.charCodeAt(1)){case 98:case 66:t=1;break;case 111:case 79:t=3;break;case 120:case 88:t=4;break;default:let p=e.length-1,d=0;for(;e.charCodeAt(d)===48;)d++;return e.slice(d,p)||"0"}let r=2,n=e.length-1,o=(n-r)*t,i=new Uint16Array((o>>>4)+(o&15?1:0));for(let p=n-1,d=0;p>=r;p--,d+=t){let f=d>>>4,m=e.charCodeAt(p),y=(m<=57?m-48:10+m-(m<=70?65:97))<<(d&15);i[f]|=y;let g=y>>>16;g&&(i[f+1]|=g)}let a="",s=i.length-1,c=!0;for(;c;){let p=0;c=!1;for(let d=s;d>=0;d--){let f=p<<16|i[d],m=f/10|0;i[d]=m,p=f-m*10,m&&!c&&(s=d,c=!0)}a=p+a}return a}function Yrt({negative:e,base10Value:t}){return(e&&t!=="0"?"-":"")+t}function rJ(e,t){return e.pos=t,e}function ent(e,t){return e.end=t,e}function ch(e,t,r){return ent(rJ(e,t),r)}function eme(e,t,r){return ch(e,t,t+r)}function jJ(e,t){return e&&t&&(e.parent=t),e}function tnt(e,t){if(!e)return e;return kme(e,Fhe(e)?r:o),e;function r(i,a){if(t&&i.parent===a)return"skip";jJ(i,a)}function n(i){if(jg(i))for(let a of i.jsDoc)r(a,i),kme(a,r)}function o(i,a){return r(i,a)||n(i)}}function rnt(e){return!!(e.flags&262144&&e.isThisType)}function nnt(e){var t;return((t=getSnippetElement(e))==null?void 0:t.kind)===0}function ont(e){return`${uc(e.namespace)}:${uc(e.name)}`}var Rjt=String.prototype.replace,nJ=["assert","assert/strict","async_hooks","buffer","child_process","cluster","console","constants","crypto","dgram","diagnostics_channel","dns","dns/promises","domain","events","fs","fs/promises","http","http2","https","inspector","inspector/promises","module","net","os","path","path/posix","path/win32","perf_hooks","process","punycode","querystring","readline","readline/promises","repl","stream","stream/consumers","stream/promises","stream/web","string_decoder","sys","test/mock_loader","timers","timers/promises","tls","trace_events","tty","url","util","util/types","v8","vm","wasi","worker_threads","zlib"],Ljt=new Set(nJ),int=new Set(["node:sea","node:sqlite","node:test","node:test/reporters"]),$jt=new Set([...nJ,...nJ.map(e=>`node:${e}`),...int]);function ant(){let e,t,r,n,o;return{createBaseSourceFileNode:i,createBaseIdentifierNode:a,createBasePrivateIdentifierNode:s,createBaseTokenNode:c,createBaseNode:p};function i(d){return new(o||(o=oi.getSourceFileConstructor()))(d,-1,-1)}function a(d){return new(r||(r=oi.getIdentifierConstructor()))(d,-1,-1)}function s(d){return new(n||(n=oi.getPrivateIdentifierConstructor()))(d,-1,-1)}function c(d){return new(t||(t=oi.getTokenConstructor()))(d,-1,-1)}function p(d){return new(e||(e=oi.getNodeConstructor()))(d,-1,-1)}}var snt={getParenthesizeLeftSideOfBinaryForOperator:e=>Bo,getParenthesizeRightSideOfBinaryForOperator:e=>Bo,parenthesizeLeftSideOfBinary:(e,t)=>t,parenthesizeRightSideOfBinary:(e,t,r)=>r,parenthesizeExpressionOfComputedPropertyName:Bo,parenthesizeConditionOfConditionalExpression:Bo,parenthesizeBranchOfConditionalExpression:Bo,parenthesizeExpressionOfExportDefault:Bo,parenthesizeExpressionOfNew:e=>pd(e,S1),parenthesizeLeftSideOfAccess:e=>pd(e,S1),parenthesizeOperandOfPostfixUnary:e=>pd(e,S1),parenthesizeOperandOfPrefixUnary:e=>pd(e,Dtt),parenthesizeExpressionsOfCommaDelimitedList:e=>pd(e,ih),parenthesizeExpressionForDisallowedComma:Bo,parenthesizeExpressionOfExpressionStatement:Bo,parenthesizeConciseBodyOfArrowFunction:Bo,parenthesizeCheckTypeOfConditionalType:Bo,parenthesizeExtendsTypeOfConditionalType:Bo,parenthesizeConstituentTypesOfUnionType:e=>pd(e,ih),parenthesizeConstituentTypeOfUnionType:Bo,parenthesizeConstituentTypesOfIntersectionType:e=>pd(e,ih),parenthesizeConstituentTypeOfIntersectionType:Bo,parenthesizeOperandOfTypeOperator:Bo,parenthesizeOperandOfReadonlyTypeOperator:Bo,parenthesizeNonArrayTypeOfPostfixType:Bo,parenthesizeElementTypesOfTupleType:e=>pd(e,ih),parenthesizeElementTypeOfTupleType:Bo,parenthesizeTypeOfOptionalType:Bo,parenthesizeTypeArguments:e=>e&&pd(e,ih),parenthesizeLeadingTypeArgument:Bo},oO=0,cnt=[];function BJ(e,t){let r=e&8?Bo:_nt,n=Pfe(()=>e&1?snt:createParenthesizerRules(E)),o=Pfe(()=>e&2?nullNodeConverters:createNodeConverters(E)),i=Ml(l=>(_,h)=>jS(_,l,h)),a=Ml(l=>_=>Jd(l,_)),s=Ml(l=>_=>Rf(_,l)),c=Ml(l=>()=>rk(l)),p=Ml(l=>_=>Xb(l,_)),d=Ml(l=>(_,h)=>r8(l,_,h)),f=Ml(l=>(_,h)=>nk(l,_,h)),m=Ml(l=>(_,h)=>t8(l,_,h)),y=Ml(l=>(_,h)=>bk(l,_,h)),g=Ml(l=>(_,h,x)=>_8(l,_,h,x)),S=Ml(l=>(_,h,x)=>xk(l,_,h,x)),b=Ml(l=>(_,h,x,C)=>f8(l,_,h,x,C)),E={get parenthesizer(){return n()},get converters(){return o()},baseFactory:t,flags:e,createNodeArray:I,createNumericLiteral:O,createBigIntLiteral:$,createStringLiteral:U,createStringLiteralFromNode:ge,createRegularExpressionLiteral:Te,createLiteralLikeNode:ke,createIdentifier:xe,createTempVariable:Rt,createLoopVariable:Jt,createUniqueName:Yt,getGeneratedNameForNode:vt,createPrivateIdentifier:le,createUniquePrivateName:ae,getGeneratedPrivateNameForNode:he,createToken:pt,createSuper:Ye,createThis:lt,createNull:Nt,createTrue:Ct,createFalse:Zr,createModifier:wt,createModifiersFromModifierFlags:fo,createQualifiedName:nn,updateQualifiedName:Gn,createComputedPropertyName:bt,updateComputedPropertyName:Hn,createTypeParameterDeclaration:Di,updateTypeParameterDeclaration:Ga,createParameterDeclaration:ji,updateParameterDeclaration:iu,createDecorator:ol,updateDecorator:il,createPropertySignature:Md,updatePropertySignature:al,createPropertyDeclaration:lp,updatePropertyDeclaration:oe,createMethodSignature:qe,updateMethodSignature:et,createMethodDeclaration:Et,updateMethodDeclaration:Wr,createConstructorDeclaration:co,updateConstructorDeclaration:jd,createGetAccessorDeclaration:vc,updateGetAccessorDeclaration:sl,createSetAccessorDeclaration:ue,updateSetAccessorDeclaration:Ee,createCallSignature:Tt,updateCallSignature:At,createConstructSignature:kt,updateConstructSignature:ut,createIndexSignature:wr,updateIndexSignature:Tn,createClassStaticBlockDeclaration:ro,updateClassStaticBlockDeclaration:fi,createTemplateLiteralTypeSpan:$r,updateTemplateLiteralTypeSpan:Ft,createKeywordTypeNode:Bs,createTypePredicateNode:Zn,updateTypePredicateNode:_s,createTypeReferenceNode:Of,updateTypeReferenceNode:re,createFunctionTypeNode:fr,updateFunctionTypeNode:D,createConstructorTypeNode:er,updateConstructorTypeNode:Ha,createTypeQueryNode:mi,updateTypeQueryNode:ei,createTypeLiteralNode:hi,updateTypeLiteralNode:Gi,createArrayTypeNode:cl,updateArrayTypeNode:oy,createTupleTypeNode:fs,updateTupleTypeNode:ye,createNamedTupleMember:We,updateNamedTupleMember:br,createOptionalTypeNode:ht,updateOptionalTypeNode:ie,createRestTypeNode:To,updateRestTypeNode:zo,createUnionTypeNode:SR,updateUnionTypeNode:FI,createIntersectionTypeNode:Bd,updateIntersectionTypeNode:tr,createConditionalTypeNode:mo,updateConditionalTypeNode:vR,createInferTypeNode:ll,updateInferTypeNode:bR,createImportTypeNode:au,updateImportTypeNode:NS,createParenthesizedType:ba,updateParenthesizedType:ui,createThisTypeNode:X,createTypeOperatorNode:ua,updateTypeOperatorNode:qd,createIndexedAccessTypeNode:su,updateIndexedAccessTypeNode:xb,createMappedTypeNode:No,updateMappedTypeNode:qi,createLiteralTypeNode:Nf,updateLiteralTypeNode:pp,createTemplateLiteralType:la,updateTemplateLiteralType:xR,createObjectBindingPattern:RI,updateObjectBindingPattern:ER,createArrayBindingPattern:Ud,updateArrayBindingPattern:TR,createBindingElement:FS,updateBindingElement:Ff,createArrayLiteralExpression:Eb,updateArrayLiteralExpression:LI,createObjectLiteralExpression:iy,updateObjectLiteralExpression:DR,createPropertyAccessExpression:e&4?(l,_)=>setEmitFlags(cu(l,_),262144):cu,updatePropertyAccessExpression:AR,createPropertyAccessChain:e&4?(l,_,h)=>setEmitFlags(ay(l,_,h),262144):ay,updatePropertyAccessChain:RS,createElementAccessExpression:sy,updateElementAccessExpression:IR,createElementAccessChain:jI,updateElementAccessChain:Tb,createCallExpression:cy,updateCallExpression:LS,createCallChain:Db,updateCallChain:qI,createNewExpression:qs,updateNewExpression:Ab,createTaggedTemplateExpression:$S,updateTaggedTemplateExpression:UI,createTypeAssertion:zI,updateTypeAssertion:JI,createParenthesizedExpression:Ib,updateParenthesizedExpression:VI,createFunctionExpression:wb,updateFunctionExpression:KI,createArrowFunction:kb,updateArrowFunction:GI,createDeleteExpression:HI,updateDeleteExpression:ZI,createTypeOfExpression:MS,updateTypeOfExpression:hs,createVoidExpression:Cb,updateVoidExpression:lu,createAwaitExpression:WI,updateAwaitExpression:zd,createPrefixUnaryExpression:Jd,updatePrefixUnaryExpression:wR,createPostfixUnaryExpression:Rf,updatePostfixUnaryExpression:kR,createBinaryExpression:jS,updateBinaryExpression:CR,createConditionalExpression:XI,updateConditionalExpression:YI,createTemplateExpression:ew,updateTemplateExpression:ul,createTemplateHead:rw,createTemplateMiddle:BS,createTemplateTail:Pb,createNoSubstitutionTemplateLiteral:OR,createTemplateLiteralLikeNode:$f,createYieldExpression:Ob,updateYieldExpression:NR,createSpreadElement:nw,updateSpreadElement:FR,createClassExpression:ow,updateClassExpression:Nb,createOmittedExpression:Fb,createExpressionWithTypeArguments:iw,updateExpressionWithTypeArguments:aw,createAsExpression:ys,updateAsExpression:qS,createNonNullExpression:sw,updateNonNullExpression:cw,createSatisfiesExpression:Rb,updateSatisfiesExpression:lw,createNonNullChain:Lb,updateNonNullChain:bc,createMetaProperty:uw,updateMetaProperty:$b,createTemplateSpan:pl,updateTemplateSpan:US,createSemicolonClassElement:pw,createBlock:Vd,updateBlock:RR,createVariableStatement:Mb,updateVariableStatement:dw,createEmptyStatement:_w,createExpressionStatement:uy,updateExpressionStatement:fw,createIfStatement:mw,updateIfStatement:hw,createDoStatement:yw,updateDoStatement:gw,createWhileStatement:Sw,updateWhileStatement:LR,createForStatement:vw,updateForStatement:bw,createForInStatement:jb,updateForInStatement:$R,createForOfStatement:xw,updateForOfStatement:MR,createContinueStatement:Ew,updateContinueStatement:jR,createBreakStatement:Bb,updateBreakStatement:Tw,createReturnStatement:qb,updateReturnStatement:BR,createWithStatement:Ub,updateWithStatement:Dw,createSwitchStatement:zb,updateSwitchStatement:Mf,createLabeledStatement:Aw,updateLabeledStatement:Iw,createThrowStatement:ww,updateThrowStatement:qR,createTryStatement:kw,updateTryStatement:UR,createDebuggerStatement:Cw,createVariableDeclaration:zS,updateVariableDeclaration:Pw,createVariableDeclarationList:Jb,updateVariableDeclarationList:zR,createFunctionDeclaration:Ow,updateFunctionDeclaration:Vb,createClassDeclaration:Nw,updateClassDeclaration:JS,createInterfaceDeclaration:Fw,updateInterfaceDeclaration:Rw,createTypeAliasDeclaration:no,updateTypeAliasDeclaration:dp,createEnumDeclaration:Kb,updateEnumDeclaration:_p,createModuleDeclaration:Lw,updateModuleDeclaration:ti,createModuleBlock:fp,updateModuleBlock:Hi,createCaseBlock:$w,updateCaseBlock:VR,createNamespaceExportDeclaration:Mw,updateNamespaceExportDeclaration:jw,createImportEqualsDeclaration:Bw,updateImportEqualsDeclaration:qw,createImportDeclaration:Uw,updateImportDeclaration:zw,createImportClause:Jw,updateImportClause:Vw,createAssertClause:Gb,updateAssertClause:GR,createAssertEntry:py,updateAssertEntry:Kw,createImportTypeAssertionContainer:Hb,updateImportTypeAssertionContainer:Gw,createImportAttributes:Hw,updateImportAttributes:Zb,createImportAttribute:Zw,updateImportAttribute:Ww,createNamespaceImport:Qw,updateNamespaceImport:HR,createNamespaceExport:Xw,updateNamespaceExport:ZR,createNamedImports:Yw,updateNamedImports:ek,createImportSpecifier:mp,updateImportSpecifier:WR,createExportAssignment:VS,updateExportAssignment:dy,createExportDeclaration:KS,updateExportDeclaration:tk,createNamedExports:Wb,updateNamedExports:QR,createExportSpecifier:GS,updateExportSpecifier:XR,createMissingDeclaration:YR,createExternalModuleReference:Qb,updateExternalModuleReference:e8,get createJSDocAllType(){return c(313)},get createJSDocUnknownType(){return c(314)},get createJSDocNonNullableType(){return f(316)},get updateJSDocNonNullableType(){return m(316)},get createJSDocNullableType(){return f(315)},get updateJSDocNullableType(){return m(315)},get createJSDocOptionalType(){return p(317)},get updateJSDocOptionalType(){return d(317)},get createJSDocVariadicType(){return p(319)},get updateJSDocVariadicType(){return d(319)},get createJSDocNamepathType(){return p(320)},get updateJSDocNamepathType(){return d(320)},createJSDocFunctionType:ok,updateJSDocFunctionType:n8,createJSDocTypeLiteral:ik,updateJSDocTypeLiteral:o8,createJSDocTypeExpression:ak,updateJSDocTypeExpression:Yb,createJSDocSignature:sk,updateJSDocSignature:i8,createJSDocTemplateTag:ex,updateJSDocTemplateTag:ck,createJSDocTypedefTag:HS,updateJSDocTypedefTag:a8,createJSDocParameterTag:tx,updateJSDocParameterTag:s8,createJSDocPropertyTag:lk,updateJSDocPropertyTag:uk,createJSDocCallbackTag:pk,updateJSDocCallbackTag:dk,createJSDocOverloadTag:_k,updateJSDocOverloadTag:rx,createJSDocAugmentsTag:nx,updateJSDocAugmentsTag:fy,createJSDocImplementsTag:fk,updateJSDocImplementsTag:d8,createJSDocSeeTag:Gd,updateJSDocSeeTag:ZS,createJSDocImportTag:Dk,updateJSDocImportTag:Ak,createJSDocNameReference:mk,updateJSDocNameReference:c8,createJSDocMemberName:hk,updateJSDocMemberName:l8,createJSDocLink:yk,updateJSDocLink:gk,createJSDocLinkCode:Sk,updateJSDocLinkCode:u8,createJSDocLinkPlain:vk,updateJSDocLinkPlain:p8,get createJSDocTypeTag(){return S(345)},get updateJSDocTypeTag(){return b(345)},get createJSDocReturnTag(){return S(343)},get updateJSDocReturnTag(){return b(343)},get createJSDocThisTag(){return S(344)},get updateJSDocThisTag(){return b(344)},get createJSDocAuthorTag(){return y(331)},get updateJSDocAuthorTag(){return g(331)},get createJSDocClassTag(){return y(333)},get updateJSDocClassTag(){return g(333)},get createJSDocPublicTag(){return y(334)},get updateJSDocPublicTag(){return g(334)},get createJSDocPrivateTag(){return y(335)},get updateJSDocPrivateTag(){return g(335)},get createJSDocProtectedTag(){return y(336)},get updateJSDocProtectedTag(){return g(336)},get createJSDocReadonlyTag(){return y(337)},get updateJSDocReadonlyTag(){return g(337)},get createJSDocOverrideTag(){return y(338)},get updateJSDocOverrideTag(){return g(338)},get createJSDocDeprecatedTag(){return y(332)},get updateJSDocDeprecatedTag(){return g(332)},get createJSDocThrowsTag(){return S(350)},get updateJSDocThrowsTag(){return b(350)},get createJSDocSatisfiesTag(){return S(351)},get updateJSDocSatisfiesTag(){return b(351)},createJSDocEnumTag:Tk,updateJSDocEnumTag:ox,createJSDocUnknownTag:Ek,updateJSDocUnknownTag:m8,createJSDocText:ix,updateJSDocText:h8,createJSDocComment:my,updateJSDocComment:Ik,createJsxElement:wk,updateJsxElement:y8,createJsxSelfClosingElement:kk,updateJsxSelfClosingElement:g8,createJsxOpeningElement:WS,updateJsxOpeningElement:Ck,createJsxClosingElement:ax,updateJsxClosingElement:sx,createJsxFragment:pa,createJsxText:hy,updateJsxText:S8,createJsxOpeningFragment:Ok,createJsxJsxClosingFragment:Nk,updateJsxFragment:Pk,createJsxAttribute:Fk,updateJsxAttribute:v8,createJsxAttributes:yy,updateJsxAttributes:b8,createJsxSpreadAttribute:Rk,updateJsxSpreadAttribute:x8,createJsxExpression:Lk,updateJsxExpression:cx,createJsxNamespacedName:jf,updateJsxNamespacedName:E8,createCaseClause:QS,updateCaseClause:$k,createDefaultClause:Mk,updateDefaultClause:gy,createHeritageClause:lx,updateHeritageClause:T8,createCatchClause:jk,updateCatchClause:Bk,createPropertyAssignment:XS,updatePropertyAssignment:ux,createShorthandPropertyAssignment:qk,updateShorthandPropertyAssignment:D8,createSpreadAssignment:Uk,updateSpreadAssignment:zk,createEnumMember:px,updateEnumMember:xc,createSourceFile:Jk,updateSourceFile:k8,createRedirectedSourceFile:Vk,createBundle:Kk,updateBundle:Gk,createSyntheticExpression:C8,createSyntaxList:P8,createNotEmittedStatement:YS,createNotEmittedTypeElement:O8,createPartiallyEmittedExpression:fx,updatePartiallyEmittedExpression:Hk,createCommaListExpression:mx,updateCommaListExpression:F8,createSyntheticReferenceExpression:hx,updateSyntheticReferenceExpression:Zk,cloneNode:e0,get createComma(){return i(28)},get createAssignment(){return i(64)},get createLogicalOr(){return i(57)},get createLogicalAnd(){return i(56)},get createBitwiseOr(){return i(52)},get createBitwiseXor(){return i(53)},get createBitwiseAnd(){return i(51)},get createStrictEquality(){return i(37)},get createStrictInequality(){return i(38)},get createEquality(){return i(35)},get createInequality(){return i(36)},get createLessThan(){return i(30)},get createLessThanEquals(){return i(33)},get createGreaterThan(){return i(32)},get createGreaterThanEquals(){return i(34)},get createLeftShift(){return i(48)},get createRightShift(){return i(49)},get createUnsignedRightShift(){return i(50)},get createAdd(){return i(40)},get createSubtract(){return i(41)},get createMultiply(){return i(42)},get createDivide(){return i(44)},get createModulo(){return i(45)},get createExponent(){return i(43)},get createPrefixPlus(){return a(40)},get createPrefixMinus(){return a(41)},get createPrefixIncrement(){return a(46)},get createPrefixDecrement(){return a(47)},get createBitwiseNot(){return a(55)},get createLogicalNot(){return a(54)},get createPostfixIncrement(){return s(46)},get createPostfixDecrement(){return s(47)},createImmediatelyInvokedFunctionExpression:$8,createImmediatelyInvokedArrowFunction:M8,createVoidZero:Sy,createExportDefault:Xk,createExternalModuleExport:Yk,createTypeCheck:j8,createIsNotTypeCheck:yx,createMethodCall:Hd,createGlobalMethodCall:vy,createFunctionBindCall:B8,createFunctionCallCall:q8,createFunctionApplyCall:U8,createArraySliceCall:z8,createArrayConcatCall:by,createObjectDefinePropertyCall:J8,createObjectGetOwnPropertyDescriptorCall:gx,createReflectGetCall:qf,createReflectSetCall:eC,createPropertyDescriptor:V8,createCallBinding:oC,createAssignmentTargetWrapper:iC,inlineExpressions:v,getInternalName:P,getLocalName:R,getExportName:M,getDeclarationName:ee,getNamespaceMemberName:be,getExternalModuleOrNamespaceExportName:Ue,restoreOuterExpressions:rC,restoreEnclosingLabel:nC,createUseStrictPrologue:He,copyPrologue:Ce,copyStandardPrologue:mr,copyCustomPrologue:nr,ensureUseStrict:jt,liftToBlock:Wa,mergeLexicalEnvironment:uu,replaceModifiers:pu,replaceDecoratorsAndModifiers:Ec,replacePropertyName:Zd};return Vc(cnt,l=>l(E)),E;function I(l,_){if(l===void 0||l===ii)l=[];else if(ih(l)){if(_===void 0||l.hasTrailingComma===_)return l.transformFlags===void 0&&rme(l),pe.attachNodeArrayDebugInfo(l),l;let C=l.slice();return C.pos=l.pos,C.end=l.end,C.hasTrailingComma=_,C.transformFlags=l.transformFlags,pe.attachNodeArrayDebugInfo(C),C}let h=l.length,x=h>=1&&h<=4?l.slice():l;return x.pos=-1,x.end=-1,x.hasTrailingComma=!!_,x.transformFlags=0,rme(x),pe.attachNodeArrayDebugInfo(x),x}function T(l){return t.createBaseNode(l)}function k(l){let _=T(l);return _.symbol=void 0,_.localSymbol=void 0,_}function F(l,_){return l!==_&&(l.typeArguments=_.typeArguments),se(l,_)}function O(l,_=0){let h=typeof l=="number"?l+"":l;pe.assert(h.charCodeAt(0)!==45,"Negative numbers should be created in combination with createPrefixUnaryExpression");let x=k(9);return x.text=h,x.numericLiteralFlags=_,_&384&&(x.transformFlags|=1024),x}function $(l){let _=Oe(10);return _.text=typeof l=="string"?l:Yrt(l)+"n",_.transformFlags|=32,_}function N(l,_){let h=k(11);return h.text=l,h.singleQuote=_,h}function U(l,_,h){let x=N(l,_);return x.hasExtendedUnicodeEscape=h,h&&(x.transformFlags|=1024),x}function ge(l){let _=N(mrt(l),void 0);return _.textSourceNode=l,_}function Te(l){let _=Oe(14);return _.text=l,_}function ke(l,_){switch(l){case 9:return O(_,0);case 10:return $(_);case 11:return U(_,void 0);case 12:return hy(_,!1);case 13:return hy(_,!0);case 14:return Te(_);case 15:return $f(l,_,void 0,0)}}function Je(l){let _=t.createBaseIdentifierNode(80);return _.escapedText=l,_.jsDoc=void 0,_.flowNode=void 0,_.symbol=void 0,_}function me(l,_,h,x){let C=Je(l1(l));return setIdentifierAutoGenerate(C,{flags:_,id:oO,prefix:h,suffix:x}),oO++,C}function xe(l,_,h){_===void 0&&l&&(_=phe(l)),_===80&&(_=void 0);let x=Je(l1(l));return h&&(x.flags|=256),x.escapedText==="await"&&(x.transformFlags|=67108864),x.flags&256&&(x.transformFlags|=1024),x}function Rt(l,_,h,x){let C=1;_&&(C|=8);let j=me("",C,h,x);return l&&l(j),j}function Jt(l){let _=2;return l&&(_|=8),me("",_,void 0,void 0)}function Yt(l,_=0,h,x){return pe.assert(!(_&7),"Argument out of range: flags"),pe.assert((_&48)!==32,"GeneratedIdentifierFlags.FileLevel cannot be set without also setting GeneratedIdentifierFlags.Optimistic"),me(l,3|_,h,x)}function vt(l,_=0,h,x){pe.assert(!(_&7),"Argument out of range: flags");let C=l?Yz(l)?sJ(!1,h,l,x,uc):`generated@${getNodeId(l)}`:"";(h||x)&&(_|=16);let j=me(C,4|_,h,x);return j.original=l,j}function Fr(l){let _=t.createBasePrivateIdentifierNode(81);return _.escapedText=l,_.transformFlags|=16777216,_}function le(l){return fO(l,"#")||pe.fail("First character of private identifier must be #: "+l),Fr(l1(l))}function K(l,_,h,x){let C=Fr(l1(l));return setIdentifierAutoGenerate(C,{flags:_,id:oO,prefix:h,suffix:x}),oO++,C}function ae(l,_,h){l&&!fO(l,"#")&&pe.fail("First character of private identifier must be #: "+l);let x=8|(l?3:1);return K(l??"",x,_,h)}function he(l,_,h){let x=Yz(l)?sJ(!0,_,l,h,uc):`#generated@${getNodeId(l)}`,C=K(x,4|(_||h?16:0),_,h);return C.original=l,C}function Oe(l){return t.createBaseTokenNode(l)}function pt(l){pe.assert(l>=0&&l<=166,"Invalid token"),pe.assert(l<=15||l>=18,"Invalid token. Use 'createTemplateLiteralLikeNode' to create template literals."),pe.assert(l<=9||l>=15,"Invalid token. Use 'createLiteralLikeNode' to create literals."),pe.assert(l!==80,"Invalid token. Use 'createIdentifier' to create identifiers");let _=Oe(l),h=0;switch(l){case 134:h=384;break;case 160:h=4;break;case 125:case 123:case 124:case 148:case 128:case 138:case 87:case 133:case 150:case 163:case 146:case 151:case 103:case 147:case 164:case 154:case 136:case 155:case 116:case 159:case 157:h=1;break;case 108:h=134218752,_.flowNode=void 0;break;case 126:h=1024;break;case 129:h=16777216;break;case 110:h=16384,_.flowNode=void 0;break}return h&&(_.transformFlags|=h),_}function Ye(){return pt(108)}function lt(){return pt(110)}function Nt(){return pt(106)}function Ct(){return pt(112)}function Zr(){return pt(97)}function wt(l){return pt(l)}function fo(l){let _=[];return l&32&&_.push(wt(95)),l&128&&_.push(wt(138)),l&2048&&_.push(wt(90)),l&4096&&_.push(wt(87)),l&1&&_.push(wt(125)),l&2&&_.push(wt(123)),l&4&&_.push(wt(124)),l&64&&_.push(wt(128)),l&256&&_.push(wt(126)),l&16&&_.push(wt(164)),l&8&&_.push(wt(148)),l&512&&_.push(wt(129)),l&1024&&_.push(wt(134)),l&8192&&_.push(wt(103)),l&16384&&_.push(wt(147)),_.length?_:void 0}function nn(l,_){let h=T(167);return h.left=l,h.right=Dn(_),h.transformFlags|=fe(h.left)|p1(h.right),h.flowNode=void 0,h}function Gn(l,_,h){return l.left!==_||l.right!==h?se(nn(_,h),l):l}function bt(l){let _=T(168);return _.expression=n().parenthesizeExpressionOfComputedPropertyName(l),_.transformFlags|=fe(_.expression)|1024|131072,_}function Hn(l,_){return l.expression!==_?se(bt(_),l):l}function Di(l,_,h,x){let C=k(169);return C.modifiers=Kt(l),C.name=Dn(_),C.constraint=h,C.default=x,C.transformFlags=1,C.expression=void 0,C.jsDoc=void 0,C}function Ga(l,_,h,x,C){return l.modifiers!==_||l.name!==h||l.constraint!==x||l.default!==C?se(Di(_,h,x,C),l):l}function ji(l,_,h,x,C,j){let _e=k(170);return _e.modifiers=Kt(l),_e.dotDotDotToken=_,_e.name=Dn(h),_e.questionToken=x,_e.type=C,_e.initializer=xy(j),yrt(_e.name)?_e.transformFlags=1:_e.transformFlags=Pt(_e.modifiers)|fe(_e.dotDotDotToken)|Uc(_e.name)|fe(_e.questionToken)|fe(_e.initializer)|(_e.questionToken??_e.type?1:0)|(_e.dotDotDotToken??_e.initializer?1024:0)|(zc(_e.modifiers)&31?8192:0),_e.jsDoc=void 0,_e}function iu(l,_,h,x,C,j,_e){return l.modifiers!==_||l.dotDotDotToken!==h||l.name!==x||l.questionToken!==C||l.type!==j||l.initializer!==_e?se(ji(_,h,x,C,j,_e),l):l}function ol(l){let _=T(171);return _.expression=n().parenthesizeLeftSideOfAccess(l,!1),_.transformFlags|=fe(_.expression)|1|8192|33554432,_}function il(l,_){return l.expression!==_?se(ol(_),l):l}function Md(l,_,h,x){let C=k(172);return C.modifiers=Kt(l),C.name=Dn(_),C.type=x,C.questionToken=h,C.transformFlags=1,C.initializer=void 0,C.jsDoc=void 0,C}function al(l,_,h,x,C){return l.modifiers!==_||l.name!==h||l.questionToken!==x||l.type!==C?Vt(Md(_,h,x,C),l):l}function Vt(l,_){return l!==_&&(l.initializer=_.initializer),se(l,_)}function lp(l,_,h,x,C){let j=k(173);j.modifiers=Kt(l),j.name=Dn(_),j.questionToken=h&&ome(h)?h:void 0,j.exclamationToken=h&&nme(h)?h:void 0,j.type=x,j.initializer=xy(C);let _e=j.flags&33554432||zc(j.modifiers)&128;return j.transformFlags=Pt(j.modifiers)|Uc(j.name)|fe(j.initializer)|(_e||j.questionToken||j.exclamationToken||j.type?1:0)|(Zhe(j.name)||zc(j.modifiers)&256&&j.initializer?8192:0)|16777216,j.jsDoc=void 0,j}function oe(l,_,h,x,C,j){return l.modifiers!==_||l.name!==h||l.questionToken!==(x!==void 0&&ome(x)?x:void 0)||l.exclamationToken!==(x!==void 0&&nme(x)?x:void 0)||l.type!==C||l.initializer!==j?se(lp(_,h,x,C,j),l):l}function qe(l,_,h,x,C,j){let _e=k(174);return _e.modifiers=Kt(l),_e.name=Dn(_),_e.questionToken=h,_e.typeParameters=Kt(x),_e.parameters=Kt(C),_e.type=j,_e.transformFlags=1,_e.jsDoc=void 0,_e.locals=void 0,_e.nextContainer=void 0,_e.typeArguments=void 0,_e}function et(l,_,h,x,C,j,_e){return l.modifiers!==_||l.name!==h||l.questionToken!==x||l.typeParameters!==C||l.parameters!==j||l.type!==_e?F(qe(_,h,x,C,j,_e),l):l}function Et(l,_,h,x,C,j,_e,Qe){let xr=k(175);if(xr.modifiers=Kt(l),xr.asteriskToken=_,xr.name=Dn(h),xr.questionToken=x,xr.exclamationToken=void 0,xr.typeParameters=Kt(C),xr.parameters=I(j),xr.type=_e,xr.body=Qe,!xr.body)xr.transformFlags=1;else{let Ii=zc(xr.modifiers)&1024,du=!!xr.asteriskToken,Js=Ii&&du;xr.transformFlags=Pt(xr.modifiers)|fe(xr.asteriskToken)|Uc(xr.name)|fe(xr.questionToken)|Pt(xr.typeParameters)|Pt(xr.parameters)|fe(xr.type)|fe(xr.body)&-67108865|(Js?128:Ii?256:du?2048:0)|(xr.questionToken||xr.typeParameters||xr.type?1:0)|1024}return xr.typeArguments=void 0,xr.jsDoc=void 0,xr.locals=void 0,xr.nextContainer=void 0,xr.flowNode=void 0,xr.endFlowNode=void 0,xr.returnFlowNode=void 0,xr}function Wr(l,_,h,x,C,j,_e,Qe,xr){return l.modifiers!==_||l.asteriskToken!==h||l.name!==x||l.questionToken!==C||l.typeParameters!==j||l.parameters!==_e||l.type!==Qe||l.body!==xr?_n(Et(_,h,x,C,j,_e,Qe,xr),l):l}function _n(l,_){return l!==_&&(l.exclamationToken=_.exclamationToken),se(l,_)}function ro(l){let _=k(176);return _.body=l,_.transformFlags=fe(l)|16777216,_.modifiers=void 0,_.jsDoc=void 0,_.locals=void 0,_.nextContainer=void 0,_.endFlowNode=void 0,_.returnFlowNode=void 0,_}function fi(l,_){return l.body!==_?Uo(ro(_),l):l}function Uo(l,_){return l!==_&&(l.modifiers=_.modifiers),se(l,_)}function co(l,_,h){let x=k(177);return x.modifiers=Kt(l),x.parameters=I(_),x.body=h,x.body?x.transformFlags=Pt(x.modifiers)|Pt(x.parameters)|fe(x.body)&-67108865|1024:x.transformFlags=1,x.typeParameters=void 0,x.type=void 0,x.typeArguments=void 0,x.jsDoc=void 0,x.locals=void 0,x.nextContainer=void 0,x.endFlowNode=void 0,x.returnFlowNode=void 0,x}function jd(l,_,h,x){return l.modifiers!==_||l.parameters!==h||l.body!==x?up(co(_,h,x),l):l}function up(l,_){return l!==_&&(l.typeParameters=_.typeParameters,l.type=_.type),F(l,_)}function vc(l,_,h,x,C){let j=k(178);return j.modifiers=Kt(l),j.name=Dn(_),j.parameters=I(h),j.type=x,j.body=C,j.body?j.transformFlags=Pt(j.modifiers)|Uc(j.name)|Pt(j.parameters)|fe(j.type)|fe(j.body)&-67108865|(j.type?1:0):j.transformFlags=1,j.typeArguments=void 0,j.typeParameters=void 0,j.jsDoc=void 0,j.locals=void 0,j.nextContainer=void 0,j.flowNode=void 0,j.endFlowNode=void 0,j.returnFlowNode=void 0,j}function sl(l,_,h,x,C,j){return l.modifiers!==_||l.name!==h||l.parameters!==x||l.type!==C||l.body!==j?ny(vc(_,h,x,C,j),l):l}function ny(l,_){return l!==_&&(l.typeParameters=_.typeParameters),F(l,_)}function ue(l,_,h,x){let C=k(179);return C.modifiers=Kt(l),C.name=Dn(_),C.parameters=I(h),C.body=x,C.body?C.transformFlags=Pt(C.modifiers)|Uc(C.name)|Pt(C.parameters)|fe(C.body)&-67108865|(C.type?1:0):C.transformFlags=1,C.typeArguments=void 0,C.typeParameters=void 0,C.type=void 0,C.jsDoc=void 0,C.locals=void 0,C.nextContainer=void 0,C.flowNode=void 0,C.endFlowNode=void 0,C.returnFlowNode=void 0,C}function Ee(l,_,h,x,C){return l.modifiers!==_||l.name!==h||l.parameters!==x||l.body!==C?Ie(ue(_,h,x,C),l):l}function Ie(l,_){return l!==_&&(l.typeParameters=_.typeParameters,l.type=_.type),F(l,_)}function Tt(l,_,h){let x=k(180);return x.typeParameters=Kt(l),x.parameters=Kt(_),x.type=h,x.transformFlags=1,x.jsDoc=void 0,x.locals=void 0,x.nextContainer=void 0,x.typeArguments=void 0,x}function At(l,_,h,x){return l.typeParameters!==_||l.parameters!==h||l.type!==x?F(Tt(_,h,x),l):l}function kt(l,_,h){let x=k(181);return x.typeParameters=Kt(l),x.parameters=Kt(_),x.type=h,x.transformFlags=1,x.jsDoc=void 0,x.locals=void 0,x.nextContainer=void 0,x.typeArguments=void 0,x}function ut(l,_,h,x){return l.typeParameters!==_||l.parameters!==h||l.type!==x?F(kt(_,h,x),l):l}function wr(l,_,h){let x=k(182);return x.modifiers=Kt(l),x.parameters=Kt(_),x.type=h,x.transformFlags=1,x.jsDoc=void 0,x.locals=void 0,x.nextContainer=void 0,x.typeArguments=void 0,x}function Tn(l,_,h,x){return l.parameters!==h||l.type!==x||l.modifiers!==_?F(wr(_,h,x),l):l}function $r(l,_){let h=T(205);return h.type=l,h.literal=_,h.transformFlags=1,h}function Ft(l,_,h){return l.type!==_||l.literal!==h?se($r(_,h),l):l}function Bs(l){return pt(l)}function Zn(l,_,h){let x=T(183);return x.assertsModifier=l,x.parameterName=Dn(_),x.type=h,x.transformFlags=1,x}function _s(l,_,h,x){return l.assertsModifier!==_||l.parameterName!==h||l.type!==x?se(Zn(_,h,x),l):l}function Of(l,_){let h=T(184);return h.typeName=Dn(l),h.typeArguments=_&&n().parenthesizeTypeArguments(I(_)),h.transformFlags=1,h}function re(l,_,h){return l.typeName!==_||l.typeArguments!==h?se(Of(_,h),l):l}function fr(l,_,h){let x=k(185);return x.typeParameters=Kt(l),x.parameters=Kt(_),x.type=h,x.transformFlags=1,x.modifiers=void 0,x.jsDoc=void 0,x.locals=void 0,x.nextContainer=void 0,x.typeArguments=void 0,x}function D(l,_,h,x){return l.typeParameters!==_||l.parameters!==h||l.type!==x?Ht(fr(_,h,x),l):l}function Ht(l,_){return l!==_&&(l.modifiers=_.modifiers),F(l,_)}function er(...l){return l.length===4?ce(...l):l.length===3?vr(...l):pe.fail("Incorrect number of arguments specified.")}function ce(l,_,h,x){let C=k(186);return C.modifiers=Kt(l),C.typeParameters=Kt(_),C.parameters=Kt(h),C.type=x,C.transformFlags=1,C.jsDoc=void 0,C.locals=void 0,C.nextContainer=void 0,C.typeArguments=void 0,C}function vr(l,_,h){return ce(void 0,l,_,h)}function Ha(...l){return l.length===5?Dr(...l):l.length===4?on(...l):pe.fail("Incorrect number of arguments specified.")}function Dr(l,_,h,x,C){return l.modifiers!==_||l.typeParameters!==h||l.parameters!==x||l.type!==C?F(er(_,h,x,C),l):l}function on(l,_,h,x){return Dr(l,l.modifiers,_,h,x)}function mi(l,_){let h=T(187);return h.exprName=l,h.typeArguments=_&&n().parenthesizeTypeArguments(_),h.transformFlags=1,h}function ei(l,_,h){return l.exprName!==_||l.typeArguments!==h?se(mi(_,h),l):l}function hi(l){let _=k(188);return _.members=I(l),_.transformFlags=1,_}function Gi(l,_){return l.members!==_?se(hi(_),l):l}function cl(l){let _=T(189);return _.elementType=n().parenthesizeNonArrayTypeOfPostfixType(l),_.transformFlags=1,_}function oy(l,_){return l.elementType!==_?se(cl(_),l):l}function fs(l){let _=T(190);return _.elements=I(n().parenthesizeElementTypesOfTupleType(l)),_.transformFlags=1,_}function ye(l,_){return l.elements!==_?se(fs(_),l):l}function We(l,_,h,x){let C=k(203);return C.dotDotDotToken=l,C.name=_,C.questionToken=h,C.type=x,C.transformFlags=1,C.jsDoc=void 0,C}function br(l,_,h,x,C){return l.dotDotDotToken!==_||l.name!==h||l.questionToken!==x||l.type!==C?se(We(_,h,x,C),l):l}function ht(l){let _=T(191);return _.type=n().parenthesizeTypeOfOptionalType(l),_.transformFlags=1,_}function ie(l,_){return l.type!==_?se(ht(_),l):l}function To(l){let _=T(192);return _.type=l,_.transformFlags=1,_}function zo(l,_){return l.type!==_?se(To(_),l):l}function Bi(l,_,h){let x=T(l);return x.types=E.createNodeArray(h(_)),x.transformFlags=1,x}function ms(l,_,h){return l.types!==_?se(Bi(l.kind,_,h),l):l}function SR(l){return Bi(193,l,n().parenthesizeConstituentTypesOfUnionType)}function FI(l,_){return ms(l,_,n().parenthesizeConstituentTypesOfUnionType)}function Bd(l){return Bi(194,l,n().parenthesizeConstituentTypesOfIntersectionType)}function tr(l,_){return ms(l,_,n().parenthesizeConstituentTypesOfIntersectionType)}function mo(l,_,h,x){let C=T(195);return C.checkType=n().parenthesizeCheckTypeOfConditionalType(l),C.extendsType=n().parenthesizeExtendsTypeOfConditionalType(_),C.trueType=h,C.falseType=x,C.transformFlags=1,C.locals=void 0,C.nextContainer=void 0,C}function vR(l,_,h,x,C){return l.checkType!==_||l.extendsType!==h||l.trueType!==x||l.falseType!==C?se(mo(_,h,x,C),l):l}function ll(l){let _=T(196);return _.typeParameter=l,_.transformFlags=1,_}function bR(l,_){return l.typeParameter!==_?se(ll(_),l):l}function la(l,_){let h=T(204);return h.head=l,h.templateSpans=I(_),h.transformFlags=1,h}function xR(l,_,h){return l.head!==_||l.templateSpans!==h?se(la(_,h),l):l}function au(l,_,h,x,C=!1){let j=T(206);return j.argument=l,j.attributes=_,j.assertions&&j.assertions.assertClause&&j.attributes&&(j.assertions.assertClause=j.attributes),j.qualifier=h,j.typeArguments=x&&n().parenthesizeTypeArguments(x),j.isTypeOf=C,j.transformFlags=1,j}function NS(l,_,h,x,C,j=l.isTypeOf){return l.argument!==_||l.attributes!==h||l.qualifier!==x||l.typeArguments!==C||l.isTypeOf!==j?se(au(_,h,x,C,j),l):l}function ba(l){let _=T(197);return _.type=l,_.transformFlags=1,_}function ui(l,_){return l.type!==_?se(ba(_),l):l}function X(){let l=T(198);return l.transformFlags=1,l}function ua(l,_){let h=T(199);return h.operator=l,h.type=l===148?n().parenthesizeOperandOfReadonlyTypeOperator(_):n().parenthesizeOperandOfTypeOperator(_),h.transformFlags=1,h}function qd(l,_){return l.type!==_?se(ua(l.operator,_),l):l}function su(l,_){let h=T(200);return h.objectType=n().parenthesizeNonArrayTypeOfPostfixType(l),h.indexType=_,h.transformFlags=1,h}function xb(l,_,h){return l.objectType!==_||l.indexType!==h?se(su(_,h),l):l}function No(l,_,h,x,C,j){let _e=k(201);return _e.readonlyToken=l,_e.typeParameter=_,_e.nameType=h,_e.questionToken=x,_e.type=C,_e.members=j&&I(j),_e.transformFlags=1,_e.locals=void 0,_e.nextContainer=void 0,_e}function qi(l,_,h,x,C,j,_e){return l.readonlyToken!==_||l.typeParameter!==h||l.nameType!==x||l.questionToken!==C||l.type!==j||l.members!==_e?se(No(_,h,x,C,j,_e),l):l}function Nf(l){let _=T(202);return _.literal=l,_.transformFlags=1,_}function pp(l,_){return l.literal!==_?se(Nf(_),l):l}function RI(l){let _=T(207);return _.elements=I(l),_.transformFlags|=Pt(_.elements)|1024|524288,_.transformFlags&32768&&(_.transformFlags|=65664),_}function ER(l,_){return l.elements!==_?se(RI(_),l):l}function Ud(l){let _=T(208);return _.elements=I(l),_.transformFlags|=Pt(_.elements)|1024|524288,_}function TR(l,_){return l.elements!==_?se(Ud(_),l):l}function FS(l,_,h,x){let C=k(209);return C.dotDotDotToken=l,C.propertyName=Dn(_),C.name=Dn(h),C.initializer=xy(x),C.transformFlags|=fe(C.dotDotDotToken)|Uc(C.propertyName)|Uc(C.name)|fe(C.initializer)|(C.dotDotDotToken?32768:0)|1024,C.flowNode=void 0,C}function Ff(l,_,h,x,C){return l.propertyName!==h||l.dotDotDotToken!==_||l.name!==x||l.initializer!==C?se(FS(_,h,x,C),l):l}function Eb(l,_){let h=T(210),x=l&&h1(l),C=I(l,x&&Qnt(x)?!0:void 0);return h.elements=n().parenthesizeExpressionsOfCommaDelimitedList(C),h.multiLine=_,h.transformFlags|=Pt(h.elements),h}function LI(l,_){return l.elements!==_?se(Eb(_,l.multiLine),l):l}function iy(l,_){let h=k(211);return h.properties=I(l),h.multiLine=_,h.transformFlags|=Pt(h.properties),h.jsDoc=void 0,h}function DR(l,_){return l.properties!==_?se(iy(_,l.multiLine),l):l}function $I(l,_,h){let x=k(212);return x.expression=l,x.questionDotToken=_,x.name=h,x.transformFlags=fe(x.expression)|fe(x.questionDotToken)|(kn(x.name)?p1(x.name):fe(x.name)|536870912),x.jsDoc=void 0,x.flowNode=void 0,x}function cu(l,_){let h=$I(n().parenthesizeLeftSideOfAccess(l,!1),void 0,Dn(_));return jz(l)&&(h.transformFlags|=384),h}function AR(l,_,h){return stt(l)?RS(l,_,l.questionDotToken,pd(h,kn)):l.expression!==_||l.name!==h?se(cu(_,h),l):l}function ay(l,_,h){let x=$I(n().parenthesizeLeftSideOfAccess(l,!0),_,Dn(h));return x.flags|=64,x.transformFlags|=32,x}function RS(l,_,h,x){return pe.assert(!!(l.flags&64),"Cannot update a PropertyAccessExpression using updatePropertyAccessChain. Use updatePropertyAccess instead."),l.expression!==_||l.questionDotToken!==h||l.name!==x?se(ay(_,h,x),l):l}function MI(l,_,h){let x=k(213);return x.expression=l,x.questionDotToken=_,x.argumentExpression=h,x.transformFlags|=fe(x.expression)|fe(x.questionDotToken)|fe(x.argumentExpression),x.jsDoc=void 0,x.flowNode=void 0,x}function sy(l,_){let h=MI(n().parenthesizeLeftSideOfAccess(l,!1),void 0,hp(_));return jz(l)&&(h.transformFlags|=384),h}function IR(l,_,h){return ctt(l)?Tb(l,_,l.questionDotToken,h):l.expression!==_||l.argumentExpression!==h?se(sy(_,h),l):l}function jI(l,_,h){let x=MI(n().parenthesizeLeftSideOfAccess(l,!0),_,hp(h));return x.flags|=64,x.transformFlags|=32,x}function Tb(l,_,h,x){return pe.assert(!!(l.flags&64),"Cannot update a ElementAccessExpression using updateElementAccessChain. Use updateElementAccess instead."),l.expression!==_||l.questionDotToken!==h||l.argumentExpression!==x?se(jI(_,h,x),l):l}function BI(l,_,h,x){let C=k(214);return C.expression=l,C.questionDotToken=_,C.typeArguments=h,C.arguments=x,C.transformFlags|=fe(C.expression)|fe(C.questionDotToken)|Pt(C.typeArguments)|Pt(C.arguments),C.typeArguments&&(C.transformFlags|=1),Zfe(C.expression)&&(C.transformFlags|=16384),C}function cy(l,_,h){let x=BI(n().parenthesizeLeftSideOfAccess(l,!1),void 0,Kt(_),n().parenthesizeExpressionsOfCommaDelimitedList(I(h)));return vnt(x.expression)&&(x.transformFlags|=8388608),x}function LS(l,_,h,x){return Ufe(l)?qI(l,_,l.questionDotToken,h,x):l.expression!==_||l.typeArguments!==h||l.arguments!==x?se(cy(_,h,x),l):l}function Db(l,_,h,x){let C=BI(n().parenthesizeLeftSideOfAccess(l,!0),_,Kt(h),n().parenthesizeExpressionsOfCommaDelimitedList(I(x)));return C.flags|=64,C.transformFlags|=32,C}function qI(l,_,h,x,C){return pe.assert(!!(l.flags&64),"Cannot update a CallExpression using updateCallChain. Use updateCall instead."),l.expression!==_||l.questionDotToken!==h||l.typeArguments!==x||l.arguments!==C?se(Db(_,h,x,C),l):l}function qs(l,_,h){let x=k(215);return x.expression=n().parenthesizeExpressionOfNew(l),x.typeArguments=Kt(_),x.arguments=h?n().parenthesizeExpressionsOfCommaDelimitedList(h):void 0,x.transformFlags|=fe(x.expression)|Pt(x.typeArguments)|Pt(x.arguments)|32,x.typeArguments&&(x.transformFlags|=1),x}function Ab(l,_,h,x){return l.expression!==_||l.typeArguments!==h||l.arguments!==x?se(qs(_,h,x),l):l}function $S(l,_,h){let x=T(216);return x.tag=n().parenthesizeLeftSideOfAccess(l,!1),x.typeArguments=Kt(_),x.template=h,x.transformFlags|=fe(x.tag)|Pt(x.typeArguments)|fe(x.template)|1024,x.typeArguments&&(x.transformFlags|=1),hrt(x.template)&&(x.transformFlags|=128),x}function UI(l,_,h,x){return l.tag!==_||l.typeArguments!==h||l.template!==x?se($S(_,h,x),l):l}function zI(l,_){let h=T(217);return h.expression=n().parenthesizeOperandOfPrefixUnary(_),h.type=l,h.transformFlags|=fe(h.expression)|fe(h.type)|1,h}function JI(l,_,h){return l.type!==_||l.expression!==h?se(zI(_,h),l):l}function Ib(l){let _=T(218);return _.expression=l,_.transformFlags=fe(_.expression),_.jsDoc=void 0,_}function VI(l,_){return l.expression!==_?se(Ib(_),l):l}function wb(l,_,h,x,C,j,_e){let Qe=k(219);Qe.modifiers=Kt(l),Qe.asteriskToken=_,Qe.name=Dn(h),Qe.typeParameters=Kt(x),Qe.parameters=I(C),Qe.type=j,Qe.body=_e;let xr=zc(Qe.modifiers)&1024,Ii=!!Qe.asteriskToken,du=xr&&Ii;return Qe.transformFlags=Pt(Qe.modifiers)|fe(Qe.asteriskToken)|Uc(Qe.name)|Pt(Qe.typeParameters)|Pt(Qe.parameters)|fe(Qe.type)|fe(Qe.body)&-67108865|(du?128:xr?256:Ii?2048:0)|(Qe.typeParameters||Qe.type?1:0)|4194304,Qe.typeArguments=void 0,Qe.jsDoc=void 0,Qe.locals=void 0,Qe.nextContainer=void 0,Qe.flowNode=void 0,Qe.endFlowNode=void 0,Qe.returnFlowNode=void 0,Qe}function KI(l,_,h,x,C,j,_e,Qe){return l.name!==x||l.modifiers!==_||l.asteriskToken!==h||l.typeParameters!==C||l.parameters!==j||l.type!==_e||l.body!==Qe?F(wb(_,h,x,C,j,_e,Qe),l):l}function kb(l,_,h,x,C,j){let _e=k(220);_e.modifiers=Kt(l),_e.typeParameters=Kt(_),_e.parameters=I(h),_e.type=x,_e.equalsGreaterThanToken=C??pt(39),_e.body=n().parenthesizeConciseBodyOfArrowFunction(j);let Qe=zc(_e.modifiers)&1024;return _e.transformFlags=Pt(_e.modifiers)|Pt(_e.typeParameters)|Pt(_e.parameters)|fe(_e.type)|fe(_e.equalsGreaterThanToken)|fe(_e.body)&-67108865|(_e.typeParameters||_e.type?1:0)|(Qe?16640:0)|1024,_e.typeArguments=void 0,_e.jsDoc=void 0,_e.locals=void 0,_e.nextContainer=void 0,_e.flowNode=void 0,_e.endFlowNode=void 0,_e.returnFlowNode=void 0,_e}function GI(l,_,h,x,C,j,_e){return l.modifiers!==_||l.typeParameters!==h||l.parameters!==x||l.type!==C||l.equalsGreaterThanToken!==j||l.body!==_e?F(kb(_,h,x,C,j,_e),l):l}function HI(l){let _=T(221);return _.expression=n().parenthesizeOperandOfPrefixUnary(l),_.transformFlags|=fe(_.expression),_}function ZI(l,_){return l.expression!==_?se(HI(_),l):l}function MS(l){let _=T(222);return _.expression=n().parenthesizeOperandOfPrefixUnary(l),_.transformFlags|=fe(_.expression),_}function hs(l,_){return l.expression!==_?se(MS(_),l):l}function Cb(l){let _=T(223);return _.expression=n().parenthesizeOperandOfPrefixUnary(l),_.transformFlags|=fe(_.expression),_}function lu(l,_){return l.expression!==_?se(Cb(_),l):l}function WI(l){let _=T(224);return _.expression=n().parenthesizeOperandOfPrefixUnary(l),_.transformFlags|=fe(_.expression)|256|128|2097152,_}function zd(l,_){return l.expression!==_?se(WI(_),l):l}function Jd(l,_){let h=T(225);return h.operator=l,h.operand=n().parenthesizeOperandOfPrefixUnary(_),h.transformFlags|=fe(h.operand),(l===46||l===47)&&kn(h.operand)&&!m1(h.operand)&&!cme(h.operand)&&(h.transformFlags|=268435456),h}function wR(l,_){return l.operand!==_?se(Jd(l.operator,_),l):l}function Rf(l,_){let h=T(226);return h.operator=_,h.operand=n().parenthesizeOperandOfPostfixUnary(l),h.transformFlags|=fe(h.operand),kn(h.operand)&&!m1(h.operand)&&!cme(h.operand)&&(h.transformFlags|=268435456),h}function kR(l,_){return l.operand!==_?se(Rf(_,l.operator),l):l}function jS(l,_,h){let x=k(227),C=G8(_),j=C.kind;return x.left=n().parenthesizeLeftSideOfBinary(j,l),x.operatorToken=C,x.right=n().parenthesizeRightSideOfBinary(j,x.left,h),x.transformFlags|=fe(x.left)|fe(x.operatorToken)|fe(x.right),j===61?x.transformFlags|=32:j===64?rye(x.left)?x.transformFlags|=5248|QI(x.left):Knt(x.left)&&(x.transformFlags|=5120|QI(x.left)):j===43||j===68?x.transformFlags|=512:Irt(j)&&(x.transformFlags|=16),j===103&&zg(x.left)&&(x.transformFlags|=536870912),x.jsDoc=void 0,x}function QI(l){return vye(l)?65536:0}function CR(l,_,h,x){return l.left!==_||l.operatorToken!==h||l.right!==x?se(jS(_,h,x),l):l}function XI(l,_,h,x,C){let j=T(228);return j.condition=n().parenthesizeConditionOfConditionalExpression(l),j.questionToken=_??pt(58),j.whenTrue=n().parenthesizeBranchOfConditionalExpression(h),j.colonToken=x??pt(59),j.whenFalse=n().parenthesizeBranchOfConditionalExpression(C),j.transformFlags|=fe(j.condition)|fe(j.questionToken)|fe(j.whenTrue)|fe(j.colonToken)|fe(j.whenFalse),j.flowNodeWhenFalse=void 0,j.flowNodeWhenTrue=void 0,j}function YI(l,_,h,x,C,j){return l.condition!==_||l.questionToken!==h||l.whenTrue!==x||l.colonToken!==C||l.whenFalse!==j?se(XI(_,h,x,C,j),l):l}function ew(l,_){let h=T(229);return h.head=l,h.templateSpans=I(_),h.transformFlags|=fe(h.head)|Pt(h.templateSpans)|1024,h}function ul(l,_,h){return l.head!==_||l.templateSpans!==h?se(ew(_,h),l):l}function ly(l,_,h,x=0){pe.assert(!(x&-7177),"Unsupported template flags.");let C;if(h!==void 0&&h!==_&&(C=lnt(l,h),typeof C=="object"))return pe.fail("Invalid raw text");if(_===void 0){if(C===void 0)return pe.fail("Arguments 'text' and 'rawText' may not both be undefined.");_=C}else C!==void 0&&pe.assert(_===C,"Expected argument 'text' to be the normalized (i.e. 'cooked') version of argument 'rawText'.");return _}function tw(l){let _=1024;return l&&(_|=128),_}function PR(l,_,h,x){let C=Oe(l);return C.text=_,C.rawText=h,C.templateFlags=x&7176,C.transformFlags=tw(C.templateFlags),C}function Lf(l,_,h,x){let C=k(l);return C.text=_,C.rawText=h,C.templateFlags=x&7176,C.transformFlags=tw(C.templateFlags),C}function $f(l,_,h,x){return l===15?Lf(l,_,h,x):PR(l,_,h,x)}function rw(l,_,h){return l=ly(16,l,_,h),$f(16,l,_,h)}function BS(l,_,h){return l=ly(16,l,_,h),$f(17,l,_,h)}function Pb(l,_,h){return l=ly(16,l,_,h),$f(18,l,_,h)}function OR(l,_,h){return l=ly(16,l,_,h),Lf(15,l,_,h)}function Ob(l,_){pe.assert(!l||!!_,"A `YieldExpression` with an asteriskToken must have an expression.");let h=T(230);return h.expression=_&&n().parenthesizeExpressionForDisallowedComma(_),h.asteriskToken=l,h.transformFlags|=fe(h.expression)|fe(h.asteriskToken)|1024|128|1048576,h}function NR(l,_,h){return l.expression!==h||l.asteriskToken!==_?se(Ob(_,h),l):l}function nw(l){let _=T(231);return _.expression=n().parenthesizeExpressionForDisallowedComma(l),_.transformFlags|=fe(_.expression)|1024|32768,_}function FR(l,_){return l.expression!==_?se(nw(_),l):l}function ow(l,_,h,x,C){let j=k(232);return j.modifiers=Kt(l),j.name=Dn(_),j.typeParameters=Kt(h),j.heritageClauses=Kt(x),j.members=I(C),j.transformFlags|=Pt(j.modifiers)|Uc(j.name)|Pt(j.typeParameters)|Pt(j.heritageClauses)|Pt(j.members)|(j.typeParameters?1:0)|1024,j.jsDoc=void 0,j}function Nb(l,_,h,x,C,j){return l.modifiers!==_||l.name!==h||l.typeParameters!==x||l.heritageClauses!==C||l.members!==j?se(ow(_,h,x,C,j),l):l}function Fb(){return T(233)}function iw(l,_){let h=T(234);return h.expression=n().parenthesizeLeftSideOfAccess(l,!1),h.typeArguments=_&&n().parenthesizeTypeArguments(_),h.transformFlags|=fe(h.expression)|Pt(h.typeArguments)|1024,h}function aw(l,_,h){return l.expression!==_||l.typeArguments!==h?se(iw(_,h),l):l}function ys(l,_){let h=T(235);return h.expression=l,h.type=_,h.transformFlags|=fe(h.expression)|fe(h.type)|1,h}function qS(l,_,h){return l.expression!==_||l.type!==h?se(ys(_,h),l):l}function sw(l){let _=T(236);return _.expression=n().parenthesizeLeftSideOfAccess(l,!1),_.transformFlags|=fe(_.expression)|1,_}function cw(l,_){return utt(l)?bc(l,_):l.expression!==_?se(sw(_),l):l}function Rb(l,_){let h=T(239);return h.expression=l,h.type=_,h.transformFlags|=fe(h.expression)|fe(h.type)|1,h}function lw(l,_,h){return l.expression!==_||l.type!==h?se(Rb(_,h),l):l}function Lb(l){let _=T(236);return _.flags|=64,_.expression=n().parenthesizeLeftSideOfAccess(l,!0),_.transformFlags|=fe(_.expression)|1,_}function bc(l,_){return pe.assert(!!(l.flags&64),"Cannot update a NonNullExpression using updateNonNullChain. Use updateNonNullExpression instead."),l.expression!==_?se(Lb(_),l):l}function uw(l,_){let h=T(237);switch(h.keywordToken=l,h.name=_,h.transformFlags|=fe(h.name),l){case 105:h.transformFlags|=1024;break;case 102:h.transformFlags|=32;break;default:return pe.assertNever(l)}return h.flowNode=void 0,h}function $b(l,_){return l.name!==_?se(uw(l.keywordToken,_),l):l}function pl(l,_){let h=T(240);return h.expression=l,h.literal=_,h.transformFlags|=fe(h.expression)|fe(h.literal)|1024,h}function US(l,_,h){return l.expression!==_||l.literal!==h?se(pl(_,h),l):l}function pw(){let l=T(241);return l.transformFlags|=1024,l}function Vd(l,_){let h=T(242);return h.statements=I(l),h.multiLine=_,h.transformFlags|=Pt(h.statements),h.jsDoc=void 0,h.locals=void 0,h.nextContainer=void 0,h}function RR(l,_){return l.statements!==_?se(Vd(_,l.multiLine),l):l}function Mb(l,_){let h=T(244);return h.modifiers=Kt(l),h.declarationList=rf(_)?Jb(_):_,h.transformFlags|=Pt(h.modifiers)|fe(h.declarationList),zc(h.modifiers)&128&&(h.transformFlags=1),h.jsDoc=void 0,h.flowNode=void 0,h}function dw(l,_,h){return l.modifiers!==_||l.declarationList!==h?se(Mb(_,h),l):l}function _w(){let l=T(243);return l.jsDoc=void 0,l}function uy(l){let _=T(245);return _.expression=n().parenthesizeExpressionOfExpressionStatement(l),_.transformFlags|=fe(_.expression),_.jsDoc=void 0,_.flowNode=void 0,_}function fw(l,_){return l.expression!==_?se(uy(_),l):l}function mw(l,_,h){let x=T(246);return x.expression=l,x.thenStatement=dl(_),x.elseStatement=dl(h),x.transformFlags|=fe(x.expression)|fe(x.thenStatement)|fe(x.elseStatement),x.jsDoc=void 0,x.flowNode=void 0,x}function hw(l,_,h,x){return l.expression!==_||l.thenStatement!==h||l.elseStatement!==x?se(mw(_,h,x),l):l}function yw(l,_){let h=T(247);return h.statement=dl(l),h.expression=_,h.transformFlags|=fe(h.statement)|fe(h.expression),h.jsDoc=void 0,h.flowNode=void 0,h}function gw(l,_,h){return l.statement!==_||l.expression!==h?se(yw(_,h),l):l}function Sw(l,_){let h=T(248);return h.expression=l,h.statement=dl(_),h.transformFlags|=fe(h.expression)|fe(h.statement),h.jsDoc=void 0,h.flowNode=void 0,h}function LR(l,_,h){return l.expression!==_||l.statement!==h?se(Sw(_,h),l):l}function vw(l,_,h,x){let C=T(249);return C.initializer=l,C.condition=_,C.incrementor=h,C.statement=dl(x),C.transformFlags|=fe(C.initializer)|fe(C.condition)|fe(C.incrementor)|fe(C.statement),C.jsDoc=void 0,C.locals=void 0,C.nextContainer=void 0,C.flowNode=void 0,C}function bw(l,_,h,x,C){return l.initializer!==_||l.condition!==h||l.incrementor!==x||l.statement!==C?se(vw(_,h,x,C),l):l}function jb(l,_,h){let x=T(250);return x.initializer=l,x.expression=_,x.statement=dl(h),x.transformFlags|=fe(x.initializer)|fe(x.expression)|fe(x.statement),x.jsDoc=void 0,x.locals=void 0,x.nextContainer=void 0,x.flowNode=void 0,x}function $R(l,_,h,x){return l.initializer!==_||l.expression!==h||l.statement!==x?se(jb(_,h,x),l):l}function xw(l,_,h,x){let C=T(251);return C.awaitModifier=l,C.initializer=_,C.expression=n().parenthesizeExpressionForDisallowedComma(h),C.statement=dl(x),C.transformFlags|=fe(C.awaitModifier)|fe(C.initializer)|fe(C.expression)|fe(C.statement)|1024,l&&(C.transformFlags|=128),C.jsDoc=void 0,C.locals=void 0,C.nextContainer=void 0,C.flowNode=void 0,C}function MR(l,_,h,x,C){return l.awaitModifier!==_||l.initializer!==h||l.expression!==x||l.statement!==C?se(xw(_,h,x,C),l):l}function Ew(l){let _=T(252);return _.label=Dn(l),_.transformFlags|=fe(_.label)|4194304,_.jsDoc=void 0,_.flowNode=void 0,_}function jR(l,_){return l.label!==_?se(Ew(_),l):l}function Bb(l){let _=T(253);return _.label=Dn(l),_.transformFlags|=fe(_.label)|4194304,_.jsDoc=void 0,_.flowNode=void 0,_}function Tw(l,_){return l.label!==_?se(Bb(_),l):l}function qb(l){let _=T(254);return _.expression=l,_.transformFlags|=fe(_.expression)|128|4194304,_.jsDoc=void 0,_.flowNode=void 0,_}function BR(l,_){return l.expression!==_?se(qb(_),l):l}function Ub(l,_){let h=T(255);return h.expression=l,h.statement=dl(_),h.transformFlags|=fe(h.expression)|fe(h.statement),h.jsDoc=void 0,h.flowNode=void 0,h}function Dw(l,_,h){return l.expression!==_||l.statement!==h?se(Ub(_,h),l):l}function zb(l,_){let h=T(256);return h.expression=n().parenthesizeExpressionForDisallowedComma(l),h.caseBlock=_,h.transformFlags|=fe(h.expression)|fe(h.caseBlock),h.jsDoc=void 0,h.flowNode=void 0,h.possiblyExhaustive=!1,h}function Mf(l,_,h){return l.expression!==_||l.caseBlock!==h?se(zb(_,h),l):l}function Aw(l,_){let h=T(257);return h.label=Dn(l),h.statement=dl(_),h.transformFlags|=fe(h.label)|fe(h.statement),h.jsDoc=void 0,h.flowNode=void 0,h}function Iw(l,_,h){return l.label!==_||l.statement!==h?se(Aw(_,h),l):l}function ww(l){let _=T(258);return _.expression=l,_.transformFlags|=fe(_.expression),_.jsDoc=void 0,_.flowNode=void 0,_}function qR(l,_){return l.expression!==_?se(ww(_),l):l}function kw(l,_,h){let x=T(259);return x.tryBlock=l,x.catchClause=_,x.finallyBlock=h,x.transformFlags|=fe(x.tryBlock)|fe(x.catchClause)|fe(x.finallyBlock),x.jsDoc=void 0,x.flowNode=void 0,x}function UR(l,_,h,x){return l.tryBlock!==_||l.catchClause!==h||l.finallyBlock!==x?se(kw(_,h,x),l):l}function Cw(){let l=T(260);return l.jsDoc=void 0,l.flowNode=void 0,l}function zS(l,_,h,x){let C=k(261);return C.name=Dn(l),C.exclamationToken=_,C.type=h,C.initializer=xy(x),C.transformFlags|=Uc(C.name)|fe(C.initializer)|(C.exclamationToken??C.type?1:0),C.jsDoc=void 0,C}function Pw(l,_,h,x,C){return l.name!==_||l.type!==x||l.exclamationToken!==h||l.initializer!==C?se(zS(_,h,x,C),l):l}function Jb(l,_=0){let h=T(262);return h.flags|=_&7,h.declarations=I(l),h.transformFlags|=Pt(h.declarations)|4194304,_&7&&(h.transformFlags|=263168),_&4&&(h.transformFlags|=4),h}function zR(l,_){return l.declarations!==_?se(Jb(_,l.flags),l):l}function Ow(l,_,h,x,C,j,_e){let Qe=k(263);if(Qe.modifiers=Kt(l),Qe.asteriskToken=_,Qe.name=Dn(h),Qe.typeParameters=Kt(x),Qe.parameters=I(C),Qe.type=j,Qe.body=_e,!Qe.body||zc(Qe.modifiers)&128)Qe.transformFlags=1;else{let xr=zc(Qe.modifiers)&1024,Ii=!!Qe.asteriskToken,du=xr&&Ii;Qe.transformFlags=Pt(Qe.modifiers)|fe(Qe.asteriskToken)|Uc(Qe.name)|Pt(Qe.typeParameters)|Pt(Qe.parameters)|fe(Qe.type)|fe(Qe.body)&-67108865|(du?128:xr?256:Ii?2048:0)|(Qe.typeParameters||Qe.type?1:0)|4194304}return Qe.typeArguments=void 0,Qe.jsDoc=void 0,Qe.locals=void 0,Qe.nextContainer=void 0,Qe.endFlowNode=void 0,Qe.returnFlowNode=void 0,Qe}function Vb(l,_,h,x,C,j,_e,Qe){return l.modifiers!==_||l.asteriskToken!==h||l.name!==x||l.typeParameters!==C||l.parameters!==j||l.type!==_e||l.body!==Qe?JR(Ow(_,h,x,C,j,_e,Qe),l):l}function JR(l,_){return l!==_&&l.modifiers===_.modifiers&&(l.modifiers=_.modifiers),F(l,_)}function Nw(l,_,h,x,C){let j=k(264);return j.modifiers=Kt(l),j.name=Dn(_),j.typeParameters=Kt(h),j.heritageClauses=Kt(x),j.members=I(C),zc(j.modifiers)&128?j.transformFlags=1:(j.transformFlags|=Pt(j.modifiers)|Uc(j.name)|Pt(j.typeParameters)|Pt(j.heritageClauses)|Pt(j.members)|(j.typeParameters?1:0)|1024,j.transformFlags&8192&&(j.transformFlags|=1)),j.jsDoc=void 0,j}function JS(l,_,h,x,C,j){return l.modifiers!==_||l.name!==h||l.typeParameters!==x||l.heritageClauses!==C||l.members!==j?se(Nw(_,h,x,C,j),l):l}function Fw(l,_,h,x,C){let j=k(265);return j.modifiers=Kt(l),j.name=Dn(_),j.typeParameters=Kt(h),j.heritageClauses=Kt(x),j.members=I(C),j.transformFlags=1,j.jsDoc=void 0,j}function Rw(l,_,h,x,C,j){return l.modifiers!==_||l.name!==h||l.typeParameters!==x||l.heritageClauses!==C||l.members!==j?se(Fw(_,h,x,C,j),l):l}function no(l,_,h,x){let C=k(266);return C.modifiers=Kt(l),C.name=Dn(_),C.typeParameters=Kt(h),C.type=x,C.transformFlags=1,C.jsDoc=void 0,C.locals=void 0,C.nextContainer=void 0,C}function dp(l,_,h,x,C){return l.modifiers!==_||l.name!==h||l.typeParameters!==x||l.type!==C?se(no(_,h,x,C),l):l}function Kb(l,_,h){let x=k(267);return x.modifiers=Kt(l),x.name=Dn(_),x.members=I(h),x.transformFlags|=Pt(x.modifiers)|fe(x.name)|Pt(x.members)|1,x.transformFlags&=-67108865,x.jsDoc=void 0,x}function _p(l,_,h,x){return l.modifiers!==_||l.name!==h||l.members!==x?se(Kb(_,h,x),l):l}function Lw(l,_,h,x=0){let C=k(268);return C.modifiers=Kt(l),C.flags|=x&2088,C.name=_,C.body=h,zc(C.modifiers)&128?C.transformFlags=1:C.transformFlags|=Pt(C.modifiers)|fe(C.name)|fe(C.body)|1,C.transformFlags&=-67108865,C.jsDoc=void 0,C.locals=void 0,C.nextContainer=void 0,C}function ti(l,_,h,x){return l.modifiers!==_||l.name!==h||l.body!==x?se(Lw(_,h,x,l.flags),l):l}function fp(l){let _=T(269);return _.statements=I(l),_.transformFlags|=Pt(_.statements),_.jsDoc=void 0,_}function Hi(l,_){return l.statements!==_?se(fp(_),l):l}function $w(l){let _=T(270);return _.clauses=I(l),_.transformFlags|=Pt(_.clauses),_.locals=void 0,_.nextContainer=void 0,_}function VR(l,_){return l.clauses!==_?se($w(_),l):l}function Mw(l){let _=k(271);return _.name=Dn(l),_.transformFlags|=p1(_.name)|1,_.modifiers=void 0,_.jsDoc=void 0,_}function jw(l,_){return l.name!==_?KR(Mw(_),l):l}function KR(l,_){return l!==_&&(l.modifiers=_.modifiers),se(l,_)}function Bw(l,_,h,x){let C=k(272);return C.modifiers=Kt(l),C.name=Dn(h),C.isTypeOnly=_,C.moduleReference=x,C.transformFlags|=Pt(C.modifiers)|p1(C.name)|fe(C.moduleReference),fye(C.moduleReference)||(C.transformFlags|=1),C.transformFlags&=-67108865,C.jsDoc=void 0,C}function qw(l,_,h,x,C){return l.modifiers!==_||l.isTypeOnly!==h||l.name!==x||l.moduleReference!==C?se(Bw(_,h,x,C),l):l}function Uw(l,_,h,x){let C=T(273);return C.modifiers=Kt(l),C.importClause=_,C.moduleSpecifier=h,C.attributes=C.assertClause=x,C.transformFlags|=fe(C.importClause)|fe(C.moduleSpecifier),C.transformFlags&=-67108865,C.jsDoc=void 0,C}function zw(l,_,h,x,C){return l.modifiers!==_||l.importClause!==h||l.moduleSpecifier!==x||l.attributes!==C?se(Uw(_,h,x,C),l):l}function Jw(l,_,h){let x=k(274);return typeof l=="boolean"&&(l=l?156:void 0),x.isTypeOnly=l===156,x.phaseModifier=l,x.name=_,x.namedBindings=h,x.transformFlags|=fe(x.name)|fe(x.namedBindings),l===156&&(x.transformFlags|=1),x.transformFlags&=-67108865,x}function Vw(l,_,h,x){return typeof _=="boolean"&&(_=_?156:void 0),l.phaseModifier!==_||l.name!==h||l.namedBindings!==x?se(Jw(_,h,x),l):l}function Gb(l,_){let h=T(301);return h.elements=I(l),h.multiLine=_,h.token=132,h.transformFlags|=4,h}function GR(l,_,h){return l.elements!==_||l.multiLine!==h?se(Gb(_,h),l):l}function py(l,_){let h=T(302);return h.name=l,h.value=_,h.transformFlags|=4,h}function Kw(l,_,h){return l.name!==_||l.value!==h?se(py(_,h),l):l}function Hb(l,_){let h=T(303);return h.assertClause=l,h.multiLine=_,h}function Gw(l,_,h){return l.assertClause!==_||l.multiLine!==h?se(Hb(_,h),l):l}function Hw(l,_,h){let x=T(301);return x.token=h??118,x.elements=I(l),x.multiLine=_,x.transformFlags|=4,x}function Zb(l,_,h){return l.elements!==_||l.multiLine!==h?se(Hw(_,h,l.token),l):l}function Zw(l,_){let h=T(302);return h.name=l,h.value=_,h.transformFlags|=4,h}function Ww(l,_,h){return l.name!==_||l.value!==h?se(Zw(_,h),l):l}function Qw(l){let _=k(275);return _.name=l,_.transformFlags|=fe(_.name),_.transformFlags&=-67108865,_}function HR(l,_){return l.name!==_?se(Qw(_),l):l}function Xw(l){let _=k(281);return _.name=l,_.transformFlags|=fe(_.name)|32,_.transformFlags&=-67108865,_}function ZR(l,_){return l.name!==_?se(Xw(_),l):l}function Yw(l){let _=T(276);return _.elements=I(l),_.transformFlags|=Pt(_.elements),_.transformFlags&=-67108865,_}function ek(l,_){return l.elements!==_?se(Yw(_),l):l}function mp(l,_,h){let x=k(277);return x.isTypeOnly=l,x.propertyName=_,x.name=h,x.transformFlags|=fe(x.propertyName)|fe(x.name),x.transformFlags&=-67108865,x}function WR(l,_,h,x){return l.isTypeOnly!==_||l.propertyName!==h||l.name!==x?se(mp(_,h,x),l):l}function VS(l,_,h){let x=k(278);return x.modifiers=Kt(l),x.isExportEquals=_,x.expression=_?n().parenthesizeRightSideOfBinary(64,void 0,h):n().parenthesizeExpressionOfExportDefault(h),x.transformFlags|=Pt(x.modifiers)|fe(x.expression),x.transformFlags&=-67108865,x.jsDoc=void 0,x}function dy(l,_,h){return l.modifiers!==_||l.expression!==h?se(VS(_,l.isExportEquals,h),l):l}function KS(l,_,h,x,C){let j=k(279);return j.modifiers=Kt(l),j.isTypeOnly=_,j.exportClause=h,j.moduleSpecifier=x,j.attributes=j.assertClause=C,j.transformFlags|=Pt(j.modifiers)|fe(j.exportClause)|fe(j.moduleSpecifier),j.transformFlags&=-67108865,j.jsDoc=void 0,j}function tk(l,_,h,x,C,j){return l.modifiers!==_||l.isTypeOnly!==h||l.exportClause!==x||l.moduleSpecifier!==C||l.attributes!==j?_y(KS(_,h,x,C,j),l):l}function _y(l,_){return l!==_&&l.modifiers===_.modifiers&&(l.modifiers=_.modifiers),se(l,_)}function Wb(l){let _=T(280);return _.elements=I(l),_.transformFlags|=Pt(_.elements),_.transformFlags&=-67108865,_}function QR(l,_){return l.elements!==_?se(Wb(_),l):l}function GS(l,_,h){let x=T(282);return x.isTypeOnly=l,x.propertyName=Dn(_),x.name=Dn(h),x.transformFlags|=fe(x.propertyName)|fe(x.name),x.transformFlags&=-67108865,x.jsDoc=void 0,x}function XR(l,_,h,x){return l.isTypeOnly!==_||l.propertyName!==h||l.name!==x?se(GS(_,h,x),l):l}function YR(){let l=k(283);return l.jsDoc=void 0,l}function Qb(l){let _=T(284);return _.expression=l,_.transformFlags|=fe(_.expression),_.transformFlags&=-67108865,_}function e8(l,_){return l.expression!==_?se(Qb(_),l):l}function rk(l){return T(l)}function nk(l,_,h=!1){let x=Xb(l,h?_&&n().parenthesizeNonArrayTypeOfPostfixType(_):_);return x.postfix=h,x}function Xb(l,_){let h=T(l);return h.type=_,h}function t8(l,_,h){return _.type!==h?se(nk(l,h,_.postfix),_):_}function r8(l,_,h){return _.type!==h?se(Xb(l,h),_):_}function ok(l,_){let h=k(318);return h.parameters=Kt(l),h.type=_,h.transformFlags=Pt(h.parameters)|(h.type?1:0),h.jsDoc=void 0,h.locals=void 0,h.nextContainer=void 0,h.typeArguments=void 0,h}function n8(l,_,h){return l.parameters!==_||l.type!==h?se(ok(_,h),l):l}function ik(l,_=!1){let h=k(323);return h.jsDocPropertyTags=Kt(l),h.isArrayType=_,h}function o8(l,_,h){return l.jsDocPropertyTags!==_||l.isArrayType!==h?se(ik(_,h),l):l}function ak(l){let _=T(310);return _.type=l,_}function Yb(l,_){return l.type!==_?se(ak(_),l):l}function sk(l,_,h){let x=k(324);return x.typeParameters=Kt(l),x.parameters=I(_),x.type=h,x.jsDoc=void 0,x.locals=void 0,x.nextContainer=void 0,x}function i8(l,_,h,x){return l.typeParameters!==_||l.parameters!==h||l.type!==x?se(sk(_,h,x),l):l}function Za(l){let _=iO(l.kind);return l.tagName.escapedText===l1(_)?l.tagName:xe(_)}function Us(l,_,h){let x=T(l);return x.tagName=_,x.comment=h,x}function Kd(l,_,h){let x=k(l);return x.tagName=_,x.comment=h,x}function ex(l,_,h,x){let C=Us(346,l??xe("template"),x);return C.constraint=_,C.typeParameters=I(h),C}function ck(l,_=Za(l),h,x,C){return l.tagName!==_||l.constraint!==h||l.typeParameters!==x||l.comment!==C?se(ex(_,h,x,C),l):l}function HS(l,_,h,x){let C=Kd(347,l??xe("typedef"),x);return C.typeExpression=_,C.fullName=h,C.name=lme(h),C.locals=void 0,C.nextContainer=void 0,C}function a8(l,_=Za(l),h,x,C){return l.tagName!==_||l.typeExpression!==h||l.fullName!==x||l.comment!==C?se(HS(_,h,x,C),l):l}function tx(l,_,h,x,C,j){let _e=Kd(342,l??xe("param"),j);return _e.typeExpression=x,_e.name=_,_e.isNameFirst=!!C,_e.isBracketed=h,_e}function s8(l,_=Za(l),h,x,C,j,_e){return l.tagName!==_||l.name!==h||l.isBracketed!==x||l.typeExpression!==C||l.isNameFirst!==j||l.comment!==_e?se(tx(_,h,x,C,j,_e),l):l}function lk(l,_,h,x,C,j){let _e=Kd(349,l??xe("prop"),j);return _e.typeExpression=x,_e.name=_,_e.isNameFirst=!!C,_e.isBracketed=h,_e}function uk(l,_=Za(l),h,x,C,j,_e){return l.tagName!==_||l.name!==h||l.isBracketed!==x||l.typeExpression!==C||l.isNameFirst!==j||l.comment!==_e?se(lk(_,h,x,C,j,_e),l):l}function pk(l,_,h,x){let C=Kd(339,l??xe("callback"),x);return C.typeExpression=_,C.fullName=h,C.name=lme(h),C.locals=void 0,C.nextContainer=void 0,C}function dk(l,_=Za(l),h,x,C){return l.tagName!==_||l.typeExpression!==h||l.fullName!==x||l.comment!==C?se(pk(_,h,x,C),l):l}function _k(l,_,h){let x=Us(340,l??xe("overload"),h);return x.typeExpression=_,x}function rx(l,_=Za(l),h,x){return l.tagName!==_||l.typeExpression!==h||l.comment!==x?se(_k(_,h,x),l):l}function nx(l,_,h){let x=Us(329,l??xe("augments"),h);return x.class=_,x}function fy(l,_=Za(l),h,x){return l.tagName!==_||l.class!==h||l.comment!==x?se(nx(_,h,x),l):l}function fk(l,_,h){let x=Us(330,l??xe("implements"),h);return x.class=_,x}function Gd(l,_,h){let x=Us(348,l??xe("see"),h);return x.name=_,x}function ZS(l,_,h,x){return l.tagName!==_||l.name!==h||l.comment!==x?se(Gd(_,h,x),l):l}function mk(l){let _=T(311);return _.name=l,_}function c8(l,_){return l.name!==_?se(mk(_),l):l}function hk(l,_){let h=T(312);return h.left=l,h.right=_,h.transformFlags|=fe(h.left)|fe(h.right),h}function l8(l,_,h){return l.left!==_||l.right!==h?se(hk(_,h),l):l}function yk(l,_){let h=T(325);return h.name=l,h.text=_,h}function gk(l,_,h){return l.name!==_?se(yk(_,h),l):l}function Sk(l,_){let h=T(326);return h.name=l,h.text=_,h}function u8(l,_,h){return l.name!==_?se(Sk(_,h),l):l}function vk(l,_){let h=T(327);return h.name=l,h.text=_,h}function p8(l,_,h){return l.name!==_?se(vk(_,h),l):l}function d8(l,_=Za(l),h,x){return l.tagName!==_||l.class!==h||l.comment!==x?se(fk(_,h,x),l):l}function bk(l,_,h){return Us(l,_??xe(iO(l)),h)}function _8(l,_,h=Za(_),x){return _.tagName!==h||_.comment!==x?se(bk(l,h,x),_):_}function xk(l,_,h,x){let C=Us(l,_??xe(iO(l)),x);return C.typeExpression=h,C}function f8(l,_,h=Za(_),x,C){return _.tagName!==h||_.typeExpression!==x||_.comment!==C?se(xk(l,h,x,C),_):_}function Ek(l,_){return Us(328,l,_)}function m8(l,_,h){return l.tagName!==_||l.comment!==h?se(Ek(_,h),l):l}function Tk(l,_,h){let x=Kd(341,l??xe(iO(341)),h);return x.typeExpression=_,x.locals=void 0,x.nextContainer=void 0,x}function ox(l,_=Za(l),h,x){return l.tagName!==_||l.typeExpression!==h||l.comment!==x?se(Tk(_,h,x),l):l}function Dk(l,_,h,x,C){let j=Us(352,l??xe("import"),C);return j.importClause=_,j.moduleSpecifier=h,j.attributes=x,j.comment=C,j}function Ak(l,_,h,x,C,j){return l.tagName!==_||l.comment!==j||l.importClause!==h||l.moduleSpecifier!==x||l.attributes!==C?se(Dk(_,h,x,C,j),l):l}function ix(l){let _=T(322);return _.text=l,_}function h8(l,_){return l.text!==_?se(ix(_),l):l}function my(l,_){let h=T(321);return h.comment=l,h.tags=Kt(_),h}function Ik(l,_,h){return l.comment!==_||l.tags!==h?se(my(_,h),l):l}function wk(l,_,h){let x=T(285);return x.openingElement=l,x.children=I(_),x.closingElement=h,x.transformFlags|=fe(x.openingElement)|Pt(x.children)|fe(x.closingElement)|2,x}function y8(l,_,h,x){return l.openingElement!==_||l.children!==h||l.closingElement!==x?se(wk(_,h,x),l):l}function kk(l,_,h){let x=T(286);return x.tagName=l,x.typeArguments=Kt(_),x.attributes=h,x.transformFlags|=fe(x.tagName)|Pt(x.typeArguments)|fe(x.attributes)|2,x.typeArguments&&(x.transformFlags|=1),x}function g8(l,_,h,x){return l.tagName!==_||l.typeArguments!==h||l.attributes!==x?se(kk(_,h,x),l):l}function WS(l,_,h){let x=T(287);return x.tagName=l,x.typeArguments=Kt(_),x.attributes=h,x.transformFlags|=fe(x.tagName)|Pt(x.typeArguments)|fe(x.attributes)|2,_&&(x.transformFlags|=1),x}function Ck(l,_,h,x){return l.tagName!==_||l.typeArguments!==h||l.attributes!==x?se(WS(_,h,x),l):l}function ax(l){let _=T(288);return _.tagName=l,_.transformFlags|=fe(_.tagName)|2,_}function sx(l,_){return l.tagName!==_?se(ax(_),l):l}function pa(l,_,h){let x=T(289);return x.openingFragment=l,x.children=I(_),x.closingFragment=h,x.transformFlags|=fe(x.openingFragment)|Pt(x.children)|fe(x.closingFragment)|2,x}function Pk(l,_,h,x){return l.openingFragment!==_||l.children!==h||l.closingFragment!==x?se(pa(_,h,x),l):l}function hy(l,_){let h=T(12);return h.text=l,h.containsOnlyTriviaWhiteSpaces=!!_,h.transformFlags|=2,h}function S8(l,_,h){return l.text!==_||l.containsOnlyTriviaWhiteSpaces!==h?se(hy(_,h),l):l}function Ok(){let l=T(290);return l.transformFlags|=2,l}function Nk(){let l=T(291);return l.transformFlags|=2,l}function Fk(l,_){let h=k(292);return h.name=l,h.initializer=_,h.transformFlags|=fe(h.name)|fe(h.initializer)|2,h}function v8(l,_,h){return l.name!==_||l.initializer!==h?se(Fk(_,h),l):l}function yy(l){let _=k(293);return _.properties=I(l),_.transformFlags|=Pt(_.properties)|2,_}function b8(l,_){return l.properties!==_?se(yy(_),l):l}function Rk(l){let _=T(294);return _.expression=l,_.transformFlags|=fe(_.expression)|2,_}function x8(l,_){return l.expression!==_?se(Rk(_),l):l}function Lk(l,_){let h=T(295);return h.dotDotDotToken=l,h.expression=_,h.transformFlags|=fe(h.dotDotDotToken)|fe(h.expression)|2,h}function cx(l,_){return l.expression!==_?se(Lk(l.dotDotDotToken,_),l):l}function jf(l,_){let h=T(296);return h.namespace=l,h.name=_,h.transformFlags|=fe(h.namespace)|fe(h.name)|2,h}function E8(l,_,h){return l.namespace!==_||l.name!==h?se(jf(_,h),l):l}function QS(l,_){let h=T(297);return h.expression=n().parenthesizeExpressionForDisallowedComma(l),h.statements=I(_),h.transformFlags|=fe(h.expression)|Pt(h.statements),h.jsDoc=void 0,h}function $k(l,_,h){return l.expression!==_||l.statements!==h?se(QS(_,h),l):l}function Mk(l){let _=T(298);return _.statements=I(l),_.transformFlags=Pt(_.statements),_}function gy(l,_){return l.statements!==_?se(Mk(_),l):l}function lx(l,_){let h=T(299);switch(h.token=l,h.types=I(_),h.transformFlags|=Pt(h.types),l){case 96:h.transformFlags|=1024;break;case 119:h.transformFlags|=1;break;default:return pe.assertNever(l)}return h}function T8(l,_){return l.types!==_?se(lx(l.token,_),l):l}function jk(l,_){let h=T(300);return h.variableDeclaration=zs(l),h.block=_,h.transformFlags|=fe(h.variableDeclaration)|fe(h.block)|(l?0:64),h.locals=void 0,h.nextContainer=void 0,h}function Bk(l,_,h){return l.variableDeclaration!==_||l.block!==h?se(jk(_,h),l):l}function XS(l,_){let h=k(304);return h.name=Dn(l),h.initializer=n().parenthesizeExpressionForDisallowedComma(_),h.transformFlags|=Uc(h.name)|fe(h.initializer),h.modifiers=void 0,h.questionToken=void 0,h.exclamationToken=void 0,h.jsDoc=void 0,h}function ux(l,_,h){return l.name!==_||l.initializer!==h?Bf(XS(_,h),l):l}function Bf(l,_){return l!==_&&(l.modifiers=_.modifiers,l.questionToken=_.questionToken,l.exclamationToken=_.exclamationToken),se(l,_)}function qk(l,_){let h=k(305);return h.name=Dn(l),h.objectAssignmentInitializer=_&&n().parenthesizeExpressionForDisallowedComma(_),h.transformFlags|=p1(h.name)|fe(h.objectAssignmentInitializer)|1024,h.equalsToken=void 0,h.modifiers=void 0,h.questionToken=void 0,h.exclamationToken=void 0,h.jsDoc=void 0,h}function D8(l,_,h){return l.name!==_||l.objectAssignmentInitializer!==h?A8(qk(_,h),l):l}function A8(l,_){return l!==_&&(l.modifiers=_.modifiers,l.questionToken=_.questionToken,l.exclamationToken=_.exclamationToken,l.equalsToken=_.equalsToken),se(l,_)}function Uk(l){let _=k(306);return _.expression=n().parenthesizeExpressionForDisallowedComma(l),_.transformFlags|=fe(_.expression)|128|65536,_.jsDoc=void 0,_}function zk(l,_){return l.expression!==_?se(Uk(_),l):l}function px(l,_){let h=k(307);return h.name=Dn(l),h.initializer=_&&n().parenthesizeExpressionForDisallowedComma(_),h.transformFlags|=fe(h.name)|fe(h.initializer)|1,h.jsDoc=void 0,h}function xc(l,_,h){return l.name!==_||l.initializer!==h?se(px(_,h),l):l}function Jk(l,_,h){let x=t.createBaseSourceFileNode(308);return x.statements=I(l),x.endOfFileToken=_,x.flags|=h,x.text="",x.fileName="",x.path="",x.resolvedPath="",x.originalFileName="",x.languageVersion=1,x.languageVariant=0,x.scriptKind=0,x.isDeclarationFile=!1,x.hasNoDefaultLib=!1,x.transformFlags|=Pt(x.statements)|fe(x.endOfFileToken),x.locals=void 0,x.nextContainer=void 0,x.endFlowNode=void 0,x.nodeCount=0,x.identifierCount=0,x.symbolCount=0,x.parseDiagnostics=void 0,x.bindDiagnostics=void 0,x.bindSuggestionDiagnostics=void 0,x.lineMap=void 0,x.externalModuleIndicator=void 0,x.setExternalModuleIndicator=void 0,x.pragmas=void 0,x.checkJsDirective=void 0,x.referencedFiles=void 0,x.typeReferenceDirectives=void 0,x.libReferenceDirectives=void 0,x.amdDependencies=void 0,x.commentDirectives=void 0,x.identifiers=void 0,x.packageJsonLocations=void 0,x.packageJsonScope=void 0,x.imports=void 0,x.moduleAugmentations=void 0,x.ambientModuleNames=void 0,x.classifiableNames=void 0,x.impliedNodeFormat=void 0,x}function Vk(l){let _=Object.create(l.redirectTarget);return Object.defineProperties(_,{id:{get(){return this.redirectInfo.redirectTarget.id},set(h){this.redirectInfo.redirectTarget.id=h}},symbol:{get(){return this.redirectInfo.redirectTarget.symbol},set(h){this.redirectInfo.redirectTarget.symbol=h}}}),_.redirectInfo=l,_}function I8(l){let _=Vk(l.redirectInfo);return _.flags|=l.flags&-17,_.fileName=l.fileName,_.path=l.path,_.resolvedPath=l.resolvedPath,_.originalFileName=l.originalFileName,_.packageJsonLocations=l.packageJsonLocations,_.packageJsonScope=l.packageJsonScope,_.emitNode=void 0,_}function w8(l){let _=t.createBaseSourceFileNode(308);_.flags|=l.flags&-17;for(let h in l)if(!(fd(_,h)||!fd(l,h))){if(h==="emitNode"){_.emitNode=void 0;continue}_[h]=l[h]}return _}function dx(l){let _=l.redirectInfo?I8(l):w8(l);return r(_,l),_}function _x(l,_,h,x,C,j,_e){let Qe=dx(l);return Qe.statements=I(_),Qe.isDeclarationFile=h,Qe.referencedFiles=x,Qe.typeReferenceDirectives=C,Qe.hasNoDefaultLib=j,Qe.libReferenceDirectives=_e,Qe.transformFlags=Pt(Qe.statements)|fe(Qe.endOfFileToken),Qe}function k8(l,_,h=l.isDeclarationFile,x=l.referencedFiles,C=l.typeReferenceDirectives,j=l.hasNoDefaultLib,_e=l.libReferenceDirectives){return l.statements!==_||l.isDeclarationFile!==h||l.referencedFiles!==x||l.typeReferenceDirectives!==C||l.hasNoDefaultLib!==j||l.libReferenceDirectives!==_e?se(_x(l,_,h,x,C,j,_e),l):l}function Kk(l){let _=T(309);return _.sourceFiles=l,_.syntheticFileReferences=void 0,_.syntheticTypeReferences=void 0,_.syntheticLibReferences=void 0,_.hasNoDefaultLib=void 0,_}function Gk(l,_){return l.sourceFiles!==_?se(Kk(_),l):l}function C8(l,_=!1,h){let x=T(238);return x.type=l,x.isSpread=_,x.tupleNameSource=h,x}function P8(l){let _=T(353);return _._children=l,_}function YS(l){let _=T(354);return _.original=l,Fs(_,l),_}function fx(l,_){let h=T(356);return h.expression=l,h.original=_,h.transformFlags|=fe(h.expression)|1,Fs(h,_),h}function Hk(l,_){return l.expression!==_?se(fx(_,l.original),l):l}function O8(){return T(355)}function N8(l){if(u1(l)&&!yO(l)&&!l.original&&!l.emitNode&&!l.id){if(eot(l))return l.elements;if(E1(l)&&gnt(l.operatorToken))return[l.left,l.right]}return l}function mx(l){let _=T(357);return _.elements=I(kYe(l,N8)),_.transformFlags|=Pt(_.elements),_}function F8(l,_){return l.elements!==_?se(mx(_),l):l}function hx(l,_){let h=T(358);return h.expression=l,h.thisArg=_,h.transformFlags|=fe(h.expression)|fe(h.thisArg),h}function Zk(l,_,h){return l.expression!==_||l.thisArg!==h?se(hx(_,h),l):l}function Wk(l){let _=Je(l.escapedText);return _.flags|=l.flags&-17,_.transformFlags=l.transformFlags,r(_,l),setIdentifierAutoGenerate(_,{...l.emitNode.autoGenerate}),_}function R8(l){let _=Je(l.escapedText);_.flags|=l.flags&-17,_.jsDoc=l.jsDoc,_.flowNode=l.flowNode,_.symbol=l.symbol,_.transformFlags=l.transformFlags,r(_,l);let h=getIdentifierTypeArguments(l);return h&&setIdentifierTypeArguments(_,h),_}function L8(l){let _=Fr(l.escapedText);return _.flags|=l.flags&-17,_.transformFlags=l.transformFlags,r(_,l),setIdentifierAutoGenerate(_,{...l.emitNode.autoGenerate}),_}function Qk(l){let _=Fr(l.escapedText);return _.flags|=l.flags&-17,_.transformFlags=l.transformFlags,r(_,l),_}function e0(l){if(l===void 0)return l;if(lot(l))return dx(l);if(m1(l))return Wk(l);if(kn(l))return R8(l);if(Ihe(l))return L8(l);if(zg(l))return Qk(l);let _=CJ(l.kind)?t.createBaseNode(l.kind):t.createBaseTokenNode(l.kind);_.flags|=l.flags&-17,_.transformFlags=l.transformFlags,r(_,l);for(let h in l)fd(_,h)||!fd(l,h)||(_[h]=l[h]);return _}function $8(l,_,h){return cy(wb(void 0,void 0,void 0,void 0,_?[_]:[],void 0,Vd(l,!0)),void 0,h?[h]:[])}function M8(l,_,h){return cy(kb(void 0,void 0,_?[_]:[],void 0,void 0,Vd(l,!0)),void 0,h?[h]:[])}function Sy(){return Cb(O("0"))}function Xk(l){return VS(void 0,!1,l)}function Yk(l){return KS(void 0,!1,Wb([GS(!1,void 0,l)]))}function j8(l,_){return _==="null"?E.createStrictEquality(l,Nt()):_==="undefined"?E.createStrictEquality(l,Sy()):E.createStrictEquality(MS(l),U(_))}function yx(l,_){return _==="null"?E.createStrictInequality(l,Nt()):_==="undefined"?E.createStrictInequality(l,Sy()):E.createStrictInequality(MS(l),U(_))}function Hd(l,_,h){return Ufe(l)?Db(ay(l,void 0,_),void 0,void 0,h):cy(cu(l,_),void 0,h)}function B8(l,_,h){return Hd(l,"bind",[_,...h])}function q8(l,_,h){return Hd(l,"call",[_,...h])}function U8(l,_,h){return Hd(l,"apply",[_,h])}function vy(l,_,h){return Hd(xe(l),_,h)}function z8(l,_){return Hd(l,"slice",_===void 0?[]:[hp(_)])}function by(l,_){return Hd(l,"concat",_)}function J8(l,_,h){return vy("Object","defineProperty",[l,hp(_),h])}function gx(l,_){return vy("Object","getOwnPropertyDescriptor",[l,hp(_)])}function qf(l,_,h){return vy("Reflect","get",h?[l,_,h]:[l,_])}function eC(l,_,h,x){return vy("Reflect","set",x?[l,_,h,x]:[l,_,h])}function Uf(l,_,h){return h?(l.push(XS(_,h)),!0):!1}function V8(l,_){let h=[];Uf(h,"enumerable",hp(l.enumerable)),Uf(h,"configurable",hp(l.configurable));let x=Uf(h,"writable",hp(l.writable));x=Uf(h,"value",l.value)||x;let C=Uf(h,"get",l.get);return C=Uf(h,"set",l.set)||C,pe.assert(!(x&&C),"A PropertyDescriptor may not be both an accessor descriptor and a data descriptor."),iy(h,!_)}function tC(l,_){switch(l.kind){case 218:return VI(l,_);case 217:return JI(l,l.type,_);case 235:return qS(l,_,l.type);case 239:return lw(l,_,l.type);case 236:return cw(l,_);case 234:return aw(l,_,l.typeArguments);case 356:return Hk(l,_)}}function K8(l){return UJ(l)&&u1(l)&&u1(getSourceMapRange(l))&&u1(getCommentRange(l))&&!Ra(getSyntheticLeadingComments(l))&&!Ra(getSyntheticTrailingComments(l))}function rC(l,_,h=63){return l&&Sye(l,h)&&!K8(l)?tC(l,rC(l.expression,_)):_}function nC(l,_,h){if(!_)return l;let x=Iw(_,_.label,tot(_.statement)?nC(l,_.statement):l);return h&&h(_),x}function Sx(l,_){let h=LJ(l);switch(h.kind){case 80:return _;case 110:case 9:case 10:case 11:return!1;case 210:return h.elements.length!==0;case 211:return h.properties.length>0;default:return!0}}function oC(l,_,h,x=!1){let C=VJ(l,63),j,_e;return Zfe(C)?(j=lt(),_e=C):jz(C)?(j=lt(),_e=h!==void 0&&h<2?Fs(xe("_super"),C):C):v1(C)&8192?(j=Sy(),_e=n().parenthesizeLeftSideOfAccess(C,!1)):nf(C)?Sx(C.expression,x)?(j=Rt(_),_e=cu(Fs(E.createAssignment(j,C.expression),C.expression),C.name),Fs(_e,C)):(j=C.expression,_e=C):tA(C)?Sx(C.expression,x)?(j=Rt(_),_e=sy(Fs(E.createAssignment(j,C.expression),C.expression),C.argumentExpression),Fs(_e,C)):(j=C.expression,_e=C):(j=Sy(),_e=n().parenthesizeLeftSideOfAccess(l,!1)),{target:_e,thisArg:j}}function iC(l,_){return cu(Ib(iy([ue(void 0,"value",[ji(void 0,void 0,l,void 0,void 0,void 0)],Vd([uy(_)]))])),"value")}function v(l){return l.length>10?mx(l):jYe(l,E.createComma)}function A(l,_,h,x=0,C){let j=C?l&&wJ(l):xhe(l);if(j&&kn(j)&&!m1(j)){let _e=jJ(Fs(e0(j),j),j.parent);return x|=v1(j),h||(x|=96),_||(x|=3072),x&&setEmitFlags(_e,x),_e}return vt(l)}function P(l,_,h){return A(l,_,h,98304)}function R(l,_,h,x){return A(l,_,h,32768,x)}function M(l,_,h){return A(l,_,h,16384)}function ee(l,_,h){return A(l,_,h)}function be(l,_,h,x){let C=cu(l,u1(_)?_:e0(_));Fs(C,_);let j=0;return x||(j|=96),h||(j|=3072),j&&setEmitFlags(C,j),C}function Ue(l,_,h,x){return l&&eA(_,32)?be(l,A(_),h,x):M(_,h,x)}function Ce(l,_,h,x){let C=mr(l,_,0,h);return nr(l,_,C,x)}function De(l){return b1(l.expression)&&l.expression.text==="use strict"}function He(){return Pot(uy(U("use strict")))}function mr(l,_,h=0,x){pe.assert(_.length===0,"Prologue directives should be at the first statement in the target statements array");let C=!1,j=l.length;for(;hQe&&Ii.splice(C,0,..._.slice(Qe,xr)),Qe>_e&&Ii.splice(x,0,..._.slice(_e,Qe)),_e>j&&Ii.splice(h,0,..._.slice(j,_e)),j>0)if(h===0)Ii.splice(0,0,..._.slice(0,j));else{let du=new Map;for(let Js=0;Js=0;Js--){let Ey=_[Js];du.has(Ey.expression.text)||Ii.unshift(Ey)}}return ih(l)?Fs(I(Ii,l.hasTrailingComma),l):l}function pu(l,_){let h;return typeof _=="number"?h=fo(_):h=_,Whe(l)?Ga(l,h,l.name,l.constraint,l.default):vO(l)?iu(l,h,l.dotDotDotToken,l.name,l.questionToken,l.type,l.initializer):tye(l)?Dr(l,h,l.typeParameters,l.parameters,l.type):xnt(l)?al(l,h,l.name,l.questionToken,l.type):bO(l)?oe(l,h,l.name,l.questionToken??l.exclamationToken,l.type,l.initializer):Ent(l)?et(l,h,l.name,l.questionToken,l.typeParameters,l.parameters,l.type):oJ(l)?Wr(l,h,l.asteriskToken,l.name,l.questionToken,l.typeParameters,l.parameters,l.type,l.body):Qhe(l)?jd(l,h,l.parameters,l.body):iJ(l)?sl(l,h,l.name,l.parameters,l.type,l.body):xO(l)?Ee(l,h,l.name,l.parameters,l.body):Xhe(l)?Tn(l,h,l.parameters,l.type):oye(l)?KI(l,h,l.asteriskToken,l.name,l.typeParameters,l.parameters,l.type,l.body):iye(l)?GI(l,h,l.typeParameters,l.parameters,l.type,l.equalsGreaterThanToken,l.body):aJ(l)?Nb(l,h,l.name,l.typeParameters,l.heritageClauses,l.members):IO(l)?dw(l,h,l.declarationList):cye(l)?Vb(l,h,l.asteriskToken,l.name,l.typeParameters,l.parameters,l.type,l.body):EO(l)?JS(l,h,l.name,l.typeParameters,l.heritageClauses,l.members):zJ(l)?Rw(l,h,l.name,l.typeParameters,l.heritageClauses,l.members):lye(l)?dp(l,h,l.name,l.typeParameters,l.type):not(l)?_p(l,h,l.name,l.members):XD(l)?ti(l,h,l.name,l.body):uye(l)?qw(l,h,l.isTypeOnly,l.name,l.moduleReference):pye(l)?zw(l,h,l.importClause,l.moduleSpecifier,l.attributes):dye(l)?dy(l,h,l.expression):_ye(l)?tk(l,h,l.isTypeOnly,l.exportClause,l.moduleSpecifier,l.attributes):pe.assertNever(l)}function Ec(l,_){return vO(l)?iu(l,_,l.dotDotDotToken,l.name,l.questionToken,l.type,l.initializer):bO(l)?oe(l,_,l.name,l.questionToken??l.exclamationToken,l.type,l.initializer):oJ(l)?Wr(l,_,l.asteriskToken,l.name,l.questionToken,l.typeParameters,l.parameters,l.type,l.body):iJ(l)?sl(l,_,l.name,l.parameters,l.type,l.body):xO(l)?Ee(l,_,l.name,l.parameters,l.body):aJ(l)?Nb(l,_,l.name,l.typeParameters,l.heritageClauses,l.members):EO(l)?JS(l,_,l.name,l.typeParameters,l.heritageClauses,l.members):pe.assertNever(l)}function Zd(l,_){switch(l.kind){case 178:return sl(l,l.modifiers,_,l.parameters,l.type,l.body);case 179:return Ee(l,l.modifiers,_,l.parameters,l.body);case 175:return Wr(l,l.modifiers,l.asteriskToken,_,l.questionToken,l.typeParameters,l.parameters,l.type,l.body);case 174:return et(l,l.modifiers,_,l.questionToken,l.typeParameters,l.parameters,l.type);case 173:return oe(l,l.modifiers,_,l.questionToken??l.exclamationToken,l.type,l.initializer);case 172:return al(l,l.modifiers,_,l.questionToken,l.type);case 304:return ux(l,_,l.initializer)}}function Kt(l){return l?I(l):void 0}function Dn(l){return typeof l=="string"?xe(l):l}function hp(l){return typeof l=="string"?U(l):typeof l=="number"?O(l):typeof l=="boolean"?l?Ct():Zr():l}function xy(l){return l&&n().parenthesizeExpressionForDisallowedComma(l)}function G8(l){return typeof l=="number"?pt(l):l}function dl(l){return l&&iot(l)?Fs(r(_w(),l),l):l}function zs(l){return typeof l=="string"||l&&!sye(l)?zS(l,void 0,void 0,void 0):l}function se(l,_){return l!==_&&(r(l,_),Fs(l,_)),l}}function iO(e){switch(e){case 345:return"type";case 343:return"returns";case 344:return"this";case 341:return"enum";case 331:return"author";case 333:return"class";case 334:return"public";case 335:return"private";case 336:return"protected";case 337:return"readonly";case 338:return"override";case 346:return"template";case 347:return"typedef";case 342:return"param";case 349:return"prop";case 339:return"callback";case 340:return"overload";case 329:return"augments";case 330:return"implements";case 352:return"import";default:return pe.fail(`Unsupported kind: ${pe.formatSyntaxKind(e)}`)}}var ac,tme={};function lnt(e,t){switch(ac||(ac=AJ(99,!1,0)),e){case 15:ac.setText("`"+t+"`");break;case 16:ac.setText("`"+t+"${");break;case 17:ac.setText("}"+t+"${");break;case 18:ac.setText("}"+t+"`");break}let r=ac.scan();if(r===20&&(r=ac.reScanTemplateToken(!1)),ac.isUnterminated())return ac.setText(void 0),tme;let n;switch(r){case 15:case 16:case 17:case 18:n=ac.getTokenValue();break}return n===void 0||ac.scan()!==1?(ac.setText(void 0),tme):(ac.setText(void 0),n)}function Uc(e){return e&&kn(e)?p1(e):fe(e)}function p1(e){return fe(e)&-67108865}function unt(e,t){return t|e.transformFlags&134234112}function fe(e){if(!e)return 0;let t=e.transformFlags&~pnt(e.kind);return zet(e)&&whe(e.name)?unt(e.name,t):t}function Pt(e){return e?e.transformFlags:0}function rme(e){let t=0;for(let r of e)t|=fe(r);e.transformFlags=t}function pnt(e){if(e>=183&&e<=206)return-2;switch(e){case 214:case 215:case 210:return-2147450880;case 268:return-1941676032;case 170:return-2147483648;case 220:return-2072174592;case 219:case 263:return-1937940480;case 262:return-2146893824;case 264:case 232:return-2147344384;case 177:return-1937948672;case 173:return-2013249536;case 175:case 178:case 179:return-2005057536;case 133:case 150:case 163:case 146:case 154:case 151:case 136:case 155:case 116:case 169:case 172:case 174:case 180:case 181:case 182:case 265:case 266:return-2;case 211:return-2147278848;case 300:return-2147418112;case 207:case 208:return-2147450880;case 217:case 239:case 235:case 356:case 218:case 108:return-2147483648;case 212:case 213:return-2147483648;default:return-2147483648}}var PD=ant();function OD(e){return e.flags|=16,e}var dnt={createBaseSourceFileNode:e=>OD(PD.createBaseSourceFileNode(e)),createBaseIdentifierNode:e=>OD(PD.createBaseIdentifierNode(e)),createBasePrivateIdentifierNode:e=>OD(PD.createBasePrivateIdentifierNode(e)),createBaseTokenNode:e=>OD(PD.createBaseTokenNode(e)),createBaseNode:e=>OD(PD.createBaseNode(e))},Mjt=BJ(4,dnt);function _nt(e,t){if(e.original!==t&&(e.original=t,t)){let r=t.emitNode;r&&(e.emitNode=fnt(r,e.emitNode))}return e}function fnt(e,t){let{flags:r,internalFlags:n,leadingComments:o,trailingComments:i,commentRange:a,sourceMapRange:s,tokenSourceMapRanges:c,constantValue:p,helpers:d,startsOnNewLine:f,snippetElement:m,classThis:y,assignedName:g}=e;if(t||(t={}),r&&(t.flags=r),n&&(t.internalFlags=n&-9),o&&(t.leadingComments=lc(o.slice(),t.leadingComments)),i&&(t.trailingComments=lc(i.slice(),t.trailingComments)),a&&(t.commentRange=a),s&&(t.sourceMapRange=s),c&&(t.tokenSourceMapRanges=mnt(c,t.tokenSourceMapRanges)),p!==void 0&&(t.constantValue=p),d)for(let S of d)t.helpers=NYe(t.helpers,S);return f!==void 0&&(t.startsOnNewLine=f),m!==void 0&&(t.snippetElement=m),y&&(t.classThis=y),g&&(t.assignedName=g),t}function mnt(e,t){t||(t=[]);for(let r in e)t[r]=e[r];return t}function T1(e){return e.kind===9}function hnt(e){return e.kind===10}function b1(e){return e.kind===11}function ynt(e){return e.kind===15}function gnt(e){return e.kind===28}function nme(e){return e.kind===54}function ome(e){return e.kind===58}function kn(e){return e.kind===80}function zg(e){return e.kind===81}function Snt(e){return e.kind===95}function aO(e){return e.kind===134}function jz(e){return e.kind===108}function vnt(e){return e.kind===102}function bnt(e){return e.kind===167}function Zhe(e){return e.kind===168}function Whe(e){return e.kind===169}function vO(e){return e.kind===170}function qJ(e){return e.kind===171}function xnt(e){return e.kind===172}function bO(e){return e.kind===173}function Ent(e){return e.kind===174}function oJ(e){return e.kind===175}function Qhe(e){return e.kind===177}function iJ(e){return e.kind===178}function xO(e){return e.kind===179}function Tnt(e){return e.kind===180}function Dnt(e){return e.kind===181}function Xhe(e){return e.kind===182}function Ant(e){return e.kind===183}function Yhe(e){return e.kind===184}function eye(e){return e.kind===185}function tye(e){return e.kind===186}function Int(e){return e.kind===187}function wnt(e){return e.kind===188}function knt(e){return e.kind===189}function Cnt(e){return e.kind===190}function Pnt(e){return e.kind===203}function Ont(e){return e.kind===191}function Nnt(e){return e.kind===192}function Fnt(e){return e.kind===193}function Rnt(e){return e.kind===194}function Lnt(e){return e.kind===195}function $nt(e){return e.kind===196}function Mnt(e){return e.kind===197}function jnt(e){return e.kind===198}function Bnt(e){return e.kind===199}function qnt(e){return e.kind===200}function Unt(e){return e.kind===201}function znt(e){return e.kind===202}function Jnt(e){return e.kind===206}function Vnt(e){return e.kind===209}function Knt(e){return e.kind===210}function rye(e){return e.kind===211}function nf(e){return e.kind===212}function tA(e){return e.kind===213}function nye(e){return e.kind===214}function Gnt(e){return e.kind===216}function UJ(e){return e.kind===218}function oye(e){return e.kind===219}function iye(e){return e.kind===220}function Hnt(e){return e.kind===223}function Znt(e){return e.kind===225}function E1(e){return e.kind===227}function Wnt(e){return e.kind===231}function aJ(e){return e.kind===232}function Qnt(e){return e.kind===233}function Xnt(e){return e.kind===234}function uO(e){return e.kind===236}function Ynt(e){return e.kind===237}function eot(e){return e.kind===357}function IO(e){return e.kind===244}function aye(e){return e.kind===245}function tot(e){return e.kind===257}function sye(e){return e.kind===261}function rot(e){return e.kind===262}function cye(e){return e.kind===263}function EO(e){return e.kind===264}function zJ(e){return e.kind===265}function lye(e){return e.kind===266}function not(e){return e.kind===267}function XD(e){return e.kind===268}function uye(e){return e.kind===272}function pye(e){return e.kind===273}function dye(e){return e.kind===278}function _ye(e){return e.kind===279}function oot(e){return e.kind===280}function iot(e){return e.kind===354}function fye(e){return e.kind===284}function ime(e){return e.kind===287}function aot(e){return e.kind===290}function mye(e){return e.kind===296}function sot(e){return e.kind===298}function cot(e){return e.kind===304}function lot(e){return e.kind===308}function uot(e){return e.kind===310}function pot(e){return e.kind===315}function dot(e){return e.kind===318}function hye(e){return e.kind===321}function _ot(e){return e.kind===323}function yye(e){return e.kind===324}function fot(e){return e.kind===329}function mot(e){return e.kind===334}function hot(e){return e.kind===335}function yot(e){return e.kind===336}function got(e){return e.kind===337}function Sot(e){return e.kind===338}function vot(e){return e.kind===340}function bot(e){return e.kind===332}function ame(e){return e.kind===342}function xot(e){return e.kind===343}function JJ(e){return e.kind===345}function Eot(e){return e.kind===346}function Tot(e){return e.kind===330}function Dot(e){return e.kind===351}var qg=new WeakMap;function gye(e,t){var r;let n=e.kind;return CJ(n)?n===353?e._children:(r=qg.get(t))==null?void 0:r.get(e):ii}function Aot(e,t,r){e.kind===353&&pe.fail("Should not need to re-set the children of a SyntaxList.");let n=qg.get(t);return n===void 0&&(n=new WeakMap,qg.set(t,n)),n.set(e,r),r}function sme(e,t){var r;e.kind===353&&pe.fail("Did not expect to unset the children of a SyntaxList."),(r=qg.get(t))==null||r.delete(e)}function Iot(e,t){let r=qg.get(e);r!==void 0&&(qg.delete(e),qg.set(t,r))}function cme(e){return(v1(e)&32768)!==0}function wot(e){return b1(e.expression)&&e.expression.text==="use strict"}function kot(e){for(let t of e)if(lO(t)){if(wot(t))return t}else break}function Cot(e){return UJ(e)&&Jg(e)&&!!itt(e)}function Sye(e,t=63){switch(e.kind){case 218:return t&-2147483648&&Cot(e)?!1:(t&1)!==0;case 217:case 235:return(t&2)!==0;case 239:return(t&34)!==0;case 234:return(t&16)!==0;case 236:return(t&4)!==0;case 356:return(t&8)!==0}return!1}function VJ(e,t=63){for(;Sye(e,t);)e=e.expression;return e}function Pot(e){return setStartsOnNewLine(e,!0)}function BD(e){if(Ttt(e))return e.name;if(vtt(e)){switch(e.kind){case 304:return BD(e.initializer);case 305:return e.name;case 306:return BD(e.expression)}return}return SO(e,!0)?BD(e.left):Wnt(e)?BD(e.expression):e}function Oot(e){switch(e.kind){case 207:case 208:case 210:return e.elements;case 211:return e.properties}}function lme(e){if(e){let t=e;for(;;){if(kn(t)||!t.body)return kn(t)?t:t.name;t=t.body}}}var ume;(e=>{function t(d,f,m,y,g,S,b){let E=f>0?g[f-1]:void 0;return pe.assertEqual(m[f],t),g[f]=d.onEnter(y[f],E,b),m[f]=s(d,t),f}e.enter=t;function r(d,f,m,y,g,S,b){pe.assertEqual(m[f],r),pe.assertIsDefined(d.onLeft),m[f]=s(d,r);let E=d.onLeft(y[f].left,g[f],y[f]);return E?(p(f,y,E),c(f,m,y,g,E)):f}e.left=r;function n(d,f,m,y,g,S,b){return pe.assertEqual(m[f],n),pe.assertIsDefined(d.onOperator),m[f]=s(d,n),d.onOperator(y[f].operatorToken,g[f],y[f]),f}e.operator=n;function o(d,f,m,y,g,S,b){pe.assertEqual(m[f],o),pe.assertIsDefined(d.onRight),m[f]=s(d,o);let E=d.onRight(y[f].right,g[f],y[f]);return E?(p(f,y,E),c(f,m,y,g,E)):f}e.right=o;function i(d,f,m,y,g,S,b){pe.assertEqual(m[f],i),m[f]=s(d,i);let E=d.onExit(y[f],g[f]);if(f>0){if(f--,d.foldState){let I=m[f]===i?"right":"left";g[f]=d.foldState(g[f],E,I)}}else S.value=E;return f}e.exit=i;function a(d,f,m,y,g,S,b){return pe.assertEqual(m[f],a),f}e.done=a;function s(d,f){switch(f){case t:if(d.onLeft)return r;case r:if(d.onOperator)return n;case n:if(d.onRight)return o;case o:return i;case i:return a;case a:return a;default:pe.fail("Invalid state")}}e.nextState=s;function c(d,f,m,y,g){return d++,f[d]=t,m[d]=g,y[d]=void 0,d}function p(d,f,m){if(pe.shouldAssert(2))for(;d>=0;)pe.assert(f[d]!==m,"Circular traversal detected."),d--}})(ume||(ume={}));function pme(e,t){return typeof e=="object"?sJ(!1,e.prefix,e.node,e.suffix,t):typeof e=="string"?e.length>0&&e.charCodeAt(0)===35?e.slice(1):e:""}function Not(e,t){return typeof e=="string"?e:Fot(e,pe.checkDefined(t))}function Fot(e,t){return Ihe(e)?t(e).slice(1):m1(e)?t(e):zg(e)?e.escapedText.slice(1):uc(e)}function sJ(e,t,r,n,o){return t=pme(t,o),n=pme(n,o),r=Not(r,o),`${e?"#":""}${t}${r}${n}`}function vye(e){if(e.transformFlags&65536)return!0;if(e.transformFlags&128)for(let t of Oot(e)){let r=BD(t);if(r&&Ett(r)&&(r.transformFlags&65536||r.transformFlags&128&&vye(r)))return!0}return!1}function Fs(e,t){return t?ch(e,t.pos,t.end):e}function KJ(e){let t=e.kind;return t===169||t===170||t===172||t===173||t===174||t===175||t===177||t===178||t===179||t===182||t===186||t===219||t===220||t===232||t===244||t===263||t===264||t===265||t===266||t===267||t===268||t===272||t===273||t===278||t===279}function Rot(e){let t=e.kind;return t===170||t===173||t===175||t===178||t===179||t===232||t===264}var dme,_me,fme,mme,hme,Lot={createBaseSourceFileNode:e=>new(hme||(hme=oi.getSourceFileConstructor()))(e,-1,-1),createBaseIdentifierNode:e=>new(fme||(fme=oi.getIdentifierConstructor()))(e,-1,-1),createBasePrivateIdentifierNode:e=>new(mme||(mme=oi.getPrivateIdentifierConstructor()))(e,-1,-1),createBaseTokenNode:e=>new(_me||(_me=oi.getTokenConstructor()))(e,-1,-1),createBaseNode:e=>new(dme||(dme=oi.getNodeConstructor()))(e,-1,-1)},jjt=BJ(1,Lot);function q(e,t){return t&&e(t)}function je(e,t,r){if(r){if(t)return t(r);for(let n of r){let o=e(n);if(o)return o}}}function $ot(e,t){return e.charCodeAt(t+1)===42&&e.charCodeAt(t+2)===42&&e.charCodeAt(t+3)!==47}function Mot(e){return Vc(e.statements,jot)||Bot(e)}function jot(e){return KJ(e)&&qot(e,95)||uye(e)&&fye(e.moduleReference)||pye(e)||dye(e)||_ye(e)?e:void 0}function Bot(e){return e.flags&8388608?bye(e):void 0}function bye(e){return Uot(e)?e:La(e,bye)}function qot(e,t){return Ra(e.modifiers,r=>r.kind===t)}function Uot(e){return Ynt(e)&&e.keywordToken===102&&e.name.escapedText==="meta"}var zot={167:function(e,t,r){return q(t,e.left)||q(t,e.right)},169:function(e,t,r){return je(t,r,e.modifiers)||q(t,e.name)||q(t,e.constraint)||q(t,e.default)||q(t,e.expression)},305:function(e,t,r){return je(t,r,e.modifiers)||q(t,e.name)||q(t,e.questionToken)||q(t,e.exclamationToken)||q(t,e.equalsToken)||q(t,e.objectAssignmentInitializer)},306:function(e,t,r){return q(t,e.expression)},170:function(e,t,r){return je(t,r,e.modifiers)||q(t,e.dotDotDotToken)||q(t,e.name)||q(t,e.questionToken)||q(t,e.type)||q(t,e.initializer)},173:function(e,t,r){return je(t,r,e.modifiers)||q(t,e.name)||q(t,e.questionToken)||q(t,e.exclamationToken)||q(t,e.type)||q(t,e.initializer)},172:function(e,t,r){return je(t,r,e.modifiers)||q(t,e.name)||q(t,e.questionToken)||q(t,e.type)||q(t,e.initializer)},304:function(e,t,r){return je(t,r,e.modifiers)||q(t,e.name)||q(t,e.questionToken)||q(t,e.exclamationToken)||q(t,e.initializer)},261:function(e,t,r){return q(t,e.name)||q(t,e.exclamationToken)||q(t,e.type)||q(t,e.initializer)},209:function(e,t,r){return q(t,e.dotDotDotToken)||q(t,e.propertyName)||q(t,e.name)||q(t,e.initializer)},182:function(e,t,r){return je(t,r,e.modifiers)||je(t,r,e.typeParameters)||je(t,r,e.parameters)||q(t,e.type)},186:function(e,t,r){return je(t,r,e.modifiers)||je(t,r,e.typeParameters)||je(t,r,e.parameters)||q(t,e.type)},185:function(e,t,r){return je(t,r,e.modifiers)||je(t,r,e.typeParameters)||je(t,r,e.parameters)||q(t,e.type)},180:yme,181:yme,175:function(e,t,r){return je(t,r,e.modifiers)||q(t,e.asteriskToken)||q(t,e.name)||q(t,e.questionToken)||q(t,e.exclamationToken)||je(t,r,e.typeParameters)||je(t,r,e.parameters)||q(t,e.type)||q(t,e.body)},174:function(e,t,r){return je(t,r,e.modifiers)||q(t,e.name)||q(t,e.questionToken)||je(t,r,e.typeParameters)||je(t,r,e.parameters)||q(t,e.type)},177:function(e,t,r){return je(t,r,e.modifiers)||q(t,e.name)||je(t,r,e.typeParameters)||je(t,r,e.parameters)||q(t,e.type)||q(t,e.body)},178:function(e,t,r){return je(t,r,e.modifiers)||q(t,e.name)||je(t,r,e.typeParameters)||je(t,r,e.parameters)||q(t,e.type)||q(t,e.body)},179:function(e,t,r){return je(t,r,e.modifiers)||q(t,e.name)||je(t,r,e.typeParameters)||je(t,r,e.parameters)||q(t,e.type)||q(t,e.body)},263:function(e,t,r){return je(t,r,e.modifiers)||q(t,e.asteriskToken)||q(t,e.name)||je(t,r,e.typeParameters)||je(t,r,e.parameters)||q(t,e.type)||q(t,e.body)},219:function(e,t,r){return je(t,r,e.modifiers)||q(t,e.asteriskToken)||q(t,e.name)||je(t,r,e.typeParameters)||je(t,r,e.parameters)||q(t,e.type)||q(t,e.body)},220:function(e,t,r){return je(t,r,e.modifiers)||je(t,r,e.typeParameters)||je(t,r,e.parameters)||q(t,e.type)||q(t,e.equalsGreaterThanToken)||q(t,e.body)},176:function(e,t,r){return je(t,r,e.modifiers)||q(t,e.body)},184:function(e,t,r){return q(t,e.typeName)||je(t,r,e.typeArguments)},183:function(e,t,r){return q(t,e.assertsModifier)||q(t,e.parameterName)||q(t,e.type)},187:function(e,t,r){return q(t,e.exprName)||je(t,r,e.typeArguments)},188:function(e,t,r){return je(t,r,e.members)},189:function(e,t,r){return q(t,e.elementType)},190:function(e,t,r){return je(t,r,e.elements)},193:gme,194:gme,195:function(e,t,r){return q(t,e.checkType)||q(t,e.extendsType)||q(t,e.trueType)||q(t,e.falseType)},196:function(e,t,r){return q(t,e.typeParameter)},206:function(e,t,r){return q(t,e.argument)||q(t,e.attributes)||q(t,e.qualifier)||je(t,r,e.typeArguments)},303:function(e,t,r){return q(t,e.assertClause)},197:Sme,199:Sme,200:function(e,t,r){return q(t,e.objectType)||q(t,e.indexType)},201:function(e,t,r){return q(t,e.readonlyToken)||q(t,e.typeParameter)||q(t,e.nameType)||q(t,e.questionToken)||q(t,e.type)||je(t,r,e.members)},202:function(e,t,r){return q(t,e.literal)},203:function(e,t,r){return q(t,e.dotDotDotToken)||q(t,e.name)||q(t,e.questionToken)||q(t,e.type)},207:vme,208:vme,210:function(e,t,r){return je(t,r,e.elements)},211:function(e,t,r){return je(t,r,e.properties)},212:function(e,t,r){return q(t,e.expression)||q(t,e.questionDotToken)||q(t,e.name)},213:function(e,t,r){return q(t,e.expression)||q(t,e.questionDotToken)||q(t,e.argumentExpression)},214:bme,215:bme,216:function(e,t,r){return q(t,e.tag)||q(t,e.questionDotToken)||je(t,r,e.typeArguments)||q(t,e.template)},217:function(e,t,r){return q(t,e.type)||q(t,e.expression)},218:function(e,t,r){return q(t,e.expression)},221:function(e,t,r){return q(t,e.expression)},222:function(e,t,r){return q(t,e.expression)},223:function(e,t,r){return q(t,e.expression)},225:function(e,t,r){return q(t,e.operand)},230:function(e,t,r){return q(t,e.asteriskToken)||q(t,e.expression)},224:function(e,t,r){return q(t,e.expression)},226:function(e,t,r){return q(t,e.operand)},227:function(e,t,r){return q(t,e.left)||q(t,e.operatorToken)||q(t,e.right)},235:function(e,t,r){return q(t,e.expression)||q(t,e.type)},236:function(e,t,r){return q(t,e.expression)},239:function(e,t,r){return q(t,e.expression)||q(t,e.type)},237:function(e,t,r){return q(t,e.name)},228:function(e,t,r){return q(t,e.condition)||q(t,e.questionToken)||q(t,e.whenTrue)||q(t,e.colonToken)||q(t,e.whenFalse)},231:function(e,t,r){return q(t,e.expression)},242:xme,269:xme,308:function(e,t,r){return je(t,r,e.statements)||q(t,e.endOfFileToken)},244:function(e,t,r){return je(t,r,e.modifiers)||q(t,e.declarationList)},262:function(e,t,r){return je(t,r,e.declarations)},245:function(e,t,r){return q(t,e.expression)},246:function(e,t,r){return q(t,e.expression)||q(t,e.thenStatement)||q(t,e.elseStatement)},247:function(e,t,r){return q(t,e.statement)||q(t,e.expression)},248:function(e,t,r){return q(t,e.expression)||q(t,e.statement)},249:function(e,t,r){return q(t,e.initializer)||q(t,e.condition)||q(t,e.incrementor)||q(t,e.statement)},250:function(e,t,r){return q(t,e.initializer)||q(t,e.expression)||q(t,e.statement)},251:function(e,t,r){return q(t,e.awaitModifier)||q(t,e.initializer)||q(t,e.expression)||q(t,e.statement)},252:Eme,253:Eme,254:function(e,t,r){return q(t,e.expression)},255:function(e,t,r){return q(t,e.expression)||q(t,e.statement)},256:function(e,t,r){return q(t,e.expression)||q(t,e.caseBlock)},270:function(e,t,r){return je(t,r,e.clauses)},297:function(e,t,r){return q(t,e.expression)||je(t,r,e.statements)},298:function(e,t,r){return je(t,r,e.statements)},257:function(e,t,r){return q(t,e.label)||q(t,e.statement)},258:function(e,t,r){return q(t,e.expression)},259:function(e,t,r){return q(t,e.tryBlock)||q(t,e.catchClause)||q(t,e.finallyBlock)},300:function(e,t,r){return q(t,e.variableDeclaration)||q(t,e.block)},171:function(e,t,r){return q(t,e.expression)},264:Tme,232:Tme,265:function(e,t,r){return je(t,r,e.modifiers)||q(t,e.name)||je(t,r,e.typeParameters)||je(t,r,e.heritageClauses)||je(t,r,e.members)},266:function(e,t,r){return je(t,r,e.modifiers)||q(t,e.name)||je(t,r,e.typeParameters)||q(t,e.type)},267:function(e,t,r){return je(t,r,e.modifiers)||q(t,e.name)||je(t,r,e.members)},307:function(e,t,r){return q(t,e.name)||q(t,e.initializer)},268:function(e,t,r){return je(t,r,e.modifiers)||q(t,e.name)||q(t,e.body)},272:function(e,t,r){return je(t,r,e.modifiers)||q(t,e.name)||q(t,e.moduleReference)},273:function(e,t,r){return je(t,r,e.modifiers)||q(t,e.importClause)||q(t,e.moduleSpecifier)||q(t,e.attributes)},274:function(e,t,r){return q(t,e.name)||q(t,e.namedBindings)},301:function(e,t,r){return je(t,r,e.elements)},302:function(e,t,r){return q(t,e.name)||q(t,e.value)},271:function(e,t,r){return je(t,r,e.modifiers)||q(t,e.name)},275:function(e,t,r){return q(t,e.name)},281:function(e,t,r){return q(t,e.name)},276:Dme,280:Dme,279:function(e,t,r){return je(t,r,e.modifiers)||q(t,e.exportClause)||q(t,e.moduleSpecifier)||q(t,e.attributes)},277:Ame,282:Ame,278:function(e,t,r){return je(t,r,e.modifiers)||q(t,e.expression)},229:function(e,t,r){return q(t,e.head)||je(t,r,e.templateSpans)},240:function(e,t,r){return q(t,e.expression)||q(t,e.literal)},204:function(e,t,r){return q(t,e.head)||je(t,r,e.templateSpans)},205:function(e,t,r){return q(t,e.type)||q(t,e.literal)},168:function(e,t,r){return q(t,e.expression)},299:function(e,t,r){return je(t,r,e.types)},234:function(e,t,r){return q(t,e.expression)||je(t,r,e.typeArguments)},284:function(e,t,r){return q(t,e.expression)},283:function(e,t,r){return je(t,r,e.modifiers)},357:function(e,t,r){return je(t,r,e.elements)},285:function(e,t,r){return q(t,e.openingElement)||je(t,r,e.children)||q(t,e.closingElement)},289:function(e,t,r){return q(t,e.openingFragment)||je(t,r,e.children)||q(t,e.closingFragment)},286:Ime,287:Ime,293:function(e,t,r){return je(t,r,e.properties)},292:function(e,t,r){return q(t,e.name)||q(t,e.initializer)},294:function(e,t,r){return q(t,e.expression)},295:function(e,t,r){return q(t,e.dotDotDotToken)||q(t,e.expression)},288:function(e,t,r){return q(t,e.tagName)},296:function(e,t,r){return q(t,e.namespace)||q(t,e.name)},191:Ng,192:Ng,310:Ng,316:Ng,315:Ng,317:Ng,319:Ng,318:function(e,t,r){return je(t,r,e.parameters)||q(t,e.type)},321:function(e,t,r){return(typeof e.comment=="string"?void 0:je(t,r,e.comment))||je(t,r,e.tags)},348:function(e,t,r){return q(t,e.tagName)||q(t,e.name)||(typeof e.comment=="string"?void 0:je(t,r,e.comment))},311:function(e,t,r){return q(t,e.name)},312:function(e,t,r){return q(t,e.left)||q(t,e.right)},342:wme,349:wme,331:function(e,t,r){return q(t,e.tagName)||(typeof e.comment=="string"?void 0:je(t,r,e.comment))},330:function(e,t,r){return q(t,e.tagName)||q(t,e.class)||(typeof e.comment=="string"?void 0:je(t,r,e.comment))},329:function(e,t,r){return q(t,e.tagName)||q(t,e.class)||(typeof e.comment=="string"?void 0:je(t,r,e.comment))},346:function(e,t,r){return q(t,e.tagName)||q(t,e.constraint)||je(t,r,e.typeParameters)||(typeof e.comment=="string"?void 0:je(t,r,e.comment))},347:function(e,t,r){return q(t,e.tagName)||(e.typeExpression&&e.typeExpression.kind===310?q(t,e.typeExpression)||q(t,e.fullName)||(typeof e.comment=="string"?void 0:je(t,r,e.comment)):q(t,e.fullName)||q(t,e.typeExpression)||(typeof e.comment=="string"?void 0:je(t,r,e.comment)))},339:function(e,t,r){return q(t,e.tagName)||q(t,e.fullName)||q(t,e.typeExpression)||(typeof e.comment=="string"?void 0:je(t,r,e.comment))},343:Fg,345:Fg,344:Fg,341:Fg,351:Fg,350:Fg,340:Fg,324:function(e,t,r){return Vc(e.typeParameters,t)||Vc(e.parameters,t)||q(t,e.type)},325:Bz,326:Bz,327:Bz,323:function(e,t,r){return Vc(e.jsDocPropertyTags,t)},328:th,333:th,334:th,335:th,336:th,337:th,332:th,338:th,352:Jot,356:Vot};function yme(e,t,r){return je(t,r,e.typeParameters)||je(t,r,e.parameters)||q(t,e.type)}function gme(e,t,r){return je(t,r,e.types)}function Sme(e,t,r){return q(t,e.type)}function vme(e,t,r){return je(t,r,e.elements)}function bme(e,t,r){return q(t,e.expression)||q(t,e.questionDotToken)||je(t,r,e.typeArguments)||je(t,r,e.arguments)}function xme(e,t,r){return je(t,r,e.statements)}function Eme(e,t,r){return q(t,e.label)}function Tme(e,t,r){return je(t,r,e.modifiers)||q(t,e.name)||je(t,r,e.typeParameters)||je(t,r,e.heritageClauses)||je(t,r,e.members)}function Dme(e,t,r){return je(t,r,e.elements)}function Ame(e,t,r){return q(t,e.propertyName)||q(t,e.name)}function Ime(e,t,r){return q(t,e.tagName)||je(t,r,e.typeArguments)||q(t,e.attributes)}function Ng(e,t,r){return q(t,e.type)}function wme(e,t,r){return q(t,e.tagName)||(e.isNameFirst?q(t,e.name)||q(t,e.typeExpression):q(t,e.typeExpression)||q(t,e.name))||(typeof e.comment=="string"?void 0:je(t,r,e.comment))}function Fg(e,t,r){return q(t,e.tagName)||q(t,e.typeExpression)||(typeof e.comment=="string"?void 0:je(t,r,e.comment))}function Bz(e,t,r){return q(t,e.name)}function th(e,t,r){return q(t,e.tagName)||(typeof e.comment=="string"?void 0:je(t,r,e.comment))}function Jot(e,t,r){return q(t,e.tagName)||q(t,e.importClause)||q(t,e.moduleSpecifier)||q(t,e.attributes)||(typeof e.comment=="string"?void 0:je(t,r,e.comment))}function Vot(e,t,r){return q(t,e.expression)}function La(e,t,r){if(e===void 0||e.kind<=166)return;let n=zot[e.kind];return n===void 0?void 0:n(e,t,r)}function kme(e,t,r){let n=Cme(e),o=[];for(;o.length=0;--s)n.push(i[s]),o.push(a)}else{let s=t(i,a);if(s){if(s==="skip")continue;return s}if(i.kind>=167)for(let c of Cme(i))n.push(c),o.push(i)}}}function Cme(e){let t=[];return La(e,r,r),t;function r(n){t.unshift(n)}}function xye(e){e.externalModuleIndicator=Mot(e)}function Kot(e,t,r,n=!1,o){var i,a;(i=sO)==null||i.push(sO.Phase.Parse,"createSourceFile",{path:e},!0),Ofe("beforeParse");let s,{languageVersion:c,setExternalModuleIndicator:p,impliedNodeFormat:d,jsDocParsingMode:f}=typeof r=="object"?r:{languageVersion:r};if(c===100)s=Ug.parseSourceFile(e,t,c,void 0,n,6,x1,f);else{let m=d===void 0?p:y=>(y.impliedNodeFormat=d,(p||xye)(y));s=Ug.parseSourceFile(e,t,c,void 0,n,o,m,f)}return Ofe("afterParse"),eet("Parse","beforeParse","afterParse"),(a=sO)==null||a.pop(),s}function Got(e){return e.externalModuleIndicator!==void 0}function Hot(e,t,r,n=!1){let o=TO.updateSourceFile(e,t,r,n);return o.flags|=e.flags&12582912,o}var Ug;(e=>{var t=AJ(99,!0),r=40960,n,o,i,a,s;function c(v){return Zr++,v}var p={createBaseSourceFileNode:v=>c(new s(v,0,0)),createBaseIdentifierNode:v=>c(new i(v,0,0)),createBasePrivateIdentifierNode:v=>c(new a(v,0,0)),createBaseTokenNode:v=>c(new o(v,0,0)),createBaseNode:v=>c(new n(v,0,0))},d=BJ(11,p),{createNodeArray:f,createNumericLiteral:m,createStringLiteral:y,createLiteralLikeNode:g,createIdentifier:S,createPrivateIdentifier:b,createToken:E,createArrayLiteralExpression:I,createObjectLiteralExpression:T,createPropertyAccessExpression:k,createPropertyAccessChain:F,createElementAccessExpression:O,createElementAccessChain:$,createCallExpression:N,createCallChain:U,createNewExpression:ge,createParenthesizedExpression:Te,createBlock:ke,createVariableStatement:Je,createExpressionStatement:me,createIfStatement:xe,createWhileStatement:Rt,createForStatement:Jt,createForOfStatement:Yt,createVariableDeclaration:vt,createVariableDeclarationList:Fr}=d,le,K,ae,he,Oe,pt,Ye,lt,Nt,Ct,Zr,wt,fo,nn,Gn,bt,Hn=!0,Di=!1;function Ga(v,A,P,R,M=!1,ee,be,Ue=0){var Ce;if(ee=Grt(v,ee),ee===6){let He=iu(v,A,P,R,M);return convertToJson(He,(Ce=He.statements[0])==null?void 0:Ce.expression,He.parseDiagnostics,!1,void 0),He.referencedFiles=ii,He.typeReferenceDirectives=ii,He.libReferenceDirectives=ii,He.amdDependencies=ii,He.hasNoDefaultLib=!1,He.pragmas=AYe,He}ol(v,A,P,R,ee,Ue);let De=Md(P,M,ee,be||xye,Ue);return il(),De}e.parseSourceFile=Ga;function ji(v,A){ol("",v,A,void 0,1,0),ce();let P=Jd(!0),R=D()===1&&!Ye.length;return il(),R?P:void 0}e.parseIsolatedEntityName=ji;function iu(v,A,P=2,R,M=!1){ol(v,A,P,R,6,0),K=bt,ce();let ee=re(),be,Ue;if(D()===1)be=ui([],ee,ee),Ue=la();else{let He;for(;D()!==1;){let jt;switch(D()){case 23:jt=dk();break;case 112:case 97:case 106:jt=la();break;case 41:ye(()=>ce()===9&&ce()!==59)?jt=Ww():jt=rx();break;case 9:case 11:if(ye(()=>ce()!==59)){jt=ul();break}default:jt=rx();break}He&&rf(He)?He.push(jt):He?He=[He,jt]:(He=jt,D()!==1&&Ft(G.Unexpected_token))}let mr=rf(He)?X(I(He),ee):pe.checkDefined(He),nr=me(mr);X(nr,ee),be=ui([nr],ee),Ue=ll(1,G.Unexpected_token)}let Ce=qe(v,2,6,!1,be,Ue,K,x1);M&&oe(Ce),Ce.nodeCount=Zr,Ce.identifierCount=fo,Ce.identifiers=wt,Ce.parseDiagnostics=Og(Ye,Ce),lt&&(Ce.jsDocDiagnostics=Og(lt,Ce));let De=Ce;return il(),De}e.parseJsonText=iu;function ol(v,A,P,R,M,ee){switch(n=oi.getNodeConstructor(),o=oi.getTokenConstructor(),i=oi.getIdentifierConstructor(),a=oi.getPrivateIdentifierConstructor(),s=oi.getSourceFileConstructor(),le=pet(v),ae=A,he=P,Nt=R,Oe=M,pt=Xfe(M),Ye=[],nn=0,wt=new Map,fo=0,Zr=0,K=0,Hn=!0,Oe){case 1:case 2:bt=524288;break;case 6:bt=134742016;break;default:bt=0;break}Di=!1,t.setText(ae),t.setOnError(Of),t.setScriptTarget(he),t.setLanguageVariant(pt),t.setScriptKind(Oe),t.setJSDocParsingMode(ee)}function il(){t.clearCommentDirectives(),t.setText(""),t.setOnError(void 0),t.setScriptKind(0),t.setJSDocParsingMode(0),ae=void 0,he=void 0,Nt=void 0,Oe=void 0,pt=void 0,K=0,Ye=void 0,lt=void 0,nn=0,wt=void 0,Gn=void 0,Hn=!0}function Md(v,A,P,R,M){let ee=Qot(le);ee&&(bt|=33554432),K=bt,ce();let be=qs(0,pa);pe.assert(D()===1);let Ue=fr(),Ce=Vt(la(),Ue),De=qe(le,v,P,ee,be,Ce,K,R);return eit(De,ae),tit(De,He),De.commentDirectives=t.getCommentDirectives(),De.nodeCount=Zr,De.identifierCount=fo,De.identifiers=wt,De.parseDiagnostics=Og(Ye,De),De.jsDocParsingMode=M,lt&&(De.jsDocDiagnostics=Og(lt,De)),A&&oe(De),De;function He(mr,nr,jt){Ye.push(i1(le,ae,mr,nr,jt))}}let al=!1;function Vt(v,A){if(!A)return v;pe.assert(!v.jsDoc);let P=CYe(ztt(v,ae),R=>iC.parseJSDocComment(v,R.pos,R.end-R.pos));return P.length&&(v.jsDoc=P),al&&(al=!1,v.flags|=536870912),v}function lp(v){let A=Nt,P=TO.createSyntaxCursor(v);Nt={currentNode:He};let R=[],M=Ye;Ye=[];let ee=0,be=Ce(v.statements,0);for(;be!==-1;){let mr=v.statements[ee],nr=v.statements[be];lc(R,v.statements,ee,be),ee=De(v.statements,be);let jt=Cz(M,Ai=>Ai.start>=mr.pos),Wa=jt>=0?Cz(M,Ai=>Ai.start>=nr.pos,jt):-1;jt>=0&&lc(Ye,M,jt,Wa>=0?Wa:void 0),fs(()=>{let Ai=bt;for(bt|=65536,t.resetTokenState(nr.pos),ce();D()!==1;){let uu=t.getTokenFullStart(),pu=Ab(0,pa);if(R.push(pu),uu===t.getTokenFullStart()&&ce(),ee>=0){let Ec=v.statements[ee];if(pu.end===Ec.pos)break;pu.end>Ec.pos&&(ee=De(v.statements,ee+1))}}bt=Ai},2),be=ee>=0?Ce(v.statements,ee):-1}if(ee>=0){let mr=v.statements[ee];lc(R,v.statements,ee);let nr=Cz(M,jt=>jt.start>=mr.pos);nr>=0&&lc(Ye,M,nr)}return Nt=A,d.updateSourceFile(v,Fs(f(R),v.statements));function Ue(mr){return!(mr.flags&65536)&&!!(mr.transformFlags&67108864)}function Ce(mr,nr){for(let jt=nr;jt118}function ht(){return D()===80?!0:D()===127&&kt()||D()===135&&$r()?!1:D()>118}function ie(v,A,P=!0){return D()===v?(P&&ce(),!0):(A?Ft(A):Ft(G._0_expected,io(v)),!1)}let To=Object.keys(EJ).filter(v=>v.length>2);function zo(v){if(Gnt(v)){Zn(dd(ae,v.template.pos),v.template.end,G.Module_declaration_names_may_only_use_or_quoted_strings);return}let A=kn(v)?uc(v):void 0;if(!A||!Fet(A,he)){Ft(G._0_expected,io(27));return}let P=dd(ae,v.pos);switch(A){case"const":case"let":case"var":Zn(P,v.end,G.Variable_declaration_not_allowed_at_this_location);return;case"declare":return;case"interface":Bi(G.Interface_name_cannot_be_0,G.Interface_must_be_given_a_name,19);return;case"is":Zn(P,t.getTokenStart(),G.A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods);return;case"module":case"namespace":Bi(G.Namespace_name_cannot_be_0,G.Namespace_must_be_given_a_name,19);return;case"type":Bi(G.Type_alias_name_cannot_be_0,G.Type_alias_must_be_given_a_name,64);return}let R=LD(A,To,Bo)??ms(A);if(R){Zn(P,v.end,G.Unknown_keyword_or_identifier_Did_you_mean_0,R);return}D()!==0&&Zn(P,v.end,G.Unexpected_keyword_or_identifier)}function Bi(v,A,P){D()===P?Ft(A):Ft(v,t.getTokenValue())}function ms(v){for(let A of To)if(v.length>A.length+2&&fO(v,A))return`${A} ${v.slice(A.length)}`}function SR(v,A,P){if(D()===60&&!t.hasPrecedingLineBreak()){Ft(G.Decorators_must_precede_the_name_and_all_keywords_of_property_declarations);return}if(D()===21){Ft(G.Cannot_start_a_function_call_in_a_type_annotation),ce();return}if(A&&!au()){P?Ft(G._0_expected,io(27)):Ft(G.Expected_for_property_initializer);return}if(!NS()){if(P){Ft(G._0_expected,io(27));return}zo(v)}}function FI(v){return D()===v?(vr(),!0):(pe.assert(Fz(v)),Ft(G._0_expected,io(v)),!1)}function Bd(v,A,P,R){if(D()===A){ce();return}let M=Ft(G._0_expected,io(A));P&&M&&nO(M,i1(le,ae,R,1,G.The_parser_expected_to_find_a_1_to_match_the_0_token_here,io(v),io(A)))}function tr(v){return D()===v?(ce(),!0):!1}function mo(v){if(D()===v)return la()}function vR(v){if(D()===v)return xR()}function ll(v,A,P){return mo(v)||ua(v,!1,A||G._0_expected,P||io(v))}function bR(v){return vR(v)||(pe.assert(Fz(v)),ua(v,!1,G._0_expected,io(v)))}function la(){let v=re(),A=D();return ce(),X(E(A),v)}function xR(){let v=re(),A=D();return vr(),X(E(A),v)}function au(){return D()===27?!0:D()===20||D()===1||t.hasPrecedingLineBreak()}function NS(){return au()?(D()===27&&ce(),!0):!1}function ba(){return NS()||ie(27)}function ui(v,A,P,R){let M=f(v,R);return ch(M,A,P??t.getTokenFullStart()),M}function X(v,A,P){return ch(v,A,P??t.getTokenFullStart()),bt&&(v.flags|=bt),Di&&(Di=!1,v.flags|=262144),v}function ua(v,A,P,...R){A?Bs(t.getTokenFullStart(),0,P,...R):P&&Ft(P,...R);let M=re(),ee=v===80?S("",void 0):zfe(v)?d.createTemplateLiteralLikeNode(v,"","",void 0):v===9?m("",void 0):v===11?y("",void 0):v===283?d.createMissingDeclaration():E(v);return X(ee,M)}function qd(v){let A=wt.get(v);return A===void 0&&wt.set(v,A=v),A}function su(v,A,P){if(v){fo++;let Ue=t.hasPrecedingJSDocLeadingAsterisks()?t.getTokenStart():re(),Ce=D(),De=qd(t.getTokenValue()),He=t.hasExtendedUnicodeEscape();return Ht(),X(S(De,Ce,He),Ue)}if(D()===81)return Ft(P||G.Private_identifiers_are_not_allowed_outside_class_bodies),su(!0);if(D()===0&&t.tryScan(()=>t.reScanInvalidIdentifier()===80))return su(!0);fo++;let R=D()===1,M=t.isReservedWord(),ee=t.getTokenText(),be=M?G.Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here:G.Identifier_expected;return ua(80,R,A||be,ee)}function xb(v){return su(br(),void 0,v)}function No(v,A){return su(ht(),v,A)}function qi(v){return su(Zo(D()),v)}function Nf(){return(t.hasUnicodeEscape()||t.hasExtendedUnicodeEscape())&&Ft(G.Unicode_escape_sequence_cannot_appear_here),su(Zo(D()))}function pp(){return Zo(D())||D()===11||D()===9||D()===10}function RI(){return Zo(D())||D()===11}function ER(v){if(D()===11||D()===9||D()===10){let A=ul();return A.text=qd(A.text),A}return v&&D()===23?TR():D()===81?FS():qi()}function Ud(){return ER(!0)}function TR(){let v=re();ie(23);let A=co(ti);return ie(24),X(d.createComputedPropertyName(A),v)}function FS(){let v=re(),A=b(qd(t.getTokenValue()));return ce(),X(A,v)}function Ff(v){return D()===v&&We(LI)}function Eb(){return ce(),t.hasPrecedingLineBreak()?!1:cu()}function LI(){switch(D()){case 87:return ce()===94;case 95:return ce(),D()===90?ye(ay):D()===156?ye(DR):iy();case 90:return ay();case 126:return ce(),cu();case 139:case 153:return ce(),AR();default:return Eb()}}function iy(){return D()===60||D()!==42&&D()!==130&&D()!==19&&cu()}function DR(){return ce(),iy()}function $I(){return Q_(D())&&We(LI)}function cu(){return D()===23||D()===19||D()===42||D()===26||pp()}function AR(){return D()===23||pp()}function ay(){return ce(),D()===86||D()===100||D()===120||D()===60||D()===128&&ye(Dk)||D()===134&&ye(Ak)}function RS(v,A){if($S(v))return!0;switch(v){case 0:case 1:case 3:return!(D()===27&&A)&&Ik();case 2:return D()===84||D()===90;case 4:return ye(_w);case 5:return ye(qk)||D()===27&&!A;case 6:return D()===23||pp();case 12:switch(D()){case 23:case 42:case 26:case 25:return!0;default:return pp()}case 18:return pp();case 9:return D()===23||D()===26||pp();case 24:return RI();case 7:return D()===19?ye(MI):A?ht()&&!Tb():Kb()&&!Tb();case 8:return cx();case 10:return D()===28||D()===26||cx();case 19:return D()===103||D()===87||ht();case 15:switch(D()){case 28:case 25:return!0}case 11:return D()===26||_p();case 16:return qS(!1);case 17:return qS(!0);case 20:case 21:return D()===28||Mf();case 22:return fx();case 23:return D()===161&&ye(Nk)?!1:D()===11?!0:Zo(D());case 13:return Zo(D())||D()===19;case 14:return!0;case 25:return!0;case 26:return pe.fail("ParsingContext.Count used as a context");default:pe.assertNever(v,"Non-exhaustive case in 'isListElement'.")}}function MI(){if(pe.assert(D()===19),ce()===20){let v=ce();return v===28||v===19||v===96||v===119}return!0}function sy(){return ce(),ht()}function IR(){return ce(),Zo(D())}function jI(){return ce(),det(D())}function Tb(){return D()===119||D()===96?ye(BI):!1}function BI(){return ce(),_p()}function cy(){return ce(),Mf()}function LS(v){if(D()===1)return!0;switch(v){case 1:case 2:case 4:case 5:case 6:case 12:case 9:case 23:case 24:return D()===20;case 3:return D()===20||D()===84||D()===90;case 7:return D()===19||D()===96||D()===119;case 8:return Db();case 19:return D()===32||D()===21||D()===19||D()===96||D()===119;case 11:return D()===22||D()===27;case 15:case 21:case 10:return D()===24;case 17:case 16:case 18:return D()===22||D()===24;case 20:return D()!==28;case 22:return D()===19||D()===20;case 13:return D()===32||D()===44;case 14:return D()===30&&ye($8);default:return!1}}function Db(){return!!(au()||Kw(D())||D()===39)}function qI(){pe.assert(nn,"Missing parsing context");for(let v=0;v<26;v++)if(nn&1<=0)}function Cb(v){return v===6?G.An_enum_member_name_must_be_followed_by_a_or:void 0}function lu(){let v=ui([],re());return v.isMissingList=!0,v}function WI(v){return!!v.isMissingList}function zd(v,A,P,R){if(ie(P)){let M=hs(v,A);return ie(R),M}return lu()}function Jd(v,A){let P=re(),R=v?qi(A):No(A);for(;tr(25)&&D()!==30;)R=X(d.createQualifiedName(R,Rf(v,!1,!0)),P);return R}function wR(v,A){return X(d.createQualifiedName(v,A),v.pos)}function Rf(v,A,P){if(t.hasPrecedingLineBreak()&&Zo(D())&&ye(ox))return ua(80,!0,G.Identifier_expected);if(D()===81){let R=FS();return A?R:ua(80,!0,G.Identifier_expected)}return v?P?qi():Nf():No()}function kR(v){let A=re(),P=[],R;do R=ew(v),P.push(R);while(R.literal.kind===17);return ui(P,A)}function jS(v){let A=re();return X(d.createTemplateExpression(ly(v),kR(v)),A)}function QI(){let v=re();return X(d.createTemplateLiteralType(ly(!1),CR()),v)}function CR(){let v=re(),A=[],P;do P=XI(),A.push(P);while(P.literal.kind===17);return ui(A,v)}function XI(){let v=re();return X(d.createTemplateLiteralTypeSpan(no(),YI(!1)),v)}function YI(v){return D()===20?(mi(v),tw()):ll(18,G._0_expected,io(20))}function ew(v){let A=re();return X(d.createTemplateSpan(co(ti),YI(v)),A)}function ul(){return Lf(D())}function ly(v){!v&&t.getTokenFlags()&26656&&mi(!1);let A=Lf(D());return pe.assert(A.kind===16,"Template head has wrong token kind"),A}function tw(){let v=Lf(D());return pe.assert(v.kind===17||v.kind===18,"Template fragment has wrong token kind"),v}function PR(v){let A=v===15||v===18,P=t.getTokenText();return P.substring(1,P.length-(t.isUnterminated()?0:A?1:2))}function Lf(v){let A=re(),P=zfe(v)?d.createTemplateLiteralLikeNode(v,t.getTokenValue(),PR(v),t.getTokenFlags()&7176):v===9?m(t.getTokenValue(),t.getNumericLiteralFlags()):v===11?y(t.getTokenValue(),void 0,t.hasExtendedUnicodeEscape()):dtt(v)?g(v,t.getTokenValue()):pe.fail();return t.hasExtendedUnicodeEscape()&&(P.hasExtendedUnicodeEscape=!0),t.isUnterminated()&&(P.isUnterminated=!0),ce(),X(P,A)}function $f(){return Jd(!0,G.Type_expected)}function rw(){if(!t.hasPrecedingLineBreak()&&ei()===30)return zd(20,no,30,32)}function BS(){let v=re();return X(d.createTypeReferenceNode($f(),rw()),v)}function Pb(v){switch(v.kind){case 184:return Bg(v.typeName);case 185:case 186:{let{parameters:A,type:P}=v;return WI(A)||Pb(P)}case 197:return Pb(v.type);default:return!1}}function OR(v){return ce(),X(d.createTypePredicateNode(void 0,v,no()),v.pos)}function Ob(){let v=re();return ce(),X(d.createThisTypeNode(),v)}function NR(){let v=re();return ce(),X(d.createJSDocAllType(),v)}function nw(){let v=re();return ce(),X(d.createJSDocNonNullableType(zb(),!1),v)}function FR(){let v=re();return ce(),D()===28||D()===20||D()===22||D()===32||D()===64||D()===52?X(d.createJSDocUnknownType(),v):X(d.createJSDocNullableType(no(),!1),v)}function ow(){let v=re(),A=fr();if(We(Qk)){let P=pl(36),R=bc(59,!1);return Vt(X(d.createJSDocFunctionType(P,R),v),A)}return X(d.createTypeReferenceNode(qi(),void 0),v)}function Nb(){let v=re(),A;return(D()===110||D()===105)&&(A=qi(),ie(59)),X(d.createParameterDeclaration(void 0,void 0,A,void 0,Fb(),void 0),v)}function Fb(){t.setSkipJsDocLeadingAsterisks(!0);let v=re();if(tr(144)){let R=d.createJSDocNamepathType(void 0);e:for(;;)switch(D()){case 20:case 1:case 28:case 5:break e;default:vr()}return t.setSkipJsDocLeadingAsterisks(!1),X(R,v)}let A=tr(26),P=JS();return t.setSkipJsDocLeadingAsterisks(!1),A&&(P=X(d.createJSDocVariadicType(P),v)),D()===64?(ce(),X(d.createJSDocOptionalType(P),v)):P}function iw(){let v=re();ie(114);let A=Jd(!0),P=t.hasPrecedingLineBreak()?void 0:YS();return X(d.createTypeQueryNode(A,P),v)}function aw(){let v=re(),A=xc(!1,!0),P=No(),R,M;tr(96)&&(Mf()||!_p()?R=no():M=ek());let ee=tr(64)?no():void 0,be=d.createTypeParameterDeclaration(A,P,R,ee);return be.expression=M,X(be,v)}function ys(){if(D()===30)return zd(19,aw,30,32)}function qS(v){return D()===26||cx()||Q_(D())||D()===60||Mf(!v)}function sw(v){let A=jf(G.Private_identifiers_cannot_be_used_as_parameters);return Mtt(A)===0&&!Ra(v)&&Q_(D())&&ce(),A}function cw(){return br()||D()===23||D()===19}function Rb(v){return Lb(v)}function lw(v){return Lb(v,!1)}function Lb(v,A=!0){let P=re(),R=fr(),M=v?ue(()=>xc(!0)):Ee(()=>xc(!0));if(D()===110){let Ce=d.createParameterDeclaration(M,void 0,su(!0),void 0,dp(),void 0),De=gJ(M);return De&&_s(De,G.Neither_decorators_nor_modifiers_may_be_applied_to_this_parameters),Vt(X(Ce,P),R)}let ee=Hn;Hn=!1;let be=mo(26);if(!A&&!cw())return;let Ue=Vt(X(d.createParameterDeclaration(M,be,sw(M),mo(58),dp(),fp()),P),R);return Hn=ee,Ue}function bc(v,A){if(uw(v,A))return up(JS)}function uw(v,A){return v===39?(ie(v),!0):tr(59)?!0:A&&D()===39?(Ft(G._0_expected,io(59)),ce(),!0):!1}function $b(v,A){let P=kt(),R=$r();Wr(!!(v&1)),ro(!!(v&2));let M=v&32?hs(17,Nb):hs(16,()=>A?Rb(R):lw(R));return Wr(P),ro(R),M}function pl(v){if(!ie(21))return lu();let A=$b(v,!0);return ie(22),A}function US(){tr(28)||ba()}function pw(v){let A=re(),P=fr();v===181&&ie(105);let R=ys(),M=pl(4),ee=bc(59,!0);US();let be=v===180?d.createCallSignature(R,M,ee):d.createConstructSignature(R,M,ee);return Vt(X(be,A),P)}function Vd(){return D()===23&&ye(RR)}function RR(){if(ce(),D()===26||D()===24)return!0;if(Q_(D())){if(ce(),ht())return!0}else if(ht())ce();else return!1;return D()===59||D()===28?!0:D()!==58?!1:(ce(),D()===59||D()===28||D()===24)}function Mb(v,A,P){let R=zd(16,()=>Rb(!1),23,24),M=dp();US();let ee=d.createIndexSignature(P,R,M);return Vt(X(ee,v),A)}function dw(v,A,P){let R=Ud(),M=mo(58),ee;if(D()===21||D()===30){let be=ys(),Ue=pl(4),Ce=bc(59,!0);ee=d.createMethodSignature(P,R,M,be,Ue,Ce)}else{let be=dp();ee=d.createPropertySignature(P,R,M,be),D()===64&&(ee.initializer=fp())}return US(),Vt(X(ee,v),A)}function _w(){if(D()===21||D()===30||D()===139||D()===153)return!0;let v=!1;for(;Q_(D());)v=!0,ce();return D()===23?!0:(pp()&&(v=!0,ce()),v?D()===21||D()===30||D()===58||D()===59||D()===28||au():!1)}function uy(){if(D()===21||D()===30)return pw(180);if(D()===105&&ye(fw))return pw(181);let v=re(),A=fr(),P=xc(!1);return Ff(139)?Bf(v,A,P,178,4):Ff(153)?Bf(v,A,P,179,4):Vd()?Mb(v,A,P):dw(v,A,P)}function fw(){return ce(),D()===21||D()===30}function mw(){return ce()===25}function hw(){switch(ce()){case 21:case 30:case 25:return!0}return!1}function yw(){let v=re();return X(d.createTypeLiteralNode(gw()),v)}function gw(){let v;return ie(19)?(v=qs(4,uy),ie(20)):v=lu(),v}function Sw(){return ce(),D()===40||D()===41?ce()===148:(D()===148&&ce(),D()===23&&sy()&&ce()===103)}function LR(){let v=re(),A=qi();ie(103);let P=no();return X(d.createTypeParameterDeclaration(void 0,A,P,void 0),v)}function vw(){let v=re();ie(19);let A;(D()===148||D()===40||D()===41)&&(A=la(),A.kind!==148&&ie(148)),ie(23);let P=LR(),R=tr(130)?no():void 0;ie(24);let M;(D()===58||D()===40||D()===41)&&(M=la(),M.kind!==58&&ie(58));let ee=dp();ba();let be=qs(4,uy);return ie(20),X(d.createMappedTypeNode(A,P,R,M,ee,be),v)}function bw(){let v=re();if(tr(26))return X(d.createRestTypeNode(no()),v);let A=no();if(pot(A)&&A.pos===A.type.pos){let P=d.createOptionalTypeNode(A.type);return Fs(P,A),P.flags=A.flags,P}return A}function jb(){return ce()===59||D()===58&&ce()===59}function $R(){return D()===26?Zo(ce())&&jb():Zo(D())&&jb()}function xw(){if(ye($R)){let v=re(),A=fr(),P=mo(26),R=qi(),M=mo(58);ie(59);let ee=bw(),be=d.createNamedTupleMember(P,R,M,ee);return Vt(X(be,v),A)}return bw()}function MR(){let v=re();return X(d.createTupleTypeNode(zd(21,xw,23,24)),v)}function Ew(){let v=re();ie(21);let A=no();return ie(22),X(d.createParenthesizedType(A),v)}function jR(){let v;if(D()===128){let A=re();ce();let P=X(E(128),A);v=ui([P],A)}return v}function Bb(){let v=re(),A=fr(),P=jR(),R=tr(105);pe.assert(!P||R,"Per isStartOfFunctionOrConstructorType, a function type cannot have modifiers.");let M=ys(),ee=pl(4),be=bc(39,!1),Ue=R?d.createConstructorTypeNode(P,M,ee,be):d.createFunctionTypeNode(M,ee,be);return Vt(X(Ue,v),A)}function Tw(){let v=la();return D()===25?void 0:v}function qb(v){let A=re();v&&ce();let P=D()===112||D()===97||D()===106?la():Lf(D());return v&&(P=X(d.createPrefixUnaryExpression(41,P),A)),X(d.createLiteralTypeNode(P),A)}function BR(){return ce(),D()===102}function Ub(){K|=4194304;let v=re(),A=tr(114);ie(102),ie(21);let P=no(),R;if(tr(28)){let be=t.getTokenStart();ie(19);let Ue=D();if(Ue===118||Ue===132?ce():Ft(G._0_expected,io(118)),ie(59),R=yx(Ue,!0),tr(28),!ie(20)){let Ce=h1(Ye);Ce&&Ce.code===G._0_expected.code&&nO(Ce,i1(le,ae,be,1,G.The_parser_expected_to_find_a_1_to_match_the_0_token_here,"{","}"))}}ie(22);let M=tr(25)?$f():void 0,ee=rw();return X(d.createImportTypeNode(P,R,M,ee,A),v)}function Dw(){return ce(),D()===9||D()===10}function zb(){switch(D()){case 133:case 159:case 154:case 150:case 163:case 155:case 136:case 157:case 146:case 151:return We(Tw)||BS();case 67:t.reScanAsteriskEqualsToken();case 42:return NR();case 61:t.reScanQuestionToken();case 58:return FR();case 100:return ow();case 54:return nw();case 15:case 11:case 9:case 10:case 112:case 97:case 106:return qb();case 41:return ye(Dw)?qb(!0):BS();case 116:return la();case 110:{let v=Ob();return D()===142&&!t.hasPrecedingLineBreak()?OR(v):v}case 114:return ye(BR)?Ub():iw();case 19:return ye(Sw)?vw():yw();case 23:return MR();case 21:return Ew();case 102:return Ub();case 131:return ye(ox)?Rw():BS();case 16:return QI();default:return BS()}}function Mf(v){switch(D()){case 133:case 159:case 154:case 150:case 163:case 136:case 148:case 155:case 158:case 116:case 157:case 106:case 110:case 114:case 146:case 19:case 23:case 30:case 52:case 51:case 105:case 11:case 9:case 10:case 112:case 97:case 151:case 42:case 58:case 54:case 26:case 140:case 102:case 131:case 15:case 16:return!0;case 100:return!v;case 41:return!v&&ye(Dw);case 21:return!v&&ye(Aw);default:return ht()}}function Aw(){return ce(),D()===22||qS(!1)||Mf()}function Iw(){let v=re(),A=zb();for(;!t.hasPrecedingLineBreak();)switch(D()){case 54:ce(),A=X(d.createJSDocNonNullableType(A,!0),v);break;case 58:if(ye(cy))return A;ce(),A=X(d.createJSDocNullableType(A,!0),v);break;case 23:if(ie(23),Mf()){let P=no();ie(24),A=X(d.createIndexedAccessTypeNode(A,P),v)}else ie(24),A=X(d.createArrayTypeNode(A),v);break;default:return A}return A}function ww(v){let A=re();return ie(v),X(d.createTypeOperatorNode(v,Cw()),A)}function qR(){if(tr(96)){let v=vc(no);if(wr()||D()!==58)return v}}function kw(){let v=re(),A=No(),P=We(qR),R=d.createTypeParameterDeclaration(void 0,A,P);return X(R,v)}function UR(){let v=re();return ie(140),X(d.createInferTypeNode(kw()),v)}function Cw(){let v=D();switch(v){case 143:case 158:case 148:return ww(v);case 140:return UR()}return up(Iw)}function zS(v){if(Vb()){let A=Bb(),P;return eye(A)?P=v?G.Function_type_notation_must_be_parenthesized_when_used_in_a_union_type:G.Function_type_notation_must_be_parenthesized_when_used_in_an_intersection_type:P=v?G.Constructor_type_notation_must_be_parenthesized_when_used_in_a_union_type:G.Constructor_type_notation_must_be_parenthesized_when_used_in_an_intersection_type,_s(A,P),A}}function Pw(v,A,P){let R=re(),M=v===52,ee=tr(v),be=ee&&zS(M)||A();if(D()===v||ee){let Ue=[be];for(;tr(v);)Ue.push(zS(M)||A());be=X(P(ui(Ue,R)),R)}return be}function Jb(){return Pw(51,Cw,d.createIntersectionTypeNode)}function zR(){return Pw(52,Jb,d.createUnionTypeNode)}function Ow(){return ce(),D()===105}function Vb(){return D()===30||D()===21&&ye(Nw)?!0:D()===105||D()===128&&ye(Ow)}function JR(){if(Q_(D())&&xc(!1),ht()||D()===110)return ce(),!0;if(D()===23||D()===19){let v=Ye.length;return jf(),v===Ye.length}return!1}function Nw(){return ce(),!!(D()===22||D()===26||JR()&&(D()===59||D()===28||D()===58||D()===64||D()===22&&(ce(),D()===39)))}function JS(){let v=re(),A=ht()&&We(Fw),P=no();return A?X(d.createTypePredicateNode(void 0,A,P),v):P}function Fw(){let v=No();if(D()===142&&!t.hasPrecedingLineBreak())return ce(),v}function Rw(){let v=re(),A=ll(131),P=D()===110?Ob():No(),R=tr(142)?no():void 0;return X(d.createTypePredicateNode(A,P,R),v)}function no(){if(bt&81920)return fi(81920,no);if(Vb())return Bb();let v=re(),A=zR();if(!wr()&&!t.hasPrecedingLineBreak()&&tr(96)){let P=vc(no);ie(58);let R=up(no);ie(59);let M=up(no);return X(d.createConditionalTypeNode(A,P,R,M),v)}return A}function dp(){return tr(59)?no():void 0}function Kb(){switch(D()){case 110:case 108:case 106:case 112:case 97:case 9:case 10:case 11:case 15:case 16:case 21:case 23:case 19:case 100:case 86:case 105:case 44:case 69:case 80:return!0;case 102:return ye(hw);default:return ht()}}function _p(){if(Kb())return!0;switch(D()){case 40:case 41:case 55:case 54:case 91:case 114:case 116:case 46:case 47:case 30:case 135:case 127:case 81:case 60:return!0;default:return Gw()?!0:ht()}}function Lw(){return D()!==19&&D()!==100&&D()!==86&&D()!==60&&_p()}function ti(){let v=Tn();v&&_n(!1);let A=re(),P=Hi(!0),R;for(;R=mo(28);)P=Zb(P,R,Hi(!0),A);return v&&_n(!0),P}function fp(){return tr(64)?Hi(!0):void 0}function Hi(v){if($w())return Mw();let A=KR(v)||zw(v);if(A)return A;let P=re(),R=fr(),M=py(0);return M.kind===80&&D()===39?jw(P,M,v,R,void 0):S1(M)&&zhe(Dr())?Zb(M,la(),Hi(v),P):GR(M,P,v)}function $w(){return D()===127?kt()?!0:ye(ix):!1}function VR(){return ce(),!t.hasPrecedingLineBreak()&&ht()}function Mw(){let v=re();return ce(),!t.hasPrecedingLineBreak()&&(D()===42||_p())?X(d.createYieldExpression(mo(42),Hi(!0)),v):X(d.createYieldExpression(void 0,void 0),v)}function jw(v,A,P,R,M){pe.assert(D()===39,"parseSimpleArrowFunctionExpression should only have been called if we had a =>");let ee=d.createParameterDeclaration(void 0,void 0,A,void 0,void 0,void 0);X(ee,A.pos);let be=ui([ee],ee.pos,ee.end),Ue=ll(39),Ce=Gb(!!M,P),De=d.createArrowFunction(M,void 0,be,void 0,Ue,Ce);return Vt(X(De,v),R)}function KR(v){let A=Bw();if(A!==0)return A===1?Vw(!0,!0):We(()=>Uw(v))}function Bw(){return D()===21||D()===30||D()===134?ye(qw):D()===39?1:0}function qw(){if(D()===134&&(ce(),t.hasPrecedingLineBreak()||D()!==21&&D()!==30))return 0;let v=D(),A=ce();if(v===21){if(A===22)switch(ce()){case 39:case 59:case 19:return 1;default:return 0}if(A===23||A===19)return 2;if(A===26)return 1;if(Q_(A)&&A!==134&&ye(sy))return ce()===130?0:1;if(!ht()&&A!==110)return 0;switch(ce()){case 59:return 1;case 58:return ce(),D()===59||D()===28||D()===64||D()===22?1:0;case 28:case 64:case 22:return 2}return 0}else return pe.assert(v===30),!ht()&&D()!==87?0:pt===1?ye(()=>{tr(87);let P=ce();if(P===96)switch(ce()){case 64:case 32:case 44:return!1;default:return!0}else if(P===28||P===64)return!0;return!1})?1:0:2}function Uw(v){let A=t.getTokenStart();if(Gn?.has(A))return;let P=Vw(!1,v);return P||(Gn||(Gn=new Set)).add(A),P}function zw(v){if(D()===134&&ye(Jw)===1){let A=re(),P=fr(),R=Jk(),M=py(0);return jw(A,M,v,P,R)}}function Jw(){if(D()===134){if(ce(),t.hasPrecedingLineBreak()||D()===39)return 0;let v=py(0);if(!t.hasPrecedingLineBreak()&&v.kind===80&&D()===39)return 1}return 0}function Vw(v,A){let P=re(),R=fr(),M=Jk(),ee=Ra(M,aO)?2:0,be=ys(),Ue;if(ie(21)){if(v)Ue=$b(ee,v);else{let uu=$b(ee,v);if(!uu)return;Ue=uu}if(!ie(22)&&!v)return}else{if(!v)return;Ue=lu()}let Ce=D()===59,De=bc(59,!1);if(De&&!v&&Pb(De))return;let He=De;for(;He?.kind===197;)He=He.type;let mr=He&&dot(He);if(!v&&D()!==39&&(mr||D()!==19))return;let nr=D(),jt=ll(39),Wa=nr===39||nr===19?Gb(Ra(M,aO),A):No();if(!A&&Ce&&D()!==59)return;let Ai=d.createArrowFunction(M,be,Ue,De,jt,Wa);return Vt(X(Ai,P),R)}function Gb(v,A){if(D()===19)return ZS(v?2:0);if(D()!==27&&D()!==100&&D()!==86&&Ik()&&!Lw())return ZS(16|(v?2:0));let P=kt();Wr(!1);let R=Hn;Hn=!1;let M=v?ue(()=>Hi(A)):Ee(()=>Hi(A));return Hn=R,Wr(P),M}function GR(v,A,P){let R=mo(58);if(!R)return v;let M;return X(d.createConditionalExpression(v,R,fi(r,()=>Hi(!1)),M=ll(59),eJ(M)?Hi(P):ua(80,!1,G._0_expected,io(59))),A)}function py(v){let A=re(),P=ek();return Hb(v,P,A)}function Kw(v){return v===103||v===165}function Hb(v,A,P){for(;;){Dr();let R=Rz(D());if(!(D()===43?R>=v:R>v)||D()===103&&ut())break;if(D()===130||D()===152){if(t.hasPrecedingLineBreak())break;{let M=D();ce(),A=M===152?Hw(A,no()):Zw(A,no())}}else A=Zb(A,la(),py(R),P)}return A}function Gw(){return ut()&&D()===103?!1:Rz(D())>0}function Hw(v,A){return X(d.createSatisfiesExpression(v,A),v.pos)}function Zb(v,A,P,R){return X(d.createBinaryExpression(v,A,P),R)}function Zw(v,A){return X(d.createAsExpression(v,A),v.pos)}function Ww(){let v=re();return X(d.createPrefixUnaryExpression(D(),er(mp)),v)}function Qw(){let v=re();return X(d.createDeleteExpression(er(mp)),v)}function HR(){let v=re();return X(d.createTypeOfExpression(er(mp)),v)}function Xw(){let v=re();return X(d.createVoidExpression(er(mp)),v)}function ZR(){return D()===135?$r()?!0:ye(ix):!1}function Yw(){let v=re();return X(d.createAwaitExpression(er(mp)),v)}function ek(){if(WR()){let P=re(),R=VS();return D()===43?Hb(Rz(D()),R,P):R}let v=D(),A=mp();if(D()===43){let P=dd(ae,A.pos),{end:R}=A;A.kind===217?Zn(P,R,G.A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses):(pe.assert(Fz(v)),Zn(P,R,G.An_unary_expression_with_the_0_operator_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses,io(v)))}return A}function mp(){switch(D()){case 40:case 41:case 55:case 54:return Ww();case 91:return Qw();case 114:return HR();case 116:return Xw();case 30:return pt===1?_y(!0,void 0,void 0,!0):ik();case 135:if(ZR())return Yw();default:return VS()}}function WR(){switch(D()){case 40:case 41:case 55:case 54:case 91:case 114:case 116:case 135:return!1;case 30:if(pt!==1)return!1;default:return!0}}function VS(){if(D()===46||D()===47){let A=re();return X(d.createPrefixUnaryExpression(D(),er(dy)),A)}else if(pt===1&&D()===30&&ye(jI))return _y(!0);let v=dy();if(pe.assert(S1(v)),(D()===46||D()===47)&&!t.hasPrecedingLineBreak()){let A=D();return ce(),X(d.createPostfixUnaryExpression(v,A),v.pos)}return v}function dy(){let v=re(),A;return D()===102?ye(fw)?(K|=4194304,A=la()):ye(mw)?(ce(),ce(),A=X(d.createMetaProperty(102,qi()),v),A.name.escapedText==="defer"?(D()===21||D()===30)&&(K|=4194304):K|=8388608):A=KS():A=D()===108?tk():KS(),ex(v,A)}function KS(){let v=re(),A=tx();return Za(v,A,!0)}function tk(){let v=re(),A=la();if(D()===30){let P=re(),R=We(HS);R!==void 0&&(Zn(P,re(),G.super_may_not_use_type_arguments),Us()||(A=d.createExpressionWithTypeArguments(A,R)))}return D()===21||D()===25||D()===23?A:(ll(25,G.super_must_be_followed_by_an_argument_list_or_member_access),X(k(A,Rf(!0,!0,!0)),v))}function _y(v,A,P,R=!1){let M=re(),ee=YR(v),be;if(ee.kind===287){let Ue=GS(ee),Ce,De=Ue[Ue.length-1];if(De?.kind===285&&!rh(De.openingElement.tagName,De.closingElement.tagName)&&rh(ee.tagName,De.closingElement.tagName)){let He=De.children.end,mr=X(d.createJsxElement(De.openingElement,De.children,X(d.createJsxClosingElement(X(S(""),He,He)),He,He)),De.openingElement.pos,He);Ue=ui([...Ue.slice(0,Ue.length-1),mr],Ue.pos,He),Ce=De.closingElement}else Ce=ok(ee,v),rh(ee.tagName,Ce.tagName)||(P&&ime(P)&&rh(Ce.tagName,P.tagName)?_s(ee.tagName,G.JSX_element_0_has_no_corresponding_closing_tag,jD(ae,ee.tagName)):_s(Ce.tagName,G.Expected_corresponding_JSX_closing_tag_for_0,jD(ae,ee.tagName)));be=X(d.createJsxElement(ee,Ue,Ce),M)}else ee.kind===290?be=X(d.createJsxFragment(ee,GS(ee),n8(v)),M):(pe.assert(ee.kind===286),be=ee);if(!R&&v&&D()===30){let Ue=typeof A>"u"?be.pos:A,Ce=We(()=>_y(!0,Ue));if(Ce){let De=ua(28,!1);return eme(De,Ce.pos,0),Zn(dd(ae,Ue),Ce.end,G.JSX_expressions_must_have_one_parent_element),X(d.createBinaryExpression(be,De,Ce),M)}}return be}function Wb(){let v=re(),A=d.createJsxText(t.getTokenValue(),Ct===13);return Ct=t.scanJsxToken(),X(A,v)}function QR(v,A){switch(A){case 1:if(aot(v))_s(v,G.JSX_fragment_has_no_corresponding_closing_tag);else{let P=v.tagName,R=Math.min(dd(ae,P.pos),P.end);Zn(R,P.end,G.JSX_element_0_has_no_corresponding_closing_tag,jD(ae,v.tagName))}return;case 31:case 7:return;case 12:case 13:return Wb();case 19:return rk(!1);case 30:return _y(!1,void 0,v);default:return pe.assertNever(A)}}function GS(v){let A=[],P=re(),R=nn;for(nn|=16384;;){let M=QR(v,Ct=t.reScanJsxToken());if(!M||(A.push(M),ime(v)&&M?.kind===285&&!rh(M.openingElement.tagName,M.closingElement.tagName)&&rh(v.tagName,M.closingElement.tagName)))break}return nn=R,ui(A,P)}function XR(){let v=re();return X(d.createJsxAttributes(qs(13,nk)),v)}function YR(v){let A=re();if(ie(30),D()===32)return cl(),X(d.createJsxOpeningFragment(),A);let P=Qb(),R=(bt&524288)===0?YS():void 0,M=XR(),ee;return D()===32?(cl(),ee=d.createJsxOpeningElement(P,R,M)):(ie(44),ie(32,void 0,!1)&&(v?ce():cl()),ee=d.createJsxSelfClosingElement(P,R,M)),X(ee,A)}function Qb(){let v=re(),A=e8();if(mye(A))return A;let P=A;for(;tr(25);)P=X(k(P,Rf(!0,!1,!1)),v);return P}function e8(){let v=re();Gi();let A=D()===110,P=Nf();return tr(59)?(Gi(),X(d.createJsxNamespacedName(P,Nf()),v)):A?X(d.createToken(110),v):P}function rk(v){let A=re();if(!ie(19))return;let P,R;return D()!==20&&(v||(P=mo(26)),R=ti()),v?ie(20):ie(20,void 0,!1)&&cl(),X(d.createJsxExpression(P,R),A)}function nk(){if(D()===19)return r8();let v=re();return X(d.createJsxAttribute(t8(),Xb()),v)}function Xb(){if(D()===64){if(oy()===11)return ul();if(D()===19)return rk(!0);if(D()===30)return _y(!0);Ft(G.or_JSX_element_expected)}}function t8(){let v=re();Gi();let A=Nf();return tr(59)?(Gi(),X(d.createJsxNamespacedName(A,Nf()),v)):A}function r8(){let v=re();ie(19),ie(26);let A=ti();return ie(20),X(d.createJsxSpreadAttribute(A),v)}function ok(v,A){let P=re();ie(31);let R=Qb();return ie(32,void 0,!1)&&(A||!rh(v.tagName,R)?ce():cl()),X(d.createJsxClosingElement(R),P)}function n8(v){let A=re();return ie(31),ie(32,G.Expected_corresponding_closing_tag_for_JSX_fragment,!1)&&(v?ce():cl()),X(d.createJsxJsxClosingFragment(),A)}function ik(){pe.assert(pt!==1,"Type assertions should never be parsed in JSX; they should be parsed as comparisons or JSX elements/fragments.");let v=re();ie(30);let A=no();ie(32);let P=mp();return X(d.createTypeAssertion(A,P),v)}function o8(){return ce(),Zo(D())||D()===23||Us()}function ak(){return D()===29&&ye(o8)}function Yb(v){if(v.flags&64)return!0;if(uO(v)){let A=v.expression;for(;uO(A)&&!(A.flags&64);)A=A.expression;if(A.flags&64){for(;uO(v);)v.flags|=64,v=v.expression;return!0}}return!1}function sk(v,A,P){let R=Rf(!0,!0,!0),M=P||Yb(A),ee=M?F(A,P,R):k(A,R);if(M&&zg(ee.name)&&_s(ee.name,G.An_optional_chain_cannot_contain_private_identifiers),Xnt(A)&&A.typeArguments){let be=A.typeArguments.pos-1,Ue=dd(ae,A.typeArguments.end)+1;Zn(be,Ue,G.An_instantiation_expression_cannot_be_followed_by_a_property_access)}return X(ee,v)}function i8(v,A,P){let R;if(D()===24)R=ua(80,!0,G.An_element_access_expression_should_take_an_argument);else{let ee=co(ti);AO(ee)&&(ee.text=qd(ee.text)),R=ee}ie(24);let M=P||Yb(A)?$(A,P,R):O(A,R);return X(M,v)}function Za(v,A,P){for(;;){let R,M=!1;if(P&&ak()?(R=ll(29),M=Zo(D())):M=tr(25),M){A=sk(v,A,R);continue}if((R||!Tn())&&tr(23)){A=i8(v,A,R);continue}if(Us()){A=!R&&A.kind===234?Kd(v,A.expression,R,A.typeArguments):Kd(v,A,R,void 0);continue}if(!R){if(D()===54&&!t.hasPrecedingLineBreak()){ce(),A=X(d.createNonNullExpression(A),v);continue}let ee=We(HS);if(ee){A=X(d.createExpressionWithTypeArguments(A,ee),v);continue}}return A}}function Us(){return D()===15||D()===16}function Kd(v,A,P,R){let M=d.createTaggedTemplateExpression(A,R,D()===15?(mi(!0),ul()):jS(!0));return(P||A.flags&64)&&(M.flags|=64),M.questionDotToken=P,X(M,v)}function ex(v,A){for(;;){A=Za(v,A,!0);let P,R=mo(29);if(R&&(P=We(HS),Us())){A=Kd(v,A,R,P);continue}if(P||D()===21){!R&&A.kind===234&&(P=A.typeArguments,A=A.expression);let M=ck(),ee=R||Yb(A)?U(A,R,P,M):N(A,P,M);A=X(ee,v);continue}if(R){let M=ua(80,!1,G.Identifier_expected);A=X(F(A,R,M),v)}break}return A}function ck(){ie(21);let v=hs(11,pk);return ie(22),v}function HS(){if((bt&524288)!==0||ei()!==30)return;ce();let v=hs(20,no);if(Dr()===32)return ce(),v&&a8()?v:void 0}function a8(){switch(D()){case 21:case 15:case 16:return!0;case 30:case 32:case 40:case 41:return!1}return t.hasPrecedingLineBreak()||Gw()||!_p()}function tx(){switch(D()){case 15:t.getTokenFlags()&26656&&mi(!1);case 9:case 10:case 11:return ul();case 110:case 108:case 106:case 112:case 97:return la();case 21:return s8();case 23:return dk();case 19:return rx();case 134:if(!ye(Ak))break;return nx();case 60:return I8();case 86:return w8();case 100:return nx();case 105:return fk();case 44:case 69:if(on()===14)return ul();break;case 16:return jS(!1);case 81:return FS()}return No(G.Expression_expected)}function s8(){let v=re(),A=fr();ie(21);let P=co(ti);return ie(22),Vt(X(Te(P),v),A)}function lk(){let v=re();ie(26);let A=Hi(!0);return X(d.createSpreadElement(A),v)}function uk(){return D()===26?lk():D()===28?X(d.createOmittedExpression(),re()):Hi(!0)}function pk(){return fi(r,uk)}function dk(){let v=re(),A=t.getTokenStart(),P=ie(23),R=t.hasPrecedingLineBreak(),M=hs(15,uk);return Bd(23,24,P,A),X(I(M,R),v)}function _k(){let v=re(),A=fr();if(mo(26)){let De=Hi(!0);return Vt(X(d.createSpreadAssignment(De),v),A)}let P=xc(!0);if(Ff(139))return Bf(v,A,P,178,0);if(Ff(153))return Bf(v,A,P,179,0);let R=mo(42),M=ht(),ee=Ud(),be=mo(58),Ue=mo(54);if(R||D()===21||D()===30)return Bk(v,A,P,R,ee,be,Ue);let Ce;if(M&&D()!==59){let De=mo(64),He=De?co(()=>Hi(!0)):void 0;Ce=d.createShorthandPropertyAssignment(ee,He),Ce.equalsToken=De}else{ie(59);let De=co(()=>Hi(!0));Ce=d.createPropertyAssignment(ee,De)}return Ce.modifiers=P,Ce.questionToken=be,Ce.exclamationToken=Ue,Vt(X(Ce,v),A)}function rx(){let v=re(),A=t.getTokenStart(),P=ie(19),R=t.hasPrecedingLineBreak(),M=hs(12,_k,!0);return Bd(19,20,P,A),X(T(M,R),v)}function nx(){let v=Tn();_n(!1);let A=re(),P=fr(),R=xc(!1);ie(100);let M=mo(42),ee=M?1:0,be=Ra(R,aO)?2:0,Ue=ee&&be?Ie(fy):ee?sl(fy):be?ue(fy):fy(),Ce=ys(),De=pl(ee|be),He=bc(59,!1),mr=ZS(ee|be);_n(v);let nr=d.createFunctionExpression(R,M,Ue,Ce,De,He,mr);return Vt(X(nr,A),P)}function fy(){return br()?xb():void 0}function fk(){let v=re();if(ie(105),tr(25)){let ee=qi();return X(d.createMetaProperty(105,ee),v)}let A=re(),P=Za(A,tx(),!1),R;P.kind===234&&(R=P.typeArguments,P=P.expression),D()===29&&Ft(G.Invalid_optional_chain_from_new_expression_Did_you_mean_to_call_0,jD(ae,P));let M=D()===21?ck():void 0;return X(ge(P,R,M),v)}function Gd(v,A){let P=re(),R=fr(),M=t.getTokenStart(),ee=ie(19,A);if(ee||v){let be=t.hasPrecedingLineBreak(),Ue=qs(1,pa);Bd(19,20,ee,M);let Ce=Vt(X(ke(Ue,be),P),R);return D()===64&&(Ft(G.Declaration_or_statement_expected_This_follows_a_block_of_statements_so_if_you_intended_to_write_a_destructuring_assignment_you_might_need_to_wrap_the_whole_assignment_in_parentheses),ce()),Ce}else{let be=lu();return Vt(X(ke(be,void 0),P),R)}}function ZS(v,A){let P=kt();Wr(!!(v&1));let R=$r();ro(!!(v&2));let M=Hn;Hn=!1;let ee=Tn();ee&&_n(!1);let be=Gd(!!(v&16),A);return ee&&_n(!0),Hn=M,Wr(P),ro(R),be}function mk(){let v=re(),A=fr();return ie(27),Vt(X(d.createEmptyStatement(),v),A)}function c8(){let v=re(),A=fr();ie(101);let P=t.getTokenStart(),R=ie(21),M=co(ti);Bd(21,22,R,P);let ee=pa(),be=tr(93)?pa():void 0;return Vt(X(xe(M,ee,be),v),A)}function hk(){let v=re(),A=fr();ie(92);let P=pa();ie(117);let R=t.getTokenStart(),M=ie(21),ee=co(ti);return Bd(21,22,M,R),tr(27),Vt(X(d.createDoStatement(P,ee),v),A)}function l8(){let v=re(),A=fr();ie(117);let P=t.getTokenStart(),R=ie(21),M=co(ti);Bd(21,22,R,P);let ee=pa();return Vt(X(Rt(M,ee),v),A)}function yk(){let v=re(),A=fr();ie(99);let P=mo(135);ie(21);let R;D()!==27&&(D()===115||D()===121||D()===87||D()===160&&ye(kk)||D()===135&&ye(ax)?R=$k(!0):R=jd(ti));let M;if(P?ie(165):tr(165)){let ee=co(()=>Hi(!0));ie(22),M=Yt(P,R,ee,pa())}else if(tr(103)){let ee=co(ti);ie(22),M=d.createForInStatement(R,ee,pa())}else{ie(27);let ee=D()!==27&&D()!==22?co(ti):void 0;ie(27);let be=D()!==22?co(ti):void 0;ie(22),M=Jt(R,ee,be,pa())}return Vt(X(M,v),A)}function gk(v){let A=re(),P=fr();ie(v===253?83:88);let R=au()?void 0:No();ba();let M=v===253?d.createBreakStatement(R):d.createContinueStatement(R);return Vt(X(M,A),P)}function Sk(){let v=re(),A=fr();ie(107);let P=au()?void 0:co(ti);return ba(),Vt(X(d.createReturnStatement(P),v),A)}function u8(){let v=re(),A=fr();ie(118);let P=t.getTokenStart(),R=ie(21),M=co(ti);Bd(21,22,R,P);let ee=Uo(67108864,pa);return Vt(X(d.createWithStatement(M,ee),v),A)}function vk(){let v=re(),A=fr();ie(84);let P=co(ti);ie(59);let R=qs(3,pa);return Vt(X(d.createCaseClause(P,R),v),A)}function p8(){let v=re();ie(90),ie(59);let A=qs(3,pa);return X(d.createDefaultClause(A),v)}function d8(){return D()===84?vk():p8()}function bk(){let v=re();ie(19);let A=qs(2,d8);return ie(20),X(d.createCaseBlock(A),v)}function _8(){let v=re(),A=fr();ie(109),ie(21);let P=co(ti);ie(22);let R=bk();return Vt(X(d.createSwitchStatement(P,R),v),A)}function xk(){let v=re(),A=fr();ie(111);let P=t.hasPrecedingLineBreak()?void 0:co(ti);return P===void 0&&(fo++,P=X(S(""),re())),NS()||zo(P),Vt(X(d.createThrowStatement(P),v),A)}function f8(){let v=re(),A=fr();ie(113);let P=Gd(!1),R=D()===85?Ek():void 0,M;return(!R||D()===98)&&(ie(98,G.catch_or_finally_expected),M=Gd(!1)),Vt(X(d.createTryStatement(P,R,M),v),A)}function Ek(){let v=re();ie(85);let A;tr(21)?(A=QS(),ie(22)):A=void 0;let P=Gd(!1);return X(d.createCatchClause(A,P),v)}function m8(){let v=re(),A=fr();return ie(89),ba(),Vt(X(d.createDebuggerStatement(),v),A)}function Tk(){let v=re(),A=fr(),P,R=D()===21,M=co(ti);return kn(M)&&tr(59)?P=d.createLabeledStatement(M,pa()):(NS()||zo(M),P=me(M),R&&(A=!1)),Vt(X(P,v),A)}function ox(){return ce(),Zo(D())&&!t.hasPrecedingLineBreak()}function Dk(){return ce(),D()===86&&!t.hasPrecedingLineBreak()}function Ak(){return ce(),D()===100&&!t.hasPrecedingLineBreak()}function ix(){return ce(),(Zo(D())||D()===9||D()===10||D()===11)&&!t.hasPrecedingLineBreak()}function h8(){for(;;)switch(D()){case 115:case 121:case 87:case 100:case 86:case 94:return!0;case 160:return Ck();case 135:return sx();case 120:case 156:case 166:return VR();case 144:case 145:return v8();case 128:case 129:case 134:case 138:case 123:case 124:case 125:case 148:let v=D();if(ce(),t.hasPrecedingLineBreak())return!1;if(v===138&&D()===156)return!0;continue;case 162:return ce(),D()===19||D()===80||D()===95;case 102:return ce(),D()===166||D()===11||D()===42||D()===19||Zo(D());case 95:let A=ce();if(A===156&&(A=ye(ce)),A===64||A===42||A===19||A===90||A===130||A===60)return!0;continue;case 126:ce();continue;default:return!1}}function my(){return ye(h8)}function Ik(){switch(D()){case 60:case 27:case 19:case 115:case 121:case 160:case 100:case 86:case 94:case 101:case 92:case 117:case 99:case 88:case 83:case 107:case 118:case 109:case 111:case 113:case 89:case 85:case 98:return!0;case 102:return my()||ye(hw);case 87:case 95:return my();case 134:case 138:case 120:case 144:case 145:case 156:case 162:case 166:return!0;case 129:case 125:case 123:case 124:case 126:case 148:return my()||!ye(ox);default:return _p()}}function wk(){return ce(),br()||D()===19||D()===23}function y8(){return ye(wk)}function kk(){return WS(!0)}function g8(){return ce(),D()===64||D()===27||D()===59}function WS(v){return ce(),v&&D()===165?ye(g8):(br()||D()===19)&&!t.hasPrecedingLineBreak()}function Ck(){return ye(WS)}function ax(v){return ce()===160?WS(v):!1}function sx(){return ye(ax)}function pa(){switch(D()){case 27:return mk();case 19:return Gd(!1);case 115:return gy(re(),fr(),void 0);case 121:if(y8())return gy(re(),fr(),void 0);break;case 135:if(sx())return gy(re(),fr(),void 0);break;case 160:if(Ck())return gy(re(),fr(),void 0);break;case 100:return lx(re(),fr(),void 0);case 86:return dx(re(),fr(),void 0);case 101:return c8();case 92:return hk();case 117:return l8();case 99:return yk();case 88:return gk(252);case 83:return gk(253);case 107:return Sk();case 118:return u8();case 109:return _8();case 111:return xk();case 113:case 85:case 98:return f8();case 89:return m8();case 60:return hy();case 134:case 120:case 156:case 144:case 145:case 138:case 87:case 94:case 95:case 102:case 123:case 124:case 125:case 128:case 129:case 126:case 148:case 162:if(my())return hy();break}return Tk()}function Pk(v){return v.kind===138}function hy(){let v=re(),A=fr(),P=xc(!0);if(Ra(P,Pk)){let R=S8(v);if(R)return R;for(let M of P)M.flags|=33554432;return Uo(33554432,()=>Ok(v,A,P))}else return Ok(v,A,P)}function S8(v){return Uo(33554432,()=>{let A=$S(nn,v);if(A)return UI(A)})}function Ok(v,A,P){switch(D()){case 115:case 121:case 87:case 160:case 135:return gy(v,A,P);case 100:return lx(v,A,P);case 86:return dx(v,A,P);case 120:return O8(v,A,P);case 156:return N8(v,A,P);case 94:return F8(v,A,P);case 162:case 144:case 145:return R8(v,A,P);case 102:return Sy(v,A,P);case 95:switch(ce(),D()){case 90:case 64:return nC(v,A,P);case 130:return M8(v,A,P);default:return rC(v,A,P)}default:if(P){let R=ua(283,!0,G.Declaration_expected);return rJ(R,v),R.modifiers=P,R}return}}function Nk(){return ce()===11}function Fk(){return ce(),D()===161||D()===64}function v8(){return ce(),!t.hasPrecedingLineBreak()&&(ht()||D()===11)}function yy(v,A){if(D()!==19){if(v&4){US();return}if(au()){ba();return}}return ZS(v,A)}function b8(){let v=re();if(D()===28)return X(d.createOmittedExpression(),v);let A=mo(26),P=jf(),R=fp();return X(d.createBindingElement(A,void 0,P,R),v)}function Rk(){let v=re(),A=mo(26),P=br(),R=Ud(),M;P&&D()!==59?(M=R,R=void 0):(ie(59),M=jf());let ee=fp();return X(d.createBindingElement(A,R,M,ee),v)}function x8(){let v=re();ie(19);let A=co(()=>hs(9,Rk));return ie(20),X(d.createObjectBindingPattern(A),v)}function Lk(){let v=re();ie(23);let A=co(()=>hs(10,b8));return ie(24),X(d.createArrayBindingPattern(A),v)}function cx(){return D()===19||D()===23||D()===81||br()}function jf(v){return D()===23?Lk():D()===19?x8():xb(v)}function E8(){return QS(!0)}function QS(v){let A=re(),P=fr(),R=jf(G.Private_identifiers_are_not_allowed_in_variable_declarations),M;v&&R.kind===80&&D()===54&&!t.hasPrecedingLineBreak()&&(M=la());let ee=dp(),be=Kw(D())?void 0:fp(),Ue=vt(R,M,ee,be);return Vt(X(Ue,A),P)}function $k(v){let A=re(),P=0;switch(D()){case 115:break;case 121:P|=1;break;case 87:P|=2;break;case 160:P|=4;break;case 135:pe.assert(sx()),P|=6,ce();break;default:pe.fail()}ce();let R;if(D()===165&&ye(Mk))R=lu();else{let M=ut();Et(v),R=hs(8,v?QS:E8),Et(M)}return X(Fr(R,P),A)}function Mk(){return sy()&&ce()===22}function gy(v,A,P){let R=$k(!1);ba();let M=Je(P,R);return Vt(X(M,v),A)}function lx(v,A,P){let R=$r(),M=zc(P);ie(100);let ee=mo(42),be=M&2048?fy():xb(),Ue=ee?1:0,Ce=M&1024?2:0,De=ys();M&32&&ro(!0);let He=pl(Ue|Ce),mr=bc(59,!1),nr=yy(Ue|Ce,G.or_expected);ro(R);let jt=d.createFunctionDeclaration(P,ee,be,De,He,mr,nr);return Vt(X(jt,v),A)}function T8(){if(D()===137)return ie(137);if(D()===11&&ye(ce)===21)return We(()=>{let v=ul();return v.text==="constructor"?v:void 0})}function jk(v,A,P){return We(()=>{if(T8()){let R=ys(),M=pl(0),ee=bc(59,!1),be=yy(0,G.or_expected),Ue=d.createConstructorDeclaration(P,M,be);return Ue.typeParameters=R,Ue.type=ee,Vt(X(Ue,v),A)}})}function Bk(v,A,P,R,M,ee,be,Ue){let Ce=R?1:0,De=Ra(P,aO)?2:0,He=ys(),mr=pl(Ce|De),nr=bc(59,!1),jt=yy(Ce|De,Ue),Wa=d.createMethodDeclaration(P,R,M,ee,He,mr,nr,jt);return Wa.exclamationToken=be,Vt(X(Wa,v),A)}function XS(v,A,P,R,M){let ee=!M&&!t.hasPrecedingLineBreak()?mo(54):void 0,be=dp(),Ue=fi(90112,fp);SR(R,be,Ue);let Ce=d.createPropertyDeclaration(P,R,M||ee,be,Ue);return Vt(X(Ce,v),A)}function ux(v,A,P){let R=mo(42),M=Ud(),ee=mo(58);return R||D()===21||D()===30?Bk(v,A,P,R,M,ee,void 0,G.or_expected):XS(v,A,P,M,ee)}function Bf(v,A,P,R,M){let ee=Ud(),be=ys(),Ue=pl(0),Ce=bc(59,!1),De=yy(M),He=R===178?d.createGetAccessorDeclaration(P,ee,Ue,Ce,De):d.createSetAccessorDeclaration(P,ee,Ue,De);return He.typeParameters=be,xO(He)&&(He.type=Ce),Vt(X(He,v),A)}function qk(){let v;if(D()===60)return!0;for(;Q_(D());){if(v=D(),mtt(v))return!0;ce()}if(D()===42||(pp()&&(v=D(),ce()),D()===23))return!0;if(v!==void 0){if(!oh(v)||v===153||v===139)return!0;switch(D()){case 21:case 30:case 54:case 59:case 64:case 58:return!0;default:return au()}}return!1}function D8(v,A,P){ll(126);let R=A8(),M=Vt(X(d.createClassStaticBlockDeclaration(R),v),A);return M.modifiers=P,M}function A8(){let v=kt(),A=$r();Wr(!1),ro(!0);let P=Gd(!1);return Wr(v),ro(A),P}function Uk(){if($r()&&D()===135){let v=re(),A=No(G.Expression_expected);ce();let P=Za(v,A,!0);return ex(v,P)}return dy()}function zk(){let v=re();if(!tr(60))return;let A=ny(Uk);return X(d.createDecorator(A),v)}function px(v,A,P){let R=re(),M=D();if(D()===87&&A){if(!We(Eb))return}else if(P&&D()===126&&ye(e0)||v&&D()===126||!$I())return;return X(E(M),R)}function xc(v,A,P){let R=re(),M,ee,be,Ue=!1,Ce=!1,De=!1;if(v&&D()===60)for(;ee=zk();)M=sc(M,ee);for(;be=px(Ue,A,P);)be.kind===126&&(Ue=!0),M=sc(M,be),Ce=!0;if(Ce&&v&&D()===60)for(;ee=zk();)M=sc(M,ee),De=!0;if(De)for(;be=px(Ue,A,P);)be.kind===126&&(Ue=!0),M=sc(M,be);return M&&ui(M,R)}function Jk(){let v;if(D()===134){let A=re();ce();let P=X(E(134),A);v=ui([P],A)}return v}function Vk(){let v=re(),A=fr();if(D()===27)return ce(),Vt(X(d.createSemicolonClassElement(),v),A);let P=xc(!0,!0,!0);if(D()===126&&ye(e0))return D8(v,A,P);if(Ff(139))return Bf(v,A,P,178,0);if(Ff(153))return Bf(v,A,P,179,0);if(D()===137||D()===11){let R=jk(v,A,P);if(R)return R}if(Vd())return Mb(v,A,P);if(Zo(D())||D()===11||D()===9||D()===10||D()===42||D()===23)if(Ra(P,Pk)){for(let R of P)R.flags|=33554432;return Uo(33554432,()=>ux(v,A,P))}else return ux(v,A,P);if(P){let R=ua(80,!0,G.Declaration_expected);return XS(v,A,P,R,void 0)}return pe.fail("Should not have attempted to parse class member declaration.")}function I8(){let v=re(),A=fr(),P=xc(!0);if(D()===86)return _x(v,A,P,232);let R=ua(283,!0,G.Expression_expected);return rJ(R,v),R.modifiers=P,R}function w8(){return _x(re(),fr(),void 0,232)}function dx(v,A,P){return _x(v,A,P,264)}function _x(v,A,P,R){let M=$r();ie(86);let ee=k8(),be=ys();Ra(P,Snt)&&ro(!0);let Ue=Gk(),Ce;ie(19)?(Ce=Hk(),ie(20)):Ce=lu(),ro(M);let De=R===264?d.createClassDeclaration(P,ee,be,Ue,Ce):d.createClassExpression(P,ee,be,Ue,Ce);return Vt(X(De,v),A)}function k8(){return br()&&!Kk()?su(br()):void 0}function Kk(){return D()===119&&ye(IR)}function Gk(){if(fx())return qs(22,C8)}function C8(){let v=re(),A=D();pe.assert(A===96||A===119),ce();let P=hs(7,P8);return X(d.createHeritageClause(A,P),v)}function P8(){let v=re(),A=dy();if(A.kind===234)return A;let P=YS();return X(d.createExpressionWithTypeArguments(A,P),v)}function YS(){return D()===30?zd(20,no,30,32):void 0}function fx(){return D()===96||D()===119}function Hk(){return qs(5,Vk)}function O8(v,A,P){ie(120);let R=No(),M=ys(),ee=Gk(),be=gw(),Ue=d.createInterfaceDeclaration(P,R,M,ee,be);return Vt(X(Ue,v),A)}function N8(v,A,P){ie(156),t.hasPrecedingLineBreak()&&Ft(G.Line_break_not_permitted_here);let R=No(),M=ys();ie(64);let ee=D()===141&&We(Tw)||no();ba();let be=d.createTypeAliasDeclaration(P,R,M,ee);return Vt(X(be,v),A)}function mx(){let v=re(),A=fr(),P=Ud(),R=co(fp);return Vt(X(d.createEnumMember(P,R),v),A)}function F8(v,A,P){ie(94);let R=No(),M;ie(19)?(M=Tt(()=>hs(6,mx)),ie(20)):M=lu();let ee=d.createEnumDeclaration(P,R,M);return Vt(X(ee,v),A)}function hx(){let v=re(),A;return ie(19)?(A=qs(1,pa),ie(20)):A=lu(),X(d.createModuleBlock(A),v)}function Zk(v,A,P,R){let M=R&32,ee=R&8?qi():No(),be=tr(25)?Zk(re(),!1,void 0,8|M):hx(),Ue=d.createModuleDeclaration(P,ee,be,R);return Vt(X(Ue,v),A)}function Wk(v,A,P){let R=0,M;D()===162?(M=No(),R|=2048):(M=ul(),M.text=qd(M.text));let ee;D()===19?ee=hx():ba();let be=d.createModuleDeclaration(P,M,ee,R);return Vt(X(be,v),A)}function R8(v,A,P){let R=0;if(D()===162)return Wk(v,A,P);if(tr(145))R|=32;else if(ie(144),D()===11)return Wk(v,A,P);return Zk(v,A,P,R)}function L8(){return D()===149&&ye(Qk)}function Qk(){return ce()===21}function e0(){return ce()===19}function $8(){return ce()===44}function M8(v,A,P){ie(130),ie(145);let R=No();ba();let M=d.createNamespaceExportDeclaration(R);return M.modifiers=P,Vt(X(M,v),A)}function Sy(v,A,P){ie(102);let R=t.getTokenFullStart(),M;ht()&&(M=No());let ee;if(M?.escapedText==="type"&&(D()!==161||ht()&&ye(Fk))&&(ht()||Hd())?(ee=156,M=ht()?No():void 0):M?.escapedText==="defer"&&(D()===161?!ye(Nk):D()!==28&&D()!==64)&&(ee=166,M=ht()?No():void 0),M&&!B8()&&ee!==166)return q8(v,A,P,M,ee===156);let be=Xk(M,R,ee,void 0),Ue=by(),Ce=Yk();ba();let De=d.createImportDeclaration(P,be,Ue,Ce);return Vt(X(De,v),A)}function Xk(v,A,P,R=!1){let M;return(v||D()===42||D()===19)&&(M=U8(v,A,P,R),ie(161)),M}function Yk(){let v=D();if((v===118||v===132)&&!t.hasPrecedingLineBreak())return yx(v)}function j8(){let v=re(),A=Zo(D())?qi():Lf(11);ie(59);let P=Hi(!0);return X(d.createImportAttribute(A,P),v)}function yx(v,A){let P=re();A||ie(v);let R=t.getTokenStart();if(ie(19)){let M=t.hasPrecedingLineBreak(),ee=hs(24,j8,!0);if(!ie(20)){let be=h1(Ye);be&&be.code===G._0_expected.code&&nO(be,i1(le,ae,R,1,G.The_parser_expected_to_find_a_1_to_match_the_0_token_here,"{","}"))}return X(d.createImportAttributes(ee,M,v),P)}else{let M=ui([],re(),void 0,!1);return X(d.createImportAttributes(M,!1,v),P)}}function Hd(){return D()===42||D()===19}function B8(){return D()===28||D()===161}function q8(v,A,P,R,M){ie(64);let ee=vy();ba();let be=d.createImportEqualsDeclaration(P,M,R,ee);return Vt(X(be,v),A)}function U8(v,A,P,R){let M;return(!v||tr(28))&&(R&&t.setSkipJsDocLeadingAsterisks(!0),D()===42?M=J8():M=eC(276),R&&t.setSkipJsDocLeadingAsterisks(!1)),X(d.createImportClause(P,v,M),A)}function vy(){return L8()?z8():Jd(!1)}function z8(){let v=re();ie(149),ie(21);let A=by();return ie(22),X(d.createExternalModuleReference(A),v)}function by(){if(D()===11){let v=ul();return v.text=qd(v.text),v}else return ti()}function J8(){let v=re();ie(42),ie(130);let A=No();return X(d.createNamespaceImport(A),v)}function gx(){return Zo(D())||D()===11}function qf(v){return D()===11?ul():v()}function eC(v){let A=re(),P=v===276?d.createNamedImports(zd(23,V8,19,20)):d.createNamedExports(zd(23,Uf,19,20));return X(P,A)}function Uf(){let v=fr();return Vt(tC(282),v)}function V8(){return tC(277)}function tC(v){let A=re(),P=oh(D())&&!ht(),R=t.getTokenStart(),M=t.getTokenEnd(),ee=!1,be,Ue=!0,Ce=qf(qi);if(Ce.kind===80&&Ce.escapedText==="type")if(D()===130){let mr=qi();if(D()===130){let nr=qi();gx()?(ee=!0,be=mr,Ce=qf(He),Ue=!1):(be=Ce,Ce=nr,Ue=!1)}else gx()?(be=Ce,Ue=!1,Ce=qf(He)):(ee=!0,Ce=mr)}else gx()&&(ee=!0,Ce=qf(He));Ue&&D()===130&&(be=Ce,ie(130),Ce=qf(He)),v===277&&(Ce.kind!==80?(Zn(dd(ae,Ce.pos),Ce.end,G.Identifier_expected),Ce=ch(ua(80,!1),Ce.pos,Ce.pos)):P&&Zn(R,M,G.Identifier_expected));let De=v===277?d.createImportSpecifier(ee,be,Ce):d.createExportSpecifier(ee,be,Ce);return X(De,A);function He(){return P=oh(D())&&!ht(),R=t.getTokenStart(),M=t.getTokenEnd(),qi()}}function K8(v){return X(d.createNamespaceExport(qf(qi)),v)}function rC(v,A,P){let R=$r();ro(!0);let M,ee,be,Ue=tr(156),Ce=re();tr(42)?(tr(130)&&(M=K8(Ce)),ie(161),ee=by()):(M=eC(280),(D()===161||D()===11&&!t.hasPrecedingLineBreak())&&(ie(161),ee=by()));let De=D();ee&&(De===118||De===132)&&!t.hasPrecedingLineBreak()&&(be=yx(De)),ba(),ro(R);let He=d.createExportDeclaration(P,Ue,M,ee,be);return Vt(X(He,v),A)}function nC(v,A,P){let R=$r();ro(!0);let M;tr(64)?M=!0:ie(90);let ee=Hi(!0);ba(),ro(R);let be=d.createExportAssignment(P,M,ee);return Vt(X(be,v),A)}let Sx;(v=>{v[v.SourceElements=0]="SourceElements",v[v.BlockStatements=1]="BlockStatements",v[v.SwitchClauses=2]="SwitchClauses",v[v.SwitchClauseStatements=3]="SwitchClauseStatements",v[v.TypeMembers=4]="TypeMembers",v[v.ClassMembers=5]="ClassMembers",v[v.EnumMembers=6]="EnumMembers",v[v.HeritageClauseElement=7]="HeritageClauseElement",v[v.VariableDeclarations=8]="VariableDeclarations",v[v.ObjectBindingElements=9]="ObjectBindingElements",v[v.ArrayBindingElements=10]="ArrayBindingElements",v[v.ArgumentExpressions=11]="ArgumentExpressions",v[v.ObjectLiteralMembers=12]="ObjectLiteralMembers",v[v.JsxAttributes=13]="JsxAttributes",v[v.JsxChildren=14]="JsxChildren",v[v.ArrayLiteralMembers=15]="ArrayLiteralMembers",v[v.Parameters=16]="Parameters",v[v.JSDocParameters=17]="JSDocParameters",v[v.RestProperties=18]="RestProperties",v[v.TypeParameters=19]="TypeParameters",v[v.TypeArguments=20]="TypeArguments",v[v.TupleElementTypes=21]="TupleElementTypes",v[v.HeritageClauses=22]="HeritageClauses",v[v.ImportOrExportSpecifiers=23]="ImportOrExportSpecifiers",v[v.ImportAttributes=24]="ImportAttributes",v[v.JSDocComment=25]="JSDocComment",v[v.Count=26]="Count"})(Sx||(Sx={}));let oC;(v=>{v[v.False=0]="False",v[v.True=1]="True",v[v.Unknown=2]="Unknown"})(oC||(oC={}));let iC;(v=>{function A(De,He,mr){ol("file.js",De,99,void 0,1,0),t.setText(De,He,mr),Ct=t.scan();let nr=P(),jt=qe("file.js",99,1,!1,[],E(1),0,x1),Wa=Og(Ye,jt);return lt&&(jt.jsDocDiagnostics=Og(lt,jt)),il(),nr?{jsDocTypeExpression:nr,diagnostics:Wa}:void 0}v.parseJSDocTypeExpressionForTests=A;function P(De){let He=re(),mr=(De?tr:ie)(19),nr=Uo(16777216,Fb);(!De||mr)&&FI(20);let jt=d.createJSDocTypeExpression(nr);return oe(jt),X(jt,He)}v.parseJSDocTypeExpression=P;function R(){let De=re(),He=tr(19),mr=re(),nr=Jd(!1);for(;D()===81;)hi(),vr(),nr=X(d.createJSDocMemberName(nr,No()),mr);He&&FI(20);let jt=d.createJSDocNameReference(nr);return oe(jt),X(jt,De)}v.parseJSDocNameReference=R;function M(De,He,mr){ol("",De,99,void 0,1,0);let nr=Uo(16777216,()=>Ce(He,mr)),jt=Og(Ye,{languageVariant:0,text:De});return il(),nr?{jsDoc:nr,diagnostics:jt}:void 0}v.parseIsolatedJSDocComment=M;function ee(De,He,mr){let nr=Ct,jt=Ye.length,Wa=Di,Ai=Uo(16777216,()=>Ce(He,mr));return jJ(Ai,De),bt&524288&&(lt||(lt=[]),lc(lt,Ye,jt)),Ct=nr,Ye.length=jt,Di=Wa,Ai}v.parseJSDocComment=ee;let be;(De=>{De[De.BeginningOfLine=0]="BeginningOfLine",De[De.SawAsterisk=1]="SawAsterisk",De[De.SavingComments=2]="SavingComments",De[De.SavingBackticks=3]="SavingBackticks"})(be||(be={}));let Ue;(De=>{De[De.Property=1]="Property",De[De.Parameter=2]="Parameter",De[De.CallbackParameter=4]="CallbackParameter"})(Ue||(Ue={}));function Ce(De=0,He){let mr=ae,nr=He===void 0?mr.length:De+He;if(He=nr-De,pe.assert(De>=0),pe.assert(De<=nr),pe.assert(nr<=mr.length),!$ot(mr,De))return;let jt,Wa,Ai,uu,pu,Ec=[],Zd=[],Kt=nn;nn|=1<<25;let Dn=t.scanRange(De+3,He-5,hp);return nn=Kt,Dn;function hp(){let te=1,Se,ve=De-(mr.lastIndexOf(` +`,De)+1)+4;function $e(hr){Se||(Se=ve),Ec.push(hr),ve+=hr.length}for(vr();Dy(5););Dy(4)&&(te=0,ve=0);e:for(;;){switch(D()){case 60:G8(Ec),pu||(pu=re()),xr(l(ve)),te=0,Se=void 0;break;case 4:Ec.push(t.getTokenText()),te=0,ve=0;break;case 42:let hr=t.getTokenText();te===1?(te=2,$e(hr)):(pe.assert(te===0),te=1,ve+=hr.length);break;case 5:pe.assert(te!==2,"whitespace shouldn't come from the scanner while saving top-level comment text");let lo=t.getTokenText();Se!==void 0&&ve+lo.length>Se&&Ec.push(lo.slice(Se-ve)),ve+=lo.length;break;case 1:break e;case 82:te=2,$e(t.getTokenValue());break;case 19:te=2;let gs=t.getTokenFullStart(),Qa=t.getTokenEnd()-1,xa=x(Qa);if(xa){uu||xy(Ec),Zd.push(X(d.createJSDocText(Ec.join("")),uu??De,gs)),Zd.push(xa),Ec=[],uu=t.getTokenEnd();break}default:te=2,$e(t.getTokenText());break}te===2?Ha(!1):vr()}let Re=Ec.join("").trimEnd();Zd.length&&Re.length&&Zd.push(X(d.createJSDocText(Re),uu??De,pu)),Zd.length&&jt&&pe.assertIsDefined(pu,"having parsed tags implies that the end of the comment span should be set");let Gt=jt&&ui(jt,Wa,Ai);return X(d.createJSDocComment(Zd.length?ui(Zd,De,pu):Re.length?Re:void 0,Gt),De,nr)}function xy(te){for(;te.length&&(te[0]===` +`||te[0]==="\r");)te.shift()}function G8(te){for(;te.length;){let Se=te[te.length-1].trimEnd();if(Se==="")te.pop();else if(Se.lengthlo&&($e.push(_l.slice(lo-te)),hr=2),te+=_l.length;break;case 19:hr=2;let aC=t.getTokenFullStart(),t0=t.getTokenEnd()-1,sC=x(t0);sC?(Re.push(X(d.createJSDocText($e.join("")),Gt??ve,aC)),Re.push(sC),$e=[],Gt=t.getTokenEnd()):gs(t.getTokenText());break;case 62:hr===3?hr=2:hr=3,gs(t.getTokenText());break;case 82:hr!==3&&(hr=2),gs(t.getTokenValue());break;case 42:if(hr===0){hr=1,te+=1;break}default:hr!==3&&(hr=2),gs(t.getTokenText());break}hr===2||hr===3?Qa=Ha(hr===3):Qa=vr()}xy($e);let xa=$e.join("").trimEnd();if(Re.length)return xa.length&&Re.push(X(d.createJSDocText(xa),Gt??ve)),ui(Re,ve,t.getTokenEnd());if(xa.length)return xa}function x(te){let Se=We(j);if(!Se)return;vr(),zs();let ve=C(),$e=[];for(;D()!==20&&D()!==4&&D()!==1;)$e.push(t.getTokenText()),vr();let Re=Se==="link"?d.createJSDocLink:Se==="linkcode"?d.createJSDocLinkCode:d.createJSDocLinkPlain;return X(Re(ve,$e.join("")),te,t.getTokenEnd())}function C(){if(Zo(D())){let te=re(),Se=qi();for(;tr(25);)Se=X(d.createQualifiedName(Se,D()===81?ua(80,!1):qi()),te);for(;D()===81;)hi(),vr(),Se=X(d.createJSDocMemberName(Se,No()),te);return Se}}function j(){if(se(),D()===19&&vr()===60&&Zo(vr())){let te=t.getTokenValue();if(_e(te))return te}}function _e(te){return te==="link"||te==="linkcode"||te==="linkplain"}function Qe(te,Se,ve,$e){return X(d.createJSDocUnknownTag(Se,_(te,re(),ve,$e)),te)}function xr(te){te&&(jt?jt.push(te):(jt=[te],Wa=te.pos),Ai=te.end)}function Ii(){return se(),D()===19?P():void 0}function du(){let te=Dy(23);te&&zs();let Se=Dy(62),ve=iwe();return Se&&bR(62),te&&(zs(),mo(64)&&ti(),ie(24)),{name:ve,isBracketed:te}}function Js(te){switch(te.kind){case 151:return!0;case 189:return Js(te.elementType);default:return Yhe(te)&&kn(te.typeName)&&te.typeName.escapedText==="Object"&&!te.typeArguments}}function Ey(te,Se,ve,$e){let Re=Ii(),Gt=!Re;se();let{name:hr,isBracketed:lo}=du(),gs=se();Gt&&!ye(j)&&(Re=Ii());let Qa=_(te,re(),$e,gs),xa=MIe(Re,hr,ve,$e);xa&&(Re=xa,Gt=!0);let _l=ve===1?d.createJSDocPropertyTag(Se,hr,lo,Re,Gt,Qa):d.createJSDocParameterTag(Se,hr,lo,Re,Gt,Qa);return X(_l,te)}function MIe(te,Se,ve,$e){if(te&&Js(te.type)){let Re=re(),Gt,hr;for(;Gt=We(()=>Z8(ve,$e,Se));)Gt.kind===342||Gt.kind===349?hr=sc(hr,Gt):Gt.kind===346&&_s(Gt.tagName,G.A_JSDoc_template_tag_may_not_follow_a_typedef_callback_or_overload_tag);if(hr){let lo=X(d.createJSDocTypeLiteral(hr,te.type.kind===189),Re);return X(d.createJSDocTypeExpression(lo),Re)}}}function jIe(te,Se,ve,$e){Ra(jt,xot)&&Zn(Se.pos,t.getTokenStart(),G._0_tag_already_specified,GD(Se.escapedText));let Re=Ii();return X(d.createJSDocReturnTag(Se,Re,_(te,re(),ve,$e)),te)}function LX(te,Se,ve,$e){Ra(jt,JJ)&&Zn(Se.pos,t.getTokenStart(),G._0_tag_already_specified,GD(Se.escapedText));let Re=P(!0),Gt=ve!==void 0&&$e!==void 0?_(te,re(),ve,$e):void 0;return X(d.createJSDocTypeTag(Se,Re,Gt),te)}function BIe(te,Se,ve,$e){let Re=D()===23||ye(()=>vr()===60&&Zo(vr())&&_e(t.getTokenValue()))?void 0:R(),Gt=ve!==void 0&&$e!==void 0?_(te,re(),ve,$e):void 0;return X(d.createJSDocSeeTag(Se,Re,Gt),te)}function qIe(te,Se,ve,$e){let Re=Ii(),Gt=_(te,re(),ve,$e);return X(d.createJSDocThrowsTag(Se,Re,Gt),te)}function UIe(te,Se,ve,$e){let Re=re(),Gt=zIe(),hr=t.getTokenFullStart(),lo=_(te,hr,ve,$e);lo||(hr=t.getTokenFullStart());let gs=typeof lo!="string"?ui(yJ([X(Gt,Re,hr)],lo),Re):Gt.text+lo;return X(d.createJSDocAuthorTag(Se,gs),te)}function zIe(){let te=[],Se=!1,ve=t.getToken();for(;ve!==1&&ve!==4;){if(ve===30)Se=!0;else{if(ve===60&&!Se)break;if(ve===32&&Se){te.push(t.getTokenText()),t.resetTokenState(t.getTokenEnd());break}}te.push(t.getTokenText()),ve=vr()}return d.createJSDocText(te.join(""))}function JIe(te,Se,ve,$e){let Re=$X();return X(d.createJSDocImplementsTag(Se,Re,_(te,re(),ve,$e)),te)}function VIe(te,Se,ve,$e){let Re=$X();return X(d.createJSDocAugmentsTag(Se,Re,_(te,re(),ve,$e)),te)}function KIe(te,Se,ve,$e){let Re=P(!1),Gt=ve!==void 0&&$e!==void 0?_(te,re(),ve,$e):void 0;return X(d.createJSDocSatisfiesTag(Se,Re,Gt),te)}function GIe(te,Se,ve,$e){let Re=t.getTokenFullStart(),Gt;ht()&&(Gt=No());let hr=Xk(Gt,Re,156,!0),lo=by(),gs=Yk(),Qa=ve!==void 0&&$e!==void 0?_(te,re(),ve,$e):void 0;return X(d.createJSDocImportTag(Se,hr,lo,gs,Qa),te)}function $X(){let te=tr(19),Se=re(),ve=HIe();t.setSkipJsDocLeadingAsterisks(!0);let $e=YS();t.setSkipJsDocLeadingAsterisks(!1);let Re=d.createExpressionWithTypeArguments(ve,$e),Gt=X(Re,Se);return te&&(zs(),ie(20)),Gt}function HIe(){let te=re(),Se=zf();for(;tr(25);){let ve=zf();Se=X(k(Se,ve),te)}return Se}function Ty(te,Se,ve,$e,Re){return X(Se(ve,_(te,re(),$e,Re)),te)}function MX(te,Se,ve,$e){let Re=P(!0);return zs(),X(d.createJSDocThisTag(Se,Re,_(te,re(),ve,$e)),te)}function ZIe(te,Se,ve,$e){let Re=P(!0);return zs(),X(d.createJSDocEnumTag(Se,Re,_(te,re(),ve,$e)),te)}function WIe(te,Se,ve,$e){let Re=Ii();se();let Gt=H8();zs();let hr=h(ve),lo;if(!Re||Js(Re.type)){let Qa,xa,_l,aC=!1;for(;(Qa=We(()=>twe(ve)))&&Qa.kind!==346;)if(aC=!0,Qa.kind===345)if(xa){let t0=Ft(G.A_JSDoc_typedef_comment_may_not_contain_multiple_type_tags);t0&&nO(t0,i1(le,ae,0,0,G.The_tag_was_first_specified_here));break}else xa=Qa;else _l=sc(_l,Qa);if(aC){let t0=Re&&Re.type.kind===189,sC=d.createJSDocTypeLiteral(_l,t0);Re=xa&&xa.typeExpression&&!Js(xa.typeExpression.type)?xa.typeExpression:X(sC,te),lo=Re.end}}lo=lo||hr!==void 0?re():(Gt??Re??Se).end,hr||(hr=_(te,lo,ve,$e));let gs=d.createJSDocTypedefTag(Se,Re,Gt,hr);return X(gs,te,lo)}function H8(te){let Se=t.getTokenStart();if(!Zo(D()))return;let ve=zf();if(tr(25)){let $e=H8(!0),Re=d.createModuleDeclaration(void 0,ve,$e,te?8:void 0);return X(Re,Se)}return te&&(ve.flags|=4096),ve}function QIe(te){let Se=re(),ve,$e;for(;ve=We(()=>Z8(4,te));){if(ve.kind===346){_s(ve.tagName,G.A_JSDoc_template_tag_may_not_follow_a_typedef_callback_or_overload_tag);break}$e=sc($e,ve)}return ui($e||[],Se)}function jX(te,Se){let ve=QIe(Se),$e=We(()=>{if(Dy(60)){let Re=l(Se);if(Re&&Re.kind===343)return Re}});return X(d.createJSDocSignature(void 0,ve,$e),te)}function XIe(te,Se,ve,$e){let Re=H8();zs();let Gt=h(ve),hr=jX(te,ve);Gt||(Gt=_(te,re(),ve,$e));let lo=Gt!==void 0?re():hr.end;return X(d.createJSDocCallbackTag(Se,hr,Re,Gt),te,lo)}function YIe(te,Se,ve,$e){zs();let Re=h(ve),Gt=jX(te,ve);Re||(Re=_(te,re(),ve,$e));let hr=Re!==void 0?re():Gt.end;return X(d.createJSDocOverloadTag(Se,Gt,Re),te,hr)}function ewe(te,Se){for(;!kn(te)||!kn(Se);)if(!kn(te)&&!kn(Se)&&te.right.escapedText===Se.right.escapedText)te=te.left,Se=Se.left;else return!1;return te.escapedText===Se.escapedText}function twe(te){return Z8(1,te)}function Z8(te,Se,ve){let $e=!0,Re=!1;for(;;)switch(vr()){case 60:if($e){let Gt=rwe(te,Se);return Gt&&(Gt.kind===342||Gt.kind===349)&&ve&&(kn(Gt.name)||!ewe(ve,Gt.name.left))?!1:Gt}Re=!1;break;case 4:$e=!0,Re=!1;break;case 42:Re&&($e=!1),Re=!0;break;case 80:$e=!1;break;case 1:return!1}}function rwe(te,Se){pe.assert(D()===60);let ve=t.getTokenFullStart();vr();let $e=zf(),Re=se(),Gt;switch($e.escapedText){case"type":return te===1&&LX(ve,$e);case"prop":case"property":Gt=1;break;case"arg":case"argument":case"param":Gt=6;break;case"template":return BX(ve,$e,Se,Re);case"this":return MX(ve,$e,Se,Re);default:return!1}return te&Gt?Ey(ve,$e,te,Se):!1}function nwe(){let te=re(),Se=Dy(23);Se&&zs();let ve=xc(!1,!0),$e=zf(G.Unexpected_token_A_type_parameter_name_was_expected_without_curly_braces),Re;if(Se&&(zs(),ie(64),Re=Uo(16777216,Fb),ie(24)),!Bg($e))return X(d.createTypeParameterDeclaration(ve,$e,void 0,Re),te)}function owe(){let te=re(),Se=[];do{zs();let ve=nwe();ve!==void 0&&Se.push(ve),se()}while(Dy(28));return ui(Se,te)}function BX(te,Se,ve,$e){let Re=D()===19?P():void 0,Gt=owe();return X(d.createJSDocTemplateTag(Se,Re,Gt,_(te,re(),ve,$e)),te)}function Dy(te){return D()===te?(vr(),!0):!1}function iwe(){let te=zf();for(tr(23)&&ie(24);tr(25);){let Se=zf();tr(23)&&ie(24),te=wR(te,Se)}return te}function zf(te){if(!Zo(D()))return ua(80,!te,te||G.Identifier_expected);fo++;let Se=t.getTokenStart(),ve=t.getTokenEnd(),$e=D(),Re=qd(t.getTokenValue()),Gt=X(S(Re,$e),Se,ve);return vr(),Gt}}})(iC=e.JSDocParser||(e.JSDocParser={}))})(Ug||(Ug={}));var Pme=new WeakSet;function Zot(e){Pme.has(e)&&pe.fail("Source file has already been incrementally parsed"),Pme.add(e)}var Eye=new WeakSet;function Wot(e){return Eye.has(e)}function cJ(e){Eye.add(e)}var TO;(e=>{function t(y,g,S,b){if(b=b||pe.shouldAssert(2),d(y,g,S,b),jet(S))return y;if(y.statements.length===0)return Ug.parseSourceFile(y.fileName,g,y.languageVersion,void 0,!0,y.scriptKind,y.setExternalModuleIndicator,y.jsDocParsingMode);Zot(y),Ug.fixupParentReferences(y);let E=y.text,I=f(y),T=c(y,S);d(y,g,T,b),pe.assert(T.span.start<=S.span.start),pe.assert(ud(T.span)===ud(S.span)),pe.assert(ud(CD(T))===ud(CD(S)));let k=CD(T).length-T.span.length;s(y,T.span.start,ud(T.span),ud(CD(T)),k,E,g,b);let F=Ug.parseSourceFile(y.fileName,g,y.languageVersion,I,!0,y.scriptKind,y.setExternalModuleIndicator,y.jsDocParsingMode);return F.commentDirectives=r(y.commentDirectives,F.commentDirectives,T.span.start,ud(T.span),k,E,g,b),F.impliedNodeFormat=y.impliedNodeFormat,Iot(y,F),F}e.updateSourceFile=t;function r(y,g,S,b,E,I,T,k){if(!y)return g;let F,O=!1;for(let N of y){let{range:U,type:ge}=N;if(U.endb){$();let Te={range:{pos:U.pos+E,end:U.end+E},type:ge};F=sc(F,Te),k&&pe.assert(I.substring(U.pos,U.end)===T.substring(Te.range.pos,Te.range.end))}}return $(),F;function $(){O||(O=!0,F?g&&F.push(...g):F=g)}}function n(y,g,S,b,E,I,T){S?F(y):k(y);return;function k(O){let $="";if(T&&o(O)&&($=E.substring(O.pos,O.end)),sme(O,g),ch(O,O.pos+b,O.end+b),T&&o(O)&&pe.assert($===I.substring(O.pos,O.end)),La(O,k,F),jg(O))for(let N of O.jsDoc)k(N);a(O,T)}function F(O){ch(O,O.pos+b,O.end+b);for(let $ of O)k($)}}function o(y){switch(y.kind){case 11:case 9:case 80:return!0}return!1}function i(y,g,S,b,E){pe.assert(y.end>=g,"Adjusting an element that was entirely before the change range"),pe.assert(y.pos<=S,"Adjusting an element that was entirely after the change range"),pe.assert(y.pos<=y.end);let I=Math.min(y.pos,b),T=y.end>=S?y.end+E:Math.min(y.end,b);if(pe.assert(I<=T),y.parent){let k=y.parent;pe.assertGreaterThanOrEqual(I,k.pos),pe.assertLessThanOrEqual(T,k.end)}ch(y,I,T)}function a(y,g){if(g){let S=y.pos,b=E=>{pe.assert(E.pos>=S),S=E.end};if(jg(y))for(let E of y.jsDoc)b(E);La(y,b),pe.assert(S<=y.end)}}function s(y,g,S,b,E,I,T,k){F(y);return;function F($){if(pe.assert($.pos<=$.end),$.pos>S){n($,y,!1,E,I,T,k);return}let N=$.end;if(N>=g){if(cJ($),sme($,y),i($,g,S,b,E),La($,F,O),jg($))for(let U of $.jsDoc)F(U);a($,k);return}pe.assert(NS){n($,y,!0,E,I,T,k);return}let N=$.end;if(N>=g){cJ($),i($,g,S,b,E);for(let U of $)F(U);return}pe.assert(N0&&I<=1;I++){let T=p(y,S);pe.assert(T.pos<=S);let k=T.pos;S=Math.max(0,k-1)}let b=Met(S,ud(g.span)),E=g.newLength+(g.span.start-S);return She(b,E)}function p(y,g){let S=y,b;if(La(y,I),b){let T=E(b);T.pos>S.pos&&(S=T)}return S;function E(T){for(;;){let k=Crt(T);if(k)T=k;else return T}}function I(T){if(!Bg(T))if(T.pos<=g){if(T.pos>=S.pos&&(S=T),gg),!0}}function d(y,g,S,b){let E=y.text;if(S&&(pe.assert(E.length-S.span.length+S.newLength===g.length),b||pe.shouldAssert(3))){let I=E.substr(0,S.span.start),T=g.substr(0,S.span.start);pe.assert(I===T);let k=E.substring(ud(S.span),E.length),F=g.substring(ud(CD(S)),g.length);pe.assert(k===F)}}function f(y){let g=y.statements,S=0;pe.assert(S=O.pos&&T=O.pos&&T{y[y.Value=-1]="Value"})(m||(m={}))})(TO||(TO={}));function Qot(e){return Xot(e)!==void 0}function Xot(e){let t=ihe(e,Qrt,!1);if(t)return t;if(oet(e,".ts")){let r=ohe(e),n=r.lastIndexOf(".d.");if(n>=0)return r.substring(n)}}function Yot(e,t,r,n){if(e){if(e==="import")return 99;if(e==="require")return 1;n(t,r-t,G.resolution_mode_should_be_either_require_or_import)}}function eit(e,t){let r=[];for(let n of Qz(t,0)||ii){let o=t.substring(n.pos,n.end);iit(r,n,o)}e.pragmas=new Map;for(let n of r){if(e.pragmas.has(n.name)){let o=e.pragmas.get(n.name);o instanceof Array?o.push(n.args):e.pragmas.set(n.name,[o,n.args]);continue}e.pragmas.set(n.name,n.args)}}function tit(e,t){e.checkJsDirective=void 0,e.referencedFiles=[],e.typeReferenceDirectives=[],e.libReferenceDirectives=[],e.amdDependencies=[],e.hasNoDefaultLib=!1,e.pragmas.forEach((r,n)=>{switch(n){case"reference":{let o=e.referencedFiles,i=e.typeReferenceDirectives,a=e.libReferenceDirectives;Vc(Pz(r),s=>{let{types:c,lib:p,path:d,["resolution-mode"]:f,preserve:m}=s.arguments,y=m==="true"?!0:void 0;if(s.arguments["no-default-lib"]==="true")e.hasNoDefaultLib=!0;else if(c){let g=Yot(f,c.pos,c.end,t);i.push({pos:c.pos,end:c.end,fileName:c.value,...g?{resolutionMode:g}:{},...y?{preserve:y}:{}})}else p?a.push({pos:p.pos,end:p.end,fileName:p.value,...y?{preserve:y}:{}}):d?o.push({pos:d.pos,end:d.end,fileName:d.value,...y?{preserve:y}:{}}):t(s.range.pos,s.range.end-s.range.pos,G.Invalid_reference_directive_syntax)});break}case"amd-dependency":{e.amdDependencies=Kz(Pz(r),o=>({name:o.arguments.name,path:o.arguments.path}));break}case"amd-module":{if(r instanceof Array)for(let o of r)e.moduleName&&t(o.range.pos,o.range.end-o.range.pos,G.An_AMD_module_cannot_have_multiple_name_assignments),e.moduleName=o.arguments.name;else e.moduleName=r.arguments.name;break}case"ts-nocheck":case"ts-check":{Vc(Pz(r),o=>{(!e.checkJsDirective||o.range.pos>e.checkJsDirective.pos)&&(e.checkJsDirective={enabled:n==="ts-check",end:o.range.end,pos:o.range.pos})});break}case"jsx":case"jsxfrag":case"jsximportsource":case"jsxruntime":return;default:pe.fail("Unhandled pragma kind")}})}var qz=new Map;function rit(e){if(qz.has(e))return qz.get(e);let t=new RegExp(`(\\s${e}\\s*=\\s*)(?:(?:'([^']*)')|(?:"([^"]*)"))`,"im");return qz.set(e,t),t}var nit=/^\/\/\/\s*<(\S+)\s.*?\/>/m,oit=/^\/\/\/?\s*@([^\s:]+)((?:[^\S\r\n]|:).*)?$/m;function iit(e,t,r){let n=t.kind===2&&nit.exec(r);if(n){let i=n[1].toLowerCase(),a=nhe[i];if(!a||!(a.kind&1))return;if(a.args){let s={};for(let c of a.args){let p=rit(c.name).exec(r);if(!p&&!c.optional)return;if(p){let d=p[2]||p[3];if(c.captureSpan){let f=t.pos+p.index+p[1].length+1;s[c.name]={value:d,pos:f,end:f+d.length}}else s[c.name]=d}}e.push({name:i,args:{arguments:s,range:t}})}else e.push({name:i,args:{arguments:{},range:t}});return}let o=t.kind===2&&oit.exec(r);if(o)return Ome(e,t,2,o);if(t.kind===3){let i=/@(\S+)(\s+(?:\S.*)?)?$/gm,a;for(;a=i.exec(r);)Ome(e,t,4,a)}}function Ome(e,t,r,n){if(!n)return;let o=n[1].toLowerCase(),i=nhe[o];if(!i||!(i.kind&r))return;let a=n[2],s=ait(i,a);s!=="fail"&&e.push({name:o,args:{arguments:s,range:t}})}function ait(e,t){if(!t)return{};if(!e.args)return{};let r=t.trim().split(/\s+/),n={};for(let o=0;on.kind<310||n.kind>352);return r.kind<167?r:r.getFirstToken(e)}getLastToken(e){this.assertHasRealPosition();let t=this.getChildren(e),r=h1(t);if(r)return r.kind<167?r:r.getLastToken(e)}forEachChild(e,t){return La(this,e,t)}};function sit(e,t){let r=[];if(Ott(e))return e.forEachChild(a=>{r.push(a)}),r;UD.setText((t||e.getSourceFile()).text);let n=e.pos,o=a=>{zD(r,n,a.pos,e),r.push(a),n=a.end},i=a=>{zD(r,n,a.pos,e),r.push(cit(a,e)),n=a.end};return Vc(e.jsDoc,o),n=e.pos,e.forEachChild(o,i),zD(r,n,e.end,e),UD.setText(void 0),r}function zD(e,t,r,n){for(UD.resetTokenState(t);tt.tagName.text==="inheritDoc"||t.tagName.text==="inheritdoc")}function pO(e,t){if(!e)return ii;let r=ts_JsDoc_exports.getJsDocTagsFromDeclarations(e,t);if(t&&(r.length===0||e.some(wye))){let n=new Set;for(let o of e){let i=kye(t,o,a=>{var s;if(!n.has(a))return n.add(a),o.kind===178||o.kind===179?a.getContextualJsDocTags(o,t):((s=a.declarations)==null?void 0:s.length)===1?a.getJsDocTags(t):void 0});i&&(r=[...i,...r])}}return r}function qD(e,t){if(!e)return ii;let r=ts_JsDoc_exports.getJsDocCommentsFromDeclarations(e,t);if(t&&(r.length===0||e.some(wye))){let n=new Set;for(let o of e){let i=kye(t,o,a=>{if(!n.has(a))return n.add(a),o.kind===178||o.kind===179?a.getContextualDocumentationComment(o,t):a.getDocumentationComment(t)});i&&(r=r.length===0?i.slice():i.concat(lineBreakPart(),r))}}return r}function kye(e,t,r){var n;let o=((n=t.parent)==null?void 0:n.kind)===177?t.parent.parent:t.parent;if(!o)return;let i=Srt(t);return IYe(urt(o),a=>{let s=e.getTypeAtLocation(a),c=i&&s.symbol?e.getTypeOfSymbol(s.symbol):s,p=e.getPropertyOfType(c,t.symbol.name);return p?r(p):void 0})}var dit=class extends GJ{constructor(e,t,r){super(e,t,r)}update(e,t){return Hot(this,e,t)}getLineAndCharacterOfPosition(e){return _he(this,e)}getLineStarts(){return Wz(this)}getPositionOfLineAndCharacter(e,t,r){return Aet(Wz(this),e,t,this.text,r)}getLineEndOfPosition(e){let{line:t}=this.getLineAndCharacterOfPosition(e),r=this.getLineStarts(),n;t+1>=r.length&&(n=this.getEnd()),n||(n=r[t+1]-1);let o=this.getFullText();return o[n]===` +`&&o[n-1]==="\r"?n-1:n}getNamedDeclarations(){return this.namedDeclarations||(this.namedDeclarations=this.computeNamedDeclarations()),this.namedDeclarations}computeNamedDeclarations(){let e=qYe();return this.forEachChild(o),e;function t(i){let a=n(i);a&&e.add(a,i)}function r(i){let a=e.get(i);return a||e.set(i,a=[]),a}function n(i){let a=wJ(i);return a&&(Zhe(a)&&nf(a.expression)?a.expression.name.text:whe(a)?getNameFromPropertyName(a):void 0)}function o(i){switch(i.kind){case 263:case 219:case 175:case 174:let a=i,s=n(a);if(s){let d=r(s),f=h1(d);f&&a.parent===f.parent&&a.symbol===f.symbol?a.body&&!f.body&&(d[d.length-1]=a):d.push(a)}La(i,o);break;case 264:case 232:case 265:case 266:case 267:case 268:case 272:case 282:case 277:case 274:case 275:case 178:case 179:case 188:t(i),La(i,o);break;case 170:if(!eA(i,31))break;case 261:case 209:{let d=i;if(xtt(d.name)){La(d.name,o);break}d.initializer&&o(d.initializer)}case 307:case 173:case 172:t(i);break;case 279:let c=i;c.exportClause&&(oot(c.exportClause)?Vc(c.exportClause.elements,o):o(c.exportClause.name));break;case 273:let p=i.importClause;p&&(p.name&&t(p.name),p.namedBindings&&(p.namedBindings.kind===275?t(p.namedBindings):Vc(p.namedBindings.elements,o)));break;case 227:NJ(i)!==0&&t(i);default:La(i,o)}}}},_it=class{constructor(e,t,r){this.fileName=e,this.text=t,this.skipTrivia=r||(n=>n)}getLineAndCharacterOfPosition(e){return _he(this,e)}};function fit(){return{getNodeConstructor:()=>GJ,getTokenConstructor:()=>Dye,getIdentifierConstructor:()=>Aye,getPrivateIdentifierConstructor:()=>Iye,getSourceFileConstructor:()=>dit,getSymbolConstructor:()=>lit,getTypeConstructor:()=>uit,getSignatureConstructor:()=>pit,getSourceMapSourceConstructor:()=>_it}}var mit=["getSemanticDiagnostics","getSuggestionDiagnostics","getCompilerOptionsDiagnostics","getSemanticClassifications","getEncodedSemanticClassifications","getCodeFixesAtPosition","getCombinedCodeFix","applyCodeActionCommand","organizeImports","getEditsForFileRename","getEmitOutput","getApplicableRefactors","getEditsForRefactor","prepareCallHierarchy","provideCallHierarchyIncomingCalls","provideCallHierarchyOutgoingCalls","provideInlayHints","getSupportedCodeFixes","getPasteEdits"],Bjt=[...mit,"getCompletionsAtPosition","getCompletionEntryDetails","getCompletionEntrySymbol","getSignatureHelpItems","getQuickInfoAtPosition","getDefinitionAtPosition","getDefinitionAndBoundSpan","getImplementationAtPosition","getTypeDefinitionAtPosition","getReferencesAtPosition","findReferences","getDocumentHighlights","getNavigateToItems","getRenameInfo","findRenameLocations","getApplicableRefactors","preparePasteEditsForFile"];jrt(fit());var Cye=new Proxy({},{get:()=>!0}),Pye=Cye["4.8"];function md(e,t=!1){if(e!=null){if(Pye){if(t||KJ(e)){let r=Ket(e);return r?[...r]:void 0}return}return e.modifiers?.filter(r=>!qJ(r))}}function d1(e,t=!1){if(e!=null){if(Pye){if(t||Rot(e)){let r=Vet(e);return r?[...r]:void 0}return}return e.decorators?.filter(qJ)}}var hit={},Oye=new Proxy({},{get:(e,t)=>t}),yit=Oye,git=Oye,H=yit,ma=git,Sit=Cye["5.0"],_t=Qt,vit=new Set([_t.AmpersandAmpersandToken,_t.BarBarToken,_t.QuestionQuestionToken]),bit=new Set([Qt.AmpersandAmpersandEqualsToken,Qt.AmpersandEqualsToken,Qt.AsteriskAsteriskEqualsToken,Qt.AsteriskEqualsToken,Qt.BarBarEqualsToken,Qt.BarEqualsToken,Qt.CaretEqualsToken,Qt.EqualsToken,Qt.GreaterThanGreaterThanEqualsToken,Qt.GreaterThanGreaterThanGreaterThanEqualsToken,Qt.LessThanLessThanEqualsToken,Qt.MinusEqualsToken,Qt.PercentEqualsToken,Qt.PlusEqualsToken,Qt.QuestionQuestionEqualsToken,Qt.SlashEqualsToken]),xit=new Set([_t.AmpersandAmpersandToken,_t.AmpersandToken,_t.AsteriskAsteriskToken,_t.AsteriskToken,_t.BarBarToken,_t.BarToken,_t.CaretToken,_t.EqualsEqualsEqualsToken,_t.EqualsEqualsToken,_t.ExclamationEqualsEqualsToken,_t.ExclamationEqualsToken,_t.GreaterThanEqualsToken,_t.GreaterThanGreaterThanGreaterThanToken,_t.GreaterThanGreaterThanToken,_t.GreaterThanToken,_t.InKeyword,_t.InstanceOfKeyword,_t.LessThanEqualsToken,_t.LessThanLessThanToken,_t.LessThanToken,_t.MinusToken,_t.PercentToken,_t.PlusToken,_t.SlashToken]);function Eit(e){return bit.has(e.kind)}function Tit(e){return vit.has(e.kind)}function Dit(e){return xit.has(e.kind)}function ah(e){return io(e)}function Ait(e){return e.kind!==_t.SemicolonClassElement}function Gr(e,t){return md(t)?.some(r=>r.kind===e)===!0}function Iit(e){let t=md(e);return t==null?null:t[t.length-1]??null}function wit(e){return e.kind===_t.CommaToken}function kit(e){return e.kind===_t.SingleLineCommentTrivia||e.kind===_t.MultiLineCommentTrivia}function Cit(e){return e.kind===_t.JSDocComment}function Pit(e){if(Eit(e))return{type:H.AssignmentExpression,operator:ah(e.kind)};if(Tit(e))return{type:H.LogicalExpression,operator:ah(e.kind)};if(Dit(e))return{type:H.BinaryExpression,operator:ah(e.kind)};throw new Error(`Unexpected binary operator ${io(e.kind)}`)}function dO(e,t){let r=t.getLineAndCharacterOfPosition(e);return{column:r.character,line:r.line+1}}function Mg(e,t){let[r,n]=e.map(o=>dO(o,t));return{end:n,start:r}}function Oit(e){if(e.kind===Qt.Block)switch(e.parent.kind){case Qt.Constructor:case Qt.GetAccessor:case Qt.SetAccessor:case Qt.ArrowFunction:case Qt.FunctionExpression:case Qt.FunctionDeclaration:case Qt.MethodDeclaration:return!0;default:return!1}return!0}function a1(e,t){return[e.getStart(t),e.getEnd()]}function Nit(e){return e.kind>=_t.FirstToken&&e.kind<=_t.LastToken}function Nye(e){return e.kind>=_t.JsxElement&&e.kind<=_t.JsxAttribute}function lJ(e){return e.flags&Jc.Let?"let":(e.flags&Jc.AwaitUsing)===Jc.AwaitUsing?"await using":e.flags&Jc.Const?"const":e.flags&Jc.Using?"using":"var"}function Rg(e){let t=md(e);if(t!=null)for(let r of t)switch(r.kind){case _t.PublicKeyword:return"public";case _t.ProtectedKeyword:return"protected";case _t.PrivateKeyword:return"private";default:break}}function Bu(e,t,r){return n(t);function n(o){return ptt(o)&&o.pos===e.end?o:Uit(o.getChildren(r),i=>(i.pos<=e.pos&&i.end>e.end||i.pos===e.end)&&qit(i,r)?n(i):void 0)}}function Fit(e,t){let r=e;for(;r;){if(t(r))return r;r=r.parent}}function Rit(e){return!!Fit(e,Nye)}function Nme(e){return _1(0,e,/&(?:#\d+|#x[\da-fA-F]+|[0-9a-zA-Z]+);/g,t=>{let r=t.slice(1,-1);if(r[0]==="#"){let n=r[1]==="x"?parseInt(r.slice(2),16):parseInt(r.slice(1),10);return n>1114111?t:String.fromCodePoint(n)}return hit[r]||t})}function s1(e){return e.kind===_t.ComputedPropertyName}function Fme(e){return!!e.questionToken}function Fye(e){return e.type===H.ChainExpression}function Lit(e,t){return Fye(t)&&e.expression.kind!==Qt.ParenthesizedExpression}function $it(e){if(e.kind===_t.NullKeyword)return ma.Null;if(e.kind>=_t.FirstKeyword&&e.kind<=_t.LastFutureReservedWord)return e.kind===_t.FalseKeyword||e.kind===_t.TrueKeyword?ma.Boolean:ma.Keyword;if(e.kind>=_t.FirstPunctuation&&e.kind<=_t.LastPunctuation)return ma.Punctuator;if(e.kind>=_t.NoSubstitutionTemplateLiteral&&e.kind<=_t.TemplateTail)return ma.Template;switch(e.kind){case _t.NumericLiteral:case _t.BigIntLiteral:return ma.Numeric;case _t.PrivateIdentifier:return ma.PrivateIdentifier;case _t.JsxText:return ma.JSXText;case _t.StringLiteral:return e.parent.kind===_t.JsxAttribute||e.parent.kind===_t.JsxElement?ma.JSXText:ma.String;case _t.RegularExpressionLiteral:return ma.RegularExpression;case _t.Identifier:case _t.ConstructorKeyword:case _t.GetKeyword:case _t.SetKeyword:default:}return e.kind===_t.Identifier&&(Nye(e.parent)||e.parent.kind===_t.PropertyAccessExpression&&Rit(e))?ma.JSXIdentifier:ma.Identifier}function Mit(e,t){let r=e.kind===_t.JsxText?e.getFullStart():e.getStart(t),n=e.getEnd(),o=t.text.slice(r,n),i=$it(e),a=[r,n],s=Mg(a,t);return i===ma.RegularExpression?{type:i,loc:s,range:a,regex:{flags:o.slice(o.lastIndexOf("/")+1),pattern:o.slice(1,o.lastIndexOf("/"))},value:o}:i===ma.PrivateIdentifier?{type:i,loc:s,range:a,value:o.slice(1)}:{type:i,loc:s,range:a,value:o}}function jit(e){let t=[];function r(n){kit(n)||Cit(n)||(Nit(n)&&n.kind!==_t.EndOfFileToken?t.push(Mit(n,e)):n.getChildren(e).forEach(r))}return r(e),t}var Bit=class extends Error{fileName;location;constructor(e,t,r){super(e),this.fileName=t,this.location=r,Object.defineProperty(this,"name",{configurable:!0,enumerable:!1,value:new.target.name})}get index(){return this.location.start.offset}get lineNumber(){return this.location.start.line}get column(){return this.location.start.column}};function ZJ(e,t,r,n=r){let[o,i]=[r,n].map(a=>{let{character:s,line:c}=t.getLineAndCharacterOfPosition(a);return{column:s,line:c+1,offset:a}});return new Bit(e,t.fileName,{end:i,start:o})}function qit(e,t){return e.kind===_t.EndOfFileToken?!!e.jsDoc:e.getWidth(t)!==0}function Uit(e,t){if(e!==void 0)for(let r=0;r=0&&e.kind!==mt.EndOfFileToken}function Rme(e){return!Git(e)}function Hit(e){return Gr(mt.AbstractKeyword,e)}function Zit(e){if(e.parameters.length&&!yye(e)){let t=e.parameters[0];if(Wit(t))return t}return null}function Wit(e){return Rye(e.name)}function Qit(e){return vhe(e.parent,khe)}function Xit(e){switch(e.kind){case mt.ClassDeclaration:return!0;case mt.ClassExpression:return!0;case mt.PropertyDeclaration:{let{parent:t}=e;return!!(EO(t)||g1(t)&&!Hit(e))}case mt.GetAccessor:case mt.SetAccessor:case mt.MethodDeclaration:{let{parent:t}=e;return!!e.body&&(EO(t)||g1(t))}case mt.Parameter:{let{parent:t}=e,r=t.parent;return!!t&&"body"in t&&!!t.body&&(t.kind===mt.Constructor||t.kind===mt.MethodDeclaration||t.kind===mt.SetAccessor)&&Zit(t)!==e&&!!r&&r.kind===mt.ClassDeclaration}}return!1}function Yit(e){return!!("illegalDecorators"in e&&e.illegalDecorators?.length)}function zi(e,t){let r=e.getSourceFile(),n=e.getStart(r),o=e.getEnd();throw ZJ(t,r,n,o)}function eat(e){Yit(e)&&zi(e.illegalDecorators[0],"Decorators are not valid here.");for(let t of d1(e,!0)??[])Xit(e)||(oJ(e)&&!Rme(e.body)?zi(t,"A decorator can only decorate a method implementation, not an overload."):zi(t,"Decorators are not valid here."));for(let t of md(e,!0)??[]){if(t.kind!==mt.ReadonlyKeyword&&((e.kind===mt.PropertySignature||e.kind===mt.MethodSignature)&&zi(t,`'${io(t.kind)}' modifier cannot appear on a type member`),e.kind===mt.IndexSignature&&(t.kind!==mt.StaticKeyword||!g1(e.parent))&&zi(t,`'${io(t.kind)}' modifier cannot appear on an index signature`)),t.kind!==mt.InKeyword&&t.kind!==mt.OutKeyword&&t.kind!==mt.ConstKeyword&&e.kind===mt.TypeParameter&&zi(t,`'${io(t.kind)}' modifier cannot appear on a type parameter`),(t.kind===mt.InKeyword||t.kind===mt.OutKeyword)&&(e.kind!==mt.TypeParameter||!(zJ(e.parent)||g1(e.parent)||lye(e.parent)))&&zi(t,`'${io(t.kind)}' modifier can only appear on a type parameter of a class, interface or type alias`),t.kind===mt.ReadonlyKeyword&&e.kind!==mt.PropertyDeclaration&&e.kind!==mt.PropertySignature&&e.kind!==mt.IndexSignature&&e.kind!==mt.Parameter&&zi(t,"'readonly' modifier can only appear on a property declaration or index signature."),t.kind===mt.DeclareKeyword&&g1(e.parent)&&!bO(e)&&zi(t,`'${io(t.kind)}' modifier cannot appear on class elements of this kind.`),t.kind===mt.DeclareKeyword&&IO(e)){let r=lJ(e.declarationList);(r==="using"||r==="await using")&&zi(t,`'declare' modifier cannot appear on a '${r}' declaration.`)}if(t.kind===mt.AbstractKeyword&&e.kind!==mt.ClassDeclaration&&e.kind!==mt.ConstructorType&&e.kind!==mt.MethodDeclaration&&e.kind!==mt.PropertyDeclaration&&e.kind!==mt.GetAccessor&&e.kind!==mt.SetAccessor&&zi(t,`'${io(t.kind)}' modifier can only appear on a class, method, or property declaration.`),(t.kind===mt.StaticKeyword||t.kind===mt.PublicKeyword||t.kind===mt.ProtectedKeyword||t.kind===mt.PrivateKeyword)&&(e.parent.kind===mt.ModuleBlock||e.parent.kind===mt.SourceFile)&&zi(t,`'${io(t.kind)}' modifier cannot appear on a module or namespace element.`),t.kind===mt.AccessorKeyword&&e.kind!==mt.PropertyDeclaration&&zi(t,"'accessor' modifier can only appear on a property declaration."),t.kind===mt.AsyncKeyword&&e.kind!==mt.MethodDeclaration&&e.kind!==mt.FunctionDeclaration&&e.kind!==mt.FunctionExpression&&e.kind!==mt.ArrowFunction&&zi(t,"'async' modifier cannot be used here."),e.kind===mt.Parameter&&(t.kind===mt.StaticKeyword||t.kind===mt.ExportKeyword||t.kind===mt.DeclareKeyword||t.kind===mt.AsyncKeyword)&&zi(t,`'${io(t.kind)}' modifier cannot appear on a parameter.`),t.kind===mt.PublicKeyword||t.kind===mt.ProtectedKeyword||t.kind===mt.PrivateKeyword)for(let r of md(e)??[])r!==t&&(r.kind===mt.PublicKeyword||r.kind===mt.ProtectedKeyword||r.kind===mt.PrivateKeyword)&&zi(r,"Accessibility modifier already seen.");if(e.kind===mt.Parameter&&(t.kind===mt.PublicKeyword||t.kind===mt.PrivateKeyword||t.kind===mt.ProtectedKeyword||t.kind===mt.ReadonlyKeyword||t.kind===mt.OverrideKeyword)){let r=Qit(e);r?.kind===mt.Constructor&&Rme(r.body)||zi(t,"A parameter property is only allowed in a constructor implementation.");let n=e;n.dotDotDotToken&&zi(t,"A parameter property cannot be a rest parameter."),(n.name.kind===mt.ArrayBindingPattern||n.name.kind===mt.ObjectBindingPattern)&&zi(t,"A parameter property may not be declared using a binding pattern.")}t.kind!==mt.AsyncKeyword&&e.kind===mt.MethodDeclaration&&e.parent.kind===mt.ObjectLiteralExpression&&zi(t,`'${io(t.kind)}' modifier cannot be used here.`)}}var B=Qt;function tat(e){return ZJ("message"in e&&e.message||e.messageText,e.file,e.start)}function rat(e){return nf(e)&&kn(e.name)&&Lye(e.expression)}function Lye(e){return e.kind===B.Identifier||rat(e)}var nat=class{allowPattern=!1;ast;esTreeNodeToTSNodeMap=new WeakMap;options;tsNodeToESTreeNodeMap=new WeakMap;constructor(e,t){this.ast=e,this.options={...t}}#t(e,t){let r=t===Qt.ForInStatement?"for...in":"for...of";if(rot(e)){e.declarations.length!==1&&this.#e(e,`Only a single variable declaration is allowed in a '${r}' statement.`);let n=e.declarations[0];n.initializer?this.#e(n,`The variable declaration of a '${r}' statement cannot have an initializer.`):n.type&&this.#e(n,`The variable declaration of a '${r}' statement cannot have a type annotation.`),t===Qt.ForInStatement&&e.flags&Jc.Using&&this.#e(e,"The left-hand side of a 'for...in' statement cannot be a 'using' declaration.")}else!uJ(e)&&e.kind!==Qt.ObjectLiteralExpression&&e.kind!==Qt.ArrayLiteralExpression&&this.#e(e,`The left-hand side of a '${r}' statement must be a variable or a property access.`)}#r(e){this.options.allowInvalidAST||eat(e)}#e(e,t){if(this.options.allowInvalidAST)return;let r,n;throw Array.isArray(e)?[r,n]=e:typeof e=="number"?r=n=e:(r=e.getStart(this.ast),n=e.getEnd()),ZJ(t,this.ast,r,n)}#n(e,t,r,n=!1){let o=n;return Object.defineProperty(e,t,{configurable:!0,get:this.options.suppressDeprecatedPropertyWarnings?()=>e[r]:()=>(o||((void 0)(`The '${t}' property is deprecated on ${e.type} nodes. Use '${r}' instead. See https://typescript-eslint.io/troubleshooting/faqs/general#the-key-property-is-deprecated-on-type-nodes-use-key-instead-warnings.`,"DeprecationWarning"),o=!0),e[r]),set(i){Object.defineProperty(e,t,{enumerable:!0,value:i,writable:!0})}}),e}#o(e,t,r,n){let o=!1;return Object.defineProperty(e,t,{configurable:!0,get:this.options.suppressDeprecatedPropertyWarnings?()=>n:()=>{if(!o){let i=`The '${t}' property is deprecated on ${e.type} nodes.`;r&&(i+=` Use ${r} instead.`),i+=" See https://typescript-eslint.io/troubleshooting/faqs/general#the-key-property-is-deprecated-on-type-nodes-use-key-instead-warnings.",(void 0)(i,"DeprecationWarning"),o=!0}return n},set(i){Object.defineProperty(e,t,{enumerable:!0,value:i,writable:!0})}}),e}assertModuleSpecifier(e,t){!t&&e.moduleSpecifier==null&&this.#e(e,"Module specifier must be a string literal."),e.moduleSpecifier&&e.moduleSpecifier?.kind!==B.StringLiteral&&this.#e(e.moduleSpecifier,"Module specifier must be a string literal.")}convertBindingNameWithTypeAnnotation(e,t,r){let n=this.convertPattern(e);return t&&(n.typeAnnotation=this.convertTypeAnnotation(t,r),this.fixParentLocation(n,n.typeAnnotation.range)),n}convertBodyExpressions(e,t){let r=Oit(t);return e.map(n=>{let o=this.convertChild(n);if(r){if(o?.expression&&aye(n)&&b1(n.expression)){let i=o.expression.raw;return o.directive=i.slice(1,-1),o}r=!1}return o}).filter(n=>n)}convertChainExpression(e,t){let{child:r,isOptional:n}=e.type===H.MemberExpression?{child:e.object,isOptional:e.optional}:e.type===H.CallExpression?{child:e.callee,isOptional:e.optional}:{child:e.expression,isOptional:!1},o=Lit(t,r);if(!o&&!n)return e;if(o&&Fye(r)){let i=r.expression;e.type===H.MemberExpression?e.object=i:e.type===H.CallExpression?e.callee=i:e.expression=i}return this.createNode(t,{type:H.ChainExpression,expression:e})}convertChild(e,t){return this.converter(e,t,!1)}convertChildren(e,t){return e.map(r=>this.converter(r,t,!1))}convertPattern(e,t){return this.converter(e,t,!0)}convertTypeAnnotation(e,t){let r=t?.kind===B.FunctionType||t?.kind===B.ConstructorType?2:1,n=[e.getFullStart()-r,e.end],o=Mg(n,this.ast);return{type:H.TSTypeAnnotation,loc:o,range:n,typeAnnotation:this.convertChild(e)}}convertTypeArgumentsToTypeParameterInstantiation(e,t){let r=Bu(e,this.ast,this.ast),n=[e.pos-1,r.end];return e.length===0&&this.#e(n,"Type argument list cannot be empty."),this.createNode(t,{type:H.TSTypeParameterInstantiation,range:n,params:this.convertChildren(e)})}convertTSTypeParametersToTypeParametersDeclaration(e){let t=Bu(e,this.ast,this.ast),r=[e.pos-1,t.end];return e.length===0&&this.#e(r,"Type parameter list cannot be empty."),{type:H.TSTypeParameterDeclaration,loc:Mg(r,this.ast),range:r,params:this.convertChildren(e)}}convertParameters(e){return e?.length?e.map(t=>{let r=this.convertChild(t);return r.decorators=this.convertChildren(d1(t)??[]),r}):[]}converter(e,t,r){if(!e)return null;this.#r(e);let n=this.allowPattern;r!=null&&(this.allowPattern=r);let o=this.convertNode(e,t??e.parent);return this.registerTSNodeInNodeMap(e,o),this.allowPattern=n,o}convertImportAttributes(e){let t=e.attributes??e.assertClause;return this.convertChildren(t?.elements??[])}convertJSXIdentifier(e){let t=this.createNode(e,{type:H.JSXIdentifier,name:e.getText()});return this.registerTSNodeInNodeMap(e,t),t}convertJSXNamespaceOrIdentifier(e){if(e.kind===Qt.JsxNamespacedName){let n=this.createNode(e,{type:H.JSXNamespacedName,name:this.createNode(e.name,{type:H.JSXIdentifier,name:e.name.text}),namespace:this.createNode(e.namespace,{type:H.JSXIdentifier,name:e.namespace.text})});return this.registerTSNodeInNodeMap(e,n),n}let t=e.getText(),r=t.indexOf(":");if(r>0){let n=a1(e,this.ast),o=this.createNode(e,{type:H.JSXNamespacedName,range:n,name:this.createNode(e,{type:H.JSXIdentifier,range:[n[0]+r+1,n[1]],name:t.slice(r+1)}),namespace:this.createNode(e,{type:H.JSXIdentifier,range:[n[0],n[0]+r],name:t.slice(0,r)})});return this.registerTSNodeInNodeMap(e,o),o}return this.convertJSXIdentifier(e)}convertJSXTagName(e,t){let r;switch(e.kind){case B.PropertyAccessExpression:e.name.kind===B.PrivateIdentifier&&this.#e(e.name,"Non-private identifier expected."),r=this.createNode(e,{type:H.JSXMemberExpression,object:this.convertJSXTagName(e.expression,t),property:this.convertJSXIdentifier(e.name)});break;case B.ThisKeyword:case B.Identifier:default:return this.convertJSXNamespaceOrIdentifier(e)}return this.registerTSNodeInNodeMap(e,r),r}convertMethodSignature(e){return this.createNode(e,{type:H.TSMethodSignature,accessibility:Rg(e),computed:s1(e.name),key:this.convertChild(e.name),kind:(()=>{switch(e.kind){case B.GetAccessor:return"get";case B.SetAccessor:return"set";case B.MethodSignature:return"method"}})(),optional:Fme(e),params:this.convertParameters(e.parameters),readonly:Gr(B.ReadonlyKeyword,e),returnType:e.type&&this.convertTypeAnnotation(e.type,e),static:Gr(B.StaticKeyword,e),typeParameters:e.typeParameters&&this.convertTSTypeParametersToTypeParametersDeclaration(e.typeParameters)})}fixParentLocation(e,t){t[0]e.range[1]&&(e.range[1]=t[1],e.loc.end=dO(e.range[1],this.ast))}convertNode(e,t){switch(e.kind){case B.SourceFile:return this.createNode(e,{type:H.Program,range:[e.getStart(this.ast),e.endOfFileToken.end],body:this.convertBodyExpressions(e.statements,e),comments:void 0,sourceType:e.externalModuleIndicator?"module":"script",tokens:void 0});case B.Block:return this.createNode(e,{type:H.BlockStatement,body:this.convertBodyExpressions(e.statements,e)});case B.Identifier:return Jit(e)?this.createNode(e,{type:H.ThisExpression}):this.createNode(e,{type:H.Identifier,decorators:[],name:e.text,optional:!1,typeAnnotation:void 0});case B.PrivateIdentifier:return this.createNode(e,{type:H.PrivateIdentifier,name:e.text.slice(1)});case B.WithStatement:return this.createNode(e,{type:H.WithStatement,body:this.convertChild(e.statement),object:this.convertChild(e.expression)});case B.ReturnStatement:return this.createNode(e,{type:H.ReturnStatement,argument:this.convertChild(e.expression)});case B.LabeledStatement:return this.createNode(e,{type:H.LabeledStatement,body:this.convertChild(e.statement),label:this.convertChild(e.label)});case B.ContinueStatement:return this.createNode(e,{type:H.ContinueStatement,label:this.convertChild(e.label)});case B.BreakStatement:return this.createNode(e,{type:H.BreakStatement,label:this.convertChild(e.label)});case B.IfStatement:return this.createNode(e,{type:H.IfStatement,alternate:this.convertChild(e.elseStatement),consequent:this.convertChild(e.thenStatement),test:this.convertChild(e.expression)});case B.SwitchStatement:return e.caseBlock.clauses.filter(r=>r.kind===B.DefaultClause).length>1&&this.#e(e,"A 'default' clause cannot appear more than once in a 'switch' statement."),this.createNode(e,{type:H.SwitchStatement,cases:this.convertChildren(e.caseBlock.clauses),discriminant:this.convertChild(e.expression)});case B.CaseClause:case B.DefaultClause:return this.createNode(e,{type:H.SwitchCase,consequent:this.convertChildren(e.statements),test:e.kind===B.CaseClause?this.convertChild(e.expression):null});case B.ThrowStatement:return e.expression.end===e.expression.pos&&this.#e(e,"A throw statement must throw an expression."),this.createNode(e,{type:H.ThrowStatement,argument:this.convertChild(e.expression)});case B.TryStatement:return this.createNode(e,{type:H.TryStatement,block:this.convertChild(e.tryBlock),finalizer:this.convertChild(e.finallyBlock),handler:this.convertChild(e.catchClause)});case B.CatchClause:return e.variableDeclaration?.initializer&&this.#e(e.variableDeclaration.initializer,"Catch clause variable cannot have an initializer."),this.createNode(e,{type:H.CatchClause,body:this.convertChild(e.block),param:e.variableDeclaration?this.convertBindingNameWithTypeAnnotation(e.variableDeclaration.name,e.variableDeclaration.type):null});case B.WhileStatement:return this.createNode(e,{type:H.WhileStatement,body:this.convertChild(e.statement),test:this.convertChild(e.expression)});case B.DoStatement:return this.createNode(e,{type:H.DoWhileStatement,body:this.convertChild(e.statement),test:this.convertChild(e.expression)});case B.ForStatement:return this.createNode(e,{type:H.ForStatement,body:this.convertChild(e.statement),init:this.convertChild(e.initializer),test:this.convertChild(e.condition),update:this.convertChild(e.incrementor)});case B.ForInStatement:return this.#t(e.initializer,e.kind),this.createNode(e,{type:H.ForInStatement,body:this.convertChild(e.statement),left:this.convertPattern(e.initializer),right:this.convertChild(e.expression)});case B.ForOfStatement:return this.#t(e.initializer,e.kind),this.createNode(e,{type:H.ForOfStatement,await:!!(e.awaitModifier&&e.awaitModifier.kind===B.AwaitKeyword),body:this.convertChild(e.statement),left:this.convertPattern(e.initializer),right:this.convertChild(e.expression)});case B.FunctionDeclaration:{let r=Gr(B.DeclareKeyword,e),n=Gr(B.AsyncKeyword,e),o=!!e.asteriskToken;r?e.body?this.#e(e,"An implementation cannot be declared in ambient contexts."):n?this.#e(e,"'async' modifier cannot be used in an ambient context."):o&&this.#e(e,"Generators are not allowed in an ambient context."):!e.body&&o&&this.#e(e,"A function signature cannot be declared as a generator.");let i=this.createNode(e,{type:e.body?H.FunctionDeclaration:H.TSDeclareFunction,async:n,body:this.convertChild(e.body)||void 0,declare:r,expression:!1,generator:o,id:this.convertChild(e.name),params:this.convertParameters(e.parameters),returnType:e.type&&this.convertTypeAnnotation(e.type,e),typeParameters:e.typeParameters&&this.convertTSTypeParametersToTypeParametersDeclaration(e.typeParameters)});return this.fixExports(e,i)}case B.VariableDeclaration:{let r=!!e.exclamationToken,n=this.convertChild(e.initializer),o=this.convertBindingNameWithTypeAnnotation(e.name,e.type,e);return r&&(n?this.#e(e,"Declarations with initializers cannot also have definite assignment assertions."):(o.type!==H.Identifier||!o.typeAnnotation)&&this.#e(e,"Declarations with definite assignment assertions must also have type annotations.")),this.createNode(e,{type:H.VariableDeclarator,definite:r,id:o,init:n})}case B.VariableStatement:{let r=this.createNode(e,{type:H.VariableDeclaration,declarations:this.convertChildren(e.declarationList.declarations),declare:Gr(B.DeclareKeyword,e),kind:lJ(e.declarationList)});return r.declarations.length||this.#e(e,"A variable declaration list must have at least one variable declarator."),(r.kind==="using"||r.kind==="await using")&&e.declarationList.declarations.forEach((n,o)=>{r.declarations[o].init==null&&this.#e(n,`'${r.kind}' declarations must be initialized.`),r.declarations[o].id.type!==H.Identifier&&this.#e(n.name,`'${r.kind}' declarations may not have binding patterns.`)}),(r.declare||["await using","const","using"].includes(r.kind))&&e.declarationList.declarations.forEach((n,o)=>{r.declarations[o].definite&&this.#e(n,"A definite assignment assertion '!' is not permitted in this context.")}),r.declare&&e.declarationList.declarations.forEach((n,o)=>{r.declarations[o].init&&(["let","var"].includes(r.kind)||r.declarations[o].id.typeAnnotation)&&this.#e(n,"Initializers are not permitted in ambient contexts.")}),this.fixExports(e,r)}case B.VariableDeclarationList:{let r=this.createNode(e,{type:H.VariableDeclaration,declarations:this.convertChildren(e.declarations),declare:!1,kind:lJ(e)});return(r.kind==="using"||r.kind==="await using")&&e.declarations.forEach((n,o)=>{r.declarations[o].init!=null&&this.#e(n,`'${r.kind}' declarations may not be initialized in for statement.`),r.declarations[o].id.type!==H.Identifier&&this.#e(n.name,`'${r.kind}' declarations may not have binding patterns.`)}),r}case B.ExpressionStatement:return this.createNode(e,{type:H.ExpressionStatement,directive:void 0,expression:this.convertChild(e.expression)});case B.ThisKeyword:return this.createNode(e,{type:H.ThisExpression});case B.ArrayLiteralExpression:return this.allowPattern?this.createNode(e,{type:H.ArrayPattern,decorators:[],elements:e.elements.map(r=>this.convertPattern(r)),optional:!1,typeAnnotation:void 0}):this.createNode(e,{type:H.ArrayExpression,elements:this.convertChildren(e.elements)});case B.ObjectLiteralExpression:{if(this.allowPattern)return this.createNode(e,{type:H.ObjectPattern,decorators:[],optional:!1,properties:e.properties.map(n=>this.convertPattern(n)),typeAnnotation:void 0});let r=[];for(let n of e.properties)(n.kind===B.GetAccessor||n.kind===B.SetAccessor||n.kind===B.MethodDeclaration)&&!n.body&&this.#e(n.end-1,"'{' expected."),r.push(this.convertChild(n));return this.createNode(e,{type:H.ObjectExpression,properties:r})}case B.PropertyAssignment:{let{exclamationToken:r,questionToken:n}=e;return n&&this.#e(n,"A property assignment cannot have a question token."),r&&this.#e(r,"A property assignment cannot have an exclamation token."),this.createNode(e,{type:H.Property,computed:s1(e.name),key:this.convertChild(e.name),kind:"init",method:!1,optional:!1,shorthand:!1,value:this.converter(e.initializer,e,this.allowPattern)})}case B.ShorthandPropertyAssignment:{let{exclamationToken:r,modifiers:n,questionToken:o}=e;return n&&this.#e(n[0],"A shorthand property assignment cannot have modifiers."),o&&this.#e(o,"A shorthand property assignment cannot have a question token."),r&&this.#e(r,"A shorthand property assignment cannot have an exclamation token."),e.objectAssignmentInitializer?this.createNode(e,{type:H.Property,computed:!1,key:this.convertChild(e.name),kind:"init",method:!1,optional:!1,shorthand:!0,value:this.createNode(e,{type:H.AssignmentPattern,decorators:[],left:this.convertPattern(e.name),optional:!1,right:this.convertChild(e.objectAssignmentInitializer),typeAnnotation:void 0})}):this.createNode(e,{type:H.Property,computed:!1,key:this.convertChild(e.name),kind:"init",method:!1,optional:!1,shorthand:!0,value:this.convertChild(e.name)})}case B.ComputedPropertyName:return this.convertChild(e.expression);case B.PropertyDeclaration:{let r=Gr(B.AbstractKeyword,e);r&&e.initializer&&this.#e(e.initializer,"Abstract property cannot have an initializer."),e.name.kind===B.StringLiteral&&e.name.text==="constructor"&&this.#e(e.name,"Classes may not have a field named 'constructor'.");let n=Gr(B.AccessorKeyword,e),o=n?r?H.TSAbstractAccessorProperty:H.AccessorProperty:r?H.TSAbstractPropertyDefinition:H.PropertyDefinition,i=this.convertChild(e.name);return this.createNode(e,{type:o,accessibility:Rg(e),computed:s1(e.name),declare:Gr(B.DeclareKeyword,e),decorators:this.convertChildren(d1(e)??[]),definite:!!e.exclamationToken,key:i,optional:(i.type===H.Literal||e.name.kind===B.Identifier||e.name.kind===B.ComputedPropertyName||e.name.kind===B.PrivateIdentifier)&&!!e.questionToken,override:Gr(B.OverrideKeyword,e),readonly:Gr(B.ReadonlyKeyword,e),static:Gr(B.StaticKeyword,e),typeAnnotation:e.type&&this.convertTypeAnnotation(e.type,e),value:r?null:this.convertChild(e.initializer)})}case B.GetAccessor:case B.SetAccessor:if(e.parent.kind===B.InterfaceDeclaration||e.parent.kind===B.TypeLiteral)return this.convertMethodSignature(e);case B.MethodDeclaration:{let r=Gr(B.AbstractKeyword,e);r&&e.body&&this.#e(e.name,e.kind===B.GetAccessor||e.kind===B.SetAccessor?"An abstract accessor cannot have an implementation.":`Method '${Kit(e.name,this.ast)}' cannot have an implementation because it is marked abstract.`);let n=this.createNode(e,{type:e.body?H.FunctionExpression:H.TSEmptyBodyFunctionExpression,range:[e.parameters.pos-1,e.end],async:Gr(B.AsyncKeyword,e),body:this.convertChild(e.body),declare:!1,expression:!1,generator:!!e.asteriskToken,id:null,params:[],returnType:e.type&&this.convertTypeAnnotation(e.type,e),typeParameters:e.typeParameters&&this.convertTSTypeParametersToTypeParametersDeclaration(e.typeParameters)});n.typeParameters&&this.fixParentLocation(n,n.typeParameters.range);let o;if(t.kind===B.ObjectLiteralExpression)n.params=this.convertChildren(e.parameters),o=this.createNode(e,{type:H.Property,computed:s1(e.name),key:this.convertChild(e.name),kind:"init",method:e.kind===B.MethodDeclaration,optional:!!e.questionToken,shorthand:!1,value:n});else{n.params=this.convertParameters(e.parameters);let i=r?H.TSAbstractMethodDefinition:H.MethodDefinition;o=this.createNode(e,{type:i,accessibility:Rg(e),computed:s1(e.name),decorators:this.convertChildren(d1(e)??[]),key:this.convertChild(e.name),kind:"method",optional:!!e.questionToken,override:Gr(B.OverrideKeyword,e),static:Gr(B.StaticKeyword,e),value:n})}return e.kind===B.GetAccessor?o.kind="get":e.kind===B.SetAccessor?o.kind="set":!o.static&&e.name.kind===B.StringLiteral&&e.name.text==="constructor"&&o.type!==H.Property&&(o.kind="constructor"),o}case B.Constructor:{let r=Iit(e),n=(r&&Bu(r,e,this.ast))??e.getFirstToken(),o=this.createNode(e,{type:e.body?H.FunctionExpression:H.TSEmptyBodyFunctionExpression,range:[e.parameters.pos-1,e.end],async:!1,body:this.convertChild(e.body),declare:!1,expression:!1,generator:!1,id:null,params:this.convertParameters(e.parameters),returnType:e.type&&this.convertTypeAnnotation(e.type,e),typeParameters:e.typeParameters&&this.convertTSTypeParametersToTypeParametersDeclaration(e.typeParameters)});o.typeParameters&&this.fixParentLocation(o,o.typeParameters.range);let i=n.kind===B.StringLiteral?this.createNode(n,{type:H.Literal,raw:n.getText(),value:"constructor"}):this.createNode(e,{type:H.Identifier,range:[n.getStart(this.ast),n.end],decorators:[],name:"constructor",optional:!1,typeAnnotation:void 0}),a=Gr(B.StaticKeyword,e);return this.createNode(e,{type:Gr(B.AbstractKeyword,e)?H.TSAbstractMethodDefinition:H.MethodDefinition,accessibility:Rg(e),computed:!1,decorators:[],key:i,kind:a?"method":"constructor",optional:!1,override:!1,static:a,value:o})}case B.FunctionExpression:return this.createNode(e,{type:H.FunctionExpression,async:Gr(B.AsyncKeyword,e),body:this.convertChild(e.body),declare:!1,expression:!1,generator:!!e.asteriskToken,id:this.convertChild(e.name),params:this.convertParameters(e.parameters),returnType:e.type&&this.convertTypeAnnotation(e.type,e),typeParameters:e.typeParameters&&this.convertTSTypeParametersToTypeParametersDeclaration(e.typeParameters)});case B.SuperKeyword:return this.createNode(e,{type:H.Super});case B.ArrayBindingPattern:return this.createNode(e,{type:H.ArrayPattern,decorators:[],elements:e.elements.map(r=>this.convertPattern(r)),optional:!1,typeAnnotation:void 0});case B.OmittedExpression:return null;case B.ObjectBindingPattern:return this.createNode(e,{type:H.ObjectPattern,decorators:[],optional:!1,properties:e.elements.map(r=>this.convertPattern(r)),typeAnnotation:void 0});case B.BindingElement:{if(t.kind===B.ArrayBindingPattern){let n=this.convertChild(e.name,t);return e.initializer?this.createNode(e,{type:H.AssignmentPattern,decorators:[],left:n,optional:!1,right:this.convertChild(e.initializer),typeAnnotation:void 0}):e.dotDotDotToken?this.createNode(e,{type:H.RestElement,argument:n,decorators:[],optional:!1,typeAnnotation:void 0,value:void 0}):n}let r;return e.dotDotDotToken?r=this.createNode(e,{type:H.RestElement,argument:this.convertChild(e.propertyName??e.name),decorators:[],optional:!1,typeAnnotation:void 0,value:void 0}):r=this.createNode(e,{type:H.Property,computed:!!(e.propertyName&&e.propertyName.kind===B.ComputedPropertyName),key:this.convertChild(e.propertyName??e.name),kind:"init",method:!1,optional:!1,shorthand:!e.propertyName,value:this.convertChild(e.name)}),e.initializer&&(r.value=this.createNode(e,{type:H.AssignmentPattern,range:[e.name.getStart(this.ast),e.initializer.end],decorators:[],left:this.convertChild(e.name),optional:!1,right:this.convertChild(e.initializer),typeAnnotation:void 0})),r}case B.ArrowFunction:return this.createNode(e,{type:H.ArrowFunctionExpression,async:Gr(B.AsyncKeyword,e),body:this.convertChild(e.body),expression:e.body.kind!==B.Block,generator:!1,id:null,params:this.convertParameters(e.parameters),returnType:e.type&&this.convertTypeAnnotation(e.type,e),typeParameters:e.typeParameters&&this.convertTSTypeParametersToTypeParametersDeclaration(e.typeParameters)});case B.YieldExpression:return this.createNode(e,{type:H.YieldExpression,argument:this.convertChild(e.expression),delegate:!!e.asteriskToken});case B.AwaitExpression:return this.createNode(e,{type:H.AwaitExpression,argument:this.convertChild(e.expression)});case B.NoSubstitutionTemplateLiteral:return this.createNode(e,{type:H.TemplateLiteral,expressions:[],quasis:[this.createNode(e,{type:H.TemplateElement,tail:!0,value:{cooked:e.text,raw:this.ast.text.slice(e.getStart(this.ast)+1,e.end-1)}})]});case B.TemplateExpression:{let r=this.createNode(e,{type:H.TemplateLiteral,expressions:[],quasis:[this.convertChild(e.head)]});return e.templateSpans.forEach(n=>{r.expressions.push(this.convertChild(n.expression)),r.quasis.push(this.convertChild(n.literal))}),r}case B.TaggedTemplateExpression:return e.tag.flags&Jc.OptionalChain&&this.#e(e,"Tagged template expressions are not permitted in an optional chain."),this.createNode(e,{type:H.TaggedTemplateExpression,quasi:this.convertChild(e.template),tag:this.convertChild(e.tag),typeArguments:e.typeArguments&&this.convertTypeArgumentsToTypeParameterInstantiation(e.typeArguments,e)});case B.TemplateHead:case B.TemplateMiddle:case B.TemplateTail:{let r=e.kind===B.TemplateTail;return this.createNode(e,{type:H.TemplateElement,tail:r,value:{cooked:e.text,raw:this.ast.text.slice(e.getStart(this.ast)+1,e.end-(r?1:2))}})}case B.SpreadAssignment:case B.SpreadElement:return this.allowPattern?this.createNode(e,{type:H.RestElement,argument:this.convertPattern(e.expression),decorators:[],optional:!1,typeAnnotation:void 0,value:void 0}):this.createNode(e,{type:H.SpreadElement,argument:this.convertChild(e.expression)});case B.Parameter:{let r,n;return e.dotDotDotToken?r=n=this.createNode(e,{type:H.RestElement,argument:this.convertChild(e.name),decorators:[],optional:!1,typeAnnotation:void 0,value:void 0}):e.initializer?(r=this.convertChild(e.name),n=this.createNode(e,{type:H.AssignmentPattern,range:[e.name.getStart(this.ast),e.initializer.end],decorators:[],left:r,optional:!1,right:this.convertChild(e.initializer),typeAnnotation:void 0}),md(e)&&(n.range[0]=r.range[0],n.loc=Mg(n.range,this.ast))):r=n=this.convertChild(e.name,t),e.type&&(r.typeAnnotation=this.convertTypeAnnotation(e.type,e),this.fixParentLocation(r,r.typeAnnotation.range)),e.questionToken&&(e.questionToken.end>r.range[1]&&(r.range[1]=e.questionToken.end,r.loc.end=dO(r.range[1],this.ast)),r.optional=!0),md(e)?this.createNode(e,{type:H.TSParameterProperty,accessibility:Rg(e),decorators:[],override:Gr(B.OverrideKeyword,e),parameter:n,readonly:Gr(B.ReadonlyKeyword,e),static:Gr(B.StaticKeyword,e)}):n}case B.ClassDeclaration:!e.name&&(!Gr(Qt.ExportKeyword,e)||!Gr(Qt.DefaultKeyword,e))&&this.#e(e,"A class declaration without the 'default' modifier must have a name.");case B.ClassExpression:{let r=e.heritageClauses??[],n=e.kind===B.ClassDeclaration?H.ClassDeclaration:H.ClassExpression,o,i;for(let s of r){let{token:c,types:p}=s;p.length===0&&this.#e(s,`'${io(c)}' list cannot be empty.`),c===B.ExtendsKeyword?(o&&this.#e(s,"'extends' clause already seen."),i&&this.#e(s,"'extends' clause must precede 'implements' clause."),p.length>1&&this.#e(p[1],"Classes can only extend a single class."),o??(o=s)):c===B.ImplementsKeyword&&(i&&this.#e(s,"'implements' clause already seen."),i??(i=s))}let a=this.createNode(e,{type:n,abstract:Gr(B.AbstractKeyword,e),body:this.createNode(e,{type:H.ClassBody,range:[e.members.pos-1,e.end],body:this.convertChildren(e.members.filter(Ait))}),declare:Gr(B.DeclareKeyword,e),decorators:this.convertChildren(d1(e)??[]),id:this.convertChild(e.name),implements:this.convertChildren(i?.types??[]),superClass:o?.types[0]?this.convertChild(o.types[0].expression):null,superTypeArguments:void 0,typeParameters:e.typeParameters&&this.convertTSTypeParametersToTypeParametersDeclaration(e.typeParameters)});return o?.types[0]?.typeArguments&&(a.superTypeArguments=this.convertTypeArgumentsToTypeParameterInstantiation(o.types[0].typeArguments,o.types[0])),this.fixExports(e,a)}case B.ModuleBlock:return this.createNode(e,{type:H.TSModuleBlock,body:this.convertBodyExpressions(e.statements,e)});case B.ImportDeclaration:{this.assertModuleSpecifier(e,!1);let r=this.createNode(e,this.#n({type:H.ImportDeclaration,attributes:this.convertImportAttributes(e),importKind:"value",source:this.convertChild(e.moduleSpecifier),specifiers:[]},"assertions","attributes",!0));if(e.importClause&&(e.importClause.isTypeOnly&&(r.importKind="type"),e.importClause.name&&r.specifiers.push(this.convertChild(e.importClause)),e.importClause.namedBindings))switch(e.importClause.namedBindings.kind){case B.NamespaceImport:r.specifiers.push(this.convertChild(e.importClause.namedBindings));break;case B.NamedImports:r.specifiers.push(...this.convertChildren(e.importClause.namedBindings.elements));break}return r}case B.NamespaceImport:return this.createNode(e,{type:H.ImportNamespaceSpecifier,local:this.convertChild(e.name)});case B.ImportSpecifier:return this.createNode(e,{type:H.ImportSpecifier,imported:this.convertChild(e.propertyName??e.name),importKind:e.isTypeOnly?"type":"value",local:this.convertChild(e.name)});case B.ImportClause:{let r=this.convertChild(e.name);return this.createNode(e,{type:H.ImportDefaultSpecifier,range:r.range,local:r})}case B.ExportDeclaration:return e.exportClause?.kind===B.NamedExports?(this.assertModuleSpecifier(e,!0),this.createNode(e,this.#n({type:H.ExportNamedDeclaration,attributes:this.convertImportAttributes(e),declaration:null,exportKind:e.isTypeOnly?"type":"value",source:this.convertChild(e.moduleSpecifier),specifiers:this.convertChildren(e.exportClause.elements,e)},"assertions","attributes",!0))):(this.assertModuleSpecifier(e,!1),this.createNode(e,this.#n({type:H.ExportAllDeclaration,attributes:this.convertImportAttributes(e),exported:e.exportClause?.kind===B.NamespaceExport?this.convertChild(e.exportClause.name):null,exportKind:e.isTypeOnly?"type":"value",source:this.convertChild(e.moduleSpecifier)},"assertions","attributes",!0)));case B.ExportSpecifier:{let r=e.propertyName??e.name;return r.kind===B.StringLiteral&&t.kind===B.ExportDeclaration&&t.moduleSpecifier?.kind!==B.StringLiteral&&this.#e(r,"A string literal cannot be used as a local exported binding without `from`."),this.createNode(e,{type:H.ExportSpecifier,exported:this.convertChild(e.name),exportKind:e.isTypeOnly?"type":"value",local:this.convertChild(r)})}case B.ExportAssignment:return e.isExportEquals?this.createNode(e,{type:H.TSExportAssignment,expression:this.convertChild(e.expression)}):this.createNode(e,{type:H.ExportDefaultDeclaration,declaration:this.convertChild(e.expression),exportKind:"value"});case B.PrefixUnaryExpression:case B.PostfixUnaryExpression:{let r=ah(e.operator);return r==="++"||r==="--"?(uJ(e.operand)||this.#e(e.operand,"Invalid left-hand side expression in unary operation"),this.createNode(e,{type:H.UpdateExpression,argument:this.convertChild(e.operand),operator:r,prefix:e.kind===B.PrefixUnaryExpression})):this.createNode(e,{type:H.UnaryExpression,argument:this.convertChild(e.operand),operator:r,prefix:e.kind===B.PrefixUnaryExpression})}case B.DeleteExpression:return this.createNode(e,{type:H.UnaryExpression,argument:this.convertChild(e.expression),operator:"delete",prefix:!0});case B.VoidExpression:return this.createNode(e,{type:H.UnaryExpression,argument:this.convertChild(e.expression),operator:"void",prefix:!0});case B.TypeOfExpression:return this.createNode(e,{type:H.UnaryExpression,argument:this.convertChild(e.expression),operator:"typeof",prefix:!0});case B.TypeOperator:return this.createNode(e,{type:H.TSTypeOperator,operator:ah(e.operator),typeAnnotation:this.convertChild(e.type)});case B.BinaryExpression:{if(e.operatorToken.kind!==B.InKeyword&&e.left.kind===B.PrivateIdentifier?this.#e(e.left,"Private identifiers cannot appear on the right-hand-side of an 'in' expression."):e.right.kind===B.PrivateIdentifier&&this.#e(e.right,"Private identifiers are only allowed on the left-hand-side of an 'in' expression."),wit(e.operatorToken)){let n=this.createNode(e,{type:H.SequenceExpression,expressions:[]}),o=this.convertChild(e.left);return o.type===H.SequenceExpression&&e.left.kind!==B.ParenthesizedExpression?n.expressions.push(...o.expressions):n.expressions.push(o),n.expressions.push(this.convertChild(e.right)),n}let r=Pit(e.operatorToken);return this.allowPattern&&r.type===H.AssignmentExpression?this.createNode(e,{type:H.AssignmentPattern,decorators:[],left:this.convertPattern(e.left,e),optional:!1,right:this.convertChild(e.right),typeAnnotation:void 0}):this.createNode(e,{...r,left:this.converter(e.left,e,r.type===H.AssignmentExpression),right:this.convertChild(e.right)})}case B.PropertyAccessExpression:{let r=this.convertChild(e.expression),n=this.convertChild(e.name),o=this.createNode(e,{type:H.MemberExpression,computed:!1,object:r,optional:e.questionDotToken!=null,property:n});return this.convertChainExpression(o,e)}case B.ElementAccessExpression:{let r=this.convertChild(e.expression),n=this.convertChild(e.argumentExpression),o=this.createNode(e,{type:H.MemberExpression,computed:!0,object:r,optional:e.questionDotToken!=null,property:n});return this.convertChainExpression(o,e)}case B.CallExpression:{if(e.expression.kind===B.ImportKeyword)return e.arguments.length!==1&&e.arguments.length!==2&&this.#e(e.arguments[2]??e,"Dynamic import requires exactly one or two arguments."),this.createNode(e,this.#n({type:H.ImportExpression,options:e.arguments[1]?this.convertChild(e.arguments[1]):null,source:this.convertChild(e.arguments[0])},"attributes","options",!0));let r=this.convertChild(e.expression),n=this.convertChildren(e.arguments),o=e.typeArguments&&this.convertTypeArgumentsToTypeParameterInstantiation(e.typeArguments,e),i=this.createNode(e,{type:H.CallExpression,arguments:n,callee:r,optional:e.questionDotToken!=null,typeArguments:o});return this.convertChainExpression(i,e)}case B.NewExpression:{let r=e.typeArguments&&this.convertTypeArgumentsToTypeParameterInstantiation(e.typeArguments,e);return this.createNode(e,{type:H.NewExpression,arguments:this.convertChildren(e.arguments??[]),callee:this.convertChild(e.expression),typeArguments:r})}case B.ConditionalExpression:return this.createNode(e,{type:H.ConditionalExpression,alternate:this.convertChild(e.whenFalse),consequent:this.convertChild(e.whenTrue),test:this.convertChild(e.condition)});case B.MetaProperty:return this.createNode(e,{type:H.MetaProperty,meta:this.createNode(e.getFirstToken(),{type:H.Identifier,decorators:[],name:ah(e.keywordToken),optional:!1,typeAnnotation:void 0}),property:this.convertChild(e.name)});case B.Decorator:return this.createNode(e,{type:H.Decorator,expression:this.convertChild(e.expression)});case B.StringLiteral:return this.createNode(e,{type:H.Literal,raw:e.getText(),value:t.kind===B.JsxAttribute?Nme(e.text):e.text});case B.NumericLiteral:return this.createNode(e,{type:H.Literal,raw:e.getText(),value:Number(e.text)});case B.BigIntLiteral:{let r=a1(e,this.ast),n=this.ast.text.slice(r[0],r[1]),o=_1(0,n.slice(0,-1),"_",""),i=typeof BigInt<"u"?BigInt(o):null;return this.createNode(e,{type:H.Literal,range:r,bigint:i==null?o:String(i),raw:n,value:i})}case B.RegularExpressionLiteral:{let r=e.text.slice(1,e.text.lastIndexOf("/")),n=e.text.slice(e.text.lastIndexOf("/")+1),o=null;try{o=new RegExp(r,n)}catch{}return this.createNode(e,{type:H.Literal,raw:e.text,regex:{flags:n,pattern:r},value:o})}case B.TrueKeyword:return this.createNode(e,{type:H.Literal,raw:"true",value:!0});case B.FalseKeyword:return this.createNode(e,{type:H.Literal,raw:"false",value:!1});case B.NullKeyword:return this.createNode(e,{type:H.Literal,raw:"null",value:null});case B.EmptyStatement:return this.createNode(e,{type:H.EmptyStatement});case B.DebuggerStatement:return this.createNode(e,{type:H.DebuggerStatement});case B.JsxElement:return this.createNode(e,{type:H.JSXElement,children:this.convertChildren(e.children),closingElement:this.convertChild(e.closingElement),openingElement:this.convertChild(e.openingElement)});case B.JsxFragment:return this.createNode(e,{type:H.JSXFragment,children:this.convertChildren(e.children),closingFragment:this.convertChild(e.closingFragment),openingFragment:this.convertChild(e.openingFragment)});case B.JsxSelfClosingElement:return this.createNode(e,{type:H.JSXElement,children:[],closingElement:null,openingElement:this.createNode(e,{type:H.JSXOpeningElement,range:a1(e,this.ast),attributes:this.convertChildren(e.attributes.properties),name:this.convertJSXTagName(e.tagName,e),selfClosing:!0,typeArguments:e.typeArguments?this.convertTypeArgumentsToTypeParameterInstantiation(e.typeArguments,e):void 0})});case B.JsxOpeningElement:return this.createNode(e,{type:H.JSXOpeningElement,attributes:this.convertChildren(e.attributes.properties),name:this.convertJSXTagName(e.tagName,e),selfClosing:!1,typeArguments:e.typeArguments&&this.convertTypeArgumentsToTypeParameterInstantiation(e.typeArguments,e)});case B.JsxClosingElement:return this.createNode(e,{type:H.JSXClosingElement,name:this.convertJSXTagName(e.tagName,e)});case B.JsxOpeningFragment:return this.createNode(e,{type:H.JSXOpeningFragment});case B.JsxClosingFragment:return this.createNode(e,{type:H.JSXClosingFragment});case B.JsxExpression:{let r=e.expression?this.convertChild(e.expression):this.createNode(e,{type:H.JSXEmptyExpression,range:[e.getStart(this.ast)+1,e.getEnd()-1]});return e.dotDotDotToken?this.createNode(e,{type:H.JSXSpreadChild,expression:r}):this.createNode(e,{type:H.JSXExpressionContainer,expression:r})}case B.JsxAttribute:return this.createNode(e,{type:H.JSXAttribute,name:this.convertJSXNamespaceOrIdentifier(e.name),value:this.convertChild(e.initializer)});case B.JsxText:{let r=e.getFullStart(),n=e.getEnd(),o=this.ast.text.slice(r,n);return this.createNode(e,{type:H.JSXText,range:[r,n],raw:o,value:Nme(o)})}case B.JsxSpreadAttribute:return this.createNode(e,{type:H.JSXSpreadAttribute,argument:this.convertChild(e.expression)});case B.QualifiedName:return this.createNode(e,{type:H.TSQualifiedName,left:this.convertChild(e.left),right:this.convertChild(e.right)});case B.TypeReference:return this.createNode(e,{type:H.TSTypeReference,typeArguments:e.typeArguments&&this.convertTypeArgumentsToTypeParameterInstantiation(e.typeArguments,e),typeName:this.convertChild(e.typeName)});case B.TypeParameter:return this.createNode(e,{type:H.TSTypeParameter,const:Gr(B.ConstKeyword,e),constraint:e.constraint&&this.convertChild(e.constraint),default:e.default?this.convertChild(e.default):void 0,in:Gr(B.InKeyword,e),name:this.convertChild(e.name),out:Gr(B.OutKeyword,e)});case B.ThisType:return this.createNode(e,{type:H.TSThisType});case B.AnyKeyword:case B.BigIntKeyword:case B.BooleanKeyword:case B.NeverKeyword:case B.NumberKeyword:case B.ObjectKeyword:case B.StringKeyword:case B.SymbolKeyword:case B.UnknownKeyword:case B.VoidKeyword:case B.UndefinedKeyword:case B.IntrinsicKeyword:return this.createNode(e,{type:H[`TS${B[e.kind]}`]});case B.NonNullExpression:{let r=this.createNode(e,{type:H.TSNonNullExpression,expression:this.convertChild(e.expression)});return this.convertChainExpression(r,e)}case B.TypeLiteral:return this.createNode(e,{type:H.TSTypeLiteral,members:this.convertChildren(e.members)});case B.ArrayType:return this.createNode(e,{type:H.TSArrayType,elementType:this.convertChild(e.elementType)});case B.IndexedAccessType:return this.createNode(e,{type:H.TSIndexedAccessType,indexType:this.convertChild(e.indexType),objectType:this.convertChild(e.objectType)});case B.ConditionalType:return this.createNode(e,{type:H.TSConditionalType,checkType:this.convertChild(e.checkType),extendsType:this.convertChild(e.extendsType),falseType:this.convertChild(e.falseType),trueType:this.convertChild(e.trueType)});case B.TypeQuery:return this.createNode(e,{type:H.TSTypeQuery,exprName:this.convertChild(e.exprName),typeArguments:e.typeArguments&&this.convertTypeArgumentsToTypeParameterInstantiation(e.typeArguments,e)});case B.MappedType:return e.members&&e.members.length>0&&this.#e(e.members[0],"A mapped type may not declare properties or methods."),this.createNode(e,this.#o({type:H.TSMappedType,constraint:this.convertChild(e.typeParameter.constraint),key:this.convertChild(e.typeParameter.name),nameType:this.convertChild(e.nameType)??null,optional:e.questionToken?e.questionToken.kind===B.QuestionToken||ah(e.questionToken.kind):!1,readonly:e.readonlyToken?e.readonlyToken.kind===B.ReadonlyKeyword||ah(e.readonlyToken.kind):void 0,typeAnnotation:e.type&&this.convertChild(e.type)},"typeParameter","'constraint' and 'key'",this.convertChild(e.typeParameter)));case B.ParenthesizedExpression:return this.convertChild(e.expression,t);case B.TypeAliasDeclaration:{let r=this.createNode(e,{type:H.TSTypeAliasDeclaration,declare:Gr(B.DeclareKeyword,e),id:this.convertChild(e.name),typeAnnotation:this.convertChild(e.type),typeParameters:e.typeParameters&&this.convertTSTypeParametersToTypeParametersDeclaration(e.typeParameters)});return this.fixExports(e,r)}case B.MethodSignature:return this.convertMethodSignature(e);case B.PropertySignature:{let{initializer:r}=e;return r&&this.#e(r,"A property signature cannot have an initializer."),this.createNode(e,{type:H.TSPropertySignature,accessibility:Rg(e),computed:s1(e.name),key:this.convertChild(e.name),optional:Fme(e),readonly:Gr(B.ReadonlyKeyword,e),static:Gr(B.StaticKeyword,e),typeAnnotation:e.type&&this.convertTypeAnnotation(e.type,e)})}case B.IndexSignature:return this.createNode(e,{type:H.TSIndexSignature,accessibility:Rg(e),parameters:this.convertChildren(e.parameters),readonly:Gr(B.ReadonlyKeyword,e),static:Gr(B.StaticKeyword,e),typeAnnotation:e.type&&this.convertTypeAnnotation(e.type,e)});case B.ConstructorType:return this.createNode(e,{type:H.TSConstructorType,abstract:Gr(B.AbstractKeyword,e),params:this.convertParameters(e.parameters),returnType:e.type&&this.convertTypeAnnotation(e.type,e),typeParameters:e.typeParameters&&this.convertTSTypeParametersToTypeParametersDeclaration(e.typeParameters)});case B.FunctionType:{let{modifiers:r}=e;r&&this.#e(r[0],"A function type cannot have modifiers.")}case B.ConstructSignature:case B.CallSignature:{let r=e.kind===B.ConstructSignature?H.TSConstructSignatureDeclaration:e.kind===B.CallSignature?H.TSCallSignatureDeclaration:H.TSFunctionType;return this.createNode(e,{type:r,params:this.convertParameters(e.parameters),returnType:e.type&&this.convertTypeAnnotation(e.type,e),typeParameters:e.typeParameters&&this.convertTSTypeParametersToTypeParametersDeclaration(e.typeParameters)})}case B.ExpressionWithTypeArguments:{let r=t.kind,n=r===B.InterfaceDeclaration?H.TSInterfaceHeritage:r===B.HeritageClause?H.TSClassImplements:H.TSInstantiationExpression;return this.createNode(e,{type:n,expression:this.convertChild(e.expression),typeArguments:e.typeArguments&&this.convertTypeArgumentsToTypeParameterInstantiation(e.typeArguments,e)})}case B.InterfaceDeclaration:{let r=e.heritageClauses??[],n=[],o=!1;for(let a of r){a.token!==B.ExtendsKeyword&&this.#e(a,a.token===B.ImplementsKeyword?"Interface declaration cannot have 'implements' clause.":"Unexpected token."),o&&this.#e(a,"'extends' clause already seen."),o=!0;for(let s of a.types)(!Lye(s.expression)||ltt(s.expression))&&this.#e(s,"Interface declaration can only extend an identifier/qualified name with optional type arguments."),n.push(this.convertChild(s,e))}let i=this.createNode(e,{type:H.TSInterfaceDeclaration,body:this.createNode(e,{type:H.TSInterfaceBody,range:[e.members.pos-1,e.end],body:this.convertChildren(e.members)}),declare:Gr(B.DeclareKeyword,e),extends:n,id:this.convertChild(e.name),typeParameters:e.typeParameters&&this.convertTSTypeParametersToTypeParametersDeclaration(e.typeParameters)});return this.fixExports(e,i)}case B.TypePredicate:{let r=this.createNode(e,{type:H.TSTypePredicate,asserts:e.assertsModifier!=null,parameterName:this.convertChild(e.parameterName),typeAnnotation:null});return e.type&&(r.typeAnnotation=this.convertTypeAnnotation(e.type,e),r.typeAnnotation.loc=r.typeAnnotation.typeAnnotation.loc,r.typeAnnotation.range=r.typeAnnotation.typeAnnotation.range),r}case B.ImportType:{let r=a1(e,this.ast);if(e.isTypeOf){let s=Bu(e.getFirstToken(),e,this.ast);r[0]=s.getStart(this.ast)}let n=null;if(e.attributes){let s=this.createNode(e.attributes,{type:H.ObjectExpression,properties:e.attributes.elements.map(S=>this.createNode(S,{type:H.Property,computed:!1,key:this.convertChild(S.name),kind:"init",method:!1,optional:!1,shorthand:!1,value:this.convertChild(S.value)}))}),c=Bu(e.argument,e,this.ast),p=Bu(c,e,this.ast),d=Bu(e.attributes,e,this.ast),f=d.kind===Qt.CommaToken?Bu(d,e,this.ast):d,m=Bu(p,e,this.ast),y=a1(m,this.ast),g=m.kind===Qt.AssertKeyword?"assert":"with";n=this.createNode(e,{type:H.ObjectExpression,range:[p.getStart(this.ast),f.end],properties:[this.createNode(e,{type:H.Property,range:[y[0],e.attributes.end],computed:!1,key:this.createNode(e,{type:H.Identifier,range:y,decorators:[],name:g,optional:!1,typeAnnotation:void 0}),kind:"init",method:!1,optional:!1,shorthand:!1,value:s})]})}let o=this.convertChild(e.argument),i=o.literal,a=this.createNode(e,this.#o({type:H.TSImportType,range:r,options:n,qualifier:this.convertChild(e.qualifier),source:i,typeArguments:e.typeArguments?this.convertTypeArgumentsToTypeParameterInstantiation(e.typeArguments,e):null},"argument","source",o));return e.isTypeOf?this.createNode(e,{type:H.TSTypeQuery,exprName:a,typeArguments:void 0}):a}case B.EnumDeclaration:{let r=this.convertChildren(e.members),n=this.createNode(e,this.#o({type:H.TSEnumDeclaration,body:this.createNode(e,{type:H.TSEnumBody,range:[e.members.pos-1,e.end],members:r}),const:Gr(B.ConstKeyword,e),declare:Gr(B.DeclareKeyword,e),id:this.convertChild(e.name)},"members","'body.members'",this.convertChildren(e.members)));return this.fixExports(e,n)}case B.EnumMember:{let r=e.name.kind===Qt.ComputedPropertyName;return r&&this.#e(e.name,"Computed property names are not allowed in enums."),(e.name.kind===B.NumericLiteral||e.name.kind===B.BigIntLiteral)&&this.#e(e.name,"An enum member cannot have a numeric name."),this.createNode(e,this.#o({type:H.TSEnumMember,id:this.convertChild(e.name),initializer:e.initializer&&this.convertChild(e.initializer)},"computed",void 0,r))}case B.ModuleDeclaration:{let r=Gr(B.DeclareKeyword,e),n=this.createNode(e,{type:H.TSModuleDeclaration,...(()=>{if(e.flags&Jc.GlobalAugmentation){let i=this.convertChild(e.name),a=this.convertChild(e.body);return(a==null||a.type===H.TSModuleDeclaration)&&this.#e(e.body??e,"Expected a valid module body"),i.type!==H.Identifier&&this.#e(e.name,"global module augmentation must have an Identifier id"),{body:a,declare:!1,global:!1,id:i,kind:"global"}}if(b1(e.name)){let i=this.convertChild(e.body);return{kind:"module",...i!=null?{body:i}:{},declare:!1,global:!1,id:this.convertChild(e.name)}}e.body==null&&this.#e(e,"Expected a module body"),e.name.kind!==Qt.Identifier&&this.#e(e.name,"`namespace`s must have an Identifier id");let o=this.createNode(e.name,{type:H.Identifier,range:[e.name.getStart(this.ast),e.name.getEnd()],decorators:[],name:e.name.text,optional:!1,typeAnnotation:void 0});for(;e.body&&XD(e.body)&&e.body.name;){e=e.body,r||(r=Gr(B.DeclareKeyword,e));let i=e.name,a=this.createNode(i,{type:H.Identifier,range:[i.getStart(this.ast),i.getEnd()],decorators:[],name:i.text,optional:!1,typeAnnotation:void 0});o=this.createNode(i,{type:H.TSQualifiedName,range:[o.range[0],a.range[1]],left:o,right:a})}return{body:this.convertChild(e.body),declare:!1,global:!1,id:o,kind:e.flags&Jc.Namespace?"namespace":"module"}})()});return n.declare=r,e.flags&Jc.GlobalAugmentation&&(n.global=!0),this.fixExports(e,n)}case B.ParenthesizedType:return this.convertChild(e.type);case B.UnionType:return this.createNode(e,{type:H.TSUnionType,types:this.convertChildren(e.types)});case B.IntersectionType:return this.createNode(e,{type:H.TSIntersectionType,types:this.convertChildren(e.types)});case B.AsExpression:return this.createNode(e,{type:H.TSAsExpression,expression:this.convertChild(e.expression),typeAnnotation:this.convertChild(e.type)});case B.InferType:return this.createNode(e,{type:H.TSInferType,typeParameter:this.convertChild(e.typeParameter)});case B.LiteralType:return e.literal.kind===B.NullKeyword?this.createNode(e.literal,{type:H.TSNullKeyword}):this.createNode(e,{type:H.TSLiteralType,literal:this.convertChild(e.literal)});case B.TypeAssertionExpression:return this.createNode(e,{type:H.TSTypeAssertion,expression:this.convertChild(e.expression),typeAnnotation:this.convertChild(e.type)});case B.ImportEqualsDeclaration:return this.fixExports(e,this.createNode(e,{type:H.TSImportEqualsDeclaration,id:this.convertChild(e.name),importKind:e.isTypeOnly?"type":"value",moduleReference:this.convertChild(e.moduleReference)}));case B.ExternalModuleReference:return e.expression.kind!==B.StringLiteral&&this.#e(e.expression,"String literal expected."),this.createNode(e,{type:H.TSExternalModuleReference,expression:this.convertChild(e.expression)});case B.NamespaceExportDeclaration:return this.createNode(e,{type:H.TSNamespaceExportDeclaration,id:this.convertChild(e.name)});case B.AbstractKeyword:return this.createNode(e,{type:H.TSAbstractKeyword});case B.TupleType:{let r=this.convertChildren(e.elements);return this.createNode(e,{type:H.TSTupleType,elementTypes:r})}case B.NamedTupleMember:{let r=this.createNode(e,{type:H.TSNamedTupleMember,elementType:this.convertChild(e.type,e),label:this.convertChild(e.name,e),optional:e.questionToken!=null});return e.dotDotDotToken?(r.range[0]=r.label.range[0],r.loc.start=r.label.loc.start,this.createNode(e,{type:H.TSRestType,typeAnnotation:r})):r}case B.OptionalType:return this.createNode(e,{type:H.TSOptionalType,typeAnnotation:this.convertChild(e.type)});case B.RestType:return this.createNode(e,{type:H.TSRestType,typeAnnotation:this.convertChild(e.type)});case B.TemplateLiteralType:{let r=this.createNode(e,{type:H.TSTemplateLiteralType,quasis:[this.convertChild(e.head)],types:[]});return e.templateSpans.forEach(n=>{r.types.push(this.convertChild(n.type)),r.quasis.push(this.convertChild(n.literal))}),r}case B.ClassStaticBlockDeclaration:return this.createNode(e,{type:H.StaticBlock,body:this.convertBodyExpressions(e.body.statements,e)});case B.AssertEntry:case B.ImportAttribute:return this.createNode(e,{type:H.ImportAttribute,key:this.convertChild(e.name),value:this.convertChild(e.value)});case B.SatisfiesExpression:return this.createNode(e,{type:H.TSSatisfiesExpression,expression:this.convertChild(e.expression),typeAnnotation:this.convertChild(e.type)});default:return this.deeplyCopy(e)}}createNode(e,t){let r=t;return r.range??(r.range=a1(e,this.ast)),r.loc??(r.loc=Mg(r.range,this.ast)),r&&this.options.shouldPreserveNodeMaps&&this.esTreeNodeToTSNodeMap.set(r,e),r}convertProgram(){return this.converter(this.ast)}deeplyCopy(e){e.kind===Qt.JSDocFunctionType&&this.#e(e,"JSDoc types can only be used inside documentation comments.");let t=`TS${B[e.kind]}`;if(this.options.errorOnUnknownASTType&&!H[t])throw new Error(`Unknown AST_NODE_TYPE: "${t}"`);let r=this.createNode(e,{type:t});"type"in e&&(r.typeAnnotation=e.type&&"kind"in e.type&&btt(e.type)?this.convertTypeAnnotation(e.type,e):null),"typeArguments"in e&&(r.typeArguments=e.typeArguments&&"pos"in e.typeArguments?this.convertTypeArgumentsToTypeParameterInstantiation(e.typeArguments,e):null),"typeParameters"in e&&(r.typeParameters=e.typeParameters&&"pos"in e.typeParameters?this.convertTSTypeParametersToTypeParametersDeclaration(e.typeParameters):null);let n=d1(e);n?.length&&(r.decorators=this.convertChildren(n));let o=new Set(["_children","decorators","end","flags","heritageClauses","illegalDecorators","jsDoc","kind","locals","localSymbol","modifierFlagsCache","modifiers","nextContainer","parent","pos","symbol","transformFlags","type","typeArguments","typeParameters"]);return Object.entries(e).filter(([i])=>!o.has(i)).forEach(([i,a])=>{Array.isArray(a)?r[i]=this.convertChildren(a):a&&typeof a=="object"&&a.kind?r[i]=this.convertChild(a):r[i]=a}),r}fixExports(e,t){let r=XD(e)&&!b1(e.name)?Vit(e):md(e);if(r?.[0].kind===B.ExportKeyword){this.registerTSNodeInNodeMap(e,t);let n=r[0],o=r[1],i=o?.kind===B.DefaultKeyword,a=i?Bu(o,this.ast,this.ast):Bu(n,this.ast,this.ast);if(t.range[0]=a.getStart(this.ast),t.loc=Mg(t.range,this.ast),i)return this.createNode(e,{type:H.ExportDefaultDeclaration,range:[n.getStart(this.ast),t.range[1]],declaration:t,exportKind:"value"});let s=t.type===H.TSInterfaceDeclaration||t.type===H.TSTypeAliasDeclaration,c="declare"in t&&t.declare;return this.createNode(e,this.#n({type:H.ExportNamedDeclaration,range:[n.getStart(this.ast),t.range[1]],attributes:[],declaration:t,exportKind:s||c?"type":"value",source:null,specifiers:[]},"assertions","attributes",!0))}return t}getASTMaps(){return{esTreeNodeToTSNodeMap:this.esTreeNodeToTSNodeMap,tsNodeToESTreeNodeMap:this.tsNodeToESTreeNodeMap}}registerTSNodeInNodeMap(e,t){t&&this.options.shouldPreserveNodeMaps&&!this.tsNodeToESTreeNodeMap.has(e)&&this.tsNodeToESTreeNodeMap.set(e,t)}};function oat(e,t,r=e.getSourceFile()){let n=[];for(;;){if(Ahe(e.kind))t(e);else{let o=e.getChildren(r);if(o.length===1){e=o[0];continue}for(let i=o.length-1;i>=0;--i)n.push(o[i])}if(n.length===0)break;e=n.pop()}}function iat(e,t,r=e.getSourceFile()){let n=r.text,o=r.languageVariant!==Yme.JSX;return oat(e,a=>{if(a.pos!==a.end&&(a.kind!==Qt.JsxText&&ket(n,a.pos===0?(ghe(n)??"").length:a.pos,i),o||aat(a)))return Cet(n,a.end,i)},r);function i(a,s,c){t(n,{end:s,kind:c,pos:a})}}function aat(e){switch(e.kind){case Qt.CloseBraceToken:return e.parent.kind!==Qt.JsxExpression||!Uz(e.parent.parent);case Qt.GreaterThanToken:switch(e.parent.kind){case Qt.JsxClosingElement:case Qt.JsxClosingFragment:return!Uz(e.parent.parent.parent);case Qt.JsxOpeningElement:return e.end!==e.parent.end;case Qt.JsxOpeningFragment:return!1;case Qt.JsxSelfClosingElement:return e.end!==e.parent.end||!Uz(e.parent.parent)}}return!0}function Uz(e){return e.kind===Qt.JsxElement||e.kind===Qt.JsxFragment}var[qjt,Ujt]=DYe.split(".").map(e=>Number.parseInt(e,10)),zjt=cs.Intrinsic??cs.Any|cs.Unknown|cs.String|cs.Number|cs.BigInt|cs.Boolean|cs.BooleanLiteral|cs.ESSymbol|cs.Void|cs.Undefined|cs.Null|cs.Never|cs.NonPrimitive;function sat(e,t){let r=[];return iat(e,(n,o)=>{let i=o.kind===Qt.SingleLineCommentTrivia?ma.Line:ma.Block,a=[o.pos,o.end],s=Mg(a,e),c=a[0]+2,p=o.kind===Qt.SingleLineCommentTrivia?a[1]:a[1]-2;r.push({type:i,loc:s,range:a,value:t.slice(c,p)})},e),r}var cat=()=>{};function lat(e,t,r){let{parseDiagnostics:n}=e;if(n.length)throw tat(n[0]);let o=new nat(e,{allowInvalidAST:t.allowInvalidAST,errorOnUnknownASTType:t.errorOnUnknownASTType,shouldPreserveNodeMaps:r,suppressDeprecatedPropertyWarnings:t.suppressDeprecatedPropertyWarnings}),i=o.convertProgram();return(!t.range||!t.loc)&&cat(i,{enter:a=>{t.range||delete a.range,t.loc||delete a.loc}}),t.tokens&&(i.tokens=jit(e)),t.comment&&(i.comments=sat(e,t.codeFullText)),{astMaps:o.getASTMaps(),estree:i}}function $ye(e){if(typeof e!="object"||e==null)return!1;let t=e;return t.kind===Qt.SourceFile&&typeof t.getFullText=="function"}var uat=function(e){return e&&e.__esModule?e:{default:e}},pat=uat({extname:e=>"."+e.split(".").pop()});function dat(e,t){switch(pat.default.extname(e).toLowerCase()){case jl.Cjs:case jl.Js:case jl.Mjs:return X_.JS;case jl.Cts:case jl.Mts:case jl.Ts:return X_.TS;case jl.Json:return X_.JSON;case jl.Jsx:return X_.JSX;case jl.Tsx:return X_.TSX;default:return t?X_.TSX:X_.TS}}var _at={default:fJ},fat=(0,_at.default)("typescript-eslint:typescript-estree:create-program:createSourceFile");function mat(e){return fat("Getting AST without type information in %s mode for: %s",e.jsx?"TSX":"TS",e.filePath),$ye(e.code)?e.code:Kot(e.filePath,e.codeFullText,{jsDocParsingMode:e.jsDocParsingMode,languageVersion:bJ.Latest,setExternalModuleIndicator:e.setExternalModuleIndicator},!0,dat(e.filePath,e.jsx))}var hat=e=>e,yat=()=>{},gat=class{},Sat=()=>!1,vat=()=>{},bat=function(e){return e&&e.__esModule?e:{default:e}},xat={},pJ={default:fJ},Eat=bat({extname:e=>"."+e.split(".").pop()}),Tat=(0,pJ.default)("typescript-eslint:typescript-estree:parseSettings:createParseSettings"),Lme,zz=null,ND={ParseAll:$D?.ParseAll,ParseForTypeErrors:$D?.ParseForTypeErrors,ParseForTypeInfo:$D?.ParseForTypeInfo,ParseNone:$D?.ParseNone};function Dat(e,t={}){let r=Aat(e),n=Sat(t),o,i=typeof t.loggerFn=="function",a=hat(typeof t.filePath=="string"&&t.filePath!==""?t.filePath:Iat(t.jsx),o),s=Eat.default.extname(a).toLowerCase(),c=(()=>{switch(t.jsDocParsingMode){case"all":return ND.ParseAll;case"none":return ND.ParseNone;case"type-info":return ND.ParseForTypeInfo;default:return ND.ParseAll}})(),p={loc:t.loc===!0,range:t.range===!0,allowInvalidAST:t.allowInvalidAST===!0,code:e,codeFullText:r,comment:t.comment===!0,comments:[],debugLevel:t.debugLevel===!0?new Set(["typescript-eslint"]):Array.isArray(t.debugLevel)?new Set(t.debugLevel):new Set,errorOnTypeScriptSyntacticAndSemanticIssues:!1,errorOnUnknownASTType:t.errorOnUnknownASTType===!0,extraFileExtensions:Array.isArray(t.extraFileExtensions)&&t.extraFileExtensions.every(d=>typeof d=="string")?t.extraFileExtensions:[],filePath:a,jsDocParsingMode:c,jsx:t.jsx===!0,log:typeof t.loggerFn=="function"?t.loggerFn:t.loggerFn===!1?()=>{}:console.log,preserveNodeMaps:t.preserveNodeMaps!==!1,programs:Array.isArray(t.programs)?t.programs:null,projects:new Map,projectService:t.projectService||t.project&&t.projectService!==!1&&(void 0).env.TYPESCRIPT_ESLINT_PROJECT_SERVICE==="true"?wat(t.projectService,{jsDocParsingMode:c,tsconfigRootDir:o}):void 0,setExternalModuleIndicator:t.sourceType==="module"||t.sourceType==null&&s===jl.Mjs||t.sourceType==null&&s===jl.Mts?d=>{d.externalModuleIndicator=!0}:void 0,singleRun:n,suppressDeprecatedPropertyWarnings:t.suppressDeprecatedPropertyWarnings??!0,tokens:t.tokens===!0?[]:null,tsconfigMatchCache:Lme??(Lme=new gat(n?"Infinity":t.cacheLifetime?.glob??void 0)),tsconfigRootDir:o};if(p.projectService&&t.project&&(void 0).env.TYPESCRIPT_ESLINT_IGNORE_PROJECT_AND_PROJECT_SERVICE_ERROR!=="true")throw new Error('Enabling "project" does nothing when "projectService" is enabled. You can remove the "project" setting.');if(p.debugLevel.size>0){let d=[];p.debugLevel.has("typescript-eslint")&&d.push("typescript-eslint:*"),(p.debugLevel.has("eslint")||pJ.default.enabled("eslint:*,-eslint:code-path"))&&d.push("eslint:*,-eslint:code-path"),pJ.default.enable(d.join(","))}if(Array.isArray(t.programs)){if(!t.programs.length)throw new Error("You have set parserOptions.programs to an empty array. This will cause all files to not be found in existing programs. Either provide one or more existing TypeScript Program instances in the array, or remove the parserOptions.programs setting.");Tat("parserOptions.programs was provided, so parserOptions.project will be ignored.")}return!p.programs&&!p.projectService&&(p.projects=new Map),t.jsDocParsingMode==null&&p.projects.size===0&&p.programs==null&&p.projectService==null&&(p.jsDocParsingMode=ND.ParseNone),vat(p,i),p}function Aat(e){return $ye(e)?e.getFullText(e):typeof e=="string"?e:String(e)}function Iat(e){return e?"estree.tsx":"estree.ts"}function wat(e,t){let r=typeof e=="object"?e:{};return yat(r.allowDefaultProject),zz??(zz=(0,xat.createProjectService)({options:r,...t})),zz}var kat={default:fJ},Jjt=(0,kat.default)("typescript-eslint:typescript-estree:parser");function Cat(e,t){let{ast:r}=Pat(e,t,!1);return r}function Pat(e,t,r){let n=Dat(e,t);if(t?.errorOnTypeScriptSyntacticAndSemanticIssues)throw new Error('"errorOnTypeScriptSyntacticAndSemanticIssues" is only supported for parseAndGenerateServices()');let o=mat(n),{astMaps:i,estree:a}=lat(o,n,r);return{ast:a,esTreeNodeToTSNodeMap:i.esTreeNodeToTSNodeMap,tsNodeToESTreeNodeMap:i.tsNodeToESTreeNodeMap}}function Oat(e,t){let r=new SyntaxError(e+" ("+t.loc.start.line+":"+t.loc.start.column+")");return Object.assign(r,t)}var Nat=Oat;function Fat(e){let t=[];for(let r of e)try{return r()}catch(n){t.push(n)}throw Object.assign(new Error("All combinations failed"),{errors:t})}var Rat=Array.prototype.findLast??function(e){for(let t=this.length-1;t>=0;t--){let r=this[t];if(e(r,t,this))return r}},Lat=mJ("findLast",function(){if(Array.isArray(this))return Rat}),$at=Lat;function Mat(e){return this[e<0?this.length+e:e]}var jat=mJ("at",function(){if(Array.isArray(this)||typeof this=="string")return Mat}),Bat=jat;function tf(e){let t=e.range?.[0]??e.start,r=(e.declaration?.decorators??e.decorators)?.[0];return r?Math.min(tf(r),t):t}function _d(e){return e.range?.[1]??e.end}function qat(e){let t=new Set(e);return r=>t.has(r?.type)}var WJ=qat,Uat=WJ(["Block","CommentBlock","MultiLine"]),QJ=Uat,zat=WJ(["Line","CommentLine","SingleLine","HashbangComment","HTMLOpen","HTMLClose","Hashbang","InterpreterDirective"]),Jat=zat,Jz=new WeakMap;function Vat(e){return Jz.has(e)||Jz.set(e,QJ(e)&&e.value[0]==="*"&&/@(?:type|satisfies)\b/u.test(e.value)),Jz.get(e)}var Kat=Vat;function Gat(e){if(!QJ(e))return!1;let t=`*${e.value}*`.split(` +`);return t.length>1&&t.every(r=>r.trimStart()[0]==="*")}var Vz=new WeakMap;function Hat(e){return Vz.has(e)||Vz.set(e,Gat(e)),Vz.get(e)}var $me=Hat;function Zat(e){if(e.length<2)return;let t;for(let r=e.length-1;r>=0;r--){let n=e[r];if(t&&_d(n)===tf(t)&&$me(n)&&$me(t)&&(e.splice(r+1,1),n.value+="*//*"+t.value,n.range=[tf(n),_d(t)]),!Jat(n)&&!QJ(n))throw new TypeError(`Unknown comment type: "${n.type}".`);t=n}}var Wat=Zat;function Qat(e){return e!==null&&typeof e=="object"}var Xat=Qat,FD=null;function JD(e){if(FD!==null&&typeof FD.property){let t=FD;return FD=JD.prototype=null,t}return FD=JD.prototype=e??Object.create(null),new JD}var Yat=10;for(let e=0;e<=Yat;e++)JD();function est(e){return JD(e)}function tst(e,t="type"){est(e);function r(n){let o=n[t],i=e[o];if(!Array.isArray(i))throw Object.assign(new Error(`Missing visitor keys for '${o}'.`),{node:n});return i}return r}var rst=tst,V=[["decorators","key","typeAnnotation","value"],[],["elementType"],["expression"],["expression","typeAnnotation"],["left","right"],["argument"],["directives","body"],["label"],["callee","typeArguments","arguments"],["body"],["decorators","id","typeParameters","superClass","superTypeArguments","mixins","implements","body","superTypeParameters"],["id","typeParameters"],["decorators","key","typeParameters","params","returnType","body"],["decorators","variance","key","typeAnnotation","value"],["name","typeAnnotation"],["test","consequent","alternate"],["checkType","extendsType","trueType","falseType"],["value"],["id","body"],["declaration","specifiers","source","attributes"],["id"],["id","typeParameters","extends","body"],["typeAnnotation"],["id","typeParameters","right"],["body","test"],["members"],["id","init"],["exported"],["left","right","body"],["id","typeParameters","params","predicate","returnType","body"],["id","params","body","typeParameters","returnType"],["key","value"],["local"],["objectType","indexType"],["typeParameter"],["types"],["node"],["object","property"],["argument","cases"],["pattern","body","guard"],["literal"],["decorators","key","value"],["expressions"],["qualification","id"],["decorators","key","typeAnnotation"],["typeParameters","params","returnType"],["expression","typeArguments"],["params"],["parameterName","typeAnnotation"]],nst={AccessorProperty:V[0],AnyTypeAnnotation:V[1],ArgumentPlaceholder:V[1],ArrayExpression:["elements"],ArrayPattern:["elements","typeAnnotation","decorators"],ArrayTypeAnnotation:V[2],ArrowFunctionExpression:["typeParameters","params","predicate","returnType","body"],AsConstExpression:V[3],AsExpression:V[4],AssignmentExpression:V[5],AssignmentPattern:["left","right","decorators","typeAnnotation"],AwaitExpression:V[6],BigIntLiteral:V[1],BigIntLiteralTypeAnnotation:V[1],BigIntTypeAnnotation:V[1],BinaryExpression:V[5],BindExpression:["object","callee"],BlockStatement:V[7],BooleanLiteral:V[1],BooleanLiteralTypeAnnotation:V[1],BooleanTypeAnnotation:V[1],BreakStatement:V[8],CallExpression:V[9],CatchClause:["param","body"],ChainExpression:V[3],ClassAccessorProperty:V[0],ClassBody:V[10],ClassDeclaration:V[11],ClassExpression:V[11],ClassImplements:V[12],ClassMethod:V[13],ClassPrivateMethod:V[13],ClassPrivateProperty:V[14],ClassProperty:V[14],ComponentDeclaration:["id","params","body","typeParameters","rendersType"],ComponentParameter:["name","local"],ComponentTypeAnnotation:["params","rest","typeParameters","rendersType"],ComponentTypeParameter:V[15],ConditionalExpression:V[16],ConditionalTypeAnnotation:V[17],ContinueStatement:V[8],DebuggerStatement:V[1],DeclareClass:["id","typeParameters","extends","mixins","implements","body"],DeclareComponent:["id","params","rest","typeParameters","rendersType"],DeclaredPredicate:V[18],DeclareEnum:V[19],DeclareExportAllDeclaration:["source","attributes"],DeclareExportDeclaration:V[20],DeclareFunction:["id","predicate"],DeclareHook:V[21],DeclareInterface:V[22],DeclareModule:V[19],DeclareModuleExports:V[23],DeclareNamespace:V[19],DeclareOpaqueType:["id","typeParameters","supertype","lowerBound","upperBound"],DeclareTypeAlias:V[24],DeclareVariable:V[21],Decorator:V[3],Directive:V[18],DirectiveLiteral:V[1],DoExpression:V[10],DoWhileStatement:V[25],EmptyStatement:V[1],EmptyTypeAnnotation:V[1],EnumBigIntBody:V[26],EnumBigIntMember:V[27],EnumBooleanBody:V[26],EnumBooleanMember:V[27],EnumDeclaration:V[19],EnumDefaultedMember:V[21],EnumNumberBody:V[26],EnumNumberMember:V[27],EnumStringBody:V[26],EnumStringMember:V[27],EnumSymbolBody:V[26],ExistsTypeAnnotation:V[1],ExperimentalRestProperty:V[6],ExperimentalSpreadProperty:V[6],ExportAllDeclaration:["source","attributes","exported"],ExportDefaultDeclaration:["declaration"],ExportDefaultSpecifier:V[28],ExportNamedDeclaration:V[20],ExportNamespaceSpecifier:V[28],ExportSpecifier:["local","exported"],ExpressionStatement:V[3],File:["program"],ForInStatement:V[29],ForOfStatement:V[29],ForStatement:["init","test","update","body"],FunctionDeclaration:V[30],FunctionExpression:V[30],FunctionTypeAnnotation:["typeParameters","this","params","rest","returnType"],FunctionTypeParam:V[15],GenericTypeAnnotation:V[12],HookDeclaration:V[31],HookTypeAnnotation:["params","returnType","rest","typeParameters"],Identifier:["typeAnnotation","decorators"],IfStatement:V[16],ImportAttribute:V[32],ImportDeclaration:["specifiers","source","attributes"],ImportDefaultSpecifier:V[33],ImportExpression:["source","options"],ImportNamespaceSpecifier:V[33],ImportSpecifier:["imported","local"],IndexedAccessType:V[34],InferredPredicate:V[1],InferTypeAnnotation:V[35],InterfaceDeclaration:V[22],InterfaceExtends:V[12],InterfaceTypeAnnotation:["extends","body"],InterpreterDirective:V[1],IntersectionTypeAnnotation:V[36],JsExpressionRoot:V[37],JsonRoot:V[37],JSXAttribute:["name","value"],JSXClosingElement:["name"],JSXClosingFragment:V[1],JSXElement:["openingElement","children","closingElement"],JSXEmptyExpression:V[1],JSXExpressionContainer:V[3],JSXFragment:["openingFragment","children","closingFragment"],JSXIdentifier:V[1],JSXMemberExpression:V[38],JSXNamespacedName:["namespace","name"],JSXOpeningElement:["name","typeArguments","attributes"],JSXOpeningFragment:V[1],JSXSpreadAttribute:V[6],JSXSpreadChild:V[3],JSXText:V[1],KeyofTypeAnnotation:V[6],LabeledStatement:["label","body"],Literal:V[1],LogicalExpression:V[5],MatchArrayPattern:["elements","rest"],MatchAsPattern:["pattern","target"],MatchBindingPattern:V[21],MatchExpression:V[39],MatchExpressionCase:V[40],MatchIdentifierPattern:V[21],MatchLiteralPattern:V[41],MatchMemberPattern:["base","property"],MatchObjectPattern:["properties","rest"],MatchObjectPatternProperty:["key","pattern"],MatchOrPattern:["patterns"],MatchRestPattern:V[6],MatchStatement:V[39],MatchStatementCase:V[40],MatchUnaryPattern:V[6],MatchWildcardPattern:V[1],MemberExpression:V[38],MetaProperty:["meta","property"],MethodDefinition:V[42],MixedTypeAnnotation:V[1],ModuleExpression:V[10],NeverTypeAnnotation:V[1],NewExpression:V[9],NGChainedExpression:V[43],NGEmptyExpression:V[1],NGMicrosyntax:V[10],NGMicrosyntaxAs:["key","alias"],NGMicrosyntaxExpression:["expression","alias"],NGMicrosyntaxKey:V[1],NGMicrosyntaxKeyedExpression:["key","expression"],NGMicrosyntaxLet:V[32],NGPipeExpression:["left","right","arguments"],NGRoot:V[37],NullableTypeAnnotation:V[23],NullLiteral:V[1],NullLiteralTypeAnnotation:V[1],NumberLiteralTypeAnnotation:V[1],NumberTypeAnnotation:V[1],NumericLiteral:V[1],ObjectExpression:["properties"],ObjectMethod:V[13],ObjectPattern:["decorators","properties","typeAnnotation"],ObjectProperty:V[42],ObjectTypeAnnotation:["properties","indexers","callProperties","internalSlots"],ObjectTypeCallProperty:V[18],ObjectTypeIndexer:["variance","id","key","value"],ObjectTypeInternalSlot:["id","value"],ObjectTypeMappedTypeProperty:["keyTparam","propType","sourceType","variance"],ObjectTypeProperty:["key","value","variance"],ObjectTypeSpreadProperty:V[6],OpaqueType:["id","typeParameters","supertype","impltype","lowerBound","upperBound"],OptionalCallExpression:V[9],OptionalIndexedAccessType:V[34],OptionalMemberExpression:V[38],ParenthesizedExpression:V[3],PipelineBareFunction:["callee"],PipelinePrimaryTopicReference:V[1],PipelineTopicExpression:V[3],Placeholder:V[1],PrivateIdentifier:V[1],PrivateName:V[21],Program:V[7],Property:V[32],PropertyDefinition:V[14],QualifiedTypeIdentifier:V[44],QualifiedTypeofIdentifier:V[44],RegExpLiteral:V[1],RestElement:["argument","typeAnnotation","decorators"],ReturnStatement:V[6],SatisfiesExpression:V[4],SequenceExpression:V[43],SpreadElement:V[6],StaticBlock:V[10],StringLiteral:V[1],StringLiteralTypeAnnotation:V[1],StringTypeAnnotation:V[1],Super:V[1],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],SymbolTypeAnnotation:V[1],TaggedTemplateExpression:["tag","typeArguments","quasi"],TemplateElement:V[1],TemplateLiteral:["quasis","expressions"],ThisExpression:V[1],ThisTypeAnnotation:V[1],ThrowStatement:V[6],TopicReference:V[1],TryStatement:["block","handler","finalizer"],TSAbstractAccessorProperty:V[45],TSAbstractKeyword:V[1],TSAbstractMethodDefinition:V[32],TSAbstractPropertyDefinition:V[45],TSAnyKeyword:V[1],TSArrayType:V[2],TSAsExpression:V[4],TSAsyncKeyword:V[1],TSBigIntKeyword:V[1],TSBooleanKeyword:V[1],TSCallSignatureDeclaration:V[46],TSClassImplements:V[47],TSConditionalType:V[17],TSConstructorType:V[46],TSConstructSignatureDeclaration:V[46],TSDeclareFunction:V[31],TSDeclareKeyword:V[1],TSDeclareMethod:["decorators","key","typeParameters","params","returnType"],TSEmptyBodyFunctionExpression:["id","typeParameters","params","returnType"],TSEnumBody:V[26],TSEnumDeclaration:V[19],TSEnumMember:["id","initializer"],TSExportAssignment:V[3],TSExportKeyword:V[1],TSExternalModuleReference:V[3],TSFunctionType:V[46],TSImportEqualsDeclaration:["id","moduleReference"],TSImportType:["options","qualifier","typeArguments","source"],TSIndexedAccessType:V[34],TSIndexSignature:["parameters","typeAnnotation"],TSInferType:V[35],TSInstantiationExpression:V[47],TSInterfaceBody:V[10],TSInterfaceDeclaration:V[22],TSInterfaceHeritage:V[47],TSIntersectionType:V[36],TSIntrinsicKeyword:V[1],TSJSDocAllType:V[1],TSJSDocNonNullableType:V[23],TSJSDocNullableType:V[23],TSJSDocUnknownType:V[1],TSLiteralType:V[41],TSMappedType:["key","constraint","nameType","typeAnnotation"],TSMethodSignature:["key","typeParameters","params","returnType"],TSModuleBlock:V[10],TSModuleDeclaration:V[19],TSNamedTupleMember:["label","elementType"],TSNamespaceExportDeclaration:V[21],TSNeverKeyword:V[1],TSNonNullExpression:V[3],TSNullKeyword:V[1],TSNumberKeyword:V[1],TSObjectKeyword:V[1],TSOptionalType:V[23],TSParameterProperty:["parameter","decorators"],TSParenthesizedType:V[23],TSPrivateKeyword:V[1],TSPropertySignature:["key","typeAnnotation"],TSProtectedKeyword:V[1],TSPublicKeyword:V[1],TSQualifiedName:V[5],TSReadonlyKeyword:V[1],TSRestType:V[23],TSSatisfiesExpression:V[4],TSStaticKeyword:V[1],TSStringKeyword:V[1],TSSymbolKeyword:V[1],TSTemplateLiteralType:["quasis","types"],TSThisType:V[1],TSTupleType:["elementTypes"],TSTypeAliasDeclaration:["id","typeParameters","typeAnnotation"],TSTypeAnnotation:V[23],TSTypeAssertion:V[4],TSTypeLiteral:V[26],TSTypeOperator:V[23],TSTypeParameter:["name","constraint","default"],TSTypeParameterDeclaration:V[48],TSTypeParameterInstantiation:V[48],TSTypePredicate:V[49],TSTypeQuery:["exprName","typeArguments"],TSTypeReference:["typeName","typeArguments"],TSUndefinedKeyword:V[1],TSUnionType:V[36],TSUnknownKeyword:V[1],TSVoidKeyword:V[1],TupleTypeAnnotation:["types","elementTypes"],TupleTypeLabeledElement:["label","elementType","variance"],TupleTypeSpreadElement:["label","typeAnnotation"],TypeAlias:V[24],TypeAnnotation:V[23],TypeCastExpression:V[4],TypeofTypeAnnotation:["argument","typeArguments"],TypeOperator:V[23],TypeParameter:["bound","default","variance"],TypeParameterDeclaration:V[48],TypeParameterInstantiation:V[48],TypePredicate:V[49],UnaryExpression:V[6],UndefinedTypeAnnotation:V[1],UnionTypeAnnotation:V[36],UnknownTypeAnnotation:V[1],UpdateExpression:V[6],V8IntrinsicIdentifier:V[1],VariableDeclaration:["declarations"],VariableDeclarator:V[27],Variance:V[1],VoidPattern:V[1],VoidTypeAnnotation:V[1],WhileStatement:V[25],WithStatement:["object","body"],YieldExpression:V[6]},ost=rst(nst),ist=ost;function _O(e,t){if(!Xat(e))return e;if(Array.isArray(e)){for(let n=0;ny<=d);f=m&&n.slice(m,d).trim().length===0}return f?void 0:(p.extra={...p.extra,parenthesized:!0},p)}case"TemplateLiteral":if(c.expressions.length!==c.quasis.length-1)throw new Error("Malformed template literal.");break;case"TemplateElement":if(r==="flow"||r==="hermes"||r==="espree"||r==="typescript"||i){let p=tf(c)+1,d=_d(c)-(c.tail?1:2);c.range=[p,d]}break;case"VariableDeclaration":{let p=Bat(0,c.declarations,-1);p?.init&&n[_d(p)]!==";"&&(c.range=[tf(c),_d(p)]);break}case"TSParenthesizedType":return c.typeAnnotation;case"TopicReference":e.extra={...e.extra,__isUsingHackPipeline:!0};break;case"TSUnionType":case"TSIntersectionType":if(c.types.length===1)return c.types[0];break;case"ImportExpression":r==="hermes"&&c.attributes&&!c.options&&(c.options=c.attributes);break}},onLeave(c){switch(c.type){case"LogicalExpression":if(Mye(c))return dJ(c);break;case"TSImportType":!c.source&&c.argument.type==="TSLiteralType"&&(c.source=c.argument.literal,delete c.argument);break}}}),e}function Mye(e){return e.type==="LogicalExpression"&&e.right.type==="LogicalExpression"&&e.operator===e.right.operator}function dJ(e){return Mye(e)?dJ({type:"LogicalExpression",operator:e.operator,left:dJ({type:"LogicalExpression",operator:e.operator,left:e.left,right:e.right.left,range:[tf(e.left),_d(e.right.left)]}),right:e.right.right,range:[tf(e),_d(e)]}):e}var cst=sst,lst=/\*\/$/,ust=/^\/\*\*?/,pst=/^\s*(\/\*\*?(.|\r?\n)*?\*\/)/,dst=/(^|\s+)\/\/([^\n\r]*)/g,Mme=/^(\r?\n)+/,_st=/(?:^|\r?\n) *(@[^\n\r]*?) *\r?\n *(?![^\n\r@]*\/\/[^]*)([^\s@][^\n\r@]+?) *\r?\n/g,jme=/(?:^|\r?\n) *@(\S+) *([^\n\r]*)/g,fst=/(\r?\n|^) *\* ?/g,mst=[];function hst(e){let t=e.match(pst);return t?t[0].trimStart():""}function yst(e){e=_1(0,e.replace(ust,"").replace(lst,""),fst,"$1");let t="";for(;t!==e;)t=e,e=_1(0,e,_st,` +$1 $2 +`);e=e.replace(Mme,"").trimEnd();let r=Object.create(null),n=_1(0,e,jme,"").replace(Mme,"").trimEnd(),o;for(;o=jme.exec(e);){let i=_1(0,o[2],dst,"");if(typeof r[o[1]]=="string"||Array.isArray(r[o[1]])){let a=r[o[1]];r[o[1]]=[...mst,...Array.isArray(a)?a:[a],i]}else r[o[1]]=i}return{comments:n,pragmas:r}}var gst=["noformat","noprettier"],Sst=["format","prettier"];function vst(e){if(!e.startsWith("#!"))return"";let t=e.indexOf(` +`);return t===-1?e:e.slice(0,t)}var bst=vst;function jye(e){let t=bst(e);t&&(e=e.slice(t.length+1));let r=hst(e),{pragmas:n,comments:o}=yst(r);return{shebang:t,text:e,pragmas:n,comments:o}}function xst(e){let{pragmas:t}=jye(e);return Sst.some(r=>Object.prototype.hasOwnProperty.call(t,r))}function Est(e){let{pragmas:t}=jye(e);return gst.some(r=>Object.prototype.hasOwnProperty.call(t,r))}function Tst(e){return e=typeof e=="function"?{parse:e}:e,{astFormat:"estree",hasPragma:xst,hasIgnorePragma:Est,locStart:tf,locEnd:_d,...e}}var Dst=Tst,Ast=/^[^"'`]*<\/|^[^/]{2}.*\/>/mu;function Ist(e){return e.charAt(0)==="#"&&e.charAt(1)==="!"?"//"+e.slice(2):e}var wst=Ist,Bye="module",qye="commonjs",kst=[Bye,qye];function Cst(e){if(typeof e=="string"){if(e=e.toLowerCase(),/\.(?:mjs|mts)$/iu.test(e))return Bye;if(/\.(?:cjs|cts)$/iu.test(e))return qye}}var Pst={loc:!0,range:!0,comment:!0,tokens:!1,loggerFn:!1,project:!1,jsDocParsingMode:"none",suppressDeprecatedPropertyWarnings:!0};function Ost(e){let{message:t,location:r}=e;if(!r)return e;let{start:n,end:o}=r;return Nat(t,{loc:{start:{line:n.line,column:n.column+1},end:{line:o.line,column:o.column+1}},cause:e})}var Nst=e=>e&&/\.(?:js|mjs|cjs|jsx|ts|mts|cts|tsx)$/iu.test(e);function Fst(e,t){let r=[{...Pst,filePath:t}],n=Cst(t);if(n?r=r.map(i=>({...i,sourceType:n})):r=kst.flatMap(i=>r.map(a=>({...a,sourceType:i}))),Nst(t))return r;let o=Ast.test(e);return[o,!o].flatMap(i=>r.map(a=>({...a,jsx:i})))}function Rst(e,t){let r=t?.filepath;typeof r!="string"&&(r=void 0);let n=wst(e),o=Fst(e,r),i;try{i=Fat(o.map(a=>()=>Cat(n,a)))}catch({errors:[a]}){throw Ost(a)}return cst(i,{parser:"typescript",text:e})}var Lst=Dst(Rst);var $st=[aU,XU,_J],Uye=new Map;function Mst(e,t){return`${t}::${e.length}::${e}`}async function rA(e,t){let r=Mst(e,t),n=Uye.get(r);if(n)return n;try{let o=e,i=!1;t==="typescript"&&(o=`type __T = ${e}`,i=!0);let s=(await S3(o,{parser:t==="typescript-module"?"typescript":t,plugins:$st,printWidth:60,tabWidth:2,semi:!0,singleQuote:!1,trailingComma:"all"})).trimEnd();return i&&(s=s.replace(/^type __T =\s*/,"").replace(/;$/,"").trimEnd()),Uye.set(r,s),s}catch{return e}}import*as wO from"effect/Context";import*as uh from"effect/Effect";import*as zye from"effect/Layer";import*as Jye from"effect/Option";var Rs=class extends wO.Tag("#runtime/RuntimeLocalScopeService")(){},XJ=e=>zye.succeed(Rs,e),ph=(e,t)=>t==null?e:e.pipe(uh.provide(XJ(t))),dh=()=>uh.contextWith(e=>wO.getOption(e,Rs)).pipe(uh.map(e=>Jye.isSome(e)?e.value:null)),D1=e=>uh.gen(function*(){let t=yield*dh();return t===null?yield*new r3({message:"Runtime local scope is unavailable"}):e!==void 0&&t.installation.scopeId!==e?yield*new Cv({message:`Scope ${e} is not the active local scope ${t.installation.scopeId}`,requestedScopeId:e,activeScopeId:t.installation.scopeId}):t});import*as nA from"effect/Context";import*as _h from"effect/Layer";var Vg=class extends nA.Tag("#runtime/InstallationStore")(){},Kc=class extends nA.Tag("#runtime/ScopeConfigStore")(){},$a=class extends nA.Tag("#runtime/ScopeStateStore")(){},Ma=class extends nA.Tag("#runtime/SourceArtifactStore")(){},oA=e=>_h.mergeAll(_h.succeed(Kc,e.scopeConfigStore),_h.succeed($a,e.scopeStateStore),_h.succeed(Ma,e.sourceArtifactStore)),iA=e=>_h.mergeAll(_h.succeed(Vg,e.installationStore),oA(e));import*as GTe from"effect/Context";import*as SQ from"effect/Effect";import*as HTe from"effect/Layer";import*as Vye from"effect/Context";var hd=class extends Vye.Tag("#runtime/SourceTypeDeclarationsRefresherService")(){};import*as Kye from"effect/Effect";var Kg=(e,t)=>Kye.gen(function*(){if(e.runtimeLocalScope.installation.scopeId!==t)return yield*new Cv({message:`Runtime local scope mismatch: expected ${t}, got ${e.runtimeLocalScope.installation.scopeId}`,requestedScopeId:t,activeScopeId:e.runtimeLocalScope.installation.scopeId});let r=yield*e.scopeConfigStore.load(),n=yield*e.scopeStateStore.load();return{installation:e.runtimeLocalScope.installation,scopeConfigStore:e.scopeConfigStore,scopeStateStore:e.scopeStateStore,sourceArtifactStore:e.sourceArtifactStore,loadedConfig:r,scopeState:n}});import*as Mi from"effect/Effect";import*as Qye from"effect/Effect";var _o=e=>typeof e=="object"&&e!==null&&!Array.isArray(e)?e:{},vo=e=>typeof e=="string"&&e.trim().length>0?e.trim():null,Xye=e=>typeof e=="boolean"?e:null,kO=e=>Array.isArray(e)?e.flatMap(t=>{let r=vo(t);return r?[r]:[]}):[],Gye=e=>{if(e)try{return JSON.parse(e)}catch{return}},jst=e=>Dc(e),Bst=e=>e.replaceAll("~","~0").replaceAll("/","~1"),CO=e=>`#/$defs/google/${Bst(e)}`,qst=e=>{let t=vo(e)?.toLowerCase();switch(t){case"get":case"put":case"post":case"delete":case"patch":case"head":case"options":return t;default:throw new Error(`Unsupported Google Discovery HTTP method: ${String(e)}`)}},Gg=e=>{let t=_o(e.schema),r=vo(t.$ref);if(r)return{$ref:CO(r)};let n=vo(t.description),o=vo(t.format),i=vo(t.type),a=kO(t.enum),s=typeof t.default=="string"||typeof t.default=="number"||typeof t.default=="boolean"?t.default:void 0,c=Xye(t.readOnly),p={...n?{description:n}:{},...o?{format:o}:{},...a.length>0?{enum:[...a]}:{},...s!==void 0?{default:s}:{},...c===!0?{readOnly:!0}:{}};if(i==="any")return p;if(i==="array"){let m=Gg({schema:t.items,topLevelSchemas:e.topLevelSchemas});return{...p,type:"array",items:m??{}}}let d=_o(t.properties),f=t.additionalProperties;if(i==="object"||Object.keys(d).length>0||f!==void 0){let m=Object.fromEntries(Object.entries(d).map(([g,S])=>[g,Gg({schema:S,topLevelSchemas:e.topLevelSchemas})])),y=f===void 0?void 0:f===!0?!0:Gg({schema:f,topLevelSchemas:e.topLevelSchemas});return{...p,type:"object",...Object.keys(m).length>0?{properties:m}:{},...y!==void 0?{additionalProperties:y}:{}}}return i==="boolean"||i==="number"||i==="integer"||i==="string"?{...p,type:i}:Object.keys(p).length>0?p:{}},Ust=e=>{let t=Gg({schema:e.parameter,topLevelSchemas:e.topLevelSchemas});return e.parameter.repeated===!0?{type:"array",items:t}:t},Hye=e=>{let t=_o(e.method),r=_o(t.parameters),n={},o=[];for(let[a,s]of Object.entries(r)){let c=_o(s);n[a]=Ust({parameter:c,topLevelSchemas:e.topLevelSchemas}),c.required===!0&&o.push(a)}let i=vo(_o(t.request).$ref);if(i){let a=e.topLevelSchemas[i];a?n.body=Gg({schema:a,topLevelSchemas:e.topLevelSchemas}):n.body={$ref:CO(i)}}if(Object.keys(n).length!==0)return JSON.stringify({type:"object",properties:n,...o.length>0?{required:o}:{},additionalProperties:!1})},Zye=e=>{let t=vo(_o(_o(e.method).response).$ref);if(!t)return;let r=e.topLevelSchemas[t],n=r?Gg({schema:r,topLevelSchemas:e.topLevelSchemas}):{$ref:CO(t)};return JSON.stringify(n)},zst=e=>Object.entries(_o(_o(e).parameters)).flatMap(([t,r])=>{let n=_o(r),o=vo(n.location);return o!=="path"&&o!=="query"&&o!=="header"?[]:[{name:t,location:o,required:n.required===!0,repeated:n.repeated===!0,description:vo(n.description),type:vo(n.type)??vo(n.$ref),...kO(n.enum).length>0?{enum:[...kO(n.enum)]}:{},...vo(n.default)?{default:vo(n.default)}:{}}]}),Wye=e=>{let t=_o(_o(_o(e.auth).oauth2).scopes),r=Object.fromEntries(Object.entries(t).flatMap(([n,o])=>{let i=vo(_o(o).description)??"";return[[n,i]]}));return Object.keys(r).length>0?r:void 0},Yye=e=>{let t=vo(e.method.id),r=vo(e.method.path);if(!t||!r)return null;let n=qst(e.method.httpMethod),o=t,i=o.startsWith(`${e.service}.`)?o.slice(e.service.length+1):o,a=i.split(".").filter(m=>m.length>0),s=a.at(-1)??i,c=a.length>1?a.slice(0,-1).join("."):null,p=vo(_o(_o(e.method).response).$ref),d=vo(_o(_o(e.method).request).$ref),f=_o(e.method.mediaUpload);return{toolId:i,rawToolId:o,methodId:t,name:i,description:vo(e.method.description),group:c,leaf:s,method:n,path:r,flatPath:vo(e.method.flatPath),parameters:zst(e.method),requestSchemaId:d,responseSchemaId:p,scopes:[...kO(e.method.scopes)],supportsMediaUpload:Object.keys(f).length>0,supportsMediaDownload:Xye(e.method.supportsMediaDownload)===!0,...Hye({method:e.method,topLevelSchemas:e.topLevelSchemas})?{inputSchema:Gye(Hye({method:e.method,topLevelSchemas:e.topLevelSchemas}))}:{},...Zye({method:e.method,topLevelSchemas:e.topLevelSchemas})?{outputSchema:Gye(Zye({method:e.method,topLevelSchemas:e.topLevelSchemas}))}:{}}},ege=e=>{let t=_o(e.resource),r=Object.values(_o(t.methods)).flatMap(o=>{try{let i=Yye({service:e.service,version:e.version,rootUrl:e.rootUrl,servicePath:e.servicePath,topLevelSchemas:e.topLevelSchemas,method:_o(o)});return i?[i]:[]}catch{return[]}}),n=Object.values(_o(t.resources)).flatMap(o=>ege({...e,resource:o}));return[...r,...n]},A1=(e,t)=>Qye.try({try:()=>{let r=typeof t=="string"?JSON.parse(t):t,n=vo(r.name),o=vo(r.version),i=vo(r.rootUrl),a=typeof r.servicePath=="string"?r.servicePath:"";if(!n||!o||!i)throw new Error(`Invalid Google Discovery document for ${e}`);let s=Object.fromEntries(Object.entries(_o(r.schemas)).map(([f,m])=>[f,_o(m)])),c=Object.fromEntries(Object.entries(s).map(([f,m])=>[CO(f),JSON.stringify(Gg({schema:m,topLevelSchemas:s}))])),p=[...Object.values(_o(r.methods)).flatMap(f=>{let m=Yye({service:n,version:o,rootUrl:i,servicePath:a,topLevelSchemas:s,method:_o(f)});return m?[m]:[]}),...Object.values(_o(r.resources)).flatMap(f=>ege({service:n,version:o,rootUrl:i,servicePath:a,topLevelSchemas:s,resource:f}))].sort((f,m)=>f.toolId.localeCompare(m.toolId));return{version:1,sourceHash:jst(typeof t=="string"?t:JSON.stringify(t)),service:n,versionName:o,title:vo(r.title),description:vo(r.description),rootUrl:i,servicePath:a,batchPath:vo(r.batchPath),documentationLink:vo(r.documentationLink),...Object.keys(c).length>0?{schemaRefTable:c}:{},...Wye(r)?{oauthScopes:Wye(r)}:{},methods:p}},catch:r=>r instanceof Error?r:new Error(`Failed to extract Google Discovery manifest: ${String(r)}`)}),YJ=e=>[...e.methods];import*as eV from"effect/Either";import*as of from"effect/Effect";var Jst=e=>{try{return new URL(e.servicePath||"",e.rootUrl).toString()}catch{return e.rootUrl}},Vst=e=>e.scopes.length>0?Iu("oauth2",{confidence:"high",reason:"Google Discovery document declares OAuth scopes",headerName:"Authorization",prefix:"Bearer ",parameterName:null,parameterLocation:null,oauthAuthorizationUrl:"https://accounts.google.com/o/oauth2/v2/auth",oauthTokenUrl:"https://oauth2.googleapis.com/token",oauthScopes:[...e.scopes]}):Op("Google Discovery document does not declare OAuth scopes","medium"),tV=e=>of.gen(function*(){let t=yield*of.either(pv({method:"GET",url:e.normalizedUrl,headers:e.headers}));if(eV.isLeft(t)||t.right.status<200||t.right.status>=300)return null;let r=yield*of.either(A1(e.normalizedUrl,t.right.text));if(eV.isLeft(r))return null;let n=Jst({rootUrl:r.right.rootUrl,servicePath:r.right.servicePath}),o=Cp(r.right.title)??`${r.right.service}.${r.right.versionName}.googleapis.com`,i=Object.keys(r.right.oauthScopes??{});return{detectedKind:"google_discovery",confidence:"high",endpoint:n,specUrl:e.normalizedUrl,name:o,namespace:os(r.right.service),transport:null,authInference:Vst({scopes:i}),toolCount:r.right.methods.length,warnings:[]}}).pipe(of.catchAll(()=>of.succeed(null)));import*as ls from"effect/Schema";var rV=ls.Struct({service:ls.String,version:ls.String,discoveryUrl:ls.optional(ls.NullOr(ls.String)),defaultHeaders:ls.optional(ls.NullOr(Qr)),scopes:ls.optional(ls.Array(ls.String))});var Kst=e=>{let t=e?.providerData.invocation.rootUrl;if(!t)return;let r=e?.providerData.invocation.servicePath??"";return[{url:new URL(r||"",t).toString()}]},Gst=e=>{let t=g_(e.source,e.operation.providerData.toolId),r=Oc.make(`cap_${hn({sourceId:e.source.id,toolId:e.operation.providerData.toolId})}`),n=Qs.make(`exec_${hn({sourceId:e.source.id,toolId:e.operation.providerData.toolId,protocol:"http"})}`),o=e.operation.inputSchema??{},i=e.operation.outputSchema??{},a=e.operation.providerData.invocation.scopes.length>0?hm.make(`security_${hn({sourceId:e.source.id,scopes:e.operation.providerData.invocation.scopes})}`):void 0;if(a&&!e.catalog.symbols[a]){let g=Object.fromEntries(e.operation.providerData.invocation.scopes.map(S=>[S,e.operation.providerData.invocation.scopeDescriptions?.[S]??S]));Vr(e.catalog.symbols)[a]={id:a,kind:"securityScheme",schemeType:"oauth2",docs:In({summary:"OAuth 2.0",description:"Imported from Google Discovery scopes."}),oauth:{flows:{},scopes:g},synthetic:!1,provenance:pn(e.documentId,"#/googleDiscovery/security")}}e.operation.providerData.invocation.parameters.forEach(g=>{let S=fm.make(`param_${hn({capabilityId:r,location:g.location,name:g.name})}`),b=PT(o,g.location,g.name)??(g.repeated?{type:"array",items:{type:g.type==="integer"?"integer":"string",...g.enum?{enum:g.enum}:{}}}:{type:g.type==="integer"?"integer":"string",...g.enum?{enum:g.enum}:{}});Vr(e.catalog.symbols)[S]={id:S,kind:"parameter",name:g.name,location:g.location,required:g.required,...In({description:g.description})?{docs:In({description:g.description})}:{},schemaShapeId:e.importer.importSchema(b,`#/googleDiscovery/${e.operation.providerData.toolId}/parameter/${g.location}/${g.name}`,o),synthetic:!1,provenance:pn(e.documentId,`#/googleDiscovery/${e.operation.providerData.toolId}/parameter/${g.location}/${g.name}`)}});let s=e.operation.providerData.invocation.requestSchemaId||fv(o)!==void 0?rg.make(`request_body_${hn({capabilityId:r})}`):void 0;if(s){let g=fv(o)??o;Vr(e.catalog.symbols)[s]={id:s,kind:"requestBody",contents:[{mediaType:"application/json",shapeId:e.importer.importSchema(g,`#/googleDiscovery/${e.operation.providerData.toolId}/requestBody`,o)}],synthetic:!1,provenance:pn(e.documentId,`#/googleDiscovery/${e.operation.providerData.toolId}/requestBody`)}}let c=Nc.make(`response_${hn({capabilityId:r})}`);Vr(e.catalog.symbols)[c]={id:c,kind:"response",...In({description:e.operation.description})?{docs:In({description:e.operation.description})}:{},...e.operation.outputSchema!==void 0?{contents:[{mediaType:"application/json",shapeId:e.importer.importSchema(i,`#/googleDiscovery/${e.operation.providerData.toolId}/response`,i)}]}:{},synthetic:!1,provenance:pn(e.documentId,`#/googleDiscovery/${e.operation.providerData.toolId}/response`)};let p=[];e.operation.providerData.invocation.supportsMediaUpload&&p.push("upload"),e.operation.providerData.invocation.supportsMediaDownload&&p.push("download");let d=v_({catalog:e.catalog,responseId:c,provenance:pn(e.documentId,`#/googleDiscovery/${e.operation.providerData.toolId}/responseSet`),traits:p}),f=e.operation.inputSchema!==void 0?e.importer.importSchema(e.operation.inputSchema,`#/googleDiscovery/${e.operation.providerData.toolId}/call`,e.operation.inputSchema):e.importer.importSchema({type:"object",additionalProperties:!1},`#/googleDiscovery/${e.operation.providerData.toolId}/call`);Vr(e.catalog.executables)[n]={id:n,capabilityId:r,scopeId:e.serviceScopeId,adapterKey:"google_discovery",bindingVersion:Ca,binding:e.operation.providerData,projection:{responseSetId:d,callShapeId:f},display:{protocol:"http",method:e.operation.providerData.invocation.method.toUpperCase(),pathTemplate:e.operation.providerData.invocation.path,operationId:e.operation.providerData.methodId,group:e.operation.providerData.group,leaf:e.operation.providerData.leaf,rawToolId:e.operation.providerData.rawToolId,title:e.operation.title??null,summary:e.operation.description??null},synthetic:!1,provenance:pn(e.documentId,`#/googleDiscovery/${e.operation.providerData.toolId}/executable`)};let m=e.operation.effect,y=a?{kind:"scheme",schemeId:a,scopes:e.operation.providerData.invocation.scopes}:{kind:"none"};Vr(e.catalog.capabilities)[r]={id:r,serviceScopeId:e.serviceScopeId,surface:{toolPath:t,...e.operation.title?{title:e.operation.title}:{},...e.operation.description?{summary:e.operation.description}:{},tags:["google",e.operation.providerData.service,e.operation.providerData.version]},semantics:{effect:m,safe:m==="read",idempotent:m==="read"||m==="delete",destructive:m==="delete"},auth:y,interaction:S_(m),executableIds:[n],synthetic:!1,provenance:pn(e.documentId,`#/googleDiscovery/${e.operation.providerData.toolId}/capability`)}},tge=e=>b_({source:e.source,documents:e.documents,serviceScopeDefaults:(()=>{let t=Kst(e.operations[0]);return t?{servers:t}:void 0})(),registerOperations:({catalog:t,documentId:r,serviceScopeId:n,importer:o})=>{for(let i of e.operations)Gst({catalog:t,source:e.source,documentId:r,serviceScopeId:n,operation:i,importer:o})}});import{FetchHttpClient as $Bt,HttpClient as MBt,HttpClientRequest as jBt}from"@effect/platform";import*as PO from"effect/Effect";import*as Uu from"effect/Schema";import{Schema as Ge}from"effect";var Hst=["get","put","post","delete","patch","head","options"],nV=Ge.Literal(...Hst),rge=Ge.Literal("path","query","header"),oV=Ge.Struct({name:Ge.String,location:rge,required:Ge.Boolean,repeated:Ge.Boolean,description:Ge.NullOr(Ge.String),type:Ge.NullOr(Ge.String),enum:Ge.optional(Ge.Array(Ge.String)),default:Ge.optional(Ge.String)}),nge=Ge.Struct({method:nV,path:Ge.String,flatPath:Ge.NullOr(Ge.String),rootUrl:Ge.String,servicePath:Ge.String,parameters:Ge.Array(oV),requestSchemaId:Ge.NullOr(Ge.String),responseSchemaId:Ge.NullOr(Ge.String),scopes:Ge.Array(Ge.String),scopeDescriptions:Ge.optional(Ge.Record({key:Ge.String,value:Ge.String})),supportsMediaUpload:Ge.Boolean,supportsMediaDownload:Ge.Boolean}),aA=Ge.Struct({kind:Ge.Literal("google_discovery"),service:Ge.String,version:Ge.String,toolId:Ge.String,rawToolId:Ge.String,methodId:Ge.String,group:Ge.NullOr(Ge.String),leaf:Ge.String,invocation:nge}),oge=Ge.Struct({toolId:Ge.String,rawToolId:Ge.String,methodId:Ge.String,name:Ge.String,description:Ge.NullOr(Ge.String),group:Ge.NullOr(Ge.String),leaf:Ge.String,method:nV,path:Ge.String,flatPath:Ge.NullOr(Ge.String),parameters:Ge.Array(oV),requestSchemaId:Ge.NullOr(Ge.String),responseSchemaId:Ge.NullOr(Ge.String),scopes:Ge.Array(Ge.String),supportsMediaUpload:Ge.Boolean,supportsMediaDownload:Ge.Boolean,inputSchema:Ge.optional(Ge.Unknown),outputSchema:Ge.optional(Ge.Unknown)}),ige=Ge.Record({key:Ge.String,value:Ge.String}),Zst=Ge.Struct({version:Ge.Literal(1),sourceHash:Ge.String,service:Ge.String,versionName:Ge.String,title:Ge.NullOr(Ge.String),description:Ge.NullOr(Ge.String),rootUrl:Ge.String,servicePath:Ge.String,batchPath:Ge.NullOr(Ge.String),documentationLink:Ge.NullOr(Ge.String),oauthScopes:Ge.optional(Ge.Record({key:Ge.String,value:Ge.String})),schemaRefTable:Ge.optional(ige),methods:Ge.Array(oge)});import*as Wst from"effect/Either";var zBt=Uu.decodeUnknownEither(aA),sge=e=>({kind:"google_discovery",service:e.service,version:e.version,toolId:e.definition.toolId,rawToolId:e.definition.rawToolId,methodId:e.definition.methodId,group:e.definition.group,leaf:e.definition.leaf,invocation:{method:e.definition.method,path:e.definition.path,flatPath:e.definition.flatPath,rootUrl:e.rootUrl,servicePath:e.servicePath,parameters:e.definition.parameters,requestSchemaId:e.definition.requestSchemaId,responseSchemaId:e.definition.responseSchemaId,scopes:e.definition.scopes,...e.oauthScopes?{scopeDescriptions:Object.fromEntries(e.definition.scopes.flatMap(t=>e.oauthScopes?.[t]!==void 0?[[t,e.oauthScopes[t]]]:[]))}:{},supportsMediaUpload:e.definition.supportsMediaUpload,supportsMediaDownload:e.definition.supportsMediaDownload}}),Qst=Uu.decodeUnknownEither(Uu.parseJson(Uu.Record({key:Uu.String,value:Uu.Unknown}))),iV=e=>typeof e=="object"&&e!==null&&!Array.isArray(e)?e:{};var cge=(e,t,r)=>{if(t.length===0)return;let[n,...o]=t;if(!n)return;if(o.length===0){e[n]=r;return}let i=iV(e[n]);e[n]=i,cge(i,o,r)},age=e=>{if(e.schema===void 0||e.schema===null)return{};let t=iV(e.schema);if(!e.refTable||Object.keys(e.refTable).length===0)return t;let r=iV(t.$defs);for(let[n,o]of Object.entries(e.refTable)){if(!n.startsWith("#/$defs/"))continue;let i=typeof o=="string"?(()=>{try{return JSON.parse(o)}catch{return o}})():o,a=n.slice(8).split("/").filter(s=>s.length>0);cge(r,a,i)}return Object.keys(r).length>0?{...t,$defs:r}:t};var aV=e=>{let t=Object.fromEntries(Object.entries(e.manifest.schemaRefTable??{}).map(([o,i])=>{try{return[o,JSON.parse(i)]}catch{return[o,i]}})),r=e.definition.inputSchema===void 0?void 0:age({schema:e.definition.inputSchema,refTable:t}),n=e.definition.outputSchema===void 0?void 0:age({schema:e.definition.outputSchema,refTable:t});return{inputTypePreview:yu(r,"unknown",1/0),outputTypePreview:yu(n,"unknown",1/0),...r!==void 0?{inputSchema:r}:{},...n!==void 0?{outputSchema:n}:{},providerData:sge({service:e.manifest.service,version:e.manifest.versionName,rootUrl:e.manifest.rootUrl,servicePath:e.manifest.servicePath,oauthScopes:e.manifest.oauthScopes,definition:e.definition})}};import{FetchHttpClient as Xst,HttpClient as Yst,HttpClientRequest as lge}from"@effect/platform";import*as Yn from"effect/Effect";import*as dr from"effect/Schema";var pge=dr.extend(bm,dr.Struct({kind:dr.Literal("google_discovery"),service:dr.Trim.pipe(dr.nonEmptyString()),version:dr.Trim.pipe(dr.nonEmptyString()),discoveryUrl:dr.optional(dr.NullOr(dr.Trim.pipe(dr.nonEmptyString()))),scopes:dr.optional(dr.Array(dr.Trim.pipe(dr.nonEmptyString()))),scopeOauthClientId:dr.optional(dr.NullOr(Rse)),oauthClient:Bse,name:Ho,namespace:Ho,auth:dr.optional(T_)})),ect=pge,uge=dr.Struct({service:dr.Trim.pipe(dr.nonEmptyString()),version:dr.Trim.pipe(dr.nonEmptyString()),discoveryUrl:dr.Trim.pipe(dr.nonEmptyString()),defaultHeaders:dr.optional(dr.NullOr(Qr)),scopes:dr.optional(dr.Array(dr.Trim.pipe(dr.nonEmptyString())))}),tct=dr.Struct({service:dr.String,version:dr.String,discoveryUrl:dr.optional(dr.String),defaultHeaders:dr.optional(dr.NullOr(Qr)),scopes:dr.optional(dr.Array(dr.String))}),sA=1,rct=(e,t)=>e!==null&&typeof e=="object"&&!Array.isArray(e)&&t.some(r=>Object.prototype.hasOwnProperty.call(e,r)),nct=(e,t)=>`https://www.googleapis.com/discovery/v1/apis/${encodeURIComponent(e)}/${encodeURIComponent(t)}/rest`,fh=e=>Yn.gen(function*(){if(rct(e.binding,["transport","queryParams","headers","specUrl"]))return yield*Co("google-discovery/adapter","Google Discovery sources cannot define MCP or OpenAPI binding fields");let t=yield*Mp({sourceId:e.id,label:"Google Discovery",version:e.bindingVersion,expectedVersion:sA,schema:tct,value:e.binding,allowedKeys:["service","version","discoveryUrl","defaultHeaders","scopes"]}),r=t.service.trim(),n=t.version.trim();if(r.length===0||n.length===0)return yield*Co("google-discovery/adapter","Google Discovery sources require service and version");let o=typeof t.discoveryUrl=="string"&&t.discoveryUrl.trim().length>0?t.discoveryUrl.trim():null;return{service:r,version:n,discoveryUrl:o??nct(r,n),defaultHeaders:t.defaultHeaders??null,scopes:(t.scopes??[]).map(i=>i.trim()).filter(i=>i.length>0)}}),dge=e=>Yn.gen(function*(){let t=yield*Yst.HttpClient,r=lge.get(e.url).pipe(lge.setHeaders({...e.headers,...e.cookies?{cookie:Object.entries(e.cookies).map(([o,i])=>`${o}=${encodeURIComponent(i)}`).join("; ")}:{}})),n=yield*t.execute(r).pipe(Yn.mapError(o=>o instanceof Error?o:new Error(String(o))));return n.status===401||n.status===403?yield*new E_("import",`Google Discovery fetch requires credentials (status ${n.status})`):n.status<200||n.status>=300?yield*Co("google-discovery/adapter",`Google Discovery fetch failed with status ${n.status}`):yield*n.text.pipe(Yn.mapError(o=>o instanceof Error?o:new Error(String(o))))}).pipe(Yn.provide(Xst.layer)),oct=e=>typeof e=="object"&&e!==null&&!Array.isArray(e)?e:{},_ge=(e,t)=>{if(e==null)return[];if(Array.isArray(e)){let r=e.flatMap(n=>n==null?[]:[String(n)]);return t?r:[r.join(",")]}return typeof e=="string"||typeof e=="number"||typeof e=="boolean"?[String(e)]:[JSON.stringify(e)]},ict=e=>e.pathTemplate.replaceAll(/\{([^}]+)\}/g,(t,r)=>{let n=e.parameters.find(a=>a.location==="path"&&a.name===r),o=e.args[r];if(o==null&&n?.required)throw new Error(`Missing required path parameter: ${r}`);let i=_ge(o,!1);return i.length===0?"":encodeURIComponent(i[0])}),act=e=>new URL(e.providerData.invocation.servicePath||"",e.providerData.invocation.rootUrl).toString(),sct=e=>{let t={};return e.headers.forEach((r,n)=>{t[n]=r}),t},cct=async e=>{let t=e.headers.get("content-type")?.toLowerCase()??"",r=await e.text();if(r.trim().length===0)return null;if(t.includes("application/json")||t.includes("+json"))try{return JSON.parse(r)}catch{return r}return r},lct=e=>{let t=aV({manifest:e.manifest,definition:e.definition});return{toolId:e.definition.toolId,title:e.definition.name,description:e.definition.description,effect:e.definition.method==="get"||e.definition.method==="head"?"read":e.definition.method==="delete"?"delete":"write",inputSchema:t.inputSchema,outputSchema:t.outputSchema,providerData:t.providerData}},uct=e=>{let t=Object.keys(e.oauthScopes??{});if(t.length===0)return[];let r=new Map;for(let o of t)r.set(o,new Set);for(let o of e.methods)for(let i of o.scopes)r.get(i)?.add(o.methodId);return t.filter(o=>{let i=r.get(o);return!i||i.size===0?!0:!t.some(a=>{if(a===o)return!1;let s=r.get(a);if(!s||s.size<=i.size)return!1;for(let c of i)if(!s.has(c))return!1;return!0})})},pct=e=>Yn.gen(function*(){let t=yield*fh(e),r=t.scopes??[],n=yield*dge({url:t.discoveryUrl,headers:t.defaultHeaders??void 0}).pipe(Yn.flatMap(a=>A1(e.name,a)),Yn.catchAll(()=>Yn.succeed(null))),o=n?uct(n):[],i=o.length>0?[...new Set([...o,...r])]:r;return i.length===0?null:{providerKey:"google_workspace",authorizationEndpoint:"https://accounts.google.com/o/oauth2/v2/auth",tokenEndpoint:"https://oauth2.googleapis.com/token",scopes:i,headerName:"Authorization",prefix:"Bearer ",clientAuthentication:"client_secret_post",authorizationParams:{access_type:"offline",prompt:"consent",include_granted_scopes:"true"}}}),fge={key:"google_discovery",displayName:"Google Discovery",catalogKind:"imported",connectStrategy:"direct",credentialStrategy:"credential_managed",bindingConfigVersion:sA,providerKey:"google_workspace",defaultImportAuthPolicy:"reuse_runtime",connectPayloadSchema:pge,executorAddInputSchema:ect,executorAddHelpText:["service is the Discovery service name, e.g. sheets or drive. version is the API version, e.g. v4 or v3."],executorAddInputSignatureWidth:420,localConfigBindingSchema:rV,localConfigBindingFromSource:e=>Yn.runSync(Yn.map(fh(e),t=>({service:t.service,version:t.version,discoveryUrl:t.discoveryUrl,defaultHeaders:t.defaultHeaders??null,scopes:t.scopes}))),serializeBindingConfig:e=>Lp({adapterKey:"google_discovery",version:sA,payloadSchema:uge,payload:Yn.runSync(fh(e))}),deserializeBindingConfig:({id:e,bindingConfigJson:t})=>Yn.map($p({sourceId:e,label:"Google Discovery",adapterKey:"google_discovery",version:sA,payloadSchema:uge,value:t}),({version:r,payload:n})=>({version:r,payload:{service:n.service,version:n.version,discoveryUrl:n.discoveryUrl,defaultHeaders:n.defaultHeaders??null,scopes:n.scopes??[]}})),bindingStateFromSource:e=>Yn.map(fh(e),t=>({...Rp,defaultHeaders:t.defaultHeaders??null})),sourceConfigFromSource:e=>Yn.runSync(Yn.map(fh(e),t=>({kind:"google_discovery",service:t.service,version:t.version,discoveryUrl:t.discoveryUrl,defaultHeaders:t.defaultHeaders,scopes:t.scopes}))),validateSource:e=>Yn.gen(function*(){let t=yield*fh(e);return{...e,bindingVersion:sA,binding:{service:t.service,version:t.version,discoveryUrl:t.discoveryUrl,defaultHeaders:t.defaultHeaders??null,scopes:[...t.scopes??[]]}}}),shouldAutoProbe:e=>e.enabled&&(e.status==="draft"||e.status==="probing"),discoveryPriority:({normalizedUrl:e})=>e.includes("$discovery/rest")||e.includes("/discovery/v1/apis/")?500:300,detectSource:({normalizedUrl:e,headers:t})=>tV({normalizedUrl:e,headers:t}),syncCatalog:({source:e,resolveAuthMaterialForSlot:t})=>Yn.gen(function*(){let r=yield*fh(e),n=yield*t("import"),o=yield*dge({url:r.discoveryUrl,headers:{...r.defaultHeaders,...n.headers},cookies:n.cookies,queryParams:n.queryParams}).pipe(Yn.mapError(c=>D_(c)?c:new Error(`Failed fetching Google Discovery document for ${e.id}: ${c.message}`))),i=yield*A1(e.name,o),a=YJ(i),s=Date.now();return Fp({fragment:tge({source:e,documents:[{documentKind:"google_discovery",documentKey:r.discoveryUrl,contentText:o,fetchedAt:s}],operations:a.map(c=>lct({manifest:i,definition:c}))}),importMetadata:Is({source:e,adapterKey:"google_discovery"}),sourceHash:i.sourceHash})}),getOauth2SetupConfig:({source:e})=>pct(e),normalizeOauthClientInput:e=>Yn.succeed({...e,redirectMode:e.redirectMode??"loopback"}),invoke:e=>Yn.tryPromise({try:async()=>{let t=Yn.runSync(fh(e.source)),r=xm({executableId:e.executable.id,label:"Google Discovery",version:e.executable.bindingVersion,expectedVersion:Ca,schema:aA,value:e.executable.binding}),n=oct(e.args),o=ict({pathTemplate:r.invocation.path,args:n,parameters:r.invocation.parameters}),i=new URL(o.replace(/^\//,""),act({providerData:r})),a={...t.defaultHeaders};for(let y of r.invocation.parameters){if(y.location==="path")continue;let g=n[y.name];if(g==null&&y.required)throw new Error(`Missing required ${y.location} parameter: ${y.name}`);let S=_ge(g,y.repeated);if(S.length!==0){if(y.location==="query"){for(let b of S)i.searchParams.append(y.name,b);continue}y.location==="header"&&(a[y.name]=y.repeated?S.join(","):S[0])}}let s=gu({url:i,queryParams:e.auth.queryParams}),c=Tc({headers:{...a,...e.auth.headers},cookies:e.auth.cookies}),p,d=Object.keys(e.auth.bodyValues).length>0;r.invocation.requestSchemaId!==null&&(n.body!==void 0||d)&&(p=JSON.stringify(n_({body:n.body!==void 0?n.body:{},bodyValues:e.auth.bodyValues,label:`${r.invocation.method.toUpperCase()} ${r.invocation.path}`})),"content-type"in c||(c["content-type"]="application/json"));let f=await fetch(s.toString(),{method:r.invocation.method.toUpperCase(),headers:c,...p!==void 0?{body:p}:{}}),m=await cct(f);return{data:f.ok?m:null,error:f.ok?null:m,headers:sct(f),status:f.status}},catch:t=>t instanceof Error?t:new Error(String(t))})};import*as bo from"effect/Schema";var mge=bo.Literal("request","field"),hge=bo.Literal("query","mutation"),cA=bo.Struct({kind:bo.Literal("graphql"),toolKind:mge,toolId:bo.String,rawToolId:bo.NullOr(bo.String),group:bo.NullOr(bo.String),leaf:bo.NullOr(bo.String),fieldName:bo.NullOr(bo.String),operationType:bo.NullOr(hge),operationName:bo.NullOr(bo.String),operationDocument:bo.NullOr(bo.String),queryTypeName:bo.NullOr(bo.String),mutationTypeName:bo.NullOr(bo.String),subscriptionTypeName:bo.NullOr(bo.String)});import*as j1e from"effect/Either";import*as Ph from"effect/Effect";var Or=n0(D1e(),1);import*as dgt from"effect/Either";import*as u2 from"effect/Effect";import*as Yu from"effect/Schema";import*as tN from"effect/HashMap";import*as P1e from"effect/Option";var A1e=320;var _gt=["id","identifier","key","slug","name","title","number","url","state","status","success"],fgt=["node","nodes","edge","edges","pageInfo","viewer","user","users","team","teams","project","projects","organization","issue","issues","creator","assignee","items"];var WH=e=>typeof e=="object"&&e!==null&&!Array.isArray(e)?e:{},mgt=e=>typeof e=="string"&&e.trim().length>0?e:null;var O1e=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/([A-Z]+)([A-Z][a-z0-9]+)/g,"$1 $2").replace(/[^a-zA-Z0-9]+/g," ").trim().split(/\s+/).filter(t=>t.length>0),N1e=e=>{let t=O1e(e).map(o=>o.toLowerCase());if(t.length===0)return"tool";let[r,...n]=t;return`${r}${n.map(o=>`${o[0]?.toUpperCase()??""}${o.slice(1)}`).join("")}`},Y4=e=>{let t=N1e(e);return`${t[0]?.toUpperCase()??""}${t.slice(1)}`},hgt=e=>O1e(e).map(t=>`${t[0]?.toUpperCase()??""}${t.slice(1)}`).join(" "),eN=(e,t)=>{let r=t?.trim();return r?{...e,description:r}:e},F1e=(e,t)=>t!==void 0?{...e,default:t}:e,QH=(e,t)=>{let r=t?.trim();return r?{...e,deprecated:!0,"x-deprecationReason":r}:e},ygt=e=>{let t;try{t=JSON.parse(e)}catch(o){throw new Error(`GraphQL document is not valid JSON: ${o instanceof Error?o.message:String(o)}`)}let r=WH(t);if(Array.isArray(r.errors)&&r.errors.length>0){let o=r.errors.map(i=>mgt(WH(i).message)).filter(i=>i!==null);throw new Error(o.length>0?`GraphQL introspection returned errors: ${o.join("; ")}`:"GraphQL introspection returned errors")}let n=r.data;if(!n||typeof n!="object"||!("__schema"in n))throw new Error("GraphQL introspection document is missing data.__schema");return n},ggt={type:"object",properties:{query:{type:"string",description:"GraphQL query or mutation document."},variables:{type:"object",description:"Optional GraphQL variables.",additionalProperties:!0},operationName:{type:"string",description:"Optional GraphQL operation name."},headers:{type:"object",description:"Optional per-request headers.",additionalProperties:{type:"string"}}},required:["query"],additionalProperties:!1},Sgt={type:"object",properties:{status:{type:"number"},headers:{type:"object",additionalProperties:{type:"string"}},body:{}},required:["status","headers","body"],additionalProperties:!1},rN=(0,Or.getIntrospectionQuery)({descriptions:!0,inputValueDeprecation:!0,schemaDescription:!0}),vgt=e=>{switch(e){case"String":case"ID":case"Date":case"DateTime":case"DateTimeOrDuration":case"Duration":case"UUID":case"TimelessDate":case"TimelessDateOrDuration":case"URI":return{type:"string"};case"Int":case"Float":return{type:"number"};case"Boolean":return{type:"boolean"};case"JSONObject":return{type:"object",additionalProperties:!0};case"JSONString":return{type:"string"};case"JSON":return{};default:return{}}},bgt=e=>{switch(e){case"String":return"value";case"ID":return"id";case"Date":return"2026-03-08";case"DateTime":case"DateTimeOrDuration":return"2026-03-08T00:00:00.000Z";case"UUID":return"00000000-0000-0000-0000-000000000000";case"TimelessDate":case"TimelessDateOrDuration":return"2026-03-08";case"Duration":return"P1D";case"URI":return"https://example.com";case"Int":return 1;case"Float":return 1.5;case"Boolean":return!0;case"JSONObject":return{};case"JSONString":return"{}";default:return{}}},p2="#/$defs/graphql",xgt=e=>`${p2}/scalars/${e}`,Egt=e=>`${p2}/enums/${e}`,Tgt=e=>`${p2}/input/${e}`,Dgt=(e,t)=>`${p2}/output/${t===0?e:`${e}__depth${t}`}`,Agt=()=>`${p2}/output/GraphqlTypenameOnly`,l2=e=>({$ref:e}),Igt=()=>({type:"object",properties:{__typename:{type:"string"}},required:["__typename"],additionalProperties:!1}),wgt=()=>{let e={},t=new Map,r=(d,f)=>{e[d]=JSON.stringify(f)},n=()=>{let d=Agt();return d in e||r(d,Igt()),l2(d)},o=d=>{let f=xgt(d);return f in e||r(f,vgt(d)),l2(f)},i=(d,f)=>{let m=Egt(d);return m in e||r(m,{type:"string",enum:[...f]}),l2(m)},a=d=>{let f=Tgt(d.name);if(!(f in e)){r(f,{});let m=Object.values(d.getFields()),y=Object.fromEntries(m.map(S=>{let b=s(S.type),E=QH(F1e(eN(b,S.description),S.defaultValue),S.deprecationReason);return[S.name,E]})),g=m.filter(S=>(0,Or.isNonNullType)(S.type)&&S.defaultValue===void 0).map(S=>S.name);r(f,{type:"object",properties:y,...g.length>0?{required:g}:{},additionalProperties:!1})}return l2(f)},s=d=>{if((0,Or.isNonNullType)(d))return s(d.ofType);if((0,Or.isListType)(d))return{type:"array",items:s(d.ofType)};let f=(0,Or.getNamedType)(d);return(0,Or.isScalarType)(f)?o(f.name):(0,Or.isEnumType)(f)?i(f.name,f.getValues().map(m=>m.name)):(0,Or.isInputObjectType)(f)?a(f):{}},c=(d,f)=>{if((0,Or.isScalarType)(d))return{selectionSet:"",schema:o(d.name)};if((0,Or.isEnumType)(d))return{selectionSet:"",schema:i(d.name,d.getValues().map(U=>U.name))};let m=Dgt(d.name,f),y=t.get(m);if(y)return y;if((0,Or.isUnionType)(d)){let U={selectionSet:"{ __typename }",schema:n()};return t.set(m,U),U}if(!(0,Or.isObjectType)(d)&&!(0,Or.isInterfaceType)(d))return{selectionSet:"{ __typename }",schema:n()};let g={selectionSet:"{ __typename }",schema:n()};if(t.set(m,g),f>=2)return g;let S=Object.values(d.getFields()).filter(U=>!U.name.startsWith("__")),b=S.filter(U=>(0,Or.isLeafType)((0,Or.getNamedType)(U.type))),E=S.filter(U=>!(0,Or.isLeafType)((0,Or.getNamedType)(U.type))),I=I1e({fields:b,preferredNames:_gt,limit:3}),T=I1e({fields:E,preferredNames:fgt,limit:2}),k=XH([...I,...T]);if(k.length===0)return g;let F=[],O={},$=[];for(let U of k){let ge=p(U.type,f+1),Te=QH(eN(ge.schema,U.description),U.deprecationReason);O[U.name]=Te,$.push(U.name),F.push(ge.selectionSet.length>0?`${U.name} ${ge.selectionSet}`:U.name)}O.__typename={type:"string"},$.push("__typename"),F.push("__typename"),r(m,{type:"object",properties:O,required:$,additionalProperties:!1});let N={selectionSet:`{ ${F.join(" ")} }`,schema:l2(m)};return t.set(m,N),N},p=(d,f=0)=>{if((0,Or.isNonNullType)(d))return p(d.ofType,f);if((0,Or.isListType)(d)){let m=p(d.ofType,f);return{selectionSet:m.selectionSet,schema:{type:"array",items:m.schema}}}return c((0,Or.getNamedType)(d),f)};return{refTable:e,inputSchemaForType:s,selectedOutputForType:p}},X4=(e,t=0)=>{if((0,Or.isNonNullType)(e))return X4(e.ofType,t);if((0,Or.isListType)(e))return[X4(e.ofType,t+1)];let r=(0,Or.getNamedType)(e);if((0,Or.isScalarType)(r))return bgt(r.name);if((0,Or.isEnumType)(r))return r.getValues()[0]?.name??"VALUE";if((0,Or.isInputObjectType)(r)){if(t>=2)return{};let n=Object.values(r.getFields()),o=n.filter(a=>(0,Or.isNonNullType)(a.type)&&a.defaultValue===void 0),i=o.length>0?o:n.slice(0,1);return Object.fromEntries(i.map(a=>[a.name,a.defaultValue??X4(a.type,t+1)]))}return{}},XH=e=>{let t=new Set,r=[];for(let n of e)t.has(n.name)||(t.add(n.name),r.push(n));return r},I1e=e=>{let t=e.preferredNames.map(r=>e.fields.find(n=>n.name===r)).filter(r=>r!==void 0);return t.length>=e.limit?XH(t).slice(0,e.limit):XH([...t,...e.fields]).slice(0,e.limit)},YH=e=>(0,Or.isNonNullType)(e)?`${YH(e.ofType)}!`:(0,Or.isListType)(e)?`[${YH(e.ofType)}]`:e.name,kgt=(e,t)=>{let r=Object.fromEntries(e.map(o=>{let i=t.inputSchemaForType(o.type),a=QH(F1e(eN(i,o.description),o.defaultValue),o.deprecationReason);return[o.name,a]})),n=e.filter(o=>(0,Or.isNonNullType)(o.type)&&o.defaultValue===void 0).map(o=>o.name);return{type:"object",properties:{...r,headers:{type:"object",description:"Optional per-request headers.",additionalProperties:{type:"string"}}},...n.length>0?{required:n}:{},additionalProperties:!1}},Cgt=(e,t)=>{let r=t.selectedOutputForType(e);return{type:"object",properties:{data:eN(r.schema,"Value returned for the selected GraphQL field."),errors:{type:"array",items:{type:"object",properties:{message:{type:"string",description:"GraphQL error message."},path:{type:"array",description:"Path to the field that produced the error.",items:{anyOf:[{type:"string"},{type:"number"}]}},locations:{type:"array",description:"Source locations for the error in the GraphQL document.",items:{type:"object",properties:{line:{type:"number"},column:{type:"number"}},required:["line","column"],additionalProperties:!1}},extensions:{type:"object",description:"Additional provider-specific GraphQL error metadata.",additionalProperties:!0}},required:["message"],additionalProperties:!0}}},required:["data","errors"],additionalProperties:!1}},Pgt=e=>{if(e.length===0)return{};let t=e.filter(o=>(0,Or.isNonNullType)(o.type)&&o.defaultValue===void 0),r=t.length>0?t:e.slice(0,1);return Object.fromEntries(r.map(o=>[o.name,o.defaultValue??X4(o.type)]))},Ogt=e=>{let t=e.bundleBuilder.selectedOutputForType(e.fieldType),r=`${Y4(e.operationType)}${Y4(e.fieldName)}`,n=e.args.map(s=>`$${s.name}: ${YH(s.type)}`).join(", "),o=e.args.map(s=>`${s.name}: $${s.name}`).join(", "),i=o.length>0?`${e.fieldName}(${o})`:e.fieldName,a=t.selectionSet.length>0?` ${t.selectionSet}`:"";return{operationName:r,operationDocument:`${e.operationType} ${r}${n.length>0?`(${n})`:""} { ${i}${a} }`}},Ngt=e=>{let t=e.description?.trim();return t||`Execute the GraphQL ${e.operationType} field '${e.fieldName}'.`},Fgt=e=>({kind:"request",toolId:"request",rawToolId:"request",toolName:"GraphQL request",description:`Execute a raw GraphQL request against ${e}.`,inputSchema:ggt,outputSchema:Sgt,exampleInput:{query:"query { __typename }"}}),Rgt=e=>{let t=e.map(o=>({...o})),r="request",n=o=>{let i=new Map;for(let a of t){let s=i.get(a.toolId)??[];s.push(a),i.set(a.toolId,s)}for(let[a,s]of i.entries())if(!(s.length<2&&a!==r))for(let c of s)c.toolId=o(c)};return n(o=>`${o.leaf}${Y4(o.operationType)}`),n(o=>`${o.leaf}${Y4(o.operationType)}${Dc(`${o.group}:${o.fieldName}`).slice(0,6)}`),t.sort((o,i)=>o.toolId.localeCompare(i.toolId)||o.fieldName.localeCompare(i.fieldName)||o.operationType.localeCompare(i.operationType)).map(o=>({...o}))},w1e=e=>e.rootType?Object.values(e.rootType.getFields()).filter(t=>!t.name.startsWith("__")).map(t=>{let r=N1e(t.name),n=Cgt(t.type,e.bundleBuilder),o=kgt(t.args,e.bundleBuilder),{operationName:i,operationDocument:a}=Ogt({operationType:e.operationType,fieldName:t.name,args:t.args,fieldType:t.type,bundleBuilder:e.bundleBuilder});return{kind:"field",toolId:r,rawToolId:t.name,toolName:hgt(t.name),description:Ngt({operationType:e.operationType,fieldName:t.name,description:t.description}),group:e.operationType,leaf:r,fieldName:t.name,operationType:e.operationType,operationName:i,operationDocument:a,inputSchema:o,outputSchema:n,exampleInput:Pgt(t.args),searchTerms:[e.operationType,t.name,...t.args.map(s=>s.name),(0,Or.getNamedType)(t.type).name]}}):[],Lgt=e=>Dc(e),R1e=(e,t)=>u2.try({try:()=>{let r=ygt(t),n=(0,Or.buildClientSchema)(r),o=Lgt(t),i=wgt(),a=Rgt([...w1e({rootType:n.getQueryType(),operationType:"query",bundleBuilder:i}),...w1e({rootType:n.getMutationType(),operationType:"mutation",bundleBuilder:i})]);return{version:2,sourceHash:o,queryTypeName:n.getQueryType()?.name??null,mutationTypeName:n.getMutationType()?.name??null,subscriptionTypeName:n.getSubscriptionType()?.name??null,...Object.keys(i.refTable).length>0?{schemaRefTable:i.refTable}:{},tools:[...a,Fgt(e)]}},catch:r=>r instanceof Error?r:new Error(String(r))}),L1e=e=>e.tools.map(t=>({toolId:t.toolId,rawToolId:t.rawToolId,name:t.toolName,description:t.description??`Execute ${t.toolName}.`,group:t.kind==="field"?t.group:null,leaf:t.kind==="field"?t.leaf:null,fieldName:t.kind==="field"?t.fieldName:null,operationType:t.kind==="field"?t.operationType:null,operationName:t.kind==="field"?t.operationName:null,operationDocument:t.kind==="field"?t.operationDocument:null,searchTerms:t.kind==="field"?t.searchTerms:["request","graphql","query","mutation"]})),$gt=e=>{if(!e||Object.keys(e).length===0)return;let t={};for(let[r,n]of Object.entries(e)){if(!r.startsWith("#/$defs/"))continue;let o=typeof n=="string"?(()=>{try{return JSON.parse(n)}catch{return n}})():n,i=r.slice(8).split("/").filter(a=>a.length>0);M1e(t,i,o)}return Object.keys(t).length>0?t:void 0},k1e=e=>{if(e.schema===void 0)return;if(e.defsRoot===void 0)return e.schema;let t=e.cache.get(e.schema);if(t)return t;let r=e.schema.$defs,n=r&&typeof r=="object"&&!Array.isArray(r)?{...e.schema,$defs:{...e.defsRoot,...r}}:{...e.schema,$defs:e.defsRoot};return e.cache.set(e.schema,n),n},C1e=new WeakMap,Mgt=e=>{let t=C1e.get(e);if(t)return t;let r=tN.fromIterable(e.tools.map(s=>[s.toolId,s])),n=$gt(e.schemaRefTable),o=new WeakMap,i=new Map,a={resolve(s){let c=i.get(s.toolId);if(c)return c;let p=P1e.getOrUndefined(tN.get(r,s.toolId)),d=k1e({schema:p?.inputSchema,defsRoot:n,cache:o}),f=k1e({schema:p?.outputSchema,defsRoot:n,cache:o}),m={inputTypePreview:yu(d,"unknown",A1e),outputTypePreview:yu(f,"unknown",A1e),...d!==void 0?{inputSchema:d}:{},...f!==void 0?{outputSchema:f}:{},...p?.exampleInput!==void 0?{exampleInput:p.exampleInput}:{},providerData:{kind:"graphql",toolKind:p?.kind??"request",toolId:s.toolId,rawToolId:s.rawToolId,group:s.group,leaf:s.leaf,fieldName:s.fieldName,operationType:s.operationType,operationName:s.operationName,operationDocument:s.operationDocument,queryTypeName:e.queryTypeName,mutationTypeName:e.mutationTypeName,subscriptionTypeName:e.subscriptionTypeName}};return i.set(s.toolId,m),m}};return C1e.set(e,a),a},$1e=e=>Mgt(e.manifest).resolve(e.definition),Ozt=Yu.decodeUnknownEither(cA),Nzt=Yu.decodeUnknownEither(Yu.parseJson(Yu.Record({key:Yu.String,value:Yu.Unknown}))),M1e=(e,t,r)=>{if(t.length===0)return;let[n,...o]=t;if(!n)return;if(o.length===0){e[n]=r;return}let i=WH(e[n]);e[n]=i,M1e(i,o,r)};var eZ=e=>Ph.gen(function*(){let t=yield*Ph.either(pv({method:"POST",url:e.normalizedUrl,headers:{accept:"application/graphql-response+json, application/json","content-type":"application/json",...e.headers},body:JSON.stringify({query:rN})}));if(j1e.isLeft(t))return null;let r=tse(t.right.text),n=(t.right.headers["content-type"]??"").toLowerCase(),o=Ci(r)&&Ci(r.data)?r.data:null;if(o&&Ci(o.__schema)){let p=Pp(e.normalizedUrl);return{detectedKind:"graphql",confidence:"high",endpoint:e.normalizedUrl,specUrl:null,name:p,namespace:os(p),transport:null,authInference:Op("GraphQL introspection succeeded without an advertised auth requirement","medium"),toolCount:null,warnings:[]}}let a=(Ci(r)&&Array.isArray(r.errors)?r.errors:[]).map(p=>Ci(p)&&typeof p.message=="string"?p.message:null).filter(p=>p!==null);if(!(n.includes("application/graphql-response+json")||ym(e.normalizedUrl)&&t.right.status>=400&&t.right.status<500||a.some(p=>/introspection|graphql|query/i.test(p))))return null;let c=Pp(e.normalizedUrl);return{detectedKind:"graphql",confidence:o?"high":"medium",endpoint:e.normalizedUrl,specUrl:null,name:c,namespace:os(c),transport:null,authInference:t.right.status===401||t.right.status===403?Yae(t.right.headers,"GraphQL endpoint rejected introspection and did not advertise a concrete auth scheme"):Op(a.length>0?`GraphQL endpoint responded with errors during introspection: ${a[0]}`:"GraphQL endpoint shape detected","medium"),toolCount:null,warnings:a.length>0?[a[0]]:[]}}).pipe(Ph.catchAll(()=>Ph.succeed(null)));import*as V1 from"effect/Schema";var tZ=V1.Struct({defaultHeaders:V1.optional(V1.NullOr(Qr))});var B1e=()=>({type:"array",items:{type:"object",properties:{message:{type:"string",description:"GraphQL error message."},path:{type:"array",description:"Path to the field that produced the error.",items:{anyOf:[{type:"string"},{type:"number"}]}},locations:{type:"array",description:"Source locations for the error in the GraphQL document.",items:{type:"object",properties:{line:{type:"number"},column:{type:"number"}},required:["line","column"],additionalProperties:!1}},extensions:{type:"object",description:"Additional provider-specific GraphQL error metadata.",additionalProperties:!0}},required:["message"],additionalProperties:!0}}),jgt=e=>{if(e.toolKind!=="field")return Xs(e.outputSchema);let t=Xs(e.outputSchema),r=Xs(Xs(t.properties).data);return Object.keys(r).length>0?dv(r,e.outputSchema):t},Bgt=e=>{if(e.toolKind!=="field")return B1e();let t=Xs(e.outputSchema),r=Xs(Xs(t.properties).errors);return Object.keys(r).length>0?dv(r,e.outputSchema):B1e()},qgt=e=>{let t=g_(e.source,e.operation.providerData.toolId),r=Oc.make(`cap_${hn({sourceId:e.source.id,toolId:e.operation.providerData.toolId})}`),n=Qs.make(`exec_${hn({sourceId:e.source.id,toolId:e.operation.providerData.toolId,protocol:"graphql"})}`),o=e.operation.inputSchema!==void 0?e.importer.importSchema(e.operation.inputSchema,`#/graphql/${e.operation.providerData.toolId}/call`):e.importer.importSchema({type:"object",additionalProperties:!0},`#/graphql/${e.operation.providerData.toolId}/call`),i=e.operation.outputSchema!==void 0?e.importer.importSchema(jgt({toolKind:e.operation.providerData.toolKind,outputSchema:e.operation.outputSchema}),`#/graphql/${e.operation.providerData.toolId}/data`):e.importer.importSchema({type:"object",additionalProperties:!0},`#/graphql/${e.operation.providerData.toolId}/data`),a=e.importer.importSchema(Bgt({toolKind:e.operation.providerData.toolKind,outputSchema:e.operation.outputSchema}),`#/graphql/${e.operation.providerData.toolId}/errors`),s=Nc.make(`response_${hn({capabilityId:r})}`);Vr(e.catalog.symbols)[s]={id:s,kind:"response",...In({description:e.operation.description})?{docs:In({description:e.operation.description})}:{},contents:[{mediaType:"application/json",shapeId:i}],synthetic:!1,provenance:pn(e.documentId,`#/graphql/${e.operation.providerData.toolId}/response`)};let c=v_({catalog:e.catalog,responseId:s,provenance:pn(e.documentId,`#/graphql/${e.operation.providerData.toolId}/responseSet`)});Vr(e.catalog.executables)[n]={id:n,capabilityId:r,scopeId:e.serviceScopeId,adapterKey:"graphql",bindingVersion:Ca,binding:e.operation.providerData,projection:{responseSetId:c,callShapeId:o,resultDataShapeId:i,resultErrorShapeId:a},display:{protocol:"graphql",method:e.operation.providerData.operationType??"query",pathTemplate:e.operation.providerData.fieldName??e.operation.providerData.leaf??e.operation.providerData.toolId,operationId:e.operation.providerData.fieldName??e.operation.providerData.leaf??e.operation.providerData.toolId,group:e.operation.providerData.group,leaf:e.operation.providerData.leaf,rawToolId:e.operation.providerData.toolId,title:e.operation.title??null,summary:e.operation.description??null},synthetic:!1,provenance:pn(e.documentId,`#/graphql/${e.operation.providerData.toolId}/executable`)};let p=e.operation.effect;Vr(e.catalog.capabilities)[r]={id:r,serviceScopeId:e.serviceScopeId,surface:{toolPath:t,...e.operation.title?{title:e.operation.title}:{},...e.operation.description?{summary:e.operation.description}:{},...e.operation.providerData.group?{tags:[e.operation.providerData.group]}:{}},semantics:{effect:p,safe:p==="read",idempotent:p==="read",destructive:!1},auth:{kind:"none"},interaction:S_(p),executableIds:[n],synthetic:!1,provenance:pn(e.documentId,`#/graphql/${e.operation.providerData.toolId}/capability`)}},q1e=e=>b_({source:e.source,documents:e.documents,resourceDialectUri:"https://spec.graphql.org/",registerOperations:({catalog:t,documentId:r,serviceScopeId:n,importer:o})=>{for(let i of e.operations)qgt({catalog:t,source:e.source,documentId:r,serviceScopeId:n,operation:i,importer:o})}});import*as Bn from"effect/Effect";import*as Li from"effect/Schema";var Ugt=Li.extend(B6,Li.extend(bm,Li.Struct({kind:Li.Literal("graphql"),auth:Li.optional(T_)}))),zgt=Li.extend(bm,Li.Struct({kind:Li.Literal("graphql"),endpoint:Li.String,name:Ho,namespace:Ho,auth:Li.optional(T_)})),U1e=Li.Struct({defaultHeaders:Li.NullOr(Qr)}),Jgt=Li.Struct({defaultHeaders:Li.optional(Li.NullOr(Qr))}),d2=1,z1e=15e3,J1e=(e,t)=>e!==null&&typeof e=="object"&&!Array.isArray(e)&&t.some(r=>Object.prototype.hasOwnProperty.call(e,r)),dS=e=>Bn.gen(function*(){return J1e(e.binding,["transport","queryParams","headers"])?yield*Co("graphql/adapter","GraphQL sources cannot define MCP transport settings"):J1e(e.binding,["specUrl"])?yield*Co("graphql/adapter","GraphQL sources cannot define specUrl"):{defaultHeaders:(yield*Mp({sourceId:e.id,label:"GraphQL",version:e.bindingVersion,expectedVersion:d2,schema:Jgt,value:e.binding,allowedKeys:["defaultHeaders"]})).defaultHeaders??null}}),Vgt=e=>Bn.tryPromise({try:async()=>{let t;try{t=await fetch(gu({url:e.url,queryParams:e.queryParams}).toString(),{method:"POST",headers:Tc({headers:{"content-type":"application/json",...e.headers},cookies:e.cookies}),body:JSON.stringify(n_({body:{query:rN,operationName:"IntrospectionQuery"},bodyValues:e.bodyValues,label:`GraphQL introspection ${e.url}`})),signal:AbortSignal.timeout(z1e)})}catch(o){throw o instanceof Error&&(o.name==="AbortError"||o.name==="TimeoutError")?new Error(`GraphQL introspection timed out after ${z1e}ms`):o}let r=await t.text(),n;try{n=JSON.parse(r)}catch(o){throw new Error(`GraphQL introspection endpoint did not return JSON: ${o instanceof Error?o.message:String(o)}`)}if(!t.ok)throw t.status===401||t.status===403?new E_("import",`GraphQL introspection requires credentials (status ${t.status})`):new Error(`GraphQL introspection failed with status ${t.status}`);return JSON.stringify(n,null,2)},catch:t=>t instanceof Error?t:new Error(String(t))}),Kgt=e=>{let t=$1e({manifest:e.manifest,definition:e.definition});return{toolId:e.definition.toolId,title:e.definition.name,description:e.definition.description,effect:e.definition.operationType==="query"?"read":"write",inputSchema:t.inputSchema,outputSchema:t.outputSchema,providerData:t.providerData}},_2=e=>typeof e=="object"&&e!==null&&!Array.isArray(e)?e:{},V1e=e=>typeof e=="string"&&e.trim().length>0?e:null,Ggt=e=>Object.fromEntries(Object.entries(_2(e)).flatMap(([t,r])=>typeof r=="string"?[[t,r]]:[])),Hgt=e=>{let t={};return e.headers.forEach((r,n)=>{t[n]=r}),t},Zgt=async e=>(e.headers.get("content-type")?.toLowerCase()??"").includes("application/json")?e.json():e.text(),Wgt=e=>Object.fromEntries(Object.entries(e).filter(([,t])=>t!==void 0)),K1e={key:"graphql",displayName:"GraphQL",catalogKind:"imported",connectStrategy:"direct",credentialStrategy:"credential_managed",bindingConfigVersion:d2,providerKey:"generic_graphql",defaultImportAuthPolicy:"reuse_runtime",connectPayloadSchema:Ugt,executorAddInputSchema:zgt,executorAddHelpText:["endpoint is the GraphQL HTTP endpoint."],executorAddInputSignatureWidth:320,localConfigBindingSchema:tZ,localConfigBindingFromSource:e=>Bn.runSync(Bn.map(dS(e),t=>({defaultHeaders:t.defaultHeaders}))),serializeBindingConfig:e=>Lp({adapterKey:"graphql",version:d2,payloadSchema:U1e,payload:Bn.runSync(dS(e))}),deserializeBindingConfig:({id:e,bindingConfigJson:t})=>Bn.map($p({sourceId:e,label:"GraphQL",adapterKey:"graphql",version:d2,payloadSchema:U1e,value:t}),({version:r,payload:n})=>({version:r,payload:n})),bindingStateFromSource:e=>Bn.map(dS(e),t=>({...Rp,defaultHeaders:t.defaultHeaders})),sourceConfigFromSource:e=>Bn.runSync(Bn.map(dS(e),t=>({kind:"graphql",endpoint:e.endpoint,defaultHeaders:t.defaultHeaders}))),validateSource:e=>Bn.gen(function*(){let t=yield*dS(e);return{...e,bindingVersion:d2,binding:{defaultHeaders:t.defaultHeaders}}}),shouldAutoProbe:e=>e.enabled&&(e.status==="draft"||e.status==="probing"),discoveryPriority:({normalizedUrl:e})=>ym(e)?400:150,detectSource:({normalizedUrl:e,headers:t})=>eZ({normalizedUrl:e,headers:t}),syncCatalog:({source:e,resolveAuthMaterialForSlot:t})=>Bn.gen(function*(){let r=yield*dS(e),n=yield*t("import"),o=yield*Vgt({url:e.endpoint,headers:{...r.defaultHeaders,...n.headers},queryParams:n.queryParams,cookies:n.cookies,bodyValues:n.bodyValues}).pipe(Bn.withSpan("graphql.introspection.fetch",{kind:"client",attributes:{"executor.source.id":e.id,"executor.source.endpoint":e.endpoint}}),Bn.mapError(d=>D_(d)?d:new Error(`Failed fetching GraphQL introspection for ${e.id}: ${d.message}`))),i=yield*R1e(e.name,o).pipe(Bn.withSpan("graphql.manifest.extract",{attributes:{"executor.source.id":e.id}}),Bn.mapError(d=>d instanceof Error?d:new Error(String(d))));yield*Bn.annotateCurrentSpan("graphql.tool.count",i.tools.length);let a=yield*Bn.sync(()=>L1e(i)).pipe(Bn.withSpan("graphql.definitions.compile",{attributes:{"executor.source.id":e.id,"graphql.tool.count":i.tools.length}}));yield*Bn.annotateCurrentSpan("graphql.definition.count",a.length);let s=yield*Bn.sync(()=>a.map(d=>Kgt({definition:d,manifest:i}))).pipe(Bn.withSpan("graphql.operations.build",{attributes:{"executor.source.id":e.id,"graphql.definition.count":a.length}})),c=Date.now(),p=yield*Bn.sync(()=>q1e({source:e,documents:[{documentKind:"graphql_introspection",documentKey:e.endpoint,contentText:o,fetchedAt:c}],operations:s})).pipe(Bn.withSpan("graphql.snapshot.build",{attributes:{"executor.source.id":e.id,"graphql.operation.count":s.length}}));return Fp({fragment:p,importMetadata:Is({source:e,adapterKey:"graphql"}),sourceHash:i.sourceHash})}).pipe(Bn.withSpan("graphql.syncCatalog",{attributes:{"executor.source.id":e.id,"executor.source.endpoint":e.endpoint}})),invoke:e=>Bn.tryPromise({try:async()=>{let t=Bn.runSync(dS(e.source)),r=xm({executableId:e.executable.id,label:"GraphQL",version:e.executable.bindingVersion,expectedVersion:Ca,schema:cA,value:e.executable.binding}),n=_2(e.args),o=Tc({headers:{"content-type":"application/json",...t.defaultHeaders,...e.auth.headers,...Ggt(n.headers)},cookies:e.auth.cookies}),i=gu({url:e.source.endpoint,queryParams:e.auth.queryParams}).toString(),a=r.toolKind==="request"||typeof r.operationDocument!="string"||r.operationDocument.trim().length===0,s=a?(()=>{let b=V1e(n.query);if(b===null)throw new Error("GraphQL request tools require args.query");return b})():r.operationDocument,c=a?n.variables!==void 0?_2(n.variables):void 0:Wgt(Object.fromEntries(Object.entries(n).filter(([b])=>b!=="headers"))),p=a?V1e(n.operationName)??void 0:r.operationName??void 0,d=await fetch(i,{method:"POST",headers:o,body:JSON.stringify({query:s,...c?{variables:c}:{},...p?{operationName:p}:{}})}),f=await Zgt(d),m=_2(f),y=Array.isArray(m.errors)?m.errors:[],g=r.fieldName??r.leaf??r.toolId,S=_2(m.data);return{data:a?f:S[g]??null,error:y.length>0?y:d.status>=400?f:null,headers:Hgt(d),status:d.status}},catch:t=>t instanceof Error?t:new Error(String(t))})};var REe=n0(FEe(),1),Tbt=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),Dbt=e=>JSON.parse(e),Abt=e=>(0,REe.parse)(e),Ibt=e=>{try{return Dbt(e)}catch{return Abt(e)}},V2=e=>{let t=e.trim();if(t.length===0)throw new Error("OpenAPI document is empty");try{let r=Ibt(t);if(!Tbt(r))throw new Error("OpenAPI document must parse to an object");return r}catch(r){throw new Error(`Unable to parse OpenAPI document as JSON or YAML: ${r instanceof Error?r.message:String(r)}`)}};import*as nTe from"effect/Data";import*as np from"effect/Effect";import{pipe as jbt}from"effect/Function";import*as iF from"effect/ParseResult";import*as aF from"effect/Schema";function $Ee(e,t){let r,n;try{let a=LEe(e,Ms.__wbindgen_malloc,Ms.__wbindgen_realloc),s=tF,c=LEe(t,Ms.__wbindgen_malloc,Ms.__wbindgen_realloc),p=tF,d=Ms.extract_manifest_json_wasm(a,s,c,p);var o=d[0],i=d[1];if(d[3])throw o=0,i=0,kbt(d[2]);return r=o,n=i,MEe(o,i)}finally{Ms.__wbindgen_free(r,n,1)}}function wbt(){return{__proto__:null,"./openapi_extractor_bg.js":{__proto__:null,__wbindgen_cast_0000000000000001:function(t,r){return MEe(t,r)},__wbindgen_init_externref_table:function(){let t=Ms.__wbindgen_externrefs,r=t.grow(4);t.set(0,void 0),t.set(r+0,void 0),t.set(r+1,null),t.set(r+2,!0),t.set(r+3,!1)}}}}function MEe(e,t){return e=e>>>0,Pbt(e,t)}var K2=null;function YN(){return(K2===null||K2.byteLength===0)&&(K2=new Uint8Array(Ms.memory.buffer)),K2}function LEe(e,t,r){if(r===void 0){let s=G2.encode(e),c=t(s.length,1)>>>0;return YN().subarray(c,c+s.length).set(s),tF=s.length,c}let n=e.length,o=t(n,1)>>>0,i=YN(),a=0;for(;a127)break;i[o+a]=s}if(a!==n){a!==0&&(e=e.slice(a)),o=r(o,n,n=a+e.length*3,1)>>>0;let s=YN().subarray(o+a,o+n),c=G2.encodeInto(e,s);a+=c.written,o=r(o,n,a,1)>>>0}return tF=a,o}function kbt(e){let t=Ms.__wbindgen_externrefs.get(e);return Ms.__externref_table_dealloc(e),t}var eF=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});eF.decode();var Cbt=2146435072,LW=0;function Pbt(e,t){return LW+=t,LW>=Cbt&&(eF=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}),eF.decode(),LW=t),eF.decode(YN().subarray(e,e+t))}var G2=new TextEncoder;"encodeInto"in G2||(G2.encodeInto=function(e,t){let r=G2.encode(e);return t.set(r),{read:e.length,written:r.length}});var tF=0,Obt,Ms;function Nbt(e,t){return Ms=e.exports,Obt=t,K2=null,Ms.__wbindgen_start(),Ms}async function Fbt(e,t){if(typeof Response=="function"&&e instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(e,t)}catch(o){if(e.ok&&r(e.type)&&e.headers.get("Content-Type")!=="application/wasm")console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",o);else throw o}let n=await e.arrayBuffer();return await WebAssembly.instantiate(n,t)}else{let n=await WebAssembly.instantiate(e,t);return n instanceof WebAssembly.Instance?{instance:n,module:e}:n}function r(n){switch(n){case"basic":case"cors":case"default":return!0}return!1}}async function $W(e){if(Ms!==void 0)return Ms;e!==void 0&&(Object.getPrototypeOf(e)===Object.prototype?{module_or_path:e}=e:console.warn("using deprecated parameters for the initialization function; pass a single object instead")),e===void 0&&(e=new URL("openapi_extractor_bg.wasm",import.meta.url));let t=wbt();(typeof e=="string"||typeof Request=="function"&&e instanceof Request||typeof URL=="function"&&e instanceof URL)&&(e=fetch(e));let{instance:r,module:n}=await Fbt(await e,t);return Nbt(r,n)}var rF,BEe=new URL("./openapi-extractor-wasm/openapi_extractor_bg.wasm",import.meta.url),jEe=e=>e instanceof Error?e.message:String(e),Rbt=async()=>{await $W({module_or_path:BEe})},Lbt=async()=>{let[{readFile:e},{fileURLToPath:t}]=await Promise.all([import("node:fs/promises"),import("node:url")]),r=t(BEe),n=await e(r);await $W({module_or_path:n})},$bt=()=>(rF||(rF=(async()=>{let e;try{await Rbt();return}catch(t){e=t}try{await Lbt();return}catch(t){throw new Error(["Unable to initialize OpenAPI extractor wasm.",`runtime-url failed: ${jEe(e)}`,`node-fs fallback failed: ${jEe(t)}`].join(" "))}})().catch(e=>{throw rF=void 0,e})),rF),qEe=(e,t)=>$bt().then(()=>$Ee(e,t));import{Schema as Z}from"effect";var UEe=["get","put","post","delete","patch","head","options","trace"],zEe=["path","query","header","cookie"],nb=Z.Literal(...UEe),MW=Z.Literal(...zEe),JEe=Z.Struct({name:Z.String,location:MW,required:Z.Boolean,style:Z.optional(Z.String),explode:Z.optional(Z.Boolean),allowReserved:Z.optional(Z.Boolean),content:Z.optional(Z.Array(Z.suspend(()=>H2)))}),H2=Z.Struct({mediaType:Z.String,schema:Z.optional(Z.Unknown),examples:Z.optional(Z.Array(Z.suspend(()=>vS)))}),VEe=Z.Struct({name:Z.String,description:Z.optional(Z.String),required:Z.optional(Z.Boolean),deprecated:Z.optional(Z.Boolean),schema:Z.optional(Z.Unknown),content:Z.optional(Z.Array(H2)),style:Z.optional(Z.String),explode:Z.optional(Z.Boolean),examples:Z.optional(Z.Array(Z.suspend(()=>vS)))}),KEe=Z.Struct({required:Z.Boolean,contentTypes:Z.Array(Z.String),contents:Z.optional(Z.Array(H2))}),Uh=Z.Struct({url:Z.String,description:Z.optional(Z.String),variables:Z.optional(Z.Record({key:Z.String,value:Z.String}))}),Z2=Z.Struct({method:nb,pathTemplate:Z.String,parameters:Z.Array(JEe),requestBody:Z.NullOr(KEe)}),nF=Z.Struct({inputSchema:Z.optional(Z.Unknown),outputSchema:Z.optional(Z.Unknown),refHintKeys:Z.optional(Z.Array(Z.String))}),GEe=Z.Union(Z.String,Z.Record({key:Z.String,value:Z.Unknown})),Mbt=Z.Record({key:Z.String,value:GEe}),vS=Z.Struct({valueJson:Z.String,mediaType:Z.optional(Z.String),label:Z.optional(Z.String)}),HEe=Z.Struct({name:Z.String,location:MW,required:Z.Boolean,description:Z.optional(Z.String),examples:Z.optional(Z.Array(vS))}),ZEe=Z.Struct({description:Z.optional(Z.String),examples:Z.optional(Z.Array(vS))}),WEe=Z.Struct({statusCode:Z.String,description:Z.optional(Z.String),contentTypes:Z.Array(Z.String),examples:Z.optional(Z.Array(vS))}),W2=Z.Struct({statusCode:Z.String,description:Z.optional(Z.String),contentTypes:Z.Array(Z.String),schema:Z.optional(Z.Unknown),examples:Z.optional(Z.Array(vS)),contents:Z.optional(Z.Array(H2)),headers:Z.optional(Z.Array(VEe))}),Q2=Z.Struct({summary:Z.optional(Z.String),deprecated:Z.optional(Z.Boolean),parameters:Z.Array(HEe),requestBody:Z.optional(ZEe),response:Z.optional(WEe)}),SS=Z.suspend(()=>Z.Union(Z.Struct({kind:Z.Literal("none")}),Z.Struct({kind:Z.Literal("scheme"),schemeName:Z.String,scopes:Z.optional(Z.Array(Z.String))}),Z.Struct({kind:Z.Literal("allOf"),items:Z.Array(SS)}),Z.Struct({kind:Z.Literal("anyOf"),items:Z.Array(SS)}))),QEe=Z.Literal("apiKey","http","oauth2","openIdConnect"),XEe=Z.Struct({authorizationUrl:Z.optional(Z.String),tokenUrl:Z.optional(Z.String),refreshUrl:Z.optional(Z.String),scopes:Z.optional(Z.Record({key:Z.String,value:Z.String}))}),X2=Z.Struct({schemeName:Z.String,schemeType:QEe,description:Z.optional(Z.String),placementIn:Z.optional(Z.Literal("header","query","cookie")),placementName:Z.optional(Z.String),scheme:Z.optional(Z.String),bearerFormat:Z.optional(Z.String),openIdConnectUrl:Z.optional(Z.String),flows:Z.optional(Z.Record({key:Z.String,value:XEe}))}),jW=Z.Struct({kind:Z.Literal("openapi"),toolId:Z.String,rawToolId:Z.String,operationId:Z.optional(Z.String),group:Z.String,leaf:Z.String,tags:Z.Array(Z.String),versionSegment:Z.optional(Z.String),method:nb,path:Z.String,operationHash:Z.String,invocation:Z2,documentation:Z.optional(Q2),responses:Z.optional(Z.Array(W2)),authRequirement:Z.optional(SS),securitySchemes:Z.optional(Z.Array(X2)),documentServers:Z.optional(Z.Array(Uh)),servers:Z.optional(Z.Array(Uh))}),YEe=Z.Struct({toolId:Z.String,operationId:Z.optional(Z.String),tags:Z.Array(Z.String),name:Z.String,description:Z.NullOr(Z.String),method:nb,path:Z.String,invocation:Z2,operationHash:Z.String,typing:Z.optional(nF),documentation:Z.optional(Q2),responses:Z.optional(Z.Array(W2)),authRequirement:Z.optional(SS),securitySchemes:Z.optional(Z.Array(X2)),documentServers:Z.optional(Z.Array(Uh)),servers:Z.optional(Z.Array(Uh))}),BW=Z.Struct({version:Z.Literal(2),sourceHash:Z.String,tools:Z.Array(YEe),refHintTable:Z.optional(Z.Record({key:Z.String,value:Z.String}))});var ob=class extends nTe.TaggedError("OpenApiExtractionError"){},Bbt=aF.parseJson(BW),qbt=aF.decodeUnknown(Bbt),qW=(e,t,r)=>r instanceof ob?r:new ob({sourceName:e,stage:t,message:"OpenAPI extraction failed",details:iF.isParseError(r)?iF.TreeFormatter.formatErrorSync(r):String(r)}),Ubt=(e,t)=>typeof t=="string"?np.succeed(t):np.try({try:()=>JSON.stringify(t),catch:r=>new ob({sourceName:e,stage:"validate",message:"Unable to serialize OpenAPI input",details:String(r)})}),Nn=e=>e!==null&&typeof e=="object"&&!Array.isArray(e)?e:{},Y2=e=>Array.isArray(e)?e:[],On=e=>typeof e=="string"&&e.trim().length>0?e.trim():void 0,UW=e=>Array.isArray(e)?e.map(t=>UW(t)):e!==null&&typeof e=="object"?Object.fromEntries(Object.entries(e).sort(([t],[r])=>t.localeCompare(r)).map(([t,r])=>[t,UW(r)])):e,zW=e=>JSON.stringify(UW(e)),yf=(e,t)=>{if(Array.isArray(e)){for(let n of e)yf(n,t);return}if(e===null||typeof e!="object")return;let r=e;typeof r.$ref=="string"&&r.$ref.startsWith("#/")&&t.add(r.$ref);for(let n of Object.values(r))yf(n,t)},zbt=e=>e.replaceAll("~1","/").replaceAll("~0","~"),rp=(e,t,r=new Set)=>{let n=Nn(t),o=typeof n.$ref=="string"?n.$ref:null;if(!o||!o.startsWith("#/")||r.has(o))return t;let i=o.slice(2).split("/").reduce((d,f)=>{if(d!=null)return Nn(d)[zbt(f)]},e);if(i===void 0)return t;let a=new Set(r);a.add(o);let s=Nn(rp(e,i,a)),{$ref:c,...p}=n;return Object.keys(p).length>0?{...s,...p}:s},eTe=e=>/^2\d\d$/.test(e)?0:e==="default"?1:2,oTe=e=>{let t=Object.entries(Nn(e)).sort(([r],[n])=>r.localeCompare(n)).map(([r,n])=>[r,Nn(n)]);return t.find(([r])=>r==="application/json")??t.find(([r])=>r.toLowerCase().includes("+json"))??t.find(([r])=>r.toLowerCase().includes("json"))??t[0]},oF=e=>oTe(e)?.[1].schema,sF=(e,t)=>Object.entries(Nn(t)).sort(([n],[o])=>n.localeCompare(o)).map(([n,o])=>{let i=Nn(rp(e,o)),a=iTe(n,i);return{mediaType:n,...i.schema!==void 0?{schema:i.schema}:{},...a.length>0?{examples:a}:{}}}),KW=(e,t={})=>{let r=Nn(e),n=[];r.example!==void 0&&n.push({valueJson:zW(r.example),...t.mediaType?{mediaType:t.mediaType}:{},...t.label?{label:t.label}:{}});let o=Object.entries(Nn(r.examples)).sort(([i],[a])=>i.localeCompare(a));for(let[i,a]of o){let s=Nn(a);n.push({valueJson:zW(s.value!==void 0?s.value:a),...t.mediaType?{mediaType:t.mediaType}:{},label:i})}return n},Jbt=e=>KW(e),iTe=(e,t)=>{let r=KW(t,{mediaType:e});return r.length>0?r:Jbt(t.schema).map(n=>({...n,mediaType:e}))},Vbt=(e,t,r)=>{let n=Nn(rp(e,r));if(Object.keys(n).length===0)return;let o=sF(e,n.content),i=o.length>0?[]:KW(n);return{name:t,...On(n.description)?{description:On(n.description)}:{},...typeof n.required=="boolean"?{required:n.required}:{},...typeof n.deprecated=="boolean"?{deprecated:n.deprecated}:{},...n.schema!==void 0?{schema:n.schema}:{},...o.length>0?{content:o}:{},...On(n.style)?{style:On(n.style)}:{},...typeof n.explode=="boolean"?{explode:n.explode}:{},...i.length>0?{examples:i}:{}}},Kbt=(e,t)=>Object.entries(Nn(t)).sort(([r],[n])=>r.localeCompare(n)).flatMap(([r,n])=>{let o=Vbt(e,r,n);return o?[o]:[]}),JW=e=>Y2(e).map(t=>Nn(t)).flatMap(t=>{let r=On(t.url);if(!r)return[];let n=Object.fromEntries(Object.entries(Nn(t.variables)).sort(([o],[i])=>o.localeCompare(i)).flatMap(([o,i])=>{let a=Nn(i),s=On(a.default);return s?[[o,s]]:[]}));return[{url:r,...On(t.description)?{description:On(t.description)}:{},...Object.keys(n).length>0?{variables:n}:{}}]}),aTe=(e,t)=>Nn(Nn(e.paths)[t.path]),VW=e=>`${e.location}:${e.name}`,Gbt=(e,t)=>{let r=new Map,n=aTe(e,t),o=bS(e,t);for(let i of Y2(n.parameters)){let a=Nn(rp(e,i)),s=On(a.name),c=On(a.in);!s||!c||r.set(VW({location:c,name:s}),a)}for(let i of Y2(o.parameters)){let a=Nn(rp(e,i)),s=On(a.name),c=On(a.in);!s||!c||r.set(VW({location:c,name:s}),a)}return r},bS=(e,t)=>Nn(Nn(Nn(e.paths)[t.path])[t.method]),Hbt=(e,t)=>{let r=bS(e,t);if(Object.keys(r).length===0)return;let n=rp(e,r.requestBody);return oF(Nn(n).content)},Zbt=(e,t)=>{let r=bS(e,t);if(Object.keys(r).length===0)return t.invocation.requestBody;let n=Nn(rp(e,r.requestBody));if(Object.keys(n).length===0)return t.invocation.requestBody;let o=sF(e,n.content),i=o.map(a=>a.mediaType);return{required:typeof n.required=="boolean"?n.required:t.invocation.requestBody?.required??!1,contentTypes:i,...o.length>0?{contents:o}:{}}},Wbt=(e,t)=>{let r=bS(e,t);if(Object.keys(r).length===0)return;let n=Object.entries(Nn(r.responses)),o=n.filter(([a])=>/^2\d\d$/.test(a)).sort(([a],[s])=>a.localeCompare(s)),i=n.filter(([a])=>a==="default");for(let[,a]of[...o,...i]){let s=rp(e,a),c=oF(Nn(s).content);if(c!==void 0)return c}},Qbt=(e,t)=>{let r=bS(e,t);if(Object.keys(r).length===0)return;let o=Object.entries(Nn(r.responses)).sort(([i],[a])=>eTe(i)-eTe(a)||i.localeCompare(a)).map(([i,a])=>{let s=Nn(rp(e,a)),c=sF(e,s.content),p=c.map(y=>y.mediaType),d=oTe(s.content),f=d?iTe(d[0],d[1]):[],m=Kbt(e,s.headers);return{statusCode:i,...On(s.description)?{description:On(s.description)}:{},contentTypes:p,...oF(s.content)!==void 0?{schema:oF(s.content)}:{},...f.length>0?{examples:f}:{},...c.length>0?{contents:c}:{},...m.length>0?{headers:m}:{}}});return o.length>0?o:void 0},Xbt=e=>{let t=JW(e.servers);return t.length>0?t:void 0},Ybt=(e,t)=>{let r=bS(e,t);if(Object.keys(r).length===0)return;let n=JW(r.servers);if(n.length>0)return n;let o=JW(aTe(e,t).servers);return o.length>0?o:void 0},tTe=e=>{let t=Y2(e);if(t.length===0)return{kind:"none"};let r=t.flatMap(n=>{let o=Object.entries(Nn(n)).sort(([i],[a])=>i.localeCompare(a)).map(([i,a])=>{let s=Y2(a).flatMap(c=>typeof c=="string"&&c.trim().length>0?[c.trim()]:[]);return{kind:"scheme",schemeName:i,...s.length>0?{scopes:s}:{}}});return o.length===0?[]:[o.length===1?o[0]:{kind:"allOf",items:o}]});if(r.length!==0)return r.length===1?r[0]:{kind:"anyOf",items:r}},ext=(e,t)=>{let r=bS(e,t);if(Object.keys(r).length!==0)return Object.prototype.hasOwnProperty.call(r,"security")?tTe(r.security):tTe(e.security)},sTe=(e,t)=>{if(e)switch(e.kind){case"none":return;case"scheme":t.add(e.schemeName);return;case"allOf":case"anyOf":for(let r of e.items)sTe(r,t)}},rTe=e=>{let t=Object.fromEntries(Object.entries(Nn(e)).sort(([r],[n])=>r.localeCompare(n)).map(([r,n])=>{let o=Nn(n),i=Object.fromEntries(Object.entries(Nn(o.scopes)).sort(([a],[s])=>a.localeCompare(s)).map(([a,s])=>[a,On(s)??""]));return[r,{...On(o.authorizationUrl)?{authorizationUrl:On(o.authorizationUrl)}:{},...On(o.tokenUrl)?{tokenUrl:On(o.tokenUrl)}:{},...On(o.refreshUrl)?{refreshUrl:On(o.refreshUrl)}:{},...Object.keys(i).length>0?{scopes:i}:{}}]}));return Object.keys(t).length>0?t:void 0},txt=(e,t)=>{if(!t||t.kind==="none")return;let r=new Set;sTe(t,r);let n=Nn(Nn(e.components).securitySchemes),o=[...r].sort((i,a)=>i.localeCompare(a)).flatMap(i=>{let a=n[i];if(a===void 0)return[];let s=Nn(rp(e,a)),c=On(s.type);if(!c)return[];let p=c==="apiKey"||c==="http"||c==="oauth2"||c==="openIdConnect"?c:"http",d=On(s.in),f=d==="header"||d==="query"||d==="cookie"?d:void 0;return[{schemeName:i,schemeType:p,...On(s.description)?{description:On(s.description)}:{},...f?{placementIn:f}:{},...On(s.name)?{placementName:On(s.name)}:{},...On(s.scheme)?{scheme:On(s.scheme)}:{},...On(s.bearerFormat)?{bearerFormat:On(s.bearerFormat)}:{},...On(s.openIdConnectUrl)?{openIdConnectUrl:On(s.openIdConnectUrl)}:{},...rTe(s.flows)?{flows:rTe(s.flows)}:{}}]});return o.length>0?o:void 0},rxt=(e,t,r)=>{let n={...t.refHintTable},o=[...r].sort((a,s)=>a.localeCompare(s)),i=new Set(Object.keys(n));for(;o.length>0;){let a=o.shift();if(i.has(a))continue;i.add(a);let s=rp(e,{$ref:a});n[a]=zW(s);let c=new Set;yf(s,c);for(let p of[...c].sort((d,f)=>d.localeCompare(f)))i.has(p)||o.push(p)}return Object.keys(n).length>0?n:void 0},nxt=(e,t)=>{let r=new Set,n=Xbt(e),o=t.tools.map(i=>{let a=Gbt(e,i),s=i.invocation.parameters.map(S=>{let b=a.get(VW({location:S.location,name:S.name})),E=sF(e,b?.content);return{...S,...On(b?.style)?{style:On(b?.style)}:{},...typeof b?.explode=="boolean"?{explode:b.explode}:{},...typeof b?.allowReserved=="boolean"?{allowReserved:b.allowReserved}:{},...E.length>0?{content:E}:{}}}),c=Zbt(e,i),p=i.typing?.inputSchema??Hbt(e,i),d=i.typing?.outputSchema??Wbt(e,i),f=Qbt(e,i),m=ext(e,i),y=txt(e,m),g=Ybt(e,i);for(let S of s)for(let b of S.content??[])yf(b.schema,r);for(let S of c?.contents??[])yf(S.schema,r);for(let S of f??[]){yf(S.schema,r);for(let b of S.contents??[])yf(b.schema,r);for(let b of S.headers??[]){yf(b.schema,r);for(let E of b.content??[])yf(E.schema,r)}}return{...i,invocation:{...i.invocation,parameters:s,requestBody:c},...p!==void 0||d!==void 0?{typing:{...i.typing,...p!==void 0?{inputSchema:p}:{},...d!==void 0?{outputSchema:d}:{}}}:{},...f?{responses:f}:{},...m?{authRequirement:m}:{},...y?{securitySchemes:y}:{},...n?{documentServers:n}:{},...g?{servers:g}:{}}});return{...t,tools:o,refHintTable:rxt(e,t,r)}},ib=(e,t)=>np.gen(function*(){let r=yield*Ubt(e,t),n=yield*np.tryPromise({try:()=>qEe(e,r),catch:a=>qW(e,"extract",a)}),o=yield*jbt(qbt(n),np.mapError(a=>qW(e,"extract",a))),i=yield*np.try({try:()=>V2(r),catch:a=>qW(e,"validate",a)});return nxt(i,o)});import*as eI from"effect/Either";import*as Xl from"effect/Effect";var oxt=(e,t)=>{if(!t.startsWith("#/"))return;let r=e;for(let n of t.slice(2).split("/")){let o=n.replaceAll("~1","/").replaceAll("~0","~");if(!Ci(r))return;r=r[o]}return r},GW=(e,t,r=0)=>{if(!Ci(t))return null;let n=Au(t.$ref);return n&&r<5?GW(e,oxt(e,n),r+1):t},ixt=e=>{let t=new Set,r=[],n=i=>{if(Array.isArray(i)){for(let a of i)if(Ci(a))for(let[s,c]of Object.entries(a))s.length===0||t.has(s)||(t.add(s),r.push({name:s,scopes:Array.isArray(c)?c.filter(p=>typeof p=="string"):[]}))}};n(e.security);let o=e.paths;if(!Ci(o))return r;for(let i of Object.values(o))if(Ci(i)){n(i.security);for(let a of Object.values(i))Ci(a)&&n(a.security)}return r},cTe=e=>{let t=Au(e.scheme.type)?.toLowerCase()??"";if(t==="oauth2"){let r=Ci(e.scheme.flows)?e.scheme.flows:{},n=Object.values(r).find(Ci)??null,o=n&&Ci(n.scopes)?Object.keys(n.scopes).filter(a=>a.length>0):[],i=[...new Set([...e.scopes,...o])].sort();return{name:e.name,kind:"oauth2",supported:!0,headerName:"Authorization",prefix:"Bearer ",parameterName:null,parameterLocation:null,oauthAuthorizationUrl:n?Cp(Au(n.authorizationUrl)):null,oauthTokenUrl:n?Cp(Au(n.tokenUrl)):null,oauthScopes:i,reason:`OpenAPI security scheme "${e.name}" declares OAuth2`}}if(t==="http"){let r=Au(e.scheme.scheme)?.toLowerCase()??"";if(r==="bearer")return{name:e.name,kind:"bearer",supported:!0,headerName:"Authorization",prefix:"Bearer ",parameterName:null,parameterLocation:null,oauthAuthorizationUrl:null,oauthTokenUrl:null,oauthScopes:e.scopes,reason:`OpenAPI security scheme "${e.name}" declares HTTP bearer auth`};if(r==="basic")return{name:e.name,kind:"basic",supported:!1,headerName:"Authorization",prefix:"Basic ",parameterName:null,parameterLocation:null,oauthAuthorizationUrl:null,oauthTokenUrl:null,oauthScopes:e.scopes,reason:`OpenAPI security scheme "${e.name}" declares HTTP basic auth`}}if(t==="apiKey"){let r=Au(e.scheme.in),n=r==="header"||r==="query"||r==="cookie"?r:null;return{name:e.name,kind:"apiKey",supported:!1,headerName:n==="header"?Cp(Au(e.scheme.name)):null,prefix:null,parameterName:Cp(Au(e.scheme.name)),parameterLocation:n,oauthAuthorizationUrl:null,oauthTokenUrl:null,oauthScopes:e.scopes,reason:`OpenAPI security scheme "${e.name}" declares API key auth`}}return{name:e.name,kind:"unknown",supported:!1,headerName:null,prefix:null,parameterName:null,parameterLocation:null,oauthAuthorizationUrl:null,oauthTokenUrl:null,oauthScopes:e.scopes,reason:`OpenAPI security scheme "${e.name}" uses unsupported type ${t||"unknown"}`}},axt=e=>{let t=Ci(e.components)?e.components:{},r=Ci(t.securitySchemes)?t.securitySchemes:{},n=ixt(e);if(n.length===0){if(Object.keys(r).length===0)return Op("OpenAPI document does not declare security requirements");let a=Object.entries(r).map(([c,p])=>cTe({name:c,scopes:[],scheme:GW(e,p)??{}})).sort((c,p)=>{let d={oauth2:0,bearer:1,apiKey:2,basic:3,unknown:4};return d[c.kind]-d[p.kind]||c.name.localeCompare(p.name)})[0];if(!a)return Op("OpenAPI document does not declare security requirements");let s=a.kind==="unknown"?"low":"medium";return a.kind==="oauth2"?Iu("oauth2",{confidence:s,reason:`${a.reason}; scheme is defined but not explicitly applied to operations`,headerName:a.headerName,prefix:a.prefix,parameterName:a.parameterName,parameterLocation:a.parameterLocation,oauthAuthorizationUrl:a.oauthAuthorizationUrl,oauthTokenUrl:a.oauthTokenUrl,oauthScopes:a.oauthScopes}):a.kind==="bearer"?Iu("bearer",{confidence:s,reason:`${a.reason}; scheme is defined but not explicitly applied to operations`,headerName:a.headerName,prefix:a.prefix,parameterName:a.parameterName,parameterLocation:a.parameterLocation,oauthAuthorizationUrl:a.oauthAuthorizationUrl,oauthTokenUrl:a.oauthTokenUrl,oauthScopes:a.oauthScopes}):a.kind==="apiKey"?uv("apiKey",{confidence:s,reason:`${a.reason}; scheme is defined but not explicitly applied to operations`,headerName:a.headerName,prefix:a.prefix,parameterName:a.parameterName,parameterLocation:a.parameterLocation,oauthAuthorizationUrl:a.oauthAuthorizationUrl,oauthTokenUrl:a.oauthTokenUrl,oauthScopes:a.oauthScopes}):a.kind==="basic"?uv("basic",{confidence:s,reason:`${a.reason}; scheme is defined but not explicitly applied to operations`,headerName:a.headerName,prefix:a.prefix,parameterName:a.parameterName,parameterLocation:a.parameterLocation,oauthAuthorizationUrl:a.oauthAuthorizationUrl,oauthTokenUrl:a.oauthTokenUrl,oauthScopes:a.oauthScopes}):ng(`${a.reason}; scheme is defined but not explicitly applied to operations`)}let i=n.map(({name:a,scopes:s})=>{let c=GW(e,r[a]);return c==null?null:cTe({name:a,scopes:s,scheme:c})}).filter(a=>a!==null).sort((a,s)=>{let c={oauth2:0,bearer:1,apiKey:2,basic:3,unknown:4};return c[a.kind]-c[s.kind]||a.name.localeCompare(s.name)})[0];return i?i.kind==="oauth2"?Iu("oauth2",{confidence:"high",reason:i.reason,headerName:i.headerName,prefix:i.prefix,parameterName:i.parameterName,parameterLocation:i.parameterLocation,oauthAuthorizationUrl:i.oauthAuthorizationUrl,oauthTokenUrl:i.oauthTokenUrl,oauthScopes:i.oauthScopes}):i.kind==="bearer"?Iu("bearer",{confidence:"high",reason:i.reason,headerName:i.headerName,prefix:i.prefix,parameterName:i.parameterName,parameterLocation:i.parameterLocation,oauthAuthorizationUrl:i.oauthAuthorizationUrl,oauthTokenUrl:i.oauthTokenUrl,oauthScopes:i.oauthScopes}):i.kind==="apiKey"?uv("apiKey",{confidence:"high",reason:i.reason,headerName:i.headerName,prefix:i.prefix,parameterName:i.parameterName,parameterLocation:i.parameterLocation,oauthAuthorizationUrl:i.oauthAuthorizationUrl,oauthTokenUrl:i.oauthTokenUrl,oauthScopes:i.oauthScopes}):i.kind==="basic"?uv("basic",{confidence:"high",reason:i.reason,headerName:i.headerName,prefix:i.prefix,parameterName:i.parameterName,parameterLocation:i.parameterLocation,oauthAuthorizationUrl:i.oauthAuthorizationUrl,oauthTokenUrl:i.oauthTokenUrl,oauthScopes:i.oauthScopes}):ng(i.reason):ng("OpenAPI security requirements reference schemes that could not be resolved")},sxt=e=>{let t=e.document.servers;if(Array.isArray(t)){let r=t.find(Ci),n=r?Cp(Au(r.url)):null;if(n)try{return new URL(n,e.normalizedUrl).toString()}catch{return e.normalizedUrl}}return new URL(e.normalizedUrl).origin},HW=e=>Xl.gen(function*(){let t=yield*Xl.either(pv({method:"GET",url:e.normalizedUrl,headers:e.headers}));if(eI.isLeft(t))return console.warn(`[discovery] OpenAPI probe HTTP fetch failed for ${e.normalizedUrl}:`,t.left.message),null;if(t.right.status<200||t.right.status>=300)return console.warn(`[discovery] OpenAPI probe got status ${t.right.status} for ${e.normalizedUrl}`),null;let r=yield*Xl.either(ib(e.normalizedUrl,t.right.text));if(eI.isLeft(r))return console.warn(`[discovery] OpenAPI manifest extraction failed for ${e.normalizedUrl}:`,r.left instanceof Error?r.left.message:String(r.left)),null;let n=yield*Xl.either(Xl.try({try:()=>V2(t.right.text),catch:s=>s instanceof Error?s:new Error(String(s))})),o=eI.isRight(n)&&Ci(n.right)?n.right:{},i=sxt({normalizedUrl:e.normalizedUrl,document:o}),a=Cp(Au(o.info&&Ci(o.info)?o.info.title:null))??Pp(i);return{detectedKind:"openapi",confidence:"high",endpoint:i,specUrl:e.normalizedUrl,name:a,namespace:os(a),transport:null,authInference:axt(o),toolCount:r.right.tools.length,warnings:[]}}).pipe(Xl.catchAll(t=>(console.warn(`[discovery] OpenAPI detection unexpected error for ${e.normalizedUrl}:`,t instanceof Error?t.message:String(t)),Xl.succeed(null))));import*as zh from"effect/Schema";var ZW=zh.Struct({specUrl:zh.String,defaultHeaders:zh.optional(zh.NullOr(Qr))});import{Schema as qo}from"effect";var QW=/^v\d+(?:[._-]\d+)?$/i,lTe=new Set(["api"]),cxt=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/([A-Z]+)([A-Z][a-z0-9]+)/g,"$1 $2").replace(/[^a-zA-Z0-9]+/g," ").trim().split(/\s+/).filter(t=>t.length>0),lxt=e=>e.toLowerCase(),cF=e=>{let t=cxt(e).map(lxt);if(t.length===0)return"tool";let[r,...n]=t;return`${r}${n.map(o=>`${o[0]?.toUpperCase()??""}${o.slice(1)}`).join("")}`},WW=e=>{let t=cF(e);return`${t[0]?.toUpperCase()??""}${t.slice(1)}`},lF=e=>{let t=e?.trim();return t?cF(t):null},XW=e=>e.split("/").map(t=>t.trim()).filter(t=>t.length>0),uTe=e=>e.startsWith("{")&&e.endsWith("}"),uxt=e=>XW(e).map(t=>t.toLowerCase()).find(t=>QW.test(t)),pxt=e=>{for(let t of XW(e)){let r=t.toLowerCase();if(!QW.test(r)&&!lTe.has(r)&&!uTe(t))return lF(t)??"root"}return"root"},dxt=e=>e.split(/[/.]+/).map(t=>t.trim()).filter(t=>t.length>0),_xt=(e,t)=>{let r=e.operationId??e.toolId,n=dxt(r);if(n.length>1){let[o,...i]=n;if((lF(o)??o)===t&&i.length>0)return i.join(" ")}return r},fxt=(e,t)=>{let n=XW(e.path).filter(o=>!QW.test(o.toLowerCase())).filter(o=>!lTe.has(o.toLowerCase())).filter(o=>!uTe(o)).map(o=>lF(o)??o).filter(o=>o!==t).map(o=>WW(o)).join("");return`${e.method}${n||"Operation"}`},mxt=(e,t)=>{let r=cF(_xt(e,t));return r.length>0&&r!==t?r:cF(fxt(e,t))},hxt=e=>e.description??`${e.method.toUpperCase()} ${e.path}`,yxt=qo.Struct({toolId:qo.String,rawToolId:qo.String,operationId:qo.optional(qo.String),name:qo.String,description:qo.String,group:qo.String,leaf:qo.String,tags:qo.Array(qo.String),versionSegment:qo.optional(qo.String),method:nb,path:qo.String,invocation:Z2,operationHash:qo.String,typing:qo.optional(nF),documentation:qo.optional(Q2),responses:qo.optional(qo.Array(W2)),authRequirement:qo.optional(SS),securitySchemes:qo.optional(qo.Array(X2)),documentServers:qo.optional(qo.Array(Uh)),servers:qo.optional(qo.Array(Uh))}),gxt=e=>{let t=e.map(n=>({...n,toolId:`${n.group}.${n.leaf}`})),r=(n,o)=>{let i=new Map;for(let a of n){let s=i.get(a.toolId)??[];s.push(a),i.set(a.toolId,s)}for(let a of i.values())if(!(a.length<2))for(let s of a)s.toolId=o(s)};return r(t,n=>n.versionSegment?`${n.group}.${n.versionSegment}.${n.leaf}`:n.toolId),r(t,n=>`${n.versionSegment?`${n.group}.${n.versionSegment}`:n.group}.${n.leaf}${WW(n.method)}`),r(t,n=>`${n.versionSegment?`${n.group}.${n.versionSegment}`:n.group}.${n.leaf}${WW(n.method)}${n.operationHash.slice(0,8)}`),t},uF=e=>{let t=e.tools.map(r=>{let n=lF(r.tags[0])??pxt(r.path),o=mxt(r,n);return{rawToolId:r.toolId,operationId:r.operationId,name:r.name,description:hxt(r),group:n,leaf:o,tags:[...r.tags],versionSegment:uxt(r.path),method:r.method,path:r.path,invocation:r.invocation,operationHash:r.operationHash,typing:r.typing,documentation:r.documentation,responses:r.responses,authRequirement:r.authRequirement,securitySchemes:r.securitySchemes,documentServers:r.documentServers,servers:r.servers}});return gxt(t).sort((r,n)=>r.toolId.localeCompare(n.toolId)||r.rawToolId.localeCompare(n.rawToolId)||r.operationHash.localeCompare(n.operationHash))},YW=e=>({kind:"openapi",toolId:e.toolId,rawToolId:e.rawToolId,operationId:e.operationId,group:e.group,leaf:e.leaf,tags:e.tags,versionSegment:e.versionSegment,method:e.method,path:e.path,operationHash:e.operationHash,invocation:e.invocation,documentation:e.documentation,responses:e.responses,authRequirement:e.authRequirement,securitySchemes:e.securitySchemes,documentServers:e.documentServers,servers:e.servers});import*as ab from"effect/Match";var pF=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),Sxt=e=>{try{return JSON.parse(e)}catch{return null}},tI=(e,t,r,n)=>{if(Array.isArray(e))return e.map(a=>tI(a,t,r,n));if(!pF(e))return e;let o=typeof e.$ref=="string"?e.$ref:null;if(o&&o.startsWith("#/")&&!n.has(o)){let a=r.get(o);if(a===void 0){let s=t[o];a=typeof s=="string"?Sxt(s):pF(s)?s:null,r.set(o,a)}if(a!=null){let s=new Set(n);s.add(o);let{$ref:c,...p}=e,d=tI(a,t,r,s);if(Object.keys(p).length===0)return d;let f=tI(p,t,r,n);return pF(d)&&pF(f)?{...d,...f}:d}}let i={};for(let[a,s]of Object.entries(e))i[a]=tI(s,t,r,n);return i},Jh=(e,t)=>e==null?null:!t||Object.keys(t).length===0?e:tI(e,t,new Map,new Set),eQ=(e,t)=>({inputSchema:Jh(e?.inputSchema,t),outputSchema:Jh(e?.outputSchema,t)});var nI=e=>typeof e=="object"&&e!==null&&!Array.isArray(e)?e:{},vxt=e=>{let t=nI(e);if(t.type!=="object"&&t.properties===void 0)return!1;let r=nI(t.properties);return Object.keys(r).length===0&&t.additionalProperties===!1},_Te=(e,t=320)=>e==null?"void":vxt(e)?"{}":yu(e,"unknown",t),rQ=e=>e?.[0],rI=(e,t)=>{let r=nI(e);return nI(r.properties)[t]},bxt=(e,t,r)=>{let n=rI(e,r);if(n!==void 0)return n;let i=rI(e,t==="header"?"headers":t==="cookie"?"cookies":t);return i===void 0?void 0:rI(i,r)},pTe=e=>!e||e.length===0?void 0:([...e].sort((r,n)=>r.mediaType.localeCompare(n.mediaType)).find(r=>r.mediaType==="application/json")??[...e].find(r=>r.mediaType.toLowerCase().includes("+json"))??[...e].find(r=>r.mediaType.toLowerCase().includes("json"))??e[0])?.schema,dTe=(e,t)=>{if(!t)return e;let r=nI(e);return Object.keys(r).length===0?e:{...r,description:t}},xxt=e=>{let t=e.invocation,r={},n=[];for(let o of t.parameters){let i=e.documentation?.parameters.find(s=>s.name===o.name&&s.location===o.location),a=bxt(e.parameterSourceSchema,o.location,o.name)??pTe(o.content)??{type:"string"};r[o.name]=dTe(a,i?.description),o.required&&n.push(o.name)}return t.requestBody&&(r.body=dTe(e.requestBodySchema??pTe(t.requestBody.contents)??{type:"object"},e.documentation?.requestBody?.description),t.requestBody.required&&n.push("body")),Object.keys(r).length>0?{type:"object",properties:r,...n.length>0?{required:n}:{},additionalProperties:!1}:void 0},tQ=e=>typeof e=="string"&&e.length>0?{$ref:e}:void 0,Ext=e=>{let t=e.typing?.refHintKeys??[];return ab.value(e.invocation.requestBody).pipe(ab.when(null,()=>({outputSchema:tQ(t[0])})),ab.orElse(()=>({requestBodySchema:tQ(t[0]),outputSchema:tQ(t[1])})))},Txt=e=>{let t=eQ(e.definition.typing,e.refHintTable),r=Ext(e.definition),n=Jh(r.requestBodySchema,e.refHintTable),o=rI(t.inputSchema,"body")??rI(t.inputSchema,"input")??n??void 0,i=xxt({invocation:e.definition.invocation,documentation:e.definition.documentation,parameterSourceSchema:t.inputSchema,...o!==void 0?{requestBodySchema:o}:{}})??t.inputSchema??void 0,a=t.outputSchema??Jh(r.outputSchema,e.refHintTable);return{...i!=null?{inputSchema:i}:{},...a!=null?{outputSchema:a}:{}}},Dxt=e=>{if(!(!e.variants||e.variants.length===0))return e.variants.map(t=>{let r=Jh(t.schema,e.refHintTable);return{...t,...r!==void 0?{schema:r}:{}}})},Axt=e=>{if(!e)return;let t={};for(let n of e.parameters){let o=rQ(n.examples);o&&(t[n.name]=JSON.parse(o.valueJson))}let r=rQ(e.requestBody?.examples);return r&&(t.body=JSON.parse(r.valueJson)),Object.keys(t).length>0?t:void 0},Ixt=e=>{let t=rQ(e?.response?.examples)?.valueJson;return t?JSON.parse(t):void 0},dF=e=>{let{inputSchema:t,outputSchema:r}=Txt(e),n=Dxt({variants:e.definition.responses,refHintTable:e.refHintTable}),o=Axt(e.definition.documentation),i=Ixt(e.definition.documentation);return{inputTypePreview:yu(t,"unknown",1/0),outputTypePreview:_Te(r,1/0),...t!==void 0?{inputSchema:t}:{},...r!==void 0?{outputSchema:r}:{},...o!==void 0?{exampleInput:o}:{},...i!==void 0?{exampleOutput:i}:{},providerData:{...YW(e.definition),...n?{responses:n}:{}}}};var oI=e=>e!==null&&typeof e=="object"&&!Array.isArray(e),wxt=new TextEncoder,nQ=e=>(e??"").split(";",1)[0]?.trim().toLowerCase()??"",$i=e=>{if(typeof e=="string")return e;if(typeof e=="number"||typeof e=="boolean"||typeof e=="bigint")return String(e);if(e==null)return"";try{return JSON.stringify(e)}catch{return String(e)}},fTe=e=>{let t=nQ(e);return t==="application/json"||t.endsWith("+json")||t.includes("json")},mTe=e=>{let t=nQ(e);return t.length===0?!1:t.startsWith("text/")||t==="application/xml"||t.endsWith("+xml")||t.endsWith("/xml")||t==="application/x-www-form-urlencoded"||t==="application/javascript"||t==="application/ecmascript"||t==="application/graphql"||t==="application/sql"||t==="application/x-yaml"||t==="application/yaml"||t==="application/toml"||t==="application/csv"||t==="image/svg+xml"||t.endsWith("+yaml")||t.endsWith("+toml")},iI=e=>fTe(e)?"json":mTe(e)||nQ(e).length===0?"text":"bytes",aI=e=>Object.entries(oI(e)?e:{}).sort(([t],[r])=>t.localeCompare(r)),kxt=e=>{switch(e){case"path":case"header":return"simple";case"cookie":case"query":return"form"}},Cxt=(e,t)=>e==="query"||e==="cookie"?t==="form":!1,oQ=e=>e.style??kxt(e.location),_F=e=>e.explode??Cxt(e.location,oQ(e)),ia=e=>encodeURIComponent($i(e)),Pxt=(e,t)=>{let r=encodeURIComponent(e);return t?r.replace(/%3A/gi,":").replace(/%2F/gi,"/").replace(/%3F/gi,"?").replace(/%23/gi,"#").replace(/%5B/gi,"[").replace(/%5D/gi,"]").replace(/%40/gi,"@").replace(/%21/gi,"!").replace(/%24/gi,"$").replace(/%26/gi,"&").replace(/%27/gi,"'").replace(/%28/gi,"(").replace(/%29/gi,")").replace(/%2A/gi,"*").replace(/%2B/gi,"+").replace(/%2C/gi,",").replace(/%3B/gi,";").replace(/%3D/gi,"="):r},sI=e=>{let t=[...(e.contents??[]).map(r=>r.mediaType),...e.contentTypes??[]];if(t.length!==0)return t.find(r=>r==="application/json")??t.find(r=>r.toLowerCase().includes("+json"))??t.find(r=>r.toLowerCase().includes("json"))??t[0]},Oxt=e=>{if(e instanceof Uint8Array)return e;if(e instanceof ArrayBuffer)return new Uint8Array(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength);if(typeof e=="string")return wxt.encode(e);if(Array.isArray(e)&&e.every(t=>typeof t=="number"&&Number.isInteger(t)&&t>=0&&t<=255))return Uint8Array.from(e);throw new Error("Binary OpenAPI request bodies must be bytes, a string, or an array of byte values")},cI=(e,t)=>{let r=t.toLowerCase();if(r==="application/json"||r.includes("+json")||r.includes("json"))return JSON.stringify(e);if(r==="application/x-www-form-urlencoded"){let n=new URLSearchParams;for(let[o,i]of aI(e)){if(Array.isArray(i)){for(let a of i)n.append(o,$i(a));continue}n.append(o,$i(i))}return n.toString()}return $i(e)},Nxt=(e,t)=>{let r=oQ(e),n=_F(e),o=e.allowReserved===!0,i=sI({contents:e.content});if(i)return{kind:"query",entries:[{name:e.name,value:cI(t,i),allowReserved:o}]};if(Array.isArray(t))return r==="spaceDelimited"?{kind:"query",entries:[{name:e.name,value:t.map(a=>$i(a)).join(" "),allowReserved:o}]}:r==="pipeDelimited"?{kind:"query",entries:[{name:e.name,value:t.map(a=>$i(a)).join("|"),allowReserved:o}]}:{kind:"query",entries:n?t.map(a=>({name:e.name,value:$i(a),allowReserved:o})):[{name:e.name,value:t.map(a=>$i(a)).join(","),allowReserved:o}]};if(oI(t)){let a=aI(t);return r==="deepObject"?{kind:"query",entries:a.map(([s,c])=>({name:`${e.name}[${s}]`,value:$i(c),allowReserved:o}))}:{kind:"query",entries:n?a.map(([s,c])=>({name:s,value:$i(c),allowReserved:o})):[{name:e.name,value:a.flatMap(([s,c])=>[s,$i(c)]).join(","),allowReserved:o}]}}return{kind:"query",entries:[{name:e.name,value:$i(t),allowReserved:o}]}},Fxt=(e,t)=>{let r=_F(e),n=sI({contents:e.content});if(n)return{kind:"header",value:cI(t,n)};if(Array.isArray(t))return{kind:"header",value:t.map(o=>$i(o)).join(",")};if(oI(t)){let o=aI(t);return{kind:"header",value:r?o.map(([i,a])=>`${i}=${$i(a)}`).join(","):o.flatMap(([i,a])=>[i,$i(a)]).join(",")}}return{kind:"header",value:$i(t)}},Rxt=(e,t)=>{let r=_F(e),n=sI({contents:e.content});if(n)return{kind:"cookie",pairs:[{name:e.name,value:cI(t,n)}]};if(Array.isArray(t))return{kind:"cookie",pairs:r?t.map(o=>({name:e.name,value:$i(o)})):[{name:e.name,value:t.map(o=>$i(o)).join(",")}]};if(oI(t)){let o=aI(t);return{kind:"cookie",pairs:r?o.map(([i,a])=>({name:i,value:$i(a)})):[{name:e.name,value:o.flatMap(([i,a])=>[i,$i(a)]).join(",")}]}}return{kind:"cookie",pairs:[{name:e.name,value:$i(t)}]}},Lxt=(e,t)=>{let r=oQ(e),n=_F(e),o=sI({contents:e.content});if(o)return{kind:"path",value:ia(cI(t,o))};if(Array.isArray(t))return r==="label"?{kind:"path",value:`.${t.map(i=>ia(i)).join(n?".":",")}`}:r==="matrix"?{kind:"path",value:n?t.map(i=>`;${encodeURIComponent(e.name)}=${ia(i)}`).join(""):`;${encodeURIComponent(e.name)}=${t.map(i=>ia(i)).join(",")}`}:{kind:"path",value:t.map(i=>ia(i)).join(",")};if(oI(t)){let i=aI(t);return r==="label"?{kind:"path",value:n?`.${i.map(([a,s])=>`${ia(a)}=${ia(s)}`).join(".")}`:`.${i.flatMap(([a,s])=>[ia(a),ia(s)]).join(",")}`}:r==="matrix"?{kind:"path",value:n?i.map(([a,s])=>`;${encodeURIComponent(a)}=${ia(s)}`).join(""):`;${encodeURIComponent(e.name)}=${i.flatMap(([a,s])=>[ia(a),ia(s)]).join(",")}`}:{kind:"path",value:n?i.map(([a,s])=>`${ia(a)}=${ia(s)}`).join(","):i.flatMap(([a,s])=>[ia(a),ia(s)]).join(",")}}return r==="label"?{kind:"path",value:`.${ia(t)}`}:r==="matrix"?{kind:"path",value:`;${encodeURIComponent(e.name)}=${ia(t)}`}:{kind:"path",value:ia(t)}},lI=(e,t)=>{switch(e.location){case"path":return Lxt(e,t);case"query":return Nxt(e,t);case"header":return Fxt(e,t);case"cookie":return Rxt(e,t)}},fF=(e,t)=>{if(t.length===0)return e.toString();let r=t.map(s=>`${encodeURIComponent(s.name)}=${Pxt(s.value,s.allowReserved===!0)}`).join("&"),n=e.toString(),[o,i]=n.split("#",2),a=o.includes("?")?o.endsWith("?")||o.endsWith("&")?"":"&":"?";return`${o}${a}${r}${i?`#${i}`:""}`},mF=e=>{let t=sI(e.requestBody)??"application/json";return iI(t)==="bytes"?{contentType:t,body:Oxt(e.body)}:{contentType:t,body:cI(e.body,t)}};import{FetchHttpClient as YVt,HttpClient as eKt,HttpClientRequest as tKt}from"@effect/platform";import*as hTe from"effect/Data";import*as sb from"effect/Effect";var iQ=class extends hTe.TaggedError("OpenApiToolInvocationError"){};var yTe=e=>{if(!(!e||e.length===0))return e.map(t=>({url:t.url,...t.description?{description:t.description}:{},...t.variables?{variables:t.variables}:{}}))},$xt=e=>{let t=Du.make(`scope_${hn({sourceId:e.source.id,toolId:e.operation.providerData.toolId,kind:"operation"})}`);return Vr(e.catalog.scopes)[t]={id:t,kind:"operation",parentId:e.parentScopeId,name:e.operation.title??e.operation.providerData.toolId,docs:In({summary:e.operation.title??e.operation.providerData.toolId,description:e.operation.description??void 0}),defaults:e.defaults,synthetic:!1,provenance:pn(e.documentId,`#/openapi/${e.operation.providerData.toolId}/scope`)},t},Mxt=e=>{let t=hm.make(`security_${hn({sourceId:e.source.id,provider:"openapi",schemeName:e.schemeName})}`);if(e.catalog.symbols[t])return t;let r=e.scheme,n=r?.scheme?.toLowerCase(),o=r?.schemeType==="apiKey"?"apiKey":r?.schemeType==="oauth2"?"oauth2":r?.schemeType==="http"&&n==="basic"?"basic":r?.schemeType==="http"&&n==="bearer"?"bearer":r?.schemeType==="openIdConnect"?"custom":r?.schemeType==="http"?"http":"custom",i=Object.fromEntries(Object.entries(r?.flows??{}).map(([c,p])=>[c,p])),a=Object.fromEntries(Object.entries(r?.flows??{}).flatMap(([,c])=>Object.entries(c.scopes??{}))),s=r?.description??(r?.openIdConnectUrl?`OpenID Connect: ${r.openIdConnectUrl}`:null);return Vr(e.catalog.symbols)[t]={id:t,kind:"securityScheme",schemeType:o,...In({summary:e.schemeName,description:s})?{docs:In({summary:e.schemeName,description:s})}:{},...r?.placementIn||r?.placementName?{placement:{...r?.placementIn?{in:r.placementIn}:{},...r?.placementName?{name:r.placementName}:{}}}:{},...o==="apiKey"&&r?.placementIn&&r?.placementName?{apiKey:{in:r.placementIn,name:r.placementName}}:{},...(o==="basic"||o==="bearer"||o==="http")&&r?.scheme?{http:{scheme:r.scheme,...r.bearerFormat?{bearerFormat:r.bearerFormat}:{}}}:{},...o==="oauth2"?{oauth:{...Object.keys(i).length>0?{flows:i}:{},...Object.keys(a).length>0?{scopes:a}:{}}}:{},...o==="custom"?{custom:{}}:{},synthetic:!1,provenance:pn(e.documentId,`#/openapi/securitySchemes/${e.schemeName}`)},t},gTe=e=>{let t=e.authRequirement;if(!t)return{kind:"none"};switch(t.kind){case"none":return{kind:"none"};case"scheme":return{kind:"scheme",schemeId:Mxt({catalog:e.catalog,source:e.source,documentId:e.documentId,schemeName:t.schemeName,scheme:e.schemesByName.get(t.schemeName)}),...t.scopes&&t.scopes.length>0?{scopes:[...t.scopes]}:{}};case"allOf":case"anyOf":return{kind:t.kind,items:t.items.map(r=>gTe({catalog:e.catalog,source:e.source,documentId:e.documentId,authRequirement:r,schemesByName:e.schemesByName}))}}},hF=e=>e.contents.map((t,r)=>{let n=(t.examples??[]).map((o,i)=>gm({catalog:e.catalog,source:e.source,documentId:e.documentId,pointer:`${e.pointerBase}/content/${r}/example/${i}`,name:o.label,summary:o.label,value:JSON.parse(o.valueJson)}));return{mediaType:t.mediaType,...t.schema!==void 0?{shapeId:e.importer.importSchema(t.schema,`${e.pointerBase}/content/${r}`,e.rootSchema)}:{},...n.length>0?{exampleIds:n}:{}}}),jxt=e=>{let t=mm.make(`header_${hn(e.idSeed)}`),r=(e.header.examples??[]).map((o,i)=>gm({catalog:e.catalog,source:e.source,documentId:e.documentId,pointer:`${e.pointer}/example/${i}`,name:o.label,summary:o.label,value:JSON.parse(o.valueJson)})),n=e.header.content?hF({catalog:e.catalog,source:e.source,documentId:e.documentId,importer:e.importer,rootSchema:e.rootSchema,contents:e.header.content,pointerBase:e.pointer}):void 0;return Vr(e.catalog.symbols)[t]={id:t,kind:"header",name:e.header.name,...In({description:e.header.description})?{docs:In({description:e.header.description})}:{},...typeof e.header.deprecated=="boolean"?{deprecated:e.header.deprecated}:{},...e.header.schema!==void 0?{schemaShapeId:e.importer.importSchema(e.header.schema,e.pointer,e.rootSchema)}:{},...n&&n.length>0?{content:n}:{},...r.length>0?{exampleIds:r}:{},...e.header.style?{style:e.header.style}:{},...typeof e.header.explode=="boolean"?{explode:e.header.explode}:{},synthetic:!1,provenance:pn(e.documentId,e.pointer)},t},Bxt=e=>{let t=g_(e.source,e.operation.providerData.toolId),r=Oc.make(`cap_${hn({sourceId:e.source.id,toolId:e.operation.providerData.toolId})}`),n=Qs.make(`exec_${hn({sourceId:e.source.id,toolId:e.operation.providerData.toolId,protocol:"http"})}`),o=e.operation.inputSchema??{},i=e.operation.outputSchema??{},a=[],s=new Map((e.operation.providerData.securitySchemes??[]).map(S=>[S.schemeName,S]));e.operation.providerData.invocation.parameters.forEach(S=>{let b=fm.make(`param_${hn({capabilityId:r,location:S.location,name:S.name})}`),E=PT(o,S.location,S.name),I=e.operation.providerData.documentation?.parameters.find(F=>F.name===S.name&&F.location===S.location),T=(I?.examples??[]).map((F,O)=>{let $=JSON.parse(F.valueJson);return gm({catalog:e.catalog,source:e.source,documentId:e.documentId,pointer:`#/openapi/${e.operation.providerData.toolId}/parameter/${S.location}/${S.name}/example/${O}`,name:F.label,summary:F.label,value:$})});a.push(...T);let k=S.content?hF({catalog:e.catalog,source:e.source,documentId:e.documentId,importer:e.importer,rootSchema:e.rootSchema,contents:S.content,pointerBase:`#/openapi/${e.operation.providerData.toolId}/parameter/${S.location}/${S.name}`}):void 0;Vr(e.catalog.symbols)[b]={id:b,kind:"parameter",name:S.name,location:S.location,required:S.required,...In({description:I?.description??null})?{docs:In({description:I?.description??null})}:{},...E!==void 0&&(!k||k.length===0)?{schemaShapeId:e.importer.importSchema(E,`#/openapi/${e.operation.providerData.toolId}/parameter/${S.location}/${S.name}`,e.rootSchema)}:{},...k&&k.length>0?{content:k}:{},...T.length>0?{exampleIds:T}:{},...S.style?{style:S.style}:{},...typeof S.explode=="boolean"?{explode:S.explode}:{},...typeof S.allowReserved=="boolean"?{allowReserved:S.allowReserved}:{},synthetic:!1,provenance:pn(e.documentId,`#/openapi/${e.operation.providerData.toolId}/parameter/${S.location}/${S.name}`)}});let c=e.operation.providerData.invocation.requestBody?rg.make(`request_body_${hn({capabilityId:r})}`):void 0;if(c){let S=fv(o),b=e.operation.providerData.invocation.requestBody?.contents?hF({catalog:e.catalog,source:e.source,documentId:e.documentId,importer:e.importer,rootSchema:e.rootSchema,contents:e.operation.providerData.invocation.requestBody.contents,pointerBase:`#/openapi/${e.operation.providerData.toolId}/requestBody`}):void 0,E=b?.flatMap(T=>T.exampleIds??[])??(e.operation.providerData.documentation?.requestBody?.examples??[]).map((T,k)=>gm({catalog:e.catalog,source:e.source,documentId:e.documentId,pointer:`#/openapi/${e.operation.providerData.toolId}/requestBody/example/${k}`,name:T.label,summary:T.label,value:JSON.parse(T.valueJson)}));a.push(...E);let I=b&&b.length>0?b:OT(e.operation.providerData.invocation.requestBody?.contentTypes).map(T=>({mediaType:T,...S!==void 0?{shapeId:e.importer.importSchema(S,`#/openapi/${e.operation.providerData.toolId}/requestBody`,e.rootSchema)}:{},...E.length>0?{exampleIds:E}:{}}));Vr(e.catalog.symbols)[c]={id:c,kind:"requestBody",...In({description:e.operation.providerData.documentation?.requestBody?.description??null})?{docs:In({description:e.operation.providerData.documentation?.requestBody?.description??null})}:{},required:e.operation.providerData.invocation.requestBody?.required??!1,contents:I,synthetic:!1,provenance:pn(e.documentId,`#/openapi/${e.operation.providerData.toolId}/requestBody`)}}let p=e.operation.providerData.responses??[],d=p.length>0?iB({catalog:e.catalog,variants:p.map((S,b)=>{let E=Nc.make(`response_${hn({capabilityId:r,statusCode:S.statusCode,responseIndex:b})}`),I=(S.examples??[]).map((F,O)=>gm({catalog:e.catalog,source:e.source,documentId:e.documentId,pointer:`#/openapi/${e.operation.providerData.toolId}/responses/${S.statusCode}/example/${O}`,name:F.label,summary:F.label,value:JSON.parse(F.valueJson)}));a.push(...I);let T=S.contents&&S.contents.length>0?hF({catalog:e.catalog,source:e.source,documentId:e.documentId,importer:e.importer,rootSchema:e.rootSchema,contents:S.contents,pointerBase:`#/openapi/${e.operation.providerData.toolId}/responses/${S.statusCode}`}):(()=>{let F=S.schema!==void 0?e.importer.importSchema(S.schema,`#/openapi/${e.operation.providerData.toolId}/responses/${S.statusCode}`,e.rootSchema):void 0,O=OT(S.contentTypes);return O.length>0?O.map(($,N)=>({mediaType:$,...F!==void 0&&N===0?{shapeId:F}:{},...I.length>0&&N===0?{exampleIds:I}:{}})):void 0})(),k=(S.headers??[]).map((F,O)=>jxt({catalog:e.catalog,source:e.source,documentId:e.documentId,importer:e.importer,rootSchema:e.rootSchema,pointer:`#/openapi/${e.operation.providerData.toolId}/responses/${S.statusCode}/headers/${F.name}`,idSeed:{capabilityId:r,responseId:E,headerIndex:O,headerName:F.name},header:F}));return Vr(e.catalog.symbols)[E]={id:E,kind:"response",...In({description:S.description??(b===0?e.operation.description:null)})?{docs:In({description:S.description??(b===0?e.operation.description:null)})}:{},...k.length>0?{headerIds:k}:{},...T&&T.length>0?{contents:T}:{},synthetic:!1,provenance:pn(e.documentId,`#/openapi/${e.operation.providerData.toolId}/responses/${S.statusCode}`)},{match:aB(S.statusCode),responseId:E}}),provenance:pn(e.documentId,`#/openapi/${e.operation.providerData.toolId}/responseSet`)}):(()=>{let S=Nc.make(`response_${hn({capabilityId:r})}`),b=(e.operation.providerData.documentation?.response?.examples??[]).map((E,I)=>gm({catalog:e.catalog,source:e.source,documentId:e.documentId,pointer:`#/openapi/${e.operation.providerData.toolId}/response/example/${I}`,name:E.label,summary:E.label,value:JSON.parse(E.valueJson)}));return a.push(...b),Vr(e.catalog.symbols)[S]={id:S,kind:"response",...In({description:e.operation.providerData.documentation?.response?.description??e.operation.description})?{docs:In({description:e.operation.providerData.documentation?.response?.description??e.operation.description})}:{},contents:[{mediaType:OT(e.operation.providerData.documentation?.response?.contentTypes)[0]??"application/json",...e.operation.outputSchema!==void 0?{shapeId:e.importer.importSchema(i,`#/openapi/${e.operation.providerData.toolId}/response`)}:{},...b.length>0?{exampleIds:b}:{}}],synthetic:!1,provenance:pn(e.documentId,`#/openapi/${e.operation.providerData.toolId}/response`)},v_({catalog:e.catalog,responseId:S,provenance:pn(e.documentId,`#/openapi/${e.operation.providerData.toolId}/responseSet`)})})(),f=e.operation.inputSchema!==void 0?e.importer.importSchema(e.operation.inputSchema,`#/openapi/${e.operation.providerData.toolId}/call`,e.operation.inputSchema):e.importer.importSchema({type:"object",additionalProperties:!1},`#/openapi/${e.operation.providerData.toolId}/call`),m={id:n,capabilityId:r,scopeId:(()=>{let S=yTe(e.operation.providerData.servers);return!S||S.length===0?e.serviceScopeId:$xt({catalog:e.catalog,source:e.source,documentId:e.documentId,parentScopeId:e.serviceScopeId,operation:e.operation,defaults:{servers:S}})})(),adapterKey:"openapi",bindingVersion:Ca,binding:e.operation.providerData,projection:{responseSetId:d,callShapeId:f},display:{protocol:"http",method:e.operation.providerData.invocation.method.toUpperCase(),pathTemplate:e.operation.providerData.invocation.pathTemplate,operationId:e.operation.providerData.operationId??null,group:e.operation.providerData.group,leaf:e.operation.providerData.leaf,rawToolId:e.operation.providerData.rawToolId,title:e.operation.title??null,summary:e.operation.description??null},synthetic:!1,provenance:pn(e.documentId,`#/openapi/${e.operation.providerData.toolId}/executable`)};Vr(e.catalog.executables)[n]=m;let y=e.operation.effect,g=gTe({catalog:e.catalog,source:e.source,documentId:e.documentId,authRequirement:e.operation.providerData.authRequirement,schemesByName:s});Vr(e.catalog.capabilities)[r]={id:r,serviceScopeId:e.serviceScopeId,surface:{toolPath:t,...e.operation.title?{title:e.operation.title}:{},...e.operation.description?{summary:e.operation.description}:{},...e.operation.providerData.tags.length>0?{tags:e.operation.providerData.tags}:{}},semantics:{effect:y,safe:y==="read",idempotent:y==="read"||y==="delete",destructive:y==="delete"},auth:g,interaction:S_(y),executableIds:[n],...a.length>0?{exampleIds:a}:{},synthetic:!1,provenance:pn(e.documentId,`#/openapi/${e.operation.providerData.toolId}/capability`)}},STe=e=>{let t=(()=>{let r=e.documents[0]?.contentText;if(r)try{return JSON.parse(r)}catch{return}})();return b_({source:e.source,documents:e.documents,resourceDialectUri:"https://json-schema.org/draft/2020-12/schema",serviceScopeDefaults:(()=>{let r=yTe(e.operations.find(n=>(n.providerData.documentServers??[]).length>0)?.providerData.documentServers);return r?{servers:r}:void 0})(),registerOperations:({catalog:r,documentId:n,serviceScopeId:o,importer:i})=>{for(let a of e.operations)Bxt({catalog:r,source:e.source,documentId:n,serviceScopeId:o,operation:a,importer:i,rootSchema:t})}})};import{FetchHttpClient as qxt,HttpClient as Uxt,HttpClientRequest as vTe}from"@effect/platform";import*as ci from"effect/Effect";import*as to from"effect/Schema";var zxt=to.extend(B6,to.extend(bm,to.Struct({kind:to.Literal("openapi"),specUrl:to.Trim.pipe(to.nonEmptyString()),auth:to.optional(T_)}))),Jxt=to.extend(bm,to.Struct({kind:to.Literal("openapi"),endpoint:to.String,specUrl:to.String,name:Ho,namespace:Ho,auth:to.optional(T_)})),bTe=to.Struct({specUrl:to.Trim.pipe(to.nonEmptyString()),defaultHeaders:to.optional(to.NullOr(Qr))}),Vxt=to.Struct({specUrl:to.optional(to.String),defaultHeaders:to.optional(to.NullOr(Qr))}),uI=1,Kxt=(e,t)=>e!==null&&typeof e=="object"&&!Array.isArray(e)&&t.some(r=>Object.prototype.hasOwnProperty.call(e,r)),xS=e=>ci.gen(function*(){if(Kxt(e.binding,["transport","queryParams","headers"]))return yield*Co("openapi/adapter","OpenAPI sources cannot define MCP transport settings");let t=yield*Mp({sourceId:e.id,label:"OpenAPI",version:e.bindingVersion,expectedVersion:uI,schema:Vxt,value:e.binding,allowedKeys:["specUrl","defaultHeaders"]}),r=typeof t.specUrl=="string"?t.specUrl.trim():"";return r.length===0?yield*Co("openapi/adapter","OpenAPI sources require specUrl"):{specUrl:r,defaultHeaders:t.defaultHeaders??null}}),Gxt=e=>ci.gen(function*(){let t=yield*Uxt.HttpClient,r=vTe.get(gu({url:e.url,queryParams:e.queryParams}).toString()).pipe(vTe.setHeaders(Tc({headers:e.headers??{},cookies:e.cookies}))),n=yield*t.execute(r).pipe(ci.mapError(o=>o instanceof Error?o:new Error(String(o))));return n.status===401||n.status===403?yield*new E_("import",`OpenAPI spec fetch requires credentials (status ${n.status})`):n.status<200||n.status>=300?yield*Co("openapi/adapter",`OpenAPI spec fetch failed with status ${n.status}`):yield*n.text.pipe(ci.mapError(o=>o instanceof Error?o:new Error(String(o))))}).pipe(ci.provide(qxt.layer)),Hxt=e=>typeof e=="object"&&e!==null&&!Array.isArray(e)?e:{},Zxt={path:["path","pathParams","params"],query:["query","queryParams","params"],header:["headers","header"],cookie:["cookies","cookie"]},xTe=(e,t)=>{let r=e[t.name];if(r!==void 0)return r;for(let n of Zxt[t.location]){let o=e[n];if(typeof o!="object"||o===null||Array.isArray(o))continue;let i=o[t.name];if(i!==void 0)return i}},Wxt=(e,t,r)=>{let n=e;for(let a of r.parameters){if(a.location!=="path")continue;let s=xTe(t,a);if(s==null){if(a.required)throw new Error(`Missing required path parameter: ${a.name}`);continue}let c=lI(a,s);n=n.replaceAll(`{${a.name}}`,c.kind==="path"?c.value:encodeURIComponent(String(s)))}let o=[...n.matchAll(/\{([^{}]+)\}/g)].map(a=>a[1]).filter(a=>typeof a=="string"&&a.length>0);for(let a of o){let s=t[a]??(typeof t.path=="object"&&t.path!==null&&!Array.isArray(t.path)?t.path[a]:void 0)??(typeof t.pathParams=="object"&&t.pathParams!==null&&!Array.isArray(t.pathParams)?t.pathParams[a]:void 0)??(typeof t.params=="object"&&t.params!==null&&!Array.isArray(t.params)?t.params[a]:void 0);s!=null&&(n=n.replaceAll(`{${a}}`,encodeURIComponent(String(s))))}let i=[...n.matchAll(/\{([^{}]+)\}/g)].map(a=>a[1]).filter(a=>typeof a=="string"&&a.length>0);if(i.length>0){let a=[...new Set(i)].sort().join(", ");throw new Error(`Unresolved path parameters after substitution: ${a}`)}return n},Qxt=e=>{let t={};return e.headers.forEach((r,n)=>{t[n]=r}),t},Xxt=async e=>{if(e.status===204)return null;let t=iI(e.headers.get("content-type"));return t==="json"?e.json():t==="bytes"?new Uint8Array(await e.arrayBuffer()):e.text()},Yxt=e=>{let t=e.providerData.servers?.[0]??e.providerData.documentServers?.[0];if(!t)return new URL(e.endpoint).toString();let r=Object.entries(t.variables??{}).reduce((n,[o,i])=>n.replaceAll(`{${o}}`,i),t.url);return new URL(r,e.endpoint).toString()},eEt=(e,t)=>{try{return new URL(t)}catch{let r=new URL(e),n=r.pathname==="/"?"":r.pathname.endsWith("/")?r.pathname.slice(0,-1):r.pathname,o=t.startsWith("/")?t:`/${t}`;return r.pathname=`${n}${o}`.replace(/\/{2,}/g,"/"),r.search="",r.hash="",r}},tEt=e=>{let t=dF({definition:e.definition,refHintTable:e.refHintTable}),r=e.definition.method.toUpperCase();return{toolId:e.definition.toolId,title:e.definition.name,description:e.definition.description,effect:r==="GET"||r==="HEAD"?"read":r==="DELETE"?"delete":"write",inputSchema:t.inputSchema,outputSchema:t.outputSchema,providerData:t.providerData}},ETe={key:"openapi",displayName:"OpenAPI",catalogKind:"imported",connectStrategy:"direct",credentialStrategy:"credential_managed",bindingConfigVersion:uI,providerKey:"generic_http",defaultImportAuthPolicy:"reuse_runtime",connectPayloadSchema:zxt,executorAddInputSchema:Jxt,executorAddHelpText:["endpoint is the base API URL. specUrl is the OpenAPI document URL."],executorAddInputSignatureWidth:420,localConfigBindingSchema:ZW,localConfigBindingFromSource:e=>ci.runSync(ci.map(xS(e),t=>({specUrl:t.specUrl,defaultHeaders:t.defaultHeaders}))),serializeBindingConfig:e=>Lp({adapterKey:"openapi",version:uI,payloadSchema:bTe,payload:ci.runSync(xS(e))}),deserializeBindingConfig:({id:e,bindingConfigJson:t})=>ci.map($p({sourceId:e,label:"OpenAPI",adapterKey:"openapi",version:uI,payloadSchema:bTe,value:t}),({version:r,payload:n})=>({version:r,payload:{specUrl:n.specUrl,defaultHeaders:n.defaultHeaders??null}})),bindingStateFromSource:e=>ci.map(xS(e),t=>({...Rp,specUrl:t.specUrl,defaultHeaders:t.defaultHeaders})),sourceConfigFromSource:e=>ci.runSync(ci.map(xS(e),t=>({kind:"openapi",endpoint:e.endpoint,specUrl:t.specUrl,defaultHeaders:t.defaultHeaders}))),validateSource:e=>ci.gen(function*(){let t=yield*xS(e);return{...e,bindingVersion:uI,binding:{specUrl:t.specUrl,defaultHeaders:t.defaultHeaders}}}),shouldAutoProbe:e=>e.enabled&&(e.status==="draft"||e.status==="probing"),discoveryPriority:({normalizedUrl:e})=>ym(e)?50:250,detectSource:({normalizedUrl:e,headers:t})=>HW({normalizedUrl:e,headers:t}),syncCatalog:({source:e,resolveAuthMaterialForSlot:t})=>ci.gen(function*(){let r=yield*xS(e),n=yield*t("import"),o=yield*Gxt({url:r.specUrl,headers:{...r.defaultHeaders,...n.headers},queryParams:n.queryParams,cookies:n.cookies}).pipe(ci.mapError(c=>D_(c)?c:new Error(`Failed fetching OpenAPI spec for ${e.id}: ${c.message}`))),i=yield*ib(e.name,o).pipe(ci.mapError(c=>c instanceof Error?c:new Error(String(c)))),a=uF(i),s=Date.now();return Fp({fragment:STe({source:e,documents:[{documentKind:"openapi",documentKey:r.specUrl,contentText:o,fetchedAt:s}],operations:a.map(c=>tEt({definition:c,refHintTable:i.refHintTable}))}),importMetadata:Is({source:e,adapterKey:"openapi"}),sourceHash:i.sourceHash})}),invoke:e=>ci.tryPromise({try:async()=>{let t=ci.runSync(xS(e.source)),r=xm({executableId:e.executable.id,label:"OpenAPI",version:e.executable.bindingVersion,expectedVersion:Ca,schema:jW,value:e.executable.binding}),n=Hxt(e.args),o=Wxt(r.invocation.pathTemplate,n,r.invocation),i={...t.defaultHeaders},a=[],s=[];for(let S of r.invocation.parameters){if(S.location==="path")continue;let b=xTe(n,S);if(b==null){if(S.required)throw new Error(`Missing required ${S.location} parameter ${S.name}`);continue}let E=lI(S,b);if(E.kind==="query"){a.push(...E.entries);continue}if(E.kind==="header"){i[S.name]=E.value;continue}E.kind==="cookie"&&s.push(...E.pairs.map(I=>`${I.name}=${encodeURIComponent(I.value)}`))}let c;if(r.invocation.requestBody){let S=n.body??n.input;if(S!==void 0){let b=mF({requestBody:r.invocation.requestBody,body:n_({body:S,bodyValues:e.auth.bodyValues,label:`${r.method.toUpperCase()} ${r.path}`})});i["content-type"]=b.contentType,c=b.body}}let p=eEt(Yxt({endpoint:e.source.endpoint,providerData:r}),o),d=gu({url:p,queryParams:e.auth.queryParams}),f=fF(d,a),m=Tc({headers:{...i,...e.auth.headers},cookies:{...e.auth.cookies}});if(s.length>0){let S=m.cookie;m.cookie=S?`${S}; ${s.join("; ")}`:s.join("; ")}let y=await fetch(f.toString(),{method:r.method.toUpperCase(),headers:m,...c!==void 0?{body:typeof c=="string"?c:new Uint8Array(c).buffer}:{}}),g=await Xxt(y);return{data:y.ok?g:null,error:y.ok?null:g,headers:Qxt(y),status:y.status}},catch:t=>t instanceof Error?t:new Error(String(t))})};var TTe=[ETe,K1e,fge,hce];import*as Yl from"effect/Effect";import*as ATe from"effect/Schema";var aQ=ATe.Struct({}),pI=1,rEt=(e,t)=>e!==null&&typeof e=="object"&&!Array.isArray(e)&&t.some(r=>Object.prototype.hasOwnProperty.call(e,r)),DTe=e=>Yl.gen(function*(){return rEt(e.binding,["specUrl","defaultHeaders","transport","queryParams","headers"])?yield*Ne("sources/source-adapters/internal","internal sources cannot define HTTP source settings"):yield*Mp({sourceId:e.id,label:"internal",version:e.bindingVersion,expectedVersion:pI,schema:aQ,value:e.binding,allowedKeys:[]})}),ITe={key:"internal",displayName:"Internal",catalogKind:"internal",connectStrategy:"none",credentialStrategy:"none",bindingConfigVersion:pI,providerKey:"generic_internal",defaultImportAuthPolicy:"none",connectPayloadSchema:null,executorAddInputSchema:null,executorAddHelpText:null,executorAddInputSignatureWidth:null,localConfigBindingSchema:null,localConfigBindingFromSource:()=>null,serializeBindingConfig:e=>Lp({adapterKey:e.kind,version:pI,payloadSchema:aQ,payload:Yl.runSync(DTe(e))}),deserializeBindingConfig:({id:e,bindingConfigJson:t})=>Yl.map($p({sourceId:e,label:"internal",adapterKey:"internal",version:pI,payloadSchema:aQ,value:t}),({version:r,payload:n})=>({version:r,payload:n})),bindingStateFromSource:()=>Yl.succeed(Rp),sourceConfigFromSource:e=>({kind:"internal",endpoint:e.endpoint}),validateSource:e=>Yl.gen(function*(){return yield*DTe(e),{...e,bindingVersion:pI,binding:{}}}),shouldAutoProbe:()=>!1,syncCatalog:({source:e})=>Yl.succeed(Fp({fragment:{version:"ir.v1.fragment"},importMetadata:{...Is({source:e,adapterKey:"internal"}),importerVersion:"ir.v1.internal",sourceConfigHash:"internal"},sourceHash:null})),invoke:()=>Yl.fail(Ne("sources/source-adapters/internal","Internal sources do not support persisted adapter invocation"))};var yF=[...TTe,ITe],Qc=Ose(yF),nEt=Qc.connectableSourceAdapters,tGt=Qc.connectPayloadSchema,sQ=Qc.executorAddableSourceAdapters,gF=Qc.executorAddInputSchema,oEt=Qc.localConfigurableSourceAdapters,gf=Qc.getSourceAdapter,_i=Qc.getSourceAdapterForSource,cQ=Qc.findSourceAdapterByProviderKey,Vh=Qc.sourceBindingStateFromSource,iEt=Qc.sourceAdapterCatalogKind,Kh=Qc.sourceAdapterRequiresInteractiveConnect,ES=Qc.sourceAdapterUsesCredentialManagedAuth,aEt=Qc.isInternalSourceAdapter;import*as Sf from"effect/Effect";var wTe=e=>`${e.providerId}:${e.handle}`,SF=(e,t,r)=>Sf.gen(function*(){if(t.previous===null)return;let n=new Set((t.next===null?[]:JT(t.next)).map(wTe)),o=JT(t.previous).filter(i=>!n.has(wTe(i)));yield*Sf.forEach(o,i=>Sf.either(r(i)),{discard:!0})}),vF=e=>new Set(e.flatMap(t=>t?[Up(t)]:[]).flatMap(t=>t?[t.grantId]:[])),lQ=e=>{let t=e.authArtifacts.filter(r=>r.slot===e.slot);if(e.actorScopeId!==void 0){let r=t.find(n=>n.actorScopeId===e.actorScopeId);if(r)return r}return t.find(r=>r.actorScopeId===null)??null},uQ=e=>e.authArtifacts.find(t=>t.slot===e.slot&&t.actorScopeId===(e.actorScopeId??null))??null,kTe=(e,t,r)=>Sf.gen(function*(){let n=yield*e.authArtifacts.listByScopeAndSourceId({scopeId:t.scopeId,sourceId:t.sourceId});return yield*e.authArtifacts.removeByScopeAndSourceId({scopeId:t.scopeId,sourceId:t.sourceId}),yield*Sf.forEach(n,o=>k_(e,{authArtifactId:o.id},r),{discard:!0}),yield*Sf.forEach(n,o=>SF(e,{previous:o,next:null},r),{discard:!0}),n.length});var pQ="config:",dQ=e=>`${pQ}${e}`,dI=e=>e.startsWith(pQ)?e.slice(pQ.length):null;var sEt=/[^a-z0-9]+/g,CTe=e=>e.trim().toLowerCase().replace(sEt,"-").replace(/^-+/,"").replace(/-+$/,"");var eu=e=>{if(e==null)return null;let t=e.trim();return t.length>0?t:null},bF=e=>JSON.parse(JSON.stringify(e)),PTe=(e,t)=>{let r=eu(e.namespace)??eu(e.name)??"source",n=CTe(r)||"source",o=n,i=2;for(;t.has(o);)o=`${n}-${i}`,i+=1;return Mn.make(o)},cEt=e=>{let t=eu(e?.secrets?.defaults?.env);return t!==null&&e?.secrets?.providers?.[t]?t:e?.secrets?.providers?.default?"default":null},OTe=e=>{if(e.auth===void 0)return e.existing??{kind:"none"};if(typeof e.auth=="string"){let t=cEt(e.config);return{kind:"bearer",headerName:"Authorization",prefix:"Bearer ",token:{providerId:t?dQ(t):"env",handle:e.auth}}}if(typeof e.auth=="object"&&e.auth!==null){let t=e.auth,r=eu(t.provider),n=r?r==="params"?"params":dQ(r):t.source==="env"?"env":t.source==="params"?"params":null,o=eu(t.id);if(n&&o)return{kind:"bearer",headerName:"Authorization",prefix:"Bearer ",token:{providerId:n,handle:o}}}return e.existing??{kind:"none"}},lEt=e=>{if(e.source.auth.kind!=="bearer")return e.existingConfigAuth;if(e.source.auth.token.providerId==="env")return e.source.auth.token.handle;if(e.source.auth.token.providerId==="params")return{source:"params",provider:"params",id:e.source.auth.token.handle};let t=dI(e.source.auth.token.providerId);if(t!==null){let r=e.config?.secrets?.providers?.[t];if(r)return{source:r.source,provider:t,id:e.source.auth.token.handle}}return e.existingConfigAuth},NTe=e=>{let t=lEt({source:e.source,existingConfigAuth:e.existingConfigAuth,config:e.config}),r={...eu(e.source.name)!==eu(e.source.id)?{name:e.source.name}:{},...eu(e.source.namespace)!==eu(e.source.id)?{namespace:e.source.namespace??void 0}:{},...e.source.enabled===!1?{enabled:!1}:{},connection:{endpoint:e.source.endpoint,...t!==void 0?{auth:t}:{}}},n=_i(e.source);if(n.localConfigBindingSchema===null)throw new o3({message:`Unsupported source kind for local config: ${e.source.kind}`,kind:e.source.kind});return{kind:e.source.kind,...r,binding:bF(n.localConfigBindingFromSource(e.source))}};var _Q=e=>Mi.gen(function*(){let t=e.loadedConfig.config?.sources?.[e.sourceId];if(!t)return yield*new KT({message:`Configured source not found for id ${e.sourceId}`,sourceId:e.sourceId});let r=e.scopeState.sources[e.sourceId],n=gf(t.kind),o=yield*n.validateSource({id:Mn.make(e.sourceId),scopeId:e.scopeId,name:eu(t.name)??e.sourceId,kind:t.kind,endpoint:t.connection.endpoint.trim(),status:r?.status??(t.enabled??!0?"connected":"draft"),enabled:t.enabled??!0,namespace:eu(t.namespace)??e.sourceId,bindingVersion:n.bindingConfigVersion,binding:t.binding,importAuthPolicy:n.defaultImportAuthPolicy,importAuth:{kind:"none"},auth:OTe({auth:t.connection.auth,config:e.loadedConfig.config,existing:null}),sourceHash:r?.sourceHash??null,lastError:r?.lastError??null,createdAt:r?.createdAt??Date.now(),updatedAt:r?.updatedAt??Date.now()}),i=lQ({authArtifacts:e.authArtifacts.filter(c=>c.sourceId===o.id),actorScopeId:e.actorScopeId,slot:"runtime"}),a=lQ({authArtifacts:e.authArtifacts.filter(c=>c.sourceId===o.id),actorScopeId:e.actorScopeId,slot:"import"});return{source:{...o,auth:i===null?o.auth:X6(i),importAuth:o.importAuthPolicy==="separate"?a===null?o.importAuth:X6(a):{kind:"none"}},sourceId:e.sourceId}}),xF=(e,t,r={})=>Mi.gen(function*(){let n=yield*Kg(e,t),o=yield*e.executorState.authArtifacts.listByScopeId(t),i=yield*Mi.forEach(Object.keys(n.loadedConfig.config?.sources??{}),a=>Mi.map(_Q({scopeId:t,loadedConfig:n.loadedConfig,scopeState:n.scopeState,sourceId:Mn.make(a),actorScopeId:r.actorScopeId,authArtifacts:o}),({source:s})=>s));return yield*Mi.annotateCurrentSpan("executor.source.count",i.length),i}).pipe(Mi.withSpan("source.store.load_scope",{attributes:{"executor.scope.id":t}})),fQ=(e,t,r={})=>Mi.gen(function*(){let n=yield*Kg(e,t),o=yield*xF(e,t,r),i=yield*Mi.forEach(o,a=>Mi.map(e.sourceArtifactStore.read({sourceId:a.id}),s=>s===null?null:{source:a,snapshot:s.snapshot}));yield*e.sourceTypeDeclarationsRefresher.refreshWorkspaceInBackground({entries:i.filter(a=>a!==null)})}).pipe(Mi.withSpan("source.types.refresh_scope.schedule",{attributes:{"executor.scope.id":t}})),FTe=e=>e.enabled===!1||e.status==="auth_required"||e.status==="error"||e.status==="draft",RTe=(e,t,r={})=>Mi.gen(function*(){let[n,o,i]=yield*Mi.all([xF(e,t,{actorScopeId:r.actorScopeId}),e.executorState.authArtifacts.listByScopeId(t),e.executorState.secretMaterials.listAll().pipe(Mi.map(c=>new Set(c.map(p=>String(p.id)))))]),a=new Map(n.map(c=>[c.id,c.name])),s=new Map;for(let c of o)for(let p of JT(c)){if(!i.has(p.handle))continue;let d=s.get(p.handle)??[];d.some(f=>f.sourceId===c.sourceId)||(d.push({sourceId:c.sourceId,sourceName:a.get(c.sourceId)??c.sourceId}),s.set(p.handle,d))}return s}),EF=(e,t)=>Mi.gen(function*(){let r=yield*Kg(e,t.scopeId),n=yield*e.executorState.authArtifacts.listByScopeId(t.scopeId);return r.loadedConfig.config?.sources?.[t.sourceId]?(yield*_Q({scopeId:t.scopeId,loadedConfig:r.loadedConfig,scopeState:r.scopeState,sourceId:t.sourceId,actorScopeId:t.actorScopeId,authArtifacts:n})).source:yield*new KT({message:`Source not found: scopeId=${t.scopeId} sourceId=${t.sourceId}`,sourceId:t.sourceId})}).pipe(Mi.withSpan("source.store.load_by_id",{attributes:{"executor.scope.id":t.scopeId,"executor.source.id":t.sourceId}}));import*as bf from"effect/Effect";import*as wd from"effect/Effect";import*as mQ from"effect/Option";var uEt=e=>Up(e),pEt=e=>uEt(e)?.grantId??null,hQ=(e,t)=>wd.map(e.authArtifacts.listByScopeId(t.scopeId),r=>r.filter(n=>{let o=pEt(n);return o!==null&&(t.grantId==null||o===t.grantId)})),LTe=(e,t)=>wd.gen(function*(){let r=yield*e.providerAuthGrants.getById(t.grantId);return mQ.isNone(r)||r.value.orphanedAt===null?!1:(yield*e.providerAuthGrants.upsert({...r.value,orphanedAt:null,updatedAt:Date.now()}),!0)}),yQ=(e,t)=>wd.gen(function*(){if((yield*hQ(e,t)).length>0)return!1;let n=yield*e.providerAuthGrants.getById(t.grantId);if(mQ.isNone(n)||n.value.scopeId!==t.scopeId)return!1;let o=n.value;return o.orphanedAt!==null?!1:(yield*e.providerAuthGrants.upsert({...o,orphanedAt:Date.now(),updatedAt:Date.now()}),!0)}),$Te=(e,t,r)=>wd.gen(function*(){yield*r(t.grant.refreshToken).pipe(wd.either,wd.ignore)});import*as op from"effect/Effect";var bn=e=>{if(e==null)return null;let t=e.trim();return t.length>0?t:null},MTe=e=>_i(e).sourceConfigFromSource(e),dEt=e=>_i(e).catalogKind,_Et=e=>_i(e).key,fEt=e=>_i(e).providerKey,jTe=e=>Dc(e).slice(0,24),mEt=e=>JSON.stringify({catalogKind:dEt(e),adapterKey:_Et(e),providerKey:fEt(e),sourceConfig:MTe(e)}),BTe=e=>JSON.stringify(MTe(e)),DF=e=>Rc.make(`src_catalog_${jTe(mEt(e))}`),gQ=e=>Tm.make(`src_catalog_rev_${jTe(BTe(e))}`),TF=e=>op.gen(function*(){if(e===void 0||e.kind==="none")return{kind:"none"};if(e.kind==="bearer"){let a=bn(e.headerName)??"Authorization",s=e.prefix??"Bearer ",c=bn(e.token.providerId),p=bn(e.token.handle);return c===null||p===null?yield*Ne("sources/source-definitions","Bearer auth requires a token secret ref"):{kind:"bearer",headerName:a,prefix:s,token:{providerId:c,handle:p}}}if(e.kind==="oauth2_authorized_user"){let a=bn(e.headerName)??"Authorization",s=e.prefix??"Bearer ",c=bn(e.refreshToken.providerId),p=bn(e.refreshToken.handle);if(c===null||p===null)return yield*Ne("sources/source-definitions","OAuth2 authorized-user auth requires a refresh token secret ref");let d=null;if(e.clientSecret!==null){let y=bn(e.clientSecret.providerId),g=bn(e.clientSecret.handle);if(y===null||g===null)return yield*Ne("sources/source-definitions","OAuth2 authorized-user client secret ref must include providerId and handle");d={providerId:y,handle:g}}let f=bn(e.tokenEndpoint),m=bn(e.clientId);return f===null||m===null?yield*Ne("sources/source-definitions","OAuth2 authorized-user auth requires tokenEndpoint and clientId"):{kind:"oauth2_authorized_user",headerName:a,prefix:s,tokenEndpoint:f,clientId:m,clientAuthentication:e.clientAuthentication,clientSecret:d,refreshToken:{providerId:c,handle:p},grantSet:e.grantSet??null}}if(e.kind==="provider_grant_ref"){let a=bn(e.headerName)??"Authorization",s=e.prefix??"Bearer ",c=bn(e.grantId);return c===null?yield*Ne("sources/source-definitions","Provider grant auth requires a grantId"):{kind:"provider_grant_ref",grantId:Bp.make(c),providerKey:bn(e.providerKey)??"",requiredScopes:e.requiredScopes.map(p=>p.trim()).filter(p=>p.length>0),headerName:a,prefix:s}}if(e.kind==="mcp_oauth"){let a=bn(e.redirectUri),s=bn(e.accessToken.providerId),c=bn(e.accessToken.handle);if(a===null||s===null||c===null)return yield*Ne("sources/source-definitions","MCP OAuth auth requires redirectUri and access token secret ref");let p=null;if(e.refreshToken!==null){let f=bn(e.refreshToken.providerId),m=bn(e.refreshToken.handle);if(f===null||m===null)return yield*Ne("sources/source-definitions","MCP OAuth refresh token ref must include providerId and handle");p={providerId:f,handle:m}}let d=bn(e.tokenType)??"Bearer";return{kind:"mcp_oauth",redirectUri:a,accessToken:{providerId:s,handle:c},refreshToken:p,tokenType:d,expiresIn:e.expiresIn??null,scope:bn(e.scope),resourceMetadataUrl:bn(e.resourceMetadataUrl),authorizationServerUrl:bn(e.authorizationServerUrl),resourceMetadataJson:bn(e.resourceMetadataJson),authorizationServerMetadataJson:bn(e.authorizationServerMetadataJson),clientInformationJson:bn(e.clientInformationJson)}}let t=bn(e.headerName)??"Authorization",r=e.prefix??"Bearer ",n=bn(e.accessToken.providerId),o=bn(e.accessToken.handle);if(n===null||o===null)return yield*Ne("sources/source-definitions","OAuth2 auth requires an access token secret ref");let i=null;if(e.refreshToken!==null){let a=bn(e.refreshToken.providerId),s=bn(e.refreshToken.handle);if(a===null||s===null)return yield*Ne("sources/source-definitions","OAuth2 refresh token ref must include providerId and handle");i={providerId:a,handle:s}}return{kind:"oauth2",headerName:t,prefix:r,accessToken:{providerId:n,handle:o},refreshToken:i}}),qTe=(e,t)=>t??gf(e).defaultImportAuthPolicy,hEt=e=>op.gen(function*(){return e.importAuthPolicy!=="separate"&&e.importAuth.kind!=="none"?yield*Ne("sources/source-definitions","importAuth must be none unless importAuthPolicy is separate"):e}),UTe=e=>op.flatMap(hEt(e),t=>op.map(_i(t).validateSource(t),r=>r)),TS=e=>op.gen(function*(){let t=yield*TF(e.payload.auth),r=yield*TF(e.payload.importAuth),n=qTe(e.payload.kind,e.payload.importAuthPolicy);return yield*UTe({id:e.sourceId,scopeId:e.scopeId,name:e.payload.name.trim(),kind:e.payload.kind,endpoint:e.payload.endpoint.trim(),status:e.payload.status??"draft",enabled:e.payload.enabled??!0,namespace:bn(e.payload.namespace),bindingVersion:gf(e.payload.kind).bindingConfigVersion,binding:e.payload.binding??{},importAuthPolicy:n,importAuth:r,auth:t,sourceHash:bn(e.payload.sourceHash),lastError:bn(e.payload.lastError),createdAt:e.now,updatedAt:e.now})}),vf=e=>op.gen(function*(){let t=e.payload.auth===void 0?e.source.auth:yield*TF(e.payload.auth),r=e.payload.importAuth===void 0?e.source.importAuth:yield*TF(e.payload.importAuth),n=qTe(e.source.kind,e.payload.importAuthPolicy??e.source.importAuthPolicy);return yield*UTe({...e.source,name:e.payload.name!==void 0?e.payload.name.trim():e.source.name,endpoint:e.payload.endpoint!==void 0?e.payload.endpoint.trim():e.source.endpoint,status:e.payload.status??e.source.status,enabled:e.payload.enabled??e.source.enabled,namespace:e.payload.namespace!==void 0?bn(e.payload.namespace):e.source.namespace,bindingVersion:e.payload.binding!==void 0?gf(e.source.kind).bindingConfigVersion:e.source.bindingVersion,binding:e.payload.binding!==void 0?e.payload.binding:e.source.binding,importAuthPolicy:n,importAuth:r,auth:t,sourceHash:e.payload.sourceHash!==void 0?bn(e.payload.sourceHash):e.source.sourceHash,lastError:e.payload.lastError!==void 0?bn(e.payload.lastError):e.source.lastError,updatedAt:e.now})});var zTe=e=>({id:e.catalogRevisionId??gQ(e.source),catalogId:e.catalogId,revisionNumber:e.revisionNumber,sourceConfigJson:BTe(e.source),importMetadataJson:e.importMetadataJson??null,importMetadataHash:e.importMetadataHash??null,snapshotHash:e.snapshotHash??null,createdAt:e.source.createdAt,updatedAt:e.source.updatedAt}),JTe=e=>({sourceRecord:{id:e.source.id,scopeId:e.source.scopeId,catalogId:e.catalogId,catalogRevisionId:e.catalogRevisionId,name:e.source.name,kind:e.source.kind,endpoint:e.source.endpoint,status:e.source.status,enabled:e.source.enabled,namespace:e.source.namespace,importAuthPolicy:e.source.importAuthPolicy,bindingConfigJson:_i(e.source).serializeBindingConfig(e.source),sourceHash:e.source.sourceHash,lastError:e.source.lastError,createdAt:e.source.createdAt,updatedAt:e.source.updatedAt},runtimeAuthArtifact:zT({source:e.source,auth:e.source.auth,slot:"runtime",actorScopeId:e.actorScopeId,existingAuthArtifactId:e.existingRuntimeAuthArtifactId??cg.make(`auth_art_${crypto.randomUUID()}`)}),importAuthArtifact:e.source.importAuthPolicy==="separate"?zT({source:e.source,auth:e.source.importAuth,slot:"import",actorScopeId:e.actorScopeId,existingAuthArtifactId:e.existingImportAuthArtifactId??cg.make(`auth_art_${crypto.randomUUID()}`)}):null});var VTe=(e,t,r)=>bf.gen(function*(){let n=yield*Kg(e,t.scopeId);if(!n.loadedConfig.config?.sources?.[t.sourceId])return!1;let o=bF(n.loadedConfig.projectConfig??{}),i={...o.sources};delete i[t.sourceId],yield*n.scopeConfigStore.writeProject({config:{...o,sources:i}});let{[t.sourceId]:a,...s}=n.scopeState.sources,c={...n.scopeState,sources:s};yield*n.scopeStateStore.write({state:c}),yield*n.sourceArtifactStore.remove({sourceId:t.sourceId});let p=yield*e.executorState.authArtifacts.listByScopeAndSourceId({scopeId:t.scopeId,sourceId:t.sourceId}),d=vF(p);return yield*e.executorState.sourceAuthSessions.removeByScopeAndSourceId(t.scopeId,t.sourceId),yield*e.executorState.sourceOauthClients.removeByScopeAndSourceId({scopeId:t.scopeId,sourceId:t.sourceId}),yield*kTe(e.executorState,t,r),yield*bf.forEach([...d],f=>yQ(e.executorState,{scopeId:t.scopeId,grantId:f}),{discard:!0}),yield*fQ(e,t.scopeId),!0}),KTe=(e,t,r={},n)=>bf.gen(function*(){let o=yield*Kg(e,t.scopeId),i={...t,id:o.loadedConfig.config?.sources?.[t.id]||o.scopeState.sources[t.id]?t.id:PTe(t,new Set(Object.keys(o.loadedConfig.config?.sources??{})))},a=yield*e.executorState.authArtifacts.listByScopeAndSourceId({scopeId:i.scopeId,sourceId:i.id}),s=uQ({authArtifacts:a,actorScopeId:r.actorScopeId,slot:"runtime"}),c=uQ({authArtifacts:a,actorScopeId:r.actorScopeId,slot:"import"}),p=bF(o.loadedConfig.projectConfig??{}),d={...p.sources},f=d[i.id];d[i.id]=NTe({source:i,existingConfigAuth:f?.connection.auth,config:o.loadedConfig.config}),yield*o.scopeConfigStore.writeProject({config:{...p,sources:d}});let{runtimeAuthArtifact:m,importAuthArtifact:y}=JTe({source:i,catalogId:DF(i),catalogRevisionId:gQ(i),actorScopeId:r.actorScopeId,existingRuntimeAuthArtifactId:s?.id??null,existingImportAuthArtifactId:c?.id??null});m===null?(s!==null&&(yield*k_(e.executorState,{authArtifactId:s.id},n)),yield*e.executorState.authArtifacts.removeByScopeSourceAndActor({scopeId:i.scopeId,sourceId:i.id,actorScopeId:r.actorScopeId??null,slot:"runtime"})):(yield*e.executorState.authArtifacts.upsert(m),s!==null&&s.id!==m.id&&(yield*k_(e.executorState,{authArtifactId:s.id},n))),yield*SF(e.executorState,{previous:s??null,next:m},n),y===null?(c!==null&&(yield*k_(e.executorState,{authArtifactId:c.id},n)),yield*e.executorState.authArtifacts.removeByScopeSourceAndActor({scopeId:i.scopeId,sourceId:i.id,actorScopeId:r.actorScopeId??null,slot:"import"})):(yield*e.executorState.authArtifacts.upsert(y),c!==null&&c.id!==y.id&&(yield*k_(e.executorState,{authArtifactId:c.id},n))),yield*SF(e.executorState,{previous:c??null,next:y},n);let g=vF([s,c]),S=vF([m,y]);yield*bf.forEach([...S],I=>LTe(e.executorState,{grantId:I}),{discard:!0}),yield*bf.forEach([...g].filter(I=>!S.has(I)),I=>yQ(e.executorState,{scopeId:i.scopeId,grantId:I}),{discard:!0});let b=o.scopeState.sources[i.id],E={...o.scopeState,sources:{...o.scopeState.sources,[i.id]:{status:i.status,lastError:i.lastError,sourceHash:i.sourceHash,createdAt:b?.createdAt??i.createdAt,updatedAt:i.updatedAt}}};return yield*o.scopeStateStore.write({state:E}),FTe(i)&&(yield*fQ(e,i.scopeId,r)),yield*EF(e,{scopeId:i.scopeId,sourceId:i.id,actorScopeId:r.actorScopeId})}).pipe(bf.withSpan("source.store.persist",{attributes:{"executor.scope.id":t.scopeId,"executor.source.id":t.id,"executor.source.kind":t.kind,"executor.source.status":t.status}}));var Qo=class extends GTe.Tag("#runtime/RuntimeSourceStoreService")(){},ZTe=HTe.effect(Qo,SQ.gen(function*(){let e=yield*Wn,t=yield*Rs,r=yield*Kc,n=yield*$a,o=yield*Ma,i=yield*hd,a=yield*as,s={executorState:e,runtimeLocalScope:t,scopeConfigStore:r,scopeStateStore:n,sourceArtifactStore:o,sourceTypeDeclarationsRefresher:i};return Qo.of({loadSourcesInScope:(c,p={})=>xF(s,c,p),listLinkedSecretSourcesInScope:(c,p={})=>RTe(s,c,p),loadSourceById:c=>EF(s,c),removeSourceById:c=>VTe(s,c,a),persistSource:(c,p={})=>KTe(s,c,p,a)})}));var rDe=e=>({descriptor:e.tool.descriptor,namespace:e.tool.searchNamespace,searchText:e.tool.searchText,score:e.score}),yEt=e=>{let[t,r]=e.split(".");return r?`${t}.${r}`:t},gEt=e=>e.path,SEt=e=>({path:e.path,searchNamespace:e.searchNamespace,searchText:e.searchText,source:e.source,sourceRecord:e.sourceRecord,capabilityId:e.capabilityId,executableId:e.executableId,capability:e.capability,executable:e.executable,descriptor:e.descriptor,projectedCatalog:e.projectedCatalog}),vEt=e=>e==null?null:JSON.stringify(e,null,2),bEt=(e,t)=>e.toolDescriptors[t.id]?.toolPath.join(".")??"",xEt=(e,t)=>{let r=t.preferredExecutableId!==void 0?e.executables[t.preferredExecutableId]:void 0;if(r)return r;let n=t.executableIds.map(o=>e.executables[o]).find(o=>o!==void 0);if(!n)throw new Error(`Capability ${t.id} has no executable`);return n},cb=(e,t)=>{if(!t)return;let r=e.symbols[t];return r?.kind==="shape"?r:void 0},AF=(e,t)=>{let r={},n=new Set,o=new Set,i=new Set,a=new Map,s=new Set,c=T=>{let k=T.trim();if(k.length===0)return null;let F=k.replace(/[^A-Za-z0-9_]+/g,"_").replace(/_+/g,"_").replace(/^_+|_+$/g,"");return F.length===0?null:/^[A-Za-z_]/.test(F)?F:`shape_${F}`},p=(T,k)=>{let F=cb(e,T);return[...k,F?.title,T].flatMap(O=>typeof O=="string"&&O.trim().length>0?[O]:[])},d=(T,k)=>{let F=a.get(T);if(F)return F;let O=p(T,k);for(let ge of O){let Te=c(ge);if(Te&&!s.has(Te))return a.set(T,Te),s.add(Te),Te}let $=c(T)??"shape",N=$,U=2;for(;s.has(N);)N=`${$}_${String(U)}`,U+=1;return a.set(T,N),s.add(N),N},f=(T,k,F)=>p(T,k)[0]??F,m=(T,k,F)=>{let O=cb(e,T);if(!O)return!0;if(k<0||F.has(T))return!1;let $=new Set(F);return $.add(T),xn.value(O.node).pipe(xn.when({type:"unknown"},()=>!0),xn.when({type:"const"},()=>!0),xn.when({type:"enum"},()=>!0),xn.when({type:"scalar"},()=>!0),xn.when({type:"ref"},N=>m(N.target,k,$)),xn.when({type:"nullable"},N=>m(N.itemShapeId,k-1,$)),xn.when({type:"array"},N=>m(N.itemShapeId,k-1,$)),xn.when({type:"object"},N=>{let U=Object.values(N.fields);return U.length<=8&&U.every(ge=>m(ge.shapeId,k-1,$))}),xn.orElse(()=>!1))},y=T=>m(T,2,new Set),g=(T,k=[])=>{if(n.has(T))return S(T,k);if(!cb(e,T))return{};n.add(T);try{return b(T,k)}finally{n.delete(T)}},S=(T,k=[])=>{let F=d(T,k);if(i.has(T)||o.has(T))return{$ref:`#/$defs/${F}`};let O=cb(e,T);o.add(T);let $=n.has(T);$||n.add(T);try{r[F]=O?b(T,k):{},i.add(T)}finally{o.delete(T),$||n.delete(T)}return{$ref:`#/$defs/${F}`}},b=(T,k=[])=>{let F=cb(e,T);if(!F)return{};let O=f(T,k,"shape"),$=N=>({...F.title?{title:F.title}:{},...F.docs?.description?{description:F.docs.description}:{},...N});return xn.value(F.node).pipe(xn.when({type:"unknown"},()=>$({})),xn.when({type:"const"},N=>$({const:N.value})),xn.when({type:"enum"},N=>$({enum:N.values})),xn.when({type:"scalar"},N=>$({type:N.scalar==="bytes"?"string":N.scalar,...N.scalar==="bytes"?{format:"binary"}:{},...N.format?{format:N.format}:{},...N.constraints})),xn.when({type:"ref"},N=>y(N.target)?g(N.target,k):S(N.target,k)),xn.when({type:"nullable"},N=>$({anyOf:[g(N.itemShapeId,k),{type:"null"}]})),xn.when({type:"allOf"},N=>$({allOf:N.items.map((U,ge)=>g(U,[`${O}_allOf_${String(ge+1)}`]))})),xn.when({type:"anyOf"},N=>$({anyOf:N.items.map((U,ge)=>g(U,[`${O}_anyOf_${String(ge+1)}`]))})),xn.when({type:"oneOf"},N=>$({oneOf:N.items.map((U,ge)=>g(U,[`${O}_option_${String(ge+1)}`])),...N.discriminator?{discriminator:{propertyName:N.discriminator.propertyName,...N.discriminator.mapping?{mapping:Object.fromEntries(Object.entries(N.discriminator.mapping).map(([U,ge])=>[U,S(ge,[U,`${O}_${U}`]).$ref]))}:{}}}:{}})),xn.when({type:"not"},N=>$({not:g(N.itemShapeId,[`${O}_not`])})),xn.when({type:"conditional"},N=>$({if:g(N.ifShapeId,[`${O}_if`]),...N.thenShapeId?{then:g(N.thenShapeId,[`${O}_then`])}:{},...N.elseShapeId?{else:g(N.elseShapeId,[`${O}_else`])}:{}})),xn.when({type:"array"},N=>$({type:"array",items:g(N.itemShapeId,[`${O}_item`]),...N.minItems!==void 0?{minItems:N.minItems}:{},...N.maxItems!==void 0?{maxItems:N.maxItems}:{}})),xn.when({type:"tuple"},N=>$({type:"array",prefixItems:N.itemShapeIds.map((U,ge)=>g(U,[`${O}_item_${String(ge+1)}`])),...N.additionalItems!==void 0?{items:typeof N.additionalItems=="boolean"?N.additionalItems:g(N.additionalItems,[`${O}_item_rest`])}:{}})),xn.when({type:"map"},N=>$({type:"object",additionalProperties:g(N.valueShapeId,[`${O}_value`])})),xn.when({type:"object"},N=>$({type:"object",properties:Object.fromEntries(Object.entries(N.fields).map(([U,ge])=>[U,{...g(ge.shapeId,[U]),...ge.docs?.description?{description:ge.docs.description}:{}}])),...N.required&&N.required.length>0?{required:N.required}:{},...N.additionalProperties!==void 0?{additionalProperties:typeof N.additionalProperties=="boolean"?N.additionalProperties:g(N.additionalProperties,[`${O}_additionalProperty`])}:{},...N.patternProperties?{patternProperties:Object.fromEntries(Object.entries(N.patternProperties).map(([U,ge])=>[U,g(ge,[`${O}_patternProperty`])]))}:{}})),xn.when({type:"graphqlInterface"},N=>$({type:"object",properties:Object.fromEntries(Object.entries(N.fields).map(([U,ge])=>[U,g(ge.shapeId,[U])]))})),xn.when({type:"graphqlUnion"},N=>$({oneOf:N.memberTypeIds.map((U,ge)=>g(U,[`${O}_member_${String(ge+1)}`]))})),xn.exhaustive)},E=(T,k=[])=>{let F=cb(e,T);return F?xn.value(F.node).pipe(xn.when({type:"ref"},O=>E(O.target,k)),xn.orElse(()=>g(T,k))):{}},I=E(t,["input"]);return Object.keys(r).length>0?{...I,$defs:r}:I},nDe=e=>HT({catalog:e.catalog,roots:a3(e)}),EEt=e=>{let t=e.projected.toolDescriptors[e.capability.id],r=t.toolPath.join("."),n=t.interaction.mayRequireApproval||t.interaction.mayElicit?"required":"auto",o=e.includeSchemas?AF(e.projected.catalog,t.callShapeId):void 0,a=e.includeSchemas&&t.resultShapeId?AF(e.projected.catalog,t.resultShapeId):void 0,s=e.includeTypePreviews?e.typeProjector.renderSelfContainedShape(t.callShapeId,{aliasHint:di(...t.toolPath,"call")}):void 0,c=e.includeTypePreviews&&t.resultShapeId?e.typeProjector.renderSelfContainedShape(t.resultShapeId,{aliasHint:di(...t.toolPath,"result")}):void 0;return{path:r,sourceKey:e.source.id,description:e.capability.surface.summary??e.capability.surface.description,interaction:n,contract:{inputTypePreview:s,...c!==void 0?{outputTypePreview:c}:{},...o!==void 0?{inputSchema:o}:{},...a!==void 0?{outputSchema:a}:{}},providerKind:e.executable.adapterKey,providerData:{capabilityId:e.capability.id,executableId:e.executable.id,adapterKey:e.executable.adapterKey,display:e.executable.display}}},oDe=e=>{let t=xEt(e.catalogEntry.projected.catalog,e.capability),r=e.catalogEntry.projected.toolDescriptors[e.capability.id],n=EEt({source:e.catalogEntry.source,projected:e.catalogEntry.projected,capability:e.capability,executable:t,typeProjector:e.catalogEntry.typeProjector,includeSchemas:e.includeSchemas,includeTypePreviews:e.includeTypePreviews}),o=gEt(n),i=e.catalogEntry.projected.searchDocs[e.capability.id],a=yEt(o),s=[o,a,e.catalogEntry.source.name,e.capability.surface.title,e.capability.surface.summary,e.capability.surface.description,n.contract?.inputTypePreview,n.contract?.outputTypePreview,...i?.tags??[],...i?.protocolHints??[],...i?.authHints??[]].filter(c=>typeof c=="string"&&c.length>0).join(" ").toLowerCase();return{path:o,searchNamespace:a,searchText:s,source:e.catalogEntry.source,sourceRecord:e.catalogEntry.sourceRecord,revision:e.catalogEntry.revision,capabilityId:e.capability.id,executableId:t.id,capability:e.capability,executable:t,projectedDescriptor:r,descriptor:n,projectedCatalog:e.catalogEntry.projected.catalog,typeProjector:e.catalogEntry.typeProjector}},iDe=e=>({id:e.source.id,scopeId:e.source.scopeId,catalogId:e.artifact.catalogId,catalogRevisionId:e.artifact.revision.id,name:e.source.name,kind:e.source.kind,endpoint:e.source.endpoint,status:e.source.status,enabled:e.source.enabled,namespace:e.source.namespace,importAuthPolicy:e.source.importAuthPolicy,bindingConfigJson:JSON.stringify(e.source.binding),sourceHash:e.source.sourceHash,lastError:e.source.lastError,createdAt:e.source.createdAt,updatedAt:e.source.updatedAt}),Gh=class extends eDe.Tag("#runtime/RuntimeSourceCatalogStoreService")(){},TEt=e=>e??null,DEt=e=>JSON.stringify([...e].sort((t,r)=>String(t.id).localeCompare(String(r.id)))),aDe=(e,t)=>qr.gen(function*(){if(e.runtimeLocalScope.installation.scopeId!==t)return yield*qr.fail(Ne("catalog/source/runtime",`Runtime local scope mismatch: expected ${t}, got ${e.runtimeLocalScope.installation.scopeId}`))}),sDe=e=>L6(e.artifact.snapshot),cDe=(e,t)=>qr.gen(function*(){return yield*aDe(e,t.scopeId),yield*e.sourceStore.loadSourcesInScope(t.scopeId,{actorScopeId:t.actorScopeId})}),WTe=(e,t)=>qr.map(cDe(e,t),r=>({scopeId:t.scopeId,actorScopeId:TEt(t.actorScopeId),sourceFingerprint:DEt(r)})),AEt=(e,t)=>qr.gen(function*(){return(yield*qr.forEach(t,n=>qr.gen(function*(){let o=yield*e.sourceArtifactStore.read({sourceId:n.id});if(o===null)return null;let i=sDe({source:n,artifact:o}),a=RT({catalog:i.catalog}),s=nDe(a);return{source:n,sourceRecord:iDe({source:n,artifact:o}),revision:o.revision,snapshot:i,catalog:i.catalog,projected:a,typeProjector:s,importMetadata:i.import}}))).filter(n=>n!==null)}),lDe=(e,t)=>qr.gen(function*(){let r=yield*cDe(e,t);return yield*AEt(e,r)}),uDe=(e,t)=>qr.gen(function*(){yield*aDe(e,t.scopeId);let r=yield*e.sourceStore.loadSourceById({scopeId:t.scopeId,sourceId:t.sourceId,actorScopeId:t.actorScopeId}),n=yield*e.sourceArtifactStore.read({sourceId:r.id});if(n===null)return yield*new n3({message:`Catalog artifact missing for source ${t.sourceId}`,sourceId:t.sourceId});let o=sDe({source:r,artifact:n}),i=RT({catalog:o.catalog}),a=nDe(i);return{source:r,sourceRecord:iDe({source:r,artifact:n}),revision:n.revision,snapshot:o,catalog:o.catalog,projected:i,typeProjector:a,importMetadata:o.import}}),IEt=e=>qr.gen(function*(){let t=yield*Rs,r=yield*Qo,n=yield*Ma;return yield*lDe({runtimeLocalScope:t,sourceStore:r,sourceArtifactStore:n},e)}),pDe=e=>qr.gen(function*(){let t=yield*Rs,r=yield*Qo,n=yield*Ma;return yield*uDe({runtimeLocalScope:t,sourceStore:r,sourceArtifactStore:n},e)}),bQ=e=>qr.succeed(e.catalogs.flatMap(t=>Object.values(t.catalog.capabilities).map(r=>oDe({catalogEntry:t,capability:r,includeSchemas:e.includeSchemas,includeTypePreviews:e.includeTypePreviews??!0})))),QTe=e=>qr.tryPromise({try:async()=>{let t=HT({catalog:e.catalog,roots:[{shapeId:e.shapeId,aliasHint:e.aliasHint}]}),r=t.renderDeclarationShape(e.shapeId,{aliasHint:e.aliasHint}),n=t.supportingDeclarations(),o=`type ${e.aliasHint} =`;return n.some(a=>a.includes(o))?n.join(` + +`):[...n,kEt({catalog:e.catalog,shapeId:e.shapeId,aliasHint:e.aliasHint,body:r})].join(` + +`)},catch:t=>t instanceof Error?t:new Error(String(t))}),XTe=e=>e===void 0?qr.succeed(null):qr.tryPromise({try:()=>rA(e,"typescript"),catch:t=>t instanceof Error?t:new Error(String(t))}),YTe=e=>{let t=vEt(e);return t===null?qr.succeed(null):qr.tryPromise({try:()=>rA(t,"json"),catch:r=>r instanceof Error?r:new Error(String(r))})},wEt=e=>e.length===0?"tool":`${e.slice(0,1).toLowerCase()}${e.slice(1)}`,kEt=e=>{let t=e.catalog.symbols[e.shapeId],r=t?.kind==="shape"?GT({title:t.title,docs:t.docs,deprecated:t.deprecated,includeTitle:!0}):null,n=`type ${e.aliasHint} = ${e.body};`;return r?`${r} +${n}`:n},dDe=e=>{let t=di(...e.projectedDescriptor.toolPath,"call"),r=di(...e.projectedDescriptor.toolPath,"result"),n=e.projectedDescriptor.callShapeId,o=e.projectedDescriptor.resultShapeId??null,i=ZT(e.projectedCatalog,n),a=o?r:"unknown",s=wEt(di(...e.projectedDescriptor.toolPath)),c=GT({title:e.capability.surface.title,docs:{...e.capability.surface.summary?{summary:e.capability.surface.summary}:{},...e.capability.surface.description?{description:e.capability.surface.description}:{}},includeTitle:!0});return qr.gen(function*(){let[p,d,f,m,y,g,S,b]=yield*qr.all([XTe(e.descriptor.contract?.inputTypePreview),XTe(e.descriptor.contract?.outputTypePreview),QTe({catalog:e.projectedCatalog,shapeId:n,aliasHint:t}),o?QTe({catalog:e.projectedCatalog,shapeId:o,aliasHint:r}):qr.succeed(null),YTe(e.descriptor.contract?.inputSchema??AF(e.projectedCatalog,n)),o?YTe(e.descriptor.contract?.outputSchema??AF(e.projectedCatalog,o)):qr.succeed(null),qr.tryPromise({try:()=>rA(`(${i?"args?":"args"}: ${t}) => Promise<${a}>`,"typescript"),catch:E=>E instanceof Error?E:new Error(String(E))}),qr.tryPromise({try:()=>rA([...c?[c]:[],`declare function ${s}(${i?"args?":"args"}: ${t}): Promise<${a}>;`].join(` +`),"typescript-module"),catch:E=>E instanceof Error?E:new Error(String(E))})]);return{callSignature:S,callDeclaration:b,callShapeId:n,resultShapeId:o,responseSetId:e.projectedDescriptor.responseSetId,input:{shapeId:n,typePreview:p,typeDeclaration:f,schemaJson:y,exampleJson:null},output:{shapeId:o,typePreview:d,typeDeclaration:m,schemaJson:g,exampleJson:null}}})},xQ=e=>qr.succeed(e.catalogs.flatMap(t=>Object.values(t.catalog.capabilities).flatMap(r=>bEt(t.projected,r)===e.path?[oDe({catalogEntry:t,capability:r,includeSchemas:e.includeSchemas,includeTypePreviews:e.includeTypePreviews??!0})]:[])).at(0)??null);var CEt=e=>qr.gen(function*(){let t=yield*IEt({scopeId:e.scopeId,actorScopeId:e.actorScopeId}),r=yield*xQ({catalogs:t,path:e.path,includeSchemas:e.includeSchemas});return r?{path:r.path,searchNamespace:r.searchNamespace,searchText:r.searchText,source:r.source,sourceRecord:r.sourceRecord,capabilityId:r.capabilityId,executableId:r.executableId,capability:r.capability,executable:r.executable,descriptor:r.descriptor,projectedCatalog:r.projectedCatalog}:null}),_De=tDe.effect(Gh,qr.gen(function*(){let e=yield*Rs,t=yield*Qo,r=yield*Ma,n={runtimeLocalScope:e,sourceStore:t,sourceArtifactStore:r},o=yield*vQ.make({capacity:32,timeToLive:"10 minutes",lookup:c=>lDe(n,{scopeId:c.scopeId,actorScopeId:c.actorScopeId})}),i=yield*vQ.make({capacity:32,timeToLive:"10 minutes",lookup:c=>qr.gen(function*(){let p=yield*o.get(c);return(yield*bQ({catalogs:p,includeSchemas:!1,includeTypePreviews:!1})).map(SEt)})}),a=c=>qr.flatMap(WTe(n,c),p=>o.get(p)),s=c=>qr.flatMap(WTe(n,c),p=>i.get(p));return Gh.of({loadWorkspaceSourceCatalogs:c=>a(c),loadSourceWithCatalog:c=>uDe(n,c),loadWorkspaceSourceCatalogToolIndex:c=>s({scopeId:c.scopeId,actorScopeId:c.actorScopeId}),loadWorkspaceSourceCatalogToolByPath:c=>c.includeSchemas?CEt(c).pipe(qr.provideService(Rs,e),qr.provideService(Qo,t),qr.provideService(Ma,r)):qr.map(s({scopeId:c.scopeId,actorScopeId:c.actorScopeId}),p=>p.find(d=>d.path===c.path)??null)})}));import*as Hh from"effect/Effect";import*as fDe from"effect/Context";import*as xf from"effect/Effect";import*as mDe from"effect/Layer";var PEt=e=>e.enabled&&e.status==="connected"&&_i(e).catalogKind!=="internal",tu=class extends fDe.Tag("#runtime/RuntimeSourceCatalogSyncService")(){},hDe=(e,t)=>xf.gen(function*(){if(e.runtimeLocalScope.installation.scopeId!==t)return yield*xf.fail(Ne("catalog/source/sync",`Runtime local scope mismatch: expected ${t}, got ${e.runtimeLocalScope.installation.scopeId}`))}),OEt=(e,t)=>xf.gen(function*(){if(yield*hDe(e,t.source.scopeId),!PEt(t.source)){let c=yield*e.scopeStateStore.load(),p=c.sources[t.source.id],d={...c,sources:{...c.sources,[t.source.id]:{status:t.source.enabled?t.source.status:"draft",lastError:null,sourceHash:t.source.sourceHash,createdAt:p?.createdAt??t.source.createdAt,updatedAt:Date.now()}}};yield*e.scopeStateStore.write({state:d}),yield*e.sourceTypeDeclarationsRefresher.refreshSourceInBackground({source:t.source,snapshot:null});return}let n=yield*_i(t.source).syncCatalog({source:t.source,resolveSecretMaterial:e.resolveSecretMaterial,resolveAuthMaterialForSlot:c=>e.sourceAuthMaterialService.resolve({source:t.source,slot:c,actorScopeId:t.actorScopeId})}),o=$T(n);yield*e.sourceArtifactStore.write({sourceId:t.source.id,artifact:e.sourceArtifactStore.build({source:t.source,syncResult:n})});let i=yield*e.scopeStateStore.load(),a=i.sources[t.source.id],s={...i,sources:{...i.sources,[t.source.id]:{status:"connected",lastError:null,sourceHash:n.sourceHash,createdAt:a?.createdAt??t.source.createdAt,updatedAt:Date.now()}}};yield*e.scopeStateStore.write({state:s}),yield*e.sourceTypeDeclarationsRefresher.refreshSourceInBackground({source:t.source,snapshot:o})}).pipe(xf.withSpan("source.catalog.sync",{attributes:{"executor.source.id":t.source.id,"executor.source.kind":t.source.kind,"executor.source.namespace":t.source.namespace,"executor.source.endpoint":t.source.endpoint}})),NEt=(e,t)=>xf.gen(function*(){yield*hDe(e,t.source.scopeId);let r=FB({source:t.source,endpoint:t.source.endpoint,manifest:t.manifest}),n=$T(r);yield*e.sourceArtifactStore.write({sourceId:t.source.id,artifact:e.sourceArtifactStore.build({source:t.source,syncResult:r})}),yield*e.sourceTypeDeclarationsRefresher.refreshSourceInBackground({source:t.source,snapshot:n})});var yDe=mDe.effect(tu,xf.gen(function*(){let e=yield*Rs,t=yield*$a,r=yield*Ma,n=yield*hd,o=yield*Nl,i=yield*Fm,a={runtimeLocalScope:e,scopeStateStore:t,sourceArtifactStore:r,sourceTypeDeclarationsRefresher:n,resolveSecretMaterial:o,sourceAuthMaterialService:i};return tu.of({sync:s=>OEt(a,s),persistMcpCatalogSnapshotFromManifest:s=>NEt(a,s)})}));var FEt=e=>e.enabled&&e.status==="connected"&&_i(e).catalogKind!=="internal",gDe=e=>Hh.gen(function*(){let t=yield*Rs,r=yield*Qo,n=yield*Ma,o=yield*tu,i=yield*r.loadSourcesInScope(e.scopeId,{actorScopeId:e.actorScopeId});for(let a of i)!FEt(a)||(yield*n.read({sourceId:a.id}))!==null||(yield*o.sync({source:a,actorScopeId:e.actorScopeId}).pipe(Hh.catchAll(()=>Hh.void)))}).pipe(Hh.withSpan("source.catalog.reconcile_missing",{attributes:{"executor.scope.id":e.scopeId}}));import*as SDe from"effect/Context";import*as Zh from"effect/Deferred";import*as ga from"effect/Effect";import*as vDe from"effect/Layer";var REt=()=>({stateWaiters:[],currentInteraction:null}),EQ=e=>e===void 0?null:JSON.stringify(e),LEt=new Set(["tokenRef","tokenSecretMaterialId"]),TQ=e=>{if(Array.isArray(e))return e.map(TQ);if(!e||typeof e!="object")return e;let t=Object.entries(e).filter(([r])=>!LEt.has(r)).map(([r,n])=>[r,TQ(n)]);return Object.fromEntries(t)},_I=e=>{if(e.content===void 0)return e;let t=TQ(e.content);return{...e,content:t}},$Et=e=>{let t=e.context?.interactionPurpose;return typeof t=="string"&&t.length>0?t:e.path==="executor.sources.add"?e.elicitation.mode==="url"?"source_connect_oauth2":"source_connect_secret":"elicitation"},DQ=()=>{let e=new Map,t=o=>{let i=e.get(o);if(i)return i;let a=REt();return e.set(o,a),a},r=o=>ga.gen(function*(){let i=t(o.executionId),a=[...i.stateWaiters];i.stateWaiters=[],yield*ga.forEach(a,s=>Zh.succeed(s,o.state),{discard:!0})});return{publishState:r,registerStateWaiter:o=>ga.gen(function*(){let i=yield*Zh.make();return t(o).stateWaiters.push(i),i}),createOnElicitation:({executorState:o,executionId:i})=>a=>ga.gen(function*(){let s=t(i),c=yield*Zh.make(),p=Date.now(),d={id:ws.make(`${i}:${a.interactionId}`),executionId:i,status:"pending",kind:a.elicitation.mode==="url"?"url":"form",purpose:$Et(a),payloadJson:EQ({path:a.path,sourceKey:a.sourceKey,args:a.args,context:a.context,elicitation:a.elicitation})??"{}",responseJson:null,responsePrivateJson:null,createdAt:p,updatedAt:p};return yield*o.executionInteractions.insert(d),yield*o.executions.update(i,{status:"waiting_for_interaction",updatedAt:p}),s.currentInteraction={interactionId:d.id,response:c},yield*ga.gen(function*(){yield*r({executionId:i,state:"waiting_for_interaction"});let f=yield*Zh.await(c),m=Date.now();return yield*o.executionInteractions.update(d.id,{status:f.action==="cancel"?"cancelled":"resolved",responseJson:EQ(_I(f)),responsePrivateJson:EQ(f),updatedAt:m}),yield*o.executions.update(i,{status:"running",updatedAt:m}),yield*r({executionId:i,state:"running"}),f}).pipe(ga.ensuring(ga.sync(()=>{s.currentInteraction?.interactionId===d.id&&(s.currentInteraction=null)})))}),resolveInteraction:({executionId:o,response:i})=>ga.gen(function*(){let s=e.get(o)?.currentInteraction;return s?(yield*Zh.succeed(s.response,i),!0):!1}),finishRun:({executionId:o,state:i})=>r({executionId:o,state:i}).pipe(ga.zipRight(VC(o)),ga.ensuring(ga.sync(()=>{e.delete(o)}))),clearRun:o=>VC(o).pipe(ga.ensuring(ga.sync(()=>{e.delete(o)})))}},Xc=class extends SDe.Tag("#runtime/LiveExecutionManagerService")(){},IHt=vDe.sync(Xc,DQ);import*as EAe from"effect/Context";import*as vI from"effect/Effect";import*as jF from"effect/Layer";var MEt="quickjs",AQ=e=>e?.runtime??MEt,IQ=async(e,t)=>{if(t)return t;switch(e){case"deno":{let{makeDenoSubprocessExecutor:r}=await import("@executor/runtime-deno-subprocess");return r()}case"ses":{let{makeSesExecutor:r}=await import("@executor/runtime-ses");return r()}default:{let{makeQuickJsExecutor:r}=await import("@executor/runtime-quickjs");return r()}}};import*as FF from"effect/Effect";import*as Cd from"effect/Effect";import*as EDe from"effect/Cause";import*as TDe from"effect/Exit";import*as OQ from"effect/Schema";import*as bDe from"effect/JSONSchema";var mI=e=>typeof e=="object"&&e!==null&&!Array.isArray(e)?e:{},jEt=e=>Array.isArray(e)?e.filter(t=>typeof t=="string"):[],fI=(e,t)=>e.length<=t?e:`${e.slice(0,Math.max(0,t-4))} ...`,BEt=(e,t,r)=>`${e}${r?"?":""}: ${IF(t)}`,wQ=(e,t)=>{let r=Array.isArray(t[e])?t[e].map(mI):[];if(r.length===0)return null;let n=r.map(o=>IF(o)).filter(o=>o.length>0);return n.length===0?null:n.join(e==="allOf"?" & ":" | ")},IF=(e,t=220)=>{let r=mI(e);if(typeof r.$ref=="string"){let i=r.$ref.trim();return i.length>0?i.split("/").at(-1)??i:"unknown"}if("const"in r)return JSON.stringify(r.const);let n=Array.isArray(r.enum)?r.enum:[];if(n.length>0)return fI(n.map(i=>JSON.stringify(i)).join(" | "),t);let o=wQ("oneOf",r)??wQ("anyOf",r)??wQ("allOf",r);if(o)return fI(o,t);if(r.type==="array"){let i=r.items?IF(r.items,t):"unknown";return fI(`${i}[]`,t)}if(r.type==="object"||r.properties){let i=mI(r.properties),a=Object.keys(i);if(a.length===0)return r.additionalProperties?"Record":"object";let s=new Set(jEt(r.required)),c=a.map(p=>BEt(p,mI(i[p]),!s.has(p)));return fI(`{ ${c.join(", ")} }`,t)}return Array.isArray(r.type)?fI(r.type.join(" | "),t):typeof r.type=="string"?r.type:"unknown"},wF=(e,t)=>{let r=kF(e);return r?IF(r,t):"unknown"},kF=e=>{try{return mI(bDe.make(e))}catch{return null}};import*as kd from"effect/Schema";var qEt=kd.Union(kd.Struct({authKind:kd.Literal("none")}),kd.Struct({authKind:kd.Literal("bearer"),tokenRef:pi})),xDe=kd.decodeUnknownSync(qEt),kQ=()=>({authKind:"none"}),CQ=e=>({authKind:"bearer",tokenRef:e});var hI=async(e,t,r=null)=>{let n=iA(t),o=await Cd.runPromiseExit(ph(e.pipe(Cd.provide(n)),r));if(TDe.isSuccess(o))return o.value;throw EDe.squash(o.cause)},UEt=OQ.standardSchemaV1(gF),zEt=OQ.standardSchemaV1(zp),JEt=wF(gF,320),VEt=wF(zp,260),KEt=kF(gF)??{},GEt=kF(zp)??{},HEt=["Source add input shapes:",...sQ.flatMap(e=>e.executorAddInputSchema&&e.executorAddInputSignatureWidth!==null&&e.executorAddHelpText?[`- ${e.displayName}: ${wF(e.executorAddInputSchema,e.executorAddInputSignatureWidth)}`,...e.executorAddHelpText.map(t=>` ${t}`)]:[])," executor handles the credential setup for you."],ZEt=()=>["Add an MCP, OpenAPI, or GraphQL source to the current scope.",...HEt].join(` +`),WEt=e=>{if(typeof e!="string"||e.trim().length===0)throw new Error("Missing execution run id for executor.sources.add");return kl.make(e)},CF=e=>e,PQ=e=>JSON.parse(JSON.stringify(e)),QEt=e=>e.kind===void 0||Kh(e.kind),XEt=e=>typeof e.kind=="string",YEt=e=>QEt(e.args)?{kind:e.args.kind,endpoint:e.args.endpoint,name:e.args.name??null,namespace:e.args.namespace??null,transport:e.args.transport??null,queryParams:e.args.queryParams??null,headers:e.args.headers??null,command:e.args.command??null,args:e.args.args??null,env:e.args.env??null,cwd:e.args.cwd??null,scopeId:e.scopeId,actorScopeId:e.actorScopeId,executionId:e.executionId,interactionId:e.interactionId}:"service"in e.args?{...e.args,scopeId:e.scopeId,actorScopeId:e.actorScopeId,executionId:e.executionId,interactionId:e.interactionId}:"specUrl"in e.args?{...e.args,scopeId:e.scopeId,actorScopeId:e.actorScopeId,executionId:e.executionId,interactionId:e.interactionId}:{...e.args,scopeId:e.scopeId,actorScopeId:e.actorScopeId,executionId:e.executionId,interactionId:e.interactionId},eTt=e=>new URL(`/v1/workspaces/${encodeURIComponent(e.scopeId)}/sources/${encodeURIComponent(e.sourceId)}/credentials?interactionId=${encodeURIComponent(`${e.executionId}:${e.interactionId}`)}`,e.baseUrl).toString(),tTt=e=>Cd.gen(function*(){if(!e.onElicitation)return yield*Ne("sources/executor-tools","executor.sources.add requires an elicitation-capable host");if(e.localServerBaseUrl===null)return yield*Ne("sources/executor-tools","executor.sources.add requires a local server base URL for credential capture");let t=yield*e.onElicitation({interactionId:e.interactionId,path:e.path,sourceKey:e.sourceKey,args:e.args,metadata:e.metadata,context:e.invocation,elicitation:{mode:"url",message:e.credentialSlot==="import"?`Open the secure credential page to configure import access for ${e.source.name}`:`Open the secure credential page to connect ${e.source.name}`,url:eTt({baseUrl:e.localServerBaseUrl,scopeId:e.args.scopeId,sourceId:e.args.sourceId,executionId:e.executionId,interactionId:e.interactionId}),elicitationId:e.interactionId}}).pipe(Cd.mapError(n=>n instanceof Error?n:new Error(String(n))));if(t.action!=="accept")return yield*Ne("sources/executor-tools",`Source credential setup was not completed for ${e.source.name}`);let r=yield*Cd.try({try:()=>xDe(t.content),catch:()=>new Error("Credential capture did not return a valid source auth choice for executor.sources.add")});return r.authKind==="none"?{kind:"none"}:{kind:"bearer",tokenRef:r.tokenRef}}),DDe=e=>({"executor.sources.add":vl({tool:{description:ZEt(),inputSchema:UEt,outputSchema:zEt,execute:async(t,r)=>{let n=WEt(r?.invocation?.runId),o=ws.make(`executor.sources.add:${crypto.randomUUID()}`),i=YEt({args:t,scopeId:e.scopeId,actorScopeId:e.actorScopeId,executionId:n,interactionId:o}),a=await hI(e.sourceAuthService.addExecutorSource(i,r?.onElicitation?{mcpDiscoveryElicitation:{onElicitation:r.onElicitation,path:r.path??CF("executor.sources.add"),sourceKey:r.sourceKey,args:t,metadata:r.metadata,invocation:r.invocation}}:void 0),{installationStore:e.installationStore,scopeConfigStore:e.scopeConfigStore,scopeStateStore:e.scopeStateStore,sourceArtifactStore:e.sourceArtifactStore},e.runtimeLocalScope);if(a.kind==="connected")return PQ(a.source);if(a.kind==="credential_required"){let p=a;if(!XEt(i))throw new Error("Credential-managed source setup expected a named adapter kind");let d=i;for(;p.kind==="credential_required";){let f=await hI(tTt({args:{...d,scopeId:e.scopeId,sourceId:p.source.id},credentialSlot:p.credentialSlot,source:p.source,executionId:n,interactionId:o,path:r?.path??CF("executor.sources.add"),sourceKey:r?.sourceKey??"executor",localServerBaseUrl:e.sourceAuthService.getLocalServerBaseUrl(),metadata:r?.metadata,invocation:r?.invocation,onElicitation:r?.onElicitation}),{installationStore:e.installationStore,scopeConfigStore:e.scopeConfigStore,scopeStateStore:e.scopeStateStore,sourceArtifactStore:e.sourceArtifactStore},e.runtimeLocalScope);d=p.credentialSlot==="import"&&d.importAuthPolicy==="separate"?{...d,importAuth:f}:{...d,auth:f};let m=await hI(e.sourceAuthService.addExecutorSource(d,r?.onElicitation?{mcpDiscoveryElicitation:{onElicitation:r.onElicitation,path:r.path??CF("executor.sources.add"),sourceKey:r.sourceKey,args:t,metadata:r.metadata,invocation:r.invocation}}:void 0),{installationStore:e.installationStore,scopeConfigStore:e.scopeConfigStore,scopeStateStore:e.scopeStateStore,sourceArtifactStore:e.sourceArtifactStore},e.runtimeLocalScope);if(m.kind==="connected")return PQ(m.source);if(m.kind==="credential_required"){p=m;continue}a=m;break}p.kind==="credential_required"&&(a=p)}if(!r?.onElicitation)throw new Error("executor.sources.add requires an elicitation-capable host");if(a.kind!=="oauth_required")throw new Error(`Source add did not reach OAuth continuation for ${a.source.id}`);if((await hI(r.onElicitation({interactionId:o,path:r.path??CF("executor.sources.add"),sourceKey:r.sourceKey,args:i,metadata:r.metadata,context:r.invocation,elicitation:{mode:"url",message:`Open the provider sign-in page to connect ${a.source.name}`,url:a.authorizationUrl,elicitationId:a.sessionId}}),{installationStore:e.installationStore,scopeConfigStore:e.scopeConfigStore,scopeStateStore:e.scopeStateStore,sourceArtifactStore:e.sourceArtifactStore},e.runtimeLocalScope)).action!=="accept")throw new Error(`Source add was not completed for ${a.source.id}`);let c=await hI(e.sourceAuthService.getSourceById({scopeId:e.scopeId,sourceId:a.source.id,actorScopeId:e.actorScopeId}),{installationStore:e.installationStore,scopeConfigStore:e.scopeConfigStore,scopeStateStore:e.scopeStateStore,sourceArtifactStore:e.sourceArtifactStore},e.runtimeLocalScope);return PQ(c)}},metadata:{contract:{inputTypePreview:JEt,outputTypePreview:VEt,inputSchema:KEt,outputSchema:GEt},sourceKey:"executor",interaction:"auto"}})});import*as ADe from"effect/Effect";var IDe=e=>({toolPath:e.tool.path,sourceId:e.tool.source.id,sourceName:e.tool.source.name,sourceKind:e.tool.source.kind,sourceNamespace:e.tool.source.namespace??null,operationKind:e.tool.capability.semantics.effect==="read"?"read":e.tool.capability.semantics.effect==="write"?"write":e.tool.capability.semantics.effect==="delete"?"delete":e.tool.capability.semantics.effect==="action"?"execute":"unknown",interaction:e.tool.descriptor.interaction??"auto",approvalLabel:e.tool.capability.surface.title??e.tool.executable.display?.title??null}),wDe=e=>{let t=gf(e.tool.executable.adapterKey);return t.key!==e.tool.source.kind?ADe.fail(Ne("execution/ir-execution",`Executable ${e.tool.executable.id} expects adapter ${t.key}, but source ${e.tool.source.id} is ${e.tool.source.kind}`)):t.invoke({source:e.tool.source,capability:e.tool.capability,executable:e.tool.executable,descriptor:e.tool.descriptor,catalog:e.tool.projectedCatalog,args:e.args,auth:e.auth,onElicitation:e.onElicitation,context:e.context})};import*as UDe from"effect/Either";import*as AS from"effect/Effect";import*as ip from"effect/Schema";var rTt=(e,t)=>{let r=e.replace(/[.+?^${}()|[\]\\]/g,"\\$&").replace(/\*/g,".*");return new RegExp(`^${r}$`).test(t)},kDe=e=>e.priority+Math.max(1,e.resourcePattern.replace(/\*/g,"").length),nTt=e=>e.interaction==="auto"?{kind:"allow",reason:`${e.approvalLabel??e.toolPath} defaults to allow`,matchedPolicyId:null}:{kind:"require_interaction",reason:`${e.approvalLabel??e.toolPath} defaults to approval`,matchedPolicyId:null},oTt=e=>e.effect==="deny"?{kind:"deny",reason:`Denied by policy ${e.id}`,matchedPolicyId:e.id}:e.approvalMode==="required"?{kind:"require_interaction",reason:`Approval required by policy ${e.id}`,matchedPolicyId:e.id}:{kind:"allow",reason:`Allowed by policy ${e.id}`,matchedPolicyId:e.id},CDe=e=>{let r=e.policies.filter(n=>n.enabled&&n.scopeId===e.context.scopeId&&rTt(n.resourcePattern,e.descriptor.toolPath)).sort((n,o)=>kDe(o)-kDe(n)||n.updatedAt-o.updatedAt)[0];return r?oTt(r):nTt(e.descriptor)};import{createHash as sTt}from"node:crypto";import*as Ba from"effect/Effect";import*as NQ from"effect/Effect";var iTt=e=>{if(e==null)return null;let t=e.trim();return t.length>0?t:null},PDe=(e,t)=>{let r=iTt(e.resourcePattern)??`${e.effect}-${e.approvalMode}`,n=r,o=2;for(;t.has(n);)n=`${r}-${o}`,o+=1;return t.add(n),n},aTt=e=>NQ.gen(function*(){let t=yield*$a,r=yield*t.load(),n=new Set(Object.keys(e.loadedConfig.config?.sources??{})),o=new Set(Object.keys(e.loadedConfig.config?.policies??{})),i={...r,sources:Object.fromEntries(Object.entries(r.sources).filter(([a])=>n.has(a))),policies:Object.fromEntries(Object.entries(r.policies).filter(([a])=>o.has(a)))};return JSON.stringify(i)===JSON.stringify(r)?r:(yield*t.write({state:i}),i)}),ODe=e=>NQ.gen(function*(){return yield*aTt({loadedConfig:e.loadedConfig}),e.loadedConfig.config});import{HttpApiSchema as yI}from"@effect/platform";import*as xi from"effect/Schema";var lb=class extends xi.TaggedError()("ControlPlaneBadRequestError",{operation:xi.String,message:xi.String,details:xi.String},yI.annotations({status:400})){},NDe=class extends xi.TaggedError()("ControlPlaneUnauthorizedError",{operation:xi.String,message:xi.String,details:xi.String},yI.annotations({status:401})){},FDe=class extends xi.TaggedError()("ControlPlaneForbiddenError",{operation:xi.String,message:xi.String,details:xi.String},yI.annotations({status:403})){},Ef=class extends xi.TaggedError()("ControlPlaneNotFoundError",{operation:xi.String,message:xi.String,details:xi.String},yI.annotations({status:404})){},Wh=class extends xi.TaggedError()("ControlPlaneStorageError",{operation:xi.String,message:xi.String,details:xi.String},yI.annotations({status:500})){};import*as RDe from"effect/Effect";var Oo=e=>{let t={operation:e,child:r=>Oo(`${e}.${r}`),badRequest:(r,n)=>new lb({operation:e,message:r,details:n}),notFound:(r,n)=>new Ef({operation:e,message:r,details:n}),storage:r=>new Wh({operation:e,message:r.message,details:r.message}),unknownStorage:(r,n)=>t.storage(r instanceof Error?new Error(`${r.message}: ${n}`):new Error(n)),mapStorage:r=>r.pipe(RDe.mapError(n=>t.storage(n)))};return t},gI=e=>typeof e=="string"?Oo(e):e;var js={list:Oo("policies.list"),create:Oo("policies.create"),get:Oo("policies.get"),update:Oo("policies.update"),remove:Oo("policies.remove")},FQ=e=>JSON.parse(JSON.stringify(e)),PF=e=>e.scopeRoot?.trim()||e.scopeId,LDe=e=>bv.make(`pol_local_${sTt("sha256").update(`${e.scopeStableKey}:${e.key}`).digest("hex").slice(0,16)}`),RQ=e=>({id:e.state?.id??LDe({scopeStableKey:e.scopeStableKey,key:e.key}),key:e.key,scopeId:e.scopeId,resourcePattern:e.policyConfig.match.trim(),effect:e.policyConfig.action,approvalMode:e.policyConfig.approval==="manual"?"required":"auto",priority:e.policyConfig.priority??0,enabled:e.policyConfig.enabled??!0,createdAt:e.state?.createdAt??Date.now(),updatedAt:e.state?.updatedAt??Date.now()}),DS=e=>Ba.gen(function*(){let t=yield*D1(e),r=yield*Kc,n=yield*$a,o=yield*r.load(),i=yield*n.load(),a=Object.entries(o.config?.policies??{}).map(([s,c])=>RQ({scopeId:e,scopeStableKey:PF({scopeId:e,scopeRoot:t.scope.scopeRoot}),key:s,policyConfig:c,state:i.policies[s]}));return{runtimeLocalScope:t,loadedConfig:o,scopeState:i,policies:a}}),LQ=e=>Ba.all([e.scopeConfigStore.writeProject({config:e.projectConfig}),e.scopeStateStore.write({state:e.scopeState})],{discard:!0}).pipe(Ba.mapError(t=>e.operation.unknownStorage(t,"Failed writing local scope policy files"))),SI=(e,t)=>D1(t).pipe(Ba.mapError(r=>e.notFound("Workspace not found",r instanceof Error?r.message:String(r)))),$De=e=>Ba.gen(function*(){return yield*SI(js.list,e),(yield*DS(e).pipe(Ba.mapError(r=>js.list.unknownStorage(r,"Failed loading local scope policies")))).policies}),MDe=e=>Ba.gen(function*(){let t=yield*SI(js.create,e.scopeId),r=yield*Kc,n=yield*$a,o=yield*DS(e.scopeId).pipe(Ba.mapError(f=>js.create.unknownStorage(f,"Failed loading local scope policies"))),i=Date.now(),a=FQ(o.loadedConfig.projectConfig??{}),s={...a.policies},c=PDe({resourcePattern:e.payload.resourcePattern??"*",effect:e.payload.effect??"allow",approvalMode:e.payload.approvalMode??"auto"},new Set(Object.keys(s)));s[c]={match:e.payload.resourcePattern??"*",action:e.payload.effect??"allow",approval:(e.payload.approvalMode??"auto")==="required"?"manual":"auto",...e.payload.enabled===!1?{enabled:!1}:{},...(e.payload.priority??0)!==0?{priority:e.payload.priority??0}:{}};let p=o.scopeState.policies[c],d={...o.scopeState,policies:{...o.scopeState.policies,[c]:{id:p?.id??LDe({scopeStableKey:PF({scopeId:e.scopeId,scopeRoot:t.scope.scopeRoot}),key:c}),createdAt:p?.createdAt??i,updatedAt:i}}};return yield*LQ({operation:js.create,scopeConfigStore:r,scopeStateStore:n,projectConfig:{...a,policies:s},scopeState:d}),RQ({scopeId:e.scopeId,scopeStableKey:PF({scopeId:e.scopeId,scopeRoot:t.scope.scopeRoot}),key:c,policyConfig:s[c],state:d.policies[c]})}),jDe=e=>Ba.gen(function*(){yield*SI(js.get,e.scopeId);let r=(yield*DS(e.scopeId).pipe(Ba.mapError(n=>js.get.unknownStorage(n,"Failed loading local scope policies")))).policies.find(n=>n.id===e.policyId)??null;return r===null?yield*js.get.notFound("Policy not found",`scopeId=${e.scopeId} policyId=${e.policyId}`):r}),BDe=e=>Ba.gen(function*(){let t=yield*SI(js.update,e.scopeId),r=yield*Kc,n=yield*$a,o=yield*DS(e.scopeId).pipe(Ba.mapError(m=>js.update.unknownStorage(m,"Failed loading local scope policies"))),i=o.policies.find(m=>m.id===e.policyId)??null;if(i===null)return yield*js.update.notFound("Policy not found",`scopeId=${e.scopeId} policyId=${e.policyId}`);let a=FQ(o.loadedConfig.projectConfig??{}),s={...a.policies},c=s[i.key];s[i.key]={...c,...e.payload.resourcePattern!==void 0?{match:e.payload.resourcePattern}:{},...e.payload.effect!==void 0?{action:e.payload.effect}:{},...e.payload.approvalMode!==void 0?{approval:e.payload.approvalMode==="required"?"manual":"auto"}:{},...e.payload.enabled!==void 0?{enabled:e.payload.enabled}:{},...e.payload.priority!==void 0?{priority:e.payload.priority}:{}};let p=Date.now(),d=o.scopeState.policies[i.key],f={...o.scopeState,policies:{...o.scopeState.policies,[i.key]:{id:i.id,createdAt:d?.createdAt??i.createdAt,updatedAt:p}}};return yield*LQ({operation:js.update,scopeConfigStore:r,scopeStateStore:n,projectConfig:{...a,policies:s},scopeState:f}),RQ({scopeId:e.scopeId,scopeStableKey:PF({scopeId:e.scopeId,scopeRoot:t.scope.scopeRoot}),key:i.key,policyConfig:s[i.key],state:f.policies[i.key]})}),qDe=e=>Ba.gen(function*(){let t=yield*SI(js.remove,e.scopeId),r=yield*Kc,n=yield*$a,o=yield*DS(e.scopeId).pipe(Ba.mapError(d=>js.remove.unknownStorage(d,"Failed loading local scope policies"))),i=o.policies.find(d=>d.id===e.policyId)??null;if(i===null)return{removed:!1};let a=FQ(o.loadedConfig.projectConfig??{}),s={...a.policies};delete s[i.key];let{[i.key]:c,...p}=o.scopeState.policies;return yield*LQ({operation:js.remove,scopeConfigStore:r,scopeStateStore:n,projectConfig:{...a,policies:s},scopeState:{...o.scopeState,policies:p}}),{removed:!0}});var cTt=e=>e,lTt={type:"object",properties:{approve:{type:"boolean",description:"Whether to approve this tool execution"}},required:["approve"],additionalProperties:!1},uTt=e=>e.approvalLabel?`Allow ${e.approvalLabel}?`:`Allow tool call: ${e.toolPath}?`,pTt=ip.Struct({params:ip.optional(ip.Record({key:ip.String,value:ip.String}))}),dTt=ip.decodeUnknownEither(pTt),zDe=e=>{let t=dTt(e);if(!(UDe.isLeft(t)||t.right.params===void 0))return{params:t.right.params}},$Q=e=>AS.fail(new Error(e)),JDe=e=>AS.gen(function*(){let t=IDe({tool:e.tool}),r=yield*DS(e.scopeId).pipe(AS.mapError(a=>a instanceof Error?a:new Error(String(a)))),n=CDe({descriptor:t,args:e.args,policies:r.policies,context:{scopeId:e.scopeId}});if(n.kind==="allow")return;if(n.kind==="deny")return yield*$Q(n.reason);if(!e.onElicitation)return yield*$Q(`Approval required for ${t.toolPath}, but no elicitation-capable host is available`);let o=typeof e.context?.callId=="string"&&e.context.callId.length>0?`tool_execution_gate:${e.context.callId}`:`tool_execution_gate:${crypto.randomUUID()}`;if((yield*e.onElicitation({interactionId:o,path:cTt(t.toolPath),sourceKey:e.tool.source.id,args:e.args,context:{...e.context,interactionPurpose:"tool_execution_gate",interactionReason:n.reason,invocationDescriptor:{operationKind:t.operationKind,interaction:t.interaction,approvalLabel:t.approvalLabel,sourceId:e.tool.source.id,sourceName:e.tool.source.name}},elicitation:{mode:"form",message:uTt(t),requestedSchema:lTt}}).pipe(AS.mapError(a=>a instanceof Error?a:new Error(String(a))))).action!=="accept")return yield*$Q(`Tool invocation not approved for ${t.toolPath}`)});var Qh=(e,t)=>ph(e,t);import*as Sa from"effect/Effect";var OF=e=>e.trim().toLowerCase().split(/[^a-z0-9]+/).filter(Boolean),_Tt=new Set(["a","an","the","am","as","for","from","get","i","in","is","list","me","my","of","on","or","signed","to","who"]),MQ=e=>e.length>3&&e.endsWith("s")?e.slice(0,-1):e,fTt=(e,t)=>e===t||MQ(e)===MQ(t),NF=(e,t)=>e.some(r=>fTt(r,t)),ub=(e,t)=>{if(e.includes(t))return!0;let r=MQ(t);return r!==t&&e.includes(r)},VDe=e=>_Tt.has(e)?.25:1,mTt=e=>{let[t,r]=e.split(".");return r?`${t}.${r}`:t},hTt=e=>[...e].sort((t,r)=>t.namespace.localeCompare(r.namespace)),yTt=e=>Sa.gen(function*(){let t=yield*e.sourceCatalogStore.loadWorkspaceSourceCatalogs({scopeId:e.scopeId,actorScopeId:e.actorScopeId}),r=new Map;for(let n of t)if(!(!n.source.enabled||n.source.status!=="connected"))for(let o of Object.values(n.projected.toolDescriptors)){let i=mTt(o.toolPath.join(".")),a=r.get(i);r.set(i,{namespace:i,toolCount:(a?.toolCount??0)+1})}return hTt(r.values())}),gTt=e=>Sa.map(e.sourceCatalogStore.loadWorkspaceSourceCatalogToolIndex({scopeId:e.scopeId,actorScopeId:e.actorScopeId}),t=>t.filter(r=>r.source.enabled&&r.source.status==="connected")),jQ=e=>e.sourceCatalogStore.loadWorkspaceSourceCatalogToolByPath({scopeId:e.scopeId,path:e.path,actorScopeId:e.actorScopeId,includeSchemas:e.includeSchemas}).pipe(Sa.map(t=>t&&t.source.enabled&&t.source.status==="connected"?t:null)),STt=(e,t)=>{let r=t.path.toLowerCase(),n=t.searchNamespace.toLowerCase(),o=t.path.split(".").at(-1)?.toLowerCase()??"",i=t.capability.surface.title?.toLowerCase()??"",a=t.capability.surface.summary?.toLowerCase()??t.capability.surface.description?.toLowerCase()??"",s=[t.executable.display?.pathTemplate,t.executable.display?.operationId,t.executable.display?.leaf].filter(E=>typeof E=="string"&&E.length>0).join(" ").toLowerCase(),c=OF(`${t.path} ${o}`),p=OF(t.searchNamespace),d=OF(t.capability.surface.title??""),f=OF(s),m=0,y=0,g=0,S=0;for(let E of e){let I=VDe(E);if(NF(c,E)){m+=12*I,y+=1,S+=1;continue}if(NF(p,E)){m+=11*I,y+=1,g+=1;continue}if(NF(d,E)){m+=9*I,y+=1;continue}if(NF(f,E)){m+=8*I,y+=1;continue}if(ub(r,E)||ub(o,E)){m+=6*I,y+=1,S+=1;continue}if(ub(n,E)){m+=5*I,y+=1,g+=1;continue}if(ub(i,E)||ub(s,E)){m+=4*I,y+=1;continue}ub(a,E)&&(m+=.5*I)}let b=e.filter(E=>VDe(E)>=1);if(b.length>=2)for(let E=0;Er.includes(F)||s.includes(F))&&(m+=10)}return g>0&&S>0&&(m+=8),y===0&&m>0&&(m*=.25),m},KDe=e=>{let t=oA({scopeConfigStore:e.scopeConfigStore,scopeStateStore:e.scopeStateStore,sourceArtifactStore:e.sourceArtifactStore}),r=i=>i.pipe(Sa.provide(t)),o=Sa.runSync(Sa.cached(r(Sa.gen(function*(){let i=yield*gTt({scopeId:e.scopeId,actorScopeId:e.actorScopeId,sourceCatalogStore:e.sourceCatalogStore});return pL({entries:i.map(a=>rDe({tool:a,score:s=>STt(s,a)}))})}))));return{listNamespaces:({limit:i})=>Qh(r(Sa.map(yTt({scopeId:e.scopeId,actorScopeId:e.actorScopeId,sourceCatalogStore:e.sourceCatalogStore}),a=>a.slice(0,i))),e.runtimeLocalScope),listTools:({namespace:i,query:a,limit:s})=>Qh(Sa.flatMap(o,c=>c.listTools({...i!==void 0?{namespace:i}:{},...a!==void 0?{query:a}:{},limit:s,includeSchemas:!1})),e.runtimeLocalScope),getToolByPath:({path:i,includeSchemas:a})=>Qh(a?Sa.map(r(jQ({scopeId:e.scopeId,actorScopeId:e.actorScopeId,sourceCatalogStore:e.sourceCatalogStore,path:i,includeSchemas:!0})),s=>s?.descriptor??null):Sa.flatMap(o,s=>s.getToolByPath({path:i,includeSchemas:!1})),e.runtimeLocalScope),searchTools:({query:i,namespace:a,limit:s})=>Qh(Sa.flatMap(o,c=>c.searchTools({query:i,...a!==void 0?{namespace:a}:{},limit:s})),e.runtimeLocalScope)}};var GDe=e=>{let t=oA({scopeConfigStore:e.scopeConfigStore,scopeStateStore:e.scopeStateStore,sourceArtifactStore:e.sourceArtifactStore}),r=y=>y.pipe(FF.provide(t)),n=DDe({scopeId:e.scopeId,actorScopeId:e.actorScopeId,sourceAuthService:e.sourceAuthService,installationStore:e.installationStore,scopeConfigStore:e.scopeConfigStore,scopeStateStore:e.scopeStateStore,sourceArtifactStore:e.sourceArtifactStore,runtimeLocalScope:e.runtimeLocalScope}),o=e.createInternalToolMap?.({scopeId:e.scopeId,actorScopeId:e.actorScopeId,executorStateStore:e.executorStateStore,sourceStore:e.sourceStore,sourceCatalogSyncService:e.sourceCatalogSyncService,sourceAuthService:e.sourceAuthService,installationStore:e.installationStore,instanceConfigResolver:e.instanceConfigResolver,storeSecretMaterial:e.storeSecretMaterial,deleteSecretMaterial:e.deleteSecretMaterial,updateSecretMaterial:e.updateSecretMaterial,scopeConfigStore:e.scopeConfigStore,scopeStateStore:e.scopeStateStore,sourceArtifactStore:e.sourceArtifactStore,runtimeLocalScope:e.runtimeLocalScope})??{},i=KDe({scopeId:e.scopeId,actorScopeId:e.actorScopeId,sourceCatalogStore:e.sourceCatalogStore,scopeConfigStore:e.scopeConfigStore,scopeStateStore:e.scopeStateStore,sourceArtifactStore:e.sourceArtifactStore,runtimeLocalScope:e.runtimeLocalScope}),a=null,s=Vte({getCatalog:()=>{if(a===null)throw new Error("Workspace tool catalog has not been initialized");return a}}),c=Kte([s,n,o,e.localToolRuntime.tools]),p=r_({tools:c});a=zte({catalogs:[p,i]});let d=new Set(Object.keys(c)),f=t_({tools:c,onElicitation:e.onElicitation}),m=y=>Qh(r(FF.gen(function*(){let g=yield*jQ({scopeId:e.scopeId,actorScopeId:e.actorScopeId,sourceCatalogStore:e.sourceCatalogStore,path:y.path,includeSchemas:!1});if(!g)return yield*Ne("execution/scope/tool-invoker",`Unknown tool path: ${y.path}`);yield*JDe({scopeId:e.scopeId,tool:g,args:y.args,context:y.context,onElicitation:e.onElicitation});let S=yield*e.sourceAuthMaterialService.resolve({source:g.source,actorScopeId:e.actorScopeId,context:zDe(y.context)});return yield*wDe({scopeId:e.scopeId,actorScopeId:e.actorScopeId,tool:g,auth:S,args:y.args,onElicitation:e.onElicitation,context:y.context})})),e.runtimeLocalScope);return{catalog:a,toolInvoker:{invoke:({path:y,args:g,context:S})=>Qh(d.has(y)?f.invoke({path:y,args:g,context:S}):m({path:y,args:g,context:S}),e.runtimeLocalScope)}}};import*as tAe from"effect/Context";import*as Pd from"effect/Either";import*as Me from"effect/Effect";import*as rAe from"effect/Layer";import*as Ei from"effect/Option";import*as LF from"effect/ParseResult";import*as Fn from"effect/Schema";import{createServer as vTt}from"node:http";import*as BQ from"effect/Effect";var bTt=10*6e4,HDe=e=>new Promise((t,r)=>{e.close(n=>{if(n){r(n);return}t()})}),qQ=e=>BQ.tryPromise({try:()=>new Promise((t,r)=>{let n=e.publicHost??"127.0.0.1",o=e.listenHost??"127.0.0.1",i=new URL(e.completionUrl),a=vTt((p,d)=>{try{let f=new URL(p.url??"/",`http://${n}`),m=new URL(i.toString());for(let[y,g]of f.searchParams.entries())m.searchParams.set(y,g);d.statusCode=302,d.setHeader("cache-control","no-store"),d.setHeader("location",m.toString()),d.end()}catch(f){let m=f instanceof Error?f:new Error(String(f));d.statusCode=500,d.setHeader("content-type","text/plain; charset=utf-8"),d.end(`OAuth redirect failed: ${m.message}`)}finally{HDe(a).catch(()=>{})}}),s=null,c=()=>(s!==null&&(clearTimeout(s),s=null),HDe(a).catch(()=>{}));a.once("error",p=>{r(p instanceof Error?p:new Error(String(p)))}),a.listen(0,o,()=>{let p=a.address();if(!p||typeof p=="string"){r(new Error("Failed to resolve OAuth loopback port"));return}s=setTimeout(()=>{c()},e.timeoutMs??bTt),typeof s.unref=="function"&&s.unref(),t({redirectUri:`http://${n}:${p.port}`,close:BQ.tryPromise({try:c,catch:d=>d instanceof Error?d:new Error(String(d))})})})}),catch:t=>t instanceof Error?t:new Error(String(t))});var lr=e=>{if(e==null)return null;let t=e.trim();return t.length>0?t:null},VQ=e=>new URL(e).hostname,KQ=e=>{let t=e.trim().toLowerCase().replace(/[^a-z0-9]+/g,".").replace(/^\.+|\.+$/g,"");return t.length>0?t:"source"},xTt=e=>{let t=e.split(/[\\/]+/).map(r=>r.trim()).filter(r=>r.length>0);return t[t.length-1]??e},ETt=e=>{if(!e||e.length===0)return null;let t=e.map(r=>r.trim()).filter(r=>r.length>0);return t.length>0?t:null},TTt=e=>{let t=e.trim().toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"");return t.length>0?t:"mcp"},DTt=e=>{let t=lr(e.name)??lr(e.endpoint)??lr(e.command)??"mcp";return`stdio://local/${TTt(t)}`},ZDe=e=>{if(tg({transport:e.transport??void 0,command:e.command??void 0}))return Tf(lr(e.endpoint)??DTt(e));let t=lr(e.endpoint);if(t===null)throw new Error("Endpoint is required.");return Tf(t)},nAe=e=>new URL(`/v1/workspaces/${encodeURIComponent(e.scopeId)}/sources/${encodeURIComponent(e.sourceId)}/credentials/oauth/complete`,e.baseUrl).toString(),ATt=e=>new URL("/v1/oauth/source-auth/callback",e.baseUrl).toString(),ITt=e=>new URL(`/v1/workspaces/${encodeURIComponent(e.scopeId)}/oauth/provider/callback`,e.baseUrl).toString();function Tf(e){return new URL(e.trim()).toString()}var oAe=(e,t)=>`https://www.googleapis.com/discovery/v1/apis/${encodeURIComponent(e)}/${encodeURIComponent(t)}/rest`,iAe=(e,t)=>`Google ${e.split(/[^a-zA-Z0-9]+/).filter(Boolean).map(n=>n[0]?.toUpperCase()+n.slice(1)).join(" ")||e} ${t}`,aAe=e=>`google.${e.trim().toLowerCase().replace(/[^a-z0-9]+/g,".").replace(/^\.+|\.+$/g,"")}`,sAe=Fn.Struct({kind:Fn.Literal("source_oauth"),nonce:Fn.String,displayName:Fn.NullOr(Fn.String)}),wTt=Fn.encodeSync(Fn.parseJson(sAe)),kTt=Fn.decodeUnknownOption(Fn.parseJson(sAe)),CTt=e=>wTt({kind:"source_oauth",nonce:crypto.randomUUID(),displayName:lr(e.displayName)}),PTt=e=>{let t=kTt(e);return Ei.isSome(t)?lr(t.value.displayName):null},WDe=e=>{let t=lr(e.displayName)??VQ(e.endpoint);return/\boauth\b/i.test(t)?t:`${t} OAuth`},OTt=(e,t)=>Me.gen(function*(){if(!Kh(e.kind))return yield*Ne("sources/source-auth-service",`Expected MCP source, received ${e.kind}`);let r=yield*Vh(e),n=dm({endpoint:e.endpoint,transport:r.transport??void 0,queryParams:r.queryParams??void 0,headers:r.headers??void 0,command:r.command??void 0,args:r.args??void 0,env:r.env??void 0,cwd:r.cwd??void 0});return yield*ag({connect:n,namespace:e.namespace??KQ(e.name),sourceKey:e.id,mcpDiscoveryElicitation:t})}),IS=e=>({status:e.status,errorText:e.errorText,completedAt:e.now,updatedAt:e.now,sessionDataJson:e.sessionDataJson}),GQ=e=>Fn.encodeSync(JB)(e),NTt=Fn.decodeUnknownEither(JB),RF=e=>{if(e.providerKind!=="mcp_oauth")throw new Error(`Unsupported source auth provider for session ${e.id}`);let t=NTt(e.sessionDataJson);if(Pd.isLeft(t))throw new Error(`Invalid source auth session data for ${e.id}: ${LF.TreeFormatter.formatErrorSync(t.left)}`);return t.right},QDe=e=>{let t=RF(e.session);return GQ({...t,...e.patch})},cAe=e=>Fn.encodeSync(VB)(e),FTt=Fn.decodeUnknownEither(VB),zQ=e=>{if(e.providerKind!=="oauth2_pkce")throw new Error(`Unsupported source auth provider for session ${e.id}`);let t=FTt(e.sessionDataJson);if(Pd.isLeft(t))throw new Error(`Invalid source auth session data for ${e.id}: ${LF.TreeFormatter.formatErrorSync(t.left)}`);return t.right},RTt=e=>{let t=zQ(e.session);return cAe({...t,...e.patch})},lAe=e=>Fn.encodeSync(KB)(e),LTt=Fn.decodeUnknownEither(KB),JQ=e=>{if(e.providerKind!=="oauth2_provider_batch")throw new Error(`Unsupported source auth provider for session ${e.id}`);let t=LTt(e.sessionDataJson);if(Pd.isLeft(t))throw new Error(`Invalid source auth session data for ${e.id}: ${LF.TreeFormatter.formatErrorSync(t.left)}`);return t.right},$Tt=e=>{let t=JQ(e.session);return lAe({...t,...e.patch})},XDe=e=>Me.gen(function*(){if(e.session.executionId===null)return;let t=e.response.action==="accept"?{action:"accept"}:{action:"cancel",...e.response.reason?{content:{reason:e.response.reason}}:{}};if(!(yield*e.liveExecutionManager.resolveInteraction({executionId:e.session.executionId,response:t}))){let n=yield*e.executorState.executionInteractions.getPendingByExecutionId(e.session.executionId);Ei.isSome(n)&&(yield*e.executorState.executionInteractions.update(n.value.id,{status:t.action==="cancel"?"cancelled":"resolved",responseJson:YDe(_I(t)),responsePrivateJson:YDe(t),updatedAt:Date.now()}))}}),YDe=e=>e===void 0?null:JSON.stringify(e),aa=Me.fn("source.status.update")((e,t,r)=>Me.gen(function*(){let n=yield*e.loadSourceById({scopeId:t.scopeId,sourceId:t.id,actorScopeId:r.actorScopeId});return yield*e.persistSource({...n,status:r.status,lastError:r.lastError??null,auth:r.auth??n.auth,importAuth:r.importAuth??n.importAuth,updatedAt:Date.now()},{actorScopeId:r.actorScopeId})}).pipe(Me.withSpan("source.status.update",{attributes:{"executor.source.id":t.id,"executor.source.status":r.status}}))),uAe=e=>typeof e.kind=="string",MTt=e=>uAe(e)&&e.kind==="google_discovery",jTt=e=>uAe(e)&&"endpoint"in e&&ES(e.kind),BTt=e=>e.kind===void 0||Kh(e.kind),UQ=e=>Me.gen(function*(){let t=lr(e.rawValue);if(t!==null)return yield*e.storeSecretMaterial({purpose:"auth_material",value:t});let r=lr(e.ref?.providerId),n=lr(e.ref?.handle);return r===null||n===null?null:{providerId:r,handle:n}}),HQ=e=>Me.gen(function*(){let t=e.existing;if(e.auth===void 0&&t&&ES(t.kind))return t.auth;let r=e.auth??{kind:"none"};if(r.kind==="none")return{kind:"none"};let n=lr(r.headerName)??"Authorization",o=r.prefix??"Bearer ";if(r.kind==="bearer"){let s=lr(r.token),c=r.tokenRef??null;if(s===null&&c===null&&t&&ES(t.kind)&&t.auth.kind==="bearer")return t.auth;let p=yield*UQ({rawValue:s,ref:c,storeSecretMaterial:e.storeSecretMaterial});return p===null?yield*Ne("sources/source-auth-service","Bearer auth requires token or tokenRef"):{kind:"bearer",headerName:n,prefix:o,token:p}}if(lr(r.accessToken)===null&&r.accessTokenRef==null&&lr(r.refreshToken)===null&&r.refreshTokenRef==null&&t&&ES(t.kind)&&t.auth.kind==="oauth2")return t.auth;let i=yield*UQ({rawValue:r.accessToken,ref:r.accessTokenRef??null,storeSecretMaterial:e.storeSecretMaterial});if(i===null)return yield*Ne("sources/source-auth-service","OAuth2 auth requires accessToken or accessTokenRef");let a=yield*UQ({rawValue:r.refreshToken,ref:r.refreshTokenRef??null,storeSecretMaterial:e.storeSecretMaterial});return{kind:"oauth2",headerName:n,prefix:o,accessToken:i,refreshToken:a}}),pAe=e=>Me.gen(function*(){let t=ES(e.sourceKind)?"reuse_runtime":"none",r=e.importAuthPolicy??e.existing?.importAuthPolicy??t;if(r==="none"||r==="reuse_runtime")return{importAuthPolicy:r,importAuth:{kind:"none"}};if(e.importAuth===void 0&&e.existing&&e.existing.importAuthPolicy==="separate")return{importAuthPolicy:r,importAuth:e.existing.importAuth};let n=yield*HQ({existing:void 0,auth:e.importAuth??{kind:"none"},storeSecretMaterial:e.storeSecretMaterial});return{importAuthPolicy:r,importAuth:n}}),dAe=e=>!e.explicitAuthProvided&&e.auth.kind==="none"&&(e.existing?.auth.kind??"none")==="none",qTt=Fn.decodeUnknownOption(WB),_Ae=Fn.encodeSync(WB),fAe=e=>{if(e.clientMetadataJson===null)return"app_callback";let t=qTt(e.clientMetadataJson);return Ei.isNone(t)?"app_callback":t.value.redirectMode??"app_callback"},$F=e=>e.clientSecretProviderId&&e.clientSecretHandle?{providerId:e.clientSecretProviderId,handle:e.clientSecretHandle}:null,UTt=e=>Me.gen(function*(){let t=_i(e.source),r=t.getOauth2SetupConfig?yield*t.getOauth2SetupConfig({source:e.source,slot:"runtime"}):null;if(r===null)return yield*Ne("sources/source-auth-service",`Source ${e.source.id} does not support OAuth client configuration`);let n=yield*e.executorState.sourceOauthClients.getByScopeSourceAndProvider({scopeId:e.source.scopeId,sourceId:e.source.id,providerKey:r.providerKey}),o=t.normalizeOauthClientInput?yield*t.normalizeOauthClientInput(e.oauthClient):e.oauthClient,i=Ei.isSome(n)?$F(n.value):null,a=o.clientSecret?yield*e.storeSecretMaterial({purpose:"oauth_client_info",value:o.clientSecret}):null,s=Date.now(),c=Ei.isSome(n)?n.value.id:V6.make(`src_oauth_client_${crypto.randomUUID()}`);return yield*e.executorState.sourceOauthClients.upsert({id:c,scopeId:e.source.scopeId,sourceId:e.source.id,providerKey:r.providerKey,clientId:o.clientId,clientSecretProviderId:a?.providerId??null,clientSecretHandle:a?.handle??null,clientMetadataJson:_Ae({redirectMode:o.redirectMode??"app_callback"}),createdAt:Ei.isSome(n)?n.value.createdAt:s,updatedAt:s}),i&&(a===null||i.providerId!==a.providerId||i.handle!==a.handle)&&(yield*e.deleteSecretMaterial(i).pipe(Me.either,Me.ignore)),{providerKey:r.providerKey,clientId:o.clientId,clientSecret:a,redirectMode:o.redirectMode??"app_callback"}}),zTt=e=>Me.gen(function*(){let t=_i(e.source),r=t.getOauth2SetupConfig?yield*t.getOauth2SetupConfig({source:e.source,slot:"runtime"}):null;if(r===null)return null;let n=yield*e.executorState.sourceOauthClients.getByScopeSourceAndProvider({scopeId:e.source.scopeId,sourceId:e.source.id,providerKey:r.providerKey});return Ei.isNone(n)?null:{providerKey:n.value.providerKey,clientId:n.value.clientId,clientSecret:$F(n.value),redirectMode:fAe(n.value)}}),mAe=e=>Me.gen(function*(){let t=e.normalizeOauthClient?yield*e.normalizeOauthClient(e.oauthClient):e.oauthClient,r=t.clientSecret?yield*e.storeSecretMaterial({purpose:"oauth_client_info",value:t.clientSecret}):null,n=Date.now(),o=Am.make(`ws_oauth_client_${crypto.randomUUID()}`);return yield*e.executorState.scopeOauthClients.upsert({id:o,scopeId:e.scopeId,providerKey:e.providerKey,label:lr(e.label)??null,clientId:t.clientId,clientSecretProviderId:r?.providerId??null,clientSecretHandle:r?.handle??null,clientMetadataJson:_Ae({redirectMode:t.redirectMode??"app_callback"}),createdAt:n,updatedAt:n}),{id:o,providerKey:e.providerKey,label:lr(e.label)??null,clientId:t.clientId,clientSecret:r,redirectMode:t.redirectMode??"app_callback"}}),ZQ=e=>Me.gen(function*(){let t=yield*e.executorState.scopeOauthClients.getById(e.oauthClientId);return Ei.isNone(t)?null:!WQ({scopeId:e.scopeId,localScopeState:e.localScopeState}).includes(t.value.scopeId)||t.value.providerKey!==e.providerKey?yield*Ne("sources/source-auth-service",`Scope OAuth client ${e.oauthClientId} is not valid for ${e.providerKey}`):{id:t.value.id,providerKey:t.value.providerKey,label:t.value.label,clientId:t.value.clientId,clientSecret:$F(t.value),redirectMode:fAe(t.value)}}),JTt=(e,t)=>{let r=new Set(e);return t.every(n=>r.has(n))},Df=e=>[...new Set(e.map(t=>t.trim()).filter(t=>t.length>0))],WQ=e=>{let t=e.localScopeState;return t?t.installation.scopeId!==e.scopeId?[e.scopeId]:[...new Set([e.scopeId,...t.installation.resolutionScopeIds])]:[e.scopeId]},VTt=(e,t)=>{let r=Object.entries(e??{}).sort(([o],[i])=>o.localeCompare(i)),n=Object.entries(t??{}).sort(([o],[i])=>o.localeCompare(i));return r.length===n.length&&r.every(([o,i],a)=>{let s=n[a];return s!==void 0&&s[0]===o&&s[1]===i})},KTt=(e,t)=>e.providerKey===t.providerKey&&e.authorizationEndpoint===t.authorizationEndpoint&&e.tokenEndpoint===t.tokenEndpoint&&e.headerName===t.headerName&&e.prefix===t.prefix&&e.clientAuthentication===t.clientAuthentication&&VTt(e.authorizationParams,t.authorizationParams),hAe=e=>Me.gen(function*(){let t=_i(e),r=t.getOauth2SetupConfig?yield*t.getOauth2SetupConfig({source:e,slot:"runtime"}):null;return r===null?null:{source:e,requiredScopes:Df(r.scopes),setupConfig:r}}),GTt=e=>Me.gen(function*(){if(e.length===0)return yield*Ne("sources/source-auth-service","Provider auth setup requires at least one target source");let t=e[0].setupConfig;for(let r of e.slice(1))if(!KTt(t,r.setupConfig))return yield*Ne("sources/source-auth-service",`Provider auth setup for ${t.providerKey} requires compatible source OAuth configuration`);return{...t,scopes:Df(e.flatMap(r=>[...r.requiredScopes]))}}),HTt=e=>Me.gen(function*(){let t=WQ({scopeId:e.scopeId,localScopeState:e.localScopeState});for(let r of t){let o=(yield*e.executorState.providerAuthGrants.listByScopeActorAndProvider({scopeId:r,actorScopeId:e.actorScopeId??null,providerKey:e.providerKey})).find(i=>i.oauthClientId===e.oauthClientId&&JTt(i.grantedScopes,e.requiredScopes));if(o)return Ei.some(o)}return Ei.none()}),ZTt=e=>Me.gen(function*(){let t=e.existingGrant??null,r=t?.refreshToken??null;if(e.refreshToken!==null&&(r=yield*e.storeSecretMaterial({purpose:"oauth_refresh_token",value:e.refreshToken,name:`${e.providerKey} Refresh`})),r===null)return yield*Ne("sources/source-auth-service",`Provider auth grant for ${e.providerKey} is missing a refresh token`);let n=Date.now(),o={id:t?.id??Bp.make(`provider_grant_${crypto.randomUUID()}`),scopeId:e.scopeId,actorScopeId:e.actorScopeId??null,providerKey:e.providerKey,oauthClientId:e.oauthClientId,tokenEndpoint:e.tokenEndpoint,clientAuthentication:e.clientAuthentication,headerName:e.headerName,prefix:e.prefix,refreshToken:r,grantedScopes:[...Df([...t?.grantedScopes??[],...e.grantedScopes])],lastRefreshedAt:t?.lastRefreshedAt??null,orphanedAt:null,createdAt:t?.createdAt??n,updatedAt:n};return yield*e.executorState.providerAuthGrants.upsert(o),t?.refreshToken&&(t.refreshToken.providerId!==r.providerId||t.refreshToken.handle!==r.handle)&&(yield*e.deleteSecretMaterial(t.refreshToken).pipe(Me.either,Me.ignore)),o}),yAe=e=>Me.gen(function*(){let t=_i(e.source),r=t.getOauth2SetupConfig?yield*t.getOauth2SetupConfig({source:e.source,slot:"runtime"}):null;if(r===null)return null;let n=yield*zTt({executorState:e.executorState,source:e.source});if(n===null)return null;let o=Dm.make(`src_auth_${crypto.randomUUID()}`),i=crypto.randomUUID(),a=nAe({baseUrl:e.baseUrl,scopeId:e.source.scopeId,sourceId:e.source.id}),c=(e.redirectModeOverride??n.redirectMode)==="loopback"?yield*qQ({completionUrl:a}):null,p=c?.redirectUri??a,d=eq();return yield*Me.gen(function*(){let f=tq({authorizationEndpoint:r.authorizationEndpoint,clientId:n.clientId,redirectUri:p,scopes:[...r.scopes],state:i,codeVerifier:d,extraParams:r.authorizationParams}),m=Date.now();return yield*e.executorState.sourceAuthSessions.upsert({id:o,scopeId:e.source.scopeId,sourceId:e.source.id,actorScopeId:e.actorScopeId??null,credentialSlot:"runtime",executionId:e.executionId??null,interactionId:e.interactionId??null,providerKind:"oauth2_pkce",status:"pending",state:i,sessionDataJson:cAe({kind:"oauth2_pkce",providerKey:r.providerKey,authorizationEndpoint:r.authorizationEndpoint,tokenEndpoint:r.tokenEndpoint,redirectUri:p,clientId:n.clientId,clientAuthentication:r.clientAuthentication,clientSecret:n.clientSecret,scopes:[...r.scopes],headerName:r.headerName,prefix:r.prefix,authorizationParams:{...r.authorizationParams},codeVerifier:d,authorizationUrl:f}),errorText:null,completedAt:null,createdAt:m,updatedAt:m}),{kind:"oauth_required",source:yield*aa(e.sourceStore,e.source,{actorScopeId:e.actorScopeId,status:"auth_required",lastError:null}),sessionId:o,authorizationUrl:f}}).pipe(Me.onError(()=>c?c.close.pipe(Me.orDie):Me.void))}),WTt=e=>Me.gen(function*(){if(e.targetSources.length===0)return yield*Ne("sources/source-auth-service","Provider OAuth setup requires at least one target source");let t=Dm.make(`src_auth_${crypto.randomUUID()}`),r=crypto.randomUUID(),n=ITt({baseUrl:e.baseUrl,scopeId:e.scopeId}),i=(e.redirectModeOverride??e.scopeOauthClient.redirectMode)==="loopback"?yield*qQ({completionUrl:n}):null,a=i?.redirectUri??n,s=eq();return yield*Me.gen(function*(){let c=tq({authorizationEndpoint:e.setupConfig.authorizationEndpoint,clientId:e.scopeOauthClient.clientId,redirectUri:a,scopes:[...Df(e.setupConfig.scopes)],state:r,codeVerifier:s,extraParams:e.setupConfig.authorizationParams}),p=Date.now();yield*e.executorState.sourceAuthSessions.upsert({id:t,scopeId:e.scopeId,sourceId:Mn.make(`oauth_provider_${crypto.randomUUID()}`),actorScopeId:e.actorScopeId??null,credentialSlot:"runtime",executionId:e.executionId??null,interactionId:e.interactionId??null,providerKind:"oauth2_provider_batch",status:"pending",state:r,sessionDataJson:lAe({kind:"provider_oauth_batch",providerKey:e.setupConfig.providerKey,authorizationEndpoint:e.setupConfig.authorizationEndpoint,tokenEndpoint:e.setupConfig.tokenEndpoint,redirectUri:a,oauthClientId:e.scopeOauthClient.id,clientAuthentication:e.setupConfig.clientAuthentication,scopes:[...Df(e.setupConfig.scopes)],headerName:e.setupConfig.headerName,prefix:e.setupConfig.prefix,authorizationParams:{...e.setupConfig.authorizationParams},targetSources:e.targetSources.map(f=>({sourceId:f.source.id,requiredScopes:[...Df(f.requiredScopes)]})),codeVerifier:s,authorizationUrl:c}),errorText:null,completedAt:null,createdAt:p,updatedAt:p});let d=yield*aa(e.sourceStore,e.targetSources[0].source,{actorScopeId:e.actorScopeId,status:"auth_required",lastError:null});return yield*Me.forEach(e.targetSources.slice(1),f=>aa(e.sourceStore,f.source,{actorScopeId:e.actorScopeId,status:"auth_required",lastError:null}).pipe(Me.asVoid),{discard:!0}),{sessionId:t,authorizationUrl:c,source:d}}).pipe(Me.onError(()=>i?i.close.pipe(Me.orDie):Me.void))}),gAe=e=>Me.gen(function*(){let t=yield*GTt(e.targets),r=yield*HTt({executorState:e.executorState,scopeId:e.scopeId,actorScopeId:e.actorScopeId,providerKey:t.providerKey,oauthClientId:e.scopeOauthClient.id,requiredScopes:t.scopes,localScopeState:e.localScopeState});if(Ei.isSome(r))return{kind:"connected",sources:yield*SAe({sourceStore:e.sourceStore,sourceCatalogSync:e.sourceCatalogSync,actorScopeId:e.actorScopeId,grantId:r.value.id,providerKey:r.value.providerKey,headerName:r.value.headerName,prefix:r.value.prefix,targets:e.targets.map(c=>({source:c.source,requiredScopes:c.requiredScopes}))})};let n=lr(e.baseUrl),o=n??e.getLocalServerBaseUrl?.()??null;if(o===null)return yield*Ne("sources/source-auth-service",`Local executor server base URL is unavailable for ${t.providerKey} OAuth setup`);let i=yield*WTt({executorState:e.executorState,sourceStore:e.sourceStore,scopeId:e.scopeId,actorScopeId:e.actorScopeId,executionId:e.executionId,interactionId:e.interactionId,baseUrl:o,redirectModeOverride:n?"app_callback":void 0,scopeOauthClient:e.scopeOauthClient,setupConfig:t,targetSources:e.targets.map(s=>({source:s.source,requiredScopes:s.requiredScopes}))});return{kind:"oauth_required",sources:yield*Me.forEach(e.targets,s=>e.sourceStore.loadSourceById({scopeId:s.source.scopeId,sourceId:s.source.id,actorScopeId:e.actorScopeId}),{discard:!1}),sessionId:i.sessionId,authorizationUrl:i.authorizationUrl}}),SAe=e=>Me.forEach(e.targets,t=>Me.gen(function*(){let r=yield*aa(e.sourceStore,t.source,{actorScopeId:e.actorScopeId,status:"connected",lastError:null,auth:{kind:"provider_grant_ref",grantId:e.grantId,providerKey:e.providerKey,requiredScopes:[...Df(t.requiredScopes)],headerName:e.headerName,prefix:e.prefix}});return yield*e.sourceCatalogSync.sync({source:r,actorScopeId:e.actorScopeId}),r}),{discard:!1}),QTt=e=>Me.gen(function*(){let t=yield*e.executorState.providerAuthGrants.getById(e.grantId);if(Ei.isNone(t)||t.value.scopeId!==e.scopeId)return!1;let r=yield*hQ(e.executorState,{scopeId:e.scopeId,grantId:e.grantId});return yield*Me.forEach(r,n=>Me.gen(function*(){let o=yield*e.sourceStore.loadSourceById({scopeId:n.scopeId,sourceId:n.sourceId,actorScopeId:n.actorScopeId}).pipe(Me.catchAll(()=>Me.succeed(null)));if(o===null){yield*k_(e.executorState,{authArtifactId:n.id},e.deleteSecretMaterial),yield*e.executorState.authArtifacts.removeByScopeSourceAndActor({scopeId:n.scopeId,sourceId:n.sourceId,actorScopeId:n.actorScopeId,slot:n.slot});return}yield*e.sourceStore.persistSource({...o,status:"auth_required",lastError:null,auth:n.slot==="runtime"?{kind:"none"}:o.auth,importAuth:n.slot==="import"?{kind:"none"}:o.importAuth,updatedAt:Date.now()},{actorScopeId:n.actorScopeId}).pipe(Me.asVoid)}),{discard:!0}),yield*$Te(e.executorState,{grant:t.value},e.deleteSecretMaterial),yield*e.executorState.providerAuthGrants.removeById(e.grantId),!0}),eAe=e=>Me.gen(function*(){let t=e.sourceId?null:ZDe({endpoint:e.endpoint??null,transport:e.transport??null,command:e.command??null,name:e.name??null}),r=yield*e.sourceId?e.sourceStore.loadSourceById({scopeId:e.scopeId,sourceId:e.sourceId,actorScopeId:e.actorScopeId}).pipe(Me.flatMap(Te=>Kh(Te.kind)?Me.succeed(Te):Me.fail(Ne("sources/source-auth-service",`Expected MCP source, received ${Te.kind}`)))):e.sourceStore.loadSourcesInScope(e.scopeId,{actorScopeId:e.actorScopeId}).pipe(Me.map(Te=>Te.find(ke=>Kh(ke.kind)&&t!==null&&Tf(ke.endpoint)===t))),n=r?yield*Vh(r):null,o=e.command!==void 0?lr(e.command):n?.command??null,i=e.transport!==void 0&&e.transport!==null?e.transport:tg({transport:n?.transport??void 0,command:o??void 0})?"stdio":n?.transport??"auto";if(i==="stdio"&&o===null)return yield*Ne("sources/source-auth-service","MCP stdio transport requires a command");let a=ZDe({endpoint:e.endpoint??r?.endpoint??null,transport:i,command:o,name:e.name??r?.name??null}),s=lr(e.name)??r?.name??(i==="stdio"&&o!==null?xTt(o):VQ(a)),c=lr(e.namespace)??r?.namespace??KQ(s),p=e.enabled??r?.enabled??!0,d=i==="stdio"?null:e.queryParams!==void 0?e.queryParams:n?.queryParams??null,f=i==="stdio"?null:e.headers!==void 0?e.headers:n?.headers??null,m=e.args!==void 0?ETt(e.args):n?.args??null,y=e.env!==void 0?e.env:n?.env??null,g=e.cwd!==void 0?lr(e.cwd):n?.cwd??null,S=Date.now(),b=r?yield*vf({source:r,payload:{name:s,endpoint:a,namespace:c,status:"probing",enabled:p,binding:{transport:i,queryParams:d,headers:f,command:o,args:m,env:y,cwd:g},importAuthPolicy:"reuse_runtime",importAuth:{kind:"none"},auth:{kind:"none"},lastError:null},now:S}):yield*TS({scopeId:e.scopeId,sourceId:Mn.make(`src_${crypto.randomUUID()}`),payload:{name:s,kind:"mcp",endpoint:a,namespace:c,status:"probing",enabled:p,binding:{transport:i,queryParams:d,headers:f,command:o,args:m,env:y,cwd:g},importAuthPolicy:"reuse_runtime",importAuth:{kind:"none"},auth:{kind:"none"}},now:S}),E=yield*e.sourceStore.persistSource(b,{actorScopeId:e.actorScopeId});yield*e.sourceCatalogSync.sync({source:E,actorScopeId:e.actorScopeId});let I=yield*Me.either(OTt(E,e.mcpDiscoveryElicitation)),T=yield*Pd.match(I,{onLeft:()=>Me.succeed(null),onRight:Te=>Me.gen(function*(){let ke=yield*aa(e.sourceStore,E,{actorScopeId:e.actorScopeId,status:"connected",lastError:null,auth:{kind:"none"}}),Je=yield*Me.either(e.sourceCatalogSync.persistMcpCatalogSnapshotFromManifest({source:ke,manifest:Te.manifest}));return yield*Pd.match(Je,{onLeft:me=>aa(e.sourceStore,ke,{actorScopeId:e.actorScopeId,status:"error",lastError:me.message}).pipe(Me.zipRight(Me.fail(me))),onRight:()=>Me.succeed({kind:"connected",source:ke})})})});if(T)return T;let k=lr(e.baseUrl)??e.getLocalServerBaseUrl?.()??null;if(!k)return yield*Ne("sources/source-auth-service","Local executor server base URL is unavailable for source credential setup");let F=Dm.make(`src_auth_${crypto.randomUUID()}`),O=crypto.randomUUID(),$=nAe({baseUrl:k,scopeId:e.scopeId,sourceId:E.id}),N=yield*MT({endpoint:a,redirectUrl:$,state:O}),U=yield*aa(e.sourceStore,E,{actorScopeId:e.actorScopeId,status:"auth_required",lastError:null}),ge=Date.now();return yield*e.executorState.sourceAuthSessions.upsert({id:F,scopeId:e.scopeId,sourceId:U.id,actorScopeId:e.actorScopeId??null,credentialSlot:"runtime",executionId:e.executionId??null,interactionId:e.interactionId??null,providerKind:"mcp_oauth",status:"pending",state:O,sessionDataJson:GQ({kind:"mcp_oauth",endpoint:a,redirectUri:$,scope:null,resourceMetadataUrl:N.resourceMetadataUrl,authorizationServerUrl:N.authorizationServerUrl,resourceMetadata:N.resourceMetadata,authorizationServerMetadata:N.authorizationServerMetadata,clientInformation:N.clientInformation,codeVerifier:N.codeVerifier,authorizationUrl:N.authorizationUrl}),errorText:null,completedAt:null,createdAt:ge,updatedAt:ge}),{kind:"oauth_required",source:U,sessionId:F,authorizationUrl:N.authorizationUrl}}),XTt=e=>Me.gen(function*(){let t=Tf(e.sourceInput.endpoint),r=e.sourceInput.kind==="openapi"?Tf(e.sourceInput.specUrl):null,o=(yield*e.sourceStore.loadSourcesInScope(e.sourceInput.scopeId,{actorScopeId:e.sourceInput.actorScopeId})).find(g=>{if(g.kind!==e.sourceInput.kind||Tf(g.endpoint)!==t)return!1;if(e.sourceInput.kind==="openapi"){let S=Me.runSync(Vh(g));return lr(S.specUrl)===r}return!0}),i=lr(e.sourceInput.name)??o?.name??VQ(t),a=lr(e.sourceInput.namespace)??o?.namespace??KQ(i),s=o?yield*Vh(o):null,c=Date.now(),p=yield*HQ({existing:o,auth:e.sourceInput.auth,storeSecretMaterial:e.storeSecretMaterial}),d=yield*pAe({sourceKind:e.sourceInput.kind,existing:o,importAuthPolicy:e.sourceInput.importAuthPolicy??null,importAuth:e.sourceInput.importAuth??null,storeSecretMaterial:e.storeSecretMaterial}),f=o?yield*vf({source:o,payload:{name:i,endpoint:t,namespace:a,status:"probing",enabled:!0,binding:e.sourceInput.kind==="openapi"?{specUrl:r,defaultHeaders:s?.defaultHeaders??null}:{defaultHeaders:s?.defaultHeaders??null},importAuthPolicy:d.importAuthPolicy,importAuth:d.importAuth,auth:p,lastError:null},now:c}):yield*TS({scopeId:e.sourceInput.scopeId,sourceId:Mn.make(`src_${crypto.randomUUID()}`),payload:{name:i,kind:e.sourceInput.kind,endpoint:t,namespace:a,status:"probing",enabled:!0,binding:e.sourceInput.kind==="openapi"?{specUrl:r,defaultHeaders:s?.defaultHeaders??null}:{defaultHeaders:s?.defaultHeaders??null},importAuthPolicy:d.importAuthPolicy,importAuth:d.importAuth,auth:p},now:c}),m=yield*e.sourceStore.persistSource(f,{actorScopeId:e.sourceInput.actorScopeId});if(dAe({existing:o,explicitAuthProvided:e.sourceInput.auth!==void 0,auth:m.auth})){let g=lr(e.baseUrl),S=g??e.getLocalServerBaseUrl?.()??null;if(S){let E=yield*yAe({executorState:e.executorState,sourceStore:e.sourceStore,source:m,actorScopeId:e.sourceInput.actorScopeId,executionId:e.sourceInput.executionId,interactionId:e.sourceInput.interactionId,baseUrl:S,redirectModeOverride:g?"app_callback":void 0,storeSecretMaterial:e.storeSecretMaterial});if(E)return E}return{kind:"credential_required",source:yield*aa(e.sourceStore,m,{actorScopeId:e.sourceInput.actorScopeId,status:"auth_required",lastError:null}),credentialSlot:"runtime"}}let y=yield*Me.either(e.sourceCatalogSync.sync({source:{...m,status:"connected"},actorScopeId:e.sourceInput.actorScopeId}));return yield*Pd.match(y,{onLeft:g=>D_(g)?aa(e.sourceStore,m,{actorScopeId:e.sourceInput.actorScopeId,status:"auth_required",lastError:null}).pipe(Me.map(S=>({kind:"credential_required",source:S,credentialSlot:g.slot}))):aa(e.sourceStore,m,{actorScopeId:e.sourceInput.actorScopeId,status:"error",lastError:g.message}).pipe(Me.zipRight(Me.fail(g))),onRight:()=>aa(e.sourceStore,m,{actorScopeId:e.sourceInput.actorScopeId,status:"connected",lastError:null}).pipe(Me.map(g=>({kind:"connected",source:g})))})}).pipe(Me.withSpan("source.connect.http",{attributes:{"executor.source.kind":e.sourceInput.kind,"executor.source.endpoint":e.sourceInput.endpoint,...e.sourceInput.namespace?{"executor.source.namespace":e.sourceInput.namespace}:{},...e.sourceInput.name?{"executor.source.name":e.sourceInput.name}:{}}})),YTt=e=>Me.gen(function*(){let t=e.sourceInput.service.trim(),r=e.sourceInput.version.trim(),n=Tf(lr(e.sourceInput.discoveryUrl)??oAe(t,r)),i=(yield*e.sourceStore.loadSourcesInScope(e.sourceInput.scopeId,{actorScopeId:e.sourceInput.actorScopeId})).find(T=>{if(T.kind!=="google_discovery")return!1;let k=T.binding;return typeof k.service!="string"||typeof k.version!="string"?!1:k.service.trim()===t&&k.version.trim()===r}),a=lr(e.sourceInput.name)??i?.name??iAe(t,r),s=lr(e.sourceInput.namespace)??i?.namespace??aAe(t),c=Array.isArray(i?.binding?.scopes)?i.binding.scopes:[],p=(e.sourceInput.scopes??c).map(T=>T.trim()).filter(T=>T.length>0),d=i?yield*Vh(i):null,f=Date.now(),m=yield*HQ({existing:i,auth:e.sourceInput.auth,storeSecretMaterial:e.storeSecretMaterial}),y=yield*pAe({sourceKind:e.sourceInput.kind,existing:i,importAuthPolicy:e.sourceInput.importAuthPolicy??null,importAuth:e.sourceInput.importAuth??null,storeSecretMaterial:e.storeSecretMaterial}),g=i?yield*vf({source:i,payload:{name:a,endpoint:n,namespace:s,status:"probing",enabled:!0,binding:{service:t,version:r,discoveryUrl:n,defaultHeaders:d?.defaultHeaders??null,scopes:[...p]},importAuthPolicy:y.importAuthPolicy,importAuth:y.importAuth,auth:m,lastError:null},now:f}):yield*TS({scopeId:e.sourceInput.scopeId,sourceId:Mn.make(`src_${crypto.randomUUID()}`),payload:{name:a,kind:"google_discovery",endpoint:n,namespace:s,status:"probing",enabled:!0,binding:{service:t,version:r,discoveryUrl:n,defaultHeaders:d?.defaultHeaders??null,scopes:[...p]},importAuthPolicy:y.importAuthPolicy,importAuth:y.importAuth,auth:m},now:f}),S=yield*e.sourceStore.persistSource(g,{actorScopeId:e.sourceInput.actorScopeId}),b=_i(S),E=yield*hAe(S);if(E!==null&&e.sourceInput.auth===void 0&&S.auth.kind==="none"){let T=null;if(e.sourceInput.scopeOauthClientId?T=yield*ZQ({executorState:e.executorState,scopeId:S.scopeId,oauthClientId:e.sourceInput.scopeOauthClientId,providerKey:E.setupConfig.providerKey,localScopeState:e.localScopeState}):e.sourceInput.oauthClient&&(T=yield*mAe({executorState:e.executorState,scopeId:S.scopeId,providerKey:E.setupConfig.providerKey,oauthClient:e.sourceInput.oauthClient,label:`${a} OAuth Client`,normalizeOauthClient:b.normalizeOauthClientInput,storeSecretMaterial:e.storeSecretMaterial})),T===null)return yield*Ne("sources/source-auth-service",`${E.setupConfig.providerKey} shared auth requires a workspace OAuth client`);let k=yield*gAe({executorState:e.executorState,sourceStore:e.sourceStore,sourceCatalogSync:e.sourceCatalogSync,scopeId:S.scopeId,actorScopeId:e.sourceInput.actorScopeId,executionId:e.sourceInput.executionId,interactionId:e.sourceInput.interactionId,baseUrl:e.baseUrl,getLocalServerBaseUrl:e.getLocalServerBaseUrl,scopeOauthClient:T,targets:[E],localScopeState:e.localScopeState});return k.kind==="connected"?{kind:"connected",source:k.sources[0]}:{kind:"oauth_required",source:k.sources[0],sessionId:k.sessionId,authorizationUrl:k.authorizationUrl}}if(e.sourceInput.oauthClient&&(yield*UTt({executorState:e.executorState,source:S,oauthClient:e.sourceInput.oauthClient,storeSecretMaterial:e.storeSecretMaterial,deleteSecretMaterial:e.deleteSecretMaterial})),dAe({existing:i,explicitAuthProvided:e.sourceInput.auth!==void 0,auth:S.auth})){let T=lr(e.baseUrl),k=T??e.getLocalServerBaseUrl?.()??null;if(k){let O=yield*yAe({executorState:e.executorState,sourceStore:e.sourceStore,source:S,actorScopeId:e.sourceInput.actorScopeId,executionId:e.sourceInput.executionId,interactionId:e.sourceInput.interactionId,baseUrl:k,redirectModeOverride:T?"app_callback":void 0,storeSecretMaterial:e.storeSecretMaterial});if(O)return O}return{kind:"credential_required",source:yield*aa(e.sourceStore,S,{actorScopeId:e.sourceInput.actorScopeId,status:"auth_required",lastError:null}),credentialSlot:"runtime"}}let I=yield*Me.either(e.sourceCatalogSync.sync({source:{...S,status:"connected"},actorScopeId:e.sourceInput.actorScopeId}));return yield*Pd.match(I,{onLeft:T=>D_(T)?aa(e.sourceStore,S,{actorScopeId:e.sourceInput.actorScopeId,status:"auth_required",lastError:null}).pipe(Me.map(k=>({kind:"credential_required",source:k,credentialSlot:T.slot}))):aa(e.sourceStore,S,{actorScopeId:e.sourceInput.actorScopeId,status:"error",lastError:T.message}).pipe(Me.zipRight(Me.fail(T))),onRight:()=>aa(e.sourceStore,S,{actorScopeId:e.sourceInput.actorScopeId,status:"connected",lastError:null}).pipe(Me.map(T=>({kind:"connected",source:T})))})}),eDt=e=>Me.gen(function*(){if(e.sourceInput.sources.length===0)return yield*Ne("sources/source-auth-service","Google batch connect requires at least one source");let t=yield*e.sourceStore.loadSourcesInScope(e.sourceInput.scopeId,{actorScopeId:e.sourceInput.actorScopeId}),r=yield*Me.forEach(e.sourceInput.sources,i=>Me.gen(function*(){let a=i.service.trim(),s=i.version.trim(),c=Tf(lr(i.discoveryUrl)??oAe(a,s)),p=t.find(I=>{if(I.kind!=="google_discovery")return!1;let T=I.binding;return typeof T.service=="string"&&typeof T.version=="string"&&T.service.trim()===a&&T.version.trim()===s}),d=lr(i.name)??p?.name??iAe(a,s),f=lr(i.namespace)??p?.namespace??aAe(a),m=Df(i.scopes??(Array.isArray(p?.binding.scopes)?p?.binding.scopes:[])),y=p?yield*Vh(p):null,g=Date.now(),S=p?yield*vf({source:p,payload:{name:d,endpoint:c,namespace:f,status:"probing",enabled:!0,binding:{service:a,version:s,discoveryUrl:c,defaultHeaders:y?.defaultHeaders??null,scopes:[...m]},importAuthPolicy:"reuse_runtime",importAuth:{kind:"none"},auth:p.auth.kind==="provider_grant_ref"?p.auth:{kind:"none"},lastError:null},now:g}):yield*TS({scopeId:e.sourceInput.scopeId,sourceId:Mn.make(`src_${crypto.randomUUID()}`),payload:{name:d,kind:"google_discovery",endpoint:c,namespace:f,status:"probing",enabled:!0,binding:{service:a,version:s,discoveryUrl:c,defaultHeaders:y?.defaultHeaders??null,scopes:[...m]},importAuthPolicy:"reuse_runtime",importAuth:{kind:"none"},auth:{kind:"none"}},now:g}),b=yield*e.sourceStore.persistSource(S,{actorScopeId:e.sourceInput.actorScopeId}),E=yield*hAe(b);return E===null?yield*Ne("sources/source-auth-service",`Source ${b.id} does not support Google shared auth`):E}),{discard:!1}),n=yield*ZQ({executorState:e.executorState,scopeId:e.sourceInput.scopeId,oauthClientId:e.sourceInput.scopeOauthClientId,providerKey:r[0].setupConfig.providerKey,localScopeState:e.localScopeState});if(n===null)return yield*Ne("sources/source-auth-service",`Scope OAuth client not found: ${e.sourceInput.scopeOauthClientId}`);let o=yield*gAe({executorState:e.executorState,sourceStore:e.sourceStore,sourceCatalogSync:e.sourceCatalogSync,scopeId:e.sourceInput.scopeId,actorScopeId:e.sourceInput.actorScopeId,executionId:e.sourceInput.executionId,interactionId:e.sourceInput.interactionId,baseUrl:e.sourceInput.baseUrl,getLocalServerBaseUrl:e.getLocalServerBaseUrl,scopeOauthClient:n,targets:r,localScopeState:e.localScopeState});return o.kind==="connected"?{results:o.sources.map(i=>({source:i,status:"connected"})),providerOauthSession:null}:{results:o.sources.map(i=>({source:i,status:"pending_oauth"})),providerOauthSession:{sessionId:o.sessionId,authorizationUrl:o.authorizationUrl,sourceIds:o.sources.map(i=>i.id)}}}),tDt=(e,t)=>{let r=o=>Me.succeed(o),n=o=>Me.succeed(o);return{getSourceById:({scopeId:o,sourceId:i,actorScopeId:a})=>t(e.sourceStore.loadSourceById({scopeId:o,sourceId:i,actorScopeId:a})),addExecutorSource:(o,i=void 0)=>t((MTt(o)?YTt({executorState:e.executorState,sourceStore:e.sourceStore,sourceCatalogSync:e.sourceCatalogSync,sourceInput:o,storeSecretMaterial:e.storeSecretMaterial,deleteSecretMaterial:e.deleteSecretMaterial,resolveSecretMaterial:e.resolveSecretMaterial,getLocalServerBaseUrl:e.getLocalServerBaseUrl,baseUrl:i?.baseUrl,localScopeState:e.localScopeState}):jTt(o)?XTt({executorState:e.executorState,sourceStore:e.sourceStore,sourceCatalogSync:e.sourceCatalogSync,sourceInput:o,storeSecretMaterial:e.storeSecretMaterial,deleteSecretMaterial:e.deleteSecretMaterial,resolveSecretMaterial:e.resolveSecretMaterial,getLocalServerBaseUrl:e.getLocalServerBaseUrl,baseUrl:i?.baseUrl,localScopeState:e.localScopeState}):BTt(o)?eAe({executorState:e.executorState,sourceStore:e.sourceStore,sourceCatalogSync:e.sourceCatalogSync,getLocalServerBaseUrl:e.getLocalServerBaseUrl,scopeId:o.scopeId,actorScopeId:o.actorScopeId,executionId:o.executionId,interactionId:o.interactionId,endpoint:o.endpoint,name:o.name,namespace:o.namespace,transport:o.transport,queryParams:o.queryParams,headers:o.headers,command:o.command,args:o.args,env:o.env,cwd:o.cwd,mcpDiscoveryElicitation:i?.mcpDiscoveryElicitation,baseUrl:i?.baseUrl,resolveSecretMaterial:e.resolveSecretMaterial}):Me.fail(Ne("sources/source-auth-service",`Unsupported executor source input: ${JSON.stringify(o)}`))).pipe(Me.flatMap(r))),connectGoogleDiscoveryBatch:o=>t(eDt({executorState:e.executorState,sourceStore:e.sourceStore,sourceCatalogSync:e.sourceCatalogSync,sourceInput:o,getLocalServerBaseUrl:e.getLocalServerBaseUrl,localScopeState:e.localScopeState})),connectMcpSource:o=>t(eAe({executorState:e.executorState,sourceStore:e.sourceStore,sourceCatalogSync:e.sourceCatalogSync,getLocalServerBaseUrl:e.getLocalServerBaseUrl,scopeId:o.scopeId,actorScopeId:o.actorScopeId,sourceId:o.sourceId,executionId:null,interactionId:null,endpoint:o.endpoint,name:o.name,namespace:o.namespace,enabled:o.enabled,transport:o.transport,queryParams:o.queryParams,headers:o.headers,command:o.command,args:o.args,env:o.env,cwd:o.cwd,baseUrl:o.baseUrl,resolveSecretMaterial:e.resolveSecretMaterial}).pipe(Me.flatMap(n))),listScopeOauthClients:({scopeId:o,providerKey:i})=>t(Me.gen(function*(){let a=WQ({scopeId:o,localScopeState:e.localScopeState}),s=new Map;for(let c of a){let p=yield*e.executorState.scopeOauthClients.listByScopeAndProvider({scopeId:c,providerKey:i});for(let d of p)s.has(d.id)||s.set(d.id,d)}return[...s.values()]})),createScopeOauthClient:({scopeId:o,providerKey:i,label:a,oauthClient:s})=>t(Me.gen(function*(){let c=cQ(i),p=yield*mAe({executorState:e.executorState,scopeId:o,providerKey:i,oauthClient:s,label:a,normalizeOauthClient:c?.normalizeOauthClientInput,storeSecretMaterial:e.storeSecretMaterial}),d=yield*e.executorState.scopeOauthClients.getById(p.id);return Ei.isNone(d)?yield*Ne("sources/source-auth-service",`Scope OAuth client ${p.id} was not persisted`):d.value})),removeScopeOauthClient:({scopeId:o,oauthClientId:i})=>t(Me.gen(function*(){let a=yield*e.executorState.scopeOauthClients.getById(i);if(Ei.isNone(a)||a.value.scopeId!==o)return!1;let c=(yield*e.executorState.providerAuthGrants.listByScopeId(o)).find(f=>f.oauthClientId===i);if(c)return yield*Ne("sources/source-auth-service",`Scope OAuth client ${i} is still referenced by provider grant ${c.id}`);let p=$F(a.value),d=yield*e.executorState.scopeOauthClients.removeById(i);return d&&p&&(yield*e.deleteSecretMaterial(p).pipe(Me.either,Me.ignore)),d})),removeProviderAuthGrant:({scopeId:o,grantId:i})=>t(QTt({executorState:e.executorState,sourceStore:e.sourceStore,scopeId:o,grantId:i,deleteSecretMaterial:e.deleteSecretMaterial}))}},rDt=(e,t)=>({startSourceOAuthSession:r=>Me.gen(function*(){let n=lr(r.baseUrl)??e.getLocalServerBaseUrl?.()??null;if(!n)return yield*Ne("sources/source-auth-service","Local executor server base URL is unavailable for OAuth setup");let o=Dm.make(`src_auth_${crypto.randomUUID()}`),i=CTt({displayName:r.displayName}),a=ATt({baseUrl:n}),s=Tf(r.provider.endpoint),c=yield*MT({endpoint:s,redirectUrl:a,state:i}),p=Date.now();return yield*e.executorState.sourceAuthSessions.upsert({id:o,scopeId:r.scopeId,sourceId:Mn.make(`oauth_draft_${crypto.randomUUID()}`),actorScopeId:r.actorScopeId??null,credentialSlot:"runtime",executionId:null,interactionId:null,providerKind:"mcp_oauth",status:"pending",state:i,sessionDataJson:GQ({kind:"mcp_oauth",endpoint:s,redirectUri:a,scope:r.provider.kind,resourceMetadataUrl:c.resourceMetadataUrl,authorizationServerUrl:c.authorizationServerUrl,resourceMetadata:c.resourceMetadata,authorizationServerMetadata:c.authorizationServerMetadata,clientInformation:c.clientInformation,codeVerifier:c.codeVerifier,authorizationUrl:c.authorizationUrl}),errorText:null,completedAt:null,createdAt:p,updatedAt:p}),{sessionId:o,authorizationUrl:c.authorizationUrl}}),completeSourceOAuthSession:({state:r,code:n,error:o,errorDescription:i})=>t(Me.gen(function*(){let a=yield*e.executorState.sourceAuthSessions.getByState(r);if(Ei.isNone(a))return yield*Ne("sources/source-auth-service",`Source auth session not found for state ${r}`);let s=a.value,c=RF(s);if(s.status==="completed")return yield*Ne("sources/source-auth-service",`Source auth session ${s.id} is already completed`);if(s.status!=="pending")return yield*Ne("sources/source-auth-service",`Source auth session ${s.id} is not pending`);if(lr(o)!==null){let S=lr(i)??lr(o)??"OAuth authorization failed",b=Date.now();return yield*e.executorState.sourceAuthSessions.update(s.id,IS({sessionDataJson:s.sessionDataJson,status:"failed",now:b,errorText:S})),yield*Ne("sources/source-auth-service",S)}let p=lr(n);if(p===null)return yield*Ne("sources/source-auth-service","Missing OAuth authorization code");if(c.codeVerifier===null)return yield*Ne("sources/source-auth-service","OAuth session is missing the PKCE code verifier");if(c.scope!==null&&c.scope!=="mcp")return yield*Ne("sources/source-auth-service",`Unsupported OAuth provider: ${c.scope}`);let d=yield*DB({session:{endpoint:c.endpoint,redirectUrl:c.redirectUri,codeVerifier:c.codeVerifier,resourceMetadataUrl:c.resourceMetadataUrl,authorizationServerUrl:c.authorizationServerUrl,resourceMetadata:c.resourceMetadata,authorizationServerMetadata:c.authorizationServerMetadata,clientInformation:c.clientInformation},code:p}),f=WDe({displayName:PTt(s.state),endpoint:c.endpoint}),m=yield*e.storeSecretMaterial({purpose:"oauth_access_token",value:d.tokens.access_token,name:f}),y=d.tokens.refresh_token?yield*e.storeSecretMaterial({purpose:"oauth_refresh_token",value:d.tokens.refresh_token,name:`${f} Refresh`}):null,g={kind:"oauth2",headerName:"Authorization",prefix:"Bearer ",accessToken:m,refreshToken:y};return yield*e.executorState.sourceAuthSessions.update(s.id,IS({sessionDataJson:QDe({session:s,patch:{codeVerifier:null,authorizationUrl:null,resourceMetadataUrl:d.resourceMetadataUrl,authorizationServerUrl:d.authorizationServerUrl,resourceMetadata:d.resourceMetadata,authorizationServerMetadata:d.authorizationServerMetadata}}),status:"completed",now:Date.now(),errorText:null})),{sessionId:s.id,auth:g}})),completeProviderOauthCallback:({scopeId:r,actorScopeId:n,state:o,code:i,error:a,errorDescription:s})=>t(Me.gen(function*(){let c=yield*e.executorState.sourceAuthSessions.getByState(o);if(Ei.isNone(c))return yield*Ne("sources/source-auth-service",`Source auth session not found for state ${o}`);let p=c.value;if(p.scopeId!==r)return yield*Ne("sources/source-auth-service",`Source auth session ${p.id} does not match scopeId=${r}`);if((p.actorScopeId??null)!==(n??null))return yield*Ne("sources/source-auth-service",`Source auth session ${p.id} does not match the active account`);if(p.providerKind!=="oauth2_provider_batch")return yield*Ne("sources/source-auth-service",`Source auth session ${p.id} is not a provider batch OAuth session`);if(p.status==="completed"){let F=JQ(p),O=yield*Me.forEach(F.targetSources,$=>e.sourceStore.loadSourceById({scopeId:r,sourceId:$.sourceId,actorScopeId:n}),{discard:!1});return{sessionId:p.id,sources:O}}if(p.status!=="pending")return yield*Ne("sources/source-auth-service",`Source auth session ${p.id} is not pending`);let d=JQ(p);if(lr(a)!==null){let F=lr(s)??lr(a)??"OAuth authorization failed";return yield*e.executorState.sourceAuthSessions.update(p.id,IS({sessionDataJson:p.sessionDataJson,status:"failed",now:Date.now(),errorText:F})),yield*Ne("sources/source-auth-service",F)}let f=lr(i);if(f===null)return yield*Ne("sources/source-auth-service","Missing OAuth authorization code");if(d.codeVerifier===null)return yield*Ne("sources/source-auth-service","OAuth session is missing the PKCE code verifier");let m=yield*ZQ({executorState:e.executorState,scopeId:r,oauthClientId:d.oauthClientId,providerKey:d.providerKey,localScopeState:e.localScopeState});if(m===null)return yield*Ne("sources/source-auth-service",`Scope OAuth client not found: ${d.oauthClientId}`);let y=null;m.clientSecret&&(y=yield*e.resolveSecretMaterial({ref:m.clientSecret}));let g=yield*rq({tokenEndpoint:d.tokenEndpoint,clientId:m.clientId,clientAuthentication:d.clientAuthentication,clientSecret:y,redirectUri:d.redirectUri,codeVerifier:d.codeVerifier??"",code:f}),b=(yield*e.executorState.providerAuthGrants.listByScopeActorAndProvider({scopeId:r,actorScopeId:n??null,providerKey:d.providerKey})).find(F=>F.oauthClientId===d.oauthClientId)??null,E=Df(lr(g.scope)?g.scope.split(/\s+/):d.scopes),I=yield*ZTt({executorState:e.executorState,scopeId:r,actorScopeId:n,providerKey:d.providerKey,oauthClientId:d.oauthClientId,tokenEndpoint:d.tokenEndpoint,clientAuthentication:d.clientAuthentication,headerName:d.headerName,prefix:d.prefix,grantedScopes:E,refreshToken:lr(g.refresh_token),existingGrant:b,storeSecretMaterial:e.storeSecretMaterial,deleteSecretMaterial:e.deleteSecretMaterial}),T=yield*Me.forEach(d.targetSources,F=>Me.map(e.sourceStore.loadSourceById({scopeId:r,sourceId:F.sourceId,actorScopeId:n}),O=>({source:O,requiredScopes:F.requiredScopes})),{discard:!1}),k=yield*SAe({sourceStore:e.sourceStore,sourceCatalogSync:e.sourceCatalogSync,actorScopeId:n,grantId:I.id,providerKey:I.providerKey,headerName:I.headerName,prefix:I.prefix,targets:T});return yield*e.executorState.sourceAuthSessions.update(p.id,IS({sessionDataJson:$Tt({session:p,patch:{codeVerifier:null,authorizationUrl:null}}),status:"completed",now:Date.now(),errorText:null})),{sessionId:p.id,sources:k}})),completeSourceCredentialSetup:({scopeId:r,sourceId:n,actorScopeId:o,state:i,code:a,error:s,errorDescription:c})=>t(Me.gen(function*(){let p=yield*e.executorState.sourceAuthSessions.getByState(i);if(Ei.isNone(p))return yield*Ne("sources/source-auth-service",`Source auth session not found for state ${i}`);let d=p.value;if(d.scopeId!==r||d.sourceId!==n)return yield*Ne("sources/source-auth-service",`Source auth session ${d.id} does not match scopeId=${r} sourceId=${n}`);if(o!==void 0&&(d.actorScopeId??null)!==(o??null))return yield*Ne("sources/source-auth-service",`Source auth session ${d.id} does not match the active account`);let f=yield*e.sourceStore.loadSourceById({scopeId:d.scopeId,sourceId:d.sourceId,actorScopeId:d.actorScopeId});if(d.status==="completed")return{sessionId:d.id,source:f};if(d.status!=="pending")return yield*Ne("sources/source-auth-service",`Source auth session ${d.id} is not pending`);let m=d.providerKind==="oauth2_pkce"?zQ(d):RF(d);if(lr(s)!==null){let E=lr(c)??lr(s)??"OAuth authorization failed",I=Date.now();yield*e.executorState.sourceAuthSessions.update(d.id,IS({sessionDataJson:d.sessionDataJson,status:"failed",now:I,errorText:E}));let T=yield*aa(e.sourceStore,f,{actorScopeId:d.actorScopeId,status:"error",lastError:E});return yield*e.sourceCatalogSync.sync({source:T,actorScopeId:d.actorScopeId}),yield*XDe({executorState:e.executorState,liveExecutionManager:e.liveExecutionManager,session:d,response:{action:"cancel",reason:E}}),yield*Ne("sources/source-auth-service",E)}let y=lr(a);if(y===null)return yield*Ne("sources/source-auth-service","Missing OAuth authorization code");if(m.codeVerifier===null)return yield*Ne("sources/source-auth-service","OAuth session is missing the PKCE code verifier");let g=Date.now(),S;if(d.providerKind==="oauth2_pkce"){let E=zQ(d),I=null;E.clientSecret&&(I=yield*e.resolveSecretMaterial({ref:E.clientSecret}));let T=yield*rq({tokenEndpoint:E.tokenEndpoint,clientId:E.clientId,clientAuthentication:E.clientAuthentication,clientSecret:I,redirectUri:E.redirectUri,codeVerifier:E.codeVerifier??"",code:y}),k=lr(T.refresh_token);if(k===null)return yield*Ne("sources/source-auth-service","OAuth authorization did not return a refresh token");let F=yield*e.storeSecretMaterial({purpose:"oauth_refresh_token",value:k,name:`${f.name} Refresh`}),O=lr(T.scope)?T.scope.split(/\s+/).filter(N=>N.length>0):[...E.scopes];S=yield*aa(e.sourceStore,f,{actorScopeId:d.actorScopeId,status:"connected",lastError:null,auth:{kind:"oauth2_authorized_user",headerName:E.headerName,prefix:E.prefix,tokenEndpoint:E.tokenEndpoint,clientId:E.clientId,clientAuthentication:E.clientAuthentication,clientSecret:E.clientSecret,refreshToken:F,grantSet:O}});let $=yield*e.executorState.authArtifacts.getByScopeSourceAndActor({scopeId:S.scopeId,sourceId:S.id,actorScopeId:d.actorScopeId??null,slot:"runtime"});Ei.isSome($)&&(yield*rle({executorState:e.executorState,artifact:$.value,tokenResponse:T,storeSecretMaterial:e.storeSecretMaterial,deleteSecretMaterial:e.deleteSecretMaterial})),yield*e.executorState.sourceAuthSessions.update(d.id,IS({sessionDataJson:RTt({session:d,patch:{codeVerifier:null,authorizationUrl:null}}),status:"completed",now:g,errorText:null}))}else{let E=RF(d),I=yield*DB({session:{endpoint:E.endpoint,redirectUrl:E.redirectUri,codeVerifier:E.codeVerifier??"",resourceMetadataUrl:E.resourceMetadataUrl,authorizationServerUrl:E.authorizationServerUrl,resourceMetadata:E.resourceMetadata,authorizationServerMetadata:E.authorizationServerMetadata,clientInformation:E.clientInformation},code:y}),T=WDe({displayName:f.name,endpoint:f.endpoint}),k=yield*e.storeSecretMaterial({purpose:"oauth_access_token",value:I.tokens.access_token,name:T}),F=I.tokens.refresh_token?yield*e.storeSecretMaterial({purpose:"oauth_refresh_token",value:I.tokens.refresh_token,name:`${T} Refresh`}):null;S=yield*aa(e.sourceStore,f,{actorScopeId:d.actorScopeId,status:"connected",lastError:null,auth:Yce({redirectUri:E.redirectUri,accessToken:k,refreshToken:F,tokenType:I.tokens.token_type,expiresIn:typeof I.tokens.expires_in=="number"&&Number.isFinite(I.tokens.expires_in)?I.tokens.expires_in:null,scope:I.tokens.scope??null,resourceMetadataUrl:I.resourceMetadataUrl,authorizationServerUrl:I.authorizationServerUrl,resourceMetadata:I.resourceMetadata,authorizationServerMetadata:I.authorizationServerMetadata,clientInformation:I.clientInformation})}),yield*e.executorState.sourceAuthSessions.update(d.id,IS({sessionDataJson:QDe({session:d,patch:{codeVerifier:null,authorizationUrl:null,resourceMetadataUrl:I.resourceMetadataUrl,authorizationServerUrl:I.authorizationServerUrl,resourceMetadata:I.resourceMetadata,authorizationServerMetadata:I.authorizationServerMetadata}}),status:"completed",now:g,errorText:null}))}let b=yield*Me.either(e.sourceCatalogSync.sync({source:S,actorScopeId:d.actorScopeId}));return yield*Pd.match(b,{onLeft:E=>aa(e.sourceStore,S,{actorScopeId:d.actorScopeId,status:"error",lastError:E.message}).pipe(Me.zipRight(Me.fail(E))),onRight:()=>Me.succeed(void 0)}),yield*XDe({executorState:e.executorState,liveExecutionManager:e.liveExecutionManager,session:d,response:{action:"accept"}}),{sessionId:d.id,source:S}}))}),nDt=e=>{let t=o=>ph(o,e.localScopeState),r=tDt(e,t),n=rDt(e,t);return{getLocalServerBaseUrl:()=>e.getLocalServerBaseUrl?.()??null,storeSecretMaterial:({purpose:o,value:i})=>e.storeSecretMaterial({purpose:o,value:i}),...r,...n}},ap=class extends tAe.Tag("#runtime/RuntimeSourceAuthServiceTag")(){},vAe=(e={})=>rAe.effect(ap,Me.gen(function*(){let t=yield*Wn,r=yield*Xc,n=yield*Qo,o=yield*tu,i=yield*Nl,a=yield*Ys,s=yield*as,c=yield*dh();return nDt({executorState:t,liveExecutionManager:r,sourceStore:n,sourceCatalogSync:o,resolveSecretMaterial:i,storeSecretMaterial:a,deleteSecretMaterial:s,getLocalServerBaseUrl:e.getLocalServerBaseUrl,localScopeState:c??void 0})})),QZt=Fn.Union(Fn.Struct({kind:Fn.Literal("connected"),source:zp}),Fn.Struct({kind:Fn.Literal("credential_required"),source:zp,credentialSlot:Fn.Literal("runtime","import")}),Fn.Struct({kind:Fn.Literal("oauth_required"),source:zp,sessionId:Dm,authorizationUrl:Fn.String}));import*as bAe from"effect/Context";import*as MF from"effect/Effect";import*as xAe from"effect/Layer";var Af=class extends bAe.Tag("#runtime/LocalToolRuntimeLoaderService")(){},YZt=xAe.effect(Af,MF.succeed(Af.of({load:()=>MF.die(new Error("LocalToolRuntimeLoaderLive is unsupported; provide a bound local tool runtime loader from the host adapter."))})));var oDt=()=>({tools:{},catalog:r_({tools:{}}),toolInvoker:t_({tools:{}}),toolPaths:new Set}),iDt=e=>({scopeId:t,actorScopeId:r,onElicitation:n})=>vI.gen(function*(){let o=yield*dh(),i=o===null?null:yield*e.scopeConfigStore.load(),a=o===null?oDt():yield*e.localToolRuntimeLoader.load(),{catalog:s,toolInvoker:c}=GDe({scopeId:t,actorScopeId:r,executorStateStore:e.executorStateStore,sourceStore:e.sourceStore,sourceCatalogSyncService:e.sourceCatalogSyncService,sourceCatalogStore:e.sourceCatalogStore,installationStore:e.installationStore,instanceConfigResolver:e.instanceConfigResolver,storeSecretMaterial:e.storeSecretMaterial,deleteSecretMaterial:e.deleteSecretMaterial,updateSecretMaterial:e.updateSecretMaterial,scopeConfigStore:e.scopeConfigStore,scopeStateStore:e.scopeStateStore,sourceArtifactStore:e.sourceArtifactStore,sourceAuthMaterialService:e.sourceAuthMaterialService,sourceAuthService:e.sourceAuthService,runtimeLocalScope:o,localToolRuntime:a,createInternalToolMap:e.createInternalToolMap,onElicitation:n});return{executor:yield*vI.promise(()=>IQ(AQ(i?.config),e.customCodeExecutor)),toolInvoker:c,catalog:s}}),Xh=class extends EAe.Tag("#runtime/RuntimeExecutionResolverService")(){},TAe=(e={})=>e.executionResolver?jF.succeed(Xh,e.executionResolver):jF.effect(Xh,vI.gen(function*(){let t=yield*Wn,r=yield*Qo,n=yield*tu,o=yield*Fm,i=yield*ap,a=yield*Gh,s=yield*Af,c=yield*Vg,p=yield*Gp,d=yield*Ys,f=yield*as,m=yield*Kp,y=yield*Kc,g=yield*$a,S=yield*Ma;return iDt({executorStateStore:t,sourceStore:r,sourceCatalogSyncService:n,sourceAuthService:i,sourceAuthMaterialService:o,sourceCatalogStore:a,localToolRuntimeLoader:s,installationStore:c,instanceConfigResolver:p,storeSecretMaterial:d,deleteSecretMaterial:f,updateSecretMaterial:m,scopeConfigStore:y,scopeStateStore:g,sourceArtifactStore:S,createInternalToolMap:e.createInternalToolMap,customCodeExecutor:e.customCodeExecutor})}));import*as AAe from"effect/Data";var DAe=class extends AAe.TaggedError("ResumeUnsupportedError"){};import*as qa from"effect/Effect";var BF={bundle:Oo("sources.inspect.bundle"),tool:Oo("sources.inspect.tool"),discover:Oo("sources.inspect.discover")},pb=e=>e.trim().toLowerCase().split(/[^a-z0-9]+/).filter(Boolean),aDt=e=>e.status==="draft"||e.status==="probing"||e.status==="auth_required",sDt=e=>qa.gen(function*(){let r=yield*(yield*Qo).loadSourceById({scopeId:e.scopeId,sourceId:e.sourceId});return aDt(r)?r:yield*e.cause}),wAe=e=>pDe({scopeId:e.scopeId,sourceId:e.sourceId}).pipe(qa.map(t=>({kind:"catalog",catalogEntry:t})),qa.catchTag("LocalSourceArtifactMissingError",t=>qa.gen(function*(){return{kind:"empty",source:yield*sDt({scopeId:e.scopeId,sourceId:e.sourceId,cause:t})}}))),XQ=e=>{let t=e.executable.display??{};return{protocol:t.protocol??e.executable.adapterKey,method:t.method??null,pathTemplate:t.pathTemplate??null,rawToolId:t.rawToolId??e.path.split(".").at(-1)??null,operationId:t.operationId??null,group:t.group??null,leaf:t.leaf??e.path.split(".").at(-1)??null,tags:e.capability.surface.tags??[]}},cDt=e=>({path:e.path,method:XQ(e).method,...e.descriptor.contract?.inputTypePreview?{inputTypePreview:e.descriptor.contract.inputTypePreview}:{},...e.descriptor.contract?.outputTypePreview?{outputTypePreview:e.descriptor.contract.outputTypePreview}:{}}),kAe=e=>{let t=XQ(e);return{path:e.path,sourceKey:e.source.id,...e.capability.surface.title?{title:e.capability.surface.title}:{},...e.capability.surface.summary||e.capability.surface.description?{description:e.capability.surface.summary??e.capability.surface.description}:{},protocol:t.protocol,toolId:e.path.split(".").at(-1)??e.path,rawToolId:t.rawToolId,operationId:t.operationId,group:t.group,leaf:t.leaf,tags:[...t.tags],method:t.method,pathTemplate:t.pathTemplate,...e.descriptor.contract?.inputTypePreview?{inputTypePreview:e.descriptor.contract.inputTypePreview}:{},...e.descriptor.contract?.outputTypePreview?{outputTypePreview:e.descriptor.contract.outputTypePreview}:{}}},IAe=e=>e==="graphql"||e==="yaml"||e==="json"||e==="text"?e:"json",QQ=(e,t)=>t==null?null:{kind:"code",title:e,language:"json",body:JSON.stringify(t,null,2)},lDt=e=>qa.gen(function*(){let t=kAe(e),r=XQ(e),n=yield*dDe(e),o=[{label:"Protocol",value:r.protocol},...r.method?[{label:"Method",value:r.method,mono:!0}]:[],...r.pathTemplate?[{label:"Target",value:r.pathTemplate,mono:!0}]:[],...r.operationId?[{label:"Operation",value:r.operationId,mono:!0}]:[],...r.group?[{label:"Group",value:r.group,mono:!0}]:[],...r.leaf?[{label:"Leaf",value:r.leaf,mono:!0}]:[],...r.rawToolId?[{label:"Raw tool",value:r.rawToolId,mono:!0}]:[],{label:"Signature",value:n.callSignature,mono:!0},{label:"Call shape",value:n.callShapeId,mono:!0},...n.resultShapeId?[{label:"Result shape",value:n.resultShapeId,mono:!0}]:[],{label:"Response set",value:n.responseSetId,mono:!0}],i=[...(e.capability.native??[]).map((s,c)=>({kind:"code",title:`Capability native ${String(c+1)}: ${s.kind}`,language:IAe(s.encoding),body:typeof s.value=="string"?s.value:JSON.stringify(s.value??null,null,2)})),...(e.executable.native??[]).map((s,c)=>({kind:"code",title:`Executable native ${String(c+1)}: ${s.kind}`,language:IAe(s.encoding),body:typeof s.value=="string"?s.value:JSON.stringify(s.value??null,null,2)}))],a=[{kind:"facts",title:"Overview",items:o},...t.description?[{kind:"markdown",title:"Description",body:t.description}]:[],...[QQ("Capability",e.capability),QQ("Executable",{id:e.executable.id,adapterKey:e.executable.adapterKey,bindingVersion:e.executable.bindingVersion,binding:e.executable.binding,projection:e.executable.projection,display:e.executable.display??null}),QQ("Documentation",{summary:e.capability.surface.summary,description:e.capability.surface.description})].filter(s=>s!==null),...i];return{summary:t,contract:n,sections:a}}),CAe=e=>qa.gen(function*(){let t=yield*wAe({scopeId:e.scopeId,sourceId:e.sourceId});if(t.kind==="empty")return{source:t.source,namespace:t.source.namespace??"",pipelineKind:"ir",tools:[]};let r=yield*bQ({catalogs:[t.catalogEntry],includeSchemas:e.includeSchemas,includeTypePreviews:e.includeTypePreviews});return{source:t.catalogEntry.source,namespace:t.catalogEntry.source.namespace??"",pipelineKind:"ir",tools:r}}),uDt=e=>qa.gen(function*(){let t=yield*wAe({scopeId:e.scopeId,sourceId:e.sourceId});if(t.kind==="empty")return{source:t.source,namespace:t.source.namespace??"",pipelineKind:"ir",tool:null};let r=yield*xQ({catalogs:[t.catalogEntry],path:e.toolPath,includeSchemas:!0,includeTypePreviews:!1});return{source:t.catalogEntry.source,namespace:t.catalogEntry.source.namespace??"",pipelineKind:"ir",tool:r}}),pDt=e=>{let t=0,r=[],n=kAe(e.tool),o=pb(n.path),i=pb(n.title??""),a=pb(n.description??""),s=n.tags.flatMap(pb),c=pb(`${n.method??""} ${n.pathTemplate??""}`);for(let p of e.queryTokens){if(o.includes(p)){t+=12,r.push(`path matches ${p} (+12)`);continue}if(s.includes(p)){t+=10,r.push(`tag matches ${p} (+10)`);continue}if(i.includes(p)){t+=8,r.push(`title matches ${p} (+8)`);continue}if(c.includes(p)){t+=6,r.push(`method/path matches ${p} (+6)`);continue}(a.includes(p)||e.tool.searchText.includes(p))&&(t+=2,r.push(`description/text matches ${p} (+2)`))}return t<=0?null:{path:e.tool.path,score:t,...n.description?{description:n.description}:{},...n.inputTypePreview?{inputTypePreview:n.inputTypePreview}:{},...n.outputTypePreview?{outputTypePreview:n.outputTypePreview}:{},reasons:r}},YQ=(e,t,r)=>t instanceof Ef||t instanceof Wh?t:e.unknownStorage(t,r),PAe=e=>qa.gen(function*(){let t=yield*CAe({...e,includeSchemas:!1,includeTypePreviews:!1});return{source:t.source,namespace:t.namespace,pipelineKind:t.pipelineKind,toolCount:t.tools.length,tools:t.tools.map(r=>cDt(r))}}).pipe(qa.mapError(t=>YQ(BF.bundle,t,"Failed building source inspection bundle"))),OAe=e=>qa.gen(function*(){let r=(yield*uDt({scopeId:e.scopeId,sourceId:e.sourceId,toolPath:e.toolPath})).tool;return r?yield*lDt(r):yield*BF.tool.notFound("Tool not found",`scopeId=${e.scopeId} sourceId=${e.sourceId} path=${e.toolPath}`)}).pipe(qa.mapError(t=>YQ(BF.tool,t,"Failed building source inspection tool detail"))),NAe=e=>qa.gen(function*(){let t=yield*CAe({scopeId:e.scopeId,sourceId:e.sourceId,includeSchemas:!1,includeTypePreviews:!1}),r=pb(e.payload.query),n=t.tools.map(o=>pDt({queryTokens:r,tool:o})).filter(o=>o!==null).sort((o,i)=>i.score-o.score||o.path.localeCompare(i.path)).slice(0,e.payload.limit??12);return{query:e.payload.query,queryTokens:r,bestPath:n[0]?.path??null,total:n.length,results:n}}).pipe(qa.mapError(t=>YQ(BF.discover,t,"Failed building source inspection discovery")));import*as qF from"effect/Effect";var dDt=yF,_Dt=dDt.filter(e=>e.detectSource!==void 0),FAe=e=>qF.gen(function*(){let t=yield*qF.try({try:()=>Xae(e.url),catch:o=>o instanceof Error?o:new Error(String(o))}),r=ese(e.probeAuth),n=[..._Dt].sort((o,i)=>(i.discoveryPriority?.({normalizedUrl:t})??0)-(o.discoveryPriority?.({normalizedUrl:t})??0));for(let o of n){let i=yield*o.detectSource({normalizedUrl:t,headers:r});if(i)return i}return rse(t)});import*as RAe from"effect/Data";import*as LAe from"effect/Deferred";import*as Lr from"effect/Effect";import*as Ua from"effect/Option";import*as hc from"effect/Schema";var sp={create:Oo("executions.create"),get:Oo("executions.get"),resume:Oo("executions.resume")},eX="__EXECUTION_SUSPENDED__",$Ae="detach",db=e=>e===void 0?null:JSON.stringify(e),fDt=e=>JSON.stringify(e===void 0?null:e),mDt=e=>{if(e!==null)return JSON.parse(e)},hDt=hc.Literal("accept","decline","cancel"),yDt=hc.Struct({action:hDt,content:hc.optional(hc.Record({key:hc.String,value:hc.Unknown}))}),MAe=hc.decodeUnknown(yDt),gDt=e=>{let t=0;return{invoke:({path:r,args:n,context:o})=>(t+=1,e.toolInvoker.invoke({path:r,args:n,context:{...o,runId:e.executionId,callId:typeof o?.callId=="string"&&o.callId.length>0?o.callId:`call_${String(t)}`,executionStepSequence:t}}))}},tX=e=>{let t=e?.executionStepSequence;return typeof t=="number"&&Number.isSafeInteger(t)&&t>0?t:null},SDt=(e,t)=>K6.make(`${e}:step:${String(t)}`),jAe=e=>{let t=typeof e.context?.callId=="string"&&e.context.callId.length>0?e.context.callId:null;return t===null?e.interactionId:`${t}:${e.path}`},vDt=e=>ws.make(`${e.executionId}:${jAe(e)}`),BAe=e=>e==="live"||e==="live_form"?e:$Ae,UF=class extends RAe.TaggedError("ExecutionSuspendedError"){},bDt=e=>new UF({executionId:e.executionId,interactionId:e.interactionId,message:`${eX}:${e.executionId}:${e.interactionId}`}),qAe=e=>e instanceof UF?!0:e instanceof Error?e.message.includes(eX):typeof e=="string"&&e.includes(eX),UAe=e=>Lr.try({try:()=>{if(e.responseJson===null)throw new Error(`Interaction ${e.interactionId} has no stored response`);return JSON.parse(e.responseJson)},catch:t=>t instanceof Error?t:new Error(String(t))}).pipe(Lr.flatMap(t=>MAe(t).pipe(Lr.mapError(r=>new Error(String(r)))))),xDt=e=>{if(!(e.expectedPath===e.actualPath&&e.expectedArgsJson===e.actualArgsJson))throw new Error([`Durable execution mismatch for ${e.executionId} at tool step ${String(e.sequence)}.`,`Expected ${e.expectedPath}(${e.expectedArgsJson}) but replay reached ${e.actualPath}(${e.actualArgsJson}).`].join(" "))},EDt=(e,t)=>Lr.gen(function*(){let r=gI(t.operation),n=yield*r.mapStorage(e.executions.getByScopeAndId(t.scopeId,t.executionId));return Ua.isNone(n)?yield*r.notFound("Execution not found",`scopeId=${t.scopeId} executionId=${t.executionId}`):n.value}),zF=(e,t)=>Lr.gen(function*(){let r=gI(t.operation),n=yield*EDt(e,t),o=yield*r.child("pending_interaction").mapStorage(e.executionInteractions.getPendingByExecutionId(t.executionId));return{execution:n,pendingInteraction:Ua.isSome(o)?o.value:null}}),zAe=(e,t)=>Lr.gen(function*(){let r=yield*zF(e,t);return r.execution.status!=="running"&&!(r.execution.status==="waiting_for_interaction"&&(r.pendingInteraction===null||r.pendingInteraction.id===t.previousPendingInteractionId))||t.attemptsRemaining<=0?r:(yield*Lr.promise(()=>new Promise(n=>setTimeout(n,25))),yield*zAe(e,{...t,attemptsRemaining:t.attemptsRemaining-1}))}),TDt=e=>Lr.gen(function*(){let t=Date.now(),r=yield*e.executorState.executionInteractions.getById(e.interactionId),n=tX(e.request.context);return Ua.isSome(r)&&r.value.status!=="pending"?yield*UAe({interactionId:e.interactionId,responseJson:r.value.responsePrivateJson??r.value.responseJson}):(Ua.isNone(r)&&(yield*e.executorState.executionInteractions.insert({id:ws.make(e.interactionId),executionId:e.executionId,status:"pending",kind:e.request.elicitation.mode==="url"?"url":"form",purpose:"elicitation",payloadJson:db({path:e.request.path,sourceKey:e.request.sourceKey,args:e.request.args,context:e.request.context,elicitation:e.request.elicitation})??"{}",responseJson:null,responsePrivateJson:null,createdAt:t,updatedAt:t})),n!==null&&(yield*e.executorState.executionSteps.updateByExecutionAndSequence(e.executionId,n,{status:"waiting",interactionId:ws.make(e.interactionId),updatedAt:t})),yield*e.executorState.executions.update(e.executionId,{status:"waiting_for_interaction",updatedAt:t}),yield*e.liveExecutionManager.publishState({executionId:e.executionId,state:"waiting_for_interaction"}),yield*bDt({executionId:e.executionId,interactionId:e.interactionId}))}),DDt=e=>{let t=e.liveExecutionManager.createOnElicitation({executorState:e.executorState,executionId:e.executionId});return r=>Lr.gen(function*(){let n=jAe({interactionId:r.interactionId,path:r.path,context:r.context}),o=vDt({executionId:e.executionId,interactionId:r.interactionId,path:r.path,context:r.context}),i=yield*e.executorState.executionInteractions.getById(o);if(Ua.isSome(i)&&i.value.status!=="pending")return yield*UAe({interactionId:o,responseJson:i.value.responsePrivateJson??i.value.responseJson});let a=e.interactionMode==="live"||e.interactionMode==="live_form"&&r.elicitation.mode!=="url";if(Ua.isNone(i)&&a){let s=tX(r.context);return s!==null&&(yield*e.executorState.executionSteps.updateByExecutionAndSequence(e.executionId,s,{status:"waiting",interactionId:ws.make(o),updatedAt:Date.now()})),yield*t({...r,interactionId:n})}return yield*TDt({executorState:e.executorState,executionId:e.executionId,liveExecutionManager:e.liveExecutionManager,request:r,interactionId:o})})},ADt=e=>({invoke:({path:t,args:r,context:n})=>Lr.gen(function*(){let o=tX(n);if(o===null)return yield*e.toolInvoker.invoke({path:t,args:r,context:n});let i=fDt(r),a=yield*e.executorState.executionSteps.getByExecutionAndSequence(e.executionId,o);if(Ua.isSome(a)){if(xDt({executionId:e.executionId,sequence:o,expectedPath:a.value.path,expectedArgsJson:a.value.argsJson,actualPath:t,actualArgsJson:i}),a.value.status==="completed")return mDt(a.value.resultJson);if(a.value.status==="failed")return yield*Ne("execution/service",a.value.errorText??`Stored tool step ${String(o)} failed`)}else{let s=Date.now();yield*e.executorState.executionSteps.insert({id:SDt(e.executionId,o),executionId:e.executionId,sequence:o,kind:"tool_call",status:"pending",path:t,argsJson:i,resultJson:null,errorText:null,interactionId:null,createdAt:s,updatedAt:s})}try{let s=yield*e.toolInvoker.invoke({path:t,args:r,context:n}),c=Date.now();return yield*e.executorState.executionSteps.updateByExecutionAndSequence(e.executionId,o,{status:"completed",resultJson:db(s),errorText:null,updatedAt:c}),s}catch(s){let c=Date.now();return qAe(s)?(yield*e.executorState.executionSteps.updateByExecutionAndSequence(e.executionId,o,{status:"waiting",updatedAt:c}),yield*Lr.fail(s)):(yield*e.executorState.executionSteps.updateByExecutionAndSequence(e.executionId,o,{status:"failed",errorText:s instanceof Error?s.message:String(s),updatedAt:c}),yield*Lr.fail(s))}})}),IDt=e=>Lr.gen(function*(){if(qAe(e.outcome.error))return;if(e.outcome.error){let[n,o]=yield*Lr.all([e.executorState.executions.getById(e.executionId),e.executorState.executionInteractions.getPendingByExecutionId(e.executionId)]);if(Ua.isSome(n)&&n.value.status==="waiting_for_interaction"&&Ua.isSome(o))return}let t=Date.now(),r=yield*e.executorState.executions.update(e.executionId,{status:e.outcome.error?"failed":"completed",resultJson:db(e.outcome.result),errorText:e.outcome.error??null,logsJson:db(e.outcome.logs??null),completedAt:t,updatedAt:t});if(Ua.isNone(r)){yield*e.liveExecutionManager.clearRun(e.executionId);return}yield*e.liveExecutionManager.finishRun({executionId:e.executionId,state:r.value.status==="completed"?"completed":"failed"}),yield*e.executorState.executionSteps.deleteByExecutionId(e.executionId)}),wDt=e=>Lr.gen(function*(){let t=Date.now(),r=yield*e.executorState.executions.update(e.executionId,{status:"failed",errorText:e.error,completedAt:t,updatedAt:t});if(Ua.isNone(r)){yield*e.liveExecutionManager.clearRun(e.executionId);return}yield*e.liveExecutionManager.finishRun({executionId:e.executionId,state:"failed"}),yield*e.executorState.executionSteps.deleteByExecutionId(e.executionId)}),kDt=(e,t,r,n,o)=>t({scopeId:n.scopeId,actorScopeId:n.createdByScopeId,executionId:n.id,onElicitation:DDt({executorState:e,executionId:n.id,liveExecutionManager:r,interactionMode:o})}).pipe(Lr.map(i=>({executor:i.executor,toolInvoker:gDt({executionId:n.id,toolInvoker:ADt({executorState:e,executionId:n.id,toolInvoker:i.toolInvoker})})})),Lr.flatMap(({executor:i,toolInvoker:a})=>i.execute(n.code,a)),Lr.flatMap(i=>IDt({executorState:e,liveExecutionManager:r,executionId:n.id,outcome:i})),Lr.catchAll(i=>wDt({executorState:e,liveExecutionManager:r,executionId:n.id,error:i instanceof Error?i.message:String(i)}).pipe(Lr.catchAll(()=>r.clearRun(n.id))))),JAe=(e,t,r,n,o)=>Lr.gen(function*(){let i=yield*dh();yield*Lr.sync(()=>{let a=kDt(e,t,r,n,o);Lr.runFork(ph(a,i))})}),VAe=(e,t,r,n)=>Lr.gen(function*(){let o=yield*e.executions.getById(n.executionId);if(Ua.isNone(o))return!1;let i=yield*e.executionInteractions.getPendingByExecutionId(n.executionId);if(Ua.isNone(i)||o.value.status!=="waiting_for_interaction"&&o.value.status!=="failed")return!1;let a=Date.now(),c=[...yield*e.executionSteps.listByExecutionId(n.executionId)].reverse().find(d=>d.interactionId===i.value.id);c&&(yield*e.executionSteps.updateByExecutionAndSequence(n.executionId,c.sequence,{status:"waiting",errorText:null,updatedAt:a})),yield*e.executionInteractions.update(i.value.id,{status:n.response.action==="cancel"?"cancelled":"resolved",responseJson:db(_I(n.response)),responsePrivateJson:db(n.response),updatedAt:a});let p=yield*e.executions.update(n.executionId,{status:"running",updatedAt:a});return Ua.isNone(p)?!1:(yield*JAe(e,t,r,p.value,n.interactionMode),!0)}),CDt=(e,t,r,n)=>Lr.gen(function*(){let o=n.payload.code,i=Date.now(),a={id:kl.make(`exec_${crypto.randomUUID()}`),scopeId:n.scopeId,createdByScopeId:n.createdByScopeId,status:"pending",code:o,resultJson:null,errorText:null,logsJson:null,startedAt:null,completedAt:null,createdAt:i,updatedAt:i};yield*sp.create.child("insert").mapStorage(e.executions.insert(a));let s=yield*sp.create.child("mark_running").mapStorage(e.executions.update(a.id,{status:"running",startedAt:i,updatedAt:i}));if(Ua.isNone(s))return yield*sp.create.notFound("Execution not found after insert",`executionId=${a.id}`);let c=yield*r.registerStateWaiter(a.id);return yield*JAe(e,t,r,s.value,BAe(n.payload.interactionMode)),yield*LAe.await(c),yield*zF(e,{scopeId:n.scopeId,executionId:a.id,operation:sp.create})}),KAe=e=>Lr.gen(function*(){let t=yield*Wn,r=yield*Xh,n=yield*Xc;return yield*CDt(t,r,n,e)}),GAe=e=>Lr.flatMap(Wn,t=>zF(t,{scopeId:e.scopeId,executionId:e.executionId,operation:sp.get})),JF=e=>Lr.gen(function*(){let t=yield*Wn,r=yield*Xh,n=yield*Xc;return yield*VAe(t,r,n,{...e,interactionMode:e.interactionMode??$Ae})}),HAe=e=>Lr.gen(function*(){let t=yield*Wn,r=yield*Xh,n=yield*Xc,o=yield*zF(t,{scopeId:e.scopeId,executionId:e.executionId,operation:"executions.resume"});if(o.execution.status!=="waiting_for_interaction"&&!(o.execution.status==="failed"&&o.pendingInteraction!==null))return yield*sp.resume.badRequest("Execution is not waiting for interaction",`executionId=${e.executionId} status=${o.execution.status}`);let i=e.payload.responseJson,a=i===void 0?{action:"accept"}:yield*Lr.try({try:()=>JSON.parse(i),catch:c=>sp.resume.badRequest("Invalid responseJson",c instanceof Error?c.message:String(c))}).pipe(Lr.flatMap(c=>MAe(c).pipe(Lr.mapError(p=>sp.resume.badRequest("Invalid responseJson",String(p))))));return!(yield*n.resolveInteraction({executionId:e.executionId,response:a}))&&!(yield*sp.resume.child("submit_interaction").mapStorage(VAe(t,r,n,{executionId:e.executionId,response:a,interactionMode:BAe(e.payload.interactionMode)})))?yield*sp.resume.badRequest("Resume is unavailable for this execution",`executionId=${e.executionId}`):yield*zAe(t,{scopeId:e.scopeId,executionId:e.executionId,operation:sp.resume,previousPendingInteractionId:o.pendingInteraction?.id??null,attemptsRemaining:400})});var PDt=e=>e instanceof Error?e.message:String(e),rX=e=>{let t=PDt(e);return new Error(`Failed initializing runtime: ${t}`)},ODt=e=>li.gen(function*(){yield*(yield*Gh).loadWorkspaceSourceCatalogToolIndex({scopeId:e.scopeId,actorScopeId:e.actorScopeId})}),NDt=()=>{let e={};return{tools:e,catalog:r_({tools:e}),toolInvoker:t_({tools:e}),toolPaths:new Set}},FDt={refreshWorkspaceInBackground:()=>li.void,refreshSourceInBackground:()=>li.void},WAe=e=>({load:e.load,getOrProvision:e.getOrProvision}),QAe=e=>({load:e.load,writeProject:({config:t})=>e.writeProject(t),resolveRelativePath:e.resolveRelativePath}),XAe=e=>({load:e.load,write:({state:t})=>e.write(t)}),YAe=e=>({build:e.build,read:({sourceId:t})=>e.read(t),write:({sourceId:t,artifact:r})=>e.write({sourceId:t,artifact:r}),remove:({sourceId:t})=>e.remove(t)}),RDt=e=>Eo.mergeAll(Eo.succeed(Nl,e.resolve),Eo.succeed(Ys,e.store),Eo.succeed(as,e.delete),Eo.succeed(Kp,e.update)),LDt=e=>Eo.succeed(Gp,e.resolve),$Dt=e=>({authArtifacts:e.auth.artifacts,authLeases:e.auth.leases,sourceOauthClients:e.auth.sourceOauthClients,scopeOauthClients:e.auth.scopeOauthClients,providerAuthGrants:e.auth.providerGrants,sourceAuthSessions:e.auth.sourceSessions,secretMaterials:e.secrets,executions:e.executions.runs,executionInteractions:e.executions.interactions,executionSteps:e.executions.steps}),MDt=e=>{let t=iA({installationStore:WAe(e.storage.installation),scopeConfigStore:QAe(e.storage.scopeConfig),scopeStateStore:XAe(e.storage.scopeState),sourceArtifactStore:YAe(e.storage.sourceArtifacts)}),r=Eo.succeed(Af,Af.of({load:()=>e.localToolRuntimeLoader?.load()??li.succeed(NDt())})),n=Eo.succeed(hd,hd.of(e.sourceTypeDeclarationsRefresher??FDt)),o=Eo.mergeAll(Eo.succeed(Wn,$Dt(e.storage)),XJ(e.localScopeState),t,Eo.succeed(Xc,e.liveExecutionManager),n),i=RDt(e.storage.secrets).pipe(Eo.provide(o)),a=LDt(e.instanceConfig),s=ZTe.pipe(Eo.provide(Eo.mergeAll(o,i))),c=_De.pipe(Eo.provide(Eo.mergeAll(o,s))),p=ale.pipe(Eo.provide(Eo.mergeAll(o,i))),d=yDe.pipe(Eo.provide(Eo.mergeAll(o,i,p))),f=vAe({getLocalServerBaseUrl:e.getLocalServerBaseUrl}).pipe(Eo.provide(Eo.mergeAll(o,a,i,s,d))),m=TAe({executionResolver:e.executionResolver,createInternalToolMap:e.createInternalToolMap,customCodeExecutor:e.customCodeExecutor}).pipe(Eo.provide(Eo.mergeAll(o,a,i,s,p,d,f,c,r)));return Eo.mergeAll(o,a,i,s,p,d,c,r,f,m)},e2e=(e,t)=>e.pipe(li.provide(t.managedRuntime)),t2e=e=>li.gen(function*(){let t=yield*e.services.storage.installation.getOrProvision().pipe(li.mapError(rX)),r=yield*e.services.storage.scopeConfig.load().pipe(li.mapError(rX)),n={...e.services.scope,scopeId:t.scopeId,actorScopeId:e.services.scope.actorScopeId??t.actorScopeId,resolutionScopeIds:e.services.scope.resolutionScopeIds??t.resolutionScopeIds},o=yield*ODe({loadedConfig:r}).pipe(li.provide(iA({installationStore:WAe(e.services.storage.installation),scopeConfigStore:QAe(e.services.storage.scopeConfig),scopeStateStore:XAe(e.services.storage.scopeState),sourceArtifactStore:YAe(e.services.storage.sourceArtifacts)}))).pipe(li.mapError(rX)),i={scope:n,installation:t,loadedConfig:{...r,config:o}},a=DQ(),s=MDt({...e,...e.services,localScopeState:i,liveExecutionManager:a}),c=ZAe.make(s);return yield*c.runtimeEffect,yield*gDe({scopeId:t.scopeId,actorScopeId:t.actorScopeId}).pipe(li.provide(c),li.catchAll(()=>li.void)),yield*ODt({scopeId:t.scopeId,actorScopeId:t.actorScopeId}).pipe(li.provide(c),li.catchAll(()=>li.void)),{storage:e.services.storage,localInstallation:t,managedRuntime:c,runtimeLayer:s,close:async()=>{await li.runPromise(fL()).catch(()=>{}),await c.dispose().catch(()=>{}),await e.services.storage.close?.().catch(()=>{})}}});var jDt=e=>e instanceof Error?e:new Error(String(e)),_r=e=>Yc.isEffect(e)?e:e instanceof Promise?Yc.tryPromise({try:()=>e,catch:jDt}):Yc.succeed(e),sa=e=>_r(e).pipe(Yc.map(t=>VF.isOption(t)?t:VF.fromNullable(t))),BDt=e=>({load:()=>_r(e.load()),getOrProvision:()=>_r(e.getOrProvision())}),qDt=e=>({load:()=>_r(e.load()),writeProject:t=>_r(e.writeProject(t)),resolveRelativePath:e.resolveRelativePath}),UDt=e=>({load:()=>_r(e.load()),write:t=>_r(e.write(t))}),zDt=e=>({build:e.build,read:t=>_r(e.read(t)),write:t=>_r(e.write(t)),remove:t=>_r(e.remove(t))}),JDt=e=>({resolve:()=>_r(e.resolve())}),VDt=e=>({load:()=>_r(e.load())}),KDt=e=>({refreshWorkspaceInBackground:t=>_r(e.refreshWorkspaceInBackground(t)).pipe(Yc.orDie),refreshSourceInBackground:t=>_r(e.refreshSourceInBackground(t)).pipe(Yc.orDie)}),GDt=e=>({artifacts:{listByScopeId:t=>_r(e.artifacts.listByScopeId(t)),listByScopeAndSourceId:t=>_r(e.artifacts.listByScopeAndSourceId(t)),getByScopeSourceAndActor:t=>sa(e.artifacts.getByScopeSourceAndActor(t)),upsert:t=>_r(e.artifacts.upsert(t)),removeByScopeSourceAndActor:t=>_r(e.artifacts.removeByScopeSourceAndActor(t)),removeByScopeAndSourceId:t=>_r(e.artifacts.removeByScopeAndSourceId(t))},leases:{listAll:()=>_r(e.leases.listAll()),getByAuthArtifactId:t=>sa(e.leases.getByAuthArtifactId(t)),upsert:t=>_r(e.leases.upsert(t)),removeByAuthArtifactId:t=>_r(e.leases.removeByAuthArtifactId(t))},sourceOauthClients:{getByScopeSourceAndProvider:t=>sa(e.sourceOauthClients.getByScopeSourceAndProvider(t)),upsert:t=>_r(e.sourceOauthClients.upsert(t)),removeByScopeAndSourceId:t=>_r(e.sourceOauthClients.removeByScopeAndSourceId(t))},scopeOauthClients:{listByScopeAndProvider:t=>_r(e.scopeOauthClients.listByScopeAndProvider(t)),getById:t=>sa(e.scopeOauthClients.getById(t)),upsert:t=>_r(e.scopeOauthClients.upsert(t)),removeById:t=>_r(e.scopeOauthClients.removeById(t))},providerGrants:{listByScopeId:t=>_r(e.providerGrants.listByScopeId(t)),listByScopeActorAndProvider:t=>_r(e.providerGrants.listByScopeActorAndProvider(t)),getById:t=>sa(e.providerGrants.getById(t)),upsert:t=>_r(e.providerGrants.upsert(t)),removeById:t=>_r(e.providerGrants.removeById(t))},sourceSessions:{listAll:()=>_r(e.sourceSessions.listAll()),listByScopeId:t=>_r(e.sourceSessions.listByScopeId(t)),getById:t=>sa(e.sourceSessions.getById(t)),getByState:t=>sa(e.sourceSessions.getByState(t)),getPendingByScopeSourceAndActor:t=>sa(e.sourceSessions.getPendingByScopeSourceAndActor(t)),insert:t=>_r(e.sourceSessions.insert(t)),update:(t,r)=>sa(e.sourceSessions.update(t,r)),upsert:t=>_r(e.sourceSessions.upsert(t)),removeByScopeAndSourceId:(t,r)=>_r(e.sourceSessions.removeByScopeAndSourceId(t,r))}}),HDt=e=>({getById:t=>sa(e.getById(t)),listAll:()=>_r(e.listAll()),upsert:t=>_r(e.upsert(t)),updateById:(t,r)=>sa(e.updateById(t,r)),removeById:t=>_r(e.removeById(t)),resolve:t=>_r(e.resolve(t)),store:t=>_r(e.store(t)),delete:t=>_r(e.delete(t)),update:t=>_r(e.update(t))}),ZDt=e=>({runs:{getById:t=>sa(e.runs.getById(t)),getByScopeAndId:(t,r)=>sa(e.runs.getByScopeAndId(t,r)),insert:t=>_r(e.runs.insert(t)),update:(t,r)=>sa(e.runs.update(t,r))},interactions:{getById:t=>sa(e.interactions.getById(t)),listByExecutionId:t=>_r(e.interactions.listByExecutionId(t)),getPendingByExecutionId:t=>sa(e.interactions.getPendingByExecutionId(t)),insert:t=>_r(e.interactions.insert(t)),update:(t,r)=>sa(e.interactions.update(t,r))},steps:{getByExecutionAndSequence:(t,r)=>sa(e.steps.getByExecutionAndSequence(t,r)),listByExecutionId:t=>_r(e.steps.listByExecutionId(t)),insert:t=>_r(e.steps.insert(t)),deleteByExecutionId:t=>_r(e.steps.deleteByExecutionId(t)),updateByExecutionAndSequence:(t,r,n)=>sa(e.steps.updateByExecutionAndSequence(t,r,n))}}),Yh=e=>({createRuntime:t=>Yc.flatMap(_r(e.loadRepositories(t)),r=>t2e({...t,services:{scope:r.scope,storage:{installation:BDt(r.installation),scopeConfig:qDt(r.workspace.config),scopeState:UDt(r.workspace.state),sourceArtifacts:zDt(r.workspace.sourceArtifacts),auth:GDt(r.workspace.sourceAuth),secrets:HDt(r.secrets),executions:ZDt(r.executions),close:r.close},localToolRuntimeLoader:r.workspace.localTools?VDt(r.workspace.localTools):void 0,sourceTypeDeclarationsRefresher:r.workspace.sourceTypeDeclarations?KDt(r.workspace.sourceTypeDeclarations):void 0,instanceConfig:JDt(r.instanceConfig)}}))});import*as sX from"effect/Effect";import*as fb from"effect/Effect";import*as yc from"effect/Effect";import*as r2e from"effect/Option";var el={installation:Oo("local.installation.get"),sourceCredentialComplete:Oo("sources.credentials.complete"),sourceCredentialPage:Oo("sources.credentials.page"),sourceCredentialSubmit:Oo("sources.credentials.submit")},nX=e=>typeof e=="object"&&e!==null,oX=e=>typeof e=="string"?e:null,KF=e=>{if(e==null)return null;let t=e.trim();return t.length>0?t:null},WDt=e=>{try{if(e.purpose!=="source_connect_oauth2"&&e.purpose!=="source_connect_secret"&&e.purpose!=="elicitation")return null;let t=JSON.parse(e.payloadJson);if(!nX(t))return null;let r=t.args,n=t.elicitation;if(!nX(r)||!nX(n)||t.path!=="executor.sources.add")return null;let o=e.purpose==="elicitation"?n.mode==="url"?"source_connect_oauth2":"source_connect_secret":e.purpose;if(o==="source_connect_oauth2"&&n.mode!=="url"||o==="source_connect_secret"&&n.mode!=="form")return null;let i=KF(oX(r.scopeId)),a=KF(oX(r.sourceId)),s=KF(oX(n.message));return i===null||a===null||s===null?null:{interactionId:e.id,executionId:e.executionId,status:e.status,message:s,scopeId:Br.make(i),sourceId:Mn.make(a)}}catch{return null}},n2e=e=>yc.gen(function*(){let t=yield*Wn,r=yield*ap,n=yield*t.executionInteractions.getById(e.interactionId).pipe(yc.mapError(a=>e.operation.unknownStorage(a,`Failed loading execution interaction ${e.interactionId}`)));if(r2e.isNone(n))return yield*e.operation.notFound("Source credential request not found",`interactionId=${e.interactionId}`);let o=WDt(n.value);if(o===null||o.scopeId!==e.scopeId||o.sourceId!==e.sourceId)return yield*e.operation.notFound("Source credential request not found",`scopeId=${e.scopeId} sourceId=${e.sourceId} interactionId=${e.interactionId}`);let i=yield*r.getSourceById({scopeId:e.scopeId,sourceId:e.sourceId}).pipe(yc.mapError(a=>e.operation.unknownStorage(a,`Failed loading source ${e.sourceId}`)));return{...o,sourceLabel:i.name,endpoint:i.endpoint}}),o2e=()=>yc.gen(function*(){return yield*(yield*Vg).load().pipe(yc.mapError(t=>el.installation.unknownStorage(t,"Failed loading local installation")))}),i2e=e=>n2e({...e,operation:el.sourceCredentialPage}),a2e=e=>yc.gen(function*(){let t=yield*n2e({scopeId:e.scopeId,sourceId:e.sourceId,interactionId:e.interactionId,operation:el.sourceCredentialSubmit});if(t.status!=="pending")return yield*el.sourceCredentialSubmit.badRequest("Source credential request is no longer active",`interactionId=${t.interactionId} status=${t.status}`);let r=yield*Xc;if(e.action==="cancel")return!(yield*r.resolveInteraction({executionId:t.executionId,response:{action:"cancel"}}))&&!(yield*JF({executionId:t.executionId,response:{action:"cancel"}}).pipe(yc.mapError(p=>el.sourceCredentialSubmit.unknownStorage(p,`Failed resuming execution for interaction ${t.interactionId}`))))?yield*el.sourceCredentialSubmit.badRequest("Source credential request is no longer resumable",`interactionId=${t.interactionId}`):{kind:"cancelled",sourceLabel:t.sourceLabel,endpoint:t.endpoint};if(e.action==="continue")return!(yield*r.resolveInteraction({executionId:t.executionId,response:{action:"accept",content:kQ()}}))&&!(yield*JF({executionId:t.executionId,response:{action:"accept",content:kQ()}}).pipe(yc.mapError(p=>el.sourceCredentialSubmit.unknownStorage(p,`Failed resuming execution for interaction ${t.interactionId}`))))?yield*el.sourceCredentialSubmit.badRequest("Source credential request is no longer resumable",`interactionId=${t.interactionId}`):{kind:"continued",sourceLabel:t.sourceLabel,endpoint:t.endpoint};let n=KF(e.token);if(n===null)return yield*el.sourceCredentialSubmit.badRequest("Missing token",`interactionId=${t.interactionId}`);let i=yield*(yield*ap).storeSecretMaterial({purpose:"auth_material",value:n}).pipe(yc.mapError(s=>el.sourceCredentialSubmit.unknownStorage(s,`Failed storing credential material for interaction ${t.interactionId}`)));return!(yield*r.resolveInteraction({executionId:t.executionId,response:{action:"accept",content:CQ(i)}}))&&!(yield*JF({executionId:t.executionId,response:{action:"accept",content:CQ(i)}}).pipe(yc.mapError(c=>el.sourceCredentialSubmit.unknownStorage(c,`Failed resuming execution for interaction ${t.interactionId}`))))?yield*el.sourceCredentialSubmit.badRequest("Source credential request is no longer resumable",`interactionId=${t.interactionId}`):{kind:"stored",sourceLabel:t.sourceLabel,endpoint:t.endpoint}}),s2e=e=>yc.gen(function*(){return yield*(yield*ap).completeSourceCredentialSetup(e).pipe(yc.mapError(r=>el.sourceCredentialComplete.unknownStorage(r,"Failed completing source credential setup")))});import*as za from"effect/Effect";import*as GF from"effect/Option";var cp=(e,t)=>new Wh({operation:e,message:t,details:t}),c2e=()=>za.flatMap(Gp,e=>e()),l2e=()=>za.gen(function*(){let e=yield*Wn,t=yield*Qo,r=yield*D1().pipe(za.mapError(()=>cp("secrets.list","Failed resolving local scope."))),n=yield*e.secretMaterials.listAll().pipe(za.mapError(()=>cp("secrets.list","Failed listing secrets."))),o=yield*t.listLinkedSecretSourcesInScope(r.installation.scopeId,{actorScopeId:r.installation.actorScopeId}).pipe(za.mapError(()=>cp("secrets.list","Failed loading linked sources.")));return n.map(i=>({...i,linkedSources:o.get(i.id)??[]}))}),u2e=e=>za.gen(function*(){let t=e.name.trim(),r=e.value,n=e.purpose??"auth_material";if(t.length===0)return yield*new lb({operation:"secrets.create",message:"Secret name is required.",details:"Secret name is required."});let o=yield*Wn,a=yield*(yield*Ys)({name:t,purpose:n,value:r,providerId:e.providerId}).pipe(za.mapError(p=>cp("secrets.create",p instanceof Error?p.message:"Failed creating secret."))),s=qp.make(a.handle),c=yield*o.secretMaterials.getById(s).pipe(za.mapError(()=>cp("secrets.create","Failed loading created secret.")));return GF.isNone(c)?yield*cp("secrets.create",`Created secret not found: ${a.handle}`):{id:c.value.id,name:c.value.name,providerId:c.value.providerId,purpose:c.value.purpose,createdAt:c.value.createdAt,updatedAt:c.value.updatedAt}}),p2e=e=>za.gen(function*(){let t=qp.make(e.secretId),n=yield*(yield*Wn).secretMaterials.getById(t).pipe(za.mapError(()=>cp("secrets.update","Failed looking up secret.")));if(GF.isNone(n))return yield*new Ef({operation:"secrets.update",message:`Secret not found: ${e.secretId}`,details:`Secret not found: ${e.secretId}`});let o={};e.payload.name!==void 0&&(o.name=e.payload.name.trim()||null),e.payload.value!==void 0&&(o.value=e.payload.value);let a=yield*(yield*Kp)({ref:{providerId:n.value.providerId,handle:n.value.id},...o}).pipe(za.mapError(()=>cp("secrets.update","Failed updating secret.")));return{id:a.id,providerId:a.providerId,name:a.name,purpose:a.purpose,createdAt:a.createdAt,updatedAt:a.updatedAt}}),d2e=e=>za.gen(function*(){let t=qp.make(e),n=yield*(yield*Wn).secretMaterials.getById(t).pipe(za.mapError(()=>cp("secrets.delete","Failed looking up secret.")));return GF.isNone(n)?yield*new Ef({operation:"secrets.delete",message:`Secret not found: ${e}`,details:`Secret not found: ${e}`}):(yield*(yield*as)({providerId:n.value.providerId,handle:n.value.id}).pipe(za.mapError(()=>cp("secrets.delete","Failed removing secret."))))?{removed:!0}:yield*cp("secrets.delete",`Failed removing secret: ${e}`)});import*as _2e from"effect/Either";import*as Xo from"effect/Effect";import*as iX from"effect/Effect";var _b=(e,t)=>t.pipe(iX.mapError(r=>gI(e).storage(r)));var ru={list:Oo("sources.list"),create:Oo("sources.create"),get:Oo("sources.get"),update:Oo("sources.update"),remove:Oo("sources.remove")},QDt=e=>_i(e).shouldAutoProbe(e),f2e=e=>Xo.gen(function*(){let t=yield*tu,r=QDt(e.source),n=r?{...e.source,status:"connected"}:e.source,o=yield*Xo.either(t.sync({source:n,actorScopeId:e.actorScopeId}));return yield*_2e.match(o,{onRight:()=>Xo.gen(function*(){if(r){let i=yield*vf({source:e.source,payload:{status:"connected",lastError:null},now:Date.now()}).pipe(Xo.mapError(a=>e.operation.badRequest("Failed updating source status",a instanceof Error?a.message:String(a))));return yield*_b(e.operation.child("source_connected"),e.sourceStore.persistSource(i,{actorScopeId:e.actorScopeId})),i}return e.source}),onLeft:i=>Xo.gen(function*(){if(r||e.source.enabled&&e.source.status==="connected"){let a=yield*vf({source:e.source,payload:{status:"error",lastError:i.message},now:Date.now()}).pipe(Xo.mapError(s=>e.operation.badRequest("Failed indexing source tools",s instanceof Error?s.message:String(s))));yield*_b(e.operation.child("source_error"),e.sourceStore.persistSource(a,{actorScopeId:e.actorScopeId}))}return yield*e.operation.unknownStorage(i,"Failed syncing source tools")})})}),m2e=e=>Xo.flatMap(Wn,()=>Xo.gen(function*(){return yield*(yield*Qo).loadSourcesInScope(e.scopeId,{actorScopeId:e.actorScopeId}).pipe(Xo.mapError(r=>ru.list.unknownStorage(r,"Failed projecting stored sources")))})),h2e=e=>Xo.flatMap(Wn,t=>Xo.gen(function*(){let r=yield*Qo,n=Date.now(),o=yield*TS({scopeId:e.scopeId,sourceId:Mn.make(`src_${crypto.randomUUID()}`),payload:e.payload,now:n}).pipe(Xo.mapError(s=>ru.create.badRequest("Invalid source definition",s instanceof Error?s.message:String(s)))),i=yield*_b(ru.create.child("persist"),r.persistSource(o,{actorScopeId:e.actorScopeId}));return yield*f2e({store:t,sourceStore:r,source:i,actorScopeId:e.actorScopeId,operation:ru.create})})),y2e=e=>Xo.flatMap(Wn,()=>Xo.gen(function*(){return yield*(yield*Qo).loadSourceById({scopeId:e.scopeId,sourceId:e.sourceId,actorScopeId:e.actorScopeId}).pipe(Xo.mapError(r=>r instanceof Error&&r.message.startsWith("Source not found:")?ru.get.notFound("Source not found",`scopeId=${e.scopeId} sourceId=${e.sourceId}`):ru.get.unknownStorage(r,"Failed projecting stored source")))})),g2e=e=>Xo.flatMap(Wn,t=>Xo.gen(function*(){let r=yield*Qo,n=yield*r.loadSourceById({scopeId:e.scopeId,sourceId:e.sourceId,actorScopeId:e.actorScopeId}).pipe(Xo.mapError(s=>s instanceof Error&&s.message.startsWith("Source not found:")?ru.update.notFound("Source not found",`scopeId=${e.scopeId} sourceId=${e.sourceId}`):ru.update.unknownStorage(s,"Failed projecting stored source"))),o=yield*vf({source:n,payload:e.payload,now:Date.now()}).pipe(Xo.mapError(s=>ru.update.badRequest("Invalid source definition",s instanceof Error?s.message:String(s)))),i=yield*_b(ru.update.child("persist"),r.persistSource(o,{actorScopeId:e.actorScopeId}));return yield*f2e({store:t,sourceStore:r,source:i,actorScopeId:e.actorScopeId,operation:ru.update})})),S2e=e=>Xo.flatMap(Wn,()=>Xo.gen(function*(){let t=yield*Qo;return{removed:yield*_b(ru.remove.child("remove"),t.removeSourceById({scopeId:e.scopeId,sourceId:e.sourceId}))}}));var XDt=e=>{let t=e.localInstallation,r=t.scopeId,n=t.actorScopeId,o=s=>e2e(s,e),i=s=>o(fb.flatMap(ap,s)),a=()=>{let s=crypto.randomUUID();return{executionId:kl.make(`exec_sdk_${s}`),interactionId:`executor.sdk.${s}`}};return{runtime:e,installation:t,scopeId:r,actorScopeId:n,resolutionScopeIds:t.resolutionScopeIds,close:()=>e.close(),local:{installation:()=>o(o2e()),config:()=>o(c2e()),credentials:{get:({sourceId:s,interactionId:c})=>o(i2e({scopeId:r,sourceId:s,interactionId:c})),submit:({sourceId:s,interactionId:c,action:p,token:d})=>o(a2e({scopeId:r,sourceId:s,interactionId:c,action:p,token:d})),complete:({sourceId:s,state:c,code:p,error:d,errorDescription:f})=>o(s2e({scopeId:r,sourceId:s,state:c,code:p,error:d,errorDescription:f}))}},secrets:{list:()=>o(l2e()),create:s=>o(u2e(s)),update:s=>o(p2e(s)),remove:s=>o(d2e(s))},policies:{list:()=>o($De(r)),create:s=>o(MDe({scopeId:r,payload:s})),get:s=>o(jDe({scopeId:r,policyId:s})),update:(s,c)=>o(BDe({scopeId:r,policyId:s,payload:c})),remove:s=>o(qDe({scopeId:r,policyId:s})).pipe(fb.map(c=>c.removed))},sources:{add:(s,c)=>i(p=>{let d=a();return p.addExecutorSource({...s,scopeId:r,actorScopeId:n,executionId:d.executionId,interactionId:d.interactionId},c)}),connect:s=>i(c=>c.connectMcpSource({...s,scopeId:r,actorScopeId:n})),connectBatch:s=>i(c=>{let p=a();return c.connectGoogleDiscoveryBatch({...s,scopeId:r,actorScopeId:n,executionId:p.executionId,interactionId:p.interactionId})}),discover:s=>o(FAe(s)),list:()=>o(m2e({scopeId:r,actorScopeId:n})),create:s=>o(h2e({scopeId:r,actorScopeId:n,payload:s})),get:s=>o(y2e({scopeId:r,sourceId:s,actorScopeId:n})),update:(s,c)=>o(g2e({scopeId:r,sourceId:s,actorScopeId:n,payload:c})),remove:s=>o(S2e({scopeId:r,sourceId:s})).pipe(fb.map(c=>c.removed)),inspection:{get:s=>o(PAe({scopeId:r,sourceId:s})),tool:({sourceId:s,toolPath:c})=>o(OAe({scopeId:r,sourceId:s,toolPath:c})),discover:({sourceId:s,payload:c})=>o(NAe({scopeId:r,sourceId:s,payload:c}))},oauthClients:{list:s=>i(c=>c.listScopeOauthClients({scopeId:r,providerKey:s})),create:s=>i(c=>c.createScopeOauthClient({scopeId:r,providerKey:s.providerKey,label:s.label,oauthClient:s.oauthClient})),remove:s=>i(c=>c.removeScopeOauthClient({scopeId:r,oauthClientId:s}))},providerGrants:{remove:s=>i(c=>c.removeProviderAuthGrant({scopeId:r,grantId:s}))}},oauth:{startSourceAuth:s=>i(c=>c.startSourceOAuthSession({...s,scopeId:r,actorScopeId:n})),completeSourceAuth:({state:s,code:c,error:p,errorDescription:d})=>i(f=>f.completeSourceOAuthSession({state:s,code:c,error:p,errorDescription:d})),completeProviderCallback:s=>i(c=>c.completeProviderOauthCallback({...s,scopeId:s.scopeId??r,actorScopeId:s.actorScopeId??n}))},executions:{create:s=>o(KAe({scopeId:r,payload:s,createdByScopeId:n})),get:s=>o(GAe({scopeId:r,executionId:s})),resume:(s,c)=>o(HAe({scopeId:r,executionId:s,payload:c,resumedByScopeId:n}))}}},aX=e=>fb.map(e.backend.createRuntime({executionResolver:e.executionResolver,createInternalToolMap:e.createInternalToolMap,resolveSecretMaterial:e.resolveSecretMaterial,getLocalServerBaseUrl:e.getLocalServerBaseUrl,customCodeExecutor:e.customCodeExecutor}),XDt);var YDt=e=>{let t=r=>sX.runPromise(r);return{installation:e.installation,scopeId:e.scopeId,actorScopeId:e.actorScopeId,resolutionScopeIds:e.resolutionScopeIds,close:()=>e.close(),local:{installation:()=>t(e.local.installation()),config:()=>t(e.local.config()),credentials:{get:r=>t(e.local.credentials.get(r)),submit:r=>t(e.local.credentials.submit(r)),complete:r=>t(e.local.credentials.complete(r))}},secrets:{list:()=>t(e.secrets.list()),create:r=>t(e.secrets.create(r)),update:r=>t(e.secrets.update(r)),remove:r=>t(e.secrets.remove(r))},policies:{list:()=>t(e.policies.list()),create:r=>t(e.policies.create(r)),get:r=>t(e.policies.get(r)),update:(r,n)=>t(e.policies.update(r,n)),remove:r=>t(e.policies.remove(r))},sources:{add:(r,n)=>t(e.sources.add(r,n)),connect:r=>t(e.sources.connect(r)),connectBatch:r=>t(e.sources.connectBatch(r)),discover:r=>t(e.sources.discover(r)),list:()=>t(e.sources.list()),create:r=>t(e.sources.create(r)),get:r=>t(e.sources.get(r)),update:(r,n)=>t(e.sources.update(r,n)),remove:r=>t(e.sources.remove(r)),inspection:{get:r=>t(e.sources.inspection.get(r)),tool:r=>t(e.sources.inspection.tool(r)),discover:r=>t(e.sources.inspection.discover(r))},oauthClients:{list:r=>t(e.sources.oauthClients.list(r)),create:r=>t(e.sources.oauthClients.create(r)),remove:r=>t(e.sources.oauthClients.remove(r))},providerGrants:{remove:r=>t(e.sources.providerGrants.remove(r))}},oauth:{startSourceAuth:r=>t(e.oauth.startSourceAuth(r)),completeSourceAuth:r=>t(e.oauth.completeSourceAuth(r)),completeProviderCallback:r=>t(e.oauth.completeProviderCallback(r))},executions:{create:r=>t(e.executions.create(r)),get:r=>t(e.executions.get(r)),resume:(r,n)=>t(e.executions.resume(r,n))}}},cX=async e=>YDt(await sX.runPromise(aX(e)));import{FileSystem as PIe}from"@effect/platform";import{NodeFileSystem as oIt}from"@effect/platform-node";import*as Ki from"effect/Effect";import{homedir as TI}from"node:os";import{basename as lAt,dirname as uAt,isAbsolute as pAt,join as va,resolve as wS}from"node:path";import{FileSystem as gb}from"@effect/platform";function HF(e,t=!1){let r=e.length,n=0,o="",i=0,a=16,s=0,c=0,p=0,d=0,f=0;function m(T,k){let F=0,O=0;for(;F=48&&$<=57)O=O*16+$-48;else if($>=65&&$<=70)O=O*16+$-65+10;else if($>=97&&$<=102)O=O*16+$-97+10;else break;n++,F++}return F=r){T+=e.substring(k,n),f=2;break}let F=e.charCodeAt(n);if(F===34){T+=e.substring(k,n),n++;break}if(F===92){if(T+=e.substring(k,n),n++,n>=r){f=2;break}switch(e.charCodeAt(n++)){case 34:T+='"';break;case 92:T+="\\";break;case 47:T+="/";break;case 98:T+="\b";break;case 102:T+="\f";break;case 110:T+=` +`;break;case 114:T+="\r";break;case 116:T+=" ";break;case 117:let $=m(4,!0);$>=0?T+=String.fromCharCode($):f=4;break;default:f=5}k=n;continue}if(F>=0&&F<=31)if(bI(F)){T+=e.substring(k,n),f=2;break}else f=6;n++}return T}function b(){if(o="",f=0,i=n,c=s,d=p,n>=r)return i=r,a=17;let T=e.charCodeAt(n);if(lX(T)){do n++,o+=String.fromCharCode(T),T=e.charCodeAt(n);while(lX(T));return a=15}if(bI(T))return n++,o+=String.fromCharCode(T),T===13&&e.charCodeAt(n)===10&&(n++,o+=` +`),s++,p=n,a=14;switch(T){case 123:return n++,a=1;case 125:return n++,a=2;case 91:return n++,a=3;case 93:return n++,a=4;case 58:return n++,a=6;case 44:return n++,a=5;case 34:return n++,o=S(),a=10;case 47:let k=n-1;if(e.charCodeAt(n+1)===47){for(n+=2;n=12&&T<=15);return T}return{setPosition:y,getPosition:()=>n,scan:t?I:b,getToken:()=>a,getTokenValue:()=>o,getTokenOffset:()=>i,getTokenLength:()=>n-i,getTokenStartLine:()=>c,getTokenStartCharacter:()=>i-d,getTokenError:()=>f}}function lX(e){return e===32||e===9}function bI(e){return e===10||e===13}function mb(e){return e>=48&&e<=57}var v2e;(function(e){e[e.lineFeed=10]="lineFeed",e[e.carriageReturn=13]="carriageReturn",e[e.space=32]="space",e[e._0=48]="_0",e[e._1=49]="_1",e[e._2=50]="_2",e[e._3=51]="_3",e[e._4=52]="_4",e[e._5=53]="_5",e[e._6=54]="_6",e[e._7=55]="_7",e[e._8=56]="_8",e[e._9=57]="_9",e[e.a=97]="a",e[e.b=98]="b",e[e.c=99]="c",e[e.d=100]="d",e[e.e=101]="e",e[e.f=102]="f",e[e.g=103]="g",e[e.h=104]="h",e[e.i=105]="i",e[e.j=106]="j",e[e.k=107]="k",e[e.l=108]="l",e[e.m=109]="m",e[e.n=110]="n",e[e.o=111]="o",e[e.p=112]="p",e[e.q=113]="q",e[e.r=114]="r",e[e.s=115]="s",e[e.t=116]="t",e[e.u=117]="u",e[e.v=118]="v",e[e.w=119]="w",e[e.x=120]="x",e[e.y=121]="y",e[e.z=122]="z",e[e.A=65]="A",e[e.B=66]="B",e[e.C=67]="C",e[e.D=68]="D",e[e.E=69]="E",e[e.F=70]="F",e[e.G=71]="G",e[e.H=72]="H",e[e.I=73]="I",e[e.J=74]="J",e[e.K=75]="K",e[e.L=76]="L",e[e.M=77]="M",e[e.N=78]="N",e[e.O=79]="O",e[e.P=80]="P",e[e.Q=81]="Q",e[e.R=82]="R",e[e.S=83]="S",e[e.T=84]="T",e[e.U=85]="U",e[e.V=86]="V",e[e.W=87]="W",e[e.X=88]="X",e[e.Y=89]="Y",e[e.Z=90]="Z",e[e.asterisk=42]="asterisk",e[e.backslash=92]="backslash",e[e.closeBrace=125]="closeBrace",e[e.closeBracket=93]="closeBracket",e[e.colon=58]="colon",e[e.comma=44]="comma",e[e.dot=46]="dot",e[e.doubleQuote=34]="doubleQuote",e[e.minus=45]="minus",e[e.openBrace=123]="openBrace",e[e.openBracket=91]="openBracket",e[e.plus=43]="plus",e[e.slash=47]="slash",e[e.formFeed=12]="formFeed",e[e.tab=9]="tab"})(v2e||(v2e={}));var tAt=new Array(20).fill(0).map((e,t)=>" ".repeat(t)),hb=200,rAt={" ":{"\n":new Array(hb).fill(0).map((e,t)=>` +`+" ".repeat(t)),"\r":new Array(hb).fill(0).map((e,t)=>"\r"+" ".repeat(t)),"\r\n":new Array(hb).fill(0).map((e,t)=>`\r +`+" ".repeat(t))}," ":{"\n":new Array(hb).fill(0).map((e,t)=>` +`+" ".repeat(t)),"\r":new Array(hb).fill(0).map((e,t)=>"\r"+" ".repeat(t)),"\r\n":new Array(hb).fill(0).map((e,t)=>`\r +`+" ".repeat(t))}};var ZF;(function(e){e.DEFAULT={allowTrailingComma:!1}})(ZF||(ZF={}));function b2e(e,t=[],r=ZF.DEFAULT){let n=null,o=[],i=[];function a(c){Array.isArray(o)?o.push(c):n!==null&&(o[n]=c)}return x2e(e,{onObjectBegin:()=>{let c={};a(c),i.push(o),o=c,n=null},onObjectProperty:c=>{n=c},onObjectEnd:()=>{o=i.pop()},onArrayBegin:()=>{let c=[];a(c),i.push(o),o=c,n=null},onArrayEnd:()=>{o=i.pop()},onLiteralValue:a,onError:(c,p,d)=>{t.push({error:c,offset:p,length:d})}},r),o[0]}function x2e(e,t,r=ZF.DEFAULT){let n=HF(e,!1),o=[],i=0;function a(me){return me?()=>i===0&&me(n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter()):()=>!0}function s(me){return me?xe=>i===0&&me(xe,n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter()):()=>!0}function c(me){return me?xe=>i===0&&me(xe,n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter(),()=>o.slice()):()=>!0}function p(me){return me?()=>{i>0?i++:me(n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter(),()=>o.slice())===!1&&(i=1)}:()=>!0}function d(me){return me?()=>{i>0&&i--,i===0&&me(n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter())}:()=>!0}let f=p(t.onObjectBegin),m=c(t.onObjectProperty),y=d(t.onObjectEnd),g=p(t.onArrayBegin),S=d(t.onArrayEnd),b=c(t.onLiteralValue),E=s(t.onSeparator),I=a(t.onComment),T=s(t.onError),k=r&&r.disallowComments,F=r&&r.allowTrailingComma;function O(){for(;;){let me=n.scan();switch(n.getTokenError()){case 4:$(14);break;case 5:$(15);break;case 3:$(13);break;case 1:k||$(11);break;case 2:$(12);break;case 6:$(16);break}switch(me){case 12:case 13:k?$(10):I();break;case 16:$(1);break;case 15:case 14:break;default:return me}}}function $(me,xe=[],Rt=[]){if(T(me),xe.length+Rt.length>0){let Jt=n.getToken();for(;Jt!==17;){if(xe.indexOf(Jt)!==-1){O();break}else if(Rt.indexOf(Jt)!==-1)break;Jt=O()}}}function N(me){let xe=n.getTokenValue();return me?b(xe):(m(xe),o.push(xe)),O(),!0}function U(){switch(n.getToken()){case 11:let me=n.getTokenValue(),xe=Number(me);isNaN(xe)&&($(2),xe=0),b(xe);break;case 7:b(null);break;case 8:b(!0);break;case 9:b(!1);break;default:return!1}return O(),!0}function ge(){return n.getToken()!==10?($(3,[],[2,5]),!1):(N(!1),n.getToken()===6?(E(":"),O(),Je()||$(4,[],[2,5])):$(5,[],[2,5]),o.pop(),!0)}function Te(){f(),O();let me=!1;for(;n.getToken()!==2&&n.getToken()!==17;){if(n.getToken()===5){if(me||$(4,[],[]),E(","),O(),n.getToken()===2&&F)break}else me&&$(6,[],[]);ge()||$(4,[],[2,5]),me=!0}return y(),n.getToken()!==2?$(7,[2],[]):O(),!0}function ke(){g(),O();let me=!0,xe=!1;for(;n.getToken()!==4&&n.getToken()!==17;){if(n.getToken()===5){if(xe||$(4,[],[]),E(","),O(),n.getToken()===4&&F)break}else xe&&$(6,[],[]);me?(o.push(0),me=!1):o[o.length-1]++,Je()||$(4,[],[4,5]),xe=!0}return S(),me||o.pop(),n.getToken()!==4?$(8,[4],[]):O(),!0}function Je(){switch(n.getToken()){case 3:return ke();case 1:return Te();case 10:return N(!0);default:return U()}}return O(),n.getToken()===17?r.allowEmptyContent?!0:($(4,[],[]),!1):Je()?(n.getToken()!==17&&$(9,[],[]),!0):($(4,[],[]),!1)}var E2e;(function(e){e[e.None=0]="None",e[e.UnexpectedEndOfComment=1]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=2]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=3]="UnexpectedEndOfNumber",e[e.InvalidUnicode=4]="InvalidUnicode",e[e.InvalidEscapeCharacter=5]="InvalidEscapeCharacter",e[e.InvalidCharacter=6]="InvalidCharacter"})(E2e||(E2e={}));var T2e;(function(e){e[e.OpenBraceToken=1]="OpenBraceToken",e[e.CloseBraceToken=2]="CloseBraceToken",e[e.OpenBracketToken=3]="OpenBracketToken",e[e.CloseBracketToken=4]="CloseBracketToken",e[e.CommaToken=5]="CommaToken",e[e.ColonToken=6]="ColonToken",e[e.NullKeyword=7]="NullKeyword",e[e.TrueKeyword=8]="TrueKeyword",e[e.FalseKeyword=9]="FalseKeyword",e[e.StringLiteral=10]="StringLiteral",e[e.NumericLiteral=11]="NumericLiteral",e[e.LineCommentTrivia=12]="LineCommentTrivia",e[e.BlockCommentTrivia=13]="BlockCommentTrivia",e[e.LineBreakTrivia=14]="LineBreakTrivia",e[e.Trivia=15]="Trivia",e[e.Unknown=16]="Unknown",e[e.EOF=17]="EOF"})(T2e||(T2e={}));var A2e=b2e;var D2e;(function(e){e[e.InvalidSymbol=1]="InvalidSymbol",e[e.InvalidNumberFormat=2]="InvalidNumberFormat",e[e.PropertyNameExpected=3]="PropertyNameExpected",e[e.ValueExpected=4]="ValueExpected",e[e.ColonExpected=5]="ColonExpected",e[e.CommaExpected=6]="CommaExpected",e[e.CloseBraceExpected=7]="CloseBraceExpected",e[e.CloseBracketExpected=8]="CloseBracketExpected",e[e.EndOfFileExpected=9]="EndOfFileExpected",e[e.InvalidCommentToken=10]="InvalidCommentToken",e[e.UnexpectedEndOfComment=11]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=12]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=13]="UnexpectedEndOfNumber",e[e.InvalidUnicode=14]="InvalidUnicode",e[e.InvalidEscapeCharacter=15]="InvalidEscapeCharacter",e[e.InvalidCharacter=16]="InvalidCharacter"})(D2e||(D2e={}));function I2e(e){switch(e){case 1:return"InvalidSymbol";case 2:return"InvalidNumberFormat";case 3:return"PropertyNameExpected";case 4:return"ValueExpected";case 5:return"ColonExpected";case 6:return"CommaExpected";case 7:return"CloseBraceExpected";case 8:return"CloseBracketExpected";case 9:return"EndOfFileExpected";case 10:return"InvalidCommentToken";case 11:return"UnexpectedEndOfComment";case 12:return"UnexpectedEndOfString";case 13:return"UnexpectedEndOfNumber";case 14:return"InvalidUnicode";case 15:return"InvalidEscapeCharacter";case 16:return"InvalidCharacter"}return""}import*as Ti from"effect/Effect";import*as L2e from"effect/Schema";import*as Sc from"effect/Data";var Yo=e=>e instanceof Error?e.message:String(e),gc=class extends Sc.TaggedError("LocalFileSystemError"){},ey=class extends Sc.TaggedError("LocalExecutorConfigDecodeError"){},WF=class extends Sc.TaggedError("LocalWorkspaceStateDecodeError"){},w2e=class extends Sc.TaggedError("LocalSourceArtifactDecodeError"){},QF=class extends Sc.TaggedError("LocalToolTranspileError"){},xI=class extends Sc.TaggedError("LocalToolImportError"){},ty=class extends Sc.TaggedError("LocalToolDefinitionError"){},XF=class extends Sc.TaggedError("LocalToolPathConflictError"){},k2e=class extends Sc.TaggedError("RuntimeLocalWorkspaceUnavailableError"){},C2e=class extends Sc.TaggedError("RuntimeLocalWorkspaceMismatchError"){},P2e=class extends Sc.TaggedError("LocalConfiguredSourceNotFoundError"){},O2e=class extends Sc.TaggedError("LocalSourceArtifactMissingError"){},N2e=class extends Sc.TaggedError("LocalUnsupportedSourceKindError"){};var $2e=L2e.decodeUnknownSync(Mce),dAt=e=>`${JSON.stringify(e,null,2)} +`,Sb=e=>{let t=e.path.trim();return t.startsWith("~/")?va(TI(),t.slice(2)):t==="~"?TI():pAt(t)?t:wS(e.scopeRoot,t)},uX="executor.jsonc",EI=".executor",_At="EXECUTOR_CONFIG_DIR",fAt="EXECUTOR_STATE_DIR",ry=(e,t)=>r=>new gc({message:`Failed to ${t} ${e}: ${Yo(r)}`,action:t,path:e,details:Yo(r)}),yb=e=>{let t=e?.trim();return t&&t.length>0?t:void 0},mAt=(e={})=>{let t=e.env??process.env,r=e.platform??process.platform,n=e.homeDirectory??TI(),o=yb(t[_At]);return o||(r==="win32"?va(yb(t.LOCALAPPDATA)??va(n,"AppData","Local"),"Executor"):r==="darwin"?va(n,"Library","Application Support","Executor"):va(yb(t.XDG_CONFIG_HOME)??va(n,".config"),"executor"))},hAt=(e={})=>{let t=e.env??process.env,r=e.platform??process.platform,n=e.homeDirectory??TI(),o=yb(t[fAt]);return o||(r==="win32"?va(yb(t.LOCALAPPDATA)??va(n,"AppData","Local"),"Executor","State"):r==="darwin"?va(n,"Library","Application Support","Executor","State"):va(yb(t.XDG_STATE_HOME)??va(n,".local","state"),"executor"))},yAt=(e={})=>{let t=mAt({env:e.env,platform:e.platform,homeDirectory:e.homeDirectory??TI()});return[va(t,uX)]},gAt=(e={})=>Ti.gen(function*(){let t=yield*gb.FileSystem,r=yAt(e);for(let n of r)if(yield*t.exists(n).pipe(Ti.mapError(ry(n,"check config path"))))return n;return r[0]}),SAt=(e={})=>hAt(e),F2e=(e,t)=>{let r=e.split(` +`);return t.map(n=>{let o=e.slice(0,n.offset).split(` +`),i=o.length,a=o[o.length-1]?.length??0,s=r[i-1],c=`line ${i}, column ${a+1}`,p=I2e(n.error);return s?`${p} at ${c} +${s}`:`${p} at ${c}`}).join(` +`)},vAt=e=>{let t=[];try{let r=A2e(e.content,t,{allowTrailingComma:!0});if(t.length>0)throw new ey({message:`Invalid executor config at ${e.path}: ${F2e(e.content,t)}`,path:e.path,details:F2e(e.content,t)});return $2e(r)}catch(r){throw r instanceof ey?r:new ey({message:`Invalid executor config at ${e.path}: ${Yo(r)}`,path:e.path,details:Yo(r)})}},bAt=(e,t)=>{if(!(!e&&!t))return{...e,...t}},xAt=(e,t)=>{if(!(!e&&!t))return{...e,...t}},EAt=(e,t)=>{if(!(!e&&!t))return{...e,...t}},TAt=(e,t)=>!e&&!t?null:$2e({runtime:t?.runtime??e?.runtime,workspace:{...e?.workspace,...t?.workspace},sources:bAt(e?.sources,t?.sources),policies:xAt(e?.policies,t?.policies),secrets:{providers:EAt(e?.secrets?.providers,t?.secrets?.providers),defaults:{...e?.secrets?.defaults,...t?.secrets?.defaults}}}),DAt=e=>Ti.gen(function*(){let t=yield*gb.FileSystem,r=va(e,EI,uX);return yield*t.exists(r).pipe(Ti.mapError(ry(r,"check project config path"))),r}),AAt=e=>Ti.gen(function*(){let t=yield*gb.FileSystem,r=va(e,EI,uX);return yield*t.exists(r).pipe(Ti.mapError(ry(r,"check project config path")))}),IAt=e=>Ti.gen(function*(){let t=yield*gb.FileSystem,r=wS(e),n=null,o=null;for(;;){if(n===null&&(yield*AAt(r))&&(n=r),o===null){let a=va(r,".git");(yield*t.exists(a).pipe(Ti.mapError(ry(a,"check git root"))))&&(o=r)}let i=uAt(r);if(i===r)break;r=i}return n??o??wS(e)}),YF=(e={})=>Ti.gen(function*(){let t=wS(e.cwd??process.cwd()),r=wS(e.workspaceRoot??(yield*IAt(t))),n=lAt(r)||"workspace",o=yield*DAt(r),i=wS(e.homeConfigPath??(yield*gAt())),a=wS(e.homeStateDirectory??SAt());return{cwd:t,workspaceRoot:r,workspaceName:n,configDirectory:va(r,EI),projectConfigPath:o,homeConfigPath:i,homeStateDirectory:a,artifactsDirectory:va(r,EI,"artifacts"),stateDirectory:va(r,EI,"state")}}),R2e=e=>Ti.gen(function*(){let t=yield*gb.FileSystem;if(!(yield*t.exists(e).pipe(Ti.mapError(ry(e,"check config path")))))return null;let n=yield*t.readFileString(e,"utf8").pipe(Ti.mapError(ry(e,"read config")));return yield*Ti.try({try:()=>vAt({path:e,content:n}),catch:o=>o instanceof ey?o:new ey({message:`Invalid executor config at ${e}: ${Yo(o)}`,path:e,details:Yo(o)})})}),eR=e=>Ti.gen(function*(){let[t,r]=yield*Ti.all([R2e(e.homeConfigPath),R2e(e.projectConfigPath)]);return{config:TAt(t,r),homeConfig:t,projectConfig:r,homeConfigPath:e.homeConfigPath,projectConfigPath:e.projectConfigPath}}),tR=e=>Ti.gen(function*(){let t=yield*gb.FileSystem;yield*t.makeDirectory(e.context.configDirectory,{recursive:!0}).pipe(Ti.mapError(ry(e.context.configDirectory,"create config directory"))),yield*t.writeFileString(e.context.projectConfigPath,dAt(e.config)).pipe(Ti.mapError(ry(e.context.projectConfigPath,"write config")))});import{randomUUID as PAt}from"node:crypto";import{dirname as q2e,join as OAt}from"node:path";import{FileSystem as _X}from"@effect/platform";import{NodeFileSystem as BXt}from"@effect/platform-node";import*as Vi from"effect/Effect";import*as rn from"effect/Option";import*as Ja from"effect/Schema";import{createHash as wAt}from"node:crypto";import*as B2e from"effect/Effect";var M2e=Br.make("acc_local_default"),kAt=e=>wAt("sha256").update(e).digest("hex").slice(0,16),CAt=e=>e.replaceAll("\\","/"),j2e=e=>Br.make(`ws_local_${kAt(CAt(e.workspaceRoot))}`),DI=e=>({actorScopeId:M2e,scopeId:j2e(e),resolutionScopeIds:[j2e(e),M2e]}),AI=e=>B2e.succeed(DI(e)),rR=e=>AI(e.context);var U2e=1,NAt="executor-state.json",FAt=Ja.Struct({version:Ja.Literal(U2e),authArtifacts:Ja.Array(bce),authLeases:Ja.Array(Nce),sourceOauthClients:Ja.Array(Fce),scopeOauthClients:Ja.Array(Rce),providerAuthGrants:Ja.Array(Lce),sourceAuthSessions:Ja.Array(Ace),secretMaterials:Ja.Array($ce),executions:Ja.Array(QB),executionInteractions:Ja.Array(XB),executionSteps:Ja.Array(Uce)}),RAt=Ja.decodeUnknown(FAt),LAt=()=>({version:U2e,authArtifacts:[],authLeases:[],sourceOauthClients:[],scopeOauthClients:[],providerAuthGrants:[],sourceAuthSessions:[],secretMaterials:[],executions:[],executionInteractions:[],executionSteps:[]}),En=e=>JSON.parse(JSON.stringify(e)),$At=e=>e!==null&&typeof e=="object"&&!Array.isArray(e)?e:null,dX=e=>{if(Array.isArray(e)){let o=!1;return{value:e.map(a=>{let s=dX(a);return o=o||s.migrated,s.value}),migrated:o}}let t=$At(e);if(t===null)return{value:e,migrated:!1};let r=!1,n={};for(let[o,i]of Object.entries(t)){let a=o;o==="workspaceId"?(a="scopeId",r=!0):o==="actorAccountId"?(a="actorScopeId",r=!0):o==="createdByAccountId"?(a="createdByScopeId",r=!0):o==="workspaceOauthClients"&&(a="scopeOauthClients",r=!0);let s=dX(i);r=r||s.migrated,n[a]=s.value}return{value:n,migrated:r}},wf=(e,t)=>r=>new gc({message:`Failed to ${t} ${e}: ${Yo(r)}`,action:t,path:e,details:Yo(r)}),II=(e,t)=>(e??null)===(t??null),If=e=>[...e].sort((t,r)=>t.updatedAt-r.updatedAt||t.id.localeCompare(r.id)),pX=e=>[...e].sort((t,r)=>r.updatedAt-t.updatedAt||r.id.localeCompare(t.id)),nR=e=>OAt(e.homeStateDirectory,"workspaces",DI(e).scopeId,NAt),MAt=(e,t)=>t.pipe(Vi.provideService(_X.FileSystem,e));var jAt=e=>Vi.gen(function*(){let t=yield*_X.FileSystem,r=nR(e);if(!(yield*t.exists(r).pipe(Vi.mapError(wf(r,"check executor state path")))))return LAt();let o=yield*t.readFileString(r,"utf8").pipe(Vi.mapError(wf(r,"read executor state"))),i=yield*Vi.try({try:()=>JSON.parse(o),catch:wf(r,"parse executor state")}),a=dX(i),s=yield*RAt(a.value).pipe(Vi.mapError(wf(r,"decode executor state")));return a.migrated&&(yield*z2e(e,s)),s}),z2e=(e,t)=>Vi.gen(function*(){let r=yield*_X.FileSystem,n=nR(e),o=`${n}.${PAt()}.tmp`;yield*r.makeDirectory(q2e(n),{recursive:!0}).pipe(Vi.mapError(wf(q2e(n),"create executor state directory"))),yield*r.writeFileString(o,`${JSON.stringify(t,null,2)} +`,{mode:384}).pipe(Vi.mapError(wf(o,"write executor state"))),yield*r.rename(o,n).pipe(Vi.mapError(wf(n,"replace executor state")))});var BAt=(e,t)=>{let r=null,n=Promise.resolve(),o=c=>Vi.runPromise(MAt(t,c)),i=async()=>(r!==null||(r=await o(jAt(e))),r);return{read:c=>Vi.tryPromise({try:async()=>(await n,c(En(await i()))),catch:wf(nR(e),"read executor state")}),mutate:c=>Vi.tryPromise({try:async()=>{let p,d=null;if(n=n.then(async()=>{try{let f=En(await i()),m=await c(f);r=m.state,p=m.value,await o(z2e(e,r))}catch(f){d=f}}),await n,d!==null)throw d;return p},catch:wf(nR(e),"write executor state")})}},qAt=(e,t)=>{let r=BAt(e,t);return{authArtifacts:{listByScopeId:n=>r.read(o=>If(o.authArtifacts.filter(i=>i.scopeId===n))),listByScopeAndSourceId:n=>r.read(o=>If(o.authArtifacts.filter(i=>i.scopeId===n.scopeId&&i.sourceId===n.sourceId))),getByScopeSourceAndActor:n=>r.read(o=>{let i=o.authArtifacts.find(a=>a.scopeId===n.scopeId&&a.sourceId===n.sourceId&&a.slot===n.slot&&II(a.actorScopeId,n.actorScopeId));return i?rn.some(En(i)):rn.none()}),upsert:n=>r.mutate(o=>{let i=o.authArtifacts.filter(a=>!(a.scopeId===n.scopeId&&a.sourceId===n.sourceId&&a.slot===n.slot&&II(a.actorScopeId,n.actorScopeId)));return i.push(En(n)),{state:{...o,authArtifacts:i},value:void 0}}),removeByScopeSourceAndActor:n=>r.mutate(o=>{let i=o.authArtifacts.filter(a=>a.scopeId!==n.scopeId||a.sourceId!==n.sourceId||!II(a.actorScopeId,n.actorScopeId)||n.slot!==void 0&&a.slot!==n.slot);return{state:{...o,authArtifacts:i},value:i.length!==o.authArtifacts.length}}),removeByScopeAndSourceId:n=>r.mutate(o=>{let i=o.authArtifacts.filter(a=>a.scopeId!==n.scopeId||a.sourceId!==n.sourceId);return{state:{...o,authArtifacts:i},value:o.authArtifacts.length-i.length}})},authLeases:{listAll:()=>r.read(n=>If(n.authLeases)),getByAuthArtifactId:n=>r.read(o=>{let i=o.authLeases.find(a=>a.authArtifactId===n);return i?rn.some(En(i)):rn.none()}),upsert:n=>r.mutate(o=>{let i=o.authLeases.filter(a=>a.authArtifactId!==n.authArtifactId);return i.push(En(n)),{state:{...o,authLeases:i},value:void 0}}),removeByAuthArtifactId:n=>r.mutate(o=>{let i=o.authLeases.filter(a=>a.authArtifactId!==n);return{state:{...o,authLeases:i},value:i.length!==o.authLeases.length}})},sourceOauthClients:{getByScopeSourceAndProvider:n=>r.read(o=>{let i=o.sourceOauthClients.find(a=>a.scopeId===n.scopeId&&a.sourceId===n.sourceId&&a.providerKey===n.providerKey);return i?rn.some(En(i)):rn.none()}),upsert:n=>r.mutate(o=>{let i=o.sourceOauthClients.filter(a=>!(a.scopeId===n.scopeId&&a.sourceId===n.sourceId&&a.providerKey===n.providerKey));return i.push(En(n)),{state:{...o,sourceOauthClients:i},value:void 0}}),removeByScopeAndSourceId:n=>r.mutate(o=>{let i=o.sourceOauthClients.filter(a=>a.scopeId!==n.scopeId||a.sourceId!==n.sourceId);return{state:{...o,sourceOauthClients:i},value:o.sourceOauthClients.length-i.length}})},scopeOauthClients:{listByScopeAndProvider:n=>r.read(o=>If(o.scopeOauthClients.filter(i=>i.scopeId===n.scopeId&&i.providerKey===n.providerKey))),getById:n=>r.read(o=>{let i=o.scopeOauthClients.find(a=>a.id===n);return i?rn.some(En(i)):rn.none()}),upsert:n=>r.mutate(o=>{let i=o.scopeOauthClients.filter(a=>a.id!==n.id);return i.push(En(n)),{state:{...o,scopeOauthClients:i},value:void 0}}),removeById:n=>r.mutate(o=>{let i=o.scopeOauthClients.filter(a=>a.id!==n);return{state:{...o,scopeOauthClients:i},value:i.length!==o.scopeOauthClients.length}})},providerAuthGrants:{listByScopeId:n=>r.read(o=>If(o.providerAuthGrants.filter(i=>i.scopeId===n))),listByScopeActorAndProvider:n=>r.read(o=>If(o.providerAuthGrants.filter(i=>i.scopeId===n.scopeId&&i.providerKey===n.providerKey&&II(i.actorScopeId,n.actorScopeId)))),getById:n=>r.read(o=>{let i=o.providerAuthGrants.find(a=>a.id===n);return i?rn.some(En(i)):rn.none()}),upsert:n=>r.mutate(o=>{let i=o.providerAuthGrants.filter(a=>a.id!==n.id);return i.push(En(n)),{state:{...o,providerAuthGrants:i},value:void 0}}),removeById:n=>r.mutate(o=>{let i=o.providerAuthGrants.filter(a=>a.id!==n);return{state:{...o,providerAuthGrants:i},value:i.length!==o.providerAuthGrants.length}})},sourceAuthSessions:{listAll:()=>r.read(n=>If(n.sourceAuthSessions)),listByScopeId:n=>r.read(o=>If(o.sourceAuthSessions.filter(i=>i.scopeId===n))),getById:n=>r.read(o=>{let i=o.sourceAuthSessions.find(a=>a.id===n);return i?rn.some(En(i)):rn.none()}),getByState:n=>r.read(o=>{let i=o.sourceAuthSessions.find(a=>a.state===n);return i?rn.some(En(i)):rn.none()}),getPendingByScopeSourceAndActor:n=>r.read(o=>{let i=If(o.sourceAuthSessions.filter(a=>a.scopeId===n.scopeId&&a.sourceId===n.sourceId&&a.status==="pending"&&II(a.actorScopeId,n.actorScopeId)&&(n.credentialSlot===void 0||a.credentialSlot===n.credentialSlot)))[0]??null;return i?rn.some(En(i)):rn.none()}),insert:n=>r.mutate(o=>({state:{...o,sourceAuthSessions:[...o.sourceAuthSessions,En(n)]},value:void 0})),update:(n,o)=>r.mutate(i=>{let a=null,s=i.sourceAuthSessions.map(c=>c.id!==n?c:(a={...c,...En(o)},a));return{state:{...i,sourceAuthSessions:s},value:a?rn.some(En(a)):rn.none()}}),upsert:n=>r.mutate(o=>{let i=o.sourceAuthSessions.filter(a=>a.id!==n.id);return i.push(En(n)),{state:{...o,sourceAuthSessions:i},value:void 0}}),removeByScopeAndSourceId:(n,o)=>r.mutate(i=>{let a=i.sourceAuthSessions.filter(s=>s.scopeId!==n||s.sourceId!==o);return{state:{...i,sourceAuthSessions:a},value:a.length!==i.sourceAuthSessions.length}})},secretMaterials:{getById:n=>r.read(o=>{let i=o.secretMaterials.find(a=>a.id===n);return i?rn.some(En(i)):rn.none()}),listAll:()=>r.read(n=>pX(n.secretMaterials)),upsert:n=>r.mutate(o=>{let i=o.secretMaterials.filter(a=>a.id!==n.id);return i.push(En(n)),{state:{...o,secretMaterials:i},value:void 0}}),updateById:(n,o)=>r.mutate(i=>{let a=null,s=i.secretMaterials.map(c=>c.id!==n?c:(a={...c,...o.name!==void 0?{name:o.name}:{},...o.value!==void 0?{value:o.value}:{},updatedAt:Date.now()},a));return{state:{...i,secretMaterials:s},value:a?rn.some(En(a)):rn.none()}}),removeById:n=>r.mutate(o=>{let i=o.secretMaterials.filter(a=>a.id!==n);return{state:{...o,secretMaterials:i},value:i.length!==o.secretMaterials.length}})},executions:{getById:n=>r.read(o=>{let i=o.executions.find(a=>a.id===n);return i?rn.some(En(i)):rn.none()}),getByScopeAndId:(n,o)=>r.read(i=>{let a=i.executions.find(s=>s.scopeId===n&&s.id===o);return a?rn.some(En(a)):rn.none()}),insert:n=>r.mutate(o=>({state:{...o,executions:[...o.executions,En(n)]},value:void 0})),update:(n,o)=>r.mutate(i=>{let a=null,s=i.executions.map(c=>c.id!==n?c:(a={...c,...En(o)},a));return{state:{...i,executions:s},value:a?rn.some(En(a)):rn.none()}})},executionInteractions:{getById:n=>r.read(o=>{let i=o.executionInteractions.find(a=>a.id===n);return i?rn.some(En(i)):rn.none()}),listByExecutionId:n=>r.read(o=>pX(o.executionInteractions.filter(i=>i.executionId===n))),getPendingByExecutionId:n=>r.read(o=>{let i=pX(o.executionInteractions.filter(a=>a.executionId===n&&a.status==="pending"))[0]??null;return i?rn.some(En(i)):rn.none()}),insert:n=>r.mutate(o=>({state:{...o,executionInteractions:[...o.executionInteractions,En(n)]},value:void 0})),update:(n,o)=>r.mutate(i=>{let a=null,s=i.executionInteractions.map(c=>c.id!==n?c:(a={...c,...En(o)},a));return{state:{...i,executionInteractions:s},value:a?rn.some(En(a)):rn.none()}})},executionSteps:{getByExecutionAndSequence:(n,o)=>r.read(i=>{let a=i.executionSteps.find(s=>s.executionId===n&&s.sequence===o);return a?rn.some(En(a)):rn.none()}),listByExecutionId:n=>r.read(o=>[...o.executionSteps].filter(i=>i.executionId===n).sort((i,a)=>i.sequence-a.sequence||a.updatedAt-i.updatedAt)),insert:n=>r.mutate(o=>({state:{...o,executionSteps:[...o.executionSteps,En(n)]},value:void 0})),deleteByExecutionId:n=>r.mutate(o=>({state:{...o,executionSteps:o.executionSteps.filter(i=>i.executionId!==n)},value:void 0})),updateByExecutionAndSequence:(n,o,i)=>r.mutate(a=>{let s=null,c=a.executionSteps.map(p=>p.executionId!==n||p.sequence!==o?p:(s={...p,...En(i)},s));return{state:{...a,executionSteps:c},value:s?rn.some(En(s)):rn.none()}})}}},J2e=(e,t)=>({executorState:qAt(e,t),close:async()=>{}});import{randomUUID as yX}from"node:crypto";import{spawn as G2e}from"node:child_process";import{isAbsolute as UAt}from"node:path";import{FileSystem as gX}from"@effect/platform";import{NodeFileSystem as zAt}from"@effect/platform-node";import*as yt from"effect/Effect";import*as SX from"effect/Layer";import*as oR from"effect/Option";var vX="env",JAt="params",kf="keychain",Od="local",kS=e=>e instanceof Error?e:new Error(String(e)),VAt="executor",vb=5e3,H2e="DANGEROUSLY_ALLOW_ENV_SECRETS",Z2e="EXECUTOR_SECRET_STORE_PROVIDER",KAt="EXECUTOR_KEYCHAIN_SERVICE_NAME",bb=e=>{if(e==null)return null;let t=e.trim();return t.length>0?t:null},GAt=e=>{let t=bb(e)?.toLowerCase();return t==="1"||t==="true"||t==="yes"},bX=e=>{let t=bb(e)?.toLowerCase();return t===kf?kf:t===Od?Od:null},HAt=e=>e??GAt(process.env[H2e]),ZAt=e=>bb(e)??bb(process.env[KAt])??VAt,wI=e=>{let t=e?.trim();return t&&t.length>0?t:null},W2e=e=>({id:e.id,providerId:e.providerId,name:e.name,purpose:e.purpose,createdAt:e.createdAt,updatedAt:e.updatedAt}),WAt=(e=process.platform)=>e==="darwin"?"security":e==="linux"?"secret-tool":null,CS=e=>yt.tryPromise({try:()=>new Promise((t,r)=>{let n=G2e(e.command,[...e.args],{stdio:"pipe",env:e.env}),o="",i="",a=!1,s=e.timeoutMs===void 0?null:setTimeout(()=>{a||(a=!0,n.kill("SIGKILL"),r(new Error(`${e.operation}: '${e.command}' timed out after ${e.timeoutMs}ms`)))},e.timeoutMs);n.stdout.on("data",c=>{o+=c.toString("utf8")}),n.stderr.on("data",c=>{i+=c.toString("utf8")}),n.on("error",c=>{a||(a=!0,s&&clearTimeout(s),r(new Error(`${e.operation}: failed spawning '${e.command}': ${c.message}`)))}),n.on("close",c=>{a||(a=!0,s&&clearTimeout(s),t({exitCode:c??0,stdout:o,stderr:i}))}),e.stdin!==void 0&&n.stdin.write(e.stdin),n.stdin.end()}),catch:t=>t instanceof Error?t:new Error(`${e.operation}: command execution failed: ${String(t)}`)}),kI=e=>{if(e.result.exitCode===0)return yt.succeed(e.result);let t=wI(e.result.stderr)??wI(e.result.stdout)??"command returned non-zero exit code";return yt.fail(Ne("local/secret-material-providers",`${e.operation}: ${e.message}: ${t}`))},fX=new Map,QAt=e=>yt.tryPromise({try:async()=>{let t=fX.get(e);if(t)return t;let r=new Promise(o=>{let i=G2e(e,["--help"],{stdio:"ignore"}),a=setTimeout(()=>{i.kill("SIGKILL"),o(!1)},2e3);i.on("error",()=>{clearTimeout(a),o(!1)}),i.on("close",()=>{clearTimeout(a),o(!0)})});fX.set(e,r);let n=await r;return n||fX.delete(e),n},catch:t=>t instanceof Error?t:new Error(`command.exists: failed checking '${e}': ${String(t)}`)}),XAt=(e=process.platform)=>{let t=WAt(e);return t===null?yt.succeed(!1):QAt(t)},Q2e=(e={})=>{let t=Od,r=e.storeProviderId??bX((e.env??process.env)[Z2e]);return r?yt.succeed(r):(e.platform??process.platform)!=="darwin"?yt.succeed(t):XAt(e.platform).pipe(yt.map(n=>n?kf:t),yt.catchAll(()=>yt.succeed(t)))},hX=e=>yt.gen(function*(){let t=qp.make(e.id),r=yield*e.runtime.executorState.secretMaterials.getById(t);return oR.isNone(r)?yield*Ne("local/secret-material-providers",`${e.operation}: secret material not found: ${e.id}`):r.value}),X2e=e=>yt.gen(function*(){let t=Date.now(),r=qp.make(`sec_${yX()}`);return yield*e.runtime.executorState.secretMaterials.upsert({id:r,providerId:e.providerId,handle:e.providerHandle,name:bb(e.name),purpose:e.purpose,value:e.value,createdAt:t,updatedAt:t}),{providerId:e.providerId,handle:r}}),mX=e=>yt.gen(function*(){let t=yield*hX({id:e.ref.handle,runtime:e.runtime,operation:e.operation});return t.providerId!==kf?yield*Ne("local/secret-material-providers",`${e.operation}: secret ${t.id} is stored in provider '${t.providerId}', not '${kf}'`):{providerHandle:t.handle,material:t}}),V2e=e=>{switch(process.platform){case"darwin":return CS({command:"security",args:["find-generic-password","-a",e.providerHandle,"-s",e.runtime.keychainServiceName,"-w"],operation:"keychain.get",timeoutMs:vb}).pipe(yt.flatMap(t=>kI({result:t,operation:"keychain.get",message:"Failed loading secret from macOS keychain"})),yt.map(t=>t.stdout.trimEnd()));case"linux":return CS({command:"secret-tool",args:["lookup","service",e.runtime.keychainServiceName,"account",e.providerHandle],operation:"keychain.get",timeoutMs:vb}).pipe(yt.flatMap(t=>kI({result:t,operation:"keychain.get",message:"Failed loading secret from desktop keyring"})),yt.map(t=>t.stdout.trimEnd()));default:return yt.fail(Ne("local/secret-material-providers",`keychain.get: keychain provider is unsupported on platform '${process.platform}'`))}},K2e=e=>{let t=bb(e.name);switch(process.platform){case"darwin":return CS({command:"security",args:["add-generic-password","-a",e.providerHandle,"-s",e.runtime.keychainServiceName,"-w",e.value,...t?["-l",t]:[],"-U"],operation:"keychain.put",timeoutMs:vb}).pipe(yt.flatMap(r=>kI({result:r,operation:"keychain.put",message:"Failed storing secret in macOS keychain"})));case"linux":return CS({command:"secret-tool",args:["store","--label",t??e.runtime.keychainServiceName,"service",e.runtime.keychainServiceName,"account",e.providerHandle],stdin:e.value,operation:"keychain.put",timeoutMs:vb}).pipe(yt.flatMap(r=>kI({result:r,operation:"keychain.put",message:"Failed storing secret in desktop keyring"})));default:return yt.fail(Ne("local/secret-material-providers",`keychain.put: keychain provider is unsupported on platform '${process.platform}'`))}},YAt=e=>{switch(process.platform){case"darwin":return CS({command:"security",args:["delete-generic-password","-a",e.providerHandle,"-s",e.runtime.keychainServiceName],operation:"keychain.delete",timeoutMs:vb}).pipe(yt.map(t=>t.exitCode===0));case"linux":return CS({command:"secret-tool",args:["clear","service",e.runtime.keychainServiceName,"account",e.providerHandle],operation:"keychain.delete",timeoutMs:vb}).pipe(yt.map(t=>t.exitCode===0));default:return yt.fail(Ne("local/secret-material-providers",`keychain.delete: keychain provider is unsupported on platform '${process.platform}'`))}},e2t=()=>({resolve:({ref:e,context:t})=>{let r=wI(t.params?.[e.handle]);return r===null?yt.fail(Ne("local/secret-material-providers",`Secret parameter ${e.handle} is not set`)):yt.succeed(r)},remove:()=>yt.succeed(!1)}),t2t=()=>({resolve:({ref:e,runtime:t})=>{if(!t.dangerouslyAllowEnvSecrets)return yt.fail(Ne("local/secret-material-providers",`Env-backed secrets are disabled. Set ${H2e}=true to allow provider '${vX}'.`));let r=wI(t.env[e.handle]);return r===null?yt.fail(Ne("local/secret-material-providers",`Environment variable ${e.handle} is not set`)):yt.succeed(r)},remove:()=>yt.succeed(!1)}),r2t=()=>({resolve:({ref:e,runtime:t})=>yt.gen(function*(){let r=yield*hX({id:e.handle,runtime:t,operation:"local.get"});return r.providerId!==Od?yield*Ne("local/secret-material-providers",`local.get: secret ${r.id} is stored in provider '${r.providerId}', not '${Od}'`):r.value===null?yield*Ne("local/secret-material-providers",`local.get: secret ${r.id} does not have a local value`):r.value}),store:({purpose:e,value:t,name:r,runtime:n})=>X2e({providerId:Od,providerHandle:`local:${yX()}`,purpose:e,value:t,name:r,runtime:n}),update:({ref:e,name:t,value:r,runtime:n})=>yt.gen(function*(){let o=yield*hX({id:e.handle,runtime:n,operation:"local.update"});if(o.providerId!==Od)return yield*Ne("local/secret-material-providers",`local.update: secret ${o.id} is stored in provider '${o.providerId}', not '${Od}'`);if(t===void 0&&r===void 0)return W2e(o);let i=yield*n.executorState.secretMaterials.updateById(o.id,{...t!==void 0?{name:t}:{},...r!==void 0?{value:r}:{}});return oR.isNone(i)?yield*Ne("local/secret-material-providers",`local.update: secret material not found: ${o.id}`):{id:i.value.id,providerId:i.value.providerId,name:i.value.name,purpose:i.value.purpose,createdAt:i.value.createdAt,updatedAt:i.value.updatedAt}}),remove:({ref:e,runtime:t})=>yt.gen(function*(){let r=qp.make(e.handle);return yield*t.executorState.secretMaterials.removeById(r)})}),n2t=()=>({resolve:({ref:e,runtime:t})=>yt.gen(function*(){let r=yield*mX({ref:e,runtime:t,operation:"keychain.get"});return yield*V2e({providerHandle:r.providerHandle,runtime:t})}),store:({purpose:e,value:t,name:r,runtime:n})=>yt.gen(function*(){let o=yX();return yield*K2e({providerHandle:o,name:r,value:t,runtime:n}),yield*X2e({providerId:kf,providerHandle:o,purpose:e,value:null,name:r,runtime:n})}),update:({ref:e,name:t,value:r,runtime:n})=>yt.gen(function*(){let o=yield*mX({ref:e,runtime:n,operation:"keychain.update"});if(t===void 0&&r===void 0)return W2e(o.material);let i=t??o.material.name,a=r??(yield*V2e({providerHandle:o.providerHandle,runtime:n}));yield*K2e({providerHandle:o.providerHandle,name:i,value:a,runtime:n});let s=yield*n.executorState.secretMaterials.updateById(o.material.id,{name:i});return oR.isNone(s)?yield*Ne("local/secret-material-providers",`keychain.update: secret material not found: ${o.material.id}`):{id:s.value.id,providerId:s.value.providerId,name:s.value.name,purpose:s.value.purpose,createdAt:s.value.createdAt,updatedAt:s.value.updatedAt}}),remove:({ref:e,runtime:t})=>yt.gen(function*(){let r=yield*mX({ref:e,runtime:t,operation:"keychain.delete"});return(yield*YAt({providerHandle:r.providerHandle,runtime:t}))?yield*t.executorState.secretMaterials.removeById(r.material.id):!1})}),iR=()=>new Map([[JAt,e2t()],[vX,t2t()],[kf,n2t()],[Od,r2t()]]),aR=e=>{let t=e.providers.get(e.providerId);return t?yt.succeed(t):yt.fail(Ne("local/secret-material-providers",`Unsupported secret provider: ${e.providerId}`))},sR=e=>({executorState:e.executorState,env:process.env,dangerouslyAllowEnvSecrets:HAt(e.dangerouslyAllowEnvSecrets),keychainServiceName:ZAt(e.keychainServiceName),localConfig:e.localConfig??null,workspaceRoot:e.workspaceRoot??null}),o2t=(e,t)=>yt.gen(function*(){let r=yield*gX.FileSystem,n=yield*r.stat(e).pipe(yt.mapError(kS));if(n.type==="SymbolicLink"){if(!t)return!1;let o=yield*r.realPath(e).pipe(yt.mapError(kS));return(yield*r.stat(o).pipe(yt.mapError(kS))).type==="File"}return n.type==="File"}),i2t=(e,t)=>yt.gen(function*(){if(!t||t.length===0)return!0;let r=yield*gX.FileSystem,n=yield*r.realPath(e).pipe(yt.mapError(kS));for(let o of t){let i=yield*r.realPath(o).pipe(yt.mapError(kS));if(n===i||n.startsWith(`${i}/`))return!0}return!1}),a2t=e=>yt.gen(function*(){let t=yield*gX.FileSystem,r=Sb({path:e.provider.path,scopeRoot:e.workspaceRoot}),n=yield*t.readFileString(r,"utf8").pipe(yt.mapError(kS));return(e.provider.mode??"singleValue")==="singleValue"?n.trim():yield*yt.try({try:()=>{let i=JSON.parse(n);if(e.ref.handle.startsWith("/")){let s=e.ref.handle.split("/").slice(1).map(p=>p.replaceAll("~1","/").replaceAll("~0","~")),c=i;for(let p of s){if(typeof c!="object"||c===null||!(p in c))throw new Error(`Secret path not found in ${r}: ${e.ref.handle}`);c=c[p]}if(typeof c!="string"||c.trim().length===0)throw new Error(`Secret path did not resolve to a string: ${e.ref.handle}`);return c}if(typeof i!="object"||i===null)throw new Error(`JSON secret provider must resolve to an object: ${r}`);let a=i[e.ref.handle];if(typeof a!="string"||a.trim().length===0)throw new Error(`Secret key not found in ${r}: ${e.ref.handle}`);return a},catch:kS})}),s2t=e=>yt.gen(function*(){let t=dI(e.ref.providerId);if(t===null)return yield*Ne("local/secret-material-providers",`Unsupported secret provider: ${e.ref.providerId}`);let r=e.runtime.localConfig?.secrets?.providers?.[t];if(!r)return yield*Ne("local/secret-material-providers",`Config secret provider "${t}" is not configured`);if(e.runtime.workspaceRoot===null)return yield*Ne("local/secret-material-providers",`Config secret provider "${t}" requires a workspace root`);if(r.source==="env"){let a=wI(e.runtime.env[e.ref.handle]);return a===null?yield*Ne("local/secret-material-providers",`Environment variable ${e.ref.handle} is not set`):a}if(r.source==="file")return yield*a2t({provider:r,ref:e.ref,workspaceRoot:e.runtime.workspaceRoot});let n=r.command.trim();return UAt(n)?(yield*o2t(n,r.allowSymlinkCommand??!1))?(yield*i2t(n,r.trustedDirs))?yield*CS({command:n,args:[...r.args??[],e.ref.handle],env:{...e.runtime.env,...r.env},operation:`config-secret.get:${t}`}).pipe(yt.flatMap(a=>kI({result:a,operation:`config-secret.get:${t}`,message:"Failed resolving configured exec secret"})),yt.map(a=>a.stdout.trimEnd())):yield*Ne("local/secret-material-providers",`Exec secret provider command is outside trustedDirs: ${n}`):yield*Ne("local/secret-material-providers",`Exec secret provider command is not an allowed regular file: ${n}`):yield*Ne("local/secret-material-providers",`Exec secret provider command must be absolute: ${n}`)}),Y2e=e=>{let t=iR(),r=sR(e);return({ref:n,context:o})=>yt.gen(function*(){let i=yield*aR({providers:t,providerId:n.providerId}).pipe(yt.catchAll(()=>dI(n.providerId)!==null?yt.succeed(null):yt.fail(Ne("local/secret-material-providers",`Unsupported secret provider: ${n.providerId}`))));return i===null?yield*s2t({ref:n,runtime:r}):yield*i.resolve({ref:n,context:o??{},runtime:r})}).pipe(yt.provide(zAt.layer))},eIe=e=>{let t=iR(),r=sR(e);return({purpose:n,value:o,name:i,providerId:a})=>yt.gen(function*(){let s=yield*Q2e({storeProviderId:bX(a)??void 0,env:r.env}),c=yield*aR({providers:t,providerId:s});return c.store?yield*c.store({purpose:n,value:o,name:i,runtime:r}):yield*Ne("local/secret-material-providers",`Secret provider ${s} does not support storing secret material`)})},tIe=e=>{let t=iR(),r=sR(e);return({ref:n,name:o,value:i})=>yt.gen(function*(){let a=yield*aR({providers:t,providerId:n.providerId});return a.update?yield*a.update({ref:n,name:o,value:i,runtime:r}):yield*Ne("local/secret-material-providers",`Secret provider ${n.providerId} does not support updating secret material`)})},rIe=e=>{let t=iR(),r=sR(e);return n=>yt.gen(function*(){let o=yield*aR({providers:t,providerId:n.providerId});return o.remove?yield*o.remove({ref:n,runtime:r}):!1})};var nIe=()=>()=>{let e=bX(process.env[Z2e]),t=[{id:Od,name:"Local store",canStore:!0}];return(process.platform==="darwin"||process.platform==="linux")&&t.push({id:kf,name:process.platform==="darwin"?"macOS Keychain":"Desktop Keyring",canStore:process.platform==="darwin"||e===kf}),t.push({id:vX,name:"Environment variable",canStore:!1}),Q2e({storeProviderId:e??void 0}).pipe(yt.map(r=>({platform:process.platform,secretProviders:t,defaultSecretStoreProvider:r})))};import{join as cR}from"node:path";import{FileSystem as xX}from"@effect/platform";import*as Va from"effect/Effect";import*as oIe from"effect/Option";import*as ca from"effect/Schema";var iIe=3,CI=4,lYt=ca.Struct({version:ca.Literal(iIe),sourceId:Mn,catalogId:Rc,generatedAt:It,revision:UT,snapshot:FT}),uYt=ca.Struct({version:ca.Literal(CI),sourceId:Mn,catalogId:Rc,generatedAt:It,revision:UT,snapshot:FT}),c2t=ca.Struct({version:ca.Literal(iIe),sourceId:Mn,catalogId:Rc,generatedAt:It,revision:UT,snapshot:ca.Unknown}),l2t=ca.Struct({version:ca.Literal(CI),sourceId:Mn,catalogId:Rc,generatedAt:It,revision:UT,snapshot:ca.Unknown}),u2t=ca.decodeUnknownOption(ca.parseJson(ca.Union(l2t,c2t))),p2t=e=>e.version===CI?e:{...e,version:CI},d2t=e=>e,aIe=e=>{let t=structuredClone(e),r=[];for(let[n,o]of Object.entries(t.snapshot.catalog.documents)){let i=o,a=o.native?.find(c=>c.kind==="source_document"&&typeof c.value=="string");if(!a||typeof a.value!="string")continue;r.push({documentId:n,blob:a,content:a.value});let s=(o.native??[]).filter(c=>c!==a);s.length>0?i.native=s:delete i.native}return{artifact:t,rawDocuments:r}},sIe=e=>{let t=structuredClone(e.artifact),r=d2t(t.snapshot.catalog.documents);for(let[n,o]of Object.entries(e.rawDocuments)){let i=r[n];if(!i)continue;let a=(i.native??[]).filter(s=>s.kind!=="source_document");i.native=[o,...a]}return t},_2t=e=>LT(JSON.stringify(e)),f2t=e=>LT(JSON.stringify(e.import)),m2t=e=>{try{return L6(e)}catch{return null}},cIe=e=>{let t=u2t(e);if(oIe.isNone(t))return null;let r=p2t(t.value),n=m2t(r.snapshot);return n===null?null:{...r,snapshot:n}},Cf=e=>{let t=DF(e.source),r=Date.now(),n=$T(e.syncResult),o=f2t(n),i=_2t(n),a=zTe({source:e.source,catalogId:t,revisionNumber:1,importMetadataJson:JSON.stringify(n.import),importMetadataHash:o,snapshotHash:i});return{version:CI,sourceId:e.source.id,catalogId:t,generatedAt:r,revision:a,snapshot:n}};var nu=(e,t)=>r=>new gc({message:`Failed to ${t} ${e}: ${Yo(r)}`,action:t,path:e,details:Yo(r)}),EX=e=>cR(e.context.artifactsDirectory,"sources",`${e.sourceId}.json`),TX=e=>cR(e.context.artifactsDirectory,"sources",e.sourceId,"documents"),lIe=e=>cR(TX(e),`${e.documentId}.txt`);var lR=e=>Va.gen(function*(){let t=yield*xX.FileSystem,r=EX(e);if(!(yield*t.exists(r).pipe(Va.mapError(nu(r,"check source artifact path")))))return null;let o=yield*t.readFileString(r,"utf8").pipe(Va.mapError(nu(r,"read source artifact"))),i=cIe(o);if(i===null)return null;let a={};for(let s of Object.keys(i.snapshot.catalog.documents)){let c=lIe({context:e.context,sourceId:e.sourceId,documentId:s});if(!(yield*t.exists(c).pipe(Va.mapError(nu(c,"check source document path")))))continue;let d=yield*t.readFileString(c,"utf8").pipe(Va.mapError(nu(c,"read source document")));a[s]={sourceKind:i.snapshot.import.sourceKind,kind:"source_document",value:d}}return Object.keys(a).length>0?sIe({artifact:i,rawDocuments:a}):i}),uR=e=>Va.gen(function*(){let t=yield*xX.FileSystem,r=cR(e.context.artifactsDirectory,"sources"),n=EX(e),o=TX(e),i=aIe(e.artifact);if(yield*t.makeDirectory(r,{recursive:!0}).pipe(Va.mapError(nu(r,"create source artifact directory"))),yield*t.remove(o,{recursive:!0,force:!0}).pipe(Va.mapError(nu(o,"remove source document directory"))),i.rawDocuments.length>0){yield*t.makeDirectory(o,{recursive:!0}).pipe(Va.mapError(nu(o,"create source document directory")));for(let a of i.rawDocuments){let s=lIe({context:e.context,sourceId:e.sourceId,documentId:a.documentId});yield*t.writeFileString(s,a.content).pipe(Va.mapError(nu(s,"write source document")))}}yield*t.writeFileString(n,`${JSON.stringify(i.artifact)} +`).pipe(Va.mapError(nu(n,"write source artifact")))}),pR=e=>Va.gen(function*(){let t=yield*xX.FileSystem,r=EX(e);(yield*t.exists(r).pipe(Va.mapError(nu(r,"check source artifact path"))))&&(yield*t.remove(r).pipe(Va.mapError(nu(r,"remove source artifact"))));let o=TX(e);yield*t.remove(o,{recursive:!0,force:!0}).pipe(Va.mapError(nu(o,"remove source document directory")))});import{createHash as uIe}from"node:crypto";import{dirname as AX,extname as PI,join as PS,relative as IX,resolve as h2t,sep as dIe}from"node:path";import{fileURLToPath as y2t,pathToFileURL as g2t}from"node:url";import{FileSystem as OI}from"@effect/platform";import*as Rn from"effect/Effect";import*as ou from"typescript";var S2t=new Set([".ts",".js",".mjs"]),v2t="tools",b2t="local-tools",x2t="local.tool",E2t=/^[A-Za-z0-9_-]+$/;var T2t=()=>{let e={};return{tools:e,catalog:r_({tools:e}),toolInvoker:t_({tools:e}),toolPaths:new Set}},Nd=(e,t)=>r=>new gc({message:`Failed to ${t} ${e}: ${Yo(r)}`,action:t,path:e,details:Yo(r)}),D2t=e=>PS(e.configDirectory,v2t),A2t=e=>PS(e.artifactsDirectory,b2t),I2t=e=>S2t.has(PI(e)),w2t=e=>e.startsWith(".")||e.startsWith("_"),k2t=e=>{let t=PI(e);return`${e.slice(0,-t.length)}.js`},C2t=e=>Rn.gen(function*(){let r=e.slice(0,-PI(e).length).split(dIe).filter(Boolean),n=r.at(-1)==="index"?r.slice(0,-1):r;if(n.length===0)return yield*new ty({message:`Invalid local tool path ${e}: root index files are not supported`,path:e,details:"Root index files are not supported. Use a named file such as hello.ts or a nested index.ts."});for(let o of n)if(!E2t.test(o))return yield*new ty({message:`Invalid local tool path ${e}: segment ${o} contains unsupported characters`,path:e,details:`Tool path segments may only contain letters, numbers, underscores, and hyphens. Invalid segment: ${o}`});return n.join(".")}),P2t=e=>Rn.gen(function*(){return(yield*(yield*OI.FileSystem).readDirectory(e).pipe(Rn.mapError(Nd(e,"read local tools directory")))).sort((n,o)=>n.localeCompare(o))}),O2t=e=>Rn.gen(function*(){let t=yield*OI.FileSystem;if(!(yield*t.exists(e).pipe(Rn.mapError(Nd(e,"check local tools directory")))))return[];let n=o=>Rn.gen(function*(){let i=yield*P2t(o),a=[];for(let s of i){let c=PS(o,s),p=yield*t.stat(c).pipe(Rn.mapError(Nd(c,"stat local tool path")));if(p.type==="Directory"){a.push(...yield*n(c));continue}p.type==="File"&&I2t(c)&&a.push(c)}return a});return yield*n(e)}),N2t=(e,t)=>t.filter(r=>IX(e,r).split(dIe).every(n=>!w2t(n))),F2t=(e,t)=>{let r=(t??[]).filter(n=>n.category===ou.DiagnosticCategory.Error).map(n=>{let o=ou.flattenDiagnosticMessageText(n.messageText,` +`);if(!n.file||n.start===void 0)return o;let i=n.file.getLineAndCharacterOfPosition(n.start);return`${i.line+1}:${i.character+1} ${o}`});return r.length===0?null:new QF({message:`Failed to transpile local tool ${e}`,path:e,details:r.join(` +`)})},DX=e=>{if(!e.startsWith("./")&&!e.startsWith("../"))return e;let t=e.match(/^(.*?)(\?.*|#.*)?$/),r=t?.[1]??e,n=t?.[2]??"",o=PI(r);return o===".js"?e:[".ts",".mjs"].includes(o)?`${r.slice(0,-o.length)}.js${n}`:o.length>0?e:`${r}.js${n}`},pIe=e=>e.replace(/(from\s+["'])(\.{1,2}\/[^"']+)(["'])/g,(t,r,n,o)=>`${r}${DX(n)}${o}`).replace(/(import\s+["'])(\.{1,2}\/[^"']+)(["'])/g,(t,r,n,o)=>`${r}${DX(n)}${o}`).replace(/(import\(\s*["'])(\.{1,2}\/[^"']+)(["']\s*\))/g,(t,r,n,o)=>`${r}${DX(n)}${o}`),R2t=e=>Rn.gen(function*(){if(PI(e.sourcePath)!==".ts")return pIe(e.content);let t=ou.transpileModule(e.content,{fileName:e.sourcePath,compilerOptions:{module:ou.ModuleKind.ESNext,moduleResolution:ou.ModuleResolutionKind.Bundler,target:ou.ScriptTarget.ES2022,sourceMap:!1,inlineSourceMap:!1,inlineSources:!1},reportDiagnostics:!0}),r=F2t(e.sourcePath,t.diagnostics);return r?yield*r:pIe(t.outputText)}),L2t=()=>Rn.gen(function*(){let e=yield*OI.FileSystem,t=AX(y2t(import.meta.url));for(;;){let r=PS(t,"node_modules");if(yield*e.exists(r).pipe(Rn.mapError(Nd(r,"check executor node_modules directory"))))return r;let o=AX(t);if(o===t)return null;t=o}}),$2t=e=>Rn.gen(function*(){let t=yield*OI.FileSystem,r=PS(e,"node_modules"),n=yield*L2t();(yield*t.exists(r).pipe(Rn.mapError(Nd(r,"check local tool node_modules link"))))||n!==null&&(yield*t.symlink(n,r).pipe(Rn.mapError(Nd(r,"create local tool node_modules link"))))}),M2t=e=>Rn.gen(function*(){let t=yield*OI.FileSystem,r=yield*Rn.forEach(e.sourceFiles,a=>Rn.gen(function*(){let s=yield*t.readFileString(a,"utf8").pipe(Rn.mapError(Nd(a,"read local tool source"))),c=IX(e.sourceDirectory,a),p=uIe("sha256").update(c).update("\0").update(s).digest("hex").slice(0,12);return{sourcePath:a,relativePath:c,content:s,contentHash:p}})),n=uIe("sha256").update(JSON.stringify(r.map(a=>[a.relativePath,a.contentHash]))).digest("hex").slice(0,16),o=PS(A2t(e.context),n);yield*t.makeDirectory(o,{recursive:!0}).pipe(Rn.mapError(Nd(o,"create local tool artifact directory"))),yield*$2t(o);let i=new Map;for(let a of r){let s=k2t(a.relativePath),c=PS(o,s),p=AX(c),d=yield*R2t({sourcePath:a.sourcePath,content:a.content});yield*t.makeDirectory(p,{recursive:!0}).pipe(Rn.mapError(Nd(p,"create local tool artifact parent directory"))),yield*t.writeFileString(c,d).pipe(Rn.mapError(Nd(c,"write local tool artifact"))),i.set(a.sourcePath,c)}return i}),_Ie=e=>typeof e=="object"&&e!==null&&"inputSchema"in e&&typeof e.execute=="function",j2t=e=>typeof e=="object"&&e!==null&&"tool"in e&&_Ie(e.tool),B2t=e=>{let t=`${x2t}.${e.toolPath}`;if(j2t(e.exported)){let r=e.exported;return Rn.succeed({...r,metadata:{...r.metadata,sourceKey:t}})}if(_Ie(e.exported)){let r=e.exported;return Rn.succeed({tool:r,metadata:{sourceKey:t}})}return Rn.fail(new ty({message:`Invalid local tool export in ${e.sourcePath}`,path:e.sourcePath,details:"Local tool files must export a default value or named `tool` export containing either an executable tool or a `{ tool, metadata? }` definition."}))},q2t=e=>Rn.tryPromise({try:()=>import(g2t(h2t(e.artifactPath)).href),catch:t=>new xI({message:`Failed to import local tool ${e.sourcePath}`,path:e.sourcePath,details:Yo(t)})}).pipe(Rn.flatMap(t=>{let r=t.default!==void 0,n=t.tool!==void 0;return r&&n?Rn.fail(new ty({message:`Invalid local tool export in ${e.sourcePath}`,path:e.sourcePath,details:"Export either a default tool or a named `tool` export, but not both."})):!r&&!n?Rn.fail(new ty({message:`Missing local tool export in ${e.sourcePath}`,path:e.sourcePath,details:"Expected a default export or named `tool` export."})):B2t({toolPath:e.toolPath,sourcePath:e.sourcePath,exported:r?t.default:t.tool})})),fIe=e=>Rn.gen(function*(){let t=D2t(e),r=yield*O2t(t);if(r.length===0)return T2t();let n=yield*M2t({context:e,sourceDirectory:t,sourceFiles:r}),o=N2t(t,r),i={},a=new Map;for(let s of o){let c=IX(t,s),p=yield*C2t(c),d=a.get(p);if(d)return yield*new XF({message:`Local tool path conflict for ${p}`,path:s,otherPath:d,toolPath:p});let f=n.get(s);if(!f)return yield*new xI({message:`Missing compiled artifact for local tool ${s}`,path:s,details:"Expected a compiled local tool artifact, but none was produced."});i[p]=yield*q2t({sourcePath:s,artifactPath:f,toolPath:p}),a.set(p,s)}return{tools:i,catalog:r_({tools:i}),toolInvoker:t_({tools:i}),toolPaths:new Set(Object.keys(i))}});import{join as J2t}from"node:path";import{FileSystem as yIe}from"@effect/platform";import*as Fd from"effect/Effect";import*as gIe from"effect/Schema";import*as Ka from"effect/Schema";var U2t=Ka.Struct({status:Dv,lastError:Ka.NullOr(Ka.String),sourceHash:Ka.NullOr(Ka.String),createdAt:It,updatedAt:It}),z2t=Ka.Struct({id:bv,createdAt:It,updatedAt:It}),mIe=Ka.Struct({version:Ka.Literal(1),sources:Ka.Record({key:Ka.String,value:U2t}),policies:Ka.Record({key:Ka.String,value:z2t})}),hIe=()=>({version:1,sources:{},policies:{}});var V2t="workspace-state.json",K2t=gIe.decodeUnknownSync(mIe),dR=(e,t)=>r=>new gc({message:`Failed to ${t} ${e}: ${Yo(r)}`,action:t,path:e,details:Yo(r)}),SIe=e=>J2t(e.stateDirectory,V2t),_R=e=>Fd.gen(function*(){let t=yield*yIe.FileSystem,r=SIe(e);if(!(yield*t.exists(r).pipe(Fd.mapError(dR(r,"check workspace state path")))))return hIe();let o=yield*t.readFileString(r,"utf8").pipe(Fd.mapError(dR(r,"read workspace state")));return yield*Fd.try({try:()=>K2t(JSON.parse(o)),catch:i=>new WF({message:`Invalid local scope state at ${r}: ${Yo(i)}`,path:r,details:Yo(i)})})}),fR=e=>Fd.gen(function*(){let t=yield*yIe.FileSystem;yield*t.makeDirectory(e.context.stateDirectory,{recursive:!0}).pipe(Fd.mapError(dR(e.context.stateDirectory,"create state directory")));let r=SIe(e.context);yield*t.writeFileString(r,`${JSON.stringify(e.state,null,2)} +`).pipe(Fd.mapError(dR(r,"write workspace state")))});import{join as NI}from"node:path";import{FileSystem as bIe}from"@effect/platform";import{NodeFileSystem as xIe}from"@effect/platform-node";import*as mR from"effect/Cause";import*as yn from"effect/Effect";import*as PX from"effect/Fiber";var G2t="types",H2t="sources",tl=(e,t)=>r=>new gc({message:`Failed to ${t} ${e}: ${Yo(r)}`,action:t,path:e,details:Yo(r)}),hR=e=>NI(e.configDirectory,G2t),OX=e=>NI(hR(e),H2t),EIe=e=>`${e}.d.ts`,TIe=(e,t)=>NI(OX(e),EIe(t)),DIe=e=>NI(hR(e),"index.d.ts"),CX=e=>`SourceTools_${e.replace(/[^A-Za-z0-9_$]+/g,"_")}`,Z2t=e=>`(${e.argsOptional?"args?:":"args:"} ${e.inputType}) => Promise<${e.outputType}>`,vIe=()=>({method:null,children:new Map}),W2t=(e,t)=>e.length===0?"{}":["{",...e.map(r=>`${t}${r}`),`${t.slice(0,-2)}}`].join(` +`),AIe=(e,t)=>{let r=" ".repeat(t+1),n=[...e.children.entries()].sort(([a],[s])=>a.localeCompare(s)).map(([a,s])=>`${pq(a)}: ${AIe(s,t+1)};`),o=W2t(n,r);if(e.method===null)return o;let i=Z2t(e.method);return e.children.size===0?i:`(${i}) & ${o}`},Q2t=e=>{let t=vIe();for(let r of e){let n=t;for(let o of r.segments){let i=n.children.get(o);if(i){n=i;continue}let a=vIe();n.children.set(o,a),n=a}n.method=r}return t},X2t=e=>{let t=RT({catalog:e.catalog}),r=Object.values(t.toolDescriptors).sort((i,a)=>i.toolPath.join(".").localeCompare(a.toolPath.join("."))),n=HT({catalog:t.catalog,roots:a3(t)});return{methods:r.map(i=>({segments:i.toolPath,inputType:n.renderDeclarationShape(i.callShapeId,{aliasHint:di(...i.toolPath,"call")}),outputType:i.resultShapeId?n.renderDeclarationShape(i.resultShapeId,{aliasHint:di(...i.toolPath,"result")}):"unknown",argsOptional:ZT(t.catalog,i.callShapeId)})),supportingTypes:n.supportingDeclarations()}},IIe=e=>{let t=CX(e.source.id),r=X2t(e.snapshot),n=Q2t(r.methods),o=AIe(n,0);return["// Generated by executor. Do not edit by hand.",`// Source: ${e.source.name} (${e.source.id})`,"",...r.supportingTypes,...r.supportingTypes.length>0?[""]:[],`export interface ${t} ${o}`,"",`export declare const tools: ${t};`,`export type ${t}Tools = ${t};`,"export default tools;",""].join(` +`)},Y2t=e=>wIe(e.map(t=>({sourceId:t.source.id}))),wIe=e=>{let t=[...e].sort((i,a)=>i.sourceId.localeCompare(a.sourceId)),r=t.map(i=>`import type { ${CX(i.sourceId)} } from "../sources/${i.sourceId}";`),n=t.map(i=>CX(i.sourceId)),o=n.length>0?n.join(" & "):"{}";return["// Generated by executor. Do not edit by hand.",...r,...r.length>0?[""]:[],`export type ExecutorSourceTools = ${o};`,"","declare global {"," const tools: ExecutorSourceTools;","}","","export declare const tools: ExecutorSourceTools;","export default tools;",""].join(` +`)},eIt=e=>yn.gen(function*(){let t=yield*bIe.FileSystem,r=hR(e.context),n=OX(e.context),o=e.entries.filter(c=>c.source.enabled&&c.source.status==="connected").sort((c,p)=>c.source.id.localeCompare(p.source.id));yield*t.makeDirectory(r,{recursive:!0}).pipe(yn.mapError(tl(r,"create declaration directory"))),yield*t.makeDirectory(n,{recursive:!0}).pipe(yn.mapError(tl(n,"create source declaration directory")));let i=new Set(o.map(c=>EIe(c.source.id))),a=yield*t.readDirectory(n).pipe(yn.mapError(tl(n,"read source declaration directory")));for(let c of a){if(i.has(c))continue;let p=NI(n,c);yield*t.remove(p).pipe(yn.mapError(tl(p,"remove stale source declaration")))}for(let c of o){let p=TIe(e.context,c.source.id);yield*t.writeFileString(p,IIe(c)).pipe(yn.mapError(tl(p,"write source declaration")))}let s=DIe(e.context);yield*t.writeFileString(s,Y2t(o)).pipe(yn.mapError(tl(s,"write aggregate declaration")))}),tIt=e=>yn.gen(function*(){let t=yield*bIe.FileSystem,r=hR(e.context),n=OX(e.context);yield*t.makeDirectory(r,{recursive:!0}).pipe(yn.mapError(tl(r,"create declaration directory"))),yield*t.makeDirectory(n,{recursive:!0}).pipe(yn.mapError(tl(n,"create source declaration directory")));let o=TIe(e.context,e.source.id);if(e.source.enabled&&e.source.status==="connected"&&e.snapshot!==null){let c=e.snapshot;if(c===null)return;yield*t.writeFileString(o,IIe({source:e.source,snapshot:c})).pipe(yn.mapError(tl(o,"write source declaration")))}else(yield*t.exists(o).pipe(yn.mapError(tl(o,"check source declaration path"))))&&(yield*t.remove(o).pipe(yn.mapError(tl(o,"remove source declaration"))));let a=(yield*t.readDirectory(n).pipe(yn.mapError(tl(n,"read source declaration directory")))).filter(c=>c.endsWith(".d.ts")).map(c=>({sourceId:c.slice(0,-5)})),s=DIe(e.context);yield*t.writeFileString(s,wIe(a)).pipe(yn.mapError(tl(s,"write aggregate declaration")))}),NX=e=>eIt(e).pipe(yn.provide(xIe.layer)),FX=e=>tIt(e).pipe(yn.provide(xIe.layer)),kIe=(e,t)=>{let r=mR.isCause(t)?mR.pretty(t):t instanceof Error?t.message:String(t);console.warn(`[source-types] ${e} failed: ${r}`)},CIe="1500 millis",wX=new Map,kX=new Map,yR=e=>{let t=e.context.configDirectory,r=wX.get(t);r&&yn.runFork(PX.interruptFork(r));let n=yn.runFork(yn.sleep(CIe).pipe(yn.zipRight(NX(e).pipe(yn.catchAllCause(o=>yn.sync(()=>{kIe("workspace declaration refresh",o)}))))));wX.set(t,n),n.addObserver(()=>{wX.delete(t)})},gR=e=>{let t=`${e.context.configDirectory}:${e.source.id}`,r=kX.get(t);r&&yn.runFork(PX.interruptFork(r));let n=yn.runFork(yn.sleep(CIe).pipe(yn.zipRight(FX(e).pipe(yn.catchAllCause(o=>yn.sync(()=>{kIe(`source ${e.source.id} declaration refresh`,o)}))))));kX.set(t,n),n.addObserver(()=>{kX.delete(t)})};var Rd=e=>e instanceof Error?e:new Error(String(e)),Pf=(e,t)=>t.pipe(Ki.provideService(PIe.FileSystem,e)),iIt=e=>({load:()=>AI(e).pipe(Ki.mapError(Rd)),getOrProvision:()=>rR({context:e}).pipe(Ki.mapError(Rd))}),aIt=(e,t)=>({load:()=>Pf(t,eR(e)).pipe(Ki.mapError(Rd)),writeProject:r=>Pf(t,tR({context:e,config:r})).pipe(Ki.mapError(Rd)),resolveRelativePath:Sb}),sIt=(e,t)=>({load:()=>Pf(t,_R(e)).pipe(Ki.mapError(Rd)),write:r=>Pf(t,fR({context:e,state:r})).pipe(Ki.mapError(Rd))}),cIt=(e,t)=>({build:Cf,read:r=>Pf(t,lR({context:e,sourceId:r})).pipe(Ki.mapError(Rd)),write:({sourceId:r,artifact:n})=>Pf(t,uR({context:e,sourceId:r,artifact:n})).pipe(Ki.mapError(Rd)),remove:r=>Pf(t,pR({context:e,sourceId:r})).pipe(Ki.mapError(Rd))}),lIt=(e,t)=>({load:()=>Pf(t,fIe(e))}),uIt=e=>({refreshWorkspaceInBackground:({entries:t})=>Ki.sync(()=>{yR({context:e,entries:t})}),refreshSourceInBackground:({source:t,snapshot:r})=>Ki.sync(()=>{gR({context:e,source:t,snapshot:r})})}),pIt=e=>({scopeName:e.workspaceName,scopeRoot:e.workspaceRoot,metadata:{kind:"file",configDirectory:e.configDirectory,projectConfigPath:e.projectConfigPath,homeConfigPath:e.homeConfigPath,homeStateDirectory:e.homeStateDirectory,artifactsDirectory:e.artifactsDirectory,stateDirectory:e.stateDirectory}}),OIe=(e={},t={})=>Ki.gen(function*(){let r=yield*PIe.FileSystem,n=yield*Pf(r,YF({cwd:e.cwd,workspaceRoot:e.workspaceRoot,homeConfigPath:e.homeConfigPath,homeStateDirectory:e.homeStateDirectory})).pipe(Ki.mapError(Rd)),o=J2e(n,r),i=aIt(n,r),a=yield*i.load(),s=t.resolveSecretMaterial??Y2e({executorState:o.executorState,localConfig:a.config,workspaceRoot:n.workspaceRoot});return{scope:pIt(n),installation:iIt(n),workspace:{config:i,state:sIt(n,r),sourceArtifacts:cIt(n,r),sourceAuth:{artifacts:o.executorState.authArtifacts,leases:o.executorState.authLeases,sourceOauthClients:o.executorState.sourceOauthClients,scopeOauthClients:o.executorState.scopeOauthClients,providerGrants:o.executorState.providerAuthGrants,sourceSessions:o.executorState.sourceAuthSessions},localTools:lIt(n,r),sourceTypeDeclarations:uIt(n)},secrets:{...o.executorState.secretMaterials,resolve:s,store:eIe({executorState:o.executorState}),delete:rIe({executorState:o.executorState}),update:tIe({executorState:o.executorState})},executions:{runs:o.executorState.executions,interactions:o.executorState.executionInteractions,steps:o.executorState.executionSteps},instanceConfig:{resolve:nIe()},close:o.close}}).pipe(Ki.provide(oIt.layer)),RX=(e={})=>Yh({loadRepositories:t=>OIe(e,t)});import*as $Ie from"effect/Effect";import*as OS from"effect/Effect";var NIe={action:"accept"},dIt={action:"decline"},_It=e=>{let t=e.context??{},r=t.invocationDescriptor??{};return{toolPath:String(e.path),sourceId:String(r.sourceId??e.sourceKey??""),sourceName:String(r.sourceName??""),operationKind:r.operationKind??"unknown",args:e.args,reason:String(t.interactionReason??"Approval required"),approvalLabel:typeof r.approvalLabel=="string"?r.approvalLabel:null,context:t}},fIt=e=>{let t=e.context??{};return e.elicitation.mode==="url"?{kind:"url",url:e.elicitation.url,message:e.elicitation.message,sourceId:e.sourceKey||void 0,context:t}:{kind:"form",message:e.elicitation.message,requestedSchema:e.elicitation.requestedSchema,toolPath:String(e.path)||void 0,sourceId:e.sourceKey||void 0,context:t}},mIt=e=>e.context?.interactionPurpose==="tool_execution_gate",FIe=e=>{let{onToolApproval:t,onInteraction:r}=e;return n=>OS.gen(function*(){if(mIt(n)){if(t==="allow-all"||t===void 0)return NIe;if(t==="deny-all")return dIt;let a=_It(n);return(yield*OS.tryPromise({try:()=>Promise.resolve(t(a)),catch:c=>c instanceof Error?c:new Error(String(c))})).approved?NIe:{action:"decline"}}if(!r){let a=n.elicitation.mode??"form";return yield*OS.fail(new Error(`An ${a} interaction was requested (${n.elicitation.message}), but no onInteraction callback was provided`))}let o=fIt(n),i=yield*OS.tryPromise({try:()=>Promise.resolve(r(o)),catch:a=>a instanceof Error?a:new Error(String(a))});return{action:i.action,content:"content"in i?i.content:void 0}})};var rl=e=>JSON.parse(JSON.stringify(e)),hIt=(e,t)=>{let r=e.find(t);return r!=null?rl(r):null},yIt=()=>{let e=Br.make(`ws_mem_${crypto.randomUUID().slice(0,16)}`),t=Br.make(`acc_mem_${crypto.randomUUID().slice(0,16)}`);return{scopeId:e,actorScopeId:t,resolutionScopeIds:[e,t]}},Ld=()=>{let e=[];return{items:e,findBy:t=>hIt(e,t),filterBy:t=>rl(e.filter(t)),insert:t=>{e.push(rl(t))},upsertBy:(t,r)=>{let n=t(r),o=e.findIndex(i=>t(i)===n);o>=0?e[o]=rl(r):e.push(rl(r))},removeBy:t=>{let r=e.findIndex(t);return r>=0?(e.splice(r,1),!0):!1},removeAllBy:t=>{let r=e.length,n=e.filter(o=>!t(o));return e.length=0,e.push(...n),r-n.length},updateBy:(t,r)=>{let n=e.find(t);return n?(Object.assign(n,r),rl(n)):null}}},RIe=e=>Yh({loadRepositories:t=>{let r=yIt(),n=e?.resolveSecret,o=Ld(),i=Ld(),a=Ld(),s=Ld(),c=Ld(),p=Ld(),d=Ld(),f=Ld(),m=Ld(),y=Ld(),g=new Map;return{scope:{scopeName:"memory",scopeRoot:process.cwd()},installation:{load:()=>rl(r),getOrProvision:()=>rl(r)},workspace:{config:(()=>{let S=null;return{load:()=>({config:S,homeConfig:null,projectConfig:S}),writeProject:b=>{S=rl(b)},resolveRelativePath:({path:b})=>b}})(),state:(()=>{let S={version:1,sources:{},policies:{}};return{load:()=>rl(S),write:b=>{S=rl(b)}}})(),sourceArtifacts:{build:Cf,read:S=>g.get(S)??null,write:({sourceId:S,artifact:b})=>{g.set(S,b)},remove:S=>{g.delete(S)}},sourceAuth:{artifacts:{listByScopeId:S=>o.filterBy(b=>b.scopeId===S),listByScopeAndSourceId:({scopeId:S,sourceId:b})=>o.filterBy(E=>E.scopeId===S&&E.sourceId===b),getByScopeSourceAndActor:({scopeId:S,sourceId:b,actorScopeId:E,slot:I})=>o.findBy(T=>T.scopeId===S&&T.sourceId===b&&T.actorScopeId===E&&T.slot===I),upsert:S=>o.upsertBy(b=>`${b.scopeId}:${b.sourceId}:${b.actorScopeId}:${b.slot}`,S),removeByScopeSourceAndActor:({scopeId:S,sourceId:b,actorScopeId:E,slot:I})=>o.removeBy(T=>T.scopeId===S&&T.sourceId===b&&T.actorScopeId===E&&(I===void 0||T.slot===I)),removeByScopeAndSourceId:({scopeId:S,sourceId:b})=>o.removeAllBy(E=>E.scopeId===S&&E.sourceId===b)},leases:{listAll:()=>rl(i.items),getByAuthArtifactId:S=>i.findBy(b=>b.authArtifactId===S),upsert:S=>i.upsertBy(b=>b.authArtifactId,S),removeByAuthArtifactId:S=>i.removeBy(b=>b.authArtifactId===S)},sourceOauthClients:{getByScopeSourceAndProvider:({scopeId:S,sourceId:b,providerKey:E})=>a.findBy(I=>I.scopeId===S&&I.sourceId===b&&I.providerKey===E),upsert:S=>a.upsertBy(b=>`${b.scopeId}:${b.sourceId}:${b.providerKey}`,S),removeByScopeAndSourceId:({scopeId:S,sourceId:b})=>a.removeAllBy(E=>E.scopeId===S&&E.sourceId===b)},scopeOauthClients:{listByScopeAndProvider:({scopeId:S,providerKey:b})=>s.filterBy(E=>E.scopeId===S&&E.providerKey===b),getById:S=>s.findBy(b=>b.id===S),upsert:S=>s.upsertBy(b=>b.id,S),removeById:S=>s.removeBy(b=>b.id===S)},providerGrants:{listByScopeId:S=>c.filterBy(b=>b.scopeId===S),listByScopeActorAndProvider:({scopeId:S,actorScopeId:b,providerKey:E})=>c.filterBy(I=>I.scopeId===S&&I.actorScopeId===b&&I.providerKey===E),getById:S=>c.findBy(b=>b.id===S),upsert:S=>c.upsertBy(b=>b.id,S),removeById:S=>c.removeBy(b=>b.id===S)},sourceSessions:{listAll:()=>rl(p.items),listByScopeId:S=>p.filterBy(b=>b.scopeId===S),getById:S=>p.findBy(b=>b.id===S),getByState:S=>p.findBy(b=>b.state===S),getPendingByScopeSourceAndActor:({scopeId:S,sourceId:b,actorScopeId:E,credentialSlot:I})=>p.findBy(T=>T.scopeId===S&&T.sourceId===b&&T.actorScopeId===E&&T.status==="pending"&&(I===void 0||T.credentialSlot===I)),insert:S=>p.insert(S),update:(S,b)=>p.updateBy(E=>E.id===S,b),upsert:S=>p.upsertBy(b=>b.id,S),removeByScopeAndSourceId:(S,b)=>p.removeAllBy(E=>E.scopeId===S&&E.sourceId===b)>0}}},secrets:{getById:S=>d.findBy(b=>b.id===S),listAll:()=>d.items.map(S=>({id:S.id,providerId:S.providerId,name:S.name,purpose:S.purpose,createdAt:S.createdAt,updatedAt:S.updatedAt})),upsert:S=>d.upsertBy(b=>b.id,S),updateById:(S,b)=>d.updateBy(E=>E.id===S,{...b,updatedAt:Date.now()}),removeById:S=>d.removeBy(b=>b.id===S),resolve:n?({secretId:S,context:b})=>Promise.resolve(n({secretId:S,context:b})):({secretId:S})=>d.items.find(E=>E.id===S)?.value??null,store:S=>{let b=Date.now(),E={...S,createdAt:b,updatedAt:b};d.upsertBy(k=>k.id,E);let{value:I,...T}=E;return T},delete:S=>d.removeBy(b=>b.id===S.id),update:S=>d.updateBy(b=>b.id===S.id,{...S,updatedAt:Date.now()})},executions:{runs:{getById:S=>f.findBy(b=>b.id===S),getByScopeAndId:(S,b)=>f.findBy(E=>E.scopeId===S&&E.id===b),insert:S=>f.insert(S),update:(S,b)=>f.updateBy(E=>E.id===S,b)},interactions:{getById:S=>m.findBy(b=>b.id===S),listByExecutionId:S=>m.filterBy(b=>b.executionId===S),getPendingByExecutionId:S=>m.findBy(b=>b.executionId===S&&b.status==="pending"),insert:S=>m.insert(S),update:(S,b)=>m.updateBy(E=>E.id===S,b)},steps:{getByExecutionAndSequence:(S,b)=>y.findBy(E=>E.executionId===S&&E.sequence===b),listByExecutionId:S=>y.filterBy(b=>b.executionId===S),insert:S=>y.insert(S),deleteByExecutionId:S=>{y.removeAllBy(b=>b.executionId===S)},updateByExecutionAndSequence:(S,b,E)=>y.updateBy(I=>I.executionId===S&&I.sequence===b,E)}},instanceConfig:{resolve:()=>({platform:"memory",secretProviders:[],defaultSecretStoreProvider:"memory"})}}}});var gIt=e=>{let t={};for(let[r,n]of Object.entries(e))t[r]={description:n.description,inputSchema:n.inputSchema??Wd,execute:n.execute};return t},SIt=e=>typeof e=="object"&&e!==null&&"loadRepositories"in e&&typeof e.loadRepositories=="function",vIt=e=>typeof e=="object"&&e!==null&&"createRuntime"in e&&typeof e.createRuntime=="function",bIt=e=>typeof e=="object"&&e!==null&&"kind"in e&&e.kind==="file",xIt=e=>{let t=e.storage??"memory";if(t==="memory")return RIe(e);if(bIt(t))return t.fs&&console.warn("@executor/sdk: Custom `fs` in file storage is not yet supported. Using default Node.js filesystem."),RX({cwd:t.cwd,workspaceRoot:t.workspaceRoot});if(SIt(t))return Yh({loadRepositories:t.loadRepositories});if(vIt(t))return t;throw new Error("Invalid storage option")},LIe=e=>{if(e!==null)try{return JSON.parse(e)}catch{return e}},EIt=e=>{try{return JSON.parse(e)}catch{return{}}},TIt=50,DIt=(e,t)=>{let r=FIe({onToolApproval:t.onToolApproval,onInteraction:t.onInteraction});return async n=>{let o=await e.executions.create({code:n}),i=0;for(;o.execution.status==="waiting_for_interaction"&&o.pendingInteraction!==null&&i{let t=xIt(e),r=e.tools?()=>gIt(e.tools):void 0,n=e.runtime&&typeof e.runtime!="string"?e.runtime:void 0,o=await cX({backend:t,createInternalToolMap:r,customCodeExecutor:n});return{execute:DIt(o,e),sources:o.sources,policies:o.policies,secrets:o.secrets,oauth:o.oauth,local:o.local,close:o.close}};var nl=e=>JSON.parse(JSON.stringify(e)),IIt=(e,t)=>{let r=e.find(t);return r!=null?nl(r):null},$d=(e,t)=>{let r=[],n=()=>{try{e.writeFileSync(t,JSON.stringify(r,null,2))}catch{}};return{items:r,hydrate:async()=>{try{if(await e.exists(t)){let o=await e.readFile(t),i=JSON.parse(o);Array.isArray(i)&&(r.length=0,r.push(...i))}}catch{}},findBy:o=>IIt(r,o),filterBy:o=>nl(r.filter(o)),insert:o=>{r.push(nl(o)),n()},upsertBy:(o,i)=>{let a=o(i),s=r.findIndex(c=>o(c)===a);s>=0?r[s]=nl(i):r.push(nl(i)),n()},removeBy:o=>{let i=r.findIndex(o);return i>=0?(r.splice(i,1),n(),!0):!1},removeAllBy:o=>{let i=r.length,a=r.filter(s=>!o(s));return r.length=0,r.push(...a),i!==a.length&&n(),i-a.length},updateBy:(o,i)=>{let a=r.find(o);return a?(Object.assign(a,i),n(),nl(a)):null}}},wIt=e=>{let{fs:t,resolveSecret:r}=e,n=e.root??"/.executor";if(t.mkdirSync)try{t.mkdirSync(n,{recursive:!0}),t.mkdirSync(`${n}/artifacts`,{recursive:!0})}catch{}return Yh({loadRepositories:async o=>{let i;try{if(await t.exists(`${n}/installation.json`))i=JSON.parse(await t.readFile(`${n}/installation.json`));else{let b=Br.make(`ws_fs_${crypto.randomUUID().slice(0,16)}`),E=Br.make(`acc_fs_${crypto.randomUUID().slice(0,16)}`);i={scopeId:b,actorScopeId:E,resolutionScopeIds:[b,E]},t.writeFileSync(`${n}/installation.json`,JSON.stringify(i,null,2))}}catch{let b=Br.make(`ws_fs_${crypto.randomUUID().slice(0,16)}`),E=Br.make(`acc_fs_${crypto.randomUUID().slice(0,16)}`);i={scopeId:b,actorScopeId:E,resolutionScopeIds:[b,E]}}let a=$d(t,`${n}/auth-artifacts.json`),s=$d(t,`${n}/auth-leases.json`),c=$d(t,`${n}/source-oauth-clients.json`),p=$d(t,`${n}/scope-oauth-clients.json`),d=$d(t,`${n}/provider-grants.json`),f=$d(t,`${n}/source-sessions.json`),m=$d(t,`${n}/secrets.json`),y=$d(t,`${n}/execution-runs.json`),g=$d(t,`${n}/execution-interactions.json`),S=$d(t,`${n}/execution-steps.json`);return await Promise.all([a.hydrate(),s.hydrate(),c.hydrate(),p.hydrate(),d.hydrate(),f.hydrate(),m.hydrate(),y.hydrate(),g.hydrate(),S.hydrate()]),{scope:{scopeName:"fs",scopeRoot:n},installation:{load:()=>nl(i),getOrProvision:()=>nl(i)},workspace:{config:await(async()=>{let b=null;try{await t.exists(`${n}/config.json`)&&(b=JSON.parse(await t.readFile(`${n}/config.json`)))}catch{}return{load:()=>({config:b,homeConfig:null,projectConfig:b}),writeProject:E=>{b=nl(E),t.writeFileSync(`${n}/config.json`,JSON.stringify(b,null,2))},resolveRelativePath:({path:E})=>E}})(),state:await(async()=>{let b={version:1,sources:{},policies:{}};try{await t.exists(`${n}/state.json`)&&(b=JSON.parse(await t.readFile(`${n}/state.json`)))}catch{}return{load:()=>nl(b),write:E=>{b=nl(E),t.writeFileSync(`${n}/state.json`,JSON.stringify(b,null,2))}}})(),sourceArtifacts:(()=>{let b=new Map;return{build:Cf,read:E=>b.get(E)??null,write:({sourceId:E,artifact:I})=>{b.set(E,I),t.writeFileSync(`${n}/artifacts/${E}.json`,JSON.stringify(I))},remove:E=>{b.delete(E);try{t.writeFileSync(`${n}/artifacts/${E}.json`,"")}catch{}}}})(),sourceAuth:{artifacts:{listByScopeId:b=>a.filterBy(E=>E.scopeId===b),listByScopeAndSourceId:({scopeId:b,sourceId:E})=>a.filterBy(I=>I.scopeId===b&&I.sourceId===E),getByScopeSourceAndActor:({scopeId:b,sourceId:E,actorScopeId:I,slot:T})=>a.findBy(k=>k.scopeId===b&&k.sourceId===E&&k.actorScopeId===I&&k.slot===T),upsert:b=>a.upsertBy(E=>`${E.scopeId}:${E.sourceId}:${E.actorScopeId}:${E.slot}`,b),removeByScopeSourceAndActor:({scopeId:b,sourceId:E,actorScopeId:I,slot:T})=>a.removeBy(k=>k.scopeId===b&&k.sourceId===E&&k.actorScopeId===I&&(T===void 0||k.slot===T)),removeByScopeAndSourceId:({scopeId:b,sourceId:E})=>a.removeAllBy(I=>I.scopeId===b&&I.sourceId===E)},leases:{listAll:()=>nl(s.items),getByAuthArtifactId:b=>s.findBy(E=>E.authArtifactId===b),upsert:b=>s.upsertBy(E=>E.authArtifactId,b),removeByAuthArtifactId:b=>s.removeBy(E=>E.authArtifactId===b)},sourceOauthClients:{getByScopeSourceAndProvider:({scopeId:b,sourceId:E,providerKey:I})=>c.findBy(T=>T.scopeId===b&&T.sourceId===E&&T.providerKey===I),upsert:b=>c.upsertBy(E=>`${E.scopeId}:${E.sourceId}:${E.providerKey}`,b),removeByScopeAndSourceId:({scopeId:b,sourceId:E})=>c.removeAllBy(I=>I.scopeId===b&&I.sourceId===E)},scopeOauthClients:{listByScopeAndProvider:({scopeId:b,providerKey:E})=>p.filterBy(I=>I.scopeId===b&&I.providerKey===E),getById:b=>p.findBy(E=>E.id===b),upsert:b=>p.upsertBy(E=>E.id,b),removeById:b=>p.removeBy(E=>E.id===b)},providerGrants:{listByScopeId:b=>d.filterBy(E=>E.scopeId===b),listByScopeActorAndProvider:({scopeId:b,actorScopeId:E,providerKey:I})=>d.filterBy(T=>T.scopeId===b&&T.actorScopeId===E&&T.providerKey===I),getById:b=>d.findBy(E=>E.id===b),upsert:b=>d.upsertBy(E=>E.id,b),removeById:b=>d.removeBy(E=>E.id===b)},sourceSessions:{listAll:()=>nl(f.items),listByScopeId:b=>f.filterBy(E=>E.scopeId===b),getById:b=>f.findBy(E=>E.id===b),getByState:b=>f.findBy(E=>E.state===b),getPendingByScopeSourceAndActor:({scopeId:b,sourceId:E,actorScopeId:I,credentialSlot:T})=>f.findBy(k=>k.scopeId===b&&k.sourceId===E&&k.actorScopeId===I&&k.status==="pending"&&(T===void 0||k.credentialSlot===T)),insert:b=>f.insert(b),update:(b,E)=>f.updateBy(I=>I.id===b,E),upsert:b=>f.upsertBy(E=>E.id,b),removeByScopeAndSourceId:(b,E)=>f.removeAllBy(I=>I.scopeId===b&&I.sourceId===E)>0}}},secrets:{getById:b=>m.findBy(E=>E.id===b),listAll:()=>m.items.map(b=>({id:b.id,providerId:b.providerId,name:b.name,purpose:b.purpose,createdAt:b.createdAt,updatedAt:b.updatedAt})),upsert:b=>m.upsertBy(E=>E.id,b),updateById:(b,E)=>m.updateBy(I=>I.id===b,{...E,updatedAt:Date.now()}),removeById:b=>m.removeBy(E=>E.id===b),resolve:r?({secretId:b,context:E})=>Promise.resolve(r({secretId:b,context:E})):({secretId:b})=>m.items.find(I=>I.id===b)?.value??null,store:b=>{let E=Date.now(),I={...b,createdAt:E,updatedAt:E};m.upsertBy(F=>F.id,I);let{value:T,...k}=I;return k},delete:b=>m.removeBy(E=>E.id===b.id),update:b=>m.updateBy(E=>E.id===b.id,{...b,updatedAt:Date.now()})},executions:{runs:{getById:b=>y.findBy(E=>E.id===b),getByScopeAndId:(b,E)=>y.findBy(I=>I.scopeId===b&&I.id===E),insert:b=>y.insert(b),update:(b,E)=>y.updateBy(I=>I.id===b,E)},interactions:{getById:b=>g.findBy(E=>E.id===b),listByExecutionId:b=>g.filterBy(E=>E.executionId===b),getPendingByExecutionId:b=>g.findBy(E=>E.executionId===b&&E.status==="pending"),insert:b=>g.insert(b),update:(b,E)=>g.updateBy(I=>I.id===b,E)},steps:{getByExecutionAndSequence:(b,E)=>S.findBy(I=>I.executionId===b&&I.sequence===E),listByExecutionId:b=>S.filterBy(E=>E.executionId===b),insert:b=>S.insert(b),deleteByExecutionId:b=>{S.removeAllBy(E=>E.executionId===b)},updateByExecutionAndSequence:(b,E,I)=>S.updateBy(T=>T.executionId===b&&T.sequence===E,I)}},instanceConfig:{resolve:()=>({platform:"fs",secretProviders:[],defaultSecretStoreProvider:"fs"})}}}})};export{AIt as createExecutor,wIt as createFsBackend}; diff --git a/vendor/executor/openapi-extractor-wasm/openapi_extractor_bg.wasm b/vendor/executor/openapi-extractor-wasm/openapi_extractor_bg.wasm new file mode 100644 index 00000000..656d1d1d Binary files /dev/null and b/vendor/executor/openapi-extractor-wasm/openapi_extractor_bg.wasm differ