@datalabrotterdam/nova-ai-cli 1.1.0 → 1.2.0-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/CHANGELOG.md +70 -0
  2. package/README.md +160 -101
  3. package/dist/chunk-NHGIUEIR.js +754 -0
  4. package/dist/chunk-SKAW2KXC.js +10 -0
  5. package/dist/headless-OFJFVJ3O.js +543 -0
  6. package/dist/index.js +155 -17
  7. package/dist/tui-NJWDD5X7.js +4810 -0
  8. package/dist/webui-L4GGMXJ3.js +9 -0
  9. package/package.json +32 -32
  10. package/dist/acp/agent.d.ts +0 -13
  11. package/dist/acp/agent.js +0 -242
  12. package/dist/acp/auth-server.d.ts +0 -10
  13. package/dist/acp/auth-server.js +0 -67
  14. package/dist/acp/credentials.d.ts +0 -11
  15. package/dist/acp/credentials.js +0 -30
  16. package/dist/acp/index.d.ts +0 -2
  17. package/dist/acp/index.js +0 -21
  18. package/dist/acp/mcp.d.ts +0 -11
  19. package/dist/acp/mcp.js +0 -90
  20. package/dist/acp/sessions.d.ts +0 -20
  21. package/dist/acp/sessions.js +0 -91
  22. package/dist/acp/tools/index.d.ts +0 -6
  23. package/dist/acp/tools/index.js +0 -5
  24. package/dist/acp/tools/marker.d.ts +0 -17
  25. package/dist/acp/tools/marker.js +0 -43
  26. package/dist/acp/tools/permission.d.ts +0 -2
  27. package/dist/acp/tools/permission.js +0 -20
  28. package/dist/acp/tools/read-file.d.ts +0 -2
  29. package/dist/acp/tools/read-file.js +0 -20
  30. package/dist/acp/tools/registry.d.ts +0 -4
  31. package/dist/acp/tools/registry.js +0 -10
  32. package/dist/acp/tools/reporting.d.ts +0 -3
  33. package/dist/acp/tools/reporting.js +0 -26
  34. package/dist/acp/tools/run-command.d.ts +0 -2
  35. package/dist/acp/tools/run-command.js +0 -29
  36. package/dist/acp/tools/system-prompt.d.ts +0 -2
  37. package/dist/acp/tools/system-prompt.js +0 -23
  38. package/dist/acp/tools/types.d.ts +0 -18
  39. package/dist/acp/tools/types.js +0 -1
  40. package/dist/acp/tools/write-file.d.ts +0 -2
  41. package/dist/acp/tools/write-file.js +0 -20
  42. package/dist/index.d.ts +0 -2
  43. package/dist/tui/index.d.ts +0 -7
  44. package/dist/tui/index.js +0 -11
  45. package/dist/webui/index.d.ts +0 -6
  46. package/dist/webui/index.js +0 -9
  47. package/src/acp/web/dist/assets/index-CSccI7lJ.css +0 -1
  48. package/src/acp/web/dist/assets/index-D2Z0sfLR.js +0 -1
  49. package/src/acp/web/dist/favicon.svg +0 -46
  50. package/src/acp/web/dist/index.html +0 -32
@@ -1,91 +0,0 @@
1
- import { appendFileSync, mkdirSync, readdirSync, readFileSync } from "node:fs";
2
- import { homedir } from "node:os";
3
- import { join } from "node:path";
4
- const SESSIONS_DIR = join(homedir(), ".nova-ai", "sessions");
5
- function sessionFilePath(sessionId) {
6
- return join(SESSIONS_DIR, `${sessionId}.jsonl`);
7
- }
8
- function parseSessionFile(raw) {
9
- let header = null;
10
- const messages = [];
11
- let updatedAt = "";
12
- for (const line of raw.split("\n")) {
13
- if (!line.trim())
14
- continue;
15
- const parsed = JSON.parse(line);
16
- if (parsed.kind === "header") {
17
- header = parsed;
18
- }
19
- else {
20
- messages.push(parsed.message);
21
- updatedAt = parsed.updatedAt;
22
- }
23
- }
24
- if (!header)
25
- return null;
26
- return { sessionId: "", cwd: header.cwd, title: header.title, updatedAt, messages };
27
- }
28
- export function loadStoredSession(sessionId) {
29
- try {
30
- const raw = readFileSync(sessionFilePath(sessionId), "utf8");
31
- const session = parseSessionFile(raw);
32
- return session ? { ...session, sessionId } : null;
33
- }
34
- catch {
35
- return null;
36
- }
37
- }
38
- /**
39
- * Each turn is appended as its own line rather than rewriting the whole
40
- * session file, so persisting after every prompt stays O(1) instead of
41
- * O(history length).
42
- */
43
- export function appendSessionTurn(sessionId, header, newMessages) {
44
- mkdirSync(SESSIONS_DIR, { recursive: true });
45
- const path = sessionFilePath(sessionId);
46
- const updatedAt = new Date().toISOString();
47
- const lines = [];
48
- // Re-stating the header is cheap and keeps title updates (set once the
49
- // first user message arrives) visible without rewriting prior lines.
50
- lines.push(JSON.stringify({ kind: "header", cwd: header.cwd, title: header.title }));
51
- for (const message of newMessages) {
52
- lines.push(JSON.stringify({ kind: "message", updatedAt, message }));
53
- }
54
- appendFileSync(path, `${lines.join("\n")}\n`);
55
- }
56
- export function listStoredSessions(cwd) {
57
- let files;
58
- try {
59
- files = readdirSync(SESSIONS_DIR);
60
- }
61
- catch {
62
- return [];
63
- }
64
- const sessions = [];
65
- for (const file of files) {
66
- if (!file.endsWith(".jsonl"))
67
- continue;
68
- const sessionId = file.slice(0, -".jsonl".length);
69
- try {
70
- const raw = readFileSync(join(SESSIONS_DIR, file), "utf8");
71
- const session = parseSessionFile(raw);
72
- if (!session)
73
- continue;
74
- if (!cwd || session.cwd === cwd)
75
- sessions.push({ ...session, sessionId });
76
- }
77
- catch {
78
- // Skip corrupt/partial session files rather than failing the whole listing.
79
- }
80
- }
81
- return sessions.sort((a, b) => b.updatedAt.localeCompare(a.updatedAt));
82
- }
83
- export function deriveTitle(messages) {
84
- const firstUser = messages.find((m) => m.role === "user");
85
- if (!firstUser || typeof firstUser.content !== "string")
86
- return null;
87
- const text = firstUser.content.trim();
88
- if (!text)
89
- return null;
90
- return text.length > 60 ? `${text.slice(0, 60)}…` : text;
91
- }
@@ -1,6 +0,0 @@
1
- export { extractToolCall, hasPendingFence } from "./marker.js";
2
- export { requestPermissionIfNeeded } from "./permission.js";
3
- export { availableTools, findTool } from "./registry.js";
4
- export { sendToolCallPending, sendToolCallUpdate } from "./reporting.js";
5
- export { buildToolsSystemPrompt } from "./system-prompt.js";
6
- export type { ToolContext, ToolDefinition, ToolResult } from "./types.js";
@@ -1,5 +0,0 @@
1
- export { extractToolCall, hasPendingFence } from "./marker.js";
2
- export { requestPermissionIfNeeded } from "./permission.js";
3
- export { availableTools, findTool } from "./registry.js";
4
- export { sendToolCallPending, sendToolCallUpdate } from "./reporting.js";
5
- export { buildToolsSystemPrompt } from "./system-prompt.js";
@@ -1,17 +0,0 @@
1
- export type ParsedToolCall = {
2
- name: string;
3
- args: Record<string, unknown>;
4
- matchStart: number;
5
- matchEnd: number;
6
- };
7
- /**
8
- * Looks for one complete ```tool_call fenced block in the accumulated stream
9
- * buffer. Returns null while the block hasn't fully arrived yet (it may be
10
- * split across multiple stream chunks).
11
- */
12
- export declare function extractToolCall(buffer: string): ParsedToolCall | null;
13
- /**
14
- * True once the buffer contains the fence start, or ends with a prefix of it
15
- * (the opening marker may itself be split across stream chunks).
16
- */
17
- export declare function hasPendingFence(buffer: string): boolean;
@@ -1,43 +0,0 @@
1
- // Greedy match: takes the LAST closing ``` in the buffer, not the first. The
2
- // JSON payload (e.g. write_file content) may itself contain literal ``` runs
3
- // (markdown snippets, code fences) — a lazy match would close on those and
4
- // truncate/corrupt the JSON.
5
- const FENCE_RE = /```tool_call\s*\n([\s\S]*)\n```/;
6
- /**
7
- * Looks for one complete ```tool_call fenced block in the accumulated stream
8
- * buffer. Returns null while the block hasn't fully arrived yet (it may be
9
- * split across multiple stream chunks).
10
- */
11
- export function extractToolCall(buffer) {
12
- const match = FENCE_RE.exec(buffer);
13
- if (!match)
14
- return null;
15
- try {
16
- const parsed = JSON.parse(match[1]);
17
- if (typeof parsed?.name !== "string")
18
- return null;
19
- return {
20
- name: parsed.name,
21
- args: typeof parsed.args === "object" && parsed.args !== null ? parsed.args : parsed,
22
- matchStart: match.index,
23
- matchEnd: match.index + match[0].length,
24
- };
25
- }
26
- catch {
27
- return null;
28
- }
29
- }
30
- const FENCE_START = "```tool_call";
31
- /**
32
- * True once the buffer contains the fence start, or ends with a prefix of it
33
- * (the opening marker may itself be split across stream chunks).
34
- */
35
- export function hasPendingFence(buffer) {
36
- if (buffer.includes(FENCE_START))
37
- return true;
38
- for (let len = Math.min(FENCE_START.length, buffer.length); len > 0; len--) {
39
- if (buffer.endsWith(FENCE_START.slice(0, len)))
40
- return true;
41
- }
42
- return false;
43
- }
@@ -1,2 +0,0 @@
1
- import type { ToolContext, ToolDefinition } from "./types.js";
2
- export declare function requestPermissionIfNeeded(ctx: ToolContext, toolCallId: string, tool: ToolDefinition, args: Record<string, unknown>): Promise<boolean>;
@@ -1,20 +0,0 @@
1
- import * as acp from "@agentclientprotocol/sdk";
2
- export async function requestPermissionIfNeeded(ctx, toolCallId, tool, args) {
3
- if (!tool.mutating)
4
- return true;
5
- const response = await ctx.client.request(acp.methods.client.session.requestPermission, {
6
- sessionId: ctx.sessionId,
7
- toolCall: {
8
- toolCallId,
9
- title: tool.name,
10
- kind: "execute",
11
- status: "pending",
12
- rawInput: args,
13
- },
14
- options: [
15
- { optionId: "allow", name: "Allow", kind: "allow_once" },
16
- { optionId: "reject", name: "Reject", kind: "reject_once" },
17
- ],
18
- }, { cancellationSignal: ctx.signal });
19
- return response.outcome.outcome === "selected" && response.outcome.optionId === "allow";
20
- }
@@ -1,2 +0,0 @@
1
- import type { ToolDefinition } from "./types.js";
2
- export declare const readFileTool: ToolDefinition;
@@ -1,20 +0,0 @@
1
- import * as acp from "@agentclientprotocol/sdk";
2
- export const readFileTool = {
3
- name: "read_file",
4
- description: 'read_file: {"path": "<absolute path>"} — read a text file in the workspace.',
5
- requiredCapability: (caps) => !!caps?.fs?.readTextFile,
6
- mutating: false,
7
- async execute({ client, sessionId, signal }, args) {
8
- const path = typeof args.path === "string" ? args.path : "";
9
- if (!path)
10
- return { error: "read_file requires a 'path' argument." };
11
- try {
12
- const result = await client.request(acp.methods.client.fs.readTextFile, { sessionId, path }, { cancellationSignal: signal });
13
- return { output: result.content };
14
- }
15
- catch (err) {
16
- const message = err instanceof Error ? err.message : "Failed to read file.";
17
- return { error: `${message} (path tried: ${path})` };
18
- }
19
- },
20
- };
@@ -1,4 +0,0 @@
1
- import type * as acp from "@agentclientprotocol/sdk";
2
- import type { ToolDefinition } from "./types.js";
3
- export declare function availableTools(caps: acp.ClientCapabilities | undefined): ToolDefinition[];
4
- export declare function findTool(name: string): ToolDefinition | undefined;
@@ -1,10 +0,0 @@
1
- import { readFileTool } from "./read-file.js";
2
- import { runCommandTool } from "./run-command.js";
3
- import { writeFileTool } from "./write-file.js";
4
- const TOOLS = [readFileTool, writeFileTool, runCommandTool];
5
- export function availableTools(caps) {
6
- return TOOLS.filter((tool) => tool.requiredCapability(caps));
7
- }
8
- export function findTool(name) {
9
- return TOOLS.find((tool) => tool.name === name);
10
- }
@@ -1,3 +0,0 @@
1
- import type { ToolContext, ToolDefinition } from "./types.js";
2
- export declare function sendToolCallPending(ctx: ToolContext, toolCallId: string, tool: ToolDefinition, args: Record<string, unknown>): Promise<void>;
3
- export declare function sendToolCallUpdate(ctx: ToolContext, toolCallId: string, status: "completed" | "failed", output: string): Promise<void>;
@@ -1,26 +0,0 @@
1
- import * as acp from "@agentclientprotocol/sdk";
2
- export async function sendToolCallPending(ctx, toolCallId, tool, args) {
3
- await ctx.client.notify(acp.methods.client.session.update, {
4
- sessionId: ctx.sessionId,
5
- update: {
6
- sessionUpdate: "tool_call",
7
- toolCallId,
8
- title: tool.name,
9
- kind: tool.mutating ? "execute" : "read",
10
- status: "pending",
11
- rawInput: args,
12
- },
13
- });
14
- }
15
- export async function sendToolCallUpdate(ctx, toolCallId, status, output) {
16
- await ctx.client.notify(acp.methods.client.session.update, {
17
- sessionId: ctx.sessionId,
18
- update: {
19
- sessionUpdate: "tool_call_update",
20
- toolCallId,
21
- status,
22
- content: [{ type: "content", content: { type: "text", text: output } }],
23
- rawOutput: { output },
24
- },
25
- });
26
- }
@@ -1,2 +0,0 @@
1
- import type { ToolDefinition } from "./types.js";
2
- export declare const runCommandTool: ToolDefinition;
@@ -1,29 +0,0 @@
1
- import * as acp from "@agentclientprotocol/sdk";
2
- export const runCommandTool = {
3
- name: "run_command",
4
- description: 'run_command: {"command": "<shell command>"} — run a shell command in the workspace and return its output.',
5
- requiredCapability: (caps) => !!caps?.terminal,
6
- mutating: true,
7
- async execute({ client, sessionId, signal }, args) {
8
- const command = typeof args.command === "string" ? args.command : "";
9
- if (!command)
10
- return { error: "run_command requires a 'command' argument." };
11
- let terminalId;
12
- try {
13
- const created = await client.request(acp.methods.client.terminal.create, { sessionId, command }, { cancellationSignal: signal });
14
- terminalId = created.terminalId;
15
- const exit = await client.request(acp.methods.client.terminal.waitForExit, { sessionId, terminalId }, { cancellationSignal: signal });
16
- const { output, truncated } = await client.request(acp.methods.client.terminal.output, { sessionId, terminalId }, { cancellationSignal: signal });
17
- const exitNote = exit.exitCode !== undefined && exit.exitCode !== null ? ` (exit code ${exit.exitCode})` : "";
18
- return { output: `${output}${truncated ? "\n[output truncated]" : ""}${exitNote}` };
19
- }
20
- catch (err) {
21
- return { error: err instanceof Error ? err.message : "Failed to run command." };
22
- }
23
- finally {
24
- if (terminalId) {
25
- void client.request(acp.methods.client.terminal.release, { sessionId, terminalId }).catch(() => { });
26
- }
27
- }
28
- },
29
- };
@@ -1,2 +0,0 @@
1
- import type { ToolDefinition } from "./types.js";
2
- export declare function buildToolsSystemPrompt(tools: ToolDefinition[], cwd: string): string | null;
@@ -1,23 +0,0 @@
1
- export function buildToolsSystemPrompt(tools, cwd) {
2
- if (tools.length === 0)
3
- return null;
4
- const toolList = tools.map((tool) => `- ${tool.description}`).join("\n");
5
- return [
6
- `The user's workspace root is: ${cwd}`,
7
- "Always use absolute paths rooted there (e.g. resolve a file named X to the corresponding path under that root). Never guess or invent a path like /home/user/... — use the workspace root given above.",
8
- "You can use tools to read/write files or run shell commands in the user's workspace.",
9
- "To use a tool, emit exactly this fenced block and nothing else after it in your turn:",
10
- "```tool_call",
11
- '{"name": "<tool name>", "args": { ... }}',
12
- "```",
13
- "STRICT rules for this JSON:",
14
- "- All tool arguments go INSIDE the \"args\" object. Never put them at the top level next to \"name\".",
15
- "- Include every argument the tool needs, exactly as named below. Do not omit \"path\", \"content\", or \"command\".",
16
- "- Example for write_file: ```tool_call",
17
- '{"name": "write_file", "args": {"path": "' + cwd.replace(/\\/g, "\\\\") + '/example.txt", "content": "file contents here"}}',
18
- "```",
19
- "- One tool call per turn. After the result comes back, continue or call another tool.",
20
- "Wait for the tool's result before continuing. Available tools:",
21
- toolList,
22
- ].join("\n");
23
- }
@@ -1,18 +0,0 @@
1
- import type * as acp from "@agentclientprotocol/sdk";
2
- export type ToolContext = {
3
- client: acp.AgentContext;
4
- sessionId: string;
5
- signal: AbortSignal;
6
- };
7
- export type ToolResult = {
8
- output: string;
9
- } | {
10
- error: string;
11
- };
12
- export type ToolDefinition = {
13
- name: string;
14
- description: string;
15
- requiredCapability: (caps: acp.ClientCapabilities | undefined) => boolean;
16
- mutating: boolean;
17
- execute(ctx: ToolContext, args: Record<string, unknown>): Promise<ToolResult>;
18
- };
@@ -1 +0,0 @@
1
- export {};
@@ -1,2 +0,0 @@
1
- import type { ToolDefinition } from "./types.js";
2
- export declare const writeFileTool: ToolDefinition;
@@ -1,20 +0,0 @@
1
- import * as acp from "@agentclientprotocol/sdk";
2
- export const writeFileTool = {
3
- name: "write_file",
4
- description: 'write_file: {"path": "<absolute path>", "content": "<full file content>"} — overwrite a text file in the workspace.',
5
- requiredCapability: (caps) => !!caps?.fs?.writeTextFile,
6
- mutating: true,
7
- async execute({ client, sessionId, signal }, args) {
8
- const path = typeof args.path === "string" ? args.path : "";
9
- const content = typeof args.content === "string" ? args.content : "";
10
- if (!path)
11
- return { error: "write_file requires a 'path' argument." };
12
- try {
13
- await client.request(acp.methods.client.fs.writeTextFile, { sessionId, path, content }, { cancellationSignal: signal });
14
- return { output: `Wrote ${content.length} characters to ${path}.` };
15
- }
16
- catch (err) {
17
- return { error: err instanceof Error ? err.message : "Failed to write file." };
18
- }
19
- },
20
- };
package/dist/index.d.ts DELETED
@@ -1,2 +0,0 @@
1
- #!/usr/bin/env node
2
- export {};
@@ -1,7 +0,0 @@
1
- /**
2
- * Placeholder for the interactive terminal chat mode (nova-ai-cli's primary
3
- * entrypoint, mirroring `claude`/`codex`). ACP mode in index.ts is the
4
- * machine-facing counterpart of this same auth/credentials plumbing.
5
- */
6
- export declare function runChat(...args: string[]): Promise<void>;
7
- export default runChat;
package/dist/tui/index.js DELETED
@@ -1,11 +0,0 @@
1
- /**
2
- * Placeholder for the interactive terminal chat mode (nova-ai-cli's primary
3
- * entrypoint, mirroring `claude`/`codex`). ACP mode in index.ts is the
4
- * machine-facing counterpart of this same auth/credentials plumbing.
5
- */
6
- export async function runChat(...args) {
7
- console.log("nova-ai-cli is a work in progress — interactive chat isn't built yet.");
8
- console.log("Right now it only works in ACP mode: run `nova-ai-cli --acp` (or point your ACP client at this binary).");
9
- console.log("Run `nova-ai-cli --setup` first to connect your Nova API key.");
10
- }
11
- export default runChat;
@@ -1,6 +0,0 @@
1
- /**
2
- * Placeholder for the standalone browser-based agent UI (nova-ai-cli --web),
3
- * separate from src/acp/web which only handles the --setup auth page.
4
- */
5
- declare function runWebUi(...args: string[]): Promise<void>;
6
- export default runWebUi;
@@ -1,9 +0,0 @@
1
- /**
2
- * Placeholder for the standalone browser-based agent UI (nova-ai-cli --web),
3
- * separate from src/acp/web which only handles the --setup auth page.
4
- */
5
- async function runWebUi(...args) {
6
- console.log("nova-ai-cli --web is a work in progress — the browser UI isn't built yet.");
7
- console.log("Use `nova-ai-cli` for the terminal chat, or `nova-ai-cli --acp` for ACP mode.");
8
- }
9
- export default runWebUi;
@@ -1 +0,0 @@
1
- [data-theme=dark]{--color-primary:#63e;--color-success:#4ade80;--color-danger:#ef4444;--color-text-primary:#e4e6eb;--color-text-secondary:#b0b3b8;--color-border-primary:#424242;--color-background-page:linear-gradient(150deg, #000 0%, #0b0618 100%);--color-card-bg:#121212d1;--color-card-border:#ffffff0f;--color-input-bg:#1a1a1e}[data-theme=light]{--color-primary:#63e;--color-success:#16a34a;--color-danger:#dc2626;--color-text-primary:#212529;--color-text-secondary:#5b5b5b;--color-border-primary:#e0e0df;--color-background-page:linear-gradient(150deg, #f0f0f0 0%, #ede8ff 100%);--color-card-bg:#ffffffc7;--color-card-border:#fff9;--color-input-bg:#fff}html,body{min-height:100dvh;margin:0}body{color:var(--color-text-primary);background:var(--color-background-page);font-family:Poppins,system-ui,-apple-system,sans-serif;transition:background .2s,color .2s}main.svelte-1n46o8q{justify-content:center;align-items:center;min-height:100dvh;padding:1.5rem;display:flex;position:relative}.theme-toggle.svelte-1n46o8q{border:1px solid var(--color-border-primary);background:var(--color-card-bg);width:36px;height:36px;color:var(--color-text-primary);cursor:pointer;border-radius:50%;justify-content:center;align-items:center;transition:all .15s;display:flex;position:absolute;top:1.25rem;right:1.25rem}.theme-toggle.svelte-1n46o8q:hover{opacity:.8}.theme-toggle.svelte-1n46o8q svg:where(.svelte-1n46o8q){width:16px;height:16px}.card.svelte-1n46o8q{background:var(--color-card-bg);border:1px solid var(--color-card-border);text-align:center;border-radius:1rem;width:100%;max-width:380px;padding:2.5rem 2rem;box-shadow:0 10px 20px #0003}.logo.svelte-1n46o8q{width:48px;height:48px;color:var(--color-text-primary);margin:0 auto 1.25rem}.logo.svelte-1n46o8q svg:where(.svelte-1n46o8q){width:100%;height:100%}h1.svelte-1n46o8q{margin-bottom:.5rem;font-size:1.25rem;font-weight:600}.subtitle.svelte-1n46o8q{color:var(--color-text-secondary);margin-bottom:1.5rem;font-size:.875rem}form.svelte-1n46o8q{flex-direction:column;gap:.75rem;display:flex}input.svelte-1n46o8q{box-sizing:border-box;border:1px solid var(--color-border-primary);background:var(--color-input-bg);width:100%;color:inherit;border-radius:.75rem;padding:.65rem .85rem;font-family:inherit;font-size:.925rem;transition:all .15s}input.svelte-1n46o8q:focus{border-color:var(--color-primary);outline:none}button[type=submit].svelte-1n46o8q{background:var(--color-primary);color:#fff;cursor:pointer;border:none;border-radius:.75rem;padding:.65rem 1rem;font-family:inherit;font-size:.925rem;font-weight:500;transition:all .15s}button[type=submit].svelte-1n46o8q:hover:not(:disabled){opacity:.85}button[type=submit].svelte-1n46o8q:disabled{opacity:.4;cursor:not-allowed}.success.svelte-1n46o8q{color:var(--color-success);font-size:.925rem}.error.svelte-1n46o8q{color:var(--color-danger);margin-top:.75rem;font-size:.875rem}.help-links.svelte-1n46o8q{border-top:1px solid var(--color-border-primary);flex-direction:column;gap:.5rem;margin-top:1.5rem;padding-top:1.25rem;display:flex}.help-button.svelte-1n46o8q{border:1px solid var(--color-primary);color:var(--color-primary);border-radius:.75rem;justify-content:center;align-items:center;padding:.5rem .85rem;font-size:.85rem;font-weight:500;text-decoration:none;transition:all .15s;display:inline-flex}.help-button.svelte-1n46o8q:hover{background:var(--color-primary);color:#fff}.docs-link.svelte-1n46o8q{color:var(--color-text-secondary);font-size:.8rem;text-decoration:underline}
@@ -1 +0,0 @@
1
- (function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var e=Array.isArray,t=Array.prototype.indexOf,n=Array.prototype.includes,r=Array.from,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyDescriptors,s=Object.prototype,c=Array.prototype,l=Object.getPrototypeOf,u=Object.isExtensible,d=()=>{};function f(e){return e()}function p(e){for(var t=0;t<e.length;t++)e[t]()}function m(){var e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}var h=1024,g=2048,_=4096,ee=8192,te=16384,ne=32768,re=1<<25,ie=65536,ae=1<<19,oe=1<<20,se=65536,ce=1<<21,le=1<<22,ue=1<<23,de=Symbol(`$state`),fe=Symbol(``),pe=Symbol(`attributes`),me=Symbol(`class`),he=Symbol(`style`),ge=Symbol(`text`),_e=Symbol(`form reset`),ve=new class extends Error{name=`StaleReactionError`;message="The reaction that called `getAbortSignal()` was re-run or destroyed"},ye=!!globalThis.document?.contentType&&globalThis.document.contentType.includes(`xml`);function be(e){throw Error(`https://svelte.dev/e/lifecycle_outside_component`)}function xe(){throw Error(`https://svelte.dev/e/async_derived_orphan`)}function Se(e){throw Error(`https://svelte.dev/e/effect_in_teardown`)}function Ce(){throw Error(`https://svelte.dev/e/effect_in_unowned_derived`)}function we(e){throw Error(`https://svelte.dev/e/effect_orphan`)}function Te(){throw Error(`https://svelte.dev/e/effect_update_depth_exceeded`)}function Ee(){throw Error(`https://svelte.dev/e/state_descriptors_fixed`)}function De(){throw Error(`https://svelte.dev/e/state_prototype_fixed`)}function Oe(){throw Error(`https://svelte.dev/e/state_unsafe_mutation`)}function ke(){throw Error(`https://svelte.dev/e/svelte_boundary_reset_onerror`)}var Ae={},v=Symbol(`uninitialized`),je=`http://www.w3.org/1999/xhtml`;function Me(){console.warn(`https://svelte.dev/e/derived_inert`)}function Ne(e){console.warn(`https://svelte.dev/e/hydration_mismatch`)}function Pe(){console.warn(`https://svelte.dev/e/svelte_boundary_reset_noop`)}var y=!1;function Fe(e){y=e}var b;function x(e){if(e===null)throw Ne(),Ae;return b=e}function Ie(){return x(L(b))}function S(e){if(y){if(L(b)!==null)throw Ne(),Ae;b=e}}function Le(e=1){if(y){for(var t=e,n=b;t--;)n=L(n);b=n}}function Re(e=!0){for(var t=0,n=b;;){if(n.nodeType===8){var r=n.data;if(r===`]`){if(t===0)return n;--t}else(r===`[`||r===`[!`||r[0]===`[`&&!isNaN(Number(r.slice(1))))&&(t+=1)}var i=L(n);e&&n.remove(),n=i}}function ze(e){if(!e||e.nodeType!==8)throw Ne(),Ae;return e.data}function Be(e){return e===this.v}function Ve(e,t){return e==e?e!==t||typeof e==`object`&&!!e||typeof e==`function`:t==t}function He(e){return!Ve(e,this.v)}var C=!1,Ue=!1;function We(){Ue=!0}var w=null;function Ge(e){w=e}function Ke(e,t=!1,n){w={p:w,i:!1,c:null,e:null,s:e,x:null,r:q,l:Ue&&!t?{s:null,u:null,$:[]}:null}}function qe(e){var t=w,n=t.e;if(n!==null){t.e=null;for(var r of n)pn(r)}return e!==void 0&&(t.x=e),t.i=!0,w=t.p,e??{}}function Je(){return!Ue||w!==null&&w.l===null}var T=[];function Ye(){var e=T;T=[],p(e)}function E(e){if(T.length===0&&!wt){var t=T;queueMicrotask(()=>{t===T&&Ye()})}T.push(e)}function Xe(){for(;T.length>0;)Ye()}function Ze(e){var t=q;if(t===null)return W.f|=ue,e;if(!(t.f&32768)&&!(t.f&4))throw e;D(e,t)}function D(e,t){if(!(t!==null&&t.f&16384)){for(;t!==null;){if(t.f&128){if(!(t.f&32768))throw e;try{t.b.error(e);return}catch(t){e=t}}t=t.parent}throw e}}var Qe=~(g|_|h);function O(e,t){e.f=e.f&Qe|t}function $e(e){e.f&512||e.deps===null?O(e,h):O(e,_)}function et(e){if(e!==null)for(let t of e)!(t.f&2)||!(t.f&65536)||(t.f^=se,et(t.deps))}function tt(e,t,n){e.f&2048?t.add(e):e.f&4096&&n.add(e),et(e.deps),O(e,h)}var nt=!1;function rt(e){let t=0,n=Vt(0),r;return()=>{un()&&($(n),_n(()=>(t===0&&(r=Yn(()=>e(()=>Gt(n)))),t+=1,()=>{E(()=>{--t,t===0&&(r?.(),r=void 0,Gt(n))})})))}}var it=ie|ae;function at(e,t,n,r){new ot(e,t,n,r)}var ot=class{parent;is_pending=!1;transform_error;#e;#t=y?b:null;#n;#r;#i;#a=null;#o=null;#s=null;#c=null;#l=0;#u=0;#d=!1;#f=new Set;#p=new Set;#m=null;#h=rt(()=>(this.#m=Vt(this.#l),()=>{this.#m=null}));constructor(e,t,n,r){this.#e=e,this.#n=t,this.#r=e=>{var t=q;t.b=this,t.f|=128,n(e)},this.parent=q.b,this.transform_error=r??this.parent?.transform_error??(e=>e),this.#i=yn(()=>{if(y){let e=this.#t;Ie();let t=e.data===`[!`;if(e.data.startsWith(`[?`)){let t=JSON.parse(e.data.slice(2));this.#_(t)}else t?this.#v():this.#g()}else this.#y()},it),y&&(this.#e=b)}#g(){try{this.#a=V(()=>this.#r(this.#e))}catch(e){this.error(e)}}#_(e){let t=this.#n.failed;t&&(this.#s=V(()=>{t(this.#e,()=>e,()=>()=>{})}))}#v(){let e=this.#n.pending;e&&(this.is_pending=!0,this.#o=V(()=>e(this.#e)),E(()=>{var e=this.#c=document.createDocumentFragment(),t=F();e.append(t),this.#a=this.#x(()=>V(()=>this.#r(t))),this.#u===0&&(this.#e.before(e),this.#c=null,Tn(this.#o,()=>{this.#o=null}),this.#b(k))}))}#y(){try{if(this.is_pending=this.has_pending_snippet(),this.#u=0,this.#l=0,this.#a=V(()=>{this.#r(this.#e)}),this.#u>0){var e=this.#c=document.createDocumentFragment();kn(this.#a,e);let t=this.#n.pending;this.#o=V(()=>t(this.#e))}else this.#b(k)}catch(e){this.error(e)}}#b(e){this.is_pending=!1,e.transfer_effects(this.#f,this.#p)}defer_effect(e){tt(e,this.#f,this.#p)}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!this.#n.pending}#x(e){var t=q,n=W,r=w;J(this.#i),K(this.#i),Ge(this.#i.ctx);try{return At.ensure(),e()}catch(e){return Ze(e),null}finally{J(t),K(n),Ge(r)}}#S(e,t){if(!this.has_pending_snippet()){this.parent&&this.parent.#S(e,t);return}this.#u+=e,this.#u===0&&(this.#b(t),this.#o&&Tn(this.#o,()=>{this.#o=null}),this.#c&&=(this.#e.before(this.#c),null))}update_pending_count(e,t){this.#S(e,t),this.#l+=e,!(!this.#m||this.#d)&&(this.#d=!0,E(()=>{this.#d=!1,this.#m&&Ut(this.#m,this.#l)}))}get_effect_pending(){return this.#h(),$(this.#m)}error(e){if(!this.#n.onerror&&!this.#n.failed)throw e;k?.is_fork?(this.#a&&k.skip_effect(this.#a),this.#o&&k.skip_effect(this.#o),this.#s&&k.skip_effect(this.#s),k.oncommit(()=>{this.#C(e)})):this.#C(e)}#C(e){this.#a&&=(H(this.#a),null),this.#o&&=(H(this.#o),null),this.#s&&=(H(this.#s),null),y&&(x(this.#t),Le(),x(Re()));var t=this.#n.onerror;let n=this.#n.failed;var r=!1,i=!1;let a=()=>{if(r){Pe();return}r=!0,i&&ke(),this.#s!==null&&Tn(this.#s,()=>{this.#s=null}),this.#x(()=>{this.#y()})},o=e=>{try{i=!0,t?.(e,a),i=!1}catch(e){D(e,this.#i&&this.#i.parent)}n&&(this.#s=this.#x(()=>{try{return V(()=>{var t=q;t.b=this,t.f|=128,n(this.#e,()=>e,()=>a)})}catch(e){return D(e,this.#i.parent),null}}))};E(()=>{var t;try{t=this.transform_error(e)}catch(e){D(e,this.#i&&this.#i.parent);return}typeof t==`object`&&t&&typeof t.then==`function`?t.then(o,e=>D(e,this.#i&&this.#i.parent)):o(t)})}};function st(e,t,n,r){let i=Je()?dt:mt;var a=e.filter(e=>!e.settled),o=t.map(i);if(n.length===0&&a.length===0){r(o);return}var s=q,c=ct(),l=a.length===1?a[0].promise:a.length>1?Promise.all(a.map(e=>e.promise)):null;function u(e){if(!(s.f&16384)){c();try{r([...o,...e])}catch(e){D(e,s)}lt()}}var d=ut();if(n.length===0){l.then(()=>u([])).finally(d);return}function f(){Promise.all(n.map(e=>pt(e))).then(u).catch(e=>D(e,s)).finally(d)}l?l.then(()=>{c(),f(),lt()}):f()}function ct(){var e=q,t=W,n=w,r=k;return function(i=!0){J(e),K(t),Ge(n),i&&!(e.f&16384)&&(r?.activate(),r?.apply())}}function lt(e=!0){J(null),K(null),Ge(null),e&&k?.deactivate()}function ut(){var e=q,t=e.b,n=k,r=!!t?.is_rendered();return t?.update_pending_count(1,n),n.increment(r,e),()=>{t?.update_pending_count(-1,n),n.decrement(r,e)}}function dt(e){var t=2|g;return q!==null&&(q.f|=ae),{ctx:w,deps:null,effects:null,equals:Be,f:t,fn:e,reactions:null,rv:0,v,wv:0,parent:q,ac:null}}var ft=Symbol(`obsolete`);function pt(e,t,n){let r=q;r===null&&xe();var i=void 0,a=Vt(v),o=!W,s=new Set;return gn(()=>{var t=q,n=m();i=n.promise;try{Promise.resolve(e()).then(n.resolve,e=>{e!==ve&&n.reject(e)}).finally(lt)}catch(e){n.reject(e),lt()}var c=k;if(o){if(t.f&32768)var l=ut();if(r.b?.is_rendered())c.async_deriveds.get(t)?.reject(ft);else for(let e of s.values())e.reject(ft);s.add(n),c.async_deriveds.set(t,n)}let u=(e,t=void 0)=>{l?.(),s.delete(n),t!==ft&&(c.activate(),t?(a.f|=ue,Ut(a,t)):(a.f&8388608&&(a.f^=ue),Ut(a,e)),c.deactivate())};n.promise.then(u,e=>u(null,e||`unknown`))}),dn(()=>{for(let e of s)e.reject(ft)}),new Promise(e=>{function t(n){function r(){n===i?e(a):t(i)}n.then(r,r)}t(i)})}function mt(e){let t=dt(e);return t.equals=He,t}function ht(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)H(t[n])}}function gt(e){var t,n=q,r=e.parent;if(!U&&r!==null&&e.v!==v&&r.f&24576)return Me(),e.v;J(r);try{e.f&=~se,ht(e),t=Hn(e)}finally{J(n)}return t}function _t(e){var t=gt(e);if(!e.equals(t)&&(e.wv=zn(),(!k?.is_fork||e.deps===null)&&(k===null?e.v=t:(k.capture(e,t,!0),St?.capture(e,t,!0)),e.deps===null))){O(e,h);return}U||(A===null?$e(e):(un()||k?.is_fork)&&A.set(e,t))}function vt(e){if(e.effects!==null)for(let t of e.effects)(t.teardown||t.ac)&&(t.teardown?.(),t.ac?.abort(ve),t.fn!==null&&(t.teardown=d),t.ac=null,Wn(t,0),xn(t))}function yt(e){if(e.effects!==null)for(let t of e.effects)t.teardown&&t.fn!==null&&Gn(t)}var bt=null,xt=null,k=null,St=null,A=null,Ct=null,wt=!1,Tt=!1,Et=null,Dt=null,Ot=0,kt=1,At=class e{id=kt++;#e=!1;linked=!0;#t=null;#n=null;async_deriveds=new Map;current=new Map;previous=new Map;#r=new Set;#i=new Set;#a=0;#o=new Map;#s=null;#c=[];#l=[];#u=new Set;#d=new Set;#f=new Map;#p=new Set;is_fork=!1;#m=!1;constructor(){xt===null?bt=xt=this:(xt.#n=this,this.#t=xt),xt=this}#h(){if(this.is_fork)return!0;for(let n of this.#o.keys()){for(var e=n,t=!1;e.parent!==null;){if(this.#f.has(e)){t=!0;break}e=e.parent}if(!t)return!0}return!1}skip_effect(e){this.#f.has(e)||this.#f.set(e,{d:[],m:[]}),this.#p.delete(e)}unskip_effect(e,t=e=>this.schedule(e)){var n=this.#f.get(e);if(n){this.#f.delete(e);for(var r of n.d)O(r,g),t(r);for(r of n.m)O(r,_),t(r)}this.#p.add(e)}#g(){this.#e=!0,Ot++>1e3&&(this.#S(),Mt());for(let e of this.#u)this.#d.delete(e),O(e,g),this.schedule(e);for(let e of this.#d)O(e,_),this.schedule(e);let t=this.#c;this.#c=[],this.apply();var n=Et=[],r=[],i=Dt=[];for(let e of t)try{this.#_(e,n,r)}catch(t){throw Rt(e),this.#h()||this.discard(),t}if(k=null,i.length>0){var a=e.ensure();for(let e of i)a.schedule(e)}if(Et=null,Dt=null,this.#h()){this.#b(r),this.#b(n);for(let[e,t]of this.#f)Lt(e,t);i.length>0&&k.#g();return}let o=this.#v();if(o){this.#b(r),this.#b(n),o.#y(this);return}this.#u.clear(),this.#d.clear();for(let e of this.#r)e(this);this.#r.clear(),St=this,Nt(r),Nt(n),St=null,this.#s?.resolve();var s=k;if(this.#a===0&&(this.#c.length===0||s!==null)&&(this.#S(),C&&(this.#x(),k=s)),this.#c.length>0)if(s!==null){let e=s;e.#c.push(...this.#c.filter(t=>!e.#c.includes(t)))}else s=this;s!==null&&s.#g()}#_(e,t,n){e.f^=h;for(var r=e.first;r!==null;){var i=r.f,a=(i&96)!=0;if(!(a&&i&1024||i&8192||this.#f.has(r))&&r.fn!==null){a?r.f^=h:i&4?t.push(r):C&&i&16777224?n.push(r):Bn(r)&&(i&16&&this.#d.add(r),Gn(r));var o=r.first;if(o!==null){r=o;continue}}for(;r!==null;){var s=r.next;if(s!==null){r=s;break}r=r.parent}}}#v(){for(var e=this.#t;e!==null;){if(!e.is_fork){for(let[t,[,n]]of this.current)if(e.current.has(t)&&!n)return e}e=e.#t}return null}#y(e){for(let[t,n]of e.current)!this.previous.has(t)&&e.previous.has(t)&&this.previous.set(t,e.previous.get(t)),this.current.set(t,n);for(let[t,n]of e.async_deriveds){let e=this.async_deriveds.get(t);e&&n.promise.then(e.resolve).catch(e.reject)}e.async_deriveds.clear(),this.transfer_effects(e.#u,e.#d);let t=e=>{var n=e.reactions;if(n!==null)for(let e of n){var r=e.f;if(r&2)t(e);else{var i=e;r&4194320&&!this.async_deriveds.has(i)&&(this.#d.delete(i),O(i,g),this.schedule(i))}}};for(let e of this.current.keys())t(e);this.oncommit(()=>e.discard()),e.#S(),k=this,this.#g()}#b(e){for(var t=0;t<e.length;t+=1)tt(e[t],this.#u,this.#d)}capture(e,t,n=!1){e.v!==v&&!this.previous.has(e)&&this.previous.set(e,e.v),e.f&8388608||(this.current.set(e,[t,n]),A?.set(e,t)),this.is_fork||(e.v=t)}activate(){k=this}deactivate(){k=null,A=null}flush(){try{Tt=!0,k=this,this.#g()}finally{Ot=0,Ct=null,Et=null,Dt=null,Tt=!1,k=null,A=null,M.clear()}}discard(){for(let e of this.#i)e(this);this.#i.clear();for(let e of this.async_deriveds.values())e.reject(ft);this.#S(),this.#s?.resolve()}register_created_effect(e){this.#l.push(e)}#x(){for(let u=bt;u!==null;u=u.#n){var e=u.id<this.id,t=[];for(let[r,[i,a]]of this.current){if(u.current.has(r)){var n=u.current.get(r)[0];if(e&&i!==n)u.current.set(r,[i,a]);else continue}t.push(r)}if(e)for(let[e,t]of this.async_deriveds){let n=u.async_deriveds.get(e);n&&t.promise.then(n.resolve).catch(n.reject)}var r=[...u.current.keys()].filter(e=>!u.current.get(e)[1]);if(!(!u.#e||r.length===0)){var i=r.filter(e=>!this.current.has(e));if(i.length===0)e&&u.discard();else if(t.length>0){if(e)for(let e of this.#p)u.unskip_effect(e,e=>{e.f&4194320?u.schedule(e):u.#b([e])});u.activate();var a=new Set,o=new Map;for(var s of t)Pt(s,i,a,o);o=new Map;var c=[...u.current].filter(([e,t])=>{let n=this.current.get(e);return n?n[0]!==t[0]||n[1]!==t[1]:!0}).map(([e])=>e);if(c.length>0)for(let e of this.#l)!(e.f&155648)&&Ft(e,c,o)&&(e.f&4194320?(O(e,g),u.schedule(e)):u.#u.add(e));if(u.#c.length>0&&!u.#m){u.apply();for(var l of u.#c)u.#_(l,[],[]);u.#c=[]}u.deactivate()}}}}increment(e,t){if(this.#a+=1,e){let e=this.#o.get(t)??0;this.#o.set(t,e+1)}}decrement(e,t){if(--this.#a,e){let e=this.#o.get(t)??0;e===1?this.#o.delete(t):this.#o.set(t,e-1)}this.#m||(this.#m=!0,E(()=>{this.#m=!1,this.linked&&this.flush()}))}transfer_effects(e,t){for(let t of e)this.#u.add(t);for(let e of t)this.#d.add(e);e.clear(),t.clear()}oncommit(e){this.#r.add(e)}ondiscard(e){this.#i.add(e)}settled(){return(this.#s??=m()).promise}static ensure(){if(k===null){let t=k=new e;!Tt&&!wt&&E(()=>{t.#e||t.flush()})}return k}apply(){if(!C||!this.is_fork&&this.#t===null&&this.#n===null){A=null;return}A=new Map;for(let[e,[t]]of this.current)A.set(e,t);for(let t=bt;t!==null;t=t.#n)if(!(t===this||t.is_fork)){var e=!1;if(t.id<this.id){for(let[n,[,r]]of t.current)if(!r&&this.current.has(n)){e=!0;break}}if(!e)for(let[e,n]of t.previous)A.has(e)||A.set(e,n)}}schedule(e){if(Ct=e,e.b?.is_pending&&e.f&16777228&&!(e.f&32768)){e.b.defer_effect(e);return}for(var t=e;t.parent!==null;){t=t.parent;var n=t.f;if(Et!==null&&t===q&&(C||(W===null||!(W.f&2))&&!nt))return;if(n&96){if(!(n&1024))return;t.f^=h}}this.#c.push(t)}#S(){if(this.linked){var e=this.#t,t=this.#n;e===null?bt=t:e.#n=t,t===null?xt=e:t.#t=e,this.linked=!1}}};function jt(e){var t=wt;wt=!0;try{var n;for(e&&(k!==null&&!k.is_fork&&k.flush(),n=e());;){if(Xe(),k===null)return n;k.flush()}}finally{wt=t}}function Mt(){try{Te()}catch(e){D(e,Ct)}}var j=null;function Nt(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if(!(r.f&24576)&&Bn(r)&&(j=new Set,Gn(r),r.deps===null&&r.first===null&&r.nodes===null&&r.teardown===null&&r.ac===null&&wn(r),j?.size>0)){M.clear();for(let e of j){if(e.f&24576)continue;let t=[e],n=e.parent;for(;n!==null;)j.has(n)&&(j.delete(n),t.push(n)),n=n.parent;for(let e=t.length-1;e>=0;e--){let n=t[e];n.f&24576||Gn(n)}}j.clear()}}j=null}}function Pt(e,t,n,r){if(!n.has(e)&&(n.add(e),e.reactions!==null))for(let i of e.reactions){let e=i.f;e&2?Pt(i,t,n,r):e&4194320&&!(e&2048)&&Ft(i,t,r)&&(O(i,g),It(i))}}function Ft(e,t,r){let i=r.get(e);if(i!==void 0)return i;if(e.deps!==null)for(let i of e.deps){if(n.call(t,i))return!0;if(i.f&2&&Ft(i,t,r))return r.set(i,!0),!0}return r.set(e,!1),!1}function It(e){k.schedule(e)}function Lt(e,t){if(!(e.f&32&&e.f&1024)){e.f&2048?t.d.push(e):e.f&4096&&t.m.push(e),O(e,h);for(var n=e.first;n!==null;)Lt(n,t),n=n.next}}function Rt(e){O(e,h);for(var t=e.first;t!==null;)Rt(t),t=t.next}var zt=new Set,M=new Map,Bt=!1;function Vt(e,t){return{f:0,v:e,reactions:null,equals:Be,rv:0,wv:0}}function N(e,t){let n=Vt(e,t);return Nn(n),n}function Ht(e,t=!1,n=!0){let r=Vt(e);return t||(r.equals=He),Ue&&n&&w!==null&&w.l!==null&&(w.l.s??=[]).push(r),r}function P(e,t,n=!1){return W!==null&&(!G||W.f&131072)&&Je()&&W.f&4325394&&(Y===null||!Y.has(e))&&Oe(),Ut(e,n?qt(t):t,Dt)}function Ut(e,t,n=null){if(!e.equals(t)){M.set(e,U?t:e.v);var r=At.ensure();if(r.capture(e,t),e.f&2){let t=e;e.f&2048&&gt(t),A===null&&$e(t)}e.wv=zn(),Kt(e,g,n),Je()&&q!==null&&q.f&1024&&!(q.f&96)&&(Q===null?Pn([e]):Q.push(e)),!r.is_fork&&zt.size>0&&!Bt&&Wt()}return t}function Wt(){Bt=!1;for(let e of zt){e.f&1024&&O(e,_);let t;try{t=Bn(e)}catch{t=!0}t&&Gn(e)}zt.clear()}function Gt(e){P(e,e.v+1)}function Kt(e,t,n){var r=e.reactions;if(r!==null)for(var i=Je(),a=r.length,o=0;o<a;o++){var s=r[o],c=s.f;if(!(!i&&s===q)){var l=(c&g)===0;if(l&&O(s,t),c&131072)zt.add(s);else if(c&2){var u=s;A?.delete(u),c&65536||(c&512&&(q===null||!(q.f&2097152))&&(s.f|=se),Kt(u,_,n))}else if(l){var d=s;c&16&&j!==null&&j.add(d),n===null?It(d):n.push(d)}}}}function qt(t){if(typeof t!=`object`||!t||de in t)return t;let n=l(t);if(n!==s&&n!==c)return t;var r=new Map,i=e(t),o=N(0),u=null,d=Ln,f=e=>{if(Ln===d)return e();var t=W,n=Ln;K(null),Rn(d);var r=e();return K(t),Rn(n),r};return i&&r.set(`length`,N(t.length,u)),new Proxy(t,{defineProperty(e,t,n){(!(`value`in n)||n.configurable===!1||n.enumerable===!1||n.writable===!1)&&Ee();var i=r.get(t);return i===void 0?f(()=>{var e=N(n.value,u);return r.set(t,e),e}):P(i,n.value,!0),!0},deleteProperty(e,t){var n=r.get(t);if(n===void 0){if(t in e){let e=f(()=>N(v,u));r.set(t,e),Gt(o)}}else P(n,v),Gt(o);return!0},get(e,n,i){if(n===de)return t;var o=r.get(n),s=n in e;if(o===void 0&&(!s||a(e,n)?.writable)&&(o=f(()=>N(qt(s?e[n]:v),u)),r.set(n,o)),o!==void 0){var c=$(o);return c===v?void 0:c}return Reflect.get(e,n,i)},getOwnPropertyDescriptor(e,t){var n=Reflect.getOwnPropertyDescriptor(e,t);if(n&&`value`in n){var i=r.get(t);i&&(n.value=$(i))}else if(n===void 0){var a=r.get(t),o=a?.v;if(a!==void 0&&o!==v)return{enumerable:!0,configurable:!0,value:o,writable:!0}}return n},has(e,t){if(t===de)return!0;var n=r.get(t),i=n!==void 0&&n.v!==v||Reflect.has(e,t);return(n!==void 0||q!==null&&(!i||a(e,t)?.writable))&&(n===void 0&&(n=f(()=>N(i?qt(e[t]):v,u)),r.set(t,n)),$(n)===v)?!1:i},set(e,t,n,s){var c=r.get(t),l=t in e;if(i&&t===`length`)for(var d=n;d<c.v;d+=1){var p=r.get(d+``);p===void 0?d in e&&(p=f(()=>N(v,u)),r.set(d+``,p)):P(p,v)}if(c===void 0)(!l||a(e,t)?.writable)&&(c=f(()=>N(void 0,u)),P(c,qt(n)),r.set(t,c));else{l=c.v!==v;var m=f(()=>qt(n));P(c,m)}var h=Reflect.getOwnPropertyDescriptor(e,t);if(h?.set&&h.set.call(s,n),!l){if(i&&typeof t==`string`){var g=r.get(`length`),_=Number(t);Number.isInteger(_)&&_>=g.v&&P(g,_+1)}Gt(o)}return!0},ownKeys(e){$(o);var t=Reflect.ownKeys(e).filter(e=>{var t=r.get(e);return t===void 0||t.v!==v});for(var[n,i]of r)i.v!==v&&!(n in e)&&t.push(n);return t},setPrototypeOf(){De()}})}var Jt,Yt,Xt,Zt;function Qt(){if(Jt===void 0){Jt=window,Yt=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;Xt=a(t,`firstChild`).get,Zt=a(t,`nextSibling`).get,u(e)&&(e[me]=void 0,e[pe]=null,e[he]=void 0,e.__e=void 0),u(n)&&(n[ge]=void 0)}}function F(e=``){return document.createTextNode(e)}function I(e){return Xt.call(e)}function L(e){return Zt.call(e)}function R(e,t){if(!y)return I(e);var n=I(b);if(n===null)n=b.appendChild(F());else if(t&&n.nodeType!==3){var r=F();return n?.before(r),x(r),r}return t&&nn(n),x(n),n}function $t(e,t=!1){if(!y){var n=I(e);return n instanceof Comment&&n.data===``?L(n):n}if(t){if(b?.nodeType!==3){var r=F();return b?.before(r),x(r),r}nn(b)}return b}function z(e,t=1,n=!1){let r=y?b:e;for(var i;t--;)i=r,r=L(r);if(!y)return r;if(n){if(r?.nodeType!==3){var a=F();return r===null?i?.after(a):r.before(a),x(a),a}nn(r)}return x(r),r}function en(){return!C||j!==null?!1:(q.f&ne)!==0}function tn(e,t,n){return t==null||t===`http://www.w3.org/1999/xhtml`?n?document.createElement(e,{is:n}):document.createElement(e):n?document.createElementNS(t,e,{is:n}):document.createElementNS(t,e)}function nn(e){if(e.nodeValue.length<65536)return;let t=e.nextSibling;for(;t!==null&&t.nodeType===3;)t.remove(),e.nodeValue+=t.nodeValue,t=e.nextSibling}var rn=!1;function an(){rn||(rn=!0,document.addEventListener(`reset`,e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(let t of e.target.elements)t[_e]?.()})},{capture:!0}))}function on(e){var t=W,n=q;K(null),J(null);try{return e()}finally{K(t),J(n)}}function sn(e,t,n,r=n){e.addEventListener(t,()=>on(n));let i=e[_e];i?e[_e]=()=>{i(),r(!0)}:e[_e]=()=>r(!0),an()}function cn(e){q===null&&(W===null&&we(e),Ce()),U&&Se(e)}function ln(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function B(e,t){var n=q;n!==null&&n.f&8192&&(e|=ee);var r={ctx:w,deps:null,nodes:null,f:e|g|512,first:null,fn:t,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,wv:0,ac:null};k?.register_created_effect(r);var i=r;if(e&4)Et===null?At.ensure().schedule(r):Et.push(r);else if(t!==null){try{Gn(r)}catch(e){throw H(r),e}i.deps===null&&i.teardown===null&&i.nodes===null&&i.first===i.last&&!(i.f&524288)&&(i=i.first,e&16&&e&65536&&i!==null&&(i.f|=ie))}if(i!==null&&(i.parent=n,n!==null&&ln(i,n),W!==null&&W.f&2&&!(e&64))){var a=W;(a.effects??=[]).push(i)}return r}function un(){return W!==null&&!G}function dn(e){let t=B(8,null);return O(t,h),t.teardown=e,t}function fn(e){cn(`$effect`);var t=q.f;if(!W&&t&32&&w!==null&&!w.i){var n=w;(n.e??=[]).push(e)}else return pn(e)}function pn(e){return B(4|oe,e)}function mn(e){return cn(`$effect.pre`),B(8|oe,e)}function hn(e){At.ensure();let t=B(64|ae,e);return(e={})=>new Promise(n=>{e.outro?Tn(t,()=>{H(t),n(void 0)}):(H(t),n(void 0))})}function gn(e){return B(le|ae,e)}function _n(e,t=0){return B(8|t,e)}function vn(e,t=[],n=[],r=[]){st(r,t,n,t=>{B(8,()=>{e(...t.map($))})})}function yn(e,t=0){return B(16|t,e)}function V(e){return B(32|ae,e)}function bn(e){var t=e.teardown;if(t!==null){let e=U,n=W;Mn(!0),K(null);try{t.call(null)}finally{Mn(e),K(n)}}}function xn(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){let e=n.ac;e!==null&&on(()=>{e.abort(ve)});var r=n.next;n.f&64?n.parent=null:H(n,t),n=r}}function Sn(e){for(var t=e.first;t!==null;){var n=t.next;t.f&32||H(t),t=n}}function H(e,t=!0){var n=!1;(t||e.f&262144)&&e.nodes!==null&&e.nodes.end!==null&&(Cn(e.nodes.start,e.nodes.end),n=!0),e.f|=re,xn(e,t&&!n),Wn(e,0);var r=e.nodes&&e.nodes.t;if(r!==null)for(let e of r)e.stop();bn(e),e.f^=re,e.f|=te;var i=e.parent;i!==null&&i.first!==null&&wn(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function Cn(e,t){for(;e!==null;){var n=e===t?null:L(e);e.remove(),e=n}}function wn(e){var t=e.parent,n=e.prev,r=e.next;n!==null&&(n.next=r),r!==null&&(r.prev=n),t!==null&&(t.first===e&&(t.first=r),t.last===e&&(t.last=n))}function Tn(e,t,n=!0){var r=[];En(e,r,!0);var i=()=>{n&&H(e),t&&t()},a=r.length;if(a>0){var o=()=>--a||i();for(var s of r)s.out(o)}else i()}function En(e,t,n){if(!(e.f&8192)){e.f^=ee;var r=e.nodes&&e.nodes.t;if(r!==null)for(let e of r)(e.is_global||n)&&t.push(e);for(var i=e.first;i!==null;){var a=i.next;if(!(i.f&64)){var o=(i.f&65536)!=0||(i.f&32)!=0&&(e.f&16)!=0;En(i,t,o?n:!1)}i=a}}}function Dn(e){On(e,!0)}function On(e,t){if(e.f&8192){e.f^=ee,e.f&1024||(O(e,g),At.ensure().schedule(e));for(var n=e.first;n!==null;){var r=n.next,i=(n.f&65536)!=0||(n.f&32)!=0;On(n,i?t:!1),n=r}var a=e.nodes&&e.nodes.t;if(a!==null)for(let e of a)(e.is_global||t)&&e.in()}}function kn(e,t){if(e.nodes)for(var n=e.nodes.start,r=e.nodes.end;n!==null;){var i=n===r?null:L(n);t.append(n),n=i}}var An=null,jn=!1,U=!1;function Mn(e){U=e}var W=null,G=!1;function K(e){W=e}var q=null;function J(e){q=e}var Y=null;function Nn(e){W!==null&&(!C||W.f&2)&&(Y??=new Set).add(e)}var X=null,Z=0,Q=null;function Pn(e){Q=e}var Fn=1,In=0,Ln=In;function Rn(e){Ln=e}function zn(){return++Fn}function Bn(e){var t=e.f;if(t&2048)return!0;if(t&2&&(e.f&=~se),t&4096){for(var n=e.deps,r=n.length,i=0;i<r;i++){var a=n[i];if(Bn(a)&&_t(a),a.wv>e.wv)return!0}t&512&&A===null&&O(e,h)}return!1}function Vn(e,t,n=!0){var r=e.reactions;if(r!==null&&!(!C&&Y!==null&&Y.has(e)))for(var i=0;i<r.length;i++){var a=r[i];a.f&2?Vn(a,t,!1):t===a&&(n?O(a,g):a.f&1024&&O(a,_),It(a))}}function Hn(e){var t=X,n=Z,r=Q,i=W,a=Y,o=w,s=G,c=Ln,l=e.f;X=null,Z=0,Q=null,W=l&96?null:e,Y=null,Ge(e.ctx),G=!1,Ln=++In,e.ac!==null&&(on(()=>{e.ac.abort(ve)}),e.ac=null);try{e.f|=ce;var u=e.fn,d=u();e.f|=ne;var f=e.deps,p=k?.is_fork;if(X!==null){var m;if(p||Wn(e,Z),f!==null&&Z>0)for(f.length=Z+X.length,m=0;m<X.length;m++)f[Z+m]=X[m];else e.deps=f=X;if(un()&&e.f&512)for(m=Z;m<f.length;m++)(f[m].reactions??=[]).push(e)}else!p&&f!==null&&Z<f.length&&(Wn(e,Z),f.length=Z);if(Je()&&Q!==null&&!G&&f!==null&&!(e.f&6146))for(m=0;m<Q.length;m++)Vn(Q[m],e);if(i!==null&&i!==e){if(In++,i.deps!==null)for(let e=0;e<n;e+=1)i.deps[e].rv=In;if(t!==null)for(let e of t)e.rv=In;Q!==null&&(r===null?r=Q:r.push(...Q))}return e.f&8388608&&(e.f^=ue),d}catch(e){return Ze(e)}finally{e.f^=ce,X=t,Z=n,Q=r,W=i,Y=a,Ge(o),G=s,Ln=c}}function Un(e,r){let i=r.reactions;if(i!==null){var a=t.call(i,e);if(a!==-1){var o=i.length-1;o===0?i=r.reactions=null:(i[a]=i[o],i.pop())}}if(i===null&&r.f&2&&(X===null||!n.call(X,r))){var s=r;s.f&512&&(s.f^=512,s.f&=~se),s.v!==v&&$e(s),vt(s),Wn(s,0)}}function Wn(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)Un(e,n[r])}function Gn(e){var t=e.f;if(!(t&16384)){O(e,h);var n=q,r=jn;q=e,jn=!0;try{t&16777232?Sn(e):xn(e),bn(e);var i=Hn(e);e.teardown=typeof i==`function`?i:null,e.wv=Fn}finally{jn=r,q=n}}}async function Kn(){if(C)return new Promise(e=>{requestAnimationFrame(()=>e()),setTimeout(()=>e())});await Promise.resolve(),jt()}function $(e){var t=(e.f&2)!=0;if(An?.add(e),W!==null&&!G&&!(q!==null&&q.f&16384)&&(Y===null||!Y.has(e))){var r=W.deps;if(W.f&2097152)e.rv<In&&(e.rv=In,X===null&&r!==null&&r[Z]===e?Z++:X===null?X=[e]:X.push(e));else{W.deps??=[],n.call(W.deps,e)||W.deps.push(e);var i=e.reactions;i===null?e.reactions=[W]:n.call(i,W)||i.push(W)}}if(U&&M.has(e))return M.get(e);if(t){var a=e;if(U){var o=a.v;return(!(a.f&1024)&&a.reactions!==null||Jn(a))&&(o=gt(a)),M.set(a,o),o}var s=(a.f&512)==0&&!G&&W!==null&&(jn||(W.f&512)!=0),c=(a.f&ne)===0;Bn(a)&&(s&&(a.f|=512),_t(a)),s&&!c&&(yt(a),qn(a))}if(A?.has(e))return A.get(e);if(e.f&8388608)throw e.v;return e.v}function qn(e){if(e.f|=512,e.deps!==null)for(let t of e.deps)(t.reactions??=[]).push(e),t.f&2&&!(t.f&512)&&(yt(t),qn(t))}function Jn(e){if(e.v===v)return!0;if(e.deps===null)return!1;for(let t of e.deps)if(M.has(t)||t.f&2&&Jn(t))return!0;return!1}function Yn(e){var t=G;try{return G=!0,e()}finally{G=t}}function Xn(e){if(!(typeof e!=`object`||!e||e instanceof EventTarget)){if(de in e)Zn(e);else if(!Array.isArray(e))for(let t in e){let n=e[t];typeof n==`object`&&n&&de in n&&Zn(n)}}}function Zn(e,t=new Set){if(typeof e==`object`&&e&&!(e instanceof EventTarget)&&!t.has(e)){t.add(e),e instanceof Date&&e.getTime();for(let n in e)try{Zn(e[n],t)}catch{}let n=l(e);if(n!==Object.prototype&&n!==Array.prototype&&n!==Map.prototype&&n!==Set.prototype&&n!==Date.prototype){let t=o(n);for(let n in t){let r=t[n].get;if(r)try{r.call(e)}catch{}}}}}[...`allowfullscreen.async.autofocus.autoplay.checked.controls.default.disabled.formnovalidate.indeterminate.inert.ismap.loop.multiple.muted.nomodule.novalidate.open.playsinline.readonly.required.reversed.seamless.selected.webkitdirectory.defer.disablepictureinpicture.disableremoteplayback`.split(`.`)];var Qn=[`touchstart`,`touchmove`];function $n(e){return Qn.includes(e)}var er=Symbol(`events`),tr=new Set,nr=new Set;function rr(e,t,n,r={}){function i(e){if(r.capture||or.call(t,e),!e.cancelBubble)return on(()=>n?.call(this,e))}return e.startsWith(`pointer`)||e.startsWith(`touch`)||e===`wheel`?E(()=>{t.addEventListener(e,i,r)}):t.addEventListener(e,i,r),i}function ir(e,t,n,r,i){var a={capture:r,passive:i},o=rr(e,t,n,a);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&dn(()=>{t.removeEventListener(e,o,a)})}var ar=null;function or(e){var t=this,n=t.ownerDocument,r=e.type,a=e.composedPath?.()||[],o=a[0]||e.target;ar=e;var s=0,c=ar===e&&e[er];if(c){var l=a.indexOf(c);if(l!==-1&&(t===document||t===window)){e[er]=t;return}var u=a.indexOf(t);if(u===-1)return;l<=u&&(s=l)}if(o=a[s]||e.target,o!==t){i(e,`currentTarget`,{configurable:!0,get(){return o||n}});var d=W,f=q;K(null),J(null);try{for(var p,m=[];o!==null&&o!==t;){try{var h=o[er]?.[r];h!=null&&(!o.disabled||e.target===o)&&h.call(o,e)}catch(e){p?m.push(e):p=e}if(e.cancelBubble)break;s++,o=s<a.length?a[s]:null}if(p){for(let e of m)queueMicrotask(()=>{throw e});throw p}}finally{e[er]=t,delete e.currentTarget,K(d),J(f)}}}var sr=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy(`svelte-trusted-html`,{createHTML:e=>e});function cr(e){return sr?.createHTML(e)??e}function lr(e){var t=tn(`template`);return t.innerHTML=cr(e.replaceAll(`<!>`,`<!---->`)),t.content}function ur(e,t){var n=q;n.nodes===null&&(n.nodes={start:e,end:t,a:null,t:null})}function dr(e,t){var n=(t&1)!=0,r=(t&2)!=0,i,a=!e.startsWith(`<!>`);return()=>{if(y)return ur(b,null),b;i===void 0&&(i=lr(a?e:`<!>`+e),n||(i=I(i)));var t=r||Yt?document.importNode(i,!0):i.cloneNode(!0);if(n){var o=I(t),s=t.lastChild;ur(o,s)}else ur(t,t);return t}}function fr(e,t,n=`svg`){var r=!e.startsWith(`<!>`),i=(t&1)!=0,a=`<${n}>${r?e:`<!>`+e}</${n}>`,o;return()=>{if(y)return ur(b,null),b;if(!o){var e=I(lr(a));if(i)for(o=document.createDocumentFragment();I(e);)o.appendChild(I(e));else o=I(e)}var t=o.cloneNode(!0);if(i){var n=I(t),r=t.lastChild;ur(n,r)}else ur(t,t);return t}}function pr(e,t){return fr(e,t,`svg`)}function mr(e,t){if(y){var n=q;(!(n.f&32768)||n.nodes.end===null)&&(n.nodes.end=b),Ie();return}e!==null&&e.before(t)}function hr(e,t){var n=t==null?``:typeof t==`object`?`${t}`:t;n!==(e[ge]??=e.nodeValue)&&(e[ge]=n,e.nodeValue=`${n}`)}function gr(e,t){return vr(e,t)}var _r=new Map;function vr(e,{target:t,anchor:n,props:i={},events:a,context:o,intro:s=!0,transformError:c}){Qt();var l=void 0,u=hn(()=>{var s=n??t.appendChild(F());at(s,{pending:()=>{}},t=>{Ke({});var n=w;if(o&&(n.c=o),a&&(i.$$events=a),y&&ur(t,null),l=e(t,i)||{},y&&(q.nodes.end=b,b===null||b.nodeType!==8||b.data!==`]`))throw Ne(),Ae;qe()},c);var u=new Set,d=e=>{for(var n=0;n<e.length;n++){var r=e[n];if(!u.has(r)){u.add(r);var i=$n(r);for(let e of[t,document]){var a=_r.get(e);a===void 0&&(a=new Map,_r.set(e,a));var o=a.get(r);o===void 0?(e.addEventListener(r,or,{passive:i}),a.set(r,1)):a.set(r,o+1)}}}};return d(r(tr)),nr.add(d),()=>{for(var e of u)for(let n of[t,document]){var r=_r.get(n),i=r.get(e);--i==0?(n.removeEventListener(e,or),r.delete(e),r.size===0&&_r.delete(n)):r.set(e,i)}nr.delete(d),s!==n&&s.parentNode?.removeChild(s)}});return yr.set(l,u),l}var yr=new WeakMap,br=class{anchor;#e=new Map;#t=new Map;#n=new Map;#r=new Set;#i=!0;constructor(e,t=!0){this.anchor=e,this.#i=t}#a=e=>{if(this.#e.has(e)){var t=this.#e.get(e),n=this.#t.get(t);if(n)Dn(n),this.#r.delete(t);else{var r=this.#n.get(t);r&&(Dn(r.effect),this.#t.set(t,r.effect),this.#n.delete(t),r.fragment.lastChild.remove(),this.anchor.before(r.fragment),n=r.effect)}for(let[t,n]of this.#e){if(this.#e.delete(t),t===e)break;let r=this.#n.get(n);r&&(H(r.effect),this.#n.delete(n))}for(let[e,r]of this.#t){if(e===t||this.#r.has(e))continue;let i=()=>{if(Array.from(this.#e.values()).includes(e)){var t=document.createDocumentFragment();kn(r,t),t.append(F()),this.#n.set(e,{effect:r,fragment:t})}else H(r);this.#r.delete(e),this.#t.delete(e)};this.#i||!n?(this.#r.add(e),Tn(r,i,!1)):i()}}};#o=e=>{this.#e.delete(e);let t=Array.from(this.#e.values());for(let[e,n]of this.#n)t.includes(e)||(H(n.effect),this.#n.delete(e))};ensure(e,t){var n=k,r=en();if(t&&!this.#t.has(e)&&!this.#n.has(e))if(r){var i=document.createDocumentFragment(),a=F();i.append(a),this.#n.set(e,{effect:V(()=>t(a)),fragment:i})}else this.#t.set(e,V(()=>t(this.anchor)));if(this.#e.set(n,e),r){for(let[t,r]of this.#t)t===e?n.unskip_effect(r):n.skip_effect(r);for(let[t,r]of this.#n)t===e?n.unskip_effect(r.effect):n.skip_effect(r.effect);n.oncommit(this.#a),n.ondiscard(this.#o)}else y&&(this.anchor=b),this.#a(n)}};function xr(e,t,n=!1){var r;y&&(r=b,Ie());var i=new br(e),a=n?ie:0;function o(e,t){if(y){var n=ze(r);if(e!==parseInt(n.substring(1))){var a=Re();x(a),i.anchor=a,Fe(!1),i.ensure(e,t),Fe(!0);return}}i.ensure(e,t)}yn(()=>{var e=!1;t((t,n=0)=>{e=!0,o(n,t)}),e||o(-1,null)},a)}var Sr=Symbol(`is custom element`),Cr=Symbol(`is html`),wr=ye?`link`:`LINK`;function Tr(e){if(y){var t=!1,n=()=>{if(!t){if(t=!0,e.hasAttribute(`value`)){var n=e.value;Er(e,`value`,null),e.value=n}if(e.hasAttribute(`checked`)){var r=e.checked;Er(e,`checked`,null),e.checked=r}}};e[_e]=n,E(n),an()}}function Er(e,t,n,r){var i=Dr(e);y&&(i[t]=e.getAttribute(t),t===`src`||t===`srcset`||t===`href`&&e.nodeName===wr)||i[t]!==(i[t]=n)&&(t===`loading`&&(e[fe]=n),n==null?e.removeAttribute(t):typeof n!=`string`&&kr(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function Dr(e){return e[pe]??={[Sr]:e.nodeName.includes(`-`),[Cr]:e.namespaceURI===je}}var Or=new Map;function kr(e){var t=e.getAttribute(`is`)||e.nodeName,n=Or.get(t);if(n)return n;Or.set(t,n=[]);for(var r,i=e,a=Element.prototype;a!==i;){for(var s in r=o(i),r)r[s].set&&s!==`innerHTML`&&s!==`textContent`&&s!==`innerText`&&n.push(s);i=l(i)}return n}function Ar(e,t,n=t){var r=new WeakSet;sn(e,`input`,async i=>{var a=i?e.defaultValue:e.value;if(a=jr(e)?Mr(a):a,n(a),k!==null&&r.add(k),await Kn(),a!==(a=t())){var o=e.selectionStart,s=e.selectionEnd,c=e.value.length;if(e.value=a??``,s!==null){var l=e.value.length;o===s&&s===c&&l>c?(e.selectionStart=l,e.selectionEnd=l):(e.selectionStart=o,e.selectionEnd=Math.min(s,l))}}}),(y&&e.defaultValue!==e.value||Yn(t)==null&&e.value)&&(n(jr(e)?Mr(e.value):e.value),k!==null&&r.add(k)),_n(()=>{var n=t();if(e===document.activeElement){var i=C?St:k;if(r.has(i))return}jr(e)&&n===Mr(e.value)||e.type===`date`&&!n&&!e.value||n!==e.value&&(e.value=n??``)})}function jr(e){var t=e.type;return t===`number`||t===`range`}function Mr(e){return e===``?null:+e}function Nr(e){return function(...t){return t[0].preventDefault(),e?.apply(this,t)}}function Pr(e=!1){let t=w,n=t.l.u;if(!n)return;let r=()=>Xn(t.s);if(e){let e=0,n={},i=dt(()=>{let r=!1,i=t.s;for(let e in i)i[e]!==n[e]&&(n[e]=i[e],r=!0);return r&&e++,e});r=()=>$(i)}n.b.length&&mn(()=>{Fr(t,r),p(n.b)}),fn(()=>{let e=Yn(()=>n.m.map(f));return()=>{for(let t of e)typeof t==`function`&&t()}}),n.a.length&&fn(()=>{Fr(t,r),p(n.a)})}function Fr(e,t){if(e.l.s)for(let t of e.l.s)$(t);t()}function Ir(e){w===null&&be(`onMount`),Ue&&w.l!==null?Lr(w).m.push(e):fn(()=>{let t=Yn(e);if(typeof t==`function`)return t})}function Lr(e){var t=e.l;return t.u??={a:[],b:[],m:[]}}typeof window<`u`&&((window.__svelte??={}).v??=new Set).add(`5`),We();var Rr=pr(`<svg viewBox="0 0 16 16" fill="currentColor" class="svelte-1n46o8q"><path d="M8 11a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0 1.5a4.5 4.5 0 1 1 0-9 4.5 4.5 0 0 1 0 9zM8 0a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-1 0v-2A.5.5 0 0 1 8 0zm0 13.5a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-1 0v-2a.5.5 0 0 1 .5-.5zM2.343 2.343a.5.5 0 0 1 .707 0l1.414 1.414a.5.5 0 1 1-.707.707L2.343 3.05a.5.5 0 0 1 0-.707zm9.193 9.193a.5.5 0 0 1 .707 0l1.414 1.414a.5.5 0 0 1-.707.707l-1.414-1.414a.5.5 0 0 1 0-.707zM0 8a.5.5 0 0 1 .5-.5h2a.5.5 0 0 1 0 1h-2A.5.5 0 0 1 0 8zm13.5 0a.5.5 0 0 1 .5-.5h2a.5.5 0 0 1 0 1h-2a.5.5 0 0 1-.5-.5zM2.343 13.657a.5.5 0 0 1 0-.707l1.414-1.414a.5.5 0 1 1 .707.707l-1.414 1.414a.5.5 0 0 1-.707 0zm9.193-9.193a.5.5 0 0 1 0-.707l1.414-1.414a.5.5 0 0 1 .707.707l-1.414 1.414a.5.5 0 0 1-.707 0z"></path></svg>`),zr=pr(`<svg viewBox="0 0 16 16" fill="currentColor" class="svelte-1n46o8q"><path d="M6 .278a.77.77 0 0 1 .08.858 7.2 7.2 0 0 0-.878 3.46c0 4.021 3.278 7.277 7.318 7.277.527 0 1.04-.055 1.533-.16a.79.79 0 0 1 .81.316.73.73 0 0 1-.031.893A8.349 8.349 0 0 1 8.344 16C3.734 16 0 12.286 0 7.71 0 4.266 2.114 1.312 5.124.06A.752.752 0 0 1 6 .278z"></path></svg>`),Br=pr(`<svg viewBox="0 0 16 16" fill="currentColor" class="svelte-1n46o8q"><path d="M8 15A7 7 0 1 0 8 1zm0 1A8 8 0 1 1 8 0a8 8 0 0 1 0 16z"></path></svg>`),Vr=dr(`<p class="success svelte-1n46o8q">Connected. You can close this tab and return to the terminal.</p>`),Hr=dr(`<p class="error svelte-1n46o8q"> </p>`),Ur=dr(`<p class="subtitle svelte-1n46o8q">Paste your DataLab Rotterdam Nova API key to connect nova-ai-cli.</p> <form class="svelte-1n46o8q"><input type="password" placeholder="Nova API key" autocomplete="off" required="" class="svelte-1n46o8q"/> <button type="submit" class="svelte-1n46o8q"> </button></form> <!> <div class="help-links svelte-1n46o8q"><a class="help-button svelte-1n46o8q" target="_blank" rel="noopener noreferrer">No API key? Create one</a> <a class="docs-link svelte-1n46o8q" target="_blank" rel="noopener noreferrer">Read the docs</a></div>`,1),Wr=dr(`<main class="svelte-1n46o8q"><button class="theme-toggle svelte-1n46o8q" type="button"><!></button> <div class="card svelte-1n46o8q"><div class="logo svelte-1n46o8q" aria-hidden="true"><svg viewBox="0 0 720 720" xmlns="http://www.w3.org/2000/svg" class="svelte-1n46o8q"><g transform="translate(0,720) scale(0.1,-0.1)" fill="currentColor" stroke="none"><path d="M3280 7109 c-36 -5 -105 -14 -155 -20 -546 -65 -1154 -314 -1615 -663 -148 -112 -213 -170 -383 -341 -200 -201 -367 -416 -500 -640 -295 -501 -455 -1022 -484 -1577 -6 -117 -5 -128 12 -134 21 -8 483 11 605 26 172 20 375 61 394 81 6 5 20 9 33 9 13 0 31 4 41 9 9 5 35 14 57 21 22 7 73 28 113 47 39 18 74 33 77 33 3 0 24 12 48 27 23 15 60 36 82 47 162 84 418 333 520 506 6 10 16 24 22 31 22 28 132 238 153 294 20 53 57 147 69 178 5 12 12 33 15 47 2 14 9 41 15 60 5 19 15 55 22 80 6 25 15 54 20 65 4 11 10 38 13 60 21 166 37 218 64 213 12 -2 19 -17 24 -53 16 -111 41 -235 56 -280 22 -65 32 -102 32 -123 0 -11 5 -24 10 -27 6 -3 10 -14 10 -23 0 -15 36 -111 87 -232 69 -163 199 -360 325 -491 50 -53 165 -148 245 -202 67 -45 245 -139 321 -168 12 -5 32 -13 45 -19 29 -12 160 -54 217 -69 25 -7 59 -17 76 -22 17 -5 39 -9 49 -9 10 0 32 -4 49 -9 50 -16 137 -33 206 -43 243 -32 331 -40 660 -57 113 -6 277 -15 365 -21 109 -8 413 -10 955 -5 718 5 795 7 804 22 10 18 0 250 -15 358 -63 445 -159 756 -352 1141 -163 325 -354 588 -625 859 -290 291 -565 491 -910 664 -329 165 -740 291 -1082 331 -52 6 -129 15 -170 21 -90 11 -529 10 -620 -2z"></path><path d="M5285 3480 c-250 -11 -596 -33 -870 -55 -44 -4 -84 -11 -90 -16 -5 -5 -28 -9 -52 -9 -24 0 -69 -6 -101 -14 -113 -28 -153 -36 -177 -36 -13 0 -27 -4 -30 -10 -3 -5 -16 -10 -27 -10 -12 0 -35 -4 -52 -10 -127 -39 -202 -65 -210 -72 -6 -4 -16 -8 -24 -8 -28 0 -269 -123 -347 -177 -103 -72 -234 -181 -265 -222 -14 -18 -38 -47 -53 -64 -64 -74 -157 -220 -211 -332 -32 -66 -62 -128 -67 -137 -5 -10 -9 -23 -9 -30 0 -7 -11 -35 -25 -63 -13 -27 -25 -60 -25 -72 0 -12 -4 -24 -9 -27 -5 -3 -11 -20 -14 -38 -2 -18 -12 -58 -21 -88 -25 -81 -49 -197 -62 -297 -6 -44 -28 -73 -43 -57 -16 17 -31 77 -31 120 0 24 -4 46 -10 49 -5 3 -10 20 -10 37 0 18 -4 45 -9 62 -5 17 -17 58 -26 91 -9 33 -21 70 -26 83 -5 13 -9 32 -9 43 0 10 -5 28 -10 39 -6 11 -15 29 -20 40 -6 11 -10 26 -10 34 0 8 -6 27 -14 43 -8 15 -19 39 -24 53 -26 66 -82 179 -92 185 -5 3 -10 13 -10 21 0 9 -15 36 -33 62 -17 26 -36 54 -42 64 -72 119 -220 284 -340 378 -89 70 -107 83 -220 151 -62 37 -219 110 -280 129 -22 7 -48 16 -57 21 -10 5 -28 9 -41 9 -13 0 -27 4 -32 9 -6 5 -32 14 -60 21 -27 6 -68 16 -90 21 -136 35 -436 63 -737 70 -98 2 -111 1 -121 -16 -17 -30 7 -334 43 -545 32 -186 103 -433 185 -645 121 -308 323 -654 535 -915 98 -120 388 -408 501 -497 169 -133 191 -149 326 -235 390 -249 852 -425 1308 -498 398 -64 886 -52 1273 31 551 118 1049 356 1479 708 135 110 392 366 493 491 455 564 730 1264 766 1952 3 75 4 147 1 160 l-6 23 -788 1 c-433 1 -873 -2 -978 -6z"></path></g></svg></div> <h1 class="svelte-1n46o8q">Connect Nova AI</h1> <!></div></main>`);function Gr(e,t){Ke(t,!1);let n=`theme`,r=[`light`,`dark`,`auto`],i=Ht(`auto`);function a(e){let t=e===`auto`?window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`:e;document.documentElement.setAttribute(`data-theme`,t)}function o(e){P(i,e),localStorage.setItem(n,e),a(e)}function s(){let e=r[(r.indexOf($(i))+1)%r.length];o(e)}Ir(()=>{P(i,localStorage.getItem(n)??`auto`),a($(i));let e=window.matchMedia(`(prefers-color-scheme: dark)`),t=()=>{$(i)===`auto`&&a(`auto`)};return e.addEventListener(`change`,t),()=>e.removeEventListener(`change`,t)});let c=Ht(``),l=Ht(`idle`),u=Ht(``);async function d(){P(l,`submitting`),P(u,``);try{let e=await fetch(`/api/authenticate`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({apiKey:$(c)})});if(!e.ok){P(u,(await e.json().catch(()=>null))?.message??`Failed to validate API key.`),P(l,`error`);return}P(l,`success`)}catch{P(u,`Could not reach the local auth server.`),P(l,`error`)}}Pr();var f=Wr(),p=R(f),m=R(p),h=e=>{mr(e,Rr())},g=e=>{mr(e,zr())},_=e=>{mr(e,Br())};xr(m,e=>{$(i)===`light`?e(h):$(i)===`dark`?e(g,1):e(_,-1)}),S(p);var ee=z(p,2),te=z(R(ee),4),ne=e=>{mr(e,Vr())},re=e=>{var t=Ur(),n=z($t(t),2),r=R(n);Tr(r);var i=z(r,2),a=R(i,!0);S(i),S(n);var o=z(n,2),s=e=>{var t=Hr(),n=R(t,!0);S(t),vn(()=>hr(n,$(u))),mr(e,t)};xr(o,e=>{$(l)===`error`&&e(s)});var f=z(o,2),p=R(f);Er(p,`href`,`https://platform.nova.datalabrotterdam.nl/dashboard/api-keys?name=Nova%20AI%20VSCode%20Extensie&scopes=models:read,llm:call`),Er(z(p,2),`href`,`https://docs.datalabrotterdam.nl/services/nova-ai`),S(f),vn(()=>{r.disabled=$(l)===`submitting`,i.disabled=$(l)===`submitting`||!$(c),hr(a,$(l)===`submitting`?`Connecting…`:`Connect`)}),Ar(r,()=>$(c),e=>P(c,e)),ir(`submit`,n,Nr(d)),mr(e,t)};xr(te,e=>{$(l)===`success`?e(ne):e(re,-1)}),S(ee),S(f),vn(()=>Er(p,`title`,`Theme: ${$(i)}`)),ir(`click`,p,s),mr(e,f),qe()}gr(Gr,{target:document.getElementById(`app`)});
@@ -1,46 +0,0 @@
1
- <?xml version="1.0" standalone="no"?>
2
- <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
3
- "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
4
- <svg version="1.0" xmlns="http://www.w3.org/2000/svg"
5
- width="720.000000pt" height="720.000000pt" viewBox="0 0 720.000000 720.000000"
6
- preserveAspectRatio="xMidYMid meet">
7
-
8
- <g transform="translate(0.000000,720.000000) scale(0.100000,-0.100000)"
9
- fill="#fff" stroke="none">
10
- <path d="M3280 7109 c-36 -5 -105 -14 -155 -20 -546 -65 -1154 -314 -1615
11
- -663 -148 -112 -213 -170 -383 -341 -200 -201 -367 -416 -500 -640 -295 -501
12
- -455 -1022 -484 -1577 -6 -117 -5 -128 12 -134 21 -8 483 11 605 26 172 20
13
- 375 61 394 81 6 5 20 9 33 9 13 0 31 4 41 9 9 5 35 14 57 21 22 7 73 28 113
14
- 47 39 18 74 33 77 33 3 0 24 12 48 27 23 15 60 36 82 47 162 84 418 333 520
15
- 506 6 10 16 24 22 31 22 28 132 238 153 294 20 53 57 147 69 178 5 12 12 33
16
- 15 47 2 14 9 41 15 60 5 19 15 55 22 80 6 25 15 54 20 65 4 11 10 38 13 60 21
17
- 166 37 218 64 213 12 -2 19 -17 24 -53 16 -111 41 -235 56 -280 22 -65 32
18
- -102 32 -123 0 -11 5 -24 10 -27 6 -3 10 -14 10 -23 0 -15 36 -111 87 -232 69
19
- -163 199 -360 325 -491 50 -53 165 -148 245 -202 67 -45 245 -139 321 -168 12
20
- -5 32 -13 45 -19 29 -12 160 -54 217 -69 25 -7 59 -17 76 -22 17 -5 39 -9 49
21
- -9 10 0 32 -4 49 -9 50 -16 137 -33 206 -43 243 -32 331 -40 660 -57 113 -6
22
- 277 -15 365 -21 109 -8 413 -10 955 -5 718 5 795 7 804 22 10 18 0 250 -15
23
- 358 -63 445 -159 756 -352 1141 -163 325 -354 588 -625 859 -290 291 -565 491
24
- -910 664 -329 165 -740 291 -1082 331 -52 6 -129 15 -170 21 -90 11 -529 10
25
- -620 -2z"/>
26
- <path d="M5285 3480 c-250 -11 -596 -33 -870 -55 -44 -4 -84 -11 -90 -16 -5
27
- -5 -28 -9 -52 -9 -24 0 -69 -6 -101 -14 -113 -28 -153 -36 -177 -36 -13 0 -27
28
- -4 -30 -10 -3 -5 -16 -10 -27 -10 -12 0 -35 -4 -52 -10 -127 -39 -202 -65
29
- -210 -72 -6 -4 -16 -8 -24 -8 -28 0 -269 -123 -347 -177 -103 -72 -234 -181
30
- -265 -222 -14 -18 -38 -47 -53 -64 -64 -74 -157 -220 -211 -332 -32 -66 -62
31
- -128 -67 -137 -5 -10 -9 -23 -9 -30 0 -7 -11 -35 -25 -63 -13 -27 -25 -60 -25
32
- -72 0 -12 -4 -24 -9 -27 -5 -3 -11 -20 -14 -38 -2 -18 -12 -58 -21 -88 -25
33
- -81 -49 -197 -62 -297 -6 -44 -28 -73 -43 -57 -16 17 -31 77 -31 120 0 24 -4
34
- 46 -10 49 -5 3 -10 20 -10 37 0 18 -4 45 -9 62 -5 17 -17 58 -26 91 -9 33 -21
35
- 70 -26 83 -5 13 -9 32 -9 43 0 10 -5 28 -10 39 -6 11 -15 29 -20 40 -6 11 -10
36
- 26 -10 34 0 8 -6 27 -14 43 -8 15 -19 39 -24 53 -26 66 -82 179 -92 185 -5 3
37
- -10 13 -10 21 0 9 -15 36 -33 62 -17 26 -36 54 -42 64 -72 119 -220 284 -340
38
- 378 -89 70 -107 83 -220 151 -62 37 -219 110 -280 129 -22 7 -48 16 -57 21
39
- -10 5 -28 9 -41 9 -13 0 -27 4 -32 9 -6 5 -32 14 -60 21 -27 6 -68 16 -90 21
40
- -136 35 -436 63 -737 70 -98 2 -111 1 -121 -16 -17 -30 7 -334 43 -545 32
41
- -186 103 -433 185 -645 121 -308 323 -654 535 -915 98 -120 388 -408 501 -497
42
- 169 -133 191 -149 326 -235 390 -249 852 -425 1308 -498 398 -64 886 -52 1273
43
- 31 551 118 1049 356 1479 708 135 110 392 366 493 491 455 564 730 1264 766
44
- 1952 3 75 4 147 1 160 l-6 23 -788 1 c-433 1 -873 -2 -978 -6z"/>
45
- </g>
46
- </svg>
@@ -1,32 +0,0 @@
1
- <!doctype html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="UTF-8" />
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
- <title>Connect Nova AI</title>
7
- <link rel="icon" type="image/svg+xml" href="/favicon.svg" />
8
- <link rel="preconnect" href="https://fonts.googleapis.com" />
9
- <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
10
- <link
11
- href="https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&display=swap"
12
- rel="stylesheet"
13
- />
14
- <script>
15
- (function () {
16
- var stored = localStorage.getItem("theme") || "auto";
17
- var resolved =
18
- stored === "auto"
19
- ? window.matchMedia("(prefers-color-scheme: dark)").matches
20
- ? "dark"
21
- : "light"
22
- : stored;
23
- document.documentElement.setAttribute("data-theme", resolved);
24
- })();
25
- </script>
26
- <script type="module" crossorigin src="/assets/index-D2Z0sfLR.js"></script>
27
- <link rel="stylesheet" crossorigin href="/assets/index-CSccI7lJ.css">
28
- </head>
29
- <body>
30
- <div id="app"></div>
31
- </body>
32
- </html>